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