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