@ssgoi/core 7.3.0-beta.3 → 7.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/animation/host-animation.d.ts +3 -0
- package/dist/animation/host-animation.d.ts.map +1 -1
- package/dist/animation/web-animation.d.ts +11 -1
- package/dist/animation/web-animation.d.ts.map +1 -1
- package/dist/animation/web-presentation.d.ts +14 -1
- package/dist/animation/web-presentation.d.ts.map +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.js +572 -557
- package/dist/internal.cjs +1 -1
- package/dist/internal.js +727 -709
- package/dist/{retain-opacity-Bp_Y__-B.js → retain-opacity-BVcRlLr1.js} +348 -331
- package/dist/retain-opacity-BrtENsD0.cjs +1 -0
- package/dist/ssgoi-transition/create-ssgoi-transition-context.d.ts.map +1 -1
- package/dist/transitions/zoom/provider/blur.d.ts +2 -0
- package/dist/transitions/zoom/provider/blur.d.ts.map +1 -1
- package/dist/transitions/zoom/provider/index.d.ts +3 -0
- package/dist/transitions/zoom/provider/index.d.ts.map +1 -1
- package/dist/transitions/zoom/transition.d.ts +15 -1
- package/dist/transitions/zoom/transition.d.ts.map +1 -1
- package/dist/transitions/zoom/types.d.ts +5 -2
- package/dist/transitions/zoom/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/retain-opacity-5kqI1OCo.cjs +0 -1
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
var ke = Object.defineProperty;
|
|
2
2
|
var De = (t, e, n) => e in t ? ke(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
-
var
|
|
3
|
+
var O = (t, e, n) => De(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
4
|
import { d as k, w as D } from "./index-B_K3Vnj-.js";
|
|
5
|
-
import { W as
|
|
6
|
-
import { A as
|
|
7
|
-
import { P as Fe, I as
|
|
5
|
+
import { W as x, M as I, r as ot } from "./retain-opacity-BVcRlLr1.js";
|
|
6
|
+
import { A as fr } from "./retain-opacity-BVcRlLr1.js";
|
|
7
|
+
import { P as Fe, I as E, S as Pt, b as Me, d as vt, a as Te, D as Ye } from "./provider-BLf6XeXT.js";
|
|
8
8
|
import { F as Le, a as He, p as it, S as ze } from "./page-motion-CoPTk-Gd.js";
|
|
9
9
|
class Ne {
|
|
10
10
|
constructor(e) {
|
|
11
|
-
|
|
11
|
+
O(this, "durationSec");
|
|
12
12
|
this.durationSec = Math.max(1 / 60, e.durationSec);
|
|
13
13
|
}
|
|
14
14
|
step(e, n, o) {
|
|
@@ -47,7 +47,7 @@ function z(t, e) {
|
|
|
47
47
|
o.height / c
|
|
48
48
|
);
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function X(t, e) {
|
|
51
51
|
const { scrollingElement: n, positionedParent: o } = t, i = n !== o && n.contains(o) ? Ft(n, o).top : 0;
|
|
52
52
|
return {
|
|
53
53
|
top: t[e].scroll.y,
|
|
@@ -56,7 +56,7 @@ function V(t, e) {
|
|
|
56
56
|
height: n.clientHeight - i
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function pe(t, e) {
|
|
60
60
|
const { scrollingElement: n, positionedParent: o } = t, i = n !== o && n.contains(o) ? Ft(n, o).top : 0;
|
|
61
61
|
return {
|
|
62
62
|
top: t[e].scroll.y - i,
|
|
@@ -95,7 +95,7 @@ function We({
|
|
|
95
95
|
}
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function Xe() {
|
|
99
99
|
return {
|
|
100
100
|
outPhysics: zt,
|
|
101
101
|
inPhysics: zt,
|
|
@@ -105,7 +105,7 @@ function Ve() {
|
|
|
105
105
|
build: We
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
|
-
const Nt = 30,
|
|
108
|
+
const Nt = 30, Ve = {
|
|
109
109
|
inertia: { acceleration: 150, resistance: 1.5, restDelta: 0.1 }
|
|
110
110
|
}, Be = {
|
|
111
111
|
spring: { stiffness: 180, damping: 34, restDelta: 0.1, restSpeed: 0.1 }
|
|
@@ -138,7 +138,7 @@ function Ue({
|
|
|
138
138
|
}
|
|
139
139
|
function je() {
|
|
140
140
|
return {
|
|
141
|
-
outPhysics:
|
|
141
|
+
outPhysics: Ve,
|
|
142
142
|
inPhysics: Be,
|
|
143
143
|
// Phased motion: outgoing falls away first under inertia, then incoming
|
|
144
144
|
// springs in. The fade-through shape comes from the integrator curves
|
|
@@ -148,7 +148,7 @@ function je() {
|
|
|
148
148
|
};
|
|
149
149
|
}
|
|
150
150
|
const Ze = {
|
|
151
|
-
snappy:
|
|
151
|
+
snappy: Xe(),
|
|
152
152
|
fluid: je()
|
|
153
153
|
}, Wt = 8, Ge = {
|
|
154
154
|
inertia: { acceleration: 150, resistance: 1.5, restDelta: 0.1 }
|
|
@@ -231,23 +231,23 @@ function on() {
|
|
|
231
231
|
build: nn
|
|
232
232
|
};
|
|
233
233
|
}
|
|
234
|
-
const
|
|
235
|
-
snappy:
|
|
236
|
-
directional:
|
|
234
|
+
const Xt = Je(), rn = {
|
|
235
|
+
snappy: Xt,
|
|
236
|
+
directional: Xt,
|
|
237
237
|
"non-directional": on()
|
|
238
|
-
},
|
|
238
|
+
}, Vt = {
|
|
239
239
|
spring: { stiffness: 280, damping: 30, restDelta: 0.1, restSpeed: 0.1 }
|
|
240
|
-
},
|
|
240
|
+
}, ut = 0.1, ft = 1 / 3, Bt = (t) => Math.max(0, Math.min(1, t));
|
|
241
241
|
function sn({
|
|
242
242
|
direction: t
|
|
243
243
|
}) {
|
|
244
|
-
const e = t === "forward" ? 1 : -1, n = 1 - e *
|
|
244
|
+
const e = t === "forward" ? 1 : -1, n = 1 - e * ut;
|
|
245
245
|
return {
|
|
246
246
|
out: {
|
|
247
247
|
willChange: "transform, opacity",
|
|
248
248
|
startStyle: {},
|
|
249
249
|
animate: (o) => ({
|
|
250
|
-
transform: `scale(${1 + e * o *
|
|
250
|
+
transform: `scale(${1 + e * o * ut})`,
|
|
251
251
|
opacity: `${Bt(1 - o / ft)}`
|
|
252
252
|
})
|
|
253
253
|
},
|
|
@@ -258,7 +258,7 @@ function sn({
|
|
|
258
258
|
opacity: "0"
|
|
259
259
|
},
|
|
260
260
|
animate: (o) => ({
|
|
261
|
-
transform: `scale(${n + e * o *
|
|
261
|
+
transform: `scale(${n + e * o * ut})`,
|
|
262
262
|
opacity: `${Bt((o - ft) / (1 - ft))}`
|
|
263
263
|
})
|
|
264
264
|
}
|
|
@@ -266,8 +266,8 @@ function sn({
|
|
|
266
266
|
}
|
|
267
267
|
function an() {
|
|
268
268
|
return {
|
|
269
|
-
outPhysics:
|
|
270
|
-
inPhysics:
|
|
269
|
+
outPhysics: Vt,
|
|
270
|
+
inPhysics: Vt,
|
|
271
271
|
// Scale must move together on both sides; fade-through is encoded inside
|
|
272
272
|
// each tick (piecewise), not via composition staggering — so parallel.
|
|
273
273
|
composition: { mode: "parallel" },
|
|
@@ -311,13 +311,13 @@ const Zt = an(), dn = {
|
|
|
311
311
|
snappy: Zt,
|
|
312
312
|
directional: Zt,
|
|
313
313
|
"non-directional": ln()
|
|
314
|
-
},
|
|
314
|
+
}, pn = {
|
|
315
315
|
x: Ze,
|
|
316
316
|
y: rn,
|
|
317
317
|
z: dn
|
|
318
318
|
};
|
|
319
|
-
function
|
|
320
|
-
const n =
|
|
319
|
+
function un(t, e) {
|
|
320
|
+
const n = pn[t];
|
|
321
321
|
return n[e] ?? n.snappy;
|
|
322
322
|
}
|
|
323
323
|
const fn = "x", hn = "snappy";
|
|
@@ -326,14 +326,14 @@ function Gt(t, e) {
|
|
|
326
326
|
for (const [n, o] of Object.entries(e.startStyle))
|
|
327
327
|
t.style[n] = o;
|
|
328
328
|
}
|
|
329
|
-
function
|
|
329
|
+
function ue(t) {
|
|
330
330
|
t.style.willChange = "auto", t.style.backfaceVisibility = "", t.style.contain = "", t.style.transform = "", t.style.opacity = "", t.style.clipPath = "";
|
|
331
331
|
}
|
|
332
332
|
function yn(t) {
|
|
333
|
-
|
|
333
|
+
ue(t), t.style.pointerEvents = "";
|
|
334
334
|
}
|
|
335
335
|
const mn = (t = {}) => {
|
|
336
|
-
const e = t.type ?? fn, n = t.feel ?? hn, o =
|
|
336
|
+
const e = t.type ?? fn, n = t.feel ?? hn, o = un(e, n), i = (r) => {
|
|
337
337
|
const c = o.build({ direction: r });
|
|
338
338
|
return {
|
|
339
339
|
prepare: ({ from: s, to: l }) => (s.then((a) => {
|
|
@@ -343,26 +343,26 @@ const mn = (t = {}) => {
|
|
|
343
343
|
}), {}),
|
|
344
344
|
animation: ({ from: s, to: l, context: a }) => {
|
|
345
345
|
if (e === "z") {
|
|
346
|
-
const y =
|
|
347
|
-
s.style.clipPath = `inset(${y.top}px 0 calc(100% - ${y.top + y.height}px) 0)`, l.style.clipPath = `inset(${
|
|
346
|
+
const y = X(a, "from"), u = X(a, "to");
|
|
347
|
+
s.style.clipPath = `inset(${y.top}px 0 calc(100% - ${y.top + y.height}px) 0)`, l.style.clipPath = `inset(${u.top}px 0 calc(100% - ${u.top + u.height}px) 0)`;
|
|
348
348
|
}
|
|
349
|
-
const d = new
|
|
349
|
+
const d = new x({
|
|
350
350
|
element: s,
|
|
351
|
-
integrator:
|
|
351
|
+
integrator: E.from(o.outPhysics),
|
|
352
352
|
style: (y) => c.out.animate(y),
|
|
353
353
|
// Restore the reused from node's inline styles on complete. This
|
|
354
354
|
// covers willChange/backfaceVisibility/contain/transform/opacity (from
|
|
355
355
|
// applyStartStyle + the WAAPI final frame), pointerEvents (set in
|
|
356
356
|
// prepare), and clipPath (set above for z; harmless no-op otherwise).
|
|
357
357
|
onDispose: () => yn(s)
|
|
358
|
-
}),
|
|
358
|
+
}), p = new x({
|
|
359
359
|
element: l,
|
|
360
|
-
integrator:
|
|
360
|
+
integrator: E.from(o.inPhysics),
|
|
361
361
|
style: (y) => c.in.animate(y),
|
|
362
|
-
onDispose: () =>
|
|
362
|
+
onDispose: () => ue(l)
|
|
363
363
|
});
|
|
364
364
|
return new I(
|
|
365
|
-
{ out: d, in:
|
|
365
|
+
{ out: d, in: p },
|
|
366
366
|
o.composition
|
|
367
367
|
);
|
|
368
368
|
}
|
|
@@ -376,7 +376,7 @@ const mn = (t = {}) => {
|
|
|
376
376
|
function gn(t, e, n) {
|
|
377
377
|
return t === "y" ? e === "non-directional" ? "non-directional" : "directional" : t !== "x" || e === "snappy" || n === "snappy" ? "snappy" : "fluid";
|
|
378
378
|
}
|
|
379
|
-
function
|
|
379
|
+
function Bi(t = {}, e = {}) {
|
|
380
380
|
const n = t.type ?? "x", o = t.variant, i = t.feel, r = gn(n, o, i);
|
|
381
381
|
return D(
|
|
382
382
|
mn({ type: n, feel: r }),
|
|
@@ -385,7 +385,7 @@ function Vi(t = {}, e = {}) {
|
|
|
385
385
|
}
|
|
386
386
|
const bn = {
|
|
387
387
|
spring: { stiffness: 200, damping: 22 }
|
|
388
|
-
}, wn = 10,
|
|
388
|
+
}, wn = 10, xn = "horizontal", Sn = "#000000";
|
|
389
389
|
function qt(t, e, n, o, i, r) {
|
|
390
390
|
window.getComputedStyle(t).position === "static" && (t.style.position = "relative");
|
|
391
391
|
const s = document.createElement("div");
|
|
@@ -403,25 +403,25 @@ function qt(t, e, n, o, i, r) {
|
|
|
403
403
|
for (let a = 0; a < e; a++) {
|
|
404
404
|
const d = document.createElement("div");
|
|
405
405
|
if (n === "horizontal") {
|
|
406
|
-
const
|
|
406
|
+
const p = 100 / e;
|
|
407
407
|
d.style.cssText = `
|
|
408
408
|
position: absolute;
|
|
409
|
-
top: ${
|
|
409
|
+
top: ${p * a}%;
|
|
410
410
|
left: 0;
|
|
411
411
|
width: 100%;
|
|
412
|
-
height: calc(${
|
|
412
|
+
height: calc(${p}% + 1px);
|
|
413
413
|
background: ${o};
|
|
414
414
|
transform: scaleX(${i === "hidden" ? 0 : 1});
|
|
415
415
|
transform-origin: ${r} center;
|
|
416
416
|
will-change: transform;
|
|
417
417
|
`;
|
|
418
418
|
} else {
|
|
419
|
-
const
|
|
419
|
+
const p = 100 / e;
|
|
420
420
|
d.style.cssText = `
|
|
421
421
|
position: absolute;
|
|
422
422
|
top: 0;
|
|
423
|
-
left: ${
|
|
424
|
-
width: calc(${
|
|
423
|
+
left: ${p * a}%;
|
|
424
|
+
width: calc(${p}% + 1px);
|
|
425
425
|
height: 100%;
|
|
426
426
|
background: ${o};
|
|
427
427
|
transform: scaleY(${i === "hidden" ? 0 : 1});
|
|
@@ -434,9 +434,9 @@ function qt(t, e, n, o, i, r) {
|
|
|
434
434
|
return t.appendChild(s), { container: s, blinds: l };
|
|
435
435
|
}
|
|
436
436
|
const En = (t = {}) => {
|
|
437
|
-
const e = t.blindCount ?? wn, n = t.direction ??
|
|
437
|
+
const e = t.blindCount ?? wn, n = t.direction ?? xn, o = t.blindColor ?? Sn, i = t.physics ?? bn, r = {
|
|
438
438
|
prepare: async ({ from: c, to: s, signal: l, onCleanup: a }) => {
|
|
439
|
-
const d = await c,
|
|
439
|
+
const d = await c, p = await s;
|
|
440
440
|
if (l != null && l.aborted) throw new Error("Blind preparation superseded");
|
|
441
441
|
d.style.zIndex = "1000";
|
|
442
442
|
const y = qt(
|
|
@@ -447,9 +447,9 @@ const En = (t = {}) => {
|
|
|
447
447
|
"hidden",
|
|
448
448
|
"left"
|
|
449
449
|
);
|
|
450
|
-
|
|
451
|
-
const
|
|
452
|
-
|
|
450
|
+
p.style.position = "relative", p.style.zIndex = "0";
|
|
451
|
+
const u = qt(
|
|
452
|
+
p,
|
|
453
453
|
e,
|
|
454
454
|
n,
|
|
455
455
|
o,
|
|
@@ -457,13 +457,13 @@ const En = (t = {}) => {
|
|
|
457
457
|
"right"
|
|
458
458
|
);
|
|
459
459
|
return a == null || a(() => {
|
|
460
|
-
y.container.remove(),
|
|
460
|
+
y.container.remove(), u.container.remove();
|
|
461
461
|
}), {
|
|
462
462
|
fromEl: d,
|
|
463
463
|
fromBlinds: y.blinds,
|
|
464
464
|
fromContainer: y.container,
|
|
465
|
-
toBlinds:
|
|
466
|
-
toContainer:
|
|
465
|
+
toBlinds: u.blinds,
|
|
466
|
+
toContainer: u.container
|
|
467
467
|
};
|
|
468
468
|
},
|
|
469
469
|
animation: ({
|
|
@@ -472,10 +472,10 @@ const En = (t = {}) => {
|
|
|
472
472
|
fromBlinds: l,
|
|
473
473
|
fromContainer: a,
|
|
474
474
|
toBlinds: d,
|
|
475
|
-
toContainer:
|
|
475
|
+
toContainer: p
|
|
476
476
|
}) => {
|
|
477
477
|
const y = l.map(
|
|
478
|
-
(b, g) => new
|
|
478
|
+
(b, g) => new x({
|
|
479
479
|
element: b,
|
|
480
480
|
motion: {
|
|
481
481
|
lifetime: "temporary",
|
|
@@ -483,13 +483,13 @@ const En = (t = {}) => {
|
|
|
483
483
|
key: `blind:${n}:${e}:${g}`,
|
|
484
484
|
space: c
|
|
485
485
|
},
|
|
486
|
-
integrator:
|
|
487
|
-
style: (
|
|
488
|
-
transform: n === "horizontal" ? `scaleX(${
|
|
486
|
+
integrator: E.from(i),
|
|
487
|
+
style: (w) => ({
|
|
488
|
+
transform: n === "horizontal" ? `scaleX(${w})` : `scaleY(${w})`
|
|
489
489
|
})
|
|
490
490
|
})
|
|
491
|
-
),
|
|
492
|
-
(b, g) => new
|
|
491
|
+
), u = d.map(
|
|
492
|
+
(b, g) => new x({
|
|
493
493
|
element: b,
|
|
494
494
|
motion: {
|
|
495
495
|
lifetime: "temporary",
|
|
@@ -497,23 +497,23 @@ const En = (t = {}) => {
|
|
|
497
497
|
key: `blind:${n}:${e}:${g}`,
|
|
498
498
|
space: s
|
|
499
499
|
},
|
|
500
|
-
integrator:
|
|
501
|
-
style: (
|
|
500
|
+
integrator: E.from(i),
|
|
501
|
+
style: (w, C) => ({
|
|
502
502
|
transform: n === "horizontal" ? `scaleX(${C})` : `scaleY(${C})`
|
|
503
503
|
})
|
|
504
504
|
})
|
|
505
|
-
), f = new I(y, { mode: "parallel" }), h = new I(
|
|
505
|
+
), f = new I(y, { mode: "parallel" }), h = new I(u, { mode: "parallel" }), m = new I(
|
|
506
506
|
{ out: f, in: h },
|
|
507
507
|
{ mode: "sequence" }
|
|
508
508
|
);
|
|
509
509
|
return m.onDispose = (b) => {
|
|
510
|
-
|
|
510
|
+
p.remove(), a.remove(), b.owns(c) && (c.style.zIndex = "", c.style.position = "");
|
|
511
511
|
}, m;
|
|
512
512
|
}
|
|
513
513
|
};
|
|
514
514
|
return k({ forward: r, backward: r });
|
|
515
515
|
};
|
|
516
|
-
function
|
|
516
|
+
function Ui(t = {}, e = {}) {
|
|
517
517
|
const { type: n = "horizontal" } = t;
|
|
518
518
|
return D(En({ direction: n }), e.override);
|
|
519
519
|
}
|
|
@@ -572,7 +572,7 @@ function An() {
|
|
|
572
572
|
build: Cn
|
|
573
573
|
};
|
|
574
574
|
}
|
|
575
|
-
const
|
|
575
|
+
const Pn = {
|
|
576
576
|
spring: {
|
|
577
577
|
stiffness: 230,
|
|
578
578
|
damping: 25,
|
|
@@ -582,7 +582,7 @@ const vn = {
|
|
|
582
582
|
}
|
|
583
583
|
}
|
|
584
584
|
};
|
|
585
|
-
function
|
|
585
|
+
function vn(t) {
|
|
586
586
|
const e = t === "enter" ? -20 : 100, n = t === "enter" ? 100 : -20;
|
|
587
587
|
return {
|
|
588
588
|
out: {
|
|
@@ -605,8 +605,8 @@ function Pn(t) {
|
|
|
605
605
|
}
|
|
606
606
|
function Rn() {
|
|
607
607
|
return {
|
|
608
|
-
physics:
|
|
609
|
-
build:
|
|
608
|
+
physics: Pn,
|
|
609
|
+
build: vn
|
|
610
610
|
};
|
|
611
611
|
}
|
|
612
612
|
const In = {
|
|
@@ -622,32 +622,32 @@ const _n = (t = {}) => {
|
|
|
622
622
|
const e = In[t.type ?? On], n = e.physics, o = (i) => {
|
|
623
623
|
const r = i === "forward" ? "enter" : "exit", c = e.build(r), s = r === "enter" ? L : M, l = r === "enter" ? M : L;
|
|
624
624
|
return {
|
|
625
|
-
prepare: ({ from: a, to: d }) => (a.then((
|
|
626
|
-
Kt(
|
|
627
|
-
}), d.then((
|
|
628
|
-
Kt(
|
|
625
|
+
prepare: ({ from: a, to: d }) => (a.then((p) => {
|
|
626
|
+
Kt(p, c.out), p.style.pointerEvents = "none", p.style.zIndex = s;
|
|
627
|
+
}), d.then((p) => {
|
|
628
|
+
Kt(p, c.in), p.style.position = "relative", p.style.zIndex = l;
|
|
629
629
|
}), {}),
|
|
630
630
|
animation: ({ from: a, to: d }) => {
|
|
631
|
-
const
|
|
631
|
+
const p = new x({
|
|
632
632
|
element: a,
|
|
633
|
-
integrator:
|
|
634
|
-
style: (
|
|
633
|
+
integrator: E.from(n),
|
|
634
|
+
style: (u) => c.out.animate(u),
|
|
635
635
|
// The outgoing node is the real, reused element (re-hidden on navigate),
|
|
636
636
|
// so clear every inline style we set on it — mirroring the `to` cleanup,
|
|
637
637
|
// plus the out-only `pointerEvents` / `zIndex`.
|
|
638
638
|
onDispose: () => {
|
|
639
639
|
a.style.willChange = "auto", a.style.backfaceVisibility = "", a.style.contain = "", a.style.transform = "", a.style.opacity = "", a.style.pointerEvents = "", a.style.zIndex = "";
|
|
640
640
|
}
|
|
641
|
-
}), y = new
|
|
641
|
+
}), y = new x({
|
|
642
642
|
element: d,
|
|
643
|
-
integrator:
|
|
644
|
-
style: (
|
|
643
|
+
integrator: E.from(n),
|
|
644
|
+
style: (u) => c.in.animate(u),
|
|
645
645
|
onDispose: () => {
|
|
646
646
|
d.style.willChange = "auto", d.style.backfaceVisibility = "", d.style.contain = "", d.style.transform = "", d.style.opacity = "", d.style.position === "relative" && (d.style.position = ""), d.style.zIndex === l && (d.style.zIndex = "");
|
|
647
647
|
}
|
|
648
648
|
});
|
|
649
|
-
return [
|
|
650
|
-
{ out:
|
|
649
|
+
return [p, y].forEach(J), new I(
|
|
650
|
+
{ out: p, in: y },
|
|
651
651
|
{ mode: "parallel" }
|
|
652
652
|
);
|
|
653
653
|
}
|
|
@@ -661,7 +661,7 @@ const _n = (t = {}) => {
|
|
|
661
661
|
function kn(t) {
|
|
662
662
|
return t === "slide" || t === "crossfade" ? "crossfade" : "parallax";
|
|
663
663
|
}
|
|
664
|
-
function
|
|
664
|
+
function ji(t = {}, e = {}) {
|
|
665
665
|
const n = t.type, o = kn(n);
|
|
666
666
|
return D(_n({ type: o }), e.override);
|
|
667
667
|
}
|
|
@@ -671,9 +671,9 @@ const Dn = (t = {}) => {
|
|
|
671
671
|
r.style.opacity = "0", r.style.willChange = "opacity";
|
|
672
672
|
}), {}),
|
|
673
673
|
animation: ({ from: i, to: r }) => {
|
|
674
|
-
const c = new
|
|
674
|
+
const c = new x({
|
|
675
675
|
element: i,
|
|
676
|
-
integrator:
|
|
676
|
+
integrator: E.from(n),
|
|
677
677
|
// Default bounds (0, 1). `u` runs 1→0 as the animation moves
|
|
678
678
|
// forward, mapping opacity from fully visible to invisible.
|
|
679
679
|
style: (l) => ({
|
|
@@ -682,9 +682,9 @@ const Dn = (t = {}) => {
|
|
|
682
682
|
onDispose: () => {
|
|
683
683
|
i.style.willChange = "auto", i.style.opacity = "";
|
|
684
684
|
}
|
|
685
|
-
}), s = new
|
|
685
|
+
}), s = new x({
|
|
686
686
|
element: r,
|
|
687
|
-
integrator:
|
|
687
|
+
integrator: E.from(e),
|
|
688
688
|
style: (l) => ({
|
|
689
689
|
opacity: it("fade", "in", "forward", l).opacity
|
|
690
690
|
}),
|
|
@@ -700,14 +700,14 @@ const Dn = (t = {}) => {
|
|
|
700
700
|
};
|
|
701
701
|
return k({ forward: o, backward: o });
|
|
702
702
|
};
|
|
703
|
-
function
|
|
703
|
+
function Zi(t = {}, e = {}) {
|
|
704
704
|
return D(Dn(), e.override);
|
|
705
705
|
}
|
|
706
706
|
const mt = {
|
|
707
707
|
scaleDown: { stiffness: 20, damping: 7 },
|
|
708
708
|
translate: { stiffness: 15, damping: 7 },
|
|
709
709
|
scaleUp: { stiffness: 20, damping: 7 }
|
|
710
|
-
},
|
|
710
|
+
}, V = {
|
|
711
711
|
scaleDown: 0,
|
|
712
712
|
translate: 0.2,
|
|
713
713
|
scaleUp: 0.8
|
|
@@ -715,7 +715,7 @@ const mt = {
|
|
|
715
715
|
function Yn(t) {
|
|
716
716
|
const { items: e, from: n, to: o, recordFrame: i } = t, r = Jt / 1e3, c = Math.abs(o - n), s = e.map((a) => ({
|
|
717
717
|
item: a,
|
|
718
|
-
integrator: new
|
|
718
|
+
integrator: new Pt({
|
|
719
719
|
stiffness: a.spring.stiffness,
|
|
720
720
|
damping: a.spring.damping
|
|
721
721
|
}),
|
|
@@ -731,16 +731,16 @@ function Yn(t) {
|
|
|
731
731
|
for (let a = 1; a <= Tn; a++) {
|
|
732
732
|
const d = a * Jt;
|
|
733
733
|
l = d;
|
|
734
|
-
for (const
|
|
735
|
-
!
|
|
736
|
-
for (let
|
|
737
|
-
const y = s[
|
|
734
|
+
for (const p of s)
|
|
735
|
+
!p.started || p.settled || (p.state = p.integrator.step(p.state, o, r), p.integrator.isSettled(p.state, o) ? (p.settleTime += r, p.settleTime >= Me && (p.state = { position: o, velocity: 0 }, p.settled = !0)) : p.settleTime = 0, p.item.tick(p.state.position));
|
|
736
|
+
for (let p = 1; p < s.length; p++) {
|
|
737
|
+
const y = s[p];
|
|
738
738
|
if (y.started) continue;
|
|
739
|
-
const
|
|
740
|
-
if (!
|
|
741
|
-
(c === 0 ? 1 : Math.abs(
|
|
739
|
+
const u = s[p - 1];
|
|
740
|
+
if (!u.started) continue;
|
|
741
|
+
(c === 0 ? 1 : Math.abs(u.state.position - n) / c) >= y.item.offset && (y.started = !0);
|
|
742
742
|
}
|
|
743
|
-
if (i(d), s.every((
|
|
743
|
+
if (i(d), s.every((p) => p.settled)) return d;
|
|
744
744
|
}
|
|
745
745
|
return l;
|
|
746
746
|
}
|
|
@@ -751,10 +751,10 @@ function gt(t, e) {
|
|
|
751
751
|
} : e;
|
|
752
752
|
}
|
|
753
753
|
function Qt(t) {
|
|
754
|
-
const { rect: e, scale: n, direction: o, override: i } = t, r = o === "out" ? { scale: 1, translateY: -e.top } : { scale: n, translateY: -e.top + e.height }, c = gt(i, mt.scaleDown), s = gt(i, mt.translate), l = gt(i, mt.scaleUp), a = o === "out" ? 1 : 0, d = o === "out" ? 0 : 1,
|
|
754
|
+
const { rect: e, scale: n, direction: o, override: i } = t, r = o === "out" ? { scale: 1, translateY: -e.top } : { scale: n, translateY: -e.top + e.height }, c = gt(i, mt.scaleDown), s = gt(i, mt.translate), l = gt(i, mt.scaleUp), a = o === "out" ? 1 : 0, d = o === "out" ? 0 : 1, p = o === "out" ? [
|
|
755
755
|
{
|
|
756
756
|
spring: c,
|
|
757
|
-
offset:
|
|
757
|
+
offset: V.scaleDown,
|
|
758
758
|
tick: (f) => {
|
|
759
759
|
const h = 1 - f;
|
|
760
760
|
r.scale = 1 - (1 - n) * h;
|
|
@@ -762,7 +762,7 @@ function Qt(t) {
|
|
|
762
762
|
},
|
|
763
763
|
{
|
|
764
764
|
spring: s,
|
|
765
|
-
offset:
|
|
765
|
+
offset: V.translate,
|
|
766
766
|
tick: (f) => {
|
|
767
767
|
const h = 1 - f;
|
|
768
768
|
r.translateY = -e.top - e.height * h;
|
|
@@ -770,7 +770,7 @@ function Qt(t) {
|
|
|
770
770
|
},
|
|
771
771
|
{
|
|
772
772
|
spring: l,
|
|
773
|
-
offset:
|
|
773
|
+
offset: V.scaleUp,
|
|
774
774
|
tick: (f) => {
|
|
775
775
|
const h = 1 - f;
|
|
776
776
|
r.scale = n + (1 - n) * h;
|
|
@@ -779,27 +779,27 @@ function Qt(t) {
|
|
|
779
779
|
] : [
|
|
780
780
|
{
|
|
781
781
|
spring: c,
|
|
782
|
-
offset:
|
|
782
|
+
offset: V.scaleDown,
|
|
783
783
|
tick: (f) => {
|
|
784
784
|
r.scale = 1 - (1 - n) * f;
|
|
785
785
|
}
|
|
786
786
|
},
|
|
787
787
|
{
|
|
788
788
|
spring: s,
|
|
789
|
-
offset:
|
|
789
|
+
offset: V.translate,
|
|
790
790
|
tick: (f) => {
|
|
791
791
|
r.translateY = -e.top + e.height * (1 - f);
|
|
792
792
|
}
|
|
793
793
|
},
|
|
794
794
|
{
|
|
795
795
|
spring: l,
|
|
796
|
-
offset:
|
|
796
|
+
offset: V.scaleUp,
|
|
797
797
|
tick: (f) => {
|
|
798
798
|
r.scale = n + (1 - n) * f;
|
|
799
799
|
}
|
|
800
800
|
}
|
|
801
|
-
], y = [],
|
|
802
|
-
items:
|
|
801
|
+
], y = [], u = Yn({
|
|
802
|
+
items: p,
|
|
803
803
|
from: a,
|
|
804
804
|
to: d,
|
|
805
805
|
recordFrame: (f) => y.push({
|
|
@@ -808,7 +808,7 @@ function Qt(t) {
|
|
|
808
808
|
translateY: r.translateY
|
|
809
809
|
})
|
|
810
810
|
});
|
|
811
|
-
return { snapshots: y, totalDuration:
|
|
811
|
+
return { snapshots: y, totalDuration: u };
|
|
812
812
|
}
|
|
813
813
|
function Ln(t, e) {
|
|
814
814
|
if (t.length === 0) return { time: 0, scale: 1, translateY: 0 };
|
|
@@ -908,7 +908,7 @@ function ee(t, e) {
|
|
|
908
908
|
}
|
|
909
909
|
function bt(t, e, n, o, i) {
|
|
910
910
|
const r = n / 1e3;
|
|
911
|
-
return new
|
|
911
|
+
return new x({
|
|
912
912
|
element: t,
|
|
913
913
|
integrator: new Ne({ durationSec: r }),
|
|
914
914
|
lowerBound: 0,
|
|
@@ -921,12 +921,12 @@ const Nn = (t = {}) => {
|
|
|
921
921
|
var r;
|
|
922
922
|
const e = ((r = t.border) == null ? void 0 : r.color) ?? Mn, n = Fn, o = t.physics, i = {
|
|
923
923
|
prepare: ({ from: c, to: s, context: l, onCleanup: a }) => {
|
|
924
|
-
const d =
|
|
924
|
+
const d = X(l, "from"), p = X(l, "to"), y = Ft(document.body, l.positionedParent), u = zn(e, {
|
|
925
925
|
...d,
|
|
926
926
|
top: y.top
|
|
927
927
|
});
|
|
928
928
|
a == null || a(() => {
|
|
929
|
-
for (const f of Object.values(
|
|
929
|
+
for (const f of Object.values(u)) f.remove();
|
|
930
930
|
});
|
|
931
931
|
for (const f of [
|
|
932
932
|
"topLeft",
|
|
@@ -934,21 +934,21 @@ const Nn = (t = {}) => {
|
|
|
934
934
|
"bottomLeft",
|
|
935
935
|
"bottomRight"
|
|
936
936
|
])
|
|
937
|
-
l.positionedParent.appendChild(
|
|
937
|
+
l.positionedParent.appendChild(u[f]);
|
|
938
938
|
return c.then((f) => {
|
|
939
939
|
te(f, d), ee(f, d), f.style.transform = `translateY(${-d.top}px)`;
|
|
940
940
|
}), s.then((f) => {
|
|
941
|
-
te(f,
|
|
942
|
-
}), { borders:
|
|
941
|
+
te(f, p), ee(f, p), f.style.transform = `translateY(${-p.top + p.height}px) scale(${n})`;
|
|
942
|
+
}), { borders: u, fromRect: d, toRect: p };
|
|
943
943
|
},
|
|
944
|
-
animation: ({ from: c, to: s, context: l, borders: a, fromRect: d, toRect:
|
|
944
|
+
animation: ({ from: c, to: s, context: l, borders: a, fromRect: d, toRect: p }) => {
|
|
945
945
|
const y = Qt({
|
|
946
946
|
rect: d,
|
|
947
947
|
scale: n,
|
|
948
948
|
direction: "out",
|
|
949
949
|
override: o
|
|
950
|
-
}),
|
|
951
|
-
rect:
|
|
950
|
+
}), u = Qt({
|
|
951
|
+
rect: p,
|
|
952
952
|
scale: n,
|
|
953
953
|
direction: "in",
|
|
954
954
|
override: o
|
|
@@ -964,28 +964,28 @@ const Nn = (t = {}) => {
|
|
|
964
964
|
}
|
|
965
965
|
), h = bt(
|
|
966
966
|
s,
|
|
967
|
-
|
|
968
|
-
|
|
967
|
+
u.snapshots,
|
|
968
|
+
u.totalDuration,
|
|
969
969
|
(g) => ({
|
|
970
970
|
transform: `translateY(${g.translateY}px) scale(${g.scale})`
|
|
971
971
|
}),
|
|
972
972
|
() => {
|
|
973
973
|
s.style.clipPath = "", s.style.transformOrigin = "", s.style.transform = "";
|
|
974
974
|
}
|
|
975
|
-
), m = Hn.map(([g,
|
|
976
|
-
const
|
|
975
|
+
), m = Hn.map(([g, w], C) => {
|
|
976
|
+
const A = ["topLeft", "topRight", "bottomLeft", "bottomRight"][C];
|
|
977
977
|
return bt(
|
|
978
|
-
a[
|
|
978
|
+
a[A],
|
|
979
979
|
y.snapshots,
|
|
980
980
|
y.totalDuration,
|
|
981
|
-
(
|
|
982
|
-
const S = (d.width - d.width *
|
|
981
|
+
(P) => {
|
|
982
|
+
const S = (d.width - d.width * P.scale) / 2 * 0.7 * g, $ = (d.height - d.height * P.scale) / 2 * 0.7 * w;
|
|
983
983
|
return { transform: `translate(${S}px, ${$}px)` };
|
|
984
984
|
}
|
|
985
985
|
);
|
|
986
986
|
});
|
|
987
987
|
for (const g of m)
|
|
988
|
-
g instanceof
|
|
988
|
+
g instanceof x && (g.motion.lifetime = "temporary");
|
|
989
989
|
const b = K({
|
|
990
990
|
out: f,
|
|
991
991
|
in: h,
|
|
@@ -993,13 +993,13 @@ const Nn = (t = {}) => {
|
|
|
993
993
|
});
|
|
994
994
|
return b.onDispose = () => {
|
|
995
995
|
const g = l.positionedParent;
|
|
996
|
-
for (const
|
|
996
|
+
for (const w of [
|
|
997
997
|
"topLeft",
|
|
998
998
|
"topRight",
|
|
999
999
|
"bottomLeft",
|
|
1000
1000
|
"bottomRight"
|
|
1001
1001
|
]) {
|
|
1002
|
-
const C = a[
|
|
1002
|
+
const C = a[w];
|
|
1003
1003
|
C.parentElement === g && g.removeChild(C);
|
|
1004
1004
|
}
|
|
1005
1005
|
}, b;
|
|
@@ -1007,7 +1007,7 @@ const Nn = (t = {}) => {
|
|
|
1007
1007
|
};
|
|
1008
1008
|
return k({ forward: i, backward: i });
|
|
1009
1009
|
};
|
|
1010
|
-
function
|
|
1010
|
+
function Gi(t = {}, e = {}) {
|
|
1011
1011
|
const { options: n } = t, o = (n == null ? void 0 : n.borderColor) !== void 0 ? { border: { color: n.borderColor } } : void 0;
|
|
1012
1012
|
return D(Nn(o), e.override);
|
|
1013
1013
|
}
|
|
@@ -1022,7 +1022,7 @@ function Wn(t) {
|
|
|
1022
1022
|
const e = Number.parseFloat(t);
|
|
1023
1023
|
return Number.isFinite(e) && e > 0 ? e : null;
|
|
1024
1024
|
}
|
|
1025
|
-
function
|
|
1025
|
+
function Xn(t) {
|
|
1026
1026
|
return t === "contain" || t === "cover" ? t : null;
|
|
1027
1027
|
}
|
|
1028
1028
|
function Rt(t) {
|
|
@@ -1040,7 +1040,7 @@ function he(t) {
|
|
|
1040
1040
|
}
|
|
1041
1041
|
return e.length === 1 ? e[0] ?? null : null;
|
|
1042
1042
|
}
|
|
1043
|
-
function
|
|
1043
|
+
function Vn(t) {
|
|
1044
1044
|
var l, a;
|
|
1045
1045
|
if (!Rt(t)) return null;
|
|
1046
1046
|
const e = t, n = e.naturalWidth, o = e.naturalHeight;
|
|
@@ -1064,7 +1064,7 @@ function Q(t) {
|
|
|
1064
1064
|
function Un(t) {
|
|
1065
1065
|
const e = Q(t), n = Bn(e.objectPosition ?? "");
|
|
1066
1066
|
return {
|
|
1067
|
-
fit: n ?
|
|
1067
|
+
fit: n ? Xn(e.objectFit ?? null) : null,
|
|
1068
1068
|
centered: n
|
|
1069
1069
|
};
|
|
1070
1070
|
}
|
|
@@ -1188,18 +1188,18 @@ function ge(t, e) {
|
|
|
1188
1188
|
function Kn(t, e, n, o) {
|
|
1189
1189
|
const i = he(t), r = i ? n(i) : e, c = o.legacyAspectRatioAttribute ? Wn(
|
|
1190
1190
|
t.getAttribute(o.legacyAspectRatioAttribute) ?? (i == null ? void 0 : i.getAttribute(o.legacyAspectRatioAttribute)) ?? null
|
|
1191
|
-
) : null, s = c ?? (i ?
|
|
1192
|
-
|
|
1193
|
-
const C =
|
|
1191
|
+
) : null, s = c ?? (i ? Vn(i) : null), l = i ? Un(i) : { fit: null, centered: !0 }, a = l.centered && (i === null || Zn(i)) ? l.fit ?? (c !== null ? o.fallbackFit ?? null : null) : null, d = ye(r, s, a), p = Gn(t), u = i !== null && i !== t && p ? Ot(d.window, e) : d.window, f = jn(t, o.legacyRadiusAttribute), h = i === t || p, m = h ? It(t) : { radius: 0, supported: !0 }, b = f ?? m.radius, g = f !== null ? "legacy" : m.supported ? m.radius > 0 ? "computed" : "none" : "unsupported", w = [];
|
|
1192
|
+
u && h && G(u, e) && w.push(m), u && i && G(u, r) && w.push(It(i));
|
|
1193
|
+
const C = w.every(($) => $.supported), A = Math.max(
|
|
1194
1194
|
0,
|
|
1195
|
-
...
|
|
1196
|
-
),
|
|
1197
|
-
return !
|
|
1195
|
+
...w.map(($) => $.radius)
|
|
1196
|
+
), P = f ?? A, S = f !== null ? "legacy" : C ? A > 0 ? "computed" : "none" : "unsupported";
|
|
1197
|
+
return !u || S === "unsupported" ? _t(e, b, g) : {
|
|
1198
1198
|
...d,
|
|
1199
1199
|
bbox: e,
|
|
1200
|
-
window:
|
|
1201
|
-
clipInset: j(d.content,
|
|
1202
|
-
radius:
|
|
1200
|
+
window: u,
|
|
1201
|
+
clipInset: j(d.content, u),
|
|
1202
|
+
radius: P,
|
|
1203
1203
|
radiusSource: S,
|
|
1204
1204
|
bboxRadius: b,
|
|
1205
1205
|
bboxRadiusSource: g,
|
|
@@ -1217,51 +1217,51 @@ function rt(t, e, n, o) {
|
|
|
1217
1217
|
return i;
|
|
1218
1218
|
let r = i.window, c = i.radius, s = [c, c, c, c], l = i.radiusSource, a = t.parentElement;
|
|
1219
1219
|
for (; a && a !== o.clipRoot; ) {
|
|
1220
|
-
const
|
|
1221
|
-
if (
|
|
1220
|
+
const p = Q(a), y = (h) => h === "hidden" || h === "clip" || h === "auto" || h === "scroll", u = y(p.overflowX), f = y(p.overflowY);
|
|
1221
|
+
if (u || f) {
|
|
1222
1222
|
if (![
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1223
|
+
p.borderTopWidth,
|
|
1224
|
+
p.borderRightWidth,
|
|
1225
|
+
p.borderBottomWidth,
|
|
1226
|
+
p.borderLeftWidth
|
|
1227
1227
|
].every((S) => Mt(S) === 0) || a.offsetWidth && a.clientWidth && a.offsetWidth - a.clientWidth > 1 || a.offsetHeight && a.clientHeight && a.offsetHeight - a.clientHeight > 1)
|
|
1228
1228
|
return i;
|
|
1229
1229
|
const m = n(a), b = {
|
|
1230
|
-
left:
|
|
1230
|
+
left: u ? m.left : r.left,
|
|
1231
1231
|
top: f ? m.top : r.top,
|
|
1232
|
-
width:
|
|
1232
|
+
width: u ? m.width : r.width,
|
|
1233
1233
|
height: f ? m.height : r.height
|
|
1234
1234
|
}, g = Ot(r, b);
|
|
1235
1235
|
if (!g) return i;
|
|
1236
|
-
const
|
|
1237
|
-
if (!
|
|
1238
|
-
if (
|
|
1239
|
-
l !== "legacy" && (c = Math.max(c,
|
|
1240
|
-
(S) => Math.max(S,
|
|
1236
|
+
const w = It(a);
|
|
1237
|
+
if (!w.supported) return i;
|
|
1238
|
+
if (u && f && G(r, m))
|
|
1239
|
+
l !== "legacy" && (c = Math.max(c, w.radius), s = s.map(
|
|
1240
|
+
(S) => Math.max(S, w.radius)
|
|
1241
1241
|
), c > 0 && (l = "computed"));
|
|
1242
|
-
else if (
|
|
1242
|
+
else if (w.radius > 0) {
|
|
1243
1243
|
const S = {
|
|
1244
|
-
left: m.left +
|
|
1245
|
-
top: m.top +
|
|
1246
|
-
width: m.width - 2 *
|
|
1247
|
-
height: m.height - 2 *
|
|
1244
|
+
left: m.left + w.radius,
|
|
1245
|
+
top: m.top + w.radius,
|
|
1246
|
+
width: m.width - 2 * w.radius,
|
|
1247
|
+
height: m.height - 2 * w.radius
|
|
1248
1248
|
};
|
|
1249
1249
|
if (!G(Ot(r, S) ?? m, r))
|
|
1250
1250
|
return i;
|
|
1251
1251
|
}
|
|
1252
|
-
const C = j(r, g),
|
|
1252
|
+
const C = j(r, g), A = [
|
|
1253
1253
|
[C.top, C.left],
|
|
1254
1254
|
[C.top, C.right],
|
|
1255
1255
|
[C.bottom, C.right],
|
|
1256
1256
|
[C.bottom, C.left]
|
|
1257
1257
|
];
|
|
1258
1258
|
for (let S = 0; S < 4; S++) {
|
|
1259
|
-
const $ = Math.max(...
|
|
1259
|
+
const $ = Math.max(...A[S]), R = s[S];
|
|
1260
1260
|
if ($ > 0.01 && $ < R) return i;
|
|
1261
1261
|
$ > 0.01 && (s[S] = 0);
|
|
1262
1262
|
}
|
|
1263
|
-
const
|
|
1264
|
-
if (g.width <
|
|
1263
|
+
const P = Math.max(...s);
|
|
1264
|
+
if (g.width < P || g.height < P)
|
|
1265
1265
|
return i;
|
|
1266
1266
|
r = g;
|
|
1267
1267
|
}
|
|
@@ -1274,7 +1274,7 @@ function rt(t, e, n, o) {
|
|
|
1274
1274
|
clipInset: j(i.content, r),
|
|
1275
1275
|
radius: c,
|
|
1276
1276
|
radiusSource: l,
|
|
1277
|
-
...s.some((
|
|
1277
|
+
...s.some((p) => p !== c) ? { cornerRadii: s } : {},
|
|
1278
1278
|
...d ? { bboxRadius: c, bboxRadiusSource: l } : {}
|
|
1279
1279
|
};
|
|
1280
1280
|
}
|
|
@@ -1369,8 +1369,8 @@ function eo(t, e, n, o, i) {
|
|
|
1369
1369
|
zIndex: String(Number(M) + 1)
|
|
1370
1370
|
});
|
|
1371
1371
|
const c = (a, d) => {
|
|
1372
|
-
const
|
|
1373
|
-
return Object.assign(
|
|
1372
|
+
const p = Tt(a);
|
|
1373
|
+
return Object.assign(p.style, {
|
|
1374
1374
|
left: `${d.left}px`,
|
|
1375
1375
|
top: `${d.top}px`,
|
|
1376
1376
|
width: `${d.width}px`,
|
|
@@ -1379,7 +1379,7 @@ function eo(t, e, n, o, i) {
|
|
|
1379
1379
|
// Add the two weighted images inside the isolated layer so opaque
|
|
1380
1380
|
// images stay opaque at the midpoint instead of exposing list chrome.
|
|
1381
1381
|
mixBlendMode: "plus-lighter"
|
|
1382
|
-
}), i && (
|
|
1382
|
+
}), i && (p.style.borderRadius = "0"), p;
|
|
1383
1383
|
}, s = c(t, n), l = c(e, o);
|
|
1384
1384
|
return s.setAttribute("data-hero-layer-source", ""), l.setAttribute("data-hero-layer-destination", ""), r.append(l, s), { layer: r, source: s, destination: l };
|
|
1385
1385
|
}
|
|
@@ -1425,7 +1425,7 @@ function io(t, e, n) {
|
|
|
1425
1425
|
visibility: "hidden",
|
|
1426
1426
|
pointerEvents: "none"
|
|
1427
1427
|
}), t.before(d));
|
|
1428
|
-
const
|
|
1428
|
+
const p = lt(t, [
|
|
1429
1429
|
"position",
|
|
1430
1430
|
"left",
|
|
1431
1431
|
"top",
|
|
@@ -1460,7 +1460,7 @@ function io(t, e, n) {
|
|
|
1460
1460
|
margin: "0",
|
|
1461
1461
|
flex: "none"
|
|
1462
1462
|
}), () => {
|
|
1463
|
-
|
|
1463
|
+
p(), d == null || d.remove();
|
|
1464
1464
|
};
|
|
1465
1465
|
}
|
|
1466
1466
|
function dt(t, e, n) {
|
|
@@ -1474,7 +1474,7 @@ function dt(t, e, n) {
|
|
|
1474
1474
|
}
|
|
1475
1475
|
class ro {
|
|
1476
1476
|
constructor() {
|
|
1477
|
-
|
|
1477
|
+
O(this, "previousFromOpacity", "");
|
|
1478
1478
|
}
|
|
1479
1479
|
prepare(e) {
|
|
1480
1480
|
e.from.then((n) => {
|
|
@@ -1511,56 +1511,56 @@ function ao(t, e) {
|
|
|
1511
1511
|
class co {
|
|
1512
1512
|
contribute(e) {
|
|
1513
1513
|
const { from: n, to: o, resolved: i, physics: r, onDispose: c } = e, s = i.pairs.map(
|
|
1514
|
-
(
|
|
1515
|
-
), l = (s.length ? ao(o, s) : [o]).map((
|
|
1516
|
-
element:
|
|
1517
|
-
opacity:
|
|
1518
|
-
willChange:
|
|
1519
|
-
targetOpacity: Number.parseFloat(getComputedStyle(
|
|
1514
|
+
(u) => he(u.toEl) ?? u.toEl
|
|
1515
|
+
), l = (s.length ? ao(o, s) : [o]).map((u) => ({
|
|
1516
|
+
element: u,
|
|
1517
|
+
opacity: u.style.opacity,
|
|
1518
|
+
willChange: u.style.willChange,
|
|
1519
|
+
targetOpacity: Number.parseFloat(getComputedStyle(u).opacity) || 0
|
|
1520
1520
|
})), a = /* @__PURE__ */ new Set();
|
|
1521
|
-
for (const
|
|
1522
|
-
for (let f =
|
|
1521
|
+
for (const u of s)
|
|
1522
|
+
for (let f = u.parentElement; f && (a.add(f), f !== o); f = f.parentElement)
|
|
1523
1523
|
;
|
|
1524
|
-
const d = Array.from(a).map((
|
|
1525
|
-
element:
|
|
1526
|
-
color: getComputedStyle(
|
|
1527
|
-
previousColor:
|
|
1524
|
+
const d = Array.from(a).map((u) => ({
|
|
1525
|
+
element: u,
|
|
1526
|
+
color: getComputedStyle(u).backgroundColor,
|
|
1527
|
+
previousColor: u.style.backgroundColor
|
|
1528
1528
|
})).filter(
|
|
1529
|
-
({ color:
|
|
1530
|
-
),
|
|
1529
|
+
({ color: u }) => u && u !== "transparent" && u !== "rgba(0, 0, 0, 0)"
|
|
1530
|
+
), p = n.style.opacity, y = n.style.willChange;
|
|
1531
1531
|
n.style.willChange = "opacity";
|
|
1532
|
-
for (const { element:
|
|
1533
|
-
|
|
1534
|
-
for (const { element:
|
|
1535
|
-
|
|
1536
|
-
return c((
|
|
1537
|
-
|
|
1532
|
+
for (const { element: u } of l)
|
|
1533
|
+
u.style.opacity = "0", u.style.willChange = "opacity";
|
|
1534
|
+
for (const { element: u } of d)
|
|
1535
|
+
u.style.backgroundColor = "transparent";
|
|
1536
|
+
return c((u) => {
|
|
1537
|
+
u.owns(n) && (n.style.opacity = p, n.style.willChange = y);
|
|
1538
1538
|
for (const { element: f, opacity: h, willChange: m } of l)
|
|
1539
|
-
|
|
1539
|
+
u.owns(f) && (f.style.opacity = h, f.style.willChange = m);
|
|
1540
1540
|
for (const { element: f, previousColor: h } of d)
|
|
1541
|
-
|
|
1541
|
+
u.owns(f) && (f.style.backgroundColor = h);
|
|
1542
1542
|
}), {
|
|
1543
1543
|
out: [
|
|
1544
|
-
new
|
|
1544
|
+
new x({
|
|
1545
1545
|
element: n,
|
|
1546
|
-
integrator:
|
|
1547
|
-
style: (
|
|
1546
|
+
integrator: E.from(r),
|
|
1547
|
+
style: (u, f) => ({ opacity: f })
|
|
1548
1548
|
})
|
|
1549
1549
|
],
|
|
1550
1550
|
in: [
|
|
1551
1551
|
...l.map(
|
|
1552
|
-
({ element:
|
|
1553
|
-
element:
|
|
1554
|
-
integrator:
|
|
1552
|
+
({ element: u, targetOpacity: f }) => new x({
|
|
1553
|
+
element: u,
|
|
1554
|
+
integrator: E.from(r),
|
|
1555
1555
|
style: (h) => ({
|
|
1556
1556
|
opacity: Math.min(1, Math.max(0, h)) * f
|
|
1557
1557
|
})
|
|
1558
1558
|
})
|
|
1559
1559
|
),
|
|
1560
1560
|
...d.map(
|
|
1561
|
-
({ element:
|
|
1562
|
-
element:
|
|
1563
|
-
integrator:
|
|
1561
|
+
({ element: u, color: f }) => new x({
|
|
1562
|
+
element: u,
|
|
1563
|
+
integrator: E.from(r),
|
|
1564
1564
|
style: (h) => ({
|
|
1565
1565
|
backgroundColor: `color-mix(in srgb, ${f} ${Math.min(1, Math.max(0, h)) * 100}%, transparent)`
|
|
1566
1566
|
})
|
|
@@ -1570,12 +1570,12 @@ class co {
|
|
|
1570
1570
|
};
|
|
1571
1571
|
}
|
|
1572
1572
|
}
|
|
1573
|
-
const lo = () => new co(),
|
|
1573
|
+
const lo = () => new co(), po = {
|
|
1574
1574
|
static: so,
|
|
1575
1575
|
fade: lo
|
|
1576
|
-
},
|
|
1576
|
+
}, uo = {
|
|
1577
1577
|
spring: { stiffness: 320, damping: 30 }
|
|
1578
|
-
}, fo = () =>
|
|
1578
|
+
}, fo = () => uo, ho = {
|
|
1579
1579
|
spring: { stiffness: 300, damping: 30, doubleSpring: 1 }
|
|
1580
1580
|
}, yo = () => ho, mo = {
|
|
1581
1581
|
default: fo,
|
|
@@ -1606,7 +1606,7 @@ function et(t, e) {
|
|
|
1606
1606
|
}
|
|
1607
1607
|
return n;
|
|
1608
1608
|
}
|
|
1609
|
-
function
|
|
1609
|
+
function xo(t, e) {
|
|
1610
1610
|
const n = [], o = et(e, at), i = et(t, ct);
|
|
1611
1611
|
for (const [s, l] of o) {
|
|
1612
1612
|
const a = i.get(s);
|
|
@@ -1631,7 +1631,7 @@ function So(t, e) {
|
|
|
1631
1631
|
}
|
|
1632
1632
|
return n;
|
|
1633
1633
|
}
|
|
1634
|
-
function
|
|
1634
|
+
function So(t, e) {
|
|
1635
1635
|
const n = [], o = Array.from(
|
|
1636
1636
|
e.querySelectorAll(`[${q}]`)
|
|
1637
1637
|
);
|
|
@@ -1652,8 +1652,8 @@ function xo(t, e) {
|
|
|
1652
1652
|
return n;
|
|
1653
1653
|
}
|
|
1654
1654
|
function Eo(t, e) {
|
|
1655
|
-
const n =
|
|
1656
|
-
return n.length > 0 ? n :
|
|
1655
|
+
const n = xo(t, e);
|
|
1656
|
+
return n.length > 0 ? n : So(t, e);
|
|
1657
1657
|
}
|
|
1658
1658
|
function $o(t, e) {
|
|
1659
1659
|
return ge(t, e);
|
|
@@ -1665,23 +1665,23 @@ function Ao(t, e, n, o, i) {
|
|
|
1665
1665
|
const { fromEl: r, toEl: c } = e, [s, l] = $o(
|
|
1666
1666
|
oe(t, r, e.fromFit, o),
|
|
1667
1667
|
oe(t, c, e.toFit, i)
|
|
1668
|
-
), a = s.content, d = s.window,
|
|
1669
|
-
if (a.width === 0 || a.height === 0 || d.width === 0 || d.height === 0 ||
|
|
1668
|
+
), a = s.content, d = s.window, p = l.content, y = l.window, u = l.clipInset, f = s.radiusSource === "unsupported" || l.radiusSource === "unsupported", h = f ? 0 : s.radius, m = f ? 0 : l.radius;
|
|
1669
|
+
if (a.width === 0 || a.height === 0 || d.width === 0 || d.height === 0 || p.width === 0 || p.height === 0 || y.width === 0 || y.height === 0)
|
|
1670
1670
|
return null;
|
|
1671
|
-
const b = a.width /
|
|
1671
|
+
const b = a.width / p.width, g = a.height / p.height, w = N(a), C = W(a), A = N(p), P = W(p), S = w - A, $ = C - P;
|
|
1672
1672
|
if (Math.abs($) > n) return null;
|
|
1673
1673
|
const R = j(
|
|
1674
|
-
|
|
1675
|
-
be(
|
|
1674
|
+
p,
|
|
1675
|
+
be(p, a, d, b, g)
|
|
1676
1676
|
);
|
|
1677
1677
|
return {
|
|
1678
1678
|
fromContent: a,
|
|
1679
|
-
toContent:
|
|
1679
|
+
toContent: p,
|
|
1680
1680
|
fromVisualEl: s.mediaElement ?? r,
|
|
1681
1681
|
toVisualEl: l.mediaElement ?? c,
|
|
1682
1682
|
resetRadius: Co(s, l),
|
|
1683
|
-
styleFor: (F,
|
|
1684
|
-
const T = (
|
|
1683
|
+
styleFor: (F, _, v) => {
|
|
1684
|
+
const T = (_ * S + (v ? A - N(v.box) : 0)) / ((v == null ? void 0 : v.scaleX) ?? 1), Y = (_ * $ + (v ? P - W(v.box) : 0)) / ((v == null ? void 0 : v.scaleY) ?? 1), H = F + _ * b, pt = F + _ * g, $e = s.cornerRadii ?? [
|
|
1685
1685
|
h,
|
|
1686
1686
|
h,
|
|
1687
1687
|
h,
|
|
@@ -1692,19 +1692,19 @@ function Ao(t, e, n, o, i) {
|
|
|
1692
1692
|
m,
|
|
1693
1693
|
m
|
|
1694
1694
|
], Ae = $e.map((Oe, _e) => {
|
|
1695
|
-
const Lt = Math.max(0, Oe *
|
|
1695
|
+
const Lt = Math.max(0, Oe * _ + Ce[_e] * F);
|
|
1696
1696
|
return {
|
|
1697
1697
|
x: Lt / Math.max(Math.abs(H), 1e-6),
|
|
1698
|
-
y: Lt / Math.max(Math.abs(
|
|
1698
|
+
y: Lt / Math.max(Math.abs(pt), 1e-6)
|
|
1699
1699
|
};
|
|
1700
|
-
}),
|
|
1700
|
+
}), Pe = R.top * _ + u.top * F, ve = R.right * _ + u.right * F, Re = R.bottom * _ + u.bottom * F, Ie = R.left * _ + u.left * F;
|
|
1701
1701
|
return {
|
|
1702
|
-
transform:
|
|
1702
|
+
transform: v ? `translate(${T}px, ${Y}px) scale(${H * p.width / v.box.width}, ${pt * p.height / v.box.height})` : `translate(${T}px, ${Y}px) scale(${H}, ${pt})`,
|
|
1703
1703
|
clipPath: dt(
|
|
1704
|
-
|
|
1704
|
+
p,
|
|
1705
1705
|
{
|
|
1706
|
-
top:
|
|
1707
|
-
right:
|
|
1706
|
+
top: Pe,
|
|
1707
|
+
right: ve,
|
|
1708
1708
|
bottom: Re,
|
|
1709
1709
|
left: Ie
|
|
1710
1710
|
},
|
|
@@ -1729,64 +1729,64 @@ function re(t) {
|
|
|
1729
1729
|
lifetime: "temporary"
|
|
1730
1730
|
};
|
|
1731
1731
|
}
|
|
1732
|
-
function
|
|
1732
|
+
function Po(t, e) {
|
|
1733
1733
|
t.style.transform = e.transform, t.style.clipPath = e.clipPath;
|
|
1734
1734
|
}
|
|
1735
|
-
class
|
|
1735
|
+
class vo {
|
|
1736
1736
|
contribute(e) {
|
|
1737
1737
|
const { resolved: n, physics: o, positionedParent: i, maxDistance: r, onDispose: c } = e, s = oo(e.from, e.to);
|
|
1738
1738
|
c((d) => s(d.owns));
|
|
1739
1739
|
const l = n.pairs.flatMap((d) => {
|
|
1740
|
-
const
|
|
1740
|
+
const p = Ao(
|
|
1741
1741
|
i,
|
|
1742
1742
|
d,
|
|
1743
1743
|
r,
|
|
1744
1744
|
e.from,
|
|
1745
1745
|
e.to
|
|
1746
1746
|
);
|
|
1747
|
-
return
|
|
1747
|
+
return p ? [{ pair: d, plan: p }] : [];
|
|
1748
1748
|
});
|
|
1749
1749
|
e.resolved = { pairs: l.map(({ pair: d }) => d) };
|
|
1750
1750
|
const a = [];
|
|
1751
|
-
for (const { pair: d, plan:
|
|
1752
|
-
const { fromVisualEl: y, toVisualEl:
|
|
1751
|
+
for (const { pair: d, plan: p } of l) {
|
|
1752
|
+
const { fromVisualEl: y, toVisualEl: u } = p, f = ot(y), h = ot(u);
|
|
1753
1753
|
if (to(d, e.direction)) {
|
|
1754
1754
|
const { layer: $, source: R, destination: F } = eo(
|
|
1755
1755
|
y,
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
),
|
|
1761
|
-
box:
|
|
1756
|
+
u,
|
|
1757
|
+
p.fromContent,
|
|
1758
|
+
p.toContent,
|
|
1759
|
+
p.resetRadius
|
|
1760
|
+
), _ = {
|
|
1761
|
+
box: p.fromContent,
|
|
1762
1762
|
scaleX: 1,
|
|
1763
1763
|
scaleY: 1
|
|
1764
|
-
},
|
|
1765
|
-
...
|
|
1764
|
+
}, v = (Y, H) => ({
|
|
1765
|
+
...p.styleFor(Y, H, _),
|
|
1766
1766
|
opacity: U(H) * f.opacity
|
|
1767
1767
|
}), T = (Y, H) => ({
|
|
1768
|
-
...
|
|
1768
|
+
...p.styleFor(Y, H),
|
|
1769
1769
|
opacity: U(Y) * h.opacity
|
|
1770
1770
|
});
|
|
1771
|
-
Object.assign(R.style,
|
|
1771
|
+
Object.assign(R.style, v(0, 1)), Object.assign(F.style, T(0, 1)), i.appendChild($), f.set(0), h.set(0), c(() => {
|
|
1772
1772
|
$.remove(), f.restore(), h.restore();
|
|
1773
1773
|
}), a.push(
|
|
1774
|
-
new
|
|
1774
|
+
new x({
|
|
1775
1775
|
element: R,
|
|
1776
1776
|
motion: re(i),
|
|
1777
|
-
integrator:
|
|
1778
|
-
style:
|
|
1777
|
+
integrator: E.from(o),
|
|
1778
|
+
style: v
|
|
1779
1779
|
}),
|
|
1780
|
-
new
|
|
1780
|
+
new x({
|
|
1781
1781
|
element: F,
|
|
1782
1782
|
motion: ie(d.key, i, !0),
|
|
1783
|
-
integrator:
|
|
1783
|
+
integrator: E.from(o),
|
|
1784
1784
|
style: T
|
|
1785
1785
|
})
|
|
1786
1786
|
);
|
|
1787
1787
|
continue;
|
|
1788
1788
|
}
|
|
1789
|
-
const m = Tt(y), b = no(
|
|
1789
|
+
const m = Tt(y), b = no(u), g = lt(u, [
|
|
1790
1790
|
"transform",
|
|
1791
1791
|
"transform-origin",
|
|
1792
1792
|
"clip-path",
|
|
@@ -1794,33 +1794,33 @@ class Po {
|
|
|
1794
1794
|
"border-radius",
|
|
1795
1795
|
"will-change"
|
|
1796
1796
|
]);
|
|
1797
|
-
|
|
1798
|
-
const
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
z(i,
|
|
1802
|
-
), C = kt(i,
|
|
1803
|
-
m.style.width = `${
|
|
1804
|
-
const
|
|
1805
|
-
...
|
|
1797
|
+
u.style.transform = "none", u.style.transformOrigin = "center center", u.style.willChange = "transform, clip-path, opacity", p.resetRadius && (u.style.borderRadius = "0");
|
|
1798
|
+
const w = io(
|
|
1799
|
+
u,
|
|
1800
|
+
p.toContent,
|
|
1801
|
+
z(i, u)
|
|
1802
|
+
), C = kt(i, u);
|
|
1803
|
+
m.style.width = `${p.fromContent.width / C.scaleX}px`, m.style.height = `${p.fromContent.height / C.scaleY}px`, m.style.zIndex = getComputedStyle(u).zIndex, p.resetRadius && (m.style.borderRadius = "0"), u.after(m);
|
|
1804
|
+
const A = kt(i, m), P = ($, R) => ({
|
|
1805
|
+
...p.styleFor($, R, A),
|
|
1806
1806
|
opacity: U(R) * f.opacity
|
|
1807
1807
|
}), S = ($, R) => ({
|
|
1808
|
-
...
|
|
1808
|
+
...p.styleFor($, R, C),
|
|
1809
1809
|
opacity: U($) * h.opacity
|
|
1810
1810
|
});
|
|
1811
|
-
|
|
1812
|
-
|
|
1811
|
+
Po(u, S(0, 1)), Object.assign(m.style, P(0, 1)), h.set(0), f.set(0), c(() => {
|
|
1812
|
+
w(), g(), f.restore(), h.restore(), b(), m.remove();
|
|
1813
1813
|
}), a.push(
|
|
1814
|
-
new
|
|
1814
|
+
new x({
|
|
1815
1815
|
element: m,
|
|
1816
1816
|
motion: re(i),
|
|
1817
|
-
integrator:
|
|
1818
|
-
style:
|
|
1817
|
+
integrator: E.from(o),
|
|
1818
|
+
style: P
|
|
1819
1819
|
}),
|
|
1820
|
-
new
|
|
1821
|
-
element:
|
|
1820
|
+
new x({
|
|
1821
|
+
element: u,
|
|
1822
1822
|
motion: ie(d.key, i, !1),
|
|
1823
|
-
integrator:
|
|
1823
|
+
integrator: E.from(o),
|
|
1824
1824
|
style: S
|
|
1825
1825
|
})
|
|
1826
1826
|
);
|
|
@@ -1829,7 +1829,7 @@ class Po {
|
|
|
1829
1829
|
}
|
|
1830
1830
|
}
|
|
1831
1831
|
function Ro(t) {
|
|
1832
|
-
return [new
|
|
1832
|
+
return [new vo(), po[t.type]()];
|
|
1833
1833
|
}
|
|
1834
1834
|
const Io = (t) => {
|
|
1835
1835
|
const e = mo[t.variant](), n = go, o = {
|
|
@@ -1853,7 +1853,7 @@ const Io = (t) => {
|
|
|
1853
1853
|
return K({ shared: [], out: [], in: [] });
|
|
1854
1854
|
const a = [], d = (m) => {
|
|
1855
1855
|
a.push(m);
|
|
1856
|
-
},
|
|
1856
|
+
}, p = {
|
|
1857
1857
|
direction: c.direction,
|
|
1858
1858
|
from: i,
|
|
1859
1859
|
to: r,
|
|
@@ -1868,23 +1868,23 @@ const Io = (t) => {
|
|
|
1868
1868
|
in: []
|
|
1869
1869
|
};
|
|
1870
1870
|
for (const m of l) {
|
|
1871
|
-
const b = (h = m.contribute) == null ? void 0 : h.call(m,
|
|
1871
|
+
const b = (h = m.contribute) == null ? void 0 : h.call(m, p);
|
|
1872
1872
|
if (b)
|
|
1873
1873
|
for (const g of Object.keys(y))
|
|
1874
1874
|
y[g].push(...b[g] ?? []);
|
|
1875
1875
|
}
|
|
1876
|
-
const
|
|
1877
|
-
return
|
|
1876
|
+
const u = K(y), f = u.onDispose;
|
|
1877
|
+
return u.onDispose = (m) => {
|
|
1878
1878
|
f == null || f(m);
|
|
1879
1879
|
for (const b of Object.values(y).flat())
|
|
1880
|
-
b instanceof
|
|
1880
|
+
b instanceof x && b.releaseFill();
|
|
1881
1881
|
for (const b of a)
|
|
1882
1882
|
try {
|
|
1883
1883
|
b(m);
|
|
1884
1884
|
} catch (g) {
|
|
1885
1885
|
console.error("[hero] cleanup error", g);
|
|
1886
1886
|
}
|
|
1887
|
-
},
|
|
1887
|
+
}, u;
|
|
1888
1888
|
}
|
|
1889
1889
|
};
|
|
1890
1890
|
return k({
|
|
@@ -1892,7 +1892,7 @@ const Io = (t) => {
|
|
|
1892
1892
|
backward: o
|
|
1893
1893
|
});
|
|
1894
1894
|
};
|
|
1895
|
-
function
|
|
1895
|
+
function qi(t = {}, e = {}) {
|
|
1896
1896
|
const n = t.type ?? "static", o = t.variant ?? "default";
|
|
1897
1897
|
return D(Io({ type: n, variant: o }), e.override);
|
|
1898
1898
|
}
|
|
@@ -1905,16 +1905,16 @@ const Oo = {
|
|
|
1905
1905
|
prepare: ({ from: c, to: s, context: l }) => (c.then((a) => {
|
|
1906
1906
|
a.style.opacity = "1";
|
|
1907
1907
|
}), s.then((a) => {
|
|
1908
|
-
const d =
|
|
1909
|
-
a.style.setProperty("--max-border-radius", `${
|
|
1910
|
-
const y = d.left + d.width / 2,
|
|
1911
|
-
a.style.transformOrigin = `${y}px ${
|
|
1908
|
+
const d = X(l, "to"), p = Math.min(d.width, d.height) * 0.4;
|
|
1909
|
+
a.style.setProperty("--max-border-radius", `${p}px`), a.style.setProperty("--border-radius-scale", "1"), a.style.willChange = "transform", a.style.backfaceVisibility = "hidden";
|
|
1910
|
+
const y = d.left + d.width / 2, u = d.top + d.height / 2;
|
|
1911
|
+
a.style.transformOrigin = `${y}px ${u}px`, a.style.position = "fixed", a.style.top = `${d.top}px`, a.style.left = `${d.left}px`, a.style.width = `${d.width}px`, a.style.height = `${d.height}px`, a.style.zIndex = "1000", a.style.overflow = "hidden", a.style.transform = `rotate(${n}deg) scale(${o}) translateZ(0)`, a.style.borderRadius = "calc(var(--max-border-radius) * var(--border-radius-scale))", a.style.opacity = "1";
|
|
1912
1912
|
}), {}),
|
|
1913
1913
|
animation: ({ from: c, to: s }) => {
|
|
1914
|
-
const l = new
|
|
1914
|
+
const l = new x({
|
|
1915
1915
|
element: c,
|
|
1916
|
-
integrator:
|
|
1917
|
-
style: (d,
|
|
1916
|
+
integrator: E.from(_o),
|
|
1917
|
+
style: (d, p) => ({ opacity: p }),
|
|
1918
1918
|
// The outgoing node is reused (re-hidden, shown again on the next
|
|
1919
1919
|
// navigation), so reset every inline style we wrote to it — mirroring
|
|
1920
1920
|
// the "to" cleanup below. prepare sets opacity and the out style fades
|
|
@@ -1922,27 +1922,27 @@ const Oo = {
|
|
|
1922
1922
|
onDispose: () => {
|
|
1923
1923
|
c.style.opacity = "";
|
|
1924
1924
|
}
|
|
1925
|
-
}), a = new
|
|
1925
|
+
}), a = new x({
|
|
1926
1926
|
element: s,
|
|
1927
|
-
integrator:
|
|
1927
|
+
integrator: E.from(e),
|
|
1928
1928
|
style: (d) => {
|
|
1929
|
-
let
|
|
1929
|
+
let p;
|
|
1930
1930
|
if (d <= 0.05)
|
|
1931
|
-
|
|
1931
|
+
p = o;
|
|
1932
1932
|
else if (d <= i) {
|
|
1933
1933
|
const h = (d - 0.05) / (i - 0.05), m = Math.pow(h, 9);
|
|
1934
|
-
|
|
1934
|
+
p = o + (0.8 - o) * m;
|
|
1935
1935
|
} else {
|
|
1936
1936
|
const h = (d - i) / (1 - i);
|
|
1937
|
-
|
|
1937
|
+
p = 0.8 + 0.2 * (1 - Math.pow(1 - h, 3));
|
|
1938
1938
|
}
|
|
1939
1939
|
const y = 0.7;
|
|
1940
|
-
let
|
|
1940
|
+
let u;
|
|
1941
1941
|
if (d <= y)
|
|
1942
|
-
|
|
1942
|
+
u = n;
|
|
1943
1943
|
else {
|
|
1944
1944
|
const h = (d - y) / (1 - y), m = 1 - Math.pow(1 - h, 2);
|
|
1945
|
-
|
|
1945
|
+
u = n * (1 - m);
|
|
1946
1946
|
}
|
|
1947
1947
|
let f;
|
|
1948
1948
|
if (d <= y)
|
|
@@ -1952,7 +1952,7 @@ const Oo = {
|
|
|
1952
1952
|
f = 1 - Math.pow(h, 0.5);
|
|
1953
1953
|
}
|
|
1954
1954
|
return {
|
|
1955
|
-
transform: `rotate(${
|
|
1955
|
+
transform: `rotate(${u.toFixed(2)}deg) scale(${p.toFixed(4)}) translateZ(0)`,
|
|
1956
1956
|
"--border-radius-scale": f.toFixed(4)
|
|
1957
1957
|
};
|
|
1958
1958
|
},
|
|
@@ -1968,7 +1968,7 @@ const Oo = {
|
|
|
1968
1968
|
};
|
|
1969
1969
|
return k({ forward: r, backward: r });
|
|
1970
1970
|
};
|
|
1971
|
-
function
|
|
1971
|
+
function Ki(t = {}, e = {}) {
|
|
1972
1972
|
return D(ko(), e.override);
|
|
1973
1973
|
}
|
|
1974
1974
|
const Do = {
|
|
@@ -1981,9 +1981,9 @@ const Do = {
|
|
|
1981
1981
|
r.style.opacity = "0", r.style.transform = "rotate(-180deg)", r.style.transformOrigin = "center center", r.style.willChange = "transform, opacity";
|
|
1982
1982
|
}), {}),
|
|
1983
1983
|
animation: ({ from: o, to: i }) => {
|
|
1984
|
-
const r = new
|
|
1984
|
+
const r = new x({
|
|
1985
1985
|
element: o,
|
|
1986
|
-
integrator:
|
|
1986
|
+
integrator: E.from(e),
|
|
1987
1987
|
style: (s) => ({
|
|
1988
1988
|
transform: `rotate(${s * 180}deg)`,
|
|
1989
1989
|
opacity: s < 0.5 ? 1 : 0
|
|
@@ -1994,9 +1994,9 @@ const Do = {
|
|
|
1994
1994
|
onDispose: () => {
|
|
1995
1995
|
o.style.willChange = "auto", o.style.transform = "", o.style.transformOrigin = "", o.style.opacity = "";
|
|
1996
1996
|
}
|
|
1997
|
-
}), c = new
|
|
1997
|
+
}), c = new x({
|
|
1998
1998
|
element: i,
|
|
1999
|
-
integrator:
|
|
1999
|
+
integrator: E.from(e),
|
|
2000
2000
|
// u runs 1→0, so -u*180 unwinds -180→0.
|
|
2001
2001
|
style: (s, l) => ({
|
|
2002
2002
|
transform: `rotate(${-l * 180}deg)`,
|
|
@@ -2014,7 +2014,7 @@ const Do = {
|
|
|
2014
2014
|
};
|
|
2015
2015
|
return k({ forward: n, backward: n });
|
|
2016
2016
|
};
|
|
2017
|
-
function
|
|
2017
|
+
function Ji(t = {}, e = {}) {
|
|
2018
2018
|
return D(Fo(), e.override);
|
|
2019
2019
|
}
|
|
2020
2020
|
const Mo = {
|
|
@@ -2035,10 +2035,10 @@ const Mo = {
|
|
|
2035
2035
|
d.style.willChange = "transform", d.style.backfaceVisibility = "hidden", d.style.contain = "layout paint", d.style.position = "relative", d.style.zIndex = s;
|
|
2036
2036
|
}), {}),
|
|
2037
2037
|
animation: ({ from: l, to: a }) => {
|
|
2038
|
-
const d = l.offsetHeight,
|
|
2038
|
+
const d = l.offsetHeight, p = a.offsetHeight, y = window.innerHeight, u = Math.max(Math.min(d, p), y), f = new x({
|
|
2039
2039
|
element: l,
|
|
2040
|
-
integrator:
|
|
2041
|
-
style: (m) => ({ transform: `translate3d(0, ${r ? -
|
|
2040
|
+
integrator: E.from(e),
|
|
2041
|
+
style: (m) => ({ transform: `translate3d(0, ${r ? -u * m : u * m}px, 0)` }),
|
|
2042
2042
|
// The outgoing node is the real, reused element (re-hidden then shown
|
|
2043
2043
|
// again on the next navigation), so mirror the incoming cleanup and
|
|
2044
2044
|
// also reset the out-only props applied in prepare (zIndex,
|
|
@@ -2047,10 +2047,10 @@ const Mo = {
|
|
|
2047
2047
|
onDispose: () => {
|
|
2048
2048
|
l.style.willChange = "auto", l.style.backfaceVisibility = "", l.style.contain = "", l.style.transform = "", l.style.pointerEvents = "", l.style.zIndex = "";
|
|
2049
2049
|
}
|
|
2050
|
-
}), h = new
|
|
2050
|
+
}), h = new x({
|
|
2051
2051
|
element: a,
|
|
2052
|
-
integrator:
|
|
2053
|
-
style: (m, b) => ({ transform: `translate3d(0, ${r ? b *
|
|
2052
|
+
integrator: E.from(e),
|
|
2053
|
+
style: (m, b) => ({ transform: `translate3d(0, ${r ? b * u : b * -u}px, 0)` }),
|
|
2054
2054
|
onDispose: () => {
|
|
2055
2055
|
a.style.willChange = "auto", a.style.backfaceVisibility = "", a.style.contain = "", a.style.transform = "", a.style.position === "relative" && (a.style.position = ""), a.style.zIndex === s && (a.style.zIndex = "");
|
|
2056
2056
|
}
|
|
@@ -2067,7 +2067,7 @@ const Mo = {
|
|
|
2067
2067
|
backward: o("backward")
|
|
2068
2068
|
});
|
|
2069
2069
|
};
|
|
2070
|
-
function
|
|
2070
|
+
function Qi(t = {}, e = {}) {
|
|
2071
2071
|
const { type: n = "directional" } = t;
|
|
2072
2072
|
return D(
|
|
2073
2073
|
To({ directional: n === "directional" }),
|
|
@@ -2100,8 +2100,8 @@ const zo = {
|
|
|
2100
2100
|
spring: { stiffness: 200, damping: 24 }
|
|
2101
2101
|
}, No = {
|
|
2102
2102
|
inertia: { acceleration: 25, resistance: 1.2 }
|
|
2103
|
-
},
|
|
2104
|
-
function
|
|
2103
|
+
}, xt = 0.08, Wo = 16, St = 0.6, Xo = (t) => `blur(${Math.max(0, t).toFixed(2)}px)`;
|
|
2104
|
+
function Vo() {
|
|
2105
2105
|
return {
|
|
2106
2106
|
enterPhysics: zo,
|
|
2107
2107
|
exitPhysics: No,
|
|
@@ -2110,14 +2110,14 @@ function Xo() {
|
|
|
2110
2110
|
// enter: t 0 → 1 as the sheet rises. At rest (t = 0) the page is
|
|
2111
2111
|
// untouched; at peak it is shrunk and dimmed.
|
|
2112
2112
|
enterStyle: (t) => ({
|
|
2113
|
-
transform: `scale(${1 -
|
|
2114
|
-
opacity: 1 - (1 -
|
|
2113
|
+
transform: `scale(${1 - xt * t})`,
|
|
2114
|
+
opacity: 1 - (1 - St) * t
|
|
2115
2115
|
}),
|
|
2116
2116
|
// exit: t 0 → 1 as the sheet falls away and the page returns to rest —
|
|
2117
2117
|
// the inverse ramp of enter.
|
|
2118
2118
|
exitStyle: (t) => ({
|
|
2119
|
-
transform: `scale(${1 -
|
|
2120
|
-
opacity:
|
|
2119
|
+
transform: `scale(${1 - xt + xt * t})`,
|
|
2120
|
+
opacity: St + (1 - St) * t
|
|
2121
2121
|
})
|
|
2122
2122
|
},
|
|
2123
2123
|
overlay: {
|
|
@@ -2135,7 +2135,7 @@ function Xo() {
|
|
|
2135
2135
|
// enter: 0 → MAX as the sheet rises (progress 0 → 1).
|
|
2136
2136
|
// exit: MAX → 0 as it falls (progress 0 → 1, so the visual is inverted).
|
|
2137
2137
|
style: (t, e) => {
|
|
2138
|
-
const n = t === "enter" ? e : 1 - e, o =
|
|
2138
|
+
const n = t === "enter" ? e : 1 - e, o = Xo(Wo * n);
|
|
2139
2139
|
return { backdropFilter: o, WebkitBackdropFilter: o };
|
|
2140
2140
|
}
|
|
2141
2141
|
}
|
|
@@ -2166,25 +2166,25 @@ function jo() {
|
|
|
2166
2166
|
const Zo = {
|
|
2167
2167
|
static: jo(),
|
|
2168
2168
|
"background-scale": Ho(),
|
|
2169
|
-
blur:
|
|
2169
|
+
blur: Vo()
|
|
2170
2170
|
}, Go = "static", qo = "transform", Ko = (t = {}) => {
|
|
2171
2171
|
const e = Zo[t.type ?? Go], n = e.background, o = e.overlay, i = n.willChange !== "", r = (c) => {
|
|
2172
2172
|
const s = c === "forward" ? "enter" : "exit", l = s === "enter" ? "to" : "from", a = s === "enter" ? "from" : "to", d = s === "enter" ? e.enterPhysics : e.exitPhysics;
|
|
2173
2173
|
return {
|
|
2174
|
-
prepare: ({ from:
|
|
2175
|
-
const h = { from:
|
|
2174
|
+
prepare: ({ from: p, to: y, context: u, createElement: f }) => {
|
|
2175
|
+
const h = { from: p, to: y }[l], m = { from: p, to: y }[a];
|
|
2176
2176
|
h.then((g) => {
|
|
2177
2177
|
g.style.willChange = qo, g.style.backfaceVisibility = "hidden", g.style.contain = "layout paint", g.style.zIndex = M, s === "enter" ? g.style.position = "relative" : g.style.pointerEvents = "none";
|
|
2178
2178
|
}), m.then((g) => {
|
|
2179
2179
|
i && (g.style.willChange = n.willChange, g.style.backfaceVisibility = "hidden", g.style.contain = "layout paint"), g.style.zIndex = L, s === "enter" ? g.style.pointerEvents = "none" : g.style.position = "relative";
|
|
2180
2180
|
});
|
|
2181
2181
|
let b;
|
|
2182
|
-
return o && (b = f("sheet-overlay"), Object.assign(b.style, o.initialStyle), b.style.willChange = o.willChange,
|
|
2182
|
+
return o && (b = f("sheet-overlay"), Object.assign(b.style, o.initialStyle), b.style.willChange = o.willChange, u.positionedParent.appendChild(b)), { overlay: b };
|
|
2183
2183
|
},
|
|
2184
|
-
animation: ({ from:
|
|
2185
|
-
const h = { from:
|
|
2186
|
-
|
|
2187
|
-
},
|
|
2184
|
+
animation: ({ from: p, to: y, context: u, overlay: f }) => {
|
|
2185
|
+
const h = { from: p, to: y }[l], m = { from: p, to: y }[a], b = X(u, l), g = () => {
|
|
2186
|
+
p.style.pointerEvents = "", p.style.zIndex = "";
|
|
2187
|
+
}, w = () => {
|
|
2188
2188
|
const S = s === "enter" ? M : L;
|
|
2189
2189
|
y.style.position === "relative" && (y.style.position = ""), y.style.zIndex === S && (y.style.zIndex = "");
|
|
2190
2190
|
};
|
|
@@ -2193,29 +2193,29 @@ const Zo = {
|
|
|
2193
2193
|
transform: `translate3d(0, ${$ * b.height}px, 0)`
|
|
2194
2194
|
}) : (S) => ({
|
|
2195
2195
|
transform: `translate3d(0, ${S * b.height}px, 0)`
|
|
2196
|
-
}),
|
|
2196
|
+
}), A = new x({
|
|
2197
2197
|
element: h,
|
|
2198
|
-
integrator:
|
|
2198
|
+
integrator: E.from(d),
|
|
2199
2199
|
style: C,
|
|
2200
2200
|
onDispose: (S) => {
|
|
2201
|
-
h.style.willChange = "auto", h.style.backfaceVisibility = "", h.style.contain = "", h.style.clipPath = "", h.style.transform = "", S.owns(
|
|
2201
|
+
h.style.willChange = "auto", h.style.backfaceVisibility = "", h.style.contain = "", h.style.clipPath = "", h.style.transform = "", S.owns(p) && g(), S.owns(y) && w();
|
|
2202
2202
|
}
|
|
2203
2203
|
});
|
|
2204
|
-
J(
|
|
2205
|
-
const
|
|
2206
|
-
sheet:
|
|
2204
|
+
J(A);
|
|
2205
|
+
const P = {
|
|
2206
|
+
sheet: A,
|
|
2207
2207
|
background: new I([]),
|
|
2208
2208
|
overlay: new I([])
|
|
2209
2209
|
};
|
|
2210
2210
|
if (i) {
|
|
2211
2211
|
const S = m.scrollHeight;
|
|
2212
2212
|
S > 0 && (m.style.height = `${S}px`);
|
|
2213
|
-
const $ =
|
|
2213
|
+
const $ = X(u, a), R = $.left + $.width / 2, F = $.top + $.height / 2;
|
|
2214
2214
|
m.style.clipPath = `inset(${$.top}px 0 calc(100% - ${$.top + $.height}px) 0)`, m.style.transformOrigin = `${R}px ${F}px`;
|
|
2215
|
-
const
|
|
2215
|
+
const _ = s === "enter" ? (T, Y) => n.enterStyle(T, Y) : (T) => n.exitStyle(T), v = new x({
|
|
2216
2216
|
element: m,
|
|
2217
|
-
integrator:
|
|
2218
|
-
style:
|
|
2217
|
+
integrator: E.from(d),
|
|
2218
|
+
style: _,
|
|
2219
2219
|
// The background is the reused outgoing (`from`) node on `enter` and
|
|
2220
2220
|
// the surviving incoming (`to`) node on `exit` — in both cases its
|
|
2221
2221
|
// inline styles must be cleared on settle so the reused node is not
|
|
@@ -2225,19 +2225,19 @@ const Zo = {
|
|
|
2225
2225
|
m.style.willChange = "auto", m.style.backfaceVisibility = "", m.style.contain = "", m.style.clipPath = "", m.style.transformOrigin = "", m.style.transform = "", m.style.opacity = "", m.style.height = "";
|
|
2226
2226
|
}
|
|
2227
2227
|
});
|
|
2228
|
-
J(
|
|
2228
|
+
J(v), P.background = v;
|
|
2229
2229
|
}
|
|
2230
2230
|
if (f && o) {
|
|
2231
2231
|
f.style.zIndex = fe;
|
|
2232
|
-
const S =
|
|
2233
|
-
f.style.top = `${S.top}px`, f.style.height = `${S.height}px`,
|
|
2232
|
+
const S = pe(u, "to");
|
|
2233
|
+
f.style.top = `${S.top}px`, f.style.height = `${S.height}px`, P.overlay = new x({
|
|
2234
2234
|
element: f,
|
|
2235
2235
|
motion: { lifetime: "temporary", role: "overlay" },
|
|
2236
|
-
integrator:
|
|
2236
|
+
integrator: E.from(d),
|
|
2237
2237
|
style: ($) => o.style(s, $)
|
|
2238
2238
|
});
|
|
2239
2239
|
}
|
|
2240
|
-
return new I(
|
|
2240
|
+
return new I(P, { mode: "parallel" });
|
|
2241
2241
|
}
|
|
2242
2242
|
};
|
|
2243
2243
|
};
|
|
@@ -2249,7 +2249,7 @@ const Zo = {
|
|
|
2249
2249
|
function Jo(t) {
|
|
2250
2250
|
return t === "scale" || t === "background-scale" ? "background-scale" : t === "blur" ? "blur" : "static";
|
|
2251
2251
|
}
|
|
2252
|
-
function
|
|
2252
|
+
function tr(t = {}, e = {}) {
|
|
2253
2253
|
const n = t.type, o = Jo(n);
|
|
2254
2254
|
return D(Ko({ type: o }), e.override);
|
|
2255
2255
|
}
|
|
@@ -2263,9 +2263,9 @@ const Qo = (t = {}) => {
|
|
|
2263
2263
|
s.style.transform = `translate3d(${i}%, 0, 0)`, s.style.willChange = "transform", s.style.backfaceVisibility = "hidden", s.style.contain = "layout paint";
|
|
2264
2264
|
}), {}),
|
|
2265
2265
|
animation: ({ from: r, to: c }) => {
|
|
2266
|
-
const s = new
|
|
2266
|
+
const s = new x({
|
|
2267
2267
|
element: r,
|
|
2268
|
-
integrator:
|
|
2268
|
+
integrator: E.from(e),
|
|
2269
2269
|
style: (a) => ({ transform: `translate3d(${100 * it("slide", "out", o, a).x}%, 0, 0)` }),
|
|
2270
2270
|
// The outgoing node is the real Activity page and gets reused on the
|
|
2271
2271
|
// next navigation, so reset every inline style we wrote to it (mirror
|
|
@@ -2273,9 +2273,9 @@ const Qo = (t = {}) => {
|
|
|
2273
2273
|
onDispose: () => {
|
|
2274
2274
|
r.style.willChange = "auto", r.style.backfaceVisibility = "", r.style.contain = "", r.style.transform = "", r.style.pointerEvents = "";
|
|
2275
2275
|
}
|
|
2276
|
-
}), l = new
|
|
2276
|
+
}), l = new x({
|
|
2277
2277
|
element: c,
|
|
2278
|
-
integrator:
|
|
2278
|
+
integrator: E.from(e),
|
|
2279
2279
|
style: (a) => ({ transform: `translate3d(${100 * it("slide", "in", o, a).x}%, 0, 0)` }),
|
|
2280
2280
|
onDispose: () => {
|
|
2281
2281
|
c.style.willChange = "auto", c.style.backfaceVisibility = "", c.style.contain = "", c.style.transform = "";
|
|
@@ -2293,7 +2293,7 @@ const Qo = (t = {}) => {
|
|
|
2293
2293
|
backward: n("backward")
|
|
2294
2294
|
});
|
|
2295
2295
|
};
|
|
2296
|
-
function
|
|
2296
|
+
function er(t = {}, e = {}) {
|
|
2297
2297
|
return D(Qo(), e.override);
|
|
2298
2298
|
}
|
|
2299
2299
|
const ti = {
|
|
@@ -2306,9 +2306,9 @@ const ti = {
|
|
|
2306
2306
|
r.style.willChange = "transform", r.style.backfaceVisibility = "hidden", r.style.contain = "layout paint", r.style.transform = `perspective(${nt}px) rotateY(${Et}deg) translate3d(-100%, 0, 0)`;
|
|
2307
2307
|
}), {}),
|
|
2308
2308
|
animation: ({ from: o, to: i }) => {
|
|
2309
|
-
const r = new
|
|
2309
|
+
const r = new x({
|
|
2310
2310
|
element: o,
|
|
2311
|
-
integrator:
|
|
2311
|
+
integrator: E.from(e),
|
|
2312
2312
|
style: (s) => {
|
|
2313
2313
|
const l = -s * Et, a = s * 100;
|
|
2314
2314
|
return {
|
|
@@ -2321,9 +2321,9 @@ const ti = {
|
|
|
2321
2321
|
onDispose: () => {
|
|
2322
2322
|
o.style.transform = "", o.style.willChange = "auto", o.style.backfaceVisibility = "", o.style.contain = "", o.style.pointerEvents = "";
|
|
2323
2323
|
}
|
|
2324
|
-
}), c = new
|
|
2324
|
+
}), c = new x({
|
|
2325
2325
|
element: i,
|
|
2326
|
-
integrator:
|
|
2326
|
+
integrator: E.from(e),
|
|
2327
2327
|
style: (s, l) => {
|
|
2328
2328
|
const a = l * Et, d = -l * 100;
|
|
2329
2329
|
return {
|
|
@@ -2342,7 +2342,7 @@ const ti = {
|
|
|
2342
2342
|
};
|
|
2343
2343
|
return k({ forward: n, backward: n });
|
|
2344
2344
|
};
|
|
2345
|
-
function
|
|
2345
|
+
function nr(t = {}, e = {}) {
|
|
2346
2346
|
return D(ei(), e.override);
|
|
2347
2347
|
}
|
|
2348
2348
|
const $t = /* @__PURE__ */ new WeakMap();
|
|
@@ -2404,7 +2404,7 @@ function ii(t, e, n) {
|
|
|
2404
2404
|
y: t / Math.max(Math.abs(n), 1e-6)
|
|
2405
2405
|
};
|
|
2406
2406
|
}
|
|
2407
|
-
function
|
|
2407
|
+
function xe(t, e, n, o, i, r) {
|
|
2408
2408
|
return (n ?? [t]).map(
|
|
2409
2409
|
(c) => ii(
|
|
2410
2410
|
Math.max(0, c * o + e * (1 - o)),
|
|
@@ -2414,11 +2414,11 @@ function Se(t, e, n, o, i, r) {
|
|
|
2414
2414
|
);
|
|
2415
2415
|
}
|
|
2416
2416
|
function ri(t) {
|
|
2417
|
-
const { pageRect: e, scrollOffset: n, enterRadius: o, exitRadius: i } = t, r = Yt(t), { enterContent: c, exitContent: s, startWindow: l, scaleX: a, scaleY: d } = r,
|
|
2417
|
+
const { pageRect: e, scrollOffset: n, enterRadius: o, exitRadius: i } = t, r = Yt(t), { enterContent: c, exitContent: s, startWindow: l, scaleX: a, scaleY: d } = r, p = s.left - c.left + (s.width - c.width) / 2 - n.x, y = s.top - c.top + (s.height - c.height) / 2 - n.y, u = we(l, e);
|
|
2418
2418
|
return {
|
|
2419
2419
|
transformOrigin: `${N(c)}px ${W(c)}px`,
|
|
2420
2420
|
animate: (f) => {
|
|
2421
|
-
const h = 1 - f, m = 1 + (a - 1) * h, b = 1 + (d - 1) * h, g =
|
|
2421
|
+
const h = 1 - f, m = 1 + (a - 1) * h, b = 1 + (d - 1) * h, g = xe(
|
|
2422
2422
|
i,
|
|
2423
2423
|
o,
|
|
2424
2424
|
r.exitCornerRadii,
|
|
@@ -2430,24 +2430,24 @@ function ri(t) {
|
|
|
2430
2430
|
clipPath: dt(
|
|
2431
2431
|
e,
|
|
2432
2432
|
{
|
|
2433
|
-
top:
|
|
2434
|
-
right:
|
|
2435
|
-
bottom:
|
|
2436
|
-
left:
|
|
2433
|
+
top: u.top * h,
|
|
2434
|
+
right: u.right * h,
|
|
2435
|
+
bottom: u.bottom * h,
|
|
2436
|
+
left: u.left * h
|
|
2437
2437
|
},
|
|
2438
2438
|
g
|
|
2439
2439
|
),
|
|
2440
|
-
transform: `translate(${
|
|
2440
|
+
transform: `translate(${p * h}px, ${y * h}px) scale(${m}, ${b})`
|
|
2441
2441
|
};
|
|
2442
2442
|
}
|
|
2443
2443
|
};
|
|
2444
2444
|
}
|
|
2445
2445
|
function si(t) {
|
|
2446
|
-
const { pageRect: e, scrollOffset: n, enterRadius: o, exitRadius: i } = t, r = Yt(t), { enterContent: c, exitContent: s, startWindow: l, scaleX: a, scaleY: d } = r,
|
|
2446
|
+
const { pageRect: e, scrollOffset: n, enterRadius: o, exitRadius: i } = t, r = Yt(t), { enterContent: c, exitContent: s, startWindow: l, scaleX: a, scaleY: d } = r, p = s.left - c.left + (s.width - c.width) / 2 + n.x, y = s.top - c.top + (s.height - c.height) / 2 + n.y, u = we(l, e);
|
|
2447
2447
|
return {
|
|
2448
2448
|
transformOrigin: `${N(c)}px ${W(c)}px`,
|
|
2449
2449
|
animate: (f) => {
|
|
2450
|
-
const h = 1 - f, m = 1 + (a - 1) * h, b = 1 + (d - 1) * h, g =
|
|
2450
|
+
const h = 1 - f, m = 1 + (a - 1) * h, b = 1 + (d - 1) * h, g = xe(
|
|
2451
2451
|
i,
|
|
2452
2452
|
o,
|
|
2453
2453
|
r.exitCornerRadii,
|
|
@@ -2459,48 +2459,55 @@ function si(t) {
|
|
|
2459
2459
|
clipPath: dt(
|
|
2460
2460
|
e,
|
|
2461
2461
|
{
|
|
2462
|
-
top:
|
|
2463
|
-
right:
|
|
2464
|
-
bottom:
|
|
2465
|
-
left:
|
|
2462
|
+
top: u.top * h,
|
|
2463
|
+
right: u.right * h,
|
|
2464
|
+
bottom: u.bottom * h,
|
|
2465
|
+
left: u.left * h
|
|
2466
2466
|
},
|
|
2467
2467
|
g
|
|
2468
2468
|
),
|
|
2469
|
-
transform: `translate(${
|
|
2469
|
+
transform: `translate(${p * h - n.x}px, ${y * h}px) scale(${m}, ${b})`
|
|
2470
2470
|
};
|
|
2471
2471
|
}
|
|
2472
2472
|
};
|
|
2473
2473
|
}
|
|
2474
2474
|
const ai = {
|
|
2475
2475
|
spring: {
|
|
2476
|
-
stiffness:
|
|
2477
|
-
damping:
|
|
2476
|
+
stiffness: 500,
|
|
2477
|
+
damping: 49,
|
|
2478
|
+
// Follower at 2× the leader: same 50 % / 90 % / end as a single 280/33.5
|
|
2479
|
+
// spring, but the first ~50 ms ramp in gently so low-end phones get a
|
|
2480
|
+
// couple of cheap frames before the tile, blur and fade all move at once.
|
|
2481
|
+
doubleSpring: 2,
|
|
2482
|
+
restDelta: 0.05,
|
|
2483
|
+
restSpeed: 0.05
|
|
2484
|
+
}
|
|
2485
|
+
}, ci = {
|
|
2486
|
+
spring: {
|
|
2487
|
+
stiffness: 280,
|
|
2488
|
+
damping: 33.5,
|
|
2478
2489
|
restDelta: 0.1,
|
|
2479
|
-
restSpeed: 0.1
|
|
2480
|
-
doubleSpring: {
|
|
2481
|
-
stiffness: 260,
|
|
2482
|
-
damping: 30
|
|
2483
|
-
}
|
|
2490
|
+
restSpeed: 0.1
|
|
2484
2491
|
}
|
|
2485
|
-
},
|
|
2486
|
-
function
|
|
2492
|
+
}, Se = 0.12, li = 18;
|
|
2493
|
+
function di() {
|
|
2487
2494
|
return {
|
|
2488
2495
|
transformOrigin: "50% 50%",
|
|
2489
2496
|
animate: (t) => {
|
|
2490
2497
|
const e = 1 - t;
|
|
2491
2498
|
return {
|
|
2492
|
-
transform: `scale(${1 -
|
|
2499
|
+
transform: `scale(${1 - Se * e})`
|
|
2493
2500
|
};
|
|
2494
2501
|
}
|
|
2495
2502
|
};
|
|
2496
2503
|
}
|
|
2497
|
-
function
|
|
2504
|
+
function pi() {
|
|
2498
2505
|
return {
|
|
2499
2506
|
transformOrigin: "50% 50%",
|
|
2500
2507
|
animate: (t) => {
|
|
2501
2508
|
const e = 1 - t;
|
|
2502
2509
|
return {
|
|
2503
|
-
transform: `scale(${1 -
|
|
2510
|
+
transform: `scale(${1 - Se * e})`
|
|
2504
2511
|
};
|
|
2505
2512
|
}
|
|
2506
2513
|
};
|
|
@@ -2521,7 +2528,7 @@ const Ct = {
|
|
|
2521
2528
|
WebkitBackdropFilter: "blur(0px)"
|
|
2522
2529
|
},
|
|
2523
2530
|
style: (t, e) => {
|
|
2524
|
-
const n = t === "enter" ? e : 1 - e, o = `blur(${
|
|
2531
|
+
const n = t === "enter" ? e : 1 - e, o = `blur(${li * n}px)`;
|
|
2525
2532
|
return {
|
|
2526
2533
|
backdropFilter: o,
|
|
2527
2534
|
WebkitBackdropFilter: o
|
|
@@ -2530,23 +2537,24 @@ const Ct = {
|
|
|
2530
2537
|
};
|
|
2531
2538
|
class ui {
|
|
2532
2539
|
constructor() {
|
|
2533
|
-
|
|
2534
|
-
|
|
2540
|
+
O(this, "name", "background");
|
|
2541
|
+
O(this, "physics", ai);
|
|
2542
|
+
O(this, "exitPhysics", ci);
|
|
2535
2543
|
}
|
|
2536
2544
|
contribute(e) {
|
|
2537
|
-
const { from: n, to: o, resolved: i, physics: r } = e, c = i.mode === "enter", s = c ? n : o, l = c ?
|
|
2545
|
+
const { from: n, to: o, resolved: i, physics: r } = e, c = i.mode === "enter", s = c ? n : o, l = c ? di() : pi();
|
|
2538
2546
|
return l && (s.style.transformOrigin = l.transformOrigin), [
|
|
2539
|
-
new
|
|
2547
|
+
new x({
|
|
2540
2548
|
element: s,
|
|
2541
|
-
integrator:
|
|
2549
|
+
integrator: E.from(r),
|
|
2542
2550
|
style: c ? (a, d) => l.animate(d) : (a) => l.animate(a)
|
|
2543
2551
|
})
|
|
2544
2552
|
];
|
|
2545
2553
|
}
|
|
2546
2554
|
}
|
|
2547
|
-
class
|
|
2555
|
+
class fi {
|
|
2548
2556
|
constructor() {
|
|
2549
|
-
|
|
2557
|
+
O(this, "name", "overlay");
|
|
2550
2558
|
}
|
|
2551
2559
|
prepare(e) {
|
|
2552
2560
|
const n = e.createElement("zoom-overlay");
|
|
@@ -2556,18 +2564,18 @@ class pi {
|
|
|
2556
2564
|
const n = e.extras.overlay;
|
|
2557
2565
|
if (!n) return [];
|
|
2558
2566
|
n.style.zIndex = fe;
|
|
2559
|
-
const o =
|
|
2567
|
+
const o = pe(e.context, "to");
|
|
2560
2568
|
return n.style.top = `${o.top}px`, n.style.height = `${o.height}px`, [
|
|
2561
|
-
new
|
|
2569
|
+
new x({
|
|
2562
2570
|
element: n,
|
|
2563
2571
|
motion: { lifetime: "temporary", role: "overlay" },
|
|
2564
|
-
integrator:
|
|
2572
|
+
integrator: E.from(e.physics),
|
|
2565
2573
|
style: (i) => Ct.style(e.resolved.mode, i)
|
|
2566
2574
|
})
|
|
2567
2575
|
];
|
|
2568
2576
|
}
|
|
2569
2577
|
}
|
|
2570
|
-
const
|
|
2578
|
+
const hi = {
|
|
2571
2579
|
spring: {
|
|
2572
2580
|
stiffness: 380,
|
|
2573
2581
|
damping: 30,
|
|
@@ -2577,7 +2585,7 @@ const fi = {
|
|
|
2577
2585
|
}
|
|
2578
2586
|
}
|
|
2579
2587
|
};
|
|
2580
|
-
function
|
|
2588
|
+
function yi({
|
|
2581
2589
|
enterRect: t,
|
|
2582
2590
|
exitRect: e,
|
|
2583
2591
|
scrollOffset: n
|
|
@@ -2593,7 +2601,7 @@ function hi({
|
|
|
2593
2601
|
}
|
|
2594
2602
|
};
|
|
2595
2603
|
}
|
|
2596
|
-
function
|
|
2604
|
+
function mi({
|
|
2597
2605
|
enterRect: t,
|
|
2598
2606
|
exitRect: e,
|
|
2599
2607
|
scrollOffset: n
|
|
@@ -2609,50 +2617,50 @@ function yi({
|
|
|
2609
2617
|
}
|
|
2610
2618
|
};
|
|
2611
2619
|
}
|
|
2612
|
-
class
|
|
2620
|
+
class gi {
|
|
2613
2621
|
constructor() {
|
|
2614
|
-
|
|
2615
|
-
|
|
2622
|
+
O(this, "name", "background");
|
|
2623
|
+
O(this, "physics", hi);
|
|
2616
2624
|
}
|
|
2617
2625
|
contribute(e) {
|
|
2618
|
-
const { from: n, to: o, resolved: i, input: r, physics: c } = e, s = i.mode === "enter", l = s ? n : o, a = s ?
|
|
2626
|
+
const { from: n, to: o, resolved: i, input: r, physics: c } = e, s = i.mode === "enter", l = s ? n : o, a = s ? yi(r) : mi(r);
|
|
2619
2627
|
return a && (l.style.transformOrigin = a.transformOrigin), [
|
|
2620
|
-
new
|
|
2628
|
+
new x({
|
|
2621
2629
|
element: l,
|
|
2622
|
-
integrator:
|
|
2623
|
-
style: s ? (d,
|
|
2630
|
+
integrator: E.from(c),
|
|
2631
|
+
style: s ? (d, p) => a.animate(p) : (d) => a.animate(d)
|
|
2624
2632
|
})
|
|
2625
2633
|
];
|
|
2626
2634
|
}
|
|
2627
2635
|
}
|
|
2628
|
-
const
|
|
2636
|
+
const bi = {
|
|
2629
2637
|
spring: {
|
|
2630
2638
|
stiffness: 530,
|
|
2631
2639
|
damping: 34,
|
|
2632
2640
|
doubleSpring: 1
|
|
2633
2641
|
}
|
|
2634
2642
|
};
|
|
2635
|
-
class
|
|
2643
|
+
class wi {
|
|
2636
2644
|
constructor() {
|
|
2637
|
-
|
|
2638
|
-
|
|
2645
|
+
O(this, "name", "background");
|
|
2646
|
+
O(this, "physics", bi);
|
|
2639
2647
|
}
|
|
2640
2648
|
contribute(e) {
|
|
2641
2649
|
return [];
|
|
2642
2650
|
}
|
|
2643
2651
|
}
|
|
2644
|
-
const
|
|
2645
|
-
expand: () => new
|
|
2646
|
-
static: () => new
|
|
2652
|
+
const xi = {
|
|
2653
|
+
expand: () => new gi(),
|
|
2654
|
+
static: () => new wi(),
|
|
2647
2655
|
blur: () => new ui()
|
|
2648
2656
|
};
|
|
2649
2657
|
function Si(t) {
|
|
2650
|
-
return
|
|
2658
|
+
return xi[t]();
|
|
2651
2659
|
}
|
|
2652
|
-
function
|
|
2653
|
-
var
|
|
2654
|
-
const { resolved: e, input: n, from: o, to: i, physics: r, onDispose: c } = t, s = e.mode === "enter", l = s ? i : o, a = Yt(n), d = a.contentAware ? ((
|
|
2655
|
-
a.contentAware && (f.style.width = `${a.exitContent.width}px`, f.style.height = `${a.exitContent.height}px`, f.style.borderRadius = "0"), f.style.zIndex = getComputedStyle(
|
|
2660
|
+
function Ei(t) {
|
|
2661
|
+
var w, C;
|
|
2662
|
+
const { resolved: e, input: n, from: o, to: i, physics: r, onDispose: c } = t, s = e.mode === "enter", l = s ? i : o, a = Yt(n), d = a.contentAware ? ((w = n.exitMedia) == null ? void 0 : w.mediaElement) ?? e.exitEl : e.exitEl, p = a.contentAware ? ((C = n.enterMedia) == null ? void 0 : C.mediaElement) ?? e.enterEl : e.enterEl, y = ot(d), u = ot(p), f = Tt(d);
|
|
2663
|
+
a.contentAware && (f.style.width = `${a.exitContent.width}px`, f.style.height = `${a.exitContent.height}px`, f.style.borderRadius = "0"), f.style.zIndex = getComputedStyle(p).zIndex, p.after(f), f.style.transform = Qn(
|
|
2656
2664
|
{
|
|
2657
2665
|
width: a.enterContent.width,
|
|
2658
2666
|
height: a.enterContent.height,
|
|
@@ -2664,43 +2672,43 @@ function xi(t) {
|
|
|
2664
2672
|
const h = n.enterMedia ?? rt(
|
|
2665
2673
|
e.enterEl,
|
|
2666
2674
|
n.enterRect,
|
|
2667
|
-
(
|
|
2675
|
+
(A) => z(l, A),
|
|
2668
2676
|
{ clipRoot: l, legacyRadiusAttribute: "data-zoom-radius" }
|
|
2669
2677
|
);
|
|
2670
2678
|
if ((a.contentAware ? h.radiusSource : h.bboxRadiusSource) !== "unsupported") {
|
|
2671
|
-
const
|
|
2679
|
+
const A = a.contentAware ? h.window : n.enterRect, P = a.contentAware ? h.cornerRadii ?? [h.radius] : [h.bboxRadius];
|
|
2672
2680
|
f.style.borderRadius = "0", f.style.clipPath = dt(
|
|
2673
2681
|
a.enterContent,
|
|
2674
|
-
j(a.enterContent,
|
|
2675
|
-
|
|
2682
|
+
j(a.enterContent, A),
|
|
2683
|
+
P.map((S) => ({ x: S, y: S }))
|
|
2676
2684
|
);
|
|
2677
2685
|
}
|
|
2678
|
-
const b = (
|
|
2679
|
-
opacity: U(s ?
|
|
2680
|
-
}), g = (
|
|
2681
|
-
opacity: U(s ?
|
|
2686
|
+
const b = (A, P) => ({
|
|
2687
|
+
opacity: U(s ? P : A) * y.opacity
|
|
2688
|
+
}), g = (A, P) => ({
|
|
2689
|
+
opacity: U(s ? A : P) * u.opacity
|
|
2682
2690
|
});
|
|
2683
|
-
return f.style.opacity = String(b(0, 1).opacity), y.set(0),
|
|
2684
|
-
f.remove(), y.restore(),
|
|
2691
|
+
return f.style.opacity = String(b(0, 1).opacity), y.set(0), u.set(g(0, 1).opacity), c(() => {
|
|
2692
|
+
f.remove(), y.restore(), u.restore();
|
|
2685
2693
|
}), [
|
|
2686
|
-
new
|
|
2694
|
+
new x({
|
|
2687
2695
|
element: f,
|
|
2688
2696
|
motion: { lifetime: "temporary", role: "shared-media-source" },
|
|
2689
|
-
integrator:
|
|
2697
|
+
integrator: E.from(r),
|
|
2690
2698
|
style: b
|
|
2691
2699
|
}),
|
|
2692
|
-
new
|
|
2693
|
-
element:
|
|
2694
|
-
integrator:
|
|
2700
|
+
new x({
|
|
2701
|
+
element: p,
|
|
2702
|
+
integrator: E.from(r),
|
|
2695
2703
|
style: g
|
|
2696
2704
|
})
|
|
2697
2705
|
];
|
|
2698
2706
|
}
|
|
2699
2707
|
const Dt = "data-zoom-enter-key", se = "data-zoom-exit-key", ae = "data-zoom-radius";
|
|
2700
|
-
function
|
|
2708
|
+
function $i(t, e) {
|
|
2701
2709
|
return Math.abs(t.left - e.left) < 0.01 && Math.abs(t.top - e.top) < 0.01 && Math.abs(t.width - e.width) < 0.01 && Math.abs(t.height - e.height) < 0.01;
|
|
2702
2710
|
}
|
|
2703
|
-
function
|
|
2711
|
+
function Ci(t, e) {
|
|
2704
2712
|
const n = [];
|
|
2705
2713
|
let o = e;
|
|
2706
2714
|
for (; o && o !== t; ) {
|
|
@@ -2723,7 +2731,7 @@ function le(t, e) {
|
|
|
2723
2731
|
return o;
|
|
2724
2732
|
return null;
|
|
2725
2733
|
}
|
|
2726
|
-
function
|
|
2734
|
+
function Ai(t, e, n) {
|
|
2727
2735
|
if (n === "forward") {
|
|
2728
2736
|
const c = ce(e);
|
|
2729
2737
|
if (!c) return null;
|
|
@@ -2739,7 +2747,7 @@ function Ci(t, e, n) {
|
|
|
2739
2747
|
const r = le(e, i);
|
|
2740
2748
|
return r ? { mode: "exit", enterEl: o, exitEl: r } : null;
|
|
2741
2749
|
}
|
|
2742
|
-
function
|
|
2750
|
+
function Pi(t, e, n, o) {
|
|
2743
2751
|
const i = t.mode === "enter" ? n : e, r = t.mode === "enter" ? e : n, c = z(i, t.enterEl), s = z(r, t.exitEl), l = rt(
|
|
2744
2752
|
t.enterEl,
|
|
2745
2753
|
c,
|
|
@@ -2756,28 +2764,28 @@ function Ai(t, e, n, o) {
|
|
|
2756
2764
|
clipRoot: r,
|
|
2757
2765
|
legacyRadiusAttribute: ae
|
|
2758
2766
|
}
|
|
2759
|
-
), [d,
|
|
2767
|
+
), [d, p] = ge(l, a), y = d.contentAware && p.contentAware, u = t.mode === "enter" ? n.getBoundingClientRect() : e.getBoundingClientRect(), f = {
|
|
2760
2768
|
left: 0,
|
|
2761
2769
|
top: 0,
|
|
2762
|
-
width:
|
|
2763
|
-
height:
|
|
2764
|
-
}, h = d.radiusSource === "legacy" ||
|
|
2770
|
+
width: u.width,
|
|
2771
|
+
height: u.height
|
|
2772
|
+
}, h = d.radiusSource === "legacy" || $i(d.window, f) ? d.radius : 0;
|
|
2765
2773
|
return {
|
|
2766
2774
|
enterRect: c,
|
|
2767
2775
|
exitRect: s,
|
|
2768
2776
|
...y ? {
|
|
2769
2777
|
enterMedia: d,
|
|
2770
|
-
exitMedia:
|
|
2778
|
+
exitMedia: p
|
|
2771
2779
|
} : {},
|
|
2772
|
-
pageRect:
|
|
2780
|
+
pageRect: u,
|
|
2773
2781
|
scrollOffset: o,
|
|
2774
2782
|
enterRadius: h,
|
|
2775
|
-
exitRadius:
|
|
2783
|
+
exitRadius: p.radius
|
|
2776
2784
|
};
|
|
2777
2785
|
}
|
|
2778
2786
|
class vi {
|
|
2779
2787
|
constructor() {
|
|
2780
|
-
|
|
2788
|
+
O(this, "name", "tile");
|
|
2781
2789
|
}
|
|
2782
2790
|
prepare(e) {
|
|
2783
2791
|
e.from.then((n) => {
|
|
@@ -2785,162 +2793,169 @@ class vi {
|
|
|
2785
2793
|
});
|
|
2786
2794
|
}
|
|
2787
2795
|
contribute(e) {
|
|
2788
|
-
const { from: n, to: o, resolved: i, input: r, physics: c, onDispose: s } = e, l = i.mode === "enter", a = l ? ri(r) : si(r), d = l ? o : n,
|
|
2796
|
+
const { from: n, to: o, resolved: i, input: r, physics: c, onDispose: s } = e, l = i.mode === "enter", a = l ? ri(r) : si(r), d = l ? o : n, p = l ? "t" : "u", y = Ei(e);
|
|
2789
2797
|
s(ni(i.exitEl)), a && (d.style.transformOrigin = a.transformOrigin);
|
|
2790
|
-
const
|
|
2791
|
-
n.style.zIndex =
|
|
2798
|
+
const u = l ? L : M, f = l ? M : L, h = n.style.zIndex;
|
|
2799
|
+
n.style.zIndex = u;
|
|
2792
2800
|
const m = o.style.zIndex, b = o.style.position;
|
|
2793
2801
|
return o.style.zIndex = f, o.style.position = "relative", s((g) => {
|
|
2794
2802
|
g.owns(d) && (d.style.willChange = "auto", d.style.backfaceVisibility = "", d.style.transformOrigin = "", d.style.contain = ""), g.owns(n) && (n.style.zIndex = h, n.style.willChange = "auto", n.style.backfaceVisibility = "", n.style.transformOrigin = "", n.style.contain = "", n.style.transform = "", n.style.clipPath = ""), g.owns(o) && (o.style.zIndex = m, o.style.position = b, o.style.transformOrigin = "");
|
|
2795
2803
|
}), [
|
|
2796
2804
|
...y,
|
|
2797
|
-
new
|
|
2805
|
+
new x({
|
|
2798
2806
|
element: d,
|
|
2799
|
-
integrator:
|
|
2807
|
+
integrator: E.from(c),
|
|
2800
2808
|
// Enter: tile expands as `t` (0 → 1). Exit: tile shrinks as `u` —
|
|
2801
2809
|
// the legacy convention from v5's outAnim path. Either way, feed
|
|
2802
2810
|
// the progress that matches the tileConfig's authored direction.
|
|
2803
|
-
style:
|
|
2811
|
+
style: p === "t" ? (g) => a.animate(g) : (g, w) => a.animate(w)
|
|
2804
2812
|
})
|
|
2805
2813
|
];
|
|
2806
2814
|
}
|
|
2807
2815
|
}
|
|
2808
|
-
class
|
|
2816
|
+
class Ri {
|
|
2809
2817
|
constructor() {
|
|
2810
|
-
|
|
2818
|
+
O(this, "name", "content");
|
|
2811
2819
|
}
|
|
2812
2820
|
contribute(e) {
|
|
2813
|
-
const { resolved: n, physics: o, from: i, to: r, onDispose: c } = e, s = n.mode === "enter" ? r : i, l =
|
|
2821
|
+
const { resolved: n, physics: o, from: i, to: r, onDispose: c } = e, s = n.mode === "enter" ? r : i, l = Ci(s, n.enterEl);
|
|
2814
2822
|
if (l.length === 0) return [];
|
|
2815
2823
|
const a = l.map((d) => d.style.opacity);
|
|
2816
2824
|
if (n.mode === "enter")
|
|
2817
2825
|
for (const d of l) d.style.opacity = "0";
|
|
2818
2826
|
return c((d) => {
|
|
2819
|
-
for (let
|
|
2820
|
-
const y = l[
|
|
2821
|
-
y && d.owns(y) && (y.style.opacity = a[
|
|
2827
|
+
for (let p = 0; p < l.length; p++) {
|
|
2828
|
+
const y = l[p];
|
|
2829
|
+
y && d.owns(y) && (y.style.opacity = a[p] ?? "");
|
|
2822
2830
|
}
|
|
2823
2831
|
}), l.map(
|
|
2824
|
-
(d) => new
|
|
2832
|
+
(d) => new x({
|
|
2825
2833
|
element: d,
|
|
2826
|
-
integrator:
|
|
2827
|
-
style: (
|
|
2828
|
-
opacity: n.mode === "enter" ?
|
|
2834
|
+
integrator: E.from(o),
|
|
2835
|
+
style: (p, y) => ({
|
|
2836
|
+
opacity: n.mode === "enter" ? p : y
|
|
2829
2837
|
})
|
|
2830
2838
|
})
|
|
2831
2839
|
);
|
|
2832
2840
|
}
|
|
2833
2841
|
}
|
|
2834
|
-
class
|
|
2842
|
+
class Ii {
|
|
2835
2843
|
constructor() {
|
|
2836
|
-
|
|
2844
|
+
O(this, "name", "content");
|
|
2837
2845
|
}
|
|
2838
2846
|
contribute() {
|
|
2839
2847
|
return [];
|
|
2840
2848
|
}
|
|
2841
2849
|
}
|
|
2842
|
-
const
|
|
2843
|
-
default: () => new
|
|
2844
|
-
fade: () => new
|
|
2850
|
+
const Oi = {
|
|
2851
|
+
default: () => new Ii(),
|
|
2852
|
+
fade: () => new Ri()
|
|
2845
2853
|
};
|
|
2846
|
-
function
|
|
2847
|
-
return
|
|
2854
|
+
function _i(t) {
|
|
2855
|
+
return Oi[t]();
|
|
2848
2856
|
}
|
|
2849
2857
|
function At(t) {
|
|
2850
2858
|
const e = Si(t.type);
|
|
2851
|
-
return {
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2859
|
+
return {
|
|
2860
|
+
strategies: [
|
|
2861
|
+
new vi(),
|
|
2862
|
+
e,
|
|
2863
|
+
_i(t.variant),
|
|
2864
|
+
// Overlay is intrinsically tied to backdrop-filter-driven types. Today
|
|
2865
|
+
// that's only `blur`; the table-driven factory above owns the mapping
|
|
2866
|
+
// so this conditional is the single line that knows the relationship.
|
|
2867
|
+
...t.type === "blur" ? [new fi()] : []
|
|
2868
|
+
],
|
|
2869
|
+
physics: e.physics,
|
|
2870
|
+
exitPhysics: e.exitPhysics
|
|
2871
|
+
};
|
|
2872
|
+
}
|
|
2873
|
+
function ki(t, e) {
|
|
2874
|
+
return e === "exit" ? t.exitPhysics ?? t.physics : t.physics;
|
|
2875
|
+
}
|
|
2876
|
+
const Di = (t) => {
|
|
2877
|
+
const { physics: e, exitPhysics: n } = At(t), o = (i) => ({
|
|
2878
|
+
prepare: (r) => {
|
|
2879
|
+
const { strategies: c } = At(t), s = {
|
|
2880
|
+
from: r.from,
|
|
2881
|
+
to: r.to,
|
|
2882
|
+
context: { positionedParent: r.context.positionedParent },
|
|
2868
2883
|
// `createElement` from the dispatcher is generic over tag; the
|
|
2869
2884
|
// strategy interface narrows the cast to keep both signatures
|
|
2870
2885
|
// compatible.
|
|
2871
|
-
createElement:
|
|
2872
|
-
},
|
|
2873
|
-
for (const
|
|
2874
|
-
if (!
|
|
2875
|
-
const
|
|
2876
|
-
|
|
2886
|
+
createElement: r.createElement
|
|
2887
|
+
}, l = {};
|
|
2888
|
+
for (const a of c) {
|
|
2889
|
+
if (!a.prepare) continue;
|
|
2890
|
+
const d = a.prepare(s);
|
|
2891
|
+
d && Object.assign(l, d);
|
|
2877
2892
|
}
|
|
2878
|
-
return { ...
|
|
2893
|
+
return { ...l, strategies: c };
|
|
2879
2894
|
},
|
|
2880
2895
|
animation: ({
|
|
2881
|
-
from:
|
|
2882
|
-
to:
|
|
2883
|
-
context:
|
|
2884
|
-
strategies:
|
|
2885
|
-
...
|
|
2896
|
+
from: r,
|
|
2897
|
+
to: c,
|
|
2898
|
+
context: s,
|
|
2899
|
+
strategies: l = At(t).strategies,
|
|
2900
|
+
...a
|
|
2886
2901
|
}) => {
|
|
2887
|
-
var
|
|
2888
|
-
const
|
|
2889
|
-
if (!
|
|
2902
|
+
var g;
|
|
2903
|
+
const d = Ai(r, c, i);
|
|
2904
|
+
if (!d)
|
|
2890
2905
|
return K({
|
|
2891
2906
|
tile: [],
|
|
2892
2907
|
background: [],
|
|
2893
2908
|
content: [],
|
|
2894
2909
|
overlay: []
|
|
2895
2910
|
});
|
|
2896
|
-
const
|
|
2897
|
-
|
|
2898
|
-
to: r,
|
|
2899
|
-
resolved: a,
|
|
2900
|
-
input: d,
|
|
2901
|
-
physics: e,
|
|
2902
|
-
context: c,
|
|
2903
|
-
extras: l,
|
|
2904
|
-
onDispose: (g) => {
|
|
2905
|
-
u.push(g);
|
|
2906
|
-
}
|
|
2911
|
+
const p = Pi(d, r, c, s.scrollOffset), y = [], u = (w) => {
|
|
2912
|
+
y.push(w);
|
|
2907
2913
|
}, f = {
|
|
2914
|
+
from: r,
|
|
2915
|
+
to: c,
|
|
2916
|
+
resolved: d,
|
|
2917
|
+
input: p,
|
|
2918
|
+
physics: ki({ physics: e, exitPhysics: n }, d.mode),
|
|
2919
|
+
context: s,
|
|
2920
|
+
extras: a,
|
|
2921
|
+
onDispose: u
|
|
2922
|
+
}, h = {
|
|
2908
2923
|
tile: [],
|
|
2909
2924
|
background: [],
|
|
2910
2925
|
content: [],
|
|
2911
2926
|
overlay: []
|
|
2912
2927
|
};
|
|
2913
|
-
for (const
|
|
2914
|
-
|
|
2915
|
-
const
|
|
2916
|
-
|
|
2917
|
-
for (const
|
|
2928
|
+
for (const w of l)
|
|
2929
|
+
h[w.name].push(...((g = w.contribute) == null ? void 0 : g.call(w, f)) ?? []);
|
|
2930
|
+
const m = Object.values(h).flat(), b = K(h);
|
|
2931
|
+
b.onDispose = (w) => {
|
|
2932
|
+
for (const C of y)
|
|
2918
2933
|
try {
|
|
2919
|
-
|
|
2920
|
-
} catch (
|
|
2921
|
-
console.error("[zoom] cleanup error",
|
|
2934
|
+
C(w);
|
|
2935
|
+
} catch (A) {
|
|
2936
|
+
console.error("[zoom] cleanup error", A);
|
|
2922
2937
|
}
|
|
2923
2938
|
};
|
|
2924
|
-
for (const
|
|
2925
|
-
|
|
2926
|
-
return
|
|
2939
|
+
for (const w of m)
|
|
2940
|
+
w instanceof x && J(w);
|
|
2941
|
+
return b;
|
|
2927
2942
|
}
|
|
2928
2943
|
});
|
|
2929
2944
|
return k({
|
|
2930
|
-
forward:
|
|
2931
|
-
backward:
|
|
2945
|
+
forward: o("forward"),
|
|
2946
|
+
backward: o("backward")
|
|
2932
2947
|
});
|
|
2933
2948
|
};
|
|
2934
|
-
function
|
|
2949
|
+
function Fi(t) {
|
|
2935
2950
|
const e = t.type ?? "static", n = t.variant ?? (t.fade ? "fade" : "default");
|
|
2936
2951
|
return { type: e, variant: n };
|
|
2937
2952
|
}
|
|
2938
|
-
function
|
|
2939
|
-
const n =
|
|
2940
|
-
return D(
|
|
2953
|
+
function or(t = {}, e = {}) {
|
|
2954
|
+
const n = Fi(t);
|
|
2955
|
+
return D(Di(n), e.override);
|
|
2941
2956
|
}
|
|
2942
|
-
const de = 1 / 60,
|
|
2943
|
-
function
|
|
2957
|
+
const de = 1 / 60, Mi = 600;
|
|
2958
|
+
function Ti(t, e) {
|
|
2944
2959
|
const n = Math.sqrt(t), o = e / (2 * n), i = 2 * Math.PI / n, r = o <= 1 ? 1 - o : 1 / o - 1;
|
|
2945
2960
|
return { duration: i, bounce: r, zeta: o };
|
|
2946
2961
|
}
|
|
@@ -2955,29 +2970,29 @@ function tt(t) {
|
|
|
2955
2970
|
])
|
|
2956
2971
|
if (n !== void 0 && (!Number.isFinite(n) || n <= 0))
|
|
2957
2972
|
throw new Error(`spring(): ${e} must be finite and > 0`);
|
|
2958
|
-
return
|
|
2973
|
+
return E.from({ spring: t });
|
|
2959
2974
|
}
|
|
2960
|
-
function
|
|
2975
|
+
function Yi(t) {
|
|
2961
2976
|
let e = { position: 0, velocity: 0 };
|
|
2962
|
-
for (let n = 1; n <=
|
|
2977
|
+
for (let n = 1; n <= Mi; n++)
|
|
2963
2978
|
if (e = t.step(e, 1, de), e.position >= 1) return n * de * 1e3;
|
|
2964
2979
|
return 1 / 0;
|
|
2965
2980
|
}
|
|
2966
|
-
function
|
|
2981
|
+
function Li(t) {
|
|
2967
2982
|
const { duration: e, resistance: n = 1.5, restDelta: o } = t;
|
|
2968
2983
|
if (!Number.isFinite(e) || !(e > 0))
|
|
2969
2984
|
throw new Error("easeIn(): duration must be finite and > 0");
|
|
2970
2985
|
const i = e * 1e3;
|
|
2971
2986
|
let r = 0.01, c = 1e6;
|
|
2972
2987
|
for (let s = 0; s < 60; s++) {
|
|
2973
|
-
const l = Math.sqrt(r * c), a = new
|
|
2988
|
+
const l = Math.sqrt(r * c), a = new vt({
|
|
2974
2989
|
acceleration: l,
|
|
2975
2990
|
resistance: n,
|
|
2976
2991
|
restDelta: o
|
|
2977
2992
|
});
|
|
2978
|
-
|
|
2993
|
+
Yi(a) > i ? r = l : c = l;
|
|
2979
2994
|
}
|
|
2980
|
-
return new
|
|
2995
|
+
return new vt({ acceleration: c, resistance: n, restDelta: o });
|
|
2981
2996
|
}
|
|
2982
2997
|
class Ee {
|
|
2983
2998
|
constructor(e, n) {
|
|
@@ -3000,13 +3015,13 @@ class Ee {
|
|
|
3000
3015
|
);
|
|
3001
3016
|
}
|
|
3002
3017
|
}
|
|
3003
|
-
function
|
|
3018
|
+
function ir(t, e) {
|
|
3004
3019
|
return new Ee(t, e);
|
|
3005
3020
|
}
|
|
3006
|
-
function
|
|
3021
|
+
function Hi(t) {
|
|
3007
3022
|
const e = Te(t, 0, 1, 0), n = e.length ? e[e.length - 1].time : 0;
|
|
3008
3023
|
if (t instanceof Ee) {
|
|
3009
|
-
const o =
|
|
3024
|
+
const o = Hi(t.inner);
|
|
3010
3025
|
return {
|
|
3011
3026
|
...o,
|
|
3012
3027
|
kind: "scaled",
|
|
@@ -3014,61 +3029,61 @@ function Yi(t) {
|
|
|
3014
3029
|
settleMs: n
|
|
3015
3030
|
};
|
|
3016
3031
|
}
|
|
3017
|
-
return t instanceof
|
|
3018
|
-
kind: t instanceof
|
|
3019
|
-
...
|
|
3032
|
+
return t instanceof Pt || t instanceof Ye ? {
|
|
3033
|
+
kind: t instanceof Pt ? "spring" : "double-spring",
|
|
3034
|
+
...Ti(t.stiffness, t.damping),
|
|
3020
3035
|
settleMs: n
|
|
3021
|
-
} : t instanceof
|
|
3036
|
+
} : t instanceof vt ? { kind: "inertia", settleMs: n } : { kind: "custom", settleMs: n };
|
|
3022
3037
|
}
|
|
3023
|
-
const
|
|
3038
|
+
const rr = tt({
|
|
3024
3039
|
stiffness: 246.74011002723395,
|
|
3025
3040
|
damping: 31.41592653589793
|
|
3026
|
-
}),
|
|
3041
|
+
}), sr = tt({
|
|
3027
3042
|
stiffness: 438.6490844928604,
|
|
3028
3043
|
damping: 35.604716740684324
|
|
3029
|
-
}),
|
|
3044
|
+
}), ar = tt({
|
|
3030
3045
|
stiffness: 194.9551486634935,
|
|
3031
3046
|
damping: 19.54768762233649
|
|
3032
|
-
}),
|
|
3047
|
+
}), cr = tt({
|
|
3033
3048
|
stiffness: 130.5071656342394,
|
|
3034
3049
|
damping: 22.84794657156213
|
|
3035
|
-
}),
|
|
3050
|
+
}), lr = tt({
|
|
3036
3051
|
stiffness: 986.9604401089358,
|
|
3037
3052
|
damping: 62.83185307179586
|
|
3038
|
-
}),
|
|
3053
|
+
}), dr = Li({ duration: 0.2 });
|
|
3039
3054
|
export {
|
|
3040
|
-
|
|
3055
|
+
fr as Animation,
|
|
3041
3056
|
Ye as DoubleSpringIntegrator,
|
|
3042
|
-
|
|
3043
|
-
|
|
3057
|
+
vt as InertiaIntegrator,
|
|
3058
|
+
E as IntegratorProvider,
|
|
3044
3059
|
Ne as LinearIntegrator,
|
|
3045
3060
|
I as MultiAnimation,
|
|
3046
3061
|
Ee as ScaledIntegrator,
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3062
|
+
Pt as SpringIntegrator,
|
|
3063
|
+
x as WebAnimation,
|
|
3064
|
+
dr as accelerate,
|
|
3065
|
+
Bi as axis,
|
|
3066
|
+
Ui as blind,
|
|
3067
|
+
ar as bouncy,
|
|
3053
3068
|
k as defineTransition,
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
+
Hi as describeIntegrator,
|
|
3070
|
+
ji as drill,
|
|
3071
|
+
Li as easeIn,
|
|
3072
|
+
Zi as fade,
|
|
3073
|
+
Gi as film,
|
|
3074
|
+
cr as gentle,
|
|
3075
|
+
qi as hero,
|
|
3076
|
+
Ki as jaemin,
|
|
3077
|
+
Ji as rotate,
|
|
3078
|
+
ir as scale,
|
|
3079
|
+
Qi as scroll,
|
|
3080
|
+
tr as sheet,
|
|
3081
|
+
er as slide,
|
|
3082
|
+
rr as smooth,
|
|
3083
|
+
sr as snappy,
|
|
3069
3084
|
tt as spring,
|
|
3070
|
-
|
|
3071
|
-
|
|
3085
|
+
nr as strip,
|
|
3086
|
+
lr as swift,
|
|
3072
3087
|
D as withOverride,
|
|
3073
|
-
|
|
3088
|
+
or as zoom
|
|
3074
3089
|
};
|