@ssgoi/core 6.6.8 → 6.6.9
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 +11 -11
- package/dist/index.js +1165 -958
- package/dist/transitions/hero/fit.d.ts +5 -0
- package/dist/transitions/hero/fit.d.ts.map +1 -0
- package/dist/transitions/hero/transition.d.ts +12 -1
- package/dist/transitions/hero/transition.d.ts.map +1 -1
- package/dist/transitions/hero/types.d.ts +2 -1
- package/dist/transitions/hero/types.d.ts.map +1 -1
- package/dist/transitions/media-geometry.d.ts +55 -0
- package/dist/transitions/media-geometry.d.ts.map +1 -0
- package/dist/transitions/zoom/transition.d.ts +5 -1
- package/dist/transitions/zoom/transition.d.ts.map +1 -1
- package/dist/transitions/zoom/types.d.ts +5 -0
- package/dist/transitions/zoom/types.d.ts.map +1 -1
- package/dist/transitions/zoom/zoom-element.d.ts +2 -2
- package/dist/transitions/zoom/zoom-element.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { P as
|
|
5
|
-
import { A as
|
|
6
|
-
function
|
|
1
|
+
var ae = Object.defineProperty;
|
|
2
|
+
var le = (e, t, n) => t in e ? ae(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var E = (e, t, n) => le(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { P as pt, V as zt, W as b, M as P, S as ce } from "./multi-animation-BC5ihz8S.js";
|
|
5
|
+
import { A as wo } from "./multi-animation-BC5ihz8S.js";
|
|
6
|
+
function R(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], r = e[o];
|
|
11
|
+
!i || !r || n.push({
|
|
12
12
|
from: i,
|
|
13
|
-
to:
|
|
13
|
+
to: r,
|
|
14
14
|
transition: t(),
|
|
15
15
|
symmetric: !0
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
18
|
return n;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function Ut(e, t) {
|
|
21
21
|
return [
|
|
22
22
|
{
|
|
23
23
|
from: e.exit,
|
|
@@ -31,41 +31,41 @@ function kt(e, t) {
|
|
|
31
31
|
}
|
|
32
32
|
];
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function ut(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 r = e[o], l = e[i];
|
|
39
|
+
!r || !l || s.push(
|
|
40
40
|
{
|
|
41
|
-
from:
|
|
42
|
-
to:
|
|
41
|
+
from: r,
|
|
42
|
+
to: l,
|
|
43
43
|
transition: n(t.forward)
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
|
-
from:
|
|
47
|
-
to:
|
|
46
|
+
from: l,
|
|
47
|
+
to: r,
|
|
48
48
|
transition: n(t.backward)
|
|
49
49
|
}
|
|
50
50
|
);
|
|
51
51
|
}
|
|
52
52
|
return s;
|
|
53
53
|
}
|
|
54
|
-
class
|
|
54
|
+
class B {
|
|
55
55
|
constructor(t) {
|
|
56
|
-
|
|
56
|
+
E(this, "omega");
|
|
57
57
|
// Angular frequency
|
|
58
|
-
|
|
58
|
+
E(this, "zeta");
|
|
59
59
|
// Damping ratio
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
E(this, "restDelta");
|
|
61
|
+
E(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 ?? pt, this.restSpeed = t.restSpeed ?? zt;
|
|
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: r } = this, { position: l, velocity: a } = t, c = -2 * o * r * i * a, u = o * i * i * (n - l), p = a + c + u;
|
|
67
67
|
return {
|
|
68
|
-
position:
|
|
68
|
+
position: l + o * p,
|
|
69
69
|
velocity: p
|
|
70
70
|
};
|
|
71
71
|
}
|
|
@@ -74,20 +74,20 @@ class z {
|
|
|
74
74
|
return s < this.restDelta && o < this.restSpeed;
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
class
|
|
77
|
+
class pe {
|
|
78
78
|
constructor(t) {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
this.restDelta = t.restDelta ??
|
|
79
|
+
E(this, "leader");
|
|
80
|
+
E(this, "follower");
|
|
81
|
+
E(this, "restDelta");
|
|
82
|
+
E(this, "restSpeed");
|
|
83
|
+
this.restDelta = t.restDelta ?? pt, this.restSpeed = t.restSpeed ?? zt, this.leader = new B({
|
|
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 B({
|
|
91
91
|
stiffness: n,
|
|
92
92
|
damping: s,
|
|
93
93
|
restDelta: o ?? this.restDelta,
|
|
@@ -98,15 +98,15 @@ class qt {
|
|
|
98
98
|
const i = t._leader ?? {
|
|
99
99
|
position: t.position,
|
|
100
100
|
velocity: t.velocity
|
|
101
|
-
},
|
|
101
|
+
}, r = this.leader.step(i, n, s), l = this.follower.step(
|
|
102
102
|
t,
|
|
103
|
-
|
|
103
|
+
r.position,
|
|
104
104
|
s
|
|
105
105
|
);
|
|
106
106
|
return {
|
|
107
|
-
position:
|
|
108
|
-
velocity:
|
|
109
|
-
_leader:
|
|
107
|
+
position: l.position,
|
|
108
|
+
velocity: l.velocity,
|
|
109
|
+
_leader: r
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
112
|
isSettled(t, n) {
|
|
@@ -114,46 +114,46 @@ class qt {
|
|
|
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 ue = 0.01, de = 500, fe = 10;
|
|
118
|
+
class he {
|
|
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
|
+
E(this, "acceleration");
|
|
121
|
+
E(this, "resistance");
|
|
122
|
+
E(this, "resistanceType");
|
|
123
|
+
E(this, "min");
|
|
124
|
+
E(this, "max");
|
|
125
|
+
E(this, "bounceStiffness");
|
|
126
|
+
E(this, "bounceDamping");
|
|
127
|
+
E(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 ?? de, this.bounceDamping = t.bounceDamping ?? fe, this.restDelta = t.restDelta ?? ue;
|
|
129
129
|
}
|
|
130
130
|
step(t, n, s) {
|
|
131
|
-
const o = Math.min(s, 0.033), { acceleration: i, resistance:
|
|
132
|
-
let
|
|
133
|
-
if (d ||
|
|
134
|
-
const
|
|
135
|
-
|
|
131
|
+
const o = Math.min(s, 0.033), { acceleration: i, resistance: r, resistanceType: l, min: a, max: c } = this, { position: u, velocity: p } = t, d = a !== void 0 && u < a, y = c !== void 0 && u > c;
|
|
132
|
+
let f;
|
|
133
|
+
if (d || y) {
|
|
134
|
+
const g = u - (d ? a : c), $ = -this.bounceStiffness * g, x = -this.bounceDamping * p;
|
|
135
|
+
f = $ + x;
|
|
136
136
|
} else {
|
|
137
|
-
const S = n >
|
|
138
|
-
let
|
|
139
|
-
|
|
137
|
+
const S = n > u ? 1 : -1;
|
|
138
|
+
let g;
|
|
139
|
+
l === "linear" ? g = r * p : g = r * p * Math.abs(p), f = S * i - g;
|
|
140
140
|
}
|
|
141
|
-
const h = p +
|
|
142
|
-
let
|
|
143
|
-
if (!d && !
|
|
144
|
-
const S = n >
|
|
145
|
-
(S > 0 &&
|
|
141
|
+
const h = p + f * o;
|
|
142
|
+
let m = u + h * o;
|
|
143
|
+
if (!d && !y) {
|
|
144
|
+
const S = n > u ? 1 : -1;
|
|
145
|
+
(S > 0 && m > n || S < 0 && m < n) && (m = n);
|
|
146
146
|
}
|
|
147
147
|
return {
|
|
148
|
-
position:
|
|
149
|
-
velocity:
|
|
148
|
+
position: m,
|
|
149
|
+
velocity: m === 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 he({
|
|
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 pe({
|
|
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 B({
|
|
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 ye {
|
|
211
211
|
constructor(t) {
|
|
212
|
-
|
|
212
|
+
E(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), r = Math.abs(o) / this.durationSec, l = i * r * s, a = t.position + l;
|
|
219
|
+
return (i > 0 ? a >= n : a <= n) ? { position: n, velocity: 0 } : { position: a, velocity: i * r };
|
|
220
220
|
}
|
|
221
221
|
isSettled(t, n) {
|
|
222
|
-
return Math.abs(t.position - n) <
|
|
222
|
+
return Math.abs(t.position - n) < pt;
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
|
-
function
|
|
225
|
+
function H(e, t) {
|
|
226
226
|
function n(i) {
|
|
227
|
-
let
|
|
228
|
-
const
|
|
229
|
-
let
|
|
230
|
-
for (;
|
|
231
|
-
|
|
232
|
-
return
|
|
227
|
+
let r = 0, l = 0;
|
|
228
|
+
const a = i.offsetWidth, c = i.offsetHeight;
|
|
229
|
+
let u = i;
|
|
230
|
+
for (; u; )
|
|
231
|
+
r += u.offsetTop, l += u.offsetLeft, u = u.offsetParent;
|
|
232
|
+
return r -= window.scrollY, l -= window.scrollX, { top: r, left: l, width: a, height: c };
|
|
233
233
|
}
|
|
234
234
|
const s = n(e), o = n(t);
|
|
235
235
|
return new DOMRect(
|
|
@@ -239,7 +239,7 @@ function N(e, t) {
|
|
|
239
239
|
o.height
|
|
240
240
|
);
|
|
241
241
|
}
|
|
242
|
-
function
|
|
242
|
+
function U(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 rt(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 F(e, t) {
|
|
252
|
+
const { scrollingElement: n, positionedParent: s } = e, o = n !== s && n.contains(s) ? H(n, s).top : 0;
|
|
253
253
|
return {
|
|
254
254
|
top: e[t].scroll.y,
|
|
255
255
|
left: 0,
|
|
@@ -257,14 +257,14 @@ function T(e, t) {
|
|
|
257
257
|
height: n.clientHeight - o
|
|
258
258
|
};
|
|
259
259
|
}
|
|
260
|
-
function
|
|
261
|
-
const { scrollingElement: n, positionedParent: s } = e, o = n !== s && n.contains(s) ?
|
|
260
|
+
function Vt(e, t) {
|
|
261
|
+
const { scrollingElement: n, positionedParent: s } = e, o = n !== s && n.contains(s) ? H(n, s).top : 0;
|
|
262
262
|
return {
|
|
263
263
|
top: e[t].scroll.y - o,
|
|
264
264
|
height: n.clientHeight
|
|
265
265
|
};
|
|
266
266
|
}
|
|
267
|
-
const
|
|
267
|
+
const ft = 8, ht = {
|
|
268
268
|
spring: {
|
|
269
269
|
stiffness: 800,
|
|
270
270
|
damping: 40,
|
|
@@ -273,10 +273,10 @@ const at = 8, lt = {
|
|
|
273
273
|
restSpeed: 0.1
|
|
274
274
|
}
|
|
275
275
|
};
|
|
276
|
-
function
|
|
276
|
+
function me({
|
|
277
277
|
direction: e
|
|
278
278
|
}) {
|
|
279
|
-
const t = e === "forward" ?
|
|
279
|
+
const t = e === "forward" ? ft : -ft;
|
|
280
280
|
return {
|
|
281
281
|
out: {
|
|
282
282
|
willChange: "transform, opacity",
|
|
@@ -298,25 +298,25 @@ function te({
|
|
|
298
298
|
}
|
|
299
299
|
};
|
|
300
300
|
}
|
|
301
|
-
function
|
|
301
|
+
function ge() {
|
|
302
302
|
return {
|
|
303
|
-
outPhysics:
|
|
304
|
-
inPhysics:
|
|
303
|
+
outPhysics: ht,
|
|
304
|
+
inPhysics: ht,
|
|
305
305
|
// Both sides run together — the cross-fade is the whole point of the
|
|
306
306
|
// snappy feel. (fluid's sibling uses staggered fade-through.)
|
|
307
307
|
composition: { mode: "parallel", startAt: [0, 0] },
|
|
308
|
-
build:
|
|
308
|
+
build: me
|
|
309
309
|
};
|
|
310
310
|
}
|
|
311
|
-
const
|
|
311
|
+
const yt = 30, be = {
|
|
312
312
|
inertia: { acceleration: 150, resistance: 1.5, restDelta: 0.1 }
|
|
313
|
-
},
|
|
313
|
+
}, we = {
|
|
314
314
|
spring: { stiffness: 180, damping: 34, restDelta: 0.1, restSpeed: 0.1 }
|
|
315
315
|
};
|
|
316
|
-
function
|
|
316
|
+
function Se({
|
|
317
317
|
direction: e
|
|
318
318
|
}) {
|
|
319
|
-
const t = e === "forward" ? 1 : -1, n = -
|
|
319
|
+
const t = e === "forward" ? 1 : -1, n = -yt * t, s = yt * t;
|
|
320
320
|
return {
|
|
321
321
|
out: {
|
|
322
322
|
willChange: "transform, opacity",
|
|
@@ -339,29 +339,29 @@ function oe({
|
|
|
339
339
|
}
|
|
340
340
|
};
|
|
341
341
|
}
|
|
342
|
-
function
|
|
342
|
+
function xe() {
|
|
343
343
|
return {
|
|
344
|
-
outPhysics:
|
|
345
|
-
inPhysics:
|
|
344
|
+
outPhysics: be,
|
|
345
|
+
inPhysics: we,
|
|
346
346
|
// Phased motion: outgoing falls away first under inertia, then incoming
|
|
347
347
|
// springs in. The fade-through shape comes from the integrator curves
|
|
348
348
|
// plus the sequence handoff, not from FADE_SPLIT inside animate(t).
|
|
349
349
|
composition: { mode: "sequence" },
|
|
350
|
-
build:
|
|
350
|
+
build: Se
|
|
351
351
|
};
|
|
352
352
|
}
|
|
353
|
-
const
|
|
354
|
-
snappy:
|
|
355
|
-
fluid:
|
|
356
|
-
},
|
|
353
|
+
const Ce = {
|
|
354
|
+
snappy: ge(),
|
|
355
|
+
fluid: xe()
|
|
356
|
+
}, mt = 8, $e = {
|
|
357
357
|
inertia: { acceleration: 150, resistance: 1.5, restDelta: 0.1 }
|
|
358
|
-
},
|
|
358
|
+
}, Ee = {
|
|
359
359
|
spring: { stiffness: 180, damping: 34, restDelta: 0.1, restSpeed: 0.1 }
|
|
360
360
|
};
|
|
361
|
-
function
|
|
361
|
+
function Pe({
|
|
362
362
|
direction: e
|
|
363
363
|
}) {
|
|
364
|
-
const t = e === "forward" ? 1 : -1, n = -
|
|
364
|
+
const t = e === "forward" ? 1 : -1, n = -mt * t, s = mt * t;
|
|
365
365
|
return {
|
|
366
366
|
out: {
|
|
367
367
|
willChange: "transform, opacity",
|
|
@@ -384,21 +384,21 @@ function ce({
|
|
|
384
384
|
}
|
|
385
385
|
};
|
|
386
386
|
}
|
|
387
|
-
function
|
|
387
|
+
function Ie() {
|
|
388
388
|
return {
|
|
389
|
-
outPhysics:
|
|
390
|
-
inPhysics:
|
|
389
|
+
outPhysics: $e,
|
|
390
|
+
inPhysics: Ee,
|
|
391
391
|
composition: { mode: "sequence" },
|
|
392
|
-
build:
|
|
392
|
+
build: Pe
|
|
393
393
|
};
|
|
394
394
|
}
|
|
395
|
-
const
|
|
395
|
+
const Ae = 8, _e = {
|
|
396
396
|
inertia: { acceleration: 150, resistance: 1.5, restDelta: 0.1 }
|
|
397
|
-
},
|
|
397
|
+
}, Re = {
|
|
398
398
|
spring: { stiffness: 180, damping: 34, restDelta: 0.1, restSpeed: 0.1 }
|
|
399
399
|
};
|
|
400
|
-
function
|
|
401
|
-
const t =
|
|
400
|
+
function ve(e) {
|
|
401
|
+
const t = Ae;
|
|
402
402
|
return {
|
|
403
403
|
out: {
|
|
404
404
|
willChange: "opacity",
|
|
@@ -420,32 +420,32 @@ function he(e) {
|
|
|
420
420
|
}
|
|
421
421
|
};
|
|
422
422
|
}
|
|
423
|
-
function
|
|
423
|
+
function Oe() {
|
|
424
424
|
return {
|
|
425
|
-
outPhysics:
|
|
426
|
-
inPhysics:
|
|
425
|
+
outPhysics: _e,
|
|
426
|
+
inPhysics: Re,
|
|
427
427
|
composition: { mode: "sequence" },
|
|
428
|
-
build:
|
|
428
|
+
build: ve
|
|
429
429
|
};
|
|
430
430
|
}
|
|
431
|
-
const
|
|
432
|
-
snappy:
|
|
433
|
-
directional:
|
|
434
|
-
"non-directional":
|
|
435
|
-
},
|
|
431
|
+
const gt = Ie(), De = {
|
|
432
|
+
snappy: gt,
|
|
433
|
+
directional: gt,
|
|
434
|
+
"non-directional": Oe()
|
|
435
|
+
}, bt = {
|
|
436
436
|
spring: { stiffness: 280, damping: 30, restDelta: 0.1, restSpeed: 0.1 }
|
|
437
|
-
},
|
|
438
|
-
function
|
|
437
|
+
}, Z = 0.1, G = 1 / 3, wt = (e) => Math.max(0, Math.min(1, e));
|
|
438
|
+
function Te({
|
|
439
439
|
direction: e
|
|
440
440
|
}) {
|
|
441
|
-
const t = e === "forward" ? 1 : -1, n = 1 - t *
|
|
441
|
+
const t = e === "forward" ? 1 : -1, n = 1 - t * Z;
|
|
442
442
|
return {
|
|
443
443
|
out: {
|
|
444
444
|
willChange: "transform, opacity",
|
|
445
445
|
startStyle: {},
|
|
446
446
|
animate: (s) => ({
|
|
447
|
-
transform: `scale(${1 + t * s *
|
|
448
|
-
opacity: `${
|
|
447
|
+
transform: `scale(${1 + t * s * Z})`,
|
|
448
|
+
opacity: `${wt(1 - s / G)}`
|
|
449
449
|
})
|
|
450
450
|
},
|
|
451
451
|
in: {
|
|
@@ -455,130 +455,130 @@ function ge({
|
|
|
455
455
|
opacity: "0"
|
|
456
456
|
},
|
|
457
457
|
animate: (s) => ({
|
|
458
|
-
transform: `scale(${n + t * s *
|
|
459
|
-
opacity: `${
|
|
458
|
+
transform: `scale(${n + t * s * Z})`,
|
|
459
|
+
opacity: `${wt((s - G) / (1 - G))}`
|
|
460
460
|
})
|
|
461
461
|
}
|
|
462
462
|
};
|
|
463
463
|
}
|
|
464
|
-
function
|
|
464
|
+
function Fe() {
|
|
465
465
|
return {
|
|
466
|
-
outPhysics:
|
|
467
|
-
inPhysics:
|
|
466
|
+
outPhysics: bt,
|
|
467
|
+
inPhysics: bt,
|
|
468
468
|
// Scale must move together on both sides; fade-through is encoded inside
|
|
469
469
|
// each tick (piecewise), not via composition staggering — so parallel.
|
|
470
470
|
composition: { mode: "parallel" },
|
|
471
|
-
build:
|
|
471
|
+
build: Te
|
|
472
472
|
};
|
|
473
473
|
}
|
|
474
|
-
const
|
|
474
|
+
const St = {
|
|
475
475
|
spring: { stiffness: 280, damping: 30, restDelta: 0.1, restSpeed: 0.1 }
|
|
476
|
-
},
|
|
477
|
-
function
|
|
476
|
+
}, j = 0.1, q = 1 / 3, xt = (e) => Math.max(0, Math.min(1, e));
|
|
477
|
+
function Me() {
|
|
478
478
|
return {
|
|
479
479
|
out: {
|
|
480
480
|
willChange: "opacity",
|
|
481
481
|
startStyle: {},
|
|
482
482
|
animate: (e) => ({
|
|
483
|
-
opacity: `${
|
|
483
|
+
opacity: `${xt(1 - e / q)}`
|
|
484
484
|
})
|
|
485
485
|
},
|
|
486
486
|
in: {
|
|
487
487
|
willChange: "transform, opacity",
|
|
488
488
|
startStyle: {
|
|
489
|
-
transform: `scale(${1 -
|
|
489
|
+
transform: `scale(${1 - j})`,
|
|
490
490
|
opacity: "0"
|
|
491
491
|
},
|
|
492
492
|
animate: (e) => ({
|
|
493
|
-
transform: `scale(${1 -
|
|
494
|
-
opacity: `${
|
|
493
|
+
transform: `scale(${1 - j + e * j})`,
|
|
494
|
+
opacity: `${xt((e - q) / (1 - q))}`
|
|
495
495
|
})
|
|
496
496
|
}
|
|
497
497
|
};
|
|
498
498
|
}
|
|
499
|
-
function
|
|
499
|
+
function Ye() {
|
|
500
500
|
return {
|
|
501
|
-
outPhysics:
|
|
502
|
-
inPhysics:
|
|
501
|
+
outPhysics: St,
|
|
502
|
+
inPhysics: St,
|
|
503
503
|
composition: { mode: "parallel" },
|
|
504
|
-
build:
|
|
504
|
+
build: Me
|
|
505
505
|
};
|
|
506
506
|
}
|
|
507
|
-
const
|
|
508
|
-
snappy:
|
|
509
|
-
directional:
|
|
510
|
-
"non-directional":
|
|
511
|
-
},
|
|
512
|
-
x:
|
|
513
|
-
y:
|
|
514
|
-
z:
|
|
507
|
+
const Ct = Fe(), Le = {
|
|
508
|
+
snappy: Ct,
|
|
509
|
+
directional: Ct,
|
|
510
|
+
"non-directional": Ye()
|
|
511
|
+
}, ke = {
|
|
512
|
+
x: Ce,
|
|
513
|
+
y: De,
|
|
514
|
+
z: Le
|
|
515
515
|
};
|
|
516
|
-
function
|
|
517
|
-
const n =
|
|
516
|
+
function He(e, t) {
|
|
517
|
+
const n = ke[e];
|
|
518
518
|
return n[t] ?? n.snappy;
|
|
519
519
|
}
|
|
520
|
-
const
|
|
521
|
-
function
|
|
520
|
+
const Ne = "x", ze = "snappy";
|
|
521
|
+
function $t(e, t) {
|
|
522
522
|
e.style.willChange = t.willChange, e.style.backfaceVisibility = "hidden", e.style.contain = "layout paint";
|
|
523
523
|
for (const [n, s] of Object.entries(t.startStyle))
|
|
524
524
|
e.style[n] = s;
|
|
525
525
|
}
|
|
526
|
-
function
|
|
526
|
+
function Xt(e) {
|
|
527
527
|
e.style.willChange = "auto", e.style.backfaceVisibility = "", e.style.contain = "", e.style.transform = "", e.style.opacity = "", e.style.clipPath = "";
|
|
528
528
|
}
|
|
529
|
-
function
|
|
530
|
-
|
|
529
|
+
function Ue(e) {
|
|
530
|
+
Xt(e), e.style.pointerEvents = "";
|
|
531
531
|
}
|
|
532
|
-
const
|
|
533
|
-
const t = e.direction ?? "forward", n = e.type ??
|
|
532
|
+
const Ve = (e = {}) => {
|
|
533
|
+
const t = e.direction ?? "forward", n = e.type ?? Ne, s = e.feel ?? ze, o = He(n, s), i = o.build({ direction: t });
|
|
534
534
|
return {
|
|
535
|
-
prepare: ({ from:
|
|
536
|
-
|
|
537
|
-
}),
|
|
538
|
-
|
|
535
|
+
prepare: ({ from: r, to: l }) => (r.then((a) => {
|
|
536
|
+
$t(a, i.out), a.style.pointerEvents = "none";
|
|
537
|
+
}), l.then((a) => {
|
|
538
|
+
$t(a, i.in);
|
|
539
539
|
}), {}),
|
|
540
|
-
animation: ({ from:
|
|
540
|
+
animation: ({ from: r, to: l, context: a }) => {
|
|
541
541
|
if (n === "z") {
|
|
542
|
-
const p =
|
|
543
|
-
|
|
542
|
+
const p = F(a, "from"), d = F(a, "to");
|
|
543
|
+
r.style.clipPath = `inset(${p.top}px 0 calc(100% - ${p.top + p.height}px) 0)`, l.style.clipPath = `inset(${d.top}px 0 calc(100% - ${d.top + d.height}px) 0)`;
|
|
544
544
|
}
|
|
545
|
-
const c = new
|
|
546
|
-
element:
|
|
547
|
-
integrator:
|
|
545
|
+
const c = new b({
|
|
546
|
+
element: r,
|
|
547
|
+
integrator: w.from(o.outPhysics),
|
|
548
548
|
style: (p) => i.out.animate(p),
|
|
549
549
|
// Restore the reused from node's inline styles on complete. This
|
|
550
550
|
// covers willChange/backfaceVisibility/contain/transform/opacity (from
|
|
551
551
|
// applyStartStyle + the WAAPI final frame), pointerEvents (set in
|
|
552
552
|
// prepare), and clipPath (set above for z; harmless no-op otherwise).
|
|
553
|
-
onComplete: () =>
|
|
554
|
-
}),
|
|
555
|
-
element:
|
|
556
|
-
integrator:
|
|
553
|
+
onComplete: () => Ue(r)
|
|
554
|
+
}), u = new b({
|
|
555
|
+
element: l,
|
|
556
|
+
integrator: w.from(o.inPhysics),
|
|
557
557
|
style: (p) => i.in.animate(p),
|
|
558
|
-
onComplete: () =>
|
|
558
|
+
onComplete: () => Xt(l)
|
|
559
559
|
});
|
|
560
|
-
return new
|
|
560
|
+
return new P([c, u], o.composition);
|
|
561
561
|
}
|
|
562
562
|
};
|
|
563
563
|
};
|
|
564
|
-
function
|
|
564
|
+
function Xe(e, t, n) {
|
|
565
565
|
return e === "y" ? t === "non-directional" ? "non-directional" : "directional" : e !== "x" || t === "snappy" || n === "snappy" ? "snappy" : "fluid";
|
|
566
566
|
}
|
|
567
|
-
function
|
|
568
|
-
const { paths: t } = e, n = e.type ?? "x", s = e.variant, o = e.feel, i =
|
|
569
|
-
return
|
|
567
|
+
function so(e) {
|
|
568
|
+
const { paths: t } = e, n = e.type ?? "x", s = e.variant, o = e.feel, i = Xe(n, s, o);
|
|
569
|
+
return ut(
|
|
570
570
|
t,
|
|
571
571
|
{ forward: "forward", backward: "backward" },
|
|
572
|
-
(
|
|
572
|
+
(r) => Ve({ type: n, direction: r, feel: i })
|
|
573
573
|
);
|
|
574
574
|
}
|
|
575
|
-
const
|
|
575
|
+
const Be = {
|
|
576
576
|
spring: { stiffness: 200, damping: 22 }
|
|
577
|
-
},
|
|
578
|
-
function
|
|
577
|
+
}, We = 10, Ze = "horizontal", Ge = "#000000";
|
|
578
|
+
function Et(e, t, n, s, o, i) {
|
|
579
579
|
window.getComputedStyle(e).position === "static" && (e.style.position = "relative");
|
|
580
|
-
const
|
|
581
|
-
|
|
580
|
+
const l = document.createElement("div");
|
|
581
|
+
l.style.cssText = `
|
|
582
582
|
position: absolute;
|
|
583
583
|
top: 0;
|
|
584
584
|
left: 0;
|
|
@@ -588,12 +588,12 @@ function wt(e, t, n, s, o, i) {
|
|
|
588
588
|
z-index: 9999;
|
|
589
589
|
overflow: hidden;
|
|
590
590
|
`;
|
|
591
|
-
const
|
|
591
|
+
const a = [];
|
|
592
592
|
for (let c = 0; c < t; c++) {
|
|
593
|
-
const
|
|
593
|
+
const u = document.createElement("div");
|
|
594
594
|
if (n === "horizontal") {
|
|
595
595
|
const p = 100 / t;
|
|
596
|
-
|
|
596
|
+
u.style.cssText = `
|
|
597
597
|
position: absolute;
|
|
598
598
|
top: ${p * c}%;
|
|
599
599
|
left: 0;
|
|
@@ -606,7 +606,7 @@ function wt(e, t, n, s, o, i) {
|
|
|
606
606
|
`;
|
|
607
607
|
} else {
|
|
608
608
|
const p = 100 / t;
|
|
609
|
-
|
|
609
|
+
u.style.cssText = `
|
|
610
610
|
position: absolute;
|
|
611
611
|
top: 0;
|
|
612
612
|
left: ${p * c}%;
|
|
@@ -618,27 +618,27 @@ function wt(e, t, n, s, o, i) {
|
|
|
618
618
|
will-change: transform;
|
|
619
619
|
`;
|
|
620
620
|
}
|
|
621
|
-
|
|
621
|
+
a.push(u), l.appendChild(u);
|
|
622
622
|
}
|
|
623
|
-
return e.appendChild(
|
|
623
|
+
return e.appendChild(l), { container: l, blinds: a };
|
|
624
624
|
}
|
|
625
|
-
const
|
|
626
|
-
const t = e.blindCount ??
|
|
625
|
+
const je = (e = {}) => {
|
|
626
|
+
const t = e.blindCount ?? We, n = e.direction ?? Ze, s = e.blindColor ?? Ge, o = e.physics ?? Be;
|
|
627
627
|
return {
|
|
628
|
-
prepare: async ({ from: i, to:
|
|
629
|
-
const
|
|
630
|
-
|
|
631
|
-
const c =
|
|
632
|
-
|
|
628
|
+
prepare: async ({ from: i, to: r }) => {
|
|
629
|
+
const l = await i, a = await r;
|
|
630
|
+
l.style.zIndex = "1000";
|
|
631
|
+
const c = Et(
|
|
632
|
+
l,
|
|
633
633
|
t,
|
|
634
634
|
n,
|
|
635
635
|
s,
|
|
636
636
|
"hidden",
|
|
637
637
|
"left"
|
|
638
638
|
);
|
|
639
|
-
|
|
640
|
-
const
|
|
641
|
-
|
|
639
|
+
a.style.position = "relative", a.style.zIndex = "0";
|
|
640
|
+
const u = Et(
|
|
641
|
+
a,
|
|
642
642
|
t,
|
|
643
643
|
n,
|
|
644
644
|
s,
|
|
@@ -646,55 +646,55 @@ const Ae = (e = {}) => {
|
|
|
646
646
|
"right"
|
|
647
647
|
);
|
|
648
648
|
return {
|
|
649
|
-
fromEl:
|
|
649
|
+
fromEl: l,
|
|
650
650
|
fromBlinds: c.blinds,
|
|
651
651
|
fromContainer: c.container,
|
|
652
|
-
toBlinds:
|
|
653
|
-
toContainer:
|
|
652
|
+
toBlinds: u.blinds,
|
|
653
|
+
toContainer: u.container
|
|
654
654
|
};
|
|
655
655
|
},
|
|
656
656
|
animation: ({
|
|
657
657
|
fromEl: i,
|
|
658
|
-
fromBlinds:
|
|
659
|
-
fromContainer:
|
|
660
|
-
toBlinds:
|
|
658
|
+
fromBlinds: r,
|
|
659
|
+
fromContainer: l,
|
|
660
|
+
toBlinds: a,
|
|
661
661
|
toContainer: c
|
|
662
662
|
}) => {
|
|
663
|
-
const
|
|
664
|
-
(
|
|
665
|
-
element:
|
|
666
|
-
integrator:
|
|
663
|
+
const u = r.map(
|
|
664
|
+
(f) => new b({
|
|
665
|
+
element: f,
|
|
666
|
+
integrator: w.from(o),
|
|
667
667
|
style: (h) => ({
|
|
668
668
|
transform: n === "horizontal" ? `scaleX(${h})` : `scaleY(${h})`
|
|
669
669
|
})
|
|
670
670
|
})
|
|
671
|
-
), p =
|
|
672
|
-
(
|
|
673
|
-
element:
|
|
674
|
-
integrator:
|
|
675
|
-
style: (
|
|
671
|
+
), p = a.map(
|
|
672
|
+
(f, h) => new b({
|
|
673
|
+
element: f,
|
|
674
|
+
integrator: w.from(o),
|
|
675
|
+
style: (m, S) => ({
|
|
676
676
|
transform: n === "horizontal" ? `scaleX(${S})` : `scaleY(${S})`
|
|
677
677
|
}),
|
|
678
|
-
onComplete: h ===
|
|
679
|
-
c.remove(),
|
|
678
|
+
onComplete: h === a.length - 1 ? () => {
|
|
679
|
+
c.remove(), l.remove(), i.style.zIndex = "", i.style.position = "";
|
|
680
680
|
} : void 0
|
|
681
681
|
})
|
|
682
|
-
), d = new
|
|
683
|
-
return new
|
|
682
|
+
), d = new P(u, { mode: "parallel" }), y = new P(p, { mode: "parallel" });
|
|
683
|
+
return new P([d, y], { mode: "sequence" });
|
|
684
684
|
}
|
|
685
685
|
};
|
|
686
686
|
};
|
|
687
|
-
function
|
|
687
|
+
function oo(e) {
|
|
688
688
|
const { paths: t, type: n = "horizontal" } = e;
|
|
689
|
-
return
|
|
689
|
+
return R(
|
|
690
690
|
t,
|
|
691
|
-
() =>
|
|
691
|
+
() => je({ direction: n })
|
|
692
692
|
);
|
|
693
693
|
}
|
|
694
|
-
const
|
|
694
|
+
const qe = {
|
|
695
695
|
spring: { stiffness: 200, damping: 20, doubleSpring: 0.7 }
|
|
696
|
-
},
|
|
697
|
-
function
|
|
696
|
+
}, k = 0.5;
|
|
697
|
+
function Ke(e) {
|
|
698
698
|
const t = e === "enter" ? -100 : 100, n = e === "enter" ? 100 : -100;
|
|
699
699
|
return {
|
|
700
700
|
out: {
|
|
@@ -702,29 +702,29 @@ function Ye(e) {
|
|
|
702
702
|
startStyle: {},
|
|
703
703
|
animate: (s) => ({
|
|
704
704
|
transform: `translate3d(${t * s}%, 0, 0)`,
|
|
705
|
-
opacity: `${
|
|
705
|
+
opacity: `${k + (1 - k) * (1 - s)}`
|
|
706
706
|
})
|
|
707
707
|
},
|
|
708
708
|
in: {
|
|
709
709
|
willChange: "transform, opacity",
|
|
710
710
|
startStyle: {
|
|
711
711
|
transform: `translate3d(${n}%, 0, 0)`,
|
|
712
|
-
opacity: `${
|
|
712
|
+
opacity: `${k}`
|
|
713
713
|
},
|
|
714
714
|
animate: (s) => ({
|
|
715
715
|
transform: `translate3d(${n * (1 - s)}%, 0, 0)`,
|
|
716
|
-
opacity: `${
|
|
716
|
+
opacity: `${k + (1 - k) * s}`
|
|
717
717
|
})
|
|
718
718
|
}
|
|
719
719
|
};
|
|
720
720
|
}
|
|
721
|
-
function
|
|
721
|
+
function Je() {
|
|
722
722
|
return {
|
|
723
|
-
physics:
|
|
724
|
-
build:
|
|
723
|
+
physics: qe,
|
|
724
|
+
build: Ke
|
|
725
725
|
};
|
|
726
726
|
}
|
|
727
|
-
const
|
|
727
|
+
const Qe = {
|
|
728
728
|
spring: {
|
|
729
729
|
stiffness: 230,
|
|
730
730
|
damping: 25,
|
|
@@ -734,7 +734,7 @@ const He = {
|
|
|
734
734
|
}
|
|
735
735
|
}
|
|
736
736
|
};
|
|
737
|
-
function
|
|
737
|
+
function tn(e) {
|
|
738
738
|
const t = e === "enter" ? -20 : 100, n = e === "enter" ? 100 : -20;
|
|
739
739
|
return {
|
|
740
740
|
out: {
|
|
@@ -755,117 +755,117 @@ function Me(e) {
|
|
|
755
755
|
}
|
|
756
756
|
};
|
|
757
757
|
}
|
|
758
|
-
function
|
|
758
|
+
function en() {
|
|
759
759
|
return {
|
|
760
|
-
physics:
|
|
761
|
-
build:
|
|
760
|
+
physics: Qe,
|
|
761
|
+
build: tn
|
|
762
762
|
};
|
|
763
763
|
}
|
|
764
|
-
const
|
|
765
|
-
parallax:
|
|
766
|
-
crossfade:
|
|
767
|
-
},
|
|
768
|
-
function
|
|
764
|
+
const nn = {
|
|
765
|
+
parallax: en(),
|
|
766
|
+
crossfade: Je()
|
|
767
|
+
}, v = "0", Bt = "1", O = "2", sn = "parallax";
|
|
768
|
+
function Pt(e, t) {
|
|
769
769
|
e.style.willChange = t.willChange, e.style.backfaceVisibility = "hidden", e.style.contain = "layout paint";
|
|
770
770
|
for (const [n, s] of Object.entries(t.startStyle))
|
|
771
771
|
e.style[n] = s;
|
|
772
772
|
}
|
|
773
|
-
const
|
|
774
|
-
const t = e.direction ?? "enter", n =
|
|
773
|
+
const on = (e = {}) => {
|
|
774
|
+
const t = e.direction ?? "enter", n = nn[e.type ?? sn], s = n.physics, o = n.build(t), i = t === "enter" ? v : O, r = t === "enter" ? O : v;
|
|
775
775
|
return {
|
|
776
|
-
prepare: ({ from:
|
|
777
|
-
|
|
778
|
-
}),
|
|
779
|
-
|
|
776
|
+
prepare: ({ from: l, to: a }) => (l.then((c) => {
|
|
777
|
+
Pt(c, o.out), c.style.pointerEvents = "none", c.style.zIndex = i;
|
|
778
|
+
}), a.then((c) => {
|
|
779
|
+
Pt(c, o.in), c.style.position = "relative", c.style.zIndex = r;
|
|
780
780
|
}), {}),
|
|
781
|
-
animation: ({ from:
|
|
782
|
-
const c = new
|
|
783
|
-
element:
|
|
784
|
-
integrator:
|
|
781
|
+
animation: ({ from: l, to: a }) => {
|
|
782
|
+
const c = new b({
|
|
783
|
+
element: l,
|
|
784
|
+
integrator: w.from(s),
|
|
785
785
|
style: (p) => o.out.animate(p),
|
|
786
786
|
// The outgoing node is the real, reused element (re-hidden on navigate),
|
|
787
787
|
// so clear every inline style we set on it — mirroring the `to` cleanup,
|
|
788
788
|
// plus the out-only `pointerEvents` / `zIndex`.
|
|
789
789
|
onComplete: () => {
|
|
790
|
-
|
|
790
|
+
l.style.willChange = "auto", l.style.backfaceVisibility = "", l.style.contain = "", l.style.transform = "", l.style.opacity = "", l.style.pointerEvents = "", l.style.zIndex = "";
|
|
791
791
|
}
|
|
792
|
-
}),
|
|
793
|
-
element:
|
|
794
|
-
integrator:
|
|
792
|
+
}), u = new b({
|
|
793
|
+
element: a,
|
|
794
|
+
integrator: w.from(s),
|
|
795
795
|
style: (p) => o.in.animate(p),
|
|
796
796
|
onComplete: () => {
|
|
797
|
-
|
|
797
|
+
a.style.willChange = "auto", a.style.backfaceVisibility = "", a.style.contain = "", a.style.transform = "", a.style.opacity = "", a.style.position === "relative" && (a.style.position = ""), a.style.zIndex === r && (a.style.zIndex = "");
|
|
798
798
|
}
|
|
799
799
|
});
|
|
800
|
-
for (const p of [c,
|
|
800
|
+
for (const p of [c, u]) {
|
|
801
801
|
const d = p.onComplete;
|
|
802
802
|
p.onComplete = () => {
|
|
803
803
|
d == null || d(), p.releaseFill();
|
|
804
804
|
};
|
|
805
805
|
}
|
|
806
|
-
return new
|
|
806
|
+
return new P([c, u], { mode: "parallel" });
|
|
807
807
|
}
|
|
808
808
|
};
|
|
809
809
|
};
|
|
810
|
-
function
|
|
810
|
+
function rn(e) {
|
|
811
811
|
return e === "slide" || e === "crossfade" ? "crossfade" : "parallax";
|
|
812
812
|
}
|
|
813
|
-
function
|
|
814
|
-
const { enter: t, exit: n } = e, s = e.type, o =
|
|
815
|
-
return
|
|
813
|
+
function io(e) {
|
|
814
|
+
const { enter: t, exit: n } = e, s = e.type, o = rn(s);
|
|
815
|
+
return Ut(
|
|
816
816
|
{ enter: t, exit: n },
|
|
817
|
-
(i) =>
|
|
817
|
+
(i) => on({ direction: i, type: o })
|
|
818
818
|
);
|
|
819
819
|
}
|
|
820
|
-
const
|
|
820
|
+
const an = {
|
|
821
821
|
spring: { stiffness: 180, damping: 20, doubleSpring: !0 }
|
|
822
|
-
},
|
|
822
|
+
}, ln = {
|
|
823
823
|
spring: { stiffness: 170, damping: 20, doubleSpring: !0 }
|
|
824
|
-
},
|
|
825
|
-
const t = e.physics ??
|
|
824
|
+
}, cn = (e = {}) => {
|
|
825
|
+
const t = e.physics ?? ln, n = e.physics ?? an;
|
|
826
826
|
return {
|
|
827
827
|
prepare: ({ to: s }) => (s.then((o) => {
|
|
828
828
|
o.style.opacity = "0", o.style.willChange = "opacity";
|
|
829
829
|
}), {}),
|
|
830
830
|
animation: ({ from: s, to: o }) => {
|
|
831
|
-
const i = new
|
|
831
|
+
const i = new b({
|
|
832
832
|
element: s,
|
|
833
|
-
integrator:
|
|
833
|
+
integrator: w.from(n),
|
|
834
834
|
// Default bounds (0, 1). `u` runs 1→0 as the animation moves
|
|
835
835
|
// forward, mapping opacity from fully visible to invisible.
|
|
836
|
-
style: (
|
|
836
|
+
style: (l, a) => ({ opacity: a }),
|
|
837
837
|
onComplete: () => {
|
|
838
838
|
s.style.willChange = "auto", s.style.opacity = "";
|
|
839
839
|
}
|
|
840
|
-
}),
|
|
840
|
+
}), r = new b({
|
|
841
841
|
element: o,
|
|
842
|
-
integrator:
|
|
843
|
-
style: (
|
|
842
|
+
integrator: w.from(t),
|
|
843
|
+
style: (l) => ({ opacity: l }),
|
|
844
844
|
onComplete: () => {
|
|
845
845
|
o.style.willChange = "auto", o.style.opacity = "";
|
|
846
846
|
}
|
|
847
847
|
});
|
|
848
|
-
return new
|
|
848
|
+
return new P([i, r], { mode: "sequence" });
|
|
849
849
|
}
|
|
850
850
|
};
|
|
851
851
|
};
|
|
852
|
-
function
|
|
852
|
+
function ro(e) {
|
|
853
853
|
const { paths: t } = e;
|
|
854
|
-
return
|
|
854
|
+
return R(t, () => cn());
|
|
855
855
|
}
|
|
856
|
-
const
|
|
856
|
+
const K = {
|
|
857
857
|
scaleDown: { stiffness: 20, damping: 7 },
|
|
858
858
|
translate: { stiffness: 15, damping: 7 },
|
|
859
859
|
scaleUp: { stiffness: 20, damping: 7 }
|
|
860
|
-
},
|
|
860
|
+
}, M = {
|
|
861
861
|
scaleDown: 0,
|
|
862
862
|
translate: 0.2,
|
|
863
863
|
scaleUp: 0.8
|
|
864
|
-
},
|
|
865
|
-
function
|
|
866
|
-
const { items: t, from: n, to: s, recordFrame: o } = e, i =
|
|
864
|
+
}, pn = 0.8, un = "white", It = 1e3 / 60, dn = 600;
|
|
865
|
+
function fn(e) {
|
|
866
|
+
const { items: t, from: n, to: s, recordFrame: o } = e, i = It / 1e3, r = Math.abs(s - n), l = t.map((c) => ({
|
|
867
867
|
item: c,
|
|
868
|
-
integrator: new
|
|
868
|
+
integrator: new B({
|
|
869
869
|
stiffness: c.spring.stiffness,
|
|
870
870
|
damping: c.spring.damping
|
|
871
871
|
}),
|
|
@@ -874,115 +874,115 @@ function Ke(e) {
|
|
|
874
874
|
settled: !1,
|
|
875
875
|
settleTime: 0
|
|
876
876
|
}));
|
|
877
|
-
for (let c = 0; c <
|
|
878
|
-
(c === 0 ||
|
|
877
|
+
for (let c = 0; c < l.length; c++)
|
|
878
|
+
(c === 0 || l[c].item.offset === 0) && (l[c].started = !0);
|
|
879
879
|
o(0);
|
|
880
|
-
let
|
|
881
|
-
for (let c = 1; c <=
|
|
882
|
-
const
|
|
883
|
-
|
|
884
|
-
for (const p of
|
|
885
|
-
!p.started || p.settled || (p.state = p.integrator.step(p.state, s, i), p.integrator.isSettled(p.state, s) ? (p.settleTime += i, p.settleTime >=
|
|
886
|
-
for (let p = 1; p <
|
|
887
|
-
const d =
|
|
880
|
+
let a = 0;
|
|
881
|
+
for (let c = 1; c <= dn; c++) {
|
|
882
|
+
const u = c * It;
|
|
883
|
+
a = u;
|
|
884
|
+
for (const p of l)
|
|
885
|
+
!p.started || p.settled || (p.state = p.integrator.step(p.state, s, i), p.integrator.isSettled(p.state, s) ? (p.settleTime += i, p.settleTime >= ce && (p.state = { position: s, velocity: 0 }, p.settled = !0)) : p.settleTime = 0, p.item.tick(p.state.position));
|
|
886
|
+
for (let p = 1; p < l.length; p++) {
|
|
887
|
+
const d = l[p];
|
|
888
888
|
if (d.started) continue;
|
|
889
|
-
const
|
|
890
|
-
if (!
|
|
891
|
-
(
|
|
889
|
+
const y = l[p - 1];
|
|
890
|
+
if (!y.started) continue;
|
|
891
|
+
(r === 0 ? 1 : Math.abs(y.state.position - n) / r) >= d.item.offset && (d.started = !0);
|
|
892
892
|
}
|
|
893
|
-
if (o(
|
|
893
|
+
if (o(u), l.every((p) => p.settled)) return u;
|
|
894
894
|
}
|
|
895
|
-
return
|
|
895
|
+
return a;
|
|
896
896
|
}
|
|
897
|
-
function
|
|
897
|
+
function J(e, t) {
|
|
898
898
|
return e != null && e.spring ? {
|
|
899
899
|
stiffness: e.spring.stiffness,
|
|
900
900
|
damping: e.spring.damping
|
|
901
901
|
} : t;
|
|
902
902
|
}
|
|
903
|
-
function
|
|
904
|
-
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 },
|
|
903
|
+
function At(e) {
|
|
904
|
+
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 }, r = J(o, K.scaleDown), l = J(o, K.translate), a = J(o, K.scaleUp), c = s === "out" ? 1 : 0, u = s === "out" ? 0 : 1, p = s === "out" ? [
|
|
905
905
|
{
|
|
906
|
-
spring:
|
|
907
|
-
offset:
|
|
908
|
-
tick: (
|
|
909
|
-
const h = 1 -
|
|
906
|
+
spring: r,
|
|
907
|
+
offset: M.scaleDown,
|
|
908
|
+
tick: (f) => {
|
|
909
|
+
const h = 1 - f;
|
|
910
910
|
i.scale = 1 - (1 - n) * h;
|
|
911
911
|
}
|
|
912
912
|
},
|
|
913
913
|
{
|
|
914
|
-
spring:
|
|
915
|
-
offset:
|
|
916
|
-
tick: (
|
|
917
|
-
const h = 1 -
|
|
914
|
+
spring: l,
|
|
915
|
+
offset: M.translate,
|
|
916
|
+
tick: (f) => {
|
|
917
|
+
const h = 1 - f;
|
|
918
918
|
i.translateY = -t.top - t.height * h;
|
|
919
919
|
}
|
|
920
920
|
},
|
|
921
921
|
{
|
|
922
|
-
spring:
|
|
923
|
-
offset:
|
|
924
|
-
tick: (
|
|
925
|
-
const h = 1 -
|
|
922
|
+
spring: a,
|
|
923
|
+
offset: M.scaleUp,
|
|
924
|
+
tick: (f) => {
|
|
925
|
+
const h = 1 - f;
|
|
926
926
|
i.scale = n + (1 - n) * h;
|
|
927
927
|
}
|
|
928
928
|
}
|
|
929
929
|
] : [
|
|
930
930
|
{
|
|
931
|
-
spring:
|
|
932
|
-
offset:
|
|
933
|
-
tick: (
|
|
934
|
-
i.scale = 1 - (1 - n) *
|
|
931
|
+
spring: r,
|
|
932
|
+
offset: M.scaleDown,
|
|
933
|
+
tick: (f) => {
|
|
934
|
+
i.scale = 1 - (1 - n) * f;
|
|
935
935
|
}
|
|
936
936
|
},
|
|
937
937
|
{
|
|
938
|
-
spring:
|
|
939
|
-
offset:
|
|
940
|
-
tick: (
|
|
941
|
-
i.translateY = -t.top + t.height * (1 -
|
|
938
|
+
spring: l,
|
|
939
|
+
offset: M.translate,
|
|
940
|
+
tick: (f) => {
|
|
941
|
+
i.translateY = -t.top + t.height * (1 - f);
|
|
942
942
|
}
|
|
943
943
|
},
|
|
944
944
|
{
|
|
945
|
-
spring:
|
|
946
|
-
offset:
|
|
947
|
-
tick: (
|
|
948
|
-
i.scale = n + (1 - n) *
|
|
945
|
+
spring: a,
|
|
946
|
+
offset: M.scaleUp,
|
|
947
|
+
tick: (f) => {
|
|
948
|
+
i.scale = n + (1 - n) * f;
|
|
949
949
|
}
|
|
950
950
|
}
|
|
951
|
-
], d = [],
|
|
951
|
+
], d = [], y = fn({
|
|
952
952
|
items: p,
|
|
953
953
|
from: c,
|
|
954
|
-
to:
|
|
955
|
-
recordFrame: (
|
|
956
|
-
time:
|
|
954
|
+
to: u,
|
|
955
|
+
recordFrame: (f) => d.push({
|
|
956
|
+
time: f,
|
|
957
957
|
scale: i.scale,
|
|
958
958
|
translateY: i.translateY
|
|
959
959
|
})
|
|
960
960
|
});
|
|
961
|
-
return { snapshots: d, totalDuration:
|
|
961
|
+
return { snapshots: d, totalDuration: y };
|
|
962
962
|
}
|
|
963
|
-
function
|
|
963
|
+
function hn(e, t) {
|
|
964
964
|
if (e.length === 0) return { time: 0, scale: 1, translateY: 0 };
|
|
965
965
|
if (e.length === 1 || t <= 0) return e[0];
|
|
966
966
|
if (t >= 1) return e[e.length - 1];
|
|
967
967
|
const n = t * (e.length - 1), s = Math.floor(n), o = Math.ceil(n);
|
|
968
968
|
if (s === o) return e[s];
|
|
969
|
-
const i = e[s],
|
|
969
|
+
const i = e[s], r = e[o], l = n - s;
|
|
970
970
|
return {
|
|
971
|
-
time: i.time + (
|
|
972
|
-
scale: i.scale + (
|
|
973
|
-
translateY: i.translateY + (
|
|
971
|
+
time: i.time + (r.time - i.time) * l,
|
|
972
|
+
scale: i.scale + (r.scale - i.scale) * l,
|
|
973
|
+
translateY: i.translateY + (r.translateY - i.translateY) * l
|
|
974
974
|
};
|
|
975
975
|
}
|
|
976
|
-
const
|
|
976
|
+
const yn = [
|
|
977
977
|
[1, 1],
|
|
978
978
|
[-1, 1],
|
|
979
979
|
[1, -1],
|
|
980
980
|
[-1, -1]
|
|
981
981
|
];
|
|
982
|
-
function
|
|
983
|
-
const o = (i,
|
|
984
|
-
const
|
|
985
|
-
Object.assign(
|
|
982
|
+
function mn(e, t) {
|
|
983
|
+
const o = (i, r, l) => {
|
|
984
|
+
const a = document.createElement("div");
|
|
985
|
+
Object.assign(a.style, {
|
|
986
986
|
position: "fixed",
|
|
987
987
|
pointerEvents: "none",
|
|
988
988
|
zIndex: "9999",
|
|
@@ -996,18 +996,18 @@ function Qe(e, t) {
|
|
|
996
996
|
width: "15px",
|
|
997
997
|
height: "1px",
|
|
998
998
|
backgroundColor: e,
|
|
999
|
-
[
|
|
1000
|
-
[
|
|
999
|
+
[l]: "0",
|
|
1000
|
+
[r]: "0"
|
|
1001
1001
|
});
|
|
1002
|
-
const
|
|
1003
|
-
return Object.assign(
|
|
1002
|
+
const u = document.createElement("div");
|
|
1003
|
+
return Object.assign(u.style, {
|
|
1004
1004
|
position: "absolute",
|
|
1005
1005
|
width: "1px",
|
|
1006
1006
|
height: "15px",
|
|
1007
1007
|
backgroundColor: e,
|
|
1008
|
-
[
|
|
1009
|
-
[
|
|
1010
|
-
}),
|
|
1008
|
+
[l]: "0",
|
|
1009
|
+
[r]: "0"
|
|
1010
|
+
}), a.appendChild(c), a.appendChild(u), a;
|
|
1011
1011
|
};
|
|
1012
1012
|
return {
|
|
1013
1013
|
topLeft: o(
|
|
@@ -1044,11 +1044,11 @@ function Qe(e, t) {
|
|
|
1044
1044
|
)
|
|
1045
1045
|
};
|
|
1046
1046
|
}
|
|
1047
|
-
function
|
|
1047
|
+
function _t(e, t) {
|
|
1048
1048
|
const n = t.left + t.width / 2, s = t.top + t.height / 2;
|
|
1049
1049
|
e.style.transformOrigin = `${n}px ${s}px`;
|
|
1050
1050
|
}
|
|
1051
|
-
function
|
|
1051
|
+
function Rt(e, t) {
|
|
1052
1052
|
e.style.clipPath = `polygon(
|
|
1053
1053
|
${t.left}px ${t.top}px,
|
|
1054
1054
|
${t.left + t.width}px ${t.top}px,
|
|
@@ -1056,25 +1056,25 @@ function xt(e, t) {
|
|
|
1056
1056
|
${t.left}px ${t.top + t.height}px
|
|
1057
1057
|
)`;
|
|
1058
1058
|
}
|
|
1059
|
-
function
|
|
1059
|
+
function Q(e, t, n, s, o) {
|
|
1060
1060
|
const i = n / 1e3;
|
|
1061
|
-
return new
|
|
1061
|
+
return new b({
|
|
1062
1062
|
element: e,
|
|
1063
|
-
integrator: new
|
|
1063
|
+
integrator: new ye({ durationSec: i }),
|
|
1064
1064
|
lowerBound: 0,
|
|
1065
1065
|
upperBound: 1,
|
|
1066
|
-
style: (
|
|
1066
|
+
style: (r) => s(hn(t, r)),
|
|
1067
1067
|
onComplete: o
|
|
1068
1068
|
});
|
|
1069
1069
|
}
|
|
1070
|
-
const
|
|
1070
|
+
const gn = (e = {}) => {
|
|
1071
1071
|
var o;
|
|
1072
|
-
const t = ((o = e.border) == null ? void 0 : o.color) ??
|
|
1072
|
+
const t = ((o = e.border) == null ? void 0 : o.color) ?? un, n = pn, s = e.physics;
|
|
1073
1073
|
return {
|
|
1074
|
-
prepare: ({ from: i, to:
|
|
1075
|
-
const
|
|
1076
|
-
...
|
|
1077
|
-
top:
|
|
1074
|
+
prepare: ({ from: i, to: r, context: l }) => {
|
|
1075
|
+
const a = F(l, "from"), c = F(l, "to"), u = H(document.body, l.positionedParent), p = mn(t, {
|
|
1076
|
+
...a,
|
|
1077
|
+
top: u.top
|
|
1078
1078
|
});
|
|
1079
1079
|
for (const d of [
|
|
1080
1080
|
"topLeft",
|
|
@@ -1082,147 +1082,187 @@ const tn = (e = {}) => {
|
|
|
1082
1082
|
"bottomLeft",
|
|
1083
1083
|
"bottomRight"
|
|
1084
1084
|
])
|
|
1085
|
-
|
|
1085
|
+
l.positionedParent.appendChild(p[d]);
|
|
1086
1086
|
return i.then((d) => {
|
|
1087
|
-
|
|
1088
|
-
}),
|
|
1089
|
-
|
|
1090
|
-
}), { borders: p, fromRect:
|
|
1087
|
+
_t(d, a), Rt(d, a), d.style.transform = `translateY(${-a.top}px)`;
|
|
1088
|
+
}), r.then((d) => {
|
|
1089
|
+
_t(d, c), Rt(d, c), d.style.transform = `translateY(${-c.top + c.height}px) scale(${n})`;
|
|
1090
|
+
}), { borders: p, fromRect: a, toRect: c };
|
|
1091
1091
|
},
|
|
1092
|
-
animation: ({ from: i, to:
|
|
1093
|
-
const p =
|
|
1092
|
+
animation: ({ from: i, to: r, context: l, borders: a, fromRect: c, toRect: u }) => {
|
|
1093
|
+
const p = At({
|
|
1094
1094
|
rect: c,
|
|
1095
1095
|
scale: n,
|
|
1096
1096
|
direction: "out",
|
|
1097
1097
|
override: s
|
|
1098
|
-
}), d =
|
|
1099
|
-
rect:
|
|
1098
|
+
}), d = At({
|
|
1099
|
+
rect: u,
|
|
1100
1100
|
scale: n,
|
|
1101
1101
|
direction: "in",
|
|
1102
1102
|
override: s
|
|
1103
|
-
}),
|
|
1103
|
+
}), y = Q(
|
|
1104
1104
|
i,
|
|
1105
1105
|
p.snapshots,
|
|
1106
1106
|
p.totalDuration,
|
|
1107
|
-
(
|
|
1108
|
-
transform: `translateY(${
|
|
1107
|
+
(g) => ({
|
|
1108
|
+
transform: `translateY(${g.translateY}px) scale(${g.scale})`
|
|
1109
1109
|
}),
|
|
1110
1110
|
() => {
|
|
1111
1111
|
i.style.clipPath = "", i.style.transformOrigin = "", i.style.transform = "";
|
|
1112
1112
|
}
|
|
1113
|
-
),
|
|
1114
|
-
|
|
1113
|
+
), f = Q(
|
|
1114
|
+
r,
|
|
1115
1115
|
d.snapshots,
|
|
1116
1116
|
d.totalDuration,
|
|
1117
|
-
(
|
|
1118
|
-
transform: `translateY(${
|
|
1117
|
+
(g) => ({
|
|
1118
|
+
transform: `translateY(${g.translateY}px) scale(${g.scale})`
|
|
1119
1119
|
}),
|
|
1120
1120
|
() => {
|
|
1121
|
-
|
|
1121
|
+
r.style.clipPath = "", r.style.transformOrigin = "", r.style.transform = "";
|
|
1122
1122
|
}
|
|
1123
|
-
), h =
|
|
1124
|
-
const C = ["topLeft", "topRight", "bottomLeft", "bottomRight"][
|
|
1125
|
-
return
|
|
1126
|
-
|
|
1123
|
+
), h = yn.map(([g, $], x) => {
|
|
1124
|
+
const C = ["topLeft", "topRight", "bottomLeft", "bottomRight"][x];
|
|
1125
|
+
return Q(
|
|
1126
|
+
a[C],
|
|
1127
1127
|
p.snapshots,
|
|
1128
1128
|
p.totalDuration,
|
|
1129
|
-
(
|
|
1130
|
-
const
|
|
1131
|
-
return { transform: `translate(${
|
|
1129
|
+
(_) => {
|
|
1130
|
+
const A = (c.width - c.width * _.scale) / 2 * 0.7 * g, I = (c.height - c.height * _.scale) / 2 * 0.7 * $;
|
|
1131
|
+
return { transform: `translate(${A}px, ${I}px)` };
|
|
1132
1132
|
}
|
|
1133
1133
|
);
|
|
1134
|
-
}),
|
|
1134
|
+
}), m = new P([y, f, ...h], {
|
|
1135
1135
|
mode: "parallel"
|
|
1136
|
-
}), S =
|
|
1137
|
-
return
|
|
1136
|
+
}), S = m.onComplete;
|
|
1137
|
+
return m.onComplete = () => {
|
|
1138
1138
|
S == null || S();
|
|
1139
|
-
const
|
|
1140
|
-
for (const
|
|
1139
|
+
const g = l.positionedParent;
|
|
1140
|
+
for (const $ of [
|
|
1141
1141
|
"topLeft",
|
|
1142
1142
|
"topRight",
|
|
1143
1143
|
"bottomLeft",
|
|
1144
1144
|
"bottomRight"
|
|
1145
1145
|
]) {
|
|
1146
|
-
const
|
|
1147
|
-
|
|
1146
|
+
const x = a[$];
|
|
1147
|
+
x.parentElement === g && g.removeChild(x);
|
|
1148
1148
|
}
|
|
1149
|
-
},
|
|
1149
|
+
}, m;
|
|
1150
1150
|
}
|
|
1151
1151
|
};
|
|
1152
1152
|
};
|
|
1153
|
-
function
|
|
1153
|
+
function ao(e) {
|
|
1154
1154
|
const { paths: t, options: n } = e, s = (n == null ? void 0 : n.borderColor) !== void 0 ? { border: { color: n.borderColor } } : void 0;
|
|
1155
|
-
return
|
|
1156
|
-
}
|
|
1157
|
-
const Et = "data-hero-enter-key", Pt = "data-hero-exit-key", K = "data-hero-key";
|
|
1158
|
-
class en {
|
|
1159
|
-
constructor() {
|
|
1160
|
-
x(this, "previousFromOpacity", "");
|
|
1161
|
-
}
|
|
1162
|
-
prepare(t) {
|
|
1163
|
-
t.from.then((n) => {
|
|
1164
|
-
this.previousFromOpacity = n.style.opacity, n.style.opacity = "0";
|
|
1165
|
-
});
|
|
1166
|
-
}
|
|
1167
|
-
contribute(t) {
|
|
1168
|
-
return t.onComplete(() => {
|
|
1169
|
-
t.from.style.opacity = this.previousFromOpacity;
|
|
1170
|
-
}), [];
|
|
1171
|
-
}
|
|
1155
|
+
return R(t, () => gn(s));
|
|
1172
1156
|
}
|
|
1173
|
-
|
|
1174
|
-
class sn {
|
|
1175
|
-
contribute(t) {
|
|
1176
|
-
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;
|
|
1177
|
-
return s.style.opacity = "0", n.style.willChange = "opacity", s.style.willChange = "opacity", i(() => {
|
|
1178
|
-
n.style.opacity = l, s.style.opacity = a, n.style.willChange = r, s.style.willChange = c;
|
|
1179
|
-
}), [
|
|
1180
|
-
new m({
|
|
1181
|
-
element: n,
|
|
1182
|
-
integrator: g.from(o),
|
|
1183
|
-
style: (f, p) => ({ opacity: p })
|
|
1184
|
-
}),
|
|
1185
|
-
new m({
|
|
1186
|
-
element: s,
|
|
1187
|
-
integrator: g.from(o),
|
|
1188
|
-
style: (f) => ({ opacity: f })
|
|
1189
|
-
})
|
|
1190
|
-
];
|
|
1191
|
-
}
|
|
1192
|
-
}
|
|
1193
|
-
const on = () => new sn(), rn = {
|
|
1194
|
-
static: nn,
|
|
1195
|
-
fade: on
|
|
1196
|
-
}, an = {
|
|
1197
|
-
spring: { stiffness: 320, damping: 30 }
|
|
1198
|
-
}, ln = () => an, cn = {
|
|
1199
|
-
spring: { stiffness: 300, damping: 30, doubleSpring: 1 }
|
|
1200
|
-
}, pn = () => cn, fn = {
|
|
1201
|
-
default: ln,
|
|
1202
|
-
smooth: pn
|
|
1203
|
-
}, dn = 700, yn = "data-hero-aspect-ratio", hn = "data-hero-radius";
|
|
1204
|
-
function un(e) {
|
|
1157
|
+
function bn(e) {
|
|
1205
1158
|
if (!e) return null;
|
|
1206
1159
|
if (e.includes("/")) {
|
|
1207
|
-
const
|
|
1208
|
-
|
|
1160
|
+
const n = e.split("/");
|
|
1161
|
+
if (n.length !== 2) return null;
|
|
1162
|
+
const s = Number.parseFloat(n[0] ?? ""), o = Number.parseFloat(n[1] ?? "");
|
|
1163
|
+
return Number.isFinite(s) && Number.isFinite(o) && s > 0 && o > 0 ? s / o : null;
|
|
1209
1164
|
}
|
|
1210
|
-
const t = parseFloat(e);
|
|
1165
|
+
const t = Number.parseFloat(e);
|
|
1211
1166
|
return Number.isFinite(t) && t > 0 ? t : null;
|
|
1212
1167
|
}
|
|
1213
|
-
function
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
return
|
|
1168
|
+
function wn(e) {
|
|
1169
|
+
return e === "contain" || e === "cover" ? e : null;
|
|
1170
|
+
}
|
|
1171
|
+
function rt(e) {
|
|
1172
|
+
return e.tagName === "IMG";
|
|
1173
|
+
}
|
|
1174
|
+
function Sn(e) {
|
|
1175
|
+
if (rt(e)) return e;
|
|
1176
|
+
if (e.tagName === "PICTURE" || e.tagName === "VIDEO")
|
|
1177
|
+
return null;
|
|
1178
|
+
const t = [];
|
|
1179
|
+
for (const n of Array.from(e.children)) {
|
|
1180
|
+
const s = n;
|
|
1181
|
+
rt(s) && t.push(s);
|
|
1182
|
+
}
|
|
1183
|
+
return t.length === 1 ? t[0] ?? null : null;
|
|
1184
|
+
}
|
|
1185
|
+
function xn(e) {
|
|
1186
|
+
var a, c;
|
|
1187
|
+
if (!rt(e)) return null;
|
|
1188
|
+
const t = e, n = t.naturalWidth, s = t.naturalHeight;
|
|
1189
|
+
if (typeof n == "number" && typeof s == "number" && Number.isFinite(n) && Number.isFinite(s) && n > 0 && s > 0)
|
|
1190
|
+
return n / s;
|
|
1191
|
+
const o = ((a = e.getAttribute("width")) == null ? void 0 : a.trim()) ?? "", i = ((c = e.getAttribute("height")) == null ? void 0 : c.trim()) ?? "", r = o === "" ? Number.NaN : Number(o), l = i === "" ? Number.NaN : Number(i);
|
|
1192
|
+
return Number.isFinite(r) && Number.isFinite(l) && r > 0 && l > 0 ? r / l : null;
|
|
1193
|
+
}
|
|
1194
|
+
function Cn(e) {
|
|
1195
|
+
const t = e.trim().toLowerCase().replace(/\s+/g, " ");
|
|
1196
|
+
return t === "" || t === "center" || t === "center center" || t === "50% 50%";
|
|
1197
|
+
}
|
|
1198
|
+
function W(e) {
|
|
1199
|
+
if (typeof getComputedStyle == "function")
|
|
1200
|
+
try {
|
|
1201
|
+
return getComputedStyle(e);
|
|
1202
|
+
} catch {
|
|
1203
|
+
}
|
|
1204
|
+
return e.style;
|
|
1205
|
+
}
|
|
1206
|
+
function $n(e) {
|
|
1207
|
+
const t = W(e), n = Cn(t.objectPosition ?? "");
|
|
1208
|
+
return {
|
|
1209
|
+
fit: n ? wn(t.objectFit ?? null) : null,
|
|
1210
|
+
centered: n
|
|
1211
|
+
};
|
|
1212
|
+
}
|
|
1213
|
+
function Wt(e) {
|
|
1214
|
+
if (!e) return 0;
|
|
1215
|
+
const t = /^(-?(?:\d+\.?\d*|\.\d+))px$/.exec(e.trim());
|
|
1216
|
+
if (!t) return null;
|
|
1217
|
+
const n = Number.parseFloat(t[1] ?? "");
|
|
1218
|
+
return Number.isFinite(n) && n >= 0 ? n : null;
|
|
1219
|
+
}
|
|
1220
|
+
function vt(e) {
|
|
1221
|
+
const t = W(e), n = [
|
|
1222
|
+
t.borderTopLeftRadius,
|
|
1223
|
+
t.borderTopRightRadius,
|
|
1224
|
+
t.borderBottomRightRadius,
|
|
1225
|
+
t.borderBottomLeftRadius
|
|
1226
|
+
].map(Wt), s = n[0];
|
|
1227
|
+
if (s == null)
|
|
1228
|
+
return { radius: 0, supported: !1 };
|
|
1229
|
+
const o = n.every(
|
|
1230
|
+
(i) => i !== null && Math.abs(i - s) < 1e-3
|
|
1231
|
+
);
|
|
1232
|
+
return { radius: o ? s : 0, supported: o };
|
|
1233
|
+
}
|
|
1234
|
+
function En(e, t) {
|
|
1235
|
+
var o;
|
|
1236
|
+
if (!t) return null;
|
|
1237
|
+
const n = (o = e.getAttribute(t)) == null ? void 0 : o.trim();
|
|
1238
|
+
if (n == null || n === "") return null;
|
|
1239
|
+
const s = Number.parseFloat(n);
|
|
1240
|
+
return Number.isFinite(s) && s >= 0 ? s : null;
|
|
1218
1241
|
}
|
|
1219
|
-
function
|
|
1242
|
+
function Pn(e) {
|
|
1243
|
+
const t = W(e);
|
|
1244
|
+
return [
|
|
1245
|
+
t.paddingTop,
|
|
1246
|
+
t.paddingRight,
|
|
1247
|
+
t.paddingBottom,
|
|
1248
|
+
t.paddingLeft,
|
|
1249
|
+
t.borderTopWidth,
|
|
1250
|
+
t.borderRightWidth,
|
|
1251
|
+
t.borderBottomWidth,
|
|
1252
|
+
t.borderLeftWidth
|
|
1253
|
+
].every((s) => s ? Wt(s) === 0 : !0);
|
|
1254
|
+
}
|
|
1255
|
+
function In(e) {
|
|
1256
|
+
const t = W(e), n = (s) => s === "hidden" || s === "clip";
|
|
1257
|
+
return n(t.overflowX) && n(t.overflowY);
|
|
1258
|
+
}
|
|
1259
|
+
function D(e) {
|
|
1220
1260
|
return e.left + e.width / 2;
|
|
1221
1261
|
}
|
|
1222
|
-
function
|
|
1262
|
+
function T(e) {
|
|
1223
1263
|
return e.top + e.height / 2;
|
|
1224
1264
|
}
|
|
1225
|
-
function
|
|
1265
|
+
function dt(e, t) {
|
|
1226
1266
|
return {
|
|
1227
1267
|
top: Math.max(0, t.top - e.top),
|
|
1228
1268
|
right: Math.max(0, e.left + e.width - (t.left + t.width)),
|
|
@@ -1230,7 +1270,14 @@ function mn(e, t) {
|
|
|
1230
1270
|
left: Math.max(0, t.left - e.left)
|
|
1231
1271
|
};
|
|
1232
1272
|
}
|
|
1233
|
-
function
|
|
1273
|
+
function An(e, t) {
|
|
1274
|
+
const n = Math.max(e.left, t.left), s = Math.max(e.top, t.top), o = Math.min(e.left + e.width, t.left + t.width), i = Math.min(e.top + e.height, t.top + t.height);
|
|
1275
|
+
return o > n && i > s ? { left: n, top: s, width: o - n, height: i - s } : null;
|
|
1276
|
+
}
|
|
1277
|
+
function Ot(e, t) {
|
|
1278
|
+
return Math.abs(e.left - t.left) < 0.01 && Math.abs(e.top - t.top) < 0.01 && Math.abs(e.width - t.width) < 0.01 && Math.abs(e.height - t.height) < 0.01;
|
|
1279
|
+
}
|
|
1280
|
+
function _n(e, t, n) {
|
|
1234
1281
|
const s = e.width / e.height;
|
|
1235
1282
|
let o, i;
|
|
1236
1283
|
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), {
|
|
@@ -1240,33 +1287,145 @@ function gn(e, t, n) {
|
|
|
1240
1287
|
height: i
|
|
1241
1288
|
};
|
|
1242
1289
|
}
|
|
1243
|
-
function
|
|
1244
|
-
const s =
|
|
1245
|
-
if (o === null)
|
|
1246
|
-
return {
|
|
1247
|
-
bbox: s,
|
|
1248
|
-
content: s,
|
|
1249
|
-
window: s,
|
|
1250
|
-
clipInset: { top: 0, right: 0, bottom: 0, left: 0 }
|
|
1251
|
-
};
|
|
1252
|
-
const i = gn(s, o, n), l = n === "cover" ? s : i;
|
|
1290
|
+
function Zt(e, t, n) {
|
|
1291
|
+
const s = t !== null && n !== null && e.width > 0 && e.height > 0 ? _n(e, t, n) : e, o = n === "contain" ? s : e;
|
|
1253
1292
|
return {
|
|
1254
|
-
bbox:
|
|
1255
|
-
content:
|
|
1256
|
-
window:
|
|
1257
|
-
clipInset:
|
|
1293
|
+
bbox: e,
|
|
1294
|
+
content: s,
|
|
1295
|
+
window: o,
|
|
1296
|
+
clipInset: dt(s, o),
|
|
1297
|
+
aspectRatio: t,
|
|
1298
|
+
fit: n,
|
|
1299
|
+
radius: 0,
|
|
1300
|
+
radiusSource: "none",
|
|
1301
|
+
bboxRadius: 0,
|
|
1302
|
+
bboxRadiusSource: "none",
|
|
1303
|
+
contentAware: t !== null && n !== null,
|
|
1304
|
+
mediaElement: null
|
|
1258
1305
|
};
|
|
1259
1306
|
}
|
|
1260
|
-
function
|
|
1261
|
-
const o = n.width / s, i = n.height / s, l = e.width / 2 + (R(n) - R(t)) / s - o / 2, a = e.height / 2 + (U(n) - U(t)) / s - i / 2;
|
|
1307
|
+
function at(e, t, n) {
|
|
1262
1308
|
return {
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1309
|
+
...Zt(e, null, null),
|
|
1310
|
+
radius: t,
|
|
1311
|
+
radiusSource: n,
|
|
1312
|
+
bboxRadius: t,
|
|
1313
|
+
bboxRadiusSource: n
|
|
1267
1314
|
};
|
|
1268
1315
|
}
|
|
1269
|
-
function
|
|
1316
|
+
function Gt(e, t) {
|
|
1317
|
+
const n = e.aspectRatio, s = t.aspectRatio;
|
|
1318
|
+
return e.contentAware && t.contentAware && n !== null && s !== null && Math.abs(n - s) / Math.max(n, s) < 0.01;
|
|
1319
|
+
}
|
|
1320
|
+
function Dt(e) {
|
|
1321
|
+
return at(
|
|
1322
|
+
e.bbox,
|
|
1323
|
+
e.bboxRadius,
|
|
1324
|
+
e.bboxRadiusSource
|
|
1325
|
+
);
|
|
1326
|
+
}
|
|
1327
|
+
function jt(e, t) {
|
|
1328
|
+
return Gt(e, t) ? [e, t] : [Dt(e), Dt(t)];
|
|
1329
|
+
}
|
|
1330
|
+
function lt(e, t, n, s) {
|
|
1331
|
+
const o = Sn(e), i = o ? n(o) : t, r = s.legacyAspectRatioAttribute ? bn(
|
|
1332
|
+
e.getAttribute(s.legacyAspectRatioAttribute) ?? (o == null ? void 0 : o.getAttribute(s.legacyAspectRatioAttribute)) ?? null
|
|
1333
|
+
) : null, l = r ?? (o ? xn(o) : null), a = o ? $n(o) : { fit: null, centered: !0 }, c = a.centered && (o === null || Pn(o)) ? a.fit ?? (r !== null ? s.fallbackFit ?? null : null) : null, u = Zt(i, l, c), p = In(e), y = o !== null && o !== e && p ? An(u.window, t) : u.window, f = En(e, s.legacyRadiusAttribute), h = o === e || p, m = h ? vt(e) : { radius: 0, supported: !0 }, S = f ?? m.radius, g = f !== null ? "legacy" : m.supported ? m.radius > 0 ? "computed" : "none" : "unsupported", $ = [];
|
|
1334
|
+
y && h && Ot(y, t) && $.push(m), y && o && Ot(y, i) && $.push(vt(o));
|
|
1335
|
+
const x = $.every((I) => I.supported), C = Math.max(
|
|
1336
|
+
0,
|
|
1337
|
+
...$.map((I) => I.radius)
|
|
1338
|
+
), _ = f ?? C, A = f !== null ? "legacy" : x ? C > 0 ? "computed" : "none" : "unsupported";
|
|
1339
|
+
return !y || A === "unsupported" ? at(t, S, g) : {
|
|
1340
|
+
...u,
|
|
1341
|
+
bbox: t,
|
|
1342
|
+
window: y,
|
|
1343
|
+
clipInset: dt(u.content, y),
|
|
1344
|
+
radius: _,
|
|
1345
|
+
radiusSource: A,
|
|
1346
|
+
bboxRadius: S,
|
|
1347
|
+
bboxRadiusSource: g,
|
|
1348
|
+
mediaElement: u.contentAware ? o : null
|
|
1349
|
+
};
|
|
1350
|
+
}
|
|
1351
|
+
function qt(e, t, n, s, o) {
|
|
1352
|
+
const i = n.width / s, r = n.height / o;
|
|
1353
|
+
return {
|
|
1354
|
+
left: D(e) + (D(n) - D(t)) / s - i / 2,
|
|
1355
|
+
top: T(e) + (T(n) - T(t)) / o - r / 2,
|
|
1356
|
+
width: i,
|
|
1357
|
+
height: r
|
|
1358
|
+
};
|
|
1359
|
+
}
|
|
1360
|
+
const Rn = {
|
|
1361
|
+
enter: "contain",
|
|
1362
|
+
exit: "cover",
|
|
1363
|
+
legacy: "contain"
|
|
1364
|
+
};
|
|
1365
|
+
function Y(e) {
|
|
1366
|
+
return Rn[e];
|
|
1367
|
+
}
|
|
1368
|
+
const Tt = "data-hero-enter-key", Ft = "data-hero-exit-key", tt = "data-hero-key";
|
|
1369
|
+
class vn {
|
|
1370
|
+
constructor() {
|
|
1371
|
+
E(this, "previousFromOpacity", "");
|
|
1372
|
+
}
|
|
1373
|
+
prepare(t) {
|
|
1374
|
+
t.from.then((n) => {
|
|
1375
|
+
this.previousFromOpacity = n.style.opacity, n.style.opacity = "0";
|
|
1376
|
+
});
|
|
1377
|
+
}
|
|
1378
|
+
contribute(t) {
|
|
1379
|
+
return t.onComplete(() => {
|
|
1380
|
+
t.from.style.opacity = this.previousFromOpacity;
|
|
1381
|
+
}), [];
|
|
1382
|
+
}
|
|
1383
|
+
}
|
|
1384
|
+
const On = () => new vn();
|
|
1385
|
+
class Dn {
|
|
1386
|
+
contribute(t) {
|
|
1387
|
+
const { from: n, to: s, physics: o, onComplete: i } = t, r = n.style.opacity, l = s.style.opacity, a = n.style.willChange, c = s.style.willChange;
|
|
1388
|
+
return s.style.opacity = "0", n.style.willChange = "opacity", s.style.willChange = "opacity", i(() => {
|
|
1389
|
+
n.style.opacity = r, s.style.opacity = l, n.style.willChange = a, s.style.willChange = c;
|
|
1390
|
+
}), [
|
|
1391
|
+
new b({
|
|
1392
|
+
element: n,
|
|
1393
|
+
integrator: w.from(o),
|
|
1394
|
+
style: (u, p) => ({ opacity: p })
|
|
1395
|
+
}),
|
|
1396
|
+
new b({
|
|
1397
|
+
element: s,
|
|
1398
|
+
integrator: w.from(o),
|
|
1399
|
+
style: (u) => ({ opacity: u })
|
|
1400
|
+
})
|
|
1401
|
+
];
|
|
1402
|
+
}
|
|
1403
|
+
}
|
|
1404
|
+
const Tn = () => new Dn(), Fn = {
|
|
1405
|
+
static: On,
|
|
1406
|
+
fade: Tn
|
|
1407
|
+
}, Mn = {
|
|
1408
|
+
spring: { stiffness: 320, damping: 30 }
|
|
1409
|
+
}, Yn = () => Mn, Ln = {
|
|
1410
|
+
spring: { stiffness: 300, damping: 30, doubleSpring: 1 }
|
|
1411
|
+
}, kn = () => Ln, Hn = {
|
|
1412
|
+
default: Yn,
|
|
1413
|
+
smooth: kn
|
|
1414
|
+
}, Nn = 700, zn = "data-hero-aspect-ratio", Un = "data-hero-radius";
|
|
1415
|
+
function Mt(e, t, n) {
|
|
1416
|
+
const s = H(e, t);
|
|
1417
|
+
return lt(
|
|
1418
|
+
t,
|
|
1419
|
+
s,
|
|
1420
|
+
(o) => H(e, o),
|
|
1421
|
+
{
|
|
1422
|
+
fallbackFit: n,
|
|
1423
|
+
legacyAspectRatioAttribute: zn,
|
|
1424
|
+
legacyRadiusAttribute: Un
|
|
1425
|
+
}
|
|
1426
|
+
);
|
|
1427
|
+
}
|
|
1428
|
+
function V(e, t) {
|
|
1270
1429
|
const n = /* @__PURE__ */ new Map(), s = e.querySelectorAll(`[${t}]`);
|
|
1271
1430
|
for (const o of Array.from(s)) {
|
|
1272
1431
|
const i = o.getAttribute(t);
|
|
@@ -1274,151 +1433,160 @@ function H(e, t) {
|
|
|
1274
1433
|
}
|
|
1275
1434
|
return n;
|
|
1276
1435
|
}
|
|
1277
|
-
function
|
|
1278
|
-
const n = [], s =
|
|
1279
|
-
for (const [
|
|
1280
|
-
const c = o.get(
|
|
1436
|
+
function Vn(e, t) {
|
|
1437
|
+
const n = [], s = V(t, Tt), o = V(e, Ft);
|
|
1438
|
+
for (const [l, a] of s) {
|
|
1439
|
+
const c = o.get(l);
|
|
1281
1440
|
c && n.push({
|
|
1282
|
-
key:
|
|
1441
|
+
key: l,
|
|
1283
1442
|
fromEl: c,
|
|
1284
|
-
toEl:
|
|
1285
|
-
fromFit: "
|
|
1286
|
-
toFit: "
|
|
1443
|
+
toEl: a,
|
|
1444
|
+
fromFit: Y("exit"),
|
|
1445
|
+
toFit: Y("enter")
|
|
1287
1446
|
});
|
|
1288
1447
|
}
|
|
1289
|
-
const i =
|
|
1290
|
-
for (const [
|
|
1291
|
-
const c =
|
|
1448
|
+
const i = V(e, Tt), r = V(t, Ft);
|
|
1449
|
+
for (const [l, a] of i) {
|
|
1450
|
+
const c = r.get(l);
|
|
1292
1451
|
c && n.push({
|
|
1293
|
-
key:
|
|
1294
|
-
fromEl:
|
|
1452
|
+
key: l,
|
|
1453
|
+
fromEl: a,
|
|
1295
1454
|
toEl: c,
|
|
1296
|
-
fromFit: "
|
|
1297
|
-
toFit: "
|
|
1455
|
+
fromFit: Y("enter"),
|
|
1456
|
+
toFit: Y("exit")
|
|
1298
1457
|
});
|
|
1299
1458
|
}
|
|
1300
1459
|
return n;
|
|
1301
1460
|
}
|
|
1302
|
-
function
|
|
1461
|
+
function Xn(e, t) {
|
|
1303
1462
|
const n = [], s = Array.from(
|
|
1304
|
-
t.querySelectorAll(`[${
|
|
1463
|
+
t.querySelectorAll(`[${tt}]`)
|
|
1305
1464
|
);
|
|
1306
1465
|
for (const o of s) {
|
|
1307
|
-
const i = o.getAttribute(
|
|
1466
|
+
const i = o.getAttribute(tt);
|
|
1308
1467
|
if (!i) continue;
|
|
1309
|
-
const
|
|
1310
|
-
`[${
|
|
1468
|
+
const r = e.querySelector(
|
|
1469
|
+
`[${tt}="${i}"]`
|
|
1311
1470
|
);
|
|
1312
|
-
|
|
1471
|
+
r && n.push({
|
|
1313
1472
|
key: i,
|
|
1314
|
-
fromEl:
|
|
1473
|
+
fromEl: r,
|
|
1315
1474
|
toEl: o,
|
|
1316
|
-
fromFit: "
|
|
1317
|
-
toFit: "
|
|
1475
|
+
fromFit: Y("legacy"),
|
|
1476
|
+
toFit: Y("legacy")
|
|
1318
1477
|
});
|
|
1319
1478
|
}
|
|
1320
1479
|
return n;
|
|
1321
1480
|
}
|
|
1322
|
-
function
|
|
1323
|
-
const n =
|
|
1324
|
-
return n.length > 0 ? n :
|
|
1481
|
+
function Bn(e, t) {
|
|
1482
|
+
const n = Vn(e, t);
|
|
1483
|
+
return n.length > 0 ? n : Xn(e, t);
|
|
1484
|
+
}
|
|
1485
|
+
function Wn(e, t) {
|
|
1486
|
+
return jt(e, t);
|
|
1487
|
+
}
|
|
1488
|
+
function Zn(e, t) {
|
|
1489
|
+
return e.radiusSource === "unsupported" || t.radiusSource === "unsupported" ? !1 : e.mediaElement !== null || t.mediaElement !== null || e.radiusSource === "computed" || e.radiusSource === "legacy" || t.radiusSource === "computed" || t.radiusSource === "legacy";
|
|
1325
1490
|
}
|
|
1326
|
-
function
|
|
1327
|
-
const { fromEl: s, toEl: o } = t, i
|
|
1328
|
-
|
|
1491
|
+
function Gn(e, t, n) {
|
|
1492
|
+
const { fromEl: s, toEl: o } = t, [i, r] = Wn(
|
|
1493
|
+
Mt(e, s, t.fromFit),
|
|
1494
|
+
Mt(e, o, t.toFit)
|
|
1495
|
+
), l = i.content, a = i.window, c = r.content, u = r.window, p = r.clipInset, d = i.radiusSource === "unsupported" || r.radiusSource === "unsupported", y = d ? 0 : i.radius, f = d ? 0 : r.radius;
|
|
1496
|
+
if (l.width === 0 || l.height === 0 || a.width === 0 || a.height === 0 || c.width === 0 || c.height === 0 || u.width === 0 || u.height === 0)
|
|
1329
1497
|
return null;
|
|
1330
|
-
const
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
),
|
|
1334
|
-
if (Math.abs(
|
|
1335
|
-
const
|
|
1498
|
+
const h = Math.max(
|
|
1499
|
+
l.width / c.width,
|
|
1500
|
+
l.height / c.height
|
|
1501
|
+
), m = D(l), S = T(l), g = D(c), $ = T(c), x = m - g, C = S - $;
|
|
1502
|
+
if (Math.abs(C) > n) return null;
|
|
1503
|
+
const _ = dt(
|
|
1336
1504
|
c,
|
|
1337
|
-
a,
|
|
1338
|
-
r,
|
|
1339
|
-
y
|
|
1505
|
+
qt(c, l, a, h, h)
|
|
1340
1506
|
);
|
|
1341
1507
|
return {
|
|
1342
1508
|
toContent: c,
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1509
|
+
fromVisualEl: i.mediaElement ?? s,
|
|
1510
|
+
toVisualEl: r.mediaElement ?? o,
|
|
1511
|
+
resetCloneRadius: Zn(i, r),
|
|
1512
|
+
styleFor: (A, I) => {
|
|
1513
|
+
const N = I * x, L = I * C, z = A + I * h, ne = Math.max(0, y * I + f * A) / Math.max(Math.abs(z), 1e-6), se = _.top * I + p.top * A, oe = _.right * I + p.right * A, ie = _.bottom * I + p.bottom * A, re = _.left * I + p.left * A;
|
|
1346
1514
|
return {
|
|
1347
|
-
transform: `translate(${
|
|
1348
|
-
clipPath: `inset(${
|
|
1515
|
+
transform: `translate(${N}px, ${L}px) scale(${z})`,
|
|
1516
|
+
clipPath: `inset(${se}px ${oe}px ${ie}px ${re}px round ${ne}px)`
|
|
1349
1517
|
};
|
|
1350
1518
|
}
|
|
1351
1519
|
};
|
|
1352
1520
|
}
|
|
1353
|
-
function
|
|
1521
|
+
function jn(e, t) {
|
|
1354
1522
|
e.style.transform = t.transform, e.style.clipPath = t.clipPath;
|
|
1355
1523
|
}
|
|
1356
|
-
class
|
|
1524
|
+
class qn {
|
|
1357
1525
|
contribute(t) {
|
|
1358
|
-
const { resolved: n, physics: s, positionedParent: o, maxDistance: i, onComplete:
|
|
1359
|
-
for (const
|
|
1360
|
-
const
|
|
1361
|
-
if (!
|
|
1362
|
-
const d =
|
|
1363
|
-
d.style.position = "absolute", d.style.left = `${
|
|
1364
|
-
const
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
}),
|
|
1368
|
-
new
|
|
1526
|
+
const { resolved: n, physics: s, positionedParent: o, maxDistance: i, onComplete: r } = t, l = [];
|
|
1527
|
+
for (const a of n.pairs) {
|
|
1528
|
+
const c = Gn(o, a, i);
|
|
1529
|
+
if (!c) continue;
|
|
1530
|
+
const { fromVisualEl: u, toVisualEl: p } = c, d = p.cloneNode(!0);
|
|
1531
|
+
d.style.position = "absolute", d.style.left = `${c.toContent.left}px`, d.style.top = `${c.toContent.top}px`, d.style.width = `${c.toContent.width}px`, d.style.height = `${c.toContent.height}px`, d.style.margin = "0", d.style.transformOrigin = "center center", d.style.zIndex = "1000", d.style.willChange = "transform, clip-path", d.style.pointerEvents = "none", d.style.maxWidth = "none", d.style.maxHeight = "none", c.resetCloneRadius && (d.style.borderRadius = "0"), jn(d, c.styleFor(0, 1)), o.appendChild(d);
|
|
1532
|
+
const y = u.style.opacity, f = p.style.opacity;
|
|
1533
|
+
u.style.opacity = "0", p.style.opacity = "0", r(() => {
|
|
1534
|
+
u.style.opacity = y, p.style.opacity = f, d.parentElement && d.parentElement.removeChild(d);
|
|
1535
|
+
}), l.push(
|
|
1536
|
+
new b({
|
|
1369
1537
|
element: d,
|
|
1370
|
-
integrator:
|
|
1371
|
-
style:
|
|
1538
|
+
integrator: w.from(s),
|
|
1539
|
+
style: c.styleFor
|
|
1372
1540
|
})
|
|
1373
1541
|
);
|
|
1374
1542
|
}
|
|
1375
|
-
return
|
|
1543
|
+
return l;
|
|
1376
1544
|
}
|
|
1377
1545
|
}
|
|
1378
|
-
function
|
|
1379
|
-
return [new
|
|
1546
|
+
function Kn(e) {
|
|
1547
|
+
return [new qn(), Fn[e.type]()];
|
|
1380
1548
|
}
|
|
1381
|
-
const
|
|
1382
|
-
const t =
|
|
1549
|
+
const Jn = (e) => {
|
|
1550
|
+
const t = Kn(e), n = Hn[e.variant](), s = Nn;
|
|
1383
1551
|
return {
|
|
1384
1552
|
prepare: (o) => {
|
|
1385
|
-
var
|
|
1553
|
+
var l;
|
|
1386
1554
|
const i = Promise.all([
|
|
1387
1555
|
o.from,
|
|
1388
1556
|
o.to
|
|
1389
|
-
]).then(([
|
|
1557
|
+
]).then(([a, c]) => ({ pairs: Bn(a, c) })), r = {
|
|
1390
1558
|
from: o.from,
|
|
1391
1559
|
to: o.to,
|
|
1392
1560
|
resolved: i
|
|
1393
1561
|
};
|
|
1394
|
-
for (const
|
|
1395
|
-
(
|
|
1396
|
-
return i.then((
|
|
1562
|
+
for (const a of t)
|
|
1563
|
+
(l = a.prepare) == null || l.call(a, r);
|
|
1564
|
+
return i.then((a) => ({ resolved: a }));
|
|
1397
1565
|
},
|
|
1398
|
-
animation: ({ from: o, to: i, context:
|
|
1399
|
-
if (
|
|
1400
|
-
return new
|
|
1401
|
-
const
|
|
1402
|
-
|
|
1403
|
-
},
|
|
1566
|
+
animation: ({ from: o, to: i, context: r, resolved: l }) => {
|
|
1567
|
+
if (l.pairs.length === 0)
|
|
1568
|
+
return new P([], { mode: "parallel" });
|
|
1569
|
+
const a = [], c = (f) => {
|
|
1570
|
+
a.push(f);
|
|
1571
|
+
}, u = {
|
|
1404
1572
|
from: o,
|
|
1405
1573
|
to: i,
|
|
1406
|
-
resolved:
|
|
1574
|
+
resolved: l,
|
|
1407
1575
|
physics: n,
|
|
1408
|
-
positionedParent:
|
|
1576
|
+
positionedParent: r.positionedParent,
|
|
1409
1577
|
maxDistance: s,
|
|
1410
1578
|
onComplete: c
|
|
1411
1579
|
}, p = [];
|
|
1412
|
-
for (const
|
|
1413
|
-
|
|
1580
|
+
for (const f of t)
|
|
1581
|
+
f.contribute && p.push(...f.contribute(u));
|
|
1414
1582
|
if (p.length === 0)
|
|
1415
|
-
return new
|
|
1416
|
-
const d = new
|
|
1583
|
+
return new P([], { mode: "parallel" });
|
|
1584
|
+
const d = new P(p, { mode: "parallel" }), y = d.onComplete;
|
|
1417
1585
|
return d.onComplete = () => {
|
|
1418
|
-
|
|
1419
|
-
for (const
|
|
1586
|
+
y == null || y();
|
|
1587
|
+
for (const f of a)
|
|
1420
1588
|
try {
|
|
1421
|
-
|
|
1589
|
+
f();
|
|
1422
1590
|
} catch (h) {
|
|
1423
1591
|
console.error("[hero] cleanup error", h);
|
|
1424
1592
|
}
|
|
@@ -1426,33 +1594,33 @@ const _n = (e) => {
|
|
|
1426
1594
|
}
|
|
1427
1595
|
};
|
|
1428
1596
|
};
|
|
1429
|
-
function
|
|
1597
|
+
function lo(e) {
|
|
1430
1598
|
const { paths: t } = e, n = e.type ?? "static", s = e.variant ?? "default";
|
|
1431
|
-
return
|
|
1599
|
+
return R(
|
|
1432
1600
|
t,
|
|
1433
|
-
() =>
|
|
1601
|
+
() => Jn({ type: n, variant: s })
|
|
1434
1602
|
);
|
|
1435
1603
|
}
|
|
1436
|
-
const
|
|
1604
|
+
const Qn = {
|
|
1437
1605
|
spring: { stiffness: 50, damping: 30 }
|
|
1438
|
-
},
|
|
1606
|
+
}, ts = {
|
|
1439
1607
|
spring: { stiffness: 80, damping: 25 }
|
|
1440
|
-
},
|
|
1441
|
-
const t = e.physics ??
|
|
1608
|
+
}, es = (e = {}) => {
|
|
1609
|
+
const t = e.physics ?? Qn, n = e.initialRotation ?? 45, s = e.initialScale ?? 0.01, o = e.rotationTriggerPoint ?? 0.8;
|
|
1442
1610
|
return {
|
|
1443
|
-
prepare: ({ from: i, to:
|
|
1444
|
-
|
|
1445
|
-
}),
|
|
1446
|
-
const c =
|
|
1447
|
-
|
|
1611
|
+
prepare: ({ from: i, to: r, context: l }) => (i.then((a) => {
|
|
1612
|
+
a.style.opacity = "1";
|
|
1613
|
+
}), r.then((a) => {
|
|
1614
|
+
const c = F(l, "to"), u = Math.min(c.width, c.height) * 0.4;
|
|
1615
|
+
a.style.setProperty("--max-border-radius", `${u}px`), a.style.setProperty("--border-radius-scale", "1"), a.style.willChange = "transform", a.style.backfaceVisibility = "hidden";
|
|
1448
1616
|
const p = c.left + c.width / 2, d = c.top + c.height / 2;
|
|
1449
|
-
|
|
1617
|
+
a.style.transformOrigin = `${p}px ${d}px`, a.style.position = "fixed", a.style.top = `${c.top}px`, a.style.left = `${c.left}px`, a.style.width = `${c.width}px`, a.style.height = `${c.height}px`, a.style.zIndex = "1000", a.style.overflow = "hidden", a.style.transform = `rotate(${n}deg) scale(${s}) translateZ(0)`, a.style.borderRadius = "calc(var(--max-border-radius) * var(--border-radius-scale))", a.style.opacity = "1";
|
|
1450
1618
|
}), {}),
|
|
1451
|
-
animation: ({ from: i, to:
|
|
1452
|
-
const
|
|
1619
|
+
animation: ({ from: i, to: r }) => {
|
|
1620
|
+
const l = new b({
|
|
1453
1621
|
element: i,
|
|
1454
|
-
integrator:
|
|
1455
|
-
style: (c,
|
|
1622
|
+
integrator: w.from(ts),
|
|
1623
|
+
style: (c, u) => ({ opacity: u }),
|
|
1456
1624
|
// The outgoing node is reused (re-hidden, shown again on the next
|
|
1457
1625
|
// navigation), so reset every inline style we wrote to it — mirroring
|
|
1458
1626
|
// the "to" cleanup below. prepare sets opacity and the out style fades
|
|
@@ -1460,56 +1628,56 @@ const In = {
|
|
|
1460
1628
|
onComplete: () => {
|
|
1461
1629
|
i.style.opacity = "";
|
|
1462
1630
|
}
|
|
1463
|
-
}),
|
|
1464
|
-
element:
|
|
1465
|
-
integrator:
|
|
1631
|
+
}), a = new b({
|
|
1632
|
+
element: r,
|
|
1633
|
+
integrator: w.from(t),
|
|
1466
1634
|
style: (c) => {
|
|
1467
|
-
let
|
|
1635
|
+
let u;
|
|
1468
1636
|
if (c <= 0.05)
|
|
1469
|
-
|
|
1637
|
+
u = s;
|
|
1470
1638
|
else if (c <= o) {
|
|
1471
|
-
const
|
|
1472
|
-
|
|
1639
|
+
const f = (c - 0.05) / (o - 0.05), h = Math.pow(f, 9);
|
|
1640
|
+
u = s + (0.8 - s) * h;
|
|
1473
1641
|
} else {
|
|
1474
|
-
const
|
|
1475
|
-
|
|
1642
|
+
const f = (c - o) / (1 - o);
|
|
1643
|
+
u = 0.8 + 0.2 * (1 - Math.pow(1 - f, 3));
|
|
1476
1644
|
}
|
|
1477
1645
|
const p = 0.7;
|
|
1478
1646
|
let d;
|
|
1479
1647
|
if (c <= p)
|
|
1480
1648
|
d = n;
|
|
1481
1649
|
else {
|
|
1482
|
-
const
|
|
1650
|
+
const f = (c - p) / (1 - p), h = 1 - Math.pow(1 - f, 2);
|
|
1483
1651
|
d = n * (1 - h);
|
|
1484
1652
|
}
|
|
1485
|
-
let
|
|
1653
|
+
let y;
|
|
1486
1654
|
if (c <= p)
|
|
1487
|
-
|
|
1655
|
+
y = 1;
|
|
1488
1656
|
else {
|
|
1489
|
-
const
|
|
1490
|
-
|
|
1657
|
+
const f = (c - p) / (1 - p);
|
|
1658
|
+
y = 1 - Math.pow(f, 0.5);
|
|
1491
1659
|
}
|
|
1492
1660
|
return {
|
|
1493
|
-
transform: `rotate(${d.toFixed(2)}deg) scale(${
|
|
1494
|
-
"--border-radius-scale":
|
|
1661
|
+
transform: `rotate(${d.toFixed(2)}deg) scale(${u.toFixed(4)}) translateZ(0)`,
|
|
1662
|
+
"--border-radius-scale": y.toFixed(4)
|
|
1495
1663
|
};
|
|
1496
1664
|
},
|
|
1497
1665
|
onComplete: () => {
|
|
1498
|
-
|
|
1666
|
+
r.style.willChange = "", r.style.backfaceVisibility = "", r.style.removeProperty("--max-border-radius"), r.style.removeProperty("--border-radius-scale"), r.style.transform = "", r.style.transformOrigin = "", r.style.position = "", r.style.zIndex = "", r.style.top = "", r.style.left = "", r.style.width = "", r.style.height = "", r.style.overflow = "", r.style.borderRadius = "";
|
|
1499
1667
|
}
|
|
1500
1668
|
});
|
|
1501
|
-
return new
|
|
1669
|
+
return new P([l, a], { mode: "parallel" });
|
|
1502
1670
|
}
|
|
1503
1671
|
};
|
|
1504
1672
|
};
|
|
1505
|
-
function
|
|
1673
|
+
function co(e) {
|
|
1506
1674
|
const { paths: t } = e;
|
|
1507
|
-
return
|
|
1675
|
+
return R(t, () => es());
|
|
1508
1676
|
}
|
|
1509
|
-
const
|
|
1677
|
+
const ns = {
|
|
1510
1678
|
spring: { stiffness: 100, damping: 30 }
|
|
1511
|
-
},
|
|
1512
|
-
const t = e.physics ??
|
|
1679
|
+
}, ss = (e = {}) => {
|
|
1680
|
+
const t = e.physics ?? ns;
|
|
1513
1681
|
return {
|
|
1514
1682
|
prepare: ({ from: n, to: s }) => (n.then((o) => {
|
|
1515
1683
|
o.style.transformOrigin = "center center", o.style.willChange = "transform, opacity";
|
|
@@ -1517,12 +1685,12 @@ const On = {
|
|
|
1517
1685
|
o.style.opacity = "0", o.style.transform = "rotate(-180deg)", o.style.transformOrigin = "center center", o.style.willChange = "transform, opacity";
|
|
1518
1686
|
}), {}),
|
|
1519
1687
|
animation: ({ from: n, to: s }) => {
|
|
1520
|
-
const o = new
|
|
1688
|
+
const o = new b({
|
|
1521
1689
|
element: n,
|
|
1522
|
-
integrator:
|
|
1523
|
-
style: (
|
|
1524
|
-
transform: `rotate(${
|
|
1525
|
-
opacity:
|
|
1690
|
+
integrator: w.from(t),
|
|
1691
|
+
style: (r) => ({
|
|
1692
|
+
transform: `rotate(${r * 180}deg)`,
|
|
1693
|
+
opacity: r < 0.5 ? 1 : 0
|
|
1526
1694
|
}),
|
|
1527
1695
|
// The outgoing node is reused (re-hidden, shown again on the next
|
|
1528
1696
|
// navigation), so clear every inline style we wrote to `from`
|
|
@@ -1530,27 +1698,27 @@ const On = {
|
|
|
1530
1698
|
onComplete: () => {
|
|
1531
1699
|
n.style.willChange = "auto", n.style.transform = "", n.style.transformOrigin = "", n.style.opacity = "";
|
|
1532
1700
|
}
|
|
1533
|
-
}), i = new
|
|
1701
|
+
}), i = new b({
|
|
1534
1702
|
element: s,
|
|
1535
|
-
integrator:
|
|
1703
|
+
integrator: w.from(t),
|
|
1536
1704
|
// u runs 1→0, so -u*180 unwinds -180→0.
|
|
1537
|
-
style: (
|
|
1538
|
-
transform: `rotate(${-
|
|
1539
|
-
opacity:
|
|
1705
|
+
style: (r, l) => ({
|
|
1706
|
+
transform: `rotate(${-l * 180}deg)`,
|
|
1707
|
+
opacity: r > 0.5 ? 1 : 0
|
|
1540
1708
|
}),
|
|
1541
1709
|
onComplete: () => {
|
|
1542
1710
|
s.style.willChange = "auto", s.style.transform = "", s.style.transformOrigin = "", s.style.opacity = "";
|
|
1543
1711
|
}
|
|
1544
1712
|
});
|
|
1545
|
-
return new
|
|
1713
|
+
return new P([o, i], { mode: "parallel" });
|
|
1546
1714
|
}
|
|
1547
1715
|
};
|
|
1548
1716
|
};
|
|
1549
|
-
function
|
|
1717
|
+
function po(e) {
|
|
1550
1718
|
const { paths: t } = e;
|
|
1551
|
-
return
|
|
1719
|
+
return R(t, () => ss());
|
|
1552
1720
|
}
|
|
1553
|
-
const
|
|
1721
|
+
const os = {
|
|
1554
1722
|
spring: {
|
|
1555
1723
|
stiffness: 20,
|
|
1556
1724
|
damping: 8,
|
|
@@ -1558,100 +1726,100 @@ const Fn = {
|
|
|
1558
1726
|
restDelta: 1e-3,
|
|
1559
1727
|
restSpeed: 1e-3
|
|
1560
1728
|
}
|
|
1561
|
-
},
|
|
1562
|
-
const t = e.direction ?? "up", n = e.physics ??
|
|
1729
|
+
}, Yt = (e = {}) => {
|
|
1730
|
+
const t = e.direction ?? "up", n = e.physics ?? os, s = t === "up", o = s ? v : O, i = s ? O : v;
|
|
1563
1731
|
return {
|
|
1564
|
-
prepare: ({ from:
|
|
1565
|
-
|
|
1566
|
-
}),
|
|
1567
|
-
|
|
1732
|
+
prepare: ({ from: r, to: l }) => (r.then((a) => {
|
|
1733
|
+
a.style.zIndex = o, a.style.willChange = "transform", a.style.backfaceVisibility = "hidden", a.style.contain = "layout paint", a.style.pointerEvents = "none";
|
|
1734
|
+
}), l.then((a) => {
|
|
1735
|
+
a.style.willChange = "transform", a.style.backfaceVisibility = "hidden", a.style.contain = "layout paint", a.style.position = "relative", a.style.zIndex = i;
|
|
1568
1736
|
}), {}),
|
|
1569
|
-
animation: ({ from:
|
|
1570
|
-
const
|
|
1571
|
-
element:
|
|
1572
|
-
integrator:
|
|
1573
|
-
style: (
|
|
1737
|
+
animation: ({ from: r, to: l }) => {
|
|
1738
|
+
const a = r.offsetHeight, c = l.offsetHeight, u = window.innerHeight, p = Math.max(Math.min(a, c), u), d = new b({
|
|
1739
|
+
element: r,
|
|
1740
|
+
integrator: w.from(n),
|
|
1741
|
+
style: (f) => ({ transform: `translate3d(0, ${s ? -p * f : p * f}px, 0)` }),
|
|
1574
1742
|
// The outgoing node is the real, reused element (re-hidden then shown
|
|
1575
1743
|
// again on the next navigation), so mirror the incoming cleanup and
|
|
1576
1744
|
// also reset the out-only props applied in prepare (zIndex,
|
|
1577
1745
|
// pointerEvents) — otherwise the leftover inline styles corrupt the
|
|
1578
1746
|
// page the next time it appears.
|
|
1579
1747
|
onComplete: () => {
|
|
1580
|
-
|
|
1748
|
+
r.style.willChange = "auto", r.style.backfaceVisibility = "", r.style.contain = "", r.style.transform = "", r.style.pointerEvents = "", r.style.zIndex = "";
|
|
1581
1749
|
}
|
|
1582
|
-
}),
|
|
1583
|
-
element:
|
|
1584
|
-
integrator:
|
|
1585
|
-
style: (
|
|
1750
|
+
}), y = new b({
|
|
1751
|
+
element: l,
|
|
1752
|
+
integrator: w.from(n),
|
|
1753
|
+
style: (f, h) => ({ transform: `translate3d(0, ${s ? h * p : h * -p}px, 0)` }),
|
|
1586
1754
|
onComplete: () => {
|
|
1587
|
-
|
|
1755
|
+
l.style.willChange = "auto", l.style.backfaceVisibility = "", l.style.contain = "", l.style.transform = "", l.style.position === "relative" && (l.style.position = ""), l.style.zIndex === i && (l.style.zIndex = "");
|
|
1588
1756
|
}
|
|
1589
1757
|
});
|
|
1590
|
-
for (const
|
|
1591
|
-
const h =
|
|
1592
|
-
|
|
1593
|
-
h == null || h(),
|
|
1758
|
+
for (const f of [d, y]) {
|
|
1759
|
+
const h = f.onComplete;
|
|
1760
|
+
f.onComplete = () => {
|
|
1761
|
+
h == null || h(), f.releaseFill();
|
|
1594
1762
|
};
|
|
1595
1763
|
}
|
|
1596
|
-
return new
|
|
1764
|
+
return new P([d, y], { mode: "parallel" });
|
|
1597
1765
|
}
|
|
1598
1766
|
};
|
|
1599
1767
|
};
|
|
1600
|
-
function
|
|
1768
|
+
function uo(e) {
|
|
1601
1769
|
const { paths: t, type: n = "directional" } = e;
|
|
1602
|
-
return n === "non-directional" ?
|
|
1770
|
+
return n === "non-directional" ? R(
|
|
1603
1771
|
t,
|
|
1604
|
-
() =>
|
|
1605
|
-
) :
|
|
1772
|
+
() => Yt({ direction: "up" })
|
|
1773
|
+
) : ut(
|
|
1606
1774
|
t,
|
|
1607
1775
|
{ forward: "up", backward: "down" },
|
|
1608
|
-
(s) =>
|
|
1776
|
+
(s) => Yt({ direction: s })
|
|
1609
1777
|
);
|
|
1610
1778
|
}
|
|
1611
|
-
const
|
|
1779
|
+
const is = {
|
|
1612
1780
|
spring: { stiffness: 200, damping: 24 }
|
|
1613
|
-
},
|
|
1781
|
+
}, rs = {
|
|
1614
1782
|
inertia: { acceleration: 25, resistance: 1.2 }
|
|
1615
|
-
},
|
|
1616
|
-
function
|
|
1783
|
+
}, et = 0.2;
|
|
1784
|
+
function as() {
|
|
1617
1785
|
return {
|
|
1618
|
-
enterPhysics:
|
|
1619
|
-
exitPhysics:
|
|
1786
|
+
enterPhysics: is,
|
|
1787
|
+
exitPhysics: rs,
|
|
1620
1788
|
background: {
|
|
1621
1789
|
willChange: "transform, opacity",
|
|
1622
1790
|
enterStyle: (e, t) => ({
|
|
1623
|
-
transform: `scale(${1 -
|
|
1791
|
+
transform: `scale(${1 - et * e})`,
|
|
1624
1792
|
opacity: t
|
|
1625
1793
|
}),
|
|
1626
1794
|
exitStyle: (e) => ({
|
|
1627
|
-
transform: `scale(${1 -
|
|
1795
|
+
transform: `scale(${1 - et + et * e})`,
|
|
1628
1796
|
opacity: e
|
|
1629
1797
|
})
|
|
1630
1798
|
}
|
|
1631
1799
|
};
|
|
1632
1800
|
}
|
|
1633
|
-
const
|
|
1801
|
+
const ls = {
|
|
1634
1802
|
spring: { stiffness: 200, damping: 24 }
|
|
1635
|
-
},
|
|
1803
|
+
}, cs = {
|
|
1636
1804
|
inertia: { acceleration: 25, resistance: 1.2 }
|
|
1637
|
-
},
|
|
1638
|
-
function
|
|
1805
|
+
}, nt = 0.08, ps = 16, st = 0.6, us = (e) => `blur(${Math.max(0, e).toFixed(2)}px)`;
|
|
1806
|
+
function ds() {
|
|
1639
1807
|
return {
|
|
1640
|
-
enterPhysics:
|
|
1641
|
-
exitPhysics:
|
|
1808
|
+
enterPhysics: ls,
|
|
1809
|
+
exitPhysics: cs,
|
|
1642
1810
|
background: {
|
|
1643
1811
|
willChange: "transform, opacity",
|
|
1644
1812
|
// enter: t 0 → 1 as the sheet rises. At rest (t = 0) the page is
|
|
1645
1813
|
// untouched; at peak it is shrunk and dimmed.
|
|
1646
1814
|
enterStyle: (e) => ({
|
|
1647
|
-
transform: `scale(${1 -
|
|
1648
|
-
opacity: 1 - (1 -
|
|
1815
|
+
transform: `scale(${1 - nt * e})`,
|
|
1816
|
+
opacity: 1 - (1 - st) * e
|
|
1649
1817
|
}),
|
|
1650
1818
|
// exit: t 0 → 1 as the sheet falls away and the page returns to rest —
|
|
1651
1819
|
// the inverse ramp of enter.
|
|
1652
1820
|
exitStyle: (e) => ({
|
|
1653
|
-
transform: `scale(${1 -
|
|
1654
|
-
opacity:
|
|
1821
|
+
transform: `scale(${1 - nt + nt * e})`,
|
|
1822
|
+
opacity: st + (1 - st) * e
|
|
1655
1823
|
})
|
|
1656
1824
|
},
|
|
1657
1825
|
overlay: {
|
|
@@ -1669,21 +1837,21 @@ function Rn() {
|
|
|
1669
1837
|
// enter: 0 → MAX as the sheet rises (progress 0 → 1).
|
|
1670
1838
|
// exit: MAX → 0 as it falls (progress 0 → 1, so the visual is inverted).
|
|
1671
1839
|
style: (e, t) => {
|
|
1672
|
-
const n = e === "enter" ? t : 1 - t, s =
|
|
1840
|
+
const n = e === "enter" ? t : 1 - t, s = us(ps * n);
|
|
1673
1841
|
return { backdropFilter: s, WebkitBackdropFilter: s };
|
|
1674
1842
|
}
|
|
1675
1843
|
}
|
|
1676
1844
|
};
|
|
1677
1845
|
}
|
|
1678
|
-
const
|
|
1846
|
+
const fs = {
|
|
1679
1847
|
spring: { stiffness: 200, damping: 24 }
|
|
1680
|
-
},
|
|
1848
|
+
}, hs = {
|
|
1681
1849
|
inertia: { acceleration: 25, resistance: 1.2 }
|
|
1682
1850
|
};
|
|
1683
|
-
function
|
|
1851
|
+
function ys() {
|
|
1684
1852
|
return {
|
|
1685
|
-
enterPhysics:
|
|
1686
|
-
exitPhysics:
|
|
1853
|
+
enterPhysics: fs,
|
|
1854
|
+
exitPhysics: hs,
|
|
1687
1855
|
background: {
|
|
1688
1856
|
willChange: "",
|
|
1689
1857
|
enterStyle: () => ({}),
|
|
@@ -1691,65 +1859,65 @@ function Vn() {
|
|
|
1691
1859
|
}
|
|
1692
1860
|
};
|
|
1693
1861
|
}
|
|
1694
|
-
const
|
|
1695
|
-
static:
|
|
1696
|
-
"background-scale":
|
|
1697
|
-
blur:
|
|
1698
|
-
},
|
|
1699
|
-
const t = e.direction ?? "enter", n =
|
|
1862
|
+
const ms = {
|
|
1863
|
+
static: ys(),
|
|
1864
|
+
"background-scale": as(),
|
|
1865
|
+
blur: ds()
|
|
1866
|
+
}, gs = "static", bs = "transform", ws = (e = {}) => {
|
|
1867
|
+
const t = e.direction ?? "enter", n = ms[e.type ?? gs], s = t === "enter" ? n.enterPhysics : n.exitPhysics, o = n.background, i = n.overlay, r = o.willChange !== "";
|
|
1700
1868
|
return {
|
|
1701
|
-
prepare: ({ from:
|
|
1702
|
-
const p = t === "enter" ?
|
|
1703
|
-
p.then((
|
|
1704
|
-
|
|
1705
|
-
}), d.then((
|
|
1706
|
-
|
|
1869
|
+
prepare: ({ from: l, to: a, context: c, createElement: u }) => {
|
|
1870
|
+
const p = t === "enter" ? a : l, d = t === "enter" ? l : a;
|
|
1871
|
+
p.then((f) => {
|
|
1872
|
+
f.style.willChange = bs, f.style.backfaceVisibility = "hidden", f.style.contain = "layout paint", f.style.zIndex = O, t === "enter" ? f.style.position = "relative" : f.style.pointerEvents = "none";
|
|
1873
|
+
}), d.then((f) => {
|
|
1874
|
+
r && (f.style.willChange = o.willChange, f.style.backfaceVisibility = "hidden", f.style.contain = "layout paint"), f.style.zIndex = v, t === "enter" ? f.style.pointerEvents = "none" : f.style.position = "relative";
|
|
1707
1875
|
});
|
|
1708
|
-
let
|
|
1709
|
-
return i && (
|
|
1876
|
+
let y;
|
|
1877
|
+
return i && (y = u("sheet-overlay"), Object.assign(y.style, i.initialStyle), y.style.willChange = i.willChange, c.positionedParent.appendChild(y)), { overlay: y };
|
|
1710
1878
|
},
|
|
1711
|
-
animation: ({ from:
|
|
1712
|
-
const p = t === "enter" ?
|
|
1879
|
+
animation: ({ from: l, to: a, context: c, overlay: u }) => {
|
|
1880
|
+
const p = t === "enter" ? a : l, d = t === "enter" ? l : a, y = F(
|
|
1713
1881
|
c,
|
|
1714
1882
|
t === "enter" ? "to" : "from"
|
|
1715
|
-
),
|
|
1716
|
-
|
|
1883
|
+
), f = () => {
|
|
1884
|
+
l.style.pointerEvents = "", l.style.zIndex = "";
|
|
1717
1885
|
}, h = () => {
|
|
1718
|
-
const
|
|
1719
|
-
|
|
1720
|
-
},
|
|
1721
|
-
const C =
|
|
1722
|
-
|
|
1723
|
-
C == null || C(),
|
|
1886
|
+
const x = t === "enter" ? O : v;
|
|
1887
|
+
a.style.position === "relative" && (a.style.position = ""), a.style.zIndex === x && (a.style.zIndex = "");
|
|
1888
|
+
}, m = (x) => {
|
|
1889
|
+
const C = x.onComplete;
|
|
1890
|
+
x.onComplete = () => {
|
|
1891
|
+
C == null || C(), x.releaseFill();
|
|
1724
1892
|
};
|
|
1725
1893
|
};
|
|
1726
|
-
p.style.clipPath = `inset(${
|
|
1727
|
-
const S = t === "enter" ? (
|
|
1728
|
-
transform: `translate3d(0, ${C *
|
|
1729
|
-
}) : (
|
|
1730
|
-
transform: `translate3d(0, ${
|
|
1731
|
-
}),
|
|
1894
|
+
p.style.clipPath = `inset(${y.top}px 0 calc(100% - ${y.top + y.height}px) 0)`;
|
|
1895
|
+
const S = t === "enter" ? (x, C) => ({
|
|
1896
|
+
transform: `translate3d(0, ${C * y.height}px, 0)`
|
|
1897
|
+
}) : (x) => ({
|
|
1898
|
+
transform: `translate3d(0, ${x * y.height}px, 0)`
|
|
1899
|
+
}), g = new b({
|
|
1732
1900
|
element: p,
|
|
1733
|
-
integrator:
|
|
1901
|
+
integrator: w.from(s),
|
|
1734
1902
|
style: S,
|
|
1735
1903
|
onComplete: () => {
|
|
1736
|
-
p.style.willChange = "auto", p.style.backfaceVisibility = "", p.style.contain = "", p.style.clipPath = "", p.style.transform = "",
|
|
1904
|
+
p.style.willChange = "auto", p.style.backfaceVisibility = "", p.style.contain = "", p.style.clipPath = "", p.style.transform = "", f(), h();
|
|
1737
1905
|
}
|
|
1738
1906
|
});
|
|
1739
|
-
|
|
1740
|
-
const
|
|
1741
|
-
if (
|
|
1742
|
-
const
|
|
1743
|
-
|
|
1744
|
-
const C =
|
|
1907
|
+
m(g);
|
|
1908
|
+
const $ = [g];
|
|
1909
|
+
if (r) {
|
|
1910
|
+
const x = d.scrollHeight;
|
|
1911
|
+
x > 0 && (d.style.height = `${x}px`);
|
|
1912
|
+
const C = F(
|
|
1745
1913
|
c,
|
|
1746
1914
|
t === "enter" ? "from" : "to"
|
|
1747
|
-
),
|
|
1748
|
-
d.style.clipPath = `inset(${C.top}px 0 calc(100% - ${C.top + C.height}px) 0)`, d.style.transformOrigin = `${
|
|
1749
|
-
const
|
|
1915
|
+
), _ = C.left + C.width / 2, A = C.top + C.height / 2;
|
|
1916
|
+
d.style.clipPath = `inset(${C.top}px 0 calc(100% - ${C.top + C.height}px) 0)`, d.style.transformOrigin = `${_}px ${A}px`;
|
|
1917
|
+
const I = t === "enter" ? (L, z) => o.enterStyle(L, z) : (L) => o.exitStyle(L), N = new b({
|
|
1750
1918
|
element: d,
|
|
1751
|
-
integrator:
|
|
1752
|
-
style:
|
|
1919
|
+
integrator: w.from(s),
|
|
1920
|
+
style: I,
|
|
1753
1921
|
// The background is the reused outgoing (`from`) node on `enter` and
|
|
1754
1922
|
// the surviving incoming (`to`) node on `exit` — in both cases its
|
|
1755
1923
|
// inline styles must be cleared on settle so the reused node is not
|
|
@@ -1759,93 +1927,93 @@ const Xn = {
|
|
|
1759
1927
|
d.style.willChange = "auto", d.style.backfaceVisibility = "", d.style.contain = "", d.style.clipPath = "", d.style.transformOrigin = "", d.style.transform = "", d.style.opacity = "", d.style.height = "";
|
|
1760
1928
|
}
|
|
1761
1929
|
});
|
|
1762
|
-
|
|
1930
|
+
m(N), $.push(N);
|
|
1763
1931
|
}
|
|
1764
|
-
if (
|
|
1765
|
-
|
|
1766
|
-
const
|
|
1767
|
-
|
|
1768
|
-
new
|
|
1769
|
-
element:
|
|
1770
|
-
integrator:
|
|
1932
|
+
if (u && i) {
|
|
1933
|
+
u.style.zIndex = Bt;
|
|
1934
|
+
const x = Vt(c, "to");
|
|
1935
|
+
u.style.top = `${x.top}px`, u.style.height = `${x.height}px`, $.push(
|
|
1936
|
+
new b({
|
|
1937
|
+
element: u,
|
|
1938
|
+
integrator: w.from(s),
|
|
1771
1939
|
style: (C) => i.style(t, C)
|
|
1772
1940
|
})
|
|
1773
1941
|
);
|
|
1774
1942
|
}
|
|
1775
|
-
return new
|
|
1943
|
+
return new P($, { mode: "parallel" });
|
|
1776
1944
|
}
|
|
1777
1945
|
};
|
|
1778
1946
|
};
|
|
1779
|
-
function
|
|
1947
|
+
function Ss(e) {
|
|
1780
1948
|
return e === "scale" || e === "background-scale" ? "background-scale" : e === "blur" ? "blur" : "static";
|
|
1781
1949
|
}
|
|
1782
|
-
function
|
|
1783
|
-
const { enter: t, exit: n } = e, s = e.type, o =
|
|
1784
|
-
return
|
|
1950
|
+
function fo(e) {
|
|
1951
|
+
const { enter: t, exit: n } = e, s = e.type, o = Ss(s);
|
|
1952
|
+
return Ut(
|
|
1785
1953
|
{ enter: t, exit: n },
|
|
1786
|
-
(i) =>
|
|
1954
|
+
(i) => ws({ direction: i, type: o })
|
|
1787
1955
|
);
|
|
1788
1956
|
}
|
|
1789
|
-
const
|
|
1957
|
+
const xs = {
|
|
1790
1958
|
spring: { stiffness: 170, damping: 22, doubleSpring: 0.8 }
|
|
1791
|
-
},
|
|
1792
|
-
const t = e.direction ?? "left", n = e.physics ??
|
|
1959
|
+
}, Cs = (e = {}) => {
|
|
1960
|
+
const t = e.direction ?? "left", n = e.physics ?? xs, s = t === "left";
|
|
1793
1961
|
return {
|
|
1794
|
-
prepare: ({ from: o, to: i }) => (o.then((
|
|
1795
|
-
|
|
1796
|
-
}), i.then((
|
|
1797
|
-
const
|
|
1798
|
-
|
|
1962
|
+
prepare: ({ from: o, to: i }) => (o.then((r) => {
|
|
1963
|
+
r.style.willChange = "transform", r.style.backfaceVisibility = "hidden", r.style.contain = "layout paint", r.style.pointerEvents = "none";
|
|
1964
|
+
}), i.then((r) => {
|
|
1965
|
+
const l = s ? 100 : -100;
|
|
1966
|
+
r.style.transform = `translate3d(${l}%, 0, 0)`, r.style.willChange = "transform", r.style.backfaceVisibility = "hidden", r.style.contain = "layout paint";
|
|
1799
1967
|
}), {}),
|
|
1800
1968
|
animation: ({ from: o, to: i }) => {
|
|
1801
|
-
const
|
|
1969
|
+
const r = new b({
|
|
1802
1970
|
element: o,
|
|
1803
|
-
integrator:
|
|
1804
|
-
style: (
|
|
1971
|
+
integrator: w.from(n),
|
|
1972
|
+
style: (a) => ({ transform: `translate3d(${s ? -100 * a : 100 * a}%, 0, 0)` }),
|
|
1805
1973
|
// The outgoing node is the real Activity page and gets reused on the
|
|
1806
1974
|
// next navigation, so reset every inline style we wrote to it (mirror
|
|
1807
1975
|
// the incoming cleanup, plus the out-only pointerEvents).
|
|
1808
1976
|
onComplete: () => {
|
|
1809
1977
|
o.style.willChange = "auto", o.style.backfaceVisibility = "", o.style.contain = "", o.style.transform = "", o.style.pointerEvents = "";
|
|
1810
1978
|
}
|
|
1811
|
-
}),
|
|
1979
|
+
}), l = new b({
|
|
1812
1980
|
element: i,
|
|
1813
|
-
integrator:
|
|
1814
|
-
style: (
|
|
1981
|
+
integrator: w.from(n),
|
|
1982
|
+
style: (a, c) => ({ transform: `translate3d(${s ? c * 100 : c * -100}%, 0, 0)` }),
|
|
1815
1983
|
onComplete: () => {
|
|
1816
1984
|
i.style.willChange = "auto", i.style.backfaceVisibility = "", i.style.contain = "", i.style.transform = "";
|
|
1817
1985
|
}
|
|
1818
1986
|
});
|
|
1819
|
-
return new
|
|
1987
|
+
return new P([r, l], { mode: "parallel" });
|
|
1820
1988
|
}
|
|
1821
1989
|
};
|
|
1822
1990
|
};
|
|
1823
|
-
function
|
|
1991
|
+
function ho(e) {
|
|
1824
1992
|
const { paths: t } = e;
|
|
1825
|
-
return
|
|
1993
|
+
return ut(
|
|
1826
1994
|
t,
|
|
1827
1995
|
{ forward: "left", backward: "right" },
|
|
1828
|
-
(n) =>
|
|
1996
|
+
(n) => Cs({ direction: n })
|
|
1829
1997
|
);
|
|
1830
1998
|
}
|
|
1831
|
-
const
|
|
1999
|
+
const $s = {
|
|
1832
2000
|
spring: { stiffness: 17, damping: 6 }
|
|
1833
|
-
},
|
|
1834
|
-
const t = e.physics ??
|
|
2001
|
+
}, ot = 20, X = 800, Es = (e = {}) => {
|
|
2002
|
+
const t = e.physics ?? $s;
|
|
1835
2003
|
return {
|
|
1836
2004
|
prepare: ({ from: n, to: s }) => (n.then((o) => {
|
|
1837
|
-
o.style.willChange = "transform", o.style.backfaceVisibility = "hidden", o.style.contain = "layout paint", o.style.pointerEvents = "none", o.style.transform = `perspective(${
|
|
2005
|
+
o.style.willChange = "transform", o.style.backfaceVisibility = "hidden", o.style.contain = "layout paint", o.style.pointerEvents = "none", o.style.transform = `perspective(${X}px) rotateY(0deg) translate3d(0%, 0, 0)`;
|
|
1838
2006
|
}), s.then((o) => {
|
|
1839
|
-
o.style.willChange = "transform", o.style.backfaceVisibility = "hidden", o.style.contain = "layout paint", o.style.transform = `perspective(${
|
|
2007
|
+
o.style.willChange = "transform", o.style.backfaceVisibility = "hidden", o.style.contain = "layout paint", o.style.transform = `perspective(${X}px) rotateY(${ot}deg) translate3d(-100%, 0, 0)`;
|
|
1840
2008
|
}), {}),
|
|
1841
2009
|
animation: ({ from: n, to: s }) => {
|
|
1842
|
-
const o = new
|
|
2010
|
+
const o = new b({
|
|
1843
2011
|
element: n,
|
|
1844
|
-
integrator:
|
|
1845
|
-
style: (
|
|
1846
|
-
const
|
|
2012
|
+
integrator: w.from(t),
|
|
2013
|
+
style: (r) => {
|
|
2014
|
+
const l = -r * ot, a = r * 100;
|
|
1847
2015
|
return {
|
|
1848
|
-
transform: `perspective(${
|
|
2016
|
+
transform: `perspective(${X}px) rotateY(${l}deg) translate3d(${a}%, 0, 0)`
|
|
1849
2017
|
};
|
|
1850
2018
|
},
|
|
1851
2019
|
// The outgoing node is reused (Activity/cacheComponents re-hide it),
|
|
@@ -1854,68 +2022,92 @@ const Gn = {
|
|
|
1854
2022
|
onComplete: () => {
|
|
1855
2023
|
n.style.transform = "", n.style.willChange = "auto", n.style.backfaceVisibility = "", n.style.contain = "", n.style.pointerEvents = "";
|
|
1856
2024
|
}
|
|
1857
|
-
}), i = new
|
|
2025
|
+
}), i = new b({
|
|
1858
2026
|
element: s,
|
|
1859
|
-
integrator:
|
|
1860
|
-
style: (
|
|
1861
|
-
const
|
|
2027
|
+
integrator: w.from(t),
|
|
2028
|
+
style: (r, l) => {
|
|
2029
|
+
const a = l * ot, c = -l * 100;
|
|
1862
2030
|
return {
|
|
1863
|
-
transform: `perspective(${
|
|
2031
|
+
transform: `perspective(${X}px) rotateY(${a}deg) translate3d(${c}%, 0, 0)`
|
|
1864
2032
|
};
|
|
1865
2033
|
},
|
|
1866
2034
|
onComplete: () => {
|
|
1867
2035
|
s.style.transform = "", s.style.willChange = "auto", s.style.backfaceVisibility = "", s.style.contain = "";
|
|
1868
2036
|
}
|
|
1869
2037
|
});
|
|
1870
|
-
return new
|
|
2038
|
+
return new P([o, i], { mode: "sequence" });
|
|
1871
2039
|
}
|
|
1872
2040
|
};
|
|
1873
2041
|
};
|
|
1874
|
-
function
|
|
2042
|
+
function yo(e) {
|
|
1875
2043
|
const { paths: t } = e;
|
|
1876
|
-
return
|
|
2044
|
+
return R(t, () => Es());
|
|
2045
|
+
}
|
|
2046
|
+
function Ps(e, t) {
|
|
2047
|
+
return t.left >= e.left - 0.01 && t.top >= e.top - 0.01 && t.left + t.width <= e.left + e.width + 0.01 && t.top + t.height <= e.top + e.height + 0.01;
|
|
2048
|
+
}
|
|
2049
|
+
function Kt(e) {
|
|
2050
|
+
const t = () => ({
|
|
2051
|
+
enterContent: e.enterRect,
|
|
2052
|
+
exitContent: e.exitRect,
|
|
2053
|
+
startWindow: e.enterRect,
|
|
2054
|
+
scaleX: e.exitRect.width / e.enterRect.width,
|
|
2055
|
+
scaleY: e.exitRect.height / e.enterRect.height
|
|
2056
|
+
}), { enterMedia: n, exitMedia: s } = e;
|
|
2057
|
+
if (!n || !s || !Gt(n, s)) return t();
|
|
2058
|
+
const o = n.content, i = s.content;
|
|
2059
|
+
if (o.width <= 0 || o.height <= 0 || i.width <= 0 || i.height <= 0)
|
|
2060
|
+
return t();
|
|
2061
|
+
const r = i.width / o.width, l = i.height / o.height, a = qt(
|
|
2062
|
+
o,
|
|
2063
|
+
i,
|
|
2064
|
+
s.window,
|
|
2065
|
+
r,
|
|
2066
|
+
l
|
|
2067
|
+
);
|
|
2068
|
+
return Ps(n.window, a) ? { enterContent: o, exitContent: i, startWindow: a, scaleX: r, scaleY: l } : t();
|
|
1877
2069
|
}
|
|
1878
|
-
function
|
|
1879
|
-
enterRect: e,
|
|
1880
|
-
exitRect: t,
|
|
1881
|
-
pageRect: n,
|
|
1882
|
-
scrollOffset: s,
|
|
1883
|
-
enterRadius: o,
|
|
1884
|
-
exitRadius: i
|
|
1885
|
-
}) {
|
|
1886
|
-
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, f = e.top / n.height * 100, p = (n.width - (e.left + e.width)) / n.width * 100, d = (n.height - (e.top + e.height)) / n.height * 100, u = e.left / n.width * 100;
|
|
2070
|
+
function Jt(e, t) {
|
|
1887
2071
|
return {
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
2072
|
+
top: e.top / t.height * 100,
|
|
2073
|
+
right: (t.width - (e.left + e.width)) / t.width * 100,
|
|
2074
|
+
bottom: (t.height - (e.top + e.height)) / t.height * 100,
|
|
2075
|
+
left: e.left / t.width * 100
|
|
2076
|
+
};
|
|
2077
|
+
}
|
|
2078
|
+
function Qt(e, t, n) {
|
|
2079
|
+
return {
|
|
2080
|
+
x: e / Math.max(Math.abs(t), 1e-6),
|
|
2081
|
+
y: e / Math.max(Math.abs(n), 1e-6)
|
|
2082
|
+
};
|
|
2083
|
+
}
|
|
2084
|
+
function Is(e) {
|
|
2085
|
+
const { pageRect: t, scrollOffset: n, enterRadius: s, exitRadius: o } = e, i = Kt(e), { enterContent: r, exitContent: l, startWindow: a, scaleX: c, scaleY: u } = i, p = l.left - r.left + (l.width - r.width) / 2 - n.x, d = l.top - r.top + (l.height - r.height) / 2 - n.y, y = Jt(a, t);
|
|
2086
|
+
return {
|
|
2087
|
+
transformOrigin: `${D(r)}px ${T(r)}px`,
|
|
2088
|
+
animate: (f) => {
|
|
2089
|
+
const h = 1 - f, m = 1 + (c - 1) * h, S = 1 + (u - 1) * h, g = Math.max(0, o * h + s * (1 - h)), $ = Qt(g, m, S);
|
|
1891
2090
|
return {
|
|
1892
|
-
clipPath: `inset(${
|
|
1893
|
-
transform: `translate(${
|
|
2091
|
+
clipPath: `inset(${y.top * h}% ${y.right * h}% ${y.bottom * h}% ${y.left * h}% round ${$.x}px / ${$.y}px)`,
|
|
2092
|
+
transform: `translate(${p * h}px, ${d * h}px) scale(${m}, ${S})`
|
|
1894
2093
|
};
|
|
1895
2094
|
}
|
|
1896
2095
|
};
|
|
1897
2096
|
}
|
|
1898
|
-
function
|
|
1899
|
-
|
|
1900
|
-
exitRect: t,
|
|
1901
|
-
pageRect: n,
|
|
1902
|
-
scrollOffset: s,
|
|
1903
|
-
enterRadius: o,
|
|
1904
|
-
exitRadius: i
|
|
1905
|
-
}) {
|
|
1906
|
-
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, f = e.top / n.height * 100, p = (n.width - (e.left + e.width)) / n.width * 100, d = (n.height - (e.top + e.height)) / n.height * 100, u = e.left / n.width * 100;
|
|
2097
|
+
function As(e) {
|
|
2098
|
+
const { pageRect: t, scrollOffset: n, enterRadius: s, exitRadius: o } = e, i = Kt(e), { enterContent: r, exitContent: l, startWindow: a, scaleX: c, scaleY: u } = i, p = l.left - r.left + (l.width - r.width) / 2 + n.x, d = l.top - r.top + (l.height - r.height) / 2 + n.y, y = Jt(a, t);
|
|
1907
2099
|
return {
|
|
1908
|
-
transformOrigin: `${
|
|
1909
|
-
animate: (
|
|
1910
|
-
const h = 1 -
|
|
2100
|
+
transformOrigin: `${D(r)}px ${T(r)}px`,
|
|
2101
|
+
animate: (f) => {
|
|
2102
|
+
const h = 1 - f, m = 1 + (c - 1) * h, S = 1 + (u - 1) * h, g = Math.max(0, s * (1 - h) + o * h), $ = Qt(g, m, S);
|
|
1911
2103
|
return {
|
|
1912
|
-
clipPath: `inset(${
|
|
1913
|
-
transform: `translate(${
|
|
2104
|
+
clipPath: `inset(${y.top * h}% ${y.right * h}% ${y.bottom * h}% ${y.left * h}% round ${$.x}px / ${$.y}px)`,
|
|
2105
|
+
transform: `translate(${p * h - n.x}px, ${d * h}px) scale(${m}, ${S})`
|
|
1914
2106
|
};
|
|
1915
2107
|
}
|
|
1916
2108
|
};
|
|
1917
2109
|
}
|
|
1918
|
-
const
|
|
2110
|
+
const _s = {
|
|
1919
2111
|
spring: {
|
|
1920
2112
|
stiffness: 380,
|
|
1921
2113
|
damping: 30,
|
|
@@ -1924,30 +2116,30 @@ const es = {
|
|
|
1924
2116
|
damping: 30
|
|
1925
2117
|
}
|
|
1926
2118
|
}
|
|
1927
|
-
},
|
|
1928
|
-
function
|
|
2119
|
+
}, te = 0.12, Rs = 18;
|
|
2120
|
+
function vs() {
|
|
1929
2121
|
return {
|
|
1930
2122
|
transformOrigin: "50% 50%",
|
|
1931
2123
|
animate: (e) => {
|
|
1932
2124
|
const t = 1 - e;
|
|
1933
2125
|
return {
|
|
1934
|
-
transform: `scale(${1 -
|
|
2126
|
+
transform: `scale(${1 - te * t})`
|
|
1935
2127
|
};
|
|
1936
2128
|
}
|
|
1937
2129
|
};
|
|
1938
2130
|
}
|
|
1939
|
-
function
|
|
2131
|
+
function Os() {
|
|
1940
2132
|
return {
|
|
1941
2133
|
transformOrigin: "50% 50%",
|
|
1942
2134
|
animate: (e) => {
|
|
1943
2135
|
const t = 1 - e;
|
|
1944
2136
|
return {
|
|
1945
|
-
transform: `scale(${1 -
|
|
2137
|
+
transform: `scale(${1 - te * t})`
|
|
1946
2138
|
};
|
|
1947
2139
|
}
|
|
1948
2140
|
};
|
|
1949
2141
|
}
|
|
1950
|
-
const
|
|
2142
|
+
const it = {
|
|
1951
2143
|
willChange: "backdrop-filter",
|
|
1952
2144
|
// `top` + `height` are set per-transition in OverlayStrategy.contribute (they
|
|
1953
2145
|
// track the live scroll position), so they are intentionally omitted here.
|
|
@@ -1963,132 +2155,129 @@ const et = {
|
|
|
1963
2155
|
WebkitBackdropFilter: "blur(0px)"
|
|
1964
2156
|
},
|
|
1965
2157
|
style: (e, t) => {
|
|
1966
|
-
const n = e === "enter" ? t : 1 - t, s = `blur(${
|
|
2158
|
+
const n = e === "enter" ? t : 1 - t, s = `blur(${Rs * n}px)`;
|
|
1967
2159
|
return {
|
|
1968
2160
|
backdropFilter: s,
|
|
1969
2161
|
WebkitBackdropFilter: s
|
|
1970
2162
|
};
|
|
1971
2163
|
}
|
|
1972
2164
|
};
|
|
1973
|
-
class
|
|
2165
|
+
class Ds {
|
|
1974
2166
|
constructor() {
|
|
1975
|
-
|
|
2167
|
+
E(this, "physics", _s);
|
|
1976
2168
|
}
|
|
1977
2169
|
contribute(t) {
|
|
1978
|
-
const { from: n, to: s, resolved: o, physics: i } = t,
|
|
1979
|
-
return
|
|
1980
|
-
new
|
|
1981
|
-
element:
|
|
1982
|
-
integrator:
|
|
1983
|
-
style:
|
|
2170
|
+
const { from: n, to: s, resolved: o, physics: i } = t, r = o.mode === "enter", l = r ? n : s, a = r ? vs() : Os();
|
|
2171
|
+
return a && (l.style.transformOrigin = a.transformOrigin), [
|
|
2172
|
+
new b({
|
|
2173
|
+
element: l,
|
|
2174
|
+
integrator: w.from(i),
|
|
2175
|
+
style: r ? (c, u) => a.animate(u) : (c) => a.animate(c)
|
|
1984
2176
|
})
|
|
1985
2177
|
];
|
|
1986
2178
|
}
|
|
1987
2179
|
}
|
|
1988
|
-
class
|
|
2180
|
+
class Ts {
|
|
1989
2181
|
prepare(t) {
|
|
1990
2182
|
const n = t.createElement("zoom-overlay");
|
|
1991
|
-
return Object.assign(n.style,
|
|
2183
|
+
return Object.assign(n.style, it.initialStyle), n.style.willChange = it.willChange, t.context.positionedParent.appendChild(n), { overlay: n };
|
|
1992
2184
|
}
|
|
1993
2185
|
contribute(t) {
|
|
1994
2186
|
const n = t.extras.overlay;
|
|
1995
2187
|
if (!n) return [];
|
|
1996
|
-
n.style.zIndex =
|
|
1997
|
-
const s =
|
|
2188
|
+
n.style.zIndex = Bt;
|
|
2189
|
+
const s = Vt(t.context, "to");
|
|
1998
2190
|
return n.style.top = `${s.top}px`, n.style.height = `${s.height}px`, [
|
|
1999
|
-
new
|
|
2191
|
+
new b({
|
|
2000
2192
|
element: n,
|
|
2001
|
-
integrator:
|
|
2002
|
-
style: (o) =>
|
|
2193
|
+
integrator: w.from(t.physics),
|
|
2194
|
+
style: (o) => it.style(t.resolved.mode, o)
|
|
2003
2195
|
})
|
|
2004
2196
|
];
|
|
2005
2197
|
}
|
|
2006
2198
|
}
|
|
2007
|
-
const
|
|
2199
|
+
const Fs = {
|
|
2008
2200
|
spring: {
|
|
2009
2201
|
stiffness: 430,
|
|
2010
2202
|
damping: 33,
|
|
2011
2203
|
doubleSpring: 1
|
|
2012
2204
|
}
|
|
2013
2205
|
};
|
|
2014
|
-
function
|
|
2206
|
+
function Ms({
|
|
2015
2207
|
enterRect: e,
|
|
2016
2208
|
exitRect: t,
|
|
2017
2209
|
scrollOffset: n
|
|
2018
2210
|
}) {
|
|
2019
|
-
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,
|
|
2211
|
+
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, r = e.height / t.height, l = Math.max(i, r);
|
|
2020
2212
|
return {
|
|
2021
2213
|
transformOrigin: `${t.left + t.width / 2}px ${t.top + t.height / 2}px`,
|
|
2022
|
-
animate: (
|
|
2023
|
-
const c = 1 -
|
|
2214
|
+
animate: (a) => {
|
|
2215
|
+
const c = 1 - a;
|
|
2024
2216
|
return {
|
|
2025
|
-
transform: `translate(${s * c - n.x}px, ${o * c}px) scale(${1 + (
|
|
2217
|
+
transform: `translate(${s * c - n.x}px, ${o * c}px) scale(${1 + (l - 1) * c})`
|
|
2026
2218
|
};
|
|
2027
2219
|
}
|
|
2028
2220
|
};
|
|
2029
2221
|
}
|
|
2030
|
-
function
|
|
2222
|
+
function Ys({
|
|
2031
2223
|
enterRect: e,
|
|
2032
2224
|
exitRect: t,
|
|
2033
2225
|
scrollOffset: n
|
|
2034
2226
|
}) {
|
|
2035
|
-
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,
|
|
2227
|
+
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, r = e.height / t.height, l = Math.max(i, r);
|
|
2036
2228
|
return {
|
|
2037
2229
|
transformOrigin: `${t.left + t.width / 2}px ${t.top + t.height / 2}px`,
|
|
2038
|
-
animate: (
|
|
2039
|
-
const c = 1 -
|
|
2230
|
+
animate: (a) => {
|
|
2231
|
+
const c = 1 - a;
|
|
2040
2232
|
return {
|
|
2041
|
-
transform: `translate(${s * c}px, ${o * c}px) scale(${1 + (
|
|
2233
|
+
transform: `translate(${s * c}px, ${o * c}px) scale(${1 + (l - 1) * c})`
|
|
2042
2234
|
};
|
|
2043
2235
|
}
|
|
2044
2236
|
};
|
|
2045
2237
|
}
|
|
2046
|
-
class
|
|
2238
|
+
class Ls {
|
|
2047
2239
|
constructor() {
|
|
2048
|
-
|
|
2240
|
+
E(this, "physics", Fs);
|
|
2049
2241
|
}
|
|
2050
2242
|
contribute(t) {
|
|
2051
|
-
const { from: n, to: s, resolved: o, input: i, physics:
|
|
2052
|
-
return c && (
|
|
2053
|
-
new
|
|
2054
|
-
element:
|
|
2055
|
-
integrator:
|
|
2056
|
-
style:
|
|
2243
|
+
const { from: n, to: s, resolved: o, input: i, physics: r } = t, l = o.mode === "enter", a = l ? n : s, c = l ? Ms(i) : Ys(i);
|
|
2244
|
+
return c && (a.style.transformOrigin = c.transformOrigin), [
|
|
2245
|
+
new b({
|
|
2246
|
+
element: a,
|
|
2247
|
+
integrator: w.from(r),
|
|
2248
|
+
style: l ? (u, p) => c.animate(p) : (u) => c.animate(u)
|
|
2057
2249
|
})
|
|
2058
2250
|
];
|
|
2059
2251
|
}
|
|
2060
2252
|
}
|
|
2061
|
-
const
|
|
2253
|
+
const ks = {
|
|
2062
2254
|
spring: {
|
|
2063
2255
|
stiffness: 530,
|
|
2064
2256
|
damping: 34,
|
|
2065
2257
|
doubleSpring: 1
|
|
2066
2258
|
}
|
|
2067
2259
|
};
|
|
2068
|
-
class
|
|
2260
|
+
class Hs {
|
|
2069
2261
|
constructor() {
|
|
2070
|
-
|
|
2262
|
+
E(this, "physics", ks);
|
|
2071
2263
|
}
|
|
2072
2264
|
contribute(t) {
|
|
2073
2265
|
return [];
|
|
2074
2266
|
}
|
|
2075
2267
|
}
|
|
2076
|
-
const
|
|
2077
|
-
expand: () => new
|
|
2078
|
-
static: () => new
|
|
2079
|
-
blur: () => new
|
|
2268
|
+
const Ns = {
|
|
2269
|
+
expand: () => new Ls(),
|
|
2270
|
+
static: () => new Hs(),
|
|
2271
|
+
blur: () => new Ds()
|
|
2080
2272
|
};
|
|
2081
|
-
function
|
|
2082
|
-
return
|
|
2273
|
+
function zs(e) {
|
|
2274
|
+
return Ns[e]();
|
|
2083
2275
|
}
|
|
2084
|
-
const
|
|
2085
|
-
function
|
|
2086
|
-
|
|
2087
|
-
if (!t) return 0;
|
|
2088
|
-
const n = parseFloat(t);
|
|
2089
|
-
return Number.isFinite(n) && n > 0 ? n : 0;
|
|
2276
|
+
const ct = "data-zoom-enter-key", Lt = "data-zoom-exit-key", kt = "data-zoom-radius";
|
|
2277
|
+
function Us(e, t) {
|
|
2278
|
+
return Math.abs(e.left - t.left) < 0.01 && Math.abs(e.top - t.top) < 0.01 && Math.abs(e.width - t.width) < 0.01 && Math.abs(e.height - t.height) < 0.01;
|
|
2090
2279
|
}
|
|
2091
|
-
function
|
|
2280
|
+
function Vs(e, t) {
|
|
2092
2281
|
const n = [];
|
|
2093
2282
|
let s = t;
|
|
2094
2283
|
for (; s && s !== e; ) {
|
|
@@ -2100,91 +2289,109 @@ function ms(e, t) {
|
|
|
2100
2289
|
}
|
|
2101
2290
|
return n;
|
|
2102
2291
|
}
|
|
2103
|
-
function
|
|
2104
|
-
const t = e.querySelectorAll(`[${
|
|
2292
|
+
function Ht(e) {
|
|
2293
|
+
const t = e.querySelectorAll(`[${ct}]`);
|
|
2105
2294
|
return t.length !== 1 ? null : t[0];
|
|
2106
2295
|
}
|
|
2107
|
-
function
|
|
2108
|
-
const n = e.querySelectorAll(`[${
|
|
2296
|
+
function Nt(e, t) {
|
|
2297
|
+
const n = e.querySelectorAll(`[${Lt}]`);
|
|
2109
2298
|
for (const s of n)
|
|
2110
|
-
if (s.getAttribute(
|
|
2299
|
+
if (s.getAttribute(Lt) === t)
|
|
2111
2300
|
return s;
|
|
2112
2301
|
return null;
|
|
2113
2302
|
}
|
|
2114
|
-
function
|
|
2115
|
-
const n =
|
|
2303
|
+
function Xs(e, t) {
|
|
2304
|
+
const n = Ht(e), s = Ht(t);
|
|
2116
2305
|
if (!n && s) {
|
|
2117
|
-
const o = s.getAttribute(
|
|
2306
|
+
const o = s.getAttribute(ct);
|
|
2118
2307
|
if (!o) return null;
|
|
2119
|
-
const i =
|
|
2308
|
+
const i = Nt(e, o);
|
|
2120
2309
|
return i ? { mode: "enter", enterEl: s, exitEl: i } : null;
|
|
2121
2310
|
}
|
|
2122
2311
|
if (n && !s) {
|
|
2123
|
-
const o = n.getAttribute(
|
|
2312
|
+
const o = n.getAttribute(ct);
|
|
2124
2313
|
if (!o) return null;
|
|
2125
|
-
const i =
|
|
2314
|
+
const i = Nt(t, o);
|
|
2126
2315
|
return i ? { mode: "exit", enterEl: n, exitEl: i } : null;
|
|
2127
2316
|
}
|
|
2128
2317
|
return null;
|
|
2129
2318
|
}
|
|
2130
|
-
function
|
|
2319
|
+
function Bs(e, t, n, s) {
|
|
2320
|
+
const o = e.mode === "enter" ? n : t, i = e.mode === "enter" ? t : n, r = U(o, e.enterEl), l = U(i, e.exitEl), a = lt(
|
|
2321
|
+
e.enterEl,
|
|
2322
|
+
r,
|
|
2323
|
+
(m) => U(o, m),
|
|
2324
|
+
{
|
|
2325
|
+
legacyRadiusAttribute: kt
|
|
2326
|
+
}
|
|
2327
|
+
), c = lt(
|
|
2328
|
+
e.exitEl,
|
|
2329
|
+
l,
|
|
2330
|
+
(m) => U(i, m),
|
|
2331
|
+
{
|
|
2332
|
+
legacyRadiusAttribute: kt
|
|
2333
|
+
}
|
|
2334
|
+
), [u, p] = jt(a, c), d = u.contentAware && p.contentAware, y = e.mode === "enter" ? n.getBoundingClientRect() : t.getBoundingClientRect(), f = {
|
|
2335
|
+
left: 0,
|
|
2336
|
+
top: 0,
|
|
2337
|
+
width: y.width,
|
|
2338
|
+
height: y.height
|
|
2339
|
+
}, h = u.radiusSource === "legacy" || Us(u.window, f) ? u.radius : 0;
|
|
2131
2340
|
return {
|
|
2132
|
-
enterRect:
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
),
|
|
2140
|
-
pageRect: e.mode === "enter" ? n.getBoundingClientRect() : t.getBoundingClientRect(),
|
|
2341
|
+
enterRect: r,
|
|
2342
|
+
exitRect: l,
|
|
2343
|
+
...d ? {
|
|
2344
|
+
enterMedia: u,
|
|
2345
|
+
exitMedia: p
|
|
2346
|
+
} : {},
|
|
2347
|
+
pageRect: y,
|
|
2141
2348
|
scrollOffset: s,
|
|
2142
|
-
enterRadius:
|
|
2143
|
-
exitRadius:
|
|
2349
|
+
enterRadius: h,
|
|
2350
|
+
exitRadius: p.radius
|
|
2144
2351
|
};
|
|
2145
2352
|
}
|
|
2146
|
-
class
|
|
2353
|
+
class Ws {
|
|
2147
2354
|
prepare(t) {
|
|
2148
2355
|
t.from.then((n) => {
|
|
2149
2356
|
n.style.willChange = "transform, clip-path, opacity", n.style.backfaceVisibility = "hidden", n.style.contain = "layout paint";
|
|
2150
2357
|
});
|
|
2151
2358
|
}
|
|
2152
2359
|
contribute(t) {
|
|
2153
|
-
const { from: n, to: s, resolved: o, input: i, physics:
|
|
2154
|
-
c && (
|
|
2155
|
-
const d =
|
|
2360
|
+
const { from: n, to: s, resolved: o, input: i, physics: r, onComplete: l } = t, a = o.mode === "enter", c = a ? Is(i) : As(i), u = a ? s : n, p = a ? "t" : "u";
|
|
2361
|
+
c && (u.style.transformOrigin = c.transformOrigin);
|
|
2362
|
+
const d = a ? v : O, y = a ? O : v, f = n.style.zIndex;
|
|
2156
2363
|
n.style.zIndex = d;
|
|
2157
|
-
const h = s.style.zIndex,
|
|
2158
|
-
return s.style.zIndex =
|
|
2159
|
-
|
|
2364
|
+
const h = s.style.zIndex, m = s.style.position;
|
|
2365
|
+
return s.style.zIndex = y, s.style.position = "relative", l(() => {
|
|
2366
|
+
u.style.willChange = "auto", u.style.backfaceVisibility = "", u.style.transformOrigin = "", u.style.contain = "", n.style.zIndex = f, s.style.zIndex === y && (s.style.zIndex = h), s.style.position === "relative" && (s.style.position = m), s.style.transformOrigin = "", n.style.willChange = "auto", n.style.backfaceVisibility = "", n.style.transformOrigin = "", n.style.contain = "", n.style.transform = "", n.style.clipPath = "";
|
|
2160
2367
|
}), [
|
|
2161
|
-
new
|
|
2162
|
-
element:
|
|
2163
|
-
integrator:
|
|
2368
|
+
new b({
|
|
2369
|
+
element: u,
|
|
2370
|
+
integrator: w.from(r),
|
|
2164
2371
|
// Enter: tile expands as `t` (0 → 1). Exit: tile shrinks as `u` —
|
|
2165
2372
|
// the legacy convention from v5's outAnim path. Either way, feed
|
|
2166
2373
|
// the progress that matches the tileConfig's authored direction.
|
|
2167
|
-
style: p === "t" ? (S) => c.animate(S) : (S,
|
|
2374
|
+
style: p === "t" ? (S) => c.animate(S) : (S, g) => c.animate(g)
|
|
2168
2375
|
})
|
|
2169
2376
|
];
|
|
2170
2377
|
}
|
|
2171
2378
|
}
|
|
2172
|
-
class
|
|
2379
|
+
class Zs {
|
|
2173
2380
|
contribute(t) {
|
|
2174
|
-
const { resolved: n, physics: s, from: o, to: i, onComplete:
|
|
2175
|
-
if (
|
|
2176
|
-
const c =
|
|
2381
|
+
const { resolved: n, physics: s, from: o, to: i, onComplete: r } = t, l = n.mode === "enter" ? i : o, a = Vs(l, n.enterEl);
|
|
2382
|
+
if (a.length === 0) return [];
|
|
2383
|
+
const c = a.map((u) => u.style.opacity);
|
|
2177
2384
|
if (n.mode === "enter")
|
|
2178
|
-
for (const
|
|
2179
|
-
return
|
|
2180
|
-
for (let
|
|
2181
|
-
const p =
|
|
2182
|
-
p && (p.style.opacity = c[
|
|
2385
|
+
for (const u of a) u.style.opacity = "0";
|
|
2386
|
+
return r(() => {
|
|
2387
|
+
for (let u = 0; u < a.length; u++) {
|
|
2388
|
+
const p = a[u];
|
|
2389
|
+
p && (p.style.opacity = c[u] ?? "");
|
|
2183
2390
|
}
|
|
2184
|
-
}),
|
|
2185
|
-
(
|
|
2186
|
-
element:
|
|
2187
|
-
integrator:
|
|
2391
|
+
}), a.map(
|
|
2392
|
+
(u) => new b({
|
|
2393
|
+
element: u,
|
|
2394
|
+
integrator: w.from(s),
|
|
2188
2395
|
style: (p, d) => ({
|
|
2189
2396
|
opacity: n.mode === "enter" ? p : d
|
|
2190
2397
|
})
|
|
@@ -2192,35 +2399,35 @@ class bs {
|
|
|
2192
2399
|
);
|
|
2193
2400
|
}
|
|
2194
2401
|
}
|
|
2195
|
-
class
|
|
2402
|
+
class ee {
|
|
2196
2403
|
contribute() {
|
|
2197
2404
|
return [];
|
|
2198
2405
|
}
|
|
2199
2406
|
}
|
|
2200
|
-
const
|
|
2201
|
-
default: () => new
|
|
2202
|
-
fade: () => new
|
|
2407
|
+
const Gs = {
|
|
2408
|
+
default: () => new ee(),
|
|
2409
|
+
fade: () => new Zs()
|
|
2203
2410
|
};
|
|
2204
|
-
function
|
|
2205
|
-
return
|
|
2411
|
+
function js(e) {
|
|
2412
|
+
return Gs[e]();
|
|
2206
2413
|
}
|
|
2207
|
-
class
|
|
2414
|
+
class qs extends ee {
|
|
2208
2415
|
}
|
|
2209
|
-
function
|
|
2210
|
-
const t =
|
|
2416
|
+
function Ks(e) {
|
|
2417
|
+
const t = zs(e.type);
|
|
2211
2418
|
return { strategies: [
|
|
2212
|
-
new
|
|
2419
|
+
new Ws(),
|
|
2213
2420
|
t,
|
|
2214
|
-
|
|
2215
|
-
new
|
|
2421
|
+
js(e.variant),
|
|
2422
|
+
new qs(),
|
|
2216
2423
|
// Overlay is intrinsically tied to backdrop-filter-driven types. Today
|
|
2217
2424
|
// that's only `blur`; the table-driven factory above owns the mapping
|
|
2218
2425
|
// so this conditional is the single line that knows the relationship.
|
|
2219
|
-
...e.type === "blur" ? [new
|
|
2426
|
+
...e.type === "blur" ? [new Ts()] : []
|
|
2220
2427
|
], physics: t.physics };
|
|
2221
2428
|
}
|
|
2222
|
-
const
|
|
2223
|
-
const { strategies: t, physics: n } =
|
|
2429
|
+
const Js = (e) => {
|
|
2430
|
+
const { strategies: t, physics: n } = Ks(e);
|
|
2224
2431
|
return {
|
|
2225
2432
|
prepare: (s) => {
|
|
2226
2433
|
const o = {
|
|
@@ -2232,81 +2439,81 @@ const Ps = (e) => {
|
|
|
2232
2439
|
// compatible.
|
|
2233
2440
|
createElement: s.createElement
|
|
2234
2441
|
}, i = {};
|
|
2235
|
-
for (const
|
|
2236
|
-
if (!
|
|
2237
|
-
const
|
|
2238
|
-
|
|
2442
|
+
for (const r of t) {
|
|
2443
|
+
if (!r.prepare) continue;
|
|
2444
|
+
const l = r.prepare(o);
|
|
2445
|
+
l && Object.assign(i, l);
|
|
2239
2446
|
}
|
|
2240
2447
|
return i;
|
|
2241
2448
|
},
|
|
2242
|
-
animation: ({ from: s, to: o, context: i, ...
|
|
2243
|
-
const
|
|
2244
|
-
if (!
|
|
2245
|
-
return new
|
|
2246
|
-
const
|
|
2449
|
+
animation: ({ from: s, to: o, context: i, ...r }) => {
|
|
2450
|
+
const l = Xs(s, o);
|
|
2451
|
+
if (!l)
|
|
2452
|
+
return new P([], { mode: "parallel" });
|
|
2453
|
+
const a = Bs(l, s, o, i.scrollOffset), c = [], p = {
|
|
2247
2454
|
from: s,
|
|
2248
2455
|
to: o,
|
|
2249
|
-
resolved:
|
|
2250
|
-
input:
|
|
2456
|
+
resolved: l,
|
|
2457
|
+
input: a,
|
|
2251
2458
|
physics: n,
|
|
2252
2459
|
context: i,
|
|
2253
|
-
extras:
|
|
2254
|
-
onComplete: (
|
|
2255
|
-
c.push(
|
|
2460
|
+
extras: r,
|
|
2461
|
+
onComplete: (f) => {
|
|
2462
|
+
c.push(f);
|
|
2256
2463
|
}
|
|
2257
2464
|
}, d = [];
|
|
2258
|
-
for (const
|
|
2259
|
-
|
|
2260
|
-
const
|
|
2261
|
-
if (
|
|
2262
|
-
const
|
|
2263
|
-
|
|
2264
|
-
|
|
2465
|
+
for (const f of t)
|
|
2466
|
+
f.contribute && d.push(...f.contribute(p));
|
|
2467
|
+
const y = d[0];
|
|
2468
|
+
if (y) {
|
|
2469
|
+
const f = y.onComplete;
|
|
2470
|
+
y.onComplete = () => {
|
|
2471
|
+
f == null || f();
|
|
2265
2472
|
for (const h of c)
|
|
2266
2473
|
try {
|
|
2267
2474
|
h();
|
|
2268
|
-
} catch (
|
|
2269
|
-
console.error("[zoom] cleanup error",
|
|
2475
|
+
} catch (m) {
|
|
2476
|
+
console.error("[zoom] cleanup error", m);
|
|
2270
2477
|
}
|
|
2271
2478
|
};
|
|
2272
2479
|
}
|
|
2273
|
-
for (const
|
|
2274
|
-
if (!(
|
|
2275
|
-
const h =
|
|
2276
|
-
|
|
2277
|
-
h == null || h(),
|
|
2480
|
+
for (const f of d) {
|
|
2481
|
+
if (!(f instanceof b)) continue;
|
|
2482
|
+
const h = f.onComplete;
|
|
2483
|
+
f.onComplete = () => {
|
|
2484
|
+
h == null || h(), f.releaseFill();
|
|
2278
2485
|
};
|
|
2279
2486
|
}
|
|
2280
|
-
return new
|
|
2487
|
+
return new P(d, { mode: "parallel" });
|
|
2281
2488
|
}
|
|
2282
2489
|
};
|
|
2283
2490
|
};
|
|
2284
|
-
function
|
|
2491
|
+
function Qs(e) {
|
|
2285
2492
|
const t = e.type ?? "static", n = e.variant ?? (e.fade ? "fade" : "default");
|
|
2286
2493
|
return { type: t, variant: n };
|
|
2287
2494
|
}
|
|
2288
|
-
function
|
|
2289
|
-
const t =
|
|
2290
|
-
return
|
|
2495
|
+
function mo(e) {
|
|
2496
|
+
const t = Qs(e);
|
|
2497
|
+
return R(
|
|
2291
2498
|
e.paths,
|
|
2292
|
-
() =>
|
|
2499
|
+
() => Js(t)
|
|
2293
2500
|
);
|
|
2294
2501
|
}
|
|
2295
2502
|
export {
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2503
|
+
wo as Animation,
|
|
2504
|
+
P as MultiAnimation,
|
|
2505
|
+
b as WebAnimation,
|
|
2506
|
+
so as axis,
|
|
2507
|
+
oo as blind,
|
|
2508
|
+
io as drill,
|
|
2509
|
+
ro as fade,
|
|
2510
|
+
ao as film,
|
|
2511
|
+
lo as hero,
|
|
2512
|
+
co as jaemin,
|
|
2513
|
+
po as rotate,
|
|
2514
|
+
uo as scroll,
|
|
2515
|
+
fo as sheet,
|
|
2516
|
+
ho as slide,
|
|
2517
|
+
yo as strip,
|
|
2518
|
+
mo as zoom
|
|
2312
2519
|
};
|