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