@ssgoi/core 3.1.2 → 3.1.4
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/animator/multi-animator.d.ts +0 -2
- package/dist/animator/multi-animator.d.ts.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +100 -97
- package/dist/transition/create-transition-callback.d.ts.map +1 -1
- package/dist/types.cjs +1 -1
- package/dist/types.d.ts +35 -5
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +39 -36
- package/dist/view-transitions/blind.d.ts.map +1 -1
- package/dist/view-transitions/film.d.ts +1 -3
- package/dist/view-transitions/film.d.ts.map +1 -1
- package/dist/view-transitions/hero.d.ts.map +1 -1
- package/dist/view-transitions/index.cjs +15 -15
- package/dist/view-transitions/index.js +643 -588
- package/dist/view-transitions/instagram.d.ts.map +1 -1
- package/dist/view-transitions/pinterest.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { p as
|
|
2
|
-
import { a as
|
|
3
|
-
const
|
|
1
|
+
import { p as x, g as b } from "../jaemin-BWkrXq0V.js";
|
|
2
|
+
import { a as Xt } from "../jaemin-BWkrXq0V.js";
|
|
3
|
+
const P = (t) => new Promise((n) => setTimeout(n, t)), B = { stiffness: 80, damping: 25 }, H = { stiffness: 75, damping: 25 }, N = 300, q = 10, G = "horizontal", j = "#000000", St = (t = {}) => {
|
|
4
4
|
const {
|
|
5
|
-
inSpring: n =
|
|
6
|
-
outSpring:
|
|
7
|
-
transitionDelay: d =
|
|
8
|
-
blindCount:
|
|
9
|
-
direction:
|
|
10
|
-
blindColor:
|
|
5
|
+
inSpring: n = H,
|
|
6
|
+
outSpring: a = B,
|
|
7
|
+
transitionDelay: d = N,
|
|
8
|
+
blindCount: r = q,
|
|
9
|
+
direction: s = G,
|
|
10
|
+
blindColor: l = j
|
|
11
11
|
} = t;
|
|
12
|
-
let i,
|
|
13
|
-
const
|
|
12
|
+
let i, c = null;
|
|
13
|
+
const o = (e, p, y = "left") => {
|
|
14
14
|
window.getComputedStyle(e).position === "static" && (e.style.position = "relative");
|
|
15
|
-
const
|
|
16
|
-
|
|
15
|
+
const g = document.createElement("div");
|
|
16
|
+
g.className = "blind-container", g.style.cssText = `
|
|
17
17
|
position: absolute;
|
|
18
18
|
top: 0;
|
|
19
19
|
left: 0;
|
|
@@ -23,90 +23,103 @@ const O = (t) => new Promise((n) => setTimeout(n, t)), q = { stiffness: 80, damp
|
|
|
23
23
|
z-index: 9999;
|
|
24
24
|
overflow: hidden;
|
|
25
25
|
`;
|
|
26
|
-
const
|
|
27
|
-
for (let
|
|
28
|
-
const
|
|
29
|
-
if (
|
|
30
|
-
const w = 100 /
|
|
31
|
-
|
|
26
|
+
const u = [];
|
|
27
|
+
for (let m = 0; m < r; m++) {
|
|
28
|
+
const f = document.createElement("div");
|
|
29
|
+
if (s === "horizontal") {
|
|
30
|
+
const w = 100 / r, $ = `calc(${w}% + 1px)`;
|
|
31
|
+
f.style.cssText = `
|
|
32
32
|
position: absolute;
|
|
33
|
-
top: ${w *
|
|
33
|
+
top: ${w * m}%;
|
|
34
34
|
left: 0;
|
|
35
35
|
width: 100%;
|
|
36
|
-
height: ${
|
|
37
|
-
background: ${
|
|
38
|
-
transform: scaleX(${
|
|
36
|
+
height: ${$};
|
|
37
|
+
background: ${l};
|
|
38
|
+
transform: scaleX(${p === "hidden" ? 0 : 1});
|
|
39
39
|
transform-origin: ${y} center;
|
|
40
40
|
will-change: transform;
|
|
41
41
|
`;
|
|
42
42
|
} else {
|
|
43
|
-
const w = 100 /
|
|
44
|
-
|
|
43
|
+
const w = 100 / r, $ = `calc(${w}% + 1px)`;
|
|
44
|
+
f.style.cssText = `
|
|
45
45
|
position: absolute;
|
|
46
46
|
top: 0;
|
|
47
|
-
left: ${w *
|
|
48
|
-
width: ${
|
|
47
|
+
left: ${w * m}%;
|
|
48
|
+
width: ${$};
|
|
49
49
|
height: 100%;
|
|
50
|
-
background: ${
|
|
51
|
-
transform: scaleY(${
|
|
50
|
+
background: ${l};
|
|
51
|
+
transform: scaleY(${p === "hidden" ? 0 : 1});
|
|
52
52
|
transform-origin: ${y === "left" ? "top" : "bottom"} center;
|
|
53
53
|
will-change: transform;
|
|
54
54
|
`;
|
|
55
55
|
}
|
|
56
|
-
|
|
56
|
+
u.push(f), g.appendChild(f);
|
|
57
57
|
}
|
|
58
|
-
return e.appendChild(
|
|
58
|
+
return e.appendChild(g), { container: g, blinds: u };
|
|
59
59
|
};
|
|
60
60
|
return {
|
|
61
61
|
out: () => {
|
|
62
62
|
let e = null;
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
})
|
|
66
|
-
|
|
67
|
-
|
|
63
|
+
i = new Promise((h) => {
|
|
64
|
+
c = h;
|
|
65
|
+
});
|
|
66
|
+
const p = (h) => {
|
|
67
|
+
const g = 1 - h;
|
|
68
|
+
return {
|
|
69
|
+
transform: s === "horizontal" ? `scaleX(${g})` : `scaleY(${g})`
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
return {
|
|
73
|
+
springs: Array.from({ length: r }, (h, g) => ({
|
|
74
|
+
spring: a,
|
|
68
75
|
offset: 0.2,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
76
|
+
css: {
|
|
77
|
+
// Use getter for lazy element access (evaluated after prepare)
|
|
78
|
+
get element() {
|
|
79
|
+
return e == null ? void 0 : e.blinds[g];
|
|
80
|
+
},
|
|
81
|
+
style: p
|
|
75
82
|
}
|
|
76
83
|
})),
|
|
77
84
|
schedule: "stagger",
|
|
78
|
-
prepare: (
|
|
79
|
-
|
|
85
|
+
prepare: (h) => {
|
|
86
|
+
x(h), h.style.zIndex = "1000", e = o(h, "hidden", "left");
|
|
80
87
|
},
|
|
81
88
|
onStart: () => {
|
|
82
89
|
},
|
|
83
90
|
onEnd: () => {
|
|
84
|
-
|
|
91
|
+
c && c();
|
|
85
92
|
}
|
|
86
93
|
};
|
|
87
94
|
},
|
|
88
95
|
in: () => {
|
|
89
96
|
let e = null;
|
|
97
|
+
const p = (h) => {
|
|
98
|
+
const g = 1 - h;
|
|
99
|
+
return {
|
|
100
|
+
transform: s === "horizontal" ? `scaleX(${g})` : `scaleY(${g})`
|
|
101
|
+
};
|
|
102
|
+
};
|
|
90
103
|
return {
|
|
91
|
-
springs: Array.from({ length:
|
|
104
|
+
springs: Array.from({ length: r }, (h, g) => ({
|
|
92
105
|
spring: n,
|
|
93
106
|
offset: 0.2,
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
107
|
+
css: {
|
|
108
|
+
// Use getter for lazy element access (evaluated after prepare)
|
|
109
|
+
get element() {
|
|
110
|
+
return e == null ? void 0 : e.blinds[g];
|
|
111
|
+
},
|
|
112
|
+
style: p
|
|
100
113
|
}
|
|
101
114
|
})),
|
|
102
115
|
schedule: "stagger",
|
|
103
|
-
prepare: (
|
|
104
|
-
|
|
116
|
+
prepare: (h) => {
|
|
117
|
+
h.style.position = "relative", h.style.zIndex = "0", e = o(h, "closed", "right");
|
|
105
118
|
},
|
|
106
119
|
onStart: () => {
|
|
107
120
|
},
|
|
108
121
|
wait: async () => {
|
|
109
|
-
i && await i, await
|
|
122
|
+
i && await i, await P(d);
|
|
110
123
|
},
|
|
111
124
|
onEnd: () => {
|
|
112
125
|
e && e.container && e.container.remove();
|
|
@@ -114,264 +127,272 @@ const O = (t) => new Promise((n) => setTimeout(n, t)), q = { stiffness: 80, damp
|
|
|
114
127
|
};
|
|
115
128
|
}
|
|
116
129
|
};
|
|
117
|
-
},
|
|
130
|
+
}, K = {
|
|
118
131
|
stiffness: 150,
|
|
119
132
|
damping: 20
|
|
120
|
-
},
|
|
133
|
+
}, Z = {
|
|
121
134
|
stiffness: 100,
|
|
122
135
|
damping: 20
|
|
123
|
-
},
|
|
124
|
-
var
|
|
125
|
-
const { opacity: n = !1, direction:
|
|
126
|
-
stiffness: ((
|
|
127
|
-
damping: ((
|
|
136
|
+
}, _t = (t = {}) => {
|
|
137
|
+
var s, l;
|
|
138
|
+
const { opacity: n = !1, direction: a = "enter" } = t, d = a === "enter" ? K : Z, r = {
|
|
139
|
+
stiffness: ((s = t.spring) == null ? void 0 : s.stiffness) ?? d.stiffness,
|
|
140
|
+
damping: ((l = t.spring) == null ? void 0 : l.damping) ?? d.damping
|
|
128
141
|
};
|
|
129
|
-
return
|
|
142
|
+
return a === "enter" ? {
|
|
130
143
|
in: (i) => ({
|
|
131
|
-
spring:
|
|
144
|
+
spring: r,
|
|
132
145
|
prepare: () => {
|
|
133
146
|
i.style.willChange = n ? "transform, opacity" : "transform", i.style.backfaceVisibility = "hidden", i.style.contain = "layout paint";
|
|
134
147
|
},
|
|
135
|
-
css: (
|
|
136
|
-
const
|
|
137
|
-
transform: `translate3d(${(1 -
|
|
148
|
+
css: (c) => {
|
|
149
|
+
const o = {
|
|
150
|
+
transform: `translate3d(${(1 - c) * 100}%, 0, 0)`
|
|
138
151
|
};
|
|
139
|
-
return n && (
|
|
152
|
+
return n && (o.opacity = c), o;
|
|
140
153
|
},
|
|
141
154
|
onEnd: () => {
|
|
142
155
|
i.style.willChange = "auto", i.style.backfaceVisibility = "", i.style.contain = "";
|
|
143
156
|
}
|
|
144
157
|
}),
|
|
145
|
-
out: (i,
|
|
146
|
-
spring:
|
|
147
|
-
prepare: (
|
|
148
|
-
|
|
158
|
+
out: (i, c) => ({
|
|
159
|
+
spring: r,
|
|
160
|
+
prepare: (o) => {
|
|
161
|
+
x(o, c), o.style.zIndex = "-1", o.style.willChange = n ? "transform, opacity" : "transform", o.style.backfaceVisibility = "hidden", o.style.contain = "layout paint", o.style.pointerEvents = "none";
|
|
149
162
|
},
|
|
150
|
-
css: (
|
|
163
|
+
css: (o) => {
|
|
151
164
|
const e = {
|
|
152
|
-
transform: `translate3d(${-(1 -
|
|
165
|
+
transform: `translate3d(${-(1 - o) * 20}%, 0, 0)`
|
|
153
166
|
};
|
|
154
|
-
return n && (e.opacity =
|
|
167
|
+
return n && (e.opacity = o), e;
|
|
155
168
|
}
|
|
156
169
|
})
|
|
157
170
|
} : {
|
|
158
171
|
in: (i) => ({
|
|
159
|
-
spring:
|
|
172
|
+
spring: r,
|
|
160
173
|
prepare: () => {
|
|
161
174
|
i.style.willChange = n ? "transform, opacity" : "transform", i.style.backfaceVisibility = "hidden", i.style.contain = "layout paint";
|
|
162
175
|
},
|
|
163
|
-
css: (
|
|
164
|
-
const
|
|
165
|
-
transform: `translate3d(${-(1 -
|
|
176
|
+
css: (c) => {
|
|
177
|
+
const o = {
|
|
178
|
+
transform: `translate3d(${-(1 - c) * 20}%, 0, 0)`
|
|
166
179
|
};
|
|
167
|
-
return n && (
|
|
180
|
+
return n && (o.opacity = c), o;
|
|
168
181
|
},
|
|
169
182
|
onEnd: () => {
|
|
170
183
|
i.style.willChange = "auto", i.style.backfaceVisibility = "", i.style.contain = "";
|
|
171
184
|
}
|
|
172
185
|
}),
|
|
173
|
-
out: (i,
|
|
174
|
-
spring:
|
|
175
|
-
prepare: (
|
|
176
|
-
|
|
186
|
+
out: (i, c) => ({
|
|
187
|
+
spring: r,
|
|
188
|
+
prepare: (o) => {
|
|
189
|
+
x(o, c), o.style.zIndex = "100", o.style.willChange = n ? "transform, opacity" : "transform", o.style.backfaceVisibility = "hidden", o.style.contain = "layout paint", o.style.pointerEvents = "none";
|
|
177
190
|
},
|
|
178
|
-
css: (
|
|
191
|
+
css: (o) => {
|
|
179
192
|
const e = {
|
|
180
|
-
transform: `translate3d(${(1 -
|
|
193
|
+
transform: `translate3d(${(1 - o) * 100}%, 0, 0)`
|
|
181
194
|
};
|
|
182
|
-
return n && (e.opacity =
|
|
195
|
+
return n && (e.opacity = o), e;
|
|
183
196
|
}
|
|
184
197
|
})
|
|
185
198
|
};
|
|
186
|
-
},
|
|
199
|
+
}, J = { stiffness: 65, damping: 16 }, Q = { stiffness: 65, damping: 14 }, R = 0, It = (t = {}) => {
|
|
187
200
|
const {
|
|
188
|
-
inSpring: n =
|
|
189
|
-
outSpring:
|
|
190
|
-
transitionDelay: d =
|
|
201
|
+
inSpring: n = Q,
|
|
202
|
+
outSpring: a = J,
|
|
203
|
+
transitionDelay: d = R
|
|
191
204
|
} = t;
|
|
192
|
-
let
|
|
205
|
+
let r, s = null;
|
|
193
206
|
return {
|
|
194
|
-
in: (
|
|
207
|
+
in: (l) => ({
|
|
195
208
|
spring: n,
|
|
196
209
|
prepare: () => {
|
|
197
|
-
|
|
210
|
+
l.style.willChange = "opacity";
|
|
198
211
|
},
|
|
199
212
|
wait: async () => {
|
|
200
|
-
|
|
213
|
+
r && (await r, await P(d));
|
|
201
214
|
},
|
|
202
215
|
css: (i) => ({
|
|
203
216
|
opacity: i
|
|
204
217
|
}),
|
|
205
218
|
onEnd: () => {
|
|
206
|
-
|
|
219
|
+
l.style.willChange = "auto";
|
|
207
220
|
}
|
|
208
221
|
}),
|
|
209
|
-
out: (
|
|
210
|
-
|
|
222
|
+
out: (l, i) => (r = new Promise((c) => {
|
|
223
|
+
s = c;
|
|
211
224
|
}), {
|
|
212
|
-
spring:
|
|
213
|
-
css: (
|
|
214
|
-
opacity:
|
|
225
|
+
spring: a,
|
|
226
|
+
css: (c) => ({
|
|
227
|
+
opacity: c
|
|
215
228
|
}),
|
|
216
229
|
prepare: () => {
|
|
217
|
-
|
|
230
|
+
x(l, i), l.style.willChange = "opacity";
|
|
218
231
|
},
|
|
219
232
|
onEnd: () => {
|
|
220
|
-
|
|
233
|
+
s && s(), l.style.willChange = "auto";
|
|
221
234
|
}
|
|
222
235
|
})
|
|
223
236
|
};
|
|
224
|
-
},
|
|
225
|
-
stiffness:
|
|
226
|
-
//
|
|
227
|
-
damping: 3.5
|
|
228
|
-
//
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
end: 0.45
|
|
237
|
+
}, tt = {
|
|
238
|
+
scaleDown: { stiffness: 7, damping: 4 },
|
|
239
|
+
// Soft start for cinematic scale
|
|
240
|
+
translate: { stiffness: 5, damping: 3.5 },
|
|
241
|
+
// Medium for movement
|
|
242
|
+
scaleUp: { stiffness: 7, damping: 4 }
|
|
243
|
+
// Crisp return to full size
|
|
232
244
|
}, E = {
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
245
|
+
scaleDown: 0,
|
|
246
|
+
// Start immediately
|
|
247
|
+
translate: 0.2,
|
|
248
|
+
// Start when scaleDown is 25% complete
|
|
249
|
+
scaleUp: 0.9
|
|
250
|
+
// Start when translate is 70% complete
|
|
251
|
+
}, nt = 0.8, et = "white", Ot = (t) => {
|
|
252
|
+
var r;
|
|
253
|
+
const n = tt, a = nt, d = ((r = t == null ? void 0 : t.border) == null ? void 0 : r.color) ?? et;
|
|
241
254
|
return {
|
|
242
|
-
out: async (
|
|
243
|
-
const i =
|
|
255
|
+
out: async (s, l) => {
|
|
256
|
+
const i = T(l), c = b(document.body, l.positionedParent), o = st(d, {
|
|
244
257
|
...i,
|
|
245
|
-
top:
|
|
246
|
-
})
|
|
247
|
-
|
|
258
|
+
top: c.top
|
|
259
|
+
}), e = {
|
|
260
|
+
scale: 1,
|
|
261
|
+
translateY: -i.top
|
|
262
|
+
}, p = () => {
|
|
263
|
+
s.style.transform = `translateY(${e.translateY}px) scale(${e.scale})`;
|
|
264
|
+
const y = (i.width - i.width * e.scale) / 2, h = (i.height - i.height * e.scale) / 2;
|
|
265
|
+
it(o, y, h);
|
|
266
|
+
};
|
|
248
267
|
return {
|
|
249
|
-
|
|
268
|
+
springs: [
|
|
269
|
+
// Spring 1: Scale Down (1 → scale)
|
|
270
|
+
{
|
|
271
|
+
spring: n.scaleDown,
|
|
272
|
+
offset: E.scaleDown,
|
|
273
|
+
tick: (y) => {
|
|
274
|
+
const h = 1 - y;
|
|
275
|
+
e.scale = 1 - (1 - a) * h, p();
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
// Spring 2: Translate (vertical movement)
|
|
279
|
+
{
|
|
280
|
+
spring: n.translate,
|
|
281
|
+
offset: E.translate,
|
|
282
|
+
tick: (y) => {
|
|
283
|
+
const h = 1 - y;
|
|
284
|
+
e.translateY = -i.top - i.height * h, p();
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
// Spring 3: Scale Up (scale → 1)
|
|
288
|
+
{
|
|
289
|
+
spring: n.scaleUp,
|
|
290
|
+
offset: E.scaleUp,
|
|
291
|
+
tick: (y) => {
|
|
292
|
+
const h = 1 - y;
|
|
293
|
+
e.scale = a + (1 - a) * h, p();
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
],
|
|
297
|
+
schedule: "stagger",
|
|
250
298
|
prepare: () => {
|
|
251
|
-
|
|
252
|
-
for (const y of
|
|
253
|
-
|
|
299
|
+
x(s), k(s, i), S(s, i), at(s, i);
|
|
300
|
+
for (const y of o)
|
|
301
|
+
l.positionedParent.appendChild(y);
|
|
254
302
|
},
|
|
255
303
|
onEnd: () => {
|
|
256
|
-
|
|
257
|
-
for (const y of
|
|
258
|
-
|
|
304
|
+
s.style.clipPath = "", s.style.transformOrigin = "", setTimeout(() => {
|
|
305
|
+
for (const y of o)
|
|
306
|
+
l.positionedParent.removeChild(y);
|
|
259
307
|
}, 1e3);
|
|
260
|
-
},
|
|
261
|
-
tick: (y) => {
|
|
262
|
-
const u = 1 - y;
|
|
263
|
-
if (m.start <= u && u <= m.end) {
|
|
264
|
-
const f = C(
|
|
265
|
-
u,
|
|
266
|
-
m.start,
|
|
267
|
-
m.end
|
|
268
|
-
);
|
|
269
|
-
e = 1 - (1 - r) * f;
|
|
270
|
-
}
|
|
271
|
-
if (E.start <= u && u <= E.end) {
|
|
272
|
-
const f = C(
|
|
273
|
-
u,
|
|
274
|
-
E.start,
|
|
275
|
-
E.end
|
|
276
|
-
);
|
|
277
|
-
e = r + (1 - r) * f;
|
|
278
|
-
}
|
|
279
|
-
if (A.start <= u && u <= A.end) {
|
|
280
|
-
const f = C(
|
|
281
|
-
u,
|
|
282
|
-
A.start,
|
|
283
|
-
A.end
|
|
284
|
-
);
|
|
285
|
-
g = -i.top - i.height * f;
|
|
286
|
-
}
|
|
287
|
-
l.style.transform = `translateY(${g}px) scale(${e})`;
|
|
288
|
-
const p = (i.width - i.width * e) / 2, h = (i.height - i.height * e) / 2;
|
|
289
|
-
lt(a, p, h);
|
|
290
308
|
}
|
|
291
309
|
};
|
|
292
310
|
},
|
|
293
|
-
in: async (
|
|
294
|
-
const i =
|
|
295
|
-
|
|
311
|
+
in: async (s, l) => {
|
|
312
|
+
const i = T(l), c = {
|
|
313
|
+
scale: a,
|
|
314
|
+
translateY: -i.top + i.height
|
|
315
|
+
}, o = () => {
|
|
316
|
+
s.style.transform = `translateY(${c.translateY}px) scale(${c.scale})`;
|
|
317
|
+
};
|
|
296
318
|
return {
|
|
297
|
-
|
|
319
|
+
springs: [
|
|
320
|
+
// Spring 1: Scale Down (1 → scale) - element starts scaled, shrinks further
|
|
321
|
+
{
|
|
322
|
+
spring: n.scaleDown,
|
|
323
|
+
offset: E.scaleDown,
|
|
324
|
+
tick: (e) => {
|
|
325
|
+
c.scale = 1 - (1 - a) * e, o();
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
// Spring 2: Translate (vertical movement from bottom to top)
|
|
329
|
+
{
|
|
330
|
+
spring: n.translate,
|
|
331
|
+
offset: E.translate,
|
|
332
|
+
tick: (e) => {
|
|
333
|
+
c.translateY = -i.top + i.height * (1 - e), o();
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
// Spring 3: Scale Up (scale → 1) - element returns to full size
|
|
337
|
+
{
|
|
338
|
+
spring: n.scaleUp,
|
|
339
|
+
offset: E.scaleUp,
|
|
340
|
+
tick: (e) => {
|
|
341
|
+
c.scale = a + (1 - a) * e, o();
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
],
|
|
345
|
+
schedule: "stagger",
|
|
298
346
|
prepare: () => {
|
|
299
|
-
|
|
347
|
+
k(s, i), S(s, i), s.style.transform = `translateY(${-i.top + i.height}px) scale(${a})`;
|
|
300
348
|
},
|
|
301
349
|
onEnd: () => {
|
|
302
|
-
|
|
303
|
-
},
|
|
304
|
-
tick: (e) => {
|
|
305
|
-
if (m.start <= e && e <= m.end) {
|
|
306
|
-
const g = C(
|
|
307
|
-
e,
|
|
308
|
-
m.start,
|
|
309
|
-
m.end
|
|
310
|
-
);
|
|
311
|
-
o = 1 - (1 - r) * g;
|
|
312
|
-
}
|
|
313
|
-
if (E.start <= e && e <= E.end) {
|
|
314
|
-
const g = C(
|
|
315
|
-
e,
|
|
316
|
-
E.start,
|
|
317
|
-
E.end
|
|
318
|
-
);
|
|
319
|
-
o = r + (1 - r) * g;
|
|
320
|
-
}
|
|
321
|
-
if (A.start <= e && e <= A.end) {
|
|
322
|
-
const g = C(
|
|
323
|
-
e,
|
|
324
|
-
A.start,
|
|
325
|
-
A.end
|
|
326
|
-
);
|
|
327
|
-
a = -i.top + i.height * (1 - g);
|
|
328
|
-
}
|
|
329
|
-
l.style.transform = `translateY(${a}px) scale(${o})`;
|
|
350
|
+
s.style.clipPath = "", s.style.transformOrigin = "", s.style.transform = "";
|
|
330
351
|
}
|
|
331
352
|
};
|
|
332
353
|
}
|
|
333
354
|
};
|
|
334
355
|
};
|
|
335
|
-
function
|
|
336
|
-
const d = n * 0.7,
|
|
337
|
-
t.topLeft.style.transform = `translate(${d}px, ${
|
|
356
|
+
function it(t, n, a) {
|
|
357
|
+
const d = n * 0.7, r = a * 0.7;
|
|
358
|
+
t.topLeft.style.transform = `translate(${d}px, ${r}px)`, t.topRight.style.transform = `translate(${-d}px, ${r}px)`, t.bottomLeft.style.transform = `translate(${d}px, ${-r}px)`, t.bottomRight.style.transform = `translate(${-d}px, ${-r}px)`;
|
|
338
359
|
}
|
|
339
|
-
function
|
|
360
|
+
function st(t = "white", n) {
|
|
361
|
+
const r = document.createElement("div");
|
|
362
|
+
r.style.position = "fixed", r.style.pointerEvents = "none", r.style.zIndex = "9999", r.style.top = `${n.top - 1}px`, r.style.left = `${n.left - 1}px`, r.style.width = "15px", r.style.height = "15px";
|
|
340
363
|
const s = document.createElement("div");
|
|
341
|
-
s.style.position = "
|
|
364
|
+
s.style.position = "absolute", s.style.width = "15px", s.style.height = "1px", s.style.backgroundColor = t, s.style.top = "0", s.style.left = "0";
|
|
342
365
|
const l = document.createElement("div");
|
|
343
|
-
l.style.position = "absolute", l.style.width = "
|
|
344
|
-
const c = document.createElement("div");
|
|
345
|
-
c.style.position = "absolute", c.style.width = "1px", c.style.height = "15px", c.style.backgroundColor = t, c.style.top = "0", c.style.left = "0", s.appendChild(l), s.appendChild(c);
|
|
366
|
+
l.style.position = "absolute", l.style.width = "1px", l.style.height = "15px", l.style.backgroundColor = t, l.style.top = "0", l.style.left = "0", r.appendChild(s), r.appendChild(l);
|
|
346
367
|
const i = document.createElement("div");
|
|
347
368
|
i.style.position = "fixed", i.style.pointerEvents = "none", i.style.zIndex = "9999", i.style.top = `${n.top - 1}px`, i.style.left = `${n.left + n.width - 15 + 1}px`, i.style.width = "15px", i.style.height = "15px";
|
|
369
|
+
const c = document.createElement("div");
|
|
370
|
+
c.style.position = "absolute", c.style.width = "15px", c.style.height = "1px", c.style.backgroundColor = t, c.style.top = "0", c.style.right = "0";
|
|
348
371
|
const o = document.createElement("div");
|
|
349
|
-
o.style.position = "absolute", o.style.width = "
|
|
350
|
-
const a = document.createElement("div");
|
|
351
|
-
a.style.position = "absolute", a.style.width = "1px", a.style.height = "15px", a.style.backgroundColor = t, a.style.top = "0", a.style.right = "0", i.appendChild(o), i.appendChild(a);
|
|
372
|
+
o.style.position = "absolute", o.style.width = "1px", o.style.height = "15px", o.style.backgroundColor = t, o.style.top = "0", o.style.right = "0", i.appendChild(c), i.appendChild(o);
|
|
352
373
|
const e = document.createElement("div");
|
|
353
374
|
e.style.position = "fixed", e.style.pointerEvents = "none", e.style.zIndex = "9999", e.style.top = `${n.top + n.height - 15 + 1}px`, e.style.left = `${n.left - 1}px`, e.style.width = "15px", e.style.height = "15px";
|
|
354
|
-
const g = document.createElement("div");
|
|
355
|
-
g.style.position = "absolute", g.style.width = "15px", g.style.height = "1px", g.style.backgroundColor = t, g.style.bottom = "0", g.style.left = "0";
|
|
356
|
-
const y = document.createElement("div");
|
|
357
|
-
y.style.position = "absolute", y.style.width = "1px", y.style.height = "15px", y.style.backgroundColor = t, y.style.bottom = "0", y.style.left = "0", e.appendChild(g), e.appendChild(y);
|
|
358
|
-
const u = document.createElement("div");
|
|
359
|
-
u.style.position = "fixed", u.style.pointerEvents = "none", u.style.zIndex = "9999", u.style.top = `${n.top + n.height - 15 + 1}px`, u.style.left = `${n.left + n.width - 15 + 1}px`, u.style.width = "15px", u.style.height = "15px";
|
|
360
375
|
const p = document.createElement("div");
|
|
361
|
-
p.style.position = "absolute", p.style.width = "15px", p.style.height = "1px", p.style.backgroundColor = t, p.style.bottom = "0", p.style.
|
|
376
|
+
p.style.position = "absolute", p.style.width = "15px", p.style.height = "1px", p.style.backgroundColor = t, p.style.bottom = "0", p.style.left = "0";
|
|
377
|
+
const y = document.createElement("div");
|
|
378
|
+
y.style.position = "absolute", y.style.width = "1px", y.style.height = "15px", y.style.backgroundColor = t, y.style.bottom = "0", y.style.left = "0", e.appendChild(p), e.appendChild(y);
|
|
362
379
|
const h = document.createElement("div");
|
|
363
|
-
|
|
364
|
-
|
|
380
|
+
h.style.position = "fixed", h.style.pointerEvents = "none", h.style.zIndex = "9999", h.style.top = `${n.top + n.height - 15 + 1}px`, h.style.left = `${n.left + n.width - 15 + 1}px`, h.style.width = "15px", h.style.height = "15px";
|
|
381
|
+
const g = document.createElement("div");
|
|
382
|
+
g.style.position = "absolute", g.style.width = "15px", g.style.height = "1px", g.style.backgroundColor = t, g.style.bottom = "0", g.style.right = "0";
|
|
383
|
+
const u = document.createElement("div");
|
|
384
|
+
return u.style.position = "absolute", u.style.width = "1px", u.style.height = "15px", u.style.backgroundColor = t, u.style.bottom = "0", u.style.right = "0", h.appendChild(g), h.appendChild(u), {
|
|
385
|
+
topLeft: r,
|
|
365
386
|
topRight: i,
|
|
366
387
|
bottomLeft: e,
|
|
367
|
-
bottomRight:
|
|
388
|
+
bottomRight: h,
|
|
368
389
|
*[Symbol.iterator]() {
|
|
369
|
-
yield
|
|
390
|
+
yield r, yield i, yield e, yield h;
|
|
370
391
|
}
|
|
371
392
|
};
|
|
372
393
|
}
|
|
373
|
-
function
|
|
374
|
-
const n =
|
|
394
|
+
function T(t) {
|
|
395
|
+
const n = b(document.body, t.positionedParent);
|
|
375
396
|
return {
|
|
376
397
|
top: t.scroll.y,
|
|
377
398
|
left: 0,
|
|
@@ -379,11 +400,11 @@ function _(t) {
|
|
|
379
400
|
height: window.innerHeight - n.top
|
|
380
401
|
};
|
|
381
402
|
}
|
|
382
|
-
function
|
|
383
|
-
const
|
|
384
|
-
t.style.transformOrigin = `${
|
|
403
|
+
function k(t, n) {
|
|
404
|
+
const a = n.left + n.width / 2, d = n.top + n.height / 2;
|
|
405
|
+
t.style.transformOrigin = `${a}px ${d}px`;
|
|
385
406
|
}
|
|
386
|
-
function
|
|
407
|
+
function S(t, n) {
|
|
387
408
|
t.style.clipPath = `polygon(
|
|
388
409
|
${n.left}px ${n.top}px,
|
|
389
410
|
${n.left + n.width}px ${n.top}px,
|
|
@@ -391,493 +412,527 @@ function I(t, n) {
|
|
|
391
412
|
${n.left}px ${n.top + n.height}px
|
|
392
413
|
)`;
|
|
393
414
|
}
|
|
394
|
-
function
|
|
415
|
+
function at(t, n) {
|
|
395
416
|
t.style.transform = `translateY(${-n.top}px)`;
|
|
396
417
|
}
|
|
397
|
-
function
|
|
398
|
-
return t <= n ? 0 : t >= r ? 1 : (t - n) / (r - n);
|
|
399
|
-
}
|
|
400
|
-
function ct(t, n) {
|
|
418
|
+
function rt(t, n) {
|
|
401
419
|
return t.querySelector(`[data-hero-key="${n}"]`);
|
|
402
420
|
}
|
|
403
|
-
const
|
|
404
|
-
var
|
|
421
|
+
const Dt = (t = {}) => {
|
|
422
|
+
var l, i;
|
|
405
423
|
const n = {
|
|
406
|
-
stiffness: ((
|
|
424
|
+
stiffness: ((l = t.spring) == null ? void 0 : l.stiffness) ?? 300,
|
|
407
425
|
damping: ((i = t.spring) == null ? void 0 : i.damping) ?? 30
|
|
408
|
-
},
|
|
409
|
-
let
|
|
426
|
+
}, a = t.timeout ?? 300, d = t.maxDistance ?? 700;
|
|
427
|
+
let r = null, s = null;
|
|
410
428
|
return {
|
|
411
|
-
in: async (
|
|
412
|
-
const e =
|
|
413
|
-
if (
|
|
429
|
+
in: async (c, o) => {
|
|
430
|
+
const e = c, p = Array.from(e.querySelectorAll("[data-hero-key]"));
|
|
431
|
+
if (p.length === 0)
|
|
414
432
|
return {
|
|
415
433
|
spring: n,
|
|
416
434
|
tick: () => {
|
|
417
435
|
}
|
|
418
436
|
// No hero elements, skip animation
|
|
419
437
|
};
|
|
420
|
-
if (!await new Promise((
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
},
|
|
424
|
-
}) || !
|
|
425
|
-
return
|
|
438
|
+
if (!await new Promise((g) => {
|
|
439
|
+
r ? g(!0) : (s = g, setTimeout(() => {
|
|
440
|
+
s = null, g(!1);
|
|
441
|
+
}, a));
|
|
442
|
+
}) || !r)
|
|
443
|
+
return r = null, {
|
|
426
444
|
spring: n,
|
|
427
445
|
tick: () => {
|
|
428
446
|
}
|
|
429
447
|
// No fromNode, skip animation
|
|
430
448
|
};
|
|
431
|
-
const
|
|
432
|
-
const
|
|
433
|
-
if (!
|
|
434
|
-
const
|
|
435
|
-
if (!
|
|
436
|
-
const
|
|
449
|
+
const h = p.map((g) => {
|
|
450
|
+
const u = g.getAttribute("data-hero-key");
|
|
451
|
+
if (!u) return null;
|
|
452
|
+
const m = rt(r, u);
|
|
453
|
+
if (!m) return null;
|
|
454
|
+
const f = g, w = b(r, m), $ = b(e, f), v = w.left - $.left - o.scrollOffset.x, F = w.top - $.top - o.scrollOffset.y, Y = w.width / $.width, U = w.height / $.height, V = f.style.transform, W = f.style.position, z = f.style.transformOrigin, X = f.style.zIndex, M = f.style.willChange;
|
|
437
455
|
return {
|
|
438
|
-
toEl:
|
|
439
|
-
dx:
|
|
440
|
-
dy:
|
|
441
|
-
dw:
|
|
442
|
-
dh:
|
|
443
|
-
originalTransform:
|
|
444
|
-
originalPosition:
|
|
445
|
-
originalTransformOrigin:
|
|
446
|
-
originalZIndex:
|
|
447
|
-
originalWillChange:
|
|
456
|
+
toEl: f,
|
|
457
|
+
dx: v,
|
|
458
|
+
dy: F,
|
|
459
|
+
dw: Y,
|
|
460
|
+
dh: U,
|
|
461
|
+
originalTransform: V,
|
|
462
|
+
originalPosition: W,
|
|
463
|
+
originalTransformOrigin: z,
|
|
464
|
+
originalZIndex: X,
|
|
465
|
+
originalWillChange: M
|
|
448
466
|
};
|
|
449
467
|
}).filter(
|
|
450
|
-
(
|
|
468
|
+
(g) => g !== null && Math.abs(g.dy) <= d
|
|
451
469
|
);
|
|
452
|
-
return
|
|
470
|
+
return r = null, h.length === 0 ? {
|
|
453
471
|
spring: n,
|
|
454
472
|
tick: () => {
|
|
455
473
|
}
|
|
456
474
|
// No matching hero elements
|
|
457
475
|
} : {
|
|
458
|
-
|
|
476
|
+
springs: h.map(({ toEl: g, dx: u, dy: m, dw: f, dh: w }) => ({
|
|
477
|
+
spring: n,
|
|
478
|
+
tick: ($) => {
|
|
479
|
+
g.style.transform = `translate(${(1 - $) * u}px, ${(1 - $) * m}px) scale(${$ + (1 - $) * f}, ${$ + (1 - $) * w})`;
|
|
480
|
+
}
|
|
481
|
+
})),
|
|
482
|
+
schedule: "parallel",
|
|
459
483
|
prepare: () => {
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
});
|
|
463
|
-
},
|
|
464
|
-
tick: (p) => {
|
|
465
|
-
u.forEach(({ toEl: h, dx: f, dy: $, dw: w, dh: x }) => {
|
|
466
|
-
h.style.transform = `translate(${(1 - p) * f}px,${(1 - p) * $}px) scale(${p + (1 - p) * w}, ${p + (1 - p) * x})`;
|
|
484
|
+
h.forEach(({ toEl: g }) => {
|
|
485
|
+
g.style.position = "relative", g.style.transformOrigin = "top left", g.style.zIndex = "1000", g.style.willChange = "transform";
|
|
467
486
|
});
|
|
468
487
|
},
|
|
469
488
|
onEnd: () => {
|
|
470
|
-
|
|
489
|
+
h.forEach(
|
|
471
490
|
({
|
|
472
|
-
toEl:
|
|
473
|
-
originalTransform:
|
|
474
|
-
originalPosition:
|
|
475
|
-
originalTransformOrigin:
|
|
491
|
+
toEl: g,
|
|
492
|
+
originalTransform: u,
|
|
493
|
+
originalPosition: m,
|
|
494
|
+
originalTransformOrigin: f,
|
|
476
495
|
originalZIndex: w,
|
|
477
|
-
originalWillChange:
|
|
496
|
+
originalWillChange: $
|
|
478
497
|
}) => {
|
|
479
|
-
|
|
498
|
+
g.style.transform = u, g.style.position = m, g.style.transformOrigin = f, g.style.zIndex = w, g.style.willChange = $;
|
|
480
499
|
}
|
|
481
500
|
);
|
|
482
501
|
}
|
|
483
502
|
};
|
|
484
503
|
},
|
|
485
|
-
out: async (
|
|
504
|
+
out: async (c) => ({
|
|
505
|
+
spring: n,
|
|
486
506
|
onStart: () => {
|
|
487
|
-
|
|
507
|
+
r = c, s && (s(!0), s = null);
|
|
488
508
|
},
|
|
489
509
|
tick: () => {
|
|
490
510
|
},
|
|
491
|
-
prepare: (
|
|
492
|
-
|
|
511
|
+
prepare: (o) => {
|
|
512
|
+
x(o), o.style.opacity = "0";
|
|
493
513
|
}
|
|
494
514
|
})
|
|
495
515
|
};
|
|
496
516
|
};
|
|
497
|
-
function
|
|
517
|
+
function lt({
|
|
498
518
|
detailRect: t,
|
|
499
519
|
galleryRect: n,
|
|
500
|
-
pageRect:
|
|
520
|
+
pageRect: a,
|
|
501
521
|
scrollOffset: d
|
|
502
|
-
}
|
|
503
|
-
const
|
|
504
|
-
return
|
|
505
|
-
|
|
506
|
-
|
|
522
|
+
}) {
|
|
523
|
+
const r = n.left - t.left + (n.width - t.width) / 2 - d.x, s = n.top - t.top + (n.height - t.height) / 2 - d.y, l = n.width / t.width, i = n.height / t.height, c = Math.max(l, i), o = t.top / a.height * 100, e = (a.width - (t.left + t.width)) / a.width * 100, p = (a.height - (t.top + t.height)) / a.height * 100, y = t.left / a.width * 100;
|
|
524
|
+
return {
|
|
525
|
+
transformOrigin: `${t.left + t.width / 2}px ${t.top + t.height / 2}px`,
|
|
526
|
+
animate: (g) => {
|
|
527
|
+
const u = 1 - g;
|
|
528
|
+
return {
|
|
529
|
+
clipPath: `inset(${o * u}% ${e * u}% ${p * u}% ${y * u}%)`,
|
|
530
|
+
transform: `translate(${r * u}px, ${s * u}px) scale(${1 + (c - 1) * u})`
|
|
531
|
+
};
|
|
532
|
+
}
|
|
507
533
|
};
|
|
508
534
|
}
|
|
509
|
-
function
|
|
535
|
+
function ot({
|
|
510
536
|
detailRect: t,
|
|
511
537
|
galleryRect: n,
|
|
512
|
-
pageRect:
|
|
538
|
+
pageRect: a,
|
|
513
539
|
scrollOffset: d
|
|
514
|
-
}
|
|
515
|
-
const
|
|
516
|
-
return
|
|
517
|
-
|
|
518
|
-
|
|
540
|
+
}) {
|
|
541
|
+
const r = n.left - t.left + (n.width - t.width) / 2 + d.x, s = n.top - t.top + (n.height - t.height) / 2 + d.y, l = n.width / t.width, i = n.height / t.height, c = Math.min(l, i), o = t.top / a.height * 100, e = (a.width - (t.left + t.width)) / a.width * 100, p = (a.height - (t.top + t.height)) / a.height * 100, y = t.left / a.width * 100;
|
|
542
|
+
return {
|
|
543
|
+
transformOrigin: `${t.left + t.width / 2}px ${t.top + t.height / 2}px`,
|
|
544
|
+
animate: (g) => {
|
|
545
|
+
const u = 1 - g;
|
|
546
|
+
return {
|
|
547
|
+
clipPath: `inset(${o * u}% ${e * u}% ${p * u}% ${y * u}%)`,
|
|
548
|
+
transform: `translate(${r * u - d.x}px, ${s * u - d.y}px) scale(${1 + (c - 1) * u})`
|
|
549
|
+
};
|
|
550
|
+
}
|
|
519
551
|
};
|
|
520
552
|
}
|
|
521
|
-
function
|
|
553
|
+
function ct(t, n, a) {
|
|
522
554
|
const d = t.querySelector(
|
|
523
555
|
"[data-instagram-detail-key]"
|
|
524
|
-
),
|
|
556
|
+
), r = n.querySelector(
|
|
525
557
|
"[data-instagram-detail-key]"
|
|
526
558
|
);
|
|
527
559
|
if (t.querySelectorAll("[data-instagram-detail-key]").length > 1 || n.querySelectorAll("[data-instagram-detail-key]").length > 1)
|
|
528
560
|
return null;
|
|
529
|
-
let
|
|
530
|
-
if (!d &&
|
|
531
|
-
|
|
532
|
-
const e =
|
|
561
|
+
let s = null, l = null, i = !1;
|
|
562
|
+
if (!d && r) {
|
|
563
|
+
l = r;
|
|
564
|
+
const e = l.getAttribute("data-instagram-detail-key");
|
|
533
565
|
if (!e) return null;
|
|
534
|
-
|
|
566
|
+
s = t.querySelector(
|
|
535
567
|
`[data-instagram-gallery-key="${e}"]`
|
|
536
|
-
),
|
|
537
|
-
} else if (d && !
|
|
538
|
-
|
|
539
|
-
const e =
|
|
568
|
+
), s && (i = !0);
|
|
569
|
+
} else if (d && !r) {
|
|
570
|
+
l = d;
|
|
571
|
+
const e = l.getAttribute("data-instagram-detail-key");
|
|
540
572
|
if (!e) return null;
|
|
541
|
-
|
|
573
|
+
s = n.querySelector(
|
|
542
574
|
`[data-instagram-gallery-key="${e}"]`
|
|
543
|
-
),
|
|
575
|
+
), s && (i = !1);
|
|
544
576
|
}
|
|
545
|
-
if (!
|
|
577
|
+
if (!s || !l)
|
|
546
578
|
return null;
|
|
547
|
-
const
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
}
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
}
|
|
579
|
+
const c = b(i ? t : n, s), o = b(i ? n : t, l);
|
|
580
|
+
if (i) {
|
|
581
|
+
const e = lt({
|
|
582
|
+
detailRect: o,
|
|
583
|
+
galleryRect: c,
|
|
584
|
+
pageRect: n.getBoundingClientRect(),
|
|
585
|
+
scrollOffset: a
|
|
586
|
+
});
|
|
587
|
+
return n.style.transformOrigin = e.transformOrigin, {
|
|
588
|
+
isEnterMode: !0,
|
|
589
|
+
inAnimation: e.animate
|
|
590
|
+
// No outAnimation - gallery stays visible
|
|
591
|
+
};
|
|
592
|
+
} else {
|
|
593
|
+
const e = ot({
|
|
594
|
+
detailRect: o,
|
|
595
|
+
galleryRect: c,
|
|
596
|
+
pageRect: t.getBoundingClientRect(),
|
|
597
|
+
scrollOffset: a
|
|
598
|
+
});
|
|
599
|
+
return t.style.transformOrigin = e.transformOrigin, {
|
|
600
|
+
isEnterMode: !1,
|
|
601
|
+
outAnimation: e.animate
|
|
602
|
+
// No inAnimation - gallery stays visible
|
|
603
|
+
};
|
|
604
|
+
}
|
|
573
605
|
}
|
|
574
|
-
const
|
|
575
|
-
var
|
|
606
|
+
const Pt = (t = {}) => {
|
|
607
|
+
var i, c;
|
|
576
608
|
const n = {
|
|
577
|
-
stiffness: ((
|
|
578
|
-
damping: ((
|
|
579
|
-
},
|
|
580
|
-
let d = null, s = null, l = null;
|
|
609
|
+
stiffness: ((i = t.spring) == null ? void 0 : i.stiffness) ?? 150,
|
|
610
|
+
damping: ((c = t.spring) == null ? void 0 : c.damping) ?? 20
|
|
611
|
+
}, a = t.timeout ?? 300;
|
|
612
|
+
let d = null, r = null, s = null, l = null;
|
|
581
613
|
return {
|
|
582
|
-
in: async (o, { scrollOffset:
|
|
583
|
-
const
|
|
584
|
-
return !await new Promise((
|
|
585
|
-
d ?
|
|
586
|
-
|
|
587
|
-
},
|
|
588
|
-
}) || !d ? (d = null, {
|
|
614
|
+
in: async (o, { scrollOffset: e }) => {
|
|
615
|
+
const p = o;
|
|
616
|
+
return !await new Promise((h) => {
|
|
617
|
+
d ? h(!0) : (r = h, setTimeout(() => {
|
|
618
|
+
r = null, h(!1);
|
|
619
|
+
}, a));
|
|
620
|
+
}) || !d ? (l == null || l(), l = null, d = null, {
|
|
589
621
|
spring: n,
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
}) : (l = yt(d, e, a), l ? (d = null, {
|
|
622
|
+
css: () => ({})
|
|
623
|
+
}) : (s = ct(d, p, e), l == null || l(), l = null, s ? (d = null, {
|
|
593
624
|
spring: n,
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
}
|
|
597
|
-
}) : {
|
|
625
|
+
css: (h) => s != null && s.inAnimation ? s.inAnimation(h) : {}
|
|
626
|
+
}) : (d = null, {
|
|
598
627
|
spring: n,
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
});
|
|
628
|
+
css: () => ({})
|
|
629
|
+
}));
|
|
602
630
|
},
|
|
603
|
-
out: async (o) =>
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
631
|
+
out: async (o, e) => {
|
|
632
|
+
const p = new Promise((y) => {
|
|
633
|
+
l = y;
|
|
634
|
+
});
|
|
635
|
+
return {
|
|
636
|
+
spring: n,
|
|
637
|
+
prepare: (y) => {
|
|
638
|
+
s != null && s.isEnterMode ? x(y) : (x(y, e), y.style.zIndex = "-1");
|
|
639
|
+
},
|
|
640
|
+
wait: async () => {
|
|
641
|
+
d = o, r && (r(!0), r = null), await p;
|
|
642
|
+
},
|
|
643
|
+
css: (y) => s != null && s.outAnimation ? s.outAnimation(y) : {}
|
|
644
|
+
};
|
|
645
|
+
}
|
|
615
646
|
};
|
|
616
647
|
};
|
|
617
|
-
function
|
|
648
|
+
function dt({
|
|
618
649
|
detailRect: t,
|
|
619
650
|
galleryRect: n,
|
|
620
|
-
pageRect:
|
|
651
|
+
pageRect: a,
|
|
621
652
|
scrollOffset: d
|
|
622
|
-
}
|
|
623
|
-
const
|
|
624
|
-
return
|
|
625
|
-
|
|
626
|
-
|
|
653
|
+
}) {
|
|
654
|
+
const r = n.left - t.left + (n.width - t.width) / 2 - d.x, s = n.top - t.top + (n.height - t.height) / 2 - d.y, l = n.width / t.width, i = n.height / t.height, c = Math.max(l, i), o = t.top / a.height * 100, e = (a.width - (t.left + t.width)) / a.width * 100, p = (a.height - (t.top + t.height)) / a.height * 100, y = t.left / a.width * 100;
|
|
655
|
+
return {
|
|
656
|
+
transformOrigin: `${t.left + t.width / 2}px ${t.top + t.height / 2}px`,
|
|
657
|
+
animate: (g) => {
|
|
658
|
+
const u = 1 - g;
|
|
659
|
+
return {
|
|
660
|
+
clipPath: `inset(${o * u}% ${e * u}% ${p * u}% ${y * u}%)`,
|
|
661
|
+
transform: `translate(${r * u}px, ${s * u}px) scale(${1 + (c - 1) * u})`
|
|
662
|
+
};
|
|
663
|
+
}
|
|
627
664
|
};
|
|
628
665
|
}
|
|
629
|
-
function
|
|
666
|
+
function ht({
|
|
630
667
|
galleryRect: t,
|
|
631
668
|
detailRect: n,
|
|
632
|
-
scrollOffset:
|
|
633
|
-
}
|
|
634
|
-
const
|
|
635
|
-
return
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
669
|
+
scrollOffset: a
|
|
670
|
+
}) {
|
|
671
|
+
const d = n.left - t.left + (n.width - t.width) / 2 + a.x, r = n.top - t.top + (n.height - t.height) / 2 + a.y, s = n.width / t.width, l = n.height / t.height, i = Math.max(s, l);
|
|
672
|
+
return {
|
|
673
|
+
transformOrigin: `${t.left + t.width / 2}px ${t.top + t.height / 2}px`,
|
|
674
|
+
animate: (o) => {
|
|
675
|
+
const e = 1 - o;
|
|
676
|
+
return {
|
|
677
|
+
transform: `translate(${d * e - a.x}px, ${r * e - a.y}px) scale(${1 + (i - 1) * e})`,
|
|
678
|
+
opacity: `${1 - e}`
|
|
679
|
+
};
|
|
680
|
+
}
|
|
639
681
|
};
|
|
640
682
|
}
|
|
641
|
-
function
|
|
683
|
+
function pt({
|
|
642
684
|
galleryRect: t,
|
|
643
685
|
detailRect: n,
|
|
644
|
-
scrollOffset:
|
|
645
|
-
}
|
|
646
|
-
const
|
|
647
|
-
return
|
|
648
|
-
|
|
649
|
-
|
|
686
|
+
scrollOffset: a
|
|
687
|
+
}) {
|
|
688
|
+
const d = n.left - t.left + (n.width - t.width) / 2 - a.x, r = n.top - t.top + (n.height - t.height) / 2 - a.y, s = n.width / t.width, l = n.height / t.height, i = Math.max(s, l);
|
|
689
|
+
return {
|
|
690
|
+
transformOrigin: `${t.left + t.width / 2}px ${t.top + t.height / 2}px`,
|
|
691
|
+
animate: (o) => {
|
|
692
|
+
const e = 1 - o, p = o;
|
|
693
|
+
return {
|
|
694
|
+
transform: `translate(${d * e}px, ${r * e}px) scale(${1 + (i - 1) * e})`,
|
|
695
|
+
opacity: `${p}`
|
|
696
|
+
};
|
|
697
|
+
}
|
|
650
698
|
};
|
|
651
699
|
}
|
|
652
|
-
function
|
|
700
|
+
function yt({
|
|
653
701
|
detailRect: t,
|
|
654
702
|
galleryRect: n,
|
|
655
|
-
pageRect:
|
|
703
|
+
pageRect: a,
|
|
656
704
|
scrollOffset: d
|
|
657
|
-
}
|
|
658
|
-
const
|
|
659
|
-
return
|
|
660
|
-
|
|
661
|
-
|
|
705
|
+
}) {
|
|
706
|
+
const r = n.left - t.left + (n.width - t.width) / 2 + d.x, s = n.top - t.top + (n.height - t.height) / 2 + d.y, l = n.width / t.width, i = n.height / t.height, c = Math.min(l, i), o = t.top / a.height * 100, e = (a.width - (t.left + t.width)) / a.width * 100, p = (a.height - (t.top + t.height)) / a.height * 100, y = t.left / a.width * 100;
|
|
707
|
+
return {
|
|
708
|
+
transformOrigin: `${t.left + t.width / 2}px ${t.top + t.height / 2}px`,
|
|
709
|
+
animate: (g) => {
|
|
710
|
+
const u = 1 - g;
|
|
711
|
+
return {
|
|
712
|
+
clipPath: `inset(${o * u}% ${e * u}% ${p * u}% ${y * u}%)`,
|
|
713
|
+
transform: `translate(${r * u - d.x}px, ${s * u - d.y}px) scale(${1 + (c - 1) * u})`
|
|
714
|
+
};
|
|
715
|
+
}
|
|
662
716
|
};
|
|
663
717
|
}
|
|
664
|
-
function
|
|
718
|
+
function gt(t, n, a) {
|
|
665
719
|
const d = t.querySelector(
|
|
666
720
|
"[data-pinterest-detail-key]"
|
|
667
|
-
),
|
|
721
|
+
), r = n.querySelector(
|
|
668
722
|
"[data-pinterest-detail-key]"
|
|
669
723
|
);
|
|
670
724
|
if (t.querySelectorAll("[data-pinterest-detail-key]").length > 1 || n.querySelectorAll("[data-pinterest-detail-key]").length > 1)
|
|
671
725
|
return null;
|
|
672
|
-
let
|
|
673
|
-
if (!d &&
|
|
674
|
-
|
|
675
|
-
const e =
|
|
726
|
+
let s = null, l = null, i = !1;
|
|
727
|
+
if (!d && r) {
|
|
728
|
+
l = r;
|
|
729
|
+
const e = l.getAttribute("data-pinterest-detail-key");
|
|
676
730
|
if (!e) return null;
|
|
677
|
-
|
|
731
|
+
s = t.querySelector(
|
|
678
732
|
`[data-pinterest-gallery-key="${e}"]`
|
|
679
|
-
),
|
|
680
|
-
} else if (d && !
|
|
681
|
-
|
|
682
|
-
const e =
|
|
733
|
+
), s && (i = !0);
|
|
734
|
+
} else if (d && !r) {
|
|
735
|
+
l = d;
|
|
736
|
+
const e = l.getAttribute("data-pinterest-detail-key");
|
|
683
737
|
if (!e) return null;
|
|
684
|
-
|
|
738
|
+
s = n.querySelector(
|
|
685
739
|
`[data-pinterest-gallery-key="${e}"]`
|
|
686
|
-
),
|
|
740
|
+
), s && (i = !1);
|
|
687
741
|
}
|
|
688
|
-
if (!
|
|
742
|
+
if (!s || !l)
|
|
689
743
|
return null;
|
|
690
|
-
const
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
744
|
+
const c = b(i ? t : n, s), o = b(i ? n : t, l);
|
|
745
|
+
if (i) {
|
|
746
|
+
const e = dt({
|
|
747
|
+
detailRect: o,
|
|
748
|
+
galleryRect: c,
|
|
749
|
+
pageRect: n.getBoundingClientRect(),
|
|
750
|
+
scrollOffset: a
|
|
751
|
+
}), p = ht({
|
|
752
|
+
galleryRect: c,
|
|
753
|
+
detailRect: o,
|
|
754
|
+
scrollOffset: a
|
|
755
|
+
});
|
|
756
|
+
return n.style.transformOrigin = e.transformOrigin, t.style.transformOrigin = p.transformOrigin, {
|
|
757
|
+
inAnimation: e.animate,
|
|
758
|
+
outAnimation: p.animate
|
|
759
|
+
};
|
|
760
|
+
} else {
|
|
761
|
+
const e = pt({
|
|
762
|
+
galleryRect: c,
|
|
763
|
+
detailRect: o,
|
|
764
|
+
scrollOffset: a
|
|
765
|
+
}), p = yt({
|
|
766
|
+
detailRect: o,
|
|
767
|
+
galleryRect: c,
|
|
768
|
+
pageRect: t.getBoundingClientRect(),
|
|
769
|
+
scrollOffset: a
|
|
770
|
+
});
|
|
771
|
+
return n.style.transformOrigin = e.transformOrigin, t.style.transformOrigin = p.transformOrigin, {
|
|
772
|
+
inAnimation: e.animate,
|
|
773
|
+
outAnimation: p.animate
|
|
774
|
+
};
|
|
775
|
+
}
|
|
720
776
|
}
|
|
721
|
-
const
|
|
722
|
-
var
|
|
777
|
+
const vt = (t = {}) => {
|
|
778
|
+
var i, c;
|
|
723
779
|
const n = {
|
|
724
|
-
stiffness: ((
|
|
725
|
-
damping: ((
|
|
726
|
-
},
|
|
727
|
-
let d = null, s = null, l = null;
|
|
780
|
+
stiffness: ((i = t.spring) == null ? void 0 : i.stiffness) ?? 30,
|
|
781
|
+
damping: ((c = t.spring) == null ? void 0 : c.damping) ?? 10
|
|
782
|
+
}, a = t.timeout ?? 300;
|
|
783
|
+
let d = null, r = null, s = null, l = null;
|
|
728
784
|
return {
|
|
729
|
-
in: async (o, { scrollOffset:
|
|
730
|
-
const
|
|
731
|
-
return !await new Promise((
|
|
732
|
-
d ?
|
|
733
|
-
|
|
734
|
-
},
|
|
735
|
-
}) || !d ? (d = null, {
|
|
785
|
+
in: async (o, { scrollOffset: e }) => {
|
|
786
|
+
const p = o;
|
|
787
|
+
return !await new Promise((h) => {
|
|
788
|
+
d ? h(!0) : (r = h, setTimeout(() => {
|
|
789
|
+
r = null, h(!1);
|
|
790
|
+
}, a));
|
|
791
|
+
}) || !d ? (l == null || l(), l = null, d = null, {
|
|
736
792
|
spring: n,
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
}) : (l = $t(d, e, a), l ? (d = null, {
|
|
793
|
+
css: () => ({})
|
|
794
|
+
}) : (s = gt(d, p, e), l == null || l(), l = null, s ? (d = null, {
|
|
740
795
|
spring: n,
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
}
|
|
744
|
-
}) : {
|
|
796
|
+
css: (h) => s ? s.inAnimation(h) : {}
|
|
797
|
+
}) : (d = null, {
|
|
745
798
|
spring: n,
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
});
|
|
799
|
+
css: () => ({})
|
|
800
|
+
}));
|
|
749
801
|
},
|
|
750
|
-
out: async (o) =>
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
802
|
+
out: async (o) => {
|
|
803
|
+
const e = new Promise((p) => {
|
|
804
|
+
l = p;
|
|
805
|
+
});
|
|
806
|
+
return {
|
|
807
|
+
spring: n,
|
|
808
|
+
prepare: (p) => {
|
|
809
|
+
x(p), p.style.zIndex = "-1";
|
|
810
|
+
},
|
|
811
|
+
wait: async () => {
|
|
812
|
+
d = o, r && (r(!0), r = null), await e;
|
|
813
|
+
},
|
|
814
|
+
css: (p) => s ? s.outAnimation(p) : {}
|
|
815
|
+
};
|
|
816
|
+
}
|
|
762
817
|
};
|
|
763
|
-
},
|
|
818
|
+
}, _ = {
|
|
764
819
|
stiffness: 5,
|
|
765
820
|
damping: 4
|
|
766
|
-
},
|
|
767
|
-
var
|
|
768
|
-
const n = t.direction ?? "up",
|
|
769
|
-
stiffness: ((
|
|
770
|
-
damping: ((
|
|
821
|
+
}, Ft = (t = {}) => {
|
|
822
|
+
var c, o;
|
|
823
|
+
const n = t.direction ?? "up", a = {
|
|
824
|
+
stiffness: ((c = t.spring) == null ? void 0 : c.stiffness) ?? _.stiffness,
|
|
825
|
+
damping: ((o = t.spring) == null ? void 0 : o.damping) ?? _.damping
|
|
771
826
|
}, d = n === "up";
|
|
772
|
-
let
|
|
827
|
+
let r = null, s = null, l = null;
|
|
773
828
|
const i = () => {
|
|
774
|
-
if (
|
|
829
|
+
if (r === null || s === null)
|
|
775
830
|
return null;
|
|
776
|
-
const e = Math.min(
|
|
777
|
-
return Math.max(e,
|
|
831
|
+
const e = Math.min(r, s), p = window.innerHeight;
|
|
832
|
+
return Math.max(e, p);
|
|
778
833
|
};
|
|
779
834
|
return {
|
|
780
|
-
in: (e) => (
|
|
781
|
-
spring:
|
|
835
|
+
in: (e) => (s = e.offsetHeight, r !== null && (l = i()), {
|
|
836
|
+
spring: a,
|
|
782
837
|
prepare: () => {
|
|
783
838
|
e.style.willChange = "transform", e.style.backfaceVisibility = "hidden", e.style.contain = "layout paint";
|
|
784
839
|
},
|
|
785
|
-
tick: (
|
|
786
|
-
|
|
787
|
-
const y =
|
|
788
|
-
e.style.transform = `translate3d(0, ${
|
|
840
|
+
tick: (p) => {
|
|
841
|
+
l === null && (l = i());
|
|
842
|
+
const y = l ?? window.innerHeight, h = d ? (1 - p) * y : (1 - p) * -y;
|
|
843
|
+
e.style.transform = `translate3d(0, ${h}px, 0)`;
|
|
789
844
|
},
|
|
790
845
|
onEnd: () => {
|
|
791
846
|
e.style.willChange = "auto", e.style.backfaceVisibility = "", e.style.contain = "";
|
|
792
847
|
}
|
|
793
848
|
}),
|
|
794
|
-
out: (e,
|
|
795
|
-
spring:
|
|
849
|
+
out: (e, p) => ({
|
|
850
|
+
spring: a,
|
|
796
851
|
onStart: () => {
|
|
797
|
-
|
|
852
|
+
r = e.offsetHeight, s !== null && (l = i());
|
|
798
853
|
},
|
|
799
854
|
tick: (y) => {
|
|
800
|
-
|
|
801
|
-
const
|
|
802
|
-
e.style.transform = `translate3d(0, ${
|
|
855
|
+
l === null && (l = i());
|
|
856
|
+
const h = l ?? window.innerHeight, g = d ? (1 - y) * -h : (1 - y) * h;
|
|
857
|
+
e.style.transform = `translate3d(0, ${g}px, 0)`;
|
|
803
858
|
},
|
|
804
859
|
prepare: (y) => {
|
|
805
|
-
|
|
860
|
+
x(y, p), y.style.zIndex = d ? "-1" : "1", y.style.willChange = "transform", y.style.backfaceVisibility = "hidden", y.style.contain = "layout paint", y.style.pointerEvents = "none";
|
|
806
861
|
}
|
|
807
862
|
})
|
|
808
863
|
};
|
|
809
|
-
},
|
|
864
|
+
}, I = {
|
|
810
865
|
stiffness: 15,
|
|
811
866
|
damping: 7
|
|
812
|
-
},
|
|
813
|
-
var
|
|
814
|
-
const n = t.direction ?? "left",
|
|
815
|
-
stiffness: ((
|
|
816
|
-
damping: ((
|
|
867
|
+
}, Yt = (t = {}) => {
|
|
868
|
+
var r, s;
|
|
869
|
+
const n = t.direction ?? "left", a = {
|
|
870
|
+
stiffness: ((r = t.spring) == null ? void 0 : r.stiffness) ?? I.stiffness,
|
|
871
|
+
damping: ((s = t.spring) == null ? void 0 : s.damping) ?? I.damping
|
|
817
872
|
}, d = n === "left";
|
|
818
873
|
return {
|
|
819
|
-
in: (
|
|
820
|
-
spring:
|
|
874
|
+
in: (l) => ({
|
|
875
|
+
spring: a,
|
|
821
876
|
prepare: () => {
|
|
822
|
-
|
|
877
|
+
l.style.willChange = "transform", l.style.backfaceVisibility = "hidden", l.style.contain = "layout paint";
|
|
823
878
|
},
|
|
824
879
|
css: (i) => ({
|
|
825
880
|
transform: `translate3d(${d ? (1 - i) * 100 : (1 - i) * -100}%, 0, 0)`
|
|
826
881
|
}),
|
|
827
882
|
onEnd: () => {
|
|
828
|
-
|
|
883
|
+
l.style.willChange = "auto", l.style.backfaceVisibility = "", l.style.contain = "";
|
|
829
884
|
}
|
|
830
885
|
}),
|
|
831
|
-
out: (
|
|
832
|
-
spring:
|
|
833
|
-
css: (
|
|
834
|
-
transform: `translate3d(${d ? (1 -
|
|
886
|
+
out: (l, i) => ({
|
|
887
|
+
spring: a,
|
|
888
|
+
css: (c) => ({
|
|
889
|
+
transform: `translate3d(${d ? (1 - c) * -100 : (1 - c) * 100}%, 0, 0)`
|
|
835
890
|
}),
|
|
836
|
-
prepare: (
|
|
837
|
-
|
|
891
|
+
prepare: (c) => {
|
|
892
|
+
x(c, i), c.style.willChange = "transform", c.style.backfaceVisibility = "hidden", c.style.contain = "layout paint", c.style.pointerEvents = "none";
|
|
838
893
|
}
|
|
839
894
|
})
|
|
840
895
|
};
|
|
841
|
-
},
|
|
896
|
+
}, O = { stiffness: 17, damping: 6 }, L = 20, C = 800, Ut = () => {
|
|
842
897
|
let t, n = null;
|
|
843
898
|
return {
|
|
844
|
-
in: (
|
|
845
|
-
spring:
|
|
899
|
+
in: (a) => ({
|
|
900
|
+
spring: O,
|
|
846
901
|
prepare: () => {
|
|
847
|
-
|
|
902
|
+
a.style.willChange = "transform", a.style.backfaceVisibility = "hidden", a.style.contain = "layout paint", a.style.transform = `perspective(${C}px) rotateY(${L}deg) translate3d(-100%, 0, 0)`;
|
|
848
903
|
},
|
|
849
904
|
wait: async () => {
|
|
850
905
|
t && await t;
|
|
851
906
|
},
|
|
852
907
|
css: (d) => {
|
|
853
|
-
const
|
|
908
|
+
const r = (1 - d) * L, s = -(1 - d) * 100;
|
|
854
909
|
return {
|
|
855
|
-
transform: `perspective(${
|
|
910
|
+
transform: `perspective(${C}px) rotateY(${r}deg) translate3d(${s}%, 0, 0)`
|
|
856
911
|
};
|
|
857
912
|
},
|
|
858
913
|
onEnd: () => {
|
|
859
|
-
|
|
914
|
+
a.style.transform = "", a.style.willChange = "auto", a.style.backfaceVisibility = "", a.style.contain = "";
|
|
860
915
|
}
|
|
861
916
|
}),
|
|
862
|
-
out: (
|
|
863
|
-
n =
|
|
917
|
+
out: (a, d) => (t = new Promise((r) => {
|
|
918
|
+
n = r;
|
|
864
919
|
}), {
|
|
865
|
-
spring:
|
|
866
|
-
prepare: (
|
|
867
|
-
|
|
920
|
+
spring: O,
|
|
921
|
+
prepare: (r) => {
|
|
922
|
+
x(r, d), r.style.willChange = "transform", r.style.backfaceVisibility = "hidden", r.style.contain = "layout paint", r.style.pointerEvents = "none", r.style.transform = `perspective(${C}px) rotateY(0deg) translate3d(0%, 0, 0)`;
|
|
868
923
|
},
|
|
869
|
-
css: (
|
|
870
|
-
const
|
|
924
|
+
css: (r) => {
|
|
925
|
+
const s = 1 - r, l = s * L, i = s * 100;
|
|
871
926
|
return {
|
|
872
|
-
transform: `perspective(${
|
|
927
|
+
transform: `perspective(${C}px) rotateY(${-l}deg) translate3d(${i}%, 0, 0)`
|
|
873
928
|
};
|
|
874
929
|
},
|
|
875
930
|
onEnd: () => {
|
|
876
|
-
n && n(),
|
|
931
|
+
n && n(), a.style.transform = "";
|
|
877
932
|
}
|
|
878
933
|
})
|
|
879
934
|
};
|
|
880
|
-
},
|
|
935
|
+
}, ut = { stiffness: 1, damping: 1 }, ft = { stiffness: 20, damping: 25 }, $t = "#000000", mt = "circle", D = "CURTAIN_REVEAL_OVERLAY_ID", wt = {
|
|
881
936
|
position: "fixed",
|
|
882
937
|
inset: "0",
|
|
883
938
|
width: "100vw",
|
|
@@ -887,17 +942,17 @@ const Ut = (t = {}) => {
|
|
|
887
942
|
alignItems: "center",
|
|
888
943
|
justifyContent: "center",
|
|
889
944
|
overflow: "hidden"
|
|
890
|
-
},
|
|
945
|
+
}, xt = {
|
|
891
946
|
position: "relative",
|
|
892
947
|
display: "inline-block",
|
|
893
948
|
height: "5.5rem",
|
|
894
949
|
overflow: "hidden"
|
|
895
|
-
},
|
|
950
|
+
}, bt = {
|
|
896
951
|
display: "flex",
|
|
897
952
|
height: "100%",
|
|
898
953
|
willChange: "transform",
|
|
899
954
|
transition: "transform 0.3s ease"
|
|
900
|
-
},
|
|
955
|
+
}, Et = {
|
|
901
956
|
display: "inline-flex",
|
|
902
957
|
alignItems: "center",
|
|
903
958
|
justifyContent: "center",
|
|
@@ -906,104 +961,104 @@ const Ut = (t = {}) => {
|
|
|
906
961
|
fontWeight: "900",
|
|
907
962
|
letterSpacing: "0.02em",
|
|
908
963
|
color: "#FFFFFF"
|
|
909
|
-
},
|
|
910
|
-
function
|
|
964
|
+
}, Ct = 0.4, A = 0.5, At = 0.2;
|
|
965
|
+
function Lt(t, n) {
|
|
911
966
|
switch (t) {
|
|
912
967
|
case "circle":
|
|
913
968
|
return `circle(${n * 100}% at 50% 50%)`;
|
|
914
969
|
case "square":
|
|
915
970
|
return `inset(${(1 - n) * 50}% round ${10 * n}%)`;
|
|
916
971
|
case "triangle": {
|
|
917
|
-
const
|
|
918
|
-
return `polygon(50% ${50 -
|
|
972
|
+
const a = n * 100;
|
|
973
|
+
return `polygon(50% ${50 - a}%, ${50 - a}% ${50 + a}%, ${50 + a}% ${50 + a}%)`;
|
|
919
974
|
}
|
|
920
975
|
}
|
|
921
976
|
}
|
|
922
|
-
const
|
|
977
|
+
const Tt = (t) => t.reduce((n, a) => n + a, 0), Vt = (t = {}) => {
|
|
923
978
|
const {
|
|
924
|
-
background: n =
|
|
925
|
-
texts:
|
|
979
|
+
background: n = $t,
|
|
980
|
+
texts: a = [],
|
|
926
981
|
shape: d = mt,
|
|
927
|
-
inSpring:
|
|
928
|
-
outSpring:
|
|
929
|
-
textStyle:
|
|
982
|
+
inSpring: r = ft,
|
|
983
|
+
outSpring: s = ut,
|
|
984
|
+
textStyle: l = {}
|
|
930
985
|
} = t;
|
|
931
986
|
return {
|
|
932
|
-
out: (i,
|
|
933
|
-
const
|
|
987
|
+
out: (i, c) => {
|
|
988
|
+
const o = i.style.opacity;
|
|
934
989
|
return {
|
|
935
|
-
spring:
|
|
990
|
+
spring: s,
|
|
936
991
|
from: 1,
|
|
937
992
|
to: 0,
|
|
938
993
|
prepare: (e) => {
|
|
939
|
-
|
|
994
|
+
x(e, c), e.style.opacity = "1";
|
|
940
995
|
},
|
|
941
996
|
tick: (e) => {
|
|
942
|
-
const
|
|
943
|
-
i.style.opacity = String(
|
|
997
|
+
const p = Math.max(0, e - Ct);
|
|
998
|
+
i.style.opacity = String(p);
|
|
944
999
|
},
|
|
945
1000
|
onEnd: () => {
|
|
946
|
-
i.style.opacity =
|
|
1001
|
+
i.style.opacity = o;
|
|
947
1002
|
}
|
|
948
1003
|
};
|
|
949
1004
|
},
|
|
950
1005
|
in: (i) => {
|
|
951
|
-
let
|
|
952
|
-
const
|
|
953
|
-
|
|
1006
|
+
let c = null, o = null, e = null;
|
|
1007
|
+
const p = document.body.style.overflow, y = document.getElementById(
|
|
1008
|
+
D
|
|
954
1009
|
);
|
|
955
|
-
let
|
|
956
|
-
const
|
|
957
|
-
|
|
958
|
-
const
|
|
959
|
-
|
|
960
|
-
}),
|
|
961
|
-
(
|
|
1010
|
+
let h = [];
|
|
1011
|
+
const g = () => {
|
|
1012
|
+
c = document.createElement("div"), c.id = D, Object.assign(c.style, wt, { background: n }), document.body.appendChild(c), o = document.createElement("div"), Object.assign(o.style, xt), c.appendChild(o), e = document.createElement("div"), Object.assign(e.style, bt), o.appendChild(e), a.forEach((u) => {
|
|
1013
|
+
const m = document.createElement("div");
|
|
1014
|
+
m.textContent = u, Object.assign(m.style, Et, l), e.appendChild(m);
|
|
1015
|
+
}), h = Array.from(e.children).map(
|
|
1016
|
+
(u) => u.getBoundingClientRect().width
|
|
962
1017
|
);
|
|
963
1018
|
};
|
|
964
1019
|
return {
|
|
965
|
-
spring:
|
|
1020
|
+
spring: r,
|
|
966
1021
|
from: 0,
|
|
967
1022
|
to: 1,
|
|
968
1023
|
prepare: () => {
|
|
969
|
-
document.body.style.overflow = "hidden", i.style.opacity = "1", y == null || y.remove(),
|
|
1024
|
+
document.body.style.overflow = "hidden", i.style.opacity = "1", y == null || y.remove(), g(), c && o && (c.style.clipPath = "none", o.style.transform = "scale(1)");
|
|
970
1025
|
},
|
|
971
|
-
tick: (
|
|
972
|
-
if (!(!
|
|
973
|
-
if (
|
|
974
|
-
const
|
|
975
|
-
Math.floor(
|
|
976
|
-
|
|
977
|
-
), w =
|
|
978
|
-
|
|
1026
|
+
tick: (u) => {
|
|
1027
|
+
if (!(!c || !o || !e)) {
|
|
1028
|
+
if (u <= A && a.length > 0) {
|
|
1029
|
+
const m = u / A, f = Math.min(
|
|
1030
|
+
Math.floor(m * a.length),
|
|
1031
|
+
a.length - 1
|
|
1032
|
+
), w = h[f] ?? 0, $ = Tt(h.slice(0, f));
|
|
1033
|
+
o.style.width = `${w}px`, e.style.transform = `translateX(-${$}px)`;
|
|
979
1034
|
}
|
|
980
|
-
if (
|
|
981
|
-
const
|
|
1035
|
+
if (u > A) {
|
|
1036
|
+
const f = 1 - Math.max(
|
|
982
1037
|
0,
|
|
983
|
-
Math.min(1, (
|
|
1038
|
+
Math.min(1, (u - A) / At)
|
|
984
1039
|
);
|
|
985
|
-
|
|
1040
|
+
c.style.clipPath = Lt(d, f), o.style.transform = `scale(${f})`;
|
|
986
1041
|
}
|
|
987
1042
|
}
|
|
988
1043
|
},
|
|
989
1044
|
onEnd: () => {
|
|
990
|
-
|
|
1045
|
+
c == null || c.remove(), c = o = e = null, document.body.style.overflow = p;
|
|
991
1046
|
}
|
|
992
1047
|
};
|
|
993
1048
|
}
|
|
994
1049
|
};
|
|
995
1050
|
};
|
|
996
1051
|
export {
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1052
|
+
St as blind,
|
|
1053
|
+
Vt as curtainReveal,
|
|
1054
|
+
_t as drill,
|
|
1055
|
+
It as fade,
|
|
1056
|
+
Ot as film,
|
|
1057
|
+
Dt as hero,
|
|
1058
|
+
Pt as instagram,
|
|
1059
|
+
Xt as jaemin,
|
|
1060
|
+
vt as pinterest,
|
|
1061
|
+
Ft as scroll,
|
|
1062
|
+
Yt as slide,
|
|
1063
|
+
Ut as strip
|
|
1009
1064
|
};
|