flemo 1.5.2 → 1.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as x, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { transform as
|
|
4
|
-
var
|
|
5
|
-
function
|
|
6
|
-
if (Lt) return
|
|
7
|
-
Lt = 1, Object.defineProperty(
|
|
1
|
+
import { jsx as x, jsxs as mt, Fragment as Xt } from "react/jsx-runtime";
|
|
2
|
+
import st, { useEffect as V, createContext as St, useContext as Pt, useReducer as Kt, Children as Ct, useRef as O, useImperativeHandle as zt, useState as at, useLayoutEffect as Dt } from "react";
|
|
3
|
+
import { transform as Rt, useAnimate as At, motion as bt, useDragControls as Wt, AnimatePresence as Jt, MotionConfig as Zt } from "motion/react";
|
|
4
|
+
var G = {}, Lt;
|
|
5
|
+
function te() {
|
|
6
|
+
if (Lt) return G;
|
|
7
|
+
Lt = 1, Object.defineProperty(G, "__esModule", { value: !0 }), G.PathError = G.TokenData = void 0, G.parse = l, G.compile = w, G.match = L, G.pathToRegexp = D, G.stringify = tt;
|
|
8
8
|
const n = "/", e = (i) => i, t = /^[$_\p{ID_Start}]$/u, s = /^[$\u200c\u200d\p{ID_Continue}]$/u, r = {
|
|
9
9
|
// Groups.
|
|
10
10
|
"{": "{",
|
|
@@ -25,249 +25,252 @@ function zt() {
|
|
|
25
25
|
return i.replace(/[.+*?^${}()[\]|/\\]/g, "\\$&");
|
|
26
26
|
}
|
|
27
27
|
class u {
|
|
28
|
-
constructor(
|
|
29
|
-
this.tokens =
|
|
28
|
+
constructor(p, y) {
|
|
29
|
+
this.tokens = p, this.originalPath = y;
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
|
|
32
|
+
G.TokenData = u;
|
|
33
33
|
class h extends TypeError {
|
|
34
|
-
constructor(
|
|
35
|
-
let m =
|
|
34
|
+
constructor(p, y) {
|
|
35
|
+
let m = p;
|
|
36
36
|
y && (m += `: ${y}`), m += "; visit https://git.new/pathToRegexpError for info", super(m), this.originalPath = y;
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
|
|
40
|
-
function l(i,
|
|
41
|
-
const { encodePath: y = e } =
|
|
42
|
-
let
|
|
39
|
+
G.PathError = h;
|
|
40
|
+
function l(i, p = {}) {
|
|
41
|
+
const { encodePath: y = e } = p, m = [...i], g = [];
|
|
42
|
+
let f = 0, S = 0;
|
|
43
43
|
function T() {
|
|
44
|
-
let
|
|
45
|
-
if (t.test(m[
|
|
44
|
+
let E = "";
|
|
45
|
+
if (t.test(m[f]))
|
|
46
46
|
do
|
|
47
|
-
|
|
48
|
-
while (s.test(m[
|
|
49
|
-
else if (m[
|
|
50
|
-
let
|
|
51
|
-
for (;
|
|
52
|
-
if (m[
|
|
53
|
-
|
|
47
|
+
E += m[f++];
|
|
48
|
+
while (s.test(m[f]));
|
|
49
|
+
else if (m[f] === '"') {
|
|
50
|
+
let M = f;
|
|
51
|
+
for (; f++ < m.length; ) {
|
|
52
|
+
if (m[f] === '"') {
|
|
53
|
+
f++, M = 0;
|
|
54
54
|
break;
|
|
55
55
|
}
|
|
56
|
-
m[
|
|
56
|
+
m[f] === "\\" && f++, E += m[f];
|
|
57
57
|
}
|
|
58
|
-
if (
|
|
59
|
-
throw new h(`Unterminated quote at index ${
|
|
58
|
+
if (M)
|
|
59
|
+
throw new h(`Unterminated quote at index ${M}`, i);
|
|
60
60
|
}
|
|
61
|
-
if (!
|
|
62
|
-
throw new h(`Missing parameter name at index ${
|
|
63
|
-
return
|
|
61
|
+
if (!E)
|
|
62
|
+
throw new h(`Missing parameter name at index ${f}`, i);
|
|
63
|
+
return E;
|
|
64
64
|
}
|
|
65
|
-
for (;
|
|
66
|
-
const
|
|
67
|
-
|
|
65
|
+
for (; f < m.length; ) {
|
|
66
|
+
const E = m[f], M = r[E];
|
|
67
|
+
M ? g.push({ type: M, index: f++, value: E }) : E === "\\" ? g.push({ type: "escape", index: f++, value: m[f++] }) : E === ":" ? g.push({ type: "param", index: f++, value: T() }) : E === "*" ? g.push({ type: "wildcard", index: f++, value: T() }) : g.push({ type: "char", index: f++, value: E });
|
|
68
68
|
}
|
|
69
|
-
|
|
70
|
-
function
|
|
71
|
-
const
|
|
69
|
+
g.push({ type: "end", index: f, value: "" });
|
|
70
|
+
function k(E) {
|
|
71
|
+
const M = [];
|
|
72
72
|
for (; ; ) {
|
|
73
|
-
const N =
|
|
74
|
-
if (N.type ===
|
|
73
|
+
const N = g[S++];
|
|
74
|
+
if (N.type === E)
|
|
75
75
|
break;
|
|
76
76
|
if (N.type === "char" || N.type === "escape") {
|
|
77
|
-
let
|
|
78
|
-
for (;
|
|
79
|
-
|
|
80
|
-
|
|
77
|
+
let R = N.value, H = g[S];
|
|
78
|
+
for (; H.type === "char" || H.type === "escape"; )
|
|
79
|
+
R += H.value, H = g[++S];
|
|
80
|
+
M.push({
|
|
81
81
|
type: "text",
|
|
82
|
-
value: y(
|
|
82
|
+
value: y(R)
|
|
83
83
|
});
|
|
84
84
|
continue;
|
|
85
85
|
}
|
|
86
86
|
if (N.type === "param" || N.type === "wildcard") {
|
|
87
|
-
|
|
87
|
+
M.push({
|
|
88
88
|
type: N.type,
|
|
89
89
|
name: N.value
|
|
90
90
|
});
|
|
91
91
|
continue;
|
|
92
92
|
}
|
|
93
93
|
if (N.type === "{") {
|
|
94
|
-
|
|
94
|
+
M.push({
|
|
95
95
|
type: "group",
|
|
96
|
-
tokens:
|
|
96
|
+
tokens: k("}")
|
|
97
97
|
});
|
|
98
98
|
continue;
|
|
99
99
|
}
|
|
100
|
-
throw new h(`Unexpected ${N.type} at index ${N.index}, expected ${
|
|
100
|
+
throw new h(`Unexpected ${N.type} at index ${N.index}, expected ${E}`, i);
|
|
101
101
|
}
|
|
102
|
-
return
|
|
102
|
+
return M;
|
|
103
103
|
}
|
|
104
|
-
return new u(
|
|
104
|
+
return new u(k("end"), i);
|
|
105
105
|
}
|
|
106
|
-
function
|
|
107
|
-
const { encode: y = encodeURIComponent, delimiter: m = n } =
|
|
106
|
+
function w(i, p = {}) {
|
|
107
|
+
const { encode: y = encodeURIComponent, delimiter: m = n } = p, g = typeof i == "object" ? i : l(i, p), f = d(g.tokens, m, y);
|
|
108
108
|
return function(T = {}) {
|
|
109
|
-
const [
|
|
110
|
-
if (
|
|
111
|
-
throw new TypeError(`Missing parameters: ${
|
|
112
|
-
return
|
|
109
|
+
const [k, ...E] = f(T);
|
|
110
|
+
if (E.length)
|
|
111
|
+
throw new TypeError(`Missing parameters: ${E.join(", ")}`);
|
|
112
|
+
return k;
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
|
-
function
|
|
116
|
-
const m = i.map((
|
|
117
|
-
return (
|
|
118
|
-
const
|
|
115
|
+
function d(i, p, y) {
|
|
116
|
+
const m = i.map((g) => c(g, p, y));
|
|
117
|
+
return (g) => {
|
|
118
|
+
const f = [""];
|
|
119
119
|
for (const S of m) {
|
|
120
|
-
const [T, ...
|
|
121
|
-
|
|
120
|
+
const [T, ...k] = S(g);
|
|
121
|
+
f[0] += T, f.push(...k);
|
|
122
122
|
}
|
|
123
|
-
return
|
|
123
|
+
return f;
|
|
124
124
|
};
|
|
125
125
|
}
|
|
126
|
-
function c(i,
|
|
126
|
+
function c(i, p, y) {
|
|
127
127
|
if (i.type === "text")
|
|
128
128
|
return () => [i.value];
|
|
129
129
|
if (i.type === "group") {
|
|
130
|
-
const
|
|
131
|
-
return (
|
|
132
|
-
const [S, ...T] = f
|
|
130
|
+
const g = d(i.tokens, p, y);
|
|
131
|
+
return (f) => {
|
|
132
|
+
const [S, ...T] = g(f);
|
|
133
133
|
return T.length ? [""] : [S];
|
|
134
134
|
};
|
|
135
135
|
}
|
|
136
136
|
const m = y || e;
|
|
137
|
-
return i.type === "wildcard" && y !== !1 ? (
|
|
138
|
-
const
|
|
139
|
-
if (
|
|
137
|
+
return i.type === "wildcard" && y !== !1 ? (g) => {
|
|
138
|
+
const f = g[i.name];
|
|
139
|
+
if (f == null)
|
|
140
140
|
return ["", i.name];
|
|
141
|
-
if (!Array.isArray(
|
|
141
|
+
if (!Array.isArray(f) || f.length === 0)
|
|
142
142
|
throw new TypeError(`Expected "${i.name}" to be a non-empty array`);
|
|
143
143
|
return [
|
|
144
|
-
|
|
144
|
+
f.map((S, T) => {
|
|
145
145
|
if (typeof S != "string")
|
|
146
146
|
throw new TypeError(`Expected "${i.name}/${T}" to be a string`);
|
|
147
147
|
return m(S);
|
|
148
|
-
}).join(
|
|
148
|
+
}).join(p)
|
|
149
149
|
];
|
|
150
|
-
} : (
|
|
151
|
-
const
|
|
152
|
-
if (
|
|
150
|
+
} : (g) => {
|
|
151
|
+
const f = g[i.name];
|
|
152
|
+
if (f == null)
|
|
153
153
|
return ["", i.name];
|
|
154
|
-
if (typeof
|
|
154
|
+
if (typeof f != "string")
|
|
155
155
|
throw new TypeError(`Expected "${i.name}" to be a string`);
|
|
156
|
-
return [m(
|
|
156
|
+
return [m(f)];
|
|
157
157
|
};
|
|
158
158
|
}
|
|
159
|
-
function L(i,
|
|
160
|
-
const { decode: y = decodeURIComponent, delimiter: m = n } =
|
|
161
|
-
return function(
|
|
162
|
-
const
|
|
163
|
-
if (!
|
|
159
|
+
function L(i, p = {}) {
|
|
160
|
+
const { decode: y = decodeURIComponent, delimiter: m = n } = p, { regexp: g, keys: f } = D(i, p), S = f.map((T) => y === !1 ? e : T.type === "param" ? y : (k) => k.split(m).map(y));
|
|
161
|
+
return function(k) {
|
|
162
|
+
const E = g.exec(k);
|
|
163
|
+
if (!E)
|
|
164
164
|
return !1;
|
|
165
|
-
const
|
|
166
|
-
for (let
|
|
167
|
-
if (
|
|
165
|
+
const M = E[0], N = /* @__PURE__ */ Object.create(null);
|
|
166
|
+
for (let R = 1; R < E.length; R++) {
|
|
167
|
+
if (E[R] === void 0)
|
|
168
168
|
continue;
|
|
169
|
-
const
|
|
170
|
-
N[
|
|
169
|
+
const H = f[R - 1], lt = S[R - 1];
|
|
170
|
+
N[H.name] = lt(E[R]);
|
|
171
171
|
}
|
|
172
|
-
return { path:
|
|
172
|
+
return { path: M, params: N };
|
|
173
173
|
};
|
|
174
174
|
}
|
|
175
|
-
function D(i,
|
|
176
|
-
const { delimiter: y = n, end: m = !0, sensitive:
|
|
175
|
+
function D(i, p = {}) {
|
|
176
|
+
const { delimiter: y = n, end: m = !0, sensitive: g = !1, trailing: f = !0 } = p, S = [], T = g ? "" : "i", k = [];
|
|
177
177
|
for (const N of I(i, [])) {
|
|
178
|
-
const
|
|
179
|
-
for (const
|
|
180
|
-
|
|
178
|
+
const R = typeof N == "object" ? N : l(N, p);
|
|
179
|
+
for (const H of v(R.tokens, 0, []))
|
|
180
|
+
k.push(b(H, y, S, R.originalPath));
|
|
181
181
|
}
|
|
182
|
-
let
|
|
183
|
-
return
|
|
182
|
+
let E = `^(?:${k.join("|")})`;
|
|
183
|
+
return f && (E += `(?:${o(y)}$)?`), E += m ? "$" : `(?=${o(y)}|$)`, { regexp: new RegExp(E, T), keys: S };
|
|
184
184
|
}
|
|
185
|
-
function I(i,
|
|
185
|
+
function I(i, p) {
|
|
186
186
|
if (Array.isArray(i))
|
|
187
187
|
for (const y of i)
|
|
188
|
-
I(y,
|
|
188
|
+
I(y, p);
|
|
189
189
|
else
|
|
190
|
-
|
|
191
|
-
return
|
|
190
|
+
p.push(i);
|
|
191
|
+
return p;
|
|
192
192
|
}
|
|
193
|
-
function*
|
|
194
|
-
if (
|
|
193
|
+
function* v(i, p, y) {
|
|
194
|
+
if (p === i.length)
|
|
195
195
|
return yield y;
|
|
196
|
-
const m = i[
|
|
196
|
+
const m = i[p];
|
|
197
197
|
if (m.type === "group")
|
|
198
|
-
for (const
|
|
199
|
-
yield*
|
|
198
|
+
for (const g of v(m.tokens, 0, y.slice()))
|
|
199
|
+
yield* v(i, p + 1, g);
|
|
200
200
|
else
|
|
201
201
|
y.push(m);
|
|
202
|
-
yield*
|
|
202
|
+
yield* v(i, p + 1, y);
|
|
203
203
|
}
|
|
204
|
-
function
|
|
205
|
-
let
|
|
204
|
+
function b(i, p, y, m) {
|
|
205
|
+
let g = "", f = "", S = !0;
|
|
206
206
|
for (const T of i) {
|
|
207
207
|
if (T.type === "text") {
|
|
208
|
-
|
|
208
|
+
g += o(T.value), f += T.value, S || (S = T.value.includes(p));
|
|
209
209
|
continue;
|
|
210
210
|
}
|
|
211
211
|
if (T.type === "param" || T.type === "wildcard") {
|
|
212
|
-
if (!S && !
|
|
212
|
+
if (!S && !f)
|
|
213
213
|
throw new h(`Missing text before "${T.name}" ${T.type}`, m);
|
|
214
|
-
T.type === "param" ?
|
|
214
|
+
T.type === "param" ? g += `(${ut(p, S ? "" : f)}+)` : g += "([\\s\\S]+)", y.push(T), f = "", S = !1;
|
|
215
215
|
continue;
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
|
-
return
|
|
218
|
+
return g;
|
|
219
219
|
}
|
|
220
|
-
function
|
|
221
|
-
return
|
|
220
|
+
function ut(i, p) {
|
|
221
|
+
return p.length < 2 ? i.length < 2 ? `[^${o(i + p)}]` : `(?:(?!${o(i)})[^${o(p)}])` : i.length < 2 ? `(?:(?!${o(p)})[^${o(i)}])` : `(?:(?!${o(p)}|${o(i)})[\\s\\S])`;
|
|
222
222
|
}
|
|
223
|
-
function
|
|
224
|
-
let
|
|
225
|
-
function m(
|
|
226
|
-
return
|
|
223
|
+
function W(i) {
|
|
224
|
+
let p = "", y = 0;
|
|
225
|
+
function m(g) {
|
|
226
|
+
return _(g) && q(i[y]) ? g : JSON.stringify(g);
|
|
227
227
|
}
|
|
228
228
|
for (; y < i.length; ) {
|
|
229
|
-
const
|
|
230
|
-
if (
|
|
231
|
-
|
|
229
|
+
const g = i[y++];
|
|
230
|
+
if (g.type === "text") {
|
|
231
|
+
p += a(g.value);
|
|
232
232
|
continue;
|
|
233
233
|
}
|
|
234
|
-
if (
|
|
235
|
-
|
|
234
|
+
if (g.type === "group") {
|
|
235
|
+
p += `{${W(g.tokens)}}`;
|
|
236
236
|
continue;
|
|
237
237
|
}
|
|
238
|
-
if (
|
|
239
|
-
|
|
238
|
+
if (g.type === "param") {
|
|
239
|
+
p += `:${m(g.name)}`;
|
|
240
240
|
continue;
|
|
241
241
|
}
|
|
242
|
-
if (
|
|
243
|
-
|
|
242
|
+
if (g.type === "wildcard") {
|
|
243
|
+
p += `*${m(g.name)}`;
|
|
244
244
|
continue;
|
|
245
245
|
}
|
|
246
|
-
throw new TypeError(`Unknown token type: ${
|
|
246
|
+
throw new TypeError(`Unknown token type: ${g.type}`);
|
|
247
247
|
}
|
|
248
|
-
return
|
|
248
|
+
return p;
|
|
249
249
|
}
|
|
250
|
-
function
|
|
251
|
-
return
|
|
250
|
+
function tt(i) {
|
|
251
|
+
return W(i.tokens);
|
|
252
252
|
}
|
|
253
|
-
function
|
|
254
|
-
const [
|
|
255
|
-
return t.test(
|
|
253
|
+
function _(i) {
|
|
254
|
+
const [p, ...y] = i;
|
|
255
|
+
return t.test(p) && y.every((m) => s.test(m));
|
|
256
256
|
}
|
|
257
|
-
function
|
|
257
|
+
function q(i) {
|
|
258
258
|
return i && i.type === "text" ? !s.test(i.value[0]) : !0;
|
|
259
259
|
}
|
|
260
|
-
return
|
|
260
|
+
return G;
|
|
261
|
+
}
|
|
262
|
+
var J = te();
|
|
263
|
+
function Ot(n, e) {
|
|
264
|
+
return Array.isArray(n) ? n.find((t) => J.pathToRegexp(t).regexp.test(e)) ?? "" : J.pathToRegexp(n).regexp.test(e) ? n : "";
|
|
261
265
|
}
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
const s = Array.isArray(n) ? n.find((u) => K.pathToRegexp(u).regexp.test(e)) || "" : K.pathToRegexp(n).regexp.test(e) ? n : "", r = K.match(s)(e), a = new URLSearchParams(t), o = Object.fromEntries(a.entries());
|
|
266
|
+
function ee(n, e, t) {
|
|
267
|
+
const s = Ot(n, e), r = J.match(s)(e), a = new URLSearchParams(t), o = Object.fromEntries(a.entries());
|
|
265
268
|
return r ? { ...r.params, ...o } : {};
|
|
266
269
|
}
|
|
267
|
-
function
|
|
270
|
+
function It() {
|
|
268
271
|
return typeof document > "u";
|
|
269
272
|
}
|
|
270
|
-
class
|
|
273
|
+
class ne {
|
|
271
274
|
tasks = /* @__PURE__ */ new Map();
|
|
272
275
|
instanceId = Date.now().toString();
|
|
273
276
|
isLocked = !1;
|
|
@@ -335,7 +338,7 @@ class Zt {
|
|
|
335
338
|
return new Promise((r, a) => {
|
|
336
339
|
this.taskQueue = this.taskQueue.then(async () => {
|
|
337
340
|
try {
|
|
338
|
-
const { control: o, validate: u, rollback: h, dependencies: l = [], delay:
|
|
341
|
+
const { control: o, validate: u, rollback: h, dependencies: l = [], delay: w } = t, d = new AbortController(), c = {
|
|
339
342
|
id: s,
|
|
340
343
|
execute: e,
|
|
341
344
|
timestamp: Date.now(),
|
|
@@ -346,7 +349,7 @@ class Zt {
|
|
|
346
349
|
validate: u,
|
|
347
350
|
rollback: h,
|
|
348
351
|
control: o,
|
|
349
|
-
abortController:
|
|
352
|
+
abortController: d
|
|
350
353
|
};
|
|
351
354
|
this.tasks.set(c.id, c), this.pendingTaskQueue.length > 0 && (this.pendingTaskQueue.push(c), await this.waitForPendingTasks(), this.pendingTaskQueue = this.pendingTaskQueue.filter((D) => D.id !== c.id));
|
|
352
355
|
try {
|
|
@@ -354,14 +357,14 @@ class Zt {
|
|
|
354
357
|
throw c.status = "FAILED", new Error("FAILED");
|
|
355
358
|
try {
|
|
356
359
|
c.status = "PROCESSING";
|
|
357
|
-
for (const
|
|
358
|
-
const
|
|
359
|
-
if (!
|
|
360
|
+
for (const v of c.dependencies) {
|
|
361
|
+
const b = this.tasks.get(v);
|
|
362
|
+
if (!b || b.status !== "COMPLETED")
|
|
360
363
|
throw c.status = "FAILED", new Error("FAILED");
|
|
361
364
|
}
|
|
362
365
|
if (c.validate && !await c.validate())
|
|
363
366
|
throw c.status = "FAILED", new Error("FAILED");
|
|
364
|
-
|
|
367
|
+
w && w > 0 && await new Promise((v) => setTimeout(v, w));
|
|
365
368
|
const I = await c.execute(c.abortController);
|
|
366
369
|
if (c.abortController.signal.aborted) {
|
|
367
370
|
c.status = "COMPLETED", await this.onTaskStatusChange(c.id, "COMPLETED"), r({
|
|
@@ -374,16 +377,16 @@ class Zt {
|
|
|
374
377
|
return;
|
|
375
378
|
}
|
|
376
379
|
if (t.control) {
|
|
377
|
-
const
|
|
378
|
-
if (
|
|
380
|
+
const v = t.control;
|
|
381
|
+
if (v.delay && v.delay > 0 && await new Promise((b) => setTimeout(b, v.delay)), v.manual) {
|
|
379
382
|
c.status = "MANUAL_PENDING", c.manualResolver = { resolve: r, reject: a, result: I }, this.pendingTaskQueue.push(c), await this.onTaskStatusChange(c.id, "MANUAL_PENDING");
|
|
380
383
|
return;
|
|
381
384
|
}
|
|
382
|
-
if (
|
|
383
|
-
c.status = "SIGNAL_PENDING", c.manualResolver = { resolve: r, reject: a, result: I }, this.signalListeners.has(
|
|
385
|
+
if (v.signal) {
|
|
386
|
+
c.status = "SIGNAL_PENDING", c.manualResolver = { resolve: r, reject: a, result: I }, this.signalListeners.has(v.signal) || this.signalListeners.set(v.signal, /* @__PURE__ */ new Set()), this.signalListeners.get(v.signal).add(c.id), this.pendingTaskQueue.push(c), await this.onTaskStatusChange(c.id, "SIGNAL_PENDING");
|
|
384
387
|
return;
|
|
385
388
|
}
|
|
386
|
-
if (
|
|
389
|
+
if (v.condition && !await v.condition()) {
|
|
387
390
|
c.status = "MANUAL_PENDING", c.manualResolver = { resolve: r, reject: a, result: I }, this.pendingTaskQueue.push(c), await this.onTaskStatusChange(c.id, "MANUAL_PENDING");
|
|
388
391
|
return;
|
|
389
392
|
}
|
|
@@ -440,29 +443,29 @@ class Zt {
|
|
|
440
443
|
await Promise.all(e.map((t) => this.resolveTask(t.id)));
|
|
441
444
|
}
|
|
442
445
|
}
|
|
443
|
-
const F = new
|
|
446
|
+
const F = new ne(), xt = (n) => {
|
|
444
447
|
let e;
|
|
445
|
-
const t = /* @__PURE__ */ new Set(), s = (l,
|
|
446
|
-
const
|
|
447
|
-
if (!Object.is(
|
|
448
|
+
const t = /* @__PURE__ */ new Set(), s = (l, w) => {
|
|
449
|
+
const d = typeof l == "function" ? l(e) : l;
|
|
450
|
+
if (!Object.is(d, e)) {
|
|
448
451
|
const c = e;
|
|
449
|
-
e =
|
|
452
|
+
e = w ?? (typeof d != "object" || d === null) ? d : Object.assign({}, e, d), t.forEach((L) => L(e, c));
|
|
450
453
|
}
|
|
451
454
|
}, r = () => e, u = { setState: s, getState: r, getInitialState: () => h, subscribe: (l) => (t.add(l), () => t.delete(l)) }, h = e = n(s, r, u);
|
|
452
455
|
return u;
|
|
453
|
-
},
|
|
454
|
-
function
|
|
455
|
-
const t =
|
|
456
|
+
}, re = ((n) => n ? xt(n) : xt), se = (n) => n;
|
|
457
|
+
function ae(n, e = se) {
|
|
458
|
+
const t = st.useSyncExternalStore(
|
|
456
459
|
n.subscribe,
|
|
457
|
-
|
|
458
|
-
|
|
460
|
+
st.useCallback(() => e(n.getState()), [n, e]),
|
|
461
|
+
st.useCallback(() => e(n.getInitialState()), [n, e])
|
|
459
462
|
);
|
|
460
|
-
return
|
|
463
|
+
return st.useDebugValue(t), t;
|
|
461
464
|
}
|
|
462
|
-
const
|
|
463
|
-
const e =
|
|
465
|
+
const Nt = (n) => {
|
|
466
|
+
const e = re(n), t = (s) => ae(e, s);
|
|
464
467
|
return Object.assign(t, e), t;
|
|
465
|
-
}, it = ((n) => n ?
|
|
468
|
+
}, it = ((n) => n ? Nt(n) : Nt), Q = it((n) => ({
|
|
466
469
|
index: -1,
|
|
467
470
|
histories: [],
|
|
468
471
|
addHistory: (e) => n((t) => ({
|
|
@@ -477,30 +480,30 @@ const xt = (n) => {
|
|
|
477
480
|
index: t.index - 1,
|
|
478
481
|
histories: t.histories.filter((s, r) => r !== e)
|
|
479
482
|
}))
|
|
480
|
-
})),
|
|
483
|
+
})), $ = it((n) => ({
|
|
481
484
|
status: "IDLE",
|
|
482
485
|
setStatus: (e) => n({ status: e })
|
|
483
486
|
}));
|
|
484
|
-
function
|
|
485
|
-
return
|
|
487
|
+
function oe() {
|
|
488
|
+
return V(() => {
|
|
486
489
|
const n = async (e) => {
|
|
487
490
|
const t = e.state?.id;
|
|
488
491
|
(await F.addTask(
|
|
489
492
|
async (s) => {
|
|
490
|
-
const r = e.state?.index, a = e.state?.status, o = e.state?.params, u = e.state?.transitionName, h = e.state?.layoutId, l =
|
|
493
|
+
const r = e.state?.index, a = e.state?.status, o = e.state?.params, u = e.state?.transitionName, h = e.state?.layoutId, l = $.getState().setStatus, { index: w, addHistory: d, popHistory: c } = Q.getState(), L = r < w, D = a === "PUSHING" && r > w, I = a === "REPLACING" && r > w, v = window.location.pathname;
|
|
491
494
|
if (!L && !D && !I) {
|
|
492
495
|
s.abort();
|
|
493
496
|
return;
|
|
494
497
|
}
|
|
495
|
-
return L ? l("POPPING") : D ? (l("PUSHING"),
|
|
498
|
+
return L ? l("POPPING") : D ? (l("PUSHING"), d({
|
|
496
499
|
id: t,
|
|
497
|
-
pathname:
|
|
500
|
+
pathname: v,
|
|
498
501
|
params: o,
|
|
499
502
|
transitionName: u,
|
|
500
503
|
layoutId: h
|
|
501
|
-
})) : I && (l("REPLACING"),
|
|
504
|
+
})) : I && (l("REPLACING"), d({
|
|
502
505
|
id: t,
|
|
503
|
-
pathname:
|
|
506
|
+
pathname: v,
|
|
504
507
|
params: o,
|
|
505
508
|
transitionName: u,
|
|
506
509
|
layoutId: h
|
|
@@ -521,12 +524,12 @@ function re() {
|
|
|
521
524
|
};
|
|
522
525
|
}, []), null;
|
|
523
526
|
}
|
|
524
|
-
const
|
|
527
|
+
const Gt = St({}), $t = St(() => {
|
|
525
528
|
});
|
|
526
|
-
function
|
|
529
|
+
function ie(n, e) {
|
|
527
530
|
return e.type === "SET" ? e.params : n;
|
|
528
531
|
}
|
|
529
|
-
const
|
|
532
|
+
const Ht = St({
|
|
530
533
|
id: "",
|
|
531
534
|
isActive: !1,
|
|
532
535
|
isRoot: !0,
|
|
@@ -536,14 +539,15 @@ const $t = Et({
|
|
|
536
539
|
params: {},
|
|
537
540
|
transitionName: "none",
|
|
538
541
|
prevTransitionName: "none",
|
|
539
|
-
layoutId: null
|
|
542
|
+
layoutId: null,
|
|
543
|
+
routePath: ""
|
|
540
544
|
});
|
|
541
|
-
function
|
|
542
|
-
return
|
|
545
|
+
function z() {
|
|
546
|
+
return Pt(Ht);
|
|
543
547
|
}
|
|
544
|
-
function
|
|
545
|
-
const { isActive: e, params: t } =
|
|
546
|
-
return
|
|
548
|
+
function ce({ children: n }) {
|
|
549
|
+
const { isActive: e, params: t } = z(), [s, r] = Kt(ie, t);
|
|
550
|
+
return V(() => {
|
|
547
551
|
const a = async (o) => {
|
|
548
552
|
o.state?.step && await F.addTask(async () => {
|
|
549
553
|
r({ type: "SET", params: o.state?.params || {} });
|
|
@@ -552,18 +556,18 @@ function ae({ children: n }) {
|
|
|
552
556
|
return e && window.addEventListener("popstate", a), () => {
|
|
553
557
|
window.removeEventListener("popstate", a);
|
|
554
558
|
};
|
|
555
|
-
}, [e, r]), /* @__PURE__ */ x(
|
|
559
|
+
}, [e, r]), /* @__PURE__ */ x($t.Provider, { value: r, children: /* @__PURE__ */ x(Gt.Provider, { value: s, children: n }) });
|
|
556
560
|
}
|
|
557
|
-
function
|
|
558
|
-
const e =
|
|
561
|
+
function ue({ children: n }) {
|
|
562
|
+
const e = Q((s) => s.index), t = Q((s) => s.histories);
|
|
559
563
|
return t.map(
|
|
560
|
-
(s) =>
|
|
561
|
-
(r) =>
|
|
564
|
+
(s) => Ct.toArray(n).filter(
|
|
565
|
+
(r) => J.pathToRegexp(r.props.path).regexp.test(
|
|
562
566
|
s.pathname
|
|
563
567
|
)
|
|
564
568
|
)
|
|
565
569
|
).map(([s], r) => /* @__PURE__ */ x(
|
|
566
|
-
|
|
570
|
+
Ht.Provider,
|
|
567
571
|
{
|
|
568
572
|
value: {
|
|
569
573
|
id: t[r].id,
|
|
@@ -575,14 +579,18 @@ function oe({ children: n }) {
|
|
|
575
579
|
params: t[r].params,
|
|
576
580
|
transitionName: t[e].transitionName,
|
|
577
581
|
prevTransitionName: t[e - 1]?.transitionName,
|
|
578
|
-
layoutId: t[r].layoutId
|
|
582
|
+
layoutId: t[r].layoutId,
|
|
583
|
+
routePath: Ot(
|
|
584
|
+
s.props.path,
|
|
585
|
+
t[r].pathname
|
|
586
|
+
)
|
|
579
587
|
},
|
|
580
|
-
children: /* @__PURE__ */ x(
|
|
588
|
+
children: /* @__PURE__ */ x(ce, { children: s })
|
|
581
589
|
},
|
|
582
590
|
t[r].id
|
|
583
591
|
));
|
|
584
592
|
}
|
|
585
|
-
function
|
|
593
|
+
function le({
|
|
586
594
|
name: n,
|
|
587
595
|
initial: e,
|
|
588
596
|
enter: t,
|
|
@@ -607,7 +615,7 @@ function ie({
|
|
|
607
615
|
...r
|
|
608
616
|
};
|
|
609
617
|
}
|
|
610
|
-
const
|
|
618
|
+
const de = le({
|
|
611
619
|
name: "overlay",
|
|
612
620
|
initial: {
|
|
613
621
|
opacity: 0,
|
|
@@ -660,7 +668,7 @@ const ce = ie({
|
|
|
660
668
|
}
|
|
661
669
|
)
|
|
662
670
|
}
|
|
663
|
-
}),
|
|
671
|
+
}), vt = /* @__PURE__ */ new Map([["overlay", de]]), wt = it((n) => ({
|
|
664
672
|
defaultTransitionName: "cupertino",
|
|
665
673
|
setDefaultTransitionName: (e) => n({ defaultTransitionName: e })
|
|
666
674
|
}));
|
|
@@ -692,7 +700,7 @@ function ct({
|
|
|
692
700
|
...u
|
|
693
701
|
};
|
|
694
702
|
}
|
|
695
|
-
const
|
|
703
|
+
const pe = ct({
|
|
696
704
|
name: "cupertino",
|
|
697
705
|
initial: {
|
|
698
706
|
x: "100%"
|
|
@@ -710,7 +718,7 @@ const ue = ct({
|
|
|
710
718
|
x: 0
|
|
711
719
|
},
|
|
712
720
|
options: {
|
|
713
|
-
duration: 0.
|
|
721
|
+
duration: 0.7,
|
|
714
722
|
ease: [0.32, 0.72, 0, 1]
|
|
715
723
|
}
|
|
716
724
|
},
|
|
@@ -719,7 +727,7 @@ const ue = ct({
|
|
|
719
727
|
x: "100%"
|
|
720
728
|
},
|
|
721
729
|
options: {
|
|
722
|
-
duration: 0.
|
|
730
|
+
duration: 0.6,
|
|
723
731
|
ease: [0.32, 0.72, 0, 1]
|
|
724
732
|
}
|
|
725
733
|
},
|
|
@@ -728,7 +736,7 @@ const ue = ct({
|
|
|
728
736
|
x: -100
|
|
729
737
|
},
|
|
730
738
|
options: {
|
|
731
|
-
duration: 0.
|
|
739
|
+
duration: 0.7,
|
|
732
740
|
ease: [0.32, 0.72, 0, 1]
|
|
733
741
|
}
|
|
734
742
|
},
|
|
@@ -737,7 +745,7 @@ const ue = ct({
|
|
|
737
745
|
x: 0
|
|
738
746
|
},
|
|
739
747
|
options: {
|
|
740
|
-
duration: 0.
|
|
748
|
+
duration: 0.6,
|
|
741
749
|
ease: [0.32, 0.72, 0, 1]
|
|
742
750
|
}
|
|
743
751
|
},
|
|
@@ -746,7 +754,7 @@ const ue = ct({
|
|
|
746
754
|
swipeDirection: "x",
|
|
747
755
|
onSwipeStart: async () => !0,
|
|
748
756
|
onSwipe: (n, e, { animate: t, currentScreen: s, prevScreen: r, onProgress: a }) => {
|
|
749
|
-
const { offset: o } = e, u = o.x, h =
|
|
757
|
+
const { offset: o } = e, u = o.x, h = Rt(u, [0, window.innerWidth], [0, 100]);
|
|
750
758
|
return a?.(!0, h), t(
|
|
751
759
|
s,
|
|
752
760
|
{
|
|
@@ -791,7 +799,7 @@ const ue = ct({
|
|
|
791
799
|
]), l;
|
|
792
800
|
}
|
|
793
801
|
}
|
|
794
|
-
}),
|
|
802
|
+
}), fe = ct({
|
|
795
803
|
name: "layout",
|
|
796
804
|
initial: {
|
|
797
805
|
opacity: 0.97
|
|
@@ -841,7 +849,7 @@ const ue = ct({
|
|
|
841
849
|
swipeDirection: "y",
|
|
842
850
|
onSwipeStart: async () => !0,
|
|
843
851
|
onSwipe: (n, e, { animate: t, currentScreen: s, onProgress: r }) => {
|
|
844
|
-
const { offset: a } = e, o = a.y, u = Math.max(0, Math.min(56, o)), h =
|
|
852
|
+
const { offset: a } = e, o = a.y, u = Math.max(0, Math.min(56, o)), h = Rt(u, [0, 56], [1, 0.96]), l = Math.max(0, o - 56), w = Math.min(1, l / 160), d = Math.sqrt(w) * 12, c = Math.max(0, u + d), L = Math.min(56, c);
|
|
845
853
|
return r?.(!0, 100), t(
|
|
846
854
|
s,
|
|
847
855
|
{
|
|
@@ -879,7 +887,7 @@ const ue = ct({
|
|
|
879
887
|
]), l;
|
|
880
888
|
}
|
|
881
889
|
}
|
|
882
|
-
}),
|
|
890
|
+
}), he = ct({
|
|
883
891
|
name: "material",
|
|
884
892
|
initial: {
|
|
885
893
|
y: "100%"
|
|
@@ -897,7 +905,7 @@ const ue = ct({
|
|
|
897
905
|
y: 0
|
|
898
906
|
},
|
|
899
907
|
options: {
|
|
900
|
-
duration: 0.
|
|
908
|
+
duration: 0.35,
|
|
901
909
|
ease: [0, 0, 0.2, 1]
|
|
902
910
|
}
|
|
903
911
|
},
|
|
@@ -906,7 +914,7 @@ const ue = ct({
|
|
|
906
914
|
y: "100%"
|
|
907
915
|
},
|
|
908
916
|
options: {
|
|
909
|
-
duration: 0.
|
|
917
|
+
duration: 0.25,
|
|
910
918
|
ease: [0.4, 0, 1, 1]
|
|
911
919
|
}
|
|
912
920
|
},
|
|
@@ -915,7 +923,7 @@ const ue = ct({
|
|
|
915
923
|
y: -56
|
|
916
924
|
},
|
|
917
925
|
options: {
|
|
918
|
-
duration: 0.
|
|
926
|
+
duration: 0.35,
|
|
919
927
|
ease: [0.4, 0, 1, 1]
|
|
920
928
|
}
|
|
921
929
|
},
|
|
@@ -924,7 +932,7 @@ const ue = ct({
|
|
|
924
932
|
y: 0
|
|
925
933
|
},
|
|
926
934
|
options: {
|
|
927
|
-
duration: 0.
|
|
935
|
+
duration: 0.25,
|
|
928
936
|
ease: [0, 0, 0.2, 1]
|
|
929
937
|
}
|
|
930
938
|
},
|
|
@@ -932,7 +940,7 @@ const ue = ct({
|
|
|
932
940
|
swipeDirection: "y",
|
|
933
941
|
onSwipeStart: async () => !0,
|
|
934
942
|
onSwipe: (n, e, { animate: t, currentScreen: s, prevScreen: r, onProgress: a }) => {
|
|
935
|
-
const { offset: o } = e, u = o.y, h = Math.max(0, Math.min(56, u)), l = Math.max(0, u - 56),
|
|
943
|
+
const { offset: o } = e, u = o.y, h = Math.max(0, Math.min(56, u)), l = Math.max(0, u - 56), w = Math.min(1, l / 160), d = Math.sqrt(w) * 12, c = Math.max(0, h + d), L = Math.min(56, c);
|
|
936
944
|
return a?.(!0, L), t(
|
|
937
945
|
s,
|
|
938
946
|
{
|
|
@@ -975,7 +983,7 @@ const ue = ct({
|
|
|
975
983
|
]), l;
|
|
976
984
|
}
|
|
977
985
|
}
|
|
978
|
-
}),
|
|
986
|
+
}), ge = ct({
|
|
979
987
|
name: "none",
|
|
980
988
|
initial: {},
|
|
981
989
|
idle: {
|
|
@@ -1008,38 +1016,38 @@ const ue = ct({
|
|
|
1008
1016
|
duration: 0
|
|
1009
1017
|
}
|
|
1010
1018
|
}
|
|
1011
|
-
}),
|
|
1012
|
-
["none",
|
|
1013
|
-
["cupertino",
|
|
1014
|
-
["material",
|
|
1015
|
-
["layout",
|
|
1016
|
-
]),
|
|
1019
|
+
}), K = /* @__PURE__ */ new Map([
|
|
1020
|
+
["none", ge],
|
|
1021
|
+
["cupertino", pe],
|
|
1022
|
+
["material", he],
|
|
1023
|
+
["layout", fe]
|
|
1024
|
+
]), ye = (() => {
|
|
1017
1025
|
const n = /* @__PURE__ */ Object.create(null), e = Object.prototype.hasOwnProperty;
|
|
1018
|
-
for (const t of
|
|
1026
|
+
for (const t of K.values()) {
|
|
1019
1027
|
const s = t.variants["IDLE-true"].value;
|
|
1020
1028
|
for (const r in s)
|
|
1021
1029
|
e.call(s, r) && (n[r] = s[r]);
|
|
1022
1030
|
}
|
|
1023
1031
|
return n;
|
|
1024
1032
|
})();
|
|
1025
|
-
function
|
|
1033
|
+
function Te({
|
|
1026
1034
|
children: n,
|
|
1027
1035
|
initPath: e = "/",
|
|
1028
1036
|
defaultTransitionName: t = "cupertino",
|
|
1029
1037
|
transitions: s = [],
|
|
1030
1038
|
decorators: r = []
|
|
1031
1039
|
}) {
|
|
1032
|
-
const a =
|
|
1033
|
-
return
|
|
1040
|
+
const a = It() ? e || "/" : window.location.pathname, o = It() ? a.split("?")[1] || "" : window.location.search;
|
|
1041
|
+
return wt.setState({
|
|
1034
1042
|
defaultTransitionName: t
|
|
1035
|
-
}),
|
|
1043
|
+
}), Q.setState({
|
|
1036
1044
|
index: 0,
|
|
1037
1045
|
histories: [
|
|
1038
1046
|
{
|
|
1039
1047
|
id: "root",
|
|
1040
1048
|
pathname: a,
|
|
1041
|
-
params:
|
|
1042
|
-
|
|
1049
|
+
params: ee(
|
|
1050
|
+
Ct.toArray(n).map((u) => u.props.path).flat(),
|
|
1043
1051
|
a,
|
|
1044
1052
|
o
|
|
1045
1053
|
),
|
|
@@ -1047,7 +1055,7 @@ function Se({
|
|
|
1047
1055
|
layoutId: null
|
|
1048
1056
|
}
|
|
1049
1057
|
]
|
|
1050
|
-
}),
|
|
1058
|
+
}), V(() => {
|
|
1051
1059
|
window.history.state?.index || window.history.replaceState(
|
|
1052
1060
|
{
|
|
1053
1061
|
id: "root",
|
|
@@ -1060,61 +1068,53 @@ function Se({
|
|
|
1060
1068
|
"",
|
|
1061
1069
|
window.location.href
|
|
1062
1070
|
);
|
|
1063
|
-
}, [t]),
|
|
1064
|
-
s.forEach((u) =>
|
|
1065
|
-
}, [s]),
|
|
1066
|
-
r.forEach((u) =>
|
|
1067
|
-
}, [r]), /* @__PURE__ */
|
|
1068
|
-
|
|
1069
|
-
{
|
|
1070
|
-
|
|
1071
|
-
position: "fixed",
|
|
1072
|
-
top: 0,
|
|
1073
|
-
left: 0,
|
|
1074
|
-
width: "100%",
|
|
1075
|
-
height: "100%"
|
|
1076
|
-
},
|
|
1077
|
-
children: [
|
|
1078
|
-
/* @__PURE__ */ x(re, {}),
|
|
1079
|
-
/* @__PURE__ */ x(oe, { children: n })
|
|
1080
|
-
]
|
|
1081
|
-
}
|
|
1082
|
-
);
|
|
1071
|
+
}, [t]), V(() => {
|
|
1072
|
+
s.forEach((u) => K.set(u.name, u));
|
|
1073
|
+
}, [s]), V(() => {
|
|
1074
|
+
r.forEach((u) => vt.set(u.name, u));
|
|
1075
|
+
}, [r]), /* @__PURE__ */ mt(Xt, { children: [
|
|
1076
|
+
/* @__PURE__ */ x(oe, {}),
|
|
1077
|
+
/* @__PURE__ */ x(ue, { children: n })
|
|
1078
|
+
] });
|
|
1083
1079
|
}
|
|
1084
|
-
function
|
|
1080
|
+
function De({ element: n }) {
|
|
1085
1081
|
return n;
|
|
1086
1082
|
}
|
|
1087
|
-
function
|
|
1083
|
+
function ot(n, e) {
|
|
1084
|
+
const t = e ?? {}, s = J.compile(n), r = Object.fromEntries(
|
|
1085
|
+
Object.entries(t).map(([d, c]) => [d, String(c)])
|
|
1086
|
+
), a = s(r), u = (typeof n == "string" ? J.parse(n) : n).tokens.filter((d) => d.type === "param").map((d) => d.name), h = Object.fromEntries(
|
|
1087
|
+
Object.entries(t).filter(([d]) => !u.includes(d))
|
|
1088
|
+
), l = new URLSearchParams(h).toString();
|
|
1089
|
+
return { pathname: `${a}${l ? `?${l}` : ""}`, toPathname: a };
|
|
1090
|
+
}
|
|
1091
|
+
function Le() {
|
|
1088
1092
|
return {
|
|
1089
1093
|
push: async (s, r, a = {}) => {
|
|
1090
|
-
const { status: o, setStatus: u } =
|
|
1094
|
+
const { status: o, setStatus: u } = $.getState();
|
|
1091
1095
|
if (o !== "COMPLETED" && o !== "IDLE")
|
|
1092
1096
|
return;
|
|
1093
|
-
const { index: h, addHistory: l } =
|
|
1097
|
+
const { index: h, addHistory: l } = Q.getState(), w = wt.getState().defaultTransitionName, { transitionName: d = w, layoutId: c = null } = a, L = F.generateTaskId();
|
|
1094
1098
|
(await F.addTask(
|
|
1095
1099
|
async () => {
|
|
1096
1100
|
u("PUSHING");
|
|
1097
|
-
const
|
|
1098
|
-
Object.entries(r).map(([k, b]) => [k, String(b)])
|
|
1099
|
-
), P = D(I), M = K.parse(s).tokens.filter((k) => k.type === "param").map((k) => k.name), W = Object.fromEntries(
|
|
1100
|
-
Object.entries(r).filter(([k]) => !M.includes(k))
|
|
1101
|
-
), _ = new URLSearchParams(W).toString(), Q = `${P}${_ ? `?${_}` : ""}`;
|
|
1101
|
+
const { pathname: D, toPathname: I } = ot(s, r);
|
|
1102
1102
|
return window.history.pushState(
|
|
1103
1103
|
{
|
|
1104
1104
|
id: L,
|
|
1105
1105
|
index: h + 1,
|
|
1106
1106
|
status: "PUSHING",
|
|
1107
1107
|
params: r,
|
|
1108
|
-
transitionName:
|
|
1108
|
+
transitionName: d,
|
|
1109
1109
|
layoutId: c
|
|
1110
1110
|
},
|
|
1111
1111
|
"",
|
|
1112
|
-
|
|
1112
|
+
D
|
|
1113
1113
|
), l({
|
|
1114
1114
|
id: L,
|
|
1115
|
-
pathname:
|
|
1115
|
+
pathname: I,
|
|
1116
1116
|
params: r,
|
|
1117
|
-
transitionName:
|
|
1117
|
+
transitionName: d,
|
|
1118
1118
|
layoutId: c
|
|
1119
1119
|
}), () => {
|
|
1120
1120
|
u("COMPLETED");
|
|
@@ -1129,18 +1129,14 @@ function ve() {
|
|
|
1129
1129
|
)).result?.();
|
|
1130
1130
|
},
|
|
1131
1131
|
replace: async (s, r, a = {}) => {
|
|
1132
|
-
const { status: o, setStatus: u } =
|
|
1132
|
+
const { status: o, setStatus: u } = $.getState();
|
|
1133
1133
|
if (o !== "COMPLETED" && o !== "IDLE")
|
|
1134
1134
|
return;
|
|
1135
|
-
const { index: h, addHistory: l } =
|
|
1135
|
+
const { index: h, addHistory: l } = Q.getState(), w = Q.getState().replaceHistory, d = wt.getState().defaultTransitionName, { transitionName: c = d, layoutId: L = null } = a, D = F.generateTaskId();
|
|
1136
1136
|
(await F.addTask(
|
|
1137
1137
|
async () => {
|
|
1138
1138
|
u("REPLACING");
|
|
1139
|
-
const I =
|
|
1140
|
-
Object.entries(r).map(([b, i]) => [b, String(i)])
|
|
1141
|
-
), M = I(P), W = K.parse(s).tokens.filter((b) => b.type === "param").map((b) => b.name), _ = Object.fromEntries(
|
|
1142
|
-
Object.entries(r).filter(([b]) => !W.includes(b))
|
|
1143
|
-
), Q = new URLSearchParams(_).toString(), k = `${M}${Q ? `?${Q}` : ""}`;
|
|
1139
|
+
const { pathname: I, toPathname: v } = ot(s, r);
|
|
1144
1140
|
return window.history.replaceState(
|
|
1145
1141
|
{
|
|
1146
1142
|
id: D,
|
|
@@ -1151,15 +1147,15 @@ function ve() {
|
|
|
1151
1147
|
layoutId: L
|
|
1152
1148
|
},
|
|
1153
1149
|
"",
|
|
1154
|
-
|
|
1150
|
+
I
|
|
1155
1151
|
), l({
|
|
1156
1152
|
id: D,
|
|
1157
|
-
pathname:
|
|
1153
|
+
pathname: v,
|
|
1158
1154
|
params: r,
|
|
1159
1155
|
transitionName: c,
|
|
1160
1156
|
layoutId: L
|
|
1161
1157
|
}), async () => {
|
|
1162
|
-
|
|
1158
|
+
w(h), u("COMPLETED");
|
|
1163
1159
|
};
|
|
1164
1160
|
},
|
|
1165
1161
|
{
|
|
@@ -1171,18 +1167,18 @@ function ve() {
|
|
|
1171
1167
|
)).result?.();
|
|
1172
1168
|
},
|
|
1173
1169
|
pop: () => {
|
|
1174
|
-
const s =
|
|
1170
|
+
const s = $.getState().status;
|
|
1175
1171
|
s !== "COMPLETED" && s !== "IDLE" || window.history.back();
|
|
1176
1172
|
}
|
|
1177
1173
|
};
|
|
1178
1174
|
}
|
|
1179
|
-
function
|
|
1180
|
-
const n =
|
|
1175
|
+
function Ie() {
|
|
1176
|
+
const { routePath: n } = z(), e = Pt($t);
|
|
1181
1177
|
return {
|
|
1182
|
-
pushStep: async (
|
|
1183
|
-
const
|
|
1184
|
-
|
|
1185
|
-
const
|
|
1178
|
+
pushStep: async (a) => {
|
|
1179
|
+
const o = $.getState().status;
|
|
1180
|
+
o !== "COMPLETED" && o !== "IDLE" || (await F.addTask(async () => {
|
|
1181
|
+
const { pathname: u } = ot(n, a);
|
|
1186
1182
|
return window.history.state?.step || window.history.replaceState(
|
|
1187
1183
|
{
|
|
1188
1184
|
...window.history.state,
|
|
@@ -1194,38 +1190,38 @@ function Te() {
|
|
|
1194
1190
|
{
|
|
1195
1191
|
...window.history.state,
|
|
1196
1192
|
step: !0,
|
|
1197
|
-
params:
|
|
1193
|
+
params: a
|
|
1198
1194
|
},
|
|
1199
1195
|
"",
|
|
1200
1196
|
u
|
|
1201
|
-
), async () =>
|
|
1197
|
+
), async () => e({ type: "SET", params: a });
|
|
1202
1198
|
})).result?.();
|
|
1203
1199
|
},
|
|
1204
|
-
replaceStep: async (
|
|
1205
|
-
const
|
|
1206
|
-
|
|
1207
|
-
const
|
|
1200
|
+
replaceStep: async (a) => {
|
|
1201
|
+
const o = $.getState().status;
|
|
1202
|
+
o !== "COMPLETED" && o !== "IDLE" || (await F.addTask(async () => {
|
|
1203
|
+
const { pathname: u } = ot(n, a);
|
|
1208
1204
|
return window.history.replaceState(
|
|
1209
1205
|
{
|
|
1210
1206
|
...window.history.state,
|
|
1211
1207
|
step: !0,
|
|
1212
|
-
params:
|
|
1208
|
+
params: a
|
|
1213
1209
|
},
|
|
1214
1210
|
"",
|
|
1215
1211
|
u
|
|
1216
|
-
), async () =>
|
|
1212
|
+
), async () => e({ type: "SET", params: a });
|
|
1217
1213
|
})).result?.();
|
|
1218
1214
|
},
|
|
1219
1215
|
popStep: () => {
|
|
1220
|
-
const
|
|
1221
|
-
|
|
1216
|
+
const a = $.getState().status;
|
|
1217
|
+
a !== "COMPLETED" && a !== "IDLE" || window.history.back();
|
|
1222
1218
|
}
|
|
1223
1219
|
};
|
|
1224
1220
|
}
|
|
1225
|
-
function
|
|
1226
|
-
return
|
|
1221
|
+
function xe() {
|
|
1222
|
+
return Pt(Gt);
|
|
1227
1223
|
}
|
|
1228
|
-
function
|
|
1224
|
+
function Ne({
|
|
1229
1225
|
name: n,
|
|
1230
1226
|
initial: e,
|
|
1231
1227
|
idle: t,
|
|
@@ -1236,8 +1232,8 @@ function De({
|
|
|
1236
1232
|
popOnEnter: u,
|
|
1237
1233
|
popOnExit: h,
|
|
1238
1234
|
completedOnExit: l,
|
|
1239
|
-
completedOnEnter:
|
|
1240
|
-
options:
|
|
1235
|
+
completedOnEnter: w,
|
|
1236
|
+
options: d
|
|
1241
1237
|
}) {
|
|
1242
1238
|
return {
|
|
1243
1239
|
name: n,
|
|
@@ -1252,12 +1248,12 @@ function De({
|
|
|
1252
1248
|
"POPPING-false": h,
|
|
1253
1249
|
"POPPING-true": u,
|
|
1254
1250
|
"COMPLETED-false": l,
|
|
1255
|
-
"COMPLETED-true":
|
|
1251
|
+
"COMPLETED-true": w
|
|
1256
1252
|
},
|
|
1257
|
-
...
|
|
1253
|
+
...d
|
|
1258
1254
|
};
|
|
1259
1255
|
}
|
|
1260
|
-
function
|
|
1256
|
+
function ke({
|
|
1261
1257
|
name: n,
|
|
1262
1258
|
initial: e,
|
|
1263
1259
|
idle: t,
|
|
@@ -1268,8 +1264,8 @@ function Ie({
|
|
|
1268
1264
|
popOnEnter: u,
|
|
1269
1265
|
popOnExit: h,
|
|
1270
1266
|
completedOnEnter: l,
|
|
1271
|
-
completedOnExit:
|
|
1272
|
-
options:
|
|
1267
|
+
completedOnExit: w,
|
|
1268
|
+
options: d
|
|
1273
1269
|
}) {
|
|
1274
1270
|
return {
|
|
1275
1271
|
name: n,
|
|
@@ -1283,32 +1279,44 @@ function Ie({
|
|
|
1283
1279
|
"REPLACING-true": a,
|
|
1284
1280
|
"POPPING-false": h,
|
|
1285
1281
|
"POPPING-true": u,
|
|
1286
|
-
"COMPLETED-false":
|
|
1282
|
+
"COMPLETED-false": w,
|
|
1287
1283
|
"COMPLETED-true": l
|
|
1288
1284
|
},
|
|
1289
|
-
...
|
|
1285
|
+
...d
|
|
1290
1286
|
};
|
|
1291
1287
|
}
|
|
1292
|
-
function
|
|
1288
|
+
function Ut({ freeze: n, children: e }) {
|
|
1289
|
+
const t = O(e);
|
|
1290
|
+
return n || (t.current = e), /* @__PURE__ */ x(
|
|
1291
|
+
"div",
|
|
1292
|
+
{
|
|
1293
|
+
style: {
|
|
1294
|
+
display: n ? "none" : void 0
|
|
1295
|
+
},
|
|
1296
|
+
children: t.current
|
|
1297
|
+
}
|
|
1298
|
+
);
|
|
1299
|
+
}
|
|
1300
|
+
function kt(n, e) {
|
|
1293
1301
|
const {
|
|
1294
1302
|
direction: t = "x",
|
|
1295
1303
|
markerSelector: s = "[data-swipe-at-edge]",
|
|
1296
1304
|
depthLimit: r = 24,
|
|
1297
1305
|
verifyByScroll: a = !1
|
|
1298
|
-
} = e ?? {}, o =
|
|
1306
|
+
} = e ?? {}, o = me(n);
|
|
1299
1307
|
if (!o) return { element: null, hasMarker: !1 };
|
|
1300
1308
|
const u = o.closest?.(s);
|
|
1301
|
-
if (u instanceof HTMLElement &&
|
|
1309
|
+
if (u instanceof HTMLElement && Et(u, t) && (!a || Mt(u, t)))
|
|
1302
1310
|
return { element: u, hasMarker: !0 };
|
|
1303
1311
|
let h = o, l = 0;
|
|
1304
1312
|
for (; h && h !== document.body && l < r; ) {
|
|
1305
|
-
if (
|
|
1313
|
+
if (Et(h, t) && (!a || Mt(h, t)))
|
|
1306
1314
|
return { element: h, hasMarker: !1 };
|
|
1307
1315
|
h = h.parentElement, l++;
|
|
1308
1316
|
}
|
|
1309
1317
|
return { element: null, hasMarker: !1 };
|
|
1310
1318
|
}
|
|
1311
|
-
function
|
|
1319
|
+
function me(n) {
|
|
1312
1320
|
if (!n) return null;
|
|
1313
1321
|
const e = n, t = typeof e.composedPath == "function" ? e.composedPath() : void 0;
|
|
1314
1322
|
if (t && t.length) {
|
|
@@ -1317,11 +1325,11 @@ function he(n) {
|
|
|
1317
1325
|
}
|
|
1318
1326
|
return n;
|
|
1319
1327
|
}
|
|
1320
|
-
function
|
|
1328
|
+
function Et(n, e) {
|
|
1321
1329
|
return e === "y" ? n.scrollHeight - n.clientHeight > 1 : n.scrollWidth - n.clientWidth > 1;
|
|
1322
1330
|
}
|
|
1323
|
-
function
|
|
1324
|
-
if (!
|
|
1331
|
+
function Mt(n, e) {
|
|
1332
|
+
if (!Et(n, e)) return !1;
|
|
1325
1333
|
if (e === "y") {
|
|
1326
1334
|
const t = n.scrollTop;
|
|
1327
1335
|
if (n.scrollTop = t + 1, n.scrollTop !== t)
|
|
@@ -1338,19 +1346,19 @@ function kt(n, e) {
|
|
|
1338
1346
|
return n.scrollLeft = t, r;
|
|
1339
1347
|
}
|
|
1340
1348
|
}
|
|
1341
|
-
function
|
|
1342
|
-
const { isActive: s, transitionName: r } =
|
|
1343
|
-
|
|
1344
|
-
const u =
|
|
1345
|
-
return
|
|
1349
|
+
function we({ children: n, ref: e, ...t }) {
|
|
1350
|
+
const { isActive: s, transitionName: r } = z(), [a, o] = At();
|
|
1351
|
+
zt(e, () => a.current);
|
|
1352
|
+
const u = $((c) => c.status), h = K.get(r) ?? K.get("none"), { decoratorName: l } = h, { initial: w, variants: d } = vt.get(l);
|
|
1353
|
+
return V(() => {
|
|
1346
1354
|
if (!a.current) return;
|
|
1347
|
-
const { value: c, options: L } =
|
|
1355
|
+
const { value: c, options: L } = d[`${u}-${s}`];
|
|
1348
1356
|
o(a.current, c, L);
|
|
1349
|
-
}, [u, s, o,
|
|
1350
|
-
|
|
1357
|
+
}, [u, s, o, d, a]), /* @__PURE__ */ x(
|
|
1358
|
+
bt.div,
|
|
1351
1359
|
{
|
|
1352
1360
|
ref: a,
|
|
1353
|
-
initial:
|
|
1361
|
+
initial: w,
|
|
1354
1362
|
style: {
|
|
1355
1363
|
position: "absolute",
|
|
1356
1364
|
top: 0,
|
|
@@ -1364,28 +1372,28 @@ function ge({ children: n, ref: e, ...t }) {
|
|
|
1364
1372
|
}
|
|
1365
1373
|
);
|
|
1366
1374
|
}
|
|
1367
|
-
const
|
|
1375
|
+
const X = it((n) => ({
|
|
1368
1376
|
dragStatus: "IDLE",
|
|
1369
1377
|
replaceTransitionStatus: "IDLE",
|
|
1370
1378
|
setDragStatus: (e) => n({ dragStatus: e }),
|
|
1371
1379
|
setReplaceTransitionStatus: (e) => n({ replaceTransitionStatus: e })
|
|
1372
1380
|
}));
|
|
1373
|
-
let
|
|
1374
|
-
function
|
|
1375
|
-
const [n, e] =
|
|
1376
|
-
return
|
|
1381
|
+
let yt = 0;
|
|
1382
|
+
function Ee() {
|
|
1383
|
+
const [n, e] = at(0), [t, s] = at(0);
|
|
1384
|
+
return V(() => {
|
|
1377
1385
|
const r = () => {
|
|
1378
1386
|
let a = document.documentElement.scrollHeight - (window.visualViewport?.height || 0);
|
|
1379
1387
|
a = a < 0 ? 0 : a;
|
|
1380
|
-
let o = a -
|
|
1381
|
-
o = o < 0 ? 0 : o,
|
|
1388
|
+
let o = a - yt;
|
|
1389
|
+
o = o < 0 ? 0 : o, yt || (yt = a), s(o), e(a);
|
|
1382
1390
|
};
|
|
1383
1391
|
return window.visualViewport?.addEventListener("resize", r), window.visualViewport?.addEventListener("scroll", r), () => {
|
|
1384
1392
|
window.visualViewport?.removeEventListener("resize", r), window.visualViewport?.removeEventListener("scroll", r);
|
|
1385
1393
|
};
|
|
1386
1394
|
}, []), { viewportScrollHeight: n, changedViewportScrollHeight: t };
|
|
1387
1395
|
}
|
|
1388
|
-
function
|
|
1396
|
+
function _t({
|
|
1389
1397
|
children: n,
|
|
1390
1398
|
statusBarHeight: e,
|
|
1391
1399
|
statusBarColor: t,
|
|
@@ -1396,129 +1404,128 @@ function Ht({
|
|
|
1396
1404
|
appBar: u,
|
|
1397
1405
|
navigationBar: h,
|
|
1398
1406
|
hideStatusBar: l,
|
|
1399
|
-
hideSystemNavigationBar:
|
|
1400
|
-
backgroundColor:
|
|
1407
|
+
hideSystemNavigationBar: w,
|
|
1408
|
+
backgroundColor: d = "white",
|
|
1401
1409
|
contentScrollable: c = !0,
|
|
1402
1410
|
...L
|
|
1403
1411
|
}) {
|
|
1404
|
-
const [D, I] =
|
|
1412
|
+
const [D, I] = At(), { id: v, isActive: b, isRoot: ut, transitionName: W, prevTransitionName: tt } = z(), _ = Wt(), q = $((P) => P.status), i = X((P) => P.dragStatus), p = X.getState().setDragStatus, y = X.getState().setReplaceTransitionStatus, m = K.get(W) ?? K.get("none"), { variants: g, initial: f, swipeDirection: S, decoratorName: T } = m, k = vt.get(T), { viewportScrollHeight: E } = Ee(), M = E > 0, [N, R] = at(0), [H, lt] = at(0), Tt = O(null), et = O(null), nt = O(null), rt = O(null), j = O(!1), Z = O(!1), Y = O({
|
|
1405
1413
|
element: null,
|
|
1406
1414
|
hasMarker: !1
|
|
1407
|
-
}),
|
|
1408
|
-
if (!S ||
|
|
1415
|
+
}), B = O({ element: null, hasMarker: !1 }), dt = O(0), pt = O(0), ft = O(null), ht = O(null), Ft = async (P, A) => {
|
|
1416
|
+
if (!S || E > 10)
|
|
1409
1417
|
return;
|
|
1410
|
-
const
|
|
1411
|
-
|
|
1412
|
-
const
|
|
1418
|
+
const C = Tt.current?.parentElement?.previousElementSibling;
|
|
1419
|
+
et.current = C?.querySelector("[data-screen]"), rt.current = C?.querySelector("[data-decorator]");
|
|
1420
|
+
const U = await m?.onSwipeStart(P, A, {
|
|
1413
1421
|
animate: I,
|
|
1414
1422
|
currentScreen: D.current,
|
|
1415
|
-
prevScreen:
|
|
1416
|
-
dragControls:
|
|
1417
|
-
onStart: (
|
|
1423
|
+
prevScreen: et.current,
|
|
1424
|
+
dragControls: _,
|
|
1425
|
+
onStart: (gt) => k?.onSwipeStart?.(gt, {
|
|
1418
1426
|
animate: I,
|
|
1419
|
-
currentDecorator:
|
|
1420
|
-
prevDecorator:
|
|
1427
|
+
currentDecorator: nt.current,
|
|
1428
|
+
prevDecorator: rt.current
|
|
1421
1429
|
})
|
|
1422
1430
|
});
|
|
1423
|
-
|
|
1424
|
-
},
|
|
1425
|
-
!S || i !== "PENDING" ||
|
|
1431
|
+
p(U ? "PENDING" : "IDLE");
|
|
1432
|
+
}, Vt = (P, A) => {
|
|
1433
|
+
!S || i !== "PENDING" || E > 10 || m.onSwipe(P, A, {
|
|
1426
1434
|
animate: I,
|
|
1427
1435
|
currentScreen: D.current,
|
|
1428
|
-
prevScreen:
|
|
1429
|
-
dragControls:
|
|
1430
|
-
onProgress: (
|
|
1436
|
+
prevScreen: et.current,
|
|
1437
|
+
dragControls: _,
|
|
1438
|
+
onProgress: (C, U) => k?.onSwipe?.(C, U, {
|
|
1431
1439
|
animate: I,
|
|
1432
|
-
currentDecorator:
|
|
1433
|
-
prevDecorator:
|
|
1440
|
+
currentDecorator: nt.current,
|
|
1441
|
+
prevDecorator: rt.current
|
|
1434
1442
|
})
|
|
1435
1443
|
});
|
|
1436
|
-
},
|
|
1437
|
-
if (!S || i !== "PENDING" ||
|
|
1444
|
+
}, Qt = async (P, A) => {
|
|
1445
|
+
if (!S || i !== "PENDING" || E > 10)
|
|
1438
1446
|
return;
|
|
1439
|
-
await m?.onSwipeEnd(
|
|
1447
|
+
await m?.onSwipeEnd(P, A, {
|
|
1440
1448
|
animate: I,
|
|
1441
1449
|
currentScreen: D.current,
|
|
1442
|
-
prevScreen:
|
|
1443
|
-
onStart: (
|
|
1450
|
+
prevScreen: et.current,
|
|
1451
|
+
onStart: (U) => k?.onSwipeEnd?.(U, {
|
|
1444
1452
|
animate: I,
|
|
1445
|
-
currentDecorator:
|
|
1446
|
-
prevDecorator:
|
|
1453
|
+
currentDecorator: nt.current,
|
|
1454
|
+
prevDecorator: rt.current
|
|
1447
1455
|
})
|
|
1448
|
-
}) ? window.history.back() :
|
|
1449
|
-
},
|
|
1450
|
-
if (!(!
|
|
1456
|
+
}) ? window.history.back() : p("IDLE");
|
|
1457
|
+
}, jt = (P) => {
|
|
1458
|
+
if (!(!ut && b && q === "COMPLETED" && i === "IDLE" && !!S && E < 10))
|
|
1451
1459
|
return;
|
|
1452
|
-
|
|
1460
|
+
Y.current = kt(P.target, {
|
|
1453
1461
|
direction: "x",
|
|
1454
1462
|
verifyByScroll: !0
|
|
1455
|
-
}),
|
|
1463
|
+
}), B.current = kt(P.target, {
|
|
1456
1464
|
direction: "y",
|
|
1457
1465
|
verifyByScroll: !0
|
|
1458
|
-
}),
|
|
1459
|
-
},
|
|
1460
|
-
if (
|
|
1466
|
+
}), dt.current = P.clientX, pt.current = P.clientY, (!Y.current.element && !B.current.element || Y.current.element || B.current.element) && (j.current = !0);
|
|
1467
|
+
}, Yt = (P) => {
|
|
1468
|
+
if (E > 10)
|
|
1461
1469
|
return;
|
|
1462
|
-
const
|
|
1463
|
-
if (
|
|
1464
|
-
|
|
1465
|
-
const
|
|
1466
|
-
(S === "y" &&
|
|
1467
|
-
} else if (
|
|
1468
|
-
const
|
|
1469
|
-
(S === "y" && (
|
|
1470
|
+
const A = !Y.current.element && !B.current.element;
|
|
1471
|
+
if (j.current && A) {
|
|
1472
|
+
j.current = !1, Z.current = !0;
|
|
1473
|
+
const C = P.clientY - pt.current, U = P.clientX - dt.current;
|
|
1474
|
+
(S === "y" && C > 0 || S === "x" && U > 0) && _.start(P);
|
|
1475
|
+
} else if (j.current && !A) {
|
|
1476
|
+
const C = P.clientX - dt.current, U = P.clientY - pt.current, gt = B.current.element && B.current.element.scrollTop <= 0, Bt = Y.current.element && Y.current.element.scrollLeft <= 0 && Y.current.hasMarker;
|
|
1477
|
+
(S === "y" && (gt || Y.current.element) && U > 0 && Math.abs(C) < 2 || S === "x" && (Bt || B.current.element) && C > 0 && Math.abs(U) < 2) && (j.current = !1, Z.current = !0, _.start(P));
|
|
1470
1478
|
}
|
|
1471
|
-
},
|
|
1472
|
-
|
|
1479
|
+
}, qt = () => {
|
|
1480
|
+
j.current = !1, Z.current = !1;
|
|
1473
1481
|
};
|
|
1474
|
-
return
|
|
1475
|
-
const
|
|
1476
|
-
if (!
|
|
1477
|
-
const
|
|
1478
|
-
|
|
1482
|
+
return V(() => {
|
|
1483
|
+
const P = D.current;
|
|
1484
|
+
if (!P) return;
|
|
1485
|
+
const A = (C) => {
|
|
1486
|
+
Z.current && C.preventDefault(), C.target?.dataset.swipeAtEdgeBar === "true" && C.preventDefault();
|
|
1479
1487
|
};
|
|
1480
|
-
return
|
|
1488
|
+
return P.addEventListener("touchmove", A, {
|
|
1481
1489
|
passive: !1
|
|
1482
1490
|
}), () => {
|
|
1483
|
-
|
|
1491
|
+
P.removeEventListener("touchmove", A);
|
|
1484
1492
|
};
|
|
1485
|
-
}, [D]),
|
|
1493
|
+
}, [D]), V(() => {
|
|
1486
1494
|
D.current && (async () => {
|
|
1487
|
-
const { value:
|
|
1488
|
-
!
|
|
1495
|
+
const { value: P, options: A } = g[`${q}-${b}`];
|
|
1496
|
+
!b && q === "REPLACING" && tt !== W && (y("PENDING"), await I(D.current, ye, {
|
|
1489
1497
|
duration: 0.1
|
|
1490
|
-
})),
|
|
1498
|
+
})), b && q === "COMPLETED" && (p("IDLE"), y("IDLE")), await I(D.current, P, A), await F.resolveTask(v);
|
|
1491
1499
|
})();
|
|
1492
1500
|
}, [
|
|
1501
|
+
q,
|
|
1493
1502
|
b,
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
_,
|
|
1503
|
+
v,
|
|
1504
|
+
tt,
|
|
1505
|
+
W,
|
|
1498
1506
|
I,
|
|
1499
1507
|
D,
|
|
1500
|
-
|
|
1501
|
-
|
|
1508
|
+
g,
|
|
1509
|
+
p,
|
|
1502
1510
|
y
|
|
1503
|
-
]),
|
|
1504
|
-
|
|
1505
|
-
}, [a]),
|
|
1506
|
-
|
|
1507
|
-
}, [o]), /* @__PURE__ */
|
|
1511
|
+
]), Dt(() => {
|
|
1512
|
+
ft.current && R(ft.current.offsetHeight);
|
|
1513
|
+
}, [a]), Dt(() => {
|
|
1514
|
+
ht.current && lt(ht.current.offsetHeight);
|
|
1515
|
+
}, [o]), /* @__PURE__ */ mt(
|
|
1508
1516
|
"div",
|
|
1509
1517
|
{
|
|
1510
|
-
ref:
|
|
1518
|
+
ref: Tt,
|
|
1511
1519
|
style: {
|
|
1512
|
-
position: "
|
|
1520
|
+
position: "fixed",
|
|
1513
1521
|
top: 0,
|
|
1514
1522
|
left: 0,
|
|
1515
1523
|
width: "100%",
|
|
1516
1524
|
height: "100%",
|
|
1517
1525
|
display: "flex",
|
|
1526
|
+
contain: "strict",
|
|
1518
1527
|
flexDirection: "column",
|
|
1519
1528
|
boxSizing: "border-box",
|
|
1520
|
-
isolation: "isolate",
|
|
1521
|
-
contain: "strict",
|
|
1522
1529
|
overscrollBehavior: "contain"
|
|
1523
1530
|
},
|
|
1524
1531
|
children: [
|
|
@@ -1527,7 +1534,7 @@ function Ht({
|
|
|
1527
1534
|
{
|
|
1528
1535
|
"data-swipe-at-edge-bar": !0,
|
|
1529
1536
|
style: {
|
|
1530
|
-
position: "
|
|
1537
|
+
position: "fixed",
|
|
1531
1538
|
top: 0,
|
|
1532
1539
|
left: 0,
|
|
1533
1540
|
width: 8,
|
|
@@ -1539,9 +1546,9 @@ function Ht({
|
|
|
1539
1546
|
a && /* @__PURE__ */ x(
|
|
1540
1547
|
"div",
|
|
1541
1548
|
{
|
|
1542
|
-
ref:
|
|
1549
|
+
ref: ft,
|
|
1543
1550
|
style: {
|
|
1544
|
-
position: "
|
|
1551
|
+
position: "fixed",
|
|
1545
1552
|
top: l ? 0 : e,
|
|
1546
1553
|
left: 0,
|
|
1547
1554
|
width: "100%"
|
|
@@ -1549,31 +1556,27 @@ function Ht({
|
|
|
1549
1556
|
children: a
|
|
1550
1557
|
}
|
|
1551
1558
|
),
|
|
1552
|
-
/* @__PURE__ */
|
|
1553
|
-
|
|
1559
|
+
/* @__PURE__ */ mt(
|
|
1560
|
+
bt.div,
|
|
1554
1561
|
{
|
|
1555
1562
|
ref: D,
|
|
1556
1563
|
...L,
|
|
1557
|
-
initial:
|
|
1564
|
+
initial: f,
|
|
1558
1565
|
drag: S,
|
|
1559
1566
|
dragListener: !1,
|
|
1560
|
-
dragControls:
|
|
1561
|
-
onDragStart:
|
|
1562
|
-
onDrag:
|
|
1563
|
-
onDragEnd:
|
|
1564
|
-
onPointerDown:
|
|
1565
|
-
onPointerMove:
|
|
1566
|
-
onPointerUp:
|
|
1567
|
-
transition: {
|
|
1568
|
-
inherit: !0,
|
|
1569
|
-
...L.transition
|
|
1570
|
-
},
|
|
1567
|
+
dragControls: _,
|
|
1568
|
+
onDragStart: Ft,
|
|
1569
|
+
onDrag: Vt,
|
|
1570
|
+
onDragEnd: Qt,
|
|
1571
|
+
onPointerDown: jt,
|
|
1572
|
+
onPointerMove: Yt,
|
|
1573
|
+
onPointerUp: qt,
|
|
1571
1574
|
"data-screen": !0,
|
|
1572
1575
|
style: {
|
|
1573
1576
|
display: "flex",
|
|
1574
1577
|
flexDirection: "column",
|
|
1575
1578
|
height: "100%",
|
|
1576
|
-
backgroundColor:
|
|
1579
|
+
backgroundColor: d,
|
|
1577
1580
|
overflowY: c ? void 0 : "auto",
|
|
1578
1581
|
...L.style
|
|
1579
1582
|
},
|
|
@@ -1617,17 +1620,17 @@ function Ht({
|
|
|
1617
1620
|
"div",
|
|
1618
1621
|
{
|
|
1619
1622
|
style: {
|
|
1620
|
-
display:
|
|
1623
|
+
display: M ? "none" : void 0,
|
|
1621
1624
|
width: "100%",
|
|
1622
|
-
minHeight:
|
|
1625
|
+
minHeight: H
|
|
1623
1626
|
}
|
|
1624
1627
|
}
|
|
1625
1628
|
),
|
|
1626
|
-
!
|
|
1629
|
+
!w && s && /* @__PURE__ */ x(
|
|
1627
1630
|
"div",
|
|
1628
1631
|
{
|
|
1629
1632
|
style: {
|
|
1630
|
-
display:
|
|
1633
|
+
display: M ? "none" : void 0,
|
|
1631
1634
|
minHeight: s
|
|
1632
1635
|
},
|
|
1633
1636
|
children: /* @__PURE__ */ x(
|
|
@@ -1650,23 +1653,23 @@ function Ht({
|
|
|
1650
1653
|
o && /* @__PURE__ */ x(
|
|
1651
1654
|
"div",
|
|
1652
1655
|
{
|
|
1653
|
-
ref:
|
|
1656
|
+
ref: ht,
|
|
1654
1657
|
style: {
|
|
1655
|
-
position: "
|
|
1656
|
-
bottom:
|
|
1658
|
+
position: "fixed",
|
|
1659
|
+
bottom: w ? 0 : s,
|
|
1657
1660
|
left: 0,
|
|
1658
1661
|
width: "100%"
|
|
1659
1662
|
},
|
|
1660
1663
|
children: o
|
|
1661
1664
|
}
|
|
1662
1665
|
),
|
|
1663
|
-
|
|
1666
|
+
k && /* @__PURE__ */ x(we, { ref: nt }),
|
|
1664
1667
|
/* @__PURE__ */ x(
|
|
1665
1668
|
"div",
|
|
1666
1669
|
{
|
|
1667
1670
|
"data-swipe-at-edge-bar": !0,
|
|
1668
1671
|
style: {
|
|
1669
|
-
position: "
|
|
1672
|
+
position: "fixed",
|
|
1670
1673
|
top: 0,
|
|
1671
1674
|
right: 0,
|
|
1672
1675
|
width: 8,
|
|
@@ -1679,28 +1682,28 @@ function Ht({
|
|
|
1679
1682
|
}
|
|
1680
1683
|
);
|
|
1681
1684
|
}
|
|
1682
|
-
function
|
|
1683
|
-
const { isActive: t, isPrev: s, zIndex: r } =
|
|
1684
|
-
return /* @__PURE__ */ x(
|
|
1685
|
+
function Me({ children: n, ...e }) {
|
|
1686
|
+
const { isActive: t, isPrev: s, zIndex: r } = z(), a = Q((d) => d.index), o = $((d) => d.status), u = X((d) => d.dragStatus), h = X((d) => d.replaceTransitionStatus), w = !t && (o === "COMPLETED" && u === "IDLE") || s && a - 2 <= r && h === "IDLE" || s && a - 2 > r;
|
|
1687
|
+
return /* @__PURE__ */ x(Ut, { freeze: w, children: /* @__PURE__ */ x(_t, { ...e, children: n }) });
|
|
1685
1688
|
}
|
|
1686
|
-
function
|
|
1687
|
-
const { isActive: t, isPrev: s, zIndex: r } =
|
|
1688
|
-
return /* @__PURE__ */ x(
|
|
1689
|
-
|
|
1689
|
+
function Ce({ children: n, ...e }) {
|
|
1690
|
+
const { isActive: t, isPrev: s, zIndex: r } = z(), a = Q((d) => d.index), o = $((d) => d.status), u = X((d) => d.dragStatus), h = X((d) => d.replaceTransitionStatus), w = !t && (o === "COMPLETED" && u === "IDLE") || s && a - 2 <= r && h === "IDLE" || s && a - 2 > r;
|
|
1691
|
+
return /* @__PURE__ */ x(Ut, { freeze: w, children: /* @__PURE__ */ x(
|
|
1692
|
+
_t,
|
|
1690
1693
|
{
|
|
1691
1694
|
...e,
|
|
1692
1695
|
style: {
|
|
1693
1696
|
backgroundColor: "transparent",
|
|
1694
1697
|
...e.style
|
|
1695
1698
|
},
|
|
1696
|
-
children: /* @__PURE__ */ x(
|
|
1699
|
+
children: /* @__PURE__ */ x(Jt, { children: n })
|
|
1697
1700
|
}
|
|
1698
|
-
);
|
|
1701
|
+
) });
|
|
1699
1702
|
}
|
|
1700
|
-
function
|
|
1701
|
-
const { isActive: t, transitionName: s } =
|
|
1703
|
+
function Re({ children: n, ...e }) {
|
|
1704
|
+
const { isActive: t, transitionName: s } = z(), r = $((o) => o.status), a = K.get(s);
|
|
1702
1705
|
return /* @__PURE__ */ x(
|
|
1703
|
-
|
|
1706
|
+
Zt,
|
|
1704
1707
|
{
|
|
1705
1708
|
transition: a?.variants[`${r}-${t}`]?.options,
|
|
1706
1709
|
...e,
|
|
@@ -1709,18 +1712,18 @@ function ke({ children: n, ...e }) {
|
|
|
1709
1712
|
);
|
|
1710
1713
|
}
|
|
1711
1714
|
export {
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1715
|
+
Re as LayoutConfig,
|
|
1716
|
+
Ce as LayoutScreen,
|
|
1717
|
+
De as Route,
|
|
1718
|
+
Te as Router,
|
|
1719
|
+
Me as Screen,
|
|
1720
|
+
le as createDecorator,
|
|
1721
|
+
ke as createRawDecorator,
|
|
1722
|
+
Ne as createRawTransition,
|
|
1720
1723
|
ct as createTransition,
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1724
|
+
Le as useNavigate,
|
|
1725
|
+
xe as useParams,
|
|
1726
|
+
z as useScreen,
|
|
1727
|
+
Ie as useStep,
|
|
1728
|
+
Ee as useViewportScrollHeight
|
|
1726
1729
|
};
|