@ssgoi/core 6.4.0 → 6.5.0-beta.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 (30) hide show
  1. package/README.md +73 -125
  2. package/dist/index.cjs +13 -13
  3. package/dist/index.js +792 -717
  4. package/dist/internal.cjs +1 -1
  5. package/dist/internal.js +447 -340
  6. package/dist/ssgoi-transition/create-ssgoi-transition-context.d.ts.map +1 -1
  7. package/dist/ssgoi-transition/unmount-observer.d.ts.map +1 -1
  8. package/dist/ssgoi-transition/visibility-observer.d.ts +66 -0
  9. package/dist/ssgoi-transition/visibility-observer.d.ts.map +1 -0
  10. package/dist/transitions/axis/provider/x/fluid.d.ts.map +1 -1
  11. package/dist/transitions/axis/provider/x/snappy.d.ts.map +1 -1
  12. package/dist/transitions/axis/provider/y/directional.d.ts.map +1 -1
  13. package/dist/transitions/axis/provider/y/non-directional.d.ts.map +1 -1
  14. package/dist/transitions/axis/provider/z/directional.d.ts.map +1 -1
  15. package/dist/transitions/axis/provider/z/non-directional.d.ts.map +1 -1
  16. package/dist/transitions/axis/transition.d.ts.map +1 -1
  17. package/dist/transitions/blind/transition.d.ts +1 -0
  18. package/dist/transitions/blind/transition.d.ts.map +1 -1
  19. package/dist/transitions/drill/transition.d.ts.map +1 -1
  20. package/dist/transitions/fade/transition.d.ts.map +1 -1
  21. package/dist/transitions/film/transition.d.ts.map +1 -1
  22. package/dist/transitions/hero/provider/chrome/static.d.ts.map +1 -1
  23. package/dist/transitions/jaemin/transition.d.ts.map +1 -1
  24. package/dist/transitions/rotate/transition.d.ts.map +1 -1
  25. package/dist/transitions/scroll/transition.d.ts.map +1 -1
  26. package/dist/transitions/sheet/transition.d.ts.map +1 -1
  27. package/dist/transitions/slide/transition.d.ts.map +1 -1
  28. package/dist/transitions/strip/transition.d.ts.map +1 -1
  29. package/dist/transitions/zoom/transition.d.ts.map +1 -1
  30. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,23 +1,23 @@
1
- var Lt = Object.defineProperty;
2
- var Ht = (e, t, n) => t in e ? Lt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var b = (e, t, n) => Ht(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { P as G, V as _t, W as g, M as E, S as Mt } from "./multi-animation-CnxqLEka.js";
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 $ = (e, t, n) => Mt(e, typeof t != "symbol" ? t + "" : t, n);
4
+ import { P as G, V as _t, W as g, M as E, S as Ut } from "./multi-animation-CnxqLEka.js";
5
5
  import { A as As } from "./multi-animation-CnxqLEka.js";
6
- function T(e, t) {
6
+ function v(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 r = e[s], i = e[o];
11
- !r || !i || n.push({
12
- from: r,
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 Tt(e, t) {
20
+ function Dt(e, t) {
21
21
  return [
22
22
  {
23
23
  from: e.exit,
@@ -34,39 +34,39 @@ function Tt(e, t) {
34
34
  function J(e, t, n) {
35
35
  const s = [];
36
36
  for (let o = 0; o < e.length; o++)
37
- for (let r = o + 1; r < e.length; r++) {
38
- const i = e[o], l = e[r];
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 k {
54
+ class Y {
55
55
  constructor(t) {
56
- b(this, "omega");
56
+ $(this, "omega");
57
57
  // Angular frequency
58
- b(this, "zeta");
58
+ $(this, "zeta");
59
59
  // Damping ratio
60
- b(this, "restDelta");
61
- b(this, "restSpeed");
60
+ $(this, "restDelta");
61
+ $(this, "restSpeed");
62
62
  const { stiffness: n, damping: s } = t, o = 1;
63
63
  this.omega = Math.sqrt(n / o), this.zeta = s / (2 * Math.sqrt(n * o)), this.restDelta = t.restDelta ?? G, this.restSpeed = t.restSpeed ?? _t;
64
64
  }
65
65
  step(t, n, s) {
66
- const o = Math.min(s, 0.033), { omega: r, zeta: i } = this, { position: l, velocity: c } = t, a = -2 * o * i * r * c, p = o * r * r * (n - l), f = c + a + 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
- position: l + o * f,
69
- velocity: f
68
+ position: l + o * d,
69
+ velocity: d
70
70
  };
71
71
  }
72
72
  isSettled(t, n) {
@@ -74,39 +74,39 @@ class k {
74
74
  return s < this.restDelta && o < this.restSpeed;
75
75
  }
76
76
  }
77
- class Ut {
77
+ class Vt {
78
78
  constructor(t) {
79
- b(this, "leader");
80
- b(this, "follower");
81
- b(this, "restDelta");
82
- b(this, "restSpeed");
83
- this.restDelta = t.restDelta ?? G, this.restSpeed = t.restSpeed ?? _t, this.leader = new k({
79
+ $(this, "leader");
80
+ $(this, "follower");
81
+ $(this, "restDelta");
82
+ $(this, "restSpeed");
83
+ this.restDelta = t.restDelta ?? G, this.restSpeed = t.restSpeed ?? _t, this.leader = new Y({
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, r;
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, r = t.follower.restSpeed) : (n = t.stiffness, s = t.damping), this.follower = new k({
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 Y({
91
91
  stiffness: n,
92
92
  damping: s,
93
93
  restDelta: o ?? this.restDelta,
94
- restSpeed: r ?? this.restSpeed
94
+ restSpeed: i ?? this.restSpeed
95
95
  });
96
96
  }
97
97
  step(t, n, s) {
98
- const r = t._leader ?? {
98
+ const i = t._leader ?? {
99
99
  position: t.position,
100
100
  velocity: t.velocity
101
- }, i = this.leader.step(r, 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,46 +114,46 @@ class Ut {
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 Nt = 0.01, zt = 500, Xt = 10;
117
+ const zt = 0.01, Nt = 500, Xt = 10;
118
118
  class Rt {
119
119
  constructor(t) {
120
- b(this, "acceleration");
121
- b(this, "resistance");
122
- b(this, "resistanceType");
123
- b(this, "min");
124
- b(this, "max");
125
- b(this, "bounceStiffness");
126
- b(this, "bounceDamping");
127
- b(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 ?? zt, this.bounceDamping = t.bounceDamping ?? Xt, this.restDelta = t.restDelta ?? Nt;
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 ?? Nt, this.bounceDamping = t.bounceDamping ?? Xt, this.restDelta = t.restDelta ?? zt;
129
129
  }
130
130
  step(t, n, s) {
131
- const o = Math.min(s, 0.033), { acceleration: r, resistance: i, resistanceType: l, min: c, max: a } = this, { position: p, velocity: f } = t, d = c !== void 0 && p < c, m = a !== void 0 && p > a;
132
- let h;
133
- if (d || m) {
134
- const S = p - (d ? c : a), x = -this.bounceStiffness * S, C = -this.bounceDamping * f;
135
- h = x + C;
131
+ const o = Math.min(s, 0.033), { acceleration: i, resistance: r, resistanceType: l, min: c, max: a } = this, { position: p, velocity: d } = t, f = c !== void 0 && p < c, u = a !== void 0 && p > a;
132
+ let y;
133
+ if (f || u) {
134
+ const b = p - (f ? c : a), x = -this.bounceStiffness * b, C = -this.bounceDamping * d;
135
+ y = x + C;
136
136
  } else {
137
- const $ = n > p ? 1 : -1;
138
- let S;
139
- l === "linear" ? S = i * f : S = i * f * Math.abs(f), h = $ * r - S;
137
+ const S = n > p ? 1 : -1;
138
+ let b;
139
+ l === "linear" ? b = r * d : b = r * d * Math.abs(d), y = S * i - b;
140
140
  }
141
- const u = f + h * o;
142
- let w = p + u * o;
143
- if (!d && !m) {
144
- const $ = n > p ? 1 : -1;
145
- ($ > 0 && w > n || $ < 0 && w < n) && (w = n);
141
+ const h = d + y * o;
142
+ let w = p + h * o;
143
+ if (!f && !u) {
144
+ const S = n > p ? 1 : -1;
145
+ (S > 0 && w > n || S < 0 && w < n) && (w = n);
146
146
  }
147
147
  return {
148
148
  position: w,
149
- velocity: w === n ? 0 : u
149
+ velocity: w === n ? 0 : h
150
150
  };
151
151
  }
152
152
  isSettled(t, n) {
153
153
  return Math.abs(n - t.position) < this.restDelta;
154
154
  }
155
155
  }
156
- class y {
156
+ class m {
157
157
  /**
158
158
  * Create an Integrator from physics config
159
159
  *
@@ -184,7 +184,7 @@ class y {
184
184
  return typeof s == "number" ? o = s : typeof s == "object" && (o = {
185
185
  stiffness: s.stiffness,
186
186
  damping: s.damping
187
- }), new Ut({
187
+ }), new Vt({
188
188
  stiffness: n.stiffness,
189
189
  damping: n.damping,
190
190
  follower: o,
@@ -192,7 +192,7 @@ class y {
192
192
  restSpeed: n.restSpeed
193
193
  });
194
194
  }
195
- return new k({
195
+ return new Y({
196
196
  stiffness: n.stiffness,
197
197
  damping: n.damping,
198
198
  restDelta: n.restDelta,
@@ -204,32 +204,32 @@ class y {
204
204
  * @deprecated Use from({ spring: config }) instead
205
205
  */
206
206
  static fromSpring(t) {
207
- return y.from({ spring: t });
207
+ return m.from({ spring: t });
208
208
  }
209
209
  }
210
- class Vt {
210
+ class Bt {
211
211
  constructor(t) {
212
- b(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 r = Math.sign(o), i = Math.abs(o) / this.durationSec, l = r * i * s, c = t.position + l;
219
- return (r > 0 ? c >= n : c <= n) ? { position: n, velocity: 0 } : { position: c, velocity: r * 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
222
  return Math.abs(t.position - n) < G;
223
223
  }
224
224
  }
225
- function O(e, t) {
226
- function n(r) {
227
- let i = 0, l = 0;
228
- const c = r.offsetWidth, a = r.offsetHeight;
229
- let p = r;
225
+ function A(e, t) {
226
+ function n(i) {
227
+ let r = 0, l = 0;
228
+ const c = i.offsetWidth, a = i.offsetHeight;
229
+ let p = i;
230
230
  for (; p; )
231
- i += p.offsetTop, l += p.offsetLeft, p = p.offsetParent;
232
- return i -= window.scrollY, l -= window.scrollX, { top: i, left: l, width: c, height: a };
231
+ r += p.offsetTop, l += p.offsetLeft, p = p.offsetParent;
232
+ return r -= window.scrollY, l -= window.scrollX, { top: r, left: l, width: c, height: a };
233
233
  }
234
234
  const s = n(e), o = n(t);
235
235
  return new DOMRect(
@@ -239,8 +239,8 @@ function O(e, t) {
239
239
  o.height
240
240
  );
241
241
  }
242
- function D(e, t) {
243
- const { scrollingElement: n, positionedParent: s } = e, o = n !== s && n.contains(s) ? O(n, s).top : 0;
242
+ function I(e, t) {
243
+ const { scrollingElement: n, positionedParent: s } = e, o = n !== s && n.contains(s) ? A(n, s).top : 0;
244
244
  return {
245
245
  top: e[t].scroll.y,
246
246
  left: 0,
@@ -249,9 +249,15 @@ function D(e, t) {
249
249
  };
250
250
  }
251
251
  const tt = 8, et = {
252
- spring: { stiffness: 1e3, damping: 40, doubleSpring: 1.2 }
252
+ spring: {
253
+ stiffness: 1e3,
254
+ damping: 40,
255
+ doubleSpring: 1.2,
256
+ restDelta: 0.1,
257
+ restSpeed: 0.1
258
+ }
253
259
  };
254
- function Bt({
260
+ function Wt({
255
261
  direction: e
256
262
  }) {
257
263
  const t = e === "forward" ? tt : -tt;
@@ -276,22 +282,22 @@ function Bt({
276
282
  }
277
283
  };
278
284
  }
279
- function Wt() {
285
+ function Zt() {
280
286
  return {
281
287
  outPhysics: et,
282
288
  inPhysics: et,
283
289
  // Both sides run together — the cross-fade is the whole point of the
284
290
  // snappy feel. (fluid's sibling uses staggered fade-through.)
285
291
  composition: { mode: "parallel", startAt: [0, 0] },
286
- build: Bt
292
+ build: Wt
287
293
  };
288
294
  }
289
- const nt = 30, Zt = {
290
- inertia: { acceleration: 150, resistance: 1.5 }
291
- }, qt = {
292
- spring: { stiffness: 180, damping: 34 }
295
+ const nt = 30, qt = {
296
+ inertia: { acceleration: 150, resistance: 1.5, restDelta: 0.1 }
297
+ }, jt = {
298
+ spring: { stiffness: 180, damping: 34, restDelta: 0.1, restSpeed: 0.1 }
293
299
  };
294
- function jt({
300
+ function Kt({
295
301
  direction: e
296
302
  }) {
297
303
  const t = e === "forward" ? 1 : -1, n = -nt * t, s = nt * t;
@@ -317,26 +323,26 @@ function jt({
317
323
  }
318
324
  };
319
325
  }
320
- function Kt() {
326
+ function Gt() {
321
327
  return {
322
- outPhysics: Zt,
323
- inPhysics: qt,
328
+ outPhysics: qt,
329
+ inPhysics: jt,
324
330
  // Phased motion: outgoing falls away first under inertia, then incoming
325
331
  // springs in. The fade-through shape comes from the integrator curves
326
332
  // plus the sequence handoff, not from FADE_SPLIT inside animate(t).
327
333
  composition: { mode: "sequence" },
328
- build: jt
334
+ build: Kt
329
335
  };
330
336
  }
331
- const Gt = {
332
- snappy: Wt(),
333
- fluid: Kt()
334
- }, st = 8, Jt = {
335
- inertia: { acceleration: 150, resistance: 1.5 }
336
- }, Qt = {
337
- spring: { stiffness: 180, damping: 34 }
337
+ const Jt = {
338
+ snappy: Zt(),
339
+ fluid: Gt()
340
+ }, st = 8, Qt = {
341
+ inertia: { acceleration: 150, resistance: 1.5, restDelta: 0.1 }
342
+ }, te = {
343
+ spring: { stiffness: 180, damping: 34, restDelta: 0.1, restSpeed: 0.1 }
338
344
  };
339
- function te({
345
+ function ee({
340
346
  direction: e
341
347
  }) {
342
348
  const t = e === "forward" ? 1 : -1, n = -st * t, s = st * t;
@@ -362,21 +368,21 @@ function te({
362
368
  }
363
369
  };
364
370
  }
365
- function ee() {
371
+ function ne() {
366
372
  return {
367
- outPhysics: Jt,
368
- inPhysics: Qt,
373
+ outPhysics: Qt,
374
+ inPhysics: te,
369
375
  composition: { mode: "sequence" },
370
- build: te
376
+ build: ee
371
377
  };
372
378
  }
373
- const ne = 8, se = {
374
- inertia: { acceleration: 150, resistance: 1.5 }
375
- }, oe = {
376
- spring: { stiffness: 180, damping: 34 }
379
+ const se = 8, oe = {
380
+ inertia: { acceleration: 150, resistance: 1.5, restDelta: 0.1 }
381
+ }, ie = {
382
+ spring: { stiffness: 180, damping: 34, restDelta: 0.1, restSpeed: 0.1 }
377
383
  };
378
384
  function re(e) {
379
- const t = ne;
385
+ const t = se;
380
386
  return {
381
387
  out: {
382
388
  willChange: "opacity",
@@ -398,22 +404,22 @@ function re(e) {
398
404
  }
399
405
  };
400
406
  }
401
- function ie() {
407
+ function ae() {
402
408
  return {
403
- outPhysics: se,
404
- inPhysics: oe,
409
+ outPhysics: oe,
410
+ inPhysics: ie,
405
411
  composition: { mode: "sequence" },
406
412
  build: re
407
413
  };
408
414
  }
409
- const ot = ee(), ae = {
415
+ const ot = ne(), le = {
410
416
  snappy: ot,
411
417
  directional: ot,
412
- "non-directional": ie()
413
- }, rt = {
414
- spring: { stiffness: 280, damping: 30 }
415
- }, U = 0.1, N = 1 / 3, it = (e) => Math.max(0, Math.min(1, e));
416
- function le({
418
+ "non-directional": ae()
419
+ }, it = {
420
+ spring: { stiffness: 280, damping: 30, restDelta: 0.1, restSpeed: 0.1 }
421
+ }, U = 0.1, V = 1 / 3, rt = (e) => Math.max(0, Math.min(1, e));
422
+ function ce({
417
423
  direction: e
418
424
  }) {
419
425
  const t = e === "forward" ? 1 : -1, n = 1 - t * U;
@@ -423,7 +429,7 @@ function le({
423
429
  startStyle: {},
424
430
  animate: (s) => ({
425
431
  transform: `scale(${1 + t * s * U})`,
426
- opacity: `${it(1 - s / N)}`
432
+ opacity: `${rt(1 - s / V)}`
427
433
  })
428
434
  },
429
435
  in: {
@@ -434,31 +440,31 @@ function le({
434
440
  },
435
441
  animate: (s) => ({
436
442
  transform: `scale(${n + t * s * U})`,
437
- opacity: `${it((s - N) / (1 - N))}`
443
+ opacity: `${rt((s - V) / (1 - V))}`
438
444
  })
439
445
  }
440
446
  };
441
447
  }
442
- function ce() {
448
+ function pe() {
443
449
  return {
444
- outPhysics: rt,
445
- inPhysics: rt,
450
+ outPhysics: it,
451
+ inPhysics: it,
446
452
  // Scale must move together on both sides; fade-through is encoded inside
447
453
  // each tick (piecewise), not via composition staggering — so parallel.
448
454
  composition: { mode: "parallel" },
449
- build: le
455
+ build: ce
450
456
  };
451
457
  }
452
458
  const at = {
453
- spring: { stiffness: 280, damping: 30 }
454
- }, z = 0.1, X = 1 / 3, lt = (e) => Math.max(0, Math.min(1, e));
455
- function pe() {
459
+ spring: { stiffness: 280, damping: 30, restDelta: 0.1, restSpeed: 0.1 }
460
+ }, z = 0.1, N = 1 / 3, lt = (e) => Math.max(0, Math.min(1, e));
461
+ function de() {
456
462
  return {
457
463
  out: {
458
464
  willChange: "opacity",
459
465
  startStyle: {},
460
466
  animate: (e) => ({
461
- opacity: `${lt(1 - e / X)}`
467
+ opacity: `${lt(1 - e / N)}`
462
468
  })
463
469
  },
464
470
  in: {
@@ -469,7 +475,7 @@ function pe() {
469
475
  },
470
476
  animate: (e) => ({
471
477
  transform: `scale(${1 - z + e * z})`,
472
- opacity: `${lt((e - X) / (1 - X))}`
478
+ opacity: `${lt((e - N) / (1 - N))}`
473
479
  })
474
480
  }
475
481
  };
@@ -479,76 +485,81 @@ function fe() {
479
485
  outPhysics: at,
480
486
  inPhysics: at,
481
487
  composition: { mode: "parallel" },
482
- build: pe
488
+ build: de
483
489
  };
484
490
  }
485
- const ct = ce(), de = {
491
+ const ct = pe(), ye = {
486
492
  snappy: ct,
487
493
  directional: ct,
488
494
  "non-directional": fe()
489
495
  }, he = {
490
- x: Gt,
491
- y: ae,
492
- z: de
496
+ x: Jt,
497
+ y: le,
498
+ z: ye
493
499
  };
494
500
  function ue(e, t) {
495
501
  const n = he[e];
496
502
  return n[t] ?? n.snappy;
497
503
  }
498
- const me = "x", ye = "snappy";
504
+ const me = "x", ge = "snappy";
499
505
  function pt(e, t) {
500
506
  e.style.willChange = t.willChange, e.style.backfaceVisibility = "hidden", e.style.contain = "layout paint";
501
507
  for (const [n, s] of Object.entries(t.startStyle))
502
508
  e.style[n] = s;
503
509
  }
504
- function ge(e) {
510
+ function vt(e) {
505
511
  e.style.willChange = "auto", e.style.backfaceVisibility = "", e.style.contain = "", e.style.transform = "", e.style.opacity = "", e.style.clipPath = "";
506
512
  }
507
- const we = (e = {}) => {
508
- const t = e.direction ?? "forward", n = e.type ?? me, s = e.feel ?? ye, o = ue(n, s), r = o.build({ direction: t });
513
+ function we(e) {
514
+ vt(e), e.style.pointerEvents = "";
515
+ }
516
+ const Se = (e = {}) => {
517
+ const t = e.direction ?? "forward", n = e.type ?? me, s = e.feel ?? ge, o = ue(n, s), i = o.build({ direction: t });
509
518
  return {
510
- prepare: ({ from: i, to: l }) => (i.then((c) => {
511
- pt(c, r.out), c.style.pointerEvents = "none";
519
+ prepare: ({ from: r, to: l }) => (r.then((c) => {
520
+ pt(c, i.out), c.style.pointerEvents = "none";
512
521
  }), l.then((c) => {
513
- pt(c, r.in);
522
+ pt(c, i.in);
514
523
  }), {}),
515
- animation: ({ from: i, to: l, context: c }) => {
524
+ animation: ({ from: r, to: l, context: c }) => {
516
525
  if (n === "z") {
517
- const f = D(c, "from"), d = D(c, "to");
518
- i.style.clipPath = `inset(${f.top}px 0 calc(100% - ${f.top + f.height}px) 0)`, l.style.clipPath = `inset(${d.top}px 0 calc(100% - ${d.top + d.height}px) 0)`;
526
+ const d = I(c, "from"), f = I(c, "to");
527
+ r.style.clipPath = `inset(${d.top}px 0 calc(100% - ${d.top + d.height}px) 0)`, l.style.clipPath = `inset(${f.top}px 0 calc(100% - ${f.top + f.height}px) 0)`;
519
528
  }
520
529
  const a = new g({
521
- element: i,
522
- integrator: y.from(o.outPhysics),
523
- style: (f) => r.out.animate(f),
524
- onComplete: n === "z" ? () => {
525
- i.style.clipPath = "";
526
- } : void 0
530
+ element: r,
531
+ integrator: m.from(o.outPhysics),
532
+ style: (d) => i.out.animate(d),
533
+ // Restore the reused from node's inline styles on complete. This
534
+ // covers willChange/backfaceVisibility/contain/transform/opacity (from
535
+ // applyStartStyle + the WAAPI final frame), pointerEvents (set in
536
+ // prepare), and clipPath (set above for z; harmless no-op otherwise).
537
+ onComplete: () => we(r)
527
538
  }), p = new g({
528
539
  element: l,
529
- integrator: y.from(o.inPhysics),
530
- style: (f) => r.in.animate(f),
531
- onComplete: () => ge(l)
540
+ integrator: m.from(o.inPhysics),
541
+ style: (d) => i.in.animate(d),
542
+ onComplete: () => vt(l)
532
543
  });
533
544
  return new E([a, p], o.composition);
534
545
  }
535
546
  };
536
547
  };
537
- function Se(e, t, n) {
548
+ function be(e, t, n) {
538
549
  return e === "y" ? t === "non-directional" ? "non-directional" : "directional" : e !== "x" || t === "snappy" || n === "snappy" ? "snappy" : "fluid";
539
550
  }
540
- function ys(e) {
541
- const { paths: t } = e, n = e.type ?? "x", s = e.variant, o = e.feel, r = Se(n, s, o);
551
+ function gs(e) {
552
+ const { paths: t } = e, n = e.type ?? "x", s = e.variant, o = e.feel, i = be(n, s, o);
542
553
  return J(
543
554
  t,
544
555
  { forward: "forward", backward: "backward" },
545
- (i) => we({ type: n, direction: i, feel: r })
556
+ (r) => Se({ type: n, direction: r, feel: i })
546
557
  );
547
558
  }
548
- const be = {
559
+ const $e = {
549
560
  spring: { stiffness: 200, damping: 22 }
550
- }, $e = 10, Ee = "horizontal", xe = "#000000";
551
- function ft(e, t, n, s, o, r) {
561
+ }, Ee = 10, Ce = "horizontal", xe = "#000000";
562
+ function dt(e, t, n, s, o, i) {
552
563
  window.getComputedStyle(e).position === "static" && (e.style.position = "relative");
553
564
  const l = document.createElement("div");
554
565
  l.style.cssText = `
@@ -565,29 +576,29 @@ function ft(e, t, n, s, o, r) {
565
576
  for (let a = 0; a < t; a++) {
566
577
  const p = document.createElement("div");
567
578
  if (n === "horizontal") {
568
- const f = 100 / t;
579
+ const d = 100 / t;
569
580
  p.style.cssText = `
570
581
  position: absolute;
571
- top: ${f * a}%;
582
+ top: ${d * a}%;
572
583
  left: 0;
573
584
  width: 100%;
574
- height: calc(${f}% + 1px);
585
+ height: calc(${d}% + 1px);
575
586
  background: ${s};
576
587
  transform: scaleX(${o === "hidden" ? 0 : 1});
577
- transform-origin: ${r} center;
588
+ transform-origin: ${i} center;
578
589
  will-change: transform;
579
590
  `;
580
591
  } else {
581
- const f = 100 / t;
592
+ const d = 100 / t;
582
593
  p.style.cssText = `
583
594
  position: absolute;
584
595
  top: 0;
585
- left: ${f * a}%;
586
- width: calc(${f}% + 1px);
596
+ left: ${d * a}%;
597
+ width: calc(${d}% + 1px);
587
598
  height: 100%;
588
599
  background: ${s};
589
600
  transform: scaleY(${o === "hidden" ? 0 : 1});
590
- transform-origin: ${r === "left" ? "top" : "bottom"} center;
601
+ transform-origin: ${i === "left" ? "top" : "bottom"} center;
591
602
  will-change: transform;
592
603
  `;
593
604
  }
@@ -595,13 +606,13 @@ function ft(e, t, n, s, o, r) {
595
606
  }
596
607
  return e.appendChild(l), { container: l, blinds: c };
597
608
  }
598
- const Ce = (e = {}) => {
599
- const t = e.blindCount ?? $e, n = e.direction ?? Ee, s = e.blindColor ?? xe, o = e.physics ?? be;
609
+ const Pe = (e = {}) => {
610
+ const t = e.blindCount ?? Ee, n = e.direction ?? Ce, s = e.blindColor ?? xe, o = e.physics ?? $e;
600
611
  return {
601
- prepare: async ({ from: r, to: i }) => {
602
- const l = await r, c = await i;
612
+ prepare: async ({ from: i, to: r }) => {
613
+ const l = await i, c = await r;
603
614
  l.style.zIndex = "1000";
604
- const a = ft(
615
+ const a = dt(
605
616
  l,
606
617
  t,
607
618
  n,
@@ -610,7 +621,7 @@ const Ce = (e = {}) => {
610
621
  "left"
611
622
  );
612
623
  c.style.position = "relative", c.style.zIndex = "0";
613
- const p = ft(
624
+ const p = dt(
614
625
  c,
615
626
  t,
616
627
  n,
@@ -619,48 +630,55 @@ const Ce = (e = {}) => {
619
630
  "right"
620
631
  );
621
632
  return {
633
+ fromEl: l,
622
634
  fromBlinds: a.blinds,
623
635
  fromContainer: a.container,
624
636
  toBlinds: p.blinds,
625
637
  toContainer: p.container
626
638
  };
627
639
  },
628
- animation: ({ fromBlinds: r, fromContainer: i, toBlinds: l, toContainer: c }) => {
629
- const a = r.map(
630
- (m) => new g({
631
- element: m,
632
- integrator: y.from(o),
640
+ animation: ({
641
+ fromEl: i,
642
+ fromBlinds: r,
643
+ fromContainer: l,
644
+ toBlinds: c,
645
+ toContainer: a
646
+ }) => {
647
+ const p = r.map(
648
+ (y) => new g({
649
+ element: y,
650
+ integrator: m.from(o),
633
651
  style: (h) => ({
634
652
  transform: n === "horizontal" ? `scaleX(${h})` : `scaleY(${h})`
635
653
  })
636
654
  })
637
- ), p = l.map(
638
- (m, h) => new g({
639
- element: m,
640
- integrator: y.from(o),
641
- style: (u, w) => ({
642
- transform: n === "horizontal" ? `scaleX(${w})` : `scaleY(${w})`
655
+ ), d = c.map(
656
+ (y, h) => new g({
657
+ element: y,
658
+ integrator: m.from(o),
659
+ style: (w, S) => ({
660
+ transform: n === "horizontal" ? `scaleX(${S})` : `scaleY(${S})`
643
661
  }),
644
- onComplete: h === l.length - 1 ? () => {
645
- c.remove(), i.remove();
662
+ onComplete: h === c.length - 1 ? () => {
663
+ a.remove(), l.remove(), i.style.zIndex = "", i.style.position = "";
646
664
  } : void 0
647
665
  })
648
- ), f = new E(a, { mode: "parallel" }), d = new E(p, { mode: "parallel" });
649
- return new E([f, d], { mode: "sequence" });
666
+ ), f = new E(p, { mode: "parallel" }), u = new E(d, { mode: "parallel" });
667
+ return new E([f, u], { mode: "sequence" });
650
668
  }
651
669
  };
652
670
  };
653
- function gs(e) {
671
+ function ws(e) {
654
672
  const { paths: t, type: n = "horizontal" } = e;
655
- return T(
673
+ return v(
656
674
  t,
657
- () => Ce({ direction: n })
675
+ () => Pe({ direction: n })
658
676
  );
659
677
  }
660
- const Pe = {
678
+ const _e = {
661
679
  spring: { stiffness: 200, damping: 20, doubleSpring: 0.7 }
662
- }, A = 0.5;
663
- function _e(e) {
680
+ }, O = 0.5;
681
+ function De(e) {
664
682
  const t = e === "enter" ? -100 : 100, n = e === "enter" ? 100 : -100;
665
683
  return {
666
684
  out: {
@@ -668,32 +686,32 @@ function _e(e) {
668
686
  startStyle: {},
669
687
  animate: (s) => ({
670
688
  transform: `translate3d(${t * s}%, 0, 0)`,
671
- opacity: `${A + (1 - A) * (1 - s)}`
689
+ opacity: `${O + (1 - O) * (1 - s)}`
672
690
  })
673
691
  },
674
692
  in: {
675
693
  willChange: "transform, opacity",
676
694
  startStyle: {
677
695
  transform: `translate3d(${n}%, 0, 0)`,
678
- opacity: `${A}`
696
+ opacity: `${O}`
679
697
  },
680
698
  animate: (s) => ({
681
699
  transform: `translate3d(${n * (1 - s)}%, 0, 0)`,
682
- opacity: `${A + (1 - A) * s}`
700
+ opacity: `${O + (1 - O) * s}`
683
701
  })
684
702
  }
685
703
  };
686
704
  }
687
- function Te() {
705
+ function ve() {
688
706
  return {
689
- physics: Pe,
690
- build: _e
707
+ physics: _e,
708
+ build: De
691
709
  };
692
710
  }
693
- const De = {
711
+ const Ie = {
694
712
  spring: { stiffness: 170, damping: 22 }
695
713
  };
696
- function ve(e) {
714
+ function Te(e) {
697
715
  const t = e === "enter" ? -20 : 100, n = e === "enter" ? 100 : -20;
698
716
  return {
699
717
  out: {
@@ -714,40 +732,46 @@ function ve(e) {
714
732
  }
715
733
  };
716
734
  }
717
- function Ie() {
735
+ function Oe() {
718
736
  return {
719
- physics: De,
720
- build: ve
737
+ physics: Ie,
738
+ build: Te
721
739
  };
722
740
  }
723
741
  const Ae = {
724
- parallax: Ie(),
725
- crossfade: Te()
726
- }, Oe = "parallax";
727
- function dt(e, t) {
742
+ parallax: Oe(),
743
+ crossfade: ve()
744
+ }, Fe = "parallax";
745
+ function ft(e, t) {
728
746
  e.style.willChange = t.willChange, e.style.backfaceVisibility = "hidden", e.style.contain = "layout paint";
729
747
  for (const [n, s] of Object.entries(t.startStyle))
730
748
  e.style[n] = s;
731
749
  }
732
- const Fe = (e = {}) => {
733
- const t = e.direction ?? "enter", n = Ae[e.type ?? Oe], s = n.physics, o = n.build(t);
750
+ const ke = (e = {}) => {
751
+ const t = e.direction ?? "enter", n = Ae[e.type ?? Fe], s = n.physics, o = n.build(t);
734
752
  return {
735
- prepare: ({ from: r, to: i }) => (r.then((l) => {
736
- dt(l, o.out), l.style.pointerEvents = "none", l.style.zIndex = t === "enter" ? "-1" : "100";
737
- }), i.then((l) => {
738
- dt(l, o.in);
753
+ prepare: ({ from: i, to: r }) => (i.then((l) => {
754
+ ft(l, o.out), l.style.pointerEvents = "none", l.style.zIndex = t === "enter" ? "-1" : "100";
755
+ }), r.then((l) => {
756
+ ft(l, o.in);
739
757
  }), {}),
740
- animation: ({ from: r, to: i }) => {
758
+ animation: ({ from: i, to: r }) => {
741
759
  const l = new g({
742
- element: r,
743
- integrator: y.from(s),
744
- style: (a) => o.out.animate(a)
745
- }), c = new g({
746
760
  element: i,
747
- integrator: y.from(s),
761
+ integrator: m.from(s),
762
+ style: (a) => o.out.animate(a),
763
+ // The outgoing node is the real, reused element (re-hidden on navigate),
764
+ // so clear every inline style we set on it — mirroring the `to` cleanup,
765
+ // plus the out-only `pointerEvents` / `zIndex`.
766
+ onComplete: () => {
767
+ i.style.willChange = "auto", i.style.backfaceVisibility = "", i.style.contain = "", i.style.transform = "", i.style.opacity = "", i.style.pointerEvents = "", i.style.zIndex = "";
768
+ }
769
+ }), c = new g({
770
+ element: r,
771
+ integrator: m.from(s),
748
772
  style: (a) => o.in.animate(a),
749
773
  onComplete: () => {
750
- i.style.willChange = "auto", i.style.backfaceVisibility = "", i.style.contain = "", i.style.transform = "", i.style.opacity = "";
774
+ r.style.willChange = "auto", r.style.backfaceVisibility = "", r.style.contain = "", r.style.transform = "", r.style.opacity = "";
751
775
  }
752
776
  });
753
777
  return new E([l, c], { mode: "parallel" });
@@ -757,62 +781,62 @@ const Fe = (e = {}) => {
757
781
  function Ye(e) {
758
782
  return e === "slide" || e === "crossfade" ? "crossfade" : "parallax";
759
783
  }
760
- function ws(e) {
784
+ function Ss(e) {
761
785
  const { enter: t, exit: n } = e, s = e.type, o = Ye(s);
762
- return Tt(
786
+ return Dt(
763
787
  { enter: t, exit: n },
764
- (r) => Fe({ direction: r, type: o })
788
+ (i) => ke({ direction: i, type: o })
765
789
  );
766
790
  }
767
- const ke = {
791
+ const Le = {
768
792
  spring: { stiffness: 180, damping: 20, doubleSpring: !0 }
769
- }, Le = {
793
+ }, He = {
770
794
  spring: { stiffness: 170, damping: 20, doubleSpring: !0 }
771
- }, He = (e = {}) => {
772
- const t = e.physics ?? Le, n = e.physics ?? ke;
795
+ }, Me = (e = {}) => {
796
+ const t = e.physics ?? He, n = e.physics ?? Le;
773
797
  return {
774
798
  prepare: ({ to: s }) => (s.then((o) => {
775
799
  o.style.opacity = "0", o.style.willChange = "opacity";
776
800
  }), {}),
777
801
  animation: ({ from: s, to: o }) => {
778
- const r = new g({
802
+ const i = new g({
779
803
  element: s,
780
- integrator: y.from(n),
804
+ integrator: m.from(n),
781
805
  // Default bounds (0, 1). `u` runs 1→0 as the animation moves
782
806
  // forward, mapping opacity from fully visible to invisible.
783
807
  style: (l, c) => ({ opacity: c }),
784
808
  onComplete: () => {
785
- s.style.willChange = "auto";
809
+ s.style.willChange = "auto", s.style.opacity = "";
786
810
  }
787
- }), i = new g({
811
+ }), r = new g({
788
812
  element: o,
789
- integrator: y.from(t),
813
+ integrator: m.from(t),
790
814
  style: (l) => ({ opacity: l }),
791
815
  onComplete: () => {
792
816
  o.style.willChange = "auto", o.style.opacity = "";
793
817
  }
794
818
  });
795
- return new E([r, i], { mode: "sequence" });
819
+ return new E([i, r], { mode: "sequence" });
796
820
  }
797
821
  };
798
822
  };
799
- function Ss(e) {
823
+ function bs(e) {
800
824
  const { paths: t } = e;
801
- return T(t, () => He());
825
+ return v(t, () => Me());
802
826
  }
803
- const R = {
827
+ const X = {
804
828
  scaleDown: { stiffness: 20, damping: 7 },
805
829
  translate: { stiffness: 15, damping: 7 },
806
830
  scaleUp: { stiffness: 20, damping: 7 }
807
- }, I = {
831
+ }, T = {
808
832
  scaleDown: 0,
809
833
  translate: 0.2,
810
834
  scaleUp: 0.8
811
- }, Me = 0.8, Ue = "white", ht = 1e3 / 60, Ne = 600;
812
- function ze(e) {
813
- const { items: t, from: n, to: s, recordFrame: o } = e, r = ht / 1e3, i = Math.abs(s - n), l = t.map((a) => ({
835
+ }, Ue = 0.8, Ve = "white", yt = 1e3 / 60, ze = 600;
836
+ function Ne(e) {
837
+ const { items: t, from: n, to: s, recordFrame: o } = e, i = yt / 1e3, r = Math.abs(s - n), l = t.map((a) => ({
814
838
  item: a,
815
- integrator: new k({
839
+ integrator: new Y({
816
840
  stiffness: a.spring.stiffness,
817
841
  damping: a.spring.damping
818
842
  }),
@@ -825,87 +849,87 @@ function ze(e) {
825
849
  (a === 0 || l[a].item.offset === 0) && (l[a].started = !0);
826
850
  o(0);
827
851
  let c = 0;
828
- for (let a = 1; a <= Ne; a++) {
829
- const p = a * ht;
852
+ for (let a = 1; a <= ze; a++) {
853
+ const p = a * yt;
830
854
  c = p;
831
- for (const f of l)
832
- !f.started || f.settled || (f.state = f.integrator.step(f.state, s, r), f.integrator.isSettled(f.state, s) ? (f.settleTime += r, f.settleTime >= Mt && (f.state = { position: s, velocity: 0 }, f.settled = !0)) : f.settleTime = 0, f.item.tick(f.state.position));
833
- for (let f = 1; f < l.length; f++) {
834
- const d = l[f];
835
- if (d.started) continue;
836
- const m = l[f - 1];
837
- if (!m.started) continue;
838
- (i === 0 ? 1 : Math.abs(m.state.position - n) / i) >= d.item.offset && (d.started = !0);
855
+ for (const d of l)
856
+ !d.started || d.settled || (d.state = d.integrator.step(d.state, s, i), d.integrator.isSettled(d.state, s) ? (d.settleTime += i, d.settleTime >= Ut && (d.state = { position: s, velocity: 0 }, d.settled = !0)) : d.settleTime = 0, d.item.tick(d.state.position));
857
+ for (let d = 1; d < l.length; d++) {
858
+ const f = l[d];
859
+ if (f.started) continue;
860
+ const u = l[d - 1];
861
+ if (!u.started) continue;
862
+ (r === 0 ? 1 : Math.abs(u.state.position - n) / r) >= f.item.offset && (f.started = !0);
839
863
  }
840
- if (o(p), l.every((f) => f.settled)) return p;
864
+ if (o(p), l.every((d) => d.settled)) return p;
841
865
  }
842
866
  return c;
843
867
  }
844
- function V(e, t) {
868
+ function R(e, t) {
845
869
  return e != null && e.spring ? {
846
870
  stiffness: e.spring.stiffness,
847
871
  damping: e.spring.damping
848
872
  } : t;
849
873
  }
850
- function ut(e) {
851
- const { rect: t, scale: n, direction: s, override: o } = e, r = s === "out" ? { scale: 1, translateY: -t.top } : { scale: n, translateY: -t.top + t.height }, i = V(o, R.scaleDown), l = V(o, R.translate), c = V(o, R.scaleUp), a = s === "out" ? 1 : 0, p = s === "out" ? 0 : 1, f = s === "out" ? [
874
+ function ht(e) {
875
+ 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 = R(o, X.scaleDown), l = R(o, X.translate), c = R(o, X.scaleUp), a = s === "out" ? 1 : 0, p = s === "out" ? 0 : 1, d = s === "out" ? [
852
876
  {
853
- spring: i,
854
- offset: I.scaleDown,
855
- tick: (h) => {
856
- const u = 1 - h;
857
- r.scale = 1 - (1 - n) * u;
877
+ spring: r,
878
+ offset: T.scaleDown,
879
+ tick: (y) => {
880
+ const h = 1 - y;
881
+ i.scale = 1 - (1 - n) * h;
858
882
  }
859
883
  },
860
884
  {
861
885
  spring: l,
862
- offset: I.translate,
863
- tick: (h) => {
864
- const u = 1 - h;
865
- r.translateY = -t.top - t.height * u;
886
+ offset: T.translate,
887
+ tick: (y) => {
888
+ const h = 1 - y;
889
+ i.translateY = -t.top - t.height * h;
866
890
  }
867
891
  },
868
892
  {
869
893
  spring: c,
870
- offset: I.scaleUp,
871
- tick: (h) => {
872
- const u = 1 - h;
873
- r.scale = n + (1 - n) * u;
894
+ offset: T.scaleUp,
895
+ tick: (y) => {
896
+ const h = 1 - y;
897
+ i.scale = n + (1 - n) * h;
874
898
  }
875
899
  }
876
900
  ] : [
877
901
  {
878
- spring: i,
879
- offset: I.scaleDown,
880
- tick: (h) => {
881
- r.scale = 1 - (1 - n) * h;
902
+ spring: r,
903
+ offset: T.scaleDown,
904
+ tick: (y) => {
905
+ i.scale = 1 - (1 - n) * y;
882
906
  }
883
907
  },
884
908
  {
885
909
  spring: l,
886
- offset: I.translate,
887
- tick: (h) => {
888
- r.translateY = -t.top + t.height * (1 - h);
910
+ offset: T.translate,
911
+ tick: (y) => {
912
+ i.translateY = -t.top + t.height * (1 - y);
889
913
  }
890
914
  },
891
915
  {
892
916
  spring: c,
893
- offset: I.scaleUp,
894
- tick: (h) => {
895
- r.scale = n + (1 - n) * h;
917
+ offset: T.scaleUp,
918
+ tick: (y) => {
919
+ i.scale = n + (1 - n) * y;
896
920
  }
897
921
  }
898
- ], d = [], m = ze({
899
- items: f,
922
+ ], f = [], u = Ne({
923
+ items: d,
900
924
  from: a,
901
925
  to: p,
902
- recordFrame: (h) => d.push({
903
- time: h,
904
- scale: r.scale,
905
- translateY: r.translateY
926
+ recordFrame: (y) => f.push({
927
+ time: y,
928
+ scale: i.scale,
929
+ translateY: i.translateY
906
930
  })
907
931
  });
908
- return { snapshots: d, totalDuration: m };
932
+ return { snapshots: f, totalDuration: u };
909
933
  }
910
934
  function Xe(e, t) {
911
935
  if (e.length === 0) return { time: 0, scale: 1, translateY: 0 };
@@ -913,11 +937,11 @@ function Xe(e, t) {
913
937
  if (t >= 1) return e[e.length - 1];
914
938
  const n = t * (e.length - 1), s = Math.floor(n), o = Math.ceil(n);
915
939
  if (s === o) return e[s];
916
- const r = e[s], i = e[o], l = n - s;
940
+ const i = e[s], r = e[o], l = n - s;
917
941
  return {
918
- time: r.time + (i.time - r.time) * l,
919
- scale: r.scale + (i.scale - r.scale) * l,
920
- translateY: r.translateY + (i.translateY - r.translateY) * l
942
+ time: i.time + (r.time - i.time) * l,
943
+ scale: i.scale + (r.scale - i.scale) * l,
944
+ translateY: i.translateY + (r.translateY - i.translateY) * l
921
945
  };
922
946
  }
923
947
  const Re = [
@@ -926,8 +950,8 @@ const Re = [
926
950
  [1, -1],
927
951
  [-1, -1]
928
952
  ];
929
- function Ve(e, t) {
930
- const o = (r, i, l) => {
953
+ function Be(e, t) {
954
+ const o = (i, r, l) => {
931
955
  const c = document.createElement("div");
932
956
  Object.assign(c.style, {
933
957
  position: "fixed",
@@ -935,7 +959,7 @@ function Ve(e, t) {
935
959
  zIndex: "9999",
936
960
  width: "15px",
937
961
  height: "15px",
938
- ...r
962
+ ...i
939
963
  });
940
964
  const a = document.createElement("div");
941
965
  Object.assign(a.style, {
@@ -944,7 +968,7 @@ function Ve(e, t) {
944
968
  height: "1px",
945
969
  backgroundColor: e,
946
970
  [l]: "0",
947
- [i]: "0"
971
+ [r]: "0"
948
972
  });
949
973
  const p = document.createElement("div");
950
974
  return Object.assign(p.style, {
@@ -953,7 +977,7 @@ function Ve(e, t) {
953
977
  height: "15px",
954
978
  backgroundColor: e,
955
979
  [l]: "0",
956
- [i]: "0"
980
+ [r]: "0"
957
981
  }), c.appendChild(a), c.appendChild(p), c;
958
982
  };
959
983
  return {
@@ -991,11 +1015,11 @@ function Ve(e, t) {
991
1015
  )
992
1016
  };
993
1017
  }
994
- function mt(e, t) {
1018
+ function ut(e, t) {
995
1019
  const n = t.left + t.width / 2, s = t.top + t.height / 2;
996
1020
  e.style.transformOrigin = `${n}px ${s}px`;
997
1021
  }
998
- function yt(e, t) {
1022
+ function mt(e, t) {
999
1023
  e.style.clipPath = `polygon(
1000
1024
  ${t.left}px ${t.top}px,
1001
1025
  ${t.left + t.width}px ${t.top}px,
@@ -1004,86 +1028,86 @@ function yt(e, t) {
1004
1028
  )`;
1005
1029
  }
1006
1030
  function B(e, t, n, s, o) {
1007
- const r = n / 1e3;
1031
+ const i = n / 1e3;
1008
1032
  return new g({
1009
1033
  element: e,
1010
- integrator: new Vt({ durationSec: r }),
1034
+ integrator: new Bt({ durationSec: i }),
1011
1035
  lowerBound: 0,
1012
1036
  upperBound: 1,
1013
- style: (i) => s(Xe(t, i)),
1037
+ style: (r) => s(Xe(t, r)),
1014
1038
  onComplete: o
1015
1039
  });
1016
1040
  }
1017
- const Be = (e = {}) => {
1041
+ const We = (e = {}) => {
1018
1042
  var o;
1019
- const t = ((o = e.border) == null ? void 0 : o.color) ?? Ue, n = Me, s = e.physics;
1043
+ const t = ((o = e.border) == null ? void 0 : o.color) ?? Ve, n = Ue, s = e.physics;
1020
1044
  return {
1021
- prepare: ({ from: r, to: i, context: l }) => {
1022
- const c = D(l, "from"), a = D(l, "to"), p = O(document.body, l.positionedParent), f = Ve(t, {
1045
+ prepare: ({ from: i, to: r, context: l }) => {
1046
+ const c = I(l, "from"), a = I(l, "to"), p = A(document.body, l.positionedParent), d = Be(t, {
1023
1047
  ...c,
1024
1048
  top: p.top
1025
1049
  });
1026
- for (const d of [
1050
+ for (const f of [
1027
1051
  "topLeft",
1028
1052
  "topRight",
1029
1053
  "bottomLeft",
1030
1054
  "bottomRight"
1031
1055
  ])
1032
- l.positionedParent.appendChild(f[d]);
1033
- return r.then((d) => {
1034
- mt(d, c), yt(d, c), d.style.transform = `translateY(${-c.top}px)`;
1035
- }), i.then((d) => {
1036
- mt(d, a), yt(d, a), d.style.transform = `translateY(${-a.top + a.height}px) scale(${n})`;
1037
- }), { borders: f, fromRect: c, toRect: a };
1056
+ l.positionedParent.appendChild(d[f]);
1057
+ return i.then((f) => {
1058
+ ut(f, c), mt(f, c), f.style.transform = `translateY(${-c.top}px)`;
1059
+ }), r.then((f) => {
1060
+ ut(f, a), mt(f, a), f.style.transform = `translateY(${-a.top + a.height}px) scale(${n})`;
1061
+ }), { borders: d, fromRect: c, toRect: a };
1038
1062
  },
1039
- animation: ({ from: r, to: i, context: l, borders: c, fromRect: a, toRect: p }) => {
1040
- const f = ut({
1063
+ animation: ({ from: i, to: r, context: l, borders: c, fromRect: a, toRect: p }) => {
1064
+ const d = ht({
1041
1065
  rect: a,
1042
1066
  scale: n,
1043
1067
  direction: "out",
1044
1068
  override: s
1045
- }), d = ut({
1069
+ }), f = ht({
1046
1070
  rect: p,
1047
1071
  scale: n,
1048
1072
  direction: "in",
1049
1073
  override: s
1050
- }), m = B(
1051
- r,
1052
- f.snapshots,
1053
- f.totalDuration,
1054
- (S) => ({
1055
- transform: `translateY(${S.translateY}px) scale(${S.scale})`
1056
- }),
1057
- () => {
1058
- r.style.clipPath = "", r.style.transformOrigin = "";
1059
- }
1060
- ), h = B(
1074
+ }), u = B(
1061
1075
  i,
1062
1076
  d.snapshots,
1063
1077
  d.totalDuration,
1064
- (S) => ({
1065
- transform: `translateY(${S.translateY}px) scale(${S.scale})`
1078
+ (b) => ({
1079
+ transform: `translateY(${b.translateY}px) scale(${b.scale})`
1066
1080
  }),
1067
1081
  () => {
1068
1082
  i.style.clipPath = "", i.style.transformOrigin = "", i.style.transform = "";
1069
1083
  }
1070
- ), u = Re.map(([S, x], C) => {
1071
- const v = ["topLeft", "topRight", "bottomLeft", "bottomRight"][C];
1084
+ ), y = B(
1085
+ r,
1086
+ f.snapshots,
1087
+ f.totalDuration,
1088
+ (b) => ({
1089
+ transform: `translateY(${b.translateY}px) scale(${b.scale})`
1090
+ }),
1091
+ () => {
1092
+ r.style.clipPath = "", r.style.transformOrigin = "", r.style.transform = "";
1093
+ }
1094
+ ), h = Re.map(([b, x], C) => {
1095
+ const P = ["topLeft", "topRight", "bottomLeft", "bottomRight"][C];
1072
1096
  return B(
1073
- c[v],
1074
- f.snapshots,
1075
- f.totalDuration,
1076
- (_) => {
1077
- const P = (a.width - a.width * _.scale) / 2 * 0.7 * S, M = (a.height - a.height * _.scale) / 2 * 0.7 * x;
1078
- return { transform: `translate(${P}px, ${M}px)` };
1097
+ c[P],
1098
+ d.snapshots,
1099
+ d.totalDuration,
1100
+ (D) => {
1101
+ const _ = (a.width - a.width * D.scale) / 2 * 0.7 * b, M = (a.height - a.height * D.scale) / 2 * 0.7 * x;
1102
+ return { transform: `translate(${_}px, ${M}px)` };
1079
1103
  }
1080
1104
  );
1081
- }), w = new E([m, h, ...u], {
1105
+ }), w = new E([u, y, ...h], {
1082
1106
  mode: "parallel"
1083
- }), $ = w.onComplete;
1107
+ }), S = w.onComplete;
1084
1108
  return w.onComplete = () => {
1085
- $ == null || $();
1086
- const S = l.positionedParent;
1109
+ S == null || S();
1110
+ const b = l.positionedParent;
1087
1111
  for (const x of [
1088
1112
  "topLeft",
1089
1113
  "topRight",
@@ -1091,66 +1115,74 @@ const Be = (e = {}) => {
1091
1115
  "bottomRight"
1092
1116
  ]) {
1093
1117
  const C = c[x];
1094
- C.parentElement === S && S.removeChild(C);
1118
+ C.parentElement === b && b.removeChild(C);
1095
1119
  }
1096
1120
  }, w;
1097
1121
  }
1098
1122
  };
1099
1123
  };
1100
- function bs(e) {
1124
+ function $s(e) {
1101
1125
  const { paths: t, options: n } = e, s = (n == null ? void 0 : n.borderColor) !== void 0 ? { border: { color: n.borderColor } } : void 0;
1102
- return T(t, () => Be(s));
1126
+ return v(t, () => We(s));
1103
1127
  }
1104
1128
  const gt = "data-hero-enter-key", wt = "data-hero-exit-key", W = "data-hero-key";
1105
- class We {
1129
+ class Ze {
1130
+ constructor() {
1131
+ $(this, "previousFromOpacity", "");
1132
+ }
1106
1133
  prepare(t) {
1107
1134
  t.from.then((n) => {
1108
- n.style.opacity = "0";
1135
+ this.previousFromOpacity = n.style.opacity, n.style.opacity = "0";
1109
1136
  });
1110
1137
  }
1138
+ contribute(t) {
1139
+ return t.onComplete(() => {
1140
+ t.from.style.opacity = this.previousFromOpacity;
1141
+ }), [];
1142
+ }
1111
1143
  }
1112
- const Ze = () => new We();
1113
- class qe {
1144
+ const qe = () => new Ze();
1145
+ class je {
1114
1146
  contribute(t) {
1115
- const { from: n, to: s, physics: o, onComplete: r } = t, i = n.style.opacity, l = s.style.opacity, c = n.style.willChange, a = s.style.willChange;
1116
- return s.style.opacity = "0", n.style.willChange = "opacity", s.style.willChange = "opacity", r(() => {
1117
- n.style.opacity = i, s.style.opacity = l, n.style.willChange = c, s.style.willChange = a;
1147
+ const { from: n, to: s, physics: o, onComplete: i } = t, r = n.style.opacity, l = s.style.opacity, c = n.style.willChange, a = s.style.willChange;
1148
+ return s.style.opacity = "0", n.style.willChange = "opacity", s.style.willChange = "opacity", i(() => {
1149
+ n.style.opacity = r, s.style.opacity = l, n.style.willChange = c, s.style.willChange = a;
1118
1150
  }), [
1119
1151
  new g({
1120
1152
  element: n,
1121
- integrator: y.from(o),
1122
- style: (p, f) => ({ opacity: f })
1153
+ integrator: m.from(o),
1154
+ style: (p, d) => ({ opacity: d })
1123
1155
  }),
1124
1156
  new g({
1125
1157
  element: s,
1126
- integrator: y.from(o),
1158
+ integrator: m.from(o),
1127
1159
  style: (p) => ({ opacity: p })
1128
1160
  })
1129
1161
  ];
1130
1162
  }
1131
1163
  }
1132
- const je = () => new qe(), Ke = {
1133
- static: Ze,
1134
- fade: je
1135
- }, Ge = {
1164
+ const Ke = () => new je(), Ge = {
1165
+ static: qe,
1166
+ fade: Ke
1167
+ }, Je = {
1136
1168
  spring: { stiffness: 320, damping: 30 }
1137
- }, Je = () => Ge, Qe = {
1169
+ }, Qe = () => Je, tn = {
1138
1170
  spring: { stiffness: 300, damping: 30, doubleSpring: 1 }
1139
- }, tn = () => Qe, en = {
1140
- default: Je,
1141
- smooth: tn
1142
- }, nn = 700, sn = "data-hero-aspect-ratio", on = "data-hero-radius";
1143
- function rn(e) {
1171
+ }, en = () => tn, nn = {
1172
+ default: Qe,
1173
+ smooth: en
1174
+ }, sn = 700, on = "data-hero-aspect-ratio", rn = "data-hero-radius";
1175
+ function an(e) {
1144
1176
  if (!e) return null;
1145
1177
  if (e.includes("/")) {
1146
- const [n, s] = e.split("/"), o = parseFloat(n ?? ""), r = parseFloat(s ?? "");
1147
- return !Number.isFinite(o) || !Number.isFinite(r) || o <= 0 || r <= 0 ? null : o / r;
1178
+ const [n, s] = e.split("/"), o = parseFloat(n ?? ""), i = parseFloat(s ?? "");
1179
+ return !Number.isFinite(o) || !Number.isFinite(i) || o <= 0 || i <= 0 ? null : o / i;
1148
1180
  }
1149
1181
  const t = parseFloat(e);
1150
1182
  return Number.isFinite(t) && t > 0 ? t : null;
1151
1183
  }
1152
1184
  function St(e) {
1153
- const t = e.getAttribute(on);
1185
+ const t = e.getAttribute(rn);
1154
1186
  if (!t) return 0;
1155
1187
  const n = parseFloat(t);
1156
1188
  return Number.isFinite(n) && n > 0 ? n : 0;
@@ -1161,7 +1193,7 @@ function L(e) {
1161
1193
  function H(e) {
1162
1194
  return e.top + e.height / 2;
1163
1195
  }
1164
- function an(e, t) {
1196
+ function ln(e, t) {
1165
1197
  return {
1166
1198
  top: Math.max(0, t.top - e.top),
1167
1199
  right: Math.max(0, e.left + e.width - (t.left + t.width)),
@@ -1169,18 +1201,18 @@ function an(e, t) {
1169
1201
  left: Math.max(0, t.left - e.left)
1170
1202
  };
1171
1203
  }
1172
- function ln(e, t, n) {
1204
+ function cn(e, t, n) {
1173
1205
  const s = e.width / e.height;
1174
- let o, r;
1175
- return n === "contain" ? s > t ? (r = e.height, o = r * t) : (o = e.width, r = o / t) : s > t ? (o = e.width, r = o / t) : (r = e.height, o = r * t), {
1206
+ let o, i;
1207
+ return n === "contain" ? s > t ? (i = e.height, o = i * t) : (o = e.width, i = o / t) : s > t ? (o = e.width, i = o / t) : (i = e.height, o = i * t), {
1176
1208
  left: e.left + (e.width - o) / 2,
1177
- top: e.top + (e.height - r) / 2,
1209
+ top: e.top + (e.height - i) / 2,
1178
1210
  width: o,
1179
- height: r
1211
+ height: i
1180
1212
  };
1181
1213
  }
1182
1214
  function bt(e, t, n) {
1183
- const s = O(e, t), o = rn(t.getAttribute(sn));
1215
+ const s = A(e, t), o = an(t.getAttribute(on));
1184
1216
  if (o === null)
1185
1217
  return {
1186
1218
  bbox: s,
@@ -1188,32 +1220,32 @@ function bt(e, t, n) {
1188
1220
  window: s,
1189
1221
  clipInset: { top: 0, right: 0, bottom: 0, left: 0 }
1190
1222
  };
1191
- const r = ln(s, o, n), i = n === "cover" ? s : r;
1223
+ const i = cn(s, o, n), r = n === "cover" ? s : i;
1192
1224
  return {
1193
1225
  bbox: s,
1194
- content: r,
1195
- window: i,
1196
- clipInset: an(r, i)
1226
+ content: i,
1227
+ window: r,
1228
+ clipInset: ln(i, r)
1197
1229
  };
1198
1230
  }
1199
- function cn(e, t, n, s) {
1200
- const o = n.width / s, r = n.height / s, i = e.width / 2 + (L(n) - L(t)) / s - o / 2, l = e.height / 2 + (H(n) - H(t)) / s - r / 2;
1231
+ function pn(e, t, n, s) {
1232
+ const o = n.width / s, i = n.height / s, r = e.width / 2 + (L(n) - L(t)) / s - o / 2, l = e.height / 2 + (H(n) - H(t)) / s - i / 2;
1201
1233
  return {
1202
1234
  top: Math.max(0, l),
1203
- right: Math.max(0, e.width - i - o),
1204
- bottom: Math.max(0, e.height - l - r),
1205
- left: Math.max(0, i)
1235
+ right: Math.max(0, e.width - r - o),
1236
+ bottom: Math.max(0, e.height - l - i),
1237
+ left: Math.max(0, r)
1206
1238
  };
1207
1239
  }
1208
1240
  function F(e, t) {
1209
1241
  const n = /* @__PURE__ */ new Map(), s = e.querySelectorAll(`[${t}]`);
1210
1242
  for (const o of Array.from(s)) {
1211
- const r = o.getAttribute(t);
1212
- r && (n.has(r) || n.set(r, o));
1243
+ const i = o.getAttribute(t);
1244
+ i && (n.has(i) || n.set(i, o));
1213
1245
  }
1214
1246
  return n;
1215
1247
  }
1216
- function pn(e, t) {
1248
+ function dn(e, t) {
1217
1249
  const n = [], s = F(t, gt), o = F(e, wt);
1218
1250
  for (const [l, c] of s) {
1219
1251
  const a = o.get(l);
@@ -1225,9 +1257,9 @@ function pn(e, t) {
1225
1257
  toFit: "contain"
1226
1258
  });
1227
1259
  }
1228
- const r = F(e, gt), i = F(t, wt);
1229
- for (const [l, c] of r) {
1230
- const a = i.get(l);
1260
+ const i = F(e, gt), r = F(t, wt);
1261
+ for (const [l, c] of i) {
1262
+ const a = r.get(l);
1231
1263
  a && n.push({
1232
1264
  key: l,
1233
1265
  fromEl: c,
@@ -1243,14 +1275,14 @@ function fn(e, t) {
1243
1275
  t.querySelectorAll(`[${W}]`)
1244
1276
  );
1245
1277
  for (const o of s) {
1246
- const r = o.getAttribute(W);
1247
- if (!r) continue;
1248
- const i = e.querySelector(
1249
- `[${W}="${r}"]`
1278
+ const i = o.getAttribute(W);
1279
+ if (!i) continue;
1280
+ const r = e.querySelector(
1281
+ `[${W}="${i}"]`
1250
1282
  );
1251
- i && n.push({
1252
- key: r,
1253
- fromEl: i,
1283
+ r && n.push({
1284
+ key: i,
1285
+ fromEl: r,
1254
1286
  toEl: o,
1255
1287
  fromFit: "contain",
1256
1288
  toFit: "contain"
@@ -1258,33 +1290,33 @@ function fn(e, t) {
1258
1290
  }
1259
1291
  return n;
1260
1292
  }
1261
- function dn(e, t) {
1262
- const n = pn(e, t);
1293
+ function yn(e, t) {
1294
+ const n = dn(e, t);
1263
1295
  return n.length > 0 ? n : fn(e, t);
1264
1296
  }
1265
1297
  function hn(e, t, n) {
1266
- const { fromEl: s, toEl: o } = t, r = bt(e, s, t.fromFit), i = bt(e, o, t.toFit), l = r.content, c = r.window, a = i.content, p = i.window, f = i.clipInset, d = St(s), m = St(o);
1298
+ const { fromEl: s, toEl: o } = t, i = bt(e, s, t.fromFit), r = bt(e, o, t.toFit), l = i.content, c = i.window, a = r.content, p = r.window, d = r.clipInset, f = St(s), u = St(o);
1267
1299
  if (l.width === 0 || l.height === 0 || c.width === 0 || c.height === 0 || a.width === 0 || a.height === 0 || p.width === 0 || p.height === 0)
1268
1300
  return null;
1269
- const h = Math.max(
1301
+ const y = Math.max(
1270
1302
  l.width / a.width,
1271
1303
  l.height / a.height
1272
- ), u = L(l), w = H(l), $ = L(a), S = H(a), x = u - $, C = w - S;
1304
+ ), h = L(l), w = H(l), S = L(a), b = H(a), x = h - S, C = w - b;
1273
1305
  if (Math.abs(C) > n) return null;
1274
- const v = cn(
1306
+ const P = pn(
1275
1307
  a,
1276
1308
  l,
1277
1309
  c,
1278
- h
1310
+ y
1279
1311
  );
1280
1312
  return {
1281
1313
  toContent: a,
1282
- hasRadius: d > 0 || m > 0,
1283
- styleFor: (_, P) => {
1284
- const M = P * x, It = P * C, Q = _ + P * h, At = (d * P + m * _) / Q, Ot = v.top * P + f.top * _, Ft = v.right * P + f.right * _, Yt = v.bottom * P + f.bottom * _, kt = v.left * P + f.left * _;
1314
+ hasRadius: f > 0 || u > 0,
1315
+ styleFor: (D, _) => {
1316
+ const M = _ * x, Ot = _ * C, Q = D + _ * y, At = (f * _ + u * D) / Q, Ft = P.top * _ + d.top * D, kt = P.right * _ + d.right * D, Yt = P.bottom * _ + d.bottom * D, Lt = P.left * _ + d.left * D;
1285
1317
  return {
1286
- transform: `translate(${M}px, ${It}px) scale(${Q})`,
1287
- clipPath: `inset(${Ot}px ${Ft}px ${Yt}px ${kt}px round ${At}px)`
1318
+ transform: `translate(${M}px, ${Ot}px) scale(${Q})`,
1319
+ clipPath: `inset(${Ft}px ${kt}px ${Yt}px ${Lt}px round ${At}px)`
1288
1320
  };
1289
1321
  }
1290
1322
  };
@@ -1294,154 +1326,161 @@ function un(e, t) {
1294
1326
  }
1295
1327
  class mn {
1296
1328
  contribute(t) {
1297
- const { resolved: n, physics: s, positionedParent: o, maxDistance: r, onComplete: i } = t, l = [];
1329
+ const { resolved: n, physics: s, positionedParent: o, maxDistance: i, onComplete: r } = t, l = [];
1298
1330
  for (const c of n.pairs) {
1299
- const { fromEl: a, toEl: p } = c, f = hn(o, c, r);
1300
- if (!f) continue;
1301
- const d = p.cloneNode(!0);
1302
- d.style.position = "absolute", d.style.left = `${f.toContent.left}px`, d.style.top = `${f.toContent.top}px`, d.style.width = `${f.toContent.width}px`, d.style.height = `${f.toContent.height}px`, d.style.margin = "0", d.style.transformOrigin = "center center", d.style.zIndex = "1000", d.style.willChange = "transform, clip-path", d.style.pointerEvents = "none", d.style.maxWidth = "none", d.style.maxHeight = "none", f.hasRadius && (d.style.borderRadius = "0"), un(d, f.styleFor(0, 1)), o.appendChild(d);
1303
- const m = a.style.opacity, h = p.style.opacity;
1304
- a.style.opacity = "0", p.style.opacity = "0", i(() => {
1305
- a.style.opacity = m, p.style.opacity = h, d.parentElement && d.parentElement.removeChild(d);
1331
+ const { fromEl: a, toEl: p } = c, d = hn(o, c, i);
1332
+ if (!d) continue;
1333
+ const f = p.cloneNode(!0);
1334
+ f.style.position = "absolute", f.style.left = `${d.toContent.left}px`, f.style.top = `${d.toContent.top}px`, f.style.width = `${d.toContent.width}px`, f.style.height = `${d.toContent.height}px`, f.style.margin = "0", f.style.transformOrigin = "center center", f.style.zIndex = "1000", f.style.willChange = "transform, clip-path", f.style.pointerEvents = "none", f.style.maxWidth = "none", f.style.maxHeight = "none", d.hasRadius && (f.style.borderRadius = "0"), un(f, d.styleFor(0, 1)), o.appendChild(f);
1335
+ const u = a.style.opacity, y = p.style.opacity;
1336
+ a.style.opacity = "0", p.style.opacity = "0", r(() => {
1337
+ a.style.opacity = u, p.style.opacity = y, f.parentElement && f.parentElement.removeChild(f);
1306
1338
  }), l.push(
1307
1339
  new g({
1308
- element: d,
1309
- integrator: y.from(s),
1310
- style: f.styleFor
1340
+ element: f,
1341
+ integrator: m.from(s),
1342
+ style: d.styleFor
1311
1343
  })
1312
1344
  );
1313
1345
  }
1314
1346
  return l;
1315
1347
  }
1316
1348
  }
1317
- function yn(e) {
1318
- return [new mn(), Ke[e.type]()];
1349
+ function gn(e) {
1350
+ return [new mn(), Ge[e.type]()];
1319
1351
  }
1320
- const gn = (e) => {
1321
- const t = yn(e), n = en[e.variant](), s = nn;
1352
+ const wn = (e) => {
1353
+ const t = gn(e), n = nn[e.variant](), s = sn;
1322
1354
  return {
1323
1355
  prepare: (o) => {
1324
1356
  var l;
1325
- const r = Promise.all([
1357
+ const i = Promise.all([
1326
1358
  o.from,
1327
1359
  o.to
1328
- ]).then(([c, a]) => ({ pairs: dn(c, a) })), i = {
1360
+ ]).then(([c, a]) => ({ pairs: yn(c, a) })), r = {
1329
1361
  from: o.from,
1330
1362
  to: o.to,
1331
- resolved: r
1363
+ resolved: i
1332
1364
  };
1333
1365
  for (const c of t)
1334
- (l = c.prepare) == null || l.call(c, i);
1335
- return r.then((c) => ({ resolved: c }));
1366
+ (l = c.prepare) == null || l.call(c, r);
1367
+ return i.then((c) => ({ resolved: c }));
1336
1368
  },
1337
- animation: ({ from: o, to: r, context: i, resolved: l }) => {
1369
+ animation: ({ from: o, to: i, context: r, resolved: l }) => {
1338
1370
  if (l.pairs.length === 0)
1339
1371
  return new E([], { mode: "parallel" });
1340
- const c = [], a = (h) => {
1341
- c.push(h);
1372
+ const c = [], a = (y) => {
1373
+ c.push(y);
1342
1374
  }, p = {
1343
1375
  from: o,
1344
- to: r,
1376
+ to: i,
1345
1377
  resolved: l,
1346
1378
  physics: n,
1347
- positionedParent: i.positionedParent,
1379
+ positionedParent: r.positionedParent,
1348
1380
  maxDistance: s,
1349
1381
  onComplete: a
1350
- }, f = [];
1351
- for (const h of t)
1352
- h.contribute && f.push(...h.contribute(p));
1353
- if (f.length === 0)
1382
+ }, d = [];
1383
+ for (const y of t)
1384
+ y.contribute && d.push(...y.contribute(p));
1385
+ if (d.length === 0)
1354
1386
  return new E([], { mode: "parallel" });
1355
- const d = new E(f, { mode: "parallel" }), m = d.onComplete;
1356
- return d.onComplete = () => {
1357
- m == null || m();
1358
- for (const h of c)
1387
+ const f = new E(d, { mode: "parallel" }), u = f.onComplete;
1388
+ return f.onComplete = () => {
1389
+ u == null || u();
1390
+ for (const y of c)
1359
1391
  try {
1360
- h();
1361
- } catch (u) {
1362
- console.error("[hero] cleanup error", u);
1392
+ y();
1393
+ } catch (h) {
1394
+ console.error("[hero] cleanup error", h);
1363
1395
  }
1364
- }, d;
1396
+ }, f;
1365
1397
  }
1366
1398
  };
1367
1399
  };
1368
- function $s(e) {
1400
+ function Es(e) {
1369
1401
  const { paths: t } = e, n = e.type ?? "static", s = e.variant ?? "default";
1370
- return T(
1402
+ return v(
1371
1403
  t,
1372
- () => gn({ type: n, variant: s })
1404
+ () => wn({ type: n, variant: s })
1373
1405
  );
1374
1406
  }
1375
- const wn = {
1407
+ const Sn = {
1376
1408
  spring: { stiffness: 50, damping: 30 }
1377
- }, Sn = {
1409
+ }, bn = {
1378
1410
  spring: { stiffness: 80, damping: 25 }
1379
- }, bn = (e = {}) => {
1380
- const t = e.physics ?? wn, n = e.initialRotation ?? 45, s = e.initialScale ?? 0.01, o = e.rotationTriggerPoint ?? 0.8;
1411
+ }, $n = (e = {}) => {
1412
+ const t = e.physics ?? Sn, n = e.initialRotation ?? 45, s = e.initialScale ?? 0.01, o = e.rotationTriggerPoint ?? 0.8;
1381
1413
  return {
1382
- prepare: ({ from: r, to: i, context: l }) => (r.then((c) => {
1414
+ prepare: ({ from: i, to: r, context: l }) => (i.then((c) => {
1383
1415
  c.style.opacity = "1";
1384
- }), i.then((c) => {
1385
- const a = D(l, "to"), p = Math.min(a.width, a.height) * 0.4;
1416
+ }), r.then((c) => {
1417
+ const a = I(l, "to"), p = Math.min(a.width, a.height) * 0.4;
1386
1418
  c.style.setProperty("--max-border-radius", `${p}px`), c.style.setProperty("--border-radius-scale", "1"), c.style.willChange = "transform", c.style.backfaceVisibility = "hidden";
1387
- const f = a.left + a.width / 2, d = a.top + a.height / 2;
1388
- c.style.transformOrigin = `${f}px ${d}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";
1419
+ const d = a.left + a.width / 2, f = a.top + a.height / 2;
1420
+ c.style.transformOrigin = `${d}px ${f}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";
1389
1421
  }), {}),
1390
- animation: ({ from: r, to: i }) => {
1422
+ animation: ({ from: i, to: r }) => {
1391
1423
  const l = new g({
1392
- element: r,
1393
- integrator: y.from(Sn),
1394
- style: (a, p) => ({ opacity: p })
1395
- }), c = new g({
1396
1424
  element: i,
1397
- integrator: y.from(t),
1425
+ integrator: m.from(bn),
1426
+ style: (a, p) => ({ opacity: p }),
1427
+ // The outgoing node is reused (re-hidden, shown again on the next
1428
+ // navigation), so reset every inline style we wrote to it — mirroring
1429
+ // the "to" cleanup below. prepare sets opacity and the out style fades
1430
+ // it toward 0, so clear opacity or the reused node stays invisible.
1431
+ onComplete: () => {
1432
+ i.style.opacity = "";
1433
+ }
1434
+ }), c = new g({
1435
+ element: r,
1436
+ integrator: m.from(t),
1398
1437
  style: (a) => {
1399
1438
  let p;
1400
1439
  if (a <= 0.05)
1401
1440
  p = s;
1402
1441
  else if (a <= o) {
1403
- const h = (a - 0.05) / (o - 0.05), u = Math.pow(h, 9);
1404
- p = s + (0.8 - s) * u;
1442
+ const y = (a - 0.05) / (o - 0.05), h = Math.pow(y, 9);
1443
+ p = s + (0.8 - s) * h;
1405
1444
  } else {
1406
- const h = (a - o) / (1 - o);
1407
- p = 0.8 + 0.2 * (1 - Math.pow(1 - h, 3));
1445
+ const y = (a - o) / (1 - o);
1446
+ p = 0.8 + 0.2 * (1 - Math.pow(1 - y, 3));
1408
1447
  }
1409
- const f = 0.7;
1410
- let d;
1411
- if (a <= f)
1412
- d = n;
1448
+ const d = 0.7;
1449
+ let f;
1450
+ if (a <= d)
1451
+ f = n;
1413
1452
  else {
1414
- const h = (a - f) / (1 - f), u = 1 - Math.pow(1 - h, 2);
1415
- d = n * (1 - u);
1453
+ const y = (a - d) / (1 - d), h = 1 - Math.pow(1 - y, 2);
1454
+ f = n * (1 - h);
1416
1455
  }
1417
- let m;
1418
- if (a <= f)
1419
- m = 1;
1456
+ let u;
1457
+ if (a <= d)
1458
+ u = 1;
1420
1459
  else {
1421
- const h = (a - f) / (1 - f);
1422
- m = 1 - Math.pow(h, 0.5);
1460
+ const y = (a - d) / (1 - d);
1461
+ u = 1 - Math.pow(y, 0.5);
1423
1462
  }
1424
1463
  return {
1425
- transform: `rotate(${d.toFixed(2)}deg) scale(${p.toFixed(4)}) translateZ(0)`,
1426
- "--border-radius-scale": m.toFixed(4)
1464
+ transform: `rotate(${f.toFixed(2)}deg) scale(${p.toFixed(4)}) translateZ(0)`,
1465
+ "--border-radius-scale": u.toFixed(4)
1427
1466
  };
1428
1467
  },
1429
1468
  onComplete: () => {
1430
- 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 = "";
1469
+ 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 = "";
1431
1470
  }
1432
1471
  });
1433
1472
  return new E([l, c], { mode: "parallel" });
1434
1473
  }
1435
1474
  };
1436
1475
  };
1437
- function Es(e) {
1476
+ function Cs(e) {
1438
1477
  const { paths: t } = e;
1439
- return T(t, () => bn());
1478
+ return v(t, () => $n());
1440
1479
  }
1441
- const $n = {
1480
+ const En = {
1442
1481
  spring: { stiffness: 100, damping: 30 }
1443
- }, En = (e = {}) => {
1444
- const t = e.physics ?? $n;
1482
+ }, Cn = (e = {}) => {
1483
+ const t = e.physics ?? En;
1445
1484
  return {
1446
1485
  prepare: ({ from: n, to: s }) => (n.then((o) => {
1447
1486
  o.style.transformOrigin = "center center", o.style.willChange = "transform, opacity";
@@ -1451,30 +1490,36 @@ const $n = {
1451
1490
  animation: ({ from: n, to: s }) => {
1452
1491
  const o = new g({
1453
1492
  element: n,
1454
- integrator: y.from(t),
1455
- style: (i) => ({
1456
- transform: `rotate(${i * 180}deg)`,
1457
- opacity: i < 0.5 ? 1 : 0
1458
- })
1459
- }), r = new g({
1493
+ integrator: m.from(t),
1494
+ style: (r) => ({
1495
+ transform: `rotate(${r * 180}deg)`,
1496
+ opacity: r < 0.5 ? 1 : 0
1497
+ }),
1498
+ // The outgoing node is reused (re-hidden, shown again on the next
1499
+ // navigation), so clear every inline style we wrote to `from`
1500
+ // (prepare + the final WAAPI frame), mirroring the `to` cleanup.
1501
+ onComplete: () => {
1502
+ n.style.willChange = "auto", n.style.transform = "", n.style.transformOrigin = "", n.style.opacity = "";
1503
+ }
1504
+ }), i = new g({
1460
1505
  element: s,
1461
- integrator: y.from(t),
1506
+ integrator: m.from(t),
1462
1507
  // u runs 1→0, so -u*180 unwinds -180→0.
1463
- style: (i, l) => ({
1508
+ style: (r, l) => ({
1464
1509
  transform: `rotate(${-l * 180}deg)`,
1465
- opacity: i > 0.5 ? 1 : 0
1510
+ opacity: r > 0.5 ? 1 : 0
1466
1511
  }),
1467
1512
  onComplete: () => {
1468
1513
  s.style.willChange = "auto", s.style.transform = "", s.style.transformOrigin = "", s.style.opacity = "";
1469
1514
  }
1470
1515
  });
1471
- return new E([o, r], { mode: "parallel" });
1516
+ return new E([o, i], { mode: "parallel" });
1472
1517
  }
1473
1518
  };
1474
1519
  };
1475
1520
  function xs(e) {
1476
1521
  const { paths: t } = e;
1477
- return T(t, () => En());
1522
+ return v(t, () => Cn());
1478
1523
  }
1479
1524
  const xn = {
1480
1525
  spring: {
@@ -1487,31 +1532,39 @@ const xn = {
1487
1532
  }, $t = (e = {}) => {
1488
1533
  const t = e.direction ?? "up", n = e.physics ?? xn, s = t === "up";
1489
1534
  return {
1490
- prepare: ({ from: o, to: r }) => (o.then((i) => {
1491
- i.style.zIndex = s ? "-1" : "1", i.style.willChange = "transform", i.style.backfaceVisibility = "hidden", i.style.contain = "layout paint", i.style.pointerEvents = "none";
1492
- }), r.then((i) => {
1493
- i.style.willChange = "transform", i.style.backfaceVisibility = "hidden", i.style.contain = "layout paint";
1535
+ prepare: ({ from: o, to: i }) => (o.then((r) => {
1536
+ r.style.zIndex = s ? "-1" : "1", r.style.willChange = "transform", r.style.backfaceVisibility = "hidden", r.style.contain = "layout paint", r.style.pointerEvents = "none";
1537
+ }), i.then((r) => {
1538
+ r.style.willChange = "transform", r.style.backfaceVisibility = "hidden", r.style.contain = "layout paint";
1494
1539
  }), {}),
1495
- animation: ({ from: o, to: r }) => {
1496
- const i = o.offsetHeight, l = r.offsetHeight, c = window.innerHeight, a = Math.max(Math.min(i, l), c), p = new g({
1540
+ animation: ({ from: o, to: i }) => {
1541
+ const r = o.offsetHeight, l = i.offsetHeight, c = window.innerHeight, a = Math.max(Math.min(r, l), c), p = new g({
1497
1542
  element: o,
1498
- integrator: y.from(n),
1499
- style: (d) => ({ transform: `translate3d(0, ${s ? -a * d : a * d}px, 0)` })
1500
- }), f = new g({
1501
- element: r,
1502
- integrator: y.from(n),
1503
- style: (d, m) => ({ transform: `translate3d(0, ${s ? m * a : m * -a}px, 0)` }),
1543
+ integrator: m.from(n),
1544
+ style: (f) => ({ transform: `translate3d(0, ${s ? -a * f : a * f}px, 0)` }),
1545
+ // The outgoing node is the real, reused element (re-hidden then shown
1546
+ // again on the next navigation), so mirror the incoming cleanup and
1547
+ // also reset the out-only props applied in prepare (zIndex,
1548
+ // pointerEvents) — otherwise the leftover inline styles corrupt the
1549
+ // page the next time it appears.
1550
+ onComplete: () => {
1551
+ o.style.willChange = "auto", o.style.backfaceVisibility = "", o.style.contain = "", o.style.transform = "", o.style.pointerEvents = "", o.style.zIndex = "";
1552
+ }
1553
+ }), d = new g({
1554
+ element: i,
1555
+ integrator: m.from(n),
1556
+ style: (f, u) => ({ transform: `translate3d(0, ${s ? u * a : u * -a}px, 0)` }),
1504
1557
  onComplete: () => {
1505
- r.style.willChange = "auto", r.style.backfaceVisibility = "", r.style.contain = "", r.style.transform = "";
1558
+ i.style.willChange = "auto", i.style.backfaceVisibility = "", i.style.contain = "", i.style.transform = "";
1506
1559
  }
1507
1560
  });
1508
- return new E([p, f], { mode: "parallel" });
1561
+ return new E([p, d], { mode: "parallel" });
1509
1562
  }
1510
1563
  };
1511
1564
  };
1512
- function Cs(e) {
1565
+ function Ps(e) {
1513
1566
  const { paths: t, type: n = "directional" } = e;
1514
- return n === "non-directional" ? T(
1567
+ return n === "non-directional" ? v(
1515
1568
  t,
1516
1569
  () => $t({ direction: "up" })
1517
1570
  ) : J(
@@ -1520,15 +1573,15 @@ function Cs(e) {
1520
1573
  (s) => $t({ direction: s })
1521
1574
  );
1522
1575
  }
1523
- const Cn = {
1576
+ const Pn = {
1524
1577
  spring: { stiffness: 200, damping: 24 }
1525
- }, Pn = {
1578
+ }, _n = {
1526
1579
  inertia: { acceleration: 25, resistance: 1.2 }
1527
1580
  }, Z = 0.2;
1528
- function _n() {
1581
+ function Dn() {
1529
1582
  return {
1530
- enterPhysics: Cn,
1531
- exitPhysics: Pn,
1583
+ enterPhysics: Pn,
1584
+ exitPhysics: _n,
1532
1585
  background: {
1533
1586
  willChange: "transform, opacity",
1534
1587
  enterStyle: (e, t) => ({
@@ -1542,15 +1595,15 @@ function _n() {
1542
1595
  }
1543
1596
  };
1544
1597
  }
1545
- const Tn = {
1598
+ const vn = {
1546
1599
  spring: { stiffness: 300, damping: 30 }
1547
- }, Dn = {
1600
+ }, In = {
1548
1601
  inertia: { acceleration: 30, resistance: 1 }
1549
1602
  };
1550
- function vn() {
1603
+ function Tn() {
1551
1604
  return {
1552
- enterPhysics: Tn,
1553
- exitPhysics: Dn,
1605
+ enterPhysics: vn,
1606
+ exitPhysics: In,
1554
1607
  background: {
1555
1608
  willChange: "",
1556
1609
  enterStyle: () => ({}),
@@ -1558,209 +1611,231 @@ function vn() {
1558
1611
  }
1559
1612
  };
1560
1613
  }
1561
- const In = {
1562
- static: vn(),
1563
- "background-scale": _n()
1564
- }, An = "static", On = "transform", Fn = (e = {}) => {
1565
- const t = e.direction ?? "enter", n = In[e.type ?? An], s = t === "enter" ? n.enterPhysics : n.exitPhysics, o = n.background, r = o.willChange !== "";
1614
+ const On = {
1615
+ static: Tn(),
1616
+ "background-scale": Dn()
1617
+ }, An = "static", Fn = "transform", kn = (e = {}) => {
1618
+ const t = e.direction ?? "enter", n = On[e.type ?? An], s = t === "enter" ? n.enterPhysics : n.exitPhysics, o = n.background, i = o.willChange !== "";
1566
1619
  return {
1567
- prepare: ({ from: i, to: l }) => {
1568
- const c = t === "enter" ? l : i, a = t === "enter" ? i : l;
1620
+ prepare: ({ from: r, to: l }) => {
1621
+ const c = t === "enter" ? l : r, a = t === "enter" ? r : l;
1569
1622
  return c.then((p) => {
1570
- p.style.willChange = On, p.style.backfaceVisibility = "hidden", p.style.contain = "layout paint", t === "exit" && (p.style.pointerEvents = "none", p.style.zIndex = "100");
1623
+ p.style.willChange = Fn, p.style.backfaceVisibility = "hidden", p.style.contain = "layout paint", t === "exit" && (p.style.pointerEvents = "none", p.style.zIndex = "100");
1571
1624
  }), a.then((p) => {
1572
- r && (p.style.willChange = o.willChange, p.style.backfaceVisibility = "hidden", p.style.contain = "layout paint"), t === "enter" && (p.style.pointerEvents = "none", p.style.zIndex = "-1");
1625
+ 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");
1573
1626
  }), {};
1574
1627
  },
1575
- animation: ({ from: i, to: l, context: c }) => {
1576
- const a = t === "enter" ? l : i, p = t === "enter" ? i : l, f = D(
1628
+ animation: ({ from: r, to: l, context: c }) => {
1629
+ const a = t === "enter" ? l : r, p = t === "enter" ? r : l, d = I(
1577
1630
  c,
1578
1631
  t === "enter" ? "to" : "from"
1579
- );
1580
- a.style.clipPath = `inset(${f.top}px 0 calc(100% - ${f.top + f.height}px) 0)`;
1581
- const d = t === "enter" ? (x, C) => ({
1582
- transform: `translate3d(0, ${C * f.height}px, 0)`
1583
- }) : (x) => ({
1584
- transform: `translate3d(0, ${x * f.height}px, 0)`
1585
- }), m = new g({
1632
+ ), f = () => {
1633
+ r.style.pointerEvents = "", r.style.zIndex = "";
1634
+ };
1635
+ a.style.clipPath = `inset(${d.top}px 0 calc(100% - ${d.top + d.height}px) 0)`;
1636
+ const u = t === "enter" ? (C, P) => ({
1637
+ transform: `translate3d(0, ${P * d.height}px, 0)`
1638
+ }) : (C) => ({
1639
+ transform: `translate3d(0, ${C * d.height}px, 0)`
1640
+ }), y = new g({
1586
1641
  element: a,
1587
- integrator: y.from(s),
1588
- style: d,
1642
+ integrator: m.from(s),
1643
+ style: u,
1589
1644
  onComplete: () => {
1590
- a.style.willChange = "auto", a.style.backfaceVisibility = "", a.style.contain = "", a.style.clipPath = "", a.style.transform = "";
1645
+ a.style.willChange = "auto", a.style.backfaceVisibility = "", a.style.contain = "", a.style.clipPath = "", a.style.transform = "", f();
1591
1646
  }
1592
1647
  });
1593
- if (!r)
1594
- return new E([m], { mode: "parallel" });
1595
- const h = D(
1648
+ if (!i)
1649
+ return new E([y], { mode: "parallel" });
1650
+ const h = I(
1596
1651
  c,
1597
1652
  t === "enter" ? "from" : "to"
1598
- ), u = h.left + h.width / 2, w = h.top + h.height / 2;
1599
- p.style.clipPath = `inset(${h.top}px 0 calc(100% - ${h.top + h.height}px) 0)`, p.style.transformOrigin = `${u}px ${w}px`;
1600
- const $ = t === "enter" ? (x, C) => o.enterStyle(x, C) : (x) => o.exitStyle(x), S = new g({
1653
+ ), w = h.left + h.width / 2, S = h.top + h.height / 2;
1654
+ p.style.clipPath = `inset(${h.top}px 0 calc(100% - ${h.top + h.height}px) 0)`, p.style.transformOrigin = `${w}px ${S}px`;
1655
+ const b = t === "enter" ? (C, P) => o.enterStyle(C, P) : (C) => o.exitStyle(C), x = new g({
1601
1656
  element: p,
1602
- integrator: y.from(s),
1603
- style: $,
1657
+ integrator: m.from(s),
1658
+ style: b,
1659
+ // On `exit` the background is the incoming (`to`) node; on `enter` it is
1660
+ // the reused outgoing (`from`) node — in both cases its inline styles
1661
+ // must be restored when the animation settles, so the reused node is
1662
+ // not left scaled/faded/clipped the next time it is shown. The `enter`
1663
+ // branch mirrors the `exit` cleanup and additionally clears the
1664
+ // transform/opacity final frame WAAPI leaves behind.
1604
1665
  onComplete: t === "exit" ? () => {
1605
1666
  p.style.willChange = "auto", p.style.backfaceVisibility = "", p.style.contain = "", p.style.clipPath = "", p.style.transformOrigin = "";
1606
- } : void 0
1667
+ } : () => {
1668
+ p.style.willChange = "auto", p.style.backfaceVisibility = "", p.style.contain = "", p.style.clipPath = "", p.style.transformOrigin = "", p.style.transform = "", p.style.opacity = "";
1669
+ }
1607
1670
  });
1608
- return new E([m, S], { mode: "parallel" });
1671
+ return new E([y, x], { mode: "parallel" });
1609
1672
  }
1610
1673
  };
1611
1674
  };
1612
1675
  function Yn(e) {
1613
1676
  return e === "scale" || e === "background-scale" ? "background-scale" : "static";
1614
1677
  }
1615
- function Ps(e) {
1678
+ function _s(e) {
1616
1679
  const { enter: t, exit: n } = e, s = e.type, o = Yn(s);
1617
- return Tt(
1680
+ return Dt(
1618
1681
  { enter: t, exit: n },
1619
- (r) => Fn({ direction: r, type: o })
1682
+ (i) => kn({ direction: i, type: o })
1620
1683
  );
1621
1684
  }
1622
- const kn = {
1685
+ const Ln = {
1623
1686
  spring: { stiffness: 170, damping: 22, doubleSpring: 0.8 }
1624
- }, Ln = (e = {}) => {
1625
- const t = e.direction ?? "left", n = e.physics ?? kn, s = t === "left";
1687
+ }, Hn = (e = {}) => {
1688
+ const t = e.direction ?? "left", n = e.physics ?? Ln, s = t === "left";
1626
1689
  return {
1627
- prepare: ({ from: o, to: r }) => (o.then((i) => {
1628
- i.style.willChange = "transform", i.style.backfaceVisibility = "hidden", i.style.contain = "layout paint", i.style.pointerEvents = "none";
1629
- }), r.then((i) => {
1690
+ prepare: ({ from: o, to: i }) => (o.then((r) => {
1691
+ r.style.willChange = "transform", r.style.backfaceVisibility = "hidden", r.style.contain = "layout paint", r.style.pointerEvents = "none";
1692
+ }), i.then((r) => {
1630
1693
  const l = s ? 100 : -100;
1631
- i.style.transform = `translate3d(${l}%, 0, 0)`, i.style.willChange = "transform", i.style.backfaceVisibility = "hidden", i.style.contain = "layout paint";
1694
+ r.style.transform = `translate3d(${l}%, 0, 0)`, r.style.willChange = "transform", r.style.backfaceVisibility = "hidden", r.style.contain = "layout paint";
1632
1695
  }), {}),
1633
- animation: ({ from: o, to: r }) => {
1634
- const i = new g({
1696
+ animation: ({ from: o, to: i }) => {
1697
+ const r = new g({
1635
1698
  element: o,
1636
- integrator: y.from(n),
1637
- style: (c) => ({ transform: `translate3d(${s ? -100 * c : 100 * c}%, 0, 0)` })
1699
+ integrator: m.from(n),
1700
+ style: (c) => ({ transform: `translate3d(${s ? -100 * c : 100 * c}%, 0, 0)` }),
1701
+ // The outgoing node is the real Activity page and gets reused on the
1702
+ // next navigation, so reset every inline style we wrote to it (mirror
1703
+ // the incoming cleanup, plus the out-only pointerEvents).
1704
+ onComplete: () => {
1705
+ o.style.willChange = "auto", o.style.backfaceVisibility = "", o.style.contain = "", o.style.transform = "", o.style.pointerEvents = "";
1706
+ }
1638
1707
  }), l = new g({
1639
- element: r,
1640
- integrator: y.from(n),
1708
+ element: i,
1709
+ integrator: m.from(n),
1641
1710
  style: (c, a) => ({ transform: `translate3d(${s ? a * 100 : a * -100}%, 0, 0)` }),
1642
1711
  onComplete: () => {
1643
- r.style.willChange = "auto", r.style.backfaceVisibility = "", r.style.contain = "", r.style.transform = "";
1712
+ i.style.willChange = "auto", i.style.backfaceVisibility = "", i.style.contain = "", i.style.transform = "";
1644
1713
  }
1645
1714
  });
1646
- return new E([i, l], { mode: "parallel" });
1715
+ return new E([r, l], { mode: "parallel" });
1647
1716
  }
1648
1717
  };
1649
1718
  };
1650
- function _s(e) {
1719
+ function Ds(e) {
1651
1720
  const { paths: t } = e;
1652
1721
  return J(
1653
1722
  t,
1654
1723
  { forward: "left", backward: "right" },
1655
- (n) => Ln({ direction: n })
1724
+ (n) => Hn({ direction: n })
1656
1725
  );
1657
1726
  }
1658
- const Hn = {
1727
+ const Mn = {
1659
1728
  spring: { stiffness: 17, damping: 6 }
1660
- }, q = 20, Y = 800, Mn = (e = {}) => {
1661
- const t = e.physics ?? Hn;
1729
+ }, q = 20, k = 800, Un = (e = {}) => {
1730
+ const t = e.physics ?? Mn;
1662
1731
  return {
1663
1732
  prepare: ({ from: n, to: s }) => (n.then((o) => {
1664
- o.style.willChange = "transform", o.style.backfaceVisibility = "hidden", o.style.contain = "layout paint", o.style.pointerEvents = "none", o.style.transform = `perspective(${Y}px) rotateY(0deg) translate3d(0%, 0, 0)`;
1733
+ 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)`;
1665
1734
  }), s.then((o) => {
1666
- o.style.willChange = "transform", o.style.backfaceVisibility = "hidden", o.style.contain = "layout paint", o.style.transform = `perspective(${Y}px) rotateY(${q}deg) translate3d(-100%, 0, 0)`;
1735
+ o.style.willChange = "transform", o.style.backfaceVisibility = "hidden", o.style.contain = "layout paint", o.style.transform = `perspective(${k}px) rotateY(${q}deg) translate3d(-100%, 0, 0)`;
1667
1736
  }), {}),
1668
1737
  animation: ({ from: n, to: s }) => {
1669
1738
  const o = new g({
1670
1739
  element: n,
1671
- integrator: y.from(t),
1672
- style: (i) => {
1673
- const l = -i * q, c = i * 100;
1740
+ integrator: m.from(t),
1741
+ style: (r) => {
1742
+ const l = -r * q, c = r * 100;
1674
1743
  return {
1675
- transform: `perspective(${Y}px) rotateY(${l}deg) translate3d(${c}%, 0, 0)`
1744
+ transform: `perspective(${k}px) rotateY(${l}deg) translate3d(${c}%, 0, 0)`
1676
1745
  };
1746
+ },
1747
+ // The outgoing node is reused (Activity/cacheComponents re-hide it),
1748
+ // so restore every inline style we wrote to `from` — mirroring the
1749
+ // incoming cleanup below, plus the out-only `pointerEvents`.
1750
+ onComplete: () => {
1751
+ n.style.transform = "", n.style.willChange = "auto", n.style.backfaceVisibility = "", n.style.contain = "", n.style.pointerEvents = "";
1677
1752
  }
1678
- }), r = new g({
1753
+ }), i = new g({
1679
1754
  element: s,
1680
- integrator: y.from(t),
1681
- style: (i, l) => {
1755
+ integrator: m.from(t),
1756
+ style: (r, l) => {
1682
1757
  const c = l * q, a = -l * 100;
1683
1758
  return {
1684
- transform: `perspective(${Y}px) rotateY(${c}deg) translate3d(${a}%, 0, 0)`
1759
+ transform: `perspective(${k}px) rotateY(${c}deg) translate3d(${a}%, 0, 0)`
1685
1760
  };
1686
1761
  },
1687
1762
  onComplete: () => {
1688
1763
  s.style.transform = "", s.style.willChange = "auto", s.style.backfaceVisibility = "", s.style.contain = "";
1689
1764
  }
1690
1765
  });
1691
- return new E([o, r], { mode: "sequence" });
1766
+ return new E([o, i], { mode: "sequence" });
1692
1767
  }
1693
1768
  };
1694
1769
  };
1695
- function Ts(e) {
1770
+ function vs(e) {
1696
1771
  const { paths: t } = e;
1697
- return T(t, () => Mn());
1772
+ return v(t, () => Un());
1698
1773
  }
1699
- function Un({
1774
+ function Vn({
1700
1775
  enterRect: e,
1701
1776
  exitRect: t,
1702
1777
  pageRect: n,
1703
1778
  scrollOffset: s,
1704
1779
  enterRadius: o,
1705
- exitRadius: r
1780
+ exitRadius: i
1706
1781
  }) {
1707
- const i = 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, f = (n.width - (e.left + e.width)) / n.width * 100, d = (n.height - (e.top + e.height)) / n.height * 100, m = e.left / n.width * 100;
1782
+ 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, f = (n.height - (e.top + e.height)) / n.height * 100, u = e.left / n.width * 100;
1708
1783
  return {
1709
1784
  transformOrigin: `${e.left + e.width / 2}px ${e.top + e.height / 2}px`,
1710
- animate: (h) => {
1711
- const u = 1 - h, w = 1 + (c - 1) * u, $ = 1 + (a - 1) * u, x = (r * u + o * (1 - u)) / ((w + $) / 2);
1785
+ animate: (y) => {
1786
+ const h = 1 - y, w = 1 + (c - 1) * h, S = 1 + (a - 1) * h, x = (i * h + o * (1 - h)) / ((w + S) / 2);
1712
1787
  return {
1713
- clipPath: `inset(${p * u}% ${f * u}% ${d * u}% ${m * u}% round ${x}px)`,
1714
- transform: `translate(${i * u}px, ${l * u}px) scale(${w}, ${$})`
1788
+ clipPath: `inset(${p * h}% ${d * h}% ${f * h}% ${u * h}% round ${x}px)`,
1789
+ transform: `translate(${r * h}px, ${l * h}px) scale(${w}, ${S})`
1715
1790
  };
1716
1791
  }
1717
1792
  };
1718
1793
  }
1719
- function Nn({
1794
+ function zn({
1720
1795
  enterRect: e,
1721
1796
  exitRect: t,
1722
1797
  pageRect: n,
1723
1798
  scrollOffset: s,
1724
1799
  enterRadius: o,
1725
- exitRadius: r
1800
+ exitRadius: i
1726
1801
  }) {
1727
- const i = 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, f = (n.width - (e.left + e.width)) / n.width * 100, d = (n.height - (e.top + e.height)) / n.height * 100, m = e.left / n.width * 100;
1802
+ 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, f = (n.height - (e.top + e.height)) / n.height * 100, u = e.left / n.width * 100;
1728
1803
  return {
1729
1804
  transformOrigin: `${e.left + e.width / 2}px ${e.top + e.height / 2}px`,
1730
- animate: (h) => {
1731
- const u = 1 - h, w = 1 + (c - 1) * u, $ = 1 + (a - 1) * u, x = (o * (1 - u) + r * u) / ((w + $) / 2);
1805
+ animate: (y) => {
1806
+ const h = 1 - y, w = 1 + (c - 1) * h, S = 1 + (a - 1) * h, x = (o * (1 - h) + i * h) / ((w + S) / 2);
1732
1807
  return {
1733
- clipPath: `inset(${p * u}% ${f * u}% ${d * u}% ${m * u}% round ${x}px)`,
1734
- transform: `translate(${i * u - s.x}px, ${l * u}px) scale(${w}, ${$})`
1808
+ clipPath: `inset(${p * h}% ${d * h}% ${f * h}% ${u * h}% round ${x}px)`,
1809
+ transform: `translate(${r * h - s.x}px, ${l * h}px) scale(${w}, ${S})`
1735
1810
  };
1736
1811
  }
1737
1812
  };
1738
1813
  }
1739
- const zn = {
1814
+ const Nn = {
1740
1815
  spring: {
1741
1816
  stiffness: 430,
1742
1817
  damping: 33,
1743
1818
  doubleSpring: 1
1744
1819
  }
1745
- }, Dt = 0.12, Xn = 18;
1820
+ }, It = 0.12, Xn = 18;
1746
1821
  function Rn() {
1747
1822
  return {
1748
1823
  transformOrigin: "50% 50%",
1749
1824
  animate: (e) => {
1750
1825
  const t = 1 - e;
1751
1826
  return {
1752
- transform: `scale(${1 - Dt * t})`
1827
+ transform: `scale(${1 - It * t})`
1753
1828
  };
1754
1829
  }
1755
1830
  };
1756
1831
  }
1757
- function Vn() {
1832
+ function Bn() {
1758
1833
  return {
1759
1834
  transformOrigin: "50% 50%",
1760
1835
  animate: (e) => {
1761
1836
  const t = 1 - e;
1762
1837
  return {
1763
- transform: `scale(${1 - Dt * t})`
1838
+ transform: `scale(${1 - It * t})`
1764
1839
  };
1765
1840
  }
1766
1841
  };
@@ -1789,22 +1864,22 @@ const j = {
1789
1864
  };
1790
1865
  }
1791
1866
  };
1792
- class Bn {
1867
+ class Wn {
1793
1868
  constructor() {
1794
- b(this, "physics", zn);
1869
+ $(this, "physics", Nn);
1795
1870
  }
1796
1871
  contribute(t) {
1797
- const { from: n, to: s, resolved: o, physics: r } = t, i = o.mode === "enter", l = i ? n : s, c = i ? Rn() : Vn();
1872
+ const { from: n, to: s, resolved: o, physics: i } = t, r = o.mode === "enter", l = r ? n : s, c = r ? Rn() : Bn();
1798
1873
  return c && (l.style.transformOrigin = c.transformOrigin), [
1799
1874
  new g({
1800
1875
  element: l,
1801
- integrator: y.from(r),
1802
- style: i ? (a, p) => c.animate(p) : (a) => c.animate(a)
1876
+ integrator: m.from(i),
1877
+ style: r ? (a, p) => c.animate(p) : (a) => c.animate(a)
1803
1878
  })
1804
1879
  ];
1805
1880
  }
1806
1881
  }
1807
- class Wn {
1882
+ class Zn {
1808
1883
  prepare(t) {
1809
1884
  const n = t.createElement("zoom-overlay");
1810
1885
  return Object.assign(n.style, j.initialStyle), n.style.willChange = j.willChange, t.context.positionedParent.appendChild(n), { overlay: n };
@@ -1814,25 +1889,25 @@ class Wn {
1814
1889
  return n ? (n.style.zIndex = t.resolved.mode === "enter" ? "-1" : "1", [
1815
1890
  new g({
1816
1891
  element: n,
1817
- integrator: y.from(t.physics),
1892
+ integrator: m.from(t.physics),
1818
1893
  style: (s) => j.style(t.resolved.mode, s)
1819
1894
  })
1820
1895
  ]) : [];
1821
1896
  }
1822
1897
  }
1823
- const Zn = {
1898
+ const qn = {
1824
1899
  spring: {
1825
1900
  stiffness: 430,
1826
1901
  damping: 33,
1827
1902
  doubleSpring: 1
1828
1903
  }
1829
1904
  };
1830
- function qn({
1905
+ function jn({
1831
1906
  enterRect: e,
1832
1907
  exitRect: t,
1833
1908
  scrollOffset: n
1834
1909
  }) {
1835
- 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, r = e.width / t.width, i = e.height / t.height, l = Math.max(r, i);
1910
+ 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);
1836
1911
  return {
1837
1912
  transformOrigin: `${t.left + t.width / 2}px ${t.top + t.height / 2}px`,
1838
1913
  animate: (c) => {
@@ -1843,12 +1918,12 @@ function qn({
1843
1918
  }
1844
1919
  };
1845
1920
  }
1846
- function jn({
1921
+ function Kn({
1847
1922
  enterRect: e,
1848
1923
  exitRect: t,
1849
1924
  scrollOffset: n
1850
1925
  }) {
1851
- 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, r = e.width / t.width, i = e.height / t.height, l = Math.max(r, i);
1926
+ 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);
1852
1927
  return {
1853
1928
  transformOrigin: `${t.left + t.width / 2}px ${t.top + t.height / 2}px`,
1854
1929
  animate: (c) => {
@@ -1859,64 +1934,64 @@ function jn({
1859
1934
  }
1860
1935
  };
1861
1936
  }
1862
- class Kn {
1937
+ class Gn {
1863
1938
  constructor() {
1864
- b(this, "physics", Zn);
1939
+ $(this, "physics", qn);
1865
1940
  }
1866
1941
  contribute(t) {
1867
- const { from: n, to: s, resolved: o, input: r, physics: i } = t, l = o.mode === "enter", c = l ? n : s, a = l ? qn(r) : jn(r);
1942
+ const { from: n, to: s, resolved: o, input: i, physics: r } = t, l = o.mode === "enter", c = l ? n : s, a = l ? jn(i) : Kn(i);
1868
1943
  return a && (c.style.transformOrigin = a.transformOrigin), [
1869
1944
  new g({
1870
1945
  element: c,
1871
- integrator: y.from(i),
1872
- style: l ? (p, f) => a.animate(f) : (p) => a.animate(p)
1946
+ integrator: m.from(r),
1947
+ style: l ? (p, d) => a.animate(d) : (p) => a.animate(p)
1873
1948
  })
1874
1949
  ];
1875
1950
  }
1876
1951
  }
1877
- const Gn = {
1952
+ const Jn = {
1878
1953
  spring: {
1879
1954
  stiffness: 530,
1880
1955
  damping: 34,
1881
1956
  doubleSpring: 1
1882
1957
  }
1883
1958
  };
1884
- class Jn {
1959
+ class Qn {
1885
1960
  constructor() {
1886
- b(this, "physics", Gn);
1961
+ $(this, "physics", Jn);
1887
1962
  }
1888
1963
  contribute(t) {
1889
1964
  return [];
1890
1965
  }
1891
1966
  }
1892
- const Qn = {
1893
- expand: () => new Kn(),
1894
- static: () => new Jn(),
1895
- blur: () => new Bn()
1967
+ const ts = {
1968
+ expand: () => new Gn(),
1969
+ static: () => new Qn(),
1970
+ blur: () => new Wn()
1896
1971
  };
1897
- function ts(e) {
1898
- return Qn[e]();
1972
+ function es(e) {
1973
+ return ts[e]();
1899
1974
  }
1900
- const K = "data-zoom-enter-key", Et = "data-zoom-exit-key", es = "data-zoom-radius";
1901
- function xt(e) {
1902
- const t = e.getAttribute(es);
1975
+ const K = "data-zoom-enter-key", Et = "data-zoom-exit-key", ns = "data-zoom-radius";
1976
+ function Ct(e) {
1977
+ const t = e.getAttribute(ns);
1903
1978
  if (!t) return 0;
1904
1979
  const n = parseFloat(t);
1905
1980
  return Number.isFinite(n) && n > 0 ? n : 0;
1906
1981
  }
1907
- function ns(e, t) {
1982
+ function ss(e, t) {
1908
1983
  const n = [];
1909
1984
  let s = t;
1910
1985
  for (; s && s !== e; ) {
1911
1986
  const o = s.parentElement;
1912
1987
  if (!o) break;
1913
- for (const r of Array.from(o.children))
1914
- r !== s && r instanceof HTMLElement && n.push(r);
1988
+ for (const i of Array.from(o.children))
1989
+ i !== s && i instanceof HTMLElement && n.push(i);
1915
1990
  s = o;
1916
1991
  }
1917
1992
  return n;
1918
1993
  }
1919
- function Ct(e) {
1994
+ function xt(e) {
1920
1995
  const t = e.querySelectorAll(`[${K}]`);
1921
1996
  return t.length !== 1 ? null : t[0];
1922
1997
  }
@@ -1927,36 +2002,36 @@ function Pt(e, t) {
1927
2002
  return s;
1928
2003
  return null;
1929
2004
  }
1930
- function ss(e, t) {
1931
- const n = Ct(e), s = Ct(t);
2005
+ function os(e, t) {
2006
+ const n = xt(e), s = xt(t);
1932
2007
  if (!n && s) {
1933
2008
  const o = s.getAttribute(K);
1934
2009
  if (!o) return null;
1935
- const r = Pt(e, o);
1936
- return r ? { mode: "enter", enterEl: s, exitEl: r } : null;
2010
+ const i = Pt(e, o);
2011
+ return i ? { mode: "enter", enterEl: s, exitEl: i } : null;
1937
2012
  }
1938
2013
  if (n && !s) {
1939
2014
  const o = n.getAttribute(K);
1940
2015
  if (!o) return null;
1941
- const r = Pt(t, o);
1942
- return r ? { mode: "exit", enterEl: n, exitEl: r } : null;
2016
+ const i = Pt(t, o);
2017
+ return i ? { mode: "exit", enterEl: n, exitEl: i } : null;
1943
2018
  }
1944
2019
  return null;
1945
2020
  }
1946
- function os(e, t, n, s) {
2021
+ function is(e, t, n, s) {
1947
2022
  return {
1948
- enterRect: O(
2023
+ enterRect: A(
1949
2024
  e.mode === "enter" ? n : t,
1950
2025
  e.enterEl
1951
2026
  ),
1952
- exitRect: O(
2027
+ exitRect: A(
1953
2028
  e.mode === "enter" ? t : n,
1954
2029
  e.exitEl
1955
2030
  ),
1956
2031
  pageRect: e.mode === "enter" ? n.getBoundingClientRect() : t.getBoundingClientRect(),
1957
2032
  scrollOffset: s,
1958
- enterRadius: xt(e.enterEl),
1959
- exitRadius: xt(e.exitEl)
2033
+ enterRadius: Ct(e.enterEl),
2034
+ exitRadius: Ct(e.exitEl)
1960
2035
  };
1961
2036
  }
1962
2037
  class rs {
@@ -1966,75 +2041,75 @@ class rs {
1966
2041
  });
1967
2042
  }
1968
2043
  contribute(t) {
1969
- const { from: n, to: s, resolved: o, input: r, physics: i, onComplete: l } = t, c = o.mode === "enter", a = c ? Un(r) : Nn(r), p = c ? s : n, f = c ? "t" : "u";
2044
+ const { from: n, to: s, resolved: o, input: i, physics: r, onComplete: l } = t, c = o.mode === "enter", a = c ? Vn(i) : zn(i), p = c ? s : n, d = c ? "t" : "u";
1970
2045
  a && (p.style.transformOrigin = a.transformOrigin);
1971
- const d = c ? "-2" : "2", m = n.style.zIndex;
1972
- return n.style.zIndex = d, l(() => {
1973
- p.style.willChange = "auto", p.style.backfaceVisibility = "", p.style.transformOrigin = "", p.style.contain = "", n.style.zIndex = m;
2046
+ const f = c ? "-2" : "2", u = n.style.zIndex;
2047
+ return n.style.zIndex = f, l(() => {
2048
+ p.style.willChange = "auto", p.style.backfaceVisibility = "", p.style.transformOrigin = "", p.style.contain = "", n.style.zIndex = u, n.style.willChange = "auto", n.style.backfaceVisibility = "", n.style.transformOrigin = "", n.style.contain = "", n.style.transform = "", n.style.clipPath = "";
1974
2049
  }), [
1975
2050
  new g({
1976
2051
  element: p,
1977
- integrator: y.from(i),
2052
+ integrator: m.from(r),
1978
2053
  // Enter: tile expands as `t` (0 → 1). Exit: tile shrinks as `u` —
1979
2054
  // the legacy convention from v5's outAnim path. Either way, feed
1980
2055
  // the progress that matches the tileConfig's authored direction.
1981
- style: f === "t" ? (h) => a.animate(h) : (h, u) => a.animate(u)
2056
+ style: d === "t" ? (y) => a.animate(y) : (y, h) => a.animate(h)
1982
2057
  })
1983
2058
  ];
1984
2059
  }
1985
2060
  }
1986
- class is {
2061
+ class as {
1987
2062
  contribute(t) {
1988
- const { resolved: n, physics: s, from: o, to: r, onComplete: i } = t, l = n.mode === "enter" ? r : o, c = ns(l, n.enterEl);
2063
+ const { resolved: n, physics: s, from: o, to: i, onComplete: r } = t, l = n.mode === "enter" ? i : o, c = ss(l, n.enterEl);
1989
2064
  if (c.length === 0) return [];
1990
2065
  const a = c.map((p) => p.style.opacity);
1991
2066
  if (n.mode === "enter")
1992
2067
  for (const p of c) p.style.opacity = "0";
1993
- return i(() => {
2068
+ return r(() => {
1994
2069
  for (let p = 0; p < c.length; p++) {
1995
- const f = c[p];
1996
- f && (f.style.opacity = a[p] ?? "");
2070
+ const d = c[p];
2071
+ d && (d.style.opacity = a[p] ?? "");
1997
2072
  }
1998
2073
  }), c.map(
1999
2074
  (p) => new g({
2000
2075
  element: p,
2001
- integrator: y.from(s),
2002
- style: (f, d) => ({
2003
- opacity: n.mode === "enter" ? f : d
2076
+ integrator: m.from(s),
2077
+ style: (d, f) => ({
2078
+ opacity: n.mode === "enter" ? d : f
2004
2079
  })
2005
2080
  })
2006
2081
  );
2007
2082
  }
2008
2083
  }
2009
- class vt {
2084
+ class Tt {
2010
2085
  contribute() {
2011
2086
  return [];
2012
2087
  }
2013
2088
  }
2014
- const as = {
2015
- default: () => new vt(),
2016
- fade: () => new is()
2089
+ const ls = {
2090
+ default: () => new Tt(),
2091
+ fade: () => new as()
2017
2092
  };
2018
- function ls(e) {
2019
- return as[e]();
2093
+ function cs(e) {
2094
+ return ls[e]();
2020
2095
  }
2021
- class cs extends vt {
2096
+ class ps extends Tt {
2022
2097
  }
2023
- function ps(e) {
2024
- const t = ts(e.type);
2098
+ function ds(e) {
2099
+ const t = es(e.type);
2025
2100
  return { strategies: [
2026
2101
  new rs(),
2027
2102
  t,
2028
- ls(e.variant),
2029
- new cs(),
2103
+ cs(e.variant),
2104
+ new ps(),
2030
2105
  // Overlay is intrinsically tied to backdrop-filter-driven types. Today
2031
2106
  // that's only `blur`; the table-driven factory above owns the mapping
2032
2107
  // so this conditional is the single line that knows the relationship.
2033
- ...e.type === "blur" ? [new Wn()] : []
2108
+ ...e.type === "blur" ? [new Zn()] : []
2034
2109
  ], physics: t.physics };
2035
2110
  }
2036
2111
  const fs = (e) => {
2037
- const { strategies: t, physics: n } = ps(e);
2112
+ const { strategies: t, physics: n } = ds(e);
2038
2113
  return {
2039
2114
  prepare: (s) => {
2040
2115
  const o = {
@@ -2045,55 +2120,55 @@ const fs = (e) => {
2045
2120
  // strategy interface narrows the cast to keep both signatures
2046
2121
  // compatible.
2047
2122
  createElement: s.createElement
2048
- }, r = {};
2049
- for (const i of t) {
2050
- if (!i.prepare) continue;
2051
- const l = i.prepare(o);
2052
- l && Object.assign(r, l);
2123
+ }, i = {};
2124
+ for (const r of t) {
2125
+ if (!r.prepare) continue;
2126
+ const l = r.prepare(o);
2127
+ l && Object.assign(i, l);
2053
2128
  }
2054
- return r;
2129
+ return i;
2055
2130
  },
2056
- animation: ({ from: s, to: o, context: r, ...i }) => {
2057
- const l = ss(s, o);
2131
+ animation: ({ from: s, to: o, context: i, ...r }) => {
2132
+ const l = os(s, o);
2058
2133
  if (!l)
2059
2134
  return new E([], { mode: "parallel" });
2060
- const c = os(l, s, o, r.scrollOffset), a = [], f = {
2135
+ const c = is(l, s, o, i.scrollOffset), a = [], d = {
2061
2136
  from: s,
2062
2137
  to: o,
2063
2138
  resolved: l,
2064
2139
  input: c,
2065
2140
  physics: n,
2066
- extras: i,
2067
- onComplete: (h) => {
2068
- a.push(h);
2141
+ extras: r,
2142
+ onComplete: (y) => {
2143
+ a.push(y);
2069
2144
  }
2070
- }, d = [];
2071
- for (const h of t)
2072
- h.contribute && d.push(...h.contribute(f));
2073
- const m = d[0];
2074
- if (m) {
2075
- const h = m.onComplete;
2076
- m.onComplete = () => {
2077
- h == null || h();
2078
- for (const u of a)
2145
+ }, f = [];
2146
+ for (const y of t)
2147
+ y.contribute && f.push(...y.contribute(d));
2148
+ const u = f[0];
2149
+ if (u) {
2150
+ const y = u.onComplete;
2151
+ u.onComplete = () => {
2152
+ y == null || y();
2153
+ for (const h of a)
2079
2154
  try {
2080
- u();
2155
+ h();
2081
2156
  } catch (w) {
2082
2157
  console.error("[zoom] cleanup error", w);
2083
2158
  }
2084
2159
  };
2085
2160
  }
2086
- return new E(d, { mode: "parallel" });
2161
+ return new E(f, { mode: "parallel" });
2087
2162
  }
2088
2163
  };
2089
2164
  };
2090
- function ds(e) {
2165
+ function ys(e) {
2091
2166
  const t = e.type ?? "static", n = e.variant ?? (e.fade ? "fade" : "default");
2092
2167
  return { type: t, variant: n };
2093
2168
  }
2094
- function Ds(e) {
2095
- const t = ds(e);
2096
- return T(
2169
+ function Is(e) {
2170
+ const t = ys(e);
2171
+ return v(
2097
2172
  e.paths,
2098
2173
  () => fs(t)
2099
2174
  );
@@ -2102,17 +2177,17 @@ export {
2102
2177
  As as Animation,
2103
2178
  E as MultiAnimation,
2104
2179
  g as WebAnimation,
2105
- ys as axis,
2106
- gs as blind,
2107
- ws as drill,
2108
- Ss as fade,
2109
- bs as film,
2110
- $s as hero,
2111
- Es as jaemin,
2180
+ gs as axis,
2181
+ ws as blind,
2182
+ Ss as drill,
2183
+ bs as fade,
2184
+ $s as film,
2185
+ Es as hero,
2186
+ Cs as jaemin,
2112
2187
  xs as rotate,
2113
- Cs as scroll,
2114
- Ps as sheet,
2115
- _s as slide,
2116
- Ts as strip,
2117
- Ds as zoom
2188
+ Ps as scroll,
2189
+ _s as sheet,
2190
+ Ds as slide,
2191
+ vs as strip,
2192
+ Is as zoom
2118
2193
  };