@ssgoi/core 3.1.1 → 3.1.3

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