@ssgoi/core 3.4.0 → 3.5.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 (41) hide show
  1. package/dist/index.cjs +1 -1
  2. package/dist/index.d.ts +0 -1
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +12 -14
  5. package/dist/transitions/blur.d.ts +2 -5
  6. package/dist/transitions/blur.d.ts.map +1 -1
  7. package/dist/transitions/bounce.d.ts +2 -5
  8. package/dist/transitions/bounce.d.ts.map +1 -1
  9. package/dist/transitions/fade.d.ts +2 -5
  10. package/dist/transitions/fade.d.ts.map +1 -1
  11. package/dist/transitions/fly.d.ts +2 -5
  12. package/dist/transitions/fly.d.ts.map +1 -1
  13. package/dist/transitions/index.cjs +1 -1
  14. package/dist/transitions/index.js +181 -172
  15. package/dist/transitions/mask.d.ts +2 -5
  16. package/dist/transitions/mask.d.ts.map +1 -1
  17. package/dist/transitions/none.d.ts +2 -5
  18. package/dist/transitions/none.d.ts.map +1 -1
  19. package/dist/transitions/rotate.d.ts +2 -5
  20. package/dist/transitions/rotate.d.ts.map +1 -1
  21. package/dist/transitions/scale.d.ts +2 -5
  22. package/dist/transitions/scale.d.ts.map +1 -1
  23. package/dist/transitions/slide.d.ts +2 -5
  24. package/dist/transitions/slide.d.ts.map +1 -1
  25. package/dist/view-transitions/depth.d.ts +19 -0
  26. package/dist/view-transitions/depth.d.ts.map +1 -0
  27. package/dist/view-transitions/index.cjs +13 -13
  28. package/dist/view-transitions/index.d.ts +5 -2
  29. package/dist/view-transitions/index.d.ts.map +1 -1
  30. package/dist/view-transitions/index.js +980 -602
  31. package/dist/view-transitions/instagram.d.ts.map +1 -1
  32. package/dist/view-transitions/jaemin.d.ts +0 -4
  33. package/dist/view-transitions/jaemin.d.ts.map +1 -1
  34. package/dist/view-transitions/pinterest.d.ts.map +1 -1
  35. package/dist/view-transitions/sheet.d.ts +19 -0
  36. package/dist/view-transitions/sheet.d.ts.map +1 -0
  37. package/dist/view-transitions/swap.d.ts +13 -0
  38. package/dist/view-transitions/swap.d.ts.map +1 -0
  39. package/package.json +1 -1
  40. package/dist/jaemin-BG8HRXG1.cjs +0 -1
  41. package/dist/jaemin-BWkrXq0V.js +0 -131
@@ -1,26 +1,44 @@
1
- import { p as b, g as x } from "../jaemin-BWkrXq0V.js";
2
- import { a as Ht } from "../jaemin-BWkrXq0V.js";
3
- const F = (t) => new Promise((n) => setTimeout(n, t));
4
- function T() {
1
+ const m = (t, n) => {
2
+ var r;
3
+ t.style.position = "absolute", t.style.width = "100%", t.style.top = `${-1 * (((r = n == null ? void 0 : n.scrollOffset) == null ? void 0 : r.y) ?? 0)}px`, t.style.left = "0";
4
+ }, W = (t) => new Promise((n) => setTimeout(n, t));
5
+ function x(t, n) {
6
+ function r(o) {
7
+ let d = 0, s = 0;
8
+ const c = o.offsetWidth, e = o.offsetHeight;
9
+ let i = o;
10
+ for (; i; )
11
+ d += i.offsetTop, s += i.offsetLeft, i = i.offsetParent;
12
+ return d -= window.scrollY, s -= window.scrollX, { top: d, left: s, width: c, height: e };
13
+ }
14
+ const p = r(t), a = r(n);
15
+ return new DOMRect(
16
+ a.left - p.left,
17
+ a.top - p.top,
18
+ a.width,
19
+ a.height
20
+ );
21
+ }
22
+ function S() {
5
23
  let t, n;
6
- return { promise: new Promise((d, a) => {
7
- t = d, n = a;
24
+ return { promise: new Promise((p, a) => {
25
+ t = p, n = a;
8
26
  }), resolve: t, reject: n };
9
27
  }
10
- const N = { stiffness: 80, damping: 25 }, G = { stiffness: 75, damping: 25 }, q = 300, j = 10, K = "horizontal", Z = "#000000", It = (t = {}) => {
28
+ const Q = { stiffness: 80, damping: 25 }, R = { stiffness: 75, damping: 25 }, tt = 300, nt = 10, it = "horizontal", st = "#000000", Nt = (t = {}) => {
11
29
  const {
12
- inSpring: n = G,
13
- outSpring: i = N,
14
- transitionDelay: d = q,
15
- blindCount: a = j,
16
- direction: s = K,
17
- blindColor: l = Z
30
+ inSpring: n = R,
31
+ outSpring: r = Q,
32
+ transitionDelay: p = tt,
33
+ blindCount: a = nt,
34
+ direction: o = it,
35
+ blindColor: d = st
18
36
  } = t;
19
- let r, o = null;
20
- const c = (e, g, y = "left") => {
21
- window.getComputedStyle(e).position === "static" && (e.style.position = "relative");
22
- const p = document.createElement("div");
23
- p.className = "blind-container", p.style.cssText = `
37
+ let s, c = null;
38
+ const e = (i, y, h = "left") => {
39
+ window.getComputedStyle(i).position === "static" && (i.style.position = "relative");
40
+ const l = document.createElement("div");
41
+ l.className = "blind-container", l.style.cssText = `
24
42
  position: absolute;
25
43
  top: 0;
26
44
  left: 0;
@@ -31,387 +49,613 @@ const N = { stiffness: 80, damping: 25 }, G = { stiffness: 75, damping: 25 }, q
31
49
  overflow: hidden;
32
50
  `;
33
51
  const u = [];
34
- for (let m = 0; m < a; m++) {
52
+ for (let b = 0; b < a; b++) {
35
53
  const f = document.createElement("div");
36
- if (s === "horizontal") {
37
- const w = 100 / a, $ = `calc(${w}% + 1px)`;
54
+ if (o === "horizontal") {
55
+ const $ = 100 / a, w = `calc(${$}% + 1px)`;
38
56
  f.style.cssText = `
39
57
  position: absolute;
40
- top: ${w * m}%;
58
+ top: ${$ * b}%;
41
59
  left: 0;
42
60
  width: 100%;
43
- height: ${$};
44
- background: ${l};
45
- transform: scaleX(${g === "hidden" ? 0 : 1});
46
- transform-origin: ${y} center;
61
+ height: ${w};
62
+ background: ${d};
63
+ transform: scaleX(${y === "hidden" ? 0 : 1});
64
+ transform-origin: ${h} center;
47
65
  will-change: transform;
48
66
  `;
49
67
  } else {
50
- const w = 100 / a, $ = `calc(${w}% + 1px)`;
68
+ const $ = 100 / a, w = `calc(${$}% + 1px)`;
51
69
  f.style.cssText = `
52
70
  position: absolute;
53
71
  top: 0;
54
- left: ${w * m}%;
55
- width: ${$};
72
+ left: ${$ * b}%;
73
+ width: ${w};
56
74
  height: 100%;
57
- background: ${l};
58
- transform: scaleY(${g === "hidden" ? 0 : 1});
59
- transform-origin: ${y === "left" ? "top" : "bottom"} center;
75
+ background: ${d};
76
+ transform: scaleY(${y === "hidden" ? 0 : 1});
77
+ transform-origin: ${h === "left" ? "top" : "bottom"} center;
60
78
  will-change: transform;
61
79
  `;
62
80
  }
63
- u.push(f), p.appendChild(f);
81
+ u.push(f), l.appendChild(f);
64
82
  }
65
- return e.appendChild(p), { container: p, blinds: u };
83
+ return i.appendChild(l), { container: l, blinds: u };
66
84
  };
67
85
  return {
68
86
  out: () => {
69
- let e = null;
70
- r = new Promise((h) => {
71
- o = h;
87
+ let i = null;
88
+ s = new Promise((g) => {
89
+ c = g;
72
90
  });
73
- const g = (h) => {
74
- const p = 1 - h;
91
+ const y = (g) => {
92
+ const l = 1 - g;
75
93
  return {
76
- transform: s === "horizontal" ? `scaleX(${p})` : `scaleY(${p})`
94
+ transform: o === "horizontal" ? `scaleX(${l})` : `scaleY(${l})`
77
95
  };
78
96
  };
79
97
  return {
80
- springs: Array.from({ length: a }, (h, p) => ({
81
- spring: i,
98
+ springs: Array.from({ length: a }, (g, l) => ({
99
+ spring: r,
82
100
  offset: 0.2,
83
101
  css: {
84
102
  // Use getter for lazy element access (evaluated after prepare)
85
103
  get element() {
86
- return e == null ? void 0 : e.blinds[p];
104
+ return i == null ? void 0 : i.blinds[l];
87
105
  },
88
- style: g
106
+ style: y
89
107
  }
90
108
  })),
91
109
  schedule: "stagger",
92
- prepare: (h) => {
93
- b(h), h.style.zIndex = "1000", e = c(h, "hidden", "left");
110
+ prepare: (g) => {
111
+ m(g), g.style.zIndex = "1000", i = e(g, "hidden", "left");
94
112
  },
95
113
  onStart: () => {
96
114
  },
97
115
  onEnd: () => {
98
- o && o();
116
+ c && c();
99
117
  }
100
118
  };
101
119
  },
102
120
  in: () => {
103
- let e = null;
104
- const g = (h) => {
105
- const p = 1 - h;
121
+ let i = null;
122
+ const y = (g) => {
123
+ const l = 1 - g;
106
124
  return {
107
- transform: s === "horizontal" ? `scaleX(${p})` : `scaleY(${p})`
125
+ transform: o === "horizontal" ? `scaleX(${l})` : `scaleY(${l})`
108
126
  };
109
127
  };
110
128
  return {
111
- springs: Array.from({ length: a }, (h, p) => ({
129
+ springs: Array.from({ length: a }, (g, l) => ({
112
130
  spring: n,
113
131
  offset: 0.2,
114
132
  css: {
115
133
  // Use getter for lazy element access (evaluated after prepare)
116
134
  get element() {
117
- return e == null ? void 0 : e.blinds[p];
135
+ return i == null ? void 0 : i.blinds[l];
118
136
  },
119
- style: g
137
+ style: y
120
138
  }
121
139
  })),
122
140
  schedule: "stagger",
123
- prepare: (h) => {
124
- h.style.position = "relative", h.style.zIndex = "0", e = c(h, "closed", "right");
141
+ prepare: (g) => {
142
+ g.style.position = "relative", g.style.zIndex = "0", i = e(g, "closed", "right");
125
143
  },
126
144
  onStart: () => {
127
145
  },
128
146
  wait: async () => {
129
- r && await r, await F(d);
147
+ s && await s, await W(p);
148
+ },
149
+ onEnd: () => {
150
+ i && i.container && i.container.remove();
151
+ }
152
+ };
153
+ }
154
+ };
155
+ }, et = { stiffness: 1, damping: 1 }, rt = { stiffness: 20, damping: 25 }, at = "#000000", ot = "circle", F = "CURTAIN_REVEAL_OVERLAY_ID", lt = {
156
+ position: "fixed",
157
+ inset: "0",
158
+ width: "100vw",
159
+ height: "100%",
160
+ zIndex: "9999",
161
+ display: "flex",
162
+ alignItems: "center",
163
+ justifyContent: "center",
164
+ overflow: "hidden"
165
+ }, ct = {
166
+ position: "relative",
167
+ display: "inline-block",
168
+ height: "5.5rem",
169
+ overflow: "hidden"
170
+ }, dt = {
171
+ display: "flex",
172
+ height: "100%",
173
+ willChange: "transform",
174
+ transition: "transform 0.3s ease"
175
+ }, pt = {
176
+ display: "inline-flex",
177
+ alignItems: "center",
178
+ justifyContent: "center",
179
+ whiteSpace: "nowrap",
180
+ fontSize: "5.5rem",
181
+ fontWeight: "900",
182
+ letterSpacing: "0.02em",
183
+ color: "#FFFFFF"
184
+ }, yt = 0.4, k = 0.5, ht = 0.2;
185
+ function gt(t, n) {
186
+ switch (t) {
187
+ case "circle":
188
+ return `circle(${n * 100}% at 50% 50%)`;
189
+ case "square":
190
+ return `inset(${(1 - n) * 50}% round ${10 * n}%)`;
191
+ case "triangle": {
192
+ const r = n * 100;
193
+ return `polygon(50% ${50 - r}%, ${50 - r}% ${50 + r}%, ${50 + r}% ${50 + r}%)`;
194
+ }
195
+ }
196
+ }
197
+ const ut = (t) => t.reduce((n, r) => n + r, 0), Wt = (t = {}) => {
198
+ const {
199
+ background: n = at,
200
+ texts: r = [],
201
+ shape: p = ot,
202
+ inSpring: a = rt,
203
+ outSpring: o = et,
204
+ textStyle: d = {}
205
+ } = t;
206
+ return {
207
+ out: (s, c) => {
208
+ const e = s.style.opacity;
209
+ return {
210
+ spring: o,
211
+ from: 1,
212
+ to: 0,
213
+ prepare: (i) => {
214
+ m(i, c), i.style.opacity = "1";
215
+ },
216
+ tick: (i) => {
217
+ const y = Math.max(0, i - yt);
218
+ s.style.opacity = String(y);
219
+ },
220
+ onEnd: () => {
221
+ s.style.opacity = e;
222
+ }
223
+ };
224
+ },
225
+ in: (s) => {
226
+ let c = null, e = null, i = null;
227
+ const y = document.body.style.overflow, h = document.getElementById(
228
+ F
229
+ );
230
+ let g = [];
231
+ const l = () => {
232
+ c = document.createElement("div"), c.id = F, Object.assign(c.style, lt, { background: n }), document.body.appendChild(c), e = document.createElement("div"), Object.assign(e.style, ct), c.appendChild(e), i = document.createElement("div"), Object.assign(i.style, dt), e.appendChild(i), r.forEach((u) => {
233
+ const b = document.createElement("div");
234
+ b.textContent = u, Object.assign(b.style, pt, d), i.appendChild(b);
235
+ }), g = Array.from(i.children).map(
236
+ (u) => u.getBoundingClientRect().width
237
+ );
238
+ };
239
+ return {
240
+ spring: a,
241
+ from: 0,
242
+ to: 1,
243
+ prepare: () => {
244
+ document.body.style.overflow = "hidden", s.style.opacity = "1", h == null || h.remove(), l(), c && e && (c.style.clipPath = "none", e.style.transform = "scale(1)");
245
+ },
246
+ tick: (u) => {
247
+ if (!(!c || !e || !i)) {
248
+ if (u <= k && r.length > 0) {
249
+ const b = u / k, f = Math.min(
250
+ Math.floor(b * r.length),
251
+ r.length - 1
252
+ ), $ = g[f] ?? 0, w = ut(g.slice(0, f));
253
+ e.style.width = `${$}px`, i.style.transform = `translateX(-${w}px)`;
254
+ }
255
+ if (u > k) {
256
+ const f = 1 - Math.max(
257
+ 0,
258
+ Math.min(1, (u - k) / ht)
259
+ );
260
+ c.style.clipPath = gt(p, f), e.style.transform = `scale(${f})`;
261
+ }
262
+ }
130
263
  },
131
264
  onEnd: () => {
132
- e && e.container && e.container.remove();
265
+ c == null || c.remove(), c = e = i = null, document.body.style.overflow = y;
133
266
  }
134
267
  };
135
268
  }
136
269
  };
137
- }, J = {
270
+ }, ft = {
271
+ stiffness: 300,
272
+ damping: 22,
273
+ doubleSpring: 0.5
274
+ }, wt = {
275
+ stiffness: 300,
276
+ damping: 22,
277
+ doubleSpring: 0.5
278
+ }, C = 0.05;
279
+ function P(t) {
280
+ const n = x(document.body, t.positionedParent), r = t.scroll.y, p = window.innerHeight - n.top;
281
+ return {
282
+ top: r,
283
+ left: 0,
284
+ width: n.width,
285
+ height: p
286
+ };
287
+ }
288
+ const Mt = (t = {}) => {
289
+ var d, s, c;
290
+ const { direction: n = "enter" } = t, r = n === "enter" ? ft : wt, p = {
291
+ stiffness: ((d = t.spring) == null ? void 0 : d.stiffness) ?? r.stiffness,
292
+ damping: ((s = t.spring) == null ? void 0 : s.damping) ?? r.damping,
293
+ doubleSpring: ((c = t.spring) == null ? void 0 : c.doubleSpring) ?? r.doubleSpring
294
+ };
295
+ let { promise: a, resolve: o } = S();
296
+ return n === "enter" ? {
297
+ // Entering page: scales up from small (0.8 → 1) with fade in
298
+ in: (e, i) => {
299
+ const y = P(i), h = y.left + y.width / 2, g = y.top + y.height / 2;
300
+ return {
301
+ spring: p,
302
+ prepare: () => {
303
+ e.style.opacity = "0", e.style.willChange = "transform, opacity", e.style.backfaceVisibility = "hidden", e.style.contain = "layout paint", e.style.transformOrigin = `${h}px ${g}px`;
304
+ },
305
+ wait: async () => {
306
+ if (a) {
307
+ await a;
308
+ const l = S();
309
+ a = l.promise, o = l.resolve;
310
+ }
311
+ },
312
+ css: (l) => ({
313
+ transform: `scale(${1 - C + l * C})`,
314
+ opacity: l
315
+ }),
316
+ onEnd: () => {
317
+ e.style.opacity = "1", e.style.willChange = "auto", e.style.backfaceVisibility = "", e.style.contain = "", e.style.transformOrigin = "";
318
+ }
319
+ };
320
+ },
321
+ // Exiting page: scales up (1 → 1.2) with fade out, goes to back
322
+ out: (e, i) => {
323
+ const y = P(i), h = y.left + y.width / 2, g = y.top + y.height / 2 + i.scrollOffset.y;
324
+ return {
325
+ spring: p,
326
+ prepare: (l) => {
327
+ m(l, i), l.style.zIndex = "-1", l.style.willChange = "transform, opacity", l.style.backfaceVisibility = "hidden", l.style.contain = "layout paint", l.style.pointerEvents = "none", l.style.transformOrigin = `${h}px ${g}px`;
328
+ },
329
+ css: (l) => ({
330
+ transform: `scale(${1 + (1 - l) * C})`,
331
+ opacity: l
332
+ }),
333
+ onEnd: () => {
334
+ o && o();
335
+ }
336
+ };
337
+ }
338
+ } : {
339
+ // Entering page: scales down from large (1.2 → 1) with fade in
340
+ in: (e, i) => {
341
+ const y = P(i), h = y.left + y.width / 2, g = y.top + y.height / 2;
342
+ return {
343
+ spring: p,
344
+ prepare: () => {
345
+ e.style.opacity = "0", e.style.willChange = "transform, opacity", e.style.backfaceVisibility = "hidden", e.style.contain = "layout paint", e.style.transformOrigin = `${h}px ${g}px`;
346
+ },
347
+ wait: async () => {
348
+ if (a) {
349
+ await a;
350
+ const l = S();
351
+ a = l.promise, o = l.resolve;
352
+ }
353
+ },
354
+ css: (l) => ({
355
+ transform: `scale(${1 + C - l * C})`,
356
+ opacity: l
357
+ }),
358
+ onEnd: () => {
359
+ e.style.opacity = "1", e.style.willChange = "auto", e.style.backfaceVisibility = "", e.style.contain = "", e.style.transformOrigin = "";
360
+ }
361
+ };
362
+ },
363
+ // Exiting page: scales down to small (1 → 0.8) with fade out
364
+ out: (e, i) => {
365
+ const y = P(i), h = y.left + y.width / 2, g = y.top + y.height / 2 + i.scrollOffset.y;
366
+ return {
367
+ spring: p,
368
+ prepare: (l) => {
369
+ m(l, i), l.style.zIndex = "100", l.style.willChange = "transform, opacity", l.style.backfaceVisibility = "hidden", l.style.contain = "layout paint", l.style.pointerEvents = "none", l.style.transformOrigin = `${h}px ${g}px`;
370
+ },
371
+ css: (l) => ({
372
+ transform: `scale(${1 - (1 - l) * C})`,
373
+ opacity: l
374
+ }),
375
+ onEnd: () => {
376
+ o && o();
377
+ }
378
+ };
379
+ }
380
+ };
381
+ }, bt = {
138
382
  stiffness: 125,
139
- damping: 20,
140
- doubleSpring: 0.8
141
- }, Q = {
142
- stiffness: 130,
143
- damping: 20,
144
- doubleSpring: 0.8
145
- }, Ot = (t = {}) => {
146
- var s, l, r;
147
- const { opacity: n = !1, direction: i = "enter" } = t, d = i === "enter" ? J : Q, a = {
148
- stiffness: ((s = t.spring) == null ? void 0 : s.stiffness) ?? d.stiffness,
149
- damping: ((l = t.spring) == null ? void 0 : l.damping) ?? d.damping,
150
- doubleSpring: ((r = t.spring) == null ? void 0 : r.doubleSpring) ?? d.doubleSpring
383
+ damping: 14,
384
+ doubleSpring: 0.5
385
+ }, $t = {
386
+ stiffness: 128,
387
+ damping: 14,
388
+ doubleSpring: 0.5
389
+ }, Gt = (t = {}) => {
390
+ var o, d, s;
391
+ const { opacity: n = !1, direction: r = "enter" } = t, p = r === "enter" ? bt : $t, a = {
392
+ stiffness: ((o = t.spring) == null ? void 0 : o.stiffness) ?? p.stiffness,
393
+ damping: ((d = t.spring) == null ? void 0 : d.damping) ?? p.damping,
394
+ doubleSpring: ((s = t.spring) == null ? void 0 : s.doubleSpring) ?? p.doubleSpring
151
395
  };
152
- return i === "enter" ? {
153
- in: (o) => ({
396
+ return r === "enter" ? {
397
+ in: (c) => ({
154
398
  spring: a,
155
399
  prepare: () => {
156
- o.style.willChange = n ? "transform, opacity" : "transform", o.style.backfaceVisibility = "hidden", o.style.contain = "layout paint";
400
+ c.style.willChange = n ? "transform, opacity" : "transform", c.style.backfaceVisibility = "hidden", c.style.contain = "layout paint";
157
401
  },
158
- css: (c) => {
159
- const e = {
160
- transform: `translate3d(${(1 - c) * 100}%, 0, 0)`
402
+ css: (e) => {
403
+ const i = {
404
+ transform: `translate3d(${(1 - e) * 100}%, 0, 0)`
161
405
  };
162
- return n && (e.opacity = c), e;
406
+ return n && (i.opacity = e), i;
163
407
  },
164
408
  onEnd: () => {
165
- o.style.willChange = "auto", o.style.backfaceVisibility = "", o.style.contain = "";
409
+ c.style.willChange = "auto", c.style.backfaceVisibility = "", c.style.contain = "";
166
410
  }
167
411
  }),
168
- out: (o, c) => ({
412
+ out: (c, e) => ({
169
413
  spring: a,
170
- prepare: (e) => {
171
- b(e, c), e.style.zIndex = "-1", e.style.willChange = n ? "transform, opacity" : "transform", e.style.backfaceVisibility = "hidden", e.style.contain = "layout paint", e.style.pointerEvents = "none";
414
+ prepare: (i) => {
415
+ m(i, e), i.style.zIndex = "-1", i.style.willChange = n ? "transform, opacity" : "transform", i.style.backfaceVisibility = "hidden", i.style.contain = "layout paint", i.style.pointerEvents = "none";
172
416
  },
173
- css: (e) => {
174
- const g = {
175
- transform: `translate3d(${-(1 - e) * 20}%, 0, 0)`
417
+ css: (i) => {
418
+ const y = {
419
+ transform: `translate3d(${-(1 - i) * 20}%, 0, 0)`
176
420
  };
177
- return n && (g.opacity = e), g;
421
+ return n && (y.opacity = i), y;
178
422
  }
179
423
  })
180
424
  } : {
181
- in: (o) => ({
425
+ in: (c) => ({
182
426
  spring: a,
183
427
  prepare: () => {
184
- o.style.willChange = n ? "transform, opacity" : "transform", o.style.backfaceVisibility = "hidden", o.style.contain = "layout paint";
428
+ c.style.willChange = n ? "transform, opacity" : "transform", c.style.backfaceVisibility = "hidden", c.style.contain = "layout paint";
185
429
  },
186
- css: (c) => {
187
- const e = {
188
- transform: `translate3d(${-(1 - c) * 20}%, 0, 0)`
430
+ css: (e) => {
431
+ const i = {
432
+ transform: `translate3d(${-(1 - e) * 20}%, 0, 0)`
189
433
  };
190
- return n && (e.opacity = c), e;
434
+ return n && (i.opacity = e), i;
191
435
  },
192
436
  onEnd: () => {
193
- o.style.willChange = "auto", o.style.backfaceVisibility = "", o.style.contain = "";
437
+ c.style.willChange = "auto", c.style.backfaceVisibility = "", c.style.contain = "";
194
438
  }
195
439
  }),
196
- out: (o, c) => ({
440
+ out: (c, e) => ({
197
441
  spring: a,
198
- prepare: (e) => {
199
- b(e, c), e.style.zIndex = "100", e.style.willChange = n ? "transform, opacity" : "transform", e.style.backfaceVisibility = "hidden", e.style.contain = "layout paint", e.style.pointerEvents = "none";
442
+ prepare: (i) => {
443
+ m(i, e), i.style.zIndex = "100", i.style.willChange = n ? "transform, opacity" : "transform", i.style.backfaceVisibility = "hidden", i.style.contain = "layout paint", i.style.pointerEvents = "none";
200
444
  },
201
- css: (e) => {
202
- const g = {
203
- transform: `translate3d(${(1 - e) * 100}%, 0, 0)`
445
+ css: (i) => {
446
+ const y = {
447
+ transform: `translate3d(${(1 - i) * 100}%, 0, 0)`
204
448
  };
205
- return n && (g.opacity = e), g;
449
+ return n && (y.opacity = i), y;
206
450
  }
207
451
  })
208
452
  };
209
- }, R = {
453
+ }, mt = {
210
454
  stiffness: 180,
211
455
  damping: 20,
212
456
  doubleSpring: !0
213
- }, tt = {
457
+ }, xt = {
214
458
  stiffness: 170,
215
459
  damping: 20,
216
460
  doubleSpring: !0
217
- }, nt = 0, Dt = (t = {}) => {
461
+ }, Et = 0, Bt = (t = {}) => {
218
462
  const {
219
- inSpring: n = tt,
220
- outSpring: i = R,
221
- transitionDelay: d = nt
463
+ inSpring: n = xt,
464
+ outSpring: r = mt,
465
+ transitionDelay: p = Et
222
466
  } = t;
223
- let { promise: a, resolve: s } = T();
467
+ let { promise: a, resolve: o } = S();
224
468
  return {
225
- in: (l) => ({
469
+ in: (d) => ({
226
470
  spring: n,
227
471
  prepare: () => {
228
- l.style.opacity = "0", l.style.willChange = "opacity";
472
+ d.style.opacity = "0", d.style.willChange = "opacity";
229
473
  },
230
474
  wait: async () => {
231
475
  if (a) {
232
476
  await a;
233
- const r = T();
234
- a = r.promise, s = r.resolve, await F(d);
477
+ const s = S();
478
+ a = s.promise, o = s.resolve, await W(p);
235
479
  }
236
480
  },
237
- css: (r) => ({
238
- opacity: r
481
+ css: (s) => ({
482
+ opacity: s
239
483
  }),
240
484
  onEnd: () => {
241
- l.style.willChange = "auto", l.style.opacity = "1";
485
+ d.style.willChange = "auto", d.style.opacity = "1";
242
486
  }
243
487
  }),
244
- out: (l, r) => ({
245
- spring: i,
246
- css: (o) => ({
247
- opacity: o
488
+ out: (d, s) => ({
489
+ spring: r,
490
+ css: (c) => ({
491
+ opacity: c
248
492
  }),
249
493
  prepare: () => {
250
- b(l, r), l.style.willChange = "opacity";
494
+ m(d, s), d.style.willChange = "opacity";
251
495
  },
252
496
  onEnd: () => {
253
- s && s(), l.style.willChange = "auto";
497
+ o && o(), d.style.willChange = "auto";
254
498
  }
255
499
  })
256
500
  };
257
- }, et = {
501
+ }, St = {
258
502
  scaleDown: { stiffness: 20, damping: 7 },
259
503
  // Soft start for cinematic scale
260
504
  translate: { stiffness: 15, damping: 7 },
261
505
  // Medium for movement
262
506
  scaleUp: { stiffness: 20, damping: 7 }
263
507
  // Crisp return to full size
264
- }, E = {
508
+ }, A = {
265
509
  scaleDown: 0,
266
510
  // Start immediately
267
511
  translate: 0.2,
268
512
  // Start when scaleDown is 25% complete
269
513
  scaleUp: 0.8
270
514
  // Start when translate is 70% complete
271
- }, it = 0.8, st = "white", Pt = (t) => {
515
+ }, Ct = 0.8, At = "white", qt = (t) => {
272
516
  var a;
273
- const n = et, i = it, d = ((a = t == null ? void 0 : t.border) == null ? void 0 : a.color) ?? st;
517
+ const n = St, r = Ct, p = ((a = t == null ? void 0 : t.border) == null ? void 0 : a.color) ?? At;
274
518
  return {
275
- out: async (s, l) => {
276
- const r = k(l), o = x(document.body, l.positionedParent), c = at(d, {
277
- ...r,
278
- top: o.top
279
- }), e = {
519
+ out: async (o, d) => {
520
+ const s = Y(d), c = x(document.body, d.positionedParent), e = Pt(p, {
521
+ ...s,
522
+ top: c.top
523
+ }), i = {
280
524
  scale: 1,
281
- translateY: -r.top
282
- }, g = () => {
283
- s.style.transform = `translateY(${e.translateY}px) scale(${e.scale})`;
284
- const y = (r.width - r.width * e.scale) / 2, h = (r.height - r.height * e.scale) / 2;
285
- rt(c, y, h);
525
+ translateY: -s.top
526
+ }, y = () => {
527
+ o.style.transform = `translateY(${i.translateY}px) scale(${i.scale})`;
528
+ const h = (s.width - s.width * i.scale) / 2, g = (s.height - s.height * i.scale) / 2;
529
+ kt(e, h, g);
286
530
  };
287
531
  return {
288
532
  springs: [
289
533
  // Spring 1: Scale Down (1 → scale)
290
534
  {
291
535
  spring: n.scaleDown,
292
- offset: E.scaleDown,
293
- tick: (y) => {
294
- const h = 1 - y;
295
- e.scale = 1 - (1 - i) * h, g();
536
+ offset: A.scaleDown,
537
+ tick: (h) => {
538
+ const g = 1 - h;
539
+ i.scale = 1 - (1 - r) * g, y();
296
540
  }
297
541
  },
298
542
  // Spring 2: Translate (vertical movement)
299
543
  {
300
544
  spring: n.translate,
301
- offset: E.translate,
302
- tick: (y) => {
303
- const h = 1 - y;
304
- e.translateY = -r.top - r.height * h, g();
545
+ offset: A.translate,
546
+ tick: (h) => {
547
+ const g = 1 - h;
548
+ i.translateY = -s.top - s.height * g, y();
305
549
  }
306
550
  },
307
551
  // Spring 3: Scale Up (scale → 1)
308
552
  {
309
553
  spring: n.scaleUp,
310
- offset: E.scaleUp,
311
- tick: (y) => {
312
- const h = 1 - y;
313
- e.scale = i + (1 - i) * h, g();
554
+ offset: A.scaleUp,
555
+ tick: (h) => {
556
+ const g = 1 - h;
557
+ i.scale = r + (1 - r) * g, y();
314
558
  }
315
559
  }
316
560
  ],
317
561
  schedule: "stagger",
318
562
  prepare: () => {
319
- b(s), _(s, r), I(s, r), lt(s, r);
320
- for (const y of c)
321
- l.positionedParent.appendChild(y);
563
+ m(o), V(o, s), U(o, s), Tt(o, s);
564
+ for (const h of e)
565
+ d.positionedParent.appendChild(h);
322
566
  },
323
567
  onEnd: () => {
324
- s.style.clipPath = "", s.style.transformOrigin = "", setTimeout(() => {
325
- for (const y of c)
326
- l.positionedParent.removeChild(y);
568
+ o.style.clipPath = "", o.style.transformOrigin = "", setTimeout(() => {
569
+ for (const h of e)
570
+ d.positionedParent.removeChild(h);
327
571
  }, 1e3);
328
572
  }
329
573
  };
330
574
  },
331
- in: async (s, l) => {
332
- const r = k(l), o = {
333
- scale: i,
334
- translateY: -r.top + r.height
335
- }, c = () => {
336
- s.style.transform = `translateY(${o.translateY}px) scale(${o.scale})`;
575
+ in: async (o, d) => {
576
+ const s = Y(d), c = {
577
+ scale: r,
578
+ translateY: -s.top + s.height
579
+ }, e = () => {
580
+ o.style.transform = `translateY(${c.translateY}px) scale(${c.scale})`;
337
581
  };
338
582
  return {
339
583
  springs: [
340
584
  // Spring 1: Scale Down (1 → scale) - element starts scaled, shrinks further
341
585
  {
342
586
  spring: n.scaleDown,
343
- offset: E.scaleDown,
344
- tick: (e) => {
345
- o.scale = 1 - (1 - i) * e, c();
587
+ offset: A.scaleDown,
588
+ tick: (i) => {
589
+ c.scale = 1 - (1 - r) * i, e();
346
590
  }
347
591
  },
348
592
  // Spring 2: Translate (vertical movement from bottom to top)
349
593
  {
350
594
  spring: n.translate,
351
- offset: E.translate,
352
- tick: (e) => {
353
- o.translateY = -r.top + r.height * (1 - e), c();
595
+ offset: A.translate,
596
+ tick: (i) => {
597
+ c.translateY = -s.top + s.height * (1 - i), e();
354
598
  }
355
599
  },
356
600
  // Spring 3: Scale Up (scale → 1) - element returns to full size
357
601
  {
358
602
  spring: n.scaleUp,
359
- offset: E.scaleUp,
360
- tick: (e) => {
361
- o.scale = i + (1 - i) * e, c();
603
+ offset: A.scaleUp,
604
+ tick: (i) => {
605
+ c.scale = r + (1 - r) * i, e();
362
606
  }
363
607
  }
364
608
  ],
365
609
  schedule: "stagger",
366
610
  prepare: () => {
367
- _(s, r), I(s, r), s.style.transform = `translateY(${-r.top + r.height}px) scale(${i})`;
611
+ V(o, s), U(o, s), o.style.transform = `translateY(${-s.top + s.height}px) scale(${r})`;
368
612
  },
369
613
  onEnd: () => {
370
- s.style.clipPath = "", s.style.transformOrigin = "", s.style.transform = "";
614
+ o.style.clipPath = "", o.style.transformOrigin = "", o.style.transform = "";
371
615
  }
372
616
  };
373
617
  }
374
618
  };
375
619
  };
376
- function rt(t, n, i) {
377
- const d = n * 0.7, a = i * 0.7;
378
- t.topLeft.style.transform = `translate(${d}px, ${a}px)`, t.topRight.style.transform = `translate(${-d}px, ${a}px)`, t.bottomLeft.style.transform = `translate(${d}px, ${-a}px)`, t.bottomRight.style.transform = `translate(${-d}px, ${-a}px)`;
620
+ function kt(t, n, r) {
621
+ const p = n * 0.7, a = r * 0.7;
622
+ t.topLeft.style.transform = `translate(${p}px, ${a}px)`, t.topRight.style.transform = `translate(${-p}px, ${a}px)`, t.bottomLeft.style.transform = `translate(${p}px, ${-a}px)`, t.bottomRight.style.transform = `translate(${-p}px, ${-a}px)`;
379
623
  }
380
- function at(t = "white", n) {
624
+ function Pt(t = "white", n) {
381
625
  const a = document.createElement("div");
382
626
  a.style.position = "fixed", a.style.pointerEvents = "none", a.style.zIndex = "9999", a.style.top = `${n.top - 1}px`, a.style.left = `${n.left - 1}px`, a.style.width = "15px", a.style.height = "15px";
383
- const s = document.createElement("div");
384
- s.style.position = "absolute", s.style.width = "15px", s.style.height = "1px", s.style.backgroundColor = t, s.style.top = "0", s.style.left = "0";
385
- const l = document.createElement("div");
386
- l.style.position = "absolute", l.style.width = "1px", l.style.height = "15px", l.style.backgroundColor = t, l.style.top = "0", l.style.left = "0", a.appendChild(s), a.appendChild(l);
387
- const r = document.createElement("div");
388
- r.style.position = "fixed", r.style.pointerEvents = "none", r.style.zIndex = "9999", r.style.top = `${n.top - 1}px`, r.style.left = `${n.left + n.width - 15 + 1}px`, r.style.width = "15px", r.style.height = "15px";
389
627
  const o = document.createElement("div");
390
- o.style.position = "absolute", o.style.width = "15px", o.style.height = "1px", o.style.backgroundColor = t, o.style.top = "0", o.style.right = "0";
628
+ o.style.position = "absolute", o.style.width = "15px", o.style.height = "1px", o.style.backgroundColor = t, o.style.top = "0", o.style.left = "0";
629
+ const d = document.createElement("div");
630
+ d.style.position = "absolute", d.style.width = "1px", d.style.height = "15px", d.style.backgroundColor = t, d.style.top = "0", d.style.left = "0", a.appendChild(o), a.appendChild(d);
631
+ const s = document.createElement("div");
632
+ s.style.position = "fixed", s.style.pointerEvents = "none", s.style.zIndex = "9999", s.style.top = `${n.top - 1}px`, s.style.left = `${n.left + n.width - 15 + 1}px`, s.style.width = "15px", s.style.height = "15px";
391
633
  const c = document.createElement("div");
392
- c.style.position = "absolute", c.style.width = "1px", c.style.height = "15px", c.style.backgroundColor = t, c.style.top = "0", c.style.right = "0", r.appendChild(o), r.appendChild(c);
634
+ c.style.position = "absolute", c.style.width = "15px", c.style.height = "1px", c.style.backgroundColor = t, c.style.top = "0", c.style.right = "0";
393
635
  const e = document.createElement("div");
394
- 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";
395
- const g = document.createElement("div");
396
- g.style.position = "absolute", g.style.width = "15px", g.style.height = "1px", g.style.backgroundColor = t, g.style.bottom = "0", g.style.left = "0";
636
+ e.style.position = "absolute", e.style.width = "1px", e.style.height = "15px", e.style.backgroundColor = t, e.style.top = "0", e.style.right = "0", s.appendChild(c), s.appendChild(e);
637
+ const i = document.createElement("div");
638
+ i.style.position = "fixed", i.style.pointerEvents = "none", i.style.zIndex = "9999", i.style.top = `${n.top + n.height - 15 + 1}px`, i.style.left = `${n.left - 1}px`, i.style.width = "15px", i.style.height = "15px";
397
639
  const y = document.createElement("div");
398
- y.style.position = "absolute", y.style.width = "1px", y.style.height = "15px", y.style.backgroundColor = t, y.style.bottom = "0", y.style.left = "0", e.appendChild(g), e.appendChild(y);
640
+ y.style.position = "absolute", y.style.width = "15px", y.style.height = "1px", y.style.backgroundColor = t, y.style.bottom = "0", y.style.left = "0";
399
641
  const h = document.createElement("div");
400
- h.style.position = "fixed", h.style.pointerEvents = "none", h.style.zIndex = "9999", h.style.top = `${n.top + n.height - 15 + 1}px`, h.style.left = `${n.left + n.width - 15 + 1}px`, h.style.width = "15px", h.style.height = "15px";
401
- const p = document.createElement("div");
402
- p.style.position = "absolute", p.style.width = "15px", p.style.height = "1px", p.style.backgroundColor = t, p.style.bottom = "0", p.style.right = "0";
642
+ h.style.position = "absolute", h.style.width = "1px", h.style.height = "15px", h.style.backgroundColor = t, h.style.bottom = "0", h.style.left = "0", i.appendChild(y), i.appendChild(h);
643
+ const g = document.createElement("div");
644
+ g.style.position = "fixed", g.style.pointerEvents = "none", g.style.zIndex = "9999", g.style.top = `${n.top + n.height - 15 + 1}px`, g.style.left = `${n.left + n.width - 15 + 1}px`, g.style.width = "15px", g.style.height = "15px";
645
+ const l = document.createElement("div");
646
+ l.style.position = "absolute", l.style.width = "15px", l.style.height = "1px", l.style.backgroundColor = t, l.style.bottom = "0", l.style.right = "0";
403
647
  const u = document.createElement("div");
404
- return u.style.position = "absolute", u.style.width = "1px", u.style.height = "15px", u.style.backgroundColor = t, u.style.bottom = "0", u.style.right = "0", h.appendChild(p), h.appendChild(u), {
648
+ return u.style.position = "absolute", u.style.width = "1px", u.style.height = "15px", u.style.backgroundColor = t, u.style.bottom = "0", u.style.right = "0", g.appendChild(l), g.appendChild(u), {
405
649
  topLeft: a,
406
- topRight: r,
407
- bottomLeft: e,
408
- bottomRight: h,
650
+ topRight: s,
651
+ bottomLeft: i,
652
+ bottomRight: g,
409
653
  *[Symbol.iterator]() {
410
- yield a, yield r, yield e, yield h;
654
+ yield a, yield s, yield i, yield g;
411
655
  }
412
656
  };
413
657
  }
414
- function k(t) {
658
+ function Y(t) {
415
659
  const n = x(document.body, t.positionedParent);
416
660
  return {
417
661
  top: t.scroll.y,
@@ -420,11 +664,11 @@ function k(t) {
420
664
  height: window.innerHeight - n.top
421
665
  };
422
666
  }
423
- function _(t, n) {
424
- const i = n.left + n.width / 2, d = n.top + n.height / 2;
425
- t.style.transformOrigin = `${i}px ${d}px`;
667
+ function V(t, n) {
668
+ const r = n.left + n.width / 2, p = n.top + n.height / 2;
669
+ t.style.transformOrigin = `${r}px ${p}px`;
426
670
  }
427
- function I(t, n) {
671
+ function U(t, n) {
428
672
  t.style.clipPath = `polygon(
429
673
  ${n.left}px ${n.top}px,
430
674
  ${n.left + n.width}px ${n.top}px,
@@ -432,33 +676,33 @@ function I(t, n) {
432
676
  ${n.left}px ${n.top + n.height}px
433
677
  )`;
434
678
  }
435
- function lt(t, n) {
679
+ function Tt(t, n) {
436
680
  t.style.transform = `translateY(${-n.top}px)`;
437
681
  }
438
- function ot(t, n) {
682
+ function Ot(t, n) {
439
683
  return t.querySelector(`[data-hero-key="${n}"]`);
440
684
  }
441
- const vt = (t = {}) => {
442
- var l, r;
685
+ const jt = (t = {}) => {
686
+ var d, s;
443
687
  const n = {
444
- stiffness: ((l = t.spring) == null ? void 0 : l.stiffness) ?? 300,
445
- damping: ((r = t.spring) == null ? void 0 : r.damping) ?? 30
446
- }, i = t.timeout ?? 300, d = t.maxDistance ?? 700;
447
- let a = null, s = null;
688
+ stiffness: ((d = t.spring) == null ? void 0 : d.stiffness) ?? 300,
689
+ damping: ((s = t.spring) == null ? void 0 : s.damping) ?? 30
690
+ }, r = t.timeout ?? 300, p = t.maxDistance ?? 700;
691
+ let a = null, o = null;
448
692
  return {
449
- in: async (o, c) => {
450
- const e = o, g = Array.from(e.querySelectorAll("[data-hero-key]"));
451
- if (g.length === 0)
693
+ in: async (c, e) => {
694
+ const i = c, y = Array.from(i.querySelectorAll("[data-hero-key]"));
695
+ if (y.length === 0)
452
696
  return {
453
697
  spring: n,
454
698
  tick: () => {
455
699
  }
456
700
  // No hero elements, skip animation
457
701
  };
458
- if (!await new Promise((p) => {
459
- a ? p(!0) : (s = p, setTimeout(() => {
460
- s = null, p(!1);
461
- }, i));
702
+ if (!await new Promise((l) => {
703
+ a ? l(!0) : (o = l, setTimeout(() => {
704
+ o = null, l(!1);
705
+ }, r));
462
706
  }) || !a)
463
707
  return a = null, {
464
708
  spring: n,
@@ -466,380 +710,477 @@ const vt = (t = {}) => {
466
710
  }
467
711
  // No fromNode, skip animation
468
712
  };
469
- const h = g.map((p) => {
470
- const u = p.getAttribute("data-hero-key");
713
+ const g = y.map((l) => {
714
+ const u = l.getAttribute("data-hero-key");
471
715
  if (!u) return null;
472
- const m = ot(a, u);
473
- if (!m) return null;
474
- const f = p, w = x(a, m), $ = x(e, f), Y = w.left - $.left - c.scrollOffset.x, U = w.top - $.top - c.scrollOffset.y, V = w.width / $.width, W = w.height / $.height, z = f.style.transform, X = f.style.position, M = f.style.transformOrigin, B = f.style.zIndex, H = f.style.willChange;
716
+ const b = Ot(a, u);
717
+ if (!b) return null;
718
+ const f = l, $ = x(a, b), w = x(i, f), E = $.left - w.left - e.scrollOffset.x, M = $.top - w.top - e.scrollOffset.y, G = $.width / w.width, B = $.height / w.height, q = f.style.transform, j = f.style.position, Z = f.style.transformOrigin, J = f.style.zIndex, K = f.style.willChange;
475
719
  return {
476
720
  toEl: f,
477
- dx: Y,
478
- dy: U,
479
- dw: V,
480
- dh: W,
481
- originalTransform: z,
482
- originalPosition: X,
483
- originalTransformOrigin: M,
484
- originalZIndex: B,
485
- originalWillChange: H
721
+ dx: E,
722
+ dy: M,
723
+ dw: G,
724
+ dh: B,
725
+ originalTransform: q,
726
+ originalPosition: j,
727
+ originalTransformOrigin: Z,
728
+ originalZIndex: J,
729
+ originalWillChange: K
486
730
  };
487
731
  }).filter(
488
- (p) => p !== null && Math.abs(p.dy) <= d
732
+ (l) => l !== null && Math.abs(l.dy) <= p
489
733
  );
490
- return a = null, h.length === 0 ? {
734
+ return a = null, g.length === 0 ? {
491
735
  spring: n,
492
736
  tick: () => {
493
737
  }
494
738
  // No matching hero elements
495
739
  } : {
496
- springs: h.map(({ toEl: p, dx: u, dy: m, dw: f, dh: w }) => ({
740
+ springs: g.map(({ toEl: l, dx: u, dy: b, dw: f, dh: $ }) => ({
497
741
  spring: n,
498
- tick: ($) => {
499
- p.style.transform = `translate(${(1 - $) * u}px, ${(1 - $) * m}px) scale(${$ + (1 - $) * f}, ${$ + (1 - $) * w})`;
742
+ tick: (w) => {
743
+ l.style.transform = `translate(${(1 - w) * u}px, ${(1 - w) * b}px) scale(${w + (1 - w) * f}, ${w + (1 - w) * $})`;
500
744
  }
501
745
  })),
502
746
  schedule: "parallel",
503
747
  prepare: () => {
504
- h.forEach(({ toEl: p }) => {
505
- p.style.position = "relative", p.style.transformOrigin = "top left", p.style.zIndex = "1000", p.style.willChange = "transform";
748
+ g.forEach(({ toEl: l }) => {
749
+ l.style.position = "relative", l.style.transformOrigin = "top left", l.style.zIndex = "1000", l.style.willChange = "transform";
506
750
  });
507
751
  },
508
752
  onEnd: () => {
509
- h.forEach(
753
+ g.forEach(
510
754
  ({
511
- toEl: p,
755
+ toEl: l,
512
756
  originalTransform: u,
513
- originalPosition: m,
757
+ originalPosition: b,
514
758
  originalTransformOrigin: f,
515
- originalZIndex: w,
516
- originalWillChange: $
759
+ originalZIndex: $,
760
+ originalWillChange: w
517
761
  }) => {
518
- p.style.transform = u, p.style.position = m, p.style.transformOrigin = f, p.style.zIndex = w, p.style.willChange = $;
762
+ l.style.transform = u, l.style.position = b, l.style.transformOrigin = f, l.style.zIndex = $, l.style.willChange = w;
519
763
  }
520
764
  );
521
765
  }
522
766
  };
523
767
  },
524
- out: async (o) => ({
768
+ out: async (c) => ({
525
769
  spring: n,
526
770
  onStart: () => {
527
- a = o, s && (s(!0), s = null);
771
+ a = c, o && (o(!0), o = null);
528
772
  },
529
773
  tick: () => {
530
774
  },
531
- prepare: (c) => {
532
- b(c), c.style.opacity = "0";
775
+ prepare: (e) => {
776
+ m(e), e.style.opacity = "0";
533
777
  }
534
778
  })
535
779
  };
780
+ }, L = {
781
+ stiffness: 140,
782
+ damping: 19,
783
+ doubleSpring: 0.8
536
784
  };
537
- function ct({
785
+ function Lt({
538
786
  detailRect: t,
539
787
  galleryRect: n,
540
- pageRect: i,
541
- scrollOffset: d
788
+ pageRect: r,
789
+ scrollOffset: p
542
790
  }) {
543
- const a = n.left - t.left + (n.width - t.width) / 2 - d.x, s = n.top - t.top + (n.height - t.height) / 2 - d.y, l = n.width / t.width, r = n.height / t.height, o = Math.max(l, r), c = t.top / i.height * 100, e = (i.width - (t.left + t.width)) / i.width * 100, g = (i.height - (t.top + t.height)) / i.height * 100, y = t.left / i.width * 100;
791
+ const a = n.left - t.left + (n.width - t.width) / 2 - p.x, o = n.top - t.top + (n.height - t.height) / 2 - p.y, d = n.width / t.width, s = n.height / t.height, c = Math.max(d, s), e = t.top / r.height * 100, i = (r.width - (t.left + t.width)) / r.width * 100, y = (r.height - (t.top + t.height)) / r.height * 100, h = t.left / r.width * 100;
544
792
  return {
545
793
  transformOrigin: `${t.left + t.width / 2}px ${t.top + t.height / 2}px`,
546
- animate: (p) => {
547
- const u = 1 - p;
794
+ animate: (l) => {
795
+ const u = 1 - l;
548
796
  return {
549
- clipPath: `inset(${c * u}% ${e * u}% ${g * u}% ${y * u}%)`,
550
- transform: `translate(${a * u}px, ${s * u}px) scale(${1 + (o - 1) * u})`
797
+ clipPath: `inset(${e * u}% ${i * u}% ${y * u}% ${h * u}%)`,
798
+ transform: `translate(${a * u}px, ${o * u}px) scale(${1 + (c - 1) * u})`
551
799
  };
552
800
  }
553
801
  };
554
802
  }
555
- function dt({
803
+ function vt({
556
804
  detailRect: t,
557
805
  galleryRect: n,
558
- pageRect: i,
559
- scrollOffset: d
806
+ pageRect: r,
807
+ scrollOffset: p
560
808
  }) {
561
- const a = n.left - t.left + (n.width - t.width) / 2 + d.x, s = n.top - t.top + (n.height - t.height) / 2 + d.y, l = n.width / t.width, r = n.height / t.height, o = Math.min(l, r), c = t.top / i.height * 100, e = (i.width - (t.left + t.width)) / i.width * 100, g = (i.height - (t.top + t.height)) / i.height * 100, y = t.left / i.width * 100;
809
+ const a = n.left - t.left + (n.width - t.width) / 2 + p.x, o = n.top - t.top + (n.height - t.height) / 2 + p.y, d = n.width / t.width, s = n.height / t.height, c = Math.min(d, s), e = t.top / r.height * 100, i = (r.width - (t.left + t.width)) / r.width * 100, y = (r.height - (t.top + t.height)) / r.height * 100, h = t.left / r.width * 100;
562
810
  return {
563
811
  transformOrigin: `${t.left + t.width / 2}px ${t.top + t.height / 2}px`,
564
- animate: (p) => {
565
- const u = 1 - p;
812
+ animate: (l) => {
813
+ const u = 1 - l;
566
814
  return {
567
- clipPath: `inset(${c * u}% ${e * u}% ${g * u}% ${y * u}%)`,
568
- transform: `translate(${a * u - d.x}px, ${s * u - d.y}px) scale(${1 + (o - 1) * u})`
815
+ clipPath: `inset(${e * u}% ${i * u}% ${y * u}% ${h * u}%)`,
816
+ transform: `translate(${a * u - p.x}px, ${o * u - p.y}px) scale(${1 + (c - 1) * u})`
569
817
  };
570
818
  }
571
819
  };
572
820
  }
573
- function pt(t, n, i) {
574
- const d = t.querySelector(
821
+ function It(t, n, r) {
822
+ const p = t.querySelector(
575
823
  "[data-instagram-detail-key]"
576
824
  ), a = n.querySelector(
577
825
  "[data-instagram-detail-key]"
578
826
  );
579
827
  if (t.querySelectorAll("[data-instagram-detail-key]").length > 1 || n.querySelectorAll("[data-instagram-detail-key]").length > 1)
580
828
  return null;
581
- let s = null, l = null, r = !1;
582
- if (!d && a) {
583
- l = a;
584
- const e = l.getAttribute("data-instagram-detail-key");
585
- if (!e) return null;
586
- s = t.querySelector(
587
- `[data-instagram-gallery-key="${e}"]`
588
- ), s && (r = !0);
589
- } else if (d && !a) {
590
- l = d;
591
- const e = l.getAttribute("data-instagram-detail-key");
592
- if (!e) return null;
593
- s = n.querySelector(
594
- `[data-instagram-gallery-key="${e}"]`
595
- ), s && (r = !1);
829
+ let o = null, d = null, s = !1;
830
+ if (!p && a) {
831
+ d = a;
832
+ const i = d.getAttribute("data-instagram-detail-key");
833
+ if (!i) return null;
834
+ o = t.querySelector(
835
+ `[data-instagram-gallery-key="${i}"]`
836
+ ), o && (s = !0);
837
+ } else if (p && !a) {
838
+ d = p;
839
+ const i = d.getAttribute("data-instagram-detail-key");
840
+ if (!i) return null;
841
+ o = n.querySelector(
842
+ `[data-instagram-gallery-key="${i}"]`
843
+ ), o && (s = !1);
596
844
  }
597
- if (!s || !l)
845
+ if (!o || !d)
598
846
  return null;
599
- const o = x(r ? t : n, s), c = x(r ? n : t, l);
600
- if (r) {
601
- const e = ct({
602
- detailRect: c,
603
- galleryRect: o,
847
+ const c = x(s ? t : n, o), e = x(s ? n : t, d);
848
+ if (s) {
849
+ const i = Lt({
850
+ detailRect: e,
851
+ galleryRect: c,
604
852
  pageRect: n.getBoundingClientRect(),
605
- scrollOffset: i
853
+ scrollOffset: r
606
854
  });
607
- return n.style.transformOrigin = e.transformOrigin, {
855
+ return n.style.transformOrigin = i.transformOrigin, {
608
856
  isEnterMode: !0,
609
- inAnimation: e.animate
857
+ inAnimation: i.animate
610
858
  // No outAnimation - gallery stays visible
611
859
  };
612
860
  } else {
613
- const e = dt({
614
- detailRect: c,
615
- galleryRect: o,
861
+ const i = vt({
862
+ detailRect: e,
863
+ galleryRect: c,
616
864
  pageRect: t.getBoundingClientRect(),
617
- scrollOffset: i
865
+ scrollOffset: r
618
866
  });
619
- return t.style.transformOrigin = e.transformOrigin, {
867
+ return t.style.transformOrigin = i.transformOrigin, {
620
868
  isEnterMode: !1,
621
- outAnimation: e.animate
869
+ outAnimation: i.animate
622
870
  // No inAnimation - gallery stays visible
623
871
  };
624
872
  }
625
873
  }
626
- const Ft = (t = {}) => {
627
- var r, o, c;
874
+ const Zt = (t = {}) => {
875
+ var s, c, e;
628
876
  const n = {
629
- stiffness: ((r = t.spring) == null ? void 0 : r.stiffness) ?? 150,
630
- damping: ((o = t.spring) == null ? void 0 : o.damping) ?? 20,
631
- doubleSpring: ((c = t.spring) == null ? void 0 : c.doubleSpring) ?? !0
632
- }, i = t.timeout ?? 300;
633
- let d = null, a = null, s = null, l = null;
877
+ stiffness: ((s = t.spring) == null ? void 0 : s.stiffness) ?? L.stiffness,
878
+ damping: ((c = t.spring) == null ? void 0 : c.damping) ?? L.damping,
879
+ doubleSpring: ((e = t.spring) == null ? void 0 : e.doubleSpring) ?? L.doubleSpring
880
+ }, r = t.timeout ?? 300;
881
+ let p = null, a = null, o = null, d = null;
634
882
  return {
635
- in: async (e, { scrollOffset: g }) => {
636
- const y = e;
637
- return !await new Promise((p) => {
638
- d ? p(!0) : (a = p, setTimeout(() => {
639
- a = null, p(!1);
640
- }, i));
641
- }) || !d ? (l == null || l(), l = null, d = null, {
883
+ in: async (i, { scrollOffset: y }) => {
884
+ const h = i;
885
+ return !await new Promise((l) => {
886
+ p ? l(!0) : (a = l, setTimeout(() => {
887
+ a = null, l(!1);
888
+ }, r));
889
+ }) || !p ? (d == null || d(), d = null, p = null, {
642
890
  spring: n,
643
891
  css: () => ({})
644
- }) : (s = pt(d, y, g), l == null || l(), l = null, s ? (d = null, {
892
+ }) : (o = It(p, h, y), d == null || d(), d = null, o ? (p = null, {
645
893
  spring: n,
646
- css: (p) => s != null && s.inAnimation ? s.inAnimation(p) : {}
647
- }) : (d = null, {
894
+ css: (l) => o != null && o.inAnimation ? o.inAnimation(l) : {}
895
+ }) : (p = null, {
648
896
  spring: n,
649
897
  css: () => ({})
650
898
  }));
651
899
  },
652
- out: async (e, g) => {
653
- const y = new Promise((h) => {
654
- l = h;
900
+ out: async (i, y) => {
901
+ const h = new Promise((g) => {
902
+ d = g;
655
903
  });
656
904
  return {
657
905
  spring: n,
658
- prepare: (h) => {
659
- s != null && s.isEnterMode ? b(h) : (b(h, g), h.style.zIndex = "-1");
906
+ prepare: (g) => {
907
+ o != null && o.isEnterMode ? m(g) : (m(g, y), g.style.zIndex = "-1");
660
908
  },
661
909
  wait: async () => {
662
- d = e, a && (a(!0), a = null), await y;
910
+ p = i, a && (a(!0), a = null), await h;
663
911
  },
664
- css: (h) => s != null && s.outAnimation ? s.outAnimation(h) : {}
912
+ css: (g) => o != null && o.outAnimation ? o.outAnimation(g) : {}
665
913
  };
666
914
  }
667
915
  };
668
916
  };
669
- function ht({
917
+ function _t(t) {
918
+ const n = x(document.body, t.positionedParent);
919
+ return {
920
+ top: t.scroll.y,
921
+ left: 0,
922
+ width: n.width,
923
+ height: window.innerHeight - n.top
924
+ };
925
+ }
926
+ const Jt = (t = {}) => {
927
+ var o, d;
928
+ const n = {
929
+ stiffness: ((o = t.spring) == null ? void 0 : o.stiffness) ?? 50,
930
+ damping: ((d = t.spring) == null ? void 0 : d.damping) ?? 30
931
+ }, r = t.initialRotation ?? 45, p = t.initialScale ?? 0.01, a = t.rotationTriggerPoint ?? 0.8;
932
+ return {
933
+ out: async (s, c) => {
934
+ const e = s.style.opacity;
935
+ return {
936
+ spring: {
937
+ stiffness: 80,
938
+ damping: 25
939
+ },
940
+ from: 1,
941
+ to: 0,
942
+ prepare: () => {
943
+ m(s, c), s.style.opacity = "1";
944
+ },
945
+ tick: (i) => {
946
+ s.style.opacity = String(i);
947
+ },
948
+ onEnd: () => {
949
+ s.style.opacity = e;
950
+ }
951
+ };
952
+ },
953
+ in: async (s, c) => {
954
+ const e = _t(c), i = s.style.transform, y = s.style.transformOrigin, h = s.style.position, g = s.style.zIndex;
955
+ return {
956
+ spring: n,
957
+ from: 0,
958
+ to: 1,
959
+ prepare: () => {
960
+ const l = Math.min(e.width, e.height) * 0.4;
961
+ s.style.setProperty(
962
+ "--max-border-radius",
963
+ `${l}px`
964
+ ), s.style.setProperty("--border-radius-scale", "1"), s.style.willChange = "transform", s.style.backfaceVisibility = "hidden";
965
+ const u = e.left + e.width / 2, b = e.top + e.height / 2;
966
+ s.style.transformOrigin = `${u}px ${b}px`, s.style.position = "fixed", s.style.top = `${e.top}px`, s.style.left = `${e.left}px`, s.style.width = `${e.width}px`, s.style.height = `${e.height}px`, s.style.zIndex = "1000", s.style.overflow = "hidden", s.style.transform = `rotate(${r}deg) scale(${p}) translateZ(0)`, s.style.borderRadius = "calc(var(--max-border-radius) * var(--border-radius-scale))", s.style.opacity = "1";
967
+ },
968
+ tick: (l) => {
969
+ let u;
970
+ if (l <= 0.05)
971
+ u = p;
972
+ else if (l <= a) {
973
+ const w = (l - 0.05) / (a - 0.05), E = Math.pow(w, 9);
974
+ u = p + (0.8 - p) * E;
975
+ } else {
976
+ const w = (l - a) / (1 - a);
977
+ u = 0.8 + 0.2 * (1 - Math.pow(1 - w, 3));
978
+ }
979
+ let b;
980
+ const f = 0.7;
981
+ if (l <= f)
982
+ b = r;
983
+ else {
984
+ const w = (l - f) / (1 - f), E = 1 - Math.pow(1 - w, 2);
985
+ b = r * (1 - E);
986
+ }
987
+ let $;
988
+ if (l <= f)
989
+ $ = 1;
990
+ else {
991
+ const w = (l - f) / (1 - f);
992
+ $ = 1 - Math.pow(w, 0.5);
993
+ }
994
+ s.style.transform = `rotate(${b.toFixed(2)}deg) scale(${u.toFixed(4)}) translateZ(0)`, s.style.setProperty(
995
+ "--border-radius-scale",
996
+ $.toFixed(4)
997
+ );
998
+ },
999
+ onEnd: () => {
1000
+ s.style.willChange = "", s.style.backfaceVisibility = "", s.style.removeProperty("--max-border-radius"), s.style.removeProperty("--border-radius-scale"), s.style.transform = i, s.style.transformOrigin = y, s.style.position = h, s.style.zIndex = g, s.style.top = "", s.style.left = "", s.style.width = "", s.style.height = "", s.style.overflow = "", s.style.borderRadius = "";
1001
+ }
1002
+ };
1003
+ }
1004
+ };
1005
+ }, v = {
1006
+ stiffness: 140,
1007
+ damping: 19,
1008
+ doubleSpring: 0.7
1009
+ };
1010
+ function Dt({
670
1011
  detailRect: t,
671
1012
  galleryRect: n,
672
- pageRect: i,
673
- scrollOffset: d
1013
+ pageRect: r,
1014
+ scrollOffset: p
674
1015
  }) {
675
- const a = n.left - t.left + (n.width - t.width) / 2 - d.x, s = n.top - t.top + (n.height - t.height) / 2 - d.y, l = n.width / t.width, r = n.height / t.height, o = Math.max(l, r), c = t.top / i.height * 100, e = (i.width - (t.left + t.width)) / i.width * 100, g = (i.height - (t.top + t.height)) / i.height * 100, y = t.left / i.width * 100;
1016
+ const a = n.left - t.left + (n.width - t.width) / 2 - p.x, o = n.top - t.top + (n.height - t.height) / 2 - p.y, d = n.width / t.width, s = n.height / t.height, c = Math.max(d, s), e = t.top / r.height * 100, i = (r.width - (t.left + t.width)) / r.width * 100, y = (r.height - (t.top + t.height)) / r.height * 100, h = t.left / r.width * 100;
676
1017
  return {
677
1018
  transformOrigin: `${t.left + t.width / 2}px ${t.top + t.height / 2}px`,
678
- animate: (p) => {
679
- const u = 1 - p;
1019
+ animate: (l) => {
1020
+ const u = 1 - l;
680
1021
  return {
681
- clipPath: `inset(${c * u}% ${e * u}% ${g * u}% ${y * u}%)`,
682
- transform: `translate(${a * u}px, ${s * u}px) scale(${1 + (o - 1) * u})`
1022
+ clipPath: `inset(${e * u}% ${i * u}% ${y * u}% ${h * u}%)`,
1023
+ transform: `translate(${a * u}px, ${o * u}px) scale(${1 + (c - 1) * u})`
683
1024
  };
684
1025
  }
685
1026
  };
686
1027
  }
687
- function yt({
1028
+ function Ft({
688
1029
  galleryRect: t,
689
1030
  detailRect: n,
690
- scrollOffset: i
1031
+ scrollOffset: r
691
1032
  }) {
692
- const d = n.left - t.left + (n.width - t.width) / 2 + i.x, a = n.top - t.top + (n.height - t.height) / 2 + i.y, s = n.width / t.width, l = n.height / t.height, r = Math.max(s, l);
1033
+ const p = n.left - t.left + (n.width - t.width) / 2 + r.x, a = n.top - t.top + (n.height - t.height) / 2 + r.y, o = n.width / t.width, d = n.height / t.height, s = Math.max(o, d);
693
1034
  return {
694
1035
  transformOrigin: `${t.left + t.width / 2}px ${t.top + t.height / 2}px`,
695
- animate: (c) => {
696
- const e = 1 - c;
1036
+ animate: (e) => {
1037
+ const i = 1 - e;
697
1038
  return {
698
- transform: `translate(${d * e - i.x}px, ${a * e - i.y}px) scale(${1 + (r - 1) * e})`,
699
- opacity: `${1 - e}`
1039
+ transform: `translate(${p * i - r.x}px, ${a * i - r.y}px) scale(${1 + (s - 1) * i})`,
1040
+ opacity: `${1 - i}`
700
1041
  };
701
1042
  }
702
1043
  };
703
1044
  }
704
- function gt({
1045
+ function Yt({
705
1046
  galleryRect: t,
706
1047
  detailRect: n,
707
- scrollOffset: i
1048
+ scrollOffset: r
708
1049
  }) {
709
- const d = n.left - t.left + (n.width - t.width) / 2 - i.x, a = n.top - t.top + (n.height - t.height) / 2 - i.y, s = n.width / t.width, l = n.height / t.height, r = Math.max(s, l);
1050
+ const p = n.left - t.left + (n.width - t.width) / 2 - r.x, a = n.top - t.top + (n.height - t.height) / 2 - r.y, o = n.width / t.width, d = n.height / t.height, s = Math.max(o, d);
710
1051
  return {
711
1052
  transformOrigin: `${t.left + t.width / 2}px ${t.top + t.height / 2}px`,
712
- animate: (c) => {
713
- const e = 1 - c, g = c;
1053
+ animate: (e) => {
1054
+ const i = 1 - e, y = e;
714
1055
  return {
715
- transform: `translate(${d * e}px, ${a * e}px) scale(${1 + (r - 1) * e})`,
716
- opacity: `${g}`
1056
+ transform: `translate(${p * i}px, ${a * i}px) scale(${1 + (s - 1) * i})`,
1057
+ opacity: `${y}`
717
1058
  };
718
1059
  }
719
1060
  };
720
1061
  }
721
- function ut({
1062
+ function Vt({
722
1063
  detailRect: t,
723
1064
  galleryRect: n,
724
- pageRect: i,
725
- scrollOffset: d
1065
+ pageRect: r,
1066
+ scrollOffset: p
726
1067
  }) {
727
- const a = n.left - t.left + (n.width - t.width) / 2 + d.x, s = n.top - t.top + (n.height - t.height) / 2 + d.y, l = n.width / t.width, r = n.height / t.height, o = Math.min(l, r), c = t.top / i.height * 100, e = (i.width - (t.left + t.width)) / i.width * 100, g = (i.height - (t.top + t.height)) / i.height * 100, y = t.left / i.width * 100;
1068
+ const a = n.left - t.left + (n.width - t.width) / 2 + p.x, o = n.top - t.top + (n.height - t.height) / 2 + p.y, d = n.width / t.width, s = n.height / t.height, c = Math.min(d, s), e = t.top / r.height * 100, i = (r.width - (t.left + t.width)) / r.width * 100, y = (r.height - (t.top + t.height)) / r.height * 100, h = t.left / r.width * 100;
728
1069
  return {
729
1070
  transformOrigin: `${t.left + t.width / 2}px ${t.top + t.height / 2}px`,
730
- animate: (p) => {
731
- const u = 1 - p;
1071
+ animate: (l) => {
1072
+ const u = 1 - l;
732
1073
  return {
733
- clipPath: `inset(${c * u}% ${e * u}% ${g * u}% ${y * u}%)`,
734
- transform: `translate(${a * u - d.x}px, ${s * u - d.y}px) scale(${1 + (o - 1) * u})`
1074
+ clipPath: `inset(${e * u}% ${i * u}% ${y * u}% ${h * u}%)`,
1075
+ transform: `translate(${a * u - p.x}px, ${o * u - p.y}px) scale(${1 + (c - 1) * u})`
735
1076
  };
736
1077
  }
737
1078
  };
738
1079
  }
739
- function ft(t, n, i) {
740
- const d = t.querySelector(
1080
+ function Ut(t, n, r) {
1081
+ const p = t.querySelector(
741
1082
  "[data-pinterest-detail-key]"
742
1083
  ), a = n.querySelector(
743
1084
  "[data-pinterest-detail-key]"
744
1085
  );
745
1086
  if (t.querySelectorAll("[data-pinterest-detail-key]").length > 1 || n.querySelectorAll("[data-pinterest-detail-key]").length > 1)
746
1087
  return null;
747
- let s = null, l = null, r = !1;
748
- if (!d && a) {
749
- l = a;
750
- const e = l.getAttribute("data-pinterest-detail-key");
751
- if (!e) return null;
752
- s = t.querySelector(
753
- `[data-pinterest-gallery-key="${e}"]`
754
- ), s && (r = !0);
755
- } else if (d && !a) {
756
- l = d;
757
- const e = l.getAttribute("data-pinterest-detail-key");
758
- if (!e) return null;
759
- s = n.querySelector(
760
- `[data-pinterest-gallery-key="${e}"]`
761
- ), s && (r = !1);
1088
+ let o = null, d = null, s = !1;
1089
+ if (!p && a) {
1090
+ d = a;
1091
+ const i = d.getAttribute("data-pinterest-detail-key");
1092
+ if (!i) return null;
1093
+ o = t.querySelector(
1094
+ `[data-pinterest-gallery-key="${i}"]`
1095
+ ), o && (s = !0);
1096
+ } else if (p && !a) {
1097
+ d = p;
1098
+ const i = d.getAttribute("data-pinterest-detail-key");
1099
+ if (!i) return null;
1100
+ o = n.querySelector(
1101
+ `[data-pinterest-gallery-key="${i}"]`
1102
+ ), o && (s = !1);
762
1103
  }
763
- if (!s || !l)
1104
+ if (!o || !d)
764
1105
  return null;
765
- const o = x(r ? t : n, s), c = x(r ? n : t, l);
766
- if (r) {
767
- const e = ht({
768
- detailRect: c,
769
- galleryRect: o,
1106
+ const c = x(s ? t : n, o), e = x(s ? n : t, d);
1107
+ if (s) {
1108
+ const i = Dt({
1109
+ detailRect: e,
1110
+ galleryRect: c,
770
1111
  pageRect: n.getBoundingClientRect(),
771
- scrollOffset: i
772
- }), g = yt({
773
- galleryRect: o,
774
- detailRect: c,
775
- scrollOffset: i
1112
+ scrollOffset: r
1113
+ }), y = Ft({
1114
+ galleryRect: c,
1115
+ detailRect: e,
1116
+ scrollOffset: r
776
1117
  });
777
- return n.style.transformOrigin = e.transformOrigin, t.style.transformOrigin = g.transformOrigin, {
778
- inAnimation: e.animate,
779
- outAnimation: g.animate
1118
+ return n.style.transformOrigin = i.transformOrigin, t.style.transformOrigin = y.transformOrigin, {
1119
+ inAnimation: i.animate,
1120
+ outAnimation: y.animate
780
1121
  };
781
1122
  } else {
782
- const e = gt({
783
- galleryRect: o,
784
- detailRect: c,
785
- scrollOffset: i
786
- }), g = ut({
787
- detailRect: c,
788
- galleryRect: o,
1123
+ const i = Yt({
1124
+ galleryRect: c,
1125
+ detailRect: e,
1126
+ scrollOffset: r
1127
+ }), y = Vt({
1128
+ detailRect: e,
1129
+ galleryRect: c,
789
1130
  pageRect: t.getBoundingClientRect(),
790
- scrollOffset: i
1131
+ scrollOffset: r
791
1132
  });
792
- return n.style.transformOrigin = e.transformOrigin, t.style.transformOrigin = g.transformOrigin, {
793
- inAnimation: e.animate,
794
- outAnimation: g.animate
1133
+ return n.style.transformOrigin = i.transformOrigin, t.style.transformOrigin = y.transformOrigin, {
1134
+ inAnimation: i.animate,
1135
+ outAnimation: y.animate
795
1136
  };
796
1137
  }
797
1138
  }
798
- const Yt = (t = {}) => {
799
- var r, o, c;
1139
+ const Kt = (t = {}) => {
1140
+ var s, c, e;
800
1141
  const n = {
801
- stiffness: ((r = t.spring) == null ? void 0 : r.stiffness) ?? 30,
802
- damping: ((o = t.spring) == null ? void 0 : o.damping) ?? 10,
803
- doubleSpring: ((c = t.spring) == null ? void 0 : c.doubleSpring) ?? !0
804
- }, i = t.timeout ?? 300;
805
- let d = null, a = null, s = null, l = null;
1142
+ stiffness: ((s = t.spring) == null ? void 0 : s.stiffness) ?? v.stiffness,
1143
+ damping: ((c = t.spring) == null ? void 0 : c.damping) ?? v.damping,
1144
+ doubleSpring: ((e = t.spring) == null ? void 0 : e.doubleSpring) ?? v.doubleSpring
1145
+ }, r = t.timeout ?? 300;
1146
+ let p = null, a = null, o = null, d = null;
806
1147
  return {
807
- in: async (e, { scrollOffset: g }) => {
808
- const y = e;
809
- return !await new Promise((p) => {
810
- d ? p(!0) : (a = p, setTimeout(() => {
811
- a = null, p(!1);
812
- }, i));
813
- }) || !d ? (l == null || l(), l = null, d = null, {
1148
+ in: async (i, { scrollOffset: y }) => {
1149
+ const h = i;
1150
+ return !await new Promise((l) => {
1151
+ p ? l(!0) : (a = l, setTimeout(() => {
1152
+ a = null, l(!1);
1153
+ }, r));
1154
+ }) || !p ? (d == null || d(), d = null, p = null, {
814
1155
  spring: n,
815
1156
  css: () => ({})
816
- }) : (s = ft(d, y, g), l == null || l(), l = null, s ? (d = null, {
1157
+ }) : (o = Ut(p, h, y), d == null || d(), d = null, o ? (p = null, {
817
1158
  spring: n,
818
- css: (p) => s ? s.inAnimation(p) : {}
819
- }) : (d = null, {
1159
+ css: (l) => o ? o.inAnimation(l) : {}
1160
+ }) : (p = null, {
820
1161
  spring: n,
821
1162
  css: () => ({})
822
1163
  }));
823
1164
  },
824
- out: async (e) => {
825
- const g = new Promise((y) => {
826
- l = y;
1165
+ out: async (i) => {
1166
+ const y = new Promise((h) => {
1167
+ d = h;
827
1168
  });
828
1169
  return {
829
1170
  spring: n,
830
- prepare: (y) => {
831
- b(y), y.style.zIndex = "-1";
1171
+ prepare: (h) => {
1172
+ m(h), h.style.zIndex = "-1";
832
1173
  },
833
1174
  wait: async () => {
834
- d = e, a && (a(!0), a = null), await g;
1175
+ p = i, a && (a(!0), a = null), await y;
835
1176
  },
836
- css: (y) => s ? s.outAnimation(y) : {}
1177
+ css: (h) => o ? o.outAnimation(h) : {}
837
1178
  };
838
1179
  }
839
1180
  };
840
- }, O = { stiffness: 100, damping: 30 }, Ut = () => ({
1181
+ }, X = { stiffness: 100, damping: 30 }, Qt = () => ({
841
1182
  in: (t) => ({
842
- spring: O,
1183
+ spring: X,
843
1184
  prepare: () => {
844
1185
  t.style.opacity = "0", t.style.transform = "rotate(-180deg)", t.style.transformOrigin = "center center", t.style.willChange = "transform, opacity";
845
1186
  },
@@ -853,266 +1194,303 @@ const Yt = (t = {}) => {
853
1194
  }
854
1195
  }),
855
1196
  out: (t, n) => ({
856
- spring: O,
1197
+ spring: X,
857
1198
  prepare: () => {
858
- b(t, n), t.style.transformOrigin = "center center", t.style.willChange = "transform, opacity";
1199
+ m(t, n), t.style.transformOrigin = "center center", t.style.willChange = "transform, opacity";
859
1200
  },
860
- css: (i) => ({
1201
+ css: (r) => ({
861
1202
  // 0deg → 180deg, hide after 90deg (progress < 0.5)
862
- transform: `rotate(${(1 - i) * 180}deg)`,
863
- opacity: i > 0.5 ? 1 : 0
1203
+ transform: `rotate(${(1 - r) * 180}deg)`,
1204
+ opacity: r > 0.5 ? 1 : 0
864
1205
  }),
865
1206
  onEnd: () => {
866
1207
  t.style.willChange = "auto";
867
1208
  }
868
1209
  })
869
- }), D = {
1210
+ }), z = {
870
1211
  stiffness: 5,
871
1212
  damping: 4
872
- }, Vt = (t = {}) => {
873
- var o, c;
874
- const n = t.direction ?? "up", i = {
875
- stiffness: ((o = t.spring) == null ? void 0 : o.stiffness) ?? D.stiffness,
876
- damping: ((c = t.spring) == null ? void 0 : c.damping) ?? D.damping
877
- }, d = n === "up";
878
- let a = null, s = null, l = null;
879
- const r = () => {
880
- if (a === null || s === null)
1213
+ }, Rt = (t = {}) => {
1214
+ var c, e;
1215
+ const n = t.direction ?? "up", r = {
1216
+ stiffness: ((c = t.spring) == null ? void 0 : c.stiffness) ?? z.stiffness,
1217
+ damping: ((e = t.spring) == null ? void 0 : e.damping) ?? z.damping
1218
+ }, p = n === "up";
1219
+ let a = null, o = null, d = null;
1220
+ const s = () => {
1221
+ if (a === null || o === null)
881
1222
  return null;
882
- const e = Math.min(a, s), g = window.innerHeight;
883
- return Math.max(e, g);
1223
+ const i = Math.min(a, o), y = window.innerHeight;
1224
+ return Math.max(i, y);
884
1225
  };
885
1226
  return {
886
- in: (e) => (s = e.offsetHeight, a !== null && (l = r()), {
887
- spring: i,
1227
+ in: (i) => (o = i.offsetHeight, a !== null && (d = s()), {
1228
+ spring: r,
888
1229
  prepare: () => {
889
- e.style.willChange = "transform", e.style.backfaceVisibility = "hidden", e.style.contain = "layout paint";
1230
+ i.style.willChange = "transform", i.style.backfaceVisibility = "hidden", i.style.contain = "layout paint";
890
1231
  },
891
- tick: (g) => {
892
- l === null && (l = r());
893
- const y = l ?? window.innerHeight, h = d ? (1 - g) * y : (1 - g) * -y;
894
- e.style.transform = `translate3d(0, ${h}px, 0)`;
1232
+ tick: (y) => {
1233
+ d === null && (d = s());
1234
+ const h = d ?? window.innerHeight, g = p ? (1 - y) * h : (1 - y) * -h;
1235
+ i.style.transform = `translate3d(0, ${g}px, 0)`;
895
1236
  },
896
1237
  onEnd: () => {
897
- e.style.willChange = "auto", e.style.backfaceVisibility = "", e.style.contain = "";
1238
+ i.style.willChange = "auto", i.style.backfaceVisibility = "", i.style.contain = "";
898
1239
  }
899
1240
  }),
900
- out: (e, g) => ({
901
- spring: i,
1241
+ out: (i, y) => ({
1242
+ spring: r,
902
1243
  onStart: () => {
903
- a = e.offsetHeight, s !== null && (l = r());
1244
+ a = i.offsetHeight, o !== null && (d = s());
904
1245
  },
905
- tick: (y) => {
906
- l === null && (l = r());
907
- const h = l ?? window.innerHeight, p = d ? (1 - y) * -h : (1 - y) * h;
908
- e.style.transform = `translate3d(0, ${p}px, 0)`;
1246
+ tick: (h) => {
1247
+ d === null && (d = s());
1248
+ const g = d ?? window.innerHeight, l = p ? (1 - h) * -g : (1 - h) * g;
1249
+ i.style.transform = `translate3d(0, ${l}px, 0)`;
909
1250
  },
910
- prepare: (y) => {
911
- b(y, g), y.style.zIndex = d ? "-1" : "1", y.style.willChange = "transform", y.style.backfaceVisibility = "hidden", y.style.contain = "layout paint", y.style.pointerEvents = "none";
1251
+ prepare: (h) => {
1252
+ m(h, y), h.style.zIndex = p ? "-1" : "1", h.style.willChange = "transform", h.style.backfaceVisibility = "hidden", h.style.contain = "layout paint", h.style.pointerEvents = "none";
912
1253
  }
913
1254
  })
914
1255
  };
915
- }, S = {
916
- stiffness: 15,
917
- damping: 7,
918
- doubleSpring: !0
919
- }, Wt = (t = {}) => {
920
- var a, s, l;
921
- const n = t.direction ?? "left", i = {
922
- stiffness: ((a = t.spring) == null ? void 0 : a.stiffness) ?? S.stiffness,
923
- damping: ((s = t.spring) == null ? void 0 : s.damping) ?? S.damping,
924
- doubleSpring: ((l = t.spring) == null ? void 0 : l.doubleSpring) ?? S.doubleSpring
925
- }, d = n === "left";
1256
+ }, Xt = {
1257
+ stiffness: 140,
1258
+ damping: 15,
1259
+ doubleSpring: 0.5
1260
+ }, zt = {
1261
+ stiffness: 145,
1262
+ damping: 15,
1263
+ doubleSpring: 0.5
1264
+ };
1265
+ function T(t) {
1266
+ const n = x(document.body, t.positionedParent), r = t.scroll.y, p = window.innerHeight - n.top;
926
1267
  return {
927
- in: (r) => ({
928
- spring: i,
1268
+ top: r,
1269
+ left: 0,
1270
+ width: n.width,
1271
+ height: p
1272
+ };
1273
+ }
1274
+ const tn = (t = {}) => {
1275
+ var a, o, d;
1276
+ const { direction: n = "enter" } = t, r = n === "enter" ? Xt : zt, p = {
1277
+ stiffness: ((a = t.spring) == null ? void 0 : a.stiffness) ?? r.stiffness,
1278
+ damping: ((o = t.spring) == null ? void 0 : o.damping) ?? r.damping,
1279
+ doubleSpring: ((d = t.spring) == null ? void 0 : d.doubleSpring) ?? r.doubleSpring
1280
+ };
1281
+ return n === "enter" ? {
1282
+ // Entering sheet: slides up from bottom
1283
+ in: (s, c) => {
1284
+ const i = T(c).height;
1285
+ return {
1286
+ spring: p,
1287
+ prepare: () => {
1288
+ s.style.willChange = "transform", s.style.backfaceVisibility = "hidden", s.style.contain = "layout paint";
1289
+ },
1290
+ css: (y) => ({
1291
+ transform: `translate3d(0, ${(1 - y) * i}px, 0)`
1292
+ }),
1293
+ onEnd: () => {
1294
+ s.style.willChange = "auto", s.style.backfaceVisibility = "", s.style.contain = "";
1295
+ }
1296
+ };
1297
+ },
1298
+ // Exiting background: scales down with fade
1299
+ out: (s, c) => {
1300
+ const e = T(c), i = e.left + e.width / 2, y = e.top + e.height / 2 + c.scrollOffset.y;
1301
+ return {
1302
+ spring: p,
1303
+ prepare: (h) => {
1304
+ m(h, c), h.style.zIndex = "-1", h.style.willChange = "transform, opacity", h.style.backfaceVisibility = "hidden", h.style.contain = "layout paint", h.style.pointerEvents = "none", h.style.transformOrigin = `${i}px ${y}px`;
1305
+ },
1306
+ css: (h) => ({
1307
+ transform: `scale(${0.8 + h * 0.2})`,
1308
+ opacity: h
1309
+ })
1310
+ };
1311
+ }
1312
+ } : {
1313
+ // Entering background: scales up with fade
1314
+ in: (s, c) => {
1315
+ const e = T(c), i = e.left + e.width / 2, y = e.top + e.height / 2;
1316
+ return {
1317
+ spring: p,
1318
+ prepare: () => {
1319
+ s.style.willChange = "transform, opacity", s.style.backfaceVisibility = "hidden", s.style.contain = "layout paint", s.style.transformOrigin = `${i}px ${y}px`;
1320
+ },
1321
+ css: (h) => ({
1322
+ transform: `scale(${0.8 + h * 0.2})`,
1323
+ opacity: h
1324
+ }),
1325
+ onEnd: () => {
1326
+ s.style.willChange = "auto", s.style.backfaceVisibility = "", s.style.contain = "", s.style.transformOrigin = "";
1327
+ }
1328
+ };
1329
+ },
1330
+ // Exiting sheet: slides down with high z-index
1331
+ out: (s, c) => {
1332
+ const i = T(c).height;
1333
+ return {
1334
+ spring: p,
1335
+ prepare: (y) => {
1336
+ m(y, c), y.style.zIndex = "100", y.style.willChange = "transform", y.style.backfaceVisibility = "hidden", y.style.contain = "layout paint", y.style.pointerEvents = "none";
1337
+ },
1338
+ css: (y) => ({
1339
+ transform: `translate3d(0, ${(1 - y) * i}px, 0)`
1340
+ })
1341
+ };
1342
+ }
1343
+ };
1344
+ }, I = {
1345
+ stiffness: 140,
1346
+ damping: 19,
1347
+ doubleSpring: 0.8
1348
+ }, nn = (t = {}) => {
1349
+ var a, o, d;
1350
+ const n = t.direction ?? "left", r = {
1351
+ stiffness: ((a = t.spring) == null ? void 0 : a.stiffness) ?? I.stiffness,
1352
+ damping: ((o = t.spring) == null ? void 0 : o.damping) ?? I.damping,
1353
+ doubleSpring: ((d = t.spring) == null ? void 0 : d.doubleSpring) ?? I.doubleSpring
1354
+ }, p = n === "left";
1355
+ return {
1356
+ in: (s) => ({
1357
+ spring: r,
929
1358
  prepare: () => {
930
- r.style.willChange = "transform", r.style.backfaceVisibility = "hidden", r.style.contain = "layout paint";
1359
+ s.style.willChange = "transform", s.style.backfaceVisibility = "hidden", s.style.contain = "layout paint";
931
1360
  },
932
- css: (o) => ({
933
- transform: `translate3d(${d ? (1 - o) * 100 : (1 - o) * -100}%, 0, 0)`
1361
+ css: (c) => ({
1362
+ transform: `translate3d(${p ? (1 - c) * 100 : (1 - c) * -100}%, 0, 0)`
934
1363
  }),
935
1364
  onEnd: () => {
936
- r.style.willChange = "auto", r.style.backfaceVisibility = "", r.style.contain = "";
1365
+ s.style.willChange = "auto", s.style.backfaceVisibility = "", s.style.contain = "";
937
1366
  }
938
1367
  }),
939
- out: (r, o) => ({
940
- spring: i,
941
- css: (c) => ({
942
- transform: `translate3d(${d ? (1 - c) * -100 : (1 - c) * 100}%, 0, 0)`
1368
+ out: (s, c) => ({
1369
+ spring: r,
1370
+ css: (e) => ({
1371
+ transform: `translate3d(${p ? (1 - e) * -100 : (1 - e) * 100}%, 0, 0)`
943
1372
  }),
944
- prepare: (c) => {
945
- b(c, o), c.style.willChange = "transform", c.style.backfaceVisibility = "hidden", c.style.contain = "layout paint", c.style.pointerEvents = "none";
1373
+ prepare: (e) => {
1374
+ m(e, c), e.style.willChange = "transform", e.style.backfaceVisibility = "hidden", e.style.contain = "layout paint", e.style.pointerEvents = "none";
946
1375
  }
947
1376
  })
948
1377
  };
949
- }, P = { stiffness: 17, damping: 6 }, L = 20, C = 800, zt = () => {
1378
+ }, H = { stiffness: 17, damping: 6 }, _ = 20, O = 800, sn = () => {
950
1379
  let t, n = null;
951
1380
  return {
952
- in: (i) => ({
953
- spring: P,
1381
+ in: (r) => ({
1382
+ spring: H,
954
1383
  prepare: () => {
955
- i.style.willChange = "transform", i.style.backfaceVisibility = "hidden", i.style.contain = "layout paint", i.style.transform = `perspective(${C}px) rotateY(${L}deg) translate3d(-100%, 0, 0)`;
1384
+ r.style.willChange = "transform", r.style.backfaceVisibility = "hidden", r.style.contain = "layout paint", r.style.transform = `perspective(${O}px) rotateY(${_}deg) translate3d(-100%, 0, 0)`;
956
1385
  },
957
1386
  wait: async () => {
958
1387
  t && await t;
959
1388
  },
960
- css: (d) => {
961
- const a = (1 - d) * L, s = -(1 - d) * 100;
1389
+ css: (p) => {
1390
+ const a = (1 - p) * _, o = -(1 - p) * 100;
962
1391
  return {
963
- transform: `perspective(${C}px) rotateY(${a}deg) translate3d(${s}%, 0, 0)`
1392
+ transform: `perspective(${O}px) rotateY(${a}deg) translate3d(${o}%, 0, 0)`
964
1393
  };
965
1394
  },
966
1395
  onEnd: () => {
967
- i.style.transform = "", i.style.willChange = "auto", i.style.backfaceVisibility = "", i.style.contain = "";
1396
+ r.style.transform = "", r.style.willChange = "auto", r.style.backfaceVisibility = "", r.style.contain = "";
968
1397
  }
969
1398
  }),
970
- out: (i, d) => (t = new Promise((a) => {
1399
+ out: (r, p) => (t = new Promise((a) => {
971
1400
  n = a;
972
1401
  }), {
973
- spring: P,
1402
+ spring: H,
974
1403
  prepare: (a) => {
975
- b(a, d), a.style.willChange = "transform", a.style.backfaceVisibility = "hidden", a.style.contain = "layout paint", a.style.pointerEvents = "none", a.style.transform = `perspective(${C}px) rotateY(0deg) translate3d(0%, 0, 0)`;
1404
+ m(a, p), a.style.willChange = "transform", a.style.backfaceVisibility = "hidden", a.style.contain = "layout paint", a.style.pointerEvents = "none", a.style.transform = `perspective(${O}px) rotateY(0deg) translate3d(0%, 0, 0)`;
976
1405
  },
977
1406
  css: (a) => {
978
- const s = 1 - a, l = s * L, r = s * 100;
1407
+ const o = 1 - a, d = o * _, s = o * 100;
979
1408
  return {
980
- transform: `perspective(${C}px) rotateY(${-l}deg) translate3d(${r}%, 0, 0)`
1409
+ transform: `perspective(${O}px) rotateY(${-d}deg) translate3d(${s}%, 0, 0)`
981
1410
  };
982
1411
  },
983
1412
  onEnd: () => {
984
- n && n(), i.style.transform = "";
1413
+ n && n(), r.style.transform = "";
985
1414
  }
986
1415
  })
987
1416
  };
988
- }, $t = { stiffness: 1, damping: 1 }, mt = { stiffness: 20, damping: 25 }, wt = "#000000", bt = "circle", v = "CURTAIN_REVEAL_OVERLAY_ID", xt = {
989
- position: "fixed",
990
- inset: "0",
991
- width: "100vw",
992
- height: "100%",
993
- zIndex: "9999",
994
- display: "flex",
995
- alignItems: "center",
996
- justifyContent: "center",
997
- overflow: "hidden"
998
- }, Et = {
999
- position: "relative",
1000
- display: "inline-block",
1001
- height: "5.5rem",
1002
- overflow: "hidden"
1003
- }, Ct = {
1004
- display: "flex",
1005
- height: "100%",
1006
- willChange: "transform",
1007
- transition: "transform 0.3s ease"
1008
- }, At = {
1009
- display: "inline-flex",
1010
- alignItems: "center",
1011
- justifyContent: "center",
1012
- whiteSpace: "nowrap",
1013
- fontSize: "5.5rem",
1014
- fontWeight: "900",
1015
- letterSpacing: "0.02em",
1016
- color: "#FFFFFF"
1017
- }, St = 0.4, A = 0.5, Lt = 0.2;
1018
- function Tt(t, n) {
1019
- switch (t) {
1020
- case "circle":
1021
- return `circle(${n * 100}% at 50% 50%)`;
1022
- case "square":
1023
- return `inset(${(1 - n) * 50}% round ${10 * n}%)`;
1024
- case "triangle": {
1025
- const i = n * 100;
1026
- return `polygon(50% ${50 - i}%, ${50 - i}% ${50 + i}%, ${50 + i}% ${50 + i}%)`;
1027
- }
1028
- }
1417
+ }, D = {
1418
+ stiffness: 300,
1419
+ damping: 22,
1420
+ doubleSpring: 0.5
1421
+ }, N = 0.05;
1422
+ function Ht(t) {
1423
+ const n = x(document.body, t.positionedParent), r = t.scroll.y, p = window.innerHeight - n.top;
1424
+ return {
1425
+ top: r,
1426
+ left: 0,
1427
+ width: n.width,
1428
+ height: p
1429
+ };
1029
1430
  }
1030
- const kt = (t) => t.reduce((n, i) => n + i, 0), Xt = (t = {}) => {
1031
- const {
1032
- background: n = wt,
1033
- texts: i = [],
1034
- shape: d = bt,
1035
- inSpring: a = mt,
1036
- outSpring: s = $t,
1037
- textStyle: l = {}
1038
- } = t;
1431
+ const en = (t = {}) => {
1432
+ var a, o, d;
1433
+ const n = {
1434
+ stiffness: ((a = t.spring) == null ? void 0 : a.stiffness) ?? D.stiffness,
1435
+ damping: ((o = t.spring) == null ? void 0 : o.damping) ?? D.damping,
1436
+ doubleSpring: ((d = t.spring) == null ? void 0 : d.doubleSpring) ?? D.doubleSpring
1437
+ };
1438
+ let { promise: r, resolve: p } = S();
1039
1439
  return {
1040
- out: (r, o) => {
1041
- const c = r.style.opacity;
1440
+ // Entering page: scales up from small (0.95 → 1) with fade in
1441
+ in: (s, c) => {
1442
+ const e = Ht(c), i = e.left + e.width / 2, y = e.top + e.height / 2;
1042
1443
  return {
1043
- spring: s,
1044
- from: 1,
1045
- to: 0,
1046
- prepare: (e) => {
1047
- b(e, o), e.style.opacity = "1";
1048
- },
1049
- tick: (e) => {
1050
- const g = Math.max(0, e - St);
1051
- r.style.opacity = String(g);
1052
- },
1053
- onEnd: () => {
1054
- r.style.opacity = c;
1055
- }
1056
- };
1057
- },
1058
- in: (r) => {
1059
- let o = null, c = null, e = null;
1060
- const g = document.body.style.overflow, y = document.getElementById(
1061
- v
1062
- );
1063
- let h = [];
1064
- const p = () => {
1065
- o = document.createElement("div"), o.id = v, Object.assign(o.style, xt, { background: n }), document.body.appendChild(o), c = document.createElement("div"), Object.assign(c.style, Et), o.appendChild(c), e = document.createElement("div"), Object.assign(e.style, Ct), c.appendChild(e), i.forEach((u) => {
1066
- const m = document.createElement("div");
1067
- m.textContent = u, Object.assign(m.style, At, l), e.appendChild(m);
1068
- }), h = Array.from(e.children).map(
1069
- (u) => u.getBoundingClientRect().width
1070
- );
1071
- };
1072
- return {
1073
- spring: a,
1074
- from: 0,
1075
- to: 1,
1444
+ spring: n,
1076
1445
  prepare: () => {
1077
- document.body.style.overflow = "hidden", r.style.opacity = "1", y == null || y.remove(), p(), o && c && (o.style.clipPath = "none", c.style.transform = "scale(1)");
1446
+ s.style.opacity = "0", s.style.willChange = "transform, opacity", s.style.backfaceVisibility = "hidden", s.style.contain = "layout paint", s.style.transformOrigin = `${i}px ${y}px`;
1078
1447
  },
1079
- tick: (u) => {
1080
- if (!(!o || !c || !e)) {
1081
- if (u <= A && i.length > 0) {
1082
- const m = u / A, f = Math.min(
1083
- Math.floor(m * i.length),
1084
- i.length - 1
1085
- ), w = h[f] ?? 0, $ = kt(h.slice(0, f));
1086
- c.style.width = `${w}px`, e.style.transform = `translateX(-${$}px)`;
1087
- }
1088
- if (u > A) {
1089
- const f = 1 - Math.max(
1090
- 0,
1091
- Math.min(1, (u - A) / Lt)
1092
- );
1093
- o.style.clipPath = Tt(d, f), c.style.transform = `scale(${f})`;
1094
- }
1448
+ wait: async () => {
1449
+ if (r) {
1450
+ await r;
1451
+ const h = S();
1452
+ r = h.promise, p = h.resolve;
1095
1453
  }
1096
1454
  },
1455
+ css: (h) => ({
1456
+ transform: `scale(${1 - N + h * N})`,
1457
+ opacity: h
1458
+ }),
1097
1459
  onEnd: () => {
1098
- o == null || o.remove(), o = c = e = null, document.body.style.overflow = g;
1460
+ s.style.opacity = "1", s.style.willChange = "auto", s.style.backfaceVisibility = "", s.style.contain = "", s.style.transformOrigin = "";
1099
1461
  }
1100
1462
  };
1101
- }
1463
+ },
1464
+ // Exiting page: fade out only (no scale)
1465
+ out: (s, c) => ({
1466
+ spring: n,
1467
+ prepare: (e) => {
1468
+ m(e, c), e.style.willChange = "opacity", e.style.backfaceVisibility = "hidden", e.style.contain = "layout paint", e.style.pointerEvents = "none";
1469
+ },
1470
+ css: (e) => ({
1471
+ opacity: e
1472
+ }),
1473
+ onEnd: () => {
1474
+ p && p();
1475
+ }
1476
+ })
1102
1477
  };
1103
1478
  };
1104
1479
  export {
1105
- It as blind,
1106
- Xt as curtainReveal,
1107
- Ot as drill,
1108
- Dt as fade,
1109
- Pt as film,
1110
- vt as hero,
1111
- Ft as instagram,
1112
- Ht as jaemin,
1113
- Yt as pinterest,
1114
- Ut as rotate,
1115
- Vt as scroll,
1116
- Wt as slide,
1117
- zt as strip
1480
+ Nt as blind,
1481
+ Wt as curtainReveal,
1482
+ Mt as depth,
1483
+ Gt as drill,
1484
+ Bt as fade,
1485
+ qt as film,
1486
+ jt as hero,
1487
+ Zt as instagram,
1488
+ Jt as jaemin,
1489
+ Kt as pinterest,
1490
+ Qt as rotate,
1491
+ Rt as scroll,
1492
+ tn as sheet,
1493
+ nn as slide,
1494
+ sn as strip,
1495
+ en as swap
1118
1496
  };