@ssgoi/core 6.5.0 → 6.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +6 -6
- package/dist/index.js +831 -816
- package/dist/internal.cjs +1 -1
- package/dist/internal.js +319 -311
- package/dist/ssgoi-transition/create-context-manager.d.ts +1 -0
- package/dist/ssgoi-transition/create-context-manager.d.ts.map +1 -1
- package/dist/ssgoi-transition/create-ssgoi-transition-context.d.ts.map +1 -1
- package/dist/transitions/drill/transition.d.ts.map +1 -1
- package/dist/transitions/scroll/transition.d.ts.map +1 -1
- package/dist/transitions/sheet/transition.d.ts.map +1 -1
- package/dist/transitions/stacking.d.ts +31 -0
- package/dist/transitions/stacking.d.ts.map +1 -0
- package/dist/transitions/zoom/provider/blur.d.ts.map +1 -1
- package/dist/transitions/zoom/transition.d.ts.map +1 -1
- package/dist/types/index.d.ts +20 -1
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
var
|
|
2
|
-
var Ut = (e, t, n) => t in e ?
|
|
3
|
-
var
|
|
4
|
-
import { P as
|
|
5
|
-
import { A as
|
|
6
|
-
function
|
|
1
|
+
var Rt = Object.defineProperty;
|
|
2
|
+
var Ut = (e, t, n) => t in e ? Rt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var C = (e, t, n) => Ut(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { P as J, V as vt, W as g, M as x, S as Vt } from "./multi-animation-Ch5rI3rB.js";
|
|
5
|
+
import { A as Ls } from "./multi-animation-Ch5rI3rB.js";
|
|
6
|
+
function D(e, t) {
|
|
7
7
|
const n = [];
|
|
8
8
|
for (let s = 0; s < e.length; s++)
|
|
9
9
|
for (let o = s + 1; o < e.length; o++) {
|
|
10
|
-
const i = e[s],
|
|
11
|
-
!i || !
|
|
10
|
+
const i = e[s], l = e[o];
|
|
11
|
+
!i || !l || n.push({
|
|
12
12
|
from: i,
|
|
13
|
-
to:
|
|
13
|
+
to: l,
|
|
14
14
|
transition: t(),
|
|
15
15
|
symmetric: !0
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
18
|
return n;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function Ot(e, t) {
|
|
21
21
|
return [
|
|
22
22
|
{
|
|
23
23
|
from: e.exit,
|
|
@@ -31,41 +31,41 @@ function vt(e, t) {
|
|
|
31
31
|
}
|
|
32
32
|
];
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function Q(e, t, n) {
|
|
35
35
|
const s = [];
|
|
36
36
|
for (let o = 0; o < e.length; o++)
|
|
37
37
|
for (let i = o + 1; i < e.length; i++) {
|
|
38
|
-
const
|
|
39
|
-
!
|
|
38
|
+
const l = e[o], a = e[i];
|
|
39
|
+
!l || !a || s.push(
|
|
40
40
|
{
|
|
41
|
-
from:
|
|
42
|
-
to:
|
|
41
|
+
from: l,
|
|
42
|
+
to: a,
|
|
43
43
|
transition: n(t.forward)
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
|
-
from:
|
|
47
|
-
to:
|
|
46
|
+
from: a,
|
|
47
|
+
to: l,
|
|
48
48
|
transition: n(t.backward)
|
|
49
49
|
}
|
|
50
50
|
);
|
|
51
51
|
}
|
|
52
52
|
return s;
|
|
53
53
|
}
|
|
54
|
-
class
|
|
54
|
+
class L {
|
|
55
55
|
constructor(t) {
|
|
56
|
-
|
|
56
|
+
C(this, "omega");
|
|
57
57
|
// Angular frequency
|
|
58
|
-
|
|
58
|
+
C(this, "zeta");
|
|
59
59
|
// Damping ratio
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
C(this, "restDelta");
|
|
61
|
+
C(this, "restSpeed");
|
|
62
62
|
const { stiffness: n, damping: s } = t, o = 1;
|
|
63
|
-
this.omega = Math.sqrt(n / o), this.zeta = s / (2 * Math.sqrt(n * o)), this.restDelta = t.restDelta ??
|
|
63
|
+
this.omega = Math.sqrt(n / o), this.zeta = s / (2 * Math.sqrt(n * o)), this.restDelta = t.restDelta ?? J, this.restSpeed = t.restSpeed ?? vt;
|
|
64
64
|
}
|
|
65
65
|
step(t, n, s) {
|
|
66
|
-
const o = Math.min(s, 0.033), { omega: i, zeta:
|
|
66
|
+
const o = Math.min(s, 0.033), { omega: i, zeta: l } = this, { position: a, velocity: r } = t, c = -2 * o * l * i * r, p = o * i * i * (n - a), d = r + c + p;
|
|
67
67
|
return {
|
|
68
|
-
position:
|
|
68
|
+
position: a + o * d,
|
|
69
69
|
velocity: d
|
|
70
70
|
};
|
|
71
71
|
}
|
|
@@ -74,20 +74,20 @@ class k {
|
|
|
74
74
|
return s < this.restDelta && o < this.restSpeed;
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
class
|
|
77
|
+
class Nt {
|
|
78
78
|
constructor(t) {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
this.restDelta = t.restDelta ??
|
|
79
|
+
C(this, "leader");
|
|
80
|
+
C(this, "follower");
|
|
81
|
+
C(this, "restDelta");
|
|
82
|
+
C(this, "restSpeed");
|
|
83
|
+
this.restDelta = t.restDelta ?? J, this.restSpeed = t.restSpeed ?? vt, this.leader = new L({
|
|
84
84
|
stiffness: t.stiffness,
|
|
85
85
|
damping: t.damping,
|
|
86
86
|
restDelta: this.restDelta,
|
|
87
87
|
restSpeed: this.restSpeed
|
|
88
88
|
});
|
|
89
89
|
let n, s, o, i;
|
|
90
|
-
typeof t.follower == "number" ? (n = t.stiffness * t.follower, s = t.damping) : t.follower ? (n = t.follower.stiffness, s = t.follower.damping, o = t.follower.restDelta, i = t.follower.restSpeed) : (n = t.stiffness, s = t.damping), this.follower = new
|
|
90
|
+
typeof t.follower == "number" ? (n = t.stiffness * t.follower, s = t.damping) : t.follower ? (n = t.follower.stiffness, s = t.follower.damping, o = t.follower.restDelta, i = t.follower.restSpeed) : (n = t.stiffness, s = t.damping), this.follower = new L({
|
|
91
91
|
stiffness: n,
|
|
92
92
|
damping: s,
|
|
93
93
|
restDelta: o ?? this.restDelta,
|
|
@@ -98,15 +98,15 @@ class Vt {
|
|
|
98
98
|
const i = t._leader ?? {
|
|
99
99
|
position: t.position,
|
|
100
100
|
velocity: t.velocity
|
|
101
|
-
},
|
|
101
|
+
}, l = this.leader.step(i, n, s), a = this.follower.step(
|
|
102
102
|
t,
|
|
103
|
-
|
|
103
|
+
l.position,
|
|
104
104
|
s
|
|
105
105
|
);
|
|
106
106
|
return {
|
|
107
|
-
position:
|
|
108
|
-
velocity:
|
|
109
|
-
_leader:
|
|
107
|
+
position: a.position,
|
|
108
|
+
velocity: a.velocity,
|
|
109
|
+
_leader: l
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
112
|
isSettled(t, n) {
|
|
@@ -114,46 +114,46 @@ class Vt {
|
|
|
114
114
|
return s._leader ? Math.abs(n - s._leader.position) < this.restDelta && Math.abs(s._leader.velocity) < this.restSpeed && o : o;
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
const
|
|
118
|
-
class
|
|
117
|
+
const Xt = 0.01, Bt = 500, Zt = 10;
|
|
118
|
+
class Wt {
|
|
119
119
|
constructor(t) {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
this.acceleration = t.acceleration, this.resistance = t.resistance, this.resistanceType = t.resistanceType ?? "quadratic", this.min = t.min, this.max = t.max, this.bounceStiffness = t.bounceStiffness ??
|
|
120
|
+
C(this, "acceleration");
|
|
121
|
+
C(this, "resistance");
|
|
122
|
+
C(this, "resistanceType");
|
|
123
|
+
C(this, "min");
|
|
124
|
+
C(this, "max");
|
|
125
|
+
C(this, "bounceStiffness");
|
|
126
|
+
C(this, "bounceDamping");
|
|
127
|
+
C(this, "restDelta");
|
|
128
|
+
this.acceleration = t.acceleration, this.resistance = t.resistance, this.resistanceType = t.resistanceType ?? "quadratic", this.min = t.min, this.max = t.max, this.bounceStiffness = t.bounceStiffness ?? Bt, this.bounceDamping = t.bounceDamping ?? Zt, this.restDelta = t.restDelta ?? Xt;
|
|
129
129
|
}
|
|
130
130
|
step(t, n, s) {
|
|
131
|
-
const o = Math.min(s, 0.033), { acceleration: i, resistance:
|
|
131
|
+
const o = Math.min(s, 0.033), { acceleration: i, resistance: l, resistanceType: a, min: r, max: c } = this, { position: p, velocity: d } = t, f = r !== void 0 && p < r, u = c !== void 0 && p > c;
|
|
132
132
|
let y;
|
|
133
133
|
if (f || u) {
|
|
134
|
-
const b = p - (f ?
|
|
135
|
-
y =
|
|
134
|
+
const b = p - (f ? r : c), P = -this.bounceStiffness * b, _ = -this.bounceDamping * d;
|
|
135
|
+
y = P + _;
|
|
136
136
|
} else {
|
|
137
|
-
const
|
|
137
|
+
const m = n > p ? 1 : -1;
|
|
138
138
|
let b;
|
|
139
|
-
|
|
139
|
+
a === "linear" ? b = l * d : b = l * d * Math.abs(d), y = m * i - b;
|
|
140
140
|
}
|
|
141
141
|
const h = d + y * o;
|
|
142
|
-
let
|
|
142
|
+
let S = p + h * o;
|
|
143
143
|
if (!f && !u) {
|
|
144
|
-
const
|
|
145
|
-
(
|
|
144
|
+
const m = n > p ? 1 : -1;
|
|
145
|
+
(m > 0 && S > n || m < 0 && S < n) && (S = n);
|
|
146
146
|
}
|
|
147
147
|
return {
|
|
148
|
-
position:
|
|
149
|
-
velocity:
|
|
148
|
+
position: S,
|
|
149
|
+
velocity: S === n ? 0 : h
|
|
150
150
|
};
|
|
151
151
|
}
|
|
152
152
|
isSettled(t, n) {
|
|
153
153
|
return Math.abs(n - t.position) < this.restDelta;
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
|
-
class
|
|
156
|
+
class w {
|
|
157
157
|
/**
|
|
158
158
|
* Create an Integrator from physics config
|
|
159
159
|
*
|
|
@@ -167,7 +167,7 @@ class g {
|
|
|
167
167
|
"Cannot use both 'spring' and 'inertia' together. Choose one physics type."
|
|
168
168
|
);
|
|
169
169
|
if (t.inertia)
|
|
170
|
-
return new
|
|
170
|
+
return new Wt({
|
|
171
171
|
acceleration: t.inertia.acceleration,
|
|
172
172
|
resistance: t.inertia.resistance,
|
|
173
173
|
resistanceType: t.inertia.resistanceType,
|
|
@@ -184,7 +184,7 @@ class g {
|
|
|
184
184
|
return typeof s == "number" ? o = s : typeof s == "object" && (o = {
|
|
185
185
|
stiffness: s.stiffness,
|
|
186
186
|
damping: s.damping
|
|
187
|
-
}), new
|
|
187
|
+
}), new Nt({
|
|
188
188
|
stiffness: n.stiffness,
|
|
189
189
|
damping: n.damping,
|
|
190
190
|
follower: o,
|
|
@@ -192,7 +192,7 @@ class g {
|
|
|
192
192
|
restSpeed: n.restSpeed
|
|
193
193
|
});
|
|
194
194
|
}
|
|
195
|
-
return new
|
|
195
|
+
return new L({
|
|
196
196
|
stiffness: n.stiffness,
|
|
197
197
|
damping: n.damping,
|
|
198
198
|
restDelta: n.restDelta,
|
|
@@ -204,32 +204,32 @@ class g {
|
|
|
204
204
|
* @deprecated Use from({ spring: config }) instead
|
|
205
205
|
*/
|
|
206
206
|
static fromSpring(t) {
|
|
207
|
-
return
|
|
207
|
+
return w.from({ spring: t });
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
|
-
class
|
|
210
|
+
class qt {
|
|
211
211
|
constructor(t) {
|
|
212
|
-
|
|
212
|
+
C(this, "durationSec");
|
|
213
213
|
this.durationSec = Math.max(1 / 60, t.durationSec);
|
|
214
214
|
}
|
|
215
215
|
step(t, n, s) {
|
|
216
216
|
const o = n - t.position;
|
|
217
217
|
if (o === 0) return t;
|
|
218
|
-
const i = Math.sign(o),
|
|
219
|
-
return (i > 0 ?
|
|
218
|
+
const i = Math.sign(o), l = Math.abs(o) / this.durationSec, a = i * l * s, r = t.position + a;
|
|
219
|
+
return (i > 0 ? r >= n : r <= n) ? { position: n, velocity: 0 } : { position: r, velocity: i * l };
|
|
220
220
|
}
|
|
221
221
|
isSettled(t, n) {
|
|
222
|
-
return Math.abs(t.position - n) <
|
|
222
|
+
return Math.abs(t.position - n) < J;
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
|
-
function
|
|
225
|
+
function tt(e, t) {
|
|
226
226
|
function n(i) {
|
|
227
|
-
let
|
|
228
|
-
const
|
|
227
|
+
let l = 0, a = 0;
|
|
228
|
+
const r = i.offsetWidth, c = i.offsetHeight;
|
|
229
229
|
let p = i;
|
|
230
230
|
for (; p; )
|
|
231
|
-
|
|
232
|
-
return
|
|
231
|
+
l += p.offsetTop, a += p.offsetLeft, p = p.offsetParent;
|
|
232
|
+
return l -= window.scrollY, a -= window.scrollX, { top: l, left: a, width: r, height: c };
|
|
233
233
|
}
|
|
234
234
|
const s = n(e), o = n(t);
|
|
235
235
|
return new DOMRect(
|
|
@@ -239,7 +239,7 @@ function J(e, t) {
|
|
|
239
239
|
o.height
|
|
240
240
|
);
|
|
241
241
|
}
|
|
242
|
-
function
|
|
242
|
+
function nt(e, t) {
|
|
243
243
|
const n = e.getBoundingClientRect(), s = t.getBoundingClientRect(), o = e.offsetWidth > 0 ? n.width / e.offsetWidth : 1, i = e.offsetHeight > 0 ? n.height / e.offsetHeight : 1;
|
|
244
244
|
return new DOMRect(
|
|
245
245
|
(s.left - n.left) / o,
|
|
@@ -248,8 +248,8 @@ function tt(e, t) {
|
|
|
248
248
|
s.height / i
|
|
249
249
|
);
|
|
250
250
|
}
|
|
251
|
-
function
|
|
252
|
-
const { scrollingElement: n, positionedParent: s } = e, o = n !== s && n.contains(s) ?
|
|
251
|
+
function T(e, t) {
|
|
252
|
+
const { scrollingElement: n, positionedParent: s } = e, o = n !== s && n.contains(s) ? tt(n, s).top : 0;
|
|
253
253
|
return {
|
|
254
254
|
top: e[t].scroll.y,
|
|
255
255
|
left: 0,
|
|
@@ -257,7 +257,7 @@ function I(e, t) {
|
|
|
257
257
|
height: n.clientHeight - o
|
|
258
258
|
};
|
|
259
259
|
}
|
|
260
|
-
const
|
|
260
|
+
const st = 8, ot = {
|
|
261
261
|
spring: {
|
|
262
262
|
stiffness: 1e3,
|
|
263
263
|
damping: 40,
|
|
@@ -266,10 +266,10 @@ const et = 8, nt = {
|
|
|
266
266
|
restSpeed: 0.1
|
|
267
267
|
}
|
|
268
268
|
};
|
|
269
|
-
function
|
|
269
|
+
function Kt({
|
|
270
270
|
direction: e
|
|
271
271
|
}) {
|
|
272
|
-
const t = e === "forward" ?
|
|
272
|
+
const t = e === "forward" ? st : -st;
|
|
273
273
|
return {
|
|
274
274
|
out: {
|
|
275
275
|
willChange: "transform, opacity",
|
|
@@ -291,25 +291,25 @@ function Zt({
|
|
|
291
291
|
}
|
|
292
292
|
};
|
|
293
293
|
}
|
|
294
|
-
function
|
|
294
|
+
function jt() {
|
|
295
295
|
return {
|
|
296
|
-
outPhysics:
|
|
297
|
-
inPhysics:
|
|
296
|
+
outPhysics: ot,
|
|
297
|
+
inPhysics: ot,
|
|
298
298
|
// Both sides run together — the cross-fade is the whole point of the
|
|
299
299
|
// snappy feel. (fluid's sibling uses staggered fade-through.)
|
|
300
300
|
composition: { mode: "parallel", startAt: [0, 0] },
|
|
301
|
-
build:
|
|
301
|
+
build: Kt
|
|
302
302
|
};
|
|
303
303
|
}
|
|
304
|
-
const
|
|
304
|
+
const it = 30, Gt = {
|
|
305
305
|
inertia: { acceleration: 150, resistance: 1.5, restDelta: 0.1 }
|
|
306
|
-
},
|
|
306
|
+
}, Jt = {
|
|
307
307
|
spring: { stiffness: 180, damping: 34, restDelta: 0.1, restSpeed: 0.1 }
|
|
308
308
|
};
|
|
309
|
-
function
|
|
309
|
+
function Qt({
|
|
310
310
|
direction: e
|
|
311
311
|
}) {
|
|
312
|
-
const t = e === "forward" ? 1 : -1, n = -
|
|
312
|
+
const t = e === "forward" ? 1 : -1, n = -it * t, s = it * t;
|
|
313
313
|
return {
|
|
314
314
|
out: {
|
|
315
315
|
willChange: "transform, opacity",
|
|
@@ -332,29 +332,29 @@ function Gt({
|
|
|
332
332
|
}
|
|
333
333
|
};
|
|
334
334
|
}
|
|
335
|
-
function
|
|
335
|
+
function te() {
|
|
336
336
|
return {
|
|
337
|
-
outPhysics:
|
|
338
|
-
inPhysics:
|
|
337
|
+
outPhysics: Gt,
|
|
338
|
+
inPhysics: Jt,
|
|
339
339
|
// Phased motion: outgoing falls away first under inertia, then incoming
|
|
340
340
|
// springs in. The fade-through shape comes from the integrator curves
|
|
341
341
|
// plus the sequence handoff, not from FADE_SPLIT inside animate(t).
|
|
342
342
|
composition: { mode: "sequence" },
|
|
343
|
-
build:
|
|
343
|
+
build: Qt
|
|
344
344
|
};
|
|
345
345
|
}
|
|
346
|
-
const
|
|
347
|
-
snappy:
|
|
348
|
-
fluid:
|
|
349
|
-
},
|
|
346
|
+
const ee = {
|
|
347
|
+
snappy: jt(),
|
|
348
|
+
fluid: te()
|
|
349
|
+
}, rt = 8, ne = {
|
|
350
350
|
inertia: { acceleration: 150, resistance: 1.5, restDelta: 0.1 }
|
|
351
|
-
},
|
|
351
|
+
}, se = {
|
|
352
352
|
spring: { stiffness: 180, damping: 34, restDelta: 0.1, restSpeed: 0.1 }
|
|
353
353
|
};
|
|
354
|
-
function
|
|
354
|
+
function oe({
|
|
355
355
|
direction: e
|
|
356
356
|
}) {
|
|
357
|
-
const t = e === "forward" ? 1 : -1, n = -
|
|
357
|
+
const t = e === "forward" ? 1 : -1, n = -rt * t, s = rt * t;
|
|
358
358
|
return {
|
|
359
359
|
out: {
|
|
360
360
|
willChange: "transform, opacity",
|
|
@@ -377,21 +377,21 @@ function ne({
|
|
|
377
377
|
}
|
|
378
378
|
};
|
|
379
379
|
}
|
|
380
|
-
function
|
|
380
|
+
function ie() {
|
|
381
381
|
return {
|
|
382
|
-
outPhysics:
|
|
383
|
-
inPhysics:
|
|
382
|
+
outPhysics: ne,
|
|
383
|
+
inPhysics: se,
|
|
384
384
|
composition: { mode: "sequence" },
|
|
385
|
-
build:
|
|
385
|
+
build: oe
|
|
386
386
|
};
|
|
387
387
|
}
|
|
388
|
-
const
|
|
388
|
+
const re = 8, ae = {
|
|
389
389
|
inertia: { acceleration: 150, resistance: 1.5, restDelta: 0.1 }
|
|
390
|
-
},
|
|
390
|
+
}, le = {
|
|
391
391
|
spring: { stiffness: 180, damping: 34, restDelta: 0.1, restSpeed: 0.1 }
|
|
392
392
|
};
|
|
393
|
-
function
|
|
394
|
-
const t =
|
|
393
|
+
function ce(e) {
|
|
394
|
+
const t = re;
|
|
395
395
|
return {
|
|
396
396
|
out: {
|
|
397
397
|
willChange: "opacity",
|
|
@@ -413,32 +413,32 @@ function ae(e) {
|
|
|
413
413
|
}
|
|
414
414
|
};
|
|
415
415
|
}
|
|
416
|
-
function
|
|
416
|
+
function pe() {
|
|
417
417
|
return {
|
|
418
|
-
outPhysics:
|
|
419
|
-
inPhysics:
|
|
418
|
+
outPhysics: ae,
|
|
419
|
+
inPhysics: le,
|
|
420
420
|
composition: { mode: "sequence" },
|
|
421
|
-
build:
|
|
421
|
+
build: ce
|
|
422
422
|
};
|
|
423
423
|
}
|
|
424
|
-
const
|
|
425
|
-
snappy:
|
|
426
|
-
directional:
|
|
427
|
-
"non-directional":
|
|
428
|
-
},
|
|
424
|
+
const at = ie(), de = {
|
|
425
|
+
snappy: at,
|
|
426
|
+
directional: at,
|
|
427
|
+
"non-directional": pe()
|
|
428
|
+
}, lt = {
|
|
429
429
|
spring: { stiffness: 280, damping: 30, restDelta: 0.1, restSpeed: 0.1 }
|
|
430
|
-
},
|
|
431
|
-
function
|
|
430
|
+
}, R = 0.1, U = 1 / 3, ct = (e) => Math.max(0, Math.min(1, e));
|
|
431
|
+
function fe({
|
|
432
432
|
direction: e
|
|
433
433
|
}) {
|
|
434
|
-
const t = e === "forward" ? 1 : -1, n = 1 - t *
|
|
434
|
+
const t = e === "forward" ? 1 : -1, n = 1 - t * R;
|
|
435
435
|
return {
|
|
436
436
|
out: {
|
|
437
437
|
willChange: "transform, opacity",
|
|
438
438
|
startStyle: {},
|
|
439
439
|
animate: (s) => ({
|
|
440
|
-
transform: `scale(${1 + t * s *
|
|
441
|
-
opacity: `${
|
|
440
|
+
transform: `scale(${1 + t * s * R})`,
|
|
441
|
+
opacity: `${ct(1 - s / U)}`
|
|
442
442
|
})
|
|
443
443
|
},
|
|
444
444
|
in: {
|
|
@@ -448,130 +448,130 @@ function pe({
|
|
|
448
448
|
opacity: "0"
|
|
449
449
|
},
|
|
450
450
|
animate: (s) => ({
|
|
451
|
-
transform: `scale(${n + t * s *
|
|
452
|
-
opacity: `${
|
|
451
|
+
transform: `scale(${n + t * s * R})`,
|
|
452
|
+
opacity: `${ct((s - U) / (1 - U))}`
|
|
453
453
|
})
|
|
454
454
|
}
|
|
455
455
|
};
|
|
456
456
|
}
|
|
457
|
-
function
|
|
457
|
+
function ye() {
|
|
458
458
|
return {
|
|
459
|
-
outPhysics:
|
|
460
|
-
inPhysics:
|
|
459
|
+
outPhysics: lt,
|
|
460
|
+
inPhysics: lt,
|
|
461
461
|
// Scale must move together on both sides; fade-through is encoded inside
|
|
462
462
|
// each tick (piecewise), not via composition staggering — so parallel.
|
|
463
463
|
composition: { mode: "parallel" },
|
|
464
|
-
build:
|
|
464
|
+
build: fe
|
|
465
465
|
};
|
|
466
466
|
}
|
|
467
|
-
const
|
|
467
|
+
const pt = {
|
|
468
468
|
spring: { stiffness: 280, damping: 30, restDelta: 0.1, restSpeed: 0.1 }
|
|
469
|
-
},
|
|
470
|
-
function
|
|
469
|
+
}, V = 0.1, N = 1 / 3, dt = (e) => Math.max(0, Math.min(1, e));
|
|
470
|
+
function he() {
|
|
471
471
|
return {
|
|
472
472
|
out: {
|
|
473
473
|
willChange: "opacity",
|
|
474
474
|
startStyle: {},
|
|
475
475
|
animate: (e) => ({
|
|
476
|
-
opacity: `${
|
|
476
|
+
opacity: `${dt(1 - e / N)}`
|
|
477
477
|
})
|
|
478
478
|
},
|
|
479
479
|
in: {
|
|
480
480
|
willChange: "transform, opacity",
|
|
481
481
|
startStyle: {
|
|
482
|
-
transform: `scale(${1 -
|
|
482
|
+
transform: `scale(${1 - V})`,
|
|
483
483
|
opacity: "0"
|
|
484
484
|
},
|
|
485
485
|
animate: (e) => ({
|
|
486
|
-
transform: `scale(${1 -
|
|
487
|
-
opacity: `${
|
|
486
|
+
transform: `scale(${1 - V + e * V})`,
|
|
487
|
+
opacity: `${dt((e - N) / (1 - N))}`
|
|
488
488
|
})
|
|
489
489
|
}
|
|
490
490
|
};
|
|
491
491
|
}
|
|
492
|
-
function
|
|
492
|
+
function ue() {
|
|
493
493
|
return {
|
|
494
|
-
outPhysics:
|
|
495
|
-
inPhysics:
|
|
494
|
+
outPhysics: pt,
|
|
495
|
+
inPhysics: pt,
|
|
496
496
|
composition: { mode: "parallel" },
|
|
497
|
-
build:
|
|
497
|
+
build: he
|
|
498
498
|
};
|
|
499
499
|
}
|
|
500
|
-
const
|
|
501
|
-
snappy:
|
|
502
|
-
directional:
|
|
503
|
-
"non-directional":
|
|
504
|
-
},
|
|
505
|
-
x:
|
|
506
|
-
y:
|
|
507
|
-
z:
|
|
500
|
+
const ft = ye(), me = {
|
|
501
|
+
snappy: ft,
|
|
502
|
+
directional: ft,
|
|
503
|
+
"non-directional": ue()
|
|
504
|
+
}, ge = {
|
|
505
|
+
x: ee,
|
|
506
|
+
y: de,
|
|
507
|
+
z: me
|
|
508
508
|
};
|
|
509
|
-
function
|
|
510
|
-
const n =
|
|
509
|
+
function we(e, t) {
|
|
510
|
+
const n = ge[e];
|
|
511
511
|
return n[t] ?? n.snappy;
|
|
512
512
|
}
|
|
513
|
-
const
|
|
514
|
-
function
|
|
513
|
+
const Se = "x", be = "snappy";
|
|
514
|
+
function yt(e, t) {
|
|
515
515
|
e.style.willChange = t.willChange, e.style.backfaceVisibility = "hidden", e.style.contain = "layout paint";
|
|
516
516
|
for (const [n, s] of Object.entries(t.startStyle))
|
|
517
517
|
e.style[n] = s;
|
|
518
518
|
}
|
|
519
|
-
function
|
|
519
|
+
function Tt(e) {
|
|
520
520
|
e.style.willChange = "auto", e.style.backfaceVisibility = "", e.style.contain = "", e.style.transform = "", e.style.opacity = "", e.style.clipPath = "";
|
|
521
521
|
}
|
|
522
|
-
function
|
|
523
|
-
|
|
522
|
+
function $e(e) {
|
|
523
|
+
Tt(e), e.style.pointerEvents = "";
|
|
524
524
|
}
|
|
525
|
-
const
|
|
526
|
-
const t = e.direction ?? "forward", n = e.type ??
|
|
525
|
+
const Ce = (e = {}) => {
|
|
526
|
+
const t = e.direction ?? "forward", n = e.type ?? Se, s = e.feel ?? be, o = we(n, s), i = o.build({ direction: t });
|
|
527
527
|
return {
|
|
528
|
-
prepare: ({ from:
|
|
529
|
-
|
|
530
|
-
}),
|
|
531
|
-
|
|
528
|
+
prepare: ({ from: l, to: a }) => (l.then((r) => {
|
|
529
|
+
yt(r, i.out), r.style.pointerEvents = "none";
|
|
530
|
+
}), a.then((r) => {
|
|
531
|
+
yt(r, i.in);
|
|
532
532
|
}), {}),
|
|
533
|
-
animation: ({ from:
|
|
533
|
+
animation: ({ from: l, to: a, context: r }) => {
|
|
534
534
|
if (n === "z") {
|
|
535
|
-
const d =
|
|
536
|
-
|
|
535
|
+
const d = T(r, "from"), f = T(r, "to");
|
|
536
|
+
l.style.clipPath = `inset(${d.top}px 0 calc(100% - ${d.top + d.height}px) 0)`, a.style.clipPath = `inset(${f.top}px 0 calc(100% - ${f.top + f.height}px) 0)`;
|
|
537
537
|
}
|
|
538
|
-
const
|
|
539
|
-
element:
|
|
540
|
-
integrator:
|
|
538
|
+
const c = new g({
|
|
539
|
+
element: l,
|
|
540
|
+
integrator: w.from(o.outPhysics),
|
|
541
541
|
style: (d) => i.out.animate(d),
|
|
542
542
|
// Restore the reused from node's inline styles on complete. This
|
|
543
543
|
// covers willChange/backfaceVisibility/contain/transform/opacity (from
|
|
544
544
|
// applyStartStyle + the WAAPI final frame), pointerEvents (set in
|
|
545
545
|
// prepare), and clipPath (set above for z; harmless no-op otherwise).
|
|
546
|
-
onComplete: () =>
|
|
547
|
-
}), p = new
|
|
548
|
-
element:
|
|
549
|
-
integrator:
|
|
546
|
+
onComplete: () => $e(l)
|
|
547
|
+
}), p = new g({
|
|
548
|
+
element: a,
|
|
549
|
+
integrator: w.from(o.inPhysics),
|
|
550
550
|
style: (d) => i.in.animate(d),
|
|
551
|
-
onComplete: () =>
|
|
551
|
+
onComplete: () => Tt(a)
|
|
552
552
|
});
|
|
553
|
-
return new
|
|
553
|
+
return new x([c, p], o.composition);
|
|
554
554
|
}
|
|
555
555
|
};
|
|
556
556
|
};
|
|
557
|
-
function
|
|
557
|
+
function xe(e, t, n) {
|
|
558
558
|
return e === "y" ? t === "non-directional" ? "non-directional" : "directional" : e !== "x" || t === "snappy" || n === "snappy" ? "snappy" : "fluid";
|
|
559
559
|
}
|
|
560
|
-
function
|
|
561
|
-
const { paths: t } = e, n = e.type ?? "x", s = e.variant, o = e.feel, i =
|
|
562
|
-
return
|
|
560
|
+
function $s(e) {
|
|
561
|
+
const { paths: t } = e, n = e.type ?? "x", s = e.variant, o = e.feel, i = xe(n, s, o);
|
|
562
|
+
return Q(
|
|
563
563
|
t,
|
|
564
564
|
{ forward: "forward", backward: "backward" },
|
|
565
|
-
(
|
|
565
|
+
(l) => Ce({ type: n, direction: l, feel: i })
|
|
566
566
|
);
|
|
567
567
|
}
|
|
568
|
-
const
|
|
568
|
+
const Ee = {
|
|
569
569
|
spring: { stiffness: 200, damping: 22 }
|
|
570
|
-
},
|
|
571
|
-
function
|
|
570
|
+
}, Pe = 10, _e = "horizontal", Ie = "#000000";
|
|
571
|
+
function ht(e, t, n, s, o, i) {
|
|
572
572
|
window.getComputedStyle(e).position === "static" && (e.style.position = "relative");
|
|
573
|
-
const
|
|
574
|
-
|
|
573
|
+
const a = document.createElement("div");
|
|
574
|
+
a.style.cssText = `
|
|
575
575
|
position: absolute;
|
|
576
576
|
top: 0;
|
|
577
577
|
left: 0;
|
|
@@ -581,14 +581,14 @@ function ft(e, t, n, s, o, i) {
|
|
|
581
581
|
z-index: 9999;
|
|
582
582
|
overflow: hidden;
|
|
583
583
|
`;
|
|
584
|
-
const
|
|
585
|
-
for (let
|
|
584
|
+
const r = [];
|
|
585
|
+
for (let c = 0; c < t; c++) {
|
|
586
586
|
const p = document.createElement("div");
|
|
587
587
|
if (n === "horizontal") {
|
|
588
588
|
const d = 100 / t;
|
|
589
589
|
p.style.cssText = `
|
|
590
590
|
position: absolute;
|
|
591
|
-
top: ${d *
|
|
591
|
+
top: ${d * c}%;
|
|
592
592
|
left: 0;
|
|
593
593
|
width: 100%;
|
|
594
594
|
height: calc(${d}% + 1px);
|
|
@@ -602,7 +602,7 @@ function ft(e, t, n, s, o, i) {
|
|
|
602
602
|
p.style.cssText = `
|
|
603
603
|
position: absolute;
|
|
604
604
|
top: 0;
|
|
605
|
-
left: ${d *
|
|
605
|
+
left: ${d * c}%;
|
|
606
606
|
width: calc(${d}% + 1px);
|
|
607
607
|
height: 100%;
|
|
608
608
|
background: ${s};
|
|
@@ -611,27 +611,27 @@ function ft(e, t, n, s, o, i) {
|
|
|
611
611
|
will-change: transform;
|
|
612
612
|
`;
|
|
613
613
|
}
|
|
614
|
-
|
|
614
|
+
r.push(p), a.appendChild(p);
|
|
615
615
|
}
|
|
616
|
-
return e.appendChild(
|
|
616
|
+
return e.appendChild(a), { container: a, blinds: r };
|
|
617
617
|
}
|
|
618
|
-
const
|
|
619
|
-
const t = e.blindCount ??
|
|
618
|
+
const De = (e = {}) => {
|
|
619
|
+
const t = e.blindCount ?? Pe, n = e.direction ?? _e, s = e.blindColor ?? Ie, o = e.physics ?? Ee;
|
|
620
620
|
return {
|
|
621
|
-
prepare: async ({ from: i, to:
|
|
622
|
-
const
|
|
623
|
-
|
|
624
|
-
const
|
|
625
|
-
|
|
621
|
+
prepare: async ({ from: i, to: l }) => {
|
|
622
|
+
const a = await i, r = await l;
|
|
623
|
+
a.style.zIndex = "1000";
|
|
624
|
+
const c = ht(
|
|
625
|
+
a,
|
|
626
626
|
t,
|
|
627
627
|
n,
|
|
628
628
|
s,
|
|
629
629
|
"hidden",
|
|
630
630
|
"left"
|
|
631
631
|
);
|
|
632
|
-
|
|
633
|
-
const p =
|
|
634
|
-
|
|
632
|
+
r.style.position = "relative", r.style.zIndex = "0";
|
|
633
|
+
const p = ht(
|
|
634
|
+
r,
|
|
635
635
|
t,
|
|
636
636
|
n,
|
|
637
637
|
s,
|
|
@@ -639,55 +639,55 @@ const _e = (e = {}) => {
|
|
|
639
639
|
"right"
|
|
640
640
|
);
|
|
641
641
|
return {
|
|
642
|
-
fromEl:
|
|
643
|
-
fromBlinds:
|
|
644
|
-
fromContainer:
|
|
642
|
+
fromEl: a,
|
|
643
|
+
fromBlinds: c.blinds,
|
|
644
|
+
fromContainer: c.container,
|
|
645
645
|
toBlinds: p.blinds,
|
|
646
646
|
toContainer: p.container
|
|
647
647
|
};
|
|
648
648
|
},
|
|
649
649
|
animation: ({
|
|
650
650
|
fromEl: i,
|
|
651
|
-
fromBlinds:
|
|
652
|
-
fromContainer:
|
|
653
|
-
toBlinds:
|
|
654
|
-
toContainer:
|
|
651
|
+
fromBlinds: l,
|
|
652
|
+
fromContainer: a,
|
|
653
|
+
toBlinds: r,
|
|
654
|
+
toContainer: c
|
|
655
655
|
}) => {
|
|
656
|
-
const p =
|
|
657
|
-
(y) => new
|
|
656
|
+
const p = l.map(
|
|
657
|
+
(y) => new g({
|
|
658
658
|
element: y,
|
|
659
|
-
integrator:
|
|
659
|
+
integrator: w.from(o),
|
|
660
660
|
style: (h) => ({
|
|
661
661
|
transform: n === "horizontal" ? `scaleX(${h})` : `scaleY(${h})`
|
|
662
662
|
})
|
|
663
663
|
})
|
|
664
|
-
), d =
|
|
665
|
-
(y, h) => new
|
|
664
|
+
), d = r.map(
|
|
665
|
+
(y, h) => new g({
|
|
666
666
|
element: y,
|
|
667
|
-
integrator:
|
|
668
|
-
style: (
|
|
669
|
-
transform: n === "horizontal" ? `scaleX(${
|
|
667
|
+
integrator: w.from(o),
|
|
668
|
+
style: (S, m) => ({
|
|
669
|
+
transform: n === "horizontal" ? `scaleX(${m})` : `scaleY(${m})`
|
|
670
670
|
}),
|
|
671
|
-
onComplete: h ===
|
|
672
|
-
|
|
671
|
+
onComplete: h === r.length - 1 ? () => {
|
|
672
|
+
c.remove(), a.remove(), i.style.zIndex = "", i.style.position = "";
|
|
673
673
|
} : void 0
|
|
674
674
|
})
|
|
675
|
-
), f = new
|
|
676
|
-
return new
|
|
675
|
+
), f = new x(p, { mode: "parallel" }), u = new x(d, { mode: "parallel" });
|
|
676
|
+
return new x([f, u], { mode: "sequence" });
|
|
677
677
|
}
|
|
678
678
|
};
|
|
679
679
|
};
|
|
680
|
-
function
|
|
680
|
+
function Cs(e) {
|
|
681
681
|
const { paths: t, type: n = "horizontal" } = e;
|
|
682
|
-
return
|
|
682
|
+
return D(
|
|
683
683
|
t,
|
|
684
|
-
() =>
|
|
684
|
+
() => De({ direction: n })
|
|
685
685
|
);
|
|
686
686
|
}
|
|
687
|
-
const
|
|
687
|
+
const ve = {
|
|
688
688
|
spring: { stiffness: 200, damping: 20, doubleSpring: 0.7 }
|
|
689
|
-
},
|
|
690
|
-
function
|
|
689
|
+
}, F = 0.5;
|
|
690
|
+
function Oe(e) {
|
|
691
691
|
const t = e === "enter" ? -100 : 100, n = e === "enter" ? 100 : -100;
|
|
692
692
|
return {
|
|
693
693
|
out: {
|
|
@@ -695,32 +695,32 @@ function ve(e) {
|
|
|
695
695
|
startStyle: {},
|
|
696
696
|
animate: (s) => ({
|
|
697
697
|
transform: `translate3d(${t * s}%, 0, 0)`,
|
|
698
|
-
opacity: `${
|
|
698
|
+
opacity: `${F + (1 - F) * (1 - s)}`
|
|
699
699
|
})
|
|
700
700
|
},
|
|
701
701
|
in: {
|
|
702
702
|
willChange: "transform, opacity",
|
|
703
703
|
startStyle: {
|
|
704
704
|
transform: `translate3d(${n}%, 0, 0)`,
|
|
705
|
-
opacity: `${
|
|
705
|
+
opacity: `${F}`
|
|
706
706
|
},
|
|
707
707
|
animate: (s) => ({
|
|
708
708
|
transform: `translate3d(${n * (1 - s)}%, 0, 0)`,
|
|
709
|
-
opacity: `${
|
|
709
|
+
opacity: `${F + (1 - F) * s}`
|
|
710
710
|
})
|
|
711
711
|
}
|
|
712
712
|
};
|
|
713
713
|
}
|
|
714
|
-
function
|
|
714
|
+
function Te() {
|
|
715
715
|
return {
|
|
716
|
-
physics:
|
|
717
|
-
build:
|
|
716
|
+
physics: ve,
|
|
717
|
+
build: Oe
|
|
718
718
|
};
|
|
719
719
|
}
|
|
720
|
-
const
|
|
720
|
+
const Ae = {
|
|
721
721
|
spring: { stiffness: 170, damping: 22 }
|
|
722
722
|
};
|
|
723
|
-
function
|
|
723
|
+
function Fe(e) {
|
|
724
724
|
const t = e === "enter" ? -20 : 100, n = e === "enter" ? 100 : -20;
|
|
725
725
|
return {
|
|
726
726
|
out: {
|
|
@@ -741,166 +741,172 @@ function Oe(e) {
|
|
|
741
741
|
}
|
|
742
742
|
};
|
|
743
743
|
}
|
|
744
|
-
function
|
|
744
|
+
function ke() {
|
|
745
745
|
return {
|
|
746
|
-
physics:
|
|
747
|
-
build:
|
|
746
|
+
physics: Ae,
|
|
747
|
+
build: Fe
|
|
748
748
|
};
|
|
749
749
|
}
|
|
750
|
-
const
|
|
751
|
-
parallax:
|
|
752
|
-
crossfade:
|
|
753
|
-
},
|
|
754
|
-
function
|
|
750
|
+
const Ye = {
|
|
751
|
+
parallax: ke(),
|
|
752
|
+
crossfade: Te()
|
|
753
|
+
}, v = "0", Le = "1", O = "2", He = "parallax";
|
|
754
|
+
function ut(e, t) {
|
|
755
755
|
e.style.willChange = t.willChange, e.style.backfaceVisibility = "hidden", e.style.contain = "layout paint";
|
|
756
756
|
for (const [n, s] of Object.entries(t.startStyle))
|
|
757
757
|
e.style[n] = s;
|
|
758
758
|
}
|
|
759
|
-
const
|
|
760
|
-
const t = e.direction ?? "enter", n =
|
|
759
|
+
const Me = (e = {}) => {
|
|
760
|
+
const t = e.direction ?? "enter", n = Ye[e.type ?? He], s = n.physics, o = n.build(t), i = t === "enter" ? v : O, l = t === "enter" ? O : v;
|
|
761
761
|
return {
|
|
762
|
-
prepare: ({ from:
|
|
763
|
-
|
|
764
|
-
}), r.then((
|
|
765
|
-
|
|
762
|
+
prepare: ({ from: a, to: r }) => (a.then((c) => {
|
|
763
|
+
ut(c, o.out), c.style.pointerEvents = "none", c.style.zIndex = i;
|
|
764
|
+
}), r.then((c) => {
|
|
765
|
+
ut(c, o.in), c.style.position = "relative", c.style.zIndex = l;
|
|
766
766
|
}), {}),
|
|
767
|
-
animation: ({ from:
|
|
768
|
-
const
|
|
769
|
-
element:
|
|
770
|
-
integrator:
|
|
771
|
-
style: (
|
|
767
|
+
animation: ({ from: a, to: r }) => {
|
|
768
|
+
const c = new g({
|
|
769
|
+
element: a,
|
|
770
|
+
integrator: w.from(s),
|
|
771
|
+
style: (d) => o.out.animate(d),
|
|
772
772
|
// The outgoing node is the real, reused element (re-hidden on navigate),
|
|
773
773
|
// so clear every inline style we set on it — mirroring the `to` cleanup,
|
|
774
774
|
// plus the out-only `pointerEvents` / `zIndex`.
|
|
775
775
|
onComplete: () => {
|
|
776
|
-
|
|
776
|
+
a.style.willChange = "auto", a.style.backfaceVisibility = "", a.style.contain = "", a.style.transform = "", a.style.opacity = "", a.style.pointerEvents = "", a.style.zIndex = "";
|
|
777
777
|
}
|
|
778
|
-
}),
|
|
778
|
+
}), p = new g({
|
|
779
779
|
element: r,
|
|
780
|
-
integrator:
|
|
781
|
-
style: (
|
|
780
|
+
integrator: w.from(s),
|
|
781
|
+
style: (d) => o.in.animate(d),
|
|
782
782
|
onComplete: () => {
|
|
783
|
-
r.style.willChange = "auto", r.style.backfaceVisibility = "", r.style.contain = "", r.style.transform = "", r.style.opacity = "";
|
|
783
|
+
r.style.willChange = "auto", r.style.backfaceVisibility = "", r.style.contain = "", r.style.transform = "", r.style.opacity = "", r.style.position === "relative" && (r.style.position = ""), r.style.zIndex === l && (r.style.zIndex = "");
|
|
784
784
|
}
|
|
785
785
|
});
|
|
786
|
-
|
|
786
|
+
for (const d of [c, p]) {
|
|
787
|
+
const f = d.onComplete;
|
|
788
|
+
d.onComplete = () => {
|
|
789
|
+
f == null || f(), d.releaseFill();
|
|
790
|
+
};
|
|
791
|
+
}
|
|
792
|
+
return new x([c, p], { mode: "parallel" });
|
|
787
793
|
}
|
|
788
794
|
};
|
|
789
795
|
};
|
|
790
|
-
function
|
|
796
|
+
function ze(e) {
|
|
791
797
|
return e === "slide" || e === "crossfade" ? "crossfade" : "parallax";
|
|
792
798
|
}
|
|
793
|
-
function
|
|
794
|
-
const { enter: t, exit: n } = e, s = e.type, o =
|
|
795
|
-
return
|
|
799
|
+
function xs(e) {
|
|
800
|
+
const { enter: t, exit: n } = e, s = e.type, o = ze(s);
|
|
801
|
+
return Ot(
|
|
796
802
|
{ enter: t, exit: n },
|
|
797
|
-
(i) =>
|
|
803
|
+
(i) => Me({ direction: i, type: o })
|
|
798
804
|
);
|
|
799
805
|
}
|
|
800
|
-
const
|
|
806
|
+
const Re = {
|
|
801
807
|
spring: { stiffness: 180, damping: 20, doubleSpring: !0 }
|
|
802
|
-
},
|
|
808
|
+
}, Ue = {
|
|
803
809
|
spring: { stiffness: 170, damping: 20, doubleSpring: !0 }
|
|
804
|
-
},
|
|
805
|
-
const t = e.physics ??
|
|
810
|
+
}, Ve = (e = {}) => {
|
|
811
|
+
const t = e.physics ?? Ue, n = e.physics ?? Re;
|
|
806
812
|
return {
|
|
807
813
|
prepare: ({ to: s }) => (s.then((o) => {
|
|
808
814
|
o.style.opacity = "0", o.style.willChange = "opacity";
|
|
809
815
|
}), {}),
|
|
810
816
|
animation: ({ from: s, to: o }) => {
|
|
811
|
-
const i = new
|
|
817
|
+
const i = new g({
|
|
812
818
|
element: s,
|
|
813
|
-
integrator:
|
|
819
|
+
integrator: w.from(n),
|
|
814
820
|
// Default bounds (0, 1). `u` runs 1→0 as the animation moves
|
|
815
821
|
// forward, mapping opacity from fully visible to invisible.
|
|
816
|
-
style: (
|
|
822
|
+
style: (a, r) => ({ opacity: r }),
|
|
817
823
|
onComplete: () => {
|
|
818
824
|
s.style.willChange = "auto", s.style.opacity = "";
|
|
819
825
|
}
|
|
820
|
-
}),
|
|
826
|
+
}), l = new g({
|
|
821
827
|
element: o,
|
|
822
|
-
integrator:
|
|
823
|
-
style: (
|
|
828
|
+
integrator: w.from(t),
|
|
829
|
+
style: (a) => ({ opacity: a }),
|
|
824
830
|
onComplete: () => {
|
|
825
831
|
o.style.willChange = "auto", o.style.opacity = "";
|
|
826
832
|
}
|
|
827
833
|
});
|
|
828
|
-
return new
|
|
834
|
+
return new x([i, l], { mode: "sequence" });
|
|
829
835
|
}
|
|
830
836
|
};
|
|
831
837
|
};
|
|
832
|
-
function
|
|
838
|
+
function Es(e) {
|
|
833
839
|
const { paths: t } = e;
|
|
834
|
-
return
|
|
840
|
+
return D(t, () => Ve());
|
|
835
841
|
}
|
|
836
|
-
const
|
|
842
|
+
const X = {
|
|
837
843
|
scaleDown: { stiffness: 20, damping: 7 },
|
|
838
844
|
translate: { stiffness: 15, damping: 7 },
|
|
839
845
|
scaleUp: { stiffness: 20, damping: 7 }
|
|
840
|
-
},
|
|
846
|
+
}, A = {
|
|
841
847
|
scaleDown: 0,
|
|
842
848
|
translate: 0.2,
|
|
843
849
|
scaleUp: 0.8
|
|
844
|
-
},
|
|
845
|
-
function
|
|
846
|
-
const { items: t, from: n, to: s, recordFrame: o } = e, i =
|
|
847
|
-
item:
|
|
848
|
-
integrator: new
|
|
849
|
-
stiffness:
|
|
850
|
-
damping:
|
|
850
|
+
}, Ne = 0.8, Xe = "white", mt = 1e3 / 60, Be = 600;
|
|
851
|
+
function Ze(e) {
|
|
852
|
+
const { items: t, from: n, to: s, recordFrame: o } = e, i = mt / 1e3, l = Math.abs(s - n), a = t.map((c) => ({
|
|
853
|
+
item: c,
|
|
854
|
+
integrator: new L({
|
|
855
|
+
stiffness: c.spring.stiffness,
|
|
856
|
+
damping: c.spring.damping
|
|
851
857
|
}),
|
|
852
858
|
state: { position: n, velocity: 0 },
|
|
853
859
|
started: !1,
|
|
854
860
|
settled: !1,
|
|
855
861
|
settleTime: 0
|
|
856
862
|
}));
|
|
857
|
-
for (let
|
|
858
|
-
(
|
|
863
|
+
for (let c = 0; c < a.length; c++)
|
|
864
|
+
(c === 0 || a[c].item.offset === 0) && (a[c].started = !0);
|
|
859
865
|
o(0);
|
|
860
|
-
let
|
|
861
|
-
for (let
|
|
862
|
-
const p =
|
|
863
|
-
|
|
864
|
-
for (const d of
|
|
865
|
-
!d.started || d.settled || (d.state = d.integrator.step(d.state, s, i), d.integrator.isSettled(d.state, s) ? (d.settleTime += i, d.settleTime >=
|
|
866
|
-
for (let d = 1; d <
|
|
867
|
-
const f =
|
|
866
|
+
let r = 0;
|
|
867
|
+
for (let c = 1; c <= Be; c++) {
|
|
868
|
+
const p = c * mt;
|
|
869
|
+
r = p;
|
|
870
|
+
for (const d of a)
|
|
871
|
+
!d.started || d.settled || (d.state = d.integrator.step(d.state, s, i), d.integrator.isSettled(d.state, s) ? (d.settleTime += i, d.settleTime >= Vt && (d.state = { position: s, velocity: 0 }, d.settled = !0)) : d.settleTime = 0, d.item.tick(d.state.position));
|
|
872
|
+
for (let d = 1; d < a.length; d++) {
|
|
873
|
+
const f = a[d];
|
|
868
874
|
if (f.started) continue;
|
|
869
|
-
const u =
|
|
875
|
+
const u = a[d - 1];
|
|
870
876
|
if (!u.started) continue;
|
|
871
|
-
(
|
|
877
|
+
(l === 0 ? 1 : Math.abs(u.state.position - n) / l) >= f.item.offset && (f.started = !0);
|
|
872
878
|
}
|
|
873
|
-
if (o(p),
|
|
879
|
+
if (o(p), a.every((d) => d.settled)) return p;
|
|
874
880
|
}
|
|
875
|
-
return
|
|
881
|
+
return r;
|
|
876
882
|
}
|
|
877
|
-
function
|
|
883
|
+
function B(e, t) {
|
|
878
884
|
return e != null && e.spring ? {
|
|
879
885
|
stiffness: e.spring.stiffness,
|
|
880
886
|
damping: e.spring.damping
|
|
881
887
|
} : t;
|
|
882
888
|
}
|
|
883
|
-
function
|
|
884
|
-
const { rect: t, scale: n, direction: s, override: o } = e, i = s === "out" ? { scale: 1, translateY: -t.top } : { scale: n, translateY: -t.top + t.height },
|
|
889
|
+
function gt(e) {
|
|
890
|
+
const { rect: t, scale: n, direction: s, override: o } = e, i = s === "out" ? { scale: 1, translateY: -t.top } : { scale: n, translateY: -t.top + t.height }, l = B(o, X.scaleDown), a = B(o, X.translate), r = B(o, X.scaleUp), c = s === "out" ? 1 : 0, p = s === "out" ? 0 : 1, d = s === "out" ? [
|
|
885
891
|
{
|
|
886
|
-
spring:
|
|
887
|
-
offset:
|
|
892
|
+
spring: l,
|
|
893
|
+
offset: A.scaleDown,
|
|
888
894
|
tick: (y) => {
|
|
889
895
|
const h = 1 - y;
|
|
890
896
|
i.scale = 1 - (1 - n) * h;
|
|
891
897
|
}
|
|
892
898
|
},
|
|
893
899
|
{
|
|
894
|
-
spring:
|
|
895
|
-
offset:
|
|
900
|
+
spring: a,
|
|
901
|
+
offset: A.translate,
|
|
896
902
|
tick: (y) => {
|
|
897
903
|
const h = 1 - y;
|
|
898
904
|
i.translateY = -t.top - t.height * h;
|
|
899
905
|
}
|
|
900
906
|
},
|
|
901
907
|
{
|
|
902
|
-
spring:
|
|
903
|
-
offset:
|
|
908
|
+
spring: r,
|
|
909
|
+
offset: A.scaleUp,
|
|
904
910
|
tick: (y) => {
|
|
905
911
|
const h = 1 - y;
|
|
906
912
|
i.scale = n + (1 - n) * h;
|
|
@@ -908,29 +914,29 @@ function ut(e) {
|
|
|
908
914
|
}
|
|
909
915
|
] : [
|
|
910
916
|
{
|
|
911
|
-
spring:
|
|
912
|
-
offset:
|
|
917
|
+
spring: l,
|
|
918
|
+
offset: A.scaleDown,
|
|
913
919
|
tick: (y) => {
|
|
914
920
|
i.scale = 1 - (1 - n) * y;
|
|
915
921
|
}
|
|
916
922
|
},
|
|
917
923
|
{
|
|
918
|
-
spring:
|
|
919
|
-
offset:
|
|
924
|
+
spring: a,
|
|
925
|
+
offset: A.translate,
|
|
920
926
|
tick: (y) => {
|
|
921
927
|
i.translateY = -t.top + t.height * (1 - y);
|
|
922
928
|
}
|
|
923
929
|
},
|
|
924
930
|
{
|
|
925
|
-
spring:
|
|
926
|
-
offset:
|
|
931
|
+
spring: r,
|
|
932
|
+
offset: A.scaleUp,
|
|
927
933
|
tick: (y) => {
|
|
928
934
|
i.scale = n + (1 - n) * y;
|
|
929
935
|
}
|
|
930
936
|
}
|
|
931
|
-
], f = [], u =
|
|
937
|
+
], f = [], u = Ze({
|
|
932
938
|
items: d,
|
|
933
|
-
from:
|
|
939
|
+
from: c,
|
|
934
940
|
to: p,
|
|
935
941
|
recordFrame: (y) => f.push({
|
|
936
942
|
time: y,
|
|
@@ -940,29 +946,29 @@ function ut(e) {
|
|
|
940
946
|
});
|
|
941
947
|
return { snapshots: f, totalDuration: u };
|
|
942
948
|
}
|
|
943
|
-
function
|
|
949
|
+
function We(e, t) {
|
|
944
950
|
if (e.length === 0) return { time: 0, scale: 1, translateY: 0 };
|
|
945
951
|
if (e.length === 1 || t <= 0) return e[0];
|
|
946
952
|
if (t >= 1) return e[e.length - 1];
|
|
947
953
|
const n = t * (e.length - 1), s = Math.floor(n), o = Math.ceil(n);
|
|
948
954
|
if (s === o) return e[s];
|
|
949
|
-
const i = e[s],
|
|
955
|
+
const i = e[s], l = e[o], a = n - s;
|
|
950
956
|
return {
|
|
951
|
-
time: i.time + (
|
|
952
|
-
scale: i.scale + (
|
|
953
|
-
translateY: i.translateY + (
|
|
957
|
+
time: i.time + (l.time - i.time) * a,
|
|
958
|
+
scale: i.scale + (l.scale - i.scale) * a,
|
|
959
|
+
translateY: i.translateY + (l.translateY - i.translateY) * a
|
|
954
960
|
};
|
|
955
961
|
}
|
|
956
|
-
const
|
|
962
|
+
const qe = [
|
|
957
963
|
[1, 1],
|
|
958
964
|
[-1, 1],
|
|
959
965
|
[1, -1],
|
|
960
966
|
[-1, -1]
|
|
961
967
|
];
|
|
962
|
-
function
|
|
963
|
-
const o = (i,
|
|
964
|
-
const
|
|
965
|
-
Object.assign(
|
|
968
|
+
function Ke(e, t) {
|
|
969
|
+
const o = (i, l, a) => {
|
|
970
|
+
const r = document.createElement("div");
|
|
971
|
+
Object.assign(r.style, {
|
|
966
972
|
position: "fixed",
|
|
967
973
|
pointerEvents: "none",
|
|
968
974
|
zIndex: "9999",
|
|
@@ -970,14 +976,14 @@ function We(e, t) {
|
|
|
970
976
|
height: "15px",
|
|
971
977
|
...i
|
|
972
978
|
});
|
|
973
|
-
const
|
|
974
|
-
Object.assign(
|
|
979
|
+
const c = document.createElement("div");
|
|
980
|
+
Object.assign(c.style, {
|
|
975
981
|
position: "absolute",
|
|
976
982
|
width: "15px",
|
|
977
983
|
height: "1px",
|
|
978
984
|
backgroundColor: e,
|
|
979
|
-
[
|
|
980
|
-
[
|
|
985
|
+
[a]: "0",
|
|
986
|
+
[l]: "0"
|
|
981
987
|
});
|
|
982
988
|
const p = document.createElement("div");
|
|
983
989
|
return Object.assign(p.style, {
|
|
@@ -985,9 +991,9 @@ function We(e, t) {
|
|
|
985
991
|
width: "1px",
|
|
986
992
|
height: "15px",
|
|
987
993
|
backgroundColor: e,
|
|
988
|
-
[
|
|
989
|
-
[
|
|
990
|
-
}),
|
|
994
|
+
[a]: "0",
|
|
995
|
+
[l]: "0"
|
|
996
|
+
}), r.appendChild(c), r.appendChild(p), r;
|
|
991
997
|
};
|
|
992
998
|
return {
|
|
993
999
|
topLeft: o(
|
|
@@ -1024,11 +1030,11 @@ function We(e, t) {
|
|
|
1024
1030
|
)
|
|
1025
1031
|
};
|
|
1026
1032
|
}
|
|
1027
|
-
function
|
|
1033
|
+
function wt(e, t) {
|
|
1028
1034
|
const n = t.left + t.width / 2, s = t.top + t.height / 2;
|
|
1029
1035
|
e.style.transformOrigin = `${n}px ${s}px`;
|
|
1030
1036
|
}
|
|
1031
|
-
function
|
|
1037
|
+
function St(e, t) {
|
|
1032
1038
|
e.style.clipPath = `polygon(
|
|
1033
1039
|
${t.left}px ${t.top}px,
|
|
1034
1040
|
${t.left + t.width}px ${t.top}px,
|
|
@@ -1036,24 +1042,24 @@ function gt(e, t) {
|
|
|
1036
1042
|
${t.left}px ${t.top + t.height}px
|
|
1037
1043
|
)`;
|
|
1038
1044
|
}
|
|
1039
|
-
function
|
|
1045
|
+
function Z(e, t, n, s, o) {
|
|
1040
1046
|
const i = n / 1e3;
|
|
1041
|
-
return new
|
|
1047
|
+
return new g({
|
|
1042
1048
|
element: e,
|
|
1043
|
-
integrator: new
|
|
1049
|
+
integrator: new qt({ durationSec: i }),
|
|
1044
1050
|
lowerBound: 0,
|
|
1045
1051
|
upperBound: 1,
|
|
1046
|
-
style: (
|
|
1052
|
+
style: (l) => s(We(t, l)),
|
|
1047
1053
|
onComplete: o
|
|
1048
1054
|
});
|
|
1049
1055
|
}
|
|
1050
|
-
const
|
|
1056
|
+
const je = (e = {}) => {
|
|
1051
1057
|
var o;
|
|
1052
|
-
const t = ((o = e.border) == null ? void 0 : o.color) ??
|
|
1058
|
+
const t = ((o = e.border) == null ? void 0 : o.color) ?? Xe, n = Ne, s = e.physics;
|
|
1053
1059
|
return {
|
|
1054
|
-
prepare: ({ from: i, to:
|
|
1055
|
-
const
|
|
1056
|
-
...
|
|
1060
|
+
prepare: ({ from: i, to: l, context: a }) => {
|
|
1061
|
+
const r = T(a, "from"), c = T(a, "to"), p = tt(document.body, a.positionedParent), d = Ke(t, {
|
|
1062
|
+
...r,
|
|
1057
1063
|
top: p.top
|
|
1058
1064
|
});
|
|
1059
1065
|
for (const f of [
|
|
@@ -1062,25 +1068,25 @@ const Ze = (e = {}) => {
|
|
|
1062
1068
|
"bottomLeft",
|
|
1063
1069
|
"bottomRight"
|
|
1064
1070
|
])
|
|
1065
|
-
|
|
1071
|
+
a.positionedParent.appendChild(d[f]);
|
|
1066
1072
|
return i.then((f) => {
|
|
1067
|
-
|
|
1068
|
-
}),
|
|
1069
|
-
|
|
1070
|
-
}), { borders: d, fromRect:
|
|
1073
|
+
wt(f, r), St(f, r), f.style.transform = `translateY(${-r.top}px)`;
|
|
1074
|
+
}), l.then((f) => {
|
|
1075
|
+
wt(f, c), St(f, c), f.style.transform = `translateY(${-c.top + c.height}px) scale(${n})`;
|
|
1076
|
+
}), { borders: d, fromRect: r, toRect: c };
|
|
1071
1077
|
},
|
|
1072
|
-
animation: ({ from: i, to:
|
|
1073
|
-
const d =
|
|
1074
|
-
rect:
|
|
1078
|
+
animation: ({ from: i, to: l, context: a, borders: r, fromRect: c, toRect: p }) => {
|
|
1079
|
+
const d = gt({
|
|
1080
|
+
rect: c,
|
|
1075
1081
|
scale: n,
|
|
1076
1082
|
direction: "out",
|
|
1077
1083
|
override: s
|
|
1078
|
-
}), f =
|
|
1084
|
+
}), f = gt({
|
|
1079
1085
|
rect: p,
|
|
1080
1086
|
scale: n,
|
|
1081
1087
|
direction: "in",
|
|
1082
1088
|
override: s
|
|
1083
|
-
}), u =
|
|
1089
|
+
}), u = Z(
|
|
1084
1090
|
i,
|
|
1085
1091
|
d.snapshots,
|
|
1086
1092
|
d.totalDuration,
|
|
@@ -1090,54 +1096,54 @@ const Ze = (e = {}) => {
|
|
|
1090
1096
|
() => {
|
|
1091
1097
|
i.style.clipPath = "", i.style.transformOrigin = "", i.style.transform = "";
|
|
1092
1098
|
}
|
|
1093
|
-
), y =
|
|
1094
|
-
|
|
1099
|
+
), y = Z(
|
|
1100
|
+
l,
|
|
1095
1101
|
f.snapshots,
|
|
1096
1102
|
f.totalDuration,
|
|
1097
1103
|
(b) => ({
|
|
1098
1104
|
transform: `translateY(${b.translateY}px) scale(${b.scale})`
|
|
1099
1105
|
}),
|
|
1100
1106
|
() => {
|
|
1101
|
-
|
|
1107
|
+
l.style.clipPath = "", l.style.transformOrigin = "", l.style.transform = "";
|
|
1102
1108
|
}
|
|
1103
|
-
), h =
|
|
1104
|
-
const
|
|
1105
|
-
return
|
|
1106
|
-
|
|
1109
|
+
), h = qe.map(([b, P], _) => {
|
|
1110
|
+
const I = ["topLeft", "topRight", "bottomLeft", "bottomRight"][_];
|
|
1111
|
+
return Z(
|
|
1112
|
+
r[I],
|
|
1107
1113
|
d.snapshots,
|
|
1108
1114
|
d.totalDuration,
|
|
1109
|
-
(
|
|
1110
|
-
const
|
|
1111
|
-
return { transform: `translate(${
|
|
1115
|
+
($) => {
|
|
1116
|
+
const E = (c.width - c.width * $.scale) / 2 * 0.7 * b, z = (c.height - c.height * $.scale) / 2 * 0.7 * P;
|
|
1117
|
+
return { transform: `translate(${E}px, ${z}px)` };
|
|
1112
1118
|
}
|
|
1113
1119
|
);
|
|
1114
|
-
}),
|
|
1120
|
+
}), S = new x([u, y, ...h], {
|
|
1115
1121
|
mode: "parallel"
|
|
1116
|
-
}),
|
|
1117
|
-
return
|
|
1118
|
-
|
|
1119
|
-
const b =
|
|
1120
|
-
for (const
|
|
1122
|
+
}), m = S.onComplete;
|
|
1123
|
+
return S.onComplete = () => {
|
|
1124
|
+
m == null || m();
|
|
1125
|
+
const b = a.positionedParent;
|
|
1126
|
+
for (const P of [
|
|
1121
1127
|
"topLeft",
|
|
1122
1128
|
"topRight",
|
|
1123
1129
|
"bottomLeft",
|
|
1124
1130
|
"bottomRight"
|
|
1125
1131
|
]) {
|
|
1126
|
-
const
|
|
1127
|
-
|
|
1132
|
+
const _ = r[P];
|
|
1133
|
+
_.parentElement === b && b.removeChild(_);
|
|
1128
1134
|
}
|
|
1129
|
-
},
|
|
1135
|
+
}, S;
|
|
1130
1136
|
}
|
|
1131
1137
|
};
|
|
1132
1138
|
};
|
|
1133
|
-
function
|
|
1139
|
+
function Ps(e) {
|
|
1134
1140
|
const { paths: t, options: n } = e, s = (n == null ? void 0 : n.borderColor) !== void 0 ? { border: { color: n.borderColor } } : void 0;
|
|
1135
|
-
return
|
|
1141
|
+
return D(t, () => je(s));
|
|
1136
1142
|
}
|
|
1137
|
-
const
|
|
1138
|
-
class
|
|
1143
|
+
const bt = "data-hero-enter-key", $t = "data-hero-exit-key", W = "data-hero-key";
|
|
1144
|
+
class Ge {
|
|
1139
1145
|
constructor() {
|
|
1140
|
-
|
|
1146
|
+
C(this, "previousFromOpacity", "");
|
|
1141
1147
|
}
|
|
1142
1148
|
prepare(t) {
|
|
1143
1149
|
t.from.then((n) => {
|
|
@@ -1150,38 +1156,38 @@ class qe {
|
|
|
1150
1156
|
}), [];
|
|
1151
1157
|
}
|
|
1152
1158
|
}
|
|
1153
|
-
const
|
|
1154
|
-
class
|
|
1159
|
+
const Je = () => new Ge();
|
|
1160
|
+
class Qe {
|
|
1155
1161
|
contribute(t) {
|
|
1156
|
-
const { from: n, to: s, physics: o, onComplete: i } = t,
|
|
1162
|
+
const { from: n, to: s, physics: o, onComplete: i } = t, l = n.style.opacity, a = s.style.opacity, r = n.style.willChange, c = s.style.willChange;
|
|
1157
1163
|
return s.style.opacity = "0", n.style.willChange = "opacity", s.style.willChange = "opacity", i(() => {
|
|
1158
|
-
n.style.opacity =
|
|
1164
|
+
n.style.opacity = l, s.style.opacity = a, n.style.willChange = r, s.style.willChange = c;
|
|
1159
1165
|
}), [
|
|
1160
|
-
new
|
|
1166
|
+
new g({
|
|
1161
1167
|
element: n,
|
|
1162
|
-
integrator:
|
|
1168
|
+
integrator: w.from(o),
|
|
1163
1169
|
style: (p, d) => ({ opacity: d })
|
|
1164
1170
|
}),
|
|
1165
|
-
new
|
|
1171
|
+
new g({
|
|
1166
1172
|
element: s,
|
|
1167
|
-
integrator:
|
|
1173
|
+
integrator: w.from(o),
|
|
1168
1174
|
style: (p) => ({ opacity: p })
|
|
1169
1175
|
})
|
|
1170
1176
|
];
|
|
1171
1177
|
}
|
|
1172
1178
|
}
|
|
1173
|
-
const
|
|
1174
|
-
static:
|
|
1175
|
-
fade:
|
|
1176
|
-
},
|
|
1179
|
+
const tn = () => new Qe(), en = {
|
|
1180
|
+
static: Je,
|
|
1181
|
+
fade: tn
|
|
1182
|
+
}, nn = {
|
|
1177
1183
|
spring: { stiffness: 320, damping: 30 }
|
|
1178
|
-
},
|
|
1184
|
+
}, sn = () => nn, on = {
|
|
1179
1185
|
spring: { stiffness: 300, damping: 30, doubleSpring: 1 }
|
|
1180
|
-
},
|
|
1181
|
-
default:
|
|
1182
|
-
smooth:
|
|
1183
|
-
},
|
|
1184
|
-
function
|
|
1186
|
+
}, rn = () => on, an = {
|
|
1187
|
+
default: sn,
|
|
1188
|
+
smooth: rn
|
|
1189
|
+
}, ln = 700, cn = "data-hero-aspect-ratio", pn = "data-hero-radius";
|
|
1190
|
+
function dn(e) {
|
|
1185
1191
|
if (!e) return null;
|
|
1186
1192
|
if (e.includes("/")) {
|
|
1187
1193
|
const [n, s] = e.split("/"), o = parseFloat(n ?? ""), i = parseFloat(s ?? "");
|
|
@@ -1190,19 +1196,19 @@ function ln(e) {
|
|
|
1190
1196
|
const t = parseFloat(e);
|
|
1191
1197
|
return Number.isFinite(t) && t > 0 ? t : null;
|
|
1192
1198
|
}
|
|
1193
|
-
function
|
|
1194
|
-
const t = e.getAttribute(
|
|
1199
|
+
function Ct(e) {
|
|
1200
|
+
const t = e.getAttribute(pn);
|
|
1195
1201
|
if (!t) return 0;
|
|
1196
1202
|
const n = parseFloat(t);
|
|
1197
1203
|
return Number.isFinite(n) && n > 0 ? n : 0;
|
|
1198
1204
|
}
|
|
1199
|
-
function
|
|
1205
|
+
function H(e) {
|
|
1200
1206
|
return e.left + e.width / 2;
|
|
1201
1207
|
}
|
|
1202
|
-
function
|
|
1208
|
+
function M(e) {
|
|
1203
1209
|
return e.top + e.height / 2;
|
|
1204
1210
|
}
|
|
1205
|
-
function
|
|
1211
|
+
function fn(e, t) {
|
|
1206
1212
|
return {
|
|
1207
1213
|
top: Math.max(0, t.top - e.top),
|
|
1208
1214
|
right: Math.max(0, e.left + e.width - (t.left + t.width)),
|
|
@@ -1210,7 +1216,7 @@ function cn(e, t) {
|
|
|
1210
1216
|
left: Math.max(0, t.left - e.left)
|
|
1211
1217
|
};
|
|
1212
1218
|
}
|
|
1213
|
-
function
|
|
1219
|
+
function yn(e, t, n) {
|
|
1214
1220
|
const s = e.width / e.height;
|
|
1215
1221
|
let o, i;
|
|
1216
1222
|
return n === "contain" ? s > t ? (i = e.height, o = i * t) : (o = e.width, i = o / t) : s > t ? (o = e.width, i = o / t) : (i = e.height, o = i * t), {
|
|
@@ -1220,8 +1226,8 @@ function pn(e, t, n) {
|
|
|
1220
1226
|
height: i
|
|
1221
1227
|
};
|
|
1222
1228
|
}
|
|
1223
|
-
function
|
|
1224
|
-
const s =
|
|
1229
|
+
function xt(e, t, n) {
|
|
1230
|
+
const s = tt(e, t), o = dn(t.getAttribute(cn));
|
|
1225
1231
|
if (o === null)
|
|
1226
1232
|
return {
|
|
1227
1233
|
bbox: s,
|
|
@@ -1229,24 +1235,24 @@ function $t(e, t, n) {
|
|
|
1229
1235
|
window: s,
|
|
1230
1236
|
clipInset: { top: 0, right: 0, bottom: 0, left: 0 }
|
|
1231
1237
|
};
|
|
1232
|
-
const i =
|
|
1238
|
+
const i = yn(s, o, n), l = n === "cover" ? s : i;
|
|
1233
1239
|
return {
|
|
1234
1240
|
bbox: s,
|
|
1235
1241
|
content: i,
|
|
1236
|
-
window:
|
|
1237
|
-
clipInset:
|
|
1242
|
+
window: l,
|
|
1243
|
+
clipInset: fn(i, l)
|
|
1238
1244
|
};
|
|
1239
1245
|
}
|
|
1240
|
-
function
|
|
1241
|
-
const o = n.width / s, i = n.height / s,
|
|
1246
|
+
function hn(e, t, n, s) {
|
|
1247
|
+
const o = n.width / s, i = n.height / s, l = e.width / 2 + (H(n) - H(t)) / s - o / 2, a = e.height / 2 + (M(n) - M(t)) / s - i / 2;
|
|
1242
1248
|
return {
|
|
1243
|
-
top: Math.max(0,
|
|
1244
|
-
right: Math.max(0, e.width -
|
|
1245
|
-
bottom: Math.max(0, e.height -
|
|
1246
|
-
left: Math.max(0,
|
|
1249
|
+
top: Math.max(0, a),
|
|
1250
|
+
right: Math.max(0, e.width - l - o),
|
|
1251
|
+
bottom: Math.max(0, e.height - a - i),
|
|
1252
|
+
left: Math.max(0, l)
|
|
1247
1253
|
};
|
|
1248
1254
|
}
|
|
1249
|
-
function
|
|
1255
|
+
function k(e, t) {
|
|
1250
1256
|
const n = /* @__PURE__ */ new Map(), s = e.querySelectorAll(`[${t}]`);
|
|
1251
1257
|
for (const o of Array.from(s)) {
|
|
1252
1258
|
const i = o.getAttribute(t);
|
|
@@ -1254,44 +1260,44 @@ function A(e, t) {
|
|
|
1254
1260
|
}
|
|
1255
1261
|
return n;
|
|
1256
1262
|
}
|
|
1257
|
-
function
|
|
1258
|
-
const n = [], s =
|
|
1259
|
-
for (const [
|
|
1260
|
-
const
|
|
1261
|
-
|
|
1262
|
-
key:
|
|
1263
|
-
fromEl:
|
|
1264
|
-
toEl:
|
|
1263
|
+
function un(e, t) {
|
|
1264
|
+
const n = [], s = k(t, bt), o = k(e, $t);
|
|
1265
|
+
for (const [a, r] of s) {
|
|
1266
|
+
const c = o.get(a);
|
|
1267
|
+
c && n.push({
|
|
1268
|
+
key: a,
|
|
1269
|
+
fromEl: c,
|
|
1270
|
+
toEl: r,
|
|
1265
1271
|
fromFit: "cover",
|
|
1266
1272
|
toFit: "contain"
|
|
1267
1273
|
});
|
|
1268
1274
|
}
|
|
1269
|
-
const i =
|
|
1270
|
-
for (const [
|
|
1271
|
-
const
|
|
1272
|
-
|
|
1273
|
-
key:
|
|
1274
|
-
fromEl:
|
|
1275
|
-
toEl:
|
|
1275
|
+
const i = k(e, bt), l = k(t, $t);
|
|
1276
|
+
for (const [a, r] of i) {
|
|
1277
|
+
const c = l.get(a);
|
|
1278
|
+
c && n.push({
|
|
1279
|
+
key: a,
|
|
1280
|
+
fromEl: r,
|
|
1281
|
+
toEl: c,
|
|
1276
1282
|
fromFit: "contain",
|
|
1277
1283
|
toFit: "cover"
|
|
1278
1284
|
});
|
|
1279
1285
|
}
|
|
1280
1286
|
return n;
|
|
1281
1287
|
}
|
|
1282
|
-
function
|
|
1288
|
+
function mn(e, t) {
|
|
1283
1289
|
const n = [], s = Array.from(
|
|
1284
|
-
t.querySelectorAll(`[${
|
|
1290
|
+
t.querySelectorAll(`[${W}]`)
|
|
1285
1291
|
);
|
|
1286
1292
|
for (const o of s) {
|
|
1287
|
-
const i = o.getAttribute(
|
|
1293
|
+
const i = o.getAttribute(W);
|
|
1288
1294
|
if (!i) continue;
|
|
1289
|
-
const
|
|
1290
|
-
`[${
|
|
1295
|
+
const l = e.querySelector(
|
|
1296
|
+
`[${W}="${i}"]`
|
|
1291
1297
|
);
|
|
1292
|
-
|
|
1298
|
+
l && n.push({
|
|
1293
1299
|
key: i,
|
|
1294
|
-
fromEl:
|
|
1300
|
+
fromEl: l,
|
|
1295
1301
|
toEl: o,
|
|
1296
1302
|
fromFit: "contain",
|
|
1297
1303
|
toFit: "contain"
|
|
@@ -1299,104 +1305,104 @@ function yn(e, t) {
|
|
|
1299
1305
|
}
|
|
1300
1306
|
return n;
|
|
1301
1307
|
}
|
|
1302
|
-
function
|
|
1303
|
-
const n =
|
|
1304
|
-
return n.length > 0 ? n :
|
|
1308
|
+
function gn(e, t) {
|
|
1309
|
+
const n = un(e, t);
|
|
1310
|
+
return n.length > 0 ? n : mn(e, t);
|
|
1305
1311
|
}
|
|
1306
|
-
function
|
|
1307
|
-
const { fromEl: s, toEl: o } = t, i =
|
|
1308
|
-
if (
|
|
1312
|
+
function wn(e, t, n) {
|
|
1313
|
+
const { fromEl: s, toEl: o } = t, i = xt(e, s, t.fromFit), l = xt(e, o, t.toFit), a = i.content, r = i.window, c = l.content, p = l.window, d = l.clipInset, f = Ct(s), u = Ct(o);
|
|
1314
|
+
if (a.width === 0 || a.height === 0 || r.width === 0 || r.height === 0 || c.width === 0 || c.height === 0 || p.width === 0 || p.height === 0)
|
|
1309
1315
|
return null;
|
|
1310
1316
|
const y = Math.max(
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
), h =
|
|
1314
|
-
if (Math.abs(
|
|
1315
|
-
const
|
|
1316
|
-
a,
|
|
1317
|
-
l,
|
|
1317
|
+
a.width / c.width,
|
|
1318
|
+
a.height / c.height
|
|
1319
|
+
), h = H(a), S = M(a), m = H(c), b = M(c), P = h - m, _ = S - b;
|
|
1320
|
+
if (Math.abs(_) > n) return null;
|
|
1321
|
+
const I = hn(
|
|
1318
1322
|
c,
|
|
1323
|
+
a,
|
|
1324
|
+
r,
|
|
1319
1325
|
y
|
|
1320
1326
|
);
|
|
1321
1327
|
return {
|
|
1322
|
-
toContent:
|
|
1328
|
+
toContent: c,
|
|
1323
1329
|
hasRadius: f > 0 || u > 0,
|
|
1324
|
-
styleFor: (
|
|
1325
|
-
const
|
|
1330
|
+
styleFor: ($, E) => {
|
|
1331
|
+
const z = E * P, kt = E * _, et = $ + E * y, Yt = (f * E + u * $) / et, Lt = I.top * E + d.top * $, Ht = I.right * E + d.right * $, Mt = I.bottom * E + d.bottom * $, zt = I.left * E + d.left * $;
|
|
1326
1332
|
return {
|
|
1327
|
-
transform: `translate(${
|
|
1328
|
-
clipPath: `inset(${
|
|
1333
|
+
transform: `translate(${z}px, ${kt}px) scale(${et})`,
|
|
1334
|
+
clipPath: `inset(${Lt}px ${Ht}px ${Mt}px ${zt}px round ${Yt}px)`
|
|
1329
1335
|
};
|
|
1330
1336
|
}
|
|
1331
1337
|
};
|
|
1332
1338
|
}
|
|
1333
|
-
function
|
|
1339
|
+
function Sn(e, t) {
|
|
1334
1340
|
e.style.transform = t.transform, e.style.clipPath = t.clipPath;
|
|
1335
1341
|
}
|
|
1336
|
-
class
|
|
1342
|
+
class bn {
|
|
1337
1343
|
contribute(t) {
|
|
1338
|
-
const { resolved: n, physics: s, positionedParent: o, maxDistance: i, onComplete:
|
|
1339
|
-
for (const
|
|
1340
|
-
const { fromEl:
|
|
1344
|
+
const { resolved: n, physics: s, positionedParent: o, maxDistance: i, onComplete: l } = t, a = [];
|
|
1345
|
+
for (const r of n.pairs) {
|
|
1346
|
+
const { fromEl: c, toEl: p } = r, d = wn(o, r, i);
|
|
1341
1347
|
if (!d) continue;
|
|
1342
1348
|
const f = p.cloneNode(!0);
|
|
1343
|
-
f.style.position = "absolute", f.style.left = `${d.toContent.left}px`, f.style.top = `${d.toContent.top}px`, f.style.width = `${d.toContent.width}px`, f.style.height = `${d.toContent.height}px`, f.style.margin = "0", f.style.transformOrigin = "center center", f.style.zIndex = "1000", f.style.willChange = "transform, clip-path", f.style.pointerEvents = "none", f.style.maxWidth = "none", f.style.maxHeight = "none", d.hasRadius && (f.style.borderRadius = "0"),
|
|
1344
|
-
const u =
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
}),
|
|
1348
|
-
new
|
|
1349
|
+
f.style.position = "absolute", f.style.left = `${d.toContent.left}px`, f.style.top = `${d.toContent.top}px`, f.style.width = `${d.toContent.width}px`, f.style.height = `${d.toContent.height}px`, f.style.margin = "0", f.style.transformOrigin = "center center", f.style.zIndex = "1000", f.style.willChange = "transform, clip-path", f.style.pointerEvents = "none", f.style.maxWidth = "none", f.style.maxHeight = "none", d.hasRadius && (f.style.borderRadius = "0"), Sn(f, d.styleFor(0, 1)), o.appendChild(f);
|
|
1350
|
+
const u = c.style.opacity, y = p.style.opacity;
|
|
1351
|
+
c.style.opacity = "0", p.style.opacity = "0", l(() => {
|
|
1352
|
+
c.style.opacity = u, p.style.opacity = y, f.parentElement && f.parentElement.removeChild(f);
|
|
1353
|
+
}), a.push(
|
|
1354
|
+
new g({
|
|
1349
1355
|
element: f,
|
|
1350
|
-
integrator:
|
|
1356
|
+
integrator: w.from(s),
|
|
1351
1357
|
style: d.styleFor
|
|
1352
1358
|
})
|
|
1353
1359
|
);
|
|
1354
1360
|
}
|
|
1355
|
-
return
|
|
1361
|
+
return a;
|
|
1356
1362
|
}
|
|
1357
1363
|
}
|
|
1358
|
-
function
|
|
1359
|
-
return [new
|
|
1364
|
+
function $n(e) {
|
|
1365
|
+
return [new bn(), en[e.type]()];
|
|
1360
1366
|
}
|
|
1361
|
-
const
|
|
1362
|
-
const t =
|
|
1367
|
+
const Cn = (e) => {
|
|
1368
|
+
const t = $n(e), n = an[e.variant](), s = ln;
|
|
1363
1369
|
return {
|
|
1364
1370
|
prepare: (o) => {
|
|
1365
|
-
var
|
|
1371
|
+
var a;
|
|
1366
1372
|
const i = Promise.all([
|
|
1367
1373
|
o.from,
|
|
1368
1374
|
o.to
|
|
1369
|
-
]).then(([
|
|
1375
|
+
]).then(([r, c]) => ({ pairs: gn(r, c) })), l = {
|
|
1370
1376
|
from: o.from,
|
|
1371
1377
|
to: o.to,
|
|
1372
1378
|
resolved: i
|
|
1373
1379
|
};
|
|
1374
|
-
for (const
|
|
1375
|
-
(
|
|
1376
|
-
return i.then((
|
|
1380
|
+
for (const r of t)
|
|
1381
|
+
(a = r.prepare) == null || a.call(r, l);
|
|
1382
|
+
return i.then((r) => ({ resolved: r }));
|
|
1377
1383
|
},
|
|
1378
|
-
animation: ({ from: o, to: i, context:
|
|
1379
|
-
if (
|
|
1380
|
-
return new
|
|
1381
|
-
const
|
|
1382
|
-
|
|
1384
|
+
animation: ({ from: o, to: i, context: l, resolved: a }) => {
|
|
1385
|
+
if (a.pairs.length === 0)
|
|
1386
|
+
return new x([], { mode: "parallel" });
|
|
1387
|
+
const r = [], c = (y) => {
|
|
1388
|
+
r.push(y);
|
|
1383
1389
|
}, p = {
|
|
1384
1390
|
from: o,
|
|
1385
1391
|
to: i,
|
|
1386
|
-
resolved:
|
|
1392
|
+
resolved: a,
|
|
1387
1393
|
physics: n,
|
|
1388
|
-
positionedParent:
|
|
1394
|
+
positionedParent: l.positionedParent,
|
|
1389
1395
|
maxDistance: s,
|
|
1390
|
-
onComplete:
|
|
1396
|
+
onComplete: c
|
|
1391
1397
|
}, d = [];
|
|
1392
1398
|
for (const y of t)
|
|
1393
1399
|
y.contribute && d.push(...y.contribute(p));
|
|
1394
1400
|
if (d.length === 0)
|
|
1395
|
-
return new
|
|
1396
|
-
const f = new
|
|
1401
|
+
return new x([], { mode: "parallel" });
|
|
1402
|
+
const f = new x(d, { mode: "parallel" }), u = f.onComplete;
|
|
1397
1403
|
return f.onComplete = () => {
|
|
1398
1404
|
u == null || u();
|
|
1399
|
-
for (const y of
|
|
1405
|
+
for (const y of r)
|
|
1400
1406
|
try {
|
|
1401
1407
|
y();
|
|
1402
1408
|
} catch (h) {
|
|
@@ -1406,33 +1412,33 @@ const Sn = (e) => {
|
|
|
1406
1412
|
}
|
|
1407
1413
|
};
|
|
1408
1414
|
};
|
|
1409
|
-
function
|
|
1415
|
+
function _s(e) {
|
|
1410
1416
|
const { paths: t } = e, n = e.type ?? "static", s = e.variant ?? "default";
|
|
1411
|
-
return
|
|
1417
|
+
return D(
|
|
1412
1418
|
t,
|
|
1413
|
-
() =>
|
|
1419
|
+
() => Cn({ type: n, variant: s })
|
|
1414
1420
|
);
|
|
1415
1421
|
}
|
|
1416
|
-
const
|
|
1422
|
+
const xn = {
|
|
1417
1423
|
spring: { stiffness: 50, damping: 30 }
|
|
1418
|
-
},
|
|
1424
|
+
}, En = {
|
|
1419
1425
|
spring: { stiffness: 80, damping: 25 }
|
|
1420
|
-
},
|
|
1421
|
-
const t = e.physics ??
|
|
1426
|
+
}, Pn = (e = {}) => {
|
|
1427
|
+
const t = e.physics ?? xn, n = e.initialRotation ?? 45, s = e.initialScale ?? 0.01, o = e.rotationTriggerPoint ?? 0.8;
|
|
1422
1428
|
return {
|
|
1423
|
-
prepare: ({ from: i, to:
|
|
1424
|
-
|
|
1425
|
-
}),
|
|
1426
|
-
const
|
|
1427
|
-
|
|
1428
|
-
const d =
|
|
1429
|
-
|
|
1429
|
+
prepare: ({ from: i, to: l, context: a }) => (i.then((r) => {
|
|
1430
|
+
r.style.opacity = "1";
|
|
1431
|
+
}), l.then((r) => {
|
|
1432
|
+
const c = T(a, "to"), p = Math.min(c.width, c.height) * 0.4;
|
|
1433
|
+
r.style.setProperty("--max-border-radius", `${p}px`), r.style.setProperty("--border-radius-scale", "1"), r.style.willChange = "transform", r.style.backfaceVisibility = "hidden";
|
|
1434
|
+
const d = c.left + c.width / 2, f = c.top + c.height / 2;
|
|
1435
|
+
r.style.transformOrigin = `${d}px ${f}px`, r.style.position = "fixed", r.style.top = `${c.top}px`, r.style.left = `${c.left}px`, r.style.width = `${c.width}px`, r.style.height = `${c.height}px`, r.style.zIndex = "1000", r.style.overflow = "hidden", r.style.transform = `rotate(${n}deg) scale(${s}) translateZ(0)`, r.style.borderRadius = "calc(var(--max-border-radius) * var(--border-radius-scale))", r.style.opacity = "1";
|
|
1430
1436
|
}), {}),
|
|
1431
|
-
animation: ({ from: i, to:
|
|
1432
|
-
const
|
|
1437
|
+
animation: ({ from: i, to: l }) => {
|
|
1438
|
+
const a = new g({
|
|
1433
1439
|
element: i,
|
|
1434
|
-
integrator:
|
|
1435
|
-
style: (
|
|
1440
|
+
integrator: w.from(En),
|
|
1441
|
+
style: (c, p) => ({ opacity: p }),
|
|
1436
1442
|
// The outgoing node is reused (re-hidden, shown again on the next
|
|
1437
1443
|
// navigation), so reset every inline style we wrote to it — mirroring
|
|
1438
1444
|
// the "to" cleanup below. prepare sets opacity and the out style fades
|
|
@@ -1440,33 +1446,33 @@ const bn = {
|
|
|
1440
1446
|
onComplete: () => {
|
|
1441
1447
|
i.style.opacity = "";
|
|
1442
1448
|
}
|
|
1443
|
-
}),
|
|
1444
|
-
element:
|
|
1445
|
-
integrator:
|
|
1446
|
-
style: (
|
|
1449
|
+
}), r = new g({
|
|
1450
|
+
element: l,
|
|
1451
|
+
integrator: w.from(t),
|
|
1452
|
+
style: (c) => {
|
|
1447
1453
|
let p;
|
|
1448
|
-
if (
|
|
1454
|
+
if (c <= 0.05)
|
|
1449
1455
|
p = s;
|
|
1450
|
-
else if (
|
|
1451
|
-
const y = (
|
|
1456
|
+
else if (c <= o) {
|
|
1457
|
+
const y = (c - 0.05) / (o - 0.05), h = Math.pow(y, 9);
|
|
1452
1458
|
p = s + (0.8 - s) * h;
|
|
1453
1459
|
} else {
|
|
1454
|
-
const y = (
|
|
1460
|
+
const y = (c - o) / (1 - o);
|
|
1455
1461
|
p = 0.8 + 0.2 * (1 - Math.pow(1 - y, 3));
|
|
1456
1462
|
}
|
|
1457
1463
|
const d = 0.7;
|
|
1458
1464
|
let f;
|
|
1459
|
-
if (
|
|
1465
|
+
if (c <= d)
|
|
1460
1466
|
f = n;
|
|
1461
1467
|
else {
|
|
1462
|
-
const y = (
|
|
1468
|
+
const y = (c - d) / (1 - d), h = 1 - Math.pow(1 - y, 2);
|
|
1463
1469
|
f = n * (1 - h);
|
|
1464
1470
|
}
|
|
1465
1471
|
let u;
|
|
1466
|
-
if (
|
|
1472
|
+
if (c <= d)
|
|
1467
1473
|
u = 1;
|
|
1468
1474
|
else {
|
|
1469
|
-
const y = (
|
|
1475
|
+
const y = (c - d) / (1 - d);
|
|
1470
1476
|
u = 1 - Math.pow(y, 0.5);
|
|
1471
1477
|
}
|
|
1472
1478
|
return {
|
|
@@ -1475,21 +1481,21 @@ const bn = {
|
|
|
1475
1481
|
};
|
|
1476
1482
|
},
|
|
1477
1483
|
onComplete: () => {
|
|
1478
|
-
|
|
1484
|
+
l.style.willChange = "", l.style.backfaceVisibility = "", l.style.removeProperty("--max-border-radius"), l.style.removeProperty("--border-radius-scale"), l.style.transform = "", l.style.transformOrigin = "", l.style.position = "", l.style.zIndex = "", l.style.top = "", l.style.left = "", l.style.width = "", l.style.height = "", l.style.overflow = "", l.style.borderRadius = "";
|
|
1479
1485
|
}
|
|
1480
1486
|
});
|
|
1481
|
-
return new
|
|
1487
|
+
return new x([a, r], { mode: "parallel" });
|
|
1482
1488
|
}
|
|
1483
1489
|
};
|
|
1484
1490
|
};
|
|
1485
|
-
function
|
|
1491
|
+
function Is(e) {
|
|
1486
1492
|
const { paths: t } = e;
|
|
1487
|
-
return
|
|
1493
|
+
return D(t, () => Pn());
|
|
1488
1494
|
}
|
|
1489
|
-
const
|
|
1495
|
+
const _n = {
|
|
1490
1496
|
spring: { stiffness: 100, damping: 30 }
|
|
1491
|
-
},
|
|
1492
|
-
const t = e.physics ??
|
|
1497
|
+
}, In = (e = {}) => {
|
|
1498
|
+
const t = e.physics ?? _n;
|
|
1493
1499
|
return {
|
|
1494
1500
|
prepare: ({ from: n, to: s }) => (n.then((o) => {
|
|
1495
1501
|
o.style.transformOrigin = "center center", o.style.willChange = "transform, opacity";
|
|
@@ -1497,12 +1503,12 @@ const En = {
|
|
|
1497
1503
|
o.style.opacity = "0", o.style.transform = "rotate(-180deg)", o.style.transformOrigin = "center center", o.style.willChange = "transform, opacity";
|
|
1498
1504
|
}), {}),
|
|
1499
1505
|
animation: ({ from: n, to: s }) => {
|
|
1500
|
-
const o = new
|
|
1506
|
+
const o = new g({
|
|
1501
1507
|
element: n,
|
|
1502
|
-
integrator:
|
|
1503
|
-
style: (
|
|
1504
|
-
transform: `rotate(${
|
|
1505
|
-
opacity:
|
|
1508
|
+
integrator: w.from(t),
|
|
1509
|
+
style: (l) => ({
|
|
1510
|
+
transform: `rotate(${l * 180}deg)`,
|
|
1511
|
+
opacity: l < 0.5 ? 1 : 0
|
|
1506
1512
|
}),
|
|
1507
1513
|
// The outgoing node is reused (re-hidden, shown again on the next
|
|
1508
1514
|
// navigation), so clear every inline style we wrote to `from`
|
|
@@ -1510,27 +1516,27 @@ const En = {
|
|
|
1510
1516
|
onComplete: () => {
|
|
1511
1517
|
n.style.willChange = "auto", n.style.transform = "", n.style.transformOrigin = "", n.style.opacity = "";
|
|
1512
1518
|
}
|
|
1513
|
-
}), i = new
|
|
1519
|
+
}), i = new g({
|
|
1514
1520
|
element: s,
|
|
1515
|
-
integrator:
|
|
1521
|
+
integrator: w.from(t),
|
|
1516
1522
|
// u runs 1→0, so -u*180 unwinds -180→0.
|
|
1517
|
-
style: (
|
|
1518
|
-
transform: `rotate(${-
|
|
1519
|
-
opacity:
|
|
1523
|
+
style: (l, a) => ({
|
|
1524
|
+
transform: `rotate(${-a * 180}deg)`,
|
|
1525
|
+
opacity: l > 0.5 ? 1 : 0
|
|
1520
1526
|
}),
|
|
1521
1527
|
onComplete: () => {
|
|
1522
1528
|
s.style.willChange = "auto", s.style.transform = "", s.style.transformOrigin = "", s.style.opacity = "";
|
|
1523
1529
|
}
|
|
1524
1530
|
});
|
|
1525
|
-
return new
|
|
1531
|
+
return new x([o, i], { mode: "parallel" });
|
|
1526
1532
|
}
|
|
1527
1533
|
};
|
|
1528
1534
|
};
|
|
1529
|
-
function
|
|
1535
|
+
function Ds(e) {
|
|
1530
1536
|
const { paths: t } = e;
|
|
1531
|
-
return
|
|
1537
|
+
return D(t, () => In());
|
|
1532
1538
|
}
|
|
1533
|
-
const
|
|
1539
|
+
const Dn = {
|
|
1534
1540
|
spring: {
|
|
1535
1541
|
stiffness: 20,
|
|
1536
1542
|
damping: 8,
|
|
@@ -1538,81 +1544,87 @@ const Pn = {
|
|
|
1538
1544
|
restDelta: 1e-3,
|
|
1539
1545
|
restSpeed: 1e-3
|
|
1540
1546
|
}
|
|
1541
|
-
},
|
|
1542
|
-
const t = e.direction ?? "up", n = e.physics ??
|
|
1547
|
+
}, Et = (e = {}) => {
|
|
1548
|
+
const t = e.direction ?? "up", n = e.physics ?? Dn, s = t === "up", o = s ? v : O, i = s ? O : v;
|
|
1543
1549
|
return {
|
|
1544
|
-
prepare: ({ from:
|
|
1545
|
-
r.style.zIndex =
|
|
1546
|
-
}),
|
|
1547
|
-
r.style.willChange = "transform", r.style.backfaceVisibility = "hidden", r.style.contain = "layout paint";
|
|
1550
|
+
prepare: ({ from: l, to: a }) => (l.then((r) => {
|
|
1551
|
+
r.style.zIndex = o, r.style.willChange = "transform", r.style.backfaceVisibility = "hidden", r.style.contain = "layout paint", r.style.pointerEvents = "none";
|
|
1552
|
+
}), a.then((r) => {
|
|
1553
|
+
r.style.willChange = "transform", r.style.backfaceVisibility = "hidden", r.style.contain = "layout paint", r.style.position = "relative", r.style.zIndex = i;
|
|
1548
1554
|
}), {}),
|
|
1549
|
-
animation: ({ from:
|
|
1550
|
-
const r =
|
|
1551
|
-
element:
|
|
1552
|
-
integrator:
|
|
1553
|
-
style: (
|
|
1555
|
+
animation: ({ from: l, to: a }) => {
|
|
1556
|
+
const r = l.offsetHeight, c = a.offsetHeight, p = window.innerHeight, d = Math.max(Math.min(r, c), p), f = new g({
|
|
1557
|
+
element: l,
|
|
1558
|
+
integrator: w.from(n),
|
|
1559
|
+
style: (y) => ({ transform: `translate3d(0, ${s ? -d * y : d * y}px, 0)` }),
|
|
1554
1560
|
// The outgoing node is the real, reused element (re-hidden then shown
|
|
1555
1561
|
// again on the next navigation), so mirror the incoming cleanup and
|
|
1556
1562
|
// also reset the out-only props applied in prepare (zIndex,
|
|
1557
1563
|
// pointerEvents) — otherwise the leftover inline styles corrupt the
|
|
1558
1564
|
// page the next time it appears.
|
|
1559
1565
|
onComplete: () => {
|
|
1560
|
-
|
|
1566
|
+
l.style.willChange = "auto", l.style.backfaceVisibility = "", l.style.contain = "", l.style.transform = "", l.style.pointerEvents = "", l.style.zIndex = "";
|
|
1561
1567
|
}
|
|
1562
|
-
}),
|
|
1563
|
-
element:
|
|
1564
|
-
integrator:
|
|
1565
|
-
style: (
|
|
1568
|
+
}), u = new g({
|
|
1569
|
+
element: a,
|
|
1570
|
+
integrator: w.from(n),
|
|
1571
|
+
style: (y, h) => ({ transform: `translate3d(0, ${s ? h * d : h * -d}px, 0)` }),
|
|
1566
1572
|
onComplete: () => {
|
|
1567
|
-
|
|
1573
|
+
a.style.willChange = "auto", a.style.backfaceVisibility = "", a.style.contain = "", a.style.transform = "", a.style.position === "relative" && (a.style.position = ""), a.style.zIndex === i && (a.style.zIndex = "");
|
|
1568
1574
|
}
|
|
1569
1575
|
});
|
|
1570
|
-
|
|
1576
|
+
for (const y of [f, u]) {
|
|
1577
|
+
const h = y.onComplete;
|
|
1578
|
+
y.onComplete = () => {
|
|
1579
|
+
h == null || h(), y.releaseFill();
|
|
1580
|
+
};
|
|
1581
|
+
}
|
|
1582
|
+
return new x([f, u], { mode: "parallel" });
|
|
1571
1583
|
}
|
|
1572
1584
|
};
|
|
1573
1585
|
};
|
|
1574
|
-
function
|
|
1586
|
+
function vs(e) {
|
|
1575
1587
|
const { paths: t, type: n = "directional" } = e;
|
|
1576
|
-
return n === "non-directional" ?
|
|
1588
|
+
return n === "non-directional" ? D(
|
|
1577
1589
|
t,
|
|
1578
|
-
() =>
|
|
1579
|
-
) :
|
|
1590
|
+
() => Et({ direction: "up" })
|
|
1591
|
+
) : Q(
|
|
1580
1592
|
t,
|
|
1581
1593
|
{ forward: "up", backward: "down" },
|
|
1582
|
-
(s) =>
|
|
1594
|
+
(s) => Et({ direction: s })
|
|
1583
1595
|
);
|
|
1584
1596
|
}
|
|
1585
|
-
const
|
|
1597
|
+
const vn = {
|
|
1586
1598
|
spring: { stiffness: 200, damping: 24 }
|
|
1587
|
-
},
|
|
1599
|
+
}, On = {
|
|
1588
1600
|
inertia: { acceleration: 25, resistance: 1.2 }
|
|
1589
|
-
},
|
|
1590
|
-
function
|
|
1601
|
+
}, q = 0.2;
|
|
1602
|
+
function Tn() {
|
|
1591
1603
|
return {
|
|
1592
|
-
enterPhysics:
|
|
1593
|
-
exitPhysics:
|
|
1604
|
+
enterPhysics: vn,
|
|
1605
|
+
exitPhysics: On,
|
|
1594
1606
|
background: {
|
|
1595
1607
|
willChange: "transform, opacity",
|
|
1596
1608
|
enterStyle: (e, t) => ({
|
|
1597
|
-
transform: `scale(${1 -
|
|
1609
|
+
transform: `scale(${1 - q * e})`,
|
|
1598
1610
|
opacity: t
|
|
1599
1611
|
}),
|
|
1600
1612
|
exitStyle: (e) => ({
|
|
1601
|
-
transform: `scale(${1 -
|
|
1613
|
+
transform: `scale(${1 - q + q * e})`,
|
|
1602
1614
|
opacity: e
|
|
1603
1615
|
})
|
|
1604
1616
|
}
|
|
1605
1617
|
};
|
|
1606
1618
|
}
|
|
1607
|
-
const
|
|
1619
|
+
const An = {
|
|
1608
1620
|
spring: { stiffness: 300, damping: 30 }
|
|
1609
|
-
},
|
|
1621
|
+
}, Fn = {
|
|
1610
1622
|
inertia: { acceleration: 30, resistance: 1 }
|
|
1611
1623
|
};
|
|
1612
|
-
function
|
|
1624
|
+
function kn() {
|
|
1613
1625
|
return {
|
|
1614
|
-
enterPhysics:
|
|
1615
|
-
exitPhysics:
|
|
1626
|
+
enterPhysics: An,
|
|
1627
|
+
exitPhysics: Fn,
|
|
1616
1628
|
background: {
|
|
1617
1629
|
willChange: "",
|
|
1618
1630
|
enterStyle: () => ({}),
|
|
@@ -1620,137 +1632,142 @@ function On() {
|
|
|
1620
1632
|
}
|
|
1621
1633
|
};
|
|
1622
1634
|
}
|
|
1623
|
-
const
|
|
1624
|
-
static:
|
|
1625
|
-
"background-scale":
|
|
1626
|
-
},
|
|
1627
|
-
const t = e.direction ?? "enter", n =
|
|
1635
|
+
const Yn = {
|
|
1636
|
+
static: kn(),
|
|
1637
|
+
"background-scale": Tn()
|
|
1638
|
+
}, Ln = "static", Hn = "transform", Mn = (e = {}) => {
|
|
1639
|
+
const t = e.direction ?? "enter", n = Yn[e.type ?? Ln], s = t === "enter" ? n.enterPhysics : n.exitPhysics, o = n.background, i = o.willChange !== "";
|
|
1628
1640
|
return {
|
|
1629
|
-
prepare: ({ from:
|
|
1630
|
-
const
|
|
1631
|
-
return
|
|
1632
|
-
p.style.willChange =
|
|
1633
|
-
}),
|
|
1634
|
-
i && (p.style.willChange = o.willChange, p.style.backfaceVisibility = "hidden", p.style.contain = "layout paint"), t === "enter"
|
|
1641
|
+
prepare: ({ from: l, to: a }) => {
|
|
1642
|
+
const r = t === "enter" ? a : l, c = t === "enter" ? l : a;
|
|
1643
|
+
return r.then((p) => {
|
|
1644
|
+
p.style.willChange = Hn, p.style.backfaceVisibility = "hidden", p.style.contain = "layout paint", p.style.zIndex = O, t === "enter" ? p.style.position = "relative" : p.style.pointerEvents = "none";
|
|
1645
|
+
}), c.then((p) => {
|
|
1646
|
+
i && (p.style.willChange = o.willChange, p.style.backfaceVisibility = "hidden", p.style.contain = "layout paint"), p.style.zIndex = v, t === "enter" ? p.style.pointerEvents = "none" : p.style.position = "relative";
|
|
1635
1647
|
}), {};
|
|
1636
1648
|
},
|
|
1637
|
-
animation: ({ from:
|
|
1638
|
-
const
|
|
1639
|
-
|
|
1649
|
+
animation: ({ from: l, to: a, context: r }) => {
|
|
1650
|
+
const c = t === "enter" ? a : l, p = t === "enter" ? l : a, d = T(
|
|
1651
|
+
r,
|
|
1640
1652
|
t === "enter" ? "to" : "from"
|
|
1641
1653
|
), f = () => {
|
|
1642
|
-
|
|
1654
|
+
l.style.pointerEvents = "", l.style.zIndex = "";
|
|
1655
|
+
}, u = () => {
|
|
1656
|
+
const $ = t === "enter" ? O : v;
|
|
1657
|
+
a.style.position === "relative" && (a.style.position = ""), a.style.zIndex === $ && (a.style.zIndex = "");
|
|
1658
|
+
}, y = ($) => {
|
|
1659
|
+
const E = $.onComplete;
|
|
1660
|
+
$.onComplete = () => {
|
|
1661
|
+
E == null || E(), $.releaseFill();
|
|
1662
|
+
};
|
|
1643
1663
|
};
|
|
1644
|
-
|
|
1645
|
-
const
|
|
1646
|
-
transform: `translate3d(0, ${P * d.height}px, 0)`
|
|
1647
|
-
}) : (E) => ({
|
|
1664
|
+
c.style.clipPath = `inset(${d.top}px 0 calc(100% - ${d.top + d.height}px) 0)`;
|
|
1665
|
+
const h = t === "enter" ? ($, E) => ({
|
|
1648
1666
|
transform: `translate3d(0, ${E * d.height}px, 0)`
|
|
1649
|
-
})
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1667
|
+
}) : ($) => ({
|
|
1668
|
+
transform: `translate3d(0, ${$ * d.height}px, 0)`
|
|
1669
|
+
}), S = new g({
|
|
1670
|
+
element: c,
|
|
1671
|
+
integrator: w.from(s),
|
|
1672
|
+
style: h,
|
|
1653
1673
|
onComplete: () => {
|
|
1654
|
-
|
|
1674
|
+
c.style.willChange = "auto", c.style.backfaceVisibility = "", c.style.contain = "", c.style.clipPath = "", c.style.transform = "", f(), u();
|
|
1655
1675
|
}
|
|
1656
1676
|
});
|
|
1657
|
-
if (!i)
|
|
1658
|
-
return new
|
|
1659
|
-
const
|
|
1660
|
-
|
|
1677
|
+
if (y(S), !i)
|
|
1678
|
+
return new x([S], { mode: "parallel" });
|
|
1679
|
+
const m = T(
|
|
1680
|
+
r,
|
|
1661
1681
|
t === "enter" ? "from" : "to"
|
|
1662
|
-
),
|
|
1663
|
-
p.style.clipPath = `inset(${
|
|
1664
|
-
const
|
|
1682
|
+
), b = m.left + m.width / 2, P = m.top + m.height / 2;
|
|
1683
|
+
p.style.clipPath = `inset(${m.top}px 0 calc(100% - ${m.top + m.height}px) 0)`, p.style.transformOrigin = `${b}px ${P}px`;
|
|
1684
|
+
const _ = t === "enter" ? ($, E) => o.enterStyle($, E) : ($) => o.exitStyle($), I = new g({
|
|
1665
1685
|
element: p,
|
|
1666
|
-
integrator:
|
|
1667
|
-
style:
|
|
1668
|
-
//
|
|
1669
|
-
//
|
|
1670
|
-
// must be
|
|
1671
|
-
//
|
|
1672
|
-
//
|
|
1673
|
-
|
|
1674
|
-
onComplete: t === "exit" ? () => {
|
|
1675
|
-
p.style.willChange = "auto", p.style.backfaceVisibility = "", p.style.contain = "", p.style.clipPath = "", p.style.transformOrigin = "";
|
|
1676
|
-
} : () => {
|
|
1686
|
+
integrator: w.from(s),
|
|
1687
|
+
style: _,
|
|
1688
|
+
// The background is the reused outgoing (`from`) node on `enter` and the
|
|
1689
|
+
// surviving incoming (`to`) node on `exit` — in both cases its inline
|
|
1690
|
+
// styles must be cleared on settle so the reused node is not left
|
|
1691
|
+
// scaled/faded/clipped the next time it is shown. releaseFill below
|
|
1692
|
+
// drops the WAAPI fill so these resets actually take effect.
|
|
1693
|
+
onComplete: () => {
|
|
1677
1694
|
p.style.willChange = "auto", p.style.backfaceVisibility = "", p.style.contain = "", p.style.clipPath = "", p.style.transformOrigin = "", p.style.transform = "", p.style.opacity = "";
|
|
1678
1695
|
}
|
|
1679
1696
|
});
|
|
1680
|
-
return new
|
|
1697
|
+
return y(I), new x([S, I], { mode: "parallel" });
|
|
1681
1698
|
}
|
|
1682
1699
|
};
|
|
1683
1700
|
};
|
|
1684
|
-
function
|
|
1701
|
+
function zn(e) {
|
|
1685
1702
|
return e === "scale" || e === "background-scale" ? "background-scale" : "static";
|
|
1686
1703
|
}
|
|
1687
|
-
function
|
|
1688
|
-
const { enter: t, exit: n } = e, s = e.type, o =
|
|
1689
|
-
return
|
|
1704
|
+
function Os(e) {
|
|
1705
|
+
const { enter: t, exit: n } = e, s = e.type, o = zn(s);
|
|
1706
|
+
return Ot(
|
|
1690
1707
|
{ enter: t, exit: n },
|
|
1691
|
-
(i) =>
|
|
1708
|
+
(i) => Mn({ direction: i, type: o })
|
|
1692
1709
|
);
|
|
1693
1710
|
}
|
|
1694
|
-
const
|
|
1711
|
+
const Rn = {
|
|
1695
1712
|
spring: { stiffness: 170, damping: 22, doubleSpring: 0.8 }
|
|
1696
|
-
},
|
|
1697
|
-
const t = e.direction ?? "left", n = e.physics ??
|
|
1713
|
+
}, Un = (e = {}) => {
|
|
1714
|
+
const t = e.direction ?? "left", n = e.physics ?? Rn, s = t === "left";
|
|
1698
1715
|
return {
|
|
1699
|
-
prepare: ({ from: o, to: i }) => (o.then((
|
|
1700
|
-
|
|
1701
|
-
}), i.then((
|
|
1702
|
-
const
|
|
1703
|
-
|
|
1716
|
+
prepare: ({ from: o, to: i }) => (o.then((l) => {
|
|
1717
|
+
l.style.willChange = "transform", l.style.backfaceVisibility = "hidden", l.style.contain = "layout paint", l.style.pointerEvents = "none";
|
|
1718
|
+
}), i.then((l) => {
|
|
1719
|
+
const a = s ? 100 : -100;
|
|
1720
|
+
l.style.transform = `translate3d(${a}%, 0, 0)`, l.style.willChange = "transform", l.style.backfaceVisibility = "hidden", l.style.contain = "layout paint";
|
|
1704
1721
|
}), {}),
|
|
1705
1722
|
animation: ({ from: o, to: i }) => {
|
|
1706
|
-
const
|
|
1723
|
+
const l = new g({
|
|
1707
1724
|
element: o,
|
|
1708
|
-
integrator:
|
|
1709
|
-
style: (
|
|
1725
|
+
integrator: w.from(n),
|
|
1726
|
+
style: (r) => ({ transform: `translate3d(${s ? -100 * r : 100 * r}%, 0, 0)` }),
|
|
1710
1727
|
// The outgoing node is the real Activity page and gets reused on the
|
|
1711
1728
|
// next navigation, so reset every inline style we wrote to it (mirror
|
|
1712
1729
|
// the incoming cleanup, plus the out-only pointerEvents).
|
|
1713
1730
|
onComplete: () => {
|
|
1714
1731
|
o.style.willChange = "auto", o.style.backfaceVisibility = "", o.style.contain = "", o.style.transform = "", o.style.pointerEvents = "";
|
|
1715
1732
|
}
|
|
1716
|
-
}),
|
|
1733
|
+
}), a = new g({
|
|
1717
1734
|
element: i,
|
|
1718
|
-
integrator:
|
|
1719
|
-
style: (
|
|
1735
|
+
integrator: w.from(n),
|
|
1736
|
+
style: (r, c) => ({ transform: `translate3d(${s ? c * 100 : c * -100}%, 0, 0)` }),
|
|
1720
1737
|
onComplete: () => {
|
|
1721
1738
|
i.style.willChange = "auto", i.style.backfaceVisibility = "", i.style.contain = "", i.style.transform = "";
|
|
1722
1739
|
}
|
|
1723
1740
|
});
|
|
1724
|
-
return new
|
|
1741
|
+
return new x([l, a], { mode: "parallel" });
|
|
1725
1742
|
}
|
|
1726
1743
|
};
|
|
1727
1744
|
};
|
|
1728
|
-
function
|
|
1745
|
+
function Ts(e) {
|
|
1729
1746
|
const { paths: t } = e;
|
|
1730
|
-
return
|
|
1747
|
+
return Q(
|
|
1731
1748
|
t,
|
|
1732
1749
|
{ forward: "left", backward: "right" },
|
|
1733
|
-
(n) =>
|
|
1750
|
+
(n) => Un({ direction: n })
|
|
1734
1751
|
);
|
|
1735
1752
|
}
|
|
1736
|
-
const
|
|
1753
|
+
const Vn = {
|
|
1737
1754
|
spring: { stiffness: 17, damping: 6 }
|
|
1738
|
-
},
|
|
1739
|
-
const t = e.physics ??
|
|
1755
|
+
}, K = 20, Y = 800, Nn = (e = {}) => {
|
|
1756
|
+
const t = e.physics ?? Vn;
|
|
1740
1757
|
return {
|
|
1741
1758
|
prepare: ({ from: n, to: s }) => (n.then((o) => {
|
|
1742
|
-
o.style.willChange = "transform", o.style.backfaceVisibility = "hidden", o.style.contain = "layout paint", o.style.pointerEvents = "none", o.style.transform = `perspective(${
|
|
1759
|
+
o.style.willChange = "transform", o.style.backfaceVisibility = "hidden", o.style.contain = "layout paint", o.style.pointerEvents = "none", o.style.transform = `perspective(${Y}px) rotateY(0deg) translate3d(0%, 0, 0)`;
|
|
1743
1760
|
}), s.then((o) => {
|
|
1744
|
-
o.style.willChange = "transform", o.style.backfaceVisibility = "hidden", o.style.contain = "layout paint", o.style.transform = `perspective(${
|
|
1761
|
+
o.style.willChange = "transform", o.style.backfaceVisibility = "hidden", o.style.contain = "layout paint", o.style.transform = `perspective(${Y}px) rotateY(${K}deg) translate3d(-100%, 0, 0)`;
|
|
1745
1762
|
}), {}),
|
|
1746
1763
|
animation: ({ from: n, to: s }) => {
|
|
1747
|
-
const o = new
|
|
1764
|
+
const o = new g({
|
|
1748
1765
|
element: n,
|
|
1749
|
-
integrator:
|
|
1750
|
-
style: (
|
|
1751
|
-
const
|
|
1766
|
+
integrator: w.from(t),
|
|
1767
|
+
style: (l) => {
|
|
1768
|
+
const a = -l * K, r = l * 100;
|
|
1752
1769
|
return {
|
|
1753
|
-
transform: `perspective(${
|
|
1770
|
+
transform: `perspective(${Y}px) rotateY(${a}deg) translate3d(${r}%, 0, 0)`
|
|
1754
1771
|
};
|
|
1755
1772
|
},
|
|
1756
1773
|
// The outgoing node is reused (Activity/cacheComponents re-hide it),
|
|
@@ -1759,28 +1776,28 @@ const Un = {
|
|
|
1759
1776
|
onComplete: () => {
|
|
1760
1777
|
n.style.transform = "", n.style.willChange = "auto", n.style.backfaceVisibility = "", n.style.contain = "", n.style.pointerEvents = "";
|
|
1761
1778
|
}
|
|
1762
|
-
}), i = new
|
|
1779
|
+
}), i = new g({
|
|
1763
1780
|
element: s,
|
|
1764
|
-
integrator:
|
|
1765
|
-
style: (
|
|
1766
|
-
const
|
|
1781
|
+
integrator: w.from(t),
|
|
1782
|
+
style: (l, a) => {
|
|
1783
|
+
const r = a * K, c = -a * 100;
|
|
1767
1784
|
return {
|
|
1768
|
-
transform: `perspective(${
|
|
1785
|
+
transform: `perspective(${Y}px) rotateY(${r}deg) translate3d(${c}%, 0, 0)`
|
|
1769
1786
|
};
|
|
1770
1787
|
},
|
|
1771
1788
|
onComplete: () => {
|
|
1772
1789
|
s.style.transform = "", s.style.willChange = "auto", s.style.backfaceVisibility = "", s.style.contain = "";
|
|
1773
1790
|
}
|
|
1774
1791
|
});
|
|
1775
|
-
return new
|
|
1792
|
+
return new x([o, i], { mode: "sequence" });
|
|
1776
1793
|
}
|
|
1777
1794
|
};
|
|
1778
1795
|
};
|
|
1779
|
-
function
|
|
1796
|
+
function As(e) {
|
|
1780
1797
|
const { paths: t } = e;
|
|
1781
|
-
return
|
|
1798
|
+
return D(t, () => Nn());
|
|
1782
1799
|
}
|
|
1783
|
-
function
|
|
1800
|
+
function Xn({
|
|
1784
1801
|
enterRect: e,
|
|
1785
1802
|
exitRect: t,
|
|
1786
1803
|
pageRect: n,
|
|
@@ -1788,19 +1805,19 @@ function Vn({
|
|
|
1788
1805
|
enterRadius: o,
|
|
1789
1806
|
exitRadius: i
|
|
1790
1807
|
}) {
|
|
1791
|
-
const
|
|
1808
|
+
const l = t.left - e.left + (t.width - e.width) / 2 - s.x, a = t.top - e.top + (t.height - e.height) / 2 - s.y, r = t.width / e.width, c = t.height / e.height, p = e.top / n.height * 100, d = (n.width - (e.left + e.width)) / n.width * 100, f = (n.height - (e.top + e.height)) / n.height * 100, u = e.left / n.width * 100;
|
|
1792
1809
|
return {
|
|
1793
1810
|
transformOrigin: `${e.left + e.width / 2}px ${e.top + e.height / 2}px`,
|
|
1794
1811
|
animate: (y) => {
|
|
1795
|
-
const h = 1 - y,
|
|
1812
|
+
const h = 1 - y, S = 1 + (r - 1) * h, m = 1 + (c - 1) * h, P = (i * h + o * (1 - h)) / ((S + m) / 2);
|
|
1796
1813
|
return {
|
|
1797
|
-
clipPath: `inset(${p * h}% ${d * h}% ${f * h}% ${u * h}% round ${
|
|
1798
|
-
transform: `translate(${
|
|
1814
|
+
clipPath: `inset(${p * h}% ${d * h}% ${f * h}% ${u * h}% round ${P}px)`,
|
|
1815
|
+
transform: `translate(${l * h}px, ${a * h}px) scale(${S}, ${m})`
|
|
1799
1816
|
};
|
|
1800
1817
|
}
|
|
1801
1818
|
};
|
|
1802
1819
|
}
|
|
1803
|
-
function
|
|
1820
|
+
function Bn({
|
|
1804
1821
|
enterRect: e,
|
|
1805
1822
|
exitRect: t,
|
|
1806
1823
|
pageRect: n,
|
|
@@ -1808,187 +1825,183 @@ function zn({
|
|
|
1808
1825
|
enterRadius: o,
|
|
1809
1826
|
exitRadius: i
|
|
1810
1827
|
}) {
|
|
1811
|
-
const
|
|
1828
|
+
const l = t.left - e.left + (t.width - e.width) / 2 + s.x, a = t.top - e.top + (t.height - e.height) / 2 + s.y, r = t.width / e.width, c = t.height / e.height, p = e.top / n.height * 100, d = (n.width - (e.left + e.width)) / n.width * 100, f = (n.height - (e.top + e.height)) / n.height * 100, u = e.left / n.width * 100;
|
|
1812
1829
|
return {
|
|
1813
1830
|
transformOrigin: `${e.left + e.width / 2}px ${e.top + e.height / 2}px`,
|
|
1814
1831
|
animate: (y) => {
|
|
1815
|
-
const h = 1 - y,
|
|
1832
|
+
const h = 1 - y, S = 1 + (r - 1) * h, m = 1 + (c - 1) * h, P = (o * (1 - h) + i * h) / ((S + m) / 2);
|
|
1816
1833
|
return {
|
|
1817
|
-
clipPath: `inset(${p * h}% ${d * h}% ${f * h}% ${u * h}% round ${
|
|
1818
|
-
transform: `translate(${
|
|
1834
|
+
clipPath: `inset(${p * h}% ${d * h}% ${f * h}% ${u * h}% round ${P}px)`,
|
|
1835
|
+
transform: `translate(${l * h - s.x}px, ${a * h}px) scale(${S}, ${m})`
|
|
1819
1836
|
};
|
|
1820
1837
|
}
|
|
1821
1838
|
};
|
|
1822
1839
|
}
|
|
1823
|
-
const
|
|
1840
|
+
const Zn = {
|
|
1824
1841
|
spring: {
|
|
1825
1842
|
stiffness: 430,
|
|
1826
1843
|
damping: 33,
|
|
1827
1844
|
doubleSpring: 1
|
|
1828
1845
|
}
|
|
1829
|
-
},
|
|
1830
|
-
function
|
|
1846
|
+
}, At = 0.12, Wn = 18;
|
|
1847
|
+
function qn() {
|
|
1831
1848
|
return {
|
|
1832
1849
|
transformOrigin: "50% 50%",
|
|
1833
1850
|
animate: (e) => {
|
|
1834
1851
|
const t = 1 - e;
|
|
1835
1852
|
return {
|
|
1836
|
-
transform: `scale(${1 -
|
|
1853
|
+
transform: `scale(${1 - At * t})`
|
|
1837
1854
|
};
|
|
1838
1855
|
}
|
|
1839
1856
|
};
|
|
1840
1857
|
}
|
|
1841
|
-
function
|
|
1858
|
+
function Kn() {
|
|
1842
1859
|
return {
|
|
1843
1860
|
transformOrigin: "50% 50%",
|
|
1844
1861
|
animate: (e) => {
|
|
1845
1862
|
const t = 1 - e;
|
|
1846
1863
|
return {
|
|
1847
|
-
transform: `scale(${1 -
|
|
1864
|
+
transform: `scale(${1 - At * t})`
|
|
1848
1865
|
};
|
|
1849
1866
|
}
|
|
1850
1867
|
};
|
|
1851
1868
|
}
|
|
1852
|
-
const
|
|
1869
|
+
const j = {
|
|
1853
1870
|
willChange: "backdrop-filter",
|
|
1854
1871
|
initialStyle: {
|
|
1855
1872
|
position: "absolute",
|
|
1856
1873
|
inset: "0",
|
|
1857
1874
|
pointerEvents: "none",
|
|
1858
|
-
// z-index is
|
|
1859
|
-
//
|
|
1860
|
-
//
|
|
1861
|
-
// enter — tile (`to`) is default(0), background (`from`) at -2,
|
|
1862
|
-
// overlay at -1.
|
|
1863
|
-
// exit — tile (`from`) is at +2, background (`to`) default(0),
|
|
1864
|
-
// overlay at +1.
|
|
1875
|
+
// z-index is applied in OverlayStrategy.contribute. The overlay always
|
|
1876
|
+
// sits at Z_OVERLAY, between the background page (Z_BACKGROUND) and the
|
|
1877
|
+
// zoomed tile (Z_FOREGROUND), in both enter and exit.
|
|
1865
1878
|
backdropFilter: "blur(0px)",
|
|
1866
1879
|
WebkitBackdropFilter: "blur(0px)"
|
|
1867
1880
|
},
|
|
1868
1881
|
style: (e, t) => {
|
|
1869
|
-
const n = e === "enter" ? t : 1 - t, s = `blur(${
|
|
1882
|
+
const n = e === "enter" ? t : 1 - t, s = `blur(${Wn * n}px)`;
|
|
1870
1883
|
return {
|
|
1871
1884
|
backdropFilter: s,
|
|
1872
1885
|
WebkitBackdropFilter: s
|
|
1873
1886
|
};
|
|
1874
1887
|
}
|
|
1875
1888
|
};
|
|
1876
|
-
class
|
|
1889
|
+
class jn {
|
|
1877
1890
|
constructor() {
|
|
1878
|
-
|
|
1891
|
+
C(this, "physics", Zn);
|
|
1879
1892
|
}
|
|
1880
1893
|
contribute(t) {
|
|
1881
|
-
const { from: n, to: s, resolved: o, physics: i } = t,
|
|
1882
|
-
return
|
|
1883
|
-
new
|
|
1884
|
-
element:
|
|
1885
|
-
integrator:
|
|
1886
|
-
style:
|
|
1894
|
+
const { from: n, to: s, resolved: o, physics: i } = t, l = o.mode === "enter", a = l ? n : s, r = l ? qn() : Kn();
|
|
1895
|
+
return r && (a.style.transformOrigin = r.transformOrigin), [
|
|
1896
|
+
new g({
|
|
1897
|
+
element: a,
|
|
1898
|
+
integrator: w.from(i),
|
|
1899
|
+
style: l ? (c, p) => r.animate(p) : (c) => r.animate(c)
|
|
1887
1900
|
})
|
|
1888
1901
|
];
|
|
1889
1902
|
}
|
|
1890
1903
|
}
|
|
1891
|
-
class
|
|
1904
|
+
class Gn {
|
|
1892
1905
|
prepare(t) {
|
|
1893
1906
|
const n = t.createElement("zoom-overlay");
|
|
1894
|
-
return Object.assign(n.style,
|
|
1907
|
+
return Object.assign(n.style, j.initialStyle), n.style.willChange = j.willChange, t.context.positionedParent.appendChild(n), { overlay: n };
|
|
1895
1908
|
}
|
|
1896
1909
|
contribute(t) {
|
|
1897
1910
|
const n = t.extras.overlay;
|
|
1898
|
-
return n ? (n.style.zIndex =
|
|
1899
|
-
new
|
|
1911
|
+
return n ? (n.style.zIndex = Le, [
|
|
1912
|
+
new g({
|
|
1900
1913
|
element: n,
|
|
1901
|
-
integrator:
|
|
1902
|
-
style: (s) =>
|
|
1914
|
+
integrator: w.from(t.physics),
|
|
1915
|
+
style: (s) => j.style(t.resolved.mode, s)
|
|
1903
1916
|
})
|
|
1904
1917
|
]) : [];
|
|
1905
1918
|
}
|
|
1906
1919
|
}
|
|
1907
|
-
const
|
|
1920
|
+
const Jn = {
|
|
1908
1921
|
spring: {
|
|
1909
1922
|
stiffness: 430,
|
|
1910
1923
|
damping: 33,
|
|
1911
1924
|
doubleSpring: 1
|
|
1912
1925
|
}
|
|
1913
1926
|
};
|
|
1914
|
-
function
|
|
1927
|
+
function Qn({
|
|
1915
1928
|
enterRect: e,
|
|
1916
1929
|
exitRect: t,
|
|
1917
1930
|
scrollOffset: n
|
|
1918
1931
|
}) {
|
|
1919
|
-
const s = e.left - t.left + (e.width - t.width) / 2 + n.x, o = e.top - t.top + (e.height - t.height) / 2 + n.y, i = e.width / t.width,
|
|
1932
|
+
const s = e.left - t.left + (e.width - t.width) / 2 + n.x, o = e.top - t.top + (e.height - t.height) / 2 + n.y, i = e.width / t.width, l = e.height / t.height, a = Math.max(i, l);
|
|
1920
1933
|
return {
|
|
1921
1934
|
transformOrigin: `${t.left + t.width / 2}px ${t.top + t.height / 2}px`,
|
|
1922
|
-
animate: (
|
|
1923
|
-
const
|
|
1935
|
+
animate: (r) => {
|
|
1936
|
+
const c = 1 - r;
|
|
1924
1937
|
return {
|
|
1925
|
-
transform: `translate(${s *
|
|
1938
|
+
transform: `translate(${s * c - n.x}px, ${o * c}px) scale(${1 + (a - 1) * c})`
|
|
1926
1939
|
};
|
|
1927
1940
|
}
|
|
1928
1941
|
};
|
|
1929
1942
|
}
|
|
1930
|
-
function
|
|
1943
|
+
function ts({
|
|
1931
1944
|
enterRect: e,
|
|
1932
1945
|
exitRect: t,
|
|
1933
1946
|
scrollOffset: n
|
|
1934
1947
|
}) {
|
|
1935
|
-
const s = e.left - t.left + (e.width - t.width) / 2 - n.x, o = e.top - t.top + (e.height - t.height) / 2 - n.y, i = e.width / t.width,
|
|
1948
|
+
const s = e.left - t.left + (e.width - t.width) / 2 - n.x, o = e.top - t.top + (e.height - t.height) / 2 - n.y, i = e.width / t.width, l = e.height / t.height, a = Math.max(i, l);
|
|
1936
1949
|
return {
|
|
1937
1950
|
transformOrigin: `${t.left + t.width / 2}px ${t.top + t.height / 2}px`,
|
|
1938
|
-
animate: (
|
|
1939
|
-
const
|
|
1951
|
+
animate: (r) => {
|
|
1952
|
+
const c = 1 - r;
|
|
1940
1953
|
return {
|
|
1941
|
-
transform: `translate(${s *
|
|
1954
|
+
transform: `translate(${s * c}px, ${o * c}px) scale(${1 + (a - 1) * c})`
|
|
1942
1955
|
};
|
|
1943
1956
|
}
|
|
1944
1957
|
};
|
|
1945
1958
|
}
|
|
1946
|
-
class
|
|
1959
|
+
class es {
|
|
1947
1960
|
constructor() {
|
|
1948
|
-
|
|
1961
|
+
C(this, "physics", Jn);
|
|
1949
1962
|
}
|
|
1950
1963
|
contribute(t) {
|
|
1951
|
-
const { from: n, to: s, resolved: o, input: i, physics:
|
|
1952
|
-
return
|
|
1953
|
-
new
|
|
1954
|
-
element:
|
|
1955
|
-
integrator:
|
|
1956
|
-
style:
|
|
1964
|
+
const { from: n, to: s, resolved: o, input: i, physics: l } = t, a = o.mode === "enter", r = a ? n : s, c = a ? Qn(i) : ts(i);
|
|
1965
|
+
return c && (r.style.transformOrigin = c.transformOrigin), [
|
|
1966
|
+
new g({
|
|
1967
|
+
element: r,
|
|
1968
|
+
integrator: w.from(l),
|
|
1969
|
+
style: a ? (p, d) => c.animate(d) : (p) => c.animate(p)
|
|
1957
1970
|
})
|
|
1958
1971
|
];
|
|
1959
1972
|
}
|
|
1960
1973
|
}
|
|
1961
|
-
const
|
|
1974
|
+
const ns = {
|
|
1962
1975
|
spring: {
|
|
1963
1976
|
stiffness: 530,
|
|
1964
1977
|
damping: 34,
|
|
1965
1978
|
doubleSpring: 1
|
|
1966
1979
|
}
|
|
1967
1980
|
};
|
|
1968
|
-
class
|
|
1981
|
+
class ss {
|
|
1969
1982
|
constructor() {
|
|
1970
|
-
|
|
1983
|
+
C(this, "physics", ns);
|
|
1971
1984
|
}
|
|
1972
1985
|
contribute(t) {
|
|
1973
1986
|
return [];
|
|
1974
1987
|
}
|
|
1975
1988
|
}
|
|
1976
|
-
const
|
|
1977
|
-
expand: () => new
|
|
1978
|
-
static: () => new
|
|
1979
|
-
blur: () => new
|
|
1989
|
+
const os = {
|
|
1990
|
+
expand: () => new es(),
|
|
1991
|
+
static: () => new ss(),
|
|
1992
|
+
blur: () => new jn()
|
|
1980
1993
|
};
|
|
1981
|
-
function
|
|
1982
|
-
return
|
|
1994
|
+
function is(e) {
|
|
1995
|
+
return os[e]();
|
|
1983
1996
|
}
|
|
1984
|
-
const
|
|
1985
|
-
function
|
|
1986
|
-
const t = e.getAttribute(
|
|
1997
|
+
const G = "data-zoom-enter-key", Pt = "data-zoom-exit-key", rs = "data-zoom-radius";
|
|
1998
|
+
function _t(e) {
|
|
1999
|
+
const t = e.getAttribute(rs);
|
|
1987
2000
|
if (!t) return 0;
|
|
1988
2001
|
const n = parseFloat(t);
|
|
1989
2002
|
return Number.isFinite(n) && n > 0 ? n : 0;
|
|
1990
2003
|
}
|
|
1991
|
-
function
|
|
2004
|
+
function as(e, t) {
|
|
1992
2005
|
const n = [];
|
|
1993
2006
|
let s = t;
|
|
1994
2007
|
for (; s && s !== e; ) {
|
|
@@ -2000,89 +2013,91 @@ function os(e, t) {
|
|
|
2000
2013
|
}
|
|
2001
2014
|
return n;
|
|
2002
2015
|
}
|
|
2003
|
-
function
|
|
2004
|
-
const t = e.querySelectorAll(`[${
|
|
2016
|
+
function It(e) {
|
|
2017
|
+
const t = e.querySelectorAll(`[${G}]`);
|
|
2005
2018
|
return t.length !== 1 ? null : t[0];
|
|
2006
2019
|
}
|
|
2007
|
-
function
|
|
2008
|
-
const n = e.querySelectorAll(`[${
|
|
2020
|
+
function Dt(e, t) {
|
|
2021
|
+
const n = e.querySelectorAll(`[${Pt}]`);
|
|
2009
2022
|
for (const s of n)
|
|
2010
|
-
if (s.getAttribute(
|
|
2023
|
+
if (s.getAttribute(Pt) === t)
|
|
2011
2024
|
return s;
|
|
2012
2025
|
return null;
|
|
2013
2026
|
}
|
|
2014
|
-
function
|
|
2015
|
-
const n =
|
|
2027
|
+
function ls(e, t) {
|
|
2028
|
+
const n = It(e), s = It(t);
|
|
2016
2029
|
if (!n && s) {
|
|
2017
|
-
const o = s.getAttribute(
|
|
2030
|
+
const o = s.getAttribute(G);
|
|
2018
2031
|
if (!o) return null;
|
|
2019
|
-
const i =
|
|
2032
|
+
const i = Dt(e, o);
|
|
2020
2033
|
return i ? { mode: "enter", enterEl: s, exitEl: i } : null;
|
|
2021
2034
|
}
|
|
2022
2035
|
if (n && !s) {
|
|
2023
|
-
const o = n.getAttribute(
|
|
2036
|
+
const o = n.getAttribute(G);
|
|
2024
2037
|
if (!o) return null;
|
|
2025
|
-
const i =
|
|
2038
|
+
const i = Dt(t, o);
|
|
2026
2039
|
return i ? { mode: "exit", enterEl: n, exitEl: i } : null;
|
|
2027
2040
|
}
|
|
2028
2041
|
return null;
|
|
2029
2042
|
}
|
|
2030
|
-
function
|
|
2043
|
+
function cs(e, t, n, s) {
|
|
2031
2044
|
return {
|
|
2032
|
-
enterRect:
|
|
2045
|
+
enterRect: nt(
|
|
2033
2046
|
e.mode === "enter" ? n : t,
|
|
2034
2047
|
e.enterEl
|
|
2035
2048
|
),
|
|
2036
|
-
exitRect:
|
|
2049
|
+
exitRect: nt(
|
|
2037
2050
|
e.mode === "enter" ? t : n,
|
|
2038
2051
|
e.exitEl
|
|
2039
2052
|
),
|
|
2040
2053
|
pageRect: e.mode === "enter" ? n.getBoundingClientRect() : t.getBoundingClientRect(),
|
|
2041
2054
|
scrollOffset: s,
|
|
2042
|
-
enterRadius:
|
|
2043
|
-
exitRadius:
|
|
2055
|
+
enterRadius: _t(e.enterEl),
|
|
2056
|
+
exitRadius: _t(e.exitEl)
|
|
2044
2057
|
};
|
|
2045
2058
|
}
|
|
2046
|
-
class
|
|
2059
|
+
class ps {
|
|
2047
2060
|
prepare(t) {
|
|
2048
2061
|
t.from.then((n) => {
|
|
2049
2062
|
n.style.willChange = "transform, clip-path, opacity", n.style.backfaceVisibility = "hidden", n.style.contain = "layout paint";
|
|
2050
2063
|
});
|
|
2051
2064
|
}
|
|
2052
2065
|
contribute(t) {
|
|
2053
|
-
const { from: n, to: s, resolved: o, input: i, physics:
|
|
2054
|
-
|
|
2055
|
-
const f =
|
|
2056
|
-
|
|
2057
|
-
|
|
2066
|
+
const { from: n, to: s, resolved: o, input: i, physics: l, onComplete: a } = t, r = o.mode === "enter", c = r ? Xn(i) : Bn(i), p = r ? s : n, d = r ? "t" : "u";
|
|
2067
|
+
c && (p.style.transformOrigin = c.transformOrigin);
|
|
2068
|
+
const f = r ? v : O, u = r ? O : v, y = n.style.zIndex;
|
|
2069
|
+
n.style.zIndex = f;
|
|
2070
|
+
const h = s.style.zIndex, S = s.style.position;
|
|
2071
|
+
return s.style.zIndex = u, s.style.position = "relative", a(() => {
|
|
2072
|
+
p.style.willChange = "auto", p.style.backfaceVisibility = "", p.style.transformOrigin = "", p.style.contain = "", n.style.zIndex = y, s.style.zIndex === u && (s.style.zIndex = h), s.style.position === "relative" && (s.style.position = S), s.style.transformOrigin = "", n.style.willChange = "auto", n.style.backfaceVisibility = "", n.style.transformOrigin = "", n.style.contain = "", n.style.transform = "", n.style.clipPath = "";
|
|
2058
2073
|
}), [
|
|
2059
|
-
new
|
|
2074
|
+
new g({
|
|
2060
2075
|
element: p,
|
|
2061
|
-
integrator:
|
|
2076
|
+
integrator: w.from(l),
|
|
2062
2077
|
// Enter: tile expands as `t` (0 → 1). Exit: tile shrinks as `u` —
|
|
2063
2078
|
// the legacy convention from v5's outAnim path. Either way, feed
|
|
2064
2079
|
// the progress that matches the tileConfig's authored direction.
|
|
2065
|
-
style: d === "t" ? (
|
|
2080
|
+
style: d === "t" ? (m) => c.animate(m) : (m, b) => c.animate(b)
|
|
2066
2081
|
})
|
|
2067
2082
|
];
|
|
2068
2083
|
}
|
|
2069
2084
|
}
|
|
2070
|
-
class
|
|
2085
|
+
class ds {
|
|
2071
2086
|
contribute(t) {
|
|
2072
|
-
const { resolved: n, physics: s, from: o, to: i, onComplete:
|
|
2073
|
-
if (
|
|
2074
|
-
const
|
|
2087
|
+
const { resolved: n, physics: s, from: o, to: i, onComplete: l } = t, a = n.mode === "enter" ? i : o, r = as(a, n.enterEl);
|
|
2088
|
+
if (r.length === 0) return [];
|
|
2089
|
+
const c = r.map((p) => p.style.opacity);
|
|
2075
2090
|
if (n.mode === "enter")
|
|
2076
|
-
for (const p of
|
|
2077
|
-
return
|
|
2078
|
-
for (let p = 0; p <
|
|
2079
|
-
const d =
|
|
2080
|
-
d && (d.style.opacity =
|
|
2091
|
+
for (const p of r) p.style.opacity = "0";
|
|
2092
|
+
return l(() => {
|
|
2093
|
+
for (let p = 0; p < r.length; p++) {
|
|
2094
|
+
const d = r[p];
|
|
2095
|
+
d && (d.style.opacity = c[p] ?? "");
|
|
2081
2096
|
}
|
|
2082
|
-
}),
|
|
2083
|
-
(p) => new
|
|
2097
|
+
}), r.map(
|
|
2098
|
+
(p) => new g({
|
|
2084
2099
|
element: p,
|
|
2085
|
-
integrator:
|
|
2100
|
+
integrator: w.from(s),
|
|
2086
2101
|
style: (d, f) => ({
|
|
2087
2102
|
opacity: n.mode === "enter" ? d : f
|
|
2088
2103
|
})
|
|
@@ -2090,35 +2105,35 @@ class ls {
|
|
|
2090
2105
|
);
|
|
2091
2106
|
}
|
|
2092
2107
|
}
|
|
2093
|
-
class
|
|
2108
|
+
class Ft {
|
|
2094
2109
|
contribute() {
|
|
2095
2110
|
return [];
|
|
2096
2111
|
}
|
|
2097
2112
|
}
|
|
2098
|
-
const
|
|
2099
|
-
default: () => new
|
|
2100
|
-
fade: () => new
|
|
2113
|
+
const fs = {
|
|
2114
|
+
default: () => new Ft(),
|
|
2115
|
+
fade: () => new ds()
|
|
2101
2116
|
};
|
|
2102
|
-
function
|
|
2103
|
-
return
|
|
2117
|
+
function ys(e) {
|
|
2118
|
+
return fs[e]();
|
|
2104
2119
|
}
|
|
2105
|
-
class
|
|
2120
|
+
class hs extends Ft {
|
|
2106
2121
|
}
|
|
2107
|
-
function
|
|
2108
|
-
const t =
|
|
2122
|
+
function us(e) {
|
|
2123
|
+
const t = is(e.type);
|
|
2109
2124
|
return { strategies: [
|
|
2110
|
-
new
|
|
2125
|
+
new ps(),
|
|
2111
2126
|
t,
|
|
2112
|
-
|
|
2113
|
-
new
|
|
2127
|
+
ys(e.variant),
|
|
2128
|
+
new hs(),
|
|
2114
2129
|
// Overlay is intrinsically tied to backdrop-filter-driven types. Today
|
|
2115
2130
|
// that's only `blur`; the table-driven factory above owns the mapping
|
|
2116
2131
|
// so this conditional is the single line that knows the relationship.
|
|
2117
|
-
...e.type === "blur" ? [new
|
|
2132
|
+
...e.type === "blur" ? [new Gn()] : []
|
|
2118
2133
|
], physics: t.physics };
|
|
2119
2134
|
}
|
|
2120
|
-
const
|
|
2121
|
-
const { strategies: t, physics: n } =
|
|
2135
|
+
const ms = (e) => {
|
|
2136
|
+
const { strategies: t, physics: n } = us(e);
|
|
2122
2137
|
return {
|
|
2123
2138
|
prepare: (s) => {
|
|
2124
2139
|
const o = {
|
|
@@ -2130,26 +2145,26 @@ const ys = (e) => {
|
|
|
2130
2145
|
// compatible.
|
|
2131
2146
|
createElement: s.createElement
|
|
2132
2147
|
}, i = {};
|
|
2133
|
-
for (const
|
|
2134
|
-
if (!
|
|
2135
|
-
const
|
|
2136
|
-
|
|
2148
|
+
for (const l of t) {
|
|
2149
|
+
if (!l.prepare) continue;
|
|
2150
|
+
const a = l.prepare(o);
|
|
2151
|
+
a && Object.assign(i, a);
|
|
2137
2152
|
}
|
|
2138
2153
|
return i;
|
|
2139
2154
|
},
|
|
2140
|
-
animation: ({ from: s, to: o, context: i, ...
|
|
2141
|
-
const
|
|
2142
|
-
if (!
|
|
2143
|
-
return new
|
|
2144
|
-
const
|
|
2155
|
+
animation: ({ from: s, to: o, context: i, ...l }) => {
|
|
2156
|
+
const a = ls(s, o);
|
|
2157
|
+
if (!a)
|
|
2158
|
+
return new x([], { mode: "parallel" });
|
|
2159
|
+
const r = cs(a, s, o, i.scrollOffset), c = [], d = {
|
|
2145
2160
|
from: s,
|
|
2146
2161
|
to: o,
|
|
2147
|
-
resolved:
|
|
2148
|
-
input:
|
|
2162
|
+
resolved: a,
|
|
2163
|
+
input: r,
|
|
2149
2164
|
physics: n,
|
|
2150
|
-
extras:
|
|
2165
|
+
extras: l,
|
|
2151
2166
|
onComplete: (y) => {
|
|
2152
|
-
|
|
2167
|
+
c.push(y);
|
|
2153
2168
|
}
|
|
2154
2169
|
}, f = [];
|
|
2155
2170
|
for (const y of t)
|
|
@@ -2159,51 +2174,51 @@ const ys = (e) => {
|
|
|
2159
2174
|
const y = u.onComplete;
|
|
2160
2175
|
u.onComplete = () => {
|
|
2161
2176
|
y == null || y();
|
|
2162
|
-
for (const h of
|
|
2177
|
+
for (const h of c)
|
|
2163
2178
|
try {
|
|
2164
2179
|
h();
|
|
2165
|
-
} catch (
|
|
2166
|
-
console.error("[zoom] cleanup error",
|
|
2180
|
+
} catch (S) {
|
|
2181
|
+
console.error("[zoom] cleanup error", S);
|
|
2167
2182
|
}
|
|
2168
2183
|
};
|
|
2169
2184
|
}
|
|
2170
2185
|
for (const y of f) {
|
|
2171
|
-
if (!(y instanceof
|
|
2186
|
+
if (!(y instanceof g)) continue;
|
|
2172
2187
|
const h = y.onComplete;
|
|
2173
2188
|
y.onComplete = () => {
|
|
2174
2189
|
h == null || h(), y.releaseFill();
|
|
2175
2190
|
};
|
|
2176
2191
|
}
|
|
2177
|
-
return new
|
|
2192
|
+
return new x(f, { mode: "parallel" });
|
|
2178
2193
|
}
|
|
2179
2194
|
};
|
|
2180
2195
|
};
|
|
2181
|
-
function
|
|
2196
|
+
function gs(e) {
|
|
2182
2197
|
const t = e.type ?? "static", n = e.variant ?? (e.fade ? "fade" : "default");
|
|
2183
2198
|
return { type: t, variant: n };
|
|
2184
2199
|
}
|
|
2185
|
-
function
|
|
2186
|
-
const t =
|
|
2187
|
-
return
|
|
2200
|
+
function Fs(e) {
|
|
2201
|
+
const t = gs(e);
|
|
2202
|
+
return D(
|
|
2188
2203
|
e.paths,
|
|
2189
|
-
() =>
|
|
2204
|
+
() => ms(t)
|
|
2190
2205
|
);
|
|
2191
2206
|
}
|
|
2192
2207
|
export {
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2208
|
+
Ls as Animation,
|
|
2209
|
+
x as MultiAnimation,
|
|
2210
|
+
g as WebAnimation,
|
|
2211
|
+
$s as axis,
|
|
2212
|
+
Cs as blind,
|
|
2213
|
+
xs as drill,
|
|
2214
|
+
Es as fade,
|
|
2215
|
+
Ps as film,
|
|
2216
|
+
_s as hero,
|
|
2217
|
+
Is as jaemin,
|
|
2218
|
+
Ds as rotate,
|
|
2219
|
+
vs as scroll,
|
|
2220
|
+
Os as sheet,
|
|
2221
|
+
Ts as slide,
|
|
2222
|
+
As as strip,
|
|
2223
|
+
Fs as zoom
|
|
2209
2224
|
};
|