@ssgoi/core 7.1.3-beta.1 → 7.1.3-beta.3
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 +9 -9
- package/dist/index.js +1336 -1132
- package/dist/transitions/crossfade.d.ts +19 -0
- package/dist/transitions/crossfade.d.ts.map +1 -0
- package/dist/transitions/hero/content-targets.d.ts.map +1 -1
- package/dist/transitions/hero/exit-layer.d.ts +12 -0
- package/dist/transitions/hero/exit-layer.d.ts.map +1 -0
- package/dist/transitions/hero/index.d.ts +2 -0
- package/dist/transitions/hero/index.d.ts.map +1 -1
- package/dist/transitions/hero/transition.d.ts +6 -8
- package/dist/transitions/hero/transition.d.ts.map +1 -1
- package/dist/transitions/hero/types.d.ts +4 -2
- package/dist/transitions/hero/types.d.ts.map +1 -1
- package/dist/transitions/media-geometry.d.ts.map +1 -1
- package/dist/transitions/zoom/crossfade.d.ts +5 -0
- package/dist/transitions/zoom/crossfade.d.ts.map +1 -0
- package/dist/transitions/zoom/transition.d.ts.map +1 -1
- package/dist/transitions/zoom/zoom-element.d.ts +12 -0
- package/dist/transitions/zoom/zoom-element.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,79 +1,79 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { d as
|
|
5
|
-
import { W as
|
|
6
|
-
import { A as
|
|
7
|
-
import { P as
|
|
8
|
-
import { F as
|
|
9
|
-
class
|
|
1
|
+
var Oe = Object.defineProperty;
|
|
2
|
+
var _e = (t, e, n) => e in t ? Oe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var _ = (t, e, n) => _e(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { d as k, w as F } from "./index-B_K3Vnj-.js";
|
|
5
|
+
import { W as S, M as R } from "./multi-animation-Du9W3ZS_.js";
|
|
6
|
+
import { A as di } from "./multi-animation-Du9W3ZS_.js";
|
|
7
|
+
import { P as ke, I as C, S as Pt, a as Fe, b as vt, s as Te, D as Me } from "./provider-Cea0Pfm1.js";
|
|
8
|
+
import { F as De, a as Ye, p as nt, S as Le } from "./page-motion-MEazegOU.js";
|
|
9
|
+
class He {
|
|
10
10
|
constructor(e) {
|
|
11
|
-
|
|
11
|
+
_(this, "durationSec");
|
|
12
12
|
this.durationSec = Math.max(1 / 60, e.durationSec);
|
|
13
13
|
}
|
|
14
14
|
step(e, n, o) {
|
|
15
|
-
const
|
|
16
|
-
if (
|
|
17
|
-
const
|
|
18
|
-
return (
|
|
15
|
+
const r = n - e.position;
|
|
16
|
+
if (r === 0) return e;
|
|
17
|
+
const i = Math.sign(r), c = Math.abs(r) / this.durationSec, s = i * c * o, l = e.position + s;
|
|
18
|
+
return (i > 0 ? l >= n : l <= n) ? { position: n, velocity: 0 } : { position: l, velocity: i * c };
|
|
19
19
|
}
|
|
20
20
|
isSettled(e, n) {
|
|
21
|
-
return Math.abs(e.position - n) <
|
|
21
|
+
return Math.abs(e.position - n) < ke;
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
function n(
|
|
24
|
+
function Tt(t, e) {
|
|
25
|
+
function n(i) {
|
|
26
26
|
let c = 0, s = 0;
|
|
27
|
-
const l =
|
|
28
|
-
let
|
|
29
|
-
for (;
|
|
30
|
-
c +=
|
|
27
|
+
const l = i.offsetWidth, a = i.offsetHeight;
|
|
28
|
+
let d = i;
|
|
29
|
+
for (; d; )
|
|
30
|
+
c += d.offsetTop, s += d.offsetLeft, d = d.offsetParent;
|
|
31
31
|
return c -= window.scrollY, s -= window.scrollX, { top: c, left: s, width: l, height: a };
|
|
32
32
|
}
|
|
33
|
-
const o = n(t),
|
|
33
|
+
const o = n(t), r = n(e);
|
|
34
34
|
return new DOMRect(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
r.left - o.left,
|
|
36
|
+
r.top - o.top,
|
|
37
|
+
r.width,
|
|
38
|
+
r.height
|
|
39
39
|
);
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
const n = t.getBoundingClientRect(), o = e.getBoundingClientRect(),
|
|
41
|
+
function H(t, e) {
|
|
42
|
+
const n = t.getBoundingClientRect(), o = e.getBoundingClientRect(), r = (s, l) => l > 0 && Math.abs(s - l) > 0.5 ? s / l : 1, i = r(n.width, t.offsetWidth), c = r(n.height, t.offsetHeight);
|
|
43
43
|
return new DOMRect(
|
|
44
|
-
(o.left - n.left) /
|
|
44
|
+
(o.left - n.left) / i,
|
|
45
45
|
(o.top - n.top) / c,
|
|
46
|
-
o.width /
|
|
46
|
+
o.width / i,
|
|
47
47
|
o.height / c
|
|
48
48
|
);
|
|
49
49
|
}
|
|
50
|
-
function
|
|
51
|
-
const { scrollingElement: n, positionedParent: o } = t,
|
|
50
|
+
function W(t, e) {
|
|
51
|
+
const { scrollingElement: n, positionedParent: o } = t, r = n !== o && n.contains(o) ? Tt(n, o).top : 0;
|
|
52
52
|
return {
|
|
53
53
|
top: t[e].scroll.y,
|
|
54
54
|
left: 0,
|
|
55
55
|
width: n.clientWidth,
|
|
56
|
-
height: n.clientHeight -
|
|
56
|
+
height: n.clientHeight - r
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
|
-
function
|
|
60
|
-
const { scrollingElement: n, positionedParent: o } = t,
|
|
59
|
+
function le(t, e) {
|
|
60
|
+
const { scrollingElement: n, positionedParent: o } = t, r = n !== o && n.contains(o) ? Tt(n, o).top : 0;
|
|
61
61
|
return {
|
|
62
|
-
top: t[e].scroll.y -
|
|
62
|
+
top: t[e].scroll.y - r,
|
|
63
63
|
height: n.clientHeight
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
|
-
const
|
|
66
|
+
const Ht = 8, zt = {
|
|
67
67
|
spring: {
|
|
68
68
|
stiffness: 600,
|
|
69
69
|
damping: 40,
|
|
70
70
|
doubleSpring: 1.2
|
|
71
71
|
}
|
|
72
72
|
};
|
|
73
|
-
function
|
|
73
|
+
function ze({
|
|
74
74
|
direction: t
|
|
75
75
|
}) {
|
|
76
|
-
const e = t === "forward" ?
|
|
76
|
+
const e = t === "forward" ? Ht : -Ht;
|
|
77
77
|
return {
|
|
78
78
|
out: {
|
|
79
79
|
willChange: "transform, opacity",
|
|
@@ -95,32 +95,32 @@ function Fe({
|
|
|
95
95
|
}
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function Ne() {
|
|
99
99
|
return {
|
|
100
|
-
outPhysics:
|
|
101
|
-
inPhysics:
|
|
100
|
+
outPhysics: zt,
|
|
101
|
+
inPhysics: zt,
|
|
102
102
|
// Both sides run together — the cross-fade is the whole point of the
|
|
103
103
|
// snappy feel. (fluid's sibling uses staggered fade-through.)
|
|
104
104
|
composition: { mode: "parallel", startAt: [0, 0] },
|
|
105
|
-
build:
|
|
105
|
+
build: ze
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
|
-
const
|
|
108
|
+
const Nt = 30, We = {
|
|
109
109
|
inertia: { acceleration: 150, resistance: 1.5, restDelta: 0.1 }
|
|
110
|
-
},
|
|
110
|
+
}, Ve = {
|
|
111
111
|
spring: { stiffness: 180, damping: 34, restDelta: 0.1, restSpeed: 0.1 }
|
|
112
112
|
};
|
|
113
|
-
function
|
|
113
|
+
function Xe({
|
|
114
114
|
direction: t
|
|
115
115
|
}) {
|
|
116
|
-
const e = t === "forward" ? 1 : -1, n = -
|
|
116
|
+
const e = t === "forward" ? 1 : -1, n = -Nt * e, o = Nt * e;
|
|
117
117
|
return {
|
|
118
118
|
out: {
|
|
119
119
|
willChange: "transform, opacity",
|
|
120
120
|
startStyle: {},
|
|
121
|
-
animate: (
|
|
122
|
-
transform: `translate3d(${n *
|
|
123
|
-
opacity: `${1 -
|
|
121
|
+
animate: (r) => ({
|
|
122
|
+
transform: `translate3d(${n * r}px, 0, 0)`,
|
|
123
|
+
opacity: `${1 - r}`
|
|
124
124
|
})
|
|
125
125
|
},
|
|
126
126
|
in: {
|
|
@@ -129,43 +129,43 @@ function De({
|
|
|
129
129
|
transform: `translate3d(${o}px, 0, 0)`,
|
|
130
130
|
opacity: "0"
|
|
131
131
|
},
|
|
132
|
-
animate: (
|
|
133
|
-
transform: `translate3d(${o * (1 -
|
|
134
|
-
opacity: `${
|
|
132
|
+
animate: (r) => ({
|
|
133
|
+
transform: `translate3d(${o * (1 - r)}px, 0, 0)`,
|
|
134
|
+
opacity: `${r}`
|
|
135
135
|
})
|
|
136
136
|
}
|
|
137
137
|
};
|
|
138
138
|
}
|
|
139
|
-
function
|
|
139
|
+
function Be() {
|
|
140
140
|
return {
|
|
141
|
-
outPhysics:
|
|
142
|
-
inPhysics:
|
|
141
|
+
outPhysics: We,
|
|
142
|
+
inPhysics: Ve,
|
|
143
143
|
// Phased motion: outgoing falls away first under inertia, then incoming
|
|
144
144
|
// springs in. The fade-through shape comes from the integrator curves
|
|
145
145
|
// plus the sequence handoff, not from FADE_SPLIT inside animate(t).
|
|
146
146
|
composition: { mode: "sequence" },
|
|
147
|
-
build:
|
|
147
|
+
build: Xe
|
|
148
148
|
};
|
|
149
149
|
}
|
|
150
|
-
const
|
|
151
|
-
snappy:
|
|
152
|
-
fluid:
|
|
153
|
-
},
|
|
150
|
+
const Ue = {
|
|
151
|
+
snappy: Ne(),
|
|
152
|
+
fluid: Be()
|
|
153
|
+
}, Wt = 8, je = {
|
|
154
154
|
inertia: { acceleration: 150, resistance: 1.5, restDelta: 0.1 }
|
|
155
|
-
},
|
|
155
|
+
}, Ze = {
|
|
156
156
|
spring: { stiffness: 180, damping: 34, restDelta: 0.1, restSpeed: 0.1 }
|
|
157
157
|
};
|
|
158
|
-
function
|
|
158
|
+
function Ge({
|
|
159
159
|
direction: t
|
|
160
160
|
}) {
|
|
161
|
-
const e = t === "forward" ? 1 : -1, n = -
|
|
161
|
+
const e = t === "forward" ? 1 : -1, n = -Wt * e, o = Wt * e;
|
|
162
162
|
return {
|
|
163
163
|
out: {
|
|
164
164
|
willChange: "transform, opacity",
|
|
165
165
|
startStyle: {},
|
|
166
|
-
animate: (
|
|
167
|
-
transform: `translate3d(0, ${n *
|
|
168
|
-
opacity: `${1 -
|
|
166
|
+
animate: (r) => ({
|
|
167
|
+
transform: `translate3d(0, ${n * r}px, 0)`,
|
|
168
|
+
opacity: `${1 - r}`
|
|
169
169
|
})
|
|
170
170
|
},
|
|
171
171
|
in: {
|
|
@@ -174,24 +174,24 @@ function ze({
|
|
|
174
174
|
transform: `translate3d(0, ${o}px, 0)`,
|
|
175
175
|
opacity: "0"
|
|
176
176
|
},
|
|
177
|
-
animate: (
|
|
178
|
-
transform: `translate3d(0, ${o * (1 -
|
|
179
|
-
opacity: `${
|
|
177
|
+
animate: (r) => ({
|
|
178
|
+
transform: `translate3d(0, ${o * (1 - r)}px, 0)`,
|
|
179
|
+
opacity: `${r}`
|
|
180
180
|
})
|
|
181
181
|
}
|
|
182
182
|
};
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function qe() {
|
|
185
185
|
return {
|
|
186
|
-
outPhysics:
|
|
187
|
-
inPhysics:
|
|
186
|
+
outPhysics: je,
|
|
187
|
+
inPhysics: Ze,
|
|
188
188
|
composition: { mode: "sequence" },
|
|
189
|
-
build:
|
|
189
|
+
build: Ge
|
|
190
190
|
};
|
|
191
191
|
}
|
|
192
|
-
const
|
|
192
|
+
const Ke = 40, Je = {
|
|
193
193
|
inertia: { acceleration: 150, resistance: 1.5, restDelta: 0.1 }
|
|
194
|
-
},
|
|
194
|
+
}, Qe = {
|
|
195
195
|
spring: {
|
|
196
196
|
stiffness: 400,
|
|
197
197
|
damping: 30,
|
|
@@ -200,8 +200,8 @@ const Xe = 40, Ve = {
|
|
|
200
200
|
restSpeed: 0.1
|
|
201
201
|
}
|
|
202
202
|
};
|
|
203
|
-
function
|
|
204
|
-
const e =
|
|
203
|
+
function tn(t) {
|
|
204
|
+
const e = Ke;
|
|
205
205
|
return {
|
|
206
206
|
out: {
|
|
207
207
|
willChange: "opacity",
|
|
@@ -223,32 +223,32 @@ function Ue(t) {
|
|
|
223
223
|
}
|
|
224
224
|
};
|
|
225
225
|
}
|
|
226
|
-
function
|
|
226
|
+
function en() {
|
|
227
227
|
return {
|
|
228
|
-
outPhysics:
|
|
229
|
-
inPhysics:
|
|
228
|
+
outPhysics: Je,
|
|
229
|
+
inPhysics: Qe,
|
|
230
230
|
composition: { mode: "parallel", startAt: [0, 0] },
|
|
231
|
-
build:
|
|
231
|
+
build: tn
|
|
232
232
|
};
|
|
233
233
|
}
|
|
234
|
-
const
|
|
235
|
-
snappy:
|
|
236
|
-
directional:
|
|
237
|
-
"non-directional":
|
|
238
|
-
},
|
|
234
|
+
const Vt = qe(), nn = {
|
|
235
|
+
snappy: Vt,
|
|
236
|
+
directional: Vt,
|
|
237
|
+
"non-directional": en()
|
|
238
|
+
}, Xt = {
|
|
239
239
|
spring: { stiffness: 280, damping: 30, restDelta: 0.1, restSpeed: 0.1 }
|
|
240
|
-
},
|
|
241
|
-
function
|
|
240
|
+
}, ut = 0.1, ft = 1 / 3, Bt = (t) => Math.max(0, Math.min(1, t));
|
|
241
|
+
function on({
|
|
242
242
|
direction: t
|
|
243
243
|
}) {
|
|
244
|
-
const e = t === "forward" ? 1 : -1, n = 1 - e *
|
|
244
|
+
const e = t === "forward" ? 1 : -1, n = 1 - e * ut;
|
|
245
245
|
return {
|
|
246
246
|
out: {
|
|
247
247
|
willChange: "transform, opacity",
|
|
248
248
|
startStyle: {},
|
|
249
249
|
animate: (o) => ({
|
|
250
|
-
transform: `scale(${1 + e * o *
|
|
251
|
-
opacity: `${
|
|
250
|
+
transform: `scale(${1 + e * o * ut})`,
|
|
251
|
+
opacity: `${Bt(1 - o / ft)}`
|
|
252
252
|
})
|
|
253
253
|
},
|
|
254
254
|
in: {
|
|
@@ -258,135 +258,135 @@ function Ge({
|
|
|
258
258
|
opacity: "0"
|
|
259
259
|
},
|
|
260
260
|
animate: (o) => ({
|
|
261
|
-
transform: `scale(${n + e * o *
|
|
262
|
-
opacity: `${
|
|
261
|
+
transform: `scale(${n + e * o * ut})`,
|
|
262
|
+
opacity: `${Bt((o - ft) / (1 - ft))}`
|
|
263
263
|
})
|
|
264
264
|
}
|
|
265
265
|
};
|
|
266
266
|
}
|
|
267
|
-
function
|
|
267
|
+
function rn() {
|
|
268
268
|
return {
|
|
269
|
-
outPhysics:
|
|
270
|
-
inPhysics:
|
|
269
|
+
outPhysics: Xt,
|
|
270
|
+
inPhysics: Xt,
|
|
271
271
|
// Scale must move together on both sides; fade-through is encoded inside
|
|
272
272
|
// each tick (piecewise), not via composition staggering — so parallel.
|
|
273
273
|
composition: { mode: "parallel" },
|
|
274
|
-
build:
|
|
274
|
+
build: on
|
|
275
275
|
};
|
|
276
276
|
}
|
|
277
|
-
const
|
|
277
|
+
const Ut = {
|
|
278
278
|
spring: { stiffness: 280, damping: 30, restDelta: 0.1, restSpeed: 0.1 }
|
|
279
|
-
},
|
|
280
|
-
function
|
|
279
|
+
}, ht = 0.1, yt = 1 / 3, jt = (t) => Math.max(0, Math.min(1, t));
|
|
280
|
+
function sn() {
|
|
281
281
|
return {
|
|
282
282
|
out: {
|
|
283
283
|
willChange: "opacity",
|
|
284
284
|
startStyle: {},
|
|
285
285
|
animate: (t) => ({
|
|
286
|
-
opacity: `${
|
|
286
|
+
opacity: `${jt(1 - t / yt)}`
|
|
287
287
|
})
|
|
288
288
|
},
|
|
289
289
|
in: {
|
|
290
290
|
willChange: "transform, opacity",
|
|
291
291
|
startStyle: {
|
|
292
|
-
transform: `scale(${1 -
|
|
292
|
+
transform: `scale(${1 - ht})`,
|
|
293
293
|
opacity: "0"
|
|
294
294
|
},
|
|
295
295
|
animate: (t) => ({
|
|
296
|
-
transform: `scale(${1 -
|
|
297
|
-
opacity: `${
|
|
296
|
+
transform: `scale(${1 - ht + t * ht})`,
|
|
297
|
+
opacity: `${jt((t - yt) / (1 - yt))}`
|
|
298
298
|
})
|
|
299
299
|
}
|
|
300
300
|
};
|
|
301
301
|
}
|
|
302
|
-
function
|
|
302
|
+
function an() {
|
|
303
303
|
return {
|
|
304
|
-
outPhysics:
|
|
305
|
-
inPhysics:
|
|
304
|
+
outPhysics: Ut,
|
|
305
|
+
inPhysics: Ut,
|
|
306
306
|
composition: { mode: "parallel" },
|
|
307
|
-
build:
|
|
307
|
+
build: sn
|
|
308
308
|
};
|
|
309
309
|
}
|
|
310
|
-
const
|
|
311
|
-
snappy:
|
|
312
|
-
directional:
|
|
313
|
-
"non-directional":
|
|
314
|
-
},
|
|
315
|
-
x:
|
|
316
|
-
y:
|
|
317
|
-
z:
|
|
310
|
+
const Zt = rn(), cn = {
|
|
311
|
+
snappy: Zt,
|
|
312
|
+
directional: Zt,
|
|
313
|
+
"non-directional": an()
|
|
314
|
+
}, ln = {
|
|
315
|
+
x: Ue,
|
|
316
|
+
y: nn,
|
|
317
|
+
z: cn
|
|
318
318
|
};
|
|
319
|
-
function
|
|
320
|
-
const n =
|
|
319
|
+
function dn(t, e) {
|
|
320
|
+
const n = ln[t];
|
|
321
321
|
return n[e] ?? n.snappy;
|
|
322
322
|
}
|
|
323
|
-
const
|
|
324
|
-
function
|
|
323
|
+
const pn = "x", un = "snappy";
|
|
324
|
+
function Gt(t, e) {
|
|
325
325
|
t.style.willChange = e.willChange, t.style.backfaceVisibility = "hidden", t.style.contain = "layout paint";
|
|
326
326
|
for (const [n, o] of Object.entries(e.startStyle))
|
|
327
327
|
t.style[n] = o;
|
|
328
328
|
}
|
|
329
|
-
function
|
|
329
|
+
function de(t) {
|
|
330
330
|
t.style.willChange = "auto", t.style.backfaceVisibility = "", t.style.contain = "", t.style.transform = "", t.style.opacity = "", t.style.clipPath = "";
|
|
331
331
|
}
|
|
332
|
-
function
|
|
333
|
-
|
|
332
|
+
function fn(t) {
|
|
333
|
+
de(t), t.style.pointerEvents = "";
|
|
334
334
|
}
|
|
335
|
-
const
|
|
336
|
-
const e = t.type ??
|
|
337
|
-
const c = o.build({ direction:
|
|
335
|
+
const hn = (t = {}) => {
|
|
336
|
+
const e = t.type ?? pn, n = t.feel ?? un, o = dn(e, n), r = (i) => {
|
|
337
|
+
const c = o.build({ direction: i });
|
|
338
338
|
return {
|
|
339
339
|
prepare: ({ from: s, to: l }) => (s.then((a) => {
|
|
340
|
-
|
|
340
|
+
Gt(a, c.out), a.style.pointerEvents = "none";
|
|
341
341
|
}), l.then((a) => {
|
|
342
|
-
|
|
342
|
+
Gt(a, c.in);
|
|
343
343
|
}), {}),
|
|
344
344
|
animation: ({ from: s, to: l, context: a }) => {
|
|
345
345
|
if (e === "z") {
|
|
346
|
-
const
|
|
347
|
-
s.style.clipPath = `inset(${
|
|
346
|
+
const y = W(a, "from"), u = W(a, "to");
|
|
347
|
+
s.style.clipPath = `inset(${y.top}px 0 calc(100% - ${y.top + y.height}px) 0)`, l.style.clipPath = `inset(${u.top}px 0 calc(100% - ${u.top + u.height}px) 0)`;
|
|
348
348
|
}
|
|
349
|
-
const
|
|
349
|
+
const d = new S({
|
|
350
350
|
element: s,
|
|
351
351
|
integrator: C.from(o.outPhysics),
|
|
352
|
-
style: (
|
|
352
|
+
style: (y) => c.out.animate(y),
|
|
353
353
|
// Restore the reused from node's inline styles on complete. This
|
|
354
354
|
// covers willChange/backfaceVisibility/contain/transform/opacity (from
|
|
355
355
|
// applyStartStyle + the WAAPI final frame), pointerEvents (set in
|
|
356
356
|
// prepare), and clipPath (set above for z; harmless no-op otherwise).
|
|
357
|
-
onComplete: () =>
|
|
358
|
-
}),
|
|
357
|
+
onComplete: () => fn(s)
|
|
358
|
+
}), p = new S({
|
|
359
359
|
element: l,
|
|
360
360
|
integrator: C.from(o.inPhysics),
|
|
361
|
-
style: (
|
|
362
|
-
onComplete: () =>
|
|
361
|
+
style: (y) => c.in.animate(y),
|
|
362
|
+
onComplete: () => de(l)
|
|
363
363
|
});
|
|
364
|
-
return new
|
|
365
|
-
{ out:
|
|
364
|
+
return new R(
|
|
365
|
+
{ out: d, in: p },
|
|
366
366
|
o.composition
|
|
367
367
|
);
|
|
368
368
|
}
|
|
369
369
|
};
|
|
370
370
|
};
|
|
371
|
-
return
|
|
372
|
-
forward:
|
|
373
|
-
backward:
|
|
371
|
+
return k({
|
|
372
|
+
forward: r("forward"),
|
|
373
|
+
backward: r("backward")
|
|
374
374
|
});
|
|
375
375
|
};
|
|
376
|
-
function
|
|
376
|
+
function yn(t, e, n) {
|
|
377
377
|
return t === "y" ? e === "non-directional" ? "non-directional" : "directional" : t !== "x" || e === "snappy" || n === "snappy" ? "snappy" : "fluid";
|
|
378
378
|
}
|
|
379
|
-
function
|
|
380
|
-
const n = t.type ?? "x", o = t.variant,
|
|
381
|
-
return
|
|
382
|
-
|
|
379
|
+
function Wr(t = {}, e = {}) {
|
|
380
|
+
const n = t.type ?? "x", o = t.variant, r = t.feel, i = yn(n, o, r);
|
|
381
|
+
return F(
|
|
382
|
+
hn({ type: n, feel: i }),
|
|
383
383
|
e.override
|
|
384
384
|
);
|
|
385
385
|
}
|
|
386
|
-
const
|
|
386
|
+
const mn = {
|
|
387
387
|
spring: { stiffness: 200, damping: 22 }
|
|
388
|
-
},
|
|
389
|
-
function
|
|
388
|
+
}, gn = 10, bn = "horizontal", wn = "#000000";
|
|
389
|
+
function qt(t, e, n, o, r, i) {
|
|
390
390
|
window.getComputedStyle(t).position === "static" && (t.style.position = "relative");
|
|
391
391
|
const s = document.createElement("div");
|
|
392
392
|
s.style.cssText = `
|
|
@@ -401,44 +401,44 @@ function Ht(t, e, n, o, i, r) {
|
|
|
401
401
|
`;
|
|
402
402
|
const l = [];
|
|
403
403
|
for (let a = 0; a < e; a++) {
|
|
404
|
-
const
|
|
404
|
+
const d = document.createElement("div");
|
|
405
405
|
if (n === "horizontal") {
|
|
406
|
-
const
|
|
407
|
-
|
|
406
|
+
const p = 100 / e;
|
|
407
|
+
d.style.cssText = `
|
|
408
408
|
position: absolute;
|
|
409
|
-
top: ${
|
|
409
|
+
top: ${p * a}%;
|
|
410
410
|
left: 0;
|
|
411
411
|
width: 100%;
|
|
412
|
-
height: calc(${
|
|
412
|
+
height: calc(${p}% + 1px);
|
|
413
413
|
background: ${o};
|
|
414
|
-
transform: scaleX(${
|
|
415
|
-
transform-origin: ${
|
|
414
|
+
transform: scaleX(${r === "hidden" ? 0 : 1});
|
|
415
|
+
transform-origin: ${i} center;
|
|
416
416
|
will-change: transform;
|
|
417
417
|
`;
|
|
418
418
|
} else {
|
|
419
|
-
const
|
|
420
|
-
|
|
419
|
+
const p = 100 / e;
|
|
420
|
+
d.style.cssText = `
|
|
421
421
|
position: absolute;
|
|
422
422
|
top: 0;
|
|
423
|
-
left: ${
|
|
424
|
-
width: calc(${
|
|
423
|
+
left: ${p * a}%;
|
|
424
|
+
width: calc(${p}% + 1px);
|
|
425
425
|
height: 100%;
|
|
426
426
|
background: ${o};
|
|
427
|
-
transform: scaleY(${
|
|
428
|
-
transform-origin: ${
|
|
427
|
+
transform: scaleY(${r === "hidden" ? 0 : 1});
|
|
428
|
+
transform-origin: ${i === "left" ? "top" : "bottom"} center;
|
|
429
429
|
will-change: transform;
|
|
430
430
|
`;
|
|
431
431
|
}
|
|
432
|
-
l.push(
|
|
432
|
+
l.push(d), s.appendChild(d);
|
|
433
433
|
}
|
|
434
434
|
return t.appendChild(s), { container: s, blinds: l };
|
|
435
435
|
}
|
|
436
|
-
const
|
|
437
|
-
const e = t.blindCount ??
|
|
436
|
+
const xn = (t = {}) => {
|
|
437
|
+
const e = t.blindCount ?? gn, n = t.direction ?? bn, o = t.blindColor ?? wn, r = t.physics ?? mn, i = {
|
|
438
438
|
prepare: async ({ from: c, to: s }) => {
|
|
439
439
|
const l = await c, a = await s;
|
|
440
440
|
l.style.zIndex = "1000";
|
|
441
|
-
const
|
|
441
|
+
const d = qt(
|
|
442
442
|
l,
|
|
443
443
|
e,
|
|
444
444
|
n,
|
|
@@ -447,7 +447,7 @@ const un = (t = {}) => {
|
|
|
447
447
|
"left"
|
|
448
448
|
);
|
|
449
449
|
a.style.position = "relative", a.style.zIndex = "0";
|
|
450
|
-
const
|
|
450
|
+
const p = qt(
|
|
451
451
|
a,
|
|
452
452
|
e,
|
|
453
453
|
n,
|
|
@@ -457,10 +457,10 @@ const un = (t = {}) => {
|
|
|
457
457
|
);
|
|
458
458
|
return {
|
|
459
459
|
fromEl: l,
|
|
460
|
-
fromBlinds:
|
|
461
|
-
fromContainer:
|
|
462
|
-
toBlinds:
|
|
463
|
-
toContainer:
|
|
460
|
+
fromBlinds: d.blinds,
|
|
461
|
+
fromContainer: d.container,
|
|
462
|
+
toBlinds: p.blinds,
|
|
463
|
+
toContainer: p.container
|
|
464
464
|
};
|
|
465
465
|
},
|
|
466
466
|
animation: ({
|
|
@@ -468,66 +468,66 @@ const un = (t = {}) => {
|
|
|
468
468
|
fromBlinds: s,
|
|
469
469
|
fromContainer: l,
|
|
470
470
|
toBlinds: a,
|
|
471
|
-
toContainer:
|
|
471
|
+
toContainer: d
|
|
472
472
|
}) => {
|
|
473
|
-
const
|
|
474
|
-
(h) => new
|
|
473
|
+
const p = s.map(
|
|
474
|
+
(h) => new S({
|
|
475
475
|
element: h,
|
|
476
|
-
integrator: C.from(
|
|
477
|
-
style: (
|
|
478
|
-
transform: n === "horizontal" ? `scaleX(${
|
|
476
|
+
integrator: C.from(r),
|
|
477
|
+
style: (m) => ({
|
|
478
|
+
transform: n === "horizontal" ? `scaleX(${m})` : `scaleY(${m})`
|
|
479
479
|
})
|
|
480
480
|
})
|
|
481
|
-
),
|
|
482
|
-
(h,
|
|
481
|
+
), y = a.map(
|
|
482
|
+
(h, m) => new S({
|
|
483
483
|
element: h,
|
|
484
|
-
integrator: C.from(
|
|
484
|
+
integrator: C.from(r),
|
|
485
485
|
style: (b, g) => ({
|
|
486
486
|
transform: n === "horizontal" ? `scaleX(${g})` : `scaleY(${g})`
|
|
487
487
|
}),
|
|
488
|
-
onComplete:
|
|
489
|
-
|
|
488
|
+
onComplete: m === a.length - 1 ? () => {
|
|
489
|
+
d.remove(), l.remove(), c.style.zIndex = "", c.style.position = "";
|
|
490
490
|
} : void 0
|
|
491
491
|
})
|
|
492
|
-
), u = new
|
|
493
|
-
return new
|
|
494
|
-
{ out: u, in:
|
|
492
|
+
), u = new R(p, { mode: "parallel" }), f = new R(y, { mode: "parallel" });
|
|
493
|
+
return new R(
|
|
494
|
+
{ out: u, in: f },
|
|
495
495
|
{ mode: "sequence" }
|
|
496
496
|
);
|
|
497
497
|
}
|
|
498
498
|
};
|
|
499
|
-
return
|
|
499
|
+
return k({ forward: i, backward: i });
|
|
500
500
|
};
|
|
501
|
-
function
|
|
501
|
+
function Vr(t = {}, e = {}) {
|
|
502
502
|
const { type: n = "horizontal" } = t;
|
|
503
|
-
return
|
|
503
|
+
return F(xn({ direction: n }), e.override);
|
|
504
504
|
}
|
|
505
|
-
function
|
|
505
|
+
function q(t, e = {}) {
|
|
506
506
|
const n = Object.fromEntries(
|
|
507
|
-
Object.entries(t).map(([o,
|
|
508
|
-
const
|
|
507
|
+
Object.entries(t).map(([o, r]) => {
|
|
508
|
+
const i = r;
|
|
509
509
|
return [
|
|
510
510
|
o,
|
|
511
|
-
Array.isArray(
|
|
511
|
+
Array.isArray(i) ? i.length === 1 ? i[0] : new R(i) : i
|
|
512
512
|
];
|
|
513
513
|
})
|
|
514
514
|
);
|
|
515
|
-
return new
|
|
515
|
+
return new R(n, e);
|
|
516
516
|
}
|
|
517
|
-
function
|
|
517
|
+
function K(t) {
|
|
518
518
|
const e = t.onComplete;
|
|
519
519
|
t.onComplete = () => {
|
|
520
520
|
e == null || e(), t.releaseFill();
|
|
521
521
|
};
|
|
522
522
|
}
|
|
523
|
-
const
|
|
523
|
+
const Sn = {
|
|
524
524
|
spring: {
|
|
525
525
|
stiffness: 250,
|
|
526
526
|
damping: 23,
|
|
527
527
|
doubleSpring: 0.7
|
|
528
528
|
}
|
|
529
|
-
},
|
|
530
|
-
function
|
|
529
|
+
}, j = 0.5;
|
|
530
|
+
function Cn(t) {
|
|
531
531
|
const e = t === "enter" ? -100 : 100, n = t === "enter" ? 100 : -100;
|
|
532
532
|
return {
|
|
533
533
|
out: {
|
|
@@ -535,29 +535,29 @@ function hn(t) {
|
|
|
535
535
|
startStyle: {},
|
|
536
536
|
animate: (o) => ({
|
|
537
537
|
transform: `translate3d(${e * o}%, 0, 0)`,
|
|
538
|
-
opacity: `${
|
|
538
|
+
opacity: `${j + (1 - j) * (1 - o)}`
|
|
539
539
|
})
|
|
540
540
|
},
|
|
541
541
|
in: {
|
|
542
542
|
willChange: "transform, opacity",
|
|
543
543
|
startStyle: {
|
|
544
544
|
transform: `translate3d(${n}%, 0, 0)`,
|
|
545
|
-
opacity: `${
|
|
545
|
+
opacity: `${j}`
|
|
546
546
|
},
|
|
547
547
|
animate: (o) => ({
|
|
548
548
|
transform: `translate3d(${n * (1 - o)}%, 0, 0)`,
|
|
549
|
-
opacity: `${
|
|
549
|
+
opacity: `${j + (1 - j) * o}`
|
|
550
550
|
})
|
|
551
551
|
}
|
|
552
552
|
};
|
|
553
553
|
}
|
|
554
|
-
function
|
|
554
|
+
function En() {
|
|
555
555
|
return {
|
|
556
|
-
physics:
|
|
557
|
-
build:
|
|
556
|
+
physics: Sn,
|
|
557
|
+
build: Cn
|
|
558
558
|
};
|
|
559
559
|
}
|
|
560
|
-
const
|
|
560
|
+
const $n = {
|
|
561
561
|
spring: {
|
|
562
562
|
stiffness: 230,
|
|
563
563
|
damping: 25,
|
|
@@ -567,7 +567,7 @@ const mn = {
|
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
569
|
};
|
|
570
|
-
function
|
|
570
|
+
function An(t) {
|
|
571
571
|
const e = t === "enter" ? -20 : 100, n = t === "enter" ? 100 : -20;
|
|
572
572
|
return {
|
|
573
573
|
out: {
|
|
@@ -588,32 +588,32 @@ function gn(t) {
|
|
|
588
588
|
}
|
|
589
589
|
};
|
|
590
590
|
}
|
|
591
|
-
function
|
|
591
|
+
function Pn() {
|
|
592
592
|
return {
|
|
593
|
-
physics:
|
|
594
|
-
build:
|
|
593
|
+
physics: $n,
|
|
594
|
+
build: An
|
|
595
595
|
};
|
|
596
596
|
}
|
|
597
|
-
const
|
|
598
|
-
parallax:
|
|
599
|
-
crossfade:
|
|
600
|
-
},
|
|
601
|
-
function
|
|
597
|
+
const vn = {
|
|
598
|
+
parallax: Pn(),
|
|
599
|
+
crossfade: En()
|
|
600
|
+
}, L = "0", pe = "1", D = "2", Rn = "parallax";
|
|
601
|
+
function Kt(t, e) {
|
|
602
602
|
t.style.willChange = e.willChange, t.style.backfaceVisibility = "hidden", t.style.contain = "layout paint";
|
|
603
603
|
for (const [n, o] of Object.entries(e.startStyle))
|
|
604
604
|
t.style[n] = o;
|
|
605
605
|
}
|
|
606
|
-
const
|
|
607
|
-
const e =
|
|
608
|
-
const
|
|
606
|
+
const In = (t = {}) => {
|
|
607
|
+
const e = vn[t.type ?? Rn], n = e.physics, o = (r) => {
|
|
608
|
+
const i = r === "forward" ? "enter" : "exit", c = e.build(i), s = i === "enter" ? L : D, l = i === "enter" ? D : L;
|
|
609
609
|
return {
|
|
610
|
-
prepare: ({ from: a, to:
|
|
611
|
-
|
|
612
|
-
}),
|
|
613
|
-
|
|
610
|
+
prepare: ({ from: a, to: d }) => (a.then((p) => {
|
|
611
|
+
Kt(p, c.out), p.style.pointerEvents = "none", p.style.zIndex = s;
|
|
612
|
+
}), d.then((p) => {
|
|
613
|
+
Kt(p, c.in), p.style.position = "relative", p.style.zIndex = l;
|
|
614
614
|
}), {}),
|
|
615
|
-
animation: ({ from: a, to:
|
|
616
|
-
const
|
|
615
|
+
animation: ({ from: a, to: d }) => {
|
|
616
|
+
const p = new S({
|
|
617
617
|
element: a,
|
|
618
618
|
integrator: C.from(n),
|
|
619
619
|
style: (u) => c.out.animate(u),
|
|
@@ -623,84 +623,84 @@ const xn = (t = {}) => {
|
|
|
623
623
|
onComplete: () => {
|
|
624
624
|
a.style.willChange = "auto", a.style.backfaceVisibility = "", a.style.contain = "", a.style.transform = "", a.style.opacity = "", a.style.pointerEvents = "", a.style.zIndex = "";
|
|
625
625
|
}
|
|
626
|
-
}),
|
|
627
|
-
element:
|
|
626
|
+
}), y = new S({
|
|
627
|
+
element: d,
|
|
628
628
|
integrator: C.from(n),
|
|
629
629
|
style: (u) => c.in.animate(u),
|
|
630
630
|
onComplete: () => {
|
|
631
|
-
|
|
631
|
+
d.style.willChange = "auto", d.style.backfaceVisibility = "", d.style.contain = "", d.style.transform = "", d.style.opacity = "", d.style.position === "relative" && (d.style.position = ""), d.style.zIndex === l && (d.style.zIndex = "");
|
|
632
632
|
}
|
|
633
633
|
});
|
|
634
|
-
return [
|
|
635
|
-
{ out:
|
|
634
|
+
return [p, y].forEach(K), new R(
|
|
635
|
+
{ out: p, in: y },
|
|
636
636
|
{ mode: "parallel" }
|
|
637
637
|
);
|
|
638
638
|
}
|
|
639
639
|
};
|
|
640
640
|
};
|
|
641
|
-
return
|
|
641
|
+
return k({
|
|
642
642
|
forward: o("forward"),
|
|
643
643
|
backward: o("backward")
|
|
644
644
|
});
|
|
645
645
|
};
|
|
646
|
-
function
|
|
646
|
+
function On(t) {
|
|
647
647
|
return t === "slide" || t === "crossfade" ? "crossfade" : "parallax";
|
|
648
648
|
}
|
|
649
|
-
function
|
|
650
|
-
const n = t.type, o =
|
|
651
|
-
return
|
|
649
|
+
function Xr(t = {}, e = {}) {
|
|
650
|
+
const n = t.type, o = On(n);
|
|
651
|
+
return F(In({ type: o }), e.override);
|
|
652
652
|
}
|
|
653
|
-
const
|
|
654
|
-
const e = t.physics ??
|
|
655
|
-
prepare: ({ to:
|
|
656
|
-
|
|
653
|
+
const _n = (t = {}) => {
|
|
654
|
+
const e = t.physics ?? De, n = t.physics ?? Ye, o = {
|
|
655
|
+
prepare: ({ to: r }) => (r.then((i) => {
|
|
656
|
+
i.style.opacity = "0", i.style.willChange = "opacity";
|
|
657
657
|
}), {}),
|
|
658
|
-
animation: ({ from:
|
|
659
|
-
const c = new
|
|
660
|
-
element:
|
|
658
|
+
animation: ({ from: r, to: i }) => {
|
|
659
|
+
const c = new S({
|
|
660
|
+
element: r,
|
|
661
661
|
integrator: C.from(n),
|
|
662
662
|
// Default bounds (0, 1). `u` runs 1→0 as the animation moves
|
|
663
663
|
// forward, mapping opacity from fully visible to invisible.
|
|
664
664
|
style: (l) => ({
|
|
665
|
-
opacity:
|
|
665
|
+
opacity: nt("fade", "out", "forward", l).opacity
|
|
666
666
|
}),
|
|
667
667
|
onComplete: () => {
|
|
668
|
-
|
|
668
|
+
r.style.willChange = "auto", r.style.opacity = "";
|
|
669
669
|
}
|
|
670
|
-
}), s = new
|
|
671
|
-
element:
|
|
670
|
+
}), s = new S({
|
|
671
|
+
element: i,
|
|
672
672
|
integrator: C.from(e),
|
|
673
673
|
style: (l) => ({
|
|
674
|
-
opacity:
|
|
674
|
+
opacity: nt("fade", "in", "forward", l).opacity
|
|
675
675
|
}),
|
|
676
676
|
onComplete: () => {
|
|
677
|
-
|
|
677
|
+
i.style.willChange = "auto", i.style.opacity = "";
|
|
678
678
|
}
|
|
679
679
|
});
|
|
680
|
-
return new
|
|
680
|
+
return new R(
|
|
681
681
|
{ out: c, in: s },
|
|
682
682
|
{ mode: "sequence" }
|
|
683
683
|
);
|
|
684
684
|
}
|
|
685
685
|
};
|
|
686
|
-
return
|
|
686
|
+
return k({ forward: o, backward: o });
|
|
687
687
|
};
|
|
688
|
-
function
|
|
689
|
-
return
|
|
688
|
+
function Br(t = {}, e = {}) {
|
|
689
|
+
return F(_n(), e.override);
|
|
690
690
|
}
|
|
691
|
-
const
|
|
691
|
+
const mt = {
|
|
692
692
|
scaleDown: { stiffness: 20, damping: 7 },
|
|
693
693
|
translate: { stiffness: 15, damping: 7 },
|
|
694
694
|
scaleUp: { stiffness: 20, damping: 7 }
|
|
695
|
-
},
|
|
695
|
+
}, V = {
|
|
696
696
|
scaleDown: 0,
|
|
697
697
|
translate: 0.2,
|
|
698
698
|
scaleUp: 0.8
|
|
699
|
-
},
|
|
700
|
-
function
|
|
701
|
-
const { items: e, from: n, to: o, recordFrame:
|
|
699
|
+
}, kn = 0.8, Fn = "white", Jt = 1e3 / 60, Tn = 600;
|
|
700
|
+
function Mn(t) {
|
|
701
|
+
const { items: e, from: n, to: o, recordFrame: r } = t, i = Jt / 1e3, c = Math.abs(o - n), s = e.map((a) => ({
|
|
702
702
|
item: a,
|
|
703
|
-
integrator: new
|
|
703
|
+
integrator: new Pt({
|
|
704
704
|
stiffness: a.spring.stiffness,
|
|
705
705
|
damping: a.spring.damping
|
|
706
706
|
}),
|
|
@@ -711,111 +711,111 @@ function An(t) {
|
|
|
711
711
|
}));
|
|
712
712
|
for (let a = 0; a < s.length; a++)
|
|
713
713
|
(a === 0 || s[a].item.offset === 0) && (s[a].started = !0);
|
|
714
|
-
|
|
714
|
+
r(0);
|
|
715
715
|
let l = 0;
|
|
716
|
-
for (let a = 1; a <=
|
|
717
|
-
const
|
|
718
|
-
l =
|
|
719
|
-
for (const
|
|
720
|
-
!
|
|
721
|
-
for (let
|
|
722
|
-
const
|
|
723
|
-
if (
|
|
724
|
-
const u = s[
|
|
716
|
+
for (let a = 1; a <= Tn; a++) {
|
|
717
|
+
const d = a * Jt;
|
|
718
|
+
l = d;
|
|
719
|
+
for (const p of s)
|
|
720
|
+
!p.started || p.settled || (p.state = p.integrator.step(p.state, o, i), p.integrator.isSettled(p.state, o) ? (p.settleTime += i, p.settleTime >= Fe && (p.state = { position: o, velocity: 0 }, p.settled = !0)) : p.settleTime = 0, p.item.tick(p.state.position));
|
|
721
|
+
for (let p = 1; p < s.length; p++) {
|
|
722
|
+
const y = s[p];
|
|
723
|
+
if (y.started) continue;
|
|
724
|
+
const u = s[p - 1];
|
|
725
725
|
if (!u.started) continue;
|
|
726
|
-
(c === 0 ? 1 : Math.abs(u.state.position - n) / c) >=
|
|
726
|
+
(c === 0 ? 1 : Math.abs(u.state.position - n) / c) >= y.item.offset && (y.started = !0);
|
|
727
727
|
}
|
|
728
|
-
if (
|
|
728
|
+
if (r(d), s.every((p) => p.settled)) return d;
|
|
729
729
|
}
|
|
730
730
|
return l;
|
|
731
731
|
}
|
|
732
|
-
function
|
|
732
|
+
function gt(t, e) {
|
|
733
733
|
return t != null && t.spring ? {
|
|
734
734
|
stiffness: t.spring.stiffness,
|
|
735
735
|
damping: t.spring.damping
|
|
736
736
|
} : e;
|
|
737
737
|
}
|
|
738
|
-
function
|
|
739
|
-
const { rect: e, scale: n, direction: o, override:
|
|
738
|
+
function Qt(t) {
|
|
739
|
+
const { rect: e, scale: n, direction: o, override: r } = t, i = o === "out" ? { scale: 1, translateY: -e.top } : { scale: n, translateY: -e.top + e.height }, c = gt(r, mt.scaleDown), s = gt(r, mt.translate), l = gt(r, mt.scaleUp), a = o === "out" ? 1 : 0, d = o === "out" ? 0 : 1, p = o === "out" ? [
|
|
740
740
|
{
|
|
741
741
|
spring: c,
|
|
742
|
-
offset:
|
|
743
|
-
tick: (
|
|
744
|
-
const h = 1 -
|
|
745
|
-
|
|
742
|
+
offset: V.scaleDown,
|
|
743
|
+
tick: (f) => {
|
|
744
|
+
const h = 1 - f;
|
|
745
|
+
i.scale = 1 - (1 - n) * h;
|
|
746
746
|
}
|
|
747
747
|
},
|
|
748
748
|
{
|
|
749
749
|
spring: s,
|
|
750
|
-
offset:
|
|
751
|
-
tick: (
|
|
752
|
-
const h = 1 -
|
|
753
|
-
|
|
750
|
+
offset: V.translate,
|
|
751
|
+
tick: (f) => {
|
|
752
|
+
const h = 1 - f;
|
|
753
|
+
i.translateY = -e.top - e.height * h;
|
|
754
754
|
}
|
|
755
755
|
},
|
|
756
756
|
{
|
|
757
757
|
spring: l,
|
|
758
|
-
offset:
|
|
759
|
-
tick: (
|
|
760
|
-
const h = 1 -
|
|
761
|
-
|
|
758
|
+
offset: V.scaleUp,
|
|
759
|
+
tick: (f) => {
|
|
760
|
+
const h = 1 - f;
|
|
761
|
+
i.scale = n + (1 - n) * h;
|
|
762
762
|
}
|
|
763
763
|
}
|
|
764
764
|
] : [
|
|
765
765
|
{
|
|
766
766
|
spring: c,
|
|
767
|
-
offset:
|
|
768
|
-
tick: (
|
|
769
|
-
|
|
767
|
+
offset: V.scaleDown,
|
|
768
|
+
tick: (f) => {
|
|
769
|
+
i.scale = 1 - (1 - n) * f;
|
|
770
770
|
}
|
|
771
771
|
},
|
|
772
772
|
{
|
|
773
773
|
spring: s,
|
|
774
|
-
offset:
|
|
775
|
-
tick: (
|
|
776
|
-
|
|
774
|
+
offset: V.translate,
|
|
775
|
+
tick: (f) => {
|
|
776
|
+
i.translateY = -e.top + e.height * (1 - f);
|
|
777
777
|
}
|
|
778
778
|
},
|
|
779
779
|
{
|
|
780
780
|
spring: l,
|
|
781
|
-
offset:
|
|
782
|
-
tick: (
|
|
783
|
-
|
|
781
|
+
offset: V.scaleUp,
|
|
782
|
+
tick: (f) => {
|
|
783
|
+
i.scale = n + (1 - n) * f;
|
|
784
784
|
}
|
|
785
785
|
}
|
|
786
|
-
],
|
|
787
|
-
items:
|
|
786
|
+
], y = [], u = Mn({
|
|
787
|
+
items: p,
|
|
788
788
|
from: a,
|
|
789
|
-
to:
|
|
790
|
-
recordFrame: (
|
|
791
|
-
time:
|
|
792
|
-
scale:
|
|
793
|
-
translateY:
|
|
789
|
+
to: d,
|
|
790
|
+
recordFrame: (f) => y.push({
|
|
791
|
+
time: f,
|
|
792
|
+
scale: i.scale,
|
|
793
|
+
translateY: i.translateY
|
|
794
794
|
})
|
|
795
795
|
});
|
|
796
|
-
return { snapshots:
|
|
796
|
+
return { snapshots: y, totalDuration: u };
|
|
797
797
|
}
|
|
798
|
-
function
|
|
798
|
+
function Dn(t, e) {
|
|
799
799
|
if (t.length === 0) return { time: 0, scale: 1, translateY: 0 };
|
|
800
800
|
if (t.length === 1 || e <= 0) return t[0];
|
|
801
801
|
if (e >= 1) return t[t.length - 1];
|
|
802
|
-
const n = e * (t.length - 1), o = Math.floor(n),
|
|
803
|
-
if (o ===
|
|
804
|
-
const
|
|
802
|
+
const n = e * (t.length - 1), o = Math.floor(n), r = Math.ceil(n);
|
|
803
|
+
if (o === r) return t[o];
|
|
804
|
+
const i = t[o], c = t[r], s = n - o;
|
|
805
805
|
return {
|
|
806
|
-
time:
|
|
807
|
-
scale:
|
|
808
|
-
translateY:
|
|
806
|
+
time: i.time + (c.time - i.time) * s,
|
|
807
|
+
scale: i.scale + (c.scale - i.scale) * s,
|
|
808
|
+
translateY: i.translateY + (c.translateY - i.translateY) * s
|
|
809
809
|
};
|
|
810
810
|
}
|
|
811
|
-
const
|
|
811
|
+
const Yn = [
|
|
812
812
|
[1, 1],
|
|
813
813
|
[-1, 1],
|
|
814
814
|
[1, -1],
|
|
815
815
|
[-1, -1]
|
|
816
816
|
];
|
|
817
|
-
function
|
|
818
|
-
const
|
|
817
|
+
function Ln(t, e) {
|
|
818
|
+
const r = (i, c, s) => {
|
|
819
819
|
const l = document.createElement("div");
|
|
820
820
|
Object.assign(l.style, {
|
|
821
821
|
position: "fixed",
|
|
@@ -823,7 +823,7 @@ function _n(t, e) {
|
|
|
823
823
|
zIndex: "9999",
|
|
824
824
|
width: "15px",
|
|
825
825
|
height: "15px",
|
|
826
|
-
...
|
|
826
|
+
...i
|
|
827
827
|
});
|
|
828
828
|
const a = document.createElement("div");
|
|
829
829
|
Object.assign(a.style, {
|
|
@@ -834,18 +834,18 @@ function _n(t, e) {
|
|
|
834
834
|
[s]: "0",
|
|
835
835
|
[c]: "0"
|
|
836
836
|
});
|
|
837
|
-
const
|
|
838
|
-
return Object.assign(
|
|
837
|
+
const d = document.createElement("div");
|
|
838
|
+
return Object.assign(d.style, {
|
|
839
839
|
position: "absolute",
|
|
840
840
|
width: "1px",
|
|
841
841
|
height: "15px",
|
|
842
842
|
backgroundColor: t,
|
|
843
843
|
[s]: "0",
|
|
844
844
|
[c]: "0"
|
|
845
|
-
}), l.appendChild(a), l.appendChild(
|
|
845
|
+
}), l.appendChild(a), l.appendChild(d), l;
|
|
846
846
|
};
|
|
847
847
|
return {
|
|
848
|
-
topLeft:
|
|
848
|
+
topLeft: r(
|
|
849
849
|
{
|
|
850
850
|
top: `${e.top - 1}px`,
|
|
851
851
|
left: `${e.left - 1}px`
|
|
@@ -853,7 +853,7 @@ function _n(t, e) {
|
|
|
853
853
|
"left",
|
|
854
854
|
"top"
|
|
855
855
|
),
|
|
856
|
-
topRight:
|
|
856
|
+
topRight: r(
|
|
857
857
|
{
|
|
858
858
|
top: `${e.top - 1}px`,
|
|
859
859
|
left: `${e.left + e.width - 15 + 1}px`
|
|
@@ -861,7 +861,7 @@ function _n(t, e) {
|
|
|
861
861
|
"right",
|
|
862
862
|
"top"
|
|
863
863
|
),
|
|
864
|
-
bottomLeft:
|
|
864
|
+
bottomLeft: r(
|
|
865
865
|
{
|
|
866
866
|
top: `${e.top + e.height - 15 + 1}px`,
|
|
867
867
|
left: `${e.left - 1}px`
|
|
@@ -869,7 +869,7 @@ function _n(t, e) {
|
|
|
869
869
|
"left",
|
|
870
870
|
"bottom"
|
|
871
871
|
),
|
|
872
|
-
bottomRight:
|
|
872
|
+
bottomRight: r(
|
|
873
873
|
{
|
|
874
874
|
top: `${e.top + e.height - 15 + 1}px`,
|
|
875
875
|
left: `${e.left + e.width - 15 + 1}px`
|
|
@@ -879,11 +879,11 @@ function _n(t, e) {
|
|
|
879
879
|
)
|
|
880
880
|
};
|
|
881
881
|
}
|
|
882
|
-
function
|
|
882
|
+
function te(t, e) {
|
|
883
883
|
const n = e.left + e.width / 2, o = e.top + e.height / 2;
|
|
884
884
|
t.style.transformOrigin = `${n}px ${o}px`;
|
|
885
885
|
}
|
|
886
|
-
function
|
|
886
|
+
function ee(t, e) {
|
|
887
887
|
t.style.clipPath = `polygon(
|
|
888
888
|
${e.left}px ${e.top}px,
|
|
889
889
|
${e.left + e.width}px ${e.top}px,
|
|
@@ -891,24 +891,24 @@ function Vt(t, e) {
|
|
|
891
891
|
${e.left}px ${e.top + e.height}px
|
|
892
892
|
)`;
|
|
893
893
|
}
|
|
894
|
-
function
|
|
895
|
-
const
|
|
896
|
-
return new
|
|
894
|
+
function bt(t, e, n, o, r) {
|
|
895
|
+
const i = n / 1e3;
|
|
896
|
+
return new S({
|
|
897
897
|
element: t,
|
|
898
|
-
integrator: new
|
|
898
|
+
integrator: new He({ durationSec: i }),
|
|
899
899
|
lowerBound: 0,
|
|
900
900
|
upperBound: 1,
|
|
901
|
-
style: (c) => o(
|
|
902
|
-
onComplete:
|
|
901
|
+
style: (c) => o(Dn(e, c)),
|
|
902
|
+
onComplete: r
|
|
903
903
|
});
|
|
904
904
|
}
|
|
905
|
-
const
|
|
906
|
-
var
|
|
907
|
-
const e = ((
|
|
905
|
+
const Hn = (t = {}) => {
|
|
906
|
+
var i;
|
|
907
|
+
const e = ((i = t.border) == null ? void 0 : i.color) ?? Fn, n = kn, o = t.physics, r = {
|
|
908
908
|
prepare: ({ from: c, to: s, context: l }) => {
|
|
909
|
-
const a =
|
|
909
|
+
const a = W(l, "from"), d = W(l, "to"), p = Tt(document.body, l.positionedParent), y = Ln(e, {
|
|
910
910
|
...a,
|
|
911
|
-
top:
|
|
911
|
+
top: p.top
|
|
912
912
|
});
|
|
913
913
|
for (const u of [
|
|
914
914
|
"topLeft",
|
|
@@ -916,123 +916,124 @@ const On = (t = {}) => {
|
|
|
916
916
|
"bottomLeft",
|
|
917
917
|
"bottomRight"
|
|
918
918
|
])
|
|
919
|
-
l.positionedParent.appendChild(
|
|
919
|
+
l.positionedParent.appendChild(y[u]);
|
|
920
920
|
return c.then((u) => {
|
|
921
|
-
|
|
921
|
+
te(u, a), ee(u, a), u.style.transform = `translateY(${-a.top}px)`;
|
|
922
922
|
}), s.then((u) => {
|
|
923
|
-
|
|
924
|
-
}), { borders:
|
|
923
|
+
te(u, d), ee(u, d), u.style.transform = `translateY(${-d.top + d.height}px) scale(${n})`;
|
|
924
|
+
}), { borders: y, fromRect: a, toRect: d };
|
|
925
925
|
},
|
|
926
|
-
animation: ({ from: c, to: s, context: l, borders: a, fromRect:
|
|
927
|
-
const
|
|
928
|
-
rect:
|
|
926
|
+
animation: ({ from: c, to: s, context: l, borders: a, fromRect: d, toRect: p }) => {
|
|
927
|
+
const y = Qt({
|
|
928
|
+
rect: d,
|
|
929
929
|
scale: n,
|
|
930
930
|
direction: "out",
|
|
931
931
|
override: o
|
|
932
|
-
}), u =
|
|
933
|
-
rect:
|
|
932
|
+
}), u = Qt({
|
|
933
|
+
rect: p,
|
|
934
934
|
scale: n,
|
|
935
935
|
direction: "in",
|
|
936
936
|
override: o
|
|
937
|
-
}),
|
|
937
|
+
}), f = bt(
|
|
938
938
|
c,
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
(
|
|
942
|
-
transform: `translateY(${
|
|
939
|
+
y.snapshots,
|
|
940
|
+
y.totalDuration,
|
|
941
|
+
(x) => ({
|
|
942
|
+
transform: `translateY(${x.translateY}px) scale(${x.scale})`
|
|
943
943
|
}),
|
|
944
944
|
() => {
|
|
945
945
|
c.style.clipPath = "", c.style.transformOrigin = "", c.style.transform = "";
|
|
946
946
|
}
|
|
947
|
-
), h =
|
|
947
|
+
), h = bt(
|
|
948
948
|
s,
|
|
949
949
|
u.snapshots,
|
|
950
950
|
u.totalDuration,
|
|
951
|
-
(
|
|
952
|
-
transform: `translateY(${
|
|
951
|
+
(x) => ({
|
|
952
|
+
transform: `translateY(${x.translateY}px) scale(${x.scale})`
|
|
953
953
|
}),
|
|
954
954
|
() => {
|
|
955
955
|
s.style.clipPath = "", s.style.transformOrigin = "", s.style.transform = "";
|
|
956
956
|
}
|
|
957
|
-
),
|
|
958
|
-
const
|
|
959
|
-
return
|
|
960
|
-
a[
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
(
|
|
964
|
-
const E = (
|
|
965
|
-
return { transform: `translate(${E}px, ${
|
|
957
|
+
), m = Yn.map(([x, A], $) => {
|
|
958
|
+
const P = ["topLeft", "topRight", "bottomLeft", "bottomRight"][$];
|
|
959
|
+
return bt(
|
|
960
|
+
a[P],
|
|
961
|
+
y.snapshots,
|
|
962
|
+
y.totalDuration,
|
|
963
|
+
(w) => {
|
|
964
|
+
const E = (d.width - d.width * w.scale) / 2 * 0.7 * x, O = (d.height - d.height * w.scale) / 2 * 0.7 * A;
|
|
965
|
+
return { transform: `translate(${E}px, ${O}px)` };
|
|
966
966
|
}
|
|
967
967
|
);
|
|
968
|
-
}), b =
|
|
969
|
-
out:
|
|
968
|
+
}), b = q({
|
|
969
|
+
out: f,
|
|
970
970
|
in: h,
|
|
971
|
-
borders:
|
|
971
|
+
borders: m
|
|
972
972
|
}), g = b.onComplete;
|
|
973
973
|
return b.onComplete = () => {
|
|
974
974
|
g == null || g();
|
|
975
|
-
const
|
|
976
|
-
for (const
|
|
975
|
+
const x = l.positionedParent;
|
|
976
|
+
for (const A of [
|
|
977
977
|
"topLeft",
|
|
978
978
|
"topRight",
|
|
979
979
|
"bottomLeft",
|
|
980
980
|
"bottomRight"
|
|
981
981
|
]) {
|
|
982
|
-
const
|
|
983
|
-
|
|
982
|
+
const $ = a[A];
|
|
983
|
+
$.parentElement === x && x.removeChild($);
|
|
984
984
|
}
|
|
985
985
|
}, b;
|
|
986
986
|
}
|
|
987
987
|
};
|
|
988
|
-
return
|
|
988
|
+
return k({ forward: r, backward: r });
|
|
989
989
|
};
|
|
990
|
-
function
|
|
990
|
+
function Ur(t = {}, e = {}) {
|
|
991
991
|
const { options: n } = t, o = (n == null ? void 0 : n.borderColor) !== void 0 ? { border: { color: n.borderColor } } : void 0;
|
|
992
|
-
return
|
|
992
|
+
return F(Hn(o), e.override);
|
|
993
993
|
}
|
|
994
|
-
function
|
|
994
|
+
function zn(t) {
|
|
995
995
|
if (!t) return null;
|
|
996
996
|
if (t.includes("/")) {
|
|
997
997
|
const n = t.split("/");
|
|
998
998
|
if (n.length !== 2) return null;
|
|
999
|
-
const o = Number.parseFloat(n[0] ?? ""),
|
|
1000
|
-
return Number.isFinite(o) && Number.isFinite(
|
|
999
|
+
const o = Number.parseFloat(n[0] ?? ""), r = Number.parseFloat(n[1] ?? "");
|
|
1000
|
+
return Number.isFinite(o) && Number.isFinite(r) && o > 0 && r > 0 ? o / r : null;
|
|
1001
1001
|
}
|
|
1002
1002
|
const e = Number.parseFloat(t);
|
|
1003
1003
|
return Number.isFinite(e) && e > 0 ? e : null;
|
|
1004
1004
|
}
|
|
1005
|
-
function
|
|
1005
|
+
function Nn(t) {
|
|
1006
1006
|
return t === "contain" || t === "cover" ? t : null;
|
|
1007
1007
|
}
|
|
1008
|
-
function
|
|
1008
|
+
function Rt(t) {
|
|
1009
1009
|
return t.tagName === "IMG";
|
|
1010
1010
|
}
|
|
1011
|
-
function
|
|
1012
|
-
|
|
1011
|
+
function ue(t) {
|
|
1012
|
+
var n;
|
|
1013
|
+
if (Rt(t)) return t;
|
|
1013
1014
|
if (t.tagName === "PICTURE" || t.tagName === "VIDEO")
|
|
1014
1015
|
return null;
|
|
1015
1016
|
const e = [];
|
|
1016
|
-
for (const
|
|
1017
|
-
const
|
|
1018
|
-
|
|
1017
|
+
for (const o of Array.from(t.children)) {
|
|
1018
|
+
const r = o;
|
|
1019
|
+
((n = r.getAttribute) == null ? void 0 : n.call(r, "data-ssgoi-crossfade")) == null && Rt(r) && e.push(r);
|
|
1019
1020
|
}
|
|
1020
1021
|
return e.length === 1 ? e[0] ?? null : null;
|
|
1021
1022
|
}
|
|
1022
|
-
function
|
|
1023
|
+
function Wn(t) {
|
|
1023
1024
|
var l, a;
|
|
1024
|
-
if (!
|
|
1025
|
+
if (!Rt(t)) return null;
|
|
1025
1026
|
const e = t, n = e.naturalWidth, o = e.naturalHeight;
|
|
1026
1027
|
if (typeof n == "number" && typeof o == "number" && Number.isFinite(n) && Number.isFinite(o) && n > 0 && o > 0)
|
|
1027
1028
|
return n / o;
|
|
1028
|
-
const
|
|
1029
|
+
const r = ((l = t.getAttribute("width")) == null ? void 0 : l.trim()) ?? "", i = ((a = t.getAttribute("height")) == null ? void 0 : a.trim()) ?? "", c = r === "" ? Number.NaN : Number(r), s = i === "" ? Number.NaN : Number(i);
|
|
1029
1030
|
return Number.isFinite(c) && Number.isFinite(s) && c > 0 && s > 0 ? c / s : null;
|
|
1030
1031
|
}
|
|
1031
|
-
function
|
|
1032
|
+
function Vn(t) {
|
|
1032
1033
|
const e = t.trim().toLowerCase().replace(/\s+/g, " ");
|
|
1033
1034
|
return e === "" || e === "center" || e === "center center" || e === "50% 50%";
|
|
1034
1035
|
}
|
|
1035
|
-
function
|
|
1036
|
+
function J(t) {
|
|
1036
1037
|
if (typeof getComputedStyle == "function")
|
|
1037
1038
|
try {
|
|
1038
1039
|
return getComputedStyle(t);
|
|
@@ -1040,44 +1041,44 @@ function K(t) {
|
|
|
1040
1041
|
}
|
|
1041
1042
|
return t.style;
|
|
1042
1043
|
}
|
|
1043
|
-
function
|
|
1044
|
-
const e =
|
|
1044
|
+
function Xn(t) {
|
|
1045
|
+
const e = J(t), n = Vn(e.objectPosition ?? "");
|
|
1045
1046
|
return {
|
|
1046
|
-
fit: n ?
|
|
1047
|
+
fit: n ? Nn(e.objectFit ?? null) : null,
|
|
1047
1048
|
centered: n
|
|
1048
1049
|
};
|
|
1049
1050
|
}
|
|
1050
|
-
function
|
|
1051
|
+
function Mt(t) {
|
|
1051
1052
|
if (!t) return 0;
|
|
1052
1053
|
const e = /^(-?(?:\d+\.?\d*|\.\d+))px$/.exec(t.trim());
|
|
1053
1054
|
if (!e) return null;
|
|
1054
1055
|
const n = Number.parseFloat(e[1] ?? "");
|
|
1055
1056
|
return Number.isFinite(n) && n >= 0 ? n : null;
|
|
1056
1057
|
}
|
|
1057
|
-
function
|
|
1058
|
-
const e =
|
|
1058
|
+
function It(t) {
|
|
1059
|
+
const e = J(t), n = [
|
|
1059
1060
|
e.borderTopLeftRadius,
|
|
1060
1061
|
e.borderTopRightRadius,
|
|
1061
1062
|
e.borderBottomRightRadius,
|
|
1062
1063
|
e.borderBottomLeftRadius
|
|
1063
|
-
].map(
|
|
1064
|
+
].map(Mt), o = n[0];
|
|
1064
1065
|
if (o == null)
|
|
1065
1066
|
return { radius: 0, supported: !1 };
|
|
1066
|
-
const
|
|
1067
|
-
(
|
|
1067
|
+
const r = n.every(
|
|
1068
|
+
(i) => i !== null && Math.abs(i - o) < 1e-3
|
|
1068
1069
|
);
|
|
1069
|
-
return { radius:
|
|
1070
|
+
return { radius: r ? o : 0, supported: r };
|
|
1070
1071
|
}
|
|
1071
|
-
function
|
|
1072
|
-
var
|
|
1072
|
+
function Bn(t, e) {
|
|
1073
|
+
var r;
|
|
1073
1074
|
if (!e) return null;
|
|
1074
|
-
const n = (
|
|
1075
|
+
const n = (r = t.getAttribute(e)) == null ? void 0 : r.trim();
|
|
1075
1076
|
if (n == null || n === "") return null;
|
|
1076
1077
|
const o = Number.parseFloat(n);
|
|
1077
1078
|
return Number.isFinite(o) && o >= 0 ? o : null;
|
|
1078
1079
|
}
|
|
1079
|
-
function
|
|
1080
|
-
const e =
|
|
1080
|
+
function Un(t) {
|
|
1081
|
+
const e = J(t);
|
|
1081
1082
|
return [
|
|
1082
1083
|
e.paddingTop,
|
|
1083
1084
|
e.paddingRight,
|
|
@@ -1087,19 +1088,19 @@ function Ln(t) {
|
|
|
1087
1088
|
e.borderRightWidth,
|
|
1088
1089
|
e.borderBottomWidth,
|
|
1089
1090
|
e.borderLeftWidth
|
|
1090
|
-
].every((o) => o ?
|
|
1091
|
+
].every((o) => o ? Mt(o) === 0 : !0);
|
|
1091
1092
|
}
|
|
1092
|
-
function
|
|
1093
|
-
const e =
|
|
1093
|
+
function jn(t) {
|
|
1094
|
+
const e = J(t), n = (o) => o === "hidden" || o === "clip";
|
|
1094
1095
|
return n(e.overflowX) && n(e.overflowY);
|
|
1095
1096
|
}
|
|
1096
|
-
function
|
|
1097
|
+
function z(t) {
|
|
1097
1098
|
return t.left + t.width / 2;
|
|
1098
1099
|
}
|
|
1099
|
-
function
|
|
1100
|
+
function N(t) {
|
|
1100
1101
|
return t.top + t.height / 2;
|
|
1101
1102
|
}
|
|
1102
|
-
function
|
|
1103
|
+
function U(t, e) {
|
|
1103
1104
|
return {
|
|
1104
1105
|
top: Math.max(0, e.top - t.top),
|
|
1105
1106
|
right: Math.max(0, t.left + t.width - (e.left + e.width)),
|
|
@@ -1107,30 +1108,30 @@ function G(t, e) {
|
|
|
1107
1108
|
left: Math.max(0, e.left - t.left)
|
|
1108
1109
|
};
|
|
1109
1110
|
}
|
|
1110
|
-
function
|
|
1111
|
-
const n = Math.max(t.left, e.left), o = Math.max(t.top, e.top),
|
|
1112
|
-
return
|
|
1111
|
+
function Ot(t, e) {
|
|
1112
|
+
const n = Math.max(t.left, e.left), o = Math.max(t.top, e.top), r = Math.min(t.left + t.width, e.left + e.width), i = Math.min(t.top + t.height, e.top + e.height);
|
|
1113
|
+
return r > n && i > o ? { left: n, top: o, width: r - n, height: i - o } : null;
|
|
1113
1114
|
}
|
|
1114
|
-
function
|
|
1115
|
+
function Z(t, e) {
|
|
1115
1116
|
return Math.abs(t.left - e.left) < 0.01 && Math.abs(t.top - e.top) < 0.01 && Math.abs(t.width - e.width) < 0.01 && Math.abs(t.height - e.height) < 0.01;
|
|
1116
1117
|
}
|
|
1117
|
-
function
|
|
1118
|
+
function Zn(t, e, n) {
|
|
1118
1119
|
const o = t.width / t.height;
|
|
1119
|
-
let
|
|
1120
|
-
return n === "contain" ? o > e ? (
|
|
1121
|
-
left: t.left + (t.width -
|
|
1122
|
-
top: t.top + (t.height -
|
|
1123
|
-
width:
|
|
1124
|
-
height:
|
|
1120
|
+
let r, i;
|
|
1121
|
+
return n === "contain" ? o > e ? (i = t.height, r = i * e) : (r = t.width, i = r / e) : o > e ? (r = t.width, i = r / e) : (i = t.height, r = i * e), {
|
|
1122
|
+
left: t.left + (t.width - r) / 2,
|
|
1123
|
+
top: t.top + (t.height - i) / 2,
|
|
1124
|
+
width: r,
|
|
1125
|
+
height: i
|
|
1125
1126
|
};
|
|
1126
1127
|
}
|
|
1127
|
-
function
|
|
1128
|
-
const o = e !== null && n !== null && t.width > 0 && t.height > 0 ?
|
|
1128
|
+
function fe(t, e, n) {
|
|
1129
|
+
const o = e !== null && n !== null && t.width > 0 && t.height > 0 ? Zn(t, e, n) : t, r = n === "contain" ? o : t;
|
|
1129
1130
|
return {
|
|
1130
1131
|
bbox: t,
|
|
1131
1132
|
content: o,
|
|
1132
|
-
window:
|
|
1133
|
-
clipInset:
|
|
1133
|
+
window: r,
|
|
1134
|
+
clipInset: U(o, r),
|
|
1134
1135
|
aspectRatio: e,
|
|
1135
1136
|
fit: n,
|
|
1136
1137
|
radius: 0,
|
|
@@ -1141,168 +1142,282 @@ function ie(t, e, n) {
|
|
|
1141
1142
|
mediaElement: null
|
|
1142
1143
|
};
|
|
1143
1144
|
}
|
|
1144
|
-
function
|
|
1145
|
+
function _t(t, e, n) {
|
|
1145
1146
|
return {
|
|
1146
|
-
...
|
|
1147
|
+
...fe(t, null, null),
|
|
1147
1148
|
radius: e,
|
|
1148
1149
|
radiusSource: n,
|
|
1149
1150
|
bboxRadius: e,
|
|
1150
1151
|
bboxRadiusSource: n
|
|
1151
1152
|
};
|
|
1152
1153
|
}
|
|
1153
|
-
function
|
|
1154
|
+
function he(t, e) {
|
|
1154
1155
|
const n = t.aspectRatio, o = e.aspectRatio;
|
|
1155
1156
|
return t.contentAware && e.contentAware && n !== null && o !== null && Math.abs(n - o) / Math.max(n, o) < 0.01;
|
|
1156
1157
|
}
|
|
1157
|
-
function
|
|
1158
|
-
return
|
|
1158
|
+
function ne(t) {
|
|
1159
|
+
return _t(
|
|
1159
1160
|
t.bbox,
|
|
1160
1161
|
t.bboxRadius,
|
|
1161
1162
|
t.bboxRadiusSource
|
|
1162
1163
|
);
|
|
1163
1164
|
}
|
|
1164
|
-
function
|
|
1165
|
-
return
|
|
1165
|
+
function ye(t, e) {
|
|
1166
|
+
return he(t, e) ? [t, e] : [ne(t), ne(e)];
|
|
1166
1167
|
}
|
|
1167
|
-
function
|
|
1168
|
-
const
|
|
1169
|
-
t.getAttribute(o.legacyAspectRatioAttribute) ?? (
|
|
1170
|
-
) : null, s = c ?? (
|
|
1171
|
-
u && h &&
|
|
1172
|
-
const
|
|
1168
|
+
function Gn(t, e, n, o) {
|
|
1169
|
+
const r = ue(t), i = r ? n(r) : e, c = o.legacyAspectRatioAttribute ? zn(
|
|
1170
|
+
t.getAttribute(o.legacyAspectRatioAttribute) ?? (r == null ? void 0 : r.getAttribute(o.legacyAspectRatioAttribute)) ?? null
|
|
1171
|
+
) : null, s = c ?? (r ? Wn(r) : null), l = r ? Xn(r) : { fit: null, centered: !0 }, a = l.centered && (r === null || Un(r)) ? l.fit ?? (c !== null ? o.fallbackFit ?? null : null) : null, d = fe(i, s, a), p = jn(t), u = r !== null && r !== t && p ? Ot(d.window, e) : d.window, f = Bn(t, o.legacyRadiusAttribute), h = r === t || p, m = h ? It(t) : { radius: 0, supported: !0 }, b = f ?? m.radius, g = f !== null ? "legacy" : m.supported ? m.radius > 0 ? "computed" : "none" : "unsupported", x = [];
|
|
1172
|
+
u && h && Z(u, e) && x.push(m), u && r && Z(u, i) && x.push(It(r));
|
|
1173
|
+
const A = x.every((E) => E.supported), $ = Math.max(
|
|
1173
1174
|
0,
|
|
1174
|
-
...
|
|
1175
|
-
),
|
|
1176
|
-
return !u ||
|
|
1177
|
-
...
|
|
1175
|
+
...x.map((E) => E.radius)
|
|
1176
|
+
), P = f ?? $, w = f !== null ? "legacy" : A ? $ > 0 ? "computed" : "none" : "unsupported";
|
|
1177
|
+
return !u || w === "unsupported" ? _t(e, b, g) : {
|
|
1178
|
+
...d,
|
|
1178
1179
|
bbox: e,
|
|
1179
1180
|
window: u,
|
|
1180
|
-
clipInset:
|
|
1181
|
-
radius:
|
|
1182
|
-
radiusSource:
|
|
1181
|
+
clipInset: U(d.content, u),
|
|
1182
|
+
radius: P,
|
|
1183
|
+
radiusSource: w,
|
|
1183
1184
|
bboxRadius: b,
|
|
1184
1185
|
bboxRadiusSource: g,
|
|
1185
|
-
mediaElement:
|
|
1186
|
+
mediaElement: d.contentAware ? r : null
|
|
1186
1187
|
};
|
|
1187
1188
|
}
|
|
1188
|
-
function
|
|
1189
|
-
const
|
|
1189
|
+
function ot(t, e, n, o) {
|
|
1190
|
+
const r = Gn(
|
|
1190
1191
|
t,
|
|
1191
1192
|
e,
|
|
1192
1193
|
n,
|
|
1193
1194
|
o
|
|
1194
1195
|
);
|
|
1195
|
-
if (!o.clipRoot ||
|
|
1196
|
-
return
|
|
1197
|
-
let
|
|
1196
|
+
if (!o.clipRoot || r.radiusSource === "unsupported")
|
|
1197
|
+
return r;
|
|
1198
|
+
let i = r.window, c = r.radius, s = [c, c, c, c], l = r.radiusSource, a = t.parentElement;
|
|
1198
1199
|
for (; a && a !== o.clipRoot; ) {
|
|
1199
|
-
const
|
|
1200
|
-
if (u ||
|
|
1200
|
+
const p = J(a), y = (h) => h === "hidden" || h === "clip" || h === "auto" || h === "scroll", u = y(p.overflowX), f = y(p.overflowY);
|
|
1201
|
+
if (u || f) {
|
|
1201
1202
|
if (![
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
].every((
|
|
1207
|
-
return
|
|
1208
|
-
const
|
|
1209
|
-
left: u ?
|
|
1210
|
-
top:
|
|
1211
|
-
width: u ?
|
|
1212
|
-
height:
|
|
1213
|
-
}, g =
|
|
1214
|
-
if (!g) return
|
|
1215
|
-
const
|
|
1216
|
-
if (!
|
|
1217
|
-
if (u &&
|
|
1218
|
-
l !== "legacy" && (c = Math.max(c,
|
|
1219
|
-
(
|
|
1203
|
+
p.borderTopWidth,
|
|
1204
|
+
p.borderRightWidth,
|
|
1205
|
+
p.borderBottomWidth,
|
|
1206
|
+
p.borderLeftWidth
|
|
1207
|
+
].every((w) => Mt(w) === 0) || a.offsetWidth && a.clientWidth && a.offsetWidth - a.clientWidth > 1 || a.offsetHeight && a.clientHeight && a.offsetHeight - a.clientHeight > 1)
|
|
1208
|
+
return r;
|
|
1209
|
+
const m = n(a), b = {
|
|
1210
|
+
left: u ? m.left : i.left,
|
|
1211
|
+
top: f ? m.top : i.top,
|
|
1212
|
+
width: u ? m.width : i.width,
|
|
1213
|
+
height: f ? m.height : i.height
|
|
1214
|
+
}, g = Ot(i, b);
|
|
1215
|
+
if (!g) return r;
|
|
1216
|
+
const x = It(a);
|
|
1217
|
+
if (!x.supported) return r;
|
|
1218
|
+
if (u && f && Z(i, m))
|
|
1219
|
+
l !== "legacy" && (c = Math.max(c, x.radius), s = s.map(
|
|
1220
|
+
(w) => Math.max(w, x.radius)
|
|
1220
1221
|
), c > 0 && (l = "computed"));
|
|
1221
|
-
else if (
|
|
1222
|
-
const
|
|
1223
|
-
left:
|
|
1224
|
-
top:
|
|
1225
|
-
width:
|
|
1226
|
-
height:
|
|
1222
|
+
else if (x.radius > 0) {
|
|
1223
|
+
const w = {
|
|
1224
|
+
left: m.left + x.radius,
|
|
1225
|
+
top: m.top + x.radius,
|
|
1226
|
+
width: m.width - 2 * x.radius,
|
|
1227
|
+
height: m.height - 2 * x.radius
|
|
1227
1228
|
};
|
|
1228
|
-
if (!
|
|
1229
|
-
return
|
|
1229
|
+
if (!Z(Ot(i, w) ?? m, i))
|
|
1230
|
+
return r;
|
|
1230
1231
|
}
|
|
1231
|
-
const
|
|
1232
|
-
[
|
|
1233
|
-
[
|
|
1234
|
-
[
|
|
1235
|
-
[
|
|
1232
|
+
const A = U(i, g), $ = [
|
|
1233
|
+
[A.top, A.left],
|
|
1234
|
+
[A.top, A.right],
|
|
1235
|
+
[A.bottom, A.right],
|
|
1236
|
+
[A.bottom, A.left]
|
|
1236
1237
|
];
|
|
1237
|
-
for (let
|
|
1238
|
-
const E = Math.max(
|
|
1239
|
-
if (E > 0.01 && E <
|
|
1240
|
-
E > 0.01 && (s[
|
|
1238
|
+
for (let w = 0; w < 4; w++) {
|
|
1239
|
+
const E = Math.max(...$[w]), O = s[w];
|
|
1240
|
+
if (E > 0.01 && E < O) return r;
|
|
1241
|
+
E > 0.01 && (s[w] = 0);
|
|
1241
1242
|
}
|
|
1242
|
-
const
|
|
1243
|
-
if (g.width <
|
|
1244
|
-
return
|
|
1245
|
-
|
|
1243
|
+
const P = Math.max(...s);
|
|
1244
|
+
if (g.width < P || g.height < P)
|
|
1245
|
+
return r;
|
|
1246
|
+
i = g;
|
|
1246
1247
|
}
|
|
1247
1248
|
a = a.parentElement;
|
|
1248
1249
|
}
|
|
1249
|
-
const
|
|
1250
|
+
const d = Z(r.bbox, i);
|
|
1250
1251
|
return {
|
|
1251
|
-
...
|
|
1252
|
-
window:
|
|
1253
|
-
clipInset:
|
|
1252
|
+
...r,
|
|
1253
|
+
window: i,
|
|
1254
|
+
clipInset: U(r.content, i),
|
|
1254
1255
|
radius: c,
|
|
1255
1256
|
radiusSource: l,
|
|
1256
|
-
...s.some((
|
|
1257
|
-
...
|
|
1257
|
+
...s.some((p) => p !== c) ? { cornerRadii: s } : {},
|
|
1258
|
+
...d ? { bboxRadius: c, bboxRadiusSource: l } : {}
|
|
1258
1259
|
};
|
|
1259
1260
|
}
|
|
1260
|
-
function
|
|
1261
|
-
const
|
|
1261
|
+
function me(t, e, n, o, r) {
|
|
1262
|
+
const i = n.width / o, c = n.height / r;
|
|
1262
1263
|
return {
|
|
1263
|
-
left:
|
|
1264
|
-
top:
|
|
1265
|
-
width:
|
|
1264
|
+
left: z(t) + (z(n) - z(e)) / o - i / 2,
|
|
1265
|
+
top: N(t) + (N(n) - N(e)) / r - c / 2,
|
|
1266
|
+
width: i,
|
|
1266
1267
|
height: c
|
|
1267
1268
|
};
|
|
1268
1269
|
}
|
|
1269
|
-
const
|
|
1270
|
+
const qn = {
|
|
1270
1271
|
enter: "contain",
|
|
1271
1272
|
exit: "cover",
|
|
1272
1273
|
legacy: "contain"
|
|
1273
1274
|
};
|
|
1274
1275
|
function X(t) {
|
|
1275
|
-
return
|
|
1276
|
+
return qn[t];
|
|
1277
|
+
}
|
|
1278
|
+
const rt = "data-ssgoi-crossfade", B = (t) => Math.min(1, Math.max(0, t)), wt = /* @__PURE__ */ new WeakMap();
|
|
1279
|
+
function it(t) {
|
|
1280
|
+
const e = wt.get(t) ?? {
|
|
1281
|
+
value: t.style.getPropertyValue("opacity"),
|
|
1282
|
+
priority: t.style.getPropertyPriority("opacity"),
|
|
1283
|
+
opacity: Number.parseFloat(getComputedStyle(t).opacity),
|
|
1284
|
+
users: /* @__PURE__ */ new Set()
|
|
1285
|
+
}, n = {};
|
|
1286
|
+
e.users.add(n), wt.set(t, e);
|
|
1287
|
+
let o = !1;
|
|
1288
|
+
return {
|
|
1289
|
+
opacity: Number.isFinite(e.opacity) ? e.opacity : 1,
|
|
1290
|
+
set: (r) => {
|
|
1291
|
+
n.value = r, t.style.opacity = String(r);
|
|
1292
|
+
},
|
|
1293
|
+
restore: () => {
|
|
1294
|
+
if (!o) {
|
|
1295
|
+
if (o = !0, e.users.delete(n), e.users.size > 0) {
|
|
1296
|
+
const r = Array.from(e.users), i = r[r.length - 1];
|
|
1297
|
+
(i == null ? void 0 : i.value) !== void 0 && (t.style.opacity = String(i.value));
|
|
1298
|
+
return;
|
|
1299
|
+
}
|
|
1300
|
+
e.value ? t.style.setProperty("opacity", e.value, e.priority) : t.style.removeProperty("opacity"), wt.delete(t);
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
};
|
|
1304
|
+
}
|
|
1305
|
+
function Dt(t) {
|
|
1306
|
+
const e = t.cloneNode(!0), n = (o, r) => {
|
|
1307
|
+
const i = getComputedStyle(o), c = r.style;
|
|
1308
|
+
for (const l of Array.from(i))
|
|
1309
|
+
c.setProperty(l, i.getPropertyValue(l));
|
|
1310
|
+
for (const { name: l } of Array.from(r.attributes))
|
|
1311
|
+
(l === "id" || l.startsWith("data-hero-") || l.startsWith("data-zoom-")) && r.removeAttribute(l);
|
|
1312
|
+
if (o.tagName === "IMG") {
|
|
1313
|
+
const l = o;
|
|
1314
|
+
l.currentSrc && (r.removeAttribute("srcset"), r.removeAttribute("sizes"), r.setAttribute("src", l.currentSrc)), r.setAttribute("loading", "eager");
|
|
1315
|
+
}
|
|
1316
|
+
c.animation = "none", c.transition = "none";
|
|
1317
|
+
const s = Array.from(r.children);
|
|
1318
|
+
Array.from(o.children).forEach((l, a) => {
|
|
1319
|
+
const d = s[a];
|
|
1320
|
+
d && (l.hasAttribute(rt) || l.hasAttribute("data-hero-placeholder") ? d.remove() : n(l, d));
|
|
1321
|
+
});
|
|
1322
|
+
};
|
|
1323
|
+
return n(t, e), e.setAttribute(rt, ""), e.setAttribute("aria-hidden", "true"), e.setAttribute("inert", ""), Object.assign(e.style, {
|
|
1324
|
+
position: "absolute",
|
|
1325
|
+
left: "0",
|
|
1326
|
+
top: "0",
|
|
1327
|
+
right: "auto",
|
|
1328
|
+
bottom: "auto",
|
|
1329
|
+
margin: "0",
|
|
1330
|
+
minWidth: "0",
|
|
1331
|
+
minHeight: "0",
|
|
1332
|
+
maxWidth: "none",
|
|
1333
|
+
maxHeight: "none",
|
|
1334
|
+
boxSizing: "border-box",
|
|
1335
|
+
transform: "none",
|
|
1336
|
+
translate: "none",
|
|
1337
|
+
rotate: "none",
|
|
1338
|
+
scale: "none",
|
|
1339
|
+
transformOrigin: "center center",
|
|
1340
|
+
pointerEvents: "none",
|
|
1341
|
+
willChange: "transform, clip-path, opacity"
|
|
1342
|
+
}), e;
|
|
1276
1343
|
}
|
|
1277
|
-
function
|
|
1344
|
+
function kt(t, e) {
|
|
1345
|
+
const n = H(t, e);
|
|
1346
|
+
return {
|
|
1347
|
+
box: {
|
|
1348
|
+
left: n.left + t.scrollLeft,
|
|
1349
|
+
top: n.top + t.scrollTop,
|
|
1350
|
+
width: n.width,
|
|
1351
|
+
height: n.height
|
|
1352
|
+
},
|
|
1353
|
+
scaleX: e.offsetWidth && Math.abs(n.width - e.offsetWidth) > 0.5 ? n.width / e.offsetWidth : 1,
|
|
1354
|
+
scaleY: e.offsetHeight && Math.abs(n.height - e.offsetHeight) > 0.5 ? n.height / e.offsetHeight : 1
|
|
1355
|
+
};
|
|
1356
|
+
}
|
|
1357
|
+
function Kn(t, e) {
|
|
1358
|
+
const { box: n, scaleX: o, scaleY: r } = e, i = (t.left + t.width / 2 - n.left - n.width / 2) / o, c = (t.top + t.height / 2 - n.top - n.height / 2) / r;
|
|
1359
|
+
return `translate(${i}px, ${c}px) scale(${t.width / n.width}, ${t.height / n.height})`;
|
|
1360
|
+
}
|
|
1361
|
+
const st = "data-hero-enter-key", at = "data-hero-exit-key", G = "data-hero-key";
|
|
1362
|
+
function Jn(t, e) {
|
|
1363
|
+
return t.fromEl.getAttribute(st) === t.key && t.toEl.getAttribute(at) === t.key ? !0 : t.fromEl.getAttribute(at) === t.key && t.toEl.getAttribute(st) === t.key ? !1 : e === "backward" && t.fromEl.getAttribute(G) === t.key && t.toEl.getAttribute(G) === t.key;
|
|
1364
|
+
}
|
|
1365
|
+
function Qn(t, e, n, o, r) {
|
|
1366
|
+
const i = document.createElement("div");
|
|
1367
|
+
i.setAttribute("data-hero-layer", ""), i.setAttribute("aria-hidden", "true"), i.setAttribute("inert", ""), Object.assign(i.style, {
|
|
1368
|
+
position: "absolute",
|
|
1369
|
+
left: "0",
|
|
1370
|
+
top: "0",
|
|
1371
|
+
width: "100%",
|
|
1372
|
+
height: "100%",
|
|
1373
|
+
pointerEvents: "none",
|
|
1374
|
+
isolation: "isolate",
|
|
1375
|
+
zIndex: String(Number(D) + 1)
|
|
1376
|
+
});
|
|
1377
|
+
const c = (a, d) => {
|
|
1378
|
+
const p = Dt(a);
|
|
1379
|
+
return Object.assign(p.style, {
|
|
1380
|
+
left: `${d.left}px`,
|
|
1381
|
+
top: `${d.top}px`,
|
|
1382
|
+
width: `${d.width}px`,
|
|
1383
|
+
height: `${d.height}px`,
|
|
1384
|
+
zIndex: "auto",
|
|
1385
|
+
// Add the two weighted images inside the isolated layer so opaque
|
|
1386
|
+
// images stay opaque at the midpoint instead of exposing list chrome.
|
|
1387
|
+
mixBlendMode: "plus-lighter"
|
|
1388
|
+
}), r && (p.style.borderRadius = "0"), p;
|
|
1389
|
+
}, s = c(t, n), l = c(e, o);
|
|
1390
|
+
return s.setAttribute("data-hero-layer-source", ""), l.setAttribute("data-hero-layer-destination", ""), i.append(l, s), { layer: i, source: s, destination: l };
|
|
1391
|
+
}
|
|
1392
|
+
function ct(t, e) {
|
|
1278
1393
|
const n = e.map((o) => ({
|
|
1279
1394
|
name: o,
|
|
1280
1395
|
value: t.style.getPropertyValue(o),
|
|
1281
1396
|
priority: t.style.getPropertyPriority(o)
|
|
1282
1397
|
}));
|
|
1283
1398
|
return () => {
|
|
1284
|
-
for (const { name: o, value:
|
|
1285
|
-
|
|
1399
|
+
for (const { name: o, value: r, priority: i } of n)
|
|
1400
|
+
r ? t.style.setProperty(o, r, i) : t.style.removeProperty(o);
|
|
1286
1401
|
};
|
|
1287
1402
|
}
|
|
1288
|
-
function
|
|
1403
|
+
function to(t) {
|
|
1289
1404
|
const e = t.getAttribute("data-hero-transitioning");
|
|
1290
1405
|
return t.setAttribute("data-hero-transitioning", ""), () => {
|
|
1291
1406
|
e === null ? t.removeAttribute("data-hero-transitioning") : t.setAttribute("data-hero-transitioning", e);
|
|
1292
1407
|
};
|
|
1293
1408
|
}
|
|
1294
|
-
function
|
|
1295
|
-
const n =
|
|
1296
|
-
return t.style.zIndex =
|
|
1409
|
+
function eo(t, e) {
|
|
1410
|
+
const n = ct(t, ["z-index"]), o = ct(e, ["z-index", "position"]);
|
|
1411
|
+
return t.style.zIndex = L, e.style.zIndex = D, getComputedStyle(e).position === "static" && (e.style.position = "relative"), () => {
|
|
1297
1412
|
n(), o();
|
|
1298
1413
|
};
|
|
1299
1414
|
}
|
|
1300
|
-
function
|
|
1415
|
+
function no(t, e, n) {
|
|
1301
1416
|
if (t.tagName !== "IMG") return () => {
|
|
1302
1417
|
};
|
|
1303
|
-
const o = getComputedStyle(t),
|
|
1304
|
-
let
|
|
1305
|
-
o.position !== "absolute" && o.position !== "fixed" && (
|
|
1418
|
+
const o = getComputedStyle(t), r = (y) => Number.parseFloat(y) || 0, i = o.boxSizing === "border-box", c = r(o.width) + (i ? 0 : r(o.paddingLeft) + r(o.paddingRight) + r(o.borderLeftWidth) + r(o.borderRightWidth)), s = r(o.height) + (i ? 0 : r(o.paddingTop) + r(o.paddingBottom) + r(o.borderTopWidth) + r(o.borderBottomWidth)), l = e.width * c / n.width, a = e.height * s / n.height;
|
|
1419
|
+
let d = null;
|
|
1420
|
+
o.position !== "absolute" && o.position !== "fixed" && (d = document.createElement("span"), d.setAttribute("data-hero-placeholder", ""), d.setAttribute("aria-hidden", "true"), Object.assign(d.style, {
|
|
1306
1421
|
display: o.display === "inline" ? "inline-block" : o.display,
|
|
1307
1422
|
boxSizing: "border-box",
|
|
1308
1423
|
width: `${c}px`,
|
|
@@ -1315,8 +1430,8 @@ function Bn(t, e, n) {
|
|
|
1315
1430
|
verticalAlign: o.verticalAlign,
|
|
1316
1431
|
visibility: "hidden",
|
|
1317
1432
|
pointerEvents: "none"
|
|
1318
|
-
}), t.before(
|
|
1319
|
-
const
|
|
1433
|
+
}), t.before(d));
|
|
1434
|
+
const p = ct(t, [
|
|
1320
1435
|
"position",
|
|
1321
1436
|
"left",
|
|
1322
1437
|
"top",
|
|
@@ -1351,22 +1466,21 @@ function Bn(t, e, n) {
|
|
|
1351
1466
|
margin: "0",
|
|
1352
1467
|
flex: "none"
|
|
1353
1468
|
}), () => {
|
|
1354
|
-
|
|
1469
|
+
p(), d == null || d.remove();
|
|
1355
1470
|
};
|
|
1356
1471
|
}
|
|
1357
|
-
function
|
|
1358
|
-
const o = (s, l) => `${l > 0 ? s / l * 100 : 0}%`,
|
|
1472
|
+
function lt(t, e, n) {
|
|
1473
|
+
const o = (s, l) => `${l > 0 ? s / l * 100 : 0}%`, r = [
|
|
1359
1474
|
o(e.top, t.height),
|
|
1360
1475
|
o(e.right, t.width),
|
|
1361
1476
|
o(e.bottom, t.height),
|
|
1362
1477
|
o(e.left, t.width)
|
|
1363
|
-
].join(" "),
|
|
1364
|
-
return `inset(${
|
|
1478
|
+
].join(" "), i = n.map((s) => o(s.x, t.width)).join(" "), c = n.map((s) => o(s.y, t.height)).join(" ");
|
|
1479
|
+
return `inset(${r} round ${i} / ${c})`;
|
|
1365
1480
|
}
|
|
1366
|
-
|
|
1367
|
-
class Un {
|
|
1481
|
+
class oo {
|
|
1368
1482
|
constructor() {
|
|
1369
|
-
|
|
1483
|
+
_(this, "previousFromOpacity", "");
|
|
1370
1484
|
}
|
|
1371
1485
|
prepare(e) {
|
|
1372
1486
|
e.from.then((n) => {
|
|
@@ -1379,82 +1493,82 @@ class Un {
|
|
|
1379
1493
|
}), {};
|
|
1380
1494
|
}
|
|
1381
1495
|
}
|
|
1382
|
-
const
|
|
1383
|
-
function
|
|
1496
|
+
const ro = () => new oo();
|
|
1497
|
+
function io(t, e) {
|
|
1384
1498
|
const n = new Set(e), o = /* @__PURE__ */ new Set();
|
|
1385
1499
|
for (const c of n) {
|
|
1386
1500
|
let s = c.parentElement;
|
|
1387
1501
|
for (; s && s !== t; )
|
|
1388
1502
|
o.add(s), s = s.parentElement;
|
|
1389
1503
|
}
|
|
1390
|
-
const
|
|
1391
|
-
var s;
|
|
1392
|
-
if (!(n.has(c) || ((s = c.getAttribute) == null ? void 0 : s.call(c, "data-hero-placeholder")) != null)) {
|
|
1504
|
+
const r = [], i = (c) => {
|
|
1505
|
+
var s, l;
|
|
1506
|
+
if (!(n.has(c) || ((s = c.getAttribute) == null ? void 0 : s.call(c, rt)) != null || ((l = c.getAttribute) == null ? void 0 : l.call(c, "data-hero-placeholder")) != null)) {
|
|
1393
1507
|
if (c !== t && !o.has(c)) {
|
|
1394
|
-
|
|
1508
|
+
r.push(c);
|
|
1395
1509
|
return;
|
|
1396
1510
|
}
|
|
1397
|
-
for (const
|
|
1398
|
-
|
|
1511
|
+
for (const a of Array.from(c.children))
|
|
1512
|
+
a instanceof HTMLElement && i(a);
|
|
1399
1513
|
}
|
|
1400
1514
|
};
|
|
1401
|
-
return
|
|
1515
|
+
return i(t), r;
|
|
1402
1516
|
}
|
|
1403
|
-
class
|
|
1517
|
+
class so {
|
|
1404
1518
|
contribute(e) {
|
|
1405
|
-
const { from: n, to: o, resolved:
|
|
1406
|
-
(u) =>
|
|
1407
|
-
), l = (s.length ?
|
|
1519
|
+
const { from: n, to: o, resolved: r, physics: i, onComplete: c } = e, s = r.pairs.map(
|
|
1520
|
+
(u) => ue(u.toEl) ?? u.toEl
|
|
1521
|
+
), l = (s.length ? io(o, s) : [o]).map((u) => ({
|
|
1408
1522
|
element: u,
|
|
1409
1523
|
opacity: u.style.opacity,
|
|
1410
1524
|
willChange: u.style.willChange,
|
|
1411
1525
|
targetOpacity: Number.parseFloat(getComputedStyle(u).opacity) || 0
|
|
1412
1526
|
})), a = /* @__PURE__ */ new Set();
|
|
1413
1527
|
for (const u of s)
|
|
1414
|
-
for (let
|
|
1528
|
+
for (let f = u.parentElement; f && (a.add(f), f !== o); f = f.parentElement)
|
|
1415
1529
|
;
|
|
1416
|
-
const
|
|
1530
|
+
const d = Array.from(a).map((u) => ({
|
|
1417
1531
|
element: u,
|
|
1418
1532
|
color: getComputedStyle(u).backgroundColor,
|
|
1419
1533
|
previousColor: u.style.backgroundColor
|
|
1420
1534
|
})).filter(
|
|
1421
1535
|
({ color: u }) => u && u !== "transparent" && u !== "rgba(0, 0, 0, 0)"
|
|
1422
|
-
),
|
|
1536
|
+
), p = n.style.opacity, y = n.style.willChange;
|
|
1423
1537
|
n.style.willChange = "opacity";
|
|
1424
1538
|
for (const { element: u } of l)
|
|
1425
1539
|
u.style.opacity = "0", u.style.willChange = "opacity";
|
|
1426
|
-
for (const { element: u } of
|
|
1540
|
+
for (const { element: u } of d)
|
|
1427
1541
|
u.style.backgroundColor = "transparent";
|
|
1428
1542
|
return c(() => {
|
|
1429
|
-
n.style.opacity =
|
|
1430
|
-
for (const { element: u, opacity:
|
|
1431
|
-
u.style.opacity =
|
|
1432
|
-
for (const { element: u, previousColor:
|
|
1433
|
-
u.style.backgroundColor =
|
|
1543
|
+
n.style.opacity = p, n.style.willChange = y;
|
|
1544
|
+
for (const { element: u, opacity: f, willChange: h } of l)
|
|
1545
|
+
u.style.opacity = f, u.style.willChange = h;
|
|
1546
|
+
for (const { element: u, previousColor: f } of d)
|
|
1547
|
+
u.style.backgroundColor = f;
|
|
1434
1548
|
}), {
|
|
1435
1549
|
out: [
|
|
1436
|
-
new
|
|
1550
|
+
new S({
|
|
1437
1551
|
element: n,
|
|
1438
|
-
integrator: C.from(
|
|
1439
|
-
style: (u,
|
|
1552
|
+
integrator: C.from(i),
|
|
1553
|
+
style: (u, f) => ({ opacity: f })
|
|
1440
1554
|
})
|
|
1441
1555
|
],
|
|
1442
1556
|
in: [
|
|
1443
1557
|
...l.map(
|
|
1444
|
-
({ element: u, targetOpacity:
|
|
1558
|
+
({ element: u, targetOpacity: f }) => new S({
|
|
1445
1559
|
element: u,
|
|
1446
|
-
integrator: C.from(
|
|
1560
|
+
integrator: C.from(i),
|
|
1447
1561
|
style: (h) => ({
|
|
1448
|
-
opacity: Math.min(1, Math.max(0, h)) *
|
|
1562
|
+
opacity: Math.min(1, Math.max(0, h)) * f
|
|
1449
1563
|
})
|
|
1450
1564
|
})
|
|
1451
1565
|
),
|
|
1452
|
-
...
|
|
1453
|
-
({ element: u, color:
|
|
1566
|
+
...d.map(
|
|
1567
|
+
({ element: u, color: f }) => new S({
|
|
1454
1568
|
element: u,
|
|
1455
|
-
integrator: C.from(
|
|
1569
|
+
integrator: C.from(i),
|
|
1456
1570
|
style: (h) => ({
|
|
1457
|
-
backgroundColor: `color-mix(in srgb, ${
|
|
1571
|
+
backgroundColor: `color-mix(in srgb, ${f} ${Math.min(1, Math.max(0, h)) * 100}%, transparent)`
|
|
1458
1572
|
})
|
|
1459
1573
|
})
|
|
1460
1574
|
)
|
|
@@ -1462,46 +1576,46 @@ class Gn {
|
|
|
1462
1576
|
};
|
|
1463
1577
|
}
|
|
1464
1578
|
}
|
|
1465
|
-
const
|
|
1466
|
-
static:
|
|
1467
|
-
fade:
|
|
1468
|
-
},
|
|
1579
|
+
const ao = () => new so(), co = {
|
|
1580
|
+
static: ro,
|
|
1581
|
+
fade: ao
|
|
1582
|
+
}, lo = {
|
|
1469
1583
|
spring: { stiffness: 320, damping: 30 }
|
|
1470
|
-
},
|
|
1584
|
+
}, po = () => lo, uo = {
|
|
1471
1585
|
spring: { stiffness: 300, damping: 30, doubleSpring: 1 }
|
|
1472
|
-
},
|
|
1473
|
-
default:
|
|
1474
|
-
smooth:
|
|
1475
|
-
},
|
|
1476
|
-
function
|
|
1477
|
-
const
|
|
1478
|
-
const s =
|
|
1586
|
+
}, fo = () => uo, ho = {
|
|
1587
|
+
default: po,
|
|
1588
|
+
smooth: fo
|
|
1589
|
+
}, yo = 700, mo = "data-hero-aspect-ratio", go = "data-hero-radius";
|
|
1590
|
+
function oe(t, e, n, o) {
|
|
1591
|
+
const r = (c) => {
|
|
1592
|
+
const s = H(t, c);
|
|
1479
1593
|
return {
|
|
1480
1594
|
left: s.left + t.scrollLeft,
|
|
1481
1595
|
top: s.top + t.scrollTop,
|
|
1482
1596
|
width: s.width,
|
|
1483
1597
|
height: s.height
|
|
1484
1598
|
};
|
|
1485
|
-
},
|
|
1486
|
-
return
|
|
1599
|
+
}, i = r(e);
|
|
1600
|
+
return ot(e, i, r, {
|
|
1487
1601
|
clipRoot: o,
|
|
1488
1602
|
fallbackFit: n,
|
|
1489
|
-
legacyAspectRatioAttribute:
|
|
1490
|
-
legacyRadiusAttribute:
|
|
1603
|
+
legacyAspectRatioAttribute: mo,
|
|
1604
|
+
legacyRadiusAttribute: go
|
|
1491
1605
|
});
|
|
1492
1606
|
}
|
|
1493
|
-
function
|
|
1607
|
+
function tt(t, e) {
|
|
1494
1608
|
const n = /* @__PURE__ */ new Map(), o = t.querySelectorAll(`[${e}]`);
|
|
1495
|
-
for (const
|
|
1496
|
-
const
|
|
1497
|
-
|
|
1609
|
+
for (const r of Array.from(o)) {
|
|
1610
|
+
const i = r.getAttribute(e);
|
|
1611
|
+
i && (n.has(i) || n.set(i, r));
|
|
1498
1612
|
}
|
|
1499
1613
|
return n;
|
|
1500
1614
|
}
|
|
1501
|
-
function
|
|
1502
|
-
const n = [], o =
|
|
1615
|
+
function bo(t, e) {
|
|
1616
|
+
const n = [], o = tt(e, st), r = tt(t, at);
|
|
1503
1617
|
for (const [s, l] of o) {
|
|
1504
|
-
const a =
|
|
1618
|
+
const a = r.get(s);
|
|
1505
1619
|
a && n.push({
|
|
1506
1620
|
key: s,
|
|
1507
1621
|
fromEl: a,
|
|
@@ -1510,8 +1624,8 @@ function so(t, e) {
|
|
|
1510
1624
|
toFit: X("enter")
|
|
1511
1625
|
});
|
|
1512
1626
|
}
|
|
1513
|
-
const
|
|
1514
|
-
for (const [s, l] of
|
|
1627
|
+
const i = tt(t, st), c = tt(e, at);
|
|
1628
|
+
for (const [s, l] of i) {
|
|
1515
1629
|
const a = c.get(s);
|
|
1516
1630
|
a && n.push({
|
|
1517
1631
|
key: s,
|
|
@@ -1523,109 +1637,145 @@ function so(t, e) {
|
|
|
1523
1637
|
}
|
|
1524
1638
|
return n;
|
|
1525
1639
|
}
|
|
1526
|
-
function
|
|
1640
|
+
function wo(t, e) {
|
|
1527
1641
|
const n = [], o = Array.from(
|
|
1528
|
-
e.querySelectorAll(`[${
|
|
1642
|
+
e.querySelectorAll(`[${G}]`)
|
|
1529
1643
|
);
|
|
1530
|
-
for (const
|
|
1531
|
-
const
|
|
1532
|
-
if (!
|
|
1644
|
+
for (const r of o) {
|
|
1645
|
+
const i = r.getAttribute(G);
|
|
1646
|
+
if (!i) continue;
|
|
1533
1647
|
const c = t.querySelector(
|
|
1534
|
-
`[${
|
|
1648
|
+
`[${G}="${i}"]`
|
|
1535
1649
|
);
|
|
1536
1650
|
c && n.push({
|
|
1537
|
-
key:
|
|
1651
|
+
key: i,
|
|
1538
1652
|
fromEl: c,
|
|
1539
|
-
toEl:
|
|
1653
|
+
toEl: r,
|
|
1540
1654
|
fromFit: X("legacy"),
|
|
1541
1655
|
toFit: X("legacy")
|
|
1542
1656
|
});
|
|
1543
1657
|
}
|
|
1544
1658
|
return n;
|
|
1545
1659
|
}
|
|
1546
|
-
function
|
|
1547
|
-
const n =
|
|
1548
|
-
return n.length > 0 ? n :
|
|
1660
|
+
function xo(t, e) {
|
|
1661
|
+
const n = bo(t, e);
|
|
1662
|
+
return n.length > 0 ? n : wo(t, e);
|
|
1549
1663
|
}
|
|
1550
|
-
function
|
|
1551
|
-
return
|
|
1664
|
+
function So(t, e) {
|
|
1665
|
+
return ye(t, e);
|
|
1552
1666
|
}
|
|
1553
|
-
function
|
|
1667
|
+
function Co(t, e) {
|
|
1554
1668
|
return t.radiusSource === "unsupported" || e.radiusSource === "unsupported" ? !1 : t.mediaElement !== null || e.mediaElement !== null || t.radiusSource === "computed" || t.radiusSource === "legacy" || e.radiusSource === "computed" || e.radiusSource === "legacy";
|
|
1555
1669
|
}
|
|
1556
|
-
function
|
|
1557
|
-
const { fromEl:
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
), a = s.content,
|
|
1561
|
-
if (a.width === 0 || a.height === 0 ||
|
|
1670
|
+
function Eo(t, e, n, o, r) {
|
|
1671
|
+
const { fromEl: i, toEl: c } = e, [s, l] = So(
|
|
1672
|
+
oe(t, i, e.fromFit, o),
|
|
1673
|
+
oe(t, c, e.toFit, r)
|
|
1674
|
+
), a = s.content, d = s.window, p = l.content, y = l.window, u = l.clipInset, f = s.radiusSource === "unsupported" || l.radiusSource === "unsupported", h = f ? 0 : s.radius, m = f ? 0 : l.radius;
|
|
1675
|
+
if (a.width === 0 || a.height === 0 || d.width === 0 || d.height === 0 || p.width === 0 || p.height === 0 || y.width === 0 || y.height === 0)
|
|
1562
1676
|
return null;
|
|
1563
|
-
const b =
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
const E = G(
|
|
1569
|
-
d,
|
|
1570
|
-
ae(d, a, p, b, b)
|
|
1677
|
+
const b = a.width / p.width, g = a.height / p.height, x = z(a), A = N(a), $ = z(p), P = N(p), w = x - $, E = A - P;
|
|
1678
|
+
if (Math.abs(E) > n) return null;
|
|
1679
|
+
const O = U(
|
|
1680
|
+
p,
|
|
1681
|
+
me(p, a, d, b, g)
|
|
1571
1682
|
);
|
|
1572
1683
|
return {
|
|
1573
|
-
|
|
1574
|
-
|
|
1684
|
+
fromContent: a,
|
|
1685
|
+
toContent: p,
|
|
1686
|
+
fromVisualEl: s.mediaElement ?? i,
|
|
1575
1687
|
toVisualEl: l.mediaElement ?? c,
|
|
1576
|
-
resetRadius:
|
|
1577
|
-
styleFor: (
|
|
1578
|
-
const
|
|
1688
|
+
resetRadius: Co(s, l),
|
|
1689
|
+
styleFor: (T, I, v) => {
|
|
1690
|
+
const M = (I * w + (v ? $ - z(v.box) : 0)) / ((v == null ? void 0 : v.scaleX) ?? 1), Y = (I * E + (v ? P - N(v.box) : 0)) / ((v == null ? void 0 : v.scaleY) ?? 1), dt = T + I * b, pt = T + I * g, Se = s.cornerRadii ?? [
|
|
1579
1691
|
h,
|
|
1580
1692
|
h,
|
|
1581
1693
|
h,
|
|
1582
1694
|
h
|
|
1583
|
-
],
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
],
|
|
1589
|
-
const
|
|
1590
|
-
return {
|
|
1591
|
-
|
|
1695
|
+
], Ce = l.cornerRadii ?? [
|
|
1696
|
+
m,
|
|
1697
|
+
m,
|
|
1698
|
+
m,
|
|
1699
|
+
m
|
|
1700
|
+
], Ee = Se.map((Re, Ie) => {
|
|
1701
|
+
const Lt = Math.max(0, Re * I + Ce[Ie] * T);
|
|
1702
|
+
return {
|
|
1703
|
+
x: Lt / Math.max(Math.abs(dt), 1e-6),
|
|
1704
|
+
y: Lt / Math.max(Math.abs(pt), 1e-6)
|
|
1705
|
+
};
|
|
1706
|
+
}), $e = O.top * I + u.top * T, Ae = O.right * I + u.right * T, Pe = O.bottom * I + u.bottom * T, ve = O.left * I + u.left * T;
|
|
1592
1707
|
return {
|
|
1593
|
-
transform:
|
|
1594
|
-
clipPath:
|
|
1595
|
-
|
|
1708
|
+
transform: v ? `translate(${M}px, ${Y}px) scale(${dt * p.width / v.box.width}, ${pt * p.height / v.box.height})` : `translate(${M}px, ${Y}px) scale(${dt}, ${pt})`,
|
|
1709
|
+
clipPath: lt(
|
|
1710
|
+
p,
|
|
1596
1711
|
{
|
|
1597
|
-
top:
|
|
1598
|
-
right:
|
|
1599
|
-
bottom:
|
|
1600
|
-
left:
|
|
1712
|
+
top: $e,
|
|
1713
|
+
right: Ae,
|
|
1714
|
+
bottom: Pe,
|
|
1715
|
+
left: ve
|
|
1601
1716
|
},
|
|
1602
|
-
|
|
1717
|
+
Ee
|
|
1603
1718
|
)
|
|
1604
1719
|
};
|
|
1605
1720
|
}
|
|
1606
1721
|
};
|
|
1607
1722
|
}
|
|
1608
|
-
function
|
|
1723
|
+
function $o(t, e) {
|
|
1609
1724
|
t.style.transform = e.transform, t.style.clipPath = e.clipPath;
|
|
1610
1725
|
}
|
|
1611
|
-
class
|
|
1726
|
+
class Ao {
|
|
1612
1727
|
contribute(e) {
|
|
1613
|
-
const { resolved: n, physics: o, positionedParent:
|
|
1614
|
-
c(
|
|
1728
|
+
const { resolved: n, physics: o, positionedParent: r, maxDistance: i, onComplete: c } = e;
|
|
1729
|
+
c(eo(e.from, e.to));
|
|
1615
1730
|
const s = n.pairs.flatMap((a) => {
|
|
1616
|
-
const
|
|
1617
|
-
i,
|
|
1618
|
-
a,
|
|
1731
|
+
const d = Eo(
|
|
1619
1732
|
r,
|
|
1733
|
+
a,
|
|
1734
|
+
i,
|
|
1620
1735
|
e.from,
|
|
1621
1736
|
e.to
|
|
1622
1737
|
);
|
|
1623
|
-
return
|
|
1738
|
+
return d ? [{ pair: a, plan: d }] : [];
|
|
1624
1739
|
});
|
|
1625
1740
|
e.resolved = { pairs: s.map(({ pair: a }) => a) };
|
|
1626
1741
|
const l = [];
|
|
1627
|
-
for (const {
|
|
1628
|
-
const { fromVisualEl: p, toVisualEl:
|
|
1742
|
+
for (const { pair: a, plan: d } of s) {
|
|
1743
|
+
const { fromVisualEl: p, toVisualEl: y } = d, u = it(p), f = it(y);
|
|
1744
|
+
if (Jn(a, e.direction)) {
|
|
1745
|
+
const { layer: w, source: E, destination: O } = Qn(
|
|
1746
|
+
p,
|
|
1747
|
+
y,
|
|
1748
|
+
d.fromContent,
|
|
1749
|
+
d.toContent,
|
|
1750
|
+
d.resetRadius
|
|
1751
|
+
), T = {
|
|
1752
|
+
box: d.fromContent,
|
|
1753
|
+
scaleX: 1,
|
|
1754
|
+
scaleY: 1
|
|
1755
|
+
}, I = (M, Y) => ({
|
|
1756
|
+
...d.styleFor(M, Y, T),
|
|
1757
|
+
opacity: B(Y) * u.opacity
|
|
1758
|
+
}), v = (M, Y) => ({
|
|
1759
|
+
...d.styleFor(M, Y),
|
|
1760
|
+
opacity: B(M) * f.opacity
|
|
1761
|
+
});
|
|
1762
|
+
Object.assign(E.style, I(0, 1)), Object.assign(O.style, v(0, 1)), r.appendChild(w), u.set(0), f.set(0), c(() => {
|
|
1763
|
+
w.remove(), u.restore(), f.restore();
|
|
1764
|
+
}), l.push(
|
|
1765
|
+
new S({
|
|
1766
|
+
element: E,
|
|
1767
|
+
integrator: C.from(o),
|
|
1768
|
+
style: I
|
|
1769
|
+
}),
|
|
1770
|
+
new S({
|
|
1771
|
+
element: O,
|
|
1772
|
+
integrator: C.from(o),
|
|
1773
|
+
style: v
|
|
1774
|
+
})
|
|
1775
|
+
);
|
|
1776
|
+
continue;
|
|
1777
|
+
}
|
|
1778
|
+
const h = Dt(p), m = to(y), b = ct(y, [
|
|
1629
1779
|
"transform",
|
|
1630
1780
|
"transform-origin",
|
|
1631
1781
|
"clip-path",
|
|
@@ -1633,120 +1783,125 @@ class ho {
|
|
|
1633
1783
|
"border-radius",
|
|
1634
1784
|
"will-change"
|
|
1635
1785
|
]);
|
|
1636
|
-
|
|
1637
|
-
const
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
),
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
h(), y(), u(), m();
|
|
1786
|
+
y.style.transform = "none", y.style.transformOrigin = "center center", y.style.willChange = "transform, clip-path, opacity", d.resetRadius && (y.style.borderRadius = "0");
|
|
1787
|
+
const g = no(
|
|
1788
|
+
y,
|
|
1789
|
+
d.toContent,
|
|
1790
|
+
H(r, y)
|
|
1791
|
+
), x = kt(r, y);
|
|
1792
|
+
h.style.width = `${d.fromContent.width / x.scaleX}px`, h.style.height = `${d.fromContent.height / x.scaleY}px`, h.style.zIndex = getComputedStyle(y).zIndex, d.resetRadius && (h.style.borderRadius = "0"), y.after(h);
|
|
1793
|
+
const A = kt(r, h), $ = (w, E) => ({
|
|
1794
|
+
...d.styleFor(w, E, A),
|
|
1795
|
+
opacity: B(E) * u.opacity
|
|
1796
|
+
}), P = (w, E) => ({
|
|
1797
|
+
...d.styleFor(w, E, x),
|
|
1798
|
+
opacity: B(w) * f.opacity
|
|
1799
|
+
});
|
|
1800
|
+
$o(y, P(0, 1)), Object.assign(h.style, $(0, 1)), f.set(0), u.set(0), c(() => {
|
|
1801
|
+
g(), b(), u.restore(), f.restore(), m(), h.remove();
|
|
1653
1802
|
}), l.push(
|
|
1654
|
-
new
|
|
1655
|
-
element:
|
|
1803
|
+
new S({
|
|
1804
|
+
element: h,
|
|
1656
1805
|
integrator: C.from(o),
|
|
1657
|
-
style:
|
|
1806
|
+
style: $
|
|
1807
|
+
}),
|
|
1808
|
+
new S({
|
|
1809
|
+
element: y,
|
|
1810
|
+
integrator: C.from(o),
|
|
1811
|
+
style: P
|
|
1658
1812
|
})
|
|
1659
1813
|
);
|
|
1660
1814
|
}
|
|
1661
1815
|
return { shared: l };
|
|
1662
1816
|
}
|
|
1663
1817
|
}
|
|
1664
|
-
function
|
|
1665
|
-
return [new
|
|
1818
|
+
function Po(t) {
|
|
1819
|
+
return [new Ao(), co[t.type]()];
|
|
1666
1820
|
}
|
|
1667
|
-
const
|
|
1668
|
-
const e =
|
|
1669
|
-
prepare: (
|
|
1821
|
+
const vo = (t) => {
|
|
1822
|
+
const e = ho[t.variant](), n = yo, o = {
|
|
1823
|
+
prepare: (r) => {
|
|
1670
1824
|
var l;
|
|
1671
|
-
const
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
]).then(([a,
|
|
1675
|
-
from:
|
|
1676
|
-
to:
|
|
1825
|
+
const i = Po(t), c = Promise.all([
|
|
1826
|
+
r.from,
|
|
1827
|
+
r.to
|
|
1828
|
+
]).then(([a, d]) => ({ pairs: xo(a, d) })), s = {
|
|
1829
|
+
from: r.from,
|
|
1830
|
+
to: r.to,
|
|
1677
1831
|
resolved: c
|
|
1678
1832
|
};
|
|
1679
|
-
for (const a of
|
|
1833
|
+
for (const a of i)
|
|
1680
1834
|
(l = a.prepare) == null || l.call(a, s);
|
|
1681
|
-
return c.then((a) => ({ resolved: a, strategies:
|
|
1835
|
+
return c.then((a) => ({ resolved: a, strategies: i }));
|
|
1682
1836
|
},
|
|
1683
|
-
animation: ({ from:
|
|
1837
|
+
animation: ({ from: r, to: i, context: c, resolved: s, strategies: l }) => {
|
|
1684
1838
|
var h;
|
|
1685
1839
|
if (s.pairs.length === 0)
|
|
1686
|
-
return
|
|
1687
|
-
const a = [],
|
|
1688
|
-
a.push(
|
|
1689
|
-
},
|
|
1690
|
-
|
|
1691
|
-
|
|
1840
|
+
return q({ shared: [], out: [], in: [] });
|
|
1841
|
+
const a = [], d = (m) => {
|
|
1842
|
+
a.push(m);
|
|
1843
|
+
}, p = {
|
|
1844
|
+
direction: c.direction,
|
|
1845
|
+
from: r,
|
|
1846
|
+
to: i,
|
|
1692
1847
|
resolved: s,
|
|
1693
1848
|
physics: e,
|
|
1694
1849
|
positionedParent: c.positionedParent,
|
|
1695
1850
|
maxDistance: n,
|
|
1696
|
-
onComplete:
|
|
1697
|
-
},
|
|
1851
|
+
onComplete: d
|
|
1852
|
+
}, y = {
|
|
1698
1853
|
shared: [],
|
|
1699
1854
|
out: [],
|
|
1700
1855
|
in: []
|
|
1701
1856
|
};
|
|
1702
|
-
for (const
|
|
1703
|
-
const b = (h =
|
|
1857
|
+
for (const m of l) {
|
|
1858
|
+
const b = (h = m.contribute) == null ? void 0 : h.call(m, p);
|
|
1704
1859
|
if (b)
|
|
1705
|
-
for (const g of Object.keys(
|
|
1706
|
-
|
|
1860
|
+
for (const g of Object.keys(y))
|
|
1861
|
+
y[g].push(...b[g] ?? []);
|
|
1707
1862
|
}
|
|
1708
|
-
const u =
|
|
1863
|
+
const u = q(y), f = u.onComplete;
|
|
1709
1864
|
return u.onComplete = () => {
|
|
1710
|
-
|
|
1711
|
-
for (const
|
|
1712
|
-
|
|
1713
|
-
for (const
|
|
1865
|
+
f == null || f();
|
|
1866
|
+
for (const m of Object.values(y).flat())
|
|
1867
|
+
m instanceof S && m.releaseFill();
|
|
1868
|
+
for (const m of a)
|
|
1714
1869
|
try {
|
|
1715
|
-
|
|
1870
|
+
m();
|
|
1716
1871
|
} catch (b) {
|
|
1717
1872
|
console.error("[hero] cleanup error", b);
|
|
1718
1873
|
}
|
|
1719
1874
|
}, u;
|
|
1720
1875
|
}
|
|
1721
1876
|
};
|
|
1722
|
-
return
|
|
1877
|
+
return k({
|
|
1723
1878
|
forward: o,
|
|
1724
1879
|
backward: o
|
|
1725
1880
|
});
|
|
1726
1881
|
};
|
|
1727
|
-
function
|
|
1882
|
+
function jr(t = {}, e = {}) {
|
|
1728
1883
|
const n = t.type ?? "static", o = t.variant ?? "default";
|
|
1729
|
-
return
|
|
1884
|
+
return F(vo({ type: n, variant: o }), e.override);
|
|
1730
1885
|
}
|
|
1731
|
-
const
|
|
1886
|
+
const Ro = {
|
|
1732
1887
|
spring: { stiffness: 50, damping: 30 }
|
|
1733
|
-
},
|
|
1888
|
+
}, Io = {
|
|
1734
1889
|
spring: { stiffness: 80, damping: 25 }
|
|
1735
|
-
},
|
|
1736
|
-
const e = t.physics ??
|
|
1890
|
+
}, Oo = (t = {}) => {
|
|
1891
|
+
const e = t.physics ?? Ro, n = t.initialRotation ?? 45, o = t.initialScale ?? 0.01, r = t.rotationTriggerPoint ?? 0.8, i = {
|
|
1737
1892
|
prepare: ({ from: c, to: s, context: l }) => (c.then((a) => {
|
|
1738
1893
|
a.style.opacity = "1";
|
|
1739
1894
|
}), s.then((a) => {
|
|
1740
|
-
const
|
|
1741
|
-
a.style.setProperty("--max-border-radius", `${
|
|
1742
|
-
const
|
|
1743
|
-
a.style.transformOrigin = `${
|
|
1895
|
+
const d = W(l, "to"), p = Math.min(d.width, d.height) * 0.4;
|
|
1896
|
+
a.style.setProperty("--max-border-radius", `${p}px`), a.style.setProperty("--border-radius-scale", "1"), a.style.willChange = "transform", a.style.backfaceVisibility = "hidden";
|
|
1897
|
+
const y = d.left + d.width / 2, u = d.top + d.height / 2;
|
|
1898
|
+
a.style.transformOrigin = `${y}px ${u}px`, a.style.position = "fixed", a.style.top = `${d.top}px`, a.style.left = `${d.left}px`, a.style.width = `${d.width}px`, a.style.height = `${d.height}px`, a.style.zIndex = "1000", a.style.overflow = "hidden", a.style.transform = `rotate(${n}deg) scale(${o}) translateZ(0)`, a.style.borderRadius = "calc(var(--max-border-radius) * var(--border-radius-scale))", a.style.opacity = "1";
|
|
1744
1899
|
}), {}),
|
|
1745
1900
|
animation: ({ from: c, to: s }) => {
|
|
1746
|
-
const l = new
|
|
1901
|
+
const l = new S({
|
|
1747
1902
|
element: c,
|
|
1748
|
-
integrator: C.from(
|
|
1749
|
-
style: (
|
|
1903
|
+
integrator: C.from(Io),
|
|
1904
|
+
style: (d, p) => ({ opacity: p }),
|
|
1750
1905
|
// The outgoing node is reused (re-hidden, shown again on the next
|
|
1751
1906
|
// navigation), so reset every inline style we wrote to it — mirroring
|
|
1752
1907
|
// the "to" cleanup below. prepare sets opacity and the out style fades
|
|
@@ -1754,66 +1909,66 @@ const go = {
|
|
|
1754
1909
|
onComplete: () => {
|
|
1755
1910
|
c.style.opacity = "";
|
|
1756
1911
|
}
|
|
1757
|
-
}), a = new
|
|
1912
|
+
}), a = new S({
|
|
1758
1913
|
element: s,
|
|
1759
1914
|
integrator: C.from(e),
|
|
1760
|
-
style: (
|
|
1761
|
-
let
|
|
1762
|
-
if (
|
|
1763
|
-
|
|
1764
|
-
else if (
|
|
1765
|
-
const h = (
|
|
1766
|
-
|
|
1915
|
+
style: (d) => {
|
|
1916
|
+
let p;
|
|
1917
|
+
if (d <= 0.05)
|
|
1918
|
+
p = o;
|
|
1919
|
+
else if (d <= r) {
|
|
1920
|
+
const h = (d - 0.05) / (r - 0.05), m = Math.pow(h, 9);
|
|
1921
|
+
p = o + (0.8 - o) * m;
|
|
1767
1922
|
} else {
|
|
1768
|
-
const h = (
|
|
1769
|
-
|
|
1923
|
+
const h = (d - r) / (1 - r);
|
|
1924
|
+
p = 0.8 + 0.2 * (1 - Math.pow(1 - h, 3));
|
|
1770
1925
|
}
|
|
1771
|
-
const
|
|
1926
|
+
const y = 0.7;
|
|
1772
1927
|
let u;
|
|
1773
|
-
if (
|
|
1928
|
+
if (d <= y)
|
|
1774
1929
|
u = n;
|
|
1775
1930
|
else {
|
|
1776
|
-
const h = (
|
|
1777
|
-
u = n * (1 -
|
|
1931
|
+
const h = (d - y) / (1 - y), m = 1 - Math.pow(1 - h, 2);
|
|
1932
|
+
u = n * (1 - m);
|
|
1778
1933
|
}
|
|
1779
|
-
let
|
|
1780
|
-
if (
|
|
1781
|
-
|
|
1934
|
+
let f;
|
|
1935
|
+
if (d <= y)
|
|
1936
|
+
f = 1;
|
|
1782
1937
|
else {
|
|
1783
|
-
const h = (
|
|
1784
|
-
|
|
1938
|
+
const h = (d - y) / (1 - y);
|
|
1939
|
+
f = 1 - Math.pow(h, 0.5);
|
|
1785
1940
|
}
|
|
1786
1941
|
return {
|
|
1787
|
-
transform: `rotate(${u.toFixed(2)}deg) scale(${
|
|
1788
|
-
"--border-radius-scale":
|
|
1942
|
+
transform: `rotate(${u.toFixed(2)}deg) scale(${p.toFixed(4)}) translateZ(0)`,
|
|
1943
|
+
"--border-radius-scale": f.toFixed(4)
|
|
1789
1944
|
};
|
|
1790
1945
|
},
|
|
1791
1946
|
onComplete: () => {
|
|
1792
1947
|
s.style.willChange = "", s.style.backfaceVisibility = "", s.style.removeProperty("--max-border-radius"), s.style.removeProperty("--border-radius-scale"), s.style.transform = "", s.style.transformOrigin = "", s.style.position = "", s.style.zIndex = "", s.style.top = "", s.style.left = "", s.style.width = "", s.style.height = "", s.style.overflow = "", s.style.borderRadius = "";
|
|
1793
1948
|
}
|
|
1794
1949
|
});
|
|
1795
|
-
return new
|
|
1950
|
+
return new R(
|
|
1796
1951
|
{ out: l, in: a },
|
|
1797
1952
|
{ mode: "parallel" }
|
|
1798
1953
|
);
|
|
1799
1954
|
}
|
|
1800
1955
|
};
|
|
1801
|
-
return
|
|
1956
|
+
return k({ forward: i, backward: i });
|
|
1802
1957
|
};
|
|
1803
|
-
function
|
|
1804
|
-
return
|
|
1958
|
+
function Zr(t = {}, e = {}) {
|
|
1959
|
+
return F(Oo(), e.override);
|
|
1805
1960
|
}
|
|
1806
|
-
const
|
|
1961
|
+
const _o = {
|
|
1807
1962
|
spring: { stiffness: 100, damping: 30 }
|
|
1808
|
-
},
|
|
1809
|
-
const e = t.physics ??
|
|
1810
|
-
prepare: ({ from: o, to:
|
|
1811
|
-
|
|
1812
|
-
}),
|
|
1813
|
-
|
|
1963
|
+
}, ko = (t = {}) => {
|
|
1964
|
+
const e = t.physics ?? _o, n = {
|
|
1965
|
+
prepare: ({ from: o, to: r }) => (o.then((i) => {
|
|
1966
|
+
i.style.transformOrigin = "center center", i.style.willChange = "transform, opacity";
|
|
1967
|
+
}), r.then((i) => {
|
|
1968
|
+
i.style.opacity = "0", i.style.transform = "rotate(-180deg)", i.style.transformOrigin = "center center", i.style.willChange = "transform, opacity";
|
|
1814
1969
|
}), {}),
|
|
1815
|
-
animation: ({ from: o, to:
|
|
1816
|
-
const
|
|
1970
|
+
animation: ({ from: o, to: r }) => {
|
|
1971
|
+
const i = new S({
|
|
1817
1972
|
element: o,
|
|
1818
1973
|
integrator: C.from(e),
|
|
1819
1974
|
style: (s) => ({
|
|
@@ -1826,8 +1981,8 @@ const So = {
|
|
|
1826
1981
|
onComplete: () => {
|
|
1827
1982
|
o.style.willChange = "auto", o.style.transform = "", o.style.transformOrigin = "", o.style.opacity = "";
|
|
1828
1983
|
}
|
|
1829
|
-
}), c = new
|
|
1830
|
-
element:
|
|
1984
|
+
}), c = new S({
|
|
1985
|
+
element: r,
|
|
1831
1986
|
integrator: C.from(e),
|
|
1832
1987
|
// u runs 1→0, so -u*180 unwinds -180→0.
|
|
1833
1988
|
style: (s, l) => ({
|
|
@@ -1835,21 +1990,21 @@ const So = {
|
|
|
1835
1990
|
opacity: s > 0.5 ? 1 : 0
|
|
1836
1991
|
}),
|
|
1837
1992
|
onComplete: () => {
|
|
1838
|
-
|
|
1993
|
+
r.style.willChange = "auto", r.style.transform = "", r.style.transformOrigin = "", r.style.opacity = "";
|
|
1839
1994
|
}
|
|
1840
1995
|
});
|
|
1841
|
-
return new
|
|
1842
|
-
{ out:
|
|
1996
|
+
return new R(
|
|
1997
|
+
{ out: i, in: c },
|
|
1843
1998
|
{ mode: "parallel" }
|
|
1844
1999
|
);
|
|
1845
2000
|
}
|
|
1846
2001
|
};
|
|
1847
|
-
return
|
|
2002
|
+
return k({ forward: n, backward: n });
|
|
1848
2003
|
};
|
|
1849
|
-
function
|
|
1850
|
-
return
|
|
2004
|
+
function Gr(t = {}, e = {}) {
|
|
2005
|
+
return F(ko(), e.override);
|
|
1851
2006
|
}
|
|
1852
|
-
const
|
|
2007
|
+
const Fo = {
|
|
1853
2008
|
spring: {
|
|
1854
2009
|
stiffness: 20,
|
|
1855
2010
|
damping: 8,
|
|
@@ -1857,20 +2012,20 @@ const Co = {
|
|
|
1857
2012
|
restDelta: 1e-3,
|
|
1858
2013
|
restSpeed: 1e-3
|
|
1859
2014
|
}
|
|
1860
|
-
},
|
|
1861
|
-
const e = t.physics ??
|
|
1862
|
-
const
|
|
2015
|
+
}, To = (t = {}) => {
|
|
2016
|
+
const e = t.physics ?? Fo, n = t.directional ?? !0, o = (r) => {
|
|
2017
|
+
const i = !n || r === "forward", c = i ? L : D, s = i ? D : L;
|
|
1863
2018
|
return {
|
|
1864
|
-
prepare: ({ from: l, to: a }) => (l.then((
|
|
1865
|
-
|
|
1866
|
-
}), a.then((
|
|
1867
|
-
|
|
2019
|
+
prepare: ({ from: l, to: a }) => (l.then((d) => {
|
|
2020
|
+
d.style.zIndex = c, d.style.willChange = "transform", d.style.backfaceVisibility = "hidden", d.style.contain = "layout paint", d.style.pointerEvents = "none";
|
|
2021
|
+
}), a.then((d) => {
|
|
2022
|
+
d.style.willChange = "transform", d.style.backfaceVisibility = "hidden", d.style.contain = "layout paint", d.style.position = "relative", d.style.zIndex = s;
|
|
1868
2023
|
}), {}),
|
|
1869
2024
|
animation: ({ from: l, to: a }) => {
|
|
1870
|
-
const
|
|
2025
|
+
const d = l.offsetHeight, p = a.offsetHeight, y = window.innerHeight, u = Math.max(Math.min(d, p), y), f = new S({
|
|
1871
2026
|
element: l,
|
|
1872
2027
|
integrator: C.from(e),
|
|
1873
|
-
style: (
|
|
2028
|
+
style: (m) => ({ transform: `translate3d(0, ${i ? -u * m : u * m}px, 0)` }),
|
|
1874
2029
|
// The outgoing node is the real, reused element (re-hidden then shown
|
|
1875
2030
|
// again on the next navigation), so mirror the incoming cleanup and
|
|
1876
2031
|
// also reset the out-only props applied in prepare (zIndex,
|
|
@@ -1879,77 +2034,77 @@ const Co = {
|
|
|
1879
2034
|
onComplete: () => {
|
|
1880
2035
|
l.style.willChange = "auto", l.style.backfaceVisibility = "", l.style.contain = "", l.style.transform = "", l.style.pointerEvents = "", l.style.zIndex = "";
|
|
1881
2036
|
}
|
|
1882
|
-
}), h = new
|
|
2037
|
+
}), h = new S({
|
|
1883
2038
|
element: a,
|
|
1884
2039
|
integrator: C.from(e),
|
|
1885
|
-
style: (
|
|
2040
|
+
style: (m, b) => ({ transform: `translate3d(0, ${i ? b * u : b * -u}px, 0)` }),
|
|
1886
2041
|
onComplete: () => {
|
|
1887
2042
|
a.style.willChange = "auto", a.style.backfaceVisibility = "", a.style.contain = "", a.style.transform = "", a.style.position === "relative" && (a.style.position = ""), a.style.zIndex === s && (a.style.zIndex = "");
|
|
1888
2043
|
}
|
|
1889
2044
|
});
|
|
1890
|
-
return [
|
|
1891
|
-
{ out:
|
|
2045
|
+
return [f, h].forEach(K), new R(
|
|
2046
|
+
{ out: f, in: h },
|
|
1892
2047
|
{ mode: "parallel" }
|
|
1893
2048
|
);
|
|
1894
2049
|
}
|
|
1895
2050
|
};
|
|
1896
2051
|
};
|
|
1897
|
-
return
|
|
2052
|
+
return k({
|
|
1898
2053
|
forward: o("forward"),
|
|
1899
2054
|
backward: o("backward")
|
|
1900
2055
|
});
|
|
1901
2056
|
};
|
|
1902
|
-
function
|
|
2057
|
+
function qr(t = {}, e = {}) {
|
|
1903
2058
|
const { type: n = "directional" } = t;
|
|
1904
|
-
return
|
|
1905
|
-
|
|
2059
|
+
return F(
|
|
2060
|
+
To({ directional: n === "directional" }),
|
|
1906
2061
|
e.override
|
|
1907
2062
|
);
|
|
1908
2063
|
}
|
|
1909
|
-
const
|
|
2064
|
+
const Mo = {
|
|
1910
2065
|
spring: { stiffness: 200, damping: 24 }
|
|
1911
|
-
},
|
|
2066
|
+
}, Do = {
|
|
1912
2067
|
inertia: { acceleration: 25, resistance: 1.2 }
|
|
1913
|
-
},
|
|
1914
|
-
function
|
|
2068
|
+
}, xt = 0.2;
|
|
2069
|
+
function Yo() {
|
|
1915
2070
|
return {
|
|
1916
|
-
enterPhysics:
|
|
1917
|
-
exitPhysics:
|
|
2071
|
+
enterPhysics: Mo,
|
|
2072
|
+
exitPhysics: Do,
|
|
1918
2073
|
background: {
|
|
1919
2074
|
willChange: "transform, opacity",
|
|
1920
2075
|
enterStyle: (t, e) => ({
|
|
1921
|
-
transform: `scale(${1 -
|
|
2076
|
+
transform: `scale(${1 - xt * t})`,
|
|
1922
2077
|
opacity: e
|
|
1923
2078
|
}),
|
|
1924
2079
|
exitStyle: (t) => ({
|
|
1925
|
-
transform: `scale(${1 -
|
|
2080
|
+
transform: `scale(${1 - xt + xt * t})`,
|
|
1926
2081
|
opacity: t
|
|
1927
2082
|
})
|
|
1928
2083
|
}
|
|
1929
2084
|
};
|
|
1930
2085
|
}
|
|
1931
|
-
const
|
|
2086
|
+
const Lo = {
|
|
1932
2087
|
spring: { stiffness: 200, damping: 24 }
|
|
1933
|
-
},
|
|
2088
|
+
}, Ho = {
|
|
1934
2089
|
inertia: { acceleration: 25, resistance: 1.2 }
|
|
1935
|
-
},
|
|
1936
|
-
function
|
|
2090
|
+
}, St = 0.08, zo = 16, Ct = 0.6, No = (t) => `blur(${Math.max(0, t).toFixed(2)}px)`;
|
|
2091
|
+
function Wo() {
|
|
1937
2092
|
return {
|
|
1938
|
-
enterPhysics:
|
|
1939
|
-
exitPhysics:
|
|
2093
|
+
enterPhysics: Lo,
|
|
2094
|
+
exitPhysics: Ho,
|
|
1940
2095
|
background: {
|
|
1941
2096
|
willChange: "transform, opacity",
|
|
1942
2097
|
// enter: t 0 → 1 as the sheet rises. At rest (t = 0) the page is
|
|
1943
2098
|
// untouched; at peak it is shrunk and dimmed.
|
|
1944
2099
|
enterStyle: (t) => ({
|
|
1945
|
-
transform: `scale(${1 -
|
|
1946
|
-
opacity: 1 - (1 -
|
|
2100
|
+
transform: `scale(${1 - St * t})`,
|
|
2101
|
+
opacity: 1 - (1 - Ct) * t
|
|
1947
2102
|
}),
|
|
1948
2103
|
// exit: t 0 → 1 as the sheet falls away and the page returns to rest —
|
|
1949
2104
|
// the inverse ramp of enter.
|
|
1950
2105
|
exitStyle: (t) => ({
|
|
1951
|
-
transform: `scale(${1 -
|
|
1952
|
-
opacity:
|
|
2106
|
+
transform: `scale(${1 - St + St * t})`,
|
|
2107
|
+
opacity: Ct + (1 - Ct) * t
|
|
1953
2108
|
})
|
|
1954
2109
|
},
|
|
1955
2110
|
overlay: {
|
|
@@ -1967,27 +2122,27 @@ function Oo() {
|
|
|
1967
2122
|
// enter: 0 → MAX as the sheet rises (progress 0 → 1).
|
|
1968
2123
|
// exit: MAX → 0 as it falls (progress 0 → 1, so the visual is inverted).
|
|
1969
2124
|
style: (t, e) => {
|
|
1970
|
-
const n = t === "enter" ? e : 1 - e, o =
|
|
2125
|
+
const n = t === "enter" ? e : 1 - e, o = No(zo * n);
|
|
1971
2126
|
return { backdropFilter: o, WebkitBackdropFilter: o };
|
|
1972
2127
|
}
|
|
1973
2128
|
}
|
|
1974
2129
|
};
|
|
1975
2130
|
}
|
|
1976
|
-
const
|
|
2131
|
+
const Vo = {
|
|
1977
2132
|
spring: {
|
|
1978
2133
|
stiffness: 190,
|
|
1979
2134
|
damping: 25
|
|
1980
2135
|
}
|
|
1981
|
-
},
|
|
2136
|
+
}, Xo = {
|
|
1982
2137
|
spring: {
|
|
1983
2138
|
stiffness: 190,
|
|
1984
2139
|
damping: 25
|
|
1985
2140
|
}
|
|
1986
2141
|
};
|
|
1987
|
-
function
|
|
2142
|
+
function Bo() {
|
|
1988
2143
|
return {
|
|
1989
|
-
enterPhysics:
|
|
1990
|
-
exitPhysics:
|
|
2144
|
+
enterPhysics: Vo,
|
|
2145
|
+
exitPhysics: Xo,
|
|
1991
2146
|
background: {
|
|
1992
2147
|
willChange: "",
|
|
1993
2148
|
enterStyle: () => ({}),
|
|
@@ -1995,155 +2150,155 @@ function To() {
|
|
|
1995
2150
|
}
|
|
1996
2151
|
};
|
|
1997
2152
|
}
|
|
1998
|
-
const
|
|
1999
|
-
static:
|
|
2000
|
-
"background-scale":
|
|
2001
|
-
blur:
|
|
2002
|
-
},
|
|
2003
|
-
const e =
|
|
2004
|
-
const s = c === "forward" ? "enter" : "exit", l = s === "enter" ? "to" : "from", a = s === "enter" ? "from" : "to",
|
|
2153
|
+
const Uo = {
|
|
2154
|
+
static: Bo(),
|
|
2155
|
+
"background-scale": Yo(),
|
|
2156
|
+
blur: Wo()
|
|
2157
|
+
}, jo = "static", Zo = "transform", Go = (t = {}) => {
|
|
2158
|
+
const e = Uo[t.type ?? jo], n = e.background, o = e.overlay, r = n.willChange !== "", i = (c) => {
|
|
2159
|
+
const s = c === "forward" ? "enter" : "exit", l = s === "enter" ? "to" : "from", a = s === "enter" ? "from" : "to", d = s === "enter" ? e.enterPhysics : e.exitPhysics;
|
|
2005
2160
|
return {
|
|
2006
|
-
prepare: ({ from:
|
|
2007
|
-
const h = { from:
|
|
2161
|
+
prepare: ({ from: p, to: y, context: u, createElement: f }) => {
|
|
2162
|
+
const h = { from: p, to: y }[l], m = { from: p, to: y }[a];
|
|
2008
2163
|
h.then((g) => {
|
|
2009
|
-
g.style.willChange =
|
|
2010
|
-
}),
|
|
2011
|
-
|
|
2164
|
+
g.style.willChange = Zo, g.style.backfaceVisibility = "hidden", g.style.contain = "layout paint", g.style.zIndex = D, s === "enter" ? g.style.position = "relative" : g.style.pointerEvents = "none";
|
|
2165
|
+
}), m.then((g) => {
|
|
2166
|
+
r && (g.style.willChange = n.willChange, g.style.backfaceVisibility = "hidden", g.style.contain = "layout paint"), g.style.zIndex = L, s === "enter" ? g.style.pointerEvents = "none" : g.style.position = "relative";
|
|
2012
2167
|
});
|
|
2013
2168
|
let b;
|
|
2014
|
-
return o && (b =
|
|
2169
|
+
return o && (b = f("sheet-overlay"), Object.assign(b.style, o.initialStyle), b.style.willChange = o.willChange, u.positionedParent.appendChild(b)), { overlay: b };
|
|
2015
2170
|
},
|
|
2016
|
-
animation: ({ from:
|
|
2017
|
-
const h = { from:
|
|
2018
|
-
|
|
2019
|
-
},
|
|
2020
|
-
const
|
|
2021
|
-
|
|
2171
|
+
animation: ({ from: p, to: y, context: u, overlay: f }) => {
|
|
2172
|
+
const h = { from: p, to: y }[l], m = { from: p, to: y }[a], b = W(u, l), g = () => {
|
|
2173
|
+
p.style.pointerEvents = "", p.style.zIndex = "";
|
|
2174
|
+
}, x = () => {
|
|
2175
|
+
const w = s === "enter" ? D : L;
|
|
2176
|
+
y.style.position === "relative" && (y.style.position = ""), y.style.zIndex === w && (y.style.zIndex = "");
|
|
2022
2177
|
};
|
|
2023
2178
|
h.style.clipPath = `inset(${b.top}px 0 calc(100% - ${b.top + b.height}px) 0)`;
|
|
2024
|
-
const
|
|
2179
|
+
const A = s === "enter" ? (w, E) => ({
|
|
2025
2180
|
transform: `translate3d(0, ${E * b.height}px, 0)`
|
|
2026
|
-
}) : (
|
|
2027
|
-
transform: `translate3d(0, ${
|
|
2028
|
-
}),
|
|
2181
|
+
}) : (w) => ({
|
|
2182
|
+
transform: `translate3d(0, ${w * b.height}px, 0)`
|
|
2183
|
+
}), $ = new S({
|
|
2029
2184
|
element: h,
|
|
2030
|
-
integrator: C.from(
|
|
2031
|
-
style:
|
|
2185
|
+
integrator: C.from(d),
|
|
2186
|
+
style: A,
|
|
2032
2187
|
onComplete: () => {
|
|
2033
|
-
h.style.willChange = "auto", h.style.backfaceVisibility = "", h.style.contain = "", h.style.clipPath = "", h.style.transform = "", g(),
|
|
2188
|
+
h.style.willChange = "auto", h.style.backfaceVisibility = "", h.style.contain = "", h.style.clipPath = "", h.style.transform = "", g(), x();
|
|
2034
2189
|
}
|
|
2035
2190
|
});
|
|
2036
|
-
|
|
2037
|
-
const
|
|
2038
|
-
sheet:
|
|
2039
|
-
background: new
|
|
2040
|
-
overlay: new
|
|
2191
|
+
K($);
|
|
2192
|
+
const P = {
|
|
2193
|
+
sheet: $,
|
|
2194
|
+
background: new R([]),
|
|
2195
|
+
overlay: new R([])
|
|
2041
2196
|
};
|
|
2042
|
-
if (
|
|
2043
|
-
const
|
|
2044
|
-
|
|
2045
|
-
const E =
|
|
2046
|
-
|
|
2047
|
-
const
|
|
2048
|
-
element:
|
|
2049
|
-
integrator: C.from(
|
|
2050
|
-
style:
|
|
2197
|
+
if (r) {
|
|
2198
|
+
const w = m.scrollHeight;
|
|
2199
|
+
w > 0 && (m.style.height = `${w}px`);
|
|
2200
|
+
const E = W(u, a), O = E.left + E.width / 2, T = E.top + E.height / 2;
|
|
2201
|
+
m.style.clipPath = `inset(${E.top}px 0 calc(100% - ${E.top + E.height}px) 0)`, m.style.transformOrigin = `${O}px ${T}px`;
|
|
2202
|
+
const I = s === "enter" ? (M, Y) => n.enterStyle(M, Y) : (M) => n.exitStyle(M), v = new S({
|
|
2203
|
+
element: m,
|
|
2204
|
+
integrator: C.from(d),
|
|
2205
|
+
style: I,
|
|
2051
2206
|
// The background is the reused outgoing (`from`) node on `enter` and
|
|
2052
2207
|
// the surviving incoming (`to`) node on `exit` — in both cases its
|
|
2053
2208
|
// inline styles must be cleared on settle so the reused node is not
|
|
2054
2209
|
// left scaled/faded/clipped the next time it is shown. releaseFill
|
|
2055
2210
|
// below drops the WAAPI fill so these resets actually take effect.
|
|
2056
2211
|
onComplete: () => {
|
|
2057
|
-
|
|
2212
|
+
m.style.willChange = "auto", m.style.backfaceVisibility = "", m.style.contain = "", m.style.clipPath = "", m.style.transformOrigin = "", m.style.transform = "", m.style.opacity = "", m.style.height = "";
|
|
2058
2213
|
}
|
|
2059
2214
|
});
|
|
2060
|
-
|
|
2215
|
+
K(v), P.background = v;
|
|
2061
2216
|
}
|
|
2062
|
-
if (
|
|
2063
|
-
|
|
2064
|
-
const
|
|
2065
|
-
|
|
2066
|
-
element:
|
|
2067
|
-
integrator: C.from(
|
|
2217
|
+
if (f && o) {
|
|
2218
|
+
f.style.zIndex = pe;
|
|
2219
|
+
const w = le(u, "to");
|
|
2220
|
+
f.style.top = `${w.top}px`, f.style.height = `${w.height}px`, P.overlay = new S({
|
|
2221
|
+
element: f,
|
|
2222
|
+
integrator: C.from(d),
|
|
2068
2223
|
style: (E) => o.style(s, E)
|
|
2069
2224
|
});
|
|
2070
2225
|
}
|
|
2071
|
-
return new P
|
|
2226
|
+
return new R(P, { mode: "parallel" });
|
|
2072
2227
|
}
|
|
2073
2228
|
};
|
|
2074
2229
|
};
|
|
2075
|
-
return
|
|
2076
|
-
forward:
|
|
2077
|
-
backward:
|
|
2230
|
+
return k({
|
|
2231
|
+
forward: i("forward"),
|
|
2232
|
+
backward: i("backward")
|
|
2078
2233
|
});
|
|
2079
2234
|
};
|
|
2080
|
-
function
|
|
2235
|
+
function qo(t) {
|
|
2081
2236
|
return t === "scale" || t === "background-scale" ? "background-scale" : t === "blur" ? "blur" : "static";
|
|
2082
2237
|
}
|
|
2083
|
-
function
|
|
2084
|
-
const n = t.type, o =
|
|
2085
|
-
return
|
|
2238
|
+
function Kr(t = {}, e = {}) {
|
|
2239
|
+
const n = t.type, o = qo(n);
|
|
2240
|
+
return F(Go({ type: o }), e.override);
|
|
2086
2241
|
}
|
|
2087
|
-
const
|
|
2088
|
-
const e = t.physics ??
|
|
2089
|
-
const
|
|
2242
|
+
const Ko = (t = {}) => {
|
|
2243
|
+
const e = t.physics ?? Le, n = (o) => {
|
|
2244
|
+
const r = o === "forward" ? 100 : -100;
|
|
2090
2245
|
return {
|
|
2091
|
-
prepare: ({ from:
|
|
2246
|
+
prepare: ({ from: i, to: c }) => (i.then((s) => {
|
|
2092
2247
|
s.style.willChange = "transform", s.style.backfaceVisibility = "hidden", s.style.contain = "layout paint", s.style.pointerEvents = "none";
|
|
2093
2248
|
}), c.then((s) => {
|
|
2094
|
-
s.style.transform = `translate3d(${
|
|
2249
|
+
s.style.transform = `translate3d(${r}%, 0, 0)`, s.style.willChange = "transform", s.style.backfaceVisibility = "hidden", s.style.contain = "layout paint";
|
|
2095
2250
|
}), {}),
|
|
2096
|
-
animation: ({ from:
|
|
2097
|
-
const s = new
|
|
2098
|
-
element:
|
|
2251
|
+
animation: ({ from: i, to: c }) => {
|
|
2252
|
+
const s = new S({
|
|
2253
|
+
element: i,
|
|
2099
2254
|
integrator: C.from(e),
|
|
2100
|
-
style: (a) => ({ transform: `translate3d(${100 *
|
|
2255
|
+
style: (a) => ({ transform: `translate3d(${100 * nt("slide", "out", o, a).x}%, 0, 0)` }),
|
|
2101
2256
|
// The outgoing node is the real Activity page and gets reused on the
|
|
2102
2257
|
// next navigation, so reset every inline style we wrote to it (mirror
|
|
2103
2258
|
// the incoming cleanup, plus the out-only pointerEvents).
|
|
2104
2259
|
onComplete: () => {
|
|
2105
|
-
|
|
2260
|
+
i.style.willChange = "auto", i.style.backfaceVisibility = "", i.style.contain = "", i.style.transform = "", i.style.pointerEvents = "";
|
|
2106
2261
|
}
|
|
2107
|
-
}), l = new
|
|
2262
|
+
}), l = new S({
|
|
2108
2263
|
element: c,
|
|
2109
2264
|
integrator: C.from(e),
|
|
2110
|
-
style: (a) => ({ transform: `translate3d(${100 *
|
|
2265
|
+
style: (a) => ({ transform: `translate3d(${100 * nt("slide", "in", o, a).x}%, 0, 0)` }),
|
|
2111
2266
|
onComplete: () => {
|
|
2112
2267
|
c.style.willChange = "auto", c.style.backfaceVisibility = "", c.style.contain = "", c.style.transform = "";
|
|
2113
2268
|
}
|
|
2114
2269
|
});
|
|
2115
|
-
return new
|
|
2270
|
+
return new R(
|
|
2116
2271
|
{ out: s, in: l },
|
|
2117
2272
|
{ mode: "parallel" }
|
|
2118
2273
|
);
|
|
2119
2274
|
}
|
|
2120
2275
|
};
|
|
2121
2276
|
};
|
|
2122
|
-
return
|
|
2277
|
+
return k({
|
|
2123
2278
|
forward: n("forward"),
|
|
2124
2279
|
backward: n("backward")
|
|
2125
2280
|
});
|
|
2126
2281
|
};
|
|
2127
|
-
function
|
|
2128
|
-
return
|
|
2282
|
+
function Jr(t = {}, e = {}) {
|
|
2283
|
+
return F(Ko(), e.override);
|
|
2129
2284
|
}
|
|
2130
|
-
const
|
|
2285
|
+
const Jo = {
|
|
2131
2286
|
spring: { stiffness: 17, damping: 6 }
|
|
2132
|
-
},
|
|
2133
|
-
const e = t.physics ??
|
|
2134
|
-
prepare: ({ from: o, to:
|
|
2135
|
-
|
|
2136
|
-
}),
|
|
2137
|
-
|
|
2287
|
+
}, Et = 20, et = 800, Qo = (t = {}) => {
|
|
2288
|
+
const e = t.physics ?? Jo, n = {
|
|
2289
|
+
prepare: ({ from: o, to: r }) => (o.then((i) => {
|
|
2290
|
+
i.style.willChange = "transform", i.style.backfaceVisibility = "hidden", i.style.contain = "layout paint", i.style.pointerEvents = "none", i.style.transform = `perspective(${et}px) rotateY(0deg) translate3d(0%, 0, 0)`;
|
|
2291
|
+
}), r.then((i) => {
|
|
2292
|
+
i.style.willChange = "transform", i.style.backfaceVisibility = "hidden", i.style.contain = "layout paint", i.style.transform = `perspective(${et}px) rotateY(${Et}deg) translate3d(-100%, 0, 0)`;
|
|
2138
2293
|
}), {}),
|
|
2139
|
-
animation: ({ from: o, to:
|
|
2140
|
-
const
|
|
2294
|
+
animation: ({ from: o, to: r }) => {
|
|
2295
|
+
const i = new S({
|
|
2141
2296
|
element: o,
|
|
2142
2297
|
integrator: C.from(e),
|
|
2143
2298
|
style: (s) => {
|
|
2144
|
-
const l = -s *
|
|
2299
|
+
const l = -s * Et, a = s * 100;
|
|
2145
2300
|
return {
|
|
2146
|
-
transform: `perspective(${
|
|
2301
|
+
transform: `perspective(${et}px) rotateY(${l}deg) translate3d(${a}%, 0, 0)`
|
|
2147
2302
|
};
|
|
2148
2303
|
},
|
|
2149
2304
|
// The outgoing node is reused (Activity/cacheComponents re-hide it),
|
|
@@ -2152,62 +2307,64 @@ const zo = {
|
|
|
2152
2307
|
onComplete: () => {
|
|
2153
2308
|
o.style.transform = "", o.style.willChange = "auto", o.style.backfaceVisibility = "", o.style.contain = "", o.style.pointerEvents = "";
|
|
2154
2309
|
}
|
|
2155
|
-
}), c = new
|
|
2156
|
-
element:
|
|
2310
|
+
}), c = new S({
|
|
2311
|
+
element: r,
|
|
2157
2312
|
integrator: C.from(e),
|
|
2158
2313
|
style: (s, l) => {
|
|
2159
|
-
const a = l *
|
|
2314
|
+
const a = l * Et, d = -l * 100;
|
|
2160
2315
|
return {
|
|
2161
|
-
transform: `perspective(${
|
|
2316
|
+
transform: `perspective(${et}px) rotateY(${a}deg) translate3d(${d}%, 0, 0)`
|
|
2162
2317
|
};
|
|
2163
2318
|
},
|
|
2164
2319
|
onComplete: () => {
|
|
2165
|
-
|
|
2320
|
+
r.style.transform = "", r.style.willChange = "auto", r.style.backfaceVisibility = "", r.style.contain = "";
|
|
2166
2321
|
}
|
|
2167
2322
|
});
|
|
2168
|
-
return new
|
|
2169
|
-
{ out:
|
|
2323
|
+
return new R(
|
|
2324
|
+
{ out: i, in: c },
|
|
2170
2325
|
{ mode: "sequence" }
|
|
2171
2326
|
);
|
|
2172
2327
|
}
|
|
2173
2328
|
};
|
|
2174
|
-
return
|
|
2329
|
+
return k({ forward: n, backward: n });
|
|
2175
2330
|
};
|
|
2176
|
-
function
|
|
2177
|
-
return
|
|
2331
|
+
function Qr(t = {}, e = {}) {
|
|
2332
|
+
return F(Qo(), e.override);
|
|
2178
2333
|
}
|
|
2179
|
-
function
|
|
2334
|
+
function tr(t, e) {
|
|
2180
2335
|
return e.left >= t.left - 0.01 && e.top >= t.top - 0.01 && e.left + e.width <= t.left + t.width + 0.01 && e.top + e.height <= t.top + t.height + 0.01;
|
|
2181
2336
|
}
|
|
2182
|
-
function
|
|
2337
|
+
function Yt(t) {
|
|
2183
2338
|
const e = () => ({
|
|
2339
|
+
contentAware: !1,
|
|
2184
2340
|
enterContent: t.enterRect,
|
|
2185
2341
|
exitContent: t.exitRect,
|
|
2186
2342
|
startWindow: t.enterRect,
|
|
2187
2343
|
scaleX: t.exitRect.width / t.enterRect.width,
|
|
2188
2344
|
scaleY: t.exitRect.height / t.enterRect.height
|
|
2189
2345
|
}), { enterMedia: n, exitMedia: o } = t;
|
|
2190
|
-
if (!n || !o || !
|
|
2191
|
-
const
|
|
2192
|
-
if (
|
|
2346
|
+
if (!n || !o || !he(n, o)) return e();
|
|
2347
|
+
const r = n.content, i = o.content;
|
|
2348
|
+
if (r.width <= 0 || r.height <= 0 || i.width <= 0 || i.height <= 0)
|
|
2193
2349
|
return e();
|
|
2194
|
-
const c =
|
|
2195
|
-
i,
|
|
2350
|
+
const c = i.width / r.width, s = i.height / r.height, l = me(
|
|
2196
2351
|
r,
|
|
2352
|
+
i,
|
|
2197
2353
|
o.window,
|
|
2198
2354
|
c,
|
|
2199
2355
|
s
|
|
2200
2356
|
);
|
|
2201
|
-
return
|
|
2202
|
-
|
|
2203
|
-
|
|
2357
|
+
return tr(n.window, l) ? {
|
|
2358
|
+
contentAware: !0,
|
|
2359
|
+
enterContent: r,
|
|
2360
|
+
exitContent: i,
|
|
2204
2361
|
startWindow: l,
|
|
2205
2362
|
scaleX: c,
|
|
2206
2363
|
scaleY: s,
|
|
2207
2364
|
exitCornerRadii: o.cornerRadii
|
|
2208
2365
|
} : e();
|
|
2209
2366
|
}
|
|
2210
|
-
function
|
|
2367
|
+
function ge(t, e) {
|
|
2211
2368
|
return {
|
|
2212
2369
|
top: t.top,
|
|
2213
2370
|
right: e.width - (t.left + t.width),
|
|
@@ -2215,36 +2372,36 @@ function le(t, e) {
|
|
|
2215
2372
|
left: t.left
|
|
2216
2373
|
};
|
|
2217
2374
|
}
|
|
2218
|
-
function
|
|
2375
|
+
function er(t, e, n) {
|
|
2219
2376
|
return {
|
|
2220
2377
|
x: t / Math.max(Math.abs(e), 1e-6),
|
|
2221
2378
|
y: t / Math.max(Math.abs(n), 1e-6)
|
|
2222
2379
|
};
|
|
2223
2380
|
}
|
|
2224
|
-
function
|
|
2381
|
+
function be(t, e, n, o, r, i) {
|
|
2225
2382
|
return (n ?? [t]).map(
|
|
2226
|
-
(c) =>
|
|
2383
|
+
(c) => er(
|
|
2227
2384
|
Math.max(0, c * o + e * (1 - o)),
|
|
2228
|
-
|
|
2229
|
-
|
|
2385
|
+
r,
|
|
2386
|
+
i
|
|
2230
2387
|
)
|
|
2231
2388
|
);
|
|
2232
2389
|
}
|
|
2233
|
-
function
|
|
2234
|
-
const { pageRect: e, scrollOffset: n, enterRadius: o, exitRadius:
|
|
2390
|
+
function nr(t) {
|
|
2391
|
+
const { pageRect: e, scrollOffset: n, enterRadius: o, exitRadius: r } = t, i = Yt(t), { enterContent: c, exitContent: s, startWindow: l, scaleX: a, scaleY: d } = i, p = s.left - c.left + (s.width - c.width) / 2 - n.x, y = s.top - c.top + (s.height - c.height) / 2 - n.y, u = ge(l, e);
|
|
2235
2392
|
return {
|
|
2236
|
-
transformOrigin: `${
|
|
2237
|
-
animate: (
|
|
2238
|
-
const h = 1 -
|
|
2239
|
-
|
|
2393
|
+
transformOrigin: `${z(c)}px ${N(c)}px`,
|
|
2394
|
+
animate: (f) => {
|
|
2395
|
+
const h = 1 - f, m = 1 + (a - 1) * h, b = 1 + (d - 1) * h, g = be(
|
|
2396
|
+
r,
|
|
2240
2397
|
o,
|
|
2241
|
-
|
|
2398
|
+
i.exitCornerRadii,
|
|
2242
2399
|
h,
|
|
2243
|
-
|
|
2400
|
+
m,
|
|
2244
2401
|
b
|
|
2245
2402
|
);
|
|
2246
2403
|
return {
|
|
2247
|
-
clipPath:
|
|
2404
|
+
clipPath: lt(
|
|
2248
2405
|
e,
|
|
2249
2406
|
{
|
|
2250
2407
|
top: u.top * h,
|
|
@@ -2254,26 +2411,26 @@ function Bo(t) {
|
|
|
2254
2411
|
},
|
|
2255
2412
|
g
|
|
2256
2413
|
),
|
|
2257
|
-
transform: `translate(${
|
|
2414
|
+
transform: `translate(${p * h}px, ${y * h}px) scale(${m}, ${b})`
|
|
2258
2415
|
};
|
|
2259
2416
|
}
|
|
2260
2417
|
};
|
|
2261
2418
|
}
|
|
2262
|
-
function
|
|
2263
|
-
const { pageRect: e, scrollOffset: n, enterRadius: o, exitRadius:
|
|
2419
|
+
function or(t) {
|
|
2420
|
+
const { pageRect: e, scrollOffset: n, enterRadius: o, exitRadius: r } = t, i = Yt(t), { enterContent: c, exitContent: s, startWindow: l, scaleX: a, scaleY: d } = i, p = s.left - c.left + (s.width - c.width) / 2 + n.x, y = s.top - c.top + (s.height - c.height) / 2 + n.y, u = ge(l, e);
|
|
2264
2421
|
return {
|
|
2265
|
-
transformOrigin: `${
|
|
2266
|
-
animate: (
|
|
2267
|
-
const h = 1 -
|
|
2268
|
-
|
|
2422
|
+
transformOrigin: `${z(c)}px ${N(c)}px`,
|
|
2423
|
+
animate: (f) => {
|
|
2424
|
+
const h = 1 - f, m = 1 + (a - 1) * h, b = 1 + (d - 1) * h, g = be(
|
|
2425
|
+
r,
|
|
2269
2426
|
o,
|
|
2270
|
-
|
|
2427
|
+
i.exitCornerRadii,
|
|
2271
2428
|
h,
|
|
2272
|
-
|
|
2429
|
+
m,
|
|
2273
2430
|
b
|
|
2274
2431
|
);
|
|
2275
2432
|
return {
|
|
2276
|
-
clipPath:
|
|
2433
|
+
clipPath: lt(
|
|
2277
2434
|
e,
|
|
2278
2435
|
{
|
|
2279
2436
|
top: u.top * h,
|
|
@@ -2283,12 +2440,12 @@ function Uo(t) {
|
|
|
2283
2440
|
},
|
|
2284
2441
|
g
|
|
2285
2442
|
),
|
|
2286
|
-
transform: `translate(${
|
|
2443
|
+
transform: `translate(${p * h - n.x}px, ${y * h}px) scale(${m}, ${b})`
|
|
2287
2444
|
};
|
|
2288
2445
|
}
|
|
2289
2446
|
};
|
|
2290
2447
|
}
|
|
2291
|
-
const
|
|
2448
|
+
const rr = {
|
|
2292
2449
|
spring: {
|
|
2293
2450
|
stiffness: 380,
|
|
2294
2451
|
damping: 30,
|
|
@@ -2299,30 +2456,30 @@ const Zo = {
|
|
|
2299
2456
|
damping: 30
|
|
2300
2457
|
}
|
|
2301
2458
|
}
|
|
2302
|
-
},
|
|
2303
|
-
function
|
|
2459
|
+
}, we = 0.12, ir = 18;
|
|
2460
|
+
function sr() {
|
|
2304
2461
|
return {
|
|
2305
2462
|
transformOrigin: "50% 50%",
|
|
2306
2463
|
animate: (t) => {
|
|
2307
2464
|
const e = 1 - t;
|
|
2308
2465
|
return {
|
|
2309
|
-
transform: `scale(${1 -
|
|
2466
|
+
transform: `scale(${1 - we * e})`
|
|
2310
2467
|
};
|
|
2311
2468
|
}
|
|
2312
2469
|
};
|
|
2313
2470
|
}
|
|
2314
|
-
function
|
|
2471
|
+
function ar() {
|
|
2315
2472
|
return {
|
|
2316
2473
|
transformOrigin: "50% 50%",
|
|
2317
2474
|
animate: (t) => {
|
|
2318
2475
|
const e = 1 - t;
|
|
2319
2476
|
return {
|
|
2320
|
-
transform: `scale(${1 -
|
|
2477
|
+
transform: `scale(${1 - we * e})`
|
|
2321
2478
|
};
|
|
2322
2479
|
}
|
|
2323
2480
|
};
|
|
2324
2481
|
}
|
|
2325
|
-
const
|
|
2482
|
+
const $t = {
|
|
2326
2483
|
willChange: "backdrop-filter",
|
|
2327
2484
|
// `top` + `height` are set per-transition in OverlayStrategy.contribute (they
|
|
2328
2485
|
// track the live scroll position), so they are intentionally omitted here.
|
|
@@ -2338,52 +2495,52 @@ const ht = {
|
|
|
2338
2495
|
WebkitBackdropFilter: "blur(0px)"
|
|
2339
2496
|
},
|
|
2340
2497
|
style: (t, e) => {
|
|
2341
|
-
const n = t === "enter" ? e : 1 - e, o = `blur(${
|
|
2498
|
+
const n = t === "enter" ? e : 1 - e, o = `blur(${ir * n}px)`;
|
|
2342
2499
|
return {
|
|
2343
2500
|
backdropFilter: o,
|
|
2344
2501
|
WebkitBackdropFilter: o
|
|
2345
2502
|
};
|
|
2346
2503
|
}
|
|
2347
2504
|
};
|
|
2348
|
-
class
|
|
2505
|
+
class cr {
|
|
2349
2506
|
constructor() {
|
|
2350
|
-
|
|
2351
|
-
|
|
2507
|
+
_(this, "name", "background");
|
|
2508
|
+
_(this, "physics", rr);
|
|
2352
2509
|
}
|
|
2353
2510
|
contribute(e) {
|
|
2354
|
-
const { from: n, to: o, resolved:
|
|
2511
|
+
const { from: n, to: o, resolved: r, physics: i } = e, c = r.mode === "enter", s = c ? n : o, l = c ? sr() : ar();
|
|
2355
2512
|
return l && (s.style.transformOrigin = l.transformOrigin), [
|
|
2356
|
-
new
|
|
2513
|
+
new S({
|
|
2357
2514
|
element: s,
|
|
2358
|
-
integrator: C.from(
|
|
2359
|
-
style: c ? (a,
|
|
2515
|
+
integrator: C.from(i),
|
|
2516
|
+
style: c ? (a, d) => l.animate(d) : (a) => l.animate(a)
|
|
2360
2517
|
})
|
|
2361
2518
|
];
|
|
2362
2519
|
}
|
|
2363
2520
|
}
|
|
2364
|
-
class
|
|
2521
|
+
class lr {
|
|
2365
2522
|
constructor() {
|
|
2366
|
-
|
|
2523
|
+
_(this, "name", "overlay");
|
|
2367
2524
|
}
|
|
2368
2525
|
prepare(e) {
|
|
2369
2526
|
const n = e.createElement("zoom-overlay");
|
|
2370
|
-
return Object.assign(n.style,
|
|
2527
|
+
return Object.assign(n.style, $t.initialStyle), n.style.willChange = $t.willChange, e.context.positionedParent.appendChild(n), { overlay: n };
|
|
2371
2528
|
}
|
|
2372
2529
|
contribute(e) {
|
|
2373
2530
|
const n = e.extras.overlay;
|
|
2374
2531
|
if (!n) return [];
|
|
2375
|
-
n.style.zIndex =
|
|
2376
|
-
const o =
|
|
2532
|
+
n.style.zIndex = pe;
|
|
2533
|
+
const o = le(e.context, "to");
|
|
2377
2534
|
return n.style.top = `${o.top}px`, n.style.height = `${o.height}px`, [
|
|
2378
|
-
new
|
|
2535
|
+
new S({
|
|
2379
2536
|
element: n,
|
|
2380
2537
|
integrator: C.from(e.physics),
|
|
2381
|
-
style: (
|
|
2538
|
+
style: (r) => $t.style(e.resolved.mode, r)
|
|
2382
2539
|
})
|
|
2383
2540
|
];
|
|
2384
2541
|
}
|
|
2385
2542
|
}
|
|
2386
|
-
const
|
|
2543
|
+
const dr = {
|
|
2387
2544
|
spring: {
|
|
2388
2545
|
stiffness: 380,
|
|
2389
2546
|
damping: 30,
|
|
@@ -2393,172 +2550,218 @@ const Qo = {
|
|
|
2393
2550
|
}
|
|
2394
2551
|
}
|
|
2395
2552
|
};
|
|
2396
|
-
function
|
|
2553
|
+
function pr({
|
|
2397
2554
|
enterRect: t,
|
|
2398
2555
|
exitRect: e,
|
|
2399
2556
|
scrollOffset: n
|
|
2400
2557
|
}) {
|
|
2401
|
-
const o = t.left - e.left + (t.width - e.width) / 2 + n.x,
|
|
2558
|
+
const o = t.left - e.left + (t.width - e.width) / 2 + n.x, r = t.top - e.top + (t.height - e.height) / 2 + n.y, i = t.width / e.width, c = t.height / e.height, s = Math.max(i, c);
|
|
2402
2559
|
return {
|
|
2403
2560
|
transformOrigin: `${e.left + e.width / 2}px ${e.top + e.height / 2}px`,
|
|
2404
2561
|
animate: (l) => {
|
|
2405
2562
|
const a = 1 - l;
|
|
2406
2563
|
return {
|
|
2407
|
-
transform: `translate(${o * a - n.x}px, ${
|
|
2564
|
+
transform: `translate(${o * a - n.x}px, ${r * a}px) scale(${1 + (s - 1) * a})`
|
|
2408
2565
|
};
|
|
2409
2566
|
}
|
|
2410
2567
|
};
|
|
2411
2568
|
}
|
|
2412
|
-
function
|
|
2569
|
+
function ur({
|
|
2413
2570
|
enterRect: t,
|
|
2414
2571
|
exitRect: e,
|
|
2415
2572
|
scrollOffset: n
|
|
2416
2573
|
}) {
|
|
2417
|
-
const o = t.left - e.left + (t.width - e.width) / 2 - n.x,
|
|
2574
|
+
const o = t.left - e.left + (t.width - e.width) / 2 - n.x, r = t.top - e.top + (t.height - e.height) / 2 - n.y, i = t.width / e.width, c = t.height / e.height, s = Math.max(i, c);
|
|
2418
2575
|
return {
|
|
2419
2576
|
transformOrigin: `${e.left + e.width / 2}px ${e.top + e.height / 2}px`,
|
|
2420
2577
|
animate: (l) => {
|
|
2421
2578
|
const a = 1 - l;
|
|
2422
2579
|
return {
|
|
2423
|
-
transform: `translate(${o * a}px, ${
|
|
2580
|
+
transform: `translate(${o * a}px, ${r * a}px) scale(${1 + (s - 1) * a})`
|
|
2424
2581
|
};
|
|
2425
2582
|
}
|
|
2426
2583
|
};
|
|
2427
2584
|
}
|
|
2428
|
-
class
|
|
2585
|
+
class fr {
|
|
2429
2586
|
constructor() {
|
|
2430
|
-
|
|
2431
|
-
|
|
2587
|
+
_(this, "name", "background");
|
|
2588
|
+
_(this, "physics", dr);
|
|
2432
2589
|
}
|
|
2433
2590
|
contribute(e) {
|
|
2434
|
-
const { from: n, to: o, resolved:
|
|
2591
|
+
const { from: n, to: o, resolved: r, input: i, physics: c } = e, s = r.mode === "enter", l = s ? n : o, a = s ? pr(i) : ur(i);
|
|
2435
2592
|
return a && (l.style.transformOrigin = a.transformOrigin), [
|
|
2436
|
-
new
|
|
2593
|
+
new S({
|
|
2437
2594
|
element: l,
|
|
2438
2595
|
integrator: C.from(c),
|
|
2439
|
-
style: s ? (
|
|
2596
|
+
style: s ? (d, p) => a.animate(p) : (d) => a.animate(d)
|
|
2440
2597
|
})
|
|
2441
2598
|
];
|
|
2442
2599
|
}
|
|
2443
2600
|
}
|
|
2444
|
-
const
|
|
2601
|
+
const hr = {
|
|
2445
2602
|
spring: {
|
|
2446
2603
|
stiffness: 530,
|
|
2447
2604
|
damping: 34,
|
|
2448
2605
|
doubleSpring: 1
|
|
2449
2606
|
}
|
|
2450
2607
|
};
|
|
2451
|
-
class
|
|
2608
|
+
class yr {
|
|
2452
2609
|
constructor() {
|
|
2453
|
-
|
|
2454
|
-
|
|
2610
|
+
_(this, "name", "background");
|
|
2611
|
+
_(this, "physics", hr);
|
|
2455
2612
|
}
|
|
2456
2613
|
contribute(e) {
|
|
2457
2614
|
return [];
|
|
2458
2615
|
}
|
|
2459
2616
|
}
|
|
2460
|
-
const
|
|
2461
|
-
expand: () => new
|
|
2462
|
-
static: () => new
|
|
2463
|
-
blur: () => new
|
|
2617
|
+
const mr = {
|
|
2618
|
+
expand: () => new fr(),
|
|
2619
|
+
static: () => new yr(),
|
|
2620
|
+
blur: () => new cr()
|
|
2464
2621
|
};
|
|
2465
|
-
function
|
|
2466
|
-
return
|
|
2622
|
+
function gr(t) {
|
|
2623
|
+
return mr[t]();
|
|
2467
2624
|
}
|
|
2468
|
-
|
|
2469
|
-
|
|
2625
|
+
function br(t) {
|
|
2626
|
+
var x, A;
|
|
2627
|
+
const { resolved: e, input: n, from: o, to: r, physics: i, onComplete: c } = t, s = e.mode === "enter", l = s ? r : o, a = Yt(n), d = a.contentAware ? ((x = n.exitMedia) == null ? void 0 : x.mediaElement) ?? e.exitEl : e.exitEl, p = a.contentAware ? ((A = n.enterMedia) == null ? void 0 : A.mediaElement) ?? e.enterEl : e.enterEl, y = it(d), u = it(p), f = Dt(d);
|
|
2628
|
+
a.contentAware && (f.style.width = `${a.exitContent.width}px`, f.style.height = `${a.exitContent.height}px`, f.style.borderRadius = "0"), f.style.zIndex = getComputedStyle(p).zIndex, p.after(f), f.style.transform = Kn(
|
|
2629
|
+
{
|
|
2630
|
+
width: a.enterContent.width,
|
|
2631
|
+
height: a.enterContent.height,
|
|
2632
|
+
left: a.enterContent.left + l.scrollLeft,
|
|
2633
|
+
top: a.enterContent.top + l.scrollTop
|
|
2634
|
+
},
|
|
2635
|
+
kt(l, f)
|
|
2636
|
+
);
|
|
2637
|
+
const h = n.enterMedia ?? ot(
|
|
2638
|
+
e.enterEl,
|
|
2639
|
+
n.enterRect,
|
|
2640
|
+
($) => H(l, $),
|
|
2641
|
+
{ clipRoot: l, legacyRadiusAttribute: "data-zoom-radius" }
|
|
2642
|
+
);
|
|
2643
|
+
if ((a.contentAware ? h.radiusSource : h.bboxRadiusSource) !== "unsupported") {
|
|
2644
|
+
const $ = a.contentAware ? h.window : n.enterRect, P = a.contentAware ? h.cornerRadii ?? [h.radius] : [h.bboxRadius];
|
|
2645
|
+
f.style.borderRadius = "0", f.style.clipPath = lt(
|
|
2646
|
+
a.enterContent,
|
|
2647
|
+
U(a.enterContent, $),
|
|
2648
|
+
P.map((w) => ({ x: w, y: w }))
|
|
2649
|
+
);
|
|
2650
|
+
}
|
|
2651
|
+
const b = ($, P) => ({
|
|
2652
|
+
opacity: B(s ? P : $) * y.opacity
|
|
2653
|
+
}), g = ($, P) => ({
|
|
2654
|
+
opacity: B(s ? $ : P) * u.opacity
|
|
2655
|
+
});
|
|
2656
|
+
return f.style.opacity = String(b(0, 1).opacity), y.set(0), u.set(g(0, 1).opacity), c(() => {
|
|
2657
|
+
f.remove(), y.restore(), u.restore();
|
|
2658
|
+
}), [
|
|
2659
|
+
new S({
|
|
2660
|
+
element: f,
|
|
2661
|
+
integrator: C.from(i),
|
|
2662
|
+
style: b
|
|
2663
|
+
}),
|
|
2664
|
+
new S({
|
|
2665
|
+
element: p,
|
|
2666
|
+
integrator: C.from(i),
|
|
2667
|
+
style: g
|
|
2668
|
+
})
|
|
2669
|
+
];
|
|
2670
|
+
}
|
|
2671
|
+
const Ft = "data-zoom-enter-key", re = "data-zoom-exit-key", ie = "data-zoom-radius";
|
|
2672
|
+
function wr(t, e) {
|
|
2470
2673
|
return Math.abs(t.left - e.left) < 0.01 && Math.abs(t.top - e.top) < 0.01 && Math.abs(t.width - e.width) < 0.01 && Math.abs(t.height - e.height) < 0.01;
|
|
2471
2674
|
}
|
|
2472
|
-
function
|
|
2675
|
+
function xr(t, e) {
|
|
2473
2676
|
const n = [];
|
|
2474
2677
|
let o = e;
|
|
2475
2678
|
for (; o && o !== t; ) {
|
|
2476
|
-
const
|
|
2477
|
-
if (!
|
|
2478
|
-
for (const
|
|
2479
|
-
|
|
2480
|
-
o =
|
|
2679
|
+
const r = o.parentElement;
|
|
2680
|
+
if (!r) break;
|
|
2681
|
+
for (const i of Array.from(r.children))
|
|
2682
|
+
i !== o && i instanceof HTMLElement && !i.hasAttribute(rt) && n.push(i);
|
|
2683
|
+
o = r;
|
|
2481
2684
|
}
|
|
2482
2685
|
return n;
|
|
2483
2686
|
}
|
|
2484
|
-
function
|
|
2485
|
-
const e = t.querySelectorAll(`[${
|
|
2687
|
+
function se(t) {
|
|
2688
|
+
const e = t.querySelectorAll(`[${Ft}]`);
|
|
2486
2689
|
return e.length !== 1 ? null : e[0];
|
|
2487
2690
|
}
|
|
2488
|
-
function
|
|
2489
|
-
const n = t.querySelectorAll(`[${
|
|
2691
|
+
function ae(t, e) {
|
|
2692
|
+
const n = t.querySelectorAll(`[${re}]`);
|
|
2490
2693
|
for (const o of n)
|
|
2491
|
-
if (o.getAttribute(
|
|
2694
|
+
if (o.getAttribute(re) === e)
|
|
2492
2695
|
return o;
|
|
2493
2696
|
return null;
|
|
2494
2697
|
}
|
|
2495
|
-
function
|
|
2698
|
+
function Sr(t, e, n) {
|
|
2496
2699
|
if (n === "forward") {
|
|
2497
|
-
const c =
|
|
2700
|
+
const c = se(e);
|
|
2498
2701
|
if (!c) return null;
|
|
2499
|
-
const s = c.getAttribute(
|
|
2702
|
+
const s = c.getAttribute(Ft);
|
|
2500
2703
|
if (!s) return null;
|
|
2501
|
-
const l =
|
|
2704
|
+
const l = ae(t, s);
|
|
2502
2705
|
return l ? { mode: "enter", enterEl: c, exitEl: l } : null;
|
|
2503
2706
|
}
|
|
2504
|
-
const o =
|
|
2707
|
+
const o = se(t);
|
|
2505
2708
|
if (!o) return null;
|
|
2506
|
-
const
|
|
2507
|
-
if (!
|
|
2508
|
-
const
|
|
2509
|
-
return
|
|
2709
|
+
const r = o.getAttribute(Ft);
|
|
2710
|
+
if (!r) return null;
|
|
2711
|
+
const i = ae(e, r);
|
|
2712
|
+
return i ? { mode: "exit", enterEl: o, exitEl: i } : null;
|
|
2510
2713
|
}
|
|
2511
|
-
function
|
|
2512
|
-
const
|
|
2714
|
+
function Cr(t, e, n, o) {
|
|
2715
|
+
const r = t.mode === "enter" ? n : e, i = t.mode === "enter" ? e : n, c = H(r, t.enterEl), s = H(i, t.exitEl), l = ot(
|
|
2513
2716
|
t.enterEl,
|
|
2514
2717
|
c,
|
|
2515
|
-
(
|
|
2718
|
+
(m) => H(r, m),
|
|
2516
2719
|
{
|
|
2517
|
-
clipRoot:
|
|
2518
|
-
legacyRadiusAttribute:
|
|
2720
|
+
clipRoot: r,
|
|
2721
|
+
legacyRadiusAttribute: ie
|
|
2519
2722
|
}
|
|
2520
|
-
), a =
|
|
2723
|
+
), a = ot(
|
|
2521
2724
|
t.exitEl,
|
|
2522
2725
|
s,
|
|
2523
|
-
(
|
|
2726
|
+
(m) => H(i, m),
|
|
2524
2727
|
{
|
|
2525
|
-
clipRoot:
|
|
2526
|
-
legacyRadiusAttribute:
|
|
2728
|
+
clipRoot: i,
|
|
2729
|
+
legacyRadiusAttribute: ie
|
|
2527
2730
|
}
|
|
2528
|
-
), [
|
|
2731
|
+
), [d, p] = ye(l, a), y = d.contentAware && p.contentAware, u = t.mode === "enter" ? n.getBoundingClientRect() : e.getBoundingClientRect(), f = {
|
|
2529
2732
|
left: 0,
|
|
2530
2733
|
top: 0,
|
|
2531
2734
|
width: u.width,
|
|
2532
2735
|
height: u.height
|
|
2533
|
-
}, h =
|
|
2736
|
+
}, h = d.radiusSource === "legacy" || wr(d.window, f) ? d.radius : 0;
|
|
2534
2737
|
return {
|
|
2535
2738
|
enterRect: c,
|
|
2536
2739
|
exitRect: s,
|
|
2537
|
-
...
|
|
2538
|
-
enterMedia:
|
|
2539
|
-
exitMedia:
|
|
2740
|
+
...y ? {
|
|
2741
|
+
enterMedia: d,
|
|
2742
|
+
exitMedia: p
|
|
2540
2743
|
} : {},
|
|
2541
2744
|
pageRect: u,
|
|
2542
2745
|
scrollOffset: o,
|
|
2543
2746
|
enterRadius: h,
|
|
2544
|
-
exitRadius:
|
|
2747
|
+
exitRadius: p.radius
|
|
2545
2748
|
};
|
|
2546
2749
|
}
|
|
2547
|
-
const
|
|
2548
|
-
function
|
|
2549
|
-
const e =
|
|
2750
|
+
const At = /* @__PURE__ */ new WeakMap();
|
|
2751
|
+
function Er(t) {
|
|
2752
|
+
const e = At.get(t) ?? {
|
|
2550
2753
|
opacity: t.style.opacity,
|
|
2551
2754
|
users: 0
|
|
2552
2755
|
};
|
|
2553
|
-
e.users++,
|
|
2756
|
+
e.users++, At.set(t, e), t.style.opacity = "0";
|
|
2554
2757
|
let n = !1;
|
|
2555
2758
|
return () => {
|
|
2556
|
-
n || (n = !0, !(--e.users > 0) && (t.style.opacity === "0" && (t.style.opacity = e.opacity),
|
|
2759
|
+
n || (n = !0, !(--e.users > 0) && (t.style.opacity === "0" && (t.style.opacity = e.opacity), At.delete(t)));
|
|
2557
2760
|
};
|
|
2558
2761
|
}
|
|
2559
|
-
class
|
|
2762
|
+
class $r {
|
|
2560
2763
|
constructor() {
|
|
2561
|
-
|
|
2764
|
+
_(this, "name", "tile");
|
|
2562
2765
|
}
|
|
2563
2766
|
prepare(e) {
|
|
2564
2767
|
e.from.then((n) => {
|
|
@@ -2566,89 +2769,90 @@ class ui {
|
|
|
2566
2769
|
});
|
|
2567
2770
|
}
|
|
2568
2771
|
contribute(e) {
|
|
2569
|
-
const { from: n, to: o, resolved:
|
|
2570
|
-
s(
|
|
2571
|
-
const
|
|
2572
|
-
n.style.zIndex =
|
|
2573
|
-
const
|
|
2574
|
-
return o.style.zIndex =
|
|
2575
|
-
|
|
2772
|
+
const { from: n, to: o, resolved: r, input: i, physics: c, onComplete: s } = e, l = r.mode === "enter", a = l ? nr(i) : or(i), d = l ? o : n, p = l ? "t" : "u", y = br(e);
|
|
2773
|
+
s(Er(r.exitEl)), a && (d.style.transformOrigin = a.transformOrigin);
|
|
2774
|
+
const u = l ? L : D, f = l ? D : L, h = n.style.zIndex;
|
|
2775
|
+
n.style.zIndex = u;
|
|
2776
|
+
const m = o.style.zIndex, b = o.style.position;
|
|
2777
|
+
return o.style.zIndex = f, o.style.position = "relative", s(() => {
|
|
2778
|
+
d.style.willChange = "auto", d.style.backfaceVisibility = "", d.style.transformOrigin = "", d.style.contain = "", n.style.zIndex = h, o.style.zIndex === f && (o.style.zIndex = m), o.style.position === "relative" && (o.style.position = b), o.style.transformOrigin = "", n.style.willChange = "auto", n.style.backfaceVisibility = "", n.style.transformOrigin = "", n.style.contain = "", n.style.transform = "", n.style.clipPath = "";
|
|
2576
2779
|
}), [
|
|
2577
|
-
|
|
2578
|
-
|
|
2780
|
+
...y,
|
|
2781
|
+
new S({
|
|
2782
|
+
element: d,
|
|
2579
2783
|
integrator: C.from(c),
|
|
2580
2784
|
// Enter: tile expands as `t` (0 → 1). Exit: tile shrinks as `u` —
|
|
2581
2785
|
// the legacy convention from v5's outAnim path. Either way, feed
|
|
2582
2786
|
// the progress that matches the tileConfig's authored direction.
|
|
2583
|
-
style:
|
|
2787
|
+
style: p === "t" ? (g) => a.animate(g) : (g, x) => a.animate(x)
|
|
2584
2788
|
})
|
|
2585
2789
|
];
|
|
2586
2790
|
}
|
|
2587
2791
|
}
|
|
2588
|
-
class
|
|
2792
|
+
class Ar {
|
|
2589
2793
|
constructor() {
|
|
2590
|
-
|
|
2794
|
+
_(this, "name", "content");
|
|
2591
2795
|
}
|
|
2592
2796
|
contribute(e) {
|
|
2593
|
-
const { resolved: n, physics: o, from:
|
|
2797
|
+
const { resolved: n, physics: o, from: r, to: i, onComplete: c } = e, s = n.mode === "enter" ? i : r, l = xr(s, n.enterEl);
|
|
2594
2798
|
if (l.length === 0) return [];
|
|
2595
|
-
const a = l.map((
|
|
2799
|
+
const a = l.map((d) => d.style.opacity);
|
|
2596
2800
|
if (n.mode === "enter")
|
|
2597
|
-
for (const
|
|
2801
|
+
for (const d of l) d.style.opacity = "0";
|
|
2598
2802
|
return c(() => {
|
|
2599
|
-
for (let
|
|
2600
|
-
const
|
|
2601
|
-
|
|
2803
|
+
for (let d = 0; d < l.length; d++) {
|
|
2804
|
+
const p = l[d];
|
|
2805
|
+
p && (p.style.opacity = a[d] ?? "");
|
|
2602
2806
|
}
|
|
2603
2807
|
}), l.map(
|
|
2604
|
-
(
|
|
2605
|
-
element:
|
|
2808
|
+
(d) => new S({
|
|
2809
|
+
element: d,
|
|
2606
2810
|
integrator: C.from(o),
|
|
2607
|
-
style: (
|
|
2608
|
-
opacity: n.mode === "enter" ?
|
|
2811
|
+
style: (p, y) => ({
|
|
2812
|
+
opacity: n.mode === "enter" ? p : y
|
|
2609
2813
|
})
|
|
2610
2814
|
})
|
|
2611
2815
|
);
|
|
2612
2816
|
}
|
|
2613
2817
|
}
|
|
2614
|
-
class
|
|
2818
|
+
class Pr {
|
|
2615
2819
|
constructor() {
|
|
2616
|
-
|
|
2820
|
+
_(this, "name", "content");
|
|
2617
2821
|
}
|
|
2618
2822
|
contribute() {
|
|
2619
2823
|
return [];
|
|
2620
2824
|
}
|
|
2621
2825
|
}
|
|
2622
|
-
const
|
|
2623
|
-
default: () => new
|
|
2624
|
-
fade: () => new
|
|
2826
|
+
const vr = {
|
|
2827
|
+
default: () => new Pr(),
|
|
2828
|
+
fade: () => new Ar()
|
|
2625
2829
|
};
|
|
2626
|
-
function
|
|
2627
|
-
return
|
|
2830
|
+
function Rr(t) {
|
|
2831
|
+
return vr[t]();
|
|
2628
2832
|
}
|
|
2629
|
-
function
|
|
2630
|
-
const e =
|
|
2833
|
+
function Ir(t) {
|
|
2834
|
+
const e = gr(t.type);
|
|
2631
2835
|
return { strategies: [
|
|
2632
|
-
new
|
|
2836
|
+
new $r(),
|
|
2633
2837
|
e,
|
|
2634
|
-
|
|
2838
|
+
Rr(t.variant),
|
|
2635
2839
|
// Overlay is intrinsically tied to backdrop-filter-driven types. Today
|
|
2636
2840
|
// that's only `blur`; the table-driven factory above owns the mapping
|
|
2637
2841
|
// so this conditional is the single line that knows the relationship.
|
|
2638
|
-
...t.type === "blur" ? [new
|
|
2842
|
+
...t.type === "blur" ? [new lr()] : []
|
|
2639
2843
|
], physics: e.physics };
|
|
2640
2844
|
}
|
|
2641
|
-
const
|
|
2642
|
-
const { strategies: e, physics: n } =
|
|
2643
|
-
prepare: (
|
|
2845
|
+
const Or = (t) => {
|
|
2846
|
+
const { strategies: e, physics: n } = Ir(t), o = (r) => ({
|
|
2847
|
+
prepare: (i) => {
|
|
2644
2848
|
const c = {
|
|
2645
|
-
from:
|
|
2646
|
-
to:
|
|
2647
|
-
context: { positionedParent:
|
|
2849
|
+
from: i.from,
|
|
2850
|
+
to: i.to,
|
|
2851
|
+
context: { positionedParent: i.context.positionedParent },
|
|
2648
2852
|
// `createElement` from the dispatcher is generic over tag; the
|
|
2649
2853
|
// strategy interface narrows the cast to keep both signatures
|
|
2650
2854
|
// compatible.
|
|
2651
|
-
createElement:
|
|
2855
|
+
createElement: i.createElement
|
|
2652
2856
|
}, s = {};
|
|
2653
2857
|
for (const l of e) {
|
|
2654
2858
|
if (!l.prepare) continue;
|
|
@@ -2657,68 +2861,68 @@ const bi = (t) => {
|
|
|
2657
2861
|
}
|
|
2658
2862
|
return s;
|
|
2659
2863
|
},
|
|
2660
|
-
animation: ({ from:
|
|
2864
|
+
animation: ({ from: i, to: c, context: s, ...l }) => {
|
|
2661
2865
|
var b;
|
|
2662
|
-
const a =
|
|
2866
|
+
const a = Sr(i, c, r);
|
|
2663
2867
|
if (!a)
|
|
2664
|
-
return
|
|
2868
|
+
return q({
|
|
2665
2869
|
tile: [],
|
|
2666
2870
|
background: [],
|
|
2667
2871
|
content: [],
|
|
2668
2872
|
overlay: []
|
|
2669
2873
|
});
|
|
2670
|
-
const
|
|
2671
|
-
from:
|
|
2874
|
+
const d = Cr(a, i, c, s.scrollOffset), p = [], u = {
|
|
2875
|
+
from: i,
|
|
2672
2876
|
to: c,
|
|
2673
2877
|
resolved: a,
|
|
2674
|
-
input:
|
|
2878
|
+
input: d,
|
|
2675
2879
|
physics: n,
|
|
2676
2880
|
context: s,
|
|
2677
2881
|
extras: l,
|
|
2678
2882
|
onComplete: (g) => {
|
|
2679
|
-
|
|
2883
|
+
p.push(g);
|
|
2680
2884
|
}
|
|
2681
|
-
},
|
|
2885
|
+
}, f = {
|
|
2682
2886
|
tile: [],
|
|
2683
2887
|
background: [],
|
|
2684
2888
|
content: [],
|
|
2685
2889
|
overlay: []
|
|
2686
2890
|
};
|
|
2687
2891
|
for (const g of e)
|
|
2688
|
-
|
|
2689
|
-
const h = Object.values(
|
|
2690
|
-
|
|
2691
|
-
for (const g of
|
|
2892
|
+
f[g.name].push(...((b = g.contribute) == null ? void 0 : b.call(g, u)) ?? []);
|
|
2893
|
+
const h = Object.values(f).flat(), m = q(f);
|
|
2894
|
+
m.onComplete = () => {
|
|
2895
|
+
for (const g of p)
|
|
2692
2896
|
try {
|
|
2693
2897
|
g();
|
|
2694
|
-
} catch (
|
|
2695
|
-
console.error("[zoom] cleanup error",
|
|
2898
|
+
} catch (x) {
|
|
2899
|
+
console.error("[zoom] cleanup error", x);
|
|
2696
2900
|
}
|
|
2697
2901
|
};
|
|
2698
2902
|
for (const g of h)
|
|
2699
|
-
g instanceof
|
|
2700
|
-
return
|
|
2903
|
+
g instanceof S && K(g);
|
|
2904
|
+
return m;
|
|
2701
2905
|
}
|
|
2702
2906
|
});
|
|
2703
|
-
return
|
|
2907
|
+
return k({
|
|
2704
2908
|
forward: o("forward"),
|
|
2705
2909
|
backward: o("backward")
|
|
2706
2910
|
});
|
|
2707
2911
|
};
|
|
2708
|
-
function
|
|
2912
|
+
function _r(t) {
|
|
2709
2913
|
const e = t.type ?? "static", n = t.variant ?? (t.fade ? "fade" : "default");
|
|
2710
2914
|
return { type: e, variant: n };
|
|
2711
2915
|
}
|
|
2712
|
-
function
|
|
2713
|
-
const n =
|
|
2714
|
-
return
|
|
2916
|
+
function ti(t = {}, e = {}) {
|
|
2917
|
+
const n = _r(t);
|
|
2918
|
+
return F(Or(n), e.override);
|
|
2715
2919
|
}
|
|
2716
|
-
const
|
|
2717
|
-
function
|
|
2718
|
-
const n = Math.sqrt(t), o = e / (2 * n),
|
|
2719
|
-
return { duration:
|
|
2920
|
+
const ce = 1 / 60, kr = 600;
|
|
2921
|
+
function Fr(t, e) {
|
|
2922
|
+
const n = Math.sqrt(t), o = e / (2 * n), r = 2 * Math.PI / n, i = o <= 1 ? 1 - o : 1 / o - 1;
|
|
2923
|
+
return { duration: r, bounce: i, zeta: o };
|
|
2720
2924
|
}
|
|
2721
|
-
function
|
|
2925
|
+
function Q(t) {
|
|
2722
2926
|
if (!Number.isFinite(t.stiffness) || t.stiffness <= 0)
|
|
2723
2927
|
throw new Error("spring(): stiffness must be finite and > 0");
|
|
2724
2928
|
if (!Number.isFinite(t.damping) || t.damping < 0)
|
|
@@ -2731,40 +2935,40 @@ function J(t) {
|
|
|
2731
2935
|
throw new Error(`spring(): ${e} must be finite and > 0`);
|
|
2732
2936
|
return C.from({ spring: t });
|
|
2733
2937
|
}
|
|
2734
|
-
function
|
|
2938
|
+
function Tr(t) {
|
|
2735
2939
|
let e = { position: 0, velocity: 0 };
|
|
2736
|
-
for (let n = 1; n <=
|
|
2737
|
-
if (e = t.step(e, 1,
|
|
2940
|
+
for (let n = 1; n <= kr; n++)
|
|
2941
|
+
if (e = t.step(e, 1, ce), e.position >= 1) return n * ce * 1e3;
|
|
2738
2942
|
return 1 / 0;
|
|
2739
2943
|
}
|
|
2740
|
-
function
|
|
2944
|
+
function Mr(t) {
|
|
2741
2945
|
const { duration: e, resistance: n = 1.5, restDelta: o } = t;
|
|
2742
2946
|
if (!Number.isFinite(e) || !(e > 0))
|
|
2743
2947
|
throw new Error("easeIn(): duration must be finite and > 0");
|
|
2744
|
-
const
|
|
2745
|
-
let
|
|
2948
|
+
const r = e * 1e3;
|
|
2949
|
+
let i = 0.01, c = 1e6;
|
|
2746
2950
|
for (let s = 0; s < 60; s++) {
|
|
2747
|
-
const l = Math.sqrt(
|
|
2951
|
+
const l = Math.sqrt(i * c), a = new vt({
|
|
2748
2952
|
acceleration: l,
|
|
2749
2953
|
resistance: n,
|
|
2750
2954
|
restDelta: o
|
|
2751
2955
|
});
|
|
2752
|
-
|
|
2956
|
+
Tr(a) > r ? i = l : c = l;
|
|
2753
2957
|
}
|
|
2754
|
-
return new
|
|
2958
|
+
return new vt({ acceleration: c, resistance: n, restDelta: o });
|
|
2755
2959
|
}
|
|
2756
|
-
class
|
|
2960
|
+
class xe {
|
|
2757
2961
|
constructor(e, n) {
|
|
2758
2962
|
if (this.inner = e, this.factor = n, !Number.isFinite(n) || !(n > 0))
|
|
2759
2963
|
throw new Error("scale(): factor must be finite and > 0");
|
|
2760
2964
|
}
|
|
2761
2965
|
step(e, n, o) {
|
|
2762
|
-
const
|
|
2966
|
+
const r = Math.max(1, Math.ceil(this.factor)), i = o * this.factor / r;
|
|
2763
2967
|
let c = {
|
|
2764
2968
|
...e,
|
|
2765
2969
|
velocity: e.velocity / this.factor
|
|
2766
2970
|
};
|
|
2767
|
-
for (let s = 0; s <
|
|
2971
|
+
for (let s = 0; s < r; s++) c = this.inner.step(c, n, i);
|
|
2768
2972
|
return { ...c, velocity: c.velocity * this.factor };
|
|
2769
2973
|
}
|
|
2770
2974
|
isSettled(e, n) {
|
|
@@ -2774,13 +2978,13 @@ class ue {
|
|
|
2774
2978
|
);
|
|
2775
2979
|
}
|
|
2776
2980
|
}
|
|
2777
|
-
function
|
|
2778
|
-
return new
|
|
2981
|
+
function ei(t, e) {
|
|
2982
|
+
return new xe(t, e);
|
|
2779
2983
|
}
|
|
2780
|
-
function
|
|
2781
|
-
const e =
|
|
2782
|
-
if (t instanceof
|
|
2783
|
-
const o =
|
|
2984
|
+
function Dr(t) {
|
|
2985
|
+
const e = Te(t, 0, 1, 0), n = e.length ? e[e.length - 1].time : 0;
|
|
2986
|
+
if (t instanceof xe) {
|
|
2987
|
+
const o = Dr(t.inner);
|
|
2784
2988
|
return {
|
|
2785
2989
|
...o,
|
|
2786
2990
|
kind: "scaled",
|
|
@@ -2788,61 +2992,61 @@ function $i(t) {
|
|
|
2788
2992
|
settleMs: n
|
|
2789
2993
|
};
|
|
2790
2994
|
}
|
|
2791
|
-
return t instanceof
|
|
2792
|
-
kind: t instanceof
|
|
2793
|
-
...
|
|
2995
|
+
return t instanceof Pt || t instanceof Me ? {
|
|
2996
|
+
kind: t instanceof Pt ? "spring" : "double-spring",
|
|
2997
|
+
...Fr(t.stiffness, t.damping),
|
|
2794
2998
|
settleMs: n
|
|
2795
|
-
} : t instanceof
|
|
2999
|
+
} : t instanceof vt ? { kind: "inertia", settleMs: n } : { kind: "custom", settleMs: n };
|
|
2796
3000
|
}
|
|
2797
|
-
const
|
|
3001
|
+
const ni = Q({
|
|
2798
3002
|
stiffness: 246.74011002723395,
|
|
2799
3003
|
damping: 31.41592653589793
|
|
2800
|
-
}),
|
|
3004
|
+
}), oi = Q({
|
|
2801
3005
|
stiffness: 438.6490844928604,
|
|
2802
3006
|
damping: 35.604716740684324
|
|
2803
|
-
}),
|
|
3007
|
+
}), ri = Q({
|
|
2804
3008
|
stiffness: 194.9551486634935,
|
|
2805
3009
|
damping: 19.54768762233649
|
|
2806
|
-
}),
|
|
3010
|
+
}), ii = Q({
|
|
2807
3011
|
stiffness: 130.5071656342394,
|
|
2808
3012
|
damping: 22.84794657156213
|
|
2809
|
-
}),
|
|
3013
|
+
}), si = Q({
|
|
2810
3014
|
stiffness: 986.9604401089358,
|
|
2811
3015
|
damping: 62.83185307179586
|
|
2812
|
-
}),
|
|
3016
|
+
}), ai = Mr({ duration: 0.2 });
|
|
2813
3017
|
export {
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
3018
|
+
di as Animation,
|
|
3019
|
+
Me as DoubleSpringIntegrator,
|
|
3020
|
+
vt as InertiaIntegrator,
|
|
2817
3021
|
C as IntegratorProvider,
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
3022
|
+
He as LinearIntegrator,
|
|
3023
|
+
R as MultiAnimation,
|
|
3024
|
+
xe as ScaledIntegrator,
|
|
3025
|
+
Pt as SpringIntegrator,
|
|
3026
|
+
S as WebAnimation,
|
|
3027
|
+
ai as accelerate,
|
|
3028
|
+
Wr as axis,
|
|
3029
|
+
Vr as blind,
|
|
3030
|
+
ri as bouncy,
|
|
3031
|
+
k as defineTransition,
|
|
3032
|
+
Dr as describeIntegrator,
|
|
3033
|
+
Xr as drill,
|
|
3034
|
+
Mr as easeIn,
|
|
3035
|
+
Br as fade,
|
|
3036
|
+
Ur as film,
|
|
3037
|
+
ii as gentle,
|
|
3038
|
+
jr as hero,
|
|
3039
|
+
Zr as jaemin,
|
|
3040
|
+
Gr as rotate,
|
|
3041
|
+
ei as scale,
|
|
3042
|
+
qr as scroll,
|
|
3043
|
+
Kr as sheet,
|
|
3044
|
+
Jr as slide,
|
|
3045
|
+
ni as smooth,
|
|
3046
|
+
oi as snappy,
|
|
3047
|
+
Q as spring,
|
|
3048
|
+
Qr as strip,
|
|
3049
|
+
si as swift,
|
|
3050
|
+
F as withOverride,
|
|
3051
|
+
ti as zoom
|
|
2848
3052
|
};
|