@ssgoi/core 2.5.6 → 3.1.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.
Files changed (54) hide show
  1. package/dist/animator/animation.d.ts +57 -0
  2. package/dist/animator/animation.d.ts.map +1 -0
  3. package/dist/animator/index.d.ts +4 -3
  4. package/dist/animator/index.d.ts.map +1 -1
  5. package/dist/animator/multi-animator.d.ts +98 -0
  6. package/dist/animator/multi-animator.d.ts.map +1 -0
  7. package/dist/index.cjs +2 -2
  8. package/dist/index.d.ts +1 -0
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +603 -658
  11. package/dist/transition/create-transition-callback.d.ts +2 -1
  12. package/dist/transition/create-transition-callback.d.ts.map +1 -1
  13. package/dist/transition/transition-scope.d.ts +36 -0
  14. package/dist/transition/transition-scope.d.ts.map +1 -0
  15. package/dist/transition/transition-strategy.d.ts +20 -9
  16. package/dist/transition/transition-strategy.d.ts.map +1 -1
  17. package/dist/transition/transition.d.ts.map +1 -1
  18. package/dist/transitions/blur.d.ts +5 -5
  19. package/dist/transitions/blur.d.ts.map +1 -1
  20. package/dist/transitions/bounce.d.ts +5 -5
  21. package/dist/transitions/bounce.d.ts.map +1 -1
  22. package/dist/transitions/fade.d.ts +5 -5
  23. package/dist/transitions/fade.d.ts.map +1 -1
  24. package/dist/transitions/fly.d.ts +5 -5
  25. package/dist/transitions/fly.d.ts.map +1 -1
  26. package/dist/transitions/index.cjs +1 -1
  27. package/dist/transitions/index.js +206 -207
  28. package/dist/transitions/mask.d.ts +5 -5
  29. package/dist/transitions/mask.d.ts.map +1 -1
  30. package/dist/transitions/none.d.ts +3 -3
  31. package/dist/transitions/none.d.ts.map +1 -1
  32. package/dist/transitions/rotate.d.ts +5 -5
  33. package/dist/transitions/rotate.d.ts.map +1 -1
  34. package/dist/transitions/scale.d.ts +5 -5
  35. package/dist/transitions/scale.d.ts.map +1 -1
  36. package/dist/transitions/slide.d.ts +5 -5
  37. package/dist/transitions/slide.d.ts.map +1 -1
  38. package/dist/types.cjs +1 -1
  39. package/dist/types.d.ts +91 -78
  40. package/dist/types.d.ts.map +1 -1
  41. package/dist/types.js +60 -11
  42. package/dist/view-transitions/blind.d.ts +0 -1
  43. package/dist/view-transitions/blind.d.ts.map +1 -1
  44. package/dist/view-transitions/fade.d.ts.map +1 -1
  45. package/dist/view-transitions/index.cjs +13 -13
  46. package/dist/view-transitions/index.js +472 -479
  47. package/dist/view-transitions/scroll.d.ts.map +1 -1
  48. package/dist/view-transitions/slide.d.ts.map +1 -1
  49. package/dist/view-transitions/strip.d.ts.map +1 -1
  50. package/package.json +1 -1
  51. package/dist/animator/animation-scheduler.d.ts +0 -34
  52. package/dist/animator/animation-scheduler.d.ts.map +0 -1
  53. package/dist/test-utils.d.ts +0 -46
  54. package/dist/test-utils.d.ts.map +0 -1
@@ -1,4 +1,4 @@
1
- import { TransitionKey } from '../types';
1
+ import { StyleObject, TransitionKey } from '../types';
2
2
  interface SlideOptions {
3
3
  direction?: "left" | "right" | "up" | "down";
4
4
  distance?: number | string;
@@ -13,19 +13,19 @@ interface SlideOptions {
13
13
  }
14
14
  export declare const slide: (options?: SlideOptions) => {
15
15
  key?: TransitionKey | undefined;
16
- in: (element: HTMLElement) => {
16
+ in: () => {
17
17
  spring: {
18
18
  stiffness?: number;
19
19
  damping?: number;
20
20
  };
21
- tick: (progress: number) => void;
21
+ css: (progress: number) => StyleObject;
22
22
  };
23
- out: (element: HTMLElement) => {
23
+ out: () => {
24
24
  spring: {
25
25
  stiffness?: number;
26
26
  damping?: number;
27
27
  };
28
- tick: (progress: number) => void;
28
+ css: (progress: number) => StyleObject;
29
29
  };
30
30
  };
31
31
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"slide.d.ts","sourceRoot":"","sources":["../../src/lib/transitions/slide.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,UAAU,YAAY;IACpB,S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;sBACR,MAAM;;wBAuDQ,MAAM,KAAG,WAAW;;CAqB/C,CAAC"}
package/dist/types.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function e(i){return("tick"in i||"css"in i)&&!("springs"in i)}function s(i){return"springs"in i}function n(i){return"css"in i&&typeof i.css=="function"}function t(i){return"tick"in i&&typeof i.tick=="function"}function r(i){if(n(i)&&t(i))throw new Error("SingleSpringConfig cannot have both 'tick' and 'css' defined. Use one or the other.")}exports.isCssAnimation=n;exports.isMultiSpring=s;exports.isSingleSpring=e;exports.isTickAnimation=t;exports.validateAnimationMode=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function p(n){return("tick"in n||"css"in n)&&!("springs"in n)}function r(n){return"springs"in n}function s(n){return"css"in n&&typeof n.css=="function"}function a(n){return"tick"in n&&typeof n.tick=="function"}function o(n){if(s(n)&&a(n))throw new Error("SingleSpringConfig cannot have both 'tick' and 'css' defined. Use one or the other.")}function c(n){if(n.tick&&n.css)throw new Error("SpringItem cannot have both 'tick' and 'css' defined. Use one or the other.")}async function d(n){const i=await n;return r(i)?(i.springs.forEach(c),i):(o(i),{prepare:i.prepare,wait:i.wait,onStart:i.onStart,onEnd:i.onEnd,springs:[{spring:i.spring,tick:i.tick,css:i.css}],schedule:"parallel"})}function g(n){const i=n.schedule??"parallel",l=n.springs.map(t=>{let e;switch(i){case"parallel":e=0;break;case"sequential":e=1;break;case"stagger":e=Math.max(0,Math.min(1,t.offset??0));break;default:e=0}return{...t,normalizedOffset:e}}),{schedule:S,...u}=n;return{...u,springs:l}}exports.isCssAnimation=s;exports.isMultiSpring=r;exports.isSingleSpring=p;exports.isTickAnimation=a;exports.normalizeMultiSpringSchedule=g;exports.normalizeToMultiSpring=d;exports.validateAnimationMode=o;exports.validateSpringItem=c;
package/dist/types.d.ts CHANGED
@@ -8,12 +8,12 @@ export type SpringConfig = {
8
8
  */
9
9
  export type StyleObject = Record<string, number | string>;
10
10
  /**
11
- * Schedule strategy for multi-spring animations
12
- * - overlap: All springs start immediately (parallel execution)
13
- * - wait: Each spring waits for previous to complete (sequential)
14
- * - chain: Springs start with offset delays
11
+ * Schedule strategy for multi-spring animations (user-facing)
12
+ * - parallel: All springs start immediately (offset = 0)
13
+ * - sequential: Each spring waits for previous to complete (offset = 1)
14
+ * - stagger: Springs start at custom progress offsets (0-1)
15
15
  */
16
- export type ScheduleType = "overlap" | "wait" | "chain";
16
+ export type ScheduleType = "parallel" | "sequential" | "stagger";
17
17
  /**
18
18
  * Base configuration shared by both single and multi-spring transitions
19
19
  */
@@ -33,8 +33,6 @@ export type BaseTransitionConfig = {
33
33
  */
34
34
  export type SingleSpringConfig = BaseTransitionConfig & {
35
35
  spring?: SpringConfig;
36
- from?: number;
37
- to?: number;
38
36
  tick?: (progress: number) => void;
39
37
  /**
40
38
  * Style generator for Web Animation API mode
@@ -57,48 +55,52 @@ export type SingleSpringConfig = BaseTransitionConfig & {
57
55
  };
58
56
  /**
59
57
  * Individual spring item in a multi-spring animation
58
+ *
59
+ * Supports two animation modes (mutually exclusive):
60
+ * - tick: RAF-based animation with callback on each frame
61
+ * - css: Web Animation API with CSS string generation
60
62
  */
61
63
  export type SpringItem = {
62
- from?: number;
63
- to?: number;
64
64
  spring?: SpringConfig;
65
65
  /**
66
- * Frame callback - called on each animation frame with progress value
66
+ * Frame callback - called on each animation frame with progress value (RAF-based)
67
67
  *
68
68
  * **Performance Warning:** Use WRITE-ONLY operations for best performance.
69
69
  * Avoid reading layout properties inside tick to prevent layout thrashing.
70
70
  *
71
- * Layout-triggering properties (causes forced synchronous layout):
72
- * - element.offsetWidth, offsetHeight, offsetTop, offsetLeft
73
- * - element.clientWidth, clientHeight
74
- * - element.getBoundingClientRect()
75
- * - element.scrollWidth, scrollHeight, scrollTop, scrollLeft
76
- * - window.getComputedStyle(element)
77
- *
78
71
  * @example
79
- * // ❌ Bad: Layout read in tick (causes thrashing)
80
72
  * tick: (progress) => {
81
- * const height = element.offsetHeight // READ - forces layout!
82
- * element.style.height = height * progress
73
+ * element.style.opacity = String(progress)
83
74
  * }
75
+ */
76
+ tick?: (progress: number) => void;
77
+ /**
78
+ * Style generator for Web Animation API mode
79
+ *
80
+ * When provided, the animation uses Web Animation API instead of RAF.
81
+ * Spring physics are pre-computed and converted to keyframes.
82
+ *
83
+ * @param progress - Current progress value (0 to 1)
84
+ * @returns Style object for Web Animation API
84
85
  *
85
86
  * @example
86
- * // ✅ Good: Read in prepare, write in tick
87
- * prepare: (element) => {
88
- * const height = element.offsetHeight // READ once before animation
89
- * element.dataset.height = height.toString()
90
- * },
91
- * tick: (progress) => {
92
- * const height = parseFloat(element.dataset.height)
93
- * element.style.height = height * progress // WRITE only
94
- * }
87
+ * css: (progress) => ({
88
+ * opacity: progress,
89
+ * transform: `translateY(${(1 - progress) * 20}px)`,
90
+ * })
95
91
  */
96
- tick: (progress: number) => void;
92
+ css?: (progress: number) => StyleObject;
97
93
  onStart?: () => void;
98
94
  onComplete?: () => void;
99
95
  /**
100
- * Delay offset in milliseconds before this spring starts
101
- * Only applies to 'chain' schedule mode
96
+ * Progress offset (0-1) before this spring starts
97
+ * - 0: Start immediately (parallel behavior)
98
+ * - 1: Start after previous spring completes (sequential behavior)
99
+ * - 0.5: Start when previous spring is 50% complete
100
+ *
101
+ * Only applies to 'stagger' schedule mode.
102
+ * For 'parallel' mode, all springs start at 0.
103
+ * For 'sequential' mode, all springs use offset 1.
102
104
  */
103
105
  offset?: number;
104
106
  };
@@ -141,15 +143,39 @@ export declare function isTickAnimation(config: SingleSpringConfig): config is S
141
143
  * @throws Error if both tick and css are defined
142
144
  */
143
145
  export declare function validateAnimationMode(config: SingleSpringConfig): void;
146
+ /**
147
+ * Validate SpringItem doesn't have both tick and css defined
148
+ * @throws Error if both tick and css are defined
149
+ */
150
+ export declare function validateSpringItem(item: SpringItem): void;
151
+ /**
152
+ * Normalize TransitionConfig to MultiSpringConfig
153
+ * Converts SingleSpringConfig to MultiSpringConfig with single spring item
154
+ * Accepts both sync config and Promise<TransitionConfig>
155
+ * @internal
156
+ */
157
+ export declare function normalizeToMultiSpring(config: TransitionConfig | Promise<TransitionConfig>): Promise<MultiSpringConfig>;
144
158
  export type GetTransitionConfig<TContext = undefined> = TContext extends undefined ? (node: HTMLElement) => TransitionConfig | Promise<TransitionConfig> : (node: HTMLElement, context: TContext) => TransitionConfig | Promise<TransitionConfig>;
145
159
  export type Transition<TContext = undefined> = {
146
160
  in?: GetTransitionConfig<TContext>;
147
161
  out?: GetTransitionConfig<TContext>;
148
162
  key?: TransitionKey;
149
163
  };
164
+ /**
165
+ * Scope behavior for transitions
166
+ * - 'global': Always run animations (default)
167
+ * - 'local': Skip animations when mounting/unmounting with parent TransitionScope
168
+ */
169
+ export type TransitionScope = "global" | "local";
150
170
  export type TransitionOptions<TContext = undefined> = Transition<TContext> & {
151
171
  key?: TransitionKey;
152
172
  ref?: object;
173
+ /**
174
+ * Controls animation behavior relative to TransitionScope
175
+ * - 'global' (default): Always run IN/OUT animations
176
+ * - 'local': Skip animations when mounting/unmounting simultaneously with scope
177
+ */
178
+ scope?: TransitionScope;
153
179
  };
154
180
  export type TransitionCallback = (element: HTMLElement | null) => void | (() => void);
155
181
  /**
@@ -213,69 +239,56 @@ export type SsgoiContext = (path: string) => Transition & {
213
239
  key: TransitionKey;
214
240
  };
215
241
  /**
216
- * Normalized schedule entry for internal processing (discriminated union)
217
- * Used by AnimationScheduler to unify different schedule strategies
218
- * @internal
219
- */
220
- export type NormalizedScheduleEntry = OffsetScheduleEntry | WaitScheduleEntry;
221
- /**
222
- * Offset-based schedule entry (overlap/chain modes)
223
- * - delay=0: immediate start (overlap)
224
- * - delay>0: delayed start with fixed timing (chain)
242
+ * Normalized schedule entry for internal processing
243
+ * All schedule types are normalized to progress-based offsets (0-1)
244
+ *
245
+ * Progress offset determines when each spring starts relative to previous spring:
246
+ * - 0: Start immediately (parallel)
247
+ * - 1: Start after previous completes (sequential)
248
+ * - 0.5: Start when previous is 50% complete
249
+ *
225
250
  * @internal
226
251
  */
227
- export type OffsetScheduleEntry = {
228
- type: "offset";
252
+ export type NormalizedScheduleEntry = {
229
253
  id: string;
230
- delay: number;
254
+ /**
255
+ * Progress offset (0-1) relative to previous spring
256
+ * - 0: Start immediately with previous spring
257
+ * - 1: Start after previous spring completes
258
+ * - 0-1: Start when previous spring reaches this progress
259
+ */
260
+ offset: number;
231
261
  };
232
262
  /**
233
- * Wait-based schedule entry (wait mode)
234
- * Dynamic dependency - starts after previous spring completes
263
+ * Normalized multi-spring config for internal use
264
+ * Schedule is always normalized to progress-based offsets
235
265
  * @internal
236
266
  */
237
- export type WaitScheduleEntry = {
238
- type: "wait";
239
- id: string;
267
+ export type NormalizedMultiSpringConfig = Omit<MultiSpringConfig, "springs" | "schedule"> & {
268
+ springs: Array<SpringItem & {
269
+ normalizedOffset: number;
270
+ }>;
240
271
  };
241
272
  /**
242
- * Animation state (discriminated union)
243
- * Different return types for single vs multi-spring animations
273
+ * Normalize MultiSpringConfig schedule to progress-based offsets
274
+ *
275
+ * Converts user-facing schedule types to unified offset values:
276
+ * - parallel: All springs get offset 0 (start together)
277
+ * - sequential: All springs get offset 1 (wait for previous)
278
+ * - stagger: Use each spring's custom offset (0-1)
279
+ *
244
280
  * @internal
245
281
  */
246
- export type AnimationState = SingleAnimationState | MultiAnimationState;
282
+ export declare function normalizeMultiSpringSchedule(config: MultiSpringConfig): NormalizedMultiSpringConfig;
247
283
  /**
248
- * Single spring animation state
284
+ * Animation state
285
+ * For MultiAnimator: returns first animator's state
249
286
  * @internal
250
287
  */
251
- export type SingleAnimationState = {
252
- type: "single";
288
+ export type AnimationState = {
253
289
  position: number;
254
290
  velocity: number;
255
291
  from: number;
256
292
  to: number;
257
293
  };
258
- /**
259
- * Multi-spring animation state
260
- * Always uses number for progress tracking
261
- * @internal
262
- */
263
- export type MultiAnimationState = {
264
- type: "multi";
265
- completed: number;
266
- total: number;
267
- direction: "forward" | "backward";
268
- };
269
- /**
270
- * Common interface for animation controllers
271
- * Implemented by both Animator (single spring) and AnimationScheduler (multi-spring)
272
- * @internal
273
- */
274
- export interface AnimationController {
275
- forward(): void;
276
- backward(): void;
277
- stop(): void;
278
- reverse(): void;
279
- getCurrentState(): AnimationState;
280
- }
281
294
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/lib/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,MAAM,CAAC;AAE5C,MAAM,MAAM,YAAY,GAAG;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;AAE1D;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AAExD;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IAEjC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;IAGzC,IAAI,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAG3B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAGrB,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;CACpB,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,kBAAkB,GAAG,oBAAoB,GAAG;IAEtD,MAAM,CAAC,EAAE,YAAY,CAAC;IAGtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IAGZ,IAAI,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAElC;;;;;;;;;;;;;;;;OAgBG;IACH,GAAG,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK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AAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,2BAA2B,GAAG,IAAI,CAC5C,iBAAiB,EACjB,SAAS,GAAG,UAAU,CACvB,GAAG;IACF,OAAO,EAAE,KAAK,CAAC,UAAU,GAAG;QAAE,gBAAgB,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC3D,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,iBAAiB,GACxB,2BAA2B,CAiC7B;AAED;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC"}
package/dist/types.js CHANGED
@@ -1,25 +1,74 @@
1
- function r(n) {
1
+ function d(n) {
2
2
  return ("tick" in n || "css" in n) && !("springs" in n);
3
3
  }
4
- function e(n) {
4
+ function a(n) {
5
5
  return "springs" in n;
6
6
  }
7
- function i(n) {
7
+ function o(n) {
8
8
  return "css" in n && typeof n.css == "function";
9
9
  }
10
- function t(n) {
10
+ function c(n) {
11
11
  return "tick" in n && typeof n.tick == "function";
12
12
  }
13
- function s(n) {
14
- if (i(n) && t(n))
13
+ function l(n) {
14
+ if (o(n) && c(n))
15
15
  throw new Error(
16
16
  "SingleSpringConfig cannot have both 'tick' and 'css' defined. Use one or the other."
17
17
  );
18
18
  }
19
+ function u(n) {
20
+ if (n.tick && n.css)
21
+ throw new Error(
22
+ "SpringItem cannot have both 'tick' and 'css' defined. Use one or the other."
23
+ );
24
+ }
25
+ async function h(n) {
26
+ const e = await n;
27
+ return a(e) ? (e.springs.forEach(u), e) : (l(e), {
28
+ prepare: e.prepare,
29
+ wait: e.wait,
30
+ onStart: e.onStart,
31
+ onEnd: e.onEnd,
32
+ springs: [
33
+ {
34
+ spring: e.spring,
35
+ tick: e.tick,
36
+ css: e.css
37
+ }
38
+ ],
39
+ schedule: "parallel"
40
+ });
41
+ }
42
+ function f(n) {
43
+ const e = n.schedule ?? "parallel", r = n.springs.map((i) => {
44
+ let t;
45
+ switch (e) {
46
+ case "parallel":
47
+ t = 0;
48
+ break;
49
+ case "sequential":
50
+ t = 1;
51
+ break;
52
+ case "stagger":
53
+ t = Math.max(0, Math.min(1, i.offset ?? 0));
54
+ break;
55
+ default:
56
+ t = 0;
57
+ }
58
+ return { ...i, normalizedOffset: t };
59
+ }), { schedule: p, ...s } = n;
60
+ return {
61
+ ...s,
62
+ springs: r
63
+ };
64
+ }
19
65
  export {
20
- i as isCssAnimation,
21
- e as isMultiSpring,
22
- r as isSingleSpring,
23
- t as isTickAnimation,
24
- s as validateAnimationMode
66
+ o as isCssAnimation,
67
+ a as isMultiSpring,
68
+ d as isSingleSpring,
69
+ c as isTickAnimation,
70
+ f as normalizeMultiSpringSchedule,
71
+ h as normalizeToMultiSpring,
72
+ l as validateAnimationMode,
73
+ u as validateSpringItem
25
74
  };
@@ -5,7 +5,6 @@ interface BlindOptions {
5
5
  transitionDelay?: number;
6
6
  blindCount?: number;
7
7
  direction?: "horizontal" | "vertical";
8
- staggerDelay?: number;
9
8
  blindColor?: string;
10
9
  }
11
10
  export declare const blind: (options?: BlindOptions) => SggoiTransition;
@@ -1 +1 @@
1
- {"version":3,"file":"blind.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/blind.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,eAAe,EAEhB,MAAM,UAAU,CAAC;AAWlB,UAAU,YAAY;IACpB,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,SAAS,CAAC,EAAE,YAAY,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACtC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,KAAK,GAAI,UAAS,YAAiB,KAAG,eA8LlD,CAAC"}
1
+ {"version":3,"file":"blind.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/blind.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,eAAe,EAEhB,MAAM,UAAU,CAAC;AAWlB,UAAU,YAAY;IACpB,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,SAAS,CAAC,EAAE,YAAY,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACtC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,KAAK,GAAI,UAAS,YAAiB,KAAG,eA2LlD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"fade.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/fade.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAQ9D,UAAU,WAAW;IACnB,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,SAAS,CAAC,EAAE,YAAY,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,IAAI,GAAI,UAAS,WAAgB,KAAG,eA6DhD,CAAC"}
1
+ {"version":3,"file":"fade.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/fade.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAe,MAAM,UAAU,CAAC;AAQ3E,UAAU,WAAW;IACnB,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,SAAS,CAAC,EAAE,YAAY,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,IAAI,GAAI,UAAS,WAAgB,KAAG,eA0DhD,CAAC"}
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../jaemin-BG8HRXG1.cjs"),Y=t=>new Promise(n=>setTimeout(n,t));function V(t,n=0){const i=Math.pow(10,n);return Math.round(t*i)/i}const q={stiffness:80,damping:25},G={stiffness:75,damping:25},j=300,K=10,Z="horizontal",J="#000000",Q=(t={})=>{const{inSpring:n=G,outSpring:i=q,transitionDelay:d=j,blindCount:l=K,direction:r=Z,staggerDelay:c=100,blindColor:e=J}=t;let o,s=null;const a=(p,g,u="left")=>{window.getComputedStyle(p).position==="static"&&(p.style.position="relative");const h=document.createElement("div");h.className="blind-container",h.style.cssText=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("../jaemin-BG8HRXG1.cjs"),F=t=>new Promise(n=>setTimeout(n,t)),N={stiffness:80,damping:25},q={stiffness:75,damping:25},G=300,j=10,K="horizontal",Z="#000000",J=(t={})=>{const{inSpring:n=q,outSpring:r=N,transitionDelay:d=G,blindCount:s=j,direction:a=K,blindColor:c=Z}=t;let i,o=null;const l=(e,g,p="left")=>{window.getComputedStyle(e).position==="static"&&(e.style.position="relative");const y=document.createElement("div");y.className="blind-container",y.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 f=[];for(let $=0;$<l;$++){const x=document.createElement("div");if(r==="horizontal"){const w=100/l,C=`calc(${w}% + 1px)`;x.style.cssText=`
10
+ `;const h=[];for(let f=0;f<s;f++){const $=document.createElement("div");if(a==="horizontal"){const w=100/s,x=`calc(${w}% + 1px)`;$.style.cssText=`
11
11
  position: absolute;
12
- top: ${w*$}%;
12
+ top: ${w*f}%;
13
13
  left: 0;
14
14
  width: 100%;
15
- height: ${C};
16
- background: ${e};
15
+ height: ${x};
16
+ background: ${c};
17
17
  transform: scaleX(${g==="hidden"?0:1});
18
- transform-origin: ${u} center;
18
+ transform-origin: ${p} center;
19
19
  will-change: transform;
20
- `}else{const w=100/l,C=`calc(${w}% + 1px)`;x.style.cssText=`
20
+ `}else{const w=100/s,x=`calc(${w}% + 1px)`;$.style.cssText=`
21
21
  position: absolute;
22
22
  top: 0;
23
- left: ${w*$}%;
24
- width: ${C};
23
+ left: ${w*f}%;
24
+ width: ${x};
25
25
  height: 100%;
26
- background: ${e};
26
+ background: ${c};
27
27
  transform: scaleY(${g==="hidden"?0:1});
28
- transform-origin: ${u==="left"?"top":"bottom"} center;
28
+ transform-origin: ${p==="left"?"top":"bottom"} center;
29
29
  will-change: transform;
30
- `}f.push(x),h.appendChild(x)}return p.appendChild(h),{container:h,blinds:f}};return{out:()=>{let p=null;return o=new Promise(u=>{s=u}),{springs:Array.from({length:l},(u,y)=>({from:0,to:1,spring:i,offset:y*c,tick:h=>{if(!p)return;const f=p.blinds[y];f&&(r==="horizontal"?f.style.transform=`scaleX(${h})`:f.style.transform=`scaleY(${h})`)}})),schedule:"chain",prepare:u=>{m.prepareOutgoing(u),u.style.zIndex="1000",p=a(u,"hidden","left")},onStart:()=>{},onEnd:()=>{s&&s()}}},in:()=>{let p=null;return{springs:Array.from({length:l},(u,y)=>({from:1,to:0,spring:n,offset:y*c,tick:h=>{if(!p)return;const f=p.blinds[y];f&&(r==="horizontal"?f.style.transform=`scaleX(${h})`:f.style.transform=`scaleY(${h})`)}})),schedule:"chain",prepare:u=>{u.style.position="relative",u.style.zIndex="0",p=a(u,"closed","right")},onStart:()=>{},wait:async()=>{o&&await o,await Y(d)},onEnd:()=>{p&&p.container&&p.container.remove()}}}}},R={stiffness:150,damping:20},tt={stiffness:100,damping:20},nt=(t={})=>{var r,c;const{opacity:n=!1,direction:i="enter"}=t,d=i==="enter"?R:tt,l={stiffness:((r=t.spring)==null?void 0:r.stiffness)??d.stiffness,damping:((c=t.spring)==null?void 0:c.damping)??d.damping};return i==="enter"?{in:e=>({spring:l,prepare:()=>{e.style.willChange=n?"transform, opacity":"transform",e.style.backfaceVisibility="hidden",e.style.contain="layout paint"},css:o=>{const s={transform:`translate3d(${(1-o)*100}%, 0, 0)`};return n&&(s.opacity=o),s},onEnd:()=>{e.style.willChange="auto",e.style.backfaceVisibility="",e.style.contain=""}}),out:(e,o)=>({spring:l,prepare:s=>{m.prepareOutgoing(s,o),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:s=>{const a={transform:`translate3d(${-(1-s)*20}%, 0, 0)`};return n&&(a.opacity=s),a}})}:{in:e=>({spring:l,prepare:()=>{e.style.willChange=n?"transform, opacity":"transform",e.style.backfaceVisibility="hidden",e.style.contain="layout paint"},css:o=>{const s={transform:`translate3d(${-(1-o)*20}%, 0, 0)`};return n&&(s.opacity=o),s},onEnd:()=>{e.style.willChange="auto",e.style.backfaceVisibility="",e.style.contain=""}}),out:(e,o)=>({spring:l,prepare:s=>{m.prepareOutgoing(s,o),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:s=>{const a={transform:`translate3d(${(1-s)*100}%, 0, 0)`};return n&&(a.opacity=s),a}})}},et={stiffness:65,damping:16},it={stiffness:65,damping:14},st=0,rt=(t={})=>{const{inSpring:n=it,outSpring:i=et,transitionDelay:d=st}=t;let l,r=null;return{in:c=>({spring:n,prepare:e=>{e.style.opacity="0",e.style.willChange="opacity"},wait:async()=>{l&&(await l,await Y(d))},tick:e=>{const o=V(e,2);c.style.opacity=o.toString()},onEnd:()=>{c.style.willChange="auto"}}),out:(c,e)=>(l=new Promise(o=>{r=o}),{spring:i,tick:o=>{c.style.opacity=o.toString()},prepare:()=>{m.prepareOutgoing(c,e),c.style.willChange="opacity"},onEnd:()=>{r&&r(),c.style.willChange="auto"}})}},lt={stiffness:5,damping:3.5},at=.8,ot="white",b={start:0,end:.45},E={start:.85,end:1},A={start:.2,end:.9},ct=t=>{var l;const n=(t==null?void 0:t.spring)??lt,i=(t==null?void 0:t.scale)??at,d=((l=t==null?void 0:t.border)==null?void 0:l.color)??ot;return{out:async(r,c)=>{const e=_(c),o=m.getRect(document.body,c.positionedParent),s=ht(d,{...e,top:o.top});let a=1,p=-e.top;return{spring:n,prepare:()=>{m.prepareOutgoing(r),P(r,e),I(r,e),pt(r,e);for(const g of s)c.positionedParent.appendChild(g)},onEnd:()=>{r.style.clipPath="",r.style.transformOrigin="",setTimeout(()=>{for(const g of s)c.positionedParent.removeChild(g)},1e3)},tick:g=>{const u=1-g;if(b.start<=u&&u<=b.end){const f=L(u,b.start,b.end);a=1-(1-i)*f}if(E.start<=u&&u<=E.end){const f=L(u,E.start,E.end);a=i+(1-i)*f}if(A.start<=u&&u<=A.end){const f=L(u,A.start,A.end);p=-e.top-e.height*f}r.style.transform=`translateY(${p}px) scale(${a})`;const y=(e.width-e.width*a)/2,h=(e.height-e.height*a)/2;dt(s,y,h)}}},in:async(r,c)=>{const e=_(c);let o=i,s=-e.top+e.height;return{spring:n,prepare:()=>{P(r,e),I(r,e),r.style.transform=`translateY(${-e.top+e.height}px) scale(${i})`},onEnd:()=>{r.style.clipPath="",r.style.transformOrigin="",r.style.transform=""},tick:a=>{if(b.start<=a&&a<=b.end){const p=L(a,b.start,b.end);o=1-(1-i)*p}if(E.start<=a&&a<=E.end){const p=L(a,E.start,E.end);o=i+(1-i)*p}if(A.start<=a&&a<=A.end){const p=L(a,A.start,A.end);s=-e.top+e.height*(1-p)}r.style.transform=`translateY(${s}px) scale(${o})`}}}}};function dt(t,n,i){const d=n*.7,l=i*.7;t.topLeft.style.transform=`translate(${d}px, ${l}px)`,t.topRight.style.transform=`translate(${-d}px, ${l}px)`,t.bottomLeft.style.transform=`translate(${d}px, ${-l}px)`,t.bottomRight.style.transform=`translate(${-d}px, ${-l}px)`}function ht(t="white",n){const l=document.createElement("div");l.style.position="fixed",l.style.pointerEvents="none",l.style.zIndex="9999",l.style.top=`${n.top-1}px`,l.style.left=`${n.left-1}px`,l.style.width="15px",l.style.height="15px";const r=document.createElement("div");r.style.position="absolute",r.style.width="15px",r.style.height="1px",r.style.backgroundColor=t,r.style.top="0",r.style.left="0";const c=document.createElement("div");c.style.position="absolute",c.style.width="1px",c.style.height="15px",c.style.backgroundColor=t,c.style.top="0",c.style.left="0",l.appendChild(r),l.appendChild(c);const e=document.createElement("div");e.style.position="fixed",e.style.pointerEvents="none",e.style.zIndex="9999",e.style.top=`${n.top-1}px`,e.style.left=`${n.left+n.width-15+1}px`,e.style.width="15px",e.style.height="15px";const o=document.createElement("div");o.style.position="absolute",o.style.width="15px",o.style.height="1px",o.style.backgroundColor=t,o.style.top="0",o.style.right="0";const s=document.createElement("div");s.style.position="absolute",s.style.width="1px",s.style.height="15px",s.style.backgroundColor=t,s.style.top="0",s.style.right="0",e.appendChild(o),e.appendChild(s);const a=document.createElement("div");a.style.position="fixed",a.style.pointerEvents="none",a.style.zIndex="9999",a.style.top=`${n.top+n.height-15+1}px`,a.style.left=`${n.left-1}px`,a.style.width="15px",a.style.height="15px";const p=document.createElement("div");p.style.position="absolute",p.style.width="15px",p.style.height="1px",p.style.backgroundColor=t,p.style.bottom="0",p.style.left="0";const g=document.createElement("div");g.style.position="absolute",g.style.width="1px",g.style.height="15px",g.style.backgroundColor=t,g.style.bottom="0",g.style.left="0",a.appendChild(p),a.appendChild(g);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 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.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.bottom="0",h.style.right="0",u.appendChild(y),u.appendChild(h),{topLeft:l,topRight:e,bottomLeft:a,bottomRight:u,*[Symbol.iterator](){yield l,yield e,yield a,yield u}}}function _(t){const n=m.getRect(document.body,t.positionedParent);return{top:t.scroll.y,left:0,width:n.width,height:window.innerHeight-n.top}}function P(t,n){const i=n.left+n.width/2,d=n.top+n.height/2;t.style.transformOrigin=`${i}px ${d}px`}function I(t,n){t.style.clipPath=`polygon(
30
+ `}h.push($),y.appendChild($)}return e.appendChild(y),{container:y,blinds:h}};return{out:()=>{let e=null;return i=new Promise(p=>{o=p}),{springs:Array.from({length:s},(p,u)=>({spring:r,offset:.2,tick:y=>{if(!e)return;const h=e.blinds[u];if(!h)return;const f=1-y;a==="horizontal"?h.style.transform=`scaleX(${f})`:h.style.transform=`scaleY(${f})`}})),schedule:"stagger",prepare:p=>{b.prepareOutgoing(p),p.style.zIndex="1000",e=l(p,"hidden","left")},onStart:()=>{},onEnd:()=>{o&&o()}}},in:()=>{let e=null;return{springs:Array.from({length:s},(p,u)=>({spring:n,offset:.2,tick:y=>{if(!e)return;const h=e.blinds[u];if(!h)return;const f=1-y;a==="horizontal"?h.style.transform=`scaleX(${f})`:h.style.transform=`scaleY(${f})`}})),schedule:"stagger",prepare:p=>{p.style.position="relative",p.style.zIndex="0",e=l(p,"closed","right")},onStart:()=>{},wait:async()=>{i&&await i,await F(d)},onEnd:()=>{e&&e.container&&e.container.remove()}}}}},Q={stiffness:150,damping:20},R={stiffness:100,damping:20},tt=(t={})=>{var a,c;const{opacity:n=!1,direction:r="enter"}=t,d=r==="enter"?Q:R,s={stiffness:((a=t.spring)==null?void 0:a.stiffness)??d.stiffness,damping:((c=t.spring)==null?void 0:c.damping)??d.damping};return r==="enter"?{in:i=>({spring:s,prepare:()=>{i.style.willChange=n?"transform, opacity":"transform",i.style.backfaceVisibility="hidden",i.style.contain="layout paint"},css:o=>{const l={transform:`translate3d(${(1-o)*100}%, 0, 0)`};return n&&(l.opacity=o),l},onEnd:()=>{i.style.willChange="auto",i.style.backfaceVisibility="",i.style.contain=""}}),out:(i,o)=>({spring:s,prepare:l=>{b.prepareOutgoing(l,o),l.style.zIndex="-1",l.style.willChange=n?"transform, opacity":"transform",l.style.backfaceVisibility="hidden",l.style.contain="layout paint",l.style.pointerEvents="none"},css:l=>{const e={transform:`translate3d(${-(1-l)*20}%, 0, 0)`};return n&&(e.opacity=l),e}})}:{in:i=>({spring:s,prepare:()=>{i.style.willChange=n?"transform, opacity":"transform",i.style.backfaceVisibility="hidden",i.style.contain="layout paint"},css:o=>{const l={transform:`translate3d(${-(1-o)*20}%, 0, 0)`};return n&&(l.opacity=o),l},onEnd:()=>{i.style.willChange="auto",i.style.backfaceVisibility="",i.style.contain=""}}),out:(i,o)=>({spring:s,prepare:l=>{b.prepareOutgoing(l,o),l.style.zIndex="100",l.style.willChange=n?"transform, opacity":"transform",l.style.backfaceVisibility="hidden",l.style.contain="layout paint",l.style.pointerEvents="none"},css:l=>{const e={transform:`translate3d(${(1-l)*100}%, 0, 0)`};return n&&(e.opacity=l),e}})}},nt={stiffness:65,damping:16},et={stiffness:65,damping:14},it=0,st=(t={})=>{const{inSpring:n=et,outSpring:r=nt,transitionDelay:d=it}=t;let s,a=null;return{in:c=>({spring:n,prepare:()=>{c.style.willChange="opacity"},wait:async()=>{s&&(await s,await F(d))},css:i=>({opacity:i}),onEnd:()=>{c.style.willChange="auto"}}),out:(c,i)=>(s=new Promise(o=>{a=o}),{spring:r,css:o=>({opacity:o}),prepare:()=>{b.prepareOutgoing(c,i),c.style.willChange="opacity"},onEnd:()=>{a&&a(),c.style.willChange="auto"}})}},rt={stiffness:5,damping:3.5},at=.8,lt="white",m={start:0,end:.45},E={start:.85,end:1},A={start:.2,end:.9},ot=t=>{var s;const n=(t==null?void 0:t.spring)??rt,r=(t==null?void 0:t.scale)??at,d=((s=t==null?void 0:t.border)==null?void 0:s.color)??lt;return{out:async(a,c)=>{const i=S(c),o=b.getRect(document.body,c.positionedParent),l=dt(d,{...i,top:o.top});let e=1,g=-i.top;return{spring:n,prepare:()=>{b.prepareOutgoing(a),_(a,i),P(a,i),ht(a,i);for(const p of l)c.positionedParent.appendChild(p)},onEnd:()=>{a.style.clipPath="",a.style.transformOrigin="",setTimeout(()=>{for(const p of l)c.positionedParent.removeChild(p)},1e3)},tick:p=>{const u=1-p;if(m.start<=u&&u<=m.end){const f=L(u,m.start,m.end);e=1-(1-r)*f}if(E.start<=u&&u<=E.end){const f=L(u,E.start,E.end);e=r+(1-r)*f}if(A.start<=u&&u<=A.end){const f=L(u,A.start,A.end);g=-i.top-i.height*f}a.style.transform=`translateY(${g}px) scale(${e})`;const y=(i.width-i.width*e)/2,h=(i.height-i.height*e)/2;ct(l,y,h)}}},in:async(a,c)=>{const i=S(c);let o=r,l=-i.top+i.height;return{spring:n,prepare:()=>{_(a,i),P(a,i),a.style.transform=`translateY(${-i.top+i.height}px) scale(${r})`},onEnd:()=>{a.style.clipPath="",a.style.transformOrigin="",a.style.transform=""},tick:e=>{if(m.start<=e&&e<=m.end){const g=L(e,m.start,m.end);o=1-(1-r)*g}if(E.start<=e&&e<=E.end){const g=L(e,E.start,E.end);o=r+(1-r)*g}if(A.start<=e&&e<=A.end){const g=L(e,A.start,A.end);l=-i.top+i.height*(1-g)}a.style.transform=`translateY(${l}px) scale(${o})`}}}}};function ct(t,n,r){const d=n*.7,s=r*.7;t.topLeft.style.transform=`translate(${d}px, ${s}px)`,t.topRight.style.transform=`translate(${-d}px, ${s}px)`,t.bottomLeft.style.transform=`translate(${d}px, ${-s}px)`,t.bottomRight.style.transform=`translate(${-d}px, ${-s}px)`}function dt(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 a=document.createElement("div");a.style.position="absolute",a.style.width="15px",a.style.height="1px",a.style.backgroundColor=t,a.style.top="0",a.style.left="0";const c=document.createElement("div");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(a),s.appendChild(c);const i=document.createElement("div");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";const o=document.createElement("div");o.style.position="absolute",o.style.width="15px",o.style.height="1px",o.style.backgroundColor=t,o.style.top="0",o.style.right="0";const l=document.createElement("div");l.style.position="absolute",l.style.width="1px",l.style.height="15px",l.style.backgroundColor=t,l.style.top="0",l.style.right="0",i.appendChild(o),i.appendChild(l);const e=document.createElement("div");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";const g=document.createElement("div");g.style.position="absolute",g.style.width="15px",g.style.height="1px",g.style.backgroundColor=t,g.style.bottom="0",g.style.left="0";const p=document.createElement("div");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(g),e.appendChild(p);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 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.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.bottom="0",h.style.right="0",u.appendChild(y),u.appendChild(h),{topLeft:s,topRight:i,bottomLeft:e,bottomRight:u,*[Symbol.iterator](){yield s,yield i,yield e,yield u}}}function S(t){const n=b.getRect(document.body,t.positionedParent);return{top:t.scroll.y,left:0,width:n.width,height:window.innerHeight-n.top}}function _(t,n){const r=n.left+n.width/2,d=n.top+n.height/2;t.style.transformOrigin=`${r}px ${d}px`}function P(t,n){t.style.clipPath=`polygon(
31
31
  ${n.left}px ${n.top}px,
32
32
  ${n.left+n.width}px ${n.top}px,
33
33
  ${n.left+n.width}px ${n.top+n.height}px,
34
34
  ${n.left}px ${n.top+n.height}px
35
- )`}function pt(t,n){t.style.transform=`translateY(${-n.top}px)`}function L(t,n,i){return t<=n?0:t>=i?1:(t-n)/(i-n)}function yt(t,n){return t.querySelector(`[data-hero-key="${n}"]`)}const ut=(t={})=>{var c,e;const n={stiffness:((c=t.spring)==null?void 0:c.stiffness)??300,damping:((e=t.spring)==null?void 0:e.damping)??30},i=t.timeout??300,d=t.maxDistance??700;let l=null,r=null;return{in:async(o,s)=>{const a=o,p=Array.from(a.querySelectorAll("[data-hero-key]"));if(p.length===0)return{spring:n,tick:()=>{}};if(!await new Promise(y=>{l?y(!0):(r=y,setTimeout(()=>{r=null,y(!1)},i))})||!l)return l=null,{spring:n,tick:()=>{}};const u=p.map(y=>{const h=y.getAttribute("data-hero-key");if(!h)return null;const f=yt(l,h);if(!f)return null;const $=y,x=m.getRect(l,f),w=m.getRect(a,$),C=x.left-w.left-s.scrollOffset.x,U=x.top-w.top-s.scrollOffset.y,W=x.width/w.width,X=x.height/w.height,z=$.style.transform,B=$.style.position,M=$.style.transformOrigin,H=$.style.zIndex,N=$.style.willChange;return{toEl:$,dx:C,dy:U,dw:W,dh:X,originalTransform:z,originalPosition:B,originalTransformOrigin:M,originalZIndex:H,originalWillChange:N}}).filter(y=>y!==null&&Math.abs(y.dy)<=d);return l=null,u.length===0?{spring:n,tick:()=>{}}:{spring:n,prepare:()=>{u.forEach(({toEl:y})=>{y.style.position="relative",y.style.transformOrigin="top left",y.style.zIndex="1000",y.style.willChange="transform"})},tick:y=>{u.forEach(({toEl:h,dx:f,dy:$,dw:x,dh:w})=>{h.style.transform=`translate(${(1-y)*f}px,${(1-y)*$}px) scale(${y+(1-y)*x}, ${y+(1-y)*w})`})},onEnd:()=>{u.forEach(({toEl:y,originalTransform:h,originalPosition:f,originalTransformOrigin:$,originalZIndex:x,originalWillChange:w})=>{y.style.transform=h,y.style.position=f,y.style.transformOrigin=$,y.style.zIndex=x,y.style.willChange=w})}}},out:async o=>({onStart:()=>{l=o,r&&(r(!0),r=null)},tick:()=>{},prepare:s=>{m.prepareOutgoing(s),s.style.opacity="0"}})}};function gt({detailRect:t,galleryRect:n,pageRect:i,scrollOffset:d},l){const r=n.left-t.left+(n.width-t.width)/2-d.x,c=n.top-t.top+(n.height-t.height)/2-d.y,e=n.width/t.width,o=n.height/t.height,s=Math.max(e,o),a=t.top/i.height*100,p=(i.width-(t.left+t.width))/i.width*100,g=(i.height-(t.top+t.height))/i.height*100,u=t.left/i.width*100;return l.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`,y=>{const h=1-y,f=a*h,$=p*h,x=g*h,w=u*h;l.style.clipPath=`inset(${f}% ${$}% ${x}% ${w}%)`,l.style.transform=`translate(${r*h}px, ${c*h}px) scale(${1+(s-1)*h})`}}function ft({detailRect:t,galleryRect:n,pageRect:i,scrollOffset:d},l){const r=n.left-t.left+(n.width-t.width)/2+d.x,c=n.top-t.top+(n.height-t.height)/2+d.y,e=n.width/t.width,o=n.height/t.height,s=Math.min(e,o),a=t.top/i.height*100,p=(i.width-(t.left+t.width))/i.width*100,g=(i.height-(t.top+t.height))/i.height*100,u=t.left/i.width*100;return l.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`,y=>{const h=1-y,f=a*h,$=p*h,x=g*h,w=u*h;l.style.clipPath=`inset(${f}% ${$}% ${x}% ${w}%)`,l.style.transform=`translate(${r*h-d.x}px, ${c*h-d.y}px) scale(${1+(s-1)*h})`}}function $t(t,n,i){const d=t.querySelector("[data-instagram-detail-key]"),l=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 r=null,c=null,e=!1;if(!d&&l){c=l;const a=c.getAttribute("data-instagram-detail-key");if(!a)return null;r=t.querySelector(`[data-instagram-gallery-key="${a}"]`),r&&(e=!0)}else if(d&&!l){c=d;const a=c.getAttribute("data-instagram-detail-key");if(!a)return null;r=n.querySelector(`[data-instagram-gallery-key="${a}"]`),r&&(e=!1)}if(!r||!c)return null;const o=m.getRect(e?t:n,r),s=m.getRect(e?n:t,c);return e?{isEnterMode:!0,inAnimation:gt({detailRect:s,galleryRect:o,pageRect:n.getBoundingClientRect(),scrollOffset:i},n)}:{isEnterMode:!1,outAnimation:ft({detailRect:s,galleryRect:o,pageRect:t.getBoundingClientRect(),scrollOffset:i},t)}}const wt=(t={})=>{var c,e;const n={stiffness:((c=t.spring)==null?void 0:c.stiffness)??150,damping:((e=t.spring)==null?void 0:e.damping)??20},i=t.timeout??300;let d=null,l=null,r=null;return{in:async(o,{scrollOffset:s})=>{const a=o;return!await new Promise(g=>{d?g(!0):(l=g,setTimeout(()=>{l=null,g(!1)},i))})||!d?(d=null,{spring:n,tick:()=>{}}):(r=$t(d,a,s),r?(d=null,{spring:n,tick:g=>{r!=null&&r.inAnimation&&r.inAnimation(g)}}):{spring:n,tick:()=>{}})},out:async o=>({spring:n,onStart:()=>{d=o,l&&(l(!0),l=null)},prepare:s=>{m.prepareOutgoing(s),r!=null&&r.isEnterMode||(s.style.zIndex="-1")},tick:s=>{r!=null&&r.outAnimation&&r.outAnimation(s)}})}};function xt({detailRect:t,galleryRect:n,pageRect:i,scrollOffset:d},l){const r=n.left-t.left+(n.width-t.width)/2-d.x,c=n.top-t.top+(n.height-t.height)/2-d.y,e=n.width/t.width,o=n.height/t.height,s=Math.max(e,o),a=t.top/i.height*100,p=(i.width-(t.left+t.width))/i.width*100,g=(i.height-(t.top+t.height))/i.height*100,u=t.left/i.width*100;return l.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`,y=>{const h=1-y,f=a*h,$=p*h,x=g*h,w=u*h;l.style.clipPath=`inset(${f}% ${$}% ${x}% ${w}%)`,l.style.transform=`translate(${r*h}px, ${c*h}px) scale(${1+(s-1)*h})`}}function mt({galleryRect:t,detailRect:n,scrollOffset:i},d){const l=n.left-t.left+(n.width-t.width)/2+i.x,r=n.top-t.top+(n.height-t.height)/2+i.y,c=n.width/t.width,e=n.height/t.height,o=Math.max(c,e);return s=>{d.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`;const a=1-s;d.style.transform=`translate(${l*a-i.x}px, ${r*a-i.y}px) scale(${1+(o-1)*a})`,d.style.opacity=`${1-a}`}}function bt({galleryRect:t,detailRect:n,scrollOffset:i},d){const l=n.left-t.left+(n.width-t.width)/2-i.x,r=n.top-t.top+(n.height-t.height)/2-i.y,c=n.width/t.width,e=n.height/t.height,o=Math.max(c,e);return s=>{const a=1-s,p=s;d.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`,d.style.transform=`translate(${l*a}px, ${r*a}px) scale(${1+(o-1)*a})`,d.style.opacity=`${p}`}}function Et({detailRect:t,galleryRect:n,pageRect:i,scrollOffset:d},l){const r=n.left-t.left+(n.width-t.width)/2+d.x,c=n.top-t.top+(n.height-t.height)/2+d.y,e=n.width/t.width,o=n.height/t.height,s=Math.min(e,o),a=t.top/i.height*100,p=(i.width-(t.left+t.width))/i.width*100,g=(i.height-(t.top+t.height))/i.height*100,u=t.left/i.width*100;return l.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`,y=>{const h=1-y,f=a*h,$=p*h,x=g*h,w=u*h;l.style.clipPath=`inset(${f}% ${$}% ${x}% ${w}%)`,l.style.transform=`translate(${r*h-d.x}px, ${c*h-d.y}px) scale(${1+(s-1)*h})`}}function At(t,n,i){const d=t.querySelector("[data-pinterest-detail-key]"),l=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 r=null,c=null,e=!1;if(!d&&l){c=l;const a=c.getAttribute("data-pinterest-detail-key");if(!a)return null;r=t.querySelector(`[data-pinterest-gallery-key="${a}"]`),r&&(e=!0)}else if(d&&!l){c=d;const a=c.getAttribute("data-pinterest-detail-key");if(!a)return null;r=n.querySelector(`[data-pinterest-gallery-key="${a}"]`),r&&(e=!1)}if(!r||!c)return null;const o=m.getRect(e?t:n,r),s=m.getRect(e?n:t,c);return e?{inAnimation:xt({detailRect:s,galleryRect:o,pageRect:n.getBoundingClientRect(),scrollOffset:i},n),outAnimation:mt({galleryRect:o,detailRect:s,scrollOffset:i},t)}:{inAnimation:bt({galleryRect:o,detailRect:s,scrollOffset:i},n),outAnimation:Et({detailRect:s,galleryRect:o,pageRect:t.getBoundingClientRect(),scrollOffset:i},t)}}const Lt=(t={})=>{var c,e;const n={stiffness:((c=t.spring)==null?void 0:c.stiffness)??30,damping:((e=t.spring)==null?void 0:e.damping)??10},i=t.timeout??300;let d=null,l=null,r=null;return{in:async(o,{scrollOffset:s})=>{const a=o;return!await new Promise(g=>{d?g(!0):(l=g,setTimeout(()=>{l=null,g(!1)},i))})||!d?(d=null,{spring:n,tick:()=>{}}):(r=At(d,a,s),r?(d=null,{spring:n,tick:g=>{r&&r.inAnimation(g)}}):{spring:n,tick:()=>{}})},out:async o=>({spring:n,onStart:()=>{d=o,l&&(l(!0),l=null)},prepare:s=>{m.prepareOutgoing(s),s.style.zIndex="-1"},tick:s=>{r&&r.outAnimation(s)}})}},D={stiffness:5,damping:4},Ct=(t={})=>{var o,s;const n=t.direction??"up",i={stiffness:((o=t.spring)==null?void 0:o.stiffness)??D.stiffness,damping:((s=t.spring)==null?void 0:s.damping)??D.damping},d=n==="up";let l=null,r=null,c=null;const e=()=>{if(l===null||r===null)return null;const a=Math.min(l,r),p=window.innerHeight;return Math.max(a,p)};return{in:a=>(r=a.offsetHeight,l!==null&&(c=e()),{spring:i,prepare:()=>{a.style.willChange="transform"},tick:p=>{if(c===null&&(c=e(),c===null))return;const g=d?(1-p)*c:(1-p)*-c;a.style.transform=`translateY(${g}px)`},onEnd:()=>{a.style.willChange="auto"}}),out:a=>({spring:i,onStart:()=>{l=a.offsetHeight,r!==null&&(c=e())},tick:p=>{if(c===null&&(c=e(),c===null))return;const g=d?(1-p)*-c:(1-p)*c;a.style.transform=`translateY(${g}px)`},prepare:p=>{m.prepareOutgoing(p),p.style.zIndex=d?"-1":"1",p.style.willChange="transform"}})}},v={stiffness:15,damping:7},Tt=(t={})=>{var l,r;const n=t.direction??"left",i={stiffness:((l=t.spring)==null?void 0:l.stiffness)??v.stiffness,damping:((r=t.spring)==null?void 0:r.damping)??v.damping},d=n==="left";return{in:c=>({spring:i,prepare:()=>{c.style.willChange="transform"},tick:e=>{const o=d?(1-e)*100:(1-e)*-100;c.style.transform=`translateX(${o}%)`},onEnd:()=>{c.style.willChange="auto"}}),out:(c,e)=>({spring:i,tick:o=>{const s=d?(1-o)*-100:(1-o)*100;c.style.transform=`translateX(${s}%)`},prepare:o=>{m.prepareOutgoing(o,e),o.style.zIndex=d?"-1":"1",o.style.willChange="transform"}})}},O={stiffness:17,damping:6},S=20,k=800,St=()=>{let t,n=null;return{in:i=>({spring:O,prepare:d=>{d.style.willChange="transform",d.style.transform=`perspective(${k}px) rotateY(${S}deg) translateX(-100%)`},wait:async()=>{t&&await t},tick:d=>{const l=(1-d)*S,r=-(1-d)*100;i.style.transform=`perspective(${k}px) rotateY(${l}deg) translateX(${r}%)`},onEnd:()=>{i.style.transform="",i.style.willChange="auto"}}),out:(i,d)=>(t=new Promise(l=>{n=l}),{spring:O,prepare:l=>{m.prepareOutgoing(l,d),l.style.willChange="transform"},tick:l=>{const r=1-l,c=r*S,e=r*100;i.style.transform=`perspective(${k}px) rotateY(${-c}deg) translateX(${e}%)`},onEnd:()=>{n&&n(),i.style.transform=""}})}},kt={stiffness:1,damping:1},_t={stiffness:20,damping:25},Pt="#000000",It="circle",F="CURTAIN_REVEAL_OVERLAY_ID",Dt={position:"fixed",inset:"0",width:"100vw",height:"100%",zIndex:"9999",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"},vt={position:"relative",display:"inline-block",height:"5.5rem",overflow:"hidden"},Ot={display:"flex",height:"100%",willChange:"transform",transition:"transform 0.3s ease"},Ft={display:"inline-flex",alignItems:"center",justifyContent:"center",whiteSpace:"nowrap",fontSize:"5.5rem",fontWeight:"900",letterSpacing:"0.02em",color:"#FFFFFF"},Yt=.4,T=.5,Ut=.2;function Wt(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 i=n*100;return`polygon(50% ${50-i}%, ${50-i}% ${50+i}%, ${50+i}% ${50+i}%)`}}}const Xt=t=>t.reduce((n,i)=>n+i,0),zt=(t={})=>{const{background:n=Pt,texts:i=[],shape:d=It,inSpring:l=_t,outSpring:r=kt,textStyle:c={}}=t;return{out:(e,o)=>{const s=e.style.opacity;return{spring:r,from:1,to:0,prepare:a=>{m.prepareOutgoing(a,o),a.style.opacity="1"},tick:a=>{const p=Math.max(0,a-Yt);e.style.opacity=String(p)},onEnd:()=>{e.style.opacity=s}}},in:e=>{let o=null,s=null,a=null;const p=document.body.style.overflow,g=document.getElementById(F);let u=[];const y=()=>{o=document.createElement("div"),o.id=F,Object.assign(o.style,Dt,{background:n}),document.body.appendChild(o),s=document.createElement("div"),Object.assign(s.style,vt),o.appendChild(s),a=document.createElement("div"),Object.assign(a.style,Ot),s.appendChild(a),i.forEach(h=>{const f=document.createElement("div");f.textContent=h,Object.assign(f.style,Ft,c),a.appendChild(f)}),u=Array.from(a.children).map(h=>h.getBoundingClientRect().width)};return{spring:l,from:0,to:1,prepare:()=>{document.body.style.overflow="hidden",e.style.opacity="1",g==null||g.remove(),y(),o&&s&&(o.style.clipPath="none",s.style.transform="scale(1)")},tick:h=>{if(!(!o||!s||!a)){if(h<=T&&i.length>0){const f=h/T,$=Math.min(Math.floor(f*i.length),i.length-1),x=u[$]??0,w=Xt(u.slice(0,$));s.style.width=`${x}px`,a.style.transform=`translateX(-${w}px)`}if(h>T){const $=1-Math.max(0,Math.min(1,(h-T)/Ut));o.style.clipPath=Wt(d,$),s.style.transform=`scale(${$})`}}},onEnd:()=>{o==null||o.remove(),o=s=a=null,document.body.style.overflow=p}}}}};exports.jaemin=m.jaemin;exports.blind=Q;exports.curtainReveal=zt;exports.drill=nt;exports.fade=rt;exports.film=ct;exports.hero=ut;exports.instagram=wt;exports.pinterest=Lt;exports.scroll=Ct;exports.slide=Tt;exports.strip=St;
35
+ )`}function ht(t,n){t.style.transform=`translateY(${-n.top}px)`}function L(t,n,r){return t<=n?0:t>=r?1:(t-n)/(r-n)}function pt(t,n){return t.querySelector(`[data-hero-key="${n}"]`)}const yt=(t={})=>{var c,i;const n={stiffness:((c=t.spring)==null?void 0:c.stiffness)??300,damping:((i=t.spring)==null?void 0:i.damping)??30},r=t.timeout??300,d=t.maxDistance??700;let s=null,a=null;return{in:async(o,l)=>{const e=o,g=Array.from(e.querySelectorAll("[data-hero-key]"));if(g.length===0)return{spring:n,tick:()=>{}};if(!await new Promise(y=>{s?y(!0):(a=y,setTimeout(()=>{a=null,y(!1)},r))})||!s)return s=null,{spring:n,tick:()=>{}};const u=g.map(y=>{const h=y.getAttribute("data-hero-key");if(!h)return null;const f=pt(s,h);if(!f)return null;const $=y,w=b.getRect(s,f),x=b.getRect(e,$),Y=w.left-x.left-l.scrollOffset.x,U=w.top-x.top-l.scrollOffset.y,V=w.width/x.width,W=w.height/x.height,H=$.style.transform,B=$.style.position,z=$.style.transformOrigin,X=$.style.zIndex,M=$.style.willChange;return{toEl:$,dx:Y,dy:U,dw:V,dh:W,originalTransform:H,originalPosition:B,originalTransformOrigin:z,originalZIndex:X,originalWillChange:M}}).filter(y=>y!==null&&Math.abs(y.dy)<=d);return s=null,u.length===0?{spring:n,tick:()=>{}}:{spring:n,prepare:()=>{u.forEach(({toEl:y})=>{y.style.position="relative",y.style.transformOrigin="top left",y.style.zIndex="1000",y.style.willChange="transform"})},tick:y=>{u.forEach(({toEl:h,dx:f,dy:$,dw:w,dh:x})=>{h.style.transform=`translate(${(1-y)*f}px,${(1-y)*$}px) scale(${y+(1-y)*w}, ${y+(1-y)*x})`})},onEnd:()=>{u.forEach(({toEl:y,originalTransform:h,originalPosition:f,originalTransformOrigin:$,originalZIndex:w,originalWillChange:x})=>{y.style.transform=h,y.style.position=f,y.style.transformOrigin=$,y.style.zIndex=w,y.style.willChange=x})}}},out:async o=>({onStart:()=>{s=o,a&&(a(!0),a=null)},tick:()=>{},prepare:l=>{b.prepareOutgoing(l),l.style.opacity="0"}})}};function ut({detailRect:t,galleryRect:n,pageRect:r,scrollOffset:d},s){const a=n.left-t.left+(n.width-t.width)/2-d.x,c=n.top-t.top+(n.height-t.height)/2-d.y,i=n.width/t.width,o=n.height/t.height,l=Math.max(i,o),e=t.top/r.height*100,g=(r.width-(t.left+t.width))/r.width*100,p=(r.height-(t.top+t.height))/r.height*100,u=t.left/r.width*100;return s.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`,y=>{const h=1-y,f=e*h,$=g*h,w=p*h,x=u*h;s.style.clipPath=`inset(${f}% ${$}% ${w}% ${x}%)`,s.style.transform=`translate(${a*h}px, ${c*h}px) scale(${1+(l-1)*h})`}}function gt({detailRect:t,galleryRect:n,pageRect:r,scrollOffset:d},s){const a=n.left-t.left+(n.width-t.width)/2+d.x,c=n.top-t.top+(n.height-t.height)/2+d.y,i=n.width/t.width,o=n.height/t.height,l=Math.min(i,o),e=t.top/r.height*100,g=(r.width-(t.left+t.width))/r.width*100,p=(r.height-(t.top+t.height))/r.height*100,u=t.left/r.width*100;return s.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`,y=>{const h=1-y,f=e*h,$=g*h,w=p*h,x=u*h;s.style.clipPath=`inset(${f}% ${$}% ${w}% ${x}%)`,s.style.transform=`translate(${a*h-d.x}px, ${c*h-d.y}px) scale(${1+(l-1)*h})`}}function ft(t,n,r){const d=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 a=null,c=null,i=!1;if(!d&&s){c=s;const e=c.getAttribute("data-instagram-detail-key");if(!e)return null;a=t.querySelector(`[data-instagram-gallery-key="${e}"]`),a&&(i=!0)}else if(d&&!s){c=d;const e=c.getAttribute("data-instagram-detail-key");if(!e)return null;a=n.querySelector(`[data-instagram-gallery-key="${e}"]`),a&&(i=!1)}if(!a||!c)return null;const o=b.getRect(i?t:n,a),l=b.getRect(i?n:t,c);return i?{isEnterMode:!0,inAnimation:ut({detailRect:l,galleryRect:o,pageRect:n.getBoundingClientRect(),scrollOffset:r},n)}:{isEnterMode:!1,outAnimation:gt({detailRect:l,galleryRect:o,pageRect:t.getBoundingClientRect(),scrollOffset:r},t)}}const $t=(t={})=>{var c,i;const n={stiffness:((c=t.spring)==null?void 0:c.stiffness)??150,damping:((i=t.spring)==null?void 0:i.damping)??20},r=t.timeout??300;let d=null,s=null,a=null;return{in:async(o,{scrollOffset:l})=>{const e=o;return!await new Promise(p=>{d?p(!0):(s=p,setTimeout(()=>{s=null,p(!1)},r))})||!d?(d=null,{spring:n,tick:()=>{}}):(a=ft(d,e,l),a?(d=null,{spring:n,tick:p=>{a!=null&&a.inAnimation&&a.inAnimation(p)}}):{spring:n,tick:()=>{}})},out:async o=>({spring:n,onStart:()=>{d=o,s&&(s(!0),s=null)},prepare:l=>{b.prepareOutgoing(l),a!=null&&a.isEnterMode||(l.style.zIndex="-1")},tick:l=>{a!=null&&a.outAnimation&&a.outAnimation(l)}})}};function wt({detailRect:t,galleryRect:n,pageRect:r,scrollOffset:d},s){const a=n.left-t.left+(n.width-t.width)/2-d.x,c=n.top-t.top+(n.height-t.height)/2-d.y,i=n.width/t.width,o=n.height/t.height,l=Math.max(i,o),e=t.top/r.height*100,g=(r.width-(t.left+t.width))/r.width*100,p=(r.height-(t.top+t.height))/r.height*100,u=t.left/r.width*100;return s.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`,y=>{const h=1-y,f=e*h,$=g*h,w=p*h,x=u*h;s.style.clipPath=`inset(${f}% ${$}% ${w}% ${x}%)`,s.style.transform=`translate(${a*h}px, ${c*h}px) scale(${1+(l-1)*h})`}}function xt({galleryRect:t,detailRect:n,scrollOffset:r},d){const s=n.left-t.left+(n.width-t.width)/2+r.x,a=n.top-t.top+(n.height-t.height)/2+r.y,c=n.width/t.width,i=n.height/t.height,o=Math.max(c,i);return l=>{d.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`;const e=1-l;d.style.transform=`translate(${s*e-r.x}px, ${a*e-r.y}px) scale(${1+(o-1)*e})`,d.style.opacity=`${1-e}`}}function bt({galleryRect:t,detailRect:n,scrollOffset:r},d){const s=n.left-t.left+(n.width-t.width)/2-r.x,a=n.top-t.top+(n.height-t.height)/2-r.y,c=n.width/t.width,i=n.height/t.height,o=Math.max(c,i);return l=>{const e=1-l,g=l;d.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`,d.style.transform=`translate(${s*e}px, ${a*e}px) scale(${1+(o-1)*e})`,d.style.opacity=`${g}`}}function mt({detailRect:t,galleryRect:n,pageRect:r,scrollOffset:d},s){const a=n.left-t.left+(n.width-t.width)/2+d.x,c=n.top-t.top+(n.height-t.height)/2+d.y,i=n.width/t.width,o=n.height/t.height,l=Math.min(i,o),e=t.top/r.height*100,g=(r.width-(t.left+t.width))/r.width*100,p=(r.height-(t.top+t.height))/r.height*100,u=t.left/r.width*100;return s.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`,y=>{const h=1-y,f=e*h,$=g*h,w=p*h,x=u*h;s.style.clipPath=`inset(${f}% ${$}% ${w}% ${x}%)`,s.style.transform=`translate(${a*h-d.x}px, ${c*h-d.y}px) scale(${1+(l-1)*h})`}}function Et(t,n,r){const d=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 a=null,c=null,i=!1;if(!d&&s){c=s;const e=c.getAttribute("data-pinterest-detail-key");if(!e)return null;a=t.querySelector(`[data-pinterest-gallery-key="${e}"]`),a&&(i=!0)}else if(d&&!s){c=d;const e=c.getAttribute("data-pinterest-detail-key");if(!e)return null;a=n.querySelector(`[data-pinterest-gallery-key="${e}"]`),a&&(i=!1)}if(!a||!c)return null;const o=b.getRect(i?t:n,a),l=b.getRect(i?n:t,c);return i?{inAnimation:wt({detailRect:l,galleryRect:o,pageRect:n.getBoundingClientRect(),scrollOffset:r},n),outAnimation:xt({galleryRect:o,detailRect:l,scrollOffset:r},t)}:{inAnimation:bt({galleryRect:o,detailRect:l,scrollOffset:r},n),outAnimation:mt({detailRect:l,galleryRect:o,pageRect:t.getBoundingClientRect(),scrollOffset:r},t)}}const At=(t={})=>{var c,i;const n={stiffness:((c=t.spring)==null?void 0:c.stiffness)??30,damping:((i=t.spring)==null?void 0:i.damping)??10},r=t.timeout??300;let d=null,s=null,a=null;return{in:async(o,{scrollOffset:l})=>{const e=o;return!await new Promise(p=>{d?p(!0):(s=p,setTimeout(()=>{s=null,p(!1)},r))})||!d?(d=null,{spring:n,tick:()=>{}}):(a=Et(d,e,l),a?(d=null,{spring:n,tick:p=>{a&&a.inAnimation(p)}}):{spring:n,tick:()=>{}})},out:async o=>({spring:n,onStart:()=>{d=o,s&&(s(!0),s=null)},prepare:l=>{b.prepareOutgoing(l),l.style.zIndex="-1"},tick:l=>{a&&a.outAnimation(l)}})}},I={stiffness:5,damping:4},Lt=(t={})=>{var o,l;const n=t.direction??"up",r={stiffness:((o=t.spring)==null?void 0:o.stiffness)??I.stiffness,damping:((l=t.spring)==null?void 0:l.damping)??I.damping},d=n==="up";let s=null,a=null,c=null;const i=()=>{if(s===null||a===null)return null;const e=Math.min(s,a),g=window.innerHeight;return Math.max(e,g)};return{in:e=>(a=e.offsetHeight,s!==null&&(c=i()),{spring:r,prepare:()=>{e.style.willChange="transform",e.style.backfaceVisibility="hidden",e.style.contain="layout paint"},tick:g=>{c===null&&(c=i());const p=c??window.innerHeight,u=d?(1-g)*p:(1-g)*-p;e.style.transform=`translate3d(0, ${u}px, 0)`},onEnd:()=>{e.style.willChange="auto",e.style.backfaceVisibility="",e.style.contain=""}}),out:(e,g)=>({spring:r,onStart:()=>{s=e.offsetHeight,a!==null&&(c=i())},tick:p=>{c===null&&(c=i());const u=c??window.innerHeight,y=d?(1-p)*-u:(1-p)*u;e.style.transform=`translate3d(0, ${y}px, 0)`},prepare:p=>{b.prepareOutgoing(p,g),p.style.zIndex=d?"-1":"1",p.style.willChange="transform",p.style.backfaceVisibility="hidden",p.style.contain="layout paint",p.style.pointerEvents="none"}})}},v={stiffness:15,damping:7},Ct=(t={})=>{var s,a;const n=t.direction??"left",r={stiffness:((s=t.spring)==null?void 0:s.stiffness)??v.stiffness,damping:((a=t.spring)==null?void 0:a.damping)??v.damping},d=n==="left";return{in:c=>({spring:r,prepare:()=>{c.style.willChange="transform",c.style.backfaceVisibility="hidden",c.style.contain="layout paint"},css:i=>({transform:`translate3d(${d?(1-i)*100:(1-i)*-100}%, 0, 0)`}),onEnd:()=>{c.style.willChange="auto",c.style.backfaceVisibility="",c.style.contain=""}}),out:(c,i)=>({spring:r,css:o=>({transform:`translate3d(${d?(1-o)*-100:(1-o)*100}%, 0, 0)`}),prepare:o=>{b.prepareOutgoing(o,i),o.style.willChange="transform",o.style.backfaceVisibility="hidden",o.style.contain="layout paint",o.style.pointerEvents="none"}})}},D={stiffness:17,damping:6},k=20,C=800,Tt=()=>{let t,n=null;return{in:r=>({spring:D,prepare:()=>{r.style.willChange="transform",r.style.backfaceVisibility="hidden",r.style.contain="layout paint",r.style.transform=`perspective(${C}px) rotateY(${k}deg) translate3d(-100%, 0, 0)`},wait:async()=>{t&&await t},css:d=>{const s=(1-d)*k,a=-(1-d)*100;return{transform:`perspective(${C}px) rotateY(${s}deg) translate3d(${a}%, 0, 0)`}},onEnd:()=>{r.style.transform="",r.style.willChange="auto",r.style.backfaceVisibility="",r.style.contain=""}}),out:(r,d)=>(t=new Promise(s=>{n=s}),{spring:D,prepare:s=>{b.prepareOutgoing(s,d),s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.pointerEvents="none",s.style.transform=`perspective(${C}px) rotateY(0deg) translate3d(0%, 0, 0)`},css:s=>{const a=1-s,c=a*k,i=a*100;return{transform:`perspective(${C}px) rotateY(${-c}deg) translate3d(${i}%, 0, 0)`}},onEnd:()=>{n&&n(),r.style.transform=""}})}},kt={stiffness:1,damping:1},St={stiffness:20,damping:25},_t="#000000",Pt="circle",O="CURTAIN_REVEAL_OVERLAY_ID",It={position:"fixed",inset:"0",width:"100vw",height:"100%",zIndex:"9999",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"},vt={position:"relative",display:"inline-block",height:"5.5rem",overflow:"hidden"},Dt={display:"flex",height:"100%",willChange:"transform",transition:"transform 0.3s ease"},Ot={display:"inline-flex",alignItems:"center",justifyContent:"center",whiteSpace:"nowrap",fontSize:"5.5rem",fontWeight:"900",letterSpacing:"0.02em",color:"#FFFFFF"},Ft=.4,T=.5,Yt=.2;function Ut(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 Vt=t=>t.reduce((n,r)=>n+r,0),Wt=(t={})=>{const{background:n=_t,texts:r=[],shape:d=Pt,inSpring:s=St,outSpring:a=kt,textStyle:c={}}=t;return{out:(i,o)=>{const l=i.style.opacity;return{spring:a,from:1,to:0,prepare:e=>{b.prepareOutgoing(e,o),e.style.opacity="1"},tick:e=>{const g=Math.max(0,e-Ft);i.style.opacity=String(g)},onEnd:()=>{i.style.opacity=l}}},in:i=>{let o=null,l=null,e=null;const g=document.body.style.overflow,p=document.getElementById(O);let u=[];const y=()=>{o=document.createElement("div"),o.id=O,Object.assign(o.style,It,{background:n}),document.body.appendChild(o),l=document.createElement("div"),Object.assign(l.style,vt),o.appendChild(l),e=document.createElement("div"),Object.assign(e.style,Dt),l.appendChild(e),r.forEach(h=>{const f=document.createElement("div");f.textContent=h,Object.assign(f.style,Ot,c),e.appendChild(f)}),u=Array.from(e.children).map(h=>h.getBoundingClientRect().width)};return{spring:s,from:0,to:1,prepare:()=>{document.body.style.overflow="hidden",i.style.opacity="1",p==null||p.remove(),y(),o&&l&&(o.style.clipPath="none",l.style.transform="scale(1)")},tick:h=>{if(!(!o||!l||!e)){if(h<=T&&r.length>0){const f=h/T,$=Math.min(Math.floor(f*r.length),r.length-1),w=u[$]??0,x=Vt(u.slice(0,$));l.style.width=`${w}px`,e.style.transform=`translateX(-${x}px)`}if(h>T){const $=1-Math.max(0,Math.min(1,(h-T)/Yt));o.style.clipPath=Ut(d,$),l.style.transform=`scale(${$})`}}},onEnd:()=>{o==null||o.remove(),o=l=e=null,document.body.style.overflow=g}}}}};exports.jaemin=b.jaemin;exports.blind=J;exports.curtainReveal=Wt;exports.drill=tt;exports.fade=st;exports.film=ot;exports.hero=yt;exports.instagram=$t;exports.pinterest=At;exports.scroll=Lt;exports.slide=Ct;exports.strip=Tt;