@ssgoi/core 7.0.0-beta.0 → 7.0.0-beta.2
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/README.md +82 -252
- package/dist/internal.cjs +1 -1
- package/dist/internal.js +629 -533
- package/dist/ssgoi-transition/create-ssgoi-transition-context.d.ts.map +1 -1
- package/dist/ssgoi-transition/navigation-detector-strategy.d.ts +24 -9
- package/dist/ssgoi-transition/navigation-detector-strategy.d.ts.map +1 -1
- package/dist/ssgoi-transition/observe-ssgoi-transitions.d.ts +1 -0
- package/dist/ssgoi-transition/observe-ssgoi-transitions.d.ts.map +1 -1
- package/dist/ssgoi-transition/unmount-observer.d.ts +11 -2
- package/dist/ssgoi-transition/unmount-observer.d.ts.map +1 -1
- package/dist/transitions/drill/index.d.ts +1 -1
- package/dist/transitions/sheet/index.d.ts +1 -1
- package/dist/types/index.d.ts +10 -1
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/internal.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var U = (t,
|
|
4
|
-
import { A as
|
|
5
|
-
import { M as
|
|
6
|
-
class Ft extends
|
|
1
|
+
var Ht = Object.defineProperty;
|
|
2
|
+
var Wt = (t, e, n) => e in t ? Ht(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var U = (t, e, n) => Wt(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { A as Bt } from "./multi-animation-ZFZBDBGr.js";
|
|
5
|
+
import { M as Me, W as ke } from "./multi-animation-ZFZBDBGr.js";
|
|
6
|
+
class Ft extends Bt {
|
|
7
7
|
constructor() {
|
|
8
8
|
super(...arguments);
|
|
9
9
|
U(this, "child", null);
|
|
@@ -11,42 +11,42 @@ class Ft extends Wt {
|
|
|
11
11
|
U(this, "_settled", !1);
|
|
12
12
|
U(this, "listeners", /* @__PURE__ */ new Set());
|
|
13
13
|
}
|
|
14
|
-
attach(
|
|
15
|
-
const
|
|
16
|
-
if (this.child =
|
|
17
|
-
const l =
|
|
18
|
-
|
|
14
|
+
attach(n) {
|
|
15
|
+
const s = this.child;
|
|
16
|
+
if (this.child = n, this._settled = !1, s) {
|
|
17
|
+
const l = s.getPose();
|
|
18
|
+
s.complete(), n.matchInto(l);
|
|
19
19
|
}
|
|
20
|
-
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
n.playbackRate = this.playbackRate;
|
|
21
|
+
const r = n.onComplete;
|
|
22
|
+
n.onComplete = () => {
|
|
23
|
+
r == null || r(), this.child === n && (this.child = null, this._state = "idle", this._settled = !0), this.notify();
|
|
24
24
|
};
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
var
|
|
28
|
-
|
|
29
|
-
}, this._state === "paused" ?
|
|
25
|
+
const i = n.onUpdate;
|
|
26
|
+
n.onUpdate = (l) => {
|
|
27
|
+
var a;
|
|
28
|
+
i == null || i(l), (a = this.onUpdate) == null || a.call(this, l), this.notify();
|
|
29
|
+
}, this._state === "paused" ? n.pause() : this._state === "reversing" ? n.reverse() : (this._state = "playing", n.play()), this.notify();
|
|
30
30
|
}
|
|
31
31
|
play() {
|
|
32
|
-
var
|
|
33
|
-
this._state = "playing", this._settled = !1, (
|
|
32
|
+
var n;
|
|
33
|
+
this._state = "playing", this._settled = !1, (n = this.child) == null || n.play(), this.notify();
|
|
34
34
|
}
|
|
35
35
|
reverse() {
|
|
36
|
-
var
|
|
37
|
-
this._state = "reversing", this._settled = !1, (
|
|
36
|
+
var n;
|
|
37
|
+
this._state = "reversing", this._settled = !1, (n = this.child) == null || n.reverse(), this.notify();
|
|
38
38
|
}
|
|
39
39
|
pause() {
|
|
40
|
-
var
|
|
41
|
-
this._state = "paused", (
|
|
40
|
+
var n;
|
|
41
|
+
this._state = "paused", (n = this.child) == null || n.pause(), this.notify();
|
|
42
42
|
}
|
|
43
43
|
complete() {
|
|
44
|
-
var
|
|
45
|
-
(
|
|
44
|
+
var n;
|
|
45
|
+
(n = this.child) == null || n.complete(), this.notify();
|
|
46
46
|
}
|
|
47
47
|
get isAnimating() {
|
|
48
|
-
var
|
|
49
|
-
return ((
|
|
48
|
+
var n;
|
|
49
|
+
return ((n = this.child) == null ? void 0 : n.isAnimating) ?? !1;
|
|
50
50
|
}
|
|
51
51
|
get isPaused() {
|
|
52
52
|
return this._state === "paused";
|
|
@@ -55,767 +55,863 @@ class Ft extends Wt {
|
|
|
55
55
|
return this._settled && !this.child;
|
|
56
56
|
}
|
|
57
57
|
get isReversing() {
|
|
58
|
-
var
|
|
59
|
-
return ((
|
|
58
|
+
var n;
|
|
59
|
+
return ((n = this.child) == null ? void 0 : n.isReversing) ?? this._state === "reversing";
|
|
60
60
|
}
|
|
61
61
|
get progress() {
|
|
62
|
-
var
|
|
63
|
-
return ((
|
|
62
|
+
var n;
|
|
63
|
+
return ((n = this.child) == null ? void 0 : n.progress) ?? 0;
|
|
64
64
|
}
|
|
65
|
-
findTimeForProgress(
|
|
66
|
-
var
|
|
67
|
-
return ((
|
|
65
|
+
findTimeForProgress(n) {
|
|
66
|
+
var s;
|
|
67
|
+
return ((s = this.child) == null ? void 0 : s.findTimeForProgress(n)) ?? null;
|
|
68
68
|
}
|
|
69
69
|
get playbackRate() {
|
|
70
70
|
return super.playbackRate;
|
|
71
71
|
}
|
|
72
|
-
set playbackRate(
|
|
73
|
-
super.playbackRate =
|
|
72
|
+
set playbackRate(n) {
|
|
73
|
+
super.playbackRate = n, this.child && (this.child.playbackRate = n), this.notify();
|
|
74
74
|
}
|
|
75
75
|
getPose() {
|
|
76
|
-
var
|
|
77
|
-
return ((
|
|
76
|
+
var n;
|
|
77
|
+
return ((n = this.child) == null ? void 0 : n.getPose()) ?? [];
|
|
78
78
|
}
|
|
79
79
|
getTimeline() {
|
|
80
|
-
var
|
|
81
|
-
return ((
|
|
80
|
+
var n;
|
|
81
|
+
return ((n = this.child) == null ? void 0 : n.getTimeline()) ?? [];
|
|
82
82
|
}
|
|
83
|
-
matchInto(
|
|
84
|
-
var
|
|
85
|
-
(
|
|
83
|
+
matchInto(n) {
|
|
84
|
+
var s;
|
|
85
|
+
(s = this.child) == null || s.matchInto(n);
|
|
86
86
|
}
|
|
87
87
|
/** Currently attached child, or null when nothing is playing. */
|
|
88
88
|
get activeChild() {
|
|
89
89
|
return this.child;
|
|
90
90
|
}
|
|
91
91
|
/** Subscribe to host state changes. Returns an unsubscribe fn. */
|
|
92
|
-
subscribe(
|
|
93
|
-
return this.listeners.add(
|
|
94
|
-
this.listeners.delete(
|
|
92
|
+
subscribe(n) {
|
|
93
|
+
return this.listeners.add(n), () => {
|
|
94
|
+
this.listeners.delete(n);
|
|
95
95
|
};
|
|
96
96
|
}
|
|
97
97
|
notify() {
|
|
98
|
-
for (const
|
|
98
|
+
for (const n of this.listeners) n();
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
-
const
|
|
102
|
-
var
|
|
103
|
-
t.style.position = "absolute", t.style.width = "100%", t.style.top = `${-1 * (((
|
|
104
|
-
},
|
|
105
|
-
let
|
|
106
|
-
for (;
|
|
107
|
-
const
|
|
108
|
-
if (
|
|
109
|
-
return
|
|
110
|
-
|
|
101
|
+
const zt = (t, e) => {
|
|
102
|
+
var n;
|
|
103
|
+
t.style.position = "absolute", t.style.width = "100%", t.style.top = `${-1 * (((n = e == null ? void 0 : e.scrollOffset) == null ? void 0 : n.y) ?? 0)}px`, t.style.left = "0";
|
|
104
|
+
}, vt = /* @__PURE__ */ new Set(["auto", "scroll", "overlay"]), Kt = (t) => {
|
|
105
|
+
let e = t.parentElement;
|
|
106
|
+
for (; e && e !== document.body; ) {
|
|
107
|
+
const n = window.getComputedStyle(e);
|
|
108
|
+
if (vt.has(n.overflowY) || vt.has(n.overflowX))
|
|
109
|
+
return e;
|
|
110
|
+
e = e.parentElement;
|
|
111
111
|
}
|
|
112
112
|
return document.documentElement;
|
|
113
|
-
},
|
|
114
|
-
let
|
|
115
|
-
for (;
|
|
116
|
-
const
|
|
117
|
-
if (
|
|
118
|
-
return
|
|
119
|
-
|
|
113
|
+
}, Xt = (t) => {
|
|
114
|
+
let e = t.parentElement;
|
|
115
|
+
for (; e && e !== document.body; ) {
|
|
116
|
+
const n = window.getComputedStyle(e).position;
|
|
117
|
+
if (n === "relative" || n === "absolute" || n === "fixed" || n === "sticky")
|
|
118
|
+
return e;
|
|
119
|
+
e = e.parentElement;
|
|
120
120
|
}
|
|
121
121
|
return document.body;
|
|
122
122
|
};
|
|
123
|
-
function
|
|
124
|
-
const
|
|
125
|
-
return Promise.all(
|
|
126
|
-
const
|
|
127
|
-
return
|
|
128
|
-
|
|
129
|
-
}),
|
|
123
|
+
function $t(t) {
|
|
124
|
+
const e = Object.keys(t);
|
|
125
|
+
return Promise.all(e.map((n) => t[n])).then((n) => {
|
|
126
|
+
const s = {};
|
|
127
|
+
return e.forEach((r, i) => {
|
|
128
|
+
s[r] = n[i];
|
|
129
|
+
}), s;
|
|
130
130
|
});
|
|
131
131
|
}
|
|
132
|
-
const
|
|
132
|
+
const Gt = 1e6, Et = 100, Ut = 10, qt = 1;
|
|
133
133
|
function Vt(t) {
|
|
134
|
-
const
|
|
135
|
-
return
|
|
134
|
+
const e = t.trim(), n = e.indexOf("#"), s = e.indexOf("?"), r = [n, s].filter((i) => i >= 0).reduce((i, l) => Math.min(i, l), e.length);
|
|
135
|
+
return e.slice(0, r);
|
|
136
136
|
}
|
|
137
|
-
function
|
|
138
|
-
const
|
|
137
|
+
function V(t) {
|
|
138
|
+
const e = Vt(t);
|
|
139
139
|
try {
|
|
140
|
-
if (/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(
|
|
141
|
-
return
|
|
140
|
+
if (/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(e))
|
|
141
|
+
return V(new URL(e).pathname);
|
|
142
142
|
} catch {
|
|
143
143
|
}
|
|
144
|
-
const
|
|
145
|
-
return (
|
|
144
|
+
const s = (e.startsWith("/") ? e : `/${e}`).replace(/\/+/g, "/");
|
|
145
|
+
return (s.length > 1 ? s.replace(/\/+$/g, "") : s) || "/";
|
|
146
146
|
}
|
|
147
|
-
function
|
|
148
|
-
const
|
|
149
|
-
return
|
|
147
|
+
function Yt(t) {
|
|
148
|
+
const e = t.trim();
|
|
149
|
+
return e === "*" ? "/**" : V(e);
|
|
150
150
|
}
|
|
151
151
|
function at(t) {
|
|
152
152
|
return t === "/" ? [] : t.slice(1).split("/");
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function Zt(t) {
|
|
155
155
|
return t.startsWith(":") || t.startsWith("[") && t.endsWith("]") || t.startsWith("{") && t.endsWith("}");
|
|
156
156
|
}
|
|
157
|
-
function
|
|
158
|
-
const
|
|
159
|
-
if (
|
|
157
|
+
function kt(t, e) {
|
|
158
|
+
const n = V(t), s = Yt(e);
|
|
159
|
+
if (n === s)
|
|
160
160
|
return {
|
|
161
161
|
matched: !0,
|
|
162
|
-
specificity:
|
|
163
|
-
pattern:
|
|
162
|
+
specificity: Gt + at(s).length * Et,
|
|
163
|
+
pattern: e
|
|
164
164
|
};
|
|
165
|
-
const
|
|
165
|
+
const r = at(n), i = at(s);
|
|
166
166
|
let l = 0;
|
|
167
|
-
for (let
|
|
168
|
-
const
|
|
169
|
-
if (
|
|
167
|
+
for (let a = 0; a < i.length; a++) {
|
|
168
|
+
const f = i[a], u = r[a], y = a === i.length - 1;
|
|
169
|
+
if (f === "**")
|
|
170
170
|
return {
|
|
171
|
-
matched:
|
|
171
|
+
matched: y && r.length >= a,
|
|
172
172
|
specificity: l,
|
|
173
|
-
pattern:
|
|
173
|
+
pattern: e
|
|
174
174
|
};
|
|
175
|
-
if (
|
|
176
|
-
return { matched: !1, specificity: 0, pattern:
|
|
177
|
-
if (
|
|
175
|
+
if (u === void 0 || f === void 0)
|
|
176
|
+
return { matched: !1, specificity: 0, pattern: e };
|
|
177
|
+
if (f === "*") {
|
|
178
178
|
l += qt;
|
|
179
179
|
continue;
|
|
180
180
|
}
|
|
181
|
-
if (
|
|
181
|
+
if (Zt(f)) {
|
|
182
182
|
l += Ut;
|
|
183
183
|
continue;
|
|
184
184
|
}
|
|
185
|
-
if (
|
|
186
|
-
return { matched: !1, specificity: 0, pattern:
|
|
187
|
-
l +=
|
|
185
|
+
if (f !== u)
|
|
186
|
+
return { matched: !1, specificity: 0, pattern: e };
|
|
187
|
+
l += Et;
|
|
188
188
|
}
|
|
189
189
|
return {
|
|
190
|
-
matched:
|
|
190
|
+
matched: r.length === i.length,
|
|
191
191
|
specificity: l,
|
|
192
|
-
pattern:
|
|
192
|
+
pattern: e
|
|
193
193
|
};
|
|
194
194
|
}
|
|
195
|
-
function
|
|
196
|
-
const
|
|
197
|
-
let
|
|
198
|
-
for (const
|
|
199
|
-
const
|
|
200
|
-
|
|
195
|
+
function N(t, e) {
|
|
196
|
+
const n = typeof e == "string" ? [e] : e;
|
|
197
|
+
let s = null;
|
|
198
|
+
for (const r of n) {
|
|
199
|
+
const i = kt(t, r);
|
|
200
|
+
i.matched && (!s || i.specificity > s.specificity) && (s = i);
|
|
201
201
|
}
|
|
202
|
-
return
|
|
202
|
+
return s;
|
|
203
203
|
}
|
|
204
|
-
function
|
|
205
|
-
return
|
|
204
|
+
function Qt(t, e) {
|
|
205
|
+
return kt(t, e).matched;
|
|
206
206
|
}
|
|
207
|
-
const
|
|
208
|
-
function
|
|
207
|
+
const jt = 768, Jt = 10, te = 10;
|
|
208
|
+
function ee(t = {}) {
|
|
209
209
|
const {
|
|
210
|
-
preserveScroll:
|
|
211
|
-
resolvePath:
|
|
212
|
-
} = t,
|
|
213
|
-
let
|
|
214
|
-
const
|
|
215
|
-
const
|
|
216
|
-
return
|
|
217
|
-
},
|
|
210
|
+
preserveScroll: e = (v) => v,
|
|
211
|
+
resolvePath: n = (v) => v
|
|
212
|
+
} = t, s = typeof e == "function" ? e : () => e;
|
|
213
|
+
let r = null, i = !1, l = !1;
|
|
214
|
+
const a = () => {
|
|
215
|
+
const v = (r == null ? void 0 : r.clientWidth) ?? 0, g = v > 0 ? v : typeof window < "u" ? window.innerWidth : 0;
|
|
216
|
+
return g > 0 && g < jt;
|
|
217
|
+
}, f = () => (l || (i = a(), l = !0), i), u = (v) => {
|
|
218
218
|
var _;
|
|
219
|
-
const
|
|
219
|
+
const g = n(v), b = s(f());
|
|
220
220
|
if (b === !1)
|
|
221
|
-
return { preserves: !1, shared: !1, storageKey: `path:${
|
|
221
|
+
return { preserves: !1, shared: !1, storageKey: `path:${g}` };
|
|
222
222
|
if (b === !0)
|
|
223
|
-
return { preserves: !0, shared: !1, storageKey: `path:${
|
|
224
|
-
const
|
|
223
|
+
return { preserves: !0, shared: !1, storageKey: `path:${g}` };
|
|
224
|
+
const P = ((_ = b.exclude) == null ? void 0 : _.some((D) => Qt(g, D))) ?? !1, C = !P && !!b.key;
|
|
225
225
|
return {
|
|
226
|
-
preserves: !
|
|
227
|
-
shared:
|
|
228
|
-
storageKey:
|
|
226
|
+
preserves: !P,
|
|
227
|
+
shared: C,
|
|
228
|
+
storageKey: C ? `shared:${b.key}` : `path:${g}`
|
|
229
229
|
};
|
|
230
|
-
},
|
|
231
|
-
let
|
|
232
|
-
const
|
|
233
|
-
let
|
|
234
|
-
const
|
|
235
|
-
|
|
236
|
-
x:
|
|
237
|
-
y:
|
|
230
|
+
}, y = (v) => u(v).preserves;
|
|
231
|
+
let p = null;
|
|
232
|
+
const h = /* @__PURE__ */ new Map();
|
|
233
|
+
let w = null, k = !1, A = 0;
|
|
234
|
+
const L = () => {
|
|
235
|
+
r && w && !k && h.set(u(w).storageKey, {
|
|
236
|
+
x: r.scrollLeft,
|
|
237
|
+
y: r.scrollTop
|
|
238
238
|
});
|
|
239
|
-
},
|
|
240
|
-
if (!
|
|
241
|
-
const
|
|
242
|
-
if (
|
|
239
|
+
}, K = (v) => {
|
|
240
|
+
if (!r) return;
|
|
241
|
+
const g = u(v);
|
|
242
|
+
if (g.preserves && g.shared && !h.has(g.storageKey))
|
|
243
243
|
return;
|
|
244
|
-
const b =
|
|
245
|
-
let
|
|
246
|
-
const
|
|
247
|
-
if (!
|
|
248
|
-
|
|
244
|
+
const b = g.preserves && h.has(g.storageKey) ? h.get(g.storageKey) : { x: 0, y: 0 };
|
|
245
|
+
let P = 0;
|
|
246
|
+
const C = () => {
|
|
247
|
+
if (!r) return;
|
|
248
|
+
r.scrollTo({
|
|
249
249
|
top: b.y,
|
|
250
250
|
left: b.x
|
|
251
|
-
}), !(Math.abs(
|
|
251
|
+
}), !(Math.abs(r.scrollTop - b.y) < 1 && Math.abs(r.scrollLeft - b.x) < 1) && P < Jt && (P++, requestAnimationFrame(C));
|
|
252
252
|
};
|
|
253
|
-
requestAnimationFrame(
|
|
253
|
+
requestAnimationFrame(C);
|
|
254
254
|
};
|
|
255
255
|
return {
|
|
256
|
-
initializeContext: (
|
|
257
|
-
|
|
256
|
+
initializeContext: (v, g) => {
|
|
257
|
+
k = !0;
|
|
258
258
|
const b = ++A;
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
}).observe(
|
|
259
|
+
p = v, r || (r = Kt(v), i = a(), l = !0, typeof ResizeObserver < "u" && new ResizeObserver(() => {
|
|
260
|
+
i = a();
|
|
261
|
+
}).observe(r), (r === document.documentElement ? window : r).addEventListener("scroll", L, {
|
|
262
262
|
passive: !0
|
|
263
|
-
})),
|
|
264
|
-
let
|
|
265
|
-
const
|
|
266
|
-
b === A && (
|
|
263
|
+
})), w = g, K(g);
|
|
264
|
+
let P = 0;
|
|
265
|
+
const C = () => {
|
|
266
|
+
b === A && (P++, P >= te ? k = !1 : requestAnimationFrame(C));
|
|
267
267
|
};
|
|
268
|
-
requestAnimationFrame(
|
|
268
|
+
requestAnimationFrame(C);
|
|
269
269
|
},
|
|
270
|
-
calculateScrollOffset: (
|
|
271
|
-
const b =
|
|
270
|
+
calculateScrollOffset: (v, g) => {
|
|
271
|
+
const b = v ? u(v).storageKey : null, P = b && h.has(b) ? h.get(b) : { x: 0, y: 0 }, C = g ? u(g) : null, _ = C != null && C.preserves ? C.storageKey : null, D = _ && h.has(_) ? h.get(_) : { x: 0, y: 0 };
|
|
272
272
|
return {
|
|
273
|
-
x: -
|
|
274
|
-
y: -
|
|
273
|
+
x: -D.x + P.x,
|
|
274
|
+
y: -D.y + P.y
|
|
275
275
|
};
|
|
276
276
|
},
|
|
277
|
-
evictScrollPosition: (
|
|
278
|
-
|
|
277
|
+
evictScrollPosition: (v) => {
|
|
278
|
+
h.delete(u(v).storageKey);
|
|
279
279
|
},
|
|
280
|
-
shouldPreserve:
|
|
281
|
-
getScrollContainer: () =>
|
|
282
|
-
getPositionedParentElement: () =>
|
|
283
|
-
getScrollPosition: (
|
|
284
|
-
const
|
|
285
|
-
return
|
|
280
|
+
shouldPreserve: y,
|
|
281
|
+
getScrollContainer: () => r,
|
|
282
|
+
getPositionedParentElement: () => p ? Xt(p) : document.body,
|
|
283
|
+
getScrollPosition: (v) => {
|
|
284
|
+
const g = v ? u(v).storageKey : null;
|
|
285
|
+
return g && h.has(g) ? h.get(g) : { x: 0, y: 0 };
|
|
286
286
|
},
|
|
287
287
|
// Same measurement that drives `preserveScroll`'s `isMobile`, exposed so a
|
|
288
288
|
// functional `transitions` config can branch on it too.
|
|
289
|
-
getIsMobile:
|
|
289
|
+
getIsMobile: f
|
|
290
290
|
};
|
|
291
291
|
}
|
|
292
|
-
const
|
|
293
|
-
function
|
|
294
|
-
let t = null,
|
|
295
|
-
const l = (
|
|
296
|
-
for (let
|
|
297
|
-
const
|
|
298
|
-
if (
|
|
292
|
+
const bt = 30, wt = 8, St = 1.2, Tt = 30, ne = 600;
|
|
293
|
+
function ie() {
|
|
294
|
+
let t = null, e = !1, n = !1, s = null, r = null, i = !1;
|
|
295
|
+
const l = (E, S) => {
|
|
296
|
+
for (let T = 0; T < E.length; T++) {
|
|
297
|
+
const R = E.item(T);
|
|
298
|
+
if (R && R.identifier === S) return R;
|
|
299
299
|
}
|
|
300
300
|
return null;
|
|
301
|
-
},
|
|
302
|
-
|
|
303
|
-
}, y = () => {
|
|
304
|
-
o !== null && (clearTimeout(o), o = null);
|
|
301
|
+
}, a = () => {
|
|
302
|
+
s !== null && (clearTimeout(s), s = null);
|
|
305
303
|
}, f = () => {
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
304
|
+
r !== null && (clearTimeout(r), r = null);
|
|
305
|
+
}, u = () => {
|
|
306
|
+
e = !0, n = !0, a(), f(), s = setTimeout(() => {
|
|
307
|
+
e = !1, n = !1, s = null;
|
|
308
|
+
}, ne);
|
|
309
|
+
}, y = (E) => {
|
|
310
|
+
if (E.touches.length !== 1) {
|
|
311
311
|
t = null;
|
|
312
312
|
return;
|
|
313
313
|
}
|
|
314
|
-
const
|
|
315
|
-
if (!
|
|
314
|
+
const S = E.touches.item(0);
|
|
315
|
+
if (!S) {
|
|
316
316
|
t = null;
|
|
317
317
|
return;
|
|
318
318
|
}
|
|
319
|
-
const
|
|
320
|
-
if (!
|
|
319
|
+
const T = window.innerWidth, R = S.clientX <= bt, W = S.clientX >= T - bt;
|
|
320
|
+
if (!R && !W) {
|
|
321
321
|
t = null;
|
|
322
322
|
return;
|
|
323
323
|
}
|
|
324
324
|
t = {
|
|
325
|
-
identifier:
|
|
326
|
-
startX:
|
|
327
|
-
startY:
|
|
328
|
-
fromLeftEdge:
|
|
325
|
+
identifier: S.identifier,
|
|
326
|
+
startX: S.clientX,
|
|
327
|
+
startY: S.clientY,
|
|
328
|
+
fromLeftEdge: R,
|
|
329
329
|
moved: !1
|
|
330
330
|
};
|
|
331
|
-
},
|
|
331
|
+
}, p = (E) => {
|
|
332
332
|
if (!t) return;
|
|
333
|
-
if (
|
|
333
|
+
if (E.touches.length !== 1) {
|
|
334
334
|
t = null;
|
|
335
335
|
return;
|
|
336
336
|
}
|
|
337
|
-
const
|
|
338
|
-
if (!
|
|
337
|
+
const S = l(E.touches, t.identifier);
|
|
338
|
+
if (!S) {
|
|
339
339
|
t = null;
|
|
340
340
|
return;
|
|
341
341
|
}
|
|
342
|
-
const
|
|
343
|
-
if (
|
|
342
|
+
const T = S.clientX - t.startX, R = S.clientY - t.startY, W = Math.abs(T), F = Math.abs(R);
|
|
343
|
+
if (F > wt && F > W * St) {
|
|
344
344
|
t = null;
|
|
345
345
|
return;
|
|
346
346
|
}
|
|
347
|
-
const
|
|
348
|
-
|
|
349
|
-
},
|
|
347
|
+
const v = t.fromLeftEdge ? T > 0 : T < 0;
|
|
348
|
+
W > wt && W > F * St && v && (t.moved = !0);
|
|
349
|
+
}, h = (E) => {
|
|
350
350
|
if (!t) return;
|
|
351
|
-
const
|
|
352
|
-
if (!
|
|
351
|
+
const S = l(E.changedTouches, t.identifier);
|
|
352
|
+
if (!S) {
|
|
353
353
|
t = null;
|
|
354
354
|
return;
|
|
355
355
|
}
|
|
356
|
-
const
|
|
357
|
-
if (t.moved &&
|
|
358
|
-
|
|
356
|
+
const T = S.clientX - t.startX, R = t.fromLeftEdge ? T > 0 : T < 0;
|
|
357
|
+
if (t.moved && R && Math.abs(T) >= Tt) {
|
|
358
|
+
u(), t = null;
|
|
359
359
|
return;
|
|
360
360
|
}
|
|
361
|
-
t.moved && Math.abs(
|
|
362
|
-
},
|
|
363
|
-
t && (t.moved &&
|
|
361
|
+
t.moved && Math.abs(T) >= Tt && u(), t = null;
|
|
362
|
+
}, w = () => {
|
|
363
|
+
t && (t.moved && u(), t = null);
|
|
364
364
|
};
|
|
365
365
|
return { initialize: () => {
|
|
366
|
-
if (typeof window > "u" ||
|
|
367
|
-
|
|
368
|
-
const
|
|
369
|
-
window.addEventListener("touchstart",
|
|
366
|
+
if (typeof window > "u" || i) return;
|
|
367
|
+
i = !0;
|
|
368
|
+
const E = { passive: !0, capture: !0 };
|
|
369
|
+
window.addEventListener("touchstart", y, E), window.addEventListener("touchmove", p, E), window.addEventListener("touchend", h, E), window.addEventListener("touchcancel", w, E);
|
|
370
370
|
}, destroy: () => {
|
|
371
|
-
if (typeof window > "u" || !
|
|
372
|
-
|
|
373
|
-
const
|
|
374
|
-
window.removeEventListener("touchstart",
|
|
371
|
+
if (typeof window > "u" || !i) return;
|
|
372
|
+
i = !1;
|
|
373
|
+
const E = { capture: !0 };
|
|
374
|
+
window.removeEventListener("touchstart", y, E), window.removeEventListener("touchmove", p, E), window.removeEventListener("touchend", h, E), window.removeEventListener("touchcancel", w, E), a(), f(), t = null, e = !1, n = !1;
|
|
375
375
|
}, isSwipeBack: () => {
|
|
376
|
-
const
|
|
377
|
-
return
|
|
376
|
+
const E = e || n;
|
|
377
|
+
return E && a(), E;
|
|
378
378
|
}, onPageEnter: () => {
|
|
379
|
-
|
|
380
|
-
|
|
379
|
+
e = !1, a(), f(), r = setTimeout(() => {
|
|
380
|
+
n = !1, r = null;
|
|
381
381
|
}, 0);
|
|
382
382
|
} };
|
|
383
383
|
}
|
|
384
|
-
function
|
|
385
|
-
return
|
|
384
|
+
function se(t, e) {
|
|
385
|
+
return e ? t.priority !== e.priority ? t.priority > e.priority : t.specificity !== e.specificity ? t.specificity > e.specificity : t.ruleIndex < e.ruleIndex : !0;
|
|
386
386
|
}
|
|
387
|
-
function
|
|
388
|
-
let
|
|
389
|
-
return
|
|
390
|
-
const
|
|
391
|
-
let
|
|
392
|
-
if (
|
|
393
|
-
const
|
|
394
|
-
if (
|
|
395
|
-
const
|
|
396
|
-
|
|
397
|
-
transition:
|
|
398
|
-
direction:
|
|
387
|
+
function oe(t, e, n, s) {
|
|
388
|
+
let r = null;
|
|
389
|
+
return n.forEach((i, l) => {
|
|
390
|
+
const a = i.priority ?? 0;
|
|
391
|
+
let f = null;
|
|
392
|
+
if (i.on !== void 0) {
|
|
393
|
+
const u = i.except !== void 0 && N(t, i.except) !== null, y = i.except !== void 0 && N(e, i.except) !== null, p = u ? null : N(t, i.on), h = y ? null : N(e, i.on);
|
|
394
|
+
if (p || h) {
|
|
395
|
+
const w = !p && h ? "forward" : p && !h ? "backward" : s;
|
|
396
|
+
f = {
|
|
397
|
+
transition: i.transition,
|
|
398
|
+
direction: w,
|
|
399
399
|
ruleIndex: l,
|
|
400
|
-
priority:
|
|
400
|
+
priority: a,
|
|
401
401
|
specificity: Math.max(
|
|
402
|
-
(
|
|
403
|
-
(
|
|
402
|
+
(p == null ? void 0 : p.specificity) ?? 0,
|
|
403
|
+
(h == null ? void 0 : h.specificity) ?? 0
|
|
404
404
|
),
|
|
405
|
-
reason: !
|
|
405
|
+
reason: !p && h ? "on-enter" : p && !h ? "on-leave" : "on-history"
|
|
406
406
|
};
|
|
407
407
|
}
|
|
408
|
-
} else if (
|
|
409
|
-
let
|
|
410
|
-
|
|
411
|
-
const A =
|
|
412
|
-
A && A.specificity >
|
|
413
|
-
const
|
|
414
|
-
|
|
415
|
-
}),
|
|
416
|
-
transition:
|
|
417
|
-
direction:
|
|
408
|
+
} else if (i.ordered !== void 0) {
|
|
409
|
+
let u = -1, y = -1, p = -1, h = -1;
|
|
410
|
+
i.ordered.forEach((w, k) => {
|
|
411
|
+
const A = N(t, w);
|
|
412
|
+
A && A.specificity > p && (u = k, p = A.specificity);
|
|
413
|
+
const L = N(e, w);
|
|
414
|
+
L && L.specificity > h && (y = k, h = L.specificity);
|
|
415
|
+
}), u >= 0 && y >= 0 && u !== y && (f = {
|
|
416
|
+
transition: i.transition,
|
|
417
|
+
direction: u < y ? "forward" : "backward",
|
|
418
418
|
ruleIndex: l,
|
|
419
|
-
priority:
|
|
420
|
-
specificity:
|
|
419
|
+
priority: a,
|
|
420
|
+
specificity: p + h,
|
|
421
421
|
reason: "ordered"
|
|
422
422
|
});
|
|
423
423
|
} else {
|
|
424
|
-
const
|
|
425
|
-
if (
|
|
426
|
-
const A =
|
|
427
|
-
|
|
428
|
-
transition:
|
|
429
|
-
direction:
|
|
424
|
+
const u = N(t, i.from), y = N(e, i.to), p = i.bidirectional === !1 ? null : N(t, i.to), h = i.bidirectional === !1 ? null : N(e, i.from), w = u && y, k = p && h;
|
|
425
|
+
if (w || k) {
|
|
426
|
+
const A = w ? u.specificity + y.specificity : -1, L = k ? p.specificity + h.specificity : -1, K = w && k && A === L ? s : A >= L ? "forward" : "backward";
|
|
427
|
+
f = {
|
|
428
|
+
transition: i.transition,
|
|
429
|
+
direction: K,
|
|
430
430
|
ruleIndex: l,
|
|
431
|
-
priority:
|
|
432
|
-
specificity: Math.max(A,
|
|
431
|
+
priority: a,
|
|
432
|
+
specificity: Math.max(A, L),
|
|
433
433
|
reason: "pair"
|
|
434
434
|
};
|
|
435
435
|
}
|
|
436
436
|
}
|
|
437
|
-
|
|
438
|
-
}),
|
|
437
|
+
f && se(f, r) && (r = f);
|
|
438
|
+
}), r;
|
|
439
439
|
}
|
|
440
|
-
function
|
|
440
|
+
function re() {
|
|
441
441
|
const t = [];
|
|
442
|
-
let
|
|
443
|
-
const
|
|
444
|
-
|
|
442
|
+
let e = !1;
|
|
443
|
+
const n = () => {
|
|
444
|
+
e = !0;
|
|
445
445
|
};
|
|
446
|
-
return typeof window < "u" && window.addEventListener("popstate",
|
|
447
|
-
resolve(
|
|
448
|
-
const
|
|
446
|
+
return typeof window < "u" && window.addEventListener("popstate", n), {
|
|
447
|
+
resolve(s, r) {
|
|
448
|
+
const i = V(s), l = V(r);
|
|
449
449
|
if (t.length === 0)
|
|
450
|
-
t.push(
|
|
451
|
-
else if (t[t.length - 1] !==
|
|
452
|
-
const
|
|
453
|
-
|
|
450
|
+
t.push(i);
|
|
451
|
+
else if (t[t.length - 1] !== i) {
|
|
452
|
+
const u = t.lastIndexOf(i);
|
|
453
|
+
u >= 0 ? t.splice(u + 1) : t.push(i);
|
|
454
454
|
}
|
|
455
|
-
const
|
|
456
|
-
if (
|
|
457
|
-
const
|
|
458
|
-
|
|
455
|
+
const a = t[t.length - 2], f = e || a === l ? "backward" : "forward";
|
|
456
|
+
if (e = !1, f === "backward") {
|
|
457
|
+
const u = t.lastIndexOf(l);
|
|
458
|
+
u >= 0 ? t.splice(u + 1) : t.push(l);
|
|
459
459
|
} else t[t.length - 1] !== l && t.push(l);
|
|
460
|
-
return
|
|
460
|
+
return f;
|
|
461
461
|
},
|
|
462
462
|
dispose() {
|
|
463
|
-
typeof window < "u" && window.removeEventListener("popstate",
|
|
463
|
+
typeof window < "u" && window.removeEventListener("popstate", n);
|
|
464
464
|
}
|
|
465
465
|
};
|
|
466
466
|
}
|
|
467
|
-
function
|
|
468
|
-
let
|
|
469
|
-
function
|
|
470
|
-
var i,
|
|
471
|
-
|
|
467
|
+
function ce(t = {}) {
|
|
468
|
+
let e = null, n = null;
|
|
469
|
+
function s() {
|
|
470
|
+
var i, l;
|
|
471
|
+
e && ((i = e.out) == null || i.resolve(null), (l = e.in) == null || l.resolve(null), e = null);
|
|
472
472
|
}
|
|
473
|
-
function
|
|
474
|
-
if (
|
|
475
|
-
if (
|
|
476
|
-
|
|
473
|
+
function r() {
|
|
474
|
+
if (e != null && e.out && e.in) {
|
|
475
|
+
if (e.out.path === e.in.path) {
|
|
476
|
+
s();
|
|
477
477
|
return;
|
|
478
478
|
}
|
|
479
|
-
const i = {
|
|
480
|
-
|
|
479
|
+
const i = {
|
|
480
|
+
from: e.out.path,
|
|
481
|
+
to: e.in.path,
|
|
482
|
+
out: e.out.payload,
|
|
483
|
+
in: e.in.payload
|
|
484
|
+
};
|
|
485
|
+
n = i, e.out.resolve(i), e.in.resolve(i), e = null;
|
|
481
486
|
}
|
|
482
487
|
}
|
|
483
488
|
return {
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
489
|
+
arrive(i, l, a) {
|
|
490
|
+
return new Promise((f) => {
|
|
491
|
+
var h, w;
|
|
492
|
+
const u = n === null ? null : l === "out" ? { path: n.from, payload: n.out } : { path: n.to, payload: n.in };
|
|
493
|
+
if ((u == null ? void 0 : u.path) === i) {
|
|
494
|
+
f(null);
|
|
495
|
+
return;
|
|
496
|
+
}
|
|
497
|
+
l === "out" && ((h = e == null ? void 0 : e.in) == null ? void 0 : h.path) === i && !e.out && (e.in.resolve(null), e.in = void 0);
|
|
498
|
+
const y = e == null ? void 0 : e[l];
|
|
499
|
+
y && y.path !== i && s(), e || (e = {});
|
|
500
|
+
const p = e[l];
|
|
501
|
+
if (p) {
|
|
502
|
+
if (((w = t.keepCurrent) == null ? void 0 : w.call(t, {
|
|
503
|
+
type: l,
|
|
504
|
+
path: i,
|
|
505
|
+
current: p.payload,
|
|
506
|
+
next: a
|
|
507
|
+
})) ?? !1) {
|
|
508
|
+
f(null);
|
|
509
|
+
return;
|
|
510
|
+
}
|
|
511
|
+
p.resolve(null);
|
|
512
|
+
}
|
|
513
|
+
e[l] = { path: i, payload: a, resolve: f }, r();
|
|
491
514
|
});
|
|
515
|
+
},
|
|
516
|
+
cancel(i) {
|
|
517
|
+
(e != null && e.out && i(e.out.payload) || e != null && e.in && i(e.in.payload)) && s(), (n && i(n.out) || n && i(n.in)) && (n = null);
|
|
492
518
|
}
|
|
493
519
|
};
|
|
494
520
|
}
|
|
495
|
-
const
|
|
496
|
-
let J = null,
|
|
497
|
-
function
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
521
|
+
const le = {}, $ = /* @__PURE__ */ new Map();
|
|
522
|
+
let J = null, Pt = !1;
|
|
523
|
+
function At(t, e, n) {
|
|
524
|
+
t instanceof HTMLElement && $.has(t) && !t.isConnected && n.set(t, { entry: $.get(t), anchor: e });
|
|
525
|
+
for (const s of Array.from(t.childNodes))
|
|
526
|
+
At(s, e, n);
|
|
527
|
+
}
|
|
528
|
+
function ae(t) {
|
|
529
|
+
const e = new Set(
|
|
530
|
+
Array.from(t.values(), ({ entry: n }) => n)
|
|
531
|
+
);
|
|
532
|
+
for (const [n, { entry: s, anchor: r }] of t) {
|
|
533
|
+
$.delete(n);
|
|
534
|
+
let i = s.parent, l = !1;
|
|
535
|
+
for (; i; ) {
|
|
536
|
+
if (i.group === s.group && e.has(i)) {
|
|
537
|
+
l = !0;
|
|
538
|
+
break;
|
|
539
|
+
}
|
|
540
|
+
i = i.parent;
|
|
541
|
+
}
|
|
542
|
+
queueMicrotask(() => s.callback(r, { emit: !l }));
|
|
501
543
|
}
|
|
502
|
-
for (const e of Array.from(t.childNodes))
|
|
503
|
-
Ct(e, n);
|
|
504
544
|
}
|
|
505
|
-
function
|
|
506
|
-
if (
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
545
|
+
function ue() {
|
|
546
|
+
if (Pt || typeof document > "u") return;
|
|
547
|
+
Pt = !0, J = new MutationObserver((e) => {
|
|
548
|
+
const n = /* @__PURE__ */ new Map();
|
|
549
|
+
for (const s of e) {
|
|
550
|
+
const r = {
|
|
551
|
+
parent: s.target,
|
|
552
|
+
nextSibling: s.nextSibling
|
|
512
553
|
};
|
|
513
|
-
for (const
|
|
514
|
-
|
|
554
|
+
for (const i of Array.from(s.removedNodes))
|
|
555
|
+
At(i, r, n);
|
|
515
556
|
}
|
|
557
|
+
ae(n);
|
|
516
558
|
});
|
|
517
559
|
const t = () => {
|
|
518
560
|
J == null || J.observe(document.body, { childList: !0, subtree: !0 });
|
|
519
561
|
};
|
|
520
562
|
document.body ? t() : document.addEventListener("DOMContentLoaded", t, { once: !0 });
|
|
521
563
|
}
|
|
522
|
-
function
|
|
523
|
-
|
|
524
|
-
|
|
564
|
+
function de(t, e, n = le) {
|
|
565
|
+
ue();
|
|
566
|
+
let s = t.parentElement, r = null;
|
|
567
|
+
for (; s; ) {
|
|
568
|
+
const i = $.get(s);
|
|
569
|
+
if ((i == null ? void 0 : i.group) === n) {
|
|
570
|
+
r = i;
|
|
571
|
+
break;
|
|
572
|
+
}
|
|
573
|
+
s = s.parentElement;
|
|
574
|
+
}
|
|
575
|
+
return $.set(t, {
|
|
576
|
+
element: t,
|
|
577
|
+
callback: e,
|
|
578
|
+
group: n,
|
|
579
|
+
parent: r
|
|
580
|
+
}), () => {
|
|
581
|
+
$.delete(t);
|
|
525
582
|
};
|
|
526
583
|
}
|
|
527
584
|
const ut = /* @__PURE__ */ new WeakMap();
|
|
528
585
|
let tt = null;
|
|
529
586
|
const et = "none !important";
|
|
530
587
|
function q(t) {
|
|
531
|
-
const
|
|
532
|
-
return t.style.getPropertyPriority("display") ? `${
|
|
588
|
+
const e = t.style.getPropertyValue("display");
|
|
589
|
+
return t.style.getPropertyPriority("display") ? `${e} !important` : e;
|
|
533
590
|
}
|
|
534
|
-
function
|
|
591
|
+
function fe() {
|
|
535
592
|
return tt || (tt = new MutationObserver((t) => {
|
|
536
|
-
for (const
|
|
537
|
-
const
|
|
538
|
-
if (!
|
|
539
|
-
const
|
|
540
|
-
|
|
593
|
+
for (const e of t) {
|
|
594
|
+
const n = e.target, s = ut.get(n);
|
|
595
|
+
if (!s) continue;
|
|
596
|
+
const r = q(n);
|
|
597
|
+
r !== s.accounted && (s.accounted = r, r === et ? (s.reactHidden = !0, s.onHide()) : r !== "none" && s.reactHidden && (s.reactHidden = !1, s.onShow()));
|
|
541
598
|
}
|
|
542
599
|
}), tt);
|
|
543
600
|
}
|
|
544
|
-
function
|
|
545
|
-
const
|
|
546
|
-
accounted:
|
|
547
|
-
reactHidden:
|
|
548
|
-
onHide:
|
|
549
|
-
onShow:
|
|
601
|
+
function he(t, e) {
|
|
602
|
+
const n = q(t), s = {
|
|
603
|
+
accounted: n,
|
|
604
|
+
reactHidden: n === et,
|
|
605
|
+
onHide: e.onHide,
|
|
606
|
+
onShow: e.onShow
|
|
550
607
|
};
|
|
551
|
-
return ut.set(t,
|
|
608
|
+
return ut.set(t, s), fe().observe(t, {
|
|
552
609
|
attributes: !0,
|
|
553
610
|
attributeFilter: ["style"]
|
|
554
611
|
}), {
|
|
555
612
|
get isHidden() {
|
|
556
613
|
return q(t) === et;
|
|
557
614
|
},
|
|
558
|
-
setDisplay(
|
|
559
|
-
|
|
615
|
+
setDisplay(r, i = !1) {
|
|
616
|
+
r === null ? t.style.removeProperty("display") : t.style.setProperty(
|
|
560
617
|
"display",
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
),
|
|
618
|
+
r,
|
|
619
|
+
i ? "important" : ""
|
|
620
|
+
), s.accounted = q(t);
|
|
564
621
|
},
|
|
565
622
|
sync() {
|
|
566
|
-
|
|
623
|
+
s.accounted = q(t), s.reactHidden = s.accounted === et;
|
|
567
624
|
},
|
|
568
625
|
stop() {
|
|
569
626
|
ut.delete(t);
|
|
570
627
|
}
|
|
571
628
|
};
|
|
572
629
|
}
|
|
573
|
-
function
|
|
630
|
+
function Te(t, e = {}) {
|
|
574
631
|
const {
|
|
575
|
-
transitions:
|
|
576
|
-
middleware:
|
|
577
|
-
preserveScroll:
|
|
578
|
-
} = t,
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
632
|
+
transitions: n = [],
|
|
633
|
+
middleware: s = (o, c) => ({ from: o, to: c }),
|
|
634
|
+
preserveScroll: r = (o) => o
|
|
635
|
+
} = t, i = e.host ?? new Ft(), l = {}, a = ce({
|
|
636
|
+
// Nested boundaries can be discovered in separate MutationObserver
|
|
637
|
+
// batches (notably when Suspense reveals a child later). When the same
|
|
638
|
+
// side/path repeats before pairing, the outermost DOM boundary owns it.
|
|
639
|
+
keepCurrent: ({ current: o, next: c }) => o.element.contains(c.element)
|
|
640
|
+
}), f = re(), u = typeof n == "function" ? n : () => n, y = ie();
|
|
641
|
+
y.initialize();
|
|
642
|
+
const p = /* @__PURE__ */ new Map(), h = (o) => {
|
|
643
|
+
let c = p.get(o);
|
|
644
|
+
return c === void 0 && (c = s(o, o).from, p.set(o, c)), c;
|
|
583
645
|
}, {
|
|
584
|
-
initializeContext:
|
|
585
|
-
calculateScrollOffset:
|
|
586
|
-
evictScrollPosition:
|
|
587
|
-
shouldPreserve:
|
|
588
|
-
getScrollContainer:
|
|
589
|
-
getPositionedParentElement:
|
|
590
|
-
getScrollPosition:
|
|
646
|
+
initializeContext: w,
|
|
647
|
+
calculateScrollOffset: k,
|
|
648
|
+
evictScrollPosition: A,
|
|
649
|
+
shouldPreserve: L,
|
|
650
|
+
getScrollContainer: K,
|
|
651
|
+
getPositionedParentElement: E,
|
|
652
|
+
getScrollPosition: S,
|
|
591
653
|
getIsMobile: T
|
|
592
|
-
} =
|
|
593
|
-
const
|
|
594
|
-
let c =
|
|
595
|
-
return c || (c =
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
parent: s.parentNode,
|
|
601
|
-
nextSibling: s.nextSibling
|
|
654
|
+
} = ee({ preserveScroll: r, resolvePath: h }), R = /* @__PURE__ */ new Map(), W = () => {
|
|
655
|
+
const o = T();
|
|
656
|
+
let c = R.get(o);
|
|
657
|
+
return c || (c = u({ isMobile: o }), R.set(o, c)), c;
|
|
658
|
+
}, F = /* @__PURE__ */ new WeakMap(), v = (o) => {
|
|
659
|
+
F.set(o, {
|
|
660
|
+
parent: o.parentNode,
|
|
661
|
+
nextSibling: o.nextSibling
|
|
602
662
|
});
|
|
603
|
-
},
|
|
604
|
-
const c =
|
|
663
|
+
}, g = (o) => {
|
|
664
|
+
const c = F.get(o);
|
|
605
665
|
return c || {
|
|
606
|
-
parent:
|
|
607
|
-
nextSibling:
|
|
666
|
+
parent: o.parentNode,
|
|
667
|
+
nextSibling: o.nextSibling
|
|
608
668
|
};
|
|
609
|
-
},
|
|
610
|
-
let
|
|
611
|
-
const
|
|
612
|
-
const c = typeof getComputedStyle < "u" ? getComputedStyle(
|
|
669
|
+
}, b = /* @__PURE__ */ new WeakMap(), P = /* @__PURE__ */ new WeakMap();
|
|
670
|
+
let C = 0;
|
|
671
|
+
const _ = (o) => {
|
|
672
|
+
const c = typeof getComputedStyle < "u" ? getComputedStyle(o).display : "";
|
|
613
673
|
return c && c !== "none" ? c : "block";
|
|
614
|
-
},
|
|
615
|
-
c.visibleDisplay =
|
|
616
|
-
}, dt = (
|
|
617
|
-
if (
|
|
618
|
-
|
|
619
|
-
const
|
|
620
|
-
|
|
621
|
-
}, Lt = (
|
|
622
|
-
const
|
|
674
|
+
}, D = (o, c) => {
|
|
675
|
+
c.visibleDisplay = o.style.getPropertyValue("display"), c.computedDisplay = _(o);
|
|
676
|
+
}, dt = (o, c) => {
|
|
677
|
+
if (P.get(o) !== c) return;
|
|
678
|
+
P.delete(o);
|
|
679
|
+
const d = b.get(o);
|
|
680
|
+
d && (d.savedCss !== null && (o.style.cssText = d.savedCss, d.savedCss = null), d.intent === "hidden" ? d.vis.setDisplay("none", !0) : d.visibleDisplay ? (d.vis.setDisplay(d.visibleDisplay, !1), D(o, d)) : (d.vis.setDisplay(null), D(o, d)));
|
|
681
|
+
}, Lt = (o, c, d, M, m, O) => {
|
|
682
|
+
const x = m.element, H = O.element, B = (m.mode ?? "unmount") === "hidden", { parent: Z, nextSibling: it } = m.parent ? { parent: m.parent, nextSibling: m.nextSibling } : g(x), Q = k(d, M), st = {
|
|
623
683
|
direction: c,
|
|
624
684
|
scrollOffset: Q,
|
|
625
|
-
from: { scroll:
|
|
626
|
-
to: { scroll:
|
|
685
|
+
from: { scroll: S(d) },
|
|
686
|
+
to: { scroll: S(M) },
|
|
627
687
|
get scrollingElement() {
|
|
628
|
-
return
|
|
688
|
+
return K() || document.documentElement;
|
|
629
689
|
},
|
|
630
690
|
get positionedParent() {
|
|
631
|
-
return
|
|
691
|
+
return E();
|
|
632
692
|
}
|
|
633
693
|
};
|
|
634
|
-
let
|
|
635
|
-
if (
|
|
636
|
-
|
|
637
|
-
const
|
|
638
|
-
|
|
694
|
+
let I;
|
|
695
|
+
if (B) {
|
|
696
|
+
I = x, I.style.top = `${-1 * ((Q == null ? void 0 : Q.y) ?? 0)}px`;
|
|
697
|
+
const z = b.get(H);
|
|
698
|
+
z && z.savedCss === null && (z.savedCss = H.style.cssText);
|
|
639
699
|
} else
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
const j =
|
|
643
|
-
|
|
644
|
-
const
|
|
645
|
-
from:
|
|
646
|
-
to:
|
|
700
|
+
I = x, zt(I, st);
|
|
701
|
+
L(d) || A(d);
|
|
702
|
+
const j = B ? ++C : 0;
|
|
703
|
+
B && (P.set(H, j), P.set(x, j));
|
|
704
|
+
const yt = Promise.resolve(I), mt = Promise.resolve(H), gt = [], It = {
|
|
705
|
+
from: yt,
|
|
706
|
+
to: mt,
|
|
647
707
|
context: st,
|
|
648
|
-
createElement: ((
|
|
649
|
-
const
|
|
650
|
-
return
|
|
708
|
+
createElement: ((z, ot = "div") => {
|
|
709
|
+
const G = document.createElement(ot);
|
|
710
|
+
return G.setAttribute("data-ssgoi-id", z), gt.push(G), G;
|
|
651
711
|
})
|
|
652
|
-
},
|
|
653
|
-
|
|
712
|
+
}, Nt = Promise.resolve(
|
|
713
|
+
o.prepare ? o.prepare(It) : {}
|
|
654
714
|
);
|
|
655
|
-
|
|
656
|
-
from:
|
|
657
|
-
to:
|
|
658
|
-
extras:
|
|
659
|
-
}).then(({ from:
|
|
660
|
-
!
|
|
661
|
-
const rt =
|
|
662
|
-
from:
|
|
715
|
+
$t({
|
|
716
|
+
from: yt,
|
|
717
|
+
to: mt,
|
|
718
|
+
extras: Nt
|
|
719
|
+
}).then(({ from: z, to: ot, extras: G }) => {
|
|
720
|
+
!B && Z && (it && Z.contains(it) ? Z.insertBefore(I, it) : Z.appendChild(I));
|
|
721
|
+
const rt = o.animation({
|
|
722
|
+
from: z,
|
|
663
723
|
to: ot,
|
|
664
724
|
context: st,
|
|
665
|
-
|
|
725
|
+
...G
|
|
666
726
|
}), ct = rt.onComplete;
|
|
667
727
|
rt.onComplete = () => {
|
|
668
|
-
ct == null || ct(),
|
|
669
|
-
for (const lt of
|
|
728
|
+
ct == null || ct(), B ? (dt(x, j), dt(H, j)) : I.parentNode && I.parentNode.removeChild(I);
|
|
729
|
+
for (const lt of gt)
|
|
670
730
|
lt.parentNode && lt.parentNode.removeChild(lt);
|
|
671
|
-
},
|
|
731
|
+
}, i.attach(rt);
|
|
672
732
|
});
|
|
673
|
-
},
|
|
674
|
-
const
|
|
675
|
-
|
|
676
|
-
if (c === "in" &&
|
|
677
|
-
if (
|
|
678
|
-
const
|
|
679
|
-
|
|
733
|
+
}, Y = (o, c, d) => {
|
|
734
|
+
const M = y.isSwipeBack();
|
|
735
|
+
a.arrive(o, c, d).then((m) => {
|
|
736
|
+
if (c === "in" && y.onPageEnter(), !m) return;
|
|
737
|
+
if (M && c === "in") {
|
|
738
|
+
const B = s(m.from, m.to);
|
|
739
|
+
f.resolve(B.from, B.to);
|
|
680
740
|
}
|
|
681
|
-
if (
|
|
682
|
-
c === "out" &&
|
|
741
|
+
if (M) {
|
|
742
|
+
c === "out" && m.from && !L(m.from) && A(m.from);
|
|
683
743
|
return;
|
|
684
744
|
}
|
|
685
745
|
if (c !== "in") return;
|
|
686
|
-
const { from:
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
),
|
|
690
|
-
|
|
746
|
+
const { from: O, to: x } = s(
|
|
747
|
+
m.from,
|
|
748
|
+
m.to
|
|
749
|
+
), H = f.resolve(
|
|
750
|
+
O,
|
|
751
|
+
x
|
|
752
|
+
), X = oe(
|
|
753
|
+
O,
|
|
754
|
+
x,
|
|
755
|
+
W(),
|
|
691
756
|
H
|
|
692
|
-
)
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
N.direction,
|
|
701
|
-
v.from,
|
|
702
|
-
v.to,
|
|
703
|
-
nt,
|
|
704
|
-
W
|
|
757
|
+
);
|
|
758
|
+
X && Lt(
|
|
759
|
+
X.transition,
|
|
760
|
+
X.direction,
|
|
761
|
+
m.from,
|
|
762
|
+
m.to,
|
|
763
|
+
m.out,
|
|
764
|
+
m.in
|
|
705
765
|
);
|
|
706
766
|
});
|
|
707
|
-
}, Ot = (
|
|
708
|
-
const
|
|
709
|
-
if (!
|
|
710
|
-
const
|
|
711
|
-
if (
|
|
712
|
-
const
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
nextSibling: M.nextSibling,
|
|
767
|
+
}, Ot = (o, c) => {
|
|
768
|
+
const d = b.get(o);
|
|
769
|
+
if (!d) return;
|
|
770
|
+
const M = d.intent === "hidden";
|
|
771
|
+
if (d.intent = "hidden", d.savedCss === null && (d.savedCss = o.style.cssText), d.vis.setDisplay(d.computedDisplay || "block", !0), o.style.position = "absolute", o.style.width = "100%", o.style.left = "0", M) return;
|
|
772
|
+
const m = g(o), O = {
|
|
773
|
+
element: o,
|
|
774
|
+
parent: m.parent,
|
|
775
|
+
nextSibling: m.nextSibling,
|
|
717
776
|
mode: "hidden"
|
|
718
|
-
};
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
element:
|
|
726
|
-
parent:
|
|
727
|
-
nextSibling:
|
|
728
|
-
};
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
(R == null ? void 0 : R.element) === s && (R = null), (L == null ? void 0 : L.element) === s && (L = null);
|
|
777
|
+
}, x = o.getAttribute("data-ssgoi-transition") ?? c;
|
|
778
|
+
Y(x, "out", O);
|
|
779
|
+
}, _t = (o, c) => {
|
|
780
|
+
const d = b.get(o);
|
|
781
|
+
if (!d || d.intent === "visible") return;
|
|
782
|
+
d.intent = "visible", D(o, d), d.savedCss !== null && (o.style.cssText = d.savedCss, d.visibleDisplay ? d.vis.setDisplay(d.visibleDisplay, !1) : d.vis.setDisplay(null)), w(o, c);
|
|
783
|
+
const M = {
|
|
784
|
+
element: o,
|
|
785
|
+
parent: o.parentElement,
|
|
786
|
+
nextSibling: o.nextElementSibling
|
|
787
|
+
}, m = o.getAttribute("data-ssgoi-transition") ?? c;
|
|
788
|
+
Y(m, "in", M);
|
|
789
|
+
}, Dt = (o, c, d, M = !0) => {
|
|
790
|
+
const m = b.get(o);
|
|
791
|
+
if (m && (m.vis.stop(), b.delete(o), P.delete(o), m.intent === "hidden")) {
|
|
792
|
+
a.cancel((X) => X.element === o);
|
|
735
793
|
return;
|
|
736
794
|
}
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
element:
|
|
740
|
-
parent:
|
|
741
|
-
nextSibling:
|
|
795
|
+
if (!M) return;
|
|
796
|
+
const O = d ?? g(o), x = {
|
|
797
|
+
element: o,
|
|
798
|
+
parent: O.parent,
|
|
799
|
+
nextSibling: O.nextSibling,
|
|
742
800
|
mode: "unmount"
|
|
743
|
-
};
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
vis: a,
|
|
801
|
+
}, H = o.getAttribute("data-ssgoi-transition") ?? c;
|
|
802
|
+
Y(H, "out", x);
|
|
803
|
+
}, ft = /* @__PURE__ */ new WeakSet(), ht = (o, c, { enter: d = !0 } = {}) => {
|
|
804
|
+
if (ft.has(c)) return;
|
|
805
|
+
ft.add(c), v(c);
|
|
806
|
+
const M = he(c, {
|
|
807
|
+
onHide: () => Ot(c, o),
|
|
808
|
+
onShow: () => _t(c, o)
|
|
809
|
+
}), m = {
|
|
810
|
+
vis: M,
|
|
754
811
|
savedCss: null,
|
|
755
|
-
intent:
|
|
812
|
+
intent: M.isHidden ? "hidden" : "visible",
|
|
756
813
|
visibleDisplay: "",
|
|
757
814
|
computedDisplay: "block"
|
|
758
815
|
};
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
816
|
+
if (b.set(c, m), !M.isHidden && (D(c, m), d)) {
|
|
817
|
+
w(c, o);
|
|
818
|
+
const O = {
|
|
819
|
+
element: c,
|
|
820
|
+
parent: c.parentElement,
|
|
821
|
+
nextSibling: c.nextElementSibling
|
|
822
|
+
};
|
|
823
|
+
Y(o, "in", O);
|
|
824
|
+
}
|
|
825
|
+
de(
|
|
826
|
+
c,
|
|
827
|
+
(O, x) => Dt(c, o, O, (x == null ? void 0 : x.emit) ?? !0),
|
|
828
|
+
l
|
|
829
|
+
);
|
|
830
|
+
}, pt = /* @__PURE__ */ new Map();
|
|
831
|
+
return { register: ht, refFor: (o) => {
|
|
832
|
+
let c = pt.get(o);
|
|
833
|
+
return c || (c = (d) => {
|
|
834
|
+
d && ht(o, d);
|
|
835
|
+
}, pt.set(o, c)), c;
|
|
770
836
|
} };
|
|
771
837
|
}
|
|
772
|
-
const
|
|
773
|
-
function
|
|
838
|
+
const Rt = "data-ssgoi-root", pe = `[${Rt}]`, nt = "data-ssgoi-transition", xt = `[${nt}]`, ye = "[data-ssgoi-clone]";
|
|
839
|
+
function me() {
|
|
774
840
|
return typeof MutationObserver < "u" && typeof HTMLElement < "u" && typeof Node < "u";
|
|
775
841
|
}
|
|
776
|
-
function
|
|
842
|
+
function ge(t) {
|
|
777
843
|
return t.nodeType === Node.ELEMENT_NODE;
|
|
778
844
|
}
|
|
779
|
-
function
|
|
845
|
+
function ve(t) {
|
|
780
846
|
return t instanceof HTMLElement;
|
|
781
847
|
}
|
|
782
|
-
function
|
|
783
|
-
|
|
848
|
+
function Ct(t) {
|
|
849
|
+
let e = 0, n = t.parentElement;
|
|
850
|
+
for (; n; )
|
|
851
|
+
e++, n = n.parentElement;
|
|
852
|
+
return e;
|
|
853
|
+
}
|
|
854
|
+
function Mt(t, e, n = t) {
|
|
855
|
+
const s = Array.from(t).sort(
|
|
856
|
+
(r, i) => Ct(r) - Ct(i)
|
|
857
|
+
);
|
|
858
|
+
for (const r of s) {
|
|
859
|
+
const i = r.getAttribute(nt);
|
|
860
|
+
if (i === null) continue;
|
|
861
|
+
let l = r.parentElement, a = !1;
|
|
862
|
+
for (; l; ) {
|
|
863
|
+
if (n.has(l)) {
|
|
864
|
+
a = !0;
|
|
865
|
+
break;
|
|
866
|
+
}
|
|
867
|
+
l = l.parentElement;
|
|
868
|
+
}
|
|
869
|
+
e.register(i, r, { enter: !a });
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
function Pe(t, e) {
|
|
873
|
+
if (!me()) return () => {
|
|
784
874
|
};
|
|
785
|
-
t.setAttribute(
|
|
786
|
-
const
|
|
787
|
-
if (
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
875
|
+
t.setAttribute(Rt, "");
|
|
876
|
+
const n = (a) => a.closest(pe) === t, s = (a) => !ve(a) || !n(a) || a.closest(ye) || a.getAttribute(nt) === null ? null : a, r = (a, f) => {
|
|
877
|
+
if (ge(a)) {
|
|
878
|
+
if (a.matches(xt)) {
|
|
879
|
+
const u = s(a);
|
|
880
|
+
u && f.add(u);
|
|
881
|
+
}
|
|
882
|
+
for (const u of a.querySelectorAll(xt)) {
|
|
883
|
+
const y = s(u);
|
|
884
|
+
y && f.add(y);
|
|
885
|
+
}
|
|
796
886
|
}
|
|
797
|
-
},
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
887
|
+
}, i = new MutationObserver((a) => {
|
|
888
|
+
const f = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set();
|
|
889
|
+
for (const y of a) {
|
|
890
|
+
if (y.type === "attributes") {
|
|
891
|
+
const p = s(y.target);
|
|
892
|
+
p && f.add(p);
|
|
801
893
|
continue;
|
|
802
894
|
}
|
|
803
|
-
for (const
|
|
804
|
-
|
|
895
|
+
for (const p of y.addedNodes)
|
|
896
|
+
r(p, u);
|
|
805
897
|
}
|
|
898
|
+
for (const y of u) f.add(y);
|
|
899
|
+
Mt(f, e, u);
|
|
806
900
|
});
|
|
807
|
-
|
|
901
|
+
i.observe(t, {
|
|
808
902
|
childList: !0,
|
|
809
903
|
subtree: !0,
|
|
810
904
|
attributes: !0,
|
|
811
|
-
attributeFilter: [
|
|
812
|
-
})
|
|
905
|
+
attributeFilter: [nt]
|
|
906
|
+
});
|
|
907
|
+
const l = /* @__PURE__ */ new Set();
|
|
908
|
+
return r(t, l), Mt(l, e), () => i.disconnect();
|
|
813
909
|
}
|
|
814
910
|
export {
|
|
815
|
-
|
|
911
|
+
Bt as Animation,
|
|
816
912
|
Ft as HostAnimation,
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
913
|
+
Me as MultiAnimation,
|
|
914
|
+
ke as WebAnimation,
|
|
915
|
+
Te as createSggoiTransitionContext,
|
|
916
|
+
Pe as observeSsgoiTransitions
|
|
821
917
|
};
|