@ssgoi/core 6.0.0 → 6.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/README.md +5 -6
  2. package/dist/animation/animation.d.ts +18 -0
  3. package/dist/animation/animation.d.ts.map +1 -1
  4. package/dist/animation/host-animation.d.ts +2 -0
  5. package/dist/animation/host-animation.d.ts.map +1 -1
  6. package/dist/animation/multi-animation.d.ts +20 -4
  7. package/dist/animation/multi-animation.d.ts.map +1 -1
  8. package/dist/animation/web-animation.d.ts +2 -0
  9. package/dist/animation/web-animation.d.ts.map +1 -1
  10. package/dist/index.cjs +10 -10
  11. package/dist/index.js +998 -561
  12. package/dist/internal.cjs +1 -1
  13. package/dist/internal.js +208 -201
  14. package/dist/multi-animation-CnxqLEka.js +322 -0
  15. package/dist/multi-animation-Dw2JTJI2.cjs +1 -0
  16. package/dist/ssgoi-transition/create-ssgoi-transition-context.d.ts.map +1 -1
  17. package/dist/transitions/axis/index.d.ts +43 -0
  18. package/dist/transitions/axis/index.d.ts.map +1 -0
  19. package/dist/transitions/axis/provider/index.d.ts +8 -0
  20. package/dist/transitions/axis/provider/index.d.ts.map +1 -0
  21. package/dist/transitions/axis/provider/x/fluid.d.ts +3 -0
  22. package/dist/transitions/axis/provider/x/fluid.d.ts.map +1 -0
  23. package/dist/transitions/axis/provider/x/index.d.ts +3 -0
  24. package/dist/transitions/axis/provider/x/index.d.ts.map +1 -0
  25. package/dist/transitions/axis/provider/x/snappy.d.ts +3 -0
  26. package/dist/transitions/axis/provider/x/snappy.d.ts.map +1 -0
  27. package/dist/transitions/axis/provider/y.d.ts +3 -0
  28. package/dist/transitions/axis/provider/y.d.ts.map +1 -0
  29. package/dist/transitions/axis/provider/z.d.ts +3 -0
  30. package/dist/transitions/axis/provider/z.d.ts.map +1 -0
  31. package/dist/transitions/axis/transition.d.ts +5 -0
  32. package/dist/transitions/axis/transition.d.ts.map +1 -0
  33. package/dist/transitions/axis/types.d.ts +52 -0
  34. package/dist/transitions/axis/types.d.ts.map +1 -0
  35. package/dist/transitions/blind/index.d.ts +10 -1
  36. package/dist/transitions/blind/index.d.ts.map +1 -1
  37. package/dist/transitions/drill/index.d.ts +37 -6
  38. package/dist/transitions/drill/index.d.ts.map +1 -1
  39. package/dist/transitions/drill/types.d.ts +10 -0
  40. package/dist/transitions/drill/types.d.ts.map +1 -1
  41. package/dist/transitions/fade/index.d.ts +13 -3
  42. package/dist/transitions/fade/index.d.ts.map +1 -1
  43. package/dist/transitions/fade/types.d.ts +14 -0
  44. package/dist/transitions/fade/types.d.ts.map +1 -0
  45. package/dist/transitions/film/index.d.ts +13 -3
  46. package/dist/transitions/film/index.d.ts.map +1 -1
  47. package/dist/transitions/film/types.d.ts +16 -0
  48. package/dist/transitions/film/types.d.ts.map +1 -0
  49. package/dist/transitions/hero/index.d.ts +14 -3
  50. package/dist/transitions/hero/index.d.ts.map +1 -1
  51. package/dist/transitions/hero/types.d.ts +12 -0
  52. package/dist/transitions/hero/types.d.ts.map +1 -0
  53. package/dist/transitions/index.d.ts +1 -0
  54. package/dist/transitions/index.d.ts.map +1 -1
  55. package/dist/transitions/jaemin/index.d.ts +13 -3
  56. package/dist/transitions/jaemin/index.d.ts.map +1 -1
  57. package/dist/transitions/jaemin/types.d.ts +9 -0
  58. package/dist/transitions/jaemin/types.d.ts.map +1 -0
  59. package/dist/transitions/rotate/index.d.ts +12 -3
  60. package/dist/transitions/rotate/index.d.ts.map +1 -1
  61. package/dist/transitions/rotate/types.d.ts +9 -0
  62. package/dist/transitions/rotate/types.d.ts.map +1 -0
  63. package/dist/transitions/scroll/index.d.ts +7 -7
  64. package/dist/transitions/scroll/index.d.ts.map +1 -1
  65. package/dist/transitions/sheet/index.d.ts +38 -6
  66. package/dist/transitions/sheet/index.d.ts.map +1 -1
  67. package/dist/transitions/sheet/types.d.ts +10 -0
  68. package/dist/transitions/sheet/types.d.ts.map +1 -1
  69. package/dist/transitions/slide/index.d.ts +13 -3
  70. package/dist/transitions/slide/index.d.ts.map +1 -1
  71. package/dist/transitions/slide/types.d.ts +10 -0
  72. package/dist/transitions/slide/types.d.ts.map +1 -0
  73. package/dist/transitions/strip/index.d.ts +13 -3
  74. package/dist/transitions/strip/index.d.ts.map +1 -1
  75. package/dist/transitions/strip/types.d.ts +9 -0
  76. package/dist/transitions/strip/types.d.ts.map +1 -0
  77. package/dist/transitions/utils.d.ts +16 -0
  78. package/dist/transitions/utils.d.ts.map +1 -1
  79. package/dist/transitions/zoom/index.d.ts +17 -3
  80. package/dist/transitions/zoom/index.d.ts.map +1 -1
  81. package/dist/transitions/zoom/provider/blur.d.ts +14 -0
  82. package/dist/transitions/zoom/provider/blur.d.ts.map +1 -0
  83. package/dist/transitions/zoom/provider/expand.d.ts +6 -1
  84. package/dist/transitions/zoom/provider/expand.d.ts.map +1 -1
  85. package/dist/transitions/zoom/provider/index.d.ts +10 -1
  86. package/dist/transitions/zoom/provider/index.d.ts.map +1 -1
  87. package/dist/transitions/zoom/provider/static.d.ts +6 -1
  88. package/dist/transitions/zoom/provider/static.d.ts.map +1 -1
  89. package/dist/transitions/zoom/transition.d.ts +3 -3
  90. package/dist/transitions/zoom/transition.d.ts.map +1 -1
  91. package/dist/transitions/zoom/types.d.ts +78 -3
  92. package/dist/transitions/zoom/types.d.ts.map +1 -1
  93. package/dist/transitions/zoom/zoom-element.d.ts +2 -2
  94. package/dist/transitions/zoom/zoom-element.d.ts.map +1 -1
  95. package/dist/types/index.d.ts +3 -4
  96. package/dist/types/index.d.ts.map +1 -1
  97. package/package.json +1 -1
  98. package/dist/multi-animation-B_Hl1HEU.cjs +0 -1
  99. package/dist/multi-animation-CST6aZ8y.js +0 -276
package/dist/index.js CHANGED
@@ -1,23 +1,23 @@
1
- var ht = Object.defineProperty;
2
- var mt = (e, t, n) => t in e ? ht(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var S = (e, t, n) => mt(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { P as B, V as nt, W as w, M as $, S as ut } from "./multi-animation-CST6aZ8y.js";
5
- import { A as Xe } from "./multi-animation-CST6aZ8y.js";
1
+ var xt = Object.defineProperty;
2
+ var Et = (e, t, n) => t in e ? xt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var $ = (e, t, n) => Et(e, typeof t != "symbol" ? t + "" : t, n);
4
+ import { P as Z, V as ft, W as b, M as E, S as Ct } from "./multi-animation-CnxqLEka.js";
5
+ import { A as zn } from "./multi-animation-CnxqLEka.js";
6
6
  function P(e, t) {
7
7
  const n = [];
8
8
  for (let s = 0; s < e.length; s++)
9
9
  for (let o = s + 1; o < e.length; o++) {
10
- const a = e[s], i = e[o];
11
- !a || !i || n.push({
12
- from: a,
13
- to: i,
10
+ const i = e[s], r = e[o];
11
+ !i || !r || n.push({
12
+ from: i,
13
+ to: r,
14
14
  transition: t(),
15
15
  symmetric: !0
16
16
  });
17
17
  }
18
18
  return n;
19
19
  }
20
- function st(e, t) {
20
+ function ht(e, t) {
21
21
  return [
22
22
  {
23
23
  from: e.exit,
@@ -31,39 +31,39 @@ function st(e, t) {
31
31
  }
32
32
  ];
33
33
  }
34
- function ot(e, t, n) {
34
+ function q(e, t, n) {
35
35
  const s = [];
36
36
  for (let o = 0; o < e.length; o++)
37
- for (let a = o + 1; a < e.length; a++) {
38
- const i = e[o], l = e[a];
39
- !i || !l || s.push(
37
+ for (let i = o + 1; i < e.length; i++) {
38
+ const r = e[o], l = e[i];
39
+ !r || !l || s.push(
40
40
  {
41
- from: i,
41
+ from: r,
42
42
  to: l,
43
43
  transition: n(t.forward)
44
44
  },
45
45
  {
46
46
  from: l,
47
- to: i,
47
+ to: r,
48
48
  transition: n(t.backward)
49
49
  }
50
50
  );
51
51
  }
52
52
  return s;
53
53
  }
54
- class v {
54
+ class F {
55
55
  constructor(t) {
56
- S(this, "omega");
56
+ $(this, "omega");
57
57
  // Angular frequency
58
- S(this, "zeta");
58
+ $(this, "zeta");
59
59
  // Damping ratio
60
- S(this, "restDelta");
61
- S(this, "restSpeed");
60
+ $(this, "restDelta");
61
+ $(this, "restSpeed");
62
62
  const { stiffness: n, damping: s } = t, o = 1;
63
- this.omega = Math.sqrt(n / o), this.zeta = s / (2 * Math.sqrt(n * o)), this.restDelta = t.restDelta ?? B, this.restSpeed = t.restSpeed ?? nt;
63
+ this.omega = Math.sqrt(n / o), this.zeta = s / (2 * Math.sqrt(n * o)), this.restDelta = t.restDelta ?? Z, this.restSpeed = t.restSpeed ?? ft;
64
64
  }
65
65
  step(t, n, s) {
66
- const o = Math.min(s, 0.033), { omega: a, zeta: i } = this, { position: l, velocity: c } = t, r = -2 * o * i * a * c, p = o * a * a * (n - l), d = c + r + p;
66
+ const o = Math.min(s, 0.033), { omega: i, zeta: r } = this, { position: l, velocity: c } = t, a = -2 * o * r * i * c, p = o * i * i * (n - l), d = c + a + p;
67
67
  return {
68
68
  position: l + o * d,
69
69
  velocity: d
@@ -74,39 +74,39 @@ class v {
74
74
  return s < this.restDelta && o < this.restSpeed;
75
75
  }
76
76
  }
77
- class yt {
77
+ class Pt {
78
78
  constructor(t) {
79
- S(this, "leader");
80
- S(this, "follower");
81
- S(this, "restDelta");
82
- S(this, "restSpeed");
83
- this.restDelta = t.restDelta ?? B, this.restSpeed = t.restSpeed ?? nt, this.leader = new v({
79
+ $(this, "leader");
80
+ $(this, "follower");
81
+ $(this, "restDelta");
82
+ $(this, "restSpeed");
83
+ this.restDelta = t.restDelta ?? Z, this.restSpeed = t.restSpeed ?? ft, this.leader = new F({
84
84
  stiffness: t.stiffness,
85
85
  damping: t.damping,
86
86
  restDelta: this.restDelta,
87
87
  restSpeed: this.restSpeed
88
88
  });
89
- let n, s, o, a;
90
- typeof t.follower == "number" ? (n = t.stiffness * t.follower, s = t.damping) : t.follower ? (n = t.follower.stiffness, s = t.follower.damping, o = t.follower.restDelta, a = t.follower.restSpeed) : (n = t.stiffness, s = t.damping), this.follower = new v({
89
+ let n, s, o, i;
90
+ typeof t.follower == "number" ? (n = t.stiffness * t.follower, s = t.damping) : t.follower ? (n = t.follower.stiffness, s = t.follower.damping, o = t.follower.restDelta, i = t.follower.restSpeed) : (n = t.stiffness, s = t.damping), this.follower = new F({
91
91
  stiffness: n,
92
92
  damping: s,
93
93
  restDelta: o ?? this.restDelta,
94
- restSpeed: a ?? this.restSpeed
94
+ restSpeed: i ?? this.restSpeed
95
95
  });
96
96
  }
97
97
  step(t, n, s) {
98
- const a = t._leader ?? {
98
+ const i = t._leader ?? {
99
99
  position: t.position,
100
100
  velocity: t.velocity
101
- }, i = this.leader.step(a, n, s), l = this.follower.step(
101
+ }, r = this.leader.step(i, n, s), l = this.follower.step(
102
102
  t,
103
- i.position,
103
+ r.position,
104
104
  s
105
105
  );
106
106
  return {
107
107
  position: l.position,
108
108
  velocity: l.velocity,
109
- _leader: i
109
+ _leader: r
110
110
  };
111
111
  }
112
112
  isSettled(t, n) {
@@ -114,39 +114,39 @@ class yt {
114
114
  return s._leader ? Math.abs(n - s._leader.position) < this.restDelta && Math.abs(s._leader.velocity) < this.restSpeed && o : o;
115
115
  }
116
116
  }
117
- const gt = 0.01, wt = 500, bt = 10;
118
- class St {
117
+ const vt = 0.01, Tt = 500, Dt = 10;
118
+ class _t {
119
119
  constructor(t) {
120
- S(this, "acceleration");
121
- S(this, "resistance");
122
- S(this, "resistanceType");
123
- S(this, "min");
124
- S(this, "max");
125
- S(this, "bounceStiffness");
126
- S(this, "bounceDamping");
127
- S(this, "restDelta");
128
- this.acceleration = t.acceleration, this.resistance = t.resistance, this.resistanceType = t.resistanceType ?? "quadratic", this.min = t.min, this.max = t.max, this.bounceStiffness = t.bounceStiffness ?? wt, this.bounceDamping = t.bounceDamping ?? bt, this.restDelta = t.restDelta ?? gt;
120
+ $(this, "acceleration");
121
+ $(this, "resistance");
122
+ $(this, "resistanceType");
123
+ $(this, "min");
124
+ $(this, "max");
125
+ $(this, "bounceStiffness");
126
+ $(this, "bounceDamping");
127
+ $(this, "restDelta");
128
+ this.acceleration = t.acceleration, this.resistance = t.resistance, this.resistanceType = t.resistanceType ?? "quadratic", this.min = t.min, this.max = t.max, this.bounceStiffness = t.bounceStiffness ?? Tt, this.bounceDamping = t.bounceDamping ?? Dt, this.restDelta = t.restDelta ?? vt;
129
129
  }
130
130
  step(t, n, s) {
131
- const o = Math.min(s, 0.033), { acceleration: a, resistance: i, resistanceType: l, min: c, max: r } = this, { position: p, velocity: d } = t, h = c !== void 0 && p < c, u = r !== void 0 && p > r;
131
+ const o = Math.min(s, 0.033), { acceleration: i, resistance: r, resistanceType: l, min: c, max: a } = this, { position: p, velocity: d } = t, u = c !== void 0 && p < c, m = a !== void 0 && p > a;
132
132
  let f;
133
- if (h || u) {
134
- const b = p - (h ? c : r), C = -this.bounceStiffness * b, E = -this.bounceDamping * d;
135
- f = C + E;
133
+ if (u || m) {
134
+ const S = p - (u ? c : a), x = -this.bounceStiffness * S, C = -this.bounceDamping * d;
135
+ f = x + C;
136
136
  } else {
137
- const x = n > p ? 1 : -1;
138
- let b;
139
- l === "linear" ? b = i * d : b = i * d * Math.abs(d), f = x * a - b;
137
+ const w = n > p ? 1 : -1;
138
+ let S;
139
+ l === "linear" ? S = r * d : S = r * d * Math.abs(d), f = w * i - S;
140
140
  }
141
- const m = d + f * o;
142
- let y = p + m * o;
143
- if (!h && !u) {
144
- const x = n > p ? 1 : -1;
145
- (x > 0 && y > n || x < 0 && y < n) && (y = n);
141
+ const h = d + f * o;
142
+ let y = p + h * o;
143
+ if (!u && !m) {
144
+ const w = n > p ? 1 : -1;
145
+ (w > 0 && y > n || w < 0 && y < n) && (y = n);
146
146
  }
147
147
  return {
148
148
  position: y,
149
- velocity: y === n ? 0 : m
149
+ velocity: y === n ? 0 : h
150
150
  };
151
151
  }
152
152
  isSettled(t, n) {
@@ -167,7 +167,7 @@ class g {
167
167
  "Cannot use both 'spring' and 'inertia' together. Choose one physics type."
168
168
  );
169
169
  if (t.inertia)
170
- return new St({
170
+ return new _t({
171
171
  acceleration: t.inertia.acceleration,
172
172
  resistance: t.inertia.resistance,
173
173
  resistanceType: t.inertia.resistanceType,
@@ -184,7 +184,7 @@ class g {
184
184
  return typeof s == "number" ? o = s : typeof s == "object" && (o = {
185
185
  stiffness: s.stiffness,
186
186
  damping: s.damping
187
- }), new yt({
187
+ }), new Pt({
188
188
  stiffness: n.stiffness,
189
189
  damping: n.damping,
190
190
  follower: o,
@@ -192,7 +192,7 @@ class g {
192
192
  restSpeed: n.restSpeed
193
193
  });
194
194
  }
195
- return new v({
195
+ return new F({
196
196
  stiffness: n.stiffness,
197
197
  damping: n.damping,
198
198
  restDelta: n.restDelta,
@@ -207,25 +207,237 @@ class g {
207
207
  return g.from({ spring: t });
208
208
  }
209
209
  }
210
- class $t {
210
+ class At {
211
211
  constructor(t) {
212
- S(this, "durationSec");
212
+ $(this, "durationSec");
213
213
  this.durationSec = Math.max(1 / 60, t.durationSec);
214
214
  }
215
215
  step(t, n, s) {
216
216
  const o = n - t.position;
217
217
  if (o === 0) return t;
218
- const a = Math.sign(o), i = Math.abs(o) / this.durationSec, l = a * i * s, c = t.position + l;
219
- return (a > 0 ? c >= n : c <= n) ? { position: n, velocity: 0 } : { position: c, velocity: a * i };
218
+ const i = Math.sign(o), r = Math.abs(o) / this.durationSec, l = i * r * s, c = t.position + l;
219
+ return (i > 0 ? c >= n : c <= n) ? { position: n, velocity: 0 } : { position: c, velocity: i * r };
220
220
  }
221
221
  isSettled(t, n) {
222
- return Math.abs(t.position - n) < B;
222
+ return Math.abs(t.position - n) < Z;
223
223
  }
224
224
  }
225
- const xt = {
225
+ const G = 8, K = {
226
+ spring: { stiffness: 1e3, damping: 40, doubleSpring: 1.2 }
227
+ };
228
+ function It({
229
+ direction: e
230
+ }) {
231
+ const t = e === "forward" ? G : -G;
232
+ return {
233
+ out: {
234
+ willChange: "transform, opacity",
235
+ startStyle: {},
236
+ animate: (n) => ({
237
+ opacity: `${1 - n}`
238
+ })
239
+ },
240
+ in: {
241
+ willChange: "transform, opacity",
242
+ startStyle: {
243
+ transform: `translate3d(${t}px, 0, 0)`,
244
+ opacity: "0"
245
+ },
246
+ animate: (n) => ({
247
+ transform: `translate3d(${t * (1 - n)}px, 0, 0)`,
248
+ opacity: `${n}`
249
+ })
250
+ }
251
+ };
252
+ }
253
+ function Ot() {
254
+ return {
255
+ outPhysics: K,
256
+ inPhysics: K,
257
+ // Both sides run together — the cross-fade is the whole point of the
258
+ // snappy feel. (fluid's sibling uses staggered fade-through.)
259
+ composition: { mode: "parallel", startAt: [0, 0] },
260
+ build: It
261
+ };
262
+ }
263
+ const J = 30, kt = {
264
+ inertia: { acceleration: 150, resistance: 1.5 }
265
+ }, Lt = {
266
+ spring: { stiffness: 180, damping: 34 }
267
+ };
268
+ function Ft({
269
+ direction: e
270
+ }) {
271
+ const t = e === "forward" ? 1 : -1, n = -J * t, s = J * t;
272
+ return {
273
+ out: {
274
+ willChange: "transform, opacity",
275
+ startStyle: {},
276
+ animate: (o) => ({
277
+ transform: `translate3d(${n * o}px, 0, 0)`,
278
+ opacity: `${1 - o}`
279
+ })
280
+ },
281
+ in: {
282
+ willChange: "transform, opacity",
283
+ startStyle: {
284
+ transform: `translate3d(${s}px, 0, 0)`,
285
+ opacity: "0"
286
+ },
287
+ animate: (o) => ({
288
+ transform: `translate3d(${s * (1 - o)}px, 0, 0)`,
289
+ opacity: `${o}`
290
+ })
291
+ }
292
+ };
293
+ }
294
+ function Yt() {
295
+ return {
296
+ outPhysics: kt,
297
+ inPhysics: Lt,
298
+ // Phased motion: outgoing falls away first under inertia, then incoming
299
+ // springs in. The fade-through shape comes from the integrator curves
300
+ // plus the sequence handoff, not from FADE_SPLIT inside animate(t).
301
+ composition: { mode: "sequence" },
302
+ build: Ft
303
+ };
304
+ }
305
+ const Ht = {
306
+ snappy: Ot(),
307
+ fluid: Yt()
308
+ }, Q = {
309
+ spring: { stiffness: 2400, damping: 65, doubleSpring: 0.7 }
310
+ }, O = 8;
311
+ function Mt({ direction: e }) {
312
+ const t = e === "forward" ? -O : O, n = e === "forward" ? O : -O;
313
+ return {
314
+ out: {
315
+ willChange: "transform, opacity",
316
+ startStyle: {},
317
+ animate: (s) => ({
318
+ transform: `translate3d(0, ${t * s}px, 0)`,
319
+ opacity: `${1 - s}`
320
+ })
321
+ },
322
+ in: {
323
+ willChange: "transform, opacity",
324
+ startStyle: {
325
+ transform: `translate3d(0, ${n}px, 0)`,
326
+ opacity: "0"
327
+ },
328
+ animate: (s) => ({
329
+ transform: `translate3d(0, ${n * (1 - s)}px, 0)`,
330
+ opacity: `${s}`
331
+ })
332
+ }
333
+ };
334
+ }
335
+ function zt() {
336
+ return {
337
+ outPhysics: Q,
338
+ inPhysics: Q,
339
+ composition: { mode: "parallel", startAt: [0, 0.3] },
340
+ build: Mt
341
+ };
342
+ }
343
+ const R = {
344
+ spring: { stiffness: 280, damping: 30 }
345
+ }, k = 0.05;
346
+ function Ut() {
347
+ return {
348
+ // Outgoing scales up slightly (1 → 1+s) while fading — recedes toward
349
+ // viewer feel, complementing the incoming page rising from below.
350
+ out: {
351
+ willChange: "transform, opacity",
352
+ startStyle: {},
353
+ animate: (e) => ({
354
+ transform: `scale(${1 + e * k})`,
355
+ opacity: `${1 - e}`
356
+ })
357
+ },
358
+ // Incoming rises from below (1-s → 1) with fade in.
359
+ in: {
360
+ willChange: "transform, opacity",
361
+ startStyle: {
362
+ transform: `scale(${1 - k})`,
363
+ opacity: "0"
364
+ },
365
+ animate: (e) => ({
366
+ transform: `scale(${1 - k + e * k})`,
367
+ opacity: `${e}`
368
+ })
369
+ }
370
+ };
371
+ }
372
+ function Xt() {
373
+ return {
374
+ outPhysics: R,
375
+ inPhysics: R,
376
+ // Both pages share the canvas (in-place scale+fade), so a strict
377
+ // fade-through-with-offset would feel disjointed. Run them together
378
+ // for a cleaner cross-fade.
379
+ composition: { mode: "parallel" },
380
+ build: Ut
381
+ };
382
+ }
383
+ const Vt = zt(), Bt = Xt(), Nt = {
384
+ x: Ht,
385
+ // y and z don't yet have a `fluid` variant — the lookup falls back to
386
+ // `snappy` if asked for `fluid` on them.
387
+ y: { snappy: Vt },
388
+ z: { snappy: Bt }
389
+ };
390
+ function Wt(e, t) {
391
+ const n = Nt[e];
392
+ return n[t] ?? n.snappy;
393
+ }
394
+ const Zt = "x", qt = "snappy";
395
+ function tt(e, t) {
396
+ e.style.willChange = t.willChange, e.style.backfaceVisibility = "hidden", e.style.contain = "layout paint";
397
+ for (const [n, s] of Object.entries(t.startStyle))
398
+ e.style[n] = s;
399
+ }
400
+ function jt(e) {
401
+ e.style.willChange = "auto", e.style.backfaceVisibility = "", e.style.contain = "", e.style.transform = "", e.style.opacity = "";
402
+ }
403
+ const Gt = (e = {}) => {
404
+ const t = e.direction ?? "forward", n = e.type ?? Zt, s = e.feel ?? qt, o = Wt(n, s), i = o.build({ direction: t });
405
+ return {
406
+ prepare: ({ from: r, to: l }) => (r.then((c) => {
407
+ tt(c, i.out), c.style.pointerEvents = "none";
408
+ }), l.then((c) => {
409
+ tt(c, i.in);
410
+ }), {}),
411
+ animation: ({ from: r, to: l }) => {
412
+ const c = new b({
413
+ element: r,
414
+ integrator: g.from(o.outPhysics),
415
+ style: (p) => i.out.animate(p)
416
+ }), a = new b({
417
+ element: l,
418
+ integrator: g.from(o.inPhysics),
419
+ style: (p) => i.in.animate(p),
420
+ onComplete: () => jt(l)
421
+ });
422
+ return new E([c, a], o.composition);
423
+ }
424
+ };
425
+ };
426
+ function Kt(e, t, n) {
427
+ return e !== "x" || t === "snappy" || n === "snappy" ? "snappy" : "fluid";
428
+ }
429
+ function Cn(e) {
430
+ const { paths: t } = e, n = e.type ?? "x", s = e.variant, o = e.feel, i = Kt(n, s, o);
431
+ return q(
432
+ t,
433
+ { forward: "forward", backward: "backward" },
434
+ (r) => Gt({ type: n, direction: r, feel: i })
435
+ );
436
+ }
437
+ const Jt = {
226
438
  spring: { stiffness: 200, damping: 22 }
227
- }, Ct = 10, Et = "horizontal", Pt = "#000000";
228
- function N(e, t, n, s, o, a) {
439
+ }, Qt = 10, Rt = "horizontal", te = "#000000";
440
+ function et(e, t, n, s, o, i) {
229
441
  window.getComputedStyle(e).position === "static" && (e.style.position = "relative");
230
442
  const l = document.createElement("div");
231
443
  l.style.cssText = `
@@ -239,19 +451,19 @@ function N(e, t, n, s, o, a) {
239
451
  overflow: hidden;
240
452
  `;
241
453
  const c = [];
242
- for (let r = 0; r < t; r++) {
454
+ for (let a = 0; a < t; a++) {
243
455
  const p = document.createElement("div");
244
456
  if (n === "horizontal") {
245
457
  const d = 100 / t;
246
458
  p.style.cssText = `
247
459
  position: absolute;
248
- top: ${d * r}%;
460
+ top: ${d * a}%;
249
461
  left: 0;
250
462
  width: 100%;
251
463
  height: calc(${d}% + 1px);
252
464
  background: ${s};
253
465
  transform: scaleX(${o === "hidden" ? 0 : 1});
254
- transform-origin: ${a} center;
466
+ transform-origin: ${i} center;
255
467
  will-change: transform;
256
468
  `;
257
469
  } else {
@@ -259,12 +471,12 @@ function N(e, t, n, s, o, a) {
259
471
  p.style.cssText = `
260
472
  position: absolute;
261
473
  top: 0;
262
- left: ${d * r}%;
474
+ left: ${d * a}%;
263
475
  width: calc(${d}% + 1px);
264
476
  height: 100%;
265
477
  background: ${s};
266
478
  transform: scaleY(${o === "hidden" ? 0 : 1});
267
- transform-origin: ${a === "left" ? "top" : "bottom"} center;
479
+ transform-origin: ${i === "left" ? "top" : "bottom"} center;
268
480
  will-change: transform;
269
481
  `;
270
482
  }
@@ -272,13 +484,13 @@ function N(e, t, n, s, o, a) {
272
484
  }
273
485
  return e.appendChild(l), { container: l, blinds: c };
274
486
  }
275
- const Dt = (e = {}) => {
276
- const t = e.blindCount ?? Ct, n = e.direction ?? Et, s = e.blindColor ?? Pt, o = e.physics ?? xt;
487
+ const ee = (e = {}) => {
488
+ const t = e.blindCount ?? Qt, n = e.direction ?? Rt, s = e.blindColor ?? te, o = e.physics ?? Jt;
277
489
  return {
278
- prepare: async ({ from: a, to: i }) => {
279
- const l = await a, c = await i;
490
+ prepare: async ({ from: i, to: r }) => {
491
+ const l = await i, c = await r;
280
492
  l.style.zIndex = "1000";
281
- const r = N(
493
+ const a = et(
282
494
  l,
283
495
  t,
284
496
  n,
@@ -287,7 +499,7 @@ const Dt = (e = {}) => {
287
499
  "left"
288
500
  );
289
501
  c.style.position = "relative", c.style.zIndex = "0";
290
- const p = N(
502
+ const p = et(
291
503
  c,
292
504
  t,
293
505
  n,
@@ -296,44 +508,48 @@ const Dt = (e = {}) => {
296
508
  "right"
297
509
  );
298
510
  return {
299
- fromBlinds: r.blinds,
300
- fromContainer: r.container,
511
+ fromBlinds: a.blinds,
512
+ fromContainer: a.container,
301
513
  toBlinds: p.blinds,
302
514
  toContainer: p.container
303
515
  };
304
516
  },
305
- animation: ({ fromBlinds: a, fromContainer: i, toBlinds: l, toContainer: c }) => {
306
- const r = a.map(
307
- (u) => new w({
308
- element: u,
517
+ animation: ({ fromBlinds: i, fromContainer: r, toBlinds: l, toContainer: c }) => {
518
+ const a = i.map(
519
+ (m) => new b({
520
+ element: m,
309
521
  integrator: g.from(o),
310
522
  style: (f) => ({
311
523
  transform: n === "horizontal" ? `scaleX(${f})` : `scaleY(${f})`
312
524
  })
313
525
  })
314
526
  ), p = l.map(
315
- (u, f) => new w({
316
- element: u,
527
+ (m, f) => new b({
528
+ element: m,
317
529
  integrator: g.from(o),
318
- style: (m, y) => ({
530
+ style: (h, y) => ({
319
531
  transform: n === "horizontal" ? `scaleX(${y})` : `scaleY(${y})`
320
532
  }),
321
533
  onComplete: f === l.length - 1 ? () => {
322
- c.remove(), i.remove();
534
+ c.remove(), r.remove();
323
535
  } : void 0
324
536
  })
325
- ), d = new $(r, { mode: "parallel" }), h = new $(p, { mode: "parallel" });
326
- return new $([d, h], { mode: "sequence" });
537
+ ), d = new E(a, { mode: "parallel" }), u = new E(p, { mode: "parallel" });
538
+ return new E([d, u], { mode: "sequence" });
327
539
  }
328
540
  };
329
541
  };
330
- function Ie({ paths: e }) {
331
- return P(e, () => Dt());
542
+ function Pn(e) {
543
+ const { paths: t, type: n = "horizontal" } = e;
544
+ return P(
545
+ t,
546
+ () => ee({ direction: n })
547
+ );
332
548
  }
333
- const Ot = {
549
+ const ne = {
334
550
  spring: { stiffness: 200, damping: 20, doubleSpring: 0.7 }
335
- }, I = 0.5;
336
- function It(e) {
551
+ }, D = 0.5;
552
+ function se(e) {
337
553
  const t = e === "enter" ? -100 : 100, n = e === "enter" ? 100 : -100;
338
554
  return {
339
555
  out: {
@@ -341,32 +557,32 @@ function It(e) {
341
557
  startStyle: {},
342
558
  animate: (s) => ({
343
559
  transform: `translate3d(${t * s}%, 0, 0)`,
344
- opacity: `${I + (1 - I) * (1 - s)}`
560
+ opacity: `${D + (1 - D) * (1 - s)}`
345
561
  })
346
562
  },
347
563
  in: {
348
564
  willChange: "transform, opacity",
349
565
  startStyle: {
350
566
  transform: `translate3d(${n}%, 0, 0)`,
351
- opacity: `${I}`
567
+ opacity: `${D}`
352
568
  },
353
569
  animate: (s) => ({
354
570
  transform: `translate3d(${n * (1 - s)}%, 0, 0)`,
355
- opacity: `${I + (1 - I) * s}`
571
+ opacity: `${D + (1 - D) * s}`
356
572
  })
357
573
  }
358
574
  };
359
575
  }
360
- function Tt() {
576
+ function oe() {
361
577
  return {
362
- physics: Ot,
363
- build: It
578
+ physics: ne,
579
+ build: se
364
580
  };
365
581
  }
366
- const At = {
582
+ const re = {
367
583
  spring: { stiffness: 170, damping: 22 }
368
584
  };
369
- function _t(e) {
585
+ function ie(e) {
370
586
  const t = e === "enter" ? -20 : 100, n = e === "enter" ? 100 : -20;
371
587
  return {
372
588
  out: {
@@ -387,64 +603,68 @@ function _t(e) {
387
603
  }
388
604
  };
389
605
  }
390
- function kt() {
606
+ function ae() {
391
607
  return {
392
- physics: At,
393
- build: _t
608
+ physics: re,
609
+ build: ie
394
610
  };
395
611
  }
396
- const vt = {
397
- parallax: kt(),
398
- crossfade: Tt()
399
- }, Lt = "parallax";
400
- function Z(e, t) {
612
+ const le = {
613
+ parallax: ae(),
614
+ crossfade: oe()
615
+ }, ce = "parallax";
616
+ function nt(e, t) {
401
617
  e.style.willChange = t.willChange, e.style.backfaceVisibility = "hidden", e.style.contain = "layout paint";
402
618
  for (const [n, s] of Object.entries(t.startStyle))
403
619
  e.style[n] = s;
404
620
  }
405
- const Yt = (e = {}) => {
406
- const t = e.direction ?? "enter", n = vt[e.type ?? Lt], s = n.physics, o = n.build(t);
621
+ const pe = (e = {}) => {
622
+ const t = e.direction ?? "enter", n = le[e.type ?? ce], s = n.physics, o = n.build(t);
407
623
  return {
408
- prepare: ({ from: a, to: i }) => (a.then((l) => {
409
- Z(l, o.out), l.style.pointerEvents = "none", l.style.zIndex = t === "enter" ? "-1" : "100";
410
- }), i.then((l) => {
411
- Z(l, o.in);
624
+ prepare: ({ from: i, to: r }) => (i.then((l) => {
625
+ nt(l, o.out), l.style.pointerEvents = "none", l.style.zIndex = t === "enter" ? "-1" : "100";
626
+ }), r.then((l) => {
627
+ nt(l, o.in);
412
628
  }), {}),
413
- animation: ({ from: a, to: i }) => {
414
- const l = new w({
415
- element: a,
416
- integrator: g.from(s),
417
- style: (r) => o.out.animate(r)
418
- }), c = new w({
629
+ animation: ({ from: i, to: r }) => {
630
+ const l = new b({
419
631
  element: i,
420
632
  integrator: g.from(s),
421
- style: (r) => o.in.animate(r),
633
+ style: (a) => o.out.animate(a)
634
+ }), c = new b({
635
+ element: r,
636
+ integrator: g.from(s),
637
+ style: (a) => o.in.animate(a),
422
638
  onComplete: () => {
423
- i.style.willChange = "auto", i.style.backfaceVisibility = "", i.style.contain = "", i.style.transform = "", i.style.opacity = "";
639
+ r.style.willChange = "auto", r.style.backfaceVisibility = "", r.style.contain = "", r.style.transform = "", r.style.opacity = "";
424
640
  }
425
641
  });
426
- return new $([l, c], { mode: "parallel" });
642
+ return new E([l, c], { mode: "parallel" });
427
643
  }
428
644
  };
429
645
  };
430
- function Te({ type: e, ...t }) {
431
- return st(
432
- t,
433
- (n) => Yt({ direction: n, type: e })
646
+ function de(e) {
647
+ return e === "slide" || e === "crossfade" ? "crossfade" : "parallax";
648
+ }
649
+ function vn(e) {
650
+ const { enter: t, exit: n } = e, s = e.type, o = de(s);
651
+ return ht(
652
+ { enter: t, exit: n },
653
+ (i) => pe({ direction: i, type: o })
434
654
  );
435
655
  }
436
- const Ft = {
656
+ const fe = {
437
657
  spring: { stiffness: 180, damping: 20, doubleSpring: !0 }
438
- }, Mt = {
658
+ }, he = {
439
659
  spring: { stiffness: 170, damping: 20, doubleSpring: !0 }
440
- }, Ht = (e = {}) => {
441
- const t = e.physics ?? Mt, n = e.physics ?? Ft;
660
+ }, ue = (e = {}) => {
661
+ const t = e.physics ?? he, n = e.physics ?? fe;
442
662
  return {
443
663
  prepare: ({ to: s }) => (s.then((o) => {
444
664
  o.style.opacity = "0", o.style.willChange = "opacity";
445
665
  }), {}),
446
666
  animation: ({ from: s, to: o }) => {
447
- const a = new w({
667
+ const i = new b({
448
668
  element: s,
449
669
  integrator: g.from(n),
450
670
  // Default bounds (0, 1). `u` runs 1→0 as the animation moves
@@ -453,7 +673,7 @@ const Ft = {
453
673
  onComplete: () => {
454
674
  s.style.willChange = "auto";
455
675
  }
456
- }), i = new w({
676
+ }), r = new b({
457
677
  element: o,
458
678
  integrator: g.from(t),
459
679
  style: (l) => ({ opacity: l }),
@@ -461,21 +681,22 @@ const Ft = {
461
681
  o.style.willChange = "auto", o.style.opacity = "";
462
682
  }
463
683
  });
464
- return new $([a, i], { mode: "sequence" });
684
+ return new E([i, r], { mode: "sequence" });
465
685
  }
466
686
  };
467
687
  };
468
- function Ae({ paths: e }) {
469
- return P(e, () => Ht());
470
- }
471
- function O(e, t) {
472
- function n(a) {
473
- let i = 0, l = 0;
474
- const c = a.offsetWidth, r = a.offsetHeight;
475
- let p = a;
688
+ function Tn(e) {
689
+ const { paths: t } = e;
690
+ return P(t, () => ue());
691
+ }
692
+ function T(e, t) {
693
+ function n(i) {
694
+ let r = 0, l = 0;
695
+ const c = i.offsetWidth, a = i.offsetHeight;
696
+ let p = i;
476
697
  for (; p; )
477
- i += p.offsetTop, l += p.offsetLeft, p = p.offsetParent;
478
- return i -= window.scrollY, l -= window.scrollX, { top: i, left: l, width: c, height: r };
698
+ r += p.offsetTop, l += p.offsetLeft, p = p.offsetParent;
699
+ return r -= window.scrollY, l -= window.scrollX, { top: r, left: l, width: c, height: a };
479
700
  }
480
701
  const s = n(e), o = n(t);
481
702
  return new DOMRect(
@@ -485,8 +706,8 @@ function O(e, t) {
485
706
  o.height
486
707
  );
487
708
  }
488
- function T(e, t) {
489
- const { scrollingElement: n, positionedParent: s } = e, o = n !== s && n.contains(s) ? O(n, s).top : 0;
709
+ function _(e, t) {
710
+ const { scrollingElement: n, positionedParent: s } = e, o = n !== s && n.contains(s) ? T(n, s).top : 0;
490
711
  return {
491
712
  top: e[t].scroll.y,
492
713
  left: 0,
@@ -494,134 +715,134 @@ function T(e, t) {
494
715
  height: n.clientHeight - o
495
716
  };
496
717
  }
497
- const M = {
718
+ const z = {
498
719
  scaleDown: { stiffness: 20, damping: 7 },
499
720
  translate: { stiffness: 15, damping: 7 },
500
721
  scaleUp: { stiffness: 20, damping: 7 }
501
- }, D = {
722
+ }, v = {
502
723
  scaleDown: 0,
503
724
  translate: 0.2,
504
725
  scaleUp: 0.8
505
- }, Ut = 0.8, zt = "white", q = 1e3 / 60, Vt = 600;
506
- function Xt(e) {
507
- const { items: t, from: n, to: s, recordFrame: o } = e, a = q / 1e3, i = Math.abs(s - n), l = t.map((r) => ({
508
- item: r,
509
- integrator: new v({
510
- stiffness: r.spring.stiffness,
511
- damping: r.spring.damping
726
+ }, me = 0.8, ye = "white", st = 1e3 / 60, ge = 600;
727
+ function be(e) {
728
+ const { items: t, from: n, to: s, recordFrame: o } = e, i = st / 1e3, r = Math.abs(s - n), l = t.map((a) => ({
729
+ item: a,
730
+ integrator: new F({
731
+ stiffness: a.spring.stiffness,
732
+ damping: a.spring.damping
512
733
  }),
513
734
  state: { position: n, velocity: 0 },
514
735
  started: !1,
515
736
  settled: !1,
516
737
  settleTime: 0
517
738
  }));
518
- for (let r = 0; r < l.length; r++)
519
- (r === 0 || l[r].item.offset === 0) && (l[r].started = !0);
739
+ for (let a = 0; a < l.length; a++)
740
+ (a === 0 || l[a].item.offset === 0) && (l[a].started = !0);
520
741
  o(0);
521
742
  let c = 0;
522
- for (let r = 1; r <= Vt; r++) {
523
- const p = r * q;
743
+ for (let a = 1; a <= ge; a++) {
744
+ const p = a * st;
524
745
  c = p;
525
746
  for (const d of l)
526
- !d.started || d.settled || (d.state = d.integrator.step(d.state, s, a), d.integrator.isSettled(d.state, s) ? (d.settleTime += a, d.settleTime >= ut && (d.state = { position: s, velocity: 0 }, d.settled = !0)) : d.settleTime = 0, d.item.tick(d.state.position));
747
+ !d.started || d.settled || (d.state = d.integrator.step(d.state, s, i), d.integrator.isSettled(d.state, s) ? (d.settleTime += i, d.settleTime >= Ct && (d.state = { position: s, velocity: 0 }, d.settled = !0)) : d.settleTime = 0, d.item.tick(d.state.position));
527
748
  for (let d = 1; d < l.length; d++) {
528
- const h = l[d];
529
- if (h.started) continue;
530
- const u = l[d - 1];
531
- if (!u.started) continue;
532
- (i === 0 ? 1 : Math.abs(u.state.position - n) / i) >= h.item.offset && (h.started = !0);
749
+ const u = l[d];
750
+ if (u.started) continue;
751
+ const m = l[d - 1];
752
+ if (!m.started) continue;
753
+ (r === 0 ? 1 : Math.abs(m.state.position - n) / r) >= u.item.offset && (u.started = !0);
533
754
  }
534
755
  if (o(p), l.every((d) => d.settled)) return p;
535
756
  }
536
757
  return c;
537
758
  }
538
- function H(e, t) {
759
+ function U(e, t) {
539
760
  return e != null && e.spring ? {
540
761
  stiffness: e.spring.stiffness,
541
762
  damping: e.spring.damping
542
763
  } : t;
543
764
  }
544
- function j(e) {
545
- const { rect: t, scale: n, direction: s, override: o } = e, a = s === "out" ? { scale: 1, translateY: -t.top } : { scale: n, translateY: -t.top + t.height }, i = H(o, M.scaleDown), l = H(o, M.translate), c = H(o, M.scaleUp), r = s === "out" ? 1 : 0, p = s === "out" ? 0 : 1, d = s === "out" ? [
765
+ function ot(e) {
766
+ const { rect: t, scale: n, direction: s, override: o } = e, i = s === "out" ? { scale: 1, translateY: -t.top } : { scale: n, translateY: -t.top + t.height }, r = U(o, z.scaleDown), l = U(o, z.translate), c = U(o, z.scaleUp), a = s === "out" ? 1 : 0, p = s === "out" ? 0 : 1, d = s === "out" ? [
546
767
  {
547
- spring: i,
548
- offset: D.scaleDown,
768
+ spring: r,
769
+ offset: v.scaleDown,
549
770
  tick: (f) => {
550
- const m = 1 - f;
551
- a.scale = 1 - (1 - n) * m;
771
+ const h = 1 - f;
772
+ i.scale = 1 - (1 - n) * h;
552
773
  }
553
774
  },
554
775
  {
555
776
  spring: l,
556
- offset: D.translate,
777
+ offset: v.translate,
557
778
  tick: (f) => {
558
- const m = 1 - f;
559
- a.translateY = -t.top - t.height * m;
779
+ const h = 1 - f;
780
+ i.translateY = -t.top - t.height * h;
560
781
  }
561
782
  },
562
783
  {
563
784
  spring: c,
564
- offset: D.scaleUp,
785
+ offset: v.scaleUp,
565
786
  tick: (f) => {
566
- const m = 1 - f;
567
- a.scale = n + (1 - n) * m;
787
+ const h = 1 - f;
788
+ i.scale = n + (1 - n) * h;
568
789
  }
569
790
  }
570
791
  ] : [
571
792
  {
572
- spring: i,
573
- offset: D.scaleDown,
793
+ spring: r,
794
+ offset: v.scaleDown,
574
795
  tick: (f) => {
575
- a.scale = 1 - (1 - n) * f;
796
+ i.scale = 1 - (1 - n) * f;
576
797
  }
577
798
  },
578
799
  {
579
800
  spring: l,
580
- offset: D.translate,
801
+ offset: v.translate,
581
802
  tick: (f) => {
582
- a.translateY = -t.top + t.height * (1 - f);
803
+ i.translateY = -t.top + t.height * (1 - f);
583
804
  }
584
805
  },
585
806
  {
586
807
  spring: c,
587
- offset: D.scaleUp,
808
+ offset: v.scaleUp,
588
809
  tick: (f) => {
589
- a.scale = n + (1 - n) * f;
810
+ i.scale = n + (1 - n) * f;
590
811
  }
591
812
  }
592
- ], h = [], u = Xt({
813
+ ], u = [], m = be({
593
814
  items: d,
594
- from: r,
815
+ from: a,
595
816
  to: p,
596
- recordFrame: (f) => h.push({
817
+ recordFrame: (f) => u.push({
597
818
  time: f,
598
- scale: a.scale,
599
- translateY: a.translateY
819
+ scale: i.scale,
820
+ translateY: i.translateY
600
821
  })
601
822
  });
602
- return { snapshots: h, totalDuration: u };
823
+ return { snapshots: u, totalDuration: m };
603
824
  }
604
- function Bt(e, t) {
825
+ function we(e, t) {
605
826
  if (e.length === 0) return { time: 0, scale: 1, translateY: 0 };
606
827
  if (e.length === 1 || t <= 0) return e[0];
607
828
  if (t >= 1) return e[e.length - 1];
608
829
  const n = t * (e.length - 1), s = Math.floor(n), o = Math.ceil(n);
609
830
  if (s === o) return e[s];
610
- const a = e[s], i = e[o], l = n - s;
831
+ const i = e[s], r = e[o], l = n - s;
611
832
  return {
612
- time: a.time + (i.time - a.time) * l,
613
- scale: a.scale + (i.scale - a.scale) * l,
614
- translateY: a.translateY + (i.translateY - a.translateY) * l
833
+ time: i.time + (r.time - i.time) * l,
834
+ scale: i.scale + (r.scale - i.scale) * l,
835
+ translateY: i.translateY + (r.translateY - i.translateY) * l
615
836
  };
616
837
  }
617
- const Wt = [
838
+ const Se = [
618
839
  [1, 1],
619
840
  [-1, 1],
620
841
  [1, -1],
621
842
  [-1, -1]
622
843
  ];
623
- function Nt(e, t) {
624
- const o = (a, i, l) => {
844
+ function $e(e, t) {
845
+ const o = (i, r, l) => {
625
846
  const c = document.createElement("div");
626
847
  Object.assign(c.style, {
627
848
  position: "fixed",
@@ -629,16 +850,16 @@ function Nt(e, t) {
629
850
  zIndex: "9999",
630
851
  width: "15px",
631
852
  height: "15px",
632
- ...a
853
+ ...i
633
854
  });
634
- const r = document.createElement("div");
635
- Object.assign(r.style, {
855
+ const a = document.createElement("div");
856
+ Object.assign(a.style, {
636
857
  position: "absolute",
637
858
  width: "15px",
638
859
  height: "1px",
639
860
  backgroundColor: e,
640
861
  [l]: "0",
641
- [i]: "0"
862
+ [r]: "0"
642
863
  });
643
864
  const p = document.createElement("div");
644
865
  return Object.assign(p.style, {
@@ -647,8 +868,8 @@ function Nt(e, t) {
647
868
  height: "15px",
648
869
  backgroundColor: e,
649
870
  [l]: "0",
650
- [i]: "0"
651
- }), c.appendChild(r), c.appendChild(p), c;
871
+ [r]: "0"
872
+ }), c.appendChild(a), c.appendChild(p), c;
652
873
  };
653
874
  return {
654
875
  topLeft: o(
@@ -685,11 +906,11 @@ function Nt(e, t) {
685
906
  )
686
907
  };
687
908
  }
688
- function G(e, t) {
909
+ function rt(e, t) {
689
910
  const n = t.left + t.width / 2, s = t.top + t.height / 2;
690
911
  e.style.transformOrigin = `${n}px ${s}px`;
691
912
  }
692
- function K(e, t) {
913
+ function it(e, t) {
693
914
  e.style.clipPath = `polygon(
694
915
  ${t.left}px ${t.top}px,
695
916
  ${t.left + t.width}px ${t.top}px,
@@ -697,229 +918,232 @@ function K(e, t) {
697
918
  ${t.left}px ${t.top + t.height}px
698
919
  )`;
699
920
  }
700
- function U(e, t, n, s, o) {
701
- const a = n / 1e3;
702
- return new w({
921
+ function X(e, t, n, s, o) {
922
+ const i = n / 1e3;
923
+ return new b({
703
924
  element: e,
704
- integrator: new $t({ durationSec: a }),
925
+ integrator: new At({ durationSec: i }),
705
926
  lowerBound: 0,
706
927
  upperBound: 1,
707
- style: (i) => s(Bt(t, i)),
928
+ style: (r) => s(we(t, r)),
708
929
  onComplete: o
709
930
  });
710
931
  }
711
- const Zt = (e = {}) => {
932
+ const xe = (e = {}) => {
712
933
  var o;
713
- const t = ((o = e.border) == null ? void 0 : o.color) ?? zt, n = Ut, s = e.physics;
934
+ const t = ((o = e.border) == null ? void 0 : o.color) ?? ye, n = me, s = e.physics;
714
935
  return {
715
- prepare: ({ from: a, to: i, context: l }) => {
716
- const c = T(l, "from"), r = T(l, "to"), p = O(document.body, l.positionedParent), d = Nt(t, {
936
+ prepare: ({ from: i, to: r, context: l }) => {
937
+ const c = _(l, "from"), a = _(l, "to"), p = T(document.body, l.positionedParent), d = $e(t, {
717
938
  ...c,
718
939
  top: p.top
719
940
  });
720
- for (const h of [
941
+ for (const u of [
721
942
  "topLeft",
722
943
  "topRight",
723
944
  "bottomLeft",
724
945
  "bottomRight"
725
946
  ])
726
- l.positionedParent.appendChild(d[h]);
727
- return a.then((h) => {
728
- G(h, c), K(h, c), h.style.transform = `translateY(${-c.top}px)`;
729
- }), i.then((h) => {
730
- G(h, r), K(h, r), h.style.transform = `translateY(${-r.top + r.height}px) scale(${n})`;
731
- }), { borders: d, fromRect: c, toRect: r };
947
+ l.positionedParent.appendChild(d[u]);
948
+ return i.then((u) => {
949
+ rt(u, c), it(u, c), u.style.transform = `translateY(${-c.top}px)`;
950
+ }), r.then((u) => {
951
+ rt(u, a), it(u, a), u.style.transform = `translateY(${-a.top + a.height}px) scale(${n})`;
952
+ }), { borders: d, fromRect: c, toRect: a };
732
953
  },
733
- animation: ({ from: a, to: i, context: l, borders: c, fromRect: r, toRect: p }) => {
734
- const d = j({
735
- rect: r,
954
+ animation: ({ from: i, to: r, context: l, borders: c, fromRect: a, toRect: p }) => {
955
+ const d = ot({
956
+ rect: a,
736
957
  scale: n,
737
958
  direction: "out",
738
959
  override: s
739
- }), h = j({
960
+ }), u = ot({
740
961
  rect: p,
741
962
  scale: n,
742
963
  direction: "in",
743
964
  override: s
744
- }), u = U(
745
- a,
965
+ }), m = X(
966
+ i,
746
967
  d.snapshots,
747
968
  d.totalDuration,
748
- (b) => ({
749
- transform: `translateY(${b.translateY}px) scale(${b.scale})`
969
+ (S) => ({
970
+ transform: `translateY(${S.translateY}px) scale(${S.scale})`
750
971
  }),
751
972
  () => {
752
- a.style.clipPath = "", a.style.transformOrigin = "";
973
+ i.style.clipPath = "", i.style.transformOrigin = "";
753
974
  }
754
- ), f = U(
755
- i,
756
- h.snapshots,
757
- h.totalDuration,
758
- (b) => ({
759
- transform: `translateY(${b.translateY}px) scale(${b.scale})`
975
+ ), f = X(
976
+ r,
977
+ u.snapshots,
978
+ u.totalDuration,
979
+ (S) => ({
980
+ transform: `translateY(${S.translateY}px) scale(${S.scale})`
760
981
  }),
761
982
  () => {
762
- i.style.clipPath = "", i.style.transformOrigin = "", i.style.transform = "";
983
+ r.style.clipPath = "", r.style.transformOrigin = "", r.style.transform = "";
763
984
  }
764
- ), m = Wt.map(([b, C], E) => {
765
- const L = ["topLeft", "topRight", "bottomLeft", "bottomRight"][E];
766
- return U(
767
- c[L],
985
+ ), h = Se.map(([S, x], C) => {
986
+ const Y = ["topLeft", "topRight", "bottomLeft", "bottomRight"][C];
987
+ return X(
988
+ c[Y],
768
989
  d.snapshots,
769
990
  d.totalDuration,
770
991
  (A) => {
771
- const Y = (r.width - r.width * A.scale) / 2 * 0.7 * b, F = (r.height - r.height * A.scale) / 2 * 0.7 * C;
772
- return { transform: `translate(${Y}px, ${F}px)` };
992
+ const H = (a.width - a.width * A.scale) / 2 * 0.7 * S, M = (a.height - a.height * A.scale) / 2 * 0.7 * x;
993
+ return { transform: `translate(${H}px, ${M}px)` };
773
994
  }
774
995
  );
775
- }), y = new $([u, f, ...m], {
996
+ }), y = new E([m, f, ...h], {
776
997
  mode: "parallel"
777
- }), x = y.onComplete;
998
+ }), w = y.onComplete;
778
999
  return y.onComplete = () => {
779
- x == null || x();
780
- const b = l.positionedParent;
781
- for (const C of [
1000
+ w == null || w();
1001
+ const S = l.positionedParent;
1002
+ for (const x of [
782
1003
  "topLeft",
783
1004
  "topRight",
784
1005
  "bottomLeft",
785
1006
  "bottomRight"
786
1007
  ]) {
787
- const E = c[C];
788
- E.parentElement === b && b.removeChild(E);
1008
+ const C = c[x];
1009
+ C.parentElement === S && S.removeChild(C);
789
1010
  }
790
1011
  }, y;
791
1012
  }
792
1013
  };
793
1014
  };
794
- function _e({ paths: e }) {
795
- return P(e, () => Zt());
1015
+ function Dn(e) {
1016
+ const { paths: t, options: n } = e, s = (n == null ? void 0 : n.borderColor) !== void 0 ? { border: { color: n.borderColor } } : void 0;
1017
+ return P(t, () => xe(s));
796
1018
  }
797
- const qt = {
1019
+ const Ee = {
798
1020
  spring: { stiffness: 300, damping: 30 }
799
1021
  };
800
- function jt(e, t) {
1022
+ function Ce(e, t) {
801
1023
  return e.querySelector(`[data-hero-key="${t}"]`);
802
1024
  }
803
- const Gt = (e = {}) => {
804
- const t = e.physics ?? qt, n = e.maxDistance ?? 700;
1025
+ const Pe = (e = {}) => {
1026
+ const t = e.physics ?? Ee, n = e.maxDistance ?? 700;
805
1027
  return {
806
1028
  prepare: ({ from: s }) => (s.then((o) => {
807
1029
  o.style.opacity = "0";
808
1030
  }), {}),
809
- animation: ({ from: s, to: o, context: a }) => {
810
- const i = s, l = o, c = Array.from(
1031
+ animation: ({ from: s, to: o, context: i }) => {
1032
+ const r = s, l = o, c = Array.from(
811
1033
  l.querySelectorAll("[data-hero-key]")
812
- ), r = [];
1034
+ ), a = [];
813
1035
  for (const f of c) {
814
- const m = f.getAttribute("data-hero-key");
815
- if (!m) continue;
816
- const y = jt(i, m);
817
- y && r.push({ key: m, fromEl: y, toEl: f });
1036
+ const h = f.getAttribute("data-hero-key");
1037
+ if (!h) continue;
1038
+ const y = Ce(r, h);
1039
+ y && a.push({ key: h, fromEl: y, toEl: f });
818
1040
  }
819
- if (r.length === 0)
820
- return new $([], { mode: "parallel" });
1041
+ if (a.length === 0)
1042
+ return new E([], { mode: "parallel" });
821
1043
  const p = [], d = [];
822
- for (const { fromEl: f, toEl: m } of r) {
823
- const y = O(i, f), x = O(l, m), b = y.left - x.left - a.scrollOffset.x, C = y.top - x.top - a.scrollOffset.y, E = y.width / x.width, L = y.height / x.height;
824
- if (Math.abs(C) > n) continue;
825
- const A = m.style.transform, Y = m.style.position, F = m.style.transformOrigin, at = m.style.zIndex, lt = m.style.willChange;
826
- m.style.position = "relative", m.style.transformOrigin = "top left", m.style.zIndex = "1000", m.style.willChange = "transform", p.push(
827
- new w({
828
- element: m,
1044
+ for (const { fromEl: f, toEl: h } of a) {
1045
+ const y = T(r, f), w = T(l, h), S = y.left - w.left - i.scrollOffset.x, x = y.top - w.top - i.scrollOffset.y, C = y.width / w.width, Y = y.height / w.height;
1046
+ if (Math.abs(x) > n) continue;
1047
+ const A = h.style.transform, H = h.style.position, M = h.style.transformOrigin, yt = h.style.zIndex, gt = h.style.willChange;
1048
+ h.style.position = "relative", h.style.transformOrigin = "top left", h.style.zIndex = "1000", h.style.willChange = "transform", p.push(
1049
+ new b({
1050
+ element: h,
829
1051
  integrator: g.from(t),
830
- style: (W, _) => {
831
- const ct = _ * b, pt = _ * C, dt = W + _ * E, ft = W + _ * L;
1052
+ style: (j, I) => {
1053
+ const bt = I * S, wt = I * x, St = j + I * C, $t = j + I * Y;
832
1054
  return {
833
- transform: `translate(${ct}px, ${pt}px) scale(${dt}, ${ft})`
1055
+ transform: `translate(${bt}px, ${wt}px) scale(${St}, ${$t})`
834
1056
  };
835
1057
  }
836
1058
  })
837
1059
  ), d.push(() => {
838
- m.style.transform = A, m.style.position = Y, m.style.transformOrigin = F, m.style.zIndex = at, m.style.willChange = lt;
1060
+ h.style.transform = A, h.style.position = H, h.style.transformOrigin = M, h.style.zIndex = yt, h.style.willChange = gt;
839
1061
  });
840
1062
  }
841
- const h = new $(p, {
1063
+ const u = new E(p, {
842
1064
  mode: "parallel"
843
- }), u = h.onComplete;
844
- return h.onComplete = () => {
1065
+ }), m = u.onComplete;
1066
+ return u.onComplete = () => {
845
1067
  for (const f of d) f();
846
- u == null || u();
847
- }, h;
1068
+ m == null || m();
1069
+ }, u;
848
1070
  }
849
1071
  };
850
1072
  };
851
- function ke({ paths: e }) {
852
- return P(e, () => Gt());
1073
+ function _n(e) {
1074
+ const { paths: t } = e;
1075
+ return P(t, () => Pe());
853
1076
  }
854
- const Kt = {
1077
+ const ve = {
855
1078
  spring: { stiffness: 50, damping: 30 }
856
- }, Jt = {
1079
+ }, Te = {
857
1080
  spring: { stiffness: 80, damping: 25 }
858
- }, Qt = (e = {}) => {
859
- const t = e.physics ?? Kt, n = e.initialRotation ?? 45, s = e.initialScale ?? 0.01, o = e.rotationTriggerPoint ?? 0.8;
1081
+ }, De = (e = {}) => {
1082
+ const t = e.physics ?? ve, n = e.initialRotation ?? 45, s = e.initialScale ?? 0.01, o = e.rotationTriggerPoint ?? 0.8;
860
1083
  return {
861
- prepare: ({ from: a, to: i, context: l }) => (a.then((c) => {
1084
+ prepare: ({ from: i, to: r, context: l }) => (i.then((c) => {
862
1085
  c.style.opacity = "1";
863
- }), i.then((c) => {
864
- const r = T(l, "to"), p = Math.min(r.width, r.height) * 0.4;
1086
+ }), r.then((c) => {
1087
+ const a = _(l, "to"), p = Math.min(a.width, a.height) * 0.4;
865
1088
  c.style.setProperty("--max-border-radius", `${p}px`), c.style.setProperty("--border-radius-scale", "1"), c.style.willChange = "transform", c.style.backfaceVisibility = "hidden";
866
- const d = r.left + r.width / 2, h = r.top + r.height / 2;
867
- c.style.transformOrigin = `${d}px ${h}px`, c.style.position = "fixed", c.style.top = `${r.top}px`, c.style.left = `${r.left}px`, c.style.width = `${r.width}px`, c.style.height = `${r.height}px`, c.style.zIndex = "1000", c.style.overflow = "hidden", c.style.transform = `rotate(${n}deg) scale(${s}) translateZ(0)`, c.style.borderRadius = "calc(var(--max-border-radius) * var(--border-radius-scale))", c.style.opacity = "1";
1089
+ const d = a.left + a.width / 2, u = a.top + a.height / 2;
1090
+ c.style.transformOrigin = `${d}px ${u}px`, c.style.position = "fixed", c.style.top = `${a.top}px`, c.style.left = `${a.left}px`, c.style.width = `${a.width}px`, c.style.height = `${a.height}px`, c.style.zIndex = "1000", c.style.overflow = "hidden", c.style.transform = `rotate(${n}deg) scale(${s}) translateZ(0)`, c.style.borderRadius = "calc(var(--max-border-radius) * var(--border-radius-scale))", c.style.opacity = "1";
868
1091
  }), {}),
869
- animation: ({ from: a, to: i }) => {
870
- const l = new w({
871
- element: a,
872
- integrator: g.from(Jt),
873
- style: (r, p) => ({ opacity: p })
874
- }), c = new w({
1092
+ animation: ({ from: i, to: r }) => {
1093
+ const l = new b({
875
1094
  element: i,
1095
+ integrator: g.from(Te),
1096
+ style: (a, p) => ({ opacity: p })
1097
+ }), c = new b({
1098
+ element: r,
876
1099
  integrator: g.from(t),
877
- style: (r) => {
1100
+ style: (a) => {
878
1101
  let p;
879
- if (r <= 0.05)
1102
+ if (a <= 0.05)
880
1103
  p = s;
881
- else if (r <= o) {
882
- const f = (r - 0.05) / (o - 0.05), m = Math.pow(f, 9);
883
- p = s + (0.8 - s) * m;
1104
+ else if (a <= o) {
1105
+ const f = (a - 0.05) / (o - 0.05), h = Math.pow(f, 9);
1106
+ p = s + (0.8 - s) * h;
884
1107
  } else {
885
- const f = (r - o) / (1 - o);
1108
+ const f = (a - o) / (1 - o);
886
1109
  p = 0.8 + 0.2 * (1 - Math.pow(1 - f, 3));
887
1110
  }
888
1111
  const d = 0.7;
889
- let h;
890
- if (r <= d)
891
- h = n;
1112
+ let u;
1113
+ if (a <= d)
1114
+ u = n;
892
1115
  else {
893
- const f = (r - d) / (1 - d), m = 1 - Math.pow(1 - f, 2);
894
- h = n * (1 - m);
1116
+ const f = (a - d) / (1 - d), h = 1 - Math.pow(1 - f, 2);
1117
+ u = n * (1 - h);
895
1118
  }
896
- let u;
897
- if (r <= d)
898
- u = 1;
1119
+ let m;
1120
+ if (a <= d)
1121
+ m = 1;
899
1122
  else {
900
- const f = (r - d) / (1 - d);
901
- u = 1 - Math.pow(f, 0.5);
1123
+ const f = (a - d) / (1 - d);
1124
+ m = 1 - Math.pow(f, 0.5);
902
1125
  }
903
1126
  return {
904
- transform: `rotate(${h.toFixed(2)}deg) scale(${p.toFixed(4)}) translateZ(0)`,
905
- "--border-radius-scale": u.toFixed(4)
1127
+ transform: `rotate(${u.toFixed(2)}deg) scale(${p.toFixed(4)}) translateZ(0)`,
1128
+ "--border-radius-scale": m.toFixed(4)
906
1129
  };
907
1130
  },
908
1131
  onComplete: () => {
909
- i.style.willChange = "", i.style.backfaceVisibility = "", i.style.removeProperty("--max-border-radius"), i.style.removeProperty("--border-radius-scale"), i.style.transform = "", i.style.transformOrigin = "", i.style.position = "", i.style.zIndex = "", i.style.top = "", i.style.left = "", i.style.width = "", i.style.height = "", i.style.overflow = "", i.style.borderRadius = "";
1132
+ r.style.willChange = "", r.style.backfaceVisibility = "", r.style.removeProperty("--max-border-radius"), r.style.removeProperty("--border-radius-scale"), r.style.transform = "", r.style.transformOrigin = "", r.style.position = "", r.style.zIndex = "", r.style.top = "", r.style.left = "", r.style.width = "", r.style.height = "", r.style.overflow = "", r.style.borderRadius = "";
910
1133
  }
911
1134
  });
912
- return new $([l, c], { mode: "parallel" });
1135
+ return new E([l, c], { mode: "parallel" });
913
1136
  }
914
1137
  };
915
1138
  };
916
- function ve({ paths: e }) {
917
- return P(e, () => Qt());
1139
+ function An(e) {
1140
+ const { paths: t } = e;
1141
+ return P(t, () => De());
918
1142
  }
919
- const Rt = {
1143
+ const _e = {
920
1144
  spring: { stiffness: 100, damping: 30 }
921
- }, te = (e = {}) => {
922
- const t = e.physics ?? Rt;
1145
+ }, Ae = (e = {}) => {
1146
+ const t = e.physics ?? _e;
923
1147
  return {
924
1148
  prepare: ({ from: n, to: s }) => (n.then((o) => {
925
1149
  o.style.transformOrigin = "center center", o.style.willChange = "transform, opacity";
@@ -927,33 +1151,34 @@ const Rt = {
927
1151
  o.style.opacity = "0", o.style.transform = "rotate(-180deg)", o.style.transformOrigin = "center center", o.style.willChange = "transform, opacity";
928
1152
  }), {}),
929
1153
  animation: ({ from: n, to: s }) => {
930
- const o = new w({
1154
+ const o = new b({
931
1155
  element: n,
932
1156
  integrator: g.from(t),
933
- style: (i) => ({
934
- transform: `rotate(${i * 180}deg)`,
935
- opacity: i < 0.5 ? 1 : 0
1157
+ style: (r) => ({
1158
+ transform: `rotate(${r * 180}deg)`,
1159
+ opacity: r < 0.5 ? 1 : 0
936
1160
  })
937
- }), a = new w({
1161
+ }), i = new b({
938
1162
  element: s,
939
1163
  integrator: g.from(t),
940
1164
  // u runs 1→0, so -u*180 unwinds -180→0.
941
- style: (i, l) => ({
1165
+ style: (r, l) => ({
942
1166
  transform: `rotate(${-l * 180}deg)`,
943
- opacity: i > 0.5 ? 1 : 0
1167
+ opacity: r > 0.5 ? 1 : 0
944
1168
  }),
945
1169
  onComplete: () => {
946
1170
  s.style.willChange = "auto", s.style.transform = "", s.style.transformOrigin = "", s.style.opacity = "";
947
1171
  }
948
1172
  });
949
- return new $([o, a], { mode: "parallel" });
1173
+ return new E([o, i], { mode: "parallel" });
950
1174
  }
951
1175
  };
952
1176
  };
953
- function Le({ paths: e }) {
954
- return P(e, () => te());
1177
+ function In(e) {
1178
+ const { paths: t } = e;
1179
+ return P(t, () => Ae());
955
1180
  }
956
- const ee = {
1181
+ const Ie = {
957
1182
  spring: {
958
1183
  stiffness: 20,
959
1184
  damping: 8,
@@ -961,76 +1186,73 @@ const ee = {
961
1186
  restDelta: 1e-3,
962
1187
  restSpeed: 1e-3
963
1188
  }
964
- }, J = (e = {}) => {
965
- const t = e.direction ?? "up", n = e.physics ?? ee, s = t === "up";
1189
+ }, at = (e = {}) => {
1190
+ const t = e.direction ?? "up", n = e.physics ?? Ie, s = t === "up";
966
1191
  return {
967
- prepare: ({ from: o, to: a }) => (o.then((i) => {
968
- i.style.zIndex = s ? "-1" : "1", i.style.willChange = "transform", i.style.backfaceVisibility = "hidden", i.style.contain = "layout paint", i.style.pointerEvents = "none";
969
- }), a.then((i) => {
970
- i.style.willChange = "transform", i.style.backfaceVisibility = "hidden", i.style.contain = "layout paint";
1192
+ prepare: ({ from: o, to: i }) => (o.then((r) => {
1193
+ r.style.zIndex = s ? "-1" : "1", r.style.willChange = "transform", r.style.backfaceVisibility = "hidden", r.style.contain = "layout paint", r.style.pointerEvents = "none";
1194
+ }), i.then((r) => {
1195
+ r.style.willChange = "transform", r.style.backfaceVisibility = "hidden", r.style.contain = "layout paint";
971
1196
  }), {}),
972
- animation: ({ from: o, to: a }) => {
973
- const i = o.offsetHeight, l = a.offsetHeight, c = window.innerHeight, r = Math.max(Math.min(i, l), c), p = new w({
1197
+ animation: ({ from: o, to: i }) => {
1198
+ const r = o.offsetHeight, l = i.offsetHeight, c = window.innerHeight, a = Math.max(Math.min(r, l), c), p = new b({
974
1199
  element: o,
975
1200
  integrator: g.from(n),
976
- style: (h) => ({ transform: `translate3d(0, ${s ? -r * h : r * h}px, 0)` })
977
- }), d = new w({
978
- element: a,
1201
+ style: (u) => ({ transform: `translate3d(0, ${s ? -a * u : a * u}px, 0)` })
1202
+ }), d = new b({
1203
+ element: i,
979
1204
  integrator: g.from(n),
980
- style: (h, u) => ({ transform: `translate3d(0, ${s ? u * r : u * -r}px, 0)` }),
1205
+ style: (u, m) => ({ transform: `translate3d(0, ${s ? m * a : m * -a}px, 0)` }),
981
1206
  onComplete: () => {
982
- a.style.willChange = "auto", a.style.backfaceVisibility = "", a.style.contain = "", a.style.transform = "";
1207
+ i.style.willChange = "auto", i.style.backfaceVisibility = "", i.style.contain = "", i.style.transform = "";
983
1208
  }
984
1209
  });
985
- return new $([p, d], { mode: "parallel" });
1210
+ return new E([p, d], { mode: "parallel" });
986
1211
  }
987
1212
  };
988
1213
  };
989
- function Ye({
990
- paths: e,
991
- type: t = "directional",
992
- direction: n = "up"
993
- }) {
994
- return t === "non-directional" ? P(
995
- e,
996
- () => J({ direction: n })
997
- ) : ot(
998
- e,
1214
+ function On(e) {
1215
+ const { paths: t, type: n = "directional" } = e;
1216
+ return n === "non-directional" ? P(
1217
+ t,
1218
+ () => at({ direction: "up" })
1219
+ ) : q(
1220
+ t,
999
1221
  { forward: "up", backward: "down" },
1000
- (s) => J({ direction: s })
1222
+ (s) => at({ direction: s })
1001
1223
  );
1002
1224
  }
1003
- const ne = {
1225
+ const Oe = {
1004
1226
  spring: { stiffness: 200, damping: 24 }
1005
- }, se = {
1227
+ }, ke = {
1006
1228
  inertia: { acceleration: 25, resistance: 1.2 }
1007
- }, z = 0.2;
1008
- function oe() {
1229
+ }, V = 0.2;
1230
+ function Le() {
1009
1231
  return {
1010
- enterPhysics: ne,
1011
- exitPhysics: se,
1232
+ enterPhysics: Oe,
1233
+ exitPhysics: ke,
1012
1234
  background: {
1013
1235
  willChange: "transform, opacity",
1014
1236
  enterStyle: (e, t) => ({
1015
- transform: `scale(${1 - z * e})`,
1237
+ transform: `scale(${1 - V * e})`,
1016
1238
  opacity: t
1017
1239
  }),
1018
1240
  exitStyle: (e) => ({
1019
- transform: `scale(${1 - z + z * e})`,
1241
+ transform: `scale(${1 - V + V * e})`,
1020
1242
  opacity: e
1021
1243
  })
1022
1244
  }
1023
1245
  };
1024
1246
  }
1025
- const ie = {
1026
- spring: { stiffness: 200, damping: 24 }
1027
- }, re = {
1028
- inertia: { acceleration: 25, resistance: 1.2 }
1247
+ const Fe = {
1248
+ spring: { stiffness: 300, damping: 30 }
1249
+ }, Ye = {
1250
+ inertia: { acceleration: 70, resistance: 1.2 }
1029
1251
  };
1030
- function ae() {
1252
+ function He() {
1031
1253
  return {
1032
- enterPhysics: ie,
1033
- exitPhysics: re,
1254
+ enterPhysics: Fe,
1255
+ exitPhysics: Ye,
1034
1256
  background: {
1035
1257
  willChange: "",
1036
1258
  enterStyle: () => ({}),
@@ -1038,333 +1260,548 @@ function ae() {
1038
1260
  }
1039
1261
  };
1040
1262
  }
1041
- const le = {
1042
- static: ae(),
1043
- "background-scale": oe()
1044
- }, ce = "static", pe = "transform", de = (e = {}) => {
1045
- const t = e.direction ?? "enter", n = le[e.type ?? ce], s = t === "enter" ? n.enterPhysics : n.exitPhysics, o = n.background, a = o.willChange !== "";
1263
+ const Me = {
1264
+ static: He(),
1265
+ "background-scale": Le()
1266
+ }, ze = "static", Ue = "transform", Xe = (e = {}) => {
1267
+ const t = e.direction ?? "enter", n = Me[e.type ?? ze], s = t === "enter" ? n.enterPhysics : n.exitPhysics, o = n.background, i = o.willChange !== "";
1046
1268
  return {
1047
- prepare: ({ from: i, to: l }) => {
1048
- const c = t === "enter" ? l : i, r = t === "enter" ? i : l;
1269
+ prepare: ({ from: r, to: l }) => {
1270
+ const c = t === "enter" ? l : r, a = t === "enter" ? r : l;
1049
1271
  return c.then((p) => {
1050
- p.style.willChange = pe, p.style.backfaceVisibility = "hidden", p.style.contain = "layout paint", t === "exit" && (p.style.pointerEvents = "none", p.style.zIndex = "100");
1051
- }), r.then((p) => {
1052
- a && (p.style.willChange = o.willChange, p.style.backfaceVisibility = "hidden", p.style.contain = "layout paint"), t === "enter" && (p.style.pointerEvents = "none", p.style.zIndex = "-1");
1272
+ p.style.willChange = Ue, p.style.backfaceVisibility = "hidden", p.style.contain = "layout paint", t === "exit" && (p.style.pointerEvents = "none", p.style.zIndex = "100");
1273
+ }), a.then((p) => {
1274
+ i && (p.style.willChange = o.willChange, p.style.backfaceVisibility = "hidden", p.style.contain = "layout paint"), t === "enter" && (p.style.pointerEvents = "none", p.style.zIndex = "-1");
1053
1275
  }), {};
1054
1276
  },
1055
- animation: ({ from: i, to: l, context: c }) => {
1056
- const r = t === "enter" ? l : i, p = t === "enter" ? i : l, d = T(
1277
+ animation: ({ from: r, to: l, context: c }) => {
1278
+ const a = t === "enter" ? l : r, p = t === "enter" ? r : l, d = _(
1057
1279
  c,
1058
1280
  t === "enter" ? "to" : "from"
1059
1281
  );
1060
- r.style.clipPath = `inset(${d.top}px 0 calc(100% - ${d.top + d.height}px) 0)`;
1061
- const h = t === "enter" ? (C, E) => ({
1062
- transform: `translate3d(0, ${E * d.height}px, 0)`
1063
- }) : (C) => ({
1282
+ a.style.clipPath = `inset(${d.top}px 0 calc(100% - ${d.top + d.height}px) 0)`;
1283
+ const u = t === "enter" ? (x, C) => ({
1064
1284
  transform: `translate3d(0, ${C * d.height}px, 0)`
1065
- }), u = new w({
1066
- element: r,
1285
+ }) : (x) => ({
1286
+ transform: `translate3d(0, ${x * d.height}px, 0)`
1287
+ }), m = new b({
1288
+ element: a,
1067
1289
  integrator: g.from(s),
1068
- style: h,
1290
+ style: u,
1069
1291
  onComplete: () => {
1070
- r.style.willChange = "auto", r.style.backfaceVisibility = "", r.style.contain = "", r.style.clipPath = "", r.style.transform = "";
1292
+ a.style.willChange = "auto", a.style.backfaceVisibility = "", a.style.contain = "", a.style.clipPath = "", a.style.transform = "";
1071
1293
  }
1072
1294
  });
1073
- if (!a)
1074
- return new $([u], { mode: "parallel" });
1075
- const f = T(
1295
+ if (!i)
1296
+ return new E([m], { mode: "parallel" });
1297
+ const f = _(
1076
1298
  c,
1077
1299
  t === "enter" ? "from" : "to"
1078
- ), m = f.left + f.width / 2, y = f.top + f.height / 2;
1079
- p.style.clipPath = `inset(${f.top}px 0 calc(100% - ${f.top + f.height}px) 0)`, p.style.transformOrigin = `${m}px ${y}px`;
1080
- const x = t === "enter" ? (C, E) => o.enterStyle(C, E) : (C) => o.exitStyle(C), b = new w({
1300
+ ), h = f.left + f.width / 2, y = f.top + f.height / 2;
1301
+ p.style.clipPath = `inset(${f.top}px 0 calc(100% - ${f.top + f.height}px) 0)`, p.style.transformOrigin = `${h}px ${y}px`;
1302
+ const w = t === "enter" ? (x, C) => o.enterStyle(x, C) : (x) => o.exitStyle(x), S = new b({
1081
1303
  element: p,
1082
1304
  integrator: g.from(s),
1083
- style: x,
1305
+ style: w,
1084
1306
  onComplete: t === "exit" ? () => {
1085
1307
  p.style.willChange = "auto", p.style.backfaceVisibility = "", p.style.contain = "", p.style.clipPath = "", p.style.transformOrigin = "";
1086
1308
  } : void 0
1087
1309
  });
1088
- return new $([u, b], { mode: "parallel" });
1310
+ return new E([m, S], { mode: "parallel" });
1089
1311
  }
1090
1312
  };
1091
1313
  };
1092
- function Fe({ type: e, ...t }) {
1093
- return st(
1094
- t,
1095
- (n) => de({ direction: n, type: e })
1314
+ function Ve(e) {
1315
+ return e === "scale" || e === "background-scale" ? "background-scale" : "static";
1316
+ }
1317
+ function kn(e) {
1318
+ const { enter: t, exit: n } = e, s = e.type, o = Ve(s);
1319
+ return ht(
1320
+ { enter: t, exit: n },
1321
+ (i) => Xe({ direction: i, type: o })
1096
1322
  );
1097
1323
  }
1098
- const fe = {
1324
+ const Be = {
1099
1325
  spring: { stiffness: 170, damping: 22, doubleSpring: 0.8 }
1100
- }, he = (e = {}) => {
1101
- const t = e.direction ?? "left", n = e.physics ?? fe, s = t === "left";
1326
+ }, Ne = (e = {}) => {
1327
+ const t = e.direction ?? "left", n = e.physics ?? Be, s = t === "left";
1102
1328
  return {
1103
- prepare: ({ from: o, to: a }) => (o.then((i) => {
1104
- i.style.willChange = "transform", i.style.backfaceVisibility = "hidden", i.style.contain = "layout paint", i.style.pointerEvents = "none";
1105
- }), a.then((i) => {
1329
+ prepare: ({ from: o, to: i }) => (o.then((r) => {
1330
+ r.style.willChange = "transform", r.style.backfaceVisibility = "hidden", r.style.contain = "layout paint", r.style.pointerEvents = "none";
1331
+ }), i.then((r) => {
1106
1332
  const l = s ? 100 : -100;
1107
- i.style.transform = `translate3d(${l}%, 0, 0)`, i.style.willChange = "transform", i.style.backfaceVisibility = "hidden", i.style.contain = "layout paint";
1333
+ r.style.transform = `translate3d(${l}%, 0, 0)`, r.style.willChange = "transform", r.style.backfaceVisibility = "hidden", r.style.contain = "layout paint";
1108
1334
  }), {}),
1109
- animation: ({ from: o, to: a }) => {
1110
- const i = new w({
1335
+ animation: ({ from: o, to: i }) => {
1336
+ const r = new b({
1111
1337
  element: o,
1112
1338
  integrator: g.from(n),
1113
1339
  style: (c) => ({ transform: `translate3d(${s ? -100 * c : 100 * c}%, 0, 0)` })
1114
- }), l = new w({
1115
- element: a,
1340
+ }), l = new b({
1341
+ element: i,
1116
1342
  integrator: g.from(n),
1117
- style: (c, r) => ({ transform: `translate3d(${s ? r * 100 : r * -100}%, 0, 0)` }),
1343
+ style: (c, a) => ({ transform: `translate3d(${s ? a * 100 : a * -100}%, 0, 0)` }),
1118
1344
  onComplete: () => {
1119
- a.style.willChange = "auto", a.style.backfaceVisibility = "", a.style.contain = "", a.style.transform = "";
1345
+ i.style.willChange = "auto", i.style.backfaceVisibility = "", i.style.contain = "", i.style.transform = "";
1120
1346
  }
1121
1347
  });
1122
- return new $([i, l], { mode: "parallel" });
1348
+ return new E([r, l], { mode: "parallel" });
1123
1349
  }
1124
1350
  };
1125
1351
  };
1126
- function Me({ paths: e }) {
1127
- return ot(
1128
- e,
1352
+ function Ln(e) {
1353
+ const { paths: t } = e;
1354
+ return q(
1355
+ t,
1129
1356
  { forward: "left", backward: "right" },
1130
- (t) => he({ direction: t })
1357
+ (n) => Ne({ direction: n })
1131
1358
  );
1132
1359
  }
1133
- const me = {
1360
+ const We = {
1134
1361
  spring: { stiffness: 17, damping: 6 }
1135
- }, V = 20, k = 800, ue = (e = {}) => {
1136
- const t = e.physics ?? me;
1362
+ }, B = 20, L = 800, Ze = (e = {}) => {
1363
+ const t = e.physics ?? We;
1137
1364
  return {
1138
1365
  prepare: ({ from: n, to: s }) => (n.then((o) => {
1139
- o.style.willChange = "transform", o.style.backfaceVisibility = "hidden", o.style.contain = "layout paint", o.style.pointerEvents = "none", o.style.transform = `perspective(${k}px) rotateY(0deg) translate3d(0%, 0, 0)`;
1366
+ o.style.willChange = "transform", o.style.backfaceVisibility = "hidden", o.style.contain = "layout paint", o.style.pointerEvents = "none", o.style.transform = `perspective(${L}px) rotateY(0deg) translate3d(0%, 0, 0)`;
1140
1367
  }), s.then((o) => {
1141
- o.style.willChange = "transform", o.style.backfaceVisibility = "hidden", o.style.contain = "layout paint", o.style.transform = `perspective(${k}px) rotateY(${V}deg) translate3d(-100%, 0, 0)`;
1368
+ o.style.willChange = "transform", o.style.backfaceVisibility = "hidden", o.style.contain = "layout paint", o.style.transform = `perspective(${L}px) rotateY(${B}deg) translate3d(-100%, 0, 0)`;
1142
1369
  }), {}),
1143
1370
  animation: ({ from: n, to: s }) => {
1144
- const o = new w({
1371
+ const o = new b({
1145
1372
  element: n,
1146
1373
  integrator: g.from(t),
1147
- style: (i) => {
1148
- const l = -i * V, c = i * 100;
1374
+ style: (r) => {
1375
+ const l = -r * B, c = r * 100;
1149
1376
  return {
1150
- transform: `perspective(${k}px) rotateY(${l}deg) translate3d(${c}%, 0, 0)`
1377
+ transform: `perspective(${L}px) rotateY(${l}deg) translate3d(${c}%, 0, 0)`
1151
1378
  };
1152
1379
  }
1153
- }), a = new w({
1380
+ }), i = new b({
1154
1381
  element: s,
1155
1382
  integrator: g.from(t),
1156
- style: (i, l) => {
1157
- const c = l * V, r = -l * 100;
1383
+ style: (r, l) => {
1384
+ const c = l * B, a = -l * 100;
1158
1385
  return {
1159
- transform: `perspective(${k}px) rotateY(${c}deg) translate3d(${r}%, 0, 0)`
1386
+ transform: `perspective(${L}px) rotateY(${c}deg) translate3d(${a}%, 0, 0)`
1160
1387
  };
1161
1388
  },
1162
1389
  onComplete: () => {
1163
1390
  s.style.transform = "", s.style.willChange = "auto", s.style.backfaceVisibility = "", s.style.contain = "";
1164
1391
  }
1165
1392
  });
1166
- return new $([o, a], { mode: "sequence" });
1393
+ return new E([o, i], { mode: "sequence" });
1167
1394
  }
1168
1395
  };
1169
1396
  };
1170
- function He({ paths: e }) {
1171
- return P(e, () => ue());
1397
+ function Fn(e) {
1398
+ const { paths: t } = e;
1399
+ return P(t, () => Ze());
1172
1400
  }
1173
- function it({
1401
+ function qe({
1174
1402
  enterRect: e,
1175
1403
  exitRect: t,
1176
1404
  pageRect: n,
1177
- scrollOffset: s
1405
+ scrollOffset: s,
1406
+ enterRadius: o,
1407
+ exitRadius: i
1178
1408
  }) {
1179
- const o = t.left - e.left + (t.width - e.width) / 2 - s.x, a = t.top - e.top + (t.height - e.height) / 2 - s.y, i = t.width / e.width, l = t.height / e.height, c = Math.max(i, l), r = e.top / n.height * 100, p = (n.width - (e.left + e.width)) / n.width * 100, d = (n.height - (e.top + e.height)) / n.height * 100, h = e.left / n.width * 100;
1409
+ const r = t.left - e.left + (t.width - e.width) / 2 - s.x, l = t.top - e.top + (t.height - e.height) / 2 - s.y, c = t.width / e.width, a = t.height / e.height, p = e.top / n.height * 100, d = (n.width - (e.left + e.width)) / n.width * 100, u = (n.height - (e.top + e.height)) / n.height * 100, m = e.left / n.width * 100;
1180
1410
  return {
1181
1411
  transformOrigin: `${e.left + e.width / 2}px ${e.top + e.height / 2}px`,
1182
- animate: (u) => {
1183
- const f = 1 - u;
1412
+ animate: (f) => {
1413
+ const h = 1 - f, y = 1 + (c - 1) * h, w = 1 + (a - 1) * h, x = (i * h + o * (1 - h)) / ((y + w) / 2);
1184
1414
  return {
1185
- clipPath: `inset(${r * f}% ${p * f}% ${d * f}% ${h * f}%)`,
1186
- transform: `translate(${o * f}px, ${a * f}px) scale(${1 + (c - 1) * f})`
1415
+ clipPath: `inset(${p * h}% ${d * h}% ${u * h}% ${m * h}% round ${x}px)`,
1416
+ transform: `translate(${r * h}px, ${l * h}px) scale(${y}, ${w})`
1187
1417
  };
1188
1418
  }
1189
1419
  };
1190
1420
  }
1191
- function rt({
1421
+ function je({
1192
1422
  enterRect: e,
1193
1423
  exitRect: t,
1194
1424
  pageRect: n,
1195
- scrollOffset: s
1425
+ scrollOffset: s,
1426
+ enterRadius: o,
1427
+ exitRadius: i
1196
1428
  }) {
1197
- const o = t.left - e.left + (t.width - e.width) / 2 + s.x, a = t.top - e.top + (t.height - e.height) / 2 + s.y, i = t.width / e.width, l = t.height / e.height, c = Math.min(i, l), r = e.top / n.height * 100, p = (n.width - (e.left + e.width)) / n.width * 100, d = (n.height - (e.top + e.height)) / n.height * 100, h = e.left / n.width * 100;
1429
+ const r = t.left - e.left + (t.width - e.width) / 2 + s.x, l = t.top - e.top + (t.height - e.height) / 2 + s.y, c = t.width / e.width, a = t.height / e.height, p = e.top / n.height * 100, d = (n.width - (e.left + e.width)) / n.width * 100, u = (n.height - (e.top + e.height)) / n.height * 100, m = e.left / n.width * 100;
1198
1430
  return {
1199
1431
  transformOrigin: `${e.left + e.width / 2}px ${e.top + e.height / 2}px`,
1200
- animate: (u) => {
1201
- const f = 1 - u;
1432
+ animate: (f) => {
1433
+ const h = 1 - f, y = 1 + (c - 1) * h, w = 1 + (a - 1) * h, x = (o * (1 - h) + i * h) / ((y + w) / 2);
1434
+ return {
1435
+ clipPath: `inset(${p * h}% ${d * h}% ${u * h}% ${m * h}% round ${x}px)`,
1436
+ transform: `translate(${r * h - s.x}px, ${l * h}px) scale(${y}, ${w})`
1437
+ };
1438
+ }
1439
+ };
1440
+ }
1441
+ const Ge = {
1442
+ spring: { stiffness: 200, damping: 24 }
1443
+ }, ut = 0.12, Ke = 18;
1444
+ function Je() {
1445
+ return {
1446
+ transformOrigin: "50% 50%",
1447
+ animate: (e) => {
1448
+ const t = 1 - e;
1449
+ return {
1450
+ transform: `scale(${1 - ut * t})`
1451
+ };
1452
+ }
1453
+ };
1454
+ }
1455
+ function Qe() {
1456
+ return {
1457
+ transformOrigin: "50% 50%",
1458
+ animate: (e) => {
1459
+ const t = 1 - e;
1202
1460
  return {
1203
- clipPath: `inset(${r * f}% ${p * f}% ${d * f}% ${h * f}%)`,
1204
- transform: `translate(${o * f - s.x}px, ${a * f}px) scale(${1 + (c - 1) * f})`
1461
+ transform: `scale(${1 - ut * t})`
1205
1462
  };
1206
1463
  }
1207
1464
  };
1208
1465
  }
1209
- const ye = {
1466
+ const N = {
1467
+ willChange: "backdrop-filter",
1468
+ initialStyle: {
1469
+ position: "absolute",
1470
+ inset: "0",
1471
+ pointerEvents: "none",
1472
+ // Sits above the background page but below the zoomed page (z-index 9999
1473
+ // in transition.ts). backdrop-filter therefore blurs the background,
1474
+ // while the zoom tile stays sharp as it expands on top.
1475
+ zIndex: "5000",
1476
+ backdropFilter: "blur(0px)",
1477
+ WebkitBackdropFilter: "blur(0px)"
1478
+ },
1479
+ style: (e, t) => {
1480
+ const n = e === "enter" ? t : 1 - t, s = `blur(${Ke * n}px)`;
1481
+ return {
1482
+ backdropFilter: s,
1483
+ WebkitBackdropFilter: s
1484
+ };
1485
+ }
1486
+ };
1487
+ class Re {
1488
+ constructor() {
1489
+ $(this, "physics", Ge);
1490
+ }
1491
+ contribute(t) {
1492
+ const { from: n, to: s, resolved: o, physics: i } = t, r = o.mode === "enter", l = r ? n : s, c = r ? Je() : Qe();
1493
+ return c && (l.style.transformOrigin = c.transformOrigin), [
1494
+ new b({
1495
+ element: l,
1496
+ integrator: g.from(i),
1497
+ style: r ? (a, p) => c.animate(p) : (a) => c.animate(a)
1498
+ })
1499
+ ];
1500
+ }
1501
+ }
1502
+ class tn {
1503
+ prepare(t) {
1504
+ const n = t.createElement("zoom-overlay");
1505
+ return Object.assign(n.style, N.initialStyle), n.style.willChange = N.willChange, t.context.positionedParent.appendChild(n), { overlay: n };
1506
+ }
1507
+ contribute(t) {
1508
+ const n = t.extras.overlay;
1509
+ return n ? [
1510
+ new b({
1511
+ element: n,
1512
+ integrator: g.from(t.physics),
1513
+ style: (s) => N.style(t.resolved.mode, s)
1514
+ })
1515
+ ] : [];
1516
+ }
1517
+ }
1518
+ const en = {
1210
1519
  spring: { stiffness: 340, damping: 30, doubleSpring: 1 }
1211
1520
  };
1212
- function ge({
1521
+ function nn({
1213
1522
  enterRect: e,
1214
1523
  exitRect: t,
1215
1524
  scrollOffset: n
1216
1525
  }) {
1217
- const s = e.left - t.left + (e.width - t.width) / 2 + n.x, o = e.top - t.top + (e.height - t.height) / 2 + n.y, a = e.width / t.width, i = e.height / t.height, l = Math.max(a, i);
1526
+ const s = e.left - t.left + (e.width - t.width) / 2 + n.x, o = e.top - t.top + (e.height - t.height) / 2 + n.y, i = e.width / t.width, r = e.height / t.height, l = Math.max(i, r);
1218
1527
  return {
1219
1528
  transformOrigin: `${t.left + t.width / 2}px ${t.top + t.height / 2}px`,
1220
1529
  animate: (c) => {
1221
- const r = 1 - c;
1530
+ const a = 1 - c;
1222
1531
  return {
1223
- transform: `translate(${s * r - n.x}px, ${o * r}px) scale(${1 + (l - 1) * r})`,
1224
- opacity: `${1 - r}`
1532
+ transform: `translate(${s * a - n.x}px, ${o * a}px) scale(${1 + (l - 1) * a})`,
1533
+ opacity: `${1 - a}`
1225
1534
  };
1226
1535
  }
1227
1536
  };
1228
1537
  }
1229
- function we({
1538
+ function sn({
1230
1539
  enterRect: e,
1231
1540
  exitRect: t,
1232
1541
  scrollOffset: n
1233
1542
  }) {
1234
- const s = e.left - t.left + (e.width - t.width) / 2 - n.x, o = e.top - t.top + (e.height - t.height) / 2 - n.y, a = e.width / t.width, i = e.height / t.height, l = Math.max(a, i);
1543
+ const s = e.left - t.left + (e.width - t.width) / 2 - n.x, o = e.top - t.top + (e.height - t.height) / 2 - n.y, i = e.width / t.width, r = e.height / t.height, l = Math.max(i, r);
1235
1544
  return {
1236
1545
  transformOrigin: `${t.left + t.width / 2}px ${t.top + t.height / 2}px`,
1237
1546
  animate: (c) => {
1238
- const r = 1 - c;
1547
+ const a = 1 - c;
1239
1548
  return {
1240
- transform: `translate(${s * r}px, ${o * r}px) scale(${1 + (l - 1) * r})`,
1549
+ transform: `translate(${s * a}px, ${o * a}px) scale(${1 + (l - 1) * a})`,
1241
1550
  opacity: `${c}`
1242
1551
  };
1243
1552
  }
1244
1553
  };
1245
1554
  }
1246
- function be() {
1247
- return {
1248
- physics: ye,
1249
- in: it,
1250
- out: rt,
1251
- backgroundIn: we,
1252
- backgroundOut: ge
1253
- };
1555
+ class on {
1556
+ constructor() {
1557
+ $(this, "physics", en);
1558
+ }
1559
+ contribute(t) {
1560
+ const { from: n, to: s, resolved: o, input: i, physics: r } = t, l = o.mode === "enter", c = l ? n : s, a = l ? nn(i) : sn(i);
1561
+ return a && (c.style.transformOrigin = a.transformOrigin), [
1562
+ new b({
1563
+ element: c,
1564
+ integrator: g.from(r),
1565
+ style: l ? (p, d) => a.animate(d) : (p) => a.animate(p)
1566
+ })
1567
+ ];
1568
+ }
1254
1569
  }
1255
- const Se = {
1570
+ const rn = {
1256
1571
  spring: { stiffness: 420, damping: 34 }
1257
1572
  };
1258
- function Q() {
1259
- return {
1260
- transformOrigin: "",
1261
- animate: () => ({})
1262
- };
1573
+ class an {
1574
+ constructor() {
1575
+ $(this, "physics", rn);
1576
+ }
1577
+ contribute(t) {
1578
+ return [];
1579
+ }
1263
1580
  }
1264
- function $e() {
1265
- return {
1266
- physics: Se,
1267
- in: it,
1268
- out: rt,
1269
- backgroundIn: () => Q(),
1270
- backgroundOut: () => Q()
1271
- };
1581
+ const ln = {
1582
+ expand: () => new on(),
1583
+ static: () => new an(),
1584
+ blur: () => new Re()
1585
+ };
1586
+ function cn(e) {
1587
+ return ln[e]();
1588
+ }
1589
+ const W = "data-zoom-enter-key", lt = "data-zoom-exit-key", pn = "data-zoom-radius";
1590
+ function ct(e) {
1591
+ const t = e.getAttribute(pn);
1592
+ if (!t) return 0;
1593
+ const n = parseFloat(t);
1594
+ return Number.isFinite(n) && n > 0 ? n : 0;
1272
1595
  }
1273
- const xe = {
1274
- expand: be(),
1275
- static: $e()
1276
- }, X = "data-zoom-enter-key", R = "data-zoom-exit-key";
1277
- function tt(e) {
1278
- const t = e.querySelectorAll(`[${X}]`);
1596
+ function dn(e, t) {
1597
+ const n = [];
1598
+ let s = t;
1599
+ for (; s && s !== e; ) {
1600
+ const o = s.parentElement;
1601
+ if (!o) break;
1602
+ for (const i of Array.from(o.children))
1603
+ i !== s && i instanceof HTMLElement && n.push(i);
1604
+ s = o;
1605
+ }
1606
+ return n;
1607
+ }
1608
+ function pt(e) {
1609
+ const t = e.querySelectorAll(`[${W}]`);
1279
1610
  return t.length !== 1 ? null : t[0];
1280
1611
  }
1281
- function et(e, t) {
1282
- const n = e.querySelectorAll(`[${R}]`);
1612
+ function dt(e, t) {
1613
+ const n = e.querySelectorAll(`[${lt}]`);
1283
1614
  for (const s of n)
1284
- if (s.getAttribute(R) === t)
1615
+ if (s.getAttribute(lt) === t)
1285
1616
  return s;
1286
1617
  return null;
1287
1618
  }
1288
- function Ce(e, t) {
1289
- const n = tt(e), s = tt(t);
1619
+ function fn(e, t) {
1620
+ const n = pt(e), s = pt(t);
1290
1621
  if (!n && s) {
1291
- const o = s.getAttribute(X);
1622
+ const o = s.getAttribute(W);
1292
1623
  if (!o) return null;
1293
- const a = et(e, o);
1294
- return a ? { mode: "enter", enterEl: s, exitEl: a } : null;
1624
+ const i = dt(e, o);
1625
+ return i ? { mode: "enter", enterEl: s, exitEl: i } : null;
1295
1626
  }
1296
1627
  if (n && !s) {
1297
- const o = n.getAttribute(X);
1628
+ const o = n.getAttribute(W);
1298
1629
  if (!o) return null;
1299
- const a = et(t, o);
1300
- return a ? { mode: "exit", enterEl: n, exitEl: a } : null;
1630
+ const i = dt(t, o);
1631
+ return i ? { mode: "exit", enterEl: n, exitEl: i } : null;
1301
1632
  }
1302
1633
  return null;
1303
1634
  }
1304
- function Ee(e, t, n, s) {
1635
+ function hn(e, t, n, s) {
1305
1636
  return {
1306
- enterRect: O(
1637
+ enterRect: T(
1307
1638
  e.mode === "enter" ? n : t,
1308
1639
  e.enterEl
1309
1640
  ),
1310
- exitRect: O(
1641
+ exitRect: T(
1311
1642
  e.mode === "enter" ? t : n,
1312
1643
  e.exitEl
1313
1644
  ),
1314
1645
  pageRect: e.mode === "enter" ? n.getBoundingClientRect() : t.getBoundingClientRect(),
1315
- scrollOffset: s
1646
+ scrollOffset: s,
1647
+ enterRadius: ct(e.enterEl),
1648
+ exitRadius: ct(e.exitEl)
1316
1649
  };
1317
1650
  }
1318
- const Pe = (e) => {
1319
- const t = xe[e.type], n = t.physics;
1651
+ class un {
1652
+ prepare(t) {
1653
+ t.from.then((n) => {
1654
+ n.style.willChange = "transform, clip-path, opacity", n.style.backfaceVisibility = "hidden", n.style.contain = "layout paint";
1655
+ });
1656
+ }
1657
+ contribute(t) {
1658
+ const { from: n, to: s, resolved: o, input: i, physics: r, onComplete: l } = t, c = o.mode === "enter", a = c ? qe(i) : je(i), p = c ? s : n, d = c ? "t" : "u";
1659
+ a && (p.style.transformOrigin = a.transformOrigin);
1660
+ const u = p.style.zIndex;
1661
+ return p.style.zIndex = "9999", l(() => {
1662
+ p.style.willChange = "auto", p.style.backfaceVisibility = "", p.style.transformOrigin = "", p.style.contain = "", p.style.zIndex = u;
1663
+ }), [
1664
+ new b({
1665
+ element: p,
1666
+ integrator: g.from(r),
1667
+ // Enter: tile expands as `t` (0 → 1). Exit: tile shrinks as `u` —
1668
+ // the legacy convention from v5's outAnim path. Either way, feed
1669
+ // the progress that matches the tileConfig's authored direction.
1670
+ style: d === "t" ? (m) => a.animate(m) : (m, f) => a.animate(f)
1671
+ })
1672
+ ];
1673
+ }
1674
+ }
1675
+ class mn {
1676
+ contribute(t) {
1677
+ const { resolved: n, physics: s, from: o, to: i, onComplete: r } = t, l = n.mode === "enter" ? i : o, c = dn(l, n.enterEl);
1678
+ if (c.length === 0) return [];
1679
+ const a = c.map((p) => p.style.opacity);
1680
+ if (n.mode === "enter")
1681
+ for (const p of c) p.style.opacity = "0";
1682
+ return r(() => {
1683
+ for (let p = 0; p < c.length; p++) {
1684
+ const d = c[p];
1685
+ d && (d.style.opacity = a[p] ?? "");
1686
+ }
1687
+ }), c.map(
1688
+ (p) => new b({
1689
+ element: p,
1690
+ integrator: g.from(s),
1691
+ style: (d, u) => ({
1692
+ opacity: n.mode === "enter" ? d : u
1693
+ })
1694
+ })
1695
+ );
1696
+ }
1697
+ }
1698
+ class mt {
1699
+ contribute() {
1700
+ return [];
1701
+ }
1702
+ }
1703
+ const yn = {
1704
+ default: () => new mt(),
1705
+ fade: () => new mn()
1706
+ };
1707
+ function gn(e) {
1708
+ return yn[e]();
1709
+ }
1710
+ class bn extends mt {
1711
+ }
1712
+ function wn(e) {
1713
+ const t = cn(e.type);
1714
+ return { strategies: [
1715
+ new un(),
1716
+ t,
1717
+ gn(e.variant),
1718
+ new bn(),
1719
+ // Overlay is intrinsically tied to backdrop-filter-driven types. Today
1720
+ // that's only `blur`; the table-driven factory above owns the mapping
1721
+ // so this conditional is the single line that knows the relationship.
1722
+ ...e.type === "blur" ? [new tn()] : []
1723
+ ], physics: t.physics };
1724
+ }
1725
+ const Sn = (e) => {
1726
+ const { strategies: t, physics: n } = wn(e);
1320
1727
  return {
1321
- prepare: ({ from: s }) => (s.then((o) => {
1322
- o.style.willChange = "transform, clip-path, opacity", o.style.backfaceVisibility = "hidden", o.style.contain = "layout paint";
1323
- }), {}),
1324
- animation: ({ from: s, to: o, context: a }) => {
1325
- const i = Ce(s, o);
1326
- if (!i)
1327
- return new $([], { mode: "parallel" });
1328
- const l = Ee(i, s, o, a.scrollOffset), c = i.mode === "enter" ? t.in(l) : t.backgroundIn(l), r = i.mode === "enter" ? t.backgroundOut(l) : t.out(l);
1329
- c && (o.style.transformOrigin = c.transformOrigin), r && (s.style.transformOrigin = r.transformOrigin);
1330
- const p = i.mode === "enter" ? o : s, d = p.style.zIndex;
1331
- p.style.zIndex = "9999";
1332
- const h = new w({
1333
- element: s,
1334
- integrator: g.from(n),
1335
- // The provider's `animate` was authored against legacy convention
1336
- // where OUT runs `progress: 1 → 0`. Our `u` mirrors that, so feeding
1337
- // `u` keeps the visual direction (full page → shrunk to tile) intact.
1338
- style: (f, m) => r.animate(m)
1339
- }), u = new w({
1340
- element: o,
1341
- integrator: g.from(n),
1342
- style: (f) => c.animate(f),
1343
- onComplete: () => {
1344
- o.style.willChange = "auto", o.style.backfaceVisibility = "", o.style.transformOrigin = "", o.style.contain = "", p.style.zIndex = d;
1728
+ prepare: (s) => {
1729
+ const o = {
1730
+ from: s.from,
1731
+ to: s.to,
1732
+ context: { positionedParent: s.context.positionedParent },
1733
+ // `createElement` from the dispatcher is generic over tag; the
1734
+ // strategy interface narrows the cast to keep both signatures
1735
+ // compatible.
1736
+ createElement: s.createElement
1737
+ }, i = {};
1738
+ for (const r of t) {
1739
+ if (!r.prepare) continue;
1740
+ const l = r.prepare(o);
1741
+ l && Object.assign(i, l);
1742
+ }
1743
+ return i;
1744
+ },
1745
+ animation: ({ from: s, to: o, context: i, ...r }) => {
1746
+ const l = fn(s, o);
1747
+ if (!l)
1748
+ return new E([], { mode: "parallel" });
1749
+ const c = hn(l, s, o, i.scrollOffset), a = [], d = {
1750
+ from: s,
1751
+ to: o,
1752
+ resolved: l,
1753
+ input: c,
1754
+ physics: n,
1755
+ extras: r,
1756
+ onComplete: (f) => {
1757
+ a.push(f);
1345
1758
  }
1346
- });
1347
- return new $([h, u], { mode: "parallel" });
1759
+ }, u = [];
1760
+ for (const f of t)
1761
+ f.contribute && u.push(...f.contribute(d));
1762
+ const m = u[0];
1763
+ if (m) {
1764
+ const f = m.onComplete;
1765
+ m.onComplete = () => {
1766
+ f == null || f();
1767
+ for (const h of a)
1768
+ try {
1769
+ h();
1770
+ } catch (y) {
1771
+ console.error("[zoom] cleanup error", y);
1772
+ }
1773
+ };
1774
+ }
1775
+ return new E(u, { mode: "parallel" });
1348
1776
  }
1349
1777
  };
1350
1778
  };
1351
- function Ue({ paths: e, type: t }) {
1352
- return P(e, () => Pe({ type: t }));
1779
+ function $n(e) {
1780
+ const t = e.type ?? "static", n = e.variant ?? (e.fade ? "fade" : "default");
1781
+ return { type: t, variant: n };
1782
+ }
1783
+ function Yn(e) {
1784
+ const t = $n(e);
1785
+ return P(
1786
+ e.paths,
1787
+ () => Sn(t)
1788
+ );
1353
1789
  }
1354
1790
  export {
1355
- Xe as Animation,
1356
- $ as MultiAnimation,
1357
- w as WebAnimation,
1358
- Ie as blind,
1359
- Te as drill,
1360
- Ae as fade,
1361
- _e as film,
1362
- ke as hero,
1363
- ve as jaemin,
1364
- Le as rotate,
1365
- Ye as scroll,
1366
- Fe as sheet,
1367
- Me as slide,
1368
- He as strip,
1369
- Ue as zoom
1791
+ zn as Animation,
1792
+ E as MultiAnimation,
1793
+ b as WebAnimation,
1794
+ Cn as axis,
1795
+ Pn as blind,
1796
+ vn as drill,
1797
+ Tn as fade,
1798
+ Dn as film,
1799
+ _n as hero,
1800
+ An as jaemin,
1801
+ In as rotate,
1802
+ On as scroll,
1803
+ kn as sheet,
1804
+ Ln as slide,
1805
+ Fn as strip,
1806
+ Yn as zoom
1370
1807
  };