@ssgoi/core 3.5.0 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/animator/integrator/double-spring-integrator.d.ts +31 -0
- package/dist/animator/integrator/double-spring-integrator.d.ts.map +1 -0
- package/dist/animator/integrator/index.d.ts +13 -0
- package/dist/animator/integrator/index.d.ts.map +1 -0
- package/dist/animator/integrator/inertia-integrator.d.ts +34 -0
- package/dist/animator/integrator/inertia-integrator.d.ts.map +1 -0
- package/dist/animator/integrator/provider.d.ts +22 -0
- package/dist/animator/integrator/provider.d.ts.map +1 -0
- package/dist/animator/integrator/spring-integrator.d.ts +19 -0
- package/dist/animator/integrator/spring-integrator.d.ts.map +1 -0
- package/dist/animator/integrator/types.d.ts +34 -0
- package/dist/animator/integrator/types.d.ts.map +1 -0
- package/dist/animator/multi-animator.d.ts +18 -13
- package/dist/animator/multi-animator.d.ts.map +1 -1
- package/dist/animator/{animate → runner}/css-runner.d.ts +2 -2
- package/dist/animator/runner/css-runner.d.ts.map +1 -0
- package/dist/animator/runner/provider.d.ts +35 -0
- package/dist/animator/runner/provider.d.ts.map +1 -0
- package/dist/animator/{animate → runner}/tick-runner.d.ts +2 -2
- package/dist/animator/runner/tick-runner.d.ts.map +1 -0
- package/dist/animator/runner/ticker.d.ts.map +1 -0
- package/dist/animator/{animate → runner}/types.d.ts +6 -3
- package/dist/animator/runner/types.d.ts.map +1 -0
- package/dist/animator/{index.d.ts → single-animator.d.ts} +22 -12
- package/dist/animator/single-animator.d.ts.map +1 -0
- package/dist/animator/{animation.d.ts → types.d.ts} +2 -2
- package/dist/animator/types.d.ts.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +552 -569
- package/dist/provider-Cs5iBqRD.cjs +1 -0
- package/dist/provider-Cu4NSF1Q.js +167 -0
- package/dist/transition/create-transition-callback.d.ts.map +1 -1
- package/dist/transition/transition-strategy.d.ts +8 -8
- package/dist/transition/transition-strategy.d.ts.map +1 -1
- package/dist/transitions/blur.d.ts +4 -4
- package/dist/transitions/blur.d.ts.map +1 -1
- package/dist/transitions/bounce.d.ts +4 -4
- package/dist/transitions/bounce.d.ts.map +1 -1
- package/dist/transitions/fade.d.ts +4 -4
- package/dist/transitions/fade.d.ts.map +1 -1
- package/dist/transitions/index.cjs +1 -1
- package/dist/transitions/index.d.ts +5 -0
- package/dist/transitions/index.d.ts.map +1 -1
- package/dist/transitions/index.js +141 -191
- package/dist/transitions/rotate.d.ts +4 -4
- package/dist/transitions/rotate.d.ts.map +1 -1
- package/dist/transitions/scale.d.ts +4 -4
- package/dist/transitions/scale.d.ts.map +1 -1
- package/dist/transitions/slide.d.ts +4 -4
- package/dist/transitions/slide.d.ts.map +1 -1
- package/dist/transitions/utils.d.ts +8 -0
- package/dist/transitions/utils.d.ts.map +1 -0
- package/dist/types.cjs +1 -1
- package/dist/types.d.ts +124 -38
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +41 -48
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/wait-paint.d.ts +15 -0
- package/dist/utils/wait-paint.d.ts.map +1 -0
- package/dist/view-transitions/blind.d.ts +2 -3
- package/dist/view-transitions/blind.d.ts.map +1 -1
- package/dist/view-transitions/curtain-reveal.d.ts +2 -3
- package/dist/view-transitions/curtain-reveal.d.ts.map +1 -1
- package/dist/view-transitions/depth.d.ts +2 -2
- package/dist/view-transitions/depth.d.ts.map +1 -1
- package/dist/view-transitions/drill.d.ts +2 -2
- package/dist/view-transitions/drill.d.ts.map +1 -1
- package/dist/view-transitions/fade.d.ts +2 -3
- package/dist/view-transitions/fade.d.ts.map +1 -1
- package/dist/view-transitions/film.d.ts +2 -1
- package/dist/view-transitions/film.d.ts.map +1 -1
- package/dist/view-transitions/hero.d.ts +2 -2
- package/dist/view-transitions/hero.d.ts.map +1 -1
- package/dist/view-transitions/index.cjs +19 -19
- package/dist/view-transitions/index.d.ts +1 -0
- package/dist/view-transitions/index.d.ts.map +1 -1
- package/dist/view-transitions/index.js +874 -869
- package/dist/view-transitions/instagram.d.ts +2 -2
- package/dist/view-transitions/instagram.d.ts.map +1 -1
- package/dist/view-transitions/jaemin.d.ts +2 -2
- package/dist/view-transitions/jaemin.d.ts.map +1 -1
- package/dist/view-transitions/pinterest.d.ts +2 -2
- package/dist/view-transitions/pinterest.d.ts.map +1 -1
- package/dist/view-transitions/rotate.d.ts +5 -2
- package/dist/view-transitions/rotate.d.ts.map +1 -1
- package/dist/view-transitions/scroll.d.ts +2 -2
- package/dist/view-transitions/scroll.d.ts.map +1 -1
- package/dist/view-transitions/sheet.d.ts +2 -2
- package/dist/view-transitions/sheet.d.ts.map +1 -1
- package/dist/view-transitions/slide.d.ts +2 -2
- package/dist/view-transitions/slide.d.ts.map +1 -1
- package/dist/view-transitions/snap.d.ts +14 -0
- package/dist/view-transitions/snap.d.ts.map +1 -0
- package/dist/view-transitions/strip.d.ts +6 -2
- package/dist/view-transitions/strip.d.ts.map +1 -1
- package/dist/view-transitions/swap.d.ts +2 -2
- package/dist/view-transitions/swap.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/animator/animate/css-runner.d.ts.map +0 -1
- package/dist/animator/animate/index.d.ts +0 -42
- package/dist/animator/animate/index.d.ts.map +0 -1
- package/dist/animator/animate/tick-runner.d.ts.map +0 -1
- package/dist/animator/animate/types.d.ts.map +0 -1
- package/dist/animator/animation.d.ts.map +0 -1
- package/dist/animator/index.d.ts.map +0 -1
- package/dist/animator/spring-core.d.ts +0 -82
- package/dist/animator/spring-core.d.ts.map +0 -1
- package/dist/animator/ticker.d.ts.map +0 -1
- /package/dist/animator/{ticker.d.ts → runner/ticker.d.ts} +0 -0
package/dist/index.js
CHANGED
|
@@ -1,64 +1,65 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import {
|
|
5
|
-
import { isCssAnimation as
|
|
6
|
-
|
|
1
|
+
var J = Object.defineProperty;
|
|
2
|
+
var Q = (n, i, t) => i in n ? J(n, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[i] = t;
|
|
3
|
+
var d = (n, i, t) => Q(n, typeof i != "symbol" ? i + "" : i, t);
|
|
4
|
+
import { normalizeToMultiAnimation as R, normalizeSchedule as N } from "./types.js";
|
|
5
|
+
import { isCssAnimation as Lt, isMultiAnimation as Dt, isSingleAnimation as zt, isTickAnimation as qt } from "./types.js";
|
|
6
|
+
import { S as Y, I as Z, a as tt } from "./provider-Cu4NSF1Q.js";
|
|
7
|
+
class et {
|
|
7
8
|
constructor() {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
d(this, "listeners", /* @__PURE__ */ new Set());
|
|
10
|
+
d(this, "rafId", null);
|
|
11
|
+
d(this, "isRunning", !1);
|
|
11
12
|
// Timing
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
d(this, "startTime", Date.now());
|
|
14
|
+
d(this, "lastUpdate", this.startTime);
|
|
15
|
+
d(this, "elapsed", 0);
|
|
15
16
|
// Lag smoothing (mobile optimization)
|
|
16
|
-
|
|
17
|
+
d(this, "lagThreshold", 500);
|
|
17
18
|
// ms - detect tab switches, backgrounding
|
|
18
|
-
|
|
19
|
+
d(this, "adjustedLag", 33);
|
|
19
20
|
// ms - max time jump to prevent animation skip
|
|
20
|
-
|
|
21
|
+
d(this, "maxDeltaTime", 33);
|
|
21
22
|
// ms - clamp for physics stability (30fps minimum)
|
|
22
23
|
// FPS throttling
|
|
23
|
-
|
|
24
|
+
d(this, "gap", 1e3 / 240);
|
|
24
25
|
// max 240fps
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const
|
|
28
|
-
let
|
|
29
|
-
|
|
30
|
-
const
|
|
26
|
+
d(this, "nextTime", this.gap);
|
|
27
|
+
d(this, "tick", () => {
|
|
28
|
+
const i = Date.now();
|
|
29
|
+
let e = i - this.lastUpdate;
|
|
30
|
+
e > this.lagThreshold || e < 0 ? (this.startTime += e - this.adjustedLag, e = this.adjustedLag) : e > this.maxDeltaTime && (e = this.maxDeltaTime), this.lastUpdate = i;
|
|
31
|
+
const o = i - this.startTime, s = o - this.nextTime;
|
|
31
32
|
if (s > 0) {
|
|
32
|
-
const
|
|
33
|
-
this.elapsed =
|
|
34
|
-
|
|
33
|
+
const c = e / 1e3;
|
|
34
|
+
this.elapsed = o / 1e3, this.nextTime += s + (s >= this.gap ? 4 : this.gap - s), this.listeners.forEach((r) => {
|
|
35
|
+
r(c, this.elapsed);
|
|
35
36
|
});
|
|
36
37
|
}
|
|
37
38
|
this.listeners.size > 0 ? this.rafId = requestAnimationFrame(this.tick) : (this.isRunning = !1, this.rafId = null);
|
|
38
39
|
});
|
|
39
40
|
}
|
|
40
|
-
subscribe(
|
|
41
|
-
return this.listeners.add(
|
|
42
|
-
this.unsubscribe(
|
|
41
|
+
subscribe(i) {
|
|
42
|
+
return this.listeners.add(i), this.isRunning || (this.isRunning = !0, this.rafId = requestAnimationFrame(this.tick)), () => {
|
|
43
|
+
this.unsubscribe(i);
|
|
43
44
|
};
|
|
44
45
|
}
|
|
45
|
-
unsubscribe(
|
|
46
|
-
this.listeners.delete(
|
|
46
|
+
unsubscribe(i) {
|
|
47
|
+
this.listeners.delete(i), this.listeners.size === 0 && this.rafId !== null && (cancelAnimationFrame(this.rafId), this.isRunning = !1, this.rafId = null);
|
|
47
48
|
}
|
|
48
49
|
/**
|
|
49
50
|
* Configure lag smoothing behavior
|
|
50
51
|
* @param threshold - Time threshold to detect lag (default: 500ms)
|
|
51
52
|
* @param adjustedLag - Max time jump when lag detected (default: 33ms)
|
|
52
53
|
*/
|
|
53
|
-
lagSmoothing(
|
|
54
|
-
this.lagThreshold =
|
|
54
|
+
lagSmoothing(i, t) {
|
|
55
|
+
this.lagThreshold = i, this.adjustedLag = Math.min(t, i);
|
|
55
56
|
}
|
|
56
57
|
/**
|
|
57
58
|
* Set maximum FPS
|
|
58
59
|
* @param fps - Target FPS (default: 240)
|
|
59
60
|
*/
|
|
60
|
-
fps(
|
|
61
|
-
this.gap = 1e3 /
|
|
61
|
+
fps(i) {
|
|
62
|
+
this.gap = 1e3 / i, this.nextTime = this.elapsed * 1e3 + this.gap;
|
|
62
63
|
}
|
|
63
64
|
getListenerCount() {
|
|
64
65
|
return this.listeners.size;
|
|
@@ -67,254 +68,229 @@ class ot {
|
|
|
67
68
|
return this.elapsed;
|
|
68
69
|
}
|
|
69
70
|
}
|
|
70
|
-
const D = new
|
|
71
|
-
function
|
|
72
|
-
const e = i.stiffness, t = i.damping, n = 1, r = Math.sqrt(e / n), s = t / (2 * Math.sqrt(e * n)), a = { omega: r, zeta: s };
|
|
73
|
-
if (i.doubleSpring) {
|
|
74
|
-
const o = typeof i.doubleSpring == "number" ? i.doubleSpring : 1, c = e * o, u = Math.sqrt(c / n), f = t / (2 * Math.sqrt(c * n));
|
|
75
|
-
a.follower = { omega: u, zeta: f };
|
|
76
|
-
}
|
|
77
|
-
return a;
|
|
78
|
-
}
|
|
79
|
-
function _(i, e, t, n, r, s) {
|
|
80
|
-
const a = -2 * s * r * n * e, o = s * n * n * (t - i), c = e + a + o;
|
|
81
|
-
return { position: i + s * c, velocity: c };
|
|
82
|
-
}
|
|
83
|
-
function G(i, e, t, n) {
|
|
84
|
-
const r = Math.min(n, 0.033);
|
|
85
|
-
if (t.follower) {
|
|
86
|
-
const u = i._leader ?? {
|
|
87
|
-
position: i.position,
|
|
88
|
-
velocity: i.velocity
|
|
89
|
-
}, f = _(
|
|
90
|
-
u.position,
|
|
91
|
-
u.velocity,
|
|
92
|
-
e,
|
|
93
|
-
t.omega,
|
|
94
|
-
t.zeta,
|
|
95
|
-
r
|
|
96
|
-
), h = _(
|
|
97
|
-
i.position,
|
|
98
|
-
i.velocity,
|
|
99
|
-
f.position,
|
|
100
|
-
t.follower.omega,
|
|
101
|
-
t.follower.zeta,
|
|
102
|
-
r
|
|
103
|
-
);
|
|
104
|
-
return {
|
|
105
|
-
position: h.position,
|
|
106
|
-
velocity: h.velocity,
|
|
107
|
-
_leader: f
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
const { omega: s, zeta: a } = t, o = _(
|
|
111
|
-
i.position,
|
|
112
|
-
i.velocity,
|
|
113
|
-
e,
|
|
114
|
-
s,
|
|
115
|
-
a,
|
|
116
|
-
r
|
|
117
|
-
);
|
|
118
|
-
return {
|
|
119
|
-
position: o.position,
|
|
120
|
-
velocity: o.velocity
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
const U = 0.01, W = 0.01, $ = 0.05;
|
|
124
|
-
function B(i, e) {
|
|
125
|
-
const t = Math.abs(e - i.position), n = Math.abs(i.velocity), r = t < U && n < W, s = i;
|
|
126
|
-
if (s._leader) {
|
|
127
|
-
const a = Math.abs(e - s._leader.position), o = Math.abs(s._leader.velocity);
|
|
128
|
-
return a < U && o < W && r;
|
|
129
|
-
}
|
|
130
|
-
return r;
|
|
131
|
-
}
|
|
132
|
-
function rt(i) {
|
|
71
|
+
const D = new et();
|
|
72
|
+
function it(n) {
|
|
133
73
|
const {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
velocity:
|
|
74
|
+
integrator: i,
|
|
75
|
+
from: t,
|
|
76
|
+
to: e,
|
|
77
|
+
velocity: o = 0,
|
|
138
78
|
onUpdate: s,
|
|
139
|
-
onComplete:
|
|
140
|
-
onStart:
|
|
141
|
-
} =
|
|
142
|
-
let
|
|
143
|
-
const y =
|
|
79
|
+
onComplete: c,
|
|
80
|
+
onStart: r
|
|
81
|
+
} = n;
|
|
82
|
+
let a = { position: t, velocity: o }, u = !0, m = 0, g = !1;
|
|
83
|
+
const y = (S) => {
|
|
144
84
|
if (u) {
|
|
145
|
-
if (
|
|
146
|
-
if (
|
|
147
|
-
|
|
85
|
+
if (g || (g = !0, r == null || r()), a = i.step(a, e, S), i.isSettled(a, e)) {
|
|
86
|
+
if (m += Math.min(S, 0.033), m >= Y) {
|
|
87
|
+
a = { position: e, velocity: 0 }, u = !1, s(a.position), D.unsubscribe(y), c();
|
|
148
88
|
return;
|
|
149
89
|
}
|
|
150
90
|
} else
|
|
151
|
-
|
|
152
|
-
s(
|
|
91
|
+
m = 0;
|
|
92
|
+
s(a.position);
|
|
153
93
|
}
|
|
154
94
|
};
|
|
155
|
-
return D.subscribe(
|
|
95
|
+
return D.subscribe(y), {
|
|
156
96
|
stop: () => {
|
|
157
|
-
u && (u = !1, D.unsubscribe(
|
|
97
|
+
u && (u = !1, D.unsubscribe(y));
|
|
158
98
|
},
|
|
159
|
-
getPosition: () =>
|
|
160
|
-
getVelocity: () =>
|
|
99
|
+
getPosition: () => a.position,
|
|
100
|
+
getVelocity: () => a.velocity,
|
|
161
101
|
isRunning: () => u
|
|
162
102
|
};
|
|
163
103
|
}
|
|
164
|
-
const
|
|
165
|
-
function
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
position: e,
|
|
104
|
+
const F = 1e3 / 60;
|
|
105
|
+
function nt(n, i, t, e = 0) {
|
|
106
|
+
let s = { position: i, velocity: e }, c = 0;
|
|
107
|
+
const r = [];
|
|
108
|
+
for (let a = 0; a < 600; a++) {
|
|
109
|
+
const u = a * F;
|
|
110
|
+
if (r.push({
|
|
111
|
+
time: u,
|
|
112
|
+
position: s.position,
|
|
113
|
+
velocity: s.velocity
|
|
114
|
+
}), s = n.step(s, t, F / 1e3), n.isSettled(s, t)) {
|
|
115
|
+
if (c += F / 1e3, c >= Y) {
|
|
116
|
+
r.push({
|
|
117
|
+
time: (a + 1) * F,
|
|
118
|
+
position: t,
|
|
180
119
|
velocity: 0
|
|
181
120
|
});
|
|
182
121
|
break;
|
|
183
122
|
}
|
|
184
123
|
} else
|
|
185
|
-
|
|
124
|
+
c = 0;
|
|
186
125
|
}
|
|
187
|
-
return
|
|
126
|
+
return r;
|
|
188
127
|
}
|
|
189
|
-
function
|
|
190
|
-
if (
|
|
128
|
+
function U(n, i) {
|
|
129
|
+
if (n.length === 0)
|
|
191
130
|
return { position: 0, velocity: 0 };
|
|
192
|
-
const t =
|
|
193
|
-
if (
|
|
131
|
+
const t = n[0], e = n[n.length - 1];
|
|
132
|
+
if (i <= 0)
|
|
194
133
|
return { position: t.position, velocity: t.velocity };
|
|
195
|
-
if (
|
|
196
|
-
return { position:
|
|
197
|
-
let
|
|
198
|
-
for (;
|
|
199
|
-
const u = Math.floor((
|
|
200
|
-
|
|
134
|
+
if (i >= e.time)
|
|
135
|
+
return { position: e.position, velocity: e.velocity };
|
|
136
|
+
let o = 0, s = n.length - 1;
|
|
137
|
+
for (; o < s - 1; ) {
|
|
138
|
+
const u = Math.floor((o + s) / 2);
|
|
139
|
+
n[u].time <= i ? o = u : s = u;
|
|
201
140
|
}
|
|
202
|
-
const
|
|
141
|
+
const c = n[o], r = n[s], a = (i - c.time) / (r.time - c.time);
|
|
203
142
|
return {
|
|
204
|
-
position:
|
|
205
|
-
velocity:
|
|
143
|
+
position: c.position + (r.position - c.position) * a,
|
|
144
|
+
velocity: c.velocity + (r.velocity - c.velocity) * a
|
|
206
145
|
};
|
|
207
146
|
}
|
|
208
|
-
function
|
|
209
|
-
return
|
|
147
|
+
function rt(n, i) {
|
|
148
|
+
return n.map((t) => i(t.position));
|
|
210
149
|
}
|
|
211
|
-
function
|
|
150
|
+
function ot(n) {
|
|
212
151
|
const {
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
152
|
+
integrator: i,
|
|
153
|
+
element: t,
|
|
154
|
+
from: e,
|
|
155
|
+
to: o,
|
|
217
156
|
velocity: s = 0,
|
|
218
|
-
style:
|
|
219
|
-
onComplete:
|
|
220
|
-
onStart:
|
|
221
|
-
} =
|
|
157
|
+
style: c,
|
|
158
|
+
onComplete: r,
|
|
159
|
+
onStart: a
|
|
160
|
+
} = n, u = nt(i, e, o, s);
|
|
222
161
|
if (u.length === 0)
|
|
223
|
-
return
|
|
162
|
+
return a == null || a(), r(), {
|
|
224
163
|
stop: () => {
|
|
225
164
|
},
|
|
226
|
-
getPosition: () =>
|
|
165
|
+
getPosition: () => o,
|
|
227
166
|
getVelocity: () => 0,
|
|
228
167
|
isRunning: () => !1
|
|
229
168
|
};
|
|
230
|
-
const
|
|
169
|
+
const m = rt(u, c), g = u[u.length - 1], y = g.time, S = m[0];
|
|
170
|
+
if (S)
|
|
171
|
+
for (const A of Object.keys(S))
|
|
172
|
+
t.style[A] = "";
|
|
173
|
+
const f = t.animate(m, {
|
|
231
174
|
duration: y,
|
|
232
175
|
fill: "forwards",
|
|
233
|
-
easing: "linear"
|
|
176
|
+
easing: "linear",
|
|
177
|
+
composite: "replace"
|
|
234
178
|
});
|
|
235
179
|
let l = !0;
|
|
236
|
-
const
|
|
237
|
-
return
|
|
238
|
-
l && (l = !1,
|
|
180
|
+
const E = performance.now();
|
|
181
|
+
return a == null || a(), f.onfinish = () => {
|
|
182
|
+
l && (l = !1, r());
|
|
239
183
|
}, {
|
|
240
184
|
stop: () => {
|
|
241
|
-
l && (l = !1,
|
|
185
|
+
l && (l = !1, f.cancel());
|
|
242
186
|
},
|
|
243
187
|
getPosition: () => {
|
|
244
188
|
if (!l)
|
|
245
|
-
return
|
|
246
|
-
const A = performance.now() -
|
|
247
|
-
return
|
|
189
|
+
return g.position;
|
|
190
|
+
const A = performance.now() - E;
|
|
191
|
+
return U(u, A).position;
|
|
248
192
|
},
|
|
249
193
|
getVelocity: () => {
|
|
250
194
|
if (!l)
|
|
251
195
|
return 0;
|
|
252
|
-
const A = performance.now() -
|
|
253
|
-
return
|
|
196
|
+
const A = performance.now() - E;
|
|
197
|
+
return U(u, A).velocity;
|
|
254
198
|
},
|
|
255
199
|
isRunning: () => l
|
|
256
200
|
};
|
|
257
201
|
}
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
to: t,
|
|
280
|
-
spring: n,
|
|
281
|
-
velocity: r,
|
|
282
|
-
onUpdate: o,
|
|
283
|
-
onComplete: s,
|
|
284
|
-
onStart: a
|
|
285
|
-
});
|
|
202
|
+
class st {
|
|
203
|
+
/**
|
|
204
|
+
* Get bound runner based on animation mode
|
|
205
|
+
*
|
|
206
|
+
* @param options Animation mode options (tick or css)
|
|
207
|
+
* @returns Bound runner function or null if no animation mode specified
|
|
208
|
+
* @throws Error if both tick and css are provided
|
|
209
|
+
*/
|
|
210
|
+
static from(i) {
|
|
211
|
+
const { tick: t, css: e } = i;
|
|
212
|
+
if (t && e)
|
|
213
|
+
throw new Error("Cannot use both 'tick' and 'css' options together");
|
|
214
|
+
return e ? (o) => ot({
|
|
215
|
+
...o,
|
|
216
|
+
element: e.element,
|
|
217
|
+
style: e.style
|
|
218
|
+
}) : t ? (o) => it({
|
|
219
|
+
...o,
|
|
220
|
+
onUpdate: t
|
|
221
|
+
}) : null;
|
|
222
|
+
}
|
|
286
223
|
}
|
|
287
|
-
class
|
|
224
|
+
class j {
|
|
288
225
|
}
|
|
289
|
-
|
|
226
|
+
const at = { stiffness: 300, damping: 30 };
|
|
227
|
+
class H extends j {
|
|
290
228
|
constructor(t) {
|
|
291
229
|
super();
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
this.options = {
|
|
230
|
+
d(this, "options");
|
|
231
|
+
d(this, "runner");
|
|
232
|
+
d(this, "controls", null);
|
|
233
|
+
d(this, "isAnimating", !1);
|
|
234
|
+
d(this, "currentValue");
|
|
235
|
+
d(this, "currentVelocity", 0);
|
|
236
|
+
d(this, "updateFn");
|
|
237
|
+
if (this.options = {
|
|
300
238
|
from: t.from ?? 0,
|
|
301
239
|
to: t.to ?? 1,
|
|
302
|
-
|
|
303
|
-
tick: t.tick,
|
|
304
|
-
css: t.css,
|
|
240
|
+
physics: t.physics,
|
|
305
241
|
onComplete: t.onComplete ?? (() => {
|
|
306
242
|
}),
|
|
307
243
|
onStart: t.onStart
|
|
308
|
-
}, this.currentValue = this.options.from
|
|
244
|
+
}, this.currentValue = this.options.from, t.tick)
|
|
245
|
+
this.updateFn = (e) => {
|
|
246
|
+
var o;
|
|
247
|
+
return (o = t.tick) == null ? void 0 : o.call(t, e);
|
|
248
|
+
};
|
|
249
|
+
else if (t.css) {
|
|
250
|
+
const { element: e, style: o } = t.css;
|
|
251
|
+
this.updateFn = (s) => {
|
|
252
|
+
const c = o(s);
|
|
253
|
+
for (const [r, a] of Object.entries(c))
|
|
254
|
+
e.style[r] = typeof a == "number" ? String(a) : a;
|
|
255
|
+
};
|
|
256
|
+
} else
|
|
257
|
+
this.updateFn = () => {
|
|
258
|
+
};
|
|
259
|
+
this.runner = st.from({
|
|
260
|
+
tick: t.tick,
|
|
261
|
+
css: t.css
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Sync element state to current progress value
|
|
266
|
+
* Uses the update callback if provided
|
|
267
|
+
*/
|
|
268
|
+
syncState() {
|
|
269
|
+
var t;
|
|
270
|
+
(t = this.updateFn) == null || t.call(this, this.currentValue);
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Create Integrator from physics options
|
|
274
|
+
* Priority: integrator factory > inertia/spring config > default spring
|
|
275
|
+
*/
|
|
276
|
+
createIntegrator() {
|
|
277
|
+
const t = this.options.physics;
|
|
278
|
+
return t != null && t.integrator ? t.integrator() : t != null && t.spring || t != null && t.inertia ? Z.from({
|
|
279
|
+
spring: t.spring,
|
|
280
|
+
inertia: t.inertia
|
|
281
|
+
}) : new tt(at);
|
|
309
282
|
}
|
|
310
283
|
runAnimation(t) {
|
|
311
|
-
|
|
284
|
+
var e, o;
|
|
285
|
+
if (this.isAnimating = !0, !this.runner) {
|
|
286
|
+
(o = (e = this.options).onStart) == null || o.call(e), this.currentValue = t, this.currentVelocity = 0, this.isAnimating = !1, this.options.onComplete();
|
|
287
|
+
return;
|
|
288
|
+
}
|
|
289
|
+
this.controls = this.runner({
|
|
290
|
+
integrator: this.createIntegrator(),
|
|
312
291
|
from: this.currentValue,
|
|
313
292
|
to: t,
|
|
314
|
-
spring: this.options.spring,
|
|
315
293
|
velocity: this.currentVelocity,
|
|
316
|
-
tick: this.options.tick,
|
|
317
|
-
css: this.options.css,
|
|
318
294
|
onStart: this.options.onStart,
|
|
319
295
|
onComplete: () => {
|
|
320
296
|
this.currentValue = t, this.currentVelocity = 0, this.isAnimating = !1, this.controls = null, this.options.onComplete();
|
|
@@ -362,46 +338,46 @@ class F extends K {
|
|
|
362
338
|
updateOptions(t) {
|
|
363
339
|
this.options = { ...this.options, ...t };
|
|
364
340
|
}
|
|
365
|
-
static fromState(t, n) {
|
|
366
|
-
const r = new F(n);
|
|
367
|
-
return r.setValue(t.position), r.setVelocity(t.velocity), r;
|
|
368
|
-
}
|
|
369
341
|
}
|
|
370
|
-
class
|
|
342
|
+
class M extends j {
|
|
371
343
|
constructor(t) {
|
|
372
344
|
super();
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
this
|
|
345
|
+
d(this, "config");
|
|
346
|
+
d(this, "animators", /* @__PURE__ */ new Map());
|
|
347
|
+
d(this, "itemOrder", []);
|
|
348
|
+
d(this, "completedCount", 0);
|
|
349
|
+
d(this, "completedAnimators", /* @__PURE__ */ new Set());
|
|
350
|
+
d(this, "direction", "forward");
|
|
351
|
+
d(this, "idCounter", 0);
|
|
352
|
+
d(this, "rafId", null);
|
|
353
|
+
d(this, "from");
|
|
354
|
+
d(this, "to");
|
|
355
|
+
d(this, "initialState");
|
|
356
|
+
this.config = t.config, this.from = t.from, this.to = t.to, this.initialState = t.state ?? {
|
|
357
|
+
position: t.from,
|
|
358
|
+
velocity: 0
|
|
359
|
+
}, this.initializeAnimators();
|
|
384
360
|
}
|
|
385
361
|
generateId() {
|
|
386
362
|
return `spring_${this.idCounter++}`;
|
|
387
363
|
}
|
|
388
364
|
initializeAnimators() {
|
|
389
|
-
this.config.
|
|
390
|
-
const
|
|
365
|
+
this.config.items.forEach((t, e) => {
|
|
366
|
+
const o = this.generateId(), s = new H({
|
|
391
367
|
from: this.from,
|
|
392
368
|
to: this.to,
|
|
393
|
-
|
|
369
|
+
physics: t.physics,
|
|
394
370
|
tick: t.tick,
|
|
395
371
|
css: t.css,
|
|
396
|
-
onComplete: () => this.onAnimatorComplete(
|
|
372
|
+
onComplete: () => this.onAnimatorComplete(o),
|
|
397
373
|
onStart: t.onStart
|
|
398
374
|
});
|
|
399
|
-
this.animators.set(
|
|
400
|
-
id:
|
|
375
|
+
(e === 0 || t.normalizedOffset === 0) && (s.setValue(this.initialState.position), s.setVelocity(this.initialState.velocity), s.syncState()), this.animators.set(o, {
|
|
376
|
+
id: o,
|
|
401
377
|
item: t,
|
|
402
|
-
animator:
|
|
378
|
+
animator: s,
|
|
403
379
|
started: !1
|
|
404
|
-
}), this.
|
|
380
|
+
}), this.itemOrder.push(o);
|
|
405
381
|
});
|
|
406
382
|
}
|
|
407
383
|
/**
|
|
@@ -409,8 +385,8 @@ class L extends K {
|
|
|
409
385
|
* Progress = |position - from| / |to - from|
|
|
410
386
|
*/
|
|
411
387
|
getAnimatorProgress(t) {
|
|
412
|
-
const
|
|
413
|
-
return
|
|
388
|
+
const e = t.animator.getCurrentState(), o = Math.abs(e.to - e.from);
|
|
389
|
+
return o === 0 ? 1 : Math.abs(e.position - e.from) / o;
|
|
414
390
|
}
|
|
415
391
|
/**
|
|
416
392
|
* Get order of springs based on direction
|
|
@@ -418,12 +394,12 @@ class L extends K {
|
|
|
418
394
|
* Backward: n-1, n-2, ..., 0
|
|
419
395
|
*/
|
|
420
396
|
getOrderedIds() {
|
|
421
|
-
return this.direction === "forward" ? this.
|
|
397
|
+
return this.direction === "forward" ? this.itemOrder : [...this.itemOrder].reverse();
|
|
422
398
|
}
|
|
423
399
|
onAnimatorComplete(t) {
|
|
424
|
-
var
|
|
425
|
-
const
|
|
426
|
-
!
|
|
400
|
+
var o, s, c, r, a, u;
|
|
401
|
+
const e = this.animators.get(t);
|
|
402
|
+
!e || this.completedAnimators.has(t) || (this.completedAnimators.add(t), this.completedCount++, (s = (o = e.item).onComplete) == null || s.call(o), (r = (c = this.config).onProgress) == null || r.call(c, this.completedCount, this.config.items.length), this.completedCount === this.config.items.length && (this.stopScheduler(), (u = (a = this.config).onEnd) == null || u.call(a)));
|
|
427
403
|
}
|
|
428
404
|
/**
|
|
429
405
|
* Check and start springs based on previous spring's progress
|
|
@@ -431,22 +407,22 @@ class L extends K {
|
|
|
431
407
|
*/
|
|
432
408
|
checkAndStartSprings() {
|
|
433
409
|
const t = this.getOrderedIds();
|
|
434
|
-
for (let
|
|
435
|
-
const
|
|
410
|
+
for (let e = 0; e < t.length; e++) {
|
|
411
|
+
const o = t[e], s = this.animators.get(o);
|
|
436
412
|
if (!s || s.started) continue;
|
|
437
|
-
if (
|
|
438
|
-
this.startAnimator(
|
|
413
|
+
if (e === 0) {
|
|
414
|
+
this.startAnimator(o);
|
|
439
415
|
continue;
|
|
440
416
|
}
|
|
441
|
-
const
|
|
442
|
-
if (!
|
|
443
|
-
const
|
|
444
|
-
|
|
417
|
+
const c = t[e - 1], r = this.animators.get(c);
|
|
418
|
+
if (!r || !r.started) continue;
|
|
419
|
+
const a = this.getAnimatorProgress(r), u = s.item.normalizedOffset;
|
|
420
|
+
a >= u && this.startAnimator(o);
|
|
445
421
|
}
|
|
446
422
|
}
|
|
447
423
|
startAnimator(t) {
|
|
448
|
-
const
|
|
449
|
-
!
|
|
424
|
+
const e = this.animators.get(t);
|
|
425
|
+
!e || e.started || (e.started = !0, this.direction === "forward" ? e.animator.forward() : e.animator.backward());
|
|
450
426
|
}
|
|
451
427
|
/**
|
|
452
428
|
* Start the scheduler loop that checks spring progress
|
|
@@ -461,17 +437,17 @@ class L extends K {
|
|
|
461
437
|
this.rafId !== null && (cancelAnimationFrame(this.rafId), this.rafId = null);
|
|
462
438
|
}
|
|
463
439
|
getFirstAnimator() {
|
|
464
|
-
var
|
|
465
|
-
const t = this.
|
|
466
|
-
return t ? ((
|
|
440
|
+
var e;
|
|
441
|
+
const t = this.itemOrder[0];
|
|
442
|
+
return t ? ((e = this.animators.get(t)) == null ? void 0 : e.animator) ?? null : null;
|
|
467
443
|
}
|
|
468
444
|
forward() {
|
|
469
|
-
var t,
|
|
470
|
-
this.stop(), this.direction = "forward", this.completedCount = 0, this.completedAnimators.clear(), this.resetStartedFlags(), (
|
|
445
|
+
var t, e;
|
|
446
|
+
this.stop(), this.direction = "forward", this.completedCount = 0, this.completedAnimators.clear(), this.resetStartedFlags(), (e = (t = this.config).onStart) == null || e.call(t), this.startScheduler();
|
|
471
447
|
}
|
|
472
448
|
backward() {
|
|
473
|
-
var t,
|
|
474
|
-
this.stop(), this.direction = "backward", this.completedCount = 0, this.completedAnimators.clear(), this.resetStartedFlags(), (
|
|
449
|
+
var t, e;
|
|
450
|
+
this.stop(), this.direction = "backward", this.completedCount = 0, this.completedAnimators.clear(), this.resetStartedFlags(), (e = (t = this.config).onStart) == null || e.call(t), this.startScheduler();
|
|
475
451
|
}
|
|
476
452
|
resetStartedFlags() {
|
|
477
453
|
this.animators.forEach((t) => {
|
|
@@ -487,21 +463,18 @@ class L extends K {
|
|
|
487
463
|
this.direction = this.direction === "forward" ? "backward" : "forward", this.animators.forEach((t) => {
|
|
488
464
|
if (!t.started)
|
|
489
465
|
return;
|
|
490
|
-
const
|
|
491
|
-
if (
|
|
492
|
-
const s =
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
}
|
|
503
|
-
);
|
|
504
|
-
s.forward(), t.animator = s;
|
|
466
|
+
const e = t.animator.getCurrentState();
|
|
467
|
+
if (e.position === e.to) {
|
|
468
|
+
const s = new H({
|
|
469
|
+
from: this.to,
|
|
470
|
+
to: this.from,
|
|
471
|
+
physics: t.item.physics,
|
|
472
|
+
tick: t.item.tick,
|
|
473
|
+
css: t.item.css,
|
|
474
|
+
onComplete: () => this.onAnimatorComplete(t.id),
|
|
475
|
+
onStart: t.item.onStart
|
|
476
|
+
});
|
|
477
|
+
s.setValue(this.to), s.setVelocity(0), s.syncState(), s.forward(), t.animator = s;
|
|
505
478
|
} else
|
|
506
479
|
t.animator.reverse();
|
|
507
480
|
});
|
|
@@ -534,16 +507,16 @@ class L extends K {
|
|
|
534
507
|
* TODO: Support per-spring control
|
|
535
508
|
*/
|
|
536
509
|
setValue(t) {
|
|
537
|
-
const
|
|
538
|
-
|
|
510
|
+
const e = this.getFirstAnimator();
|
|
511
|
+
e == null || e.setValue(t);
|
|
539
512
|
}
|
|
540
513
|
/**
|
|
541
514
|
* Set velocity on first animator
|
|
542
515
|
* TODO: Support per-spring control
|
|
543
516
|
*/
|
|
544
517
|
setVelocity(t) {
|
|
545
|
-
const
|
|
546
|
-
|
|
518
|
+
const e = this.getFirstAnimator();
|
|
519
|
+
e == null || e.setVelocity(t);
|
|
547
520
|
}
|
|
548
521
|
/**
|
|
549
522
|
* Check if any animation is currently running
|
|
@@ -558,28 +531,27 @@ class L extends K {
|
|
|
558
531
|
* Create MultiAnimator from existing state
|
|
559
532
|
* Uses first animator's state for initialization
|
|
560
533
|
*/
|
|
561
|
-
static fromState(t,
|
|
562
|
-
|
|
563
|
-
return r.setValue(t.position), r.setVelocity(t.velocity), r;
|
|
534
|
+
static fromState(t, e) {
|
|
535
|
+
return new M({ ...e, state: t });
|
|
564
536
|
}
|
|
565
537
|
}
|
|
566
|
-
const
|
|
567
|
-
runIn: async (
|
|
568
|
-
const { currentAnimation: t } =
|
|
538
|
+
const W = Symbol.for("TRANSITION_STRATEGY"), ct = (n) => ({
|
|
539
|
+
runIn: async (i) => {
|
|
540
|
+
const { currentAnimation: t } = n;
|
|
569
541
|
if (t && t.direction === "out") {
|
|
570
|
-
const
|
|
571
|
-
if (t.controller.stop(),
|
|
542
|
+
const o = t.controller.getCurrentValue(), s = t.controller.getVelocity();
|
|
543
|
+
if (t.controller.stop(), i.out)
|
|
572
544
|
return {
|
|
573
|
-
config: await
|
|
574
|
-
state: { position:
|
|
545
|
+
config: await i.out,
|
|
546
|
+
state: { position: o, velocity: s },
|
|
575
547
|
from: 1,
|
|
576
548
|
to: 0,
|
|
577
549
|
direction: "backward"
|
|
578
550
|
// Will actually go 0→1 (backward means toward 'from')
|
|
579
551
|
};
|
|
580
552
|
}
|
|
581
|
-
return
|
|
582
|
-
config: await
|
|
553
|
+
return i.in ? {
|
|
554
|
+
config: await i.in,
|
|
583
555
|
state: {
|
|
584
556
|
position: 0,
|
|
585
557
|
velocity: 0
|
|
@@ -597,22 +569,22 @@ const Z = Symbol.for("TRANSITION_STRATEGY"), ut = (i) => ({
|
|
|
597
569
|
direction: "forward"
|
|
598
570
|
};
|
|
599
571
|
},
|
|
600
|
-
runOut: async (
|
|
601
|
-
const { currentAnimation: t } =
|
|
572
|
+
runOut: async (i) => {
|
|
573
|
+
const { currentAnimation: t } = n;
|
|
602
574
|
if (t && t.direction === "in") {
|
|
603
|
-
const
|
|
604
|
-
if (t.controller.stop(),
|
|
575
|
+
const o = t.controller.getCurrentValue(), s = t.controller.getVelocity();
|
|
576
|
+
if (t.controller.stop(), i.in)
|
|
605
577
|
return {
|
|
606
|
-
config: await
|
|
607
|
-
state: { position:
|
|
578
|
+
config: await i.in,
|
|
579
|
+
state: { position: o, velocity: s },
|
|
608
580
|
from: 0,
|
|
609
581
|
to: 1,
|
|
610
582
|
direction: "backward"
|
|
611
583
|
// Will actually go 1→0 (backward means toward 'from')
|
|
612
584
|
};
|
|
613
585
|
}
|
|
614
|
-
return
|
|
615
|
-
config: await
|
|
586
|
+
return i.out ? {
|
|
587
|
+
config: await i.out,
|
|
616
588
|
state: {
|
|
617
589
|
position: 1,
|
|
618
590
|
velocity: 0
|
|
@@ -630,9 +602,9 @@ const Z = Symbol.for("TRANSITION_STRATEGY"), ut = (i) => ({
|
|
|
630
602
|
direction: "forward"
|
|
631
603
|
};
|
|
632
604
|
}
|
|
633
|
-
}),
|
|
634
|
-
runIn: async (
|
|
635
|
-
config: await
|
|
605
|
+
}), lt = () => ({
|
|
606
|
+
runIn: async (n) => n.in ? {
|
|
607
|
+
config: await n.in,
|
|
636
608
|
state: {
|
|
637
609
|
position: 0,
|
|
638
610
|
velocity: 0
|
|
@@ -649,8 +621,8 @@ const Z = Symbol.for("TRANSITION_STRATEGY"), ut = (i) => ({
|
|
|
649
621
|
to: 1,
|
|
650
622
|
direction: "forward"
|
|
651
623
|
},
|
|
652
|
-
runOut: async (
|
|
653
|
-
config: await
|
|
624
|
+
runOut: async (n) => n.out ? {
|
|
625
|
+
config: await n.out,
|
|
654
626
|
state: {
|
|
655
627
|
position: 1,
|
|
656
628
|
velocity: 0
|
|
@@ -667,48 +639,76 @@ const Z = Symbol.for("TRANSITION_STRATEGY"), ut = (i) => ({
|
|
|
667
639
|
to: 0,
|
|
668
640
|
direction: "forward"
|
|
669
641
|
}
|
|
670
|
-
}),
|
|
671
|
-
function
|
|
672
|
-
return (
|
|
673
|
-
if (
|
|
674
|
-
return
|
|
642
|
+
}), G = "data-ssgoi-scope", $ = "data-ssgoi-scope-ready";
|
|
643
|
+
function kt() {
|
|
644
|
+
return (n) => {
|
|
645
|
+
if (n)
|
|
646
|
+
return n.setAttribute(G, ""), queueMicrotask(() => {
|
|
675
647
|
queueMicrotask(() => {
|
|
676
|
-
|
|
648
|
+
n.setAttribute($, "true");
|
|
677
649
|
});
|
|
678
650
|
}), () => {
|
|
679
651
|
};
|
|
680
652
|
};
|
|
681
653
|
}
|
|
682
|
-
function
|
|
683
|
-
return
|
|
654
|
+
function ut(n) {
|
|
655
|
+
return n.hasAttribute($);
|
|
684
656
|
}
|
|
685
|
-
function
|
|
686
|
-
return
|
|
657
|
+
function ft(n) {
|
|
658
|
+
return n.closest(`[${G}]`);
|
|
687
659
|
}
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
660
|
+
const dt = (n) => {
|
|
661
|
+
let i = n.parentElement;
|
|
662
|
+
for (; i && i !== document.body; ) {
|
|
663
|
+
const t = window.getComputedStyle(i), e = t.overflow + t.overflowY + t.overflowX;
|
|
664
|
+
if (e.includes("auto") || e.includes("scroll") || i.scrollHeight > i.clientHeight || i.scrollWidth > i.clientWidth)
|
|
665
|
+
return i;
|
|
666
|
+
i = i.parentElement;
|
|
667
|
+
}
|
|
668
|
+
return document.documentElement;
|
|
669
|
+
}, mt = (n) => {
|
|
670
|
+
let i = n.parentElement;
|
|
671
|
+
for (; i && i !== document.body; ) {
|
|
672
|
+
const t = window.getComputedStyle(i).position;
|
|
673
|
+
if (t === "relative" || t === "absolute" || t === "fixed" || t === "sticky")
|
|
674
|
+
return i;
|
|
675
|
+
i = i.parentElement;
|
|
676
|
+
}
|
|
677
|
+
return document.body;
|
|
678
|
+
};
|
|
679
|
+
function X(n) {
|
|
680
|
+
return new Promise((i) => {
|
|
681
|
+
requestAnimationFrame(() => {
|
|
682
|
+
requestAnimationFrame(() => {
|
|
683
|
+
i();
|
|
684
|
+
});
|
|
685
|
+
});
|
|
686
|
+
});
|
|
687
|
+
}
|
|
688
|
+
function ht(n, i) {
|
|
689
|
+
var S;
|
|
690
|
+
let t = null, e = null, o = null, s = null;
|
|
691
|
+
const c = {
|
|
692
692
|
get currentAnimation() {
|
|
693
693
|
return t;
|
|
694
694
|
}
|
|
695
|
-
},
|
|
696
|
-
var
|
|
697
|
-
|
|
698
|
-
const
|
|
699
|
-
if (!
|
|
695
|
+
}, r = ((S = i == null ? void 0 : i.strategy) == null ? void 0 : S.call(i, c)) || ct(c), a = async (f) => {
|
|
696
|
+
var T;
|
|
697
|
+
e && (e.remove(), e = null);
|
|
698
|
+
const l = n(), E = l.in && l.in(f), A = !(i != null && i.strategy) && l.out ? l.out(f) : void 0;
|
|
699
|
+
if (!E)
|
|
700
700
|
return;
|
|
701
|
-
const
|
|
702
|
-
in:
|
|
703
|
-
out:
|
|
704
|
-
},
|
|
705
|
-
if (!
|
|
701
|
+
const I = {
|
|
702
|
+
in: R(E),
|
|
703
|
+
out: A ? R(A) : void 0
|
|
704
|
+
}, v = await r.runIn(I);
|
|
705
|
+
if (!v.config) {
|
|
706
706
|
t && (t.direction = "in");
|
|
707
707
|
return;
|
|
708
708
|
}
|
|
709
|
-
const p =
|
|
710
|
-
(
|
|
711
|
-
const w =
|
|
709
|
+
const p = v.config;
|
|
710
|
+
(T = p.prepare) == null || T.call(p);
|
|
711
|
+
const w = N(
|
|
712
712
|
{
|
|
713
713
|
...p,
|
|
714
714
|
onEnd: () => {
|
|
@@ -716,97 +716,101 @@ function ht(i, e) {
|
|
|
716
716
|
t = null, (C = p.onEnd) == null || C.call(p);
|
|
717
717
|
}
|
|
718
718
|
},
|
|
719
|
-
|
|
720
|
-
)
|
|
719
|
+
f
|
|
720
|
+
);
|
|
721
|
+
p.wait && await p.wait();
|
|
722
|
+
const h = M.fromState(v.state, {
|
|
721
723
|
config: w,
|
|
722
|
-
from:
|
|
723
|
-
to:
|
|
724
|
+
from: v.from,
|
|
725
|
+
to: v.to
|
|
724
726
|
});
|
|
725
|
-
t = { controller:
|
|
726
|
-
}, u = async (
|
|
727
|
+
t = { controller: h, direction: "in" }, await X(), v.direction === "forward" ? h.forward() : h.backward();
|
|
728
|
+
}, u = async (f) => {
|
|
727
729
|
var C;
|
|
728
|
-
|
|
729
|
-
const
|
|
730
|
-
if (!
|
|
730
|
+
e = f;
|
|
731
|
+
const l = n(), E = !(i != null && i.strategy) && l.in ? l.in(f) : void 0, A = l.out && l.out(f);
|
|
732
|
+
if (!A)
|
|
731
733
|
return;
|
|
732
|
-
const
|
|
733
|
-
in:
|
|
734
|
-
out:
|
|
735
|
-
},
|
|
736
|
-
if (!
|
|
737
|
-
t && (t.direction = "out"),
|
|
734
|
+
const I = {
|
|
735
|
+
in: E ? R(E) : void 0,
|
|
736
|
+
out: R(A)
|
|
737
|
+
}, v = await r.runOut(I);
|
|
738
|
+
if (!v.config) {
|
|
739
|
+
t && (t.direction = "out"), e && (e.remove(), e = null);
|
|
738
740
|
return;
|
|
739
741
|
}
|
|
740
|
-
const p =
|
|
741
|
-
(C = p.prepare) == null || C.call(p
|
|
742
|
-
const w =
|
|
742
|
+
const p = v.config;
|
|
743
|
+
T(), (C = p.prepare) == null || C.call(p);
|
|
744
|
+
const w = N(
|
|
743
745
|
{
|
|
744
746
|
...p,
|
|
745
747
|
onEnd: () => {
|
|
746
|
-
var V,
|
|
747
|
-
(V = p.onEnd) == null || V.call(p),
|
|
748
|
+
var V, P;
|
|
749
|
+
(V = p.onEnd) == null || V.call(p), e && (e.remove(), e = null), t = null, (P = i == null ? void 0 : i.onCleanupEnd) == null || P.call(i);
|
|
748
750
|
}
|
|
749
751
|
},
|
|
750
|
-
|
|
751
|
-
)
|
|
752
|
+
f
|
|
753
|
+
);
|
|
754
|
+
p.wait && await p.wait();
|
|
755
|
+
const h = M.fromState(v.state, {
|
|
752
756
|
config: w,
|
|
753
|
-
from:
|
|
754
|
-
to:
|
|
757
|
+
from: v.from,
|
|
758
|
+
to: v.to
|
|
755
759
|
});
|
|
756
|
-
t = { controller:
|
|
757
|
-
function
|
|
758
|
-
!
|
|
760
|
+
t = { controller: h, direction: "out" }, await X(), v.direction === "forward" ? h.forward() : h.backward();
|
|
761
|
+
function T() {
|
|
762
|
+
!o || !e || (s && o.contains(s) ? o.insertBefore(e, s) : o.appendChild(e));
|
|
759
763
|
}
|
|
760
764
|
};
|
|
761
|
-
let
|
|
762
|
-
const y = (
|
|
763
|
-
if (
|
|
764
|
-
|
|
765
|
-
const
|
|
766
|
-
|
|
767
|
-
document.contains(
|
|
768
|
-
}) : u(
|
|
765
|
+
let m = null, g = !1;
|
|
766
|
+
const y = (f) => () => {
|
|
767
|
+
if (g) return;
|
|
768
|
+
g = !0;
|
|
769
|
+
const l = f.cloneNode(!0);
|
|
770
|
+
m ? queueMicrotask(() => {
|
|
771
|
+
document.contains(m) && u(l);
|
|
772
|
+
}) : u(l);
|
|
769
773
|
};
|
|
770
|
-
return (
|
|
771
|
-
if (
|
|
774
|
+
return (f) => {
|
|
775
|
+
if (f)
|
|
772
776
|
return requestAnimationFrame(() => {
|
|
773
|
-
|
|
774
|
-
}),
|
|
775
|
-
|
|
776
|
-
}) :
|
|
777
|
+
o = f.parentElement, s = f.nextElementSibling;
|
|
778
|
+
}), g = !1, (i == null ? void 0 : i.scope) === "local" ? queueMicrotask(() => {
|
|
779
|
+
m = ft(f), !(m && !ut(m)) && a(f);
|
|
780
|
+
}) : a(f), y(f);
|
|
777
781
|
};
|
|
778
782
|
}
|
|
779
|
-
const
|
|
780
|
-
let
|
|
781
|
-
function
|
|
782
|
-
if (
|
|
783
|
-
const t =
|
|
784
|
-
|
|
783
|
+
const k = /* @__PURE__ */ new Map();
|
|
784
|
+
let b = null, z = !1;
|
|
785
|
+
function K(n) {
|
|
786
|
+
if (n instanceof HTMLElement && k.has(n)) {
|
|
787
|
+
const t = k.get(n);
|
|
788
|
+
k.delete(n), queueMicrotask(() => {
|
|
785
789
|
t();
|
|
786
790
|
});
|
|
787
791
|
}
|
|
788
|
-
const
|
|
789
|
-
for (let t = 0; t <
|
|
790
|
-
const
|
|
791
|
-
|
|
792
|
+
const i = n.childNodes;
|
|
793
|
+
for (let t = 0; t < i.length; t++) {
|
|
794
|
+
const e = i[t];
|
|
795
|
+
e && K(e);
|
|
792
796
|
}
|
|
793
797
|
}
|
|
794
798
|
function gt() {
|
|
795
|
-
|
|
796
|
-
for (const
|
|
797
|
-
const t =
|
|
798
|
-
for (let
|
|
799
|
-
const
|
|
800
|
-
|
|
799
|
+
z || typeof document > "u" || (z = !0, b = new MutationObserver((n) => {
|
|
800
|
+
for (const i of n) {
|
|
801
|
+
const t = i.removedNodes;
|
|
802
|
+
for (let e = 0; e < t.length; e++) {
|
|
803
|
+
const o = t[e];
|
|
804
|
+
o && K(o);
|
|
801
805
|
}
|
|
802
806
|
}
|
|
803
|
-
}), document.body ?
|
|
807
|
+
}), document.body ? b.observe(document.body, {
|
|
804
808
|
childList: !0,
|
|
805
809
|
subtree: !0
|
|
806
810
|
}) : document.addEventListener(
|
|
807
811
|
"DOMContentLoaded",
|
|
808
812
|
() => {
|
|
809
|
-
|
|
813
|
+
b == null || b.observe(document.body, {
|
|
810
814
|
childList: !0,
|
|
811
815
|
subtree: !0
|
|
812
816
|
});
|
|
@@ -814,270 +818,249 @@ function gt() {
|
|
|
814
818
|
{ once: !0 }
|
|
815
819
|
));
|
|
816
820
|
}
|
|
817
|
-
function pt(
|
|
818
|
-
gt(),
|
|
821
|
+
function pt(n, i) {
|
|
822
|
+
gt(), k.set(n, i);
|
|
819
823
|
}
|
|
820
|
-
function
|
|
821
|
-
return
|
|
824
|
+
function Vt(n) {
|
|
825
|
+
return k.has(n);
|
|
822
826
|
}
|
|
823
|
-
function
|
|
824
|
-
return
|
|
827
|
+
function It() {
|
|
828
|
+
return k.size;
|
|
825
829
|
}
|
|
826
|
-
function Pt(
|
|
827
|
-
const
|
|
828
|
-
return
|
|
830
|
+
function Pt(n) {
|
|
831
|
+
const i = k.get(n);
|
|
832
|
+
return i ? (k.delete(n), i(), !0) : !1;
|
|
829
833
|
}
|
|
830
|
-
function
|
|
831
|
-
|
|
834
|
+
function Rt() {
|
|
835
|
+
k.clear(), b == null || b.disconnect(), b = null, z = !1;
|
|
832
836
|
}
|
|
833
|
-
const
|
|
834
|
-
function wt(
|
|
835
|
-
|
|
836
|
-
let
|
|
837
|
-
if (
|
|
838
|
-
return
|
|
839
|
-
const
|
|
840
|
-
return
|
|
837
|
+
const O = /* @__PURE__ */ new Map(), q = /* @__PURE__ */ new Map(), _ = /* @__PURE__ */ new Map();
|
|
838
|
+
function wt(n, i, t) {
|
|
839
|
+
O.set(n, i);
|
|
840
|
+
let e = q.get(n);
|
|
841
|
+
if (e)
|
|
842
|
+
return e;
|
|
843
|
+
const o = i;
|
|
844
|
+
return e = ht(
|
|
841
845
|
() => {
|
|
842
|
-
const s =
|
|
843
|
-
return s || (console.warn(`Transition "${String(
|
|
846
|
+
const s = O.get(n);
|
|
847
|
+
return s || (console.warn(`Transition "${String(n)}" not found`), {});
|
|
844
848
|
},
|
|
845
849
|
{
|
|
846
850
|
strategy: t == null ? void 0 : t.strategy,
|
|
847
851
|
scope: t == null ? void 0 : t.scope,
|
|
848
852
|
onCleanupEnd: () => {
|
|
849
|
-
|
|
853
|
+
O.get(n) === o && yt(n);
|
|
850
854
|
}
|
|
851
855
|
}
|
|
852
|
-
),
|
|
856
|
+
), q.set(n, e), e;
|
|
853
857
|
}
|
|
854
|
-
function yt(
|
|
855
|
-
|
|
858
|
+
function yt(n) {
|
|
859
|
+
O.delete(n), q.delete(n), _.delete(n);
|
|
856
860
|
}
|
|
857
|
-
function
|
|
861
|
+
function Ft(n, i = "manual") {
|
|
858
862
|
const t = wt(
|
|
859
|
-
|
|
863
|
+
n.key,
|
|
860
864
|
{
|
|
861
|
-
in:
|
|
862
|
-
out:
|
|
865
|
+
in: n.in,
|
|
866
|
+
out: n.out
|
|
863
867
|
},
|
|
864
868
|
{
|
|
865
|
-
strategy:
|
|
866
|
-
scope:
|
|
869
|
+
strategy: n[W],
|
|
870
|
+
scope: n.scope
|
|
867
871
|
}
|
|
868
872
|
);
|
|
869
|
-
if (
|
|
873
|
+
if (i === "manual")
|
|
870
874
|
return t;
|
|
871
|
-
let
|
|
872
|
-
return
|
|
873
|
-
if (
|
|
874
|
-
const s = t(
|
|
875
|
-
s && pt(
|
|
875
|
+
let e = _.get(n.key);
|
|
876
|
+
return e || (e = (o) => {
|
|
877
|
+
if (o) {
|
|
878
|
+
const s = t(o);
|
|
879
|
+
s && pt(o, s);
|
|
876
880
|
}
|
|
877
|
-
},
|
|
881
|
+
}, _.set(n.key, e), e);
|
|
878
882
|
}
|
|
879
|
-
function vt(
|
|
880
|
-
const
|
|
883
|
+
function vt(n) {
|
|
884
|
+
const i = n.filter((t) => t.symmetric).map((t) => ({
|
|
881
885
|
from: t.to,
|
|
882
886
|
to: t.from,
|
|
883
887
|
transition: t.transition
|
|
884
888
|
}));
|
|
885
|
-
return [...
|
|
889
|
+
return [...n, ...i];
|
|
886
890
|
}
|
|
887
|
-
function St(
|
|
888
|
-
let
|
|
889
|
-
const s = 50,
|
|
890
|
-
if (!
|
|
891
|
-
const
|
|
892
|
-
|
|
893
|
-
},
|
|
894
|
-
if (!
|
|
895
|
-
const
|
|
896
|
-
if (!
|
|
897
|
-
const
|
|
898
|
-
|
|
899
|
-
},
|
|
900
|
-
|
|
901
|
-
}, u = () =>
|
|
902
|
-
typeof window > "u" ||
|
|
903
|
-
},
|
|
904
|
-
typeof window > "u" || (window.removeEventListener("touchstart",
|
|
891
|
+
function St(n) {
|
|
892
|
+
let i = !1, t = 0, e = 0, o = !1;
|
|
893
|
+
const s = 50, c = (f) => {
|
|
894
|
+
if (!n) return;
|
|
895
|
+
const l = f.touches[0];
|
|
896
|
+
l && (o = l.clientX < s, o && (t = l.clientX, e = l.clientY));
|
|
897
|
+
}, r = (f) => {
|
|
898
|
+
if (!n || !o) return;
|
|
899
|
+
const l = f.touches[0];
|
|
900
|
+
if (!l) return;
|
|
901
|
+
const E = l.clientX - t, A = l.clientY - e;
|
|
902
|
+
E > window.outerWidth / 2 - 5 && Math.abs(E) > Math.abs(A) ? i = !0 : i = !1;
|
|
903
|
+
}, a = () => {
|
|
904
|
+
n && (o = !1, t = 0, e = 0);
|
|
905
|
+
}, u = () => i, m = () => {
|
|
906
|
+
typeof window > "u" || n && (window.addEventListener("touchstart", c, { passive: !0 }), window.addEventListener("touchmove", r, { passive: !0 }), window.addEventListener("touchend", a, { passive: !0 }));
|
|
907
|
+
}, g = () => {
|
|
908
|
+
typeof window > "u" || (window.removeEventListener("touchstart", c), window.removeEventListener("touchmove", r), window.removeEventListener("touchend", a));
|
|
905
909
|
};
|
|
906
910
|
let y = 0;
|
|
907
911
|
return {
|
|
908
|
-
initialize:
|
|
909
|
-
cleanup:
|
|
912
|
+
initialize: m,
|
|
913
|
+
cleanup: g,
|
|
910
914
|
isSwipePending: u,
|
|
911
915
|
resetSwipeDetection: () => {
|
|
912
|
-
y++, y > 1 && (y = 0,
|
|
916
|
+
y++, y > 1 && (y = 0, i = !1);
|
|
913
917
|
}
|
|
914
918
|
};
|
|
915
919
|
}
|
|
916
|
-
|
|
917
|
-
let
|
|
918
|
-
for (; e && e !== document.body; ) {
|
|
919
|
-
const t = window.getComputedStyle(e), n = t.overflow + t.overflowY + t.overflowX;
|
|
920
|
-
if (n.includes("auto") || n.includes("scroll") || e.scrollHeight > e.clientHeight || e.scrollWidth > e.clientWidth)
|
|
921
|
-
return e;
|
|
922
|
-
e = e.parentElement;
|
|
923
|
-
}
|
|
924
|
-
return document.documentElement;
|
|
925
|
-
}, At = (i) => {
|
|
926
|
-
let e = i.parentElement;
|
|
927
|
-
for (; e && e !== document.body; ) {
|
|
928
|
-
const t = window.getComputedStyle(e).position;
|
|
929
|
-
if (t === "relative" || t === "absolute" || t === "fixed" || t === "sticky")
|
|
930
|
-
return e;
|
|
931
|
-
e = e.parentElement;
|
|
932
|
-
}
|
|
933
|
-
return document.body;
|
|
934
|
-
};
|
|
935
|
-
function Et() {
|
|
936
|
-
let i = null, e = null;
|
|
920
|
+
function Ct() {
|
|
921
|
+
let n = null, i = null;
|
|
937
922
|
const t = /* @__PURE__ */ new Map();
|
|
938
|
-
let
|
|
939
|
-
const
|
|
940
|
-
|
|
941
|
-
x:
|
|
942
|
-
y:
|
|
923
|
+
let e = null;
|
|
924
|
+
const o = () => {
|
|
925
|
+
n && e && t.set(e, {
|
|
926
|
+
x: n.scrollLeft,
|
|
927
|
+
y: n.scrollTop
|
|
943
928
|
});
|
|
944
929
|
};
|
|
945
930
|
return {
|
|
946
|
-
initializeContext: (
|
|
947
|
-
|
|
931
|
+
initializeContext: (m, g) => {
|
|
932
|
+
i = m, n || (n = dt(m), (n === document.documentElement ? window : n).addEventListener("scroll", o, {
|
|
948
933
|
passive: !0
|
|
949
|
-
})),
|
|
934
|
+
})), e = g;
|
|
950
935
|
},
|
|
951
|
-
calculateScrollOffset: (
|
|
952
|
-
const y =
|
|
936
|
+
calculateScrollOffset: (m, g) => {
|
|
937
|
+
const y = m && t.has(m) ? t.get(m) : { x: 0, y: 0 }, S = g && t.has(g) ? t.get(g) : { x: 0, y: 0 };
|
|
953
938
|
return {
|
|
954
|
-
x: -
|
|
955
|
-
y: -
|
|
939
|
+
x: -S.x + y.x,
|
|
940
|
+
y: -S.y + y.y
|
|
956
941
|
};
|
|
957
942
|
},
|
|
958
|
-
getScrollContainer: () =>
|
|
959
|
-
getPositionedParentElement: () =>
|
|
960
|
-
getScrollPosition: (
|
|
943
|
+
getScrollContainer: () => n,
|
|
944
|
+
getPositionedParentElement: () => i ? mt(i) : document.body,
|
|
945
|
+
getScrollPosition: (m) => m && t.has(m) ? t.get(m) : { x: 0, y: 0 }
|
|
961
946
|
};
|
|
962
947
|
}
|
|
963
|
-
function
|
|
964
|
-
if (
|
|
948
|
+
function x(n, i) {
|
|
949
|
+
if (i === "*")
|
|
965
950
|
return !0;
|
|
966
|
-
if (
|
|
967
|
-
const t =
|
|
968
|
-
return
|
|
951
|
+
if (i.endsWith("/*")) {
|
|
952
|
+
const t = i.slice(0, -2);
|
|
953
|
+
return n === t || n.startsWith(t + "/");
|
|
969
954
|
}
|
|
970
|
-
return
|
|
955
|
+
return n === i;
|
|
971
956
|
}
|
|
972
|
-
function
|
|
973
|
-
for (const
|
|
974
|
-
if (
|
|
975
|
-
return
|
|
976
|
-
for (const
|
|
977
|
-
if ((
|
|
978
|
-
return
|
|
957
|
+
function At(n, i, t) {
|
|
958
|
+
for (const e of t)
|
|
959
|
+
if (x(n, e.from) && x(i, e.to))
|
|
960
|
+
return e.transition;
|
|
961
|
+
for (const e of t)
|
|
962
|
+
if ((e.from === "*" || x(n, e.from)) && (e.to === "*" || x(i, e.to)))
|
|
963
|
+
return e.transition;
|
|
979
964
|
return null;
|
|
980
965
|
}
|
|
981
|
-
function xt(
|
|
966
|
+
function xt(n, i) {
|
|
982
967
|
const {
|
|
983
968
|
transitions: t = [],
|
|
984
|
-
defaultTransition:
|
|
985
|
-
middleware:
|
|
969
|
+
defaultTransition: e,
|
|
970
|
+
middleware: o = (w, h) => ({ from: w, to: h }),
|
|
986
971
|
// Identity function as default
|
|
987
972
|
skipOnIosSwipe: s = !0
|
|
988
973
|
// Default to true - skip animations on iOS swipe
|
|
989
|
-
} =
|
|
990
|
-
let
|
|
991
|
-
const
|
|
974
|
+
} = n, { outFirst: c = !0 } = i || {};
|
|
975
|
+
let r = null;
|
|
976
|
+
const a = vt(t), {
|
|
992
977
|
initializeContext: u,
|
|
993
|
-
calculateScrollOffset:
|
|
994
|
-
getScrollContainer:
|
|
978
|
+
calculateScrollOffset: m,
|
|
979
|
+
getScrollContainer: g,
|
|
995
980
|
getPositionedParentElement: y,
|
|
996
|
-
getScrollPosition:
|
|
997
|
-
} =
|
|
998
|
-
|
|
999
|
-
function
|
|
1000
|
-
if (
|
|
1001
|
-
const { from: w, to:
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
), C =
|
|
981
|
+
getScrollPosition: S
|
|
982
|
+
} = Ct(), f = St(s);
|
|
983
|
+
f.initialize();
|
|
984
|
+
function l() {
|
|
985
|
+
if (r != null && r.from && (r != null && r.to)) {
|
|
986
|
+
const { from: w, to: h } = o(
|
|
987
|
+
r.from,
|
|
988
|
+
r.to
|
|
989
|
+
), C = At(
|
|
1005
990
|
w,
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
) ||
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
),
|
|
991
|
+
h,
|
|
992
|
+
a
|
|
993
|
+
) || e, V = m(
|
|
994
|
+
r.from,
|
|
995
|
+
r.to
|
|
996
|
+
), P = {
|
|
1012
997
|
scrollOffset: V,
|
|
1013
|
-
scroll:
|
|
998
|
+
scroll: S(r.from),
|
|
1014
999
|
get scrollingElement() {
|
|
1015
|
-
return
|
|
1000
|
+
return g() || document.documentElement;
|
|
1016
1001
|
},
|
|
1017
1002
|
get positionedParent() {
|
|
1018
1003
|
return y();
|
|
1019
1004
|
}
|
|
1020
|
-
},
|
|
1005
|
+
}, B = {
|
|
1021
1006
|
scrollOffset: V,
|
|
1022
1007
|
get scroll() {
|
|
1023
|
-
return
|
|
1008
|
+
return r ? S(r.to) : { x: 0, y: 0 };
|
|
1024
1009
|
},
|
|
1025
1010
|
get scrollingElement() {
|
|
1026
|
-
return
|
|
1011
|
+
return g() || document.documentElement;
|
|
1027
1012
|
},
|
|
1028
1013
|
get positionedParent() {
|
|
1029
1014
|
return y();
|
|
1030
1015
|
}
|
|
1031
1016
|
};
|
|
1032
|
-
C && (C.out &&
|
|
1033
|
-
(
|
|
1034
|
-
), C.in &&
|
|
1035
|
-
(
|
|
1036
|
-
)),
|
|
1017
|
+
C && (C.out && r.outResolve && r.outResolve(
|
|
1018
|
+
(L) => C.out(L, P)
|
|
1019
|
+
), C.in && r.inResolve && r.inResolve(
|
|
1020
|
+
(L) => C.in(L, B)
|
|
1021
|
+
)), r = null;
|
|
1037
1022
|
}
|
|
1038
1023
|
}
|
|
1039
|
-
function
|
|
1040
|
-
|
|
1024
|
+
function E() {
|
|
1025
|
+
r && (r.inResolve && r.inResolve(() => ({})), r.outResolve && r.outResolve(() => ({})), r = null);
|
|
1041
1026
|
}
|
|
1042
|
-
const
|
|
1043
|
-
|
|
1044
|
-
})) : (
|
|
1045
|
-
|
|
1046
|
-
}))) : async (w,
|
|
1047
|
-
|
|
1048
|
-
})) : (
|
|
1049
|
-
|
|
1027
|
+
const v = c ? async (w, h) => f.isSwipePending() ? (f.resetSwipeDetection(), () => ({})) : h === "in" && (!r || !r.from) ? () => ({}) : (r || (r = {}), h === "out" ? (r.from = w, new Promise((T) => {
|
|
1028
|
+
r.outResolve = T, l();
|
|
1029
|
+
})) : (r.to = w, new Promise((T) => {
|
|
1030
|
+
r.inResolve = T, l();
|
|
1031
|
+
}))) : async (w, h) => f.isSwipePending() ? (f.resetSwipeDetection(), () => ({})) : (r && (h === "out" && r.from && r.from !== w || h === "in" && r.to && r.to !== w) && E(), r || (r = {}), h === "out" ? (r.from = w, new Promise((C) => {
|
|
1032
|
+
r.outResolve = C, l();
|
|
1033
|
+
})) : (r.to = w, new Promise((C) => {
|
|
1034
|
+
r.inResolve = C, l();
|
|
1050
1035
|
})));
|
|
1051
1036
|
return (w) => ({
|
|
1052
1037
|
key: w,
|
|
1053
|
-
in: async (
|
|
1054
|
-
out: async (
|
|
1038
|
+
in: async (h) => (u(h, w), (await v(w, "in"))(h)),
|
|
1039
|
+
out: async (h) => (await v(w, "out"))(h),
|
|
1055
1040
|
// Add page transition strategy for page-level transitions
|
|
1056
|
-
[
|
|
1041
|
+
[W]: lt
|
|
1057
1042
|
});
|
|
1058
1043
|
}
|
|
1059
1044
|
export {
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1045
|
+
G as SCOPE_ATTR,
|
|
1046
|
+
$ as SCOPE_READY_ATTR,
|
|
1047
|
+
W as TRANSITION_STRATEGY,
|
|
1048
|
+
ct as createDefaultStrategy,
|
|
1049
|
+
lt as createPageTransitionStrategy,
|
|
1065
1050
|
xt as createSggoiTransitionContext,
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
Dt as
|
|
1071
|
-
|
|
1072
|
-
|
|
1051
|
+
kt as createTransitionScope,
|
|
1052
|
+
ft as findScope,
|
|
1053
|
+
It as getWatchedCount,
|
|
1054
|
+
Lt as isCssAnimation,
|
|
1055
|
+
Dt as isMultiAnimation,
|
|
1056
|
+
ut as isScopeReady,
|
|
1057
|
+
zt as isSingleAnimation,
|
|
1073
1058
|
qt as isTickAnimation,
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1059
|
+
Vt as isWatched,
|
|
1060
|
+
N as normalizeSchedule,
|
|
1061
|
+
R as normalizeToMultiAnimation,
|
|
1062
|
+
Rt as resetObserver,
|
|
1063
|
+
Ft as transition,
|
|
1079
1064
|
Pt as triggerUnmount,
|
|
1080
|
-
Ht as validateAnimationMode,
|
|
1081
|
-
Nt as validateSpringItem,
|
|
1082
1065
|
pt as watchUnmount
|
|
1083
1066
|
};
|