flemo 1.3.2 → 1.3.4
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.d.ts +1 -1
- package/dist/index.mjs +559 -475
- package/dist/screen/LayoutScreen.d.ts +2 -7
- package/dist/screen/Screen.d.ts +6 -0
- package/dist/screen/ScreenMotion.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { transform as
|
|
4
|
-
var
|
|
5
|
-
function
|
|
6
|
-
if (
|
|
7
|
-
|
|
1
|
+
import { jsx as D, jsxs as ct } from "react/jsx-runtime";
|
|
2
|
+
import nt, { useEffect as K, createContext as dt, useContext as pt, useReducer as Ht, Children as It, Suspense as _t, useImperativeHandle as Ft, useState as mt, useRef as H, useLayoutEffect as Et } from "react";
|
|
3
|
+
import { transform as ft, useAnimate as Lt, motion as z, useDragControls as Qt, AnimatePresence as jt, MotionConfig as qt } from "motion/react";
|
|
4
|
+
var _ = {}, wt;
|
|
5
|
+
function Yt() {
|
|
6
|
+
if (wt) return _;
|
|
7
|
+
wt = 1, Object.defineProperty(_, "__esModule", { value: !0 }), _.PathError = _.TokenData = void 0, _.parse = l, _.compile = m, _.match = P, _.pathToRegexp = I, _.stringify = $;
|
|
8
8
|
const n = "/", e = (i) => i, t = /^[$_\p{ID_Start}]$/u, r = /^[$\u200c\u200d\p{ID_Continue}]$/u, s = {
|
|
9
9
|
// Groups.
|
|
10
10
|
"{": "{",
|
|
@@ -25,249 +25,249 @@ function Ct() {
|
|
|
25
25
|
return i.replace(/[.+*?^${}()[\]|/\\]/g, "\\$&");
|
|
26
26
|
}
|
|
27
27
|
class c {
|
|
28
|
-
constructor(
|
|
29
|
-
this.tokens =
|
|
28
|
+
constructor(y, g) {
|
|
29
|
+
this.tokens = y, this.originalPath = g;
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
|
|
33
|
-
class
|
|
34
|
-
constructor(
|
|
35
|
-
let
|
|
36
|
-
|
|
32
|
+
_.TokenData = c;
|
|
33
|
+
class h extends TypeError {
|
|
34
|
+
constructor(y, g) {
|
|
35
|
+
let E = y;
|
|
36
|
+
g && (E += `: ${g}`), E += "; visit https://git.new/pathToRegexpError for info", super(E), this.originalPath = g;
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
|
|
40
|
-
function l(i,
|
|
41
|
-
const { encodePath:
|
|
42
|
-
let
|
|
43
|
-
function
|
|
44
|
-
let
|
|
45
|
-
if (t.test(
|
|
39
|
+
_.PathError = h;
|
|
40
|
+
function l(i, y = {}) {
|
|
41
|
+
const { encodePath: g = e } = y, E = [...i], p = [];
|
|
42
|
+
let f = 0, L = 0;
|
|
43
|
+
function T() {
|
|
44
|
+
let S = "";
|
|
45
|
+
if (t.test(E[f]))
|
|
46
46
|
do
|
|
47
|
-
|
|
48
|
-
while (r.test(
|
|
49
|
-
else if (
|
|
50
|
-
let
|
|
51
|
-
for (;
|
|
52
|
-
if (
|
|
53
|
-
|
|
47
|
+
S += E[f++];
|
|
48
|
+
while (r.test(E[f]));
|
|
49
|
+
else if (E[f] === '"') {
|
|
50
|
+
let M = f;
|
|
51
|
+
for (; f++ < E.length; ) {
|
|
52
|
+
if (E[f] === '"') {
|
|
53
|
+
f++, M = 0;
|
|
54
54
|
break;
|
|
55
55
|
}
|
|
56
|
-
|
|
56
|
+
E[f] === "\\" && f++, S += E[f];
|
|
57
57
|
}
|
|
58
|
-
if (
|
|
59
|
-
throw new
|
|
58
|
+
if (M)
|
|
59
|
+
throw new h(`Unterminated quote at index ${M}`, i);
|
|
60
60
|
}
|
|
61
|
-
if (!
|
|
62
|
-
throw new
|
|
63
|
-
return
|
|
61
|
+
if (!S)
|
|
62
|
+
throw new h(`Missing parameter name at index ${f}`, i);
|
|
63
|
+
return S;
|
|
64
64
|
}
|
|
65
|
-
for (;
|
|
66
|
-
const
|
|
67
|
-
|
|
65
|
+
for (; f < E.length; ) {
|
|
66
|
+
const S = E[f], M = s[S];
|
|
67
|
+
M ? p.push({ type: M, index: f++, value: S }) : S === "\\" ? p.push({ type: "escape", index: f++, value: E[f++] }) : S === ":" ? p.push({ type: "param", index: f++, value: T() }) : S === "*" ? p.push({ type: "wildcard", index: f++, value: T() }) : p.push({ type: "char", index: f++, value: S });
|
|
68
68
|
}
|
|
69
|
-
|
|
70
|
-
function
|
|
71
|
-
const
|
|
69
|
+
p.push({ type: "end", index: f, value: "" });
|
|
70
|
+
function R(S) {
|
|
71
|
+
const M = [];
|
|
72
72
|
for (; ; ) {
|
|
73
|
-
const x =
|
|
74
|
-
if (x.type ===
|
|
73
|
+
const x = p[L++];
|
|
74
|
+
if (x.type === S)
|
|
75
75
|
break;
|
|
76
76
|
if (x.type === "char" || x.type === "escape") {
|
|
77
|
-
let
|
|
78
|
-
for (;
|
|
79
|
-
|
|
80
|
-
|
|
77
|
+
let C = x.value, A = p[L];
|
|
78
|
+
for (; A.type === "char" || A.type === "escape"; )
|
|
79
|
+
C += A.value, A = p[++L];
|
|
80
|
+
M.push({
|
|
81
81
|
type: "text",
|
|
82
|
-
value:
|
|
82
|
+
value: g(C)
|
|
83
83
|
});
|
|
84
84
|
continue;
|
|
85
85
|
}
|
|
86
86
|
if (x.type === "param" || x.type === "wildcard") {
|
|
87
|
-
|
|
87
|
+
M.push({
|
|
88
88
|
type: x.type,
|
|
89
89
|
name: x.value
|
|
90
90
|
});
|
|
91
91
|
continue;
|
|
92
92
|
}
|
|
93
93
|
if (x.type === "{") {
|
|
94
|
-
|
|
94
|
+
M.push({
|
|
95
95
|
type: "group",
|
|
96
|
-
tokens:
|
|
96
|
+
tokens: R("}")
|
|
97
97
|
});
|
|
98
98
|
continue;
|
|
99
99
|
}
|
|
100
|
-
throw new
|
|
100
|
+
throw new h(`Unexpected ${x.type} at index ${x.index}, expected ${S}`, i);
|
|
101
101
|
}
|
|
102
|
-
return
|
|
102
|
+
return M;
|
|
103
103
|
}
|
|
104
|
-
return new c(
|
|
104
|
+
return new c(R("end"), i);
|
|
105
105
|
}
|
|
106
|
-
function
|
|
107
|
-
const { encode:
|
|
108
|
-
return function(
|
|
109
|
-
const [
|
|
110
|
-
if (
|
|
111
|
-
throw new TypeError(`Missing parameters: ${
|
|
112
|
-
return
|
|
106
|
+
function m(i, y = {}) {
|
|
107
|
+
const { encode: g = encodeURIComponent, delimiter: E = n } = y, p = typeof i == "object" ? i : l(i, y), f = d(p.tokens, E, g);
|
|
108
|
+
return function(T = {}) {
|
|
109
|
+
const [R, ...S] = f(T);
|
|
110
|
+
if (S.length)
|
|
111
|
+
throw new TypeError(`Missing parameters: ${S.join(", ")}`);
|
|
112
|
+
return R;
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
|
-
function
|
|
116
|
-
const
|
|
117
|
-
return (
|
|
118
|
-
const
|
|
119
|
-
for (const
|
|
120
|
-
const [
|
|
121
|
-
|
|
115
|
+
function d(i, y, g) {
|
|
116
|
+
const E = i.map((p) => u(p, y, g));
|
|
117
|
+
return (p) => {
|
|
118
|
+
const f = [""];
|
|
119
|
+
for (const L of E) {
|
|
120
|
+
const [T, ...R] = L(p);
|
|
121
|
+
f[0] += T, f.push(...R);
|
|
122
122
|
}
|
|
123
|
-
return
|
|
123
|
+
return f;
|
|
124
124
|
};
|
|
125
125
|
}
|
|
126
|
-
function u(i,
|
|
126
|
+
function u(i, y, g) {
|
|
127
127
|
if (i.type === "text")
|
|
128
128
|
return () => [i.value];
|
|
129
129
|
if (i.type === "group") {
|
|
130
|
-
const
|
|
131
|
-
return (
|
|
132
|
-
const [
|
|
133
|
-
return
|
|
130
|
+
const p = d(i.tokens, y, g);
|
|
131
|
+
return (f) => {
|
|
132
|
+
const [L, ...T] = p(f);
|
|
133
|
+
return T.length ? [""] : [L];
|
|
134
134
|
};
|
|
135
135
|
}
|
|
136
|
-
const
|
|
137
|
-
return i.type === "wildcard" &&
|
|
138
|
-
const
|
|
139
|
-
if (
|
|
136
|
+
const E = g || e;
|
|
137
|
+
return i.type === "wildcard" && g !== !1 ? (p) => {
|
|
138
|
+
const f = p[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
|
-
|
|
145
|
-
if (typeof
|
|
146
|
-
throw new TypeError(`Expected "${i.name}/${
|
|
147
|
-
return
|
|
148
|
-
}).join(
|
|
144
|
+
f.map((L, T) => {
|
|
145
|
+
if (typeof L != "string")
|
|
146
|
+
throw new TypeError(`Expected "${i.name}/${T}" to be a string`);
|
|
147
|
+
return E(L);
|
|
148
|
+
}).join(y)
|
|
149
149
|
];
|
|
150
|
-
} : (
|
|
151
|
-
const
|
|
152
|
-
if (
|
|
150
|
+
} : (p) => {
|
|
151
|
+
const f = p[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 [
|
|
156
|
+
return [E(f)];
|
|
157
157
|
};
|
|
158
158
|
}
|
|
159
|
-
function
|
|
160
|
-
const { decode:
|
|
161
|
-
return function(
|
|
162
|
-
const
|
|
163
|
-
if (!
|
|
159
|
+
function P(i, y = {}) {
|
|
160
|
+
const { decode: g = decodeURIComponent, delimiter: E = n } = y, { regexp: p, keys: f } = I(i, y), L = f.map((T) => g === !1 ? e : T.type === "param" ? g : (R) => R.split(E).map(g));
|
|
161
|
+
return function(R) {
|
|
162
|
+
const S = p.exec(R);
|
|
163
|
+
if (!S)
|
|
164
164
|
return !1;
|
|
165
|
-
const
|
|
166
|
-
for (let
|
|
167
|
-
if (
|
|
165
|
+
const M = S[0], x = /* @__PURE__ */ Object.create(null);
|
|
166
|
+
for (let C = 1; C < S.length; C++) {
|
|
167
|
+
if (S[C] === void 0)
|
|
168
168
|
continue;
|
|
169
|
-
const
|
|
170
|
-
x[
|
|
169
|
+
const A = f[C - 1], V = L[C - 1];
|
|
170
|
+
x[A.name] = V(S[C]);
|
|
171
171
|
}
|
|
172
|
-
return { path:
|
|
172
|
+
return { path: M, params: x };
|
|
173
173
|
};
|
|
174
174
|
}
|
|
175
|
-
function
|
|
176
|
-
const { delimiter:
|
|
177
|
-
for (const x of
|
|
178
|
-
const
|
|
179
|
-
for (const
|
|
180
|
-
|
|
175
|
+
function I(i, y = {}) {
|
|
176
|
+
const { delimiter: g = n, end: E = !0, sensitive: p = !1, trailing: f = !0 } = y, L = [], T = p ? "" : "i", R = [];
|
|
177
|
+
for (const x of N(i, [])) {
|
|
178
|
+
const C = typeof x == "object" ? x : l(x, y);
|
|
179
|
+
for (const A of w(C.tokens, 0, []))
|
|
180
|
+
R.push(k(A, g, L, C.originalPath));
|
|
181
181
|
}
|
|
182
|
-
let
|
|
183
|
-
return
|
|
182
|
+
let S = `^(?:${R.join("|")})`;
|
|
183
|
+
return f && (S += `(?:${o(g)}$)?`), S += E ? "$" : `(?=${o(g)}|$)`, { regexp: new RegExp(S, T), keys: L };
|
|
184
184
|
}
|
|
185
|
-
function
|
|
185
|
+
function N(i, y) {
|
|
186
186
|
if (Array.isArray(i))
|
|
187
|
-
for (const
|
|
188
|
-
|
|
187
|
+
for (const g of i)
|
|
188
|
+
N(g, y);
|
|
189
189
|
else
|
|
190
|
-
|
|
191
|
-
return
|
|
190
|
+
y.push(i);
|
|
191
|
+
return y;
|
|
192
192
|
}
|
|
193
|
-
function*
|
|
194
|
-
if (
|
|
195
|
-
return yield
|
|
196
|
-
const
|
|
197
|
-
if (
|
|
198
|
-
for (const
|
|
199
|
-
yield*
|
|
193
|
+
function* w(i, y, g) {
|
|
194
|
+
if (y === i.length)
|
|
195
|
+
return yield g;
|
|
196
|
+
const E = i[y];
|
|
197
|
+
if (E.type === "group")
|
|
198
|
+
for (const p of w(E.tokens, 0, g.slice()))
|
|
199
|
+
yield* w(i, y + 1, p);
|
|
200
200
|
else
|
|
201
|
-
|
|
202
|
-
yield*
|
|
201
|
+
g.push(E);
|
|
202
|
+
yield* w(i, y + 1, g);
|
|
203
203
|
}
|
|
204
|
-
function
|
|
205
|
-
let
|
|
206
|
-
for (const
|
|
207
|
-
if (
|
|
208
|
-
|
|
204
|
+
function k(i, y, g, E) {
|
|
205
|
+
let p = "", f = "", L = !0;
|
|
206
|
+
for (const T of i) {
|
|
207
|
+
if (T.type === "text") {
|
|
208
|
+
p += o(T.value), f += T.value, L || (L = T.value.includes(y));
|
|
209
209
|
continue;
|
|
210
210
|
}
|
|
211
|
-
if (
|
|
212
|
-
if (!
|
|
213
|
-
throw new
|
|
214
|
-
|
|
211
|
+
if (T.type === "param" || T.type === "wildcard") {
|
|
212
|
+
if (!L && !f)
|
|
213
|
+
throw new h(`Missing text before "${T.name}" ${T.type}`, E);
|
|
214
|
+
T.type === "param" ? p += `(${U(y, L ? "" : f)}+)` : p += "([\\s\\S]+)", g.push(T), f = "", L = !1;
|
|
215
215
|
continue;
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
|
-
return
|
|
218
|
+
return p;
|
|
219
219
|
}
|
|
220
|
-
function
|
|
221
|
-
return
|
|
220
|
+
function U(i, y) {
|
|
221
|
+
return y.length < 2 ? i.length < 2 ? `[^${o(i + y)}]` : `(?:(?!${o(i)})[^${o(y)}])` : i.length < 2 ? `(?:(?!${o(y)})[^${o(i)}])` : `(?:(?!${o(y)}|${o(i)})[\\s\\S])`;
|
|
222
222
|
}
|
|
223
|
-
function
|
|
224
|
-
let
|
|
225
|
-
function
|
|
226
|
-
return
|
|
223
|
+
function b(i) {
|
|
224
|
+
let y = "", g = 0;
|
|
225
|
+
function E(p) {
|
|
226
|
+
return tt(p) && J(i[g]) ? p : JSON.stringify(p);
|
|
227
227
|
}
|
|
228
|
-
for (;
|
|
229
|
-
const
|
|
230
|
-
if (
|
|
231
|
-
|
|
228
|
+
for (; g < i.length; ) {
|
|
229
|
+
const p = i[g++];
|
|
230
|
+
if (p.type === "text") {
|
|
231
|
+
y += a(p.value);
|
|
232
232
|
continue;
|
|
233
233
|
}
|
|
234
|
-
if (
|
|
235
|
-
|
|
234
|
+
if (p.type === "group") {
|
|
235
|
+
y += `{${b(p.tokens)}}`;
|
|
236
236
|
continue;
|
|
237
237
|
}
|
|
238
|
-
if (
|
|
239
|
-
|
|
238
|
+
if (p.type === "param") {
|
|
239
|
+
y += `:${E(p.name)}`;
|
|
240
240
|
continue;
|
|
241
241
|
}
|
|
242
|
-
if (
|
|
243
|
-
|
|
242
|
+
if (p.type === "wildcard") {
|
|
243
|
+
y += `*${E(p.name)}`;
|
|
244
244
|
continue;
|
|
245
245
|
}
|
|
246
|
-
throw new TypeError(`Unknown token type: ${
|
|
246
|
+
throw new TypeError(`Unknown token type: ${p.type}`);
|
|
247
247
|
}
|
|
248
|
-
return
|
|
248
|
+
return y;
|
|
249
249
|
}
|
|
250
|
-
function
|
|
251
|
-
return
|
|
250
|
+
function $(i) {
|
|
251
|
+
return b(i.tokens);
|
|
252
252
|
}
|
|
253
|
-
function
|
|
254
|
-
const [
|
|
255
|
-
return t.test(
|
|
253
|
+
function tt(i) {
|
|
254
|
+
const [y, ...g] = i;
|
|
255
|
+
return t.test(y) && g.every((E) => r.test(E));
|
|
256
256
|
}
|
|
257
257
|
function J(i) {
|
|
258
258
|
return i && i.type === "text" ? !r.test(i.value[0]) : !0;
|
|
259
259
|
}
|
|
260
|
-
return
|
|
260
|
+
return _;
|
|
261
261
|
}
|
|
262
|
-
var
|
|
263
|
-
function
|
|
264
|
-
const r = Array.isArray(n) ? n.find((c) =>
|
|
262
|
+
var X = Yt();
|
|
263
|
+
function Bt(n, e, t) {
|
|
264
|
+
const r = Array.isArray(n) ? n.find((c) => X.pathToRegexp(c).regexp.test(e)) || "" : X.pathToRegexp(n).regexp.test(e) ? n : "", s = X.match(r)(e), a = new URLSearchParams(t), o = Object.fromEntries(a.entries());
|
|
265
265
|
return s ? { ...s.params, ...o } : {};
|
|
266
266
|
}
|
|
267
|
-
function
|
|
267
|
+
function St() {
|
|
268
268
|
return typeof document > "u";
|
|
269
269
|
}
|
|
270
|
-
class
|
|
270
|
+
class Xt {
|
|
271
271
|
tasks = /* @__PURE__ */ new Map();
|
|
272
272
|
instanceId = Date.now().toString();
|
|
273
273
|
isLocked = !1;
|
|
@@ -335,7 +335,7 @@ class Rt {
|
|
|
335
335
|
return new Promise((s, a) => {
|
|
336
336
|
this.taskQueue = this.taskQueue.then(async () => {
|
|
337
337
|
try {
|
|
338
|
-
const { control: o, validate: c, rollback:
|
|
338
|
+
const { control: o, validate: c, rollback: h, dependencies: l = [], delay: m } = t, d = new AbortController(), u = {
|
|
339
339
|
id: r,
|
|
340
340
|
execute: e,
|
|
341
341
|
timestamp: Date.now(),
|
|
@@ -344,25 +344,25 @@ class Rt {
|
|
|
344
344
|
dependencies: l,
|
|
345
345
|
instanceId: this.instanceId,
|
|
346
346
|
validate: c,
|
|
347
|
-
rollback:
|
|
347
|
+
rollback: h,
|
|
348
348
|
control: o,
|
|
349
|
-
abortController:
|
|
349
|
+
abortController: d
|
|
350
350
|
};
|
|
351
|
-
this.tasks.set(u.id, u), this.pendingTaskQueue.length > 0 && (this.pendingTaskQueue.push(u), await this.waitForPendingTasks(), this.pendingTaskQueue = this.pendingTaskQueue.filter((
|
|
351
|
+
this.tasks.set(u.id, u), this.pendingTaskQueue.length > 0 && (this.pendingTaskQueue.push(u), await this.waitForPendingTasks(), this.pendingTaskQueue = this.pendingTaskQueue.filter((I) => I.id !== u.id));
|
|
352
352
|
try {
|
|
353
353
|
if (!await this.acquireLock(u.id))
|
|
354
354
|
throw u.status = "FAILED", new Error("FAILED");
|
|
355
355
|
try {
|
|
356
356
|
u.status = "PROCESSING";
|
|
357
|
-
for (const
|
|
358
|
-
const
|
|
359
|
-
if (!
|
|
357
|
+
for (const w of u.dependencies) {
|
|
358
|
+
const k = this.tasks.get(w);
|
|
359
|
+
if (!k || k.status !== "COMPLETED")
|
|
360
360
|
throw u.status = "FAILED", new Error("FAILED");
|
|
361
361
|
}
|
|
362
362
|
if (u.validate && !await u.validate())
|
|
363
363
|
throw u.status = "FAILED", new Error("FAILED");
|
|
364
|
-
|
|
365
|
-
const
|
|
364
|
+
m && m > 0 && await new Promise((w) => setTimeout(w, m));
|
|
365
|
+
const N = await u.execute(u.abortController);
|
|
366
366
|
if (u.abortController.signal.aborted) {
|
|
367
367
|
u.status = "COMPLETED", await this.onTaskStatusChange(u.id, "COMPLETED"), s({
|
|
368
368
|
success: !0,
|
|
@@ -374,39 +374,39 @@ class Rt {
|
|
|
374
374
|
return;
|
|
375
375
|
}
|
|
376
376
|
if (t.control) {
|
|
377
|
-
const
|
|
378
|
-
if (
|
|
379
|
-
u.status = "MANUAL_PENDING", u.manualResolver = { resolve: s, reject: a, result:
|
|
377
|
+
const w = t.control;
|
|
378
|
+
if (w.delay && w.delay > 0 && await new Promise((k) => setTimeout(k, w.delay)), w.manual) {
|
|
379
|
+
u.status = "MANUAL_PENDING", u.manualResolver = { resolve: s, reject: a, result: N }, this.pendingTaskQueue.push(u), await this.onTaskStatusChange(u.id, "MANUAL_PENDING");
|
|
380
380
|
return;
|
|
381
381
|
}
|
|
382
|
-
if (
|
|
383
|
-
u.status = "SIGNAL_PENDING", u.manualResolver = { resolve: s, reject: a, result:
|
|
382
|
+
if (w.signal) {
|
|
383
|
+
u.status = "SIGNAL_PENDING", u.manualResolver = { resolve: s, reject: a, result: N }, this.signalListeners.has(w.signal) || this.signalListeners.set(w.signal, /* @__PURE__ */ new Set()), this.signalListeners.get(w.signal).add(u.id), this.pendingTaskQueue.push(u), await this.onTaskStatusChange(u.id, "SIGNAL_PENDING");
|
|
384
384
|
return;
|
|
385
385
|
}
|
|
386
|
-
if (
|
|
387
|
-
u.status = "MANUAL_PENDING", u.manualResolver = { resolve: s, reject: a, result:
|
|
386
|
+
if (w.condition && !await w.condition()) {
|
|
387
|
+
u.status = "MANUAL_PENDING", u.manualResolver = { resolve: s, reject: a, result: N }, this.pendingTaskQueue.push(u), await this.onTaskStatusChange(u.id, "MANUAL_PENDING");
|
|
388
388
|
return;
|
|
389
389
|
}
|
|
390
390
|
}
|
|
391
391
|
u.status = "COMPLETED", await this.onTaskStatusChange(u.id, "COMPLETED"), s({
|
|
392
392
|
success: !0,
|
|
393
|
-
result:
|
|
393
|
+
result: N,
|
|
394
394
|
taskId: u.id,
|
|
395
395
|
timestamp: Date.now(),
|
|
396
396
|
instanceId: this.instanceId
|
|
397
397
|
});
|
|
398
|
-
} catch (
|
|
398
|
+
} catch (N) {
|
|
399
399
|
if (u.status = "FAILED", u.rollback)
|
|
400
400
|
try {
|
|
401
401
|
await u.rollback(), u.status = "ROLLEDBACK";
|
|
402
402
|
} catch {
|
|
403
403
|
}
|
|
404
|
-
throw await this.onTaskStatusChange(u.id, u.status),
|
|
404
|
+
throw await this.onTaskStatusChange(u.id, u.status), N;
|
|
405
405
|
} finally {
|
|
406
406
|
this.releaseLock(u.id);
|
|
407
407
|
}
|
|
408
|
-
} catch (
|
|
409
|
-
a(
|
|
408
|
+
} catch (I) {
|
|
409
|
+
a(I);
|
|
410
410
|
}
|
|
411
411
|
} catch (o) {
|
|
412
412
|
a(o);
|
|
@@ -440,29 +440,29 @@ class Rt {
|
|
|
440
440
|
await Promise.all(e.map((t) => this.resolveTask(t.id)));
|
|
441
441
|
}
|
|
442
442
|
}
|
|
443
|
-
const
|
|
443
|
+
const Q = new Xt(), Pt = (n) => {
|
|
444
444
|
let e;
|
|
445
|
-
const t = /* @__PURE__ */ new Set(), r = (l,
|
|
446
|
-
const
|
|
447
|
-
if (!Object.is(
|
|
445
|
+
const t = /* @__PURE__ */ new Set(), r = (l, m) => {
|
|
446
|
+
const d = typeof l == "function" ? l(e) : l;
|
|
447
|
+
if (!Object.is(d, e)) {
|
|
448
448
|
const u = e;
|
|
449
|
-
e =
|
|
449
|
+
e = m ?? (typeof d != "object" || d === null) ? d : Object.assign({}, e, d), t.forEach((P) => P(e, u));
|
|
450
450
|
}
|
|
451
|
-
}, s = () => e, c = { setState: r, getState: s, getInitialState: () =>
|
|
451
|
+
}, s = () => e, c = { setState: r, getState: s, getInitialState: () => h, subscribe: (l) => (t.add(l), () => t.delete(l)) }, h = e = n(r, s, c);
|
|
452
452
|
return c;
|
|
453
|
-
},
|
|
454
|
-
function
|
|
455
|
-
const t =
|
|
453
|
+
}, Kt = ((n) => n ? Pt(n) : Pt), Vt = (n) => n;
|
|
454
|
+
function zt(n, e = Vt) {
|
|
455
|
+
const t = nt.useSyncExternalStore(
|
|
456
456
|
n.subscribe,
|
|
457
|
-
|
|
458
|
-
|
|
457
|
+
nt.useCallback(() => e(n.getState()), [n, e]),
|
|
458
|
+
nt.useCallback(() => e(n.getInitialState()), [n, e])
|
|
459
459
|
);
|
|
460
|
-
return
|
|
460
|
+
return nt.useDebugValue(t), t;
|
|
461
461
|
}
|
|
462
|
-
const
|
|
463
|
-
const e =
|
|
462
|
+
const Tt = (n) => {
|
|
463
|
+
const e = Kt(n), t = (r) => zt(e, r);
|
|
464
464
|
return Object.assign(t, e), t;
|
|
465
|
-
},
|
|
465
|
+
}, st = ((n) => n ? Tt(n) : Tt), j = st((n) => ({
|
|
466
466
|
index: -1,
|
|
467
467
|
histories: [],
|
|
468
468
|
addHistory: (e) => n((t) => ({
|
|
@@ -477,35 +477,35 @@ const ft = (n) => {
|
|
|
477
477
|
index: t.index - 1,
|
|
478
478
|
histories: t.histories.filter((r, s) => s !== e)
|
|
479
479
|
}))
|
|
480
|
-
})),
|
|
480
|
+
})), F = st((n) => ({
|
|
481
481
|
status: "IDLE",
|
|
482
482
|
setStatus: (e) => n({ status: e })
|
|
483
483
|
}));
|
|
484
|
-
function
|
|
485
|
-
return
|
|
484
|
+
function Wt() {
|
|
485
|
+
return K(() => {
|
|
486
486
|
const n = async (e) => {
|
|
487
487
|
const t = e.state?.id;
|
|
488
|
-
(await
|
|
488
|
+
(await Q.addTask(
|
|
489
489
|
async (r) => {
|
|
490
|
-
const s = e.state?.index, a = e.state?.status, o = e.state?.params, c = e.state?.transitionName,
|
|
491
|
-
if (!
|
|
490
|
+
const s = e.state?.index, a = e.state?.status, o = e.state?.params, c = e.state?.transitionName, h = e.state?.layoutId, l = F.getState().setStatus, { index: m, addHistory: d, popHistory: u } = j.getState(), P = s < m, I = a === "PUSHING" && s > m, N = a === "REPLACING" && s > m, w = window.location.pathname;
|
|
491
|
+
if (!P && !I && !N) {
|
|
492
492
|
r.abort();
|
|
493
493
|
return;
|
|
494
494
|
}
|
|
495
|
-
return
|
|
495
|
+
return P ? l("POPPING") : I ? (l("PUSHING"), d({
|
|
496
496
|
id: t,
|
|
497
|
-
pathname:
|
|
497
|
+
pathname: w,
|
|
498
498
|
params: o,
|
|
499
499
|
transitionName: c,
|
|
500
|
-
layoutId:
|
|
501
|
-
})) :
|
|
500
|
+
layoutId: h
|
|
501
|
+
})) : N && (l("REPLACING"), d({
|
|
502
502
|
id: t,
|
|
503
|
-
pathname:
|
|
503
|
+
pathname: w,
|
|
504
504
|
params: o,
|
|
505
505
|
transitionName: c,
|
|
506
|
-
layoutId:
|
|
506
|
+
layoutId: h
|
|
507
507
|
})), async () => {
|
|
508
|
-
|
|
508
|
+
P && u(s + 1), l("COMPLETED");
|
|
509
509
|
};
|
|
510
510
|
},
|
|
511
511
|
{
|
|
@@ -521,9 +521,9 @@ function $t() {
|
|
|
521
521
|
};
|
|
522
522
|
}, []), null;
|
|
523
523
|
}
|
|
524
|
-
const
|
|
524
|
+
const xt = dt({}), Nt = dt(() => {
|
|
525
525
|
});
|
|
526
|
-
function
|
|
526
|
+
function Jt(n, e) {
|
|
527
527
|
switch (e.type) {
|
|
528
528
|
case "SET":
|
|
529
529
|
return e.params;
|
|
@@ -531,7 +531,7 @@ function Ut(n, e) {
|
|
|
531
531
|
return n;
|
|
532
532
|
}
|
|
533
533
|
}
|
|
534
|
-
const
|
|
534
|
+
const kt = dt({
|
|
535
535
|
id: "",
|
|
536
536
|
isActive: !1,
|
|
537
537
|
isRoot: !0,
|
|
@@ -543,32 +543,32 @@ const Pt = ot({
|
|
|
543
543
|
prevTransitionName: "none",
|
|
544
544
|
layoutId: null
|
|
545
545
|
});
|
|
546
|
-
function
|
|
547
|
-
return
|
|
546
|
+
function Z() {
|
|
547
|
+
return pt(kt);
|
|
548
548
|
}
|
|
549
|
-
function
|
|
550
|
-
const { isActive: e, params: t } =
|
|
551
|
-
return
|
|
549
|
+
function Zt({ children: n }) {
|
|
550
|
+
const { isActive: e, params: t } = Z(), [r, s] = Ht(Jt, t);
|
|
551
|
+
return K(() => {
|
|
552
552
|
const a = async (o) => {
|
|
553
|
-
o.state?.step && await
|
|
553
|
+
o.state?.step && await Q.addTask(async () => {
|
|
554
554
|
s({ type: "SET", params: o.state?.params || {} });
|
|
555
555
|
});
|
|
556
556
|
};
|
|
557
557
|
return e && window.addEventListener("popstate", a), () => {
|
|
558
558
|
window.removeEventListener("popstate", a);
|
|
559
559
|
};
|
|
560
|
-
}, [e, s]), /* @__PURE__ */
|
|
560
|
+
}, [e, s]), /* @__PURE__ */ D(Nt.Provider, { value: s, children: /* @__PURE__ */ D(xt.Provider, { value: r, children: n }) });
|
|
561
561
|
}
|
|
562
|
-
function
|
|
563
|
-
const e =
|
|
562
|
+
function te({ children: n }) {
|
|
563
|
+
const e = j((r) => r.index), t = j((r) => r.histories);
|
|
564
564
|
return t.map(
|
|
565
|
-
(r) =>
|
|
566
|
-
(s) =>
|
|
565
|
+
(r) => It.toArray(n).filter(
|
|
566
|
+
(s) => X.pathToRegexp(s.props.path).regexp.test(
|
|
567
567
|
r.pathname
|
|
568
568
|
)
|
|
569
569
|
)
|
|
570
|
-
).map(([r], s) => /* @__PURE__ */
|
|
571
|
-
|
|
570
|
+
).map(([r], s) => /* @__PURE__ */ D(
|
|
571
|
+
kt.Provider,
|
|
572
572
|
{
|
|
573
573
|
value: {
|
|
574
574
|
id: t[s].id,
|
|
@@ -582,12 +582,12 @@ function Ht({ children: n }) {
|
|
|
582
582
|
prevTransitionName: t[e - 1]?.transitionName,
|
|
583
583
|
layoutId: t[s].layoutId
|
|
584
584
|
},
|
|
585
|
-
children: /* @__PURE__ */
|
|
585
|
+
children: /* @__PURE__ */ D(Zt, { children: r })
|
|
586
586
|
},
|
|
587
587
|
t[s].id
|
|
588
588
|
));
|
|
589
589
|
}
|
|
590
|
-
function
|
|
590
|
+
function ee({
|
|
591
591
|
name: n,
|
|
592
592
|
initial: e,
|
|
593
593
|
enter: t,
|
|
@@ -612,7 +612,7 @@ function Ft({
|
|
|
612
612
|
...s
|
|
613
613
|
};
|
|
614
614
|
}
|
|
615
|
-
const
|
|
615
|
+
const ne = ee({
|
|
616
616
|
name: "overlay",
|
|
617
617
|
initial: {
|
|
618
618
|
opacity: 0,
|
|
@@ -665,11 +665,11 @@ const Qt = Ft({
|
|
|
665
665
|
}
|
|
666
666
|
)
|
|
667
667
|
}
|
|
668
|
-
}),
|
|
668
|
+
}), ht = /* @__PURE__ */ new Map([["overlay", ne]]), ut = st((n) => ({
|
|
669
669
|
defaultTransitionName: "cupertino",
|
|
670
670
|
setDefaultTransitionName: (e) => n({ defaultTransitionName: e })
|
|
671
671
|
}));
|
|
672
|
-
function
|
|
672
|
+
function rt({
|
|
673
673
|
name: n,
|
|
674
674
|
initial: e,
|
|
675
675
|
idle: t,
|
|
@@ -697,7 +697,7 @@ function et({
|
|
|
697
697
|
...c
|
|
698
698
|
};
|
|
699
699
|
}
|
|
700
|
-
const
|
|
700
|
+
const se = rt({
|
|
701
701
|
name: "cupertino",
|
|
702
702
|
initial: {
|
|
703
703
|
x: "100%"
|
|
@@ -751,8 +751,8 @@ const jt = et({
|
|
|
751
751
|
swipeDirection: "x",
|
|
752
752
|
onSwipeStart: async () => !0,
|
|
753
753
|
onSwipe: (n, e, { animate: t, currentScreen: r, prevScreen: s, onProgress: a }) => {
|
|
754
|
-
const { offset: o } = e, c = o.x,
|
|
755
|
-
return a?.(!0,
|
|
754
|
+
const { offset: o } = e, c = o.x, h = ft(c, [0, window.innerWidth], [0, 100]);
|
|
755
|
+
return a?.(!0, h), t(
|
|
756
756
|
r,
|
|
757
757
|
{
|
|
758
758
|
x: Math.max(0, c)
|
|
@@ -763,12 +763,12 @@ const jt = et({
|
|
|
763
763
|
), t(
|
|
764
764
|
s,
|
|
765
765
|
{
|
|
766
|
-
x: -100 +
|
|
766
|
+
x: -100 + h
|
|
767
767
|
},
|
|
768
768
|
{
|
|
769
769
|
duration: 0
|
|
770
770
|
}
|
|
771
|
-
),
|
|
771
|
+
), h;
|
|
772
772
|
},
|
|
773
773
|
onSwipeEnd: async (n, e, { animate: t, currentScreen: r, prevScreen: s, onStart: a }) => {
|
|
774
774
|
const { offset: o, velocity: c } = e, l = o.x > 50 || c.x > 20;
|
|
@@ -796,7 +796,7 @@ const jt = et({
|
|
|
796
796
|
]), l;
|
|
797
797
|
}
|
|
798
798
|
}
|
|
799
|
-
}),
|
|
799
|
+
}), re = rt({
|
|
800
800
|
name: "layout",
|
|
801
801
|
initial: {
|
|
802
802
|
opacity: 0.97
|
|
@@ -846,17 +846,17 @@ const jt = et({
|
|
|
846
846
|
swipeDirection: "y",
|
|
847
847
|
onSwipeStart: async () => !0,
|
|
848
848
|
onSwipe: (n, e, { animate: t, currentScreen: r, onProgress: s }) => {
|
|
849
|
-
const { offset: a } = e, o = a.y, c = Math.max(0, Math.min(56, o)),
|
|
849
|
+
const { offset: a } = e, o = a.y, c = Math.max(0, Math.min(56, o)), h = ft(c, [0, 56], [1, 0.96]), l = Math.max(0, o - 56), m = Math.min(1, l / 160), d = Math.sqrt(m) * 12, u = Math.max(0, c + d), P = Math.min(56, u);
|
|
850
850
|
return s?.(!0, 100), t(
|
|
851
851
|
r,
|
|
852
852
|
{
|
|
853
853
|
y: u,
|
|
854
|
-
opacity:
|
|
854
|
+
opacity: h
|
|
855
855
|
},
|
|
856
856
|
{
|
|
857
857
|
duration: 0
|
|
858
858
|
}
|
|
859
|
-
),
|
|
859
|
+
), P;
|
|
860
860
|
},
|
|
861
861
|
onSwipeEnd: async (n, e, { animate: t, currentScreen: r, prevScreen: s, onStart: a }) => {
|
|
862
862
|
const { offset: o, velocity: c } = e, l = o.y > 56 || c.y > 20;
|
|
@@ -884,7 +884,7 @@ const jt = et({
|
|
|
884
884
|
]), l;
|
|
885
885
|
}
|
|
886
886
|
}
|
|
887
|
-
}),
|
|
887
|
+
}), ae = rt({
|
|
888
888
|
name: "material",
|
|
889
889
|
initial: {
|
|
890
890
|
y: "100%",
|
|
@@ -943,11 +943,11 @@ const jt = et({
|
|
|
943
943
|
swipeDirection: "y",
|
|
944
944
|
onSwipeStart: async () => !0,
|
|
945
945
|
onSwipe: (n, e, { animate: t, currentScreen: r, prevScreen: s, onProgress: a }) => {
|
|
946
|
-
const { offset: o } = e, c = o.y,
|
|
947
|
-
return a?.(!0,
|
|
946
|
+
const { offset: o } = e, c = o.y, h = Math.max(0, Math.min(56, c)), l = ft(h, [0, 56], [1, 0.96]), m = Math.max(0, c - 56), d = Math.min(1, m / 160), u = Math.sqrt(d) * 12, P = Math.max(0, h + u), I = Math.min(56, P);
|
|
947
|
+
return a?.(!0, I), t(
|
|
948
948
|
r,
|
|
949
949
|
{
|
|
950
|
-
y:
|
|
950
|
+
y: P,
|
|
951
951
|
opacity: l
|
|
952
952
|
},
|
|
953
953
|
{
|
|
@@ -956,11 +956,11 @@ const jt = et({
|
|
|
956
956
|
), t(
|
|
957
957
|
s,
|
|
958
958
|
{
|
|
959
|
-
y: -56 +
|
|
960
|
-
opacity:
|
|
959
|
+
y: -56 + I,
|
|
960
|
+
opacity: I / 56
|
|
961
961
|
},
|
|
962
962
|
{ duration: 0 }
|
|
963
|
-
),
|
|
963
|
+
), I;
|
|
964
964
|
},
|
|
965
965
|
onSwipeEnd: async (n, e, { animate: t, currentScreen: r, prevScreen: s, onStart: a }) => {
|
|
966
966
|
const { offset: o, velocity: c } = e, l = o.y > 56 || c.y > 20;
|
|
@@ -990,7 +990,7 @@ const jt = et({
|
|
|
990
990
|
]), l;
|
|
991
991
|
}
|
|
992
992
|
}
|
|
993
|
-
}),
|
|
993
|
+
}), oe = rt({
|
|
994
994
|
name: "none",
|
|
995
995
|
initial: {},
|
|
996
996
|
idle: {
|
|
@@ -1023,38 +1023,38 @@ const jt = et({
|
|
|
1023
1023
|
duration: 0
|
|
1024
1024
|
}
|
|
1025
1025
|
}
|
|
1026
|
-
}),
|
|
1027
|
-
["none",
|
|
1028
|
-
["cupertino",
|
|
1029
|
-
["material",
|
|
1030
|
-
["layout",
|
|
1031
|
-
]),
|
|
1026
|
+
}), et = /* @__PURE__ */ new Map([
|
|
1027
|
+
["none", oe],
|
|
1028
|
+
["cupertino", se],
|
|
1029
|
+
["material", ae],
|
|
1030
|
+
["layout", re]
|
|
1031
|
+
]), ie = (() => {
|
|
1032
1032
|
const n = /* @__PURE__ */ Object.create(null), e = Object.prototype.hasOwnProperty;
|
|
1033
|
-
for (const t of
|
|
1033
|
+
for (const t of et.values()) {
|
|
1034
1034
|
const r = t.variants["IDLE-true"].value;
|
|
1035
1035
|
for (const s in r)
|
|
1036
1036
|
e.call(r, s) && (n[s] = r[s]);
|
|
1037
1037
|
}
|
|
1038
1038
|
return n;
|
|
1039
1039
|
})();
|
|
1040
|
-
function
|
|
1040
|
+
function ye({
|
|
1041
1041
|
children: n,
|
|
1042
1042
|
initPath: e = "/",
|
|
1043
1043
|
defaultTransitionName: t = "cupertino",
|
|
1044
1044
|
transitions: r = [],
|
|
1045
1045
|
decorators: s = []
|
|
1046
1046
|
}) {
|
|
1047
|
-
const a =
|
|
1048
|
-
return
|
|
1047
|
+
const a = St() ? e || "/" : window.location.pathname, o = St() ? a.split("?")[1] || "" : window.location.search;
|
|
1048
|
+
return ut.setState({
|
|
1049
1049
|
defaultTransitionName: t
|
|
1050
|
-
}),
|
|
1050
|
+
}), j.setState({
|
|
1051
1051
|
index: 0,
|
|
1052
1052
|
histories: [
|
|
1053
1053
|
{
|
|
1054
1054
|
id: "root",
|
|
1055
1055
|
pathname: a,
|
|
1056
|
-
params:
|
|
1057
|
-
|
|
1056
|
+
params: Bt(
|
|
1057
|
+
It.toArray(n).map((c) => c.props.path).flat(),
|
|
1058
1058
|
a,
|
|
1059
1059
|
o
|
|
1060
1060
|
),
|
|
@@ -1062,7 +1062,7 @@ function ee({
|
|
|
1062
1062
|
layoutId: null
|
|
1063
1063
|
}
|
|
1064
1064
|
]
|
|
1065
|
-
}),
|
|
1065
|
+
}), K(() => {
|
|
1066
1066
|
window.history.state?.index || window.history.replaceState(
|
|
1067
1067
|
{
|
|
1068
1068
|
id: "root",
|
|
@@ -1075,11 +1075,11 @@ function ee({
|
|
|
1075
1075
|
"",
|
|
1076
1076
|
window.location.pathname
|
|
1077
1077
|
);
|
|
1078
|
-
}, [t]),
|
|
1079
|
-
r.forEach((c) =>
|
|
1080
|
-
}, [r]),
|
|
1081
|
-
s.forEach((c) =>
|
|
1082
|
-
}, [s]), /* @__PURE__ */
|
|
1078
|
+
}, [t]), K(() => {
|
|
1079
|
+
r.forEach((c) => et.set(c.name, c));
|
|
1080
|
+
}, [r]), K(() => {
|
|
1081
|
+
s.forEach((c) => ht.set(c.name, c));
|
|
1082
|
+
}, [s]), /* @__PURE__ */ ct(
|
|
1083
1083
|
"div",
|
|
1084
1084
|
{
|
|
1085
1085
|
style: {
|
|
@@ -1090,51 +1090,51 @@ function ee({
|
|
|
1090
1090
|
height: "100%"
|
|
1091
1091
|
},
|
|
1092
1092
|
children: [
|
|
1093
|
-
/* @__PURE__ */
|
|
1094
|
-
/* @__PURE__ */
|
|
1093
|
+
/* @__PURE__ */ D(Wt, {}),
|
|
1094
|
+
/* @__PURE__ */ D(te, { children: n })
|
|
1095
1095
|
]
|
|
1096
1096
|
}
|
|
1097
1097
|
);
|
|
1098
1098
|
}
|
|
1099
|
-
function
|
|
1099
|
+
function ge({ element: n }) {
|
|
1100
1100
|
return n;
|
|
1101
1101
|
}
|
|
1102
|
-
function
|
|
1102
|
+
function me() {
|
|
1103
1103
|
return {
|
|
1104
1104
|
push: async (r, s, a = {}) => {
|
|
1105
|
-
const { status: o, setStatus: c } =
|
|
1105
|
+
const { status: o, setStatus: c } = F.getState();
|
|
1106
1106
|
if (o !== "COMPLETED" && o !== "IDLE")
|
|
1107
1107
|
return;
|
|
1108
|
-
const { index:
|
|
1109
|
-
(await
|
|
1108
|
+
const { index: h, addHistory: l } = j.getState(), m = ut.getState().defaultTransitionName, { transitionName: d = m, layoutId: u = null } = a, P = Q.generateTaskId();
|
|
1109
|
+
(await Q.addTask(
|
|
1110
1110
|
async () => {
|
|
1111
1111
|
c("PUSHING");
|
|
1112
|
-
const
|
|
1113
|
-
Object.entries(s).filter(([
|
|
1114
|
-
),
|
|
1112
|
+
const I = X.compile(r)(s), N = X.parse(r).tokens.filter((b) => b.type === "param").map((b) => b.name), w = Object.fromEntries(
|
|
1113
|
+
Object.entries(s).filter(([b]) => !N.includes(b))
|
|
1114
|
+
), k = new URLSearchParams(w).toString(), U = `${I}${k ? `?${k}` : ""}`;
|
|
1115
1115
|
return window.history.pushState(
|
|
1116
1116
|
{
|
|
1117
|
-
id:
|
|
1118
|
-
index:
|
|
1117
|
+
id: P,
|
|
1118
|
+
index: h + 1,
|
|
1119
1119
|
status: "PUSHING",
|
|
1120
1120
|
params: s,
|
|
1121
|
-
transitionName:
|
|
1121
|
+
transitionName: d,
|
|
1122
1122
|
layoutId: u
|
|
1123
1123
|
},
|
|
1124
1124
|
"",
|
|
1125
|
-
|
|
1125
|
+
U
|
|
1126
1126
|
), l({
|
|
1127
|
-
id:
|
|
1128
|
-
pathname:
|
|
1127
|
+
id: P,
|
|
1128
|
+
pathname: I,
|
|
1129
1129
|
params: s,
|
|
1130
|
-
transitionName:
|
|
1130
|
+
transitionName: d,
|
|
1131
1131
|
layoutId: u
|
|
1132
1132
|
}), () => {
|
|
1133
1133
|
c("COMPLETED");
|
|
1134
1134
|
};
|
|
1135
1135
|
},
|
|
1136
1136
|
{
|
|
1137
|
-
id:
|
|
1137
|
+
id: P,
|
|
1138
1138
|
control: {
|
|
1139
1139
|
manual: !0
|
|
1140
1140
|
}
|
|
@@ -1142,39 +1142,39 @@ function se() {
|
|
|
1142
1142
|
)).result?.();
|
|
1143
1143
|
},
|
|
1144
1144
|
replace: async (r, s, a = {}) => {
|
|
1145
|
-
const { status: o, setStatus: c } =
|
|
1145
|
+
const { status: o, setStatus: c } = F.getState();
|
|
1146
1146
|
if (o !== "COMPLETED" && o !== "IDLE")
|
|
1147
1147
|
return;
|
|
1148
|
-
const { index:
|
|
1149
|
-
(await
|
|
1148
|
+
const { index: h, addHistory: l } = j.getState(), m = j.getState().replaceHistory, d = ut.getState().defaultTransitionName, { transitionName: u = d, layoutId: P = null } = a, I = Q.generateTaskId();
|
|
1149
|
+
(await Q.addTask(
|
|
1150
1150
|
async () => {
|
|
1151
1151
|
c("REPLACING");
|
|
1152
|
-
const
|
|
1153
|
-
Object.entries(s).filter(([
|
|
1154
|
-
),
|
|
1152
|
+
const N = X.compile(r)(s), w = X.parse(r).tokens.filter(($) => $.type === "param").map(($) => $.name), k = Object.fromEntries(
|
|
1153
|
+
Object.entries(s).filter(([$]) => !w.includes($))
|
|
1154
|
+
), U = new URLSearchParams(k).toString(), b = `${N}${U ? `?${U}` : ""}`;
|
|
1155
1155
|
return window.history.replaceState(
|
|
1156
1156
|
{
|
|
1157
|
-
id:
|
|
1158
|
-
index:
|
|
1157
|
+
id: I,
|
|
1158
|
+
index: h,
|
|
1159
1159
|
status: "REPLACING",
|
|
1160
1160
|
params: s,
|
|
1161
1161
|
transitionName: u,
|
|
1162
|
-
layoutId:
|
|
1162
|
+
layoutId: P
|
|
1163
1163
|
},
|
|
1164
1164
|
"",
|
|
1165
|
-
|
|
1165
|
+
b
|
|
1166
1166
|
), l({
|
|
1167
|
-
id:
|
|
1168
|
-
pathname:
|
|
1167
|
+
id: I,
|
|
1168
|
+
pathname: N,
|
|
1169
1169
|
params: s,
|
|
1170
1170
|
transitionName: u,
|
|
1171
|
-
layoutId:
|
|
1171
|
+
layoutId: P
|
|
1172
1172
|
}), async () => {
|
|
1173
|
-
|
|
1173
|
+
m(h), c("COMPLETED");
|
|
1174
1174
|
};
|
|
1175
1175
|
},
|
|
1176
1176
|
{
|
|
1177
|
-
id:
|
|
1177
|
+
id: I,
|
|
1178
1178
|
control: {
|
|
1179
1179
|
manual: !0
|
|
1180
1180
|
}
|
|
@@ -1182,17 +1182,17 @@ function se() {
|
|
|
1182
1182
|
)).result?.();
|
|
1183
1183
|
},
|
|
1184
1184
|
pop: () => {
|
|
1185
|
-
const r =
|
|
1185
|
+
const r = F.getState().status;
|
|
1186
1186
|
r !== "COMPLETED" && r !== "IDLE" || window.history.back();
|
|
1187
1187
|
}
|
|
1188
1188
|
};
|
|
1189
1189
|
}
|
|
1190
|
-
function
|
|
1191
|
-
const n =
|
|
1190
|
+
function Ee() {
|
|
1191
|
+
const n = pt(Nt);
|
|
1192
1192
|
return {
|
|
1193
1193
|
pushStep: async (s) => {
|
|
1194
|
-
const a =
|
|
1195
|
-
a !== "COMPLETED" && a !== "IDLE" || (await
|
|
1194
|
+
const a = F.getState().status;
|
|
1195
|
+
a !== "COMPLETED" && a !== "IDLE" || (await Q.addTask(async () => {
|
|
1196
1196
|
const o = new URLSearchParams(s).toString(), c = `${window.location.pathname}${o ? `?${o}` : ""}`;
|
|
1197
1197
|
return window.history.state?.step || window.history.replaceState(
|
|
1198
1198
|
{
|
|
@@ -1213,8 +1213,8 @@ function re() {
|
|
|
1213
1213
|
})).result?.();
|
|
1214
1214
|
},
|
|
1215
1215
|
replaceStep: async (s) => {
|
|
1216
|
-
const a =
|
|
1217
|
-
a !== "COMPLETED" && a !== "IDLE" || (await
|
|
1216
|
+
const a = F.getState().status;
|
|
1217
|
+
a !== "COMPLETED" && a !== "IDLE" || (await Q.addTask(async () => {
|
|
1218
1218
|
const o = new URLSearchParams(s).toString(), c = `${window.location.pathname}${o ? `?${o}` : ""}`;
|
|
1219
1219
|
return window.history.replaceState(
|
|
1220
1220
|
{
|
|
@@ -1228,15 +1228,15 @@ function re() {
|
|
|
1228
1228
|
})).result?.();
|
|
1229
1229
|
},
|
|
1230
1230
|
popStep: () => {
|
|
1231
|
-
const s =
|
|
1231
|
+
const s = F.getState().status;
|
|
1232
1232
|
s !== "COMPLETED" && s !== "IDLE" || window.history.back();
|
|
1233
1233
|
}
|
|
1234
1234
|
};
|
|
1235
1235
|
}
|
|
1236
|
-
function
|
|
1237
|
-
return
|
|
1236
|
+
function we() {
|
|
1237
|
+
return pt(xt);
|
|
1238
1238
|
}
|
|
1239
|
-
function
|
|
1239
|
+
function Se({
|
|
1240
1240
|
name: n,
|
|
1241
1241
|
initial: e,
|
|
1242
1242
|
idle: t,
|
|
@@ -1245,10 +1245,10 @@ function oe({
|
|
|
1245
1245
|
replaceOnEnter: a,
|
|
1246
1246
|
replaceOnExit: o,
|
|
1247
1247
|
popOnEnter: c,
|
|
1248
|
-
popOnExit:
|
|
1248
|
+
popOnExit: h,
|
|
1249
1249
|
completedOnExit: l,
|
|
1250
|
-
completedOnEnter:
|
|
1251
|
-
options:
|
|
1250
|
+
completedOnEnter: m,
|
|
1251
|
+
options: d
|
|
1252
1252
|
}) {
|
|
1253
1253
|
return {
|
|
1254
1254
|
name: n,
|
|
@@ -1260,15 +1260,15 @@ function oe({
|
|
|
1260
1260
|
"PUSHING-true": r,
|
|
1261
1261
|
"REPLACING-false": o,
|
|
1262
1262
|
"REPLACING-true": a,
|
|
1263
|
-
"POPPING-false":
|
|
1263
|
+
"POPPING-false": h,
|
|
1264
1264
|
"POPPING-true": c,
|
|
1265
1265
|
"COMPLETED-false": l,
|
|
1266
|
-
"COMPLETED-true":
|
|
1266
|
+
"COMPLETED-true": m
|
|
1267
1267
|
},
|
|
1268
|
-
...
|
|
1268
|
+
...d
|
|
1269
1269
|
};
|
|
1270
1270
|
}
|
|
1271
|
-
function
|
|
1271
|
+
function Pe({
|
|
1272
1272
|
name: n,
|
|
1273
1273
|
initial: e,
|
|
1274
1274
|
idle: t,
|
|
@@ -1277,10 +1277,10 @@ function ie({
|
|
|
1277
1277
|
replaceOnEnter: a,
|
|
1278
1278
|
replaceOnExit: o,
|
|
1279
1279
|
popOnEnter: c,
|
|
1280
|
-
popOnExit:
|
|
1280
|
+
popOnExit: h,
|
|
1281
1281
|
completedOnEnter: l,
|
|
1282
|
-
completedOnExit:
|
|
1283
|
-
options:
|
|
1282
|
+
completedOnExit: m,
|
|
1283
|
+
options: d
|
|
1284
1284
|
}) {
|
|
1285
1285
|
return {
|
|
1286
1286
|
name: n,
|
|
@@ -1292,47 +1292,47 @@ function ie({
|
|
|
1292
1292
|
"PUSHING-true": r,
|
|
1293
1293
|
"REPLACING-false": o,
|
|
1294
1294
|
"REPLACING-true": a,
|
|
1295
|
-
"POPPING-false":
|
|
1295
|
+
"POPPING-false": h,
|
|
1296
1296
|
"POPPING-true": c,
|
|
1297
|
-
"COMPLETED-false":
|
|
1297
|
+
"COMPLETED-false": m,
|
|
1298
1298
|
"COMPLETED-true": l
|
|
1299
1299
|
},
|
|
1300
|
-
...
|
|
1300
|
+
...d
|
|
1301
1301
|
};
|
|
1302
1302
|
}
|
|
1303
|
-
const
|
|
1303
|
+
const ce = { then() {
|
|
1304
1304
|
} };
|
|
1305
|
-
function
|
|
1305
|
+
function ue({
|
|
1306
1306
|
freeze: n,
|
|
1307
1307
|
children: e
|
|
1308
1308
|
}) {
|
|
1309
1309
|
if (n)
|
|
1310
|
-
throw
|
|
1310
|
+
throw ce;
|
|
1311
1311
|
return e;
|
|
1312
1312
|
}
|
|
1313
|
-
function
|
|
1314
|
-
return /* @__PURE__ */
|
|
1313
|
+
function Mt({ freeze: n, children: e, placeholder: t }) {
|
|
1314
|
+
return /* @__PURE__ */ D(_t, { fallback: t, children: /* @__PURE__ */ D(ue, { freeze: n, children: e }) });
|
|
1315
1315
|
}
|
|
1316
|
-
function
|
|
1316
|
+
function vt(n, e) {
|
|
1317
1317
|
const {
|
|
1318
1318
|
direction: t = "x",
|
|
1319
1319
|
markerSelector: r = "[data-swipe-at-edge]",
|
|
1320
1320
|
depthLimit: s = 24,
|
|
1321
1321
|
verifyByScroll: a = !1
|
|
1322
|
-
} = e ?? {}, o =
|
|
1322
|
+
} = e ?? {}, o = le(n);
|
|
1323
1323
|
if (!o) return { element: null, hasMarker: !1 };
|
|
1324
1324
|
const c = o.closest?.(r);
|
|
1325
|
-
if (c instanceof HTMLElement &&
|
|
1325
|
+
if (c instanceof HTMLElement && lt(c, t) && (!a || Dt(c, t)))
|
|
1326
1326
|
return { element: c, hasMarker: !0 };
|
|
1327
|
-
let
|
|
1328
|
-
for (;
|
|
1329
|
-
if (
|
|
1330
|
-
return { element:
|
|
1331
|
-
|
|
1327
|
+
let h = o, l = 0;
|
|
1328
|
+
for (; h && h !== document.body && l < s; ) {
|
|
1329
|
+
if (lt(h, t) && (!a || Dt(h, t)))
|
|
1330
|
+
return { element: h, hasMarker: !1 };
|
|
1331
|
+
h = h.parentElement, l++;
|
|
1332
1332
|
}
|
|
1333
1333
|
return { element: null, hasMarker: !1 };
|
|
1334
1334
|
}
|
|
1335
|
-
function
|
|
1335
|
+
function le(n) {
|
|
1336
1336
|
if (!n) return null;
|
|
1337
1337
|
const e = n, t = typeof e.composedPath == "function" ? e.composedPath() : void 0;
|
|
1338
1338
|
if (t && t.length) {
|
|
@@ -1341,11 +1341,11 @@ function zt(n) {
|
|
|
1341
1341
|
}
|
|
1342
1342
|
return n;
|
|
1343
1343
|
}
|
|
1344
|
-
function
|
|
1344
|
+
function lt(n, e) {
|
|
1345
1345
|
return e === "y" ? n.scrollHeight - n.clientHeight > 1 : n.scrollWidth - n.clientWidth > 1;
|
|
1346
1346
|
}
|
|
1347
|
-
function
|
|
1348
|
-
if (!
|
|
1347
|
+
function Dt(n, e) {
|
|
1348
|
+
if (!lt(n, e)) return !1;
|
|
1349
1349
|
if (e === "y") {
|
|
1350
1350
|
const t = n.scrollTop;
|
|
1351
1351
|
if (n.scrollTop = t + 1, n.scrollTop !== t)
|
|
@@ -1362,19 +1362,19 @@ function yt(n, e) {
|
|
|
1362
1362
|
return n.scrollLeft = t, s;
|
|
1363
1363
|
}
|
|
1364
1364
|
}
|
|
1365
|
-
function
|
|
1366
|
-
const { isActive: r, transitionName: s } =
|
|
1367
|
-
|
|
1368
|
-
const c =
|
|
1369
|
-
return
|
|
1365
|
+
function de({ children: n, ref: e, ...t }) {
|
|
1366
|
+
const { isActive: r, transitionName: s } = Z(), [a, o] = Lt();
|
|
1367
|
+
Ft(e, () => a.current);
|
|
1368
|
+
const c = F((u) => u.status), h = et.get(s), { decoratorName: l } = h, { initial: m, variants: d } = ht.get(l);
|
|
1369
|
+
return K(() => {
|
|
1370
1370
|
if (!a.current) return;
|
|
1371
|
-
const { value: u, options:
|
|
1372
|
-
o(a.current, u,
|
|
1373
|
-
}, [c, r, o,
|
|
1371
|
+
const { value: u, options: P } = d[`${c}-${r}`];
|
|
1372
|
+
o(a.current, u, P);
|
|
1373
|
+
}, [c, r, o, d, a]), /* @__PURE__ */ D(
|
|
1374
1374
|
z.div,
|
|
1375
1375
|
{
|
|
1376
1376
|
ref: a,
|
|
1377
|
-
initial:
|
|
1377
|
+
initial: m,
|
|
1378
1378
|
style: {
|
|
1379
1379
|
position: "absolute",
|
|
1380
1380
|
top: 0,
|
|
@@ -1388,112 +1388,127 @@ function Wt({ children: n, ref: e, ...t }) {
|
|
|
1388
1388
|
}
|
|
1389
1389
|
);
|
|
1390
1390
|
}
|
|
1391
|
-
const
|
|
1391
|
+
const W = st((n) => ({
|
|
1392
1392
|
dragStatus: "IDLE",
|
|
1393
1393
|
replaceTransitionStatus: "IDLE",
|
|
1394
1394
|
setDragStatus: (e) => n({ dragStatus: e }),
|
|
1395
1395
|
setReplaceTransitionStatus: (e) => n({ replaceTransitionStatus: e })
|
|
1396
1396
|
}));
|
|
1397
|
-
function
|
|
1398
|
-
|
|
1397
|
+
function Ct({
|
|
1398
|
+
children: n,
|
|
1399
|
+
statusBarHeight: e,
|
|
1400
|
+
statusBarColor: t = "transparent",
|
|
1401
|
+
systemNavigationBarHeight: r,
|
|
1402
|
+
systemNavigationBarColor: s = "transparent",
|
|
1403
|
+
appBar: a,
|
|
1404
|
+
navigationBar: o,
|
|
1405
|
+
hideStatusBar: c,
|
|
1406
|
+
hideSystemNavigationBar: h,
|
|
1407
|
+
...l
|
|
1408
|
+
}) {
|
|
1409
|
+
const [m, d] = Lt(), { id: u, isActive: P, isRoot: I, transitionName: N, prevTransitionName: w } = Z(), k = Qt(), U = F((v) => v.status), b = W((v) => v.dragStatus), $ = W.getState().setDragStatus, tt = W.getState().setReplaceTransitionStatus, J = et.get(N), { variants: i, initial: y, swipeDirection: g, decoratorName: E } = J, p = ht.get(E), [f, L] = mt(0), [T, R] = mt(0), S = H(null), M = H(null), x = H(null), C = H(null), A = H(!1), V = H(!1), q = H({
|
|
1399
1410
|
element: null,
|
|
1400
1411
|
hasMarker: !1
|
|
1401
|
-
}),
|
|
1402
|
-
if (!
|
|
1412
|
+
}), Y = H({ element: null, hasMarker: !1 }), yt = H(0), gt = H(0), at = H(null), ot = H(null), At = async (v, O) => {
|
|
1413
|
+
if (!g)
|
|
1403
1414
|
return;
|
|
1404
|
-
const
|
|
1405
|
-
|
|
1406
|
-
const B = await
|
|
1407
|
-
animate:
|
|
1408
|
-
currentScreen:
|
|
1409
|
-
prevScreen:
|
|
1410
|
-
dragControls:
|
|
1411
|
-
onStart: (
|
|
1412
|
-
animate:
|
|
1413
|
-
currentDecorator:
|
|
1414
|
-
prevDecorator:
|
|
1415
|
+
const G = S.current?.previousSibling;
|
|
1416
|
+
M.current = G?.querySelector("[data-screen]"), C.current = G?.querySelector("[data-decorator]");
|
|
1417
|
+
const B = await J?.onSwipeStart(v, O, {
|
|
1418
|
+
animate: d,
|
|
1419
|
+
currentScreen: m.current,
|
|
1420
|
+
prevScreen: M.current,
|
|
1421
|
+
dragControls: k,
|
|
1422
|
+
onStart: (it) => p?.onSwipeStart?.(it, {
|
|
1423
|
+
animate: d,
|
|
1424
|
+
currentDecorator: x.current,
|
|
1425
|
+
prevDecorator: C.current
|
|
1415
1426
|
})
|
|
1416
1427
|
});
|
|
1417
|
-
|
|
1418
|
-
},
|
|
1419
|
-
!
|
|
1420
|
-
animate:
|
|
1421
|
-
currentScreen:
|
|
1422
|
-
prevScreen:
|
|
1423
|
-
dragControls:
|
|
1424
|
-
onProgress: (
|
|
1425
|
-
animate:
|
|
1426
|
-
currentDecorator:
|
|
1427
|
-
prevDecorator:
|
|
1428
|
+
$(B ? "PENDING" : "IDLE");
|
|
1429
|
+
}, Rt = (v, O) => {
|
|
1430
|
+
!g || b !== "PENDING" || J?.onSwipe(v, O, {
|
|
1431
|
+
animate: d,
|
|
1432
|
+
currentScreen: m.current,
|
|
1433
|
+
prevScreen: M.current,
|
|
1434
|
+
dragControls: k,
|
|
1435
|
+
onProgress: (G, B) => p?.onSwipe?.(G, B, {
|
|
1436
|
+
animate: d,
|
|
1437
|
+
currentDecorator: x.current,
|
|
1438
|
+
prevDecorator: C.current
|
|
1428
1439
|
})
|
|
1429
1440
|
});
|
|
1430
|
-
},
|
|
1431
|
-
if (!
|
|
1441
|
+
}, bt = async (v, O) => {
|
|
1442
|
+
if (!g || b !== "PENDING")
|
|
1432
1443
|
return;
|
|
1433
|
-
await
|
|
1434
|
-
animate:
|
|
1435
|
-
currentScreen:
|
|
1436
|
-
prevScreen:
|
|
1437
|
-
onStart: (B) =>
|
|
1438
|
-
animate:
|
|
1439
|
-
currentDecorator:
|
|
1440
|
-
prevDecorator:
|
|
1444
|
+
await J?.onSwipeEnd(v, O, {
|
|
1445
|
+
animate: d,
|
|
1446
|
+
currentScreen: m.current,
|
|
1447
|
+
prevScreen: M.current,
|
|
1448
|
+
onStart: (B) => p?.onSwipeEnd?.(B, {
|
|
1449
|
+
animate: d,
|
|
1450
|
+
currentDecorator: x.current,
|
|
1451
|
+
prevDecorator: C.current
|
|
1441
1452
|
})
|
|
1442
|
-
}) ? window.history.back() :
|
|
1443
|
-
},
|
|
1444
|
-
if (!(!
|
|
1453
|
+
}) ? window.history.back() : $("IDLE");
|
|
1454
|
+
}, Ot = (v) => {
|
|
1455
|
+
if (!(!I && P && U === "COMPLETED" && b === "IDLE" && !!g))
|
|
1445
1456
|
return;
|
|
1446
|
-
|
|
1457
|
+
q.current = vt(v.target, {
|
|
1447
1458
|
direction: "x",
|
|
1448
1459
|
verifyByScroll: !0
|
|
1449
|
-
}),
|
|
1460
|
+
}), Y.current = vt(v.target, {
|
|
1450
1461
|
direction: "y",
|
|
1451
1462
|
verifyByScroll: !0
|
|
1452
|
-
}),
|
|
1453
|
-
},
|
|
1454
|
-
const
|
|
1455
|
-
if (
|
|
1456
|
-
|
|
1457
|
-
else if (
|
|
1458
|
-
const
|
|
1459
|
-
(
|
|
1463
|
+
}), yt.current = v.clientX, gt.current = v.clientY, (!q.current.element && !Y.current.element || q.current.element || Y.current.element) && (A.current = !0);
|
|
1464
|
+
}, Gt = (v) => {
|
|
1465
|
+
const O = !q.current.element && !Y.current.element;
|
|
1466
|
+
if (A.current && O)
|
|
1467
|
+
A.current = !1, V.current = !0, k.start(v);
|
|
1468
|
+
else if (A.current && !O) {
|
|
1469
|
+
const G = v.clientX - yt.current, B = v.clientY - gt.current, it = Y.current.element && Y.current.element.scrollTop <= 0 && Y.current.hasMarker, Ut = q.current.element && q.current.element.scrollLeft <= 0 && q.current.hasMarker;
|
|
1470
|
+
(g === "y" && (it || q.current.element) && B > 0 && Math.abs(G) < 4 || g === "x" && (Ut || Y.current.element) && G > 0 && Math.abs(B) < 4) && (A.current = !1, V.current = !0, k.start(v));
|
|
1460
1471
|
}
|
|
1461
|
-
},
|
|
1462
|
-
|
|
1472
|
+
}, $t = () => {
|
|
1473
|
+
A.current = !1, V.current = !1;
|
|
1463
1474
|
};
|
|
1464
|
-
return
|
|
1465
|
-
const
|
|
1466
|
-
if (!
|
|
1467
|
-
const
|
|
1468
|
-
|
|
1475
|
+
return K(() => {
|
|
1476
|
+
const v = m.current;
|
|
1477
|
+
if (!v) return;
|
|
1478
|
+
const O = (G) => {
|
|
1479
|
+
V.current && G.preventDefault(), G.target?.dataset.swipeAtEdgeBar === "true" && G.preventDefault();
|
|
1469
1480
|
};
|
|
1470
|
-
return
|
|
1481
|
+
return v.addEventListener("touchmove", O, {
|
|
1471
1482
|
passive: !1
|
|
1472
1483
|
}), () => {
|
|
1473
|
-
|
|
1484
|
+
v.removeEventListener("touchmove", O);
|
|
1474
1485
|
};
|
|
1475
|
-
}, [
|
|
1476
|
-
|
|
1477
|
-
const { value:
|
|
1478
|
-
!
|
|
1486
|
+
}, [m]), K(() => {
|
|
1487
|
+
m.current && (async () => {
|
|
1488
|
+
const { value: v, options: O } = i[`${U}-${P}`];
|
|
1489
|
+
!P && U === "REPLACING" && w !== N && (tt("PENDING"), await d(m.current, ie, {
|
|
1479
1490
|
duration: 0.1
|
|
1480
|
-
})),
|
|
1491
|
+
})), P && U === "COMPLETED" && ($("IDLE"), tt("IDLE")), await d(m.current, v, O), await Q.resolveTask(u);
|
|
1481
1492
|
})();
|
|
1482
1493
|
}, [
|
|
1494
|
+
U,
|
|
1495
|
+
P,
|
|
1483
1496
|
u,
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
L
|
|
1493
|
-
]),
|
|
1497
|
+
w,
|
|
1498
|
+
N,
|
|
1499
|
+
d,
|
|
1500
|
+
m,
|
|
1501
|
+
i,
|
|
1502
|
+
$,
|
|
1503
|
+
tt
|
|
1504
|
+
]), Et(() => {
|
|
1505
|
+
at.current && L(at.current.offsetHeight);
|
|
1506
|
+
}, [a]), Et(() => {
|
|
1507
|
+
ot.current && R(ot.current.offsetHeight);
|
|
1508
|
+
}, [o]), /* @__PURE__ */ ct(
|
|
1494
1509
|
z.div,
|
|
1495
1510
|
{
|
|
1496
|
-
ref:
|
|
1511
|
+
ref: S,
|
|
1497
1512
|
style: {
|
|
1498
1513
|
position: "absolute",
|
|
1499
1514
|
top: 0,
|
|
@@ -1501,10 +1516,14 @@ function vt({ children: n, appBar: e, navigationBar: t, ...r }) {
|
|
|
1501
1516
|
width: "100%",
|
|
1502
1517
|
height: "100%",
|
|
1503
1518
|
display: "flex",
|
|
1504
|
-
flexDirection: "column"
|
|
1519
|
+
flexDirection: "column",
|
|
1520
|
+
boxSizing: "border-box",
|
|
1521
|
+
isolation: "isolate",
|
|
1522
|
+
contain: "strict",
|
|
1523
|
+
overscrollBehavior: "contain"
|
|
1505
1524
|
},
|
|
1506
1525
|
children: [
|
|
1507
|
-
/* @__PURE__ */
|
|
1526
|
+
/* @__PURE__ */ D(
|
|
1508
1527
|
"div",
|
|
1509
1528
|
{
|
|
1510
1529
|
"data-swipe-at-edge-bar": !0,
|
|
@@ -1518,40 +1537,105 @@ function vt({ children: n, appBar: e, navigationBar: t, ...r }) {
|
|
|
1518
1537
|
}
|
|
1519
1538
|
}
|
|
1520
1539
|
),
|
|
1521
|
-
|
|
1522
|
-
/* @__PURE__ */ N(
|
|
1540
|
+
a && /* @__PURE__ */ D(
|
|
1523
1541
|
z.div,
|
|
1524
1542
|
{
|
|
1525
|
-
ref:
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1543
|
+
ref: at,
|
|
1544
|
+
style: {
|
|
1545
|
+
position: "absolute",
|
|
1546
|
+
top: c ? 0 : e,
|
|
1547
|
+
left: 0,
|
|
1548
|
+
width: "100%"
|
|
1549
|
+
},
|
|
1550
|
+
children: a
|
|
1551
|
+
}
|
|
1552
|
+
),
|
|
1553
|
+
/* @__PURE__ */ ct(
|
|
1554
|
+
z.div,
|
|
1555
|
+
{
|
|
1556
|
+
ref: m,
|
|
1557
|
+
...l,
|
|
1558
|
+
initial: y,
|
|
1559
|
+
drag: g,
|
|
1529
1560
|
dragListener: !1,
|
|
1530
|
-
dragControls:
|
|
1531
|
-
onDragStart:
|
|
1532
|
-
onDrag:
|
|
1533
|
-
onDragEnd:
|
|
1534
|
-
onPointerDown:
|
|
1535
|
-
onPointerMove:
|
|
1536
|
-
onPointerUp:
|
|
1561
|
+
dragControls: k,
|
|
1562
|
+
onDragStart: At,
|
|
1563
|
+
onDrag: Rt,
|
|
1564
|
+
onDragEnd: bt,
|
|
1565
|
+
onPointerDown: Ot,
|
|
1566
|
+
onPointerMove: Gt,
|
|
1567
|
+
onPointerUp: $t,
|
|
1537
1568
|
"data-screen": !0,
|
|
1538
1569
|
style: {
|
|
1539
|
-
|
|
1570
|
+
display: "flex",
|
|
1571
|
+
flexDirection: "column",
|
|
1572
|
+
height: "100%",
|
|
1540
1573
|
backgroundColor: "white",
|
|
1541
|
-
boxSizing: "border-box",
|
|
1542
|
-
isolation: "isolate",
|
|
1543
|
-
contain: "strict",
|
|
1544
|
-
overscrollBehavior: "contain",
|
|
1545
|
-
overflowY: "auto",
|
|
1546
1574
|
touchAction: "none",
|
|
1547
|
-
...
|
|
1575
|
+
...l.style
|
|
1576
|
+
},
|
|
1577
|
+
children: [
|
|
1578
|
+
!c && e && /* @__PURE__ */ D(
|
|
1579
|
+
z.div,
|
|
1580
|
+
{
|
|
1581
|
+
animate: {
|
|
1582
|
+
backgroundColor: t
|
|
1583
|
+
},
|
|
1584
|
+
style: {
|
|
1585
|
+
width: "100%",
|
|
1586
|
+
minHeight: e
|
|
1587
|
+
}
|
|
1588
|
+
}
|
|
1589
|
+
),
|
|
1590
|
+
a && /* @__PURE__ */ D(
|
|
1591
|
+
"div",
|
|
1592
|
+
{
|
|
1593
|
+
style: {
|
|
1594
|
+
width: "100%",
|
|
1595
|
+
minHeight: f
|
|
1596
|
+
}
|
|
1597
|
+
}
|
|
1598
|
+
),
|
|
1599
|
+
/* @__PURE__ */ D("div", { style: { display: "flex", flexDirection: "column", flexGrow: 1, overflowY: "auto" }, children: n }),
|
|
1600
|
+
o && /* @__PURE__ */ D(
|
|
1601
|
+
"div",
|
|
1602
|
+
{
|
|
1603
|
+
style: {
|
|
1604
|
+
width: "100%",
|
|
1605
|
+
minHeight: T
|
|
1606
|
+
}
|
|
1607
|
+
}
|
|
1608
|
+
),
|
|
1609
|
+
!h && r && /* @__PURE__ */ D(
|
|
1610
|
+
z.div,
|
|
1611
|
+
{
|
|
1612
|
+
animate: {
|
|
1613
|
+
backgroundColor: s
|
|
1614
|
+
},
|
|
1615
|
+
style: {
|
|
1616
|
+
width: "100%",
|
|
1617
|
+
minHeight: r
|
|
1618
|
+
}
|
|
1619
|
+
}
|
|
1620
|
+
)
|
|
1621
|
+
]
|
|
1622
|
+
}
|
|
1623
|
+
),
|
|
1624
|
+
o && /* @__PURE__ */ D(
|
|
1625
|
+
z.div,
|
|
1626
|
+
{
|
|
1627
|
+
ref: ot,
|
|
1628
|
+
style: {
|
|
1629
|
+
position: "absolute",
|
|
1630
|
+
bottom: h ? 0 : r,
|
|
1631
|
+
left: 0,
|
|
1632
|
+
width: "100%"
|
|
1548
1633
|
},
|
|
1549
|
-
children:
|
|
1634
|
+
children: o
|
|
1550
1635
|
}
|
|
1551
1636
|
),
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
/* @__PURE__ */ N(
|
|
1637
|
+
p && /* @__PURE__ */ D(de, { ref: x }),
|
|
1638
|
+
/* @__PURE__ */ D(
|
|
1555
1639
|
"div",
|
|
1556
1640
|
{
|
|
1557
1641
|
"data-swipe-at-edge-bar": !0,
|
|
@@ -1569,28 +1653,28 @@ function vt({ children: n, appBar: e, navigationBar: t, ...r }) {
|
|
|
1569
1653
|
}
|
|
1570
1654
|
);
|
|
1571
1655
|
}
|
|
1572
|
-
function
|
|
1573
|
-
const { isActive: t, isPrev: r, zIndex: s } =
|
|
1574
|
-
return /* @__PURE__ */
|
|
1656
|
+
function Te({ children: n, ...e }) {
|
|
1657
|
+
const { isActive: t, isPrev: r, zIndex: s } = Z(), a = j((d) => d.index), o = F((d) => d.status), c = W((d) => d.dragStatus), h = W((d) => d.replaceTransitionStatus), m = !t && (o === "COMPLETED" && c === "IDLE") || r && a - 2 <= s && h === "IDLE" || r && a - 2 > s;
|
|
1658
|
+
return /* @__PURE__ */ D(Mt, { freeze: m, children: /* @__PURE__ */ D(Ct, { ...e, children: n }) });
|
|
1575
1659
|
}
|
|
1576
|
-
function
|
|
1577
|
-
const { isActive: t, isPrev: r, zIndex: s } =
|
|
1578
|
-
return /* @__PURE__ */
|
|
1579
|
-
|
|
1660
|
+
function ve({ children: n, ...e }) {
|
|
1661
|
+
const { isActive: t, isPrev: r, zIndex: s } = Z(), a = j((d) => d.index), o = F((d) => d.status), c = W((d) => d.dragStatus), h = W((d) => d.replaceTransitionStatus), m = !t && (o === "COMPLETED" && c === "IDLE") || r && a - 2 <= s && h === "IDLE" || r && a - 2 > s;
|
|
1662
|
+
return /* @__PURE__ */ D(Mt, { freeze: m, children: /* @__PURE__ */ D(
|
|
1663
|
+
Ct,
|
|
1580
1664
|
{
|
|
1581
1665
|
...e,
|
|
1582
1666
|
style: {
|
|
1583
1667
|
backgroundColor: "transparent",
|
|
1584
1668
|
...e.style
|
|
1585
1669
|
},
|
|
1586
|
-
children: /* @__PURE__ */
|
|
1670
|
+
children: /* @__PURE__ */ D(jt, { children: n })
|
|
1587
1671
|
}
|
|
1588
1672
|
) });
|
|
1589
1673
|
}
|
|
1590
|
-
function
|
|
1591
|
-
const { isActive: t, transitionName: r } =
|
|
1592
|
-
return /* @__PURE__ */
|
|
1593
|
-
|
|
1674
|
+
function De({ children: n, ...e }) {
|
|
1675
|
+
const { isActive: t, transitionName: r } = Z(), s = F((o) => o.status), a = et.get(r);
|
|
1676
|
+
return /* @__PURE__ */ D(
|
|
1677
|
+
qt,
|
|
1594
1678
|
{
|
|
1595
1679
|
transition: a?.variants[`${s}-${t}`]?.options,
|
|
1596
1680
|
...e,
|
|
@@ -1599,17 +1683,17 @@ function le({ children: n, ...e }) {
|
|
|
1599
1683
|
);
|
|
1600
1684
|
}
|
|
1601
1685
|
export {
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1686
|
+
De as LayoutConfig,
|
|
1687
|
+
ve as LayoutScreen,
|
|
1688
|
+
ge as Route,
|
|
1689
|
+
ye as Router,
|
|
1690
|
+
Te as Screen,
|
|
1691
|
+
ee as createDecorator,
|
|
1692
|
+
Pe as createRawDecorator,
|
|
1693
|
+
Se as createRawTransition,
|
|
1694
|
+
rt as createTransition,
|
|
1695
|
+
me as useNavigate,
|
|
1696
|
+
we as useParams,
|
|
1697
|
+
Z as useScreen,
|
|
1698
|
+
Ee as useStep
|
|
1615
1699
|
};
|