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