@ssgoi/core 5.0.2 → 5.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/animator/multi-animator.d.ts.map +1 -1
- package/dist/animator/runner/keyframes-runner.d.ts +14 -0
- package/dist/animator/runner/keyframes-runner.d.ts.map +1 -0
- package/dist/animator/runner/provider.d.ts +12 -3
- package/dist/animator/runner/provider.d.ts.map +1 -1
- package/dist/animator/single-animator.d.ts +7 -0
- package/dist/animator/single-animator.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +636 -506
- package/dist/{provider-Cu4NSF1Q.js → provider-B2B8CK6H.js} +37 -62
- package/dist/provider-BKaONTeg.cjs +1 -0
- package/dist/spring-integrator-95Mh7mdw.cjs +1 -0
- package/dist/spring-integrator-BM4a-82c.js +33 -0
- package/dist/ssgoi-transition/create-ssgoi-transition-context.d.ts +2 -2
- package/dist/ssgoi-transition/create-ssgoi-transition-context.d.ts.map +1 -1
- package/dist/ssgoi-transition/create-swipe-back-detector.d.ts +43 -0
- package/dist/ssgoi-transition/create-swipe-back-detector.d.ts.map +1 -0
- package/dist/ssgoi-transition/navigation-detector-strategy.d.ts +2 -2
- package/dist/transitions/index.cjs +1 -1
- package/dist/transitions/index.js +33 -32
- package/dist/types.cjs +1 -1
- package/dist/types.d.ts +77 -73
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +44 -36
- package/dist/utils/index.d.ts +0 -4
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/view-transitions/film.d.ts.map +1 -1
- package/dist/view-transitions/index.cjs +15 -15
- package/dist/view-transitions/index.js +884 -775
- 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
- package/dist/provider-Cs5iBqRD.cjs +0 -1
- package/dist/ssgoi-transition/create-navigation-direction-detector.d.ts +0 -20
- package/dist/ssgoi-transition/create-navigation-direction-detector.d.ts.map +0 -1
- package/dist/utils/is-android.d.ts +0 -5
- package/dist/utils/is-android.d.ts.map +0 -1
- package/dist/utils/is-desktop.d.ts +0 -5
- package/dist/utils/is-desktop.d.ts.map +0 -1
- package/dist/utils/is-ios.d.ts +0 -6
- package/dist/utils/is-ios.d.ts.map +0 -1
- package/dist/utils/match-platform.d.ts +0 -8
- package/dist/utils/match-platform.d.ts.map +0 -1
package/dist/types.d.ts
CHANGED
|
@@ -161,13 +161,27 @@ export type SingleSpringConfig = BaseTransitionConfig & {
|
|
|
161
161
|
css?: (progress: number) => StyleObject;
|
|
162
162
|
};
|
|
163
163
|
/**
|
|
164
|
-
*
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
164
|
+
* Common fields shared by every AnimationItem variant
|
|
165
|
+
*/
|
|
166
|
+
type AnimationItemBase = {
|
|
167
|
+
onStart?: () => void;
|
|
168
|
+
onComplete?: () => void;
|
|
169
|
+
/**
|
|
170
|
+
* Progress offset (0-1) before this spring starts
|
|
171
|
+
* - 0: Start immediately (parallel behavior)
|
|
172
|
+
* - 1: Start after previous spring completes (sequential behavior)
|
|
173
|
+
* - 0.5: Start when previous spring is 50% complete
|
|
174
|
+
*
|
|
175
|
+
* Only applies to 'stagger' schedule mode.
|
|
176
|
+
* For 'parallel' mode, all springs start at 0.
|
|
177
|
+
* For 'sequential' mode, all springs use offset 1.
|
|
178
|
+
*/
|
|
179
|
+
offset?: number;
|
|
180
|
+
};
|
|
181
|
+
/**
|
|
182
|
+
* Spring-driven animation item — physics drives a tick or css generator
|
|
169
183
|
*/
|
|
170
|
-
export type
|
|
184
|
+
export type SpringAnimationItem = AnimationItemBase & {
|
|
171
185
|
/**
|
|
172
186
|
* Physics configuration for animation
|
|
173
187
|
* Choose one: spring (ease-out), inertia (ease-in), or custom integrator
|
|
@@ -197,41 +211,47 @@ export type AnimationItem = {
|
|
|
197
211
|
*
|
|
198
212
|
* @param progress - Current progress value (0 to 1)
|
|
199
213
|
* @returns Style object for Web Animation API
|
|
200
|
-
*
|
|
201
|
-
* @example
|
|
202
|
-
* // Form 1: Function (element from parent)
|
|
203
|
-
* css: (progress) => ({
|
|
204
|
-
* opacity: progress,
|
|
205
|
-
* transform: `translateY(${(1 - progress) * 20}px)`,
|
|
206
|
-
* })
|
|
207
|
-
*
|
|
208
|
-
* @example
|
|
209
|
-
* // Form 2: Object with custom element
|
|
210
|
-
* css: {
|
|
211
|
-
* element: myElement,
|
|
212
|
-
* style: (progress) => ({
|
|
213
|
-
* transform: `scale(${progress})`,
|
|
214
|
-
* }),
|
|
215
|
-
* }
|
|
216
214
|
*/
|
|
217
215
|
css?: ((progress: number) => StyleObject) | {
|
|
218
216
|
element: HTMLElement;
|
|
219
217
|
style: (progress: number) => StyleObject;
|
|
220
218
|
};
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
219
|
+
/** keyframes mode is mutually exclusive with physics/tick/css */
|
|
220
|
+
keyframes?: never;
|
|
221
|
+
};
|
|
222
|
+
/**
|
|
223
|
+
* Pre-baked keyframes animation item — bypasses physics simulation
|
|
224
|
+
*
|
|
225
|
+
* Plays a pre-built `Keyframe[]` directly via Web Animation API. Use this when
|
|
226
|
+
* you've already composed the desired motion as keyframes (e.g. multiple springs
|
|
227
|
+
* baked into a single timeline) and want the animation to run entirely on the
|
|
228
|
+
* compositor with zero per-frame JS.
|
|
229
|
+
*/
|
|
230
|
+
export type KeyframesAnimationItem = AnimationItemBase & {
|
|
231
|
+
keyframes: {
|
|
232
|
+
/** Element to animate */
|
|
233
|
+
element: HTMLElement;
|
|
234
|
+
/** WAAPI keyframe array (offsets 0..1) */
|
|
235
|
+
frames: Keyframe[];
|
|
236
|
+
/** Total animation duration in ms */
|
|
237
|
+
duration: number;
|
|
238
|
+
/** WAAPI easing string (default: "linear") */
|
|
239
|
+
easing?: string;
|
|
240
|
+
};
|
|
241
|
+
/** physics/tick/css are not used in keyframes mode */
|
|
242
|
+
physics?: never;
|
|
243
|
+
tick?: never;
|
|
244
|
+
css?: never;
|
|
234
245
|
};
|
|
246
|
+
/**
|
|
247
|
+
* Individual animation item in a multi-animation config
|
|
248
|
+
*
|
|
249
|
+
* Three mutually-exclusive modes:
|
|
250
|
+
* - tick: RAF-based animation with callback on each frame
|
|
251
|
+
* - css: Web Animation API, generated from spring physics
|
|
252
|
+
* - keyframes: Web Animation API, played from pre-baked Keyframe[]
|
|
253
|
+
*/
|
|
254
|
+
export type AnimationItem = SpringAnimationItem | KeyframesAnimationItem;
|
|
235
255
|
/**
|
|
236
256
|
* Multi-animation configuration
|
|
237
257
|
* Used for complex transitions with multiple coordinated animations
|
|
@@ -266,6 +286,10 @@ export declare function isCssAnimation(config: SingleSpringConfig): config is Si
|
|
|
266
286
|
export declare function isTickAnimation(config: SingleSpringConfig): config is SingleSpringConfig & {
|
|
267
287
|
tick: (progress: number) => void;
|
|
268
288
|
};
|
|
289
|
+
/**
|
|
290
|
+
* Type guard to check if an AnimationItem uses pre-baked keyframes mode
|
|
291
|
+
*/
|
|
292
|
+
export declare function isKeyframesAnimation(item: AnimationItem): item is KeyframesAnimationItem;
|
|
269
293
|
/**
|
|
270
294
|
* Normalize TransitionConfig to MultiAnimationConfig
|
|
271
295
|
* Converts SingleSpringConfig to MultiAnimationConfig with single animation item
|
|
@@ -344,14 +368,6 @@ export type SggoiTransitionContext = {
|
|
|
344
368
|
positionedParent: HTMLElement;
|
|
345
369
|
};
|
|
346
370
|
export type SggoiTransition = Transition<SggoiTransitionContext>;
|
|
347
|
-
/**
|
|
348
|
-
* Platform types for skipAnimationOnBack configuration
|
|
349
|
-
* - 'ios': iOS devices (iPhone, iPad, iPod)
|
|
350
|
-
* - 'android': Android devices
|
|
351
|
-
* - 'desktop': Desktop browsers (non-mobile)
|
|
352
|
-
* - 'all': All platforms
|
|
353
|
-
*/
|
|
354
|
-
export type Platform = "ios" | "android" | "desktop" | "all";
|
|
355
371
|
export type SsgoiConfig = {
|
|
356
372
|
transitions?: {
|
|
357
373
|
from: string;
|
|
@@ -364,31 +380,6 @@ export type SsgoiConfig = {
|
|
|
364
380
|
from: string;
|
|
365
381
|
to: string;
|
|
366
382
|
};
|
|
367
|
-
/**
|
|
368
|
-
* @deprecated Use `skipAnimationOnBack: ['ios']` instead. Will be removed in next major version.
|
|
369
|
-
* Skip page transitions when iOS/Safari swipe-back gesture is detected
|
|
370
|
-
*/
|
|
371
|
-
skipOnIosSwipe?: boolean;
|
|
372
|
-
/**
|
|
373
|
-
* Skip animations on browser back navigation for specified platforms
|
|
374
|
-
*
|
|
375
|
-
* @example
|
|
376
|
-
* // iOS only (default)
|
|
377
|
-
* skipAnimationOnBack: ['ios']
|
|
378
|
-
*
|
|
379
|
-
* // iOS and Android
|
|
380
|
-
* skipAnimationOnBack: ['ios', 'android']
|
|
381
|
-
*
|
|
382
|
-
* // All platforms
|
|
383
|
-
* skipAnimationOnBack: ['all']
|
|
384
|
-
*
|
|
385
|
-
* // Disabled - always run animations
|
|
386
|
-
* skipAnimationOnBack: []
|
|
387
|
-
*
|
|
388
|
-
* This prevents animation conflicts with native swipe-back gestures.
|
|
389
|
-
* @default ['ios']
|
|
390
|
-
*/
|
|
391
|
-
skipAnimationOnBack?: Platform[];
|
|
392
383
|
/**
|
|
393
384
|
* Automatically preserve and restore scroll position when navigating between pages.
|
|
394
385
|
*
|
|
@@ -419,10 +410,11 @@ export type SsgoiInternalOptions = {
|
|
|
419
410
|
* Whether OUT transition must arrive before IN transition
|
|
420
411
|
*
|
|
421
412
|
* - true (default): OUT must arrive first, IN completes the pair.
|
|
422
|
-
* Best for frameworks with native destroy callbacks (Svelte
|
|
413
|
+
* Best for frameworks with native destroy callbacks (Svelte).
|
|
423
414
|
*
|
|
424
415
|
* - false: OUT and IN can arrive in any order, both wait indefinitely.
|
|
425
|
-
* Best for frameworks using MutationObserver for unmount detection
|
|
416
|
+
* Best for frameworks using MutationObserver for unmount detection
|
|
417
|
+
* (React, Vue, Solid).
|
|
426
418
|
*
|
|
427
419
|
* @default true
|
|
428
420
|
*/
|
|
@@ -454,16 +446,27 @@ export type NormalizedScheduleEntry = {
|
|
|
454
446
|
};
|
|
455
447
|
/**
|
|
456
448
|
* Normalized animation item for internal use
|
|
457
|
-
* - css is always in object form: { element, style }
|
|
449
|
+
* - css is always in object form: { element, style } (spring mode)
|
|
450
|
+
* - keyframes pass through as-is (already normalized — element required)
|
|
458
451
|
* - normalizedOffset is always present
|
|
459
452
|
* @internal
|
|
460
453
|
*/
|
|
461
|
-
export type NormalizedAnimationItem =
|
|
454
|
+
export type NormalizedAnimationItem = {
|
|
455
|
+
onStart?: () => void;
|
|
456
|
+
onComplete?: () => void;
|
|
457
|
+
normalizedOffset: number;
|
|
458
|
+
physics?: PhysicsOptions;
|
|
459
|
+
tick?: (progress: number) => void;
|
|
462
460
|
css?: {
|
|
463
461
|
element: HTMLElement;
|
|
464
462
|
style: (progress: number) => StyleObject;
|
|
465
463
|
};
|
|
466
|
-
|
|
464
|
+
keyframes?: {
|
|
465
|
+
element: HTMLElement;
|
|
466
|
+
frames: Keyframe[];
|
|
467
|
+
duration: number;
|
|
468
|
+
easing?: string;
|
|
469
|
+
};
|
|
467
470
|
};
|
|
468
471
|
/**
|
|
469
472
|
* Normalized multi-animation config for internal use
|
|
@@ -497,4 +500,5 @@ export type AnimationState = {
|
|
|
497
500
|
from: number;
|
|
498
501
|
to: number;
|
|
499
502
|
};
|
|
503
|
+
export {};
|
|
500
504
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/lib/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAExD,MAAM,MAAM,aAAa,GAAG,MAA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AM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC"}
|
package/dist/types.js
CHANGED
|
@@ -1,43 +1,46 @@
|
|
|
1
|
-
function
|
|
2
|
-
return ("tick" in
|
|
1
|
+
function h(e) {
|
|
2
|
+
return ("tick" in e || "css" in e) && !("items" in e);
|
|
3
3
|
}
|
|
4
|
-
function
|
|
5
|
-
return "items" in
|
|
4
|
+
function d(e) {
|
|
5
|
+
return "items" in e;
|
|
6
6
|
}
|
|
7
|
-
function
|
|
8
|
-
return "css" in
|
|
7
|
+
function k(e) {
|
|
8
|
+
return "css" in e && typeof e.css == "function";
|
|
9
9
|
}
|
|
10
|
-
function
|
|
11
|
-
return "tick" in
|
|
10
|
+
function w(e) {
|
|
11
|
+
return "tick" in e && typeof e.tick == "function";
|
|
12
12
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
function f(e) {
|
|
14
|
+
return "keyframes" in e && e.keyframes !== void 0 && e.keyframes !== null;
|
|
15
|
+
}
|
|
16
|
+
async function A(e) {
|
|
17
|
+
const t = await e;
|
|
18
|
+
return d(t) ? {
|
|
19
|
+
prepare: t.prepare,
|
|
20
|
+
wait: t.wait,
|
|
21
|
+
onReady: t.onReady,
|
|
22
|
+
onStart: t.onStart,
|
|
23
|
+
onEnd: t.onEnd,
|
|
24
|
+
items: t.items,
|
|
25
|
+
schedule: t.schedule
|
|
23
26
|
} : {
|
|
24
|
-
prepare:
|
|
25
|
-
wait:
|
|
26
|
-
onReady:
|
|
27
|
-
onStart:
|
|
28
|
-
onEnd:
|
|
27
|
+
prepare: t.prepare,
|
|
28
|
+
wait: t.wait,
|
|
29
|
+
onReady: t.onReady,
|
|
30
|
+
onStart: t.onStart,
|
|
31
|
+
onEnd: t.onEnd,
|
|
29
32
|
items: [
|
|
30
33
|
{
|
|
31
|
-
physics:
|
|
32
|
-
tick:
|
|
33
|
-
css:
|
|
34
|
+
physics: t.physics,
|
|
35
|
+
tick: t.tick,
|
|
36
|
+
css: t.css
|
|
34
37
|
}
|
|
35
38
|
],
|
|
36
39
|
schedule: "parallel"
|
|
37
40
|
};
|
|
38
41
|
}
|
|
39
|
-
function
|
|
40
|
-
const a =
|
|
42
|
+
function S(e, t) {
|
|
43
|
+
const a = e.schedule ?? "parallel", r = e.items.map(
|
|
41
44
|
(i) => {
|
|
42
45
|
let n;
|
|
43
46
|
switch (a) {
|
|
@@ -53,20 +56,25 @@ function k(t, e) {
|
|
|
53
56
|
default:
|
|
54
57
|
n = 0;
|
|
55
58
|
}
|
|
56
|
-
|
|
59
|
+
if (f(i)) {
|
|
60
|
+
const { offset: y, ...u } = i;
|
|
61
|
+
return { ...u, normalizedOffset: n };
|
|
62
|
+
}
|
|
63
|
+
const { css: s, offset: p, ...c } = i, l = s ? typeof s == "function" ? t ? { element: t, style: s } : void 0 : { element: s.element, style: s.style } : void 0;
|
|
57
64
|
return { ...c, css: l, normalizedOffset: n };
|
|
58
65
|
}
|
|
59
|
-
), { schedule:
|
|
66
|
+
), { schedule: m, ...o } = e;
|
|
60
67
|
return {
|
|
61
68
|
...o,
|
|
62
69
|
items: r
|
|
63
70
|
};
|
|
64
71
|
}
|
|
65
72
|
export {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
73
|
+
k as isCssAnimation,
|
|
74
|
+
f as isKeyframesAnimation,
|
|
75
|
+
d as isMultiAnimation,
|
|
76
|
+
h as isSingleAnimation,
|
|
77
|
+
w as isTickAnimation,
|
|
78
|
+
S as normalizeSchedule,
|
|
79
|
+
A as normalizeToMultiAnimation
|
|
72
80
|
};
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -6,8 +6,4 @@ export { getRect } from './get-rect';
|
|
|
6
6
|
export { round, floor, ceil, toFixed } from './number';
|
|
7
7
|
export { withResolvers } from './with-resolvers';
|
|
8
8
|
export { waitPaint } from './wait-paint';
|
|
9
|
-
export { isIOS } from './is-ios';
|
|
10
|
-
export { isAndroid } from './is-android';
|
|
11
|
-
export { isDesktop } from './is-desktop';
|
|
12
|
-
export { matchPlatform } from './match-platform';
|
|
13
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"film.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/film.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,cAAc,EACd,eAAe,EAGhB,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"film.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/film.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,cAAc,EACd,eAAe,EAGhB,MAAM,UAAU,CAAC;AA4BlB,UAAU,WAAW;IACnB,MAAM,CAAC,EAAE;QACP,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AA8QD,eAAO,MAAM,IAAI,GAAI,UAAU,WAAW,KAAG,eAmH5C,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("../spring-integrator-95Mh7mdw.cjs"),$=(t,e)=>{var o;t.style.position="absolute",t.style.width="100%",t.style.top=`${-1*(((o=e==null?void 0:e.scrollOffset)==null?void 0:o.y)??0)}px`,t.style.left="0"},U=t=>new Promise(e=>setTimeout(e,t));function x(t,e){function o(n){let a=0,i=0;const c=n.offsetWidth,p=n.offsetHeight;let r=n;for(;r;)a+=r.offsetTop,i+=r.offsetLeft,r=r.offsetParent;return a-=window.scrollY,i-=window.scrollX,{top:a,left:i,width:c,height:p}}const l=o(t),s=o(e);return new DOMRect(s.left-l.left,s.top-l.top,s.width,s.height)}function E(){let t,e;return{promise:new Promise((l,s)=>{t=l,e=s}),resolve:t,reject:e}}const B={spring:{stiffness:200,damping:22}},q={spring:{stiffness:200,damping:22}},j=300,N=10,G="horizontal",Z="#000000",K=(t={})=>{const{transitionDelay:e=j,blindCount:o=N,direction:l=G,blindColor:s=Z}=t,n=t.physics??q,a=t.physics??B;let i,c=null;const p=(r,y,f="left")=>{window.getComputedStyle(r).position==="static"&&(r.style.position="relative");const d=document.createElement("div");d.className="blind-container",d.style.cssText=`
|
|
2
2
|
position: absolute;
|
|
3
3
|
top: 0;
|
|
4
4
|
left: 0;
|
|
@@ -7,29 +7,29 @@
|
|
|
7
7
|
pointer-events: none;
|
|
8
8
|
z-index: 9999;
|
|
9
9
|
overflow: hidden;
|
|
10
|
-
`;const
|
|
10
|
+
`;const h=[];for(let g=0;g<o;g++){const w=document.createElement("div");if(l==="horizontal"){const b=100/o,C=`calc(${b}% + 1px)`;w.style.cssText=`
|
|
11
11
|
position: absolute;
|
|
12
|
-
top: ${b
|
|
12
|
+
top: ${b*g}%;
|
|
13
13
|
left: 0;
|
|
14
14
|
width: 100%;
|
|
15
15
|
height: ${C};
|
|
16
16
|
background: ${s};
|
|
17
|
-
transform: scaleX(${
|
|
18
|
-
transform-origin: ${
|
|
17
|
+
transform: scaleX(${y==="hidden"?0:1});
|
|
18
|
+
transform-origin: ${f} center;
|
|
19
19
|
will-change: transform;
|
|
20
|
-
`}else{const b=100/
|
|
20
|
+
`}else{const b=100/o,C=`calc(${b}% + 1px)`;w.style.cssText=`
|
|
21
21
|
position: absolute;
|
|
22
22
|
top: 0;
|
|
23
|
-
left: ${b
|
|
23
|
+
left: ${b*g}%;
|
|
24
24
|
width: ${C};
|
|
25
25
|
height: 100%;
|
|
26
26
|
background: ${s};
|
|
27
|
-
transform: scaleY(${
|
|
28
|
-
transform-origin: ${
|
|
27
|
+
transform: scaleY(${y==="hidden"?0:1});
|
|
28
|
+
transform-origin: ${f==="left"?"top":"bottom"} center;
|
|
29
29
|
will-change: transform;
|
|
30
|
-
`}p.push(w),f.appendChild(w)}return o.appendChild(f),{container:f,blinds:p}};return{out:o=>{let h=null;a=new Promise(f=>{l=f});const d=f=>{const p=1-f;return{transform:c==="horizontal"?`scaleX(${p})`:`scaleY(${p})`}};return{items:Array.from({length:r},(f,p)=>({physics:e,offset:.2,css:{get element(){return h==null?void 0:h.blinds[p]},style:d}})),schedule:"stagger",prepare:()=>{g(o),o.style.zIndex="1000",h=y(o,"hidden","left")},onStart:()=>{},onEnd:()=>{l&&l()}}},in:o=>{let h=null;const d=f=>{const p=1-f;return{transform:c==="horizontal"?`scaleX(${p})`:`scaleY(${p})`}};return{items:Array.from({length:r},(f,p)=>({physics:i,offset:.2,css:{get element(){return h==null?void 0:h.blinds[p]},style:d}})),schedule:"stagger",prepare:()=>{o.style.position="relative",o.style.zIndex="0",h=y(o,"closed","right")},onStart:()=>{},wait:async()=>{a&&await a,await _(n)},onEnd:()=>{h&&h.container&&h.container.remove()}}}}},j={spring:{stiffness:1,damping:1}},N={spring:{stiffness:20,damping:25}},G="#000000",Z="circle",k="CURTAIN_REVEAL_OVERLAY_ID",J={position:"fixed",inset:"0",width:"100vw",height:"100%",zIndex:"9999",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"},K={position:"relative",display:"inline-block",height:"5.5rem",overflow:"hidden"},Q={display:"flex",height:"100%",willChange:"transform",transition:"transform 0.3s ease"},R={display:"inline-flex",alignItems:"center",justifyContent:"center",whiteSpace:"nowrap",fontSize:"5.5rem",fontWeight:"900",letterSpacing:"0.02em",color:"#FFFFFF"},tt=.4,S=.5,st=.2;function it(t,n){switch(t){case"circle":return`circle(${n*100}% at 50% 50%)`;case"square":return`inset(${(1-n)*50}% round ${10*n}%)`;case"triangle":{const r=n*100;return`polygon(50% ${50-r}%, ${50-r}% ${50+r}%, ${50+r}% ${50+r}%)`}}}const nt=t=>t.reduce((n,r)=>n+r,0),et=(t={})=>{const{background:n=G,texts:r=[],shape:c=Z,textStyle:s={}}=t,i=t.physics??N,e=t.physics??j;return{out:(a,l)=>{const y=a.style.opacity;return{physics:e,from:1,to:0,prepare:()=>{g(a,l),a.style.opacity="1"},tick:o=>{const h=Math.max(0,o-tt);a.style.opacity=String(h)},onEnd:()=>{a.style.opacity=y}}},in:a=>{let l=null,y=null,o=null;const h=document.body.style.overflow,d=document.getElementById(k);let u=[];const f=()=>{l=document.createElement("div"),l.id=k,Object.assign(l.style,J,{background:n}),document.body.appendChild(l),y=document.createElement("div"),Object.assign(y.style,K),l.appendChild(y),o=document.createElement("div"),Object.assign(o.style,Q),y.appendChild(o),r.forEach(p=>{const $=document.createElement("div");$.textContent=p,Object.assign($.style,R,s),o.appendChild($)}),u=Array.from(o.children).map(p=>p.getBoundingClientRect().width)};return{physics:i,from:0,to:1,prepare:()=>{document.body.style.overflow="hidden",a.style.opacity="1",d==null||d.remove(),f(),l&&y&&(l.style.clipPath="none",y.style.transform="scale(1)")},tick:p=>{if(!(!l||!y||!o)){if(p<=S&&r.length>0){const $=p/S,w=Math.min(Math.floor($*r.length),r.length-1),b=u[w]??0,C=nt(u.slice(0,w));y.style.width=`${b}px`,o.style.transform=`translateX(-${C}px)`}if(p>S){const w=1-Math.max(0,Math.min(1,(p-S)/st));l.style.clipPath=it(c,w),y.style.transform=`scale(${w})`}}},onEnd:()=>{l==null||l.remove(),l=y=o=null,document.body.style.overflow=h}}}}},at={spring:{stiffness:280,damping:30,restDelta:.1,restSpeed:1e14}},rt={spring:{stiffness:280,damping:30,restDelta:.1,restSpeed:1e14}},ot=.05;function A(t){const n=x(document.body,t.positionedParent),r=t.scroll.y,c=window.innerHeight-n.top;return{top:r,left:0,width:n.width,height:c}}const lt=(t={})=>{const{direction:n="enter"}=t,r=t.physics??(n==="enter"?at:rt),c=t.scaleOffset??ot;let{promise:s,resolve:i}=E();return n==="enter"?{in:(e,a)=>{const l=A(a),y=l.left+l.width/2,o=l.top+l.height/2;return{physics:r,prepare:()=>{e.style.opacity="0",e.style.willChange="transform, opacity",e.style.backfaceVisibility="hidden",e.style.contain="layout paint",e.style.transformOrigin=`${y}px ${o}px`},wait:async()=>{if(s){await s;const h=E();s=h.promise,i=h.resolve}},css:h=>({transform:`scale(${1-c+h*c})`,opacity:h}),onEnd:()=>{e.style.opacity="1",e.style.willChange="auto",e.style.backfaceVisibility="",e.style.contain="",e.style.transformOrigin=""}}},out:(e,a)=>{const l=A(a),y=l.left+l.width/2,o=l.top+l.height/2+a.scrollOffset.y;return{physics:r,prepare:()=>{g(e,a),e.style.zIndex="-1",e.style.willChange="transform, opacity",e.style.backfaceVisibility="hidden",e.style.contain="layout paint",e.style.pointerEvents="none",e.style.transformOrigin=`${y}px ${o}px`},css:h=>({transform:`scale(${1+(1-h)*c})`,opacity:h}),onEnd:()=>{i&&i()}}}}:{in:(e,a)=>{const l=A(a),y=l.left+l.width/2,o=l.top+l.height/2;return{physics:r,prepare:()=>{e.style.opacity="0",e.style.willChange="transform, opacity",e.style.backfaceVisibility="hidden",e.style.contain="layout paint",e.style.transformOrigin=`${y}px ${o}px`},wait:async()=>{if(s){await s;const h=E();s=h.promise,i=h.resolve}},css:h=>({transform:`scale(${1+c-h*c})`,opacity:h}),onEnd:()=>{e.style.opacity="1",e.style.willChange="auto",e.style.backfaceVisibility="",e.style.contain="",e.style.transformOrigin=""}}},out:(e,a)=>{const l=A(a),y=l.left+l.width/2,o=l.top+l.height/2+a.scrollOffset.y;return{physics:r,prepare:()=>{g(e,a),e.style.zIndex="100",e.style.willChange="transform, opacity",e.style.backfaceVisibility="hidden",e.style.contain="layout paint",e.style.pointerEvents="none",e.style.transformOrigin=`${y}px ${o}px`},css:h=>({transform:`scale(${1-(1-h)*c})`,opacity:h}),onEnd:()=>{i&&i()}}}}},ct={spring:{stiffness:170,damping:22}},yt={spring:{stiffness:170,damping:22}},ht=(t={})=>{const{opacity:n=!1,direction:r="enter"}=t,c=t.physics??(r==="enter"?ct:yt);return r==="enter"?{in:s=>({physics:c,prepare:()=>{s.style.willChange=n?"transform, opacity":"transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint"},css:i=>{const e={transform:`translate3d(${(1-i)*100}%, 0, 0)`};return n&&(e.opacity=i),e},onEnd:()=>{s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain=""}}),out:(s,i)=>({physics:c,prepare:()=>{g(s,i),s.style.zIndex="-1",s.style.willChange=n?"transform, opacity":"transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.pointerEvents="none"},css:e=>{const a={transform:`translate3d(${-(1-e)*20}%, 0, 0)`};return n&&(a.opacity=e),a}})}:{in:s=>({physics:c,prepare:()=>{s.style.willChange=n?"transform, opacity":"transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint"},css:i=>{const e={transform:`translate3d(${-(1-i)*20}%, 0, 0)`};return n&&(e.opacity=i),e},onEnd:()=>{s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain=""}}),out:(s,i)=>({physics:c,prepare:()=>{g(s,i),s.style.zIndex="100",s.style.willChange=n?"transform, opacity":"transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.pointerEvents="none"},css:e=>{const a={transform:`translate3d(${(1-e)*100}%, 0, 0)`};return n&&(a.opacity=e),a}})}},pt={spring:{stiffness:180,damping:20,doubleSpring:!0}},dt={spring:{stiffness:170,damping:20,doubleSpring:!0}},ut=0,ft=(t={})=>{const{transitionDelay:n=ut}=t,r=t.physics??dt,c=t.physics??pt;let{promise:s,resolve:i}=E();return{in:e=>({physics:r,prepare:()=>{e.style.opacity="0",e.style.willChange="opacity"},wait:async()=>{if(s){await s;const a=E();s=a.promise,i=a.resolve,await _(n)}},css:a=>({opacity:a}),onEnd:()=>{e.style.willChange="auto",e.style.opacity="1"}}),out:(e,a)=>({physics:c,css:l=>({opacity:l}),prepare:()=>{g(e,a),e.style.willChange="opacity"},onEnd:()=>{i&&i(),e.style.willChange="auto"}})}},gt={scaleDown:{stiffness:20,damping:7},translate:{stiffness:15,damping:7},scaleUp:{stiffness:20,damping:7}},O={scaleDown:0,translate:.2,scaleUp:.8},wt=.8,$t="white",bt=t=>{var s;const n=gt,r=wt,c=((s=t==null?void 0:t.border)==null?void 0:s.color)??$t;return{out:async(i,e)=>{const a=v(e),l=x(document.body,e.positionedParent),y=Et(c,{...a,top:l.top}),o={scale:1,translateY:-a.top},h=()=>{i.style.transform=`translateY(${o.translateY}px) scale(${o.scale})`;const d=(a.width-a.width*o.scale)/2,u=(a.height-a.height*o.scale)/2;xt(y,d,u)};return{items:[{physics:(t==null?void 0:t.physics)??{spring:n.scaleDown},offset:O.scaleDown,tick:d=>{const u=1-d;o.scale=1-(1-r)*u,h()}},{physics:(t==null?void 0:t.physics)??{spring:n.translate},offset:O.translate,tick:d=>{const u=1-d;o.translateY=-a.top-a.height*u,h()}},{physics:(t==null?void 0:t.physics)??{spring:n.scaleUp},offset:O.scaleUp,tick:d=>{const u=1-d;o.scale=r+(1-r)*u,h()}}],schedule:"stagger",prepare:()=>{g(i),m(i,a),I(i,a),Ct(i,a);for(const d of y)e.positionedParent.appendChild(d)},onEnd:()=>{i.style.clipPath="",i.style.transformOrigin="",setTimeout(()=>{for(const d of y)e.positionedParent.removeChild(d)},1e3)}}},in:async(i,e)=>{const a=v(e),l={scale:r,translateY:-a.top+a.height},y=()=>{i.style.transform=`translateY(${l.translateY}px) scale(${l.scale})`};return{items:[{physics:(t==null?void 0:t.physics)??{spring:n.scaleDown},offset:O.scaleDown,tick:o=>{l.scale=1-(1-r)*o,y()}},{physics:(t==null?void 0:t.physics)??{spring:n.translate},offset:O.translate,tick:o=>{l.translateY=-a.top+a.height*(1-o),y()}},{physics:(t==null?void 0:t.physics)??{spring:n.scaleUp},offset:O.scaleUp,tick:o=>{l.scale=r+(1-r)*o,y()}}],schedule:"stagger",prepare:()=>{m(i,a),I(i,a),i.style.transform=`translateY(${-a.top+a.height}px) scale(${r})`},onEnd:()=>{i.style.clipPath="",i.style.transformOrigin="",i.style.transform=""}}}}};function xt(t,n,r){const c=n*.7,s=r*.7;t.topLeft.style.transform=`translate(${c}px, ${s}px)`,t.topRight.style.transform=`translate(${-c}px, ${s}px)`,t.bottomLeft.style.transform=`translate(${c}px, ${-s}px)`,t.bottomRight.style.transform=`translate(${-c}px, ${-s}px)`}function Et(t="white",n){const s=document.createElement("div");s.style.position="fixed",s.style.pointerEvents="none",s.style.zIndex="9999",s.style.top=`${n.top-1}px`,s.style.left=`${n.left-1}px`,s.style.width="15px",s.style.height="15px";const i=document.createElement("div");i.style.position="absolute",i.style.width="15px",i.style.height="1px",i.style.backgroundColor=t,i.style.top="0",i.style.left="0";const e=document.createElement("div");e.style.position="absolute",e.style.width="1px",e.style.height="15px",e.style.backgroundColor=t,e.style.top="0",e.style.left="0",s.appendChild(i),s.appendChild(e);const a=document.createElement("div");a.style.position="fixed",a.style.pointerEvents="none",a.style.zIndex="9999",a.style.top=`${n.top-1}px`,a.style.left=`${n.left+n.width-15+1}px`,a.style.width="15px",a.style.height="15px";const l=document.createElement("div");l.style.position="absolute",l.style.width="15px",l.style.height="1px",l.style.backgroundColor=t,l.style.top="0",l.style.right="0";const y=document.createElement("div");y.style.position="absolute",y.style.width="1px",y.style.height="15px",y.style.backgroundColor=t,y.style.top="0",y.style.right="0",a.appendChild(l),a.appendChild(y);const o=document.createElement("div");o.style.position="fixed",o.style.pointerEvents="none",o.style.zIndex="9999",o.style.top=`${n.top+n.height-15+1}px`,o.style.left=`${n.left-1}px`,o.style.width="15px",o.style.height="15px";const h=document.createElement("div");h.style.position="absolute",h.style.width="15px",h.style.height="1px",h.style.backgroundColor=t,h.style.bottom="0",h.style.left="0";const d=document.createElement("div");d.style.position="absolute",d.style.width="1px",d.style.height="15px",d.style.backgroundColor=t,d.style.bottom="0",d.style.left="0",o.appendChild(h),o.appendChild(d);const u=document.createElement("div");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";const f=document.createElement("div");f.style.position="absolute",f.style.width="15px",f.style.height="1px",f.style.backgroundColor=t,f.style.bottom="0",f.style.right="0";const p=document.createElement("div");return p.style.position="absolute",p.style.width="1px",p.style.height="15px",p.style.backgroundColor=t,p.style.bottom="0",p.style.right="0",u.appendChild(f),u.appendChild(p),{topLeft:s,topRight:a,bottomLeft:o,bottomRight:u,*[Symbol.iterator](){yield s,yield a,yield o,yield u}}}function v(t){const n=x(document.body,t.positionedParent);return{top:t.scroll.y,left:0,width:n.width,height:window.innerHeight-n.top}}function m(t,n){const r=n.left+n.width/2,c=n.top+n.height/2;t.style.transformOrigin=`${r}px ${c}px`}function I(t,n){t.style.clipPath=`polygon(
|
|
31
|
-
${
|
|
32
|
-
${
|
|
33
|
-
${
|
|
34
|
-
${
|
|
35
|
-
)`}function Ct(t,n){t.style.transform=`translateY(${-n.top}px)`}const Ot={spring:{stiffness:300,damping:30}};function St(t,n){return t.querySelector(`[data-hero-key="${n}"]`)}const At=(t={})=>{const n=t.physics??Ot,r=t.maxDistance??700;let c=null,s=E();return{in:async(i,e)=>{const a=i,l=Array.from(a.querySelectorAll("[data-hero-key]"));await s.promise;const y=l.map(o=>{const h=o.getAttribute("data-hero-key");if(!h)return null;const d=St(c,h);if(!d)return null;const u=o,f=x(c,d),p=x(a,u),$=f.left-p.left-e.scrollOffset.x,w=f.top-p.top-e.scrollOffset.y,b=f.width/p.width,C=f.height/p.height,Y=u.style.transform,D=u.style.position,F=u.style.transformOrigin,U=u.style.zIndex,V=u.style.willChange;return{toEl:u,dx:$,dy:w,dw:b,dh:C,originalTransform:Y,originalPosition:D,originalTransformOrigin:F,originalZIndex:U,originalWillChange:V}}).filter(o=>o!==null&&Math.abs(o.dy)<=r);return c=null,s=E(),y.length===0?{physics:n,tick:()=>{}}:{items:y.map(({toEl:o,dx:h,dy:d,dw:u,dh:f})=>({physics:n,tick:p=>{o.style.transform=`translate(${(1-p)*h}px, ${(1-p)*d}px) scale(${p+(1-p)*u}, ${p+(1-p)*f})`}})),schedule:"parallel",prepare:()=>{y.forEach(({toEl:o})=>{o.style.position="relative",o.style.transformOrigin="top left",o.style.zIndex="1000",o.style.willChange="transform"})},onEnd:()=>{y.forEach(({toEl:o,originalTransform:h,originalPosition:d,originalTransformOrigin:u,originalZIndex:f,originalWillChange:p})=>{o.style.transform=h,o.style.position=d,o.style.transformOrigin=u,o.style.zIndex=f,o.style.willChange=p})}}},out:async i=>({physics:n,tick:()=>{},prepare:()=>{c=i,s.resolve(),g(i),i.style.opacity="0"}})}},Tt={spring:{stiffness:220,damping:24,doubleSpring:1}};function Pt({detailRect:t,galleryRect:n,pageRect:r,scrollOffset:c}){const s=n.left-t.left+(n.width-t.width)/2-c.x,i=n.top-t.top+(n.height-t.height)/2-c.y,e=n.width/t.width,a=n.height/t.height,l=Math.max(e,a),y=t.top/r.height*100,o=(r.width-(t.left+t.width))/r.width*100,h=(r.height-(t.top+t.height))/r.height*100,d=t.left/r.width*100;return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:f=>{const p=1-f;return{clipPath:`inset(${y*p}% ${o*p}% ${h*p}% ${d*p}%)`,transform:`translate(${s*p}px, ${i*p}px) scale(${1+(l-1)*p})`}}}}function Lt({detailRect:t,galleryRect:n,pageRect:r,scrollOffset:c}){const s=n.left-t.left+(n.width-t.width)/2+c.x,i=n.top-t.top+(n.height-t.height)/2+c.y,e=n.width/t.width,a=n.height/t.height,l=Math.min(e,a),y=t.top/r.height*100,o=(r.width-(t.left+t.width))/r.width*100,h=(r.height-(t.top+t.height))/r.height*100,d=t.left/r.width*100;return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:f=>{const p=1-f;return{clipPath:`inset(${y*p}% ${o*p}% ${h*p}% ${d*p}%)`,transform:`translate(${s*p-c.x}px, ${i*p-c.y}px) scale(${1+(l-1)*p})`}}}}function kt(t,n,r){const c=t.querySelector("[data-instagram-detail-key]"),s=n.querySelector("[data-instagram-detail-key]");if(t.querySelectorAll("[data-instagram-detail-key]").length>1||n.querySelectorAll("[data-instagram-detail-key]").length>1)return null;let i=null,e=null,a=!1;if(!c&&s){e=s;const o=e.getAttribute("data-instagram-detail-key");if(!o)return null;i=t.querySelector(`[data-instagram-gallery-key="${o}"]`),i&&(a=!0)}else if(c&&!s){e=c;const o=e.getAttribute("data-instagram-detail-key");if(!o)return null;i=n.querySelector(`[data-instagram-gallery-key="${o}"]`),i&&(a=!1)}if(!i||!e)return null;const l=x(a?t:n,i),y=x(a?n:t,e);if(a){const o=Pt({detailRect:y,galleryRect:l,pageRect:n.getBoundingClientRect(),scrollOffset:r});return n.style.transformOrigin=o.transformOrigin,{isEnterMode:!0,inAnimation:o.animate}}else{const o=Lt({detailRect:y,galleryRect:l,pageRect:t.getBoundingClientRect(),scrollOffset:r});return t.style.transformOrigin=o.transformOrigin,{isEnterMode:!1,outAnimation:o.animate}}}const vt=(t={})=>{const n=t.physics??Tt,r=t.timeout??300;let c=null,s=null,i=null,e=null;return{in:async(a,{scrollOffset:l})=>{const y=a;return!await new Promise(h=>{c?h(!0):(s=h,setTimeout(()=>{s=null,h(!1)},r))})||!c?(e==null||e(),e=null,c=null,{physics:n,css:()=>({})}):(i=kt(c,y,l),e==null||e(),e=null,i?(c=null,{physics:n,css:h=>i!=null&&i.inAnimation?i.inAnimation(h):{}}):(c=null,{physics:n,css:()=>({})}))},out:async(a,l)=>{const y=new Promise(o=>{e=o});return{physics:n,prepare:()=>{i!=null&&i.isEnterMode?g(a):(g(a,l),a.style.zIndex="-1")},wait:async()=>{c=a,s&&(s(!0),s=null),await y},css:o=>i!=null&&i.outAnimation?i.outAnimation(o):{}}}}},mt={spring:{stiffness:50,damping:30}};function It(t){const n=x(document.body,t.positionedParent);return{top:t.scroll.y,left:0,width:n.width,height:window.innerHeight-n.top}}const _t=(t={})=>{const n=t.physics??mt,r=t.initialRotation??45,c=t.initialScale??.01,s=t.rotationTriggerPoint??.8;return{out:async(i,e)=>{const a=i.style.opacity;return{physics:{spring:{stiffness:80,damping:25}},from:1,to:0,prepare:()=>{g(i,e),i.style.opacity="1"},tick:l=>{i.style.opacity=String(l)},onEnd:()=>{i.style.opacity=a}}},in:async(i,e)=>{const a=It(e),l=i.style.transform,y=i.style.transformOrigin,o=i.style.position,h=i.style.zIndex;return{physics:n,from:0,to:1,prepare:()=>{const d=Math.min(a.width,a.height)*.4;i.style.setProperty("--max-border-radius",`${d}px`),i.style.setProperty("--border-radius-scale","1"),i.style.willChange="transform",i.style.backfaceVisibility="hidden";const u=a.left+a.width/2,f=a.top+a.height/2;i.style.transformOrigin=`${u}px ${f}px`,i.style.position="fixed",i.style.top=`${a.top}px`,i.style.left=`${a.left}px`,i.style.width=`${a.width}px`,i.style.height=`${a.height}px`,i.style.zIndex="1000",i.style.overflow="hidden",i.style.transform=`rotate(${r}deg) scale(${c}) translateZ(0)`,i.style.borderRadius="calc(var(--max-border-radius) * var(--border-radius-scale))",i.style.opacity="1"},tick:d=>{let u;if(d<=.05)u=c;else if(d<=s){const w=(d-.05)/(s-.05),b=Math.pow(w,9);u=c+(.8-c)*b}else{const w=(d-s)/(1-s);u=.8+.2*(1-Math.pow(1-w,3))}let f;const p=.7;if(d<=p)f=r;else{const w=(d-p)/(1-p),b=1-Math.pow(1-w,2);f=r*(1-b)}let $;if(d<=p)$=1;else{const w=(d-p)/(1-p);$=1-Math.pow(w,.5)}i.style.transform=`rotate(${f.toFixed(2)}deg) scale(${u.toFixed(4)}) translateZ(0)`,i.style.setProperty("--border-radius-scale",$.toFixed(4))},onEnd:()=>{i.style.willChange="",i.style.backfaceVisibility="",i.style.removeProperty("--max-border-radius"),i.style.removeProperty("--border-radius-scale"),i.style.transform=l,i.style.transformOrigin=y,i.style.position=o,i.style.zIndex=h,i.style.top="",i.style.left="",i.style.width="",i.style.height="",i.style.overflow="",i.style.borderRadius=""}}}}},Yt={spring:{stiffness:220,damping:24,doubleSpring:1}};function Dt({detailRect:t,galleryRect:n,pageRect:r,scrollOffset:c}){const s=n.left-t.left+(n.width-t.width)/2-c.x,i=n.top-t.top+(n.height-t.height)/2-c.y,e=n.width/t.width,a=n.height/t.height,l=Math.max(e,a),y=t.top/r.height*100,o=(r.width-(t.left+t.width))/r.width*100,h=(r.height-(t.top+t.height))/r.height*100,d=t.left/r.width*100;return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:f=>{const p=1-f;return{clipPath:`inset(${y*p}% ${o*p}% ${h*p}% ${d*p}%)`,transform:`translate(${s*p}px, ${i*p}px) scale(${1+(l-1)*p})`}}}}function Ft({galleryRect:t,detailRect:n,scrollOffset:r}){const c=n.left-t.left+(n.width-t.width)/2+r.x,s=n.top-t.top+(n.height-t.height)/2+r.y,i=n.width/t.width,e=n.height/t.height,a=Math.max(i,e);return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:y=>{const o=1-y;return{transform:`translate(${c*o-r.x}px, ${s*o-r.y}px) scale(${1+(a-1)*o})`,opacity:`${1-o}`}}}}function Ut({galleryRect:t,detailRect:n,scrollOffset:r}){const c=n.left-t.left+(n.width-t.width)/2-r.x,s=n.top-t.top+(n.height-t.height)/2-r.y,i=n.width/t.width,e=n.height/t.height,a=Math.max(i,e);return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:y=>{const o=1-y,h=y;return{transform:`translate(${c*o}px, ${s*o}px) scale(${1+(a-1)*o})`,opacity:`${h}`}}}}function Vt({detailRect:t,galleryRect:n,pageRect:r,scrollOffset:c}){const s=n.left-t.left+(n.width-t.width)/2+c.x,i=n.top-t.top+(n.height-t.height)/2+c.y,e=n.width/t.width,a=n.height/t.height,l=Math.min(e,a),y=t.top/r.height*100,o=(r.width-(t.left+t.width))/r.width*100,h=(r.height-(t.top+t.height))/r.height*100,d=t.left/r.width*100;return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:f=>{const p=1-f;return{clipPath:`inset(${y*p}% ${o*p}% ${h*p}% ${d*p}%)`,transform:`translate(${s*p-c.x}px, ${i*p-c.y}px) scale(${1+(l-1)*p})`}}}}function Ht(t,n,r){const c=t.querySelector("[data-pinterest-detail-key]"),s=n.querySelector("[data-pinterest-detail-key]");if(t.querySelectorAll("[data-pinterest-detail-key]").length>1||n.querySelectorAll("[data-pinterest-detail-key]").length>1)return null;let i=null,e=null,a=!1;if(!c&&s){e=s;const o=e.getAttribute("data-pinterest-detail-key");if(!o)return null;i=t.querySelector(`[data-pinterest-gallery-key="${o}"]`),i&&(a=!0)}else if(c&&!s){e=c;const o=e.getAttribute("data-pinterest-detail-key");if(!o)return null;i=n.querySelector(`[data-pinterest-gallery-key="${o}"]`),i&&(a=!1)}if(!i||!e)return null;const l=x(a?t:n,i),y=x(a?n:t,e);if(a){const o=Dt({detailRect:y,galleryRect:l,pageRect:n.getBoundingClientRect(),scrollOffset:r}),h=Ft({galleryRect:l,detailRect:y,scrollOffset:r});return n.style.transformOrigin=o.transformOrigin,t.style.transformOrigin=h.transformOrigin,{inAnimation:o.animate,outAnimation:h.animate}}else{const o=Ut({galleryRect:l,detailRect:y,scrollOffset:r}),h=Vt({detailRect:y,galleryRect:l,pageRect:t.getBoundingClientRect(),scrollOffset:r});return n.style.transformOrigin=o.transformOrigin,t.style.transformOrigin=h.transformOrigin,{inAnimation:o.animate,outAnimation:h.animate}}}const Xt=(t={})=>{const n=t.physics??Yt,r=t.timeout??300;let c=null,s=null,i=null,e=null;return{in:async(a,{scrollOffset:l})=>{const y=a;return!await new Promise(h=>{c?h(!0):(s=h,setTimeout(()=>{s=null,h(!1)},r))})||!c?(e==null||e(),e=null,c=null,{physics:n,css:()=>({})}):(i=Ht(c,y,l),e==null||e(),e=null,i?(c=null,{physics:n,css:h=>i?i.inAnimation(h):{}}):(c=null,{physics:n,css:()=>({})}))},out:async a=>{const l=new Promise(y=>{e=y});return{physics:n,prepare:()=>{g(a),a.style.zIndex="-1",c=a,s&&(s(!0),s=null)},wait:async()=>{await l},css:y=>i?i.outAnimation(y):{}}}}},zt={spring:{stiffness:100,damping:30}},Mt=(t={})=>{const n=t.physics??zt;return{in:r=>({physics:n,prepare:()=>{r.style.opacity="0",r.style.transform="rotate(-180deg)",r.style.transformOrigin="center center",r.style.willChange="transform, opacity"},css:c=>({transform:`rotate(${(c-1)*180}deg)`,opacity:c>.5?1:0}),onEnd:()=>{r.style.willChange="auto",r.style.transform="",r.style.transformOrigin="",r.style.opacity=""}}),out:(r,c)=>({physics:n,prepare:()=>{g(r,c),r.style.transformOrigin="center center",r.style.willChange="transform, opacity"},css:s=>({transform:`rotate(${(1-s)*180}deg)`,opacity:s>.5?1:0}),onEnd:()=>{r.style.willChange="auto"}})}},Wt={spring:{stiffness:5,damping:4}},Bt=(t={})=>{const n=t.direction??"up",r=t.physics??Wt,c=n==="up";let s=null,i=null,e=null;const a=()=>{if(s===null||i===null)return null;const l=Math.min(s,i),y=window.innerHeight;return Math.max(l,y)};return{in:l=>(i=l.offsetHeight,s!==null&&(e=a()),{physics:r,prepare:()=>{l.style.willChange="transform",l.style.backfaceVisibility="hidden",l.style.contain="layout paint"},tick:y=>{e===null&&(e=a());const o=e??window.innerHeight,h=c?(1-y)*o:(1-y)*-o;l.style.transform=`translate3d(0, ${h}px, 0)`},onEnd:()=>{l.style.willChange="auto",l.style.backfaceVisibility="",l.style.contain=""}}),out:(l,y)=>({physics:r,tick:o=>{e===null&&(e=a());const h=e??window.innerHeight,d=c?(1-o)*-h:(1-o)*h;l.style.transform=`translate3d(0, ${d}px, 0)`},prepare:()=>{s=l.offsetHeight,i!==null&&(e=a()),g(l,y),l.style.zIndex=c?"-1":"1",l.style.willChange="transform",l.style.backfaceVisibility="hidden",l.style.contain="layout paint",l.style.pointerEvents="none"}})}},qt={spring:{stiffness:200,damping:24}},jt={inertia:{acceleration:25,resistance:1.2}},Nt=.2;function T(t){const n=x(document.body,t.positionedParent),r=t.scroll.y,c=t.scrollingElement.offsetHeight-n.top,s={top:r,left:0,width:n.width,height:c};return{...s,centerX:s.left+s.width/2,centerY:s.top+s.height/2}}const Gt=(t={})=>{const{direction:n="enter"}=t,r=t.physics??(n==="enter"?qt:jt),c=t.scaleOffset??Nt;return n==="enter"?{in:(s,i)=>{const e=T(i);return{physics:r,prepare:()=>{s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.clipPath=`inset(${e.top}px 0 calc(100% - ${e.top+e.height}px) 0)`},css:a=>({transform:`translate3d(0, ${(1-a)*e.height}px, 0)`}),onEnd:()=>{s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain="",s.style.clipPath=""}}},out:(s,i)=>{const e=T(i),a=e.left+e.width/2,l=e.top+e.height/2;return{physics:r,prepare:()=>{g(s,i),s.style.zIndex="-1",s.style.willChange="transform, opacity",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.pointerEvents="none",s.style.transformOrigin=`${a}px ${l}px`,s.style.clipPath=`inset(${e.top}px 0 calc(100% - ${e.top+e.height}px) 0)`},css:y=>({transform:`scale(${1-c+y*c})`,opacity:y})}}}:{in:(s,i)=>{const e=T(i),a=e.left+e.width/2,l=e.top+e.height/2;return{physics:r,prepare:()=>{s.style.willChange="transform, opacity",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.transformOrigin=`${a}px ${l}px`,s.style.clipPath=`inset(${e.top}px 0 calc(100% - ${e.top+e.height}px) 0)`},css:y=>({transform:`scale(${1-c+y*c})`,opacity:y}),onEnd:()=>{s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain="",s.style.transformOrigin="",s.style.clipPath=""}}},out:(s,i)=>{const a=T(i).height,l=i.scroll.y;return{physics:r,prepare:()=>{g(s,i),s.style.zIndex="100",s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.pointerEvents="none",s.style.clipPath=`inset(${l}px 0 calc(100% - ${l+a}px) 0)`},css:y=>({transform:`translate3d(0, ${(1-y)*a}px, 0)`})}}}},Zt={spring:{stiffness:170,damping:22,doubleSpring:.8}},Jt=(t={})=>{const n=t.direction??"left",r=t.physics??Zt,c=n==="left";return{in:s=>({physics:r,prepare:()=>{s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint"},css:i=>({transform:`translate3d(${c?(1-i)*100:(1-i)*-100}%, 0, 0)`}),onEnd:()=>{s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain=""}}),out:(s,i)=>({physics:r,css:e=>({transform:`translate3d(${c?(1-e)*-100:(1-e)*100}%, 0, 0)`}),prepare:()=>{g(s,i),s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.pointerEvents="none"}})}},Kt=8,Qt={spring:{stiffness:400,damping:30,restDelta:.1,restSpeed:1e14}},Rt=(t={})=>{const n=t.direction??"left",r=t.physics??Qt,c=t.translateOffset??Kt,s=n==="left";let{promise:i,resolve:e}=E();return{in:a=>({physics:r,prepare:()=>{a.style.opacity="0",a.style.willChange="transform, opacity",a.style.backfaceVisibility="hidden",a.style.contain="layout paint"},wait:async()=>{if(i){await i;const l=E();i=l.promise,e=l.resolve}},css:l=>{const y=s?(1-l)*c:(1-l)*-c,o=`${l}`;return{transform:`translate3d(${y}px, 0, 0)`,opacity:o}},onEnd:()=>{a.style.opacity="1",a.style.willChange="auto",a.style.backfaceVisibility="",a.style.contain=""}}),out:(a,l)=>({physics:r,prepare:()=>{g(a,l),a.style.willChange="transform, opacity",a.style.backfaceVisibility="hidden",a.style.contain="layout paint",a.style.pointerEvents="none"},css:y=>{const o=s?(1-y)*-c:(1-y)*c,h=`${y}`;return{transform:`translate3d(${o}px, 0, 0)`,opacity:h}},onEnd:()=>{e&&e(),a.style.willChange="auto",a.style.backfaceVisibility="",a.style.contain=""}})}},ts={spring:{stiffness:17,damping:6}},L=20,P=800,ss=(t={})=>{const n=t.physics??ts;let r,c=null;return{in:s=>({physics:n,prepare:()=>{s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.transform=`perspective(${P}px) rotateY(${L}deg) translate3d(-100%, 0, 0)`},wait:async()=>{r&&await r},css:i=>{const e=(1-i)*L,a=-(1-i)*100;return{transform:`perspective(${P}px) rotateY(${e}deg) translate3d(${a}%, 0, 0)`}},onEnd:()=>{s.style.transform="",s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain=""}}),out:(s,i)=>(r=new Promise(e=>{c=e}),{physics:n,prepare:()=>{g(s,i),s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.pointerEvents="none",s.style.transform=`perspective(${P}px) rotateY(0deg) translate3d(0%, 0, 0)`},css:e=>{const a=1-e,l=a*L,y=a*100;return{transform:`perspective(${P}px) rotateY(${-l}deg) translate3d(${y}%, 0, 0)`}},onEnd:()=>{c&&c(),s.style.transform=""}})}},is={spring:{stiffness:350,damping:32,restDelta:.1,restSpeed:1e14}},ns=.05;function es(t){const n=x(document.body,t.positionedParent),r=t.scroll.y,c=window.innerHeight-n.top;return{top:r,left:0,width:n.width,height:c}}const as=(t={})=>{const n=t.physics??is,r=t.scaleOffset??ns;let{promise:c,resolve:s}=E();return{in:(i,e)=>{const a=es(e),l=a.left+a.width/2,y=a.top+a.height/2;return{physics:n,prepare:()=>{i.style.opacity="0",i.style.willChange="transform, opacity",i.style.backfaceVisibility="hidden",i.style.contain="layout paint",i.style.transformOrigin=`${l}px ${y}px`},wait:async()=>{if(c){await c;const o=E();c=o.promise,s=o.resolve}},css:o=>({transform:`scale(${1-r+o*r})`,opacity:o}),onEnd:()=>{i.style.opacity="1",i.style.willChange="auto",i.style.backfaceVisibility="",i.style.contain="",i.style.transformOrigin=""}}},out:(i,e)=>({physics:n,prepare:()=>{g(i,e),i.style.willChange="opacity",i.style.backfaceVisibility="hidden",i.style.contain="layout paint",i.style.pointerEvents="none"},css:a=>({opacity:a}),onEnd:()=>{s&&s()}})}};exports.blind=q;exports.curtainReveal=et;exports.depth=lt;exports.drill=ht;exports.fade=ft;exports.film=bt;exports.hero=At;exports.instagram=vt;exports.jaemin=_t;exports.pinterest=Xt;exports.rotate=Mt;exports.scroll=Bt;exports.sheet=Gt;exports.slide=Jt;exports.snap=Rt;exports.strip=ss;exports.swap=as;
|
|
30
|
+
`}h.push(w),d.appendChild(w)}return r.appendChild(d),{container:d,blinds:h}};return{out:r=>{let y=null;i=new Promise(d=>{c=d});const f=d=>{const h=1-d;return{transform:l==="horizontal"?`scaleX(${h})`:`scaleY(${h})`}};return{items:Array.from({length:o},(d,h)=>({physics:a,offset:.2,css:{get element(){return y==null?void 0:y.blinds[h]},style:f}})),schedule:"stagger",prepare:()=>{$(r),r.style.zIndex="1000",y=p(r,"hidden","left")},onStart:()=>{},onEnd:()=>{c&&c()}}},in:r=>{let y=null;const f=d=>{const h=1-d;return{transform:l==="horizontal"?`scaleX(${h})`:`scaleY(${h})`}};return{items:Array.from({length:o},(d,h)=>({physics:n,offset:.2,css:{get element(){return y==null?void 0:y.blinds[h]},style:f}})),schedule:"stagger",prepare:()=>{r.style.position="relative",r.style.zIndex="0",y=p(r,"closed","right")},onStart:()=>{},wait:async()=>{i&&await i,await U(e)},onEnd:()=>{y&&y.container&&y.container.remove()}}}}},J={spring:{stiffness:1,damping:1}},Q={spring:{stiffness:20,damping:25}},R="#000000",tt="circle",F="CURTAIN_REVEAL_OVERLAY_ID",st={position:"fixed",inset:"0",width:"100vw",height:"100%",zIndex:"9999",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"},it={position:"relative",display:"inline-block",height:"5.5rem",overflow:"hidden"},nt={display:"flex",height:"100%",willChange:"transform",transition:"transform 0.3s ease"},et={display:"inline-flex",alignItems:"center",justifyContent:"center",whiteSpace:"nowrap",fontSize:"5.5rem",fontWeight:"900",letterSpacing:"0.02em",color:"#FFFFFF"},at=.4,O=.5,ot=.2;function rt(t,e){switch(t){case"circle":return`circle(${e*100}% at 50% 50%)`;case"square":return`inset(${(1-e)*50}% round ${10*e}%)`;case"triangle":{const o=e*100;return`polygon(50% ${50-o}%, ${50-o}% ${50+o}%, ${50+o}% ${50+o}%)`}}}const lt=t=>t.reduce((e,o)=>e+o,0),ct=(t={})=>{const{background:e=R,texts:o=[],shape:l=tt,textStyle:s={}}=t,n=t.physics??Q,a=t.physics??J;return{out:(i,c)=>{const p=i.style.opacity;return{physics:a,from:1,to:0,prepare:()=>{$(i,c),i.style.opacity="1"},tick:r=>{const y=Math.max(0,r-at);i.style.opacity=String(y)},onEnd:()=>{i.style.opacity=p}}},in:i=>{let c=null,p=null,r=null;const y=document.body.style.overflow,f=document.getElementById(F);let u=[];const d=()=>{c=document.createElement("div"),c.id=F,Object.assign(c.style,st,{background:e}),document.body.appendChild(c),p=document.createElement("div"),Object.assign(p.style,it),c.appendChild(p),r=document.createElement("div"),Object.assign(r.style,nt),p.appendChild(r),o.forEach(h=>{const g=document.createElement("div");g.textContent=h,Object.assign(g.style,et,s),r.appendChild(g)}),u=Array.from(r.children).map(h=>h.getBoundingClientRect().width)};return{physics:n,from:0,to:1,prepare:()=>{document.body.style.overflow="hidden",i.style.opacity="1",f==null||f.remove(),d(),c&&p&&(c.style.clipPath="none",p.style.transform="scale(1)")},tick:h=>{if(!(!c||!p||!r)){if(h<=O&&o.length>0){const g=h/O,w=Math.min(Math.floor(g*o.length),o.length-1),b=u[w]??0,C=lt(u.slice(0,w));p.style.width=`${b}px`,r.style.transform=`translateX(-${C}px)`}if(h>O){const w=1-Math.max(0,Math.min(1,(h-O)/ot));c.style.clipPath=rt(l,w),p.style.transform=`scale(${w})`}}},onEnd:()=>{c==null||c.remove(),c=p=r=null,document.body.style.overflow=y}}}}},yt={spring:{stiffness:280,damping:30,restDelta:.1,restSpeed:1e14}},pt={spring:{stiffness:280,damping:30,restDelta:.1,restSpeed:1e14}},ht=.05;function A(t){const e=x(document.body,t.positionedParent),o=t.scroll.y,l=window.innerHeight-e.top;return{top:o,left:0,width:e.width,height:l}}const dt=(t={})=>{const{direction:e="enter"}=t,o=t.physics??(e==="enter"?yt:pt),l=t.scaleOffset??ht;let{promise:s,resolve:n}=E();return e==="enter"?{in:(a,i)=>{const c=A(i),p=c.left+c.width/2,r=c.top+c.height/2;return{physics:o,prepare:()=>{a.style.opacity="0",a.style.willChange="transform, opacity",a.style.backfaceVisibility="hidden",a.style.contain="layout paint",a.style.transformOrigin=`${p}px ${r}px`},wait:async()=>{if(s){await s;const y=E();s=y.promise,n=y.resolve}},css:y=>({transform:`scale(${1-l+y*l})`,opacity:y}),onEnd:()=>{a.style.opacity="1",a.style.willChange="auto",a.style.backfaceVisibility="",a.style.contain="",a.style.transformOrigin=""}}},out:(a,i)=>{const c=A(i),p=c.left+c.width/2,r=c.top+c.height/2+i.scrollOffset.y;return{physics:o,prepare:()=>{$(a,i),a.style.zIndex="-1",a.style.willChange="transform, opacity",a.style.backfaceVisibility="hidden",a.style.contain="layout paint",a.style.pointerEvents="none",a.style.transformOrigin=`${p}px ${r}px`},css:y=>({transform:`scale(${1+(1-y)*l})`,opacity:y}),onEnd:()=>{n&&n()}}}}:{in:(a,i)=>{const c=A(i),p=c.left+c.width/2,r=c.top+c.height/2;return{physics:o,prepare:()=>{a.style.opacity="0",a.style.willChange="transform, opacity",a.style.backfaceVisibility="hidden",a.style.contain="layout paint",a.style.transformOrigin=`${p}px ${r}px`},wait:async()=>{if(s){await s;const y=E();s=y.promise,n=y.resolve}},css:y=>({transform:`scale(${1+l-y*l})`,opacity:y}),onEnd:()=>{a.style.opacity="1",a.style.willChange="auto",a.style.backfaceVisibility="",a.style.contain="",a.style.transformOrigin=""}}},out:(a,i)=>{const c=A(i),p=c.left+c.width/2,r=c.top+c.height/2+i.scrollOffset.y;return{physics:o,prepare:()=>{$(a,i),a.style.zIndex="100",a.style.willChange="transform, opacity",a.style.backfaceVisibility="hidden",a.style.contain="layout paint",a.style.pointerEvents="none",a.style.transformOrigin=`${p}px ${r}px`},css:y=>({transform:`scale(${1-(1-y)*l})`,opacity:y}),onEnd:()=>{n&&n()}}}}},ft={spring:{stiffness:170,damping:22}},ut={spring:{stiffness:170,damping:22}},gt=(t={})=>{const{opacity:e=!1,direction:o="enter"}=t,l=t.physics??(o==="enter"?ft:ut);return o==="enter"?{in:s=>({physics:l,prepare:()=>{s.style.willChange=e?"transform, opacity":"transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint"},css:n=>{const a={transform:`translate3d(${(1-n)*100}%, 0, 0)`};return e&&(a.opacity=n),a},onEnd:()=>{s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain=""}}),out:(s,n)=>({physics:l,prepare:()=>{$(s,n),s.style.zIndex="-1",s.style.willChange=e?"transform, opacity":"transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.pointerEvents="none"},css:a=>{const i={transform:`translate3d(${-(1-a)*20}%, 0, 0)`};return e&&(i.opacity=a),i}})}:{in:s=>({physics:l,prepare:()=>{s.style.willChange=e?"transform, opacity":"transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint"},css:n=>{const a={transform:`translate3d(${-(1-n)*20}%, 0, 0)`};return e&&(a.opacity=n),a},onEnd:()=>{s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain=""}}),out:(s,n)=>({physics:l,prepare:()=>{$(s,n),s.style.zIndex="100",s.style.willChange=e?"transform, opacity":"transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.pointerEvents="none"},css:a=>{const i={transform:`translate3d(${(1-a)*100}%, 0, 0)`};return e&&(i.opacity=a),i}})}},wt={spring:{stiffness:180,damping:20,doubleSpring:!0}},$t={spring:{stiffness:170,damping:20,doubleSpring:!0}},bt=0,xt=(t={})=>{const{transitionDelay:e=bt}=t,o=t.physics??$t,l=t.physics??wt;let{promise:s,resolve:n}=E();return{in:a=>({physics:o,prepare:()=>{a.style.opacity="0",a.style.willChange="opacity"},wait:async()=>{if(s){await s;const i=E();s=i.promise,n=i.resolve,await U(e)}},css:i=>({opacity:i}),onEnd:()=>{a.style.willChange="auto",a.style.opacity="1"}}),out:(a,i)=>({physics:l,css:c=>({opacity:c}),prepare:()=>{$(a,i),a.style.willChange="opacity"},onEnd:()=>{n&&n(),a.style.willChange="auto"}})}},Et={scaleDown:{stiffness:20,damping:7},translate:{stiffness:15,damping:7},scaleUp:{stiffness:20,damping:7}},S={scaleDown:0,translate:.2,scaleUp:.8},Ct=.8,St="white",I=1e3/60,Ot=600;function At(t){const{items:e,from:o,to:l,recordFrame:s}=t,n=I/1e3,a=Math.abs(l-o),i=e.map(p=>({item:p,integrator:new v.SpringIntegrator({stiffness:p.spring.stiffness,damping:p.spring.damping}),state:{position:o,velocity:0},started:!1,settled:!1,settleTime:0}));for(let p=0;p<i.length;p++)(p===0||i[p].item.offset===0)&&(i[p].started=!0);s(0);let c=0;for(let p=1;p<=Ot;p++){const r=p*I;c=r;for(const y of i)!y.started||y.settled||(y.state=y.integrator.step(y.state,l,n),y.integrator.isSettled(y.state,l)?(y.settleTime+=n,y.settleTime>=v.SETTLE_THRESHOLD&&(y.state={position:l,velocity:0},y.settled=!0)):y.settleTime=0,y.item.tick(y.state.position));for(let y=1;y<i.length;y++){const f=i[y];if(f.started)continue;const u=i[y-1];if(!u.started)continue;(a===0?1:Math.abs(u.state.position-o)/a)>=f.item.offset&&(f.started=!0)}if(s(r),i.every(y=>y.settled))return r}return c}function P(t,e){return t!=null&&t.spring?{stiffness:t.spring.stiffness,damping:t.spring.damping}:e}function _(t){const{rect:e,springs:o,scale:l,direction:s,override:n}=t,a=s==="out"?{scale:1,translateY:-e.top}:{scale:l,translateY:-e.top+e.height},i=P(n,o.scaleDown),c=P(n,o.translate),p=P(n,o.scaleUp),r=s==="out"?1:0,y=s==="out"?0:1,f=s==="out"?[{spring:i,offset:S.scaleDown,tick:h=>{const g=1-h;a.scale=1-(1-l)*g}},{spring:c,offset:S.translate,tick:h=>{const g=1-h;a.translateY=-e.top-e.height*g}},{spring:p,offset:S.scaleUp,tick:h=>{const g=1-h;a.scale=l+(1-l)*g}}]:[{spring:i,offset:S.scaleDown,tick:h=>{a.scale=1-(1-l)*h}},{spring:c,offset:S.translate,tick:h=>{a.translateY=-e.top+e.height*(1-h)}},{spring:p,offset:S.scaleUp,tick:h=>{a.scale=l+(1-l)*h}}],u=[],d=At({items:f,from:r,to:y,recordFrame:h=>{u.push({time:h,scale:a.scale,translateY:a.translateY})}});return{snapshots:u,totalDuration:d}}function m(t,e,o){return t.length===0||e===0?[]:t.map(l=>({...o(l),offset:Math.min(1,Math.max(0,l.time/e))}))}const Tt=t=>{var s;const e=Et,o=Ct,l=((s=t==null?void 0:t.border)==null?void 0:s.color)??St;return{out:async(n,a)=>{const i=D(a),c=x(document.body,a.positionedParent),p=mt(l,{...i,top:c.top}),{snapshots:r,totalDuration:y}=_({rect:i,springs:e,scale:o,direction:"out",override:t==null?void 0:t.physics}),f=m(r,y,d=>({transform:`translateY(${d.translateY}px) scale(${d.scale})`})),u=kt.map(([d,h])=>m(r,y,g=>{const w=(i.width-i.width*g.scale)/2*.7*d,b=(i.height-i.height*g.scale)/2*.7*h;return{transform:`translate(${w}px, ${b}px)`}}));return{items:[{keyframes:{element:n,frames:f,duration:y}},...u.map((d,h)=>({keyframes:{element:Pt[h](p),frames:d,duration:y}}))],schedule:"parallel",prepare:()=>{$(n),Y(n,i),V(n,i),Lt(n,i);for(const d of p)a.positionedParent.appendChild(d)},onEnd:()=>{n.style.clipPath="",n.style.transformOrigin="",setTimeout(()=>{for(const d of p)a.positionedParent.removeChild(d)},1e3)}}},in:async(n,a)=>{const i=D(a),{snapshots:c,totalDuration:p}=_({rect:i,springs:e,scale:o,direction:"in",override:t==null?void 0:t.physics}),r=m(c,p,y=>({transform:`translateY(${y.translateY}px) scale(${y.scale})`}));return{items:[{keyframes:{element:n,frames:r,duration:p}}],schedule:"parallel",prepare:()=>{Y(n,i),V(n,i),n.style.transform=`translateY(${-i.top+i.height}px) scale(${o})`},onEnd:()=>{n.style.clipPath="",n.style.transformOrigin="",n.style.transform=""}}}}},kt=[[1,1],[-1,1],[1,-1],[-1,-1]],Pt=[t=>t.topLeft,t=>t.topRight,t=>t.bottomLeft,t=>t.bottomRight];function mt(t="white",e){const s=document.createElement("div");s.style.position="fixed",s.style.pointerEvents="none",s.style.zIndex="9999",s.style.top=`${e.top-1}px`,s.style.left=`${e.left-1}px`,s.style.width="15px",s.style.height="15px";const n=document.createElement("div");n.style.position="absolute",n.style.width="15px",n.style.height="1px",n.style.backgroundColor=t,n.style.top="0",n.style.left="0";const a=document.createElement("div");a.style.position="absolute",a.style.width="1px",a.style.height="15px",a.style.backgroundColor=t,a.style.top="0",a.style.left="0",s.appendChild(n),s.appendChild(a);const i=document.createElement("div");i.style.position="fixed",i.style.pointerEvents="none",i.style.zIndex="9999",i.style.top=`${e.top-1}px`,i.style.left=`${e.left+e.width-15+1}px`,i.style.width="15px",i.style.height="15px";const c=document.createElement("div");c.style.position="absolute",c.style.width="15px",c.style.height="1px",c.style.backgroundColor=t,c.style.top="0",c.style.right="0";const p=document.createElement("div");p.style.position="absolute",p.style.width="1px",p.style.height="15px",p.style.backgroundColor=t,p.style.top="0",p.style.right="0",i.appendChild(c),i.appendChild(p);const r=document.createElement("div");r.style.position="fixed",r.style.pointerEvents="none",r.style.zIndex="9999",r.style.top=`${e.top+e.height-15+1}px`,r.style.left=`${e.left-1}px`,r.style.width="15px",r.style.height="15px";const y=document.createElement("div");y.style.position="absolute",y.style.width="15px",y.style.height="1px",y.style.backgroundColor=t,y.style.bottom="0",y.style.left="0";const f=document.createElement("div");f.style.position="absolute",f.style.width="1px",f.style.height="15px",f.style.backgroundColor=t,f.style.bottom="0",f.style.left="0",r.appendChild(y),r.appendChild(f);const u=document.createElement("div");u.style.position="fixed",u.style.pointerEvents="none",u.style.zIndex="9999",u.style.top=`${e.top+e.height-15+1}px`,u.style.left=`${e.left+e.width-15+1}px`,u.style.width="15px",u.style.height="15px";const d=document.createElement("div");d.style.position="absolute",d.style.width="15px",d.style.height="1px",d.style.backgroundColor=t,d.style.bottom="0",d.style.right="0";const h=document.createElement("div");return h.style.position="absolute",h.style.width="1px",h.style.height="15px",h.style.backgroundColor=t,h.style.top="0",h.style.right="0",u.appendChild(d),u.appendChild(h),{topLeft:s,topRight:i,bottomLeft:r,bottomRight:u,*[Symbol.iterator](){yield s,yield i,yield r,yield u}}}function D(t){const e=x(document.body,t.positionedParent);return{top:t.scroll.y,left:0,width:e.width,height:window.innerHeight-e.top}}function Y(t,e){const o=e.left+e.width/2,l=e.top+e.height/2;t.style.transformOrigin=`${o}px ${l}px`}function V(t,e){t.style.clipPath=`polygon(
|
|
31
|
+
${e.left}px ${e.top}px,
|
|
32
|
+
${e.left+e.width}px ${e.top}px,
|
|
33
|
+
${e.left+e.width}px ${e.top+e.height}px,
|
|
34
|
+
${e.left}px ${e.top+e.height}px
|
|
35
|
+
)`}function Lt(t,e){t.style.transform=`translateY(${-e.top}px)`}const vt={spring:{stiffness:300,damping:30}};function Ft(t,e){return t.querySelector(`[data-hero-key="${e}"]`)}const It=(t={})=>{const e=t.physics??vt,o=t.maxDistance??700;let l=null,s=E();return{in:async(n,a)=>{const i=n,c=Array.from(i.querySelectorAll("[data-hero-key]"));await s.promise;const p=c.map(r=>{const y=r.getAttribute("data-hero-key");if(!y)return null;const f=Ft(l,y);if(!f)return null;const u=r,d=x(l,f),h=x(i,u),g=d.left-h.left-a.scrollOffset.x,w=d.top-h.top-a.scrollOffset.y,b=d.width/h.width,C=d.height/h.height,H=u.style.transform,M=u.style.position,X=u.style.transformOrigin,z=u.style.zIndex,W=u.style.willChange;return{toEl:u,dx:g,dy:w,dw:b,dh:C,originalTransform:H,originalPosition:M,originalTransformOrigin:X,originalZIndex:z,originalWillChange:W}}).filter(r=>r!==null&&Math.abs(r.dy)<=o);return l=null,s=E(),p.length===0?{physics:e,tick:()=>{}}:{items:p.map(({toEl:r,dx:y,dy:f,dw:u,dh:d})=>({physics:e,tick:h=>{r.style.transform=`translate(${(1-h)*y}px, ${(1-h)*f}px) scale(${h+(1-h)*u}, ${h+(1-h)*d})`}})),schedule:"parallel",prepare:()=>{p.forEach(({toEl:r})=>{r.style.position="relative",r.style.transformOrigin="top left",r.style.zIndex="1000",r.style.willChange="transform"})},onEnd:()=>{p.forEach(({toEl:r,originalTransform:y,originalPosition:f,originalTransformOrigin:u,originalZIndex:d,originalWillChange:h})=>{r.style.transform=y,r.style.position=f,r.style.transformOrigin=u,r.style.zIndex=d,r.style.willChange=h})}}},out:async n=>({physics:e,tick:()=>{},prepare:()=>{l=n,s.resolve(),$(n),n.style.opacity="0"}})}},_t={spring:{stiffness:420,damping:34}};function Dt({detailRect:t,galleryRect:e,pageRect:o,scrollOffset:l}){const s=e.left-t.left+(e.width-t.width)/2-l.x,n=e.top-t.top+(e.height-t.height)/2-l.y,a=e.width/t.width,i=e.height/t.height,c=Math.max(a,i),p=t.top/o.height*100,r=(o.width-(t.left+t.width))/o.width*100,y=(o.height-(t.top+t.height))/o.height*100,f=t.left/o.width*100;return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:d=>{const h=1-d;return{clipPath:`inset(${p*h}% ${r*h}% ${y*h}% ${f*h}%)`,transform:`translate(${s*h}px, ${n*h}px) scale(${1+(c-1)*h})`}}}}function Yt({detailRect:t,galleryRect:e,pageRect:o,scrollOffset:l}){const s=e.left-t.left+(e.width-t.width)/2+l.x,n=e.top-t.top+(e.height-t.height)/2+l.y,a=e.width/t.width,i=e.height/t.height,c=Math.min(a,i),p=t.top/o.height*100,r=(o.width-(t.left+t.width))/o.width*100,y=(o.height-(t.top+t.height))/o.height*100,f=t.left/o.width*100;return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:d=>{const h=1-d;return{clipPath:`inset(${p*h}% ${r*h}% ${y*h}% ${f*h}%)`,transform:`translate(${s*h-l.x}px, ${n*h-l.y}px) scale(${1+(c-1)*h})`}}}}function Vt(t,e,o){const l=t.querySelector("[data-instagram-detail-key]"),s=e.querySelector("[data-instagram-detail-key]");if(t.querySelectorAll("[data-instagram-detail-key]").length>1||e.querySelectorAll("[data-instagram-detail-key]").length>1)return null;let n=null,a=null,i=!1;if(!l&&s){a=s;const r=a.getAttribute("data-instagram-detail-key");if(!r)return null;n=t.querySelector(`[data-instagram-gallery-key="${r}"]`),n&&(i=!0)}else if(l&&!s){a=l;const r=a.getAttribute("data-instagram-detail-key");if(!r)return null;n=e.querySelector(`[data-instagram-gallery-key="${r}"]`),n&&(i=!1)}if(!n||!a)return null;const c=x(i?t:e,n),p=x(i?e:t,a);if(i){const r=Dt({detailRect:p,galleryRect:c,pageRect:e.getBoundingClientRect(),scrollOffset:o});return e.style.transformOrigin=r.transformOrigin,{isEnterMode:!0,inAnimation:r.animate}}else{const r=Yt({detailRect:p,galleryRect:c,pageRect:t.getBoundingClientRect(),scrollOffset:o});return t.style.transformOrigin=r.transformOrigin,{isEnterMode:!1,outAnimation:r.animate}}}const Ut=(t={})=>{const e=t.physics??_t,o=t.timeout??300;let l=null,s=null,n=null,a=null;return{in:async(i,{scrollOffset:c})=>{const p=i;return!await new Promise(y=>{l?y(!0):(s=y,setTimeout(()=>{s=null,y(!1)},o))})||!l?(a==null||a(),a=null,l=null,{physics:e,css:()=>({})}):(n=Vt(l,p,c),a==null||a(),a=null,n?(l=null,{physics:e,prepare:()=>{i.style.willChange="transform, clip-path",i.style.backfaceVisibility="hidden",i.style.contain="layout paint"},css:y=>n!=null&&n.inAnimation?n.inAnimation(y):{},onEnd:()=>{i.style.willChange="auto",i.style.backfaceVisibility="",i.style.contain=""}}):(l=null,{physics:e,css:()=>({})}))},out:async(i,c)=>{const p=new Promise(r=>{a=r});return{physics:e,prepare:()=>{n!=null&&n.isEnterMode?$(i):($(i,c),i.style.zIndex="-1"),i.style.willChange="transform, clip-path",i.style.backfaceVisibility="hidden",i.style.contain="layout paint"},wait:async()=>{l=i,s&&(s(!0),s=null),await p},css:r=>n!=null&&n.outAnimation?n.outAnimation(r):{},onEnd:()=>{i.style.willChange="auto",i.style.backfaceVisibility="",i.style.contain=""}}}}},Ht={spring:{stiffness:50,damping:30}};function Mt(t){const e=x(document.body,t.positionedParent);return{top:t.scroll.y,left:0,width:e.width,height:window.innerHeight-e.top}}const Xt=(t={})=>{const e=t.physics??Ht,o=t.initialRotation??45,l=t.initialScale??.01,s=t.rotationTriggerPoint??.8;return{out:async(n,a)=>{const i=n.style.opacity;return{physics:{spring:{stiffness:80,damping:25}},from:1,to:0,prepare:()=>{$(n,a),n.style.opacity="1"},tick:c=>{n.style.opacity=String(c)},onEnd:()=>{n.style.opacity=i}}},in:async(n,a)=>{const i=Mt(a),c=n.style.transform,p=n.style.transformOrigin,r=n.style.position,y=n.style.zIndex;return{physics:e,from:0,to:1,prepare:()=>{const f=Math.min(i.width,i.height)*.4;n.style.setProperty("--max-border-radius",`${f}px`),n.style.setProperty("--border-radius-scale","1"),n.style.willChange="transform",n.style.backfaceVisibility="hidden";const u=i.left+i.width/2,d=i.top+i.height/2;n.style.transformOrigin=`${u}px ${d}px`,n.style.position="fixed",n.style.top=`${i.top}px`,n.style.left=`${i.left}px`,n.style.width=`${i.width}px`,n.style.height=`${i.height}px`,n.style.zIndex="1000",n.style.overflow="hidden",n.style.transform=`rotate(${o}deg) scale(${l}) translateZ(0)`,n.style.borderRadius="calc(var(--max-border-radius) * var(--border-radius-scale))",n.style.opacity="1"},tick:f=>{let u;if(f<=.05)u=l;else if(f<=s){const w=(f-.05)/(s-.05),b=Math.pow(w,9);u=l+(.8-l)*b}else{const w=(f-s)/(1-s);u=.8+.2*(1-Math.pow(1-w,3))}let d;const h=.7;if(f<=h)d=o;else{const w=(f-h)/(1-h),b=1-Math.pow(1-w,2);d=o*(1-b)}let g;if(f<=h)g=1;else{const w=(f-h)/(1-h);g=1-Math.pow(w,.5)}n.style.transform=`rotate(${d.toFixed(2)}deg) scale(${u.toFixed(4)}) translateZ(0)`,n.style.setProperty("--border-radius-scale",g.toFixed(4))},onEnd:()=>{n.style.willChange="",n.style.backfaceVisibility="",n.style.removeProperty("--max-border-radius"),n.style.removeProperty("--border-radius-scale"),n.style.transform=c,n.style.transformOrigin=p,n.style.position=r,n.style.zIndex=y,n.style.top="",n.style.left="",n.style.width="",n.style.height="",n.style.overflow="",n.style.borderRadius=""}}}}},zt={spring:{stiffness:340,damping:30,doubleSpring:1}};function Wt({detailRect:t,galleryRect:e,pageRect:o,scrollOffset:l}){const s=e.left-t.left+(e.width-t.width)/2-l.x,n=e.top-t.top+(e.height-t.height)/2-l.y,a=e.width/t.width,i=e.height/t.height,c=Math.max(a,i),p=t.top/o.height*100,r=(o.width-(t.left+t.width))/o.width*100,y=(o.height-(t.top+t.height))/o.height*100,f=t.left/o.width*100;return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:d=>{const h=1-d;return{clipPath:`inset(${p*h}% ${r*h}% ${y*h}% ${f*h}%)`,transform:`translate(${s*h}px, ${n*h}px) scale(${1+(c-1)*h})`}}}}function Bt({galleryRect:t,detailRect:e,scrollOffset:o}){const l=e.left-t.left+(e.width-t.width)/2+o.x,s=e.top-t.top+(e.height-t.height)/2+o.y,n=e.width/t.width,a=e.height/t.height,i=Math.max(n,a);return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:p=>{const r=1-p;return{transform:`translate(${l*r-o.x}px, ${s*r-o.y}px) scale(${1+(i-1)*r})`,opacity:`${1-r}`}}}}function qt({galleryRect:t,detailRect:e,scrollOffset:o}){const l=e.left-t.left+(e.width-t.width)/2-o.x,s=e.top-t.top+(e.height-t.height)/2-o.y,n=e.width/t.width,a=e.height/t.height,i=Math.max(n,a);return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:p=>{const r=1-p,y=p;return{transform:`translate(${l*r}px, ${s*r}px) scale(${1+(i-1)*r})`,opacity:`${y}`}}}}function jt({detailRect:t,galleryRect:e,pageRect:o,scrollOffset:l}){const s=e.left-t.left+(e.width-t.width)/2+l.x,n=e.top-t.top+(e.height-t.height)/2+l.y,a=e.width/t.width,i=e.height/t.height,c=Math.min(a,i),p=t.top/o.height*100,r=(o.width-(t.left+t.width))/o.width*100,y=(o.height-(t.top+t.height))/o.height*100,f=t.left/o.width*100;return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:d=>{const h=1-d;return{clipPath:`inset(${p*h}% ${r*h}% ${y*h}% ${f*h}%)`,transform:`translate(${s*h-l.x}px, ${n*h-l.y}px) scale(${1+(c-1)*h})`}}}}function Nt(t,e,o){const l=t.querySelector("[data-pinterest-detail-key]"),s=e.querySelector("[data-pinterest-detail-key]");if(t.querySelectorAll("[data-pinterest-detail-key]").length>1||e.querySelectorAll("[data-pinterest-detail-key]").length>1)return null;let n=null,a=null,i=!1;if(!l&&s){a=s;const r=a.getAttribute("data-pinterest-detail-key");if(!r)return null;n=t.querySelector(`[data-pinterest-gallery-key="${r}"]`),n&&(i=!0)}else if(l&&!s){a=l;const r=a.getAttribute("data-pinterest-detail-key");if(!r)return null;n=e.querySelector(`[data-pinterest-gallery-key="${r}"]`),n&&(i=!1)}if(!n||!a)return null;const c=x(i?t:e,n),p=x(i?e:t,a);if(i){const r=Wt({detailRect:p,galleryRect:c,pageRect:e.getBoundingClientRect(),scrollOffset:o}),y=Bt({galleryRect:c,detailRect:p,scrollOffset:o});return e.style.transformOrigin=r.transformOrigin,t.style.transformOrigin=y.transformOrigin,{inAnimation:r.animate,outAnimation:y.animate}}else{const r=qt({galleryRect:c,detailRect:p,scrollOffset:o}),y=jt({detailRect:p,galleryRect:c,pageRect:t.getBoundingClientRect(),scrollOffset:o});return e.style.transformOrigin=r.transformOrigin,t.style.transformOrigin=y.transformOrigin,{inAnimation:r.animate,outAnimation:y.animate}}}const Gt=(t={})=>{const e=t.physics??zt,o=t.timeout??300;let l=null,s=null,n=null,a=null;return{in:async(i,{scrollOffset:c})=>{const p=i;return!await new Promise(y=>{l?y(!0):(s=y,setTimeout(()=>{s=null,y(!1)},o))})||!l?(a==null||a(),a=null,l=null,{physics:e,css:()=>({})}):(n=Nt(l,p,c),a==null||a(),a=null,n?(l=null,{physics:e,prepare:()=>{i.style.willChange="transform, clip-path",i.style.backfaceVisibility="hidden",i.style.contain="layout paint"},css:y=>n?n.inAnimation(y):{},onEnd:()=>{i.style.willChange="auto",i.style.backfaceVisibility="",i.style.contain=""}}):(l=null,{physics:e,css:()=>({})}))},out:async i=>{const c=new Promise(p=>{a=p});return{physics:e,prepare:()=>{$(i),i.style.zIndex="-1",i.style.willChange="transform, clip-path, opacity",i.style.backfaceVisibility="hidden",i.style.contain="layout paint",l=i,s&&(s(!0),s=null)},wait:async()=>{await c},css:p=>n?n.outAnimation(p):{},onEnd:()=>{i.style.willChange="auto",i.style.backfaceVisibility="",i.style.contain=""}}}}},Zt={spring:{stiffness:100,damping:30}},Kt=(t={})=>{const e=t.physics??Zt;return{in:o=>({physics:e,prepare:()=>{o.style.opacity="0",o.style.transform="rotate(-180deg)",o.style.transformOrigin="center center",o.style.willChange="transform, opacity"},css:l=>({transform:`rotate(${(l-1)*180}deg)`,opacity:l>.5?1:0}),onEnd:()=>{o.style.willChange="auto",o.style.transform="",o.style.transformOrigin="",o.style.opacity=""}}),out:(o,l)=>({physics:e,prepare:()=>{$(o,l),o.style.transformOrigin="center center",o.style.willChange="transform, opacity"},css:s=>({transform:`rotate(${(1-s)*180}deg)`,opacity:s>.5?1:0}),onEnd:()=>{o.style.willChange="auto"}})}},Jt={spring:{stiffness:5,damping:4}},Qt=(t={})=>{const e=t.direction??"up",o=t.physics??Jt,l=e==="up";let s=null,n=null,a=null;const i=()=>{if(s===null||n===null)return null;const c=Math.min(s,n),p=window.innerHeight;return Math.max(c,p)};return{in:c=>(n=c.offsetHeight,s!==null&&(a=i()),{physics:o,prepare:()=>{c.style.willChange="transform",c.style.backfaceVisibility="hidden",c.style.contain="layout paint"},tick:p=>{a===null&&(a=i());const r=a??window.innerHeight,y=l?(1-p)*r:(1-p)*-r;c.style.transform=`translate3d(0, ${y}px, 0)`},onEnd:()=>{c.style.willChange="auto",c.style.backfaceVisibility="",c.style.contain=""}}),out:(c,p)=>({physics:o,tick:r=>{a===null&&(a=i());const y=a??window.innerHeight,f=l?(1-r)*-y:(1-r)*y;c.style.transform=`translate3d(0, ${f}px, 0)`},prepare:()=>{s=c.offsetHeight,n!==null&&(a=i()),$(c,p),c.style.zIndex=l?"-1":"1",c.style.willChange="transform",c.style.backfaceVisibility="hidden",c.style.contain="layout paint",c.style.pointerEvents="none"}})}},Rt={spring:{stiffness:200,damping:24}},ts={inertia:{acceleration:25,resistance:1.2}},ss=.2;function T(t){const e=x(document.body,t.positionedParent),o=t.scroll.y,l=t.scrollingElement.offsetHeight-e.top,s={top:o,left:0,width:e.width,height:l};return{...s,centerX:s.left+s.width/2,centerY:s.top+s.height/2}}const is=(t={})=>{const{direction:e="enter"}=t,o=t.physics??(e==="enter"?Rt:ts),l=t.scaleOffset??ss;return e==="enter"?{in:(s,n)=>{const a=T(n);return{physics:o,prepare:()=>{s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.clipPath=`inset(${a.top}px 0 calc(100% - ${a.top+a.height}px) 0)`},css:i=>({transform:`translate3d(0, ${(1-i)*a.height}px, 0)`}),onEnd:()=>{s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain="",s.style.clipPath=""}}},out:(s,n)=>{const a=T(n),i=a.left+a.width/2,c=a.top+a.height/2;return{physics:o,prepare:()=>{$(s,n),s.style.zIndex="-1",s.style.willChange="transform, opacity",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.pointerEvents="none",s.style.transformOrigin=`${i}px ${c}px`,s.style.clipPath=`inset(${a.top}px 0 calc(100% - ${a.top+a.height}px) 0)`},css:p=>({transform:`scale(${1-l+p*l})`,opacity:p})}}}:{in:(s,n)=>{const a=T(n),i=a.left+a.width/2,c=a.top+a.height/2;return{physics:o,prepare:()=>{s.style.willChange="transform, opacity",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.transformOrigin=`${i}px ${c}px`,s.style.clipPath=`inset(${a.top}px 0 calc(100% - ${a.top+a.height}px) 0)`},css:p=>({transform:`scale(${1-l+p*l})`,opacity:p}),onEnd:()=>{s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain="",s.style.transformOrigin="",s.style.clipPath=""}}},out:(s,n)=>{const i=T(n).height,c=n.scroll.y;return{physics:o,prepare:()=>{$(s,n),s.style.zIndex="100",s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.pointerEvents="none",s.style.clipPath=`inset(${c}px 0 calc(100% - ${c+i}px) 0)`},css:p=>({transform:`translate3d(0, ${(1-p)*i}px, 0)`})}}}},ns={spring:{stiffness:170,damping:22,doubleSpring:.8}},es=(t={})=>{const e=t.direction??"left",o=t.physics??ns,l=e==="left";return{in:s=>({physics:o,prepare:()=>{s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint"},css:n=>({transform:`translate3d(${l?(1-n)*100:(1-n)*-100}%, 0, 0)`}),onEnd:()=>{s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain=""}}),out:(s,n)=>({physics:o,css:a=>({transform:`translate3d(${l?(1-a)*-100:(1-a)*100}%, 0, 0)`}),prepare:()=>{$(s,n),s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.pointerEvents="none"}})}},as=8,os={spring:{stiffness:400,damping:30,restDelta:.1,restSpeed:1e14}},rs=(t={})=>{const e=t.direction??"left",o=t.physics??os,l=t.translateOffset??as,s=e==="left";let{promise:n,resolve:a}=E();return{in:i=>({physics:o,prepare:()=>{i.style.opacity="0",i.style.willChange="transform, opacity",i.style.backfaceVisibility="hidden",i.style.contain="layout paint"},wait:async()=>{if(n){await n;const c=E();n=c.promise,a=c.resolve}},css:c=>{const p=s?(1-c)*l:(1-c)*-l,r=`${c}`;return{transform:`translate3d(${p}px, 0, 0)`,opacity:r}},onEnd:()=>{i.style.opacity="1",i.style.willChange="auto",i.style.backfaceVisibility="",i.style.contain=""}}),out:(i,c)=>({physics:o,prepare:()=>{$(i,c),i.style.willChange="transform, opacity",i.style.backfaceVisibility="hidden",i.style.contain="layout paint",i.style.pointerEvents="none"},css:p=>{const r=s?(1-p)*-l:(1-p)*l,y=`${p}`;return{transform:`translate3d(${r}px, 0, 0)`,opacity:y}},onEnd:()=>{a&&a(),i.style.willChange="auto",i.style.backfaceVisibility="",i.style.contain=""}})}},ls={spring:{stiffness:17,damping:6}},L=20,k=800,cs=(t={})=>{const e=t.physics??ls;let o,l=null;return{in:s=>({physics:e,prepare:()=>{s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.transform=`perspective(${k}px) rotateY(${L}deg) translate3d(-100%, 0, 0)`},wait:async()=>{o&&await o},css:n=>{const a=(1-n)*L,i=-(1-n)*100;return{transform:`perspective(${k}px) rotateY(${a}deg) translate3d(${i}%, 0, 0)`}},onEnd:()=>{s.style.transform="",s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain=""}}),out:(s,n)=>(o=new Promise(a=>{l=a}),{physics:e,prepare:()=>{$(s,n),s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.pointerEvents="none",s.style.transform=`perspective(${k}px) rotateY(0deg) translate3d(0%, 0, 0)`},css:a=>{const i=1-a,c=i*L,p=i*100;return{transform:`perspective(${k}px) rotateY(${-c}deg) translate3d(${p}%, 0, 0)`}},onEnd:()=>{l&&l(),s.style.transform=""}})}},ys={spring:{stiffness:350,damping:32,restDelta:.1,restSpeed:1e14}},ps=.05;function hs(t){const e=x(document.body,t.positionedParent),o=t.scroll.y,l=window.innerHeight-e.top;return{top:o,left:0,width:e.width,height:l}}const ds=(t={})=>{const e=t.physics??ys,o=t.scaleOffset??ps;let{promise:l,resolve:s}=E();return{in:(n,a)=>{const i=hs(a),c=i.left+i.width/2,p=i.top+i.height/2;return{physics:e,prepare:()=>{n.style.opacity="0",n.style.willChange="transform, opacity",n.style.backfaceVisibility="hidden",n.style.contain="layout paint",n.style.transformOrigin=`${c}px ${p}px`},wait:async()=>{if(l){await l;const r=E();l=r.promise,s=r.resolve}},css:r=>({transform:`scale(${1-o+r*o})`,opacity:r}),onEnd:()=>{n.style.opacity="1",n.style.willChange="auto",n.style.backfaceVisibility="",n.style.contain="",n.style.transformOrigin=""}}},out:(n,a)=>({physics:e,prepare:()=>{$(n,a),n.style.willChange="opacity",n.style.backfaceVisibility="hidden",n.style.contain="layout paint",n.style.pointerEvents="none"},css:i=>({opacity:i}),onEnd:()=>{s&&s()}})}};exports.blind=K;exports.curtainReveal=ct;exports.depth=dt;exports.drill=gt;exports.fade=xt;exports.film=Tt;exports.hero=It;exports.instagram=Ut;exports.jaemin=Xt;exports.pinterest=Gt;exports.rotate=Kt;exports.scroll=Qt;exports.sheet=is;exports.slide=es;exports.snap=rs;exports.strip=cs;exports.swap=ds;
|