@argon-router/core 0.3.0 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +6 -2
- package/dist/index.js +841 -712
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { createEffect as
|
|
2
|
-
import { spread as
|
|
3
|
-
function
|
|
1
|
+
import { createEffect as K, createStore as B, createEvent as E, sample as S, split as we, attach as J, scopeBind as xe, withFactory as Oe } from "effector";
|
|
2
|
+
import { spread as Fe } from "patronum";
|
|
3
|
+
function Z(e, t) {
|
|
4
4
|
var r = Object.keys(e);
|
|
5
5
|
if (Object.getOwnPropertySymbols) {
|
|
6
6
|
var n = Object.getOwnPropertySymbols(e);
|
|
@@ -10,29 +10,29 @@ function K(e, t) {
|
|
|
10
10
|
}
|
|
11
11
|
return r;
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function H(e) {
|
|
14
14
|
for (var t = 1; t < arguments.length; t++) {
|
|
15
15
|
var r = arguments[t] != null ? arguments[t] : {};
|
|
16
|
-
t % 2 ?
|
|
17
|
-
|
|
18
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) :
|
|
16
|
+
t % 2 ? Z(Object(r), !0).forEach(function(n) {
|
|
17
|
+
$e(e, n, r[n]);
|
|
18
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Z(Object(r)).forEach(function(n) {
|
|
19
19
|
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
return e;
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
return (t =
|
|
24
|
+
function $e(e, t, r) {
|
|
25
|
+
return (t = je(t)) in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
var t =
|
|
27
|
+
function je(e) {
|
|
28
|
+
var t = Se(e, "string");
|
|
29
29
|
return typeof t == "symbol" ? t : t + "";
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function Se(e, t) {
|
|
32
32
|
if (typeof e != "object" || !e) return e;
|
|
33
33
|
var r = e[Symbol.toPrimitive];
|
|
34
34
|
if (r !== void 0) {
|
|
35
|
-
var n = r.call(e, t
|
|
35
|
+
var n = r.call(e, t);
|
|
36
36
|
if (typeof n != "object") return n;
|
|
37
37
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
38
38
|
}
|
|
@@ -40,461 +40,473 @@ function ge(e, t) {
|
|
|
40
40
|
}
|
|
41
41
|
function We(e) {
|
|
42
42
|
let t;
|
|
43
|
-
const r =
|
|
44
|
-
var
|
|
45
|
-
return (
|
|
43
|
+
const r = K(() => {
|
|
44
|
+
var y;
|
|
45
|
+
return (y = t) === null || y === void 0 ? void 0 : y();
|
|
46
46
|
}, {
|
|
47
47
|
name: "waitForAsyncBundleFx",
|
|
48
48
|
sid: "tw7mq7"
|
|
49
|
-
}), n =
|
|
50
|
-
for (const
|
|
51
|
-
var
|
|
52
|
-
await
|
|
49
|
+
}), n = K(async () => {
|
|
50
|
+
for (const k of (y = e.beforeOpen) !== null && y !== void 0 ? y : []) {
|
|
51
|
+
var y;
|
|
52
|
+
await k();
|
|
53
53
|
}
|
|
54
54
|
}, {
|
|
55
55
|
name: "beforeOpenFx",
|
|
56
56
|
sid: "ls74w9"
|
|
57
|
-
}), a =
|
|
57
|
+
}), a = K(async (y) => {
|
|
58
58
|
await r(), await n();
|
|
59
|
-
const
|
|
60
|
-
return
|
|
59
|
+
const k = e.parent;
|
|
60
|
+
return k && await k.internal.openFx(H(H({}, y ?? {
|
|
61
61
|
params: {}
|
|
62
62
|
}), {}, {
|
|
63
63
|
historyIgnore: !0
|
|
64
|
-
})),
|
|
64
|
+
})), y;
|
|
65
65
|
}, {
|
|
66
66
|
name: "openFx",
|
|
67
67
|
sid: "-hz9h5i"
|
|
68
|
-
}),
|
|
68
|
+
}), f = B({}, {
|
|
69
69
|
name: "$params",
|
|
70
|
-
sid: "
|
|
71
|
-
}),
|
|
70
|
+
sid: "rstqrf"
|
|
71
|
+
}), c = B(!1, {
|
|
72
72
|
name: "$isOpened",
|
|
73
|
-
sid: "
|
|
74
|
-
}),
|
|
73
|
+
sid: "-zgx6q9"
|
|
74
|
+
}), u = a.pending, F = E({
|
|
75
75
|
name: "open",
|
|
76
|
-
sid: "-
|
|
77
|
-
}),
|
|
76
|
+
sid: "-cby6lj"
|
|
77
|
+
}), D = E({
|
|
78
78
|
name: "close",
|
|
79
|
-
sid: "
|
|
80
|
-
}),
|
|
79
|
+
sid: "7uwhl1"
|
|
80
|
+
}), v = E({
|
|
81
81
|
name: "opened",
|
|
82
|
-
sid: "
|
|
83
|
-
}),
|
|
82
|
+
sid: "44ryfn"
|
|
83
|
+
}), P = E({
|
|
84
84
|
name: "openedOnServer",
|
|
85
|
-
sid: "-
|
|
86
|
-
}),
|
|
85
|
+
sid: "-prk6y1"
|
|
86
|
+
}), A = E({
|
|
87
87
|
name: "openedOnClient",
|
|
88
|
-
sid: "-
|
|
89
|
-
}),
|
|
88
|
+
sid: "-fw2mlz"
|
|
89
|
+
}), $ = E({
|
|
90
90
|
name: "closed",
|
|
91
|
-
sid: "
|
|
91
|
+
sid: "10jxi5"
|
|
92
92
|
});
|
|
93
|
-
|
|
93
|
+
S({
|
|
94
94
|
and: [{
|
|
95
|
-
clock:
|
|
95
|
+
clock: F,
|
|
96
96
|
target: a
|
|
97
97
|
}],
|
|
98
98
|
or: {
|
|
99
|
-
sid: "
|
|
99
|
+
sid: "t7vx9v"
|
|
100
100
|
}
|
|
101
|
-
})
|
|
101
|
+
});
|
|
102
|
+
const j = {};
|
|
103
|
+
return S({
|
|
104
|
+
and: [{
|
|
105
|
+
clock: a.doneData,
|
|
106
|
+
fn: (y) => y && "params" in y ? H({}, y.params) : j,
|
|
107
|
+
target: f
|
|
108
|
+
}],
|
|
109
|
+
or: {
|
|
110
|
+
sid: "tna5vz"
|
|
111
|
+
}
|
|
112
|
+
}), we({
|
|
102
113
|
and: [{
|
|
103
114
|
source: a.doneData,
|
|
104
115
|
match: () => typeof window > "u" ? "server" : "client",
|
|
105
116
|
cases: {
|
|
106
|
-
server:
|
|
107
|
-
client:
|
|
117
|
+
server: P,
|
|
118
|
+
client: A
|
|
108
119
|
}
|
|
109
120
|
}],
|
|
110
121
|
or: {
|
|
111
|
-
sid: "
|
|
122
|
+
sid: "u5fdgw"
|
|
112
123
|
}
|
|
113
|
-
}),
|
|
124
|
+
}), S({
|
|
114
125
|
and: [{
|
|
115
|
-
clock: [
|
|
116
|
-
target:
|
|
126
|
+
clock: [A, P],
|
|
127
|
+
target: v
|
|
117
128
|
}],
|
|
118
129
|
or: {
|
|
119
|
-
sid: "
|
|
130
|
+
sid: "ylqojg"
|
|
120
131
|
}
|
|
121
|
-
}),
|
|
132
|
+
}), S({
|
|
122
133
|
and: [{
|
|
123
|
-
clock:
|
|
134
|
+
clock: v,
|
|
124
135
|
fn: () => !0,
|
|
125
|
-
target:
|
|
136
|
+
target: c
|
|
126
137
|
}],
|
|
127
138
|
or: {
|
|
128
|
-
sid: "
|
|
139
|
+
sid: "yohni9"
|
|
129
140
|
}
|
|
130
|
-
}),
|
|
141
|
+
}), S({
|
|
131
142
|
and: [{
|
|
132
|
-
clock:
|
|
133
|
-
target:
|
|
143
|
+
clock: D,
|
|
144
|
+
target: $
|
|
134
145
|
}],
|
|
135
146
|
or: {
|
|
136
|
-
sid: "
|
|
147
|
+
sid: "z3c3j0"
|
|
137
148
|
}
|
|
138
|
-
}),
|
|
149
|
+
}), S({
|
|
139
150
|
and: [{
|
|
140
|
-
clock:
|
|
151
|
+
clock: $,
|
|
141
152
|
fn: () => !1,
|
|
142
|
-
target:
|
|
153
|
+
target: c
|
|
143
154
|
}],
|
|
144
155
|
or: {
|
|
145
|
-
sid: "
|
|
156
|
+
sid: "z632ht"
|
|
146
157
|
}
|
|
147
158
|
}), {
|
|
148
|
-
$params:
|
|
149
|
-
$isOpened:
|
|
150
|
-
$isPending:
|
|
151
|
-
open:
|
|
152
|
-
closed:
|
|
153
|
-
opened:
|
|
154
|
-
openedOnClient:
|
|
155
|
-
openedOnServer:
|
|
156
|
-
internal:
|
|
157
|
-
close:
|
|
159
|
+
$params: f,
|
|
160
|
+
$isOpened: c,
|
|
161
|
+
$isPending: u,
|
|
162
|
+
open: F,
|
|
163
|
+
closed: $,
|
|
164
|
+
opened: v,
|
|
165
|
+
openedOnClient: A,
|
|
166
|
+
openedOnServer: P,
|
|
167
|
+
internal: H({
|
|
168
|
+
close: D,
|
|
158
169
|
openFx: a,
|
|
159
|
-
setAsyncImport: (
|
|
170
|
+
setAsyncImport: (y) => t = y
|
|
160
171
|
}, e),
|
|
161
172
|
"@@unitShape": () => ({
|
|
162
|
-
params:
|
|
163
|
-
isPending:
|
|
164
|
-
isOpened:
|
|
165
|
-
onOpen:
|
|
173
|
+
params: f,
|
|
174
|
+
isPending: u,
|
|
175
|
+
isOpened: c,
|
|
176
|
+
onOpen: F
|
|
166
177
|
})
|
|
167
178
|
};
|
|
168
179
|
}
|
|
169
|
-
var
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
}
|
|
191
|
-
function
|
|
192
|
-
|
|
193
|
-
}
|
|
194
|
-
function
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
function
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
break;
|
|
180
|
+
var C = {}, ee;
|
|
181
|
+
function Ee() {
|
|
182
|
+
if (ee) return C;
|
|
183
|
+
ee = 1, Object.defineProperty(C, "__esModule", {
|
|
184
|
+
value: !0
|
|
185
|
+
}), C.TokenData = void 0, C.parse = P, C.compile = A, C.match = y, C.pathToRegexp = k, C.stringify = x;
|
|
186
|
+
const e = "/", t = (i) => i, r = /^[$_\p{ID_Start}]$/u, n = /^[$\u200c\u200d\p{ID_Continue}]$/u, a = "https://git.new/pathToRegexpError", f = {
|
|
187
|
+
// Groups.
|
|
188
|
+
"{": "{",
|
|
189
|
+
"}": "}",
|
|
190
|
+
// Reserved.
|
|
191
|
+
"(": "(",
|
|
192
|
+
")": ")",
|
|
193
|
+
"[": "[",
|
|
194
|
+
"]": "]",
|
|
195
|
+
"+": "+",
|
|
196
|
+
"?": "?",
|
|
197
|
+
"!": "!"
|
|
198
|
+
};
|
|
199
|
+
function c(i) {
|
|
200
|
+
return i.replace(/[{}()\[\]+?!:*]/g, "\\$&");
|
|
201
|
+
}
|
|
202
|
+
function u(i) {
|
|
203
|
+
return i.replace(/[.+*?^${}()[\]|/\\]/g, "\\$&");
|
|
204
|
+
}
|
|
205
|
+
function* F(i) {
|
|
206
|
+
const o = [...i];
|
|
207
|
+
let s = 0;
|
|
208
|
+
function p() {
|
|
209
|
+
let l = "";
|
|
210
|
+
if (r.test(o[++s]))
|
|
211
|
+
for (l += o[s]; n.test(o[++s]); )
|
|
212
|
+
l += o[s];
|
|
213
|
+
else if (o[s] === '"') {
|
|
214
|
+
let d = s;
|
|
215
|
+
for (; s < o.length; ) {
|
|
216
|
+
if (o[++s] === '"') {
|
|
217
|
+
s++, d = 0;
|
|
218
|
+
break;
|
|
219
|
+
}
|
|
220
|
+
o[s] === "\\" ? l += o[++s] : l += o[s];
|
|
211
221
|
}
|
|
212
|
-
|
|
222
|
+
if (d)
|
|
223
|
+
throw new TypeError(`Unterminated quote at ${d}: ${a}`);
|
|
213
224
|
}
|
|
214
|
-
if (
|
|
215
|
-
throw new TypeError(`
|
|
225
|
+
if (!l)
|
|
226
|
+
throw new TypeError(`Missing parameter name at ${s}: ${a}`);
|
|
227
|
+
return l;
|
|
216
228
|
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
229
|
+
for (; s < o.length; ) {
|
|
230
|
+
const l = o[s], d = f[l];
|
|
231
|
+
if (d)
|
|
232
|
+
yield {
|
|
233
|
+
type: d,
|
|
234
|
+
index: s++,
|
|
235
|
+
value: l
|
|
236
|
+
};
|
|
237
|
+
else if (l === "\\")
|
|
238
|
+
yield {
|
|
239
|
+
type: "ESCAPED",
|
|
240
|
+
index: s++,
|
|
241
|
+
value: o[s++]
|
|
242
|
+
};
|
|
243
|
+
else if (l === ":") {
|
|
244
|
+
const w = p();
|
|
245
|
+
yield {
|
|
246
|
+
type: "PARAM",
|
|
247
|
+
index: s,
|
|
248
|
+
value: w
|
|
249
|
+
};
|
|
250
|
+
} else if (l === "*") {
|
|
251
|
+
const w = p();
|
|
252
|
+
yield {
|
|
253
|
+
type: "WILDCARD",
|
|
254
|
+
index: s,
|
|
255
|
+
value: w
|
|
256
|
+
};
|
|
257
|
+
} else
|
|
258
|
+
yield {
|
|
259
|
+
type: "CHAR",
|
|
260
|
+
index: s,
|
|
261
|
+
value: o[s++]
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
return {
|
|
265
|
+
type: "END",
|
|
266
|
+
index: s,
|
|
267
|
+
value: ""
|
|
268
|
+
};
|
|
255
269
|
}
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
270
|
+
class D {
|
|
271
|
+
constructor(o) {
|
|
272
|
+
this.tokens = o;
|
|
273
|
+
}
|
|
274
|
+
peek() {
|
|
275
|
+
if (!this._peek) {
|
|
276
|
+
const o = this.tokens.next();
|
|
277
|
+
this._peek = o.value;
|
|
278
|
+
}
|
|
279
|
+
return this._peek;
|
|
280
|
+
}
|
|
281
|
+
tryConsume(o) {
|
|
282
|
+
const s = this.peek();
|
|
283
|
+
if (s.type === o)
|
|
284
|
+
return this._peek = void 0, s.value;
|
|
285
|
+
}
|
|
286
|
+
consume(o) {
|
|
287
|
+
const s = this.tryConsume(o);
|
|
288
|
+
if (s !== void 0) return s;
|
|
289
|
+
const {
|
|
290
|
+
type: p,
|
|
291
|
+
index: l
|
|
292
|
+
} = this.peek();
|
|
293
|
+
throw new TypeError(`Unexpected ${p} at ${l}, expected ${o}: ${a}`);
|
|
294
|
+
}
|
|
295
|
+
text() {
|
|
296
|
+
let o = "", s;
|
|
297
|
+
for (; s = this.tryConsume("CHAR") || this.tryConsume("ESCAPED"); )
|
|
298
|
+
o += s;
|
|
299
|
+
return o;
|
|
300
|
+
}
|
|
265
301
|
}
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
this._peek = t.value;
|
|
302
|
+
class v {
|
|
303
|
+
constructor(o) {
|
|
304
|
+
this.tokens = o;
|
|
270
305
|
}
|
|
271
|
-
return this._peek;
|
|
272
306
|
}
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
307
|
+
C.TokenData = v;
|
|
308
|
+
function P(i, o = {}) {
|
|
309
|
+
const {
|
|
310
|
+
encodePath: s = t
|
|
311
|
+
} = o, p = new D(F(i));
|
|
312
|
+
function l(w) {
|
|
313
|
+
const h = [];
|
|
314
|
+
for (; ; ) {
|
|
315
|
+
const N = p.text();
|
|
316
|
+
N && h.push({
|
|
317
|
+
type: "text",
|
|
318
|
+
value: s(N)
|
|
319
|
+
});
|
|
320
|
+
const R = p.tryConsume("PARAM");
|
|
321
|
+
if (R) {
|
|
322
|
+
h.push({
|
|
323
|
+
type: "param",
|
|
324
|
+
name: R
|
|
325
|
+
});
|
|
326
|
+
continue;
|
|
327
|
+
}
|
|
328
|
+
const z = p.tryConsume("WILDCARD");
|
|
329
|
+
if (z) {
|
|
330
|
+
h.push({
|
|
331
|
+
type: "wildcard",
|
|
332
|
+
name: z
|
|
333
|
+
});
|
|
334
|
+
continue;
|
|
335
|
+
}
|
|
336
|
+
if (p.tryConsume("{")) {
|
|
337
|
+
h.push({
|
|
338
|
+
type: "group",
|
|
339
|
+
tokens: l("}")
|
|
340
|
+
});
|
|
341
|
+
continue;
|
|
342
|
+
}
|
|
343
|
+
return p.consume(w), h;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
const d = l("END");
|
|
347
|
+
return new v(d);
|
|
277
348
|
}
|
|
278
|
-
|
|
279
|
-
const r = this.tryConsume(t);
|
|
280
|
-
if (r !== void 0) return r;
|
|
349
|
+
function A(i, o = {}) {
|
|
281
350
|
const {
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
} =
|
|
285
|
-
|
|
351
|
+
encode: s = encodeURIComponent,
|
|
352
|
+
delimiter: p = e
|
|
353
|
+
} = o, l = i instanceof v ? i : P(i, o), d = $(l.tokens, p, s);
|
|
354
|
+
return function(h = {}) {
|
|
355
|
+
const [N, ...R] = d(h);
|
|
356
|
+
if (R.length)
|
|
357
|
+
throw new TypeError(`Missing parameters: ${R.join(", ")}`);
|
|
358
|
+
return N;
|
|
359
|
+
};
|
|
286
360
|
}
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
361
|
+
function $(i, o, s) {
|
|
362
|
+
const p = i.map((l) => j(l, o, s));
|
|
363
|
+
return (l) => {
|
|
364
|
+
const d = [""];
|
|
365
|
+
for (const w of p) {
|
|
366
|
+
const [h, ...N] = w(l);
|
|
367
|
+
d[0] += h, d.push(...N);
|
|
368
|
+
}
|
|
369
|
+
return d;
|
|
370
|
+
};
|
|
292
371
|
}
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
372
|
+
function j(i, o, s) {
|
|
373
|
+
if (i.type === "text") return () => [i.value];
|
|
374
|
+
if (i.type === "group") {
|
|
375
|
+
const l = $(i.tokens, o, s);
|
|
376
|
+
return (d) => {
|
|
377
|
+
const [w, ...h] = l(d);
|
|
378
|
+
return h.length ? [""] : [w];
|
|
379
|
+
};
|
|
380
|
+
}
|
|
381
|
+
const p = s || t;
|
|
382
|
+
return i.type === "wildcard" && s !== !1 ? (l) => {
|
|
383
|
+
const d = l[i.name];
|
|
384
|
+
if (d == null) return ["", i.name];
|
|
385
|
+
if (!Array.isArray(d) || d.length === 0)
|
|
386
|
+
throw new TypeError(`Expected "${i.name}" to be a non-empty array`);
|
|
387
|
+
return [d.map((w, h) => {
|
|
388
|
+
if (typeof w != "string")
|
|
389
|
+
throw new TypeError(`Expected "${i.name}/${h}" to be a string`);
|
|
390
|
+
return p(w);
|
|
391
|
+
}).join(o)];
|
|
392
|
+
} : (l) => {
|
|
393
|
+
const d = l[i.name];
|
|
394
|
+
if (d == null) return ["", i.name];
|
|
395
|
+
if (typeof d != "string")
|
|
396
|
+
throw new TypeError(`Expected "${i.name}" to be a string`);
|
|
397
|
+
return [p(d)];
|
|
398
|
+
};
|
|
297
399
|
}
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
const
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
i.push({
|
|
315
|
-
type: "param",
|
|
316
|
-
name: u
|
|
317
|
-
});
|
|
318
|
-
continue;
|
|
400
|
+
function y(i, o = {}) {
|
|
401
|
+
const {
|
|
402
|
+
decode: s = decodeURIComponent,
|
|
403
|
+
delimiter: p = e
|
|
404
|
+
} = o, {
|
|
405
|
+
regexp: l,
|
|
406
|
+
keys: d
|
|
407
|
+
} = k(i, o), w = d.map((h) => s === !1 ? t : h.type === "param" ? s : (N) => N.split(p).map(s));
|
|
408
|
+
return function(N) {
|
|
409
|
+
const R = l.exec(N);
|
|
410
|
+
if (!R) return !1;
|
|
411
|
+
const z = R[0], q = /* @__PURE__ */ Object.create(null);
|
|
412
|
+
for (let L = 1; L < R.length; L++) {
|
|
413
|
+
if (R[L] === void 0) continue;
|
|
414
|
+
const M = d[L - 1], V = w[L - 1];
|
|
415
|
+
q[M.name] = V(R[L]);
|
|
319
416
|
}
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
417
|
+
return {
|
|
418
|
+
path: z,
|
|
419
|
+
params: q
|
|
420
|
+
};
|
|
421
|
+
};
|
|
422
|
+
}
|
|
423
|
+
function k(i, o = {}) {
|
|
424
|
+
const {
|
|
425
|
+
delimiter: s = e,
|
|
426
|
+
end: p = !0,
|
|
427
|
+
sensitive: l = !1,
|
|
428
|
+
trailing: d = !0
|
|
429
|
+
} = o, w = [], h = [], N = l ? "" : "i", z = (Array.isArray(i) ? i : [i]).map((M) => M instanceof v ? M : P(M, o));
|
|
430
|
+
for (const {
|
|
431
|
+
tokens: M
|
|
432
|
+
} of z)
|
|
433
|
+
for (const V of g(M, 0, [])) {
|
|
434
|
+
const be = b(V, s, w);
|
|
435
|
+
h.push(be);
|
|
436
|
+
}
|
|
437
|
+
let q = `^(?:${h.join("|")})`;
|
|
438
|
+
return d && (q += `(?:${u(s)}$)?`), q += p ? "$" : `(?=${u(s)}|$)`, {
|
|
439
|
+
regexp: new RegExp(q, N),
|
|
440
|
+
keys: w
|
|
441
|
+
};
|
|
442
|
+
}
|
|
443
|
+
function* g(i, o, s) {
|
|
444
|
+
if (o === i.length)
|
|
445
|
+
return yield s;
|
|
446
|
+
const p = i[o];
|
|
447
|
+
if (p.type === "group") {
|
|
448
|
+
const l = s.slice();
|
|
449
|
+
for (const d of g(p.tokens, 0, l))
|
|
450
|
+
yield* g(i, o + 1, d);
|
|
451
|
+
} else
|
|
452
|
+
s.push(p);
|
|
453
|
+
yield* g(i, o + 1, s);
|
|
454
|
+
}
|
|
455
|
+
function b(i, o, s) {
|
|
456
|
+
let p = "", l = "", d = !0;
|
|
457
|
+
for (let w = 0; w < i.length; w++) {
|
|
458
|
+
const h = i[w];
|
|
459
|
+
if (h.type === "text") {
|
|
460
|
+
p += u(h.value), l += h.value, d || (d = h.value.includes(o));
|
|
326
461
|
continue;
|
|
327
462
|
}
|
|
328
|
-
if (
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
});
|
|
463
|
+
if (h.type === "param" || h.type === "wildcard") {
|
|
464
|
+
if (!d && !l)
|
|
465
|
+
throw new TypeError(`Missing text after "${h.name}": ${a}`);
|
|
466
|
+
h.type === "param" ? p += `(${m(o, d ? "" : l)}+)` : p += "([\\s\\S]+)", s.push(h), l = "", d = !1;
|
|
333
467
|
continue;
|
|
334
468
|
}
|
|
335
|
-
return n.consume(o), i;
|
|
336
469
|
}
|
|
470
|
+
return p;
|
|
337
471
|
}
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
}
|
|
341
|
-
function Se(e, t = {}) {
|
|
342
|
-
const {
|
|
343
|
-
encode: r = encodeURIComponent,
|
|
344
|
-
delimiter: n = _
|
|
345
|
-
} = t, a = e instanceof P ? e : M(e, t), s = Z(a.tokens, n, r);
|
|
346
|
-
return function(i = {}) {
|
|
347
|
-
const [c, ...u] = s(i);
|
|
348
|
-
if (u.length)
|
|
349
|
-
throw new TypeError(`Missing parameters: ${u.join(", ")}`);
|
|
350
|
-
return c;
|
|
351
|
-
};
|
|
352
|
-
}
|
|
353
|
-
function Z(e, t, r) {
|
|
354
|
-
const n = e.map((a) => Oe(a, t, r));
|
|
355
|
-
return (a) => {
|
|
356
|
-
const s = [""];
|
|
357
|
-
for (const o of n) {
|
|
358
|
-
const [i, ...c] = o(a);
|
|
359
|
-
s[0] += i, s.push(...c);
|
|
360
|
-
}
|
|
361
|
-
return s;
|
|
362
|
-
};
|
|
363
|
-
}
|
|
364
|
-
function Oe(e, t, r) {
|
|
365
|
-
if (e.type === "text") return () => [e.value];
|
|
366
|
-
if (e.type === "group") {
|
|
367
|
-
const a = Z(e.tokens, t, r);
|
|
368
|
-
return (s) => {
|
|
369
|
-
const [o, ...i] = a(s);
|
|
370
|
-
return i.length ? [""] : [o];
|
|
371
|
-
};
|
|
472
|
+
function m(i, o) {
|
|
473
|
+
return o.length < 2 ? i.length < 2 ? `[^${u(i + o)}]` : `(?:(?!${u(i)})[^${u(o)}])` : i.length < 2 ? `(?:(?!${u(o)})[^${u(i)}])` : `(?:(?!${u(o)}|${u(i)})[\\s\\S])`;
|
|
372
474
|
}
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
if (
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
}).join(t)];
|
|
384
|
-
} : (a) => {
|
|
385
|
-
const s = a[e.name];
|
|
386
|
-
if (s == null) return ["", e.name];
|
|
387
|
-
if (typeof s != "string")
|
|
388
|
-
throw new TypeError(`Expected "${e.name}" to be a string`);
|
|
389
|
-
return [n(s)];
|
|
390
|
-
};
|
|
391
|
-
}
|
|
392
|
-
function je(e, t = {}) {
|
|
393
|
-
const {
|
|
394
|
-
decode: r = decodeURIComponent,
|
|
395
|
-
delimiter: n = _
|
|
396
|
-
} = t, {
|
|
397
|
-
regexp: a,
|
|
398
|
-
keys: s
|
|
399
|
-
} = ee(e, t), o = s.map((i) => r === !1 ? q : i.type === "param" ? r : (c) => c.split(n).map(r));
|
|
400
|
-
return function(c) {
|
|
401
|
-
const u = a.exec(c);
|
|
402
|
-
if (!u) return !1;
|
|
403
|
-
const m = u[0], y = /* @__PURE__ */ Object.create(null);
|
|
404
|
-
for (let h = 1; h < u.length; h++) {
|
|
405
|
-
if (u[h] === void 0) continue;
|
|
406
|
-
const F = s[h - 1], d = o[h - 1];
|
|
407
|
-
y[F.name] = d(u[h]);
|
|
408
|
-
}
|
|
409
|
-
return {
|
|
410
|
-
path: m,
|
|
411
|
-
params: y
|
|
412
|
-
};
|
|
413
|
-
};
|
|
414
|
-
}
|
|
415
|
-
function ee(e, t = {}) {
|
|
416
|
-
const {
|
|
417
|
-
delimiter: r = _,
|
|
418
|
-
end: n = !0,
|
|
419
|
-
sensitive: a = !1,
|
|
420
|
-
trailing: s = !0
|
|
421
|
-
} = t, o = [], i = [], c = a ? "" : "i", m = (Array.isArray(e) ? e : [e]).map((F) => F instanceof P ? F : M(F, t));
|
|
422
|
-
for (const {
|
|
423
|
-
tokens: F
|
|
424
|
-
} of m)
|
|
425
|
-
for (const d of I(F, 0, [])) {
|
|
426
|
-
const O = Ee(d, r, o);
|
|
427
|
-
i.push(O);
|
|
428
|
-
}
|
|
429
|
-
let y = `^(?:${i.join("|")})`;
|
|
430
|
-
return s && (y += `(?:${$(r)}$)?`), y += n ? "$" : `(?=${$(r)}|$)`, {
|
|
431
|
-
regexp: new RegExp(y, c),
|
|
432
|
-
keys: o
|
|
433
|
-
};
|
|
434
|
-
}
|
|
435
|
-
function* I(e, t, r) {
|
|
436
|
-
if (t === e.length)
|
|
437
|
-
return yield r;
|
|
438
|
-
const n = e[t];
|
|
439
|
-
if (n.type === "group") {
|
|
440
|
-
const a = r.slice();
|
|
441
|
-
for (const s of I(n.tokens, 0, a))
|
|
442
|
-
yield* I(e, t + 1, s);
|
|
443
|
-
} else
|
|
444
|
-
r.push(n);
|
|
445
|
-
yield* I(e, t + 1, r);
|
|
446
|
-
}
|
|
447
|
-
function Ee(e, t, r) {
|
|
448
|
-
let n = "", a = "", s = !0;
|
|
449
|
-
for (let o = 0; o < e.length; o++) {
|
|
450
|
-
const i = e[o];
|
|
451
|
-
if (i.type === "text") {
|
|
452
|
-
n += $(i.value), a += i.value, s || (s = i.value.includes(t));
|
|
453
|
-
continue;
|
|
454
|
-
}
|
|
455
|
-
if (i.type === "param" || i.type === "wildcard") {
|
|
456
|
-
if (!s && !a)
|
|
457
|
-
throw new TypeError(`Missing text after "${i.name}": ${k}`);
|
|
458
|
-
i.type === "param" ? n += `(${Ae(t, s ? "" : a)}+)` : n += "([\\s\\S]+)", r.push(i), a = "", s = !1;
|
|
459
|
-
continue;
|
|
460
|
-
}
|
|
475
|
+
function x(i) {
|
|
476
|
+
return i.tokens.map(function o(s, p, l) {
|
|
477
|
+
if (s.type === "text") return c(s.value);
|
|
478
|
+
if (s.type === "group")
|
|
479
|
+
return `{${s.tokens.map(o).join("")}}`;
|
|
480
|
+
const w = _(s.name) && I(l[p + 1]) ? s.name : JSON.stringify(s.name);
|
|
481
|
+
if (s.type === "param") return `:${w}`;
|
|
482
|
+
if (s.type === "wildcard") return `*${w}`;
|
|
483
|
+
throw new TypeError(`Unexpected token: ${s}`);
|
|
484
|
+
}).join("");
|
|
461
485
|
}
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
if (r.type === "group")
|
|
471
|
-
return `{${r.tokens.map(t).join("")}}`;
|
|
472
|
-
const o = Re(r.name) && Ie(a[n + 1]) ? r.name : JSON.stringify(r.name);
|
|
473
|
-
if (r.type === "param") return `:${o}`;
|
|
474
|
-
if (r.type === "wildcard") return `*${o}`;
|
|
475
|
-
throw new TypeError(`Unexpected token: ${r}`);
|
|
476
|
-
}).join("");
|
|
477
|
-
}
|
|
478
|
-
function Re(e) {
|
|
479
|
-
const [t, ...r] = e;
|
|
480
|
-
return Y.test(t) ? r.every((n) => L.test(n)) : !1;
|
|
481
|
-
}
|
|
482
|
-
function Ie(e) {
|
|
483
|
-
return (e == null ? void 0 : e.type) !== "text" ? !0 : !L.test(e.value[0]);
|
|
486
|
+
function _(i) {
|
|
487
|
+
const [o, ...s] = i;
|
|
488
|
+
return r.test(o) ? s.every((p) => n.test(p)) : !1;
|
|
489
|
+
}
|
|
490
|
+
function I(i) {
|
|
491
|
+
return (i == null ? void 0 : i.type) !== "text" ? !0 : !n.test(i.value[0]);
|
|
492
|
+
}
|
|
493
|
+
return C;
|
|
484
494
|
}
|
|
485
|
-
|
|
486
|
-
|
|
495
|
+
var re = Ee();
|
|
496
|
+
const ve = Symbol("any"), Pe = Symbol("number"), Ae = Symbol("string"), ke = Symbol("array"), Ne = Symbol("boolean"), T = {
|
|
497
|
+
any: ve,
|
|
487
498
|
number: Pe,
|
|
488
|
-
string:
|
|
489
|
-
array:
|
|
499
|
+
string: Ae,
|
|
500
|
+
array: ke,
|
|
501
|
+
boolean: Ne
|
|
490
502
|
};
|
|
491
|
-
function
|
|
503
|
+
function te(e, t) {
|
|
492
504
|
for (const r of e)
|
|
493
|
-
if (
|
|
494
|
-
return !
|
|
495
|
-
return !
|
|
505
|
+
if (t.includes(r))
|
|
506
|
+
return !0;
|
|
507
|
+
return !1;
|
|
496
508
|
}
|
|
497
|
-
function
|
|
509
|
+
function ne(e, t) {
|
|
498
510
|
for (const r in t) {
|
|
499
511
|
const n = t[r];
|
|
500
512
|
if (Array.isArray(n) && (!e[r] || JSON.stringify(n) !== e[r]))
|
|
@@ -522,141 +534,201 @@ function Q(e, t) {
|
|
|
522
534
|
}
|
|
523
535
|
}
|
|
524
536
|
switch (n) {
|
|
525
|
-
case
|
|
537
|
+
case T.any: {
|
|
526
538
|
if (!e[r])
|
|
527
539
|
return !1;
|
|
528
540
|
break;
|
|
529
541
|
}
|
|
530
|
-
case
|
|
542
|
+
case T.string: {
|
|
531
543
|
if (!e[r] || Array.isArray(e[r]))
|
|
532
544
|
return !1;
|
|
533
545
|
break;
|
|
534
546
|
}
|
|
535
|
-
case
|
|
547
|
+
case T.array: {
|
|
536
548
|
if (!e[r] || !Array.isArray(e[r]))
|
|
537
549
|
return !1;
|
|
538
550
|
break;
|
|
539
551
|
}
|
|
540
|
-
case
|
|
552
|
+
case T.number: {
|
|
541
553
|
if (!e[r] || Array.isArray(e[r]) || isNaN(parseInt(e[r])) && isNaN(parseFloat(e[r])))
|
|
542
554
|
return !1;
|
|
543
555
|
break;
|
|
544
556
|
}
|
|
557
|
+
case T.boolean: {
|
|
558
|
+
if (!e[r] || Array.isArray(e[r]) || !["0", "1", "false", "true"].includes(e[r]))
|
|
559
|
+
return !1;
|
|
560
|
+
break;
|
|
561
|
+
}
|
|
545
562
|
}
|
|
546
563
|
}
|
|
547
564
|
return !0;
|
|
548
565
|
}
|
|
549
|
-
function
|
|
566
|
+
function Re(e, t) {
|
|
550
567
|
const r = {};
|
|
551
568
|
for (const n in t) {
|
|
552
|
-
const a = t[n],
|
|
569
|
+
const a = t[n], f = e[n];
|
|
553
570
|
if (Array.isArray(a)) {
|
|
554
|
-
|
|
571
|
+
const c = e[n];
|
|
572
|
+
r[n] = c;
|
|
555
573
|
continue;
|
|
556
574
|
}
|
|
557
575
|
switch (typeof a) {
|
|
558
576
|
case "number": {
|
|
559
|
-
|
|
560
|
-
r[n] = isNaN(parseInt(o)) ? parseFloat(o) : parseInt(o);
|
|
577
|
+
r[n] = isNaN(parseInt(f)) ? parseFloat(f) : parseInt(f);
|
|
561
578
|
break;
|
|
562
579
|
}
|
|
563
580
|
case "object": {
|
|
564
|
-
r[n] = JSON.parse(
|
|
581
|
+
r[n] = JSON.parse(f);
|
|
565
582
|
break;
|
|
566
583
|
}
|
|
567
584
|
case "string":
|
|
568
|
-
r[n] =
|
|
585
|
+
r[n] = f;
|
|
569
586
|
case "boolean": {
|
|
570
|
-
|
|
571
|
-
r[n] = o === "0" ? parseFloat(o) : parseInt(o);
|
|
587
|
+
r[n] = f === "1" || f === "true";
|
|
572
588
|
break;
|
|
573
589
|
}
|
|
574
590
|
}
|
|
575
591
|
switch (a) {
|
|
576
|
-
case
|
|
577
|
-
case
|
|
578
|
-
case
|
|
592
|
+
case T.any:
|
|
593
|
+
case T.string:
|
|
594
|
+
case T.array: {
|
|
579
595
|
r[n] = e[n];
|
|
580
596
|
break;
|
|
581
597
|
}
|
|
582
|
-
case
|
|
583
|
-
const
|
|
584
|
-
r[n] = isNaN(parseInt(
|
|
598
|
+
case T.number: {
|
|
599
|
+
const c = e[n];
|
|
600
|
+
r[n] = isNaN(parseInt(c)) ? parseFloat(c) : parseInt(c);
|
|
601
|
+
break;
|
|
602
|
+
}
|
|
603
|
+
case T.boolean: {
|
|
604
|
+
const c = e[n];
|
|
605
|
+
r[n] = c === "1" || c === "true";
|
|
585
606
|
break;
|
|
586
607
|
}
|
|
587
608
|
}
|
|
588
609
|
}
|
|
589
610
|
return r;
|
|
590
611
|
}
|
|
591
|
-
function De(e
|
|
592
|
-
|
|
612
|
+
function De(e) {
|
|
613
|
+
let {
|
|
614
|
+
$activeRoutes: t,
|
|
615
|
+
$path: r,
|
|
616
|
+
$query: n,
|
|
617
|
+
navigateFx: a
|
|
618
|
+
} = e;
|
|
619
|
+
return (f) => {
|
|
593
620
|
const {
|
|
594
|
-
parameters:
|
|
595
|
-
forRoutes:
|
|
596
|
-
} =
|
|
621
|
+
parameters: c,
|
|
622
|
+
forRoutes: u
|
|
623
|
+
} = f, F = B(!1, {
|
|
624
|
+
name: "$entered",
|
|
625
|
+
sid: "jh7pkx"
|
|
626
|
+
}), D = E({
|
|
597
627
|
name: "entered",
|
|
598
|
-
sid: "-
|
|
599
|
-
}),
|
|
628
|
+
sid: "-savym4"
|
|
629
|
+
}), v = E({
|
|
600
630
|
name: "exited",
|
|
601
|
-
sid: "
|
|
602
|
-
}),
|
|
631
|
+
sid: "m5ggn3"
|
|
632
|
+
}), P = E({
|
|
603
633
|
name: "exit",
|
|
604
|
-
sid: "-
|
|
634
|
+
sid: "-bgcxp1"
|
|
635
|
+
}), A = E({
|
|
636
|
+
name: "changeEntered",
|
|
637
|
+
sid: "-2ei1v0"
|
|
605
638
|
});
|
|
606
|
-
return
|
|
639
|
+
return S({
|
|
640
|
+
and: [{
|
|
641
|
+
clock: A,
|
|
642
|
+
target: F
|
|
643
|
+
}],
|
|
644
|
+
or: {
|
|
645
|
+
sid: "-hckvl5"
|
|
646
|
+
}
|
|
647
|
+
}), S({
|
|
607
648
|
and: [{
|
|
608
649
|
source: {
|
|
609
|
-
activeRoutes:
|
|
610
|
-
query:
|
|
650
|
+
activeRoutes: t,
|
|
651
|
+
query: n
|
|
611
652
|
},
|
|
612
|
-
filter: (
|
|
653
|
+
filter: ($) => {
|
|
613
654
|
let {
|
|
614
|
-
activeRoutes:
|
|
615
|
-
query:
|
|
616
|
-
} =
|
|
617
|
-
return (!
|
|
655
|
+
activeRoutes: j,
|
|
656
|
+
query: y
|
|
657
|
+
} = $;
|
|
658
|
+
return (!u || te(u, j)) && ne(y, c);
|
|
618
659
|
},
|
|
619
|
-
fn: (
|
|
660
|
+
fn: ($) => {
|
|
620
661
|
let {
|
|
621
|
-
query:
|
|
622
|
-
} =
|
|
623
|
-
return
|
|
624
|
-
}
|
|
662
|
+
query: j
|
|
663
|
+
} = $;
|
|
664
|
+
return Re(j, c);
|
|
665
|
+
},
|
|
666
|
+
target: [D, A.prepend(() => !0)]
|
|
625
667
|
}],
|
|
626
668
|
or: {
|
|
627
|
-
sid: "-
|
|
669
|
+
sid: "-h9twmc"
|
|
628
670
|
}
|
|
629
|
-
}),
|
|
671
|
+
}), S({
|
|
630
672
|
and: [{
|
|
631
673
|
source: {
|
|
632
|
-
activeRoutes:
|
|
633
|
-
query:
|
|
674
|
+
activeRoutes: t,
|
|
675
|
+
query: n,
|
|
676
|
+
entered: F
|
|
634
677
|
},
|
|
635
|
-
filter: (
|
|
678
|
+
filter: ($) => {
|
|
636
679
|
let {
|
|
637
|
-
activeRoutes:
|
|
638
|
-
query:
|
|
639
|
-
|
|
640
|
-
|
|
680
|
+
activeRoutes: j,
|
|
681
|
+
query: y,
|
|
682
|
+
entered: k
|
|
683
|
+
} = $;
|
|
684
|
+
return k && !((!u || te(u, j)) && ne(y, c));
|
|
685
|
+
},
|
|
686
|
+
target: [v.prepend(() => {
|
|
687
|
+
}), A.prepend(() => !1)]
|
|
688
|
+
}],
|
|
689
|
+
or: {
|
|
690
|
+
sid: "-gtc2ti"
|
|
691
|
+
}
|
|
692
|
+
}), S({
|
|
693
|
+
and: [{
|
|
694
|
+
clock: P,
|
|
695
|
+
source: {
|
|
696
|
+
path: r,
|
|
697
|
+
query: n
|
|
698
|
+
},
|
|
699
|
+
fn: ($, j) => {
|
|
700
|
+
let {
|
|
701
|
+
path: y,
|
|
702
|
+
query: k
|
|
703
|
+
} = $;
|
|
704
|
+
if (j && j.ignoreParams) {
|
|
705
|
+
const g = {};
|
|
706
|
+
for (const b of j.ignoreParams)
|
|
707
|
+
k[b] && (g[b] = k[b]);
|
|
708
|
+
return {
|
|
709
|
+
query: g,
|
|
710
|
+
path: y
|
|
711
|
+
};
|
|
712
|
+
}
|
|
713
|
+
return {
|
|
714
|
+
query: {},
|
|
715
|
+
path: y
|
|
716
|
+
};
|
|
641
717
|
},
|
|
642
|
-
target:
|
|
718
|
+
target: a
|
|
643
719
|
}],
|
|
644
720
|
or: {
|
|
645
|
-
sid: "-
|
|
721
|
+
sid: "-fyjlla"
|
|
646
722
|
}
|
|
647
723
|
}), {
|
|
648
|
-
entered:
|
|
649
|
-
exited:
|
|
650
|
-
exit:
|
|
651
|
-
getPayload: (c) => Object.entries(c).reduce((u, m) => {
|
|
652
|
-
let [y, h] = m;
|
|
653
|
-
return typeof n[y] == "symbol" ? u[y] = h : u[y] = n[y], u;
|
|
654
|
-
}, {})
|
|
724
|
+
entered: D,
|
|
725
|
+
exited: v,
|
|
726
|
+
exit: P
|
|
655
727
|
};
|
|
656
728
|
};
|
|
657
729
|
}
|
|
658
|
-
const
|
|
659
|
-
function
|
|
730
|
+
const fe = "%[a-f0-9]{2}", ae = new RegExp("(" + fe + ")|([^%]+?)", "gi"), se = new RegExp("(" + fe + ")+", "gi");
|
|
731
|
+
function W(e, t) {
|
|
660
732
|
try {
|
|
661
733
|
return [decodeURIComponent(e.join(""))];
|
|
662
734
|
} catch {
|
|
@@ -665,32 +737,32 @@ function D(e, t) {
|
|
|
665
737
|
return e;
|
|
666
738
|
t = t || 1;
|
|
667
739
|
const r = e.slice(0, t), n = e.slice(t);
|
|
668
|
-
return Array.prototype.concat.call([],
|
|
740
|
+
return Array.prototype.concat.call([], W(r), W(n));
|
|
669
741
|
}
|
|
670
|
-
function
|
|
742
|
+
function Ie(e) {
|
|
671
743
|
try {
|
|
672
744
|
return decodeURIComponent(e);
|
|
673
745
|
} catch {
|
|
674
|
-
let t = e.match(
|
|
746
|
+
let t = e.match(ae) || [];
|
|
675
747
|
for (let r = 1; r < t.length; r++)
|
|
676
|
-
e =
|
|
748
|
+
e = W(t, r).join(""), t = e.match(ae) || [];
|
|
677
749
|
return e;
|
|
678
750
|
}
|
|
679
751
|
}
|
|
680
|
-
function
|
|
752
|
+
function Ce(e) {
|
|
681
753
|
const t = {
|
|
682
754
|
"%FE%FF": "��",
|
|
683
755
|
"%FF%FE": "��"
|
|
684
756
|
};
|
|
685
|
-
let r =
|
|
757
|
+
let r = se.exec(e);
|
|
686
758
|
for (; r; ) {
|
|
687
759
|
try {
|
|
688
760
|
t[r[0]] = decodeURIComponent(r[0]);
|
|
689
761
|
} catch {
|
|
690
|
-
const a =
|
|
762
|
+
const a = Ie(r[0]);
|
|
691
763
|
a !== r[0] && (t[r[0]] = a);
|
|
692
764
|
}
|
|
693
|
-
r =
|
|
765
|
+
r = se.exec(e);
|
|
694
766
|
}
|
|
695
767
|
t["%C2"] = "�";
|
|
696
768
|
const n = Object.keys(t);
|
|
@@ -698,16 +770,16 @@ function _e(e) {
|
|
|
698
770
|
e = e.replace(new RegExp(a, "g"), t[a]);
|
|
699
771
|
return e;
|
|
700
772
|
}
|
|
701
|
-
function
|
|
773
|
+
function Te(e) {
|
|
702
774
|
if (typeof e != "string")
|
|
703
775
|
throw new TypeError("Expected `encodedURI` to be of type `string`, got `" + typeof e + "`");
|
|
704
776
|
try {
|
|
705
777
|
return decodeURIComponent(e);
|
|
706
778
|
} catch {
|
|
707
|
-
return
|
|
779
|
+
return Ce(e);
|
|
708
780
|
}
|
|
709
781
|
}
|
|
710
|
-
function
|
|
782
|
+
function Ue(e, t) {
|
|
711
783
|
const r = {};
|
|
712
784
|
if (Array.isArray(t))
|
|
713
785
|
for (const n of t) {
|
|
@@ -718,13 +790,13 @@ function Le(e, t) {
|
|
|
718
790
|
for (const n of Reflect.ownKeys(e)) {
|
|
719
791
|
const a = Object.getOwnPropertyDescriptor(e, n);
|
|
720
792
|
if (a.enumerable) {
|
|
721
|
-
const
|
|
722
|
-
t(n,
|
|
793
|
+
const f = e[n];
|
|
794
|
+
t(n, f, e) && Object.defineProperty(r, n, a);
|
|
723
795
|
}
|
|
724
796
|
}
|
|
725
797
|
return r;
|
|
726
798
|
}
|
|
727
|
-
function
|
|
799
|
+
function ue(e, t) {
|
|
728
800
|
if (!(typeof e == "string" && typeof t == "string"))
|
|
729
801
|
throw new TypeError("Expected the arguments to be of type `string`");
|
|
730
802
|
if (e === "" || t === "")
|
|
@@ -732,29 +804,29 @@ function te(e, t) {
|
|
|
732
804
|
const r = e.indexOf(t);
|
|
733
805
|
return r === -1 ? [] : [e.slice(0, r), e.slice(r + t.length)];
|
|
734
806
|
}
|
|
735
|
-
const
|
|
736
|
-
function
|
|
807
|
+
const _e = (e) => e == null, qe = (e) => encodeURIComponent(e).replaceAll(/[!'()*]/g, (t) => `%${t.charCodeAt(0).toString(16).toUpperCase()}`), G = Symbol("encodeFragmentIdentifier");
|
|
808
|
+
function Le(e) {
|
|
737
809
|
switch (e.arrayFormat) {
|
|
738
810
|
case "index":
|
|
739
811
|
return (t) => (r, n) => {
|
|
740
812
|
const a = r.length;
|
|
741
|
-
return n === void 0 || e.skipNull && n === null || e.skipEmptyString && n === "" ? r : n === null ? [...r, [
|
|
813
|
+
return n === void 0 || e.skipNull && n === null || e.skipEmptyString && n === "" ? r : n === null ? [...r, [O(t, e), "[", a, "]"].join("")] : [...r, [O(t, e), "[", O(a, e), "]=", O(n, e)].join("")];
|
|
742
814
|
};
|
|
743
815
|
case "bracket":
|
|
744
|
-
return (t) => (r, n) => n === void 0 || e.skipNull && n === null || e.skipEmptyString && n === "" ? r : n === null ? [...r, [
|
|
816
|
+
return (t) => (r, n) => n === void 0 || e.skipNull && n === null || e.skipEmptyString && n === "" ? r : n === null ? [...r, [O(t, e), "[]"].join("")] : [...r, [O(t, e), "[]=", O(n, e)].join("")];
|
|
745
817
|
case "colon-list-separator":
|
|
746
|
-
return (t) => (r, n) => n === void 0 || e.skipNull && n === null || e.skipEmptyString && n === "" ? r : n === null ? [...r, [
|
|
818
|
+
return (t) => (r, n) => n === void 0 || e.skipNull && n === null || e.skipEmptyString && n === "" ? r : n === null ? [...r, [O(t, e), ":list="].join("")] : [...r, [O(t, e), ":list=", O(n, e)].join("")];
|
|
747
819
|
case "comma":
|
|
748
820
|
case "separator":
|
|
749
821
|
case "bracket-separator": {
|
|
750
822
|
const t = e.arrayFormat === "bracket-separator" ? "[]=" : "=";
|
|
751
|
-
return (r) => (n, a) => a === void 0 || e.skipNull && a === null || e.skipEmptyString && a === "" ? n : (a = a === null ? "" : a, n.length === 0 ? [[
|
|
823
|
+
return (r) => (n, a) => a === void 0 || e.skipNull && a === null || e.skipEmptyString && a === "" ? n : (a = a === null ? "" : a, n.length === 0 ? [[O(r, e), t, O(a, e)].join("")] : [[n, O(a, e)].join(e.arrayFormatSeparator)]);
|
|
752
824
|
}
|
|
753
825
|
default:
|
|
754
|
-
return (t) => (r, n) => n === void 0 || e.skipNull && n === null || e.skipEmptyString && n === "" ? r : n === null ? [...r,
|
|
826
|
+
return (t) => (r, n) => n === void 0 || e.skipNull && n === null || e.skipEmptyString && n === "" ? r : n === null ? [...r, O(t, e)] : [...r, [O(t, e), "=", O(n, e)].join("")];
|
|
755
827
|
}
|
|
756
828
|
}
|
|
757
|
-
function
|
|
829
|
+
function Me(e) {
|
|
758
830
|
let t;
|
|
759
831
|
switch (e.arrayFormat) {
|
|
760
832
|
case "index":
|
|
@@ -792,24 +864,24 @@ function Ve(e) {
|
|
|
792
864
|
case "comma":
|
|
793
865
|
case "separator":
|
|
794
866
|
return (r, n, a) => {
|
|
795
|
-
const
|
|
796
|
-
n =
|
|
797
|
-
const
|
|
798
|
-
a[r] =
|
|
867
|
+
const f = typeof n == "string" && n.includes(e.arrayFormatSeparator), c = typeof n == "string" && !f && U(n, e).includes(e.arrayFormatSeparator);
|
|
868
|
+
n = c ? U(n, e) : n;
|
|
869
|
+
const u = f || c ? n.split(e.arrayFormatSeparator).map((F) => U(F, e)) : n === null ? n : U(n, e);
|
|
870
|
+
a[r] = u;
|
|
799
871
|
};
|
|
800
872
|
case "bracket-separator":
|
|
801
873
|
return (r, n, a) => {
|
|
802
|
-
const
|
|
803
|
-
if (r = r.replace(/\[]$/, ""), !
|
|
804
|
-
a[r] = n &&
|
|
874
|
+
const f = /(\[])$/.test(r);
|
|
875
|
+
if (r = r.replace(/\[]$/, ""), !f) {
|
|
876
|
+
a[r] = n && U(n, e);
|
|
805
877
|
return;
|
|
806
878
|
}
|
|
807
|
-
const
|
|
879
|
+
const c = n === null ? [] : U(n, e).split(e.arrayFormatSeparator);
|
|
808
880
|
if (a[r] === void 0) {
|
|
809
|
-
a[r] =
|
|
881
|
+
a[r] = c;
|
|
810
882
|
return;
|
|
811
883
|
}
|
|
812
|
-
a[r] = [...a[r], ...
|
|
884
|
+
a[r] = [...a[r], ...c];
|
|
813
885
|
};
|
|
814
886
|
default:
|
|
815
887
|
return (r, n, a) => {
|
|
@@ -821,37 +893,37 @@ function Ve(e) {
|
|
|
821
893
|
};
|
|
822
894
|
}
|
|
823
895
|
}
|
|
824
|
-
function
|
|
896
|
+
function le(e) {
|
|
825
897
|
if (typeof e != "string" || e.length !== 1)
|
|
826
898
|
throw new TypeError("arrayFormatSeparator must be single character string");
|
|
827
899
|
}
|
|
828
|
-
function
|
|
829
|
-
return t.encode ? t.strict ?
|
|
900
|
+
function O(e, t) {
|
|
901
|
+
return t.encode ? t.strict ? qe(e) : encodeURIComponent(e) : e;
|
|
830
902
|
}
|
|
831
|
-
function
|
|
832
|
-
return t.decode ?
|
|
903
|
+
function U(e, t) {
|
|
904
|
+
return t.decode ? Te(e) : e;
|
|
833
905
|
}
|
|
834
|
-
function
|
|
835
|
-
return Array.isArray(e) ? e.sort() : typeof e == "object" ?
|
|
906
|
+
function de(e) {
|
|
907
|
+
return Array.isArray(e) ? e.sort() : typeof e == "object" ? de(Object.keys(e)).sort((t, r) => Number(t) - Number(r)).map((t) => e[t]) : e;
|
|
836
908
|
}
|
|
837
|
-
function
|
|
909
|
+
function pe(e) {
|
|
838
910
|
const t = e.indexOf("#");
|
|
839
911
|
return t !== -1 && (e = e.slice(0, t)), e;
|
|
840
912
|
}
|
|
841
|
-
function
|
|
913
|
+
function Be(e) {
|
|
842
914
|
let t = "";
|
|
843
915
|
const r = e.indexOf("#");
|
|
844
916
|
return r !== -1 && (t = e.slice(r)), t;
|
|
845
917
|
}
|
|
846
|
-
function
|
|
918
|
+
function oe(e, t, r) {
|
|
847
919
|
return r === "string" && typeof e == "string" ? e : typeof r == "function" && typeof e == "string" ? r(e) : t.parseBooleans && e !== null && (e.toLowerCase() === "true" || e.toLowerCase() === "false") ? e.toLowerCase() === "true" : r === "number" && !Number.isNaN(Number(e)) && typeof e == "string" && e.trim() !== "" || t.parseNumbers && !Number.isNaN(Number(e)) && typeof e == "string" && e.trim() !== "" ? Number(e) : e;
|
|
848
920
|
}
|
|
849
|
-
function
|
|
850
|
-
e =
|
|
921
|
+
function X(e) {
|
|
922
|
+
e = pe(e);
|
|
851
923
|
const t = e.indexOf("?");
|
|
852
924
|
return t === -1 ? "" : e.slice(t + 1);
|
|
853
925
|
}
|
|
854
|
-
function
|
|
926
|
+
function Y(e, t) {
|
|
855
927
|
t = {
|
|
856
928
|
decode: !0,
|
|
857
929
|
sort: !0,
|
|
@@ -861,30 +933,30 @@ function H(e, t) {
|
|
|
861
933
|
parseBooleans: !1,
|
|
862
934
|
types: /* @__PURE__ */ Object.create(null),
|
|
863
935
|
...t
|
|
864
|
-
},
|
|
865
|
-
const r =
|
|
936
|
+
}, le(t.arrayFormatSeparator);
|
|
937
|
+
const r = Me(t), n = /* @__PURE__ */ Object.create(null);
|
|
866
938
|
if (typeof e != "string" || (e = e.trim().replace(/^[?#&]/, ""), !e))
|
|
867
939
|
return n;
|
|
868
940
|
for (const a of e.split("&")) {
|
|
869
941
|
if (a === "")
|
|
870
942
|
continue;
|
|
871
|
-
const
|
|
872
|
-
let [
|
|
873
|
-
|
|
943
|
+
const f = t.decode ? a.replaceAll("+", " ") : a;
|
|
944
|
+
let [c, u] = ue(f, "=");
|
|
945
|
+
c === void 0 && (c = f), u = u === void 0 ? null : ["comma", "separator", "bracket-separator"].includes(t.arrayFormat) ? u : U(u, t), r(U(c, t), u, n);
|
|
874
946
|
}
|
|
875
|
-
for (const [a,
|
|
876
|
-
if (typeof
|
|
877
|
-
for (const [
|
|
878
|
-
const
|
|
879
|
-
|
|
947
|
+
for (const [a, f] of Object.entries(n))
|
|
948
|
+
if (typeof f == "object" && f !== null && t.types[a] !== "string")
|
|
949
|
+
for (const [c, u] of Object.entries(f)) {
|
|
950
|
+
const F = t.types[a] ? t.types[a].replace("[]", "") : void 0;
|
|
951
|
+
f[c] = oe(u, t, F);
|
|
880
952
|
}
|
|
881
|
-
else typeof
|
|
882
|
-
return t.sort === !1 ? n : (t.sort === !0 ? Object.keys(n).sort() : Object.keys(n).sort(t.sort)).reduce((a,
|
|
883
|
-
const
|
|
884
|
-
return a[
|
|
953
|
+
else typeof f == "object" && f !== null && t.types[a] === "string" ? n[a] = Object.values(f).join(t.arrayFormatSeparator) : n[a] = oe(f, t, t.types[a]);
|
|
954
|
+
return t.sort === !1 ? n : (t.sort === !0 ? Object.keys(n).sort() : Object.keys(n).sort(t.sort)).reduce((a, f) => {
|
|
955
|
+
const c = n[f];
|
|
956
|
+
return a[f] = c && typeof c == "object" && !Array.isArray(c) ? de(c) : c, a;
|
|
885
957
|
}, /* @__PURE__ */ Object.create(null));
|
|
886
958
|
}
|
|
887
|
-
function
|
|
959
|
+
function me(e, t) {
|
|
888
960
|
if (!e)
|
|
889
961
|
return "";
|
|
890
962
|
t = {
|
|
@@ -893,202 +965,266 @@ function oe(e, t) {
|
|
|
893
965
|
arrayFormat: "none",
|
|
894
966
|
arrayFormatSeparator: ",",
|
|
895
967
|
...t
|
|
896
|
-
},
|
|
897
|
-
const r = (
|
|
898
|
-
for (const [
|
|
899
|
-
r(
|
|
900
|
-
const
|
|
901
|
-
return t.sort !== !1 &&
|
|
902
|
-
const
|
|
903
|
-
return
|
|
904
|
-
}).filter((
|
|
968
|
+
}, le(t.arrayFormatSeparator);
|
|
969
|
+
const r = (c) => t.skipNull && _e(e[c]) || t.skipEmptyString && e[c] === "", n = Le(t), a = {};
|
|
970
|
+
for (const [c, u] of Object.entries(e))
|
|
971
|
+
r(c) || (a[c] = u);
|
|
972
|
+
const f = Object.keys(a);
|
|
973
|
+
return t.sort !== !1 && f.sort(t.sort), f.map((c) => {
|
|
974
|
+
const u = e[c];
|
|
975
|
+
return u === void 0 ? "" : u === null ? O(c, t) : Array.isArray(u) ? u.length === 0 && t.arrayFormat === "bracket-separator" ? O(c, t) + "[]" : u.reduce(n(c), []).join("&") : O(c, t) + "=" + O(u, t);
|
|
976
|
+
}).filter((c) => c.length > 0).join("&");
|
|
905
977
|
}
|
|
906
|
-
function
|
|
978
|
+
function ye(e, t) {
|
|
907
979
|
var a;
|
|
908
980
|
t = {
|
|
909
981
|
decode: !0,
|
|
910
982
|
...t
|
|
911
983
|
};
|
|
912
|
-
let [r, n] =
|
|
984
|
+
let [r, n] = ue(e, "#");
|
|
913
985
|
return r === void 0 && (r = e), {
|
|
914
986
|
url: ((a = r == null ? void 0 : r.split("?")) == null ? void 0 : a[0]) ?? "",
|
|
915
|
-
query:
|
|
987
|
+
query: Y(X(e), t),
|
|
916
988
|
...t && t.parseFragmentIdentifier && n ? {
|
|
917
|
-
fragmentIdentifier:
|
|
989
|
+
fragmentIdentifier: U(n, t)
|
|
918
990
|
} : {}
|
|
919
991
|
};
|
|
920
992
|
}
|
|
921
|
-
function
|
|
993
|
+
function he(e, t) {
|
|
922
994
|
t = {
|
|
923
995
|
encode: !0,
|
|
924
996
|
strict: !0,
|
|
925
|
-
[
|
|
997
|
+
[G]: !0,
|
|
926
998
|
...t
|
|
927
999
|
};
|
|
928
|
-
const r =
|
|
929
|
-
...
|
|
1000
|
+
const r = pe(e.url).split("?")[0] || "", n = X(e.url), a = {
|
|
1001
|
+
...Y(n, {
|
|
930
1002
|
sort: !1
|
|
931
1003
|
}),
|
|
932
1004
|
...e.query
|
|
933
1005
|
};
|
|
934
|
-
let
|
|
935
|
-
|
|
936
|
-
let
|
|
1006
|
+
let f = me(a, t);
|
|
1007
|
+
f && (f = `?${f}`);
|
|
1008
|
+
let c = Be(e.url);
|
|
937
1009
|
if (typeof e.fragmentIdentifier == "string") {
|
|
938
|
-
const
|
|
939
|
-
|
|
1010
|
+
const u = new URL(r);
|
|
1011
|
+
u.hash = e.fragmentIdentifier, c = t[G] ? u.hash : `#${e.fragmentIdentifier}`;
|
|
940
1012
|
}
|
|
941
|
-
return `${r}${
|
|
1013
|
+
return `${r}${f}${c}`;
|
|
942
1014
|
}
|
|
943
|
-
function
|
|
1015
|
+
function ge(e, t, r) {
|
|
944
1016
|
r = {
|
|
945
1017
|
parseFragmentIdentifier: !0,
|
|
946
|
-
[
|
|
1018
|
+
[G]: !1,
|
|
947
1019
|
...r
|
|
948
1020
|
};
|
|
949
1021
|
const {
|
|
950
1022
|
url: n,
|
|
951
1023
|
query: a,
|
|
952
|
-
fragmentIdentifier:
|
|
953
|
-
} =
|
|
954
|
-
return
|
|
1024
|
+
fragmentIdentifier: f
|
|
1025
|
+
} = ye(e, r);
|
|
1026
|
+
return he({
|
|
955
1027
|
url: n,
|
|
956
|
-
query:
|
|
957
|
-
fragmentIdentifier:
|
|
1028
|
+
query: Ue(a, t),
|
|
1029
|
+
fragmentIdentifier: f
|
|
958
1030
|
}, r);
|
|
959
1031
|
}
|
|
960
|
-
function
|
|
961
|
-
const n = Array.isArray(t) ? (a) => !t.includes(a) : (a,
|
|
962
|
-
return
|
|
1032
|
+
function ze(e, t, r) {
|
|
1033
|
+
const n = Array.isArray(t) ? (a) => !t.includes(a) : (a, f) => !t(a, f);
|
|
1034
|
+
return ge(e, n, r);
|
|
963
1035
|
}
|
|
964
|
-
const
|
|
1036
|
+
const Q = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
965
1037
|
__proto__: null,
|
|
966
|
-
exclude:
|
|
967
|
-
extract:
|
|
968
|
-
parse:
|
|
969
|
-
parseUrl:
|
|
970
|
-
pick:
|
|
971
|
-
stringify:
|
|
972
|
-
stringifyUrl:
|
|
1038
|
+
exclude: ze,
|
|
1039
|
+
extract: X,
|
|
1040
|
+
parse: Y,
|
|
1041
|
+
parseUrl: ye,
|
|
1042
|
+
pick: ge,
|
|
1043
|
+
stringify: me,
|
|
1044
|
+
stringifyUrl: he
|
|
973
1045
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1046
|
+
function ie(e, t) {
|
|
1047
|
+
var r = Object.keys(e);
|
|
1048
|
+
if (Object.getOwnPropertySymbols) {
|
|
1049
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
1050
|
+
t && (n = n.filter(function(a) {
|
|
1051
|
+
return Object.getOwnPropertyDescriptor(e, a).enumerable;
|
|
1052
|
+
})), r.push.apply(r, n);
|
|
1053
|
+
}
|
|
1054
|
+
return r;
|
|
1055
|
+
}
|
|
1056
|
+
function ce(e) {
|
|
1057
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
1058
|
+
var r = arguments[t] != null ? arguments[t] : {};
|
|
1059
|
+
t % 2 ? ie(Object(r), !0).forEach(function(n) {
|
|
1060
|
+
He(e, n, r[n]);
|
|
1061
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : ie(Object(r)).forEach(function(n) {
|
|
1062
|
+
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
|
|
1063
|
+
});
|
|
1064
|
+
}
|
|
1065
|
+
return e;
|
|
1066
|
+
}
|
|
1067
|
+
function He(e, t, r) {
|
|
1068
|
+
return (t = Ve(t)) in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
1069
|
+
}
|
|
1070
|
+
function Ve(e) {
|
|
1071
|
+
var t = Ke(e, "string");
|
|
1072
|
+
return typeof t == "symbol" ? t : t + "";
|
|
1073
|
+
}
|
|
1074
|
+
function Ke(e, t) {
|
|
1075
|
+
if (typeof e != "object" || !e) return e;
|
|
1076
|
+
var r = e[Symbol.toPrimitive];
|
|
1077
|
+
if (r !== void 0) {
|
|
1078
|
+
var n = r.call(e, t);
|
|
1079
|
+
if (typeof n != "object") return n;
|
|
1080
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1081
|
+
}
|
|
1082
|
+
return (t === "string" ? String : Number)(e);
|
|
1083
|
+
}
|
|
974
1084
|
function Ge(e) {
|
|
975
1085
|
const {
|
|
976
1086
|
base: t = "/",
|
|
977
1087
|
routes: r
|
|
978
|
-
} = e, n =
|
|
1088
|
+
} = e, n = B({
|
|
1089
|
+
skipUpdate: !1
|
|
1090
|
+
}, {
|
|
1091
|
+
name: "$meta",
|
|
1092
|
+
sid: "ku65ys"
|
|
1093
|
+
}), a = B(null, {
|
|
979
1094
|
and: {
|
|
980
1095
|
serialize: "ignore"
|
|
981
1096
|
},
|
|
982
1097
|
name: "$history",
|
|
983
|
-
sid: "
|
|
984
|
-
}),
|
|
985
|
-
and: {
|
|
986
|
-
serialize: "ignore"
|
|
987
|
-
},
|
|
988
|
-
name: "$activeRoutes",
|
|
989
|
-
sid: "mastmv"
|
|
990
|
-
}), s = A({}, {
|
|
1098
|
+
sid: "23j1rc"
|
|
1099
|
+
}), f = B({}, {
|
|
991
1100
|
name: "$query",
|
|
992
|
-
sid: "
|
|
993
|
-
}),
|
|
1101
|
+
sid: "3deub8"
|
|
1102
|
+
}), c = B(null, {
|
|
994
1103
|
name: "$path",
|
|
995
|
-
sid: "
|
|
996
|
-
}),
|
|
1104
|
+
sid: "ld3nhr"
|
|
1105
|
+
}), u = E({
|
|
997
1106
|
name: "setHistory",
|
|
998
|
-
sid: "
|
|
999
|
-
}),
|
|
1107
|
+
sid: "hzl7xm"
|
|
1108
|
+
}), F = E({
|
|
1000
1109
|
name: "navigate",
|
|
1001
|
-
sid: "-
|
|
1002
|
-
}),
|
|
1110
|
+
sid: "-82vbjo"
|
|
1111
|
+
}), D = E({
|
|
1003
1112
|
name: "back",
|
|
1004
|
-
sid: "-
|
|
1005
|
-
}),
|
|
1113
|
+
sid: "-icnnoo"
|
|
1114
|
+
}), v = E({
|
|
1006
1115
|
name: "forward",
|
|
1007
|
-
sid: "-
|
|
1008
|
-
}),
|
|
1116
|
+
sid: "-72o1my"
|
|
1117
|
+
}), P = E({
|
|
1009
1118
|
name: "locationUpdated",
|
|
1010
|
-
sid: "
|
|
1011
|
-
}),
|
|
1012
|
-
let
|
|
1013
|
-
const
|
|
1014
|
-
for (
|
|
1015
|
-
|
|
1016
|
-
const
|
|
1119
|
+
sid: "d8lu52"
|
|
1120
|
+
}), A = r.map((g) => {
|
|
1121
|
+
let b = g;
|
|
1122
|
+
const m = [];
|
|
1123
|
+
for (m.unshift(b.internal.path); b.internal.parent; )
|
|
1124
|
+
b = b.internal.parent, b.internal.path !== "/" && m.unshift(b.internal.path);
|
|
1125
|
+
const x = t === "/" ? m.join("") : [t, ...m].join("");
|
|
1017
1126
|
return {
|
|
1018
|
-
route:
|
|
1019
|
-
path:
|
|
1020
|
-
toPath:
|
|
1021
|
-
fromPath:
|
|
1127
|
+
route: g,
|
|
1128
|
+
path: x,
|
|
1129
|
+
toPath: re.compile(x),
|
|
1130
|
+
fromPath: re.match(x)
|
|
1022
1131
|
};
|
|
1023
|
-
}),
|
|
1132
|
+
}), $ = c.map((g) => {
|
|
1133
|
+
const b = [];
|
|
1134
|
+
for (const {
|
|
1135
|
+
route: m,
|
|
1136
|
+
fromPath: x
|
|
1137
|
+
} of A)
|
|
1138
|
+
x(g) && b.push(m);
|
|
1139
|
+
return b;
|
|
1140
|
+
}), j = J({
|
|
1024
1141
|
and: {
|
|
1025
1142
|
source: {
|
|
1026
|
-
history:
|
|
1143
|
+
history: a,
|
|
1144
|
+
meta: n
|
|
1027
1145
|
},
|
|
1028
|
-
effect: async (
|
|
1146
|
+
effect: async (g, b) => {
|
|
1029
1147
|
let {
|
|
1030
|
-
history:
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1148
|
+
history: m,
|
|
1149
|
+
meta: x
|
|
1150
|
+
} = g, {
|
|
1151
|
+
path: _,
|
|
1152
|
+
query: I,
|
|
1153
|
+
replace: i
|
|
1154
|
+
} = b;
|
|
1155
|
+
if (!m)
|
|
1037
1156
|
throw new Error("history not found");
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1157
|
+
if (x.skipUpdate) {
|
|
1158
|
+
x.skipUpdate = !1;
|
|
1159
|
+
return;
|
|
1160
|
+
}
|
|
1161
|
+
const o = {
|
|
1162
|
+
pathname: _,
|
|
1163
|
+
search: "?".concat(Q.stringify(I))
|
|
1041
1164
|
};
|
|
1042
|
-
|
|
1165
|
+
i ? m.replace(o) : m.push(o, {
|
|
1166
|
+
skipUpdate: !0
|
|
1167
|
+
});
|
|
1043
1168
|
}
|
|
1044
1169
|
},
|
|
1045
1170
|
or: {
|
|
1046
1171
|
name: "navigateFx",
|
|
1047
|
-
sid: "
|
|
1172
|
+
sid: "sry1hc"
|
|
1048
1173
|
}
|
|
1049
|
-
}),
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1174
|
+
}), y = J({
|
|
1175
|
+
and: {
|
|
1176
|
+
source: n,
|
|
1177
|
+
effect: (g, b) => {
|
|
1178
|
+
var m;
|
|
1179
|
+
const x = xe(P);
|
|
1180
|
+
if (x({
|
|
1181
|
+
pathname: b.location.pathname,
|
|
1182
|
+
query: ce({}, Q.parse(b.location.search)),
|
|
1183
|
+
state: (m = b.location.state) !== null && m !== void 0 ? m : {}
|
|
1184
|
+
}), !b)
|
|
1185
|
+
throw new Error();
|
|
1186
|
+
b.listen((_) => {
|
|
1187
|
+
var I;
|
|
1188
|
+
let {
|
|
1189
|
+
location: i
|
|
1190
|
+
} = _;
|
|
1191
|
+
const o = (I = i.state) !== null && I !== void 0 ? I : {};
|
|
1192
|
+
o.skipUpdate && (g.skipUpdate = !0), x({
|
|
1193
|
+
pathname: i.pathname,
|
|
1194
|
+
query: ce({}, Q.parse(i.search)),
|
|
1195
|
+
state: o
|
|
1196
|
+
});
|
|
1197
|
+
});
|
|
1198
|
+
}
|
|
1199
|
+
},
|
|
1200
|
+
or: {
|
|
1201
|
+
name: "subscribeHistoryFx",
|
|
1202
|
+
sid: "-9srjw2"
|
|
1203
|
+
}
|
|
1204
|
+
}), k = J({
|
|
1069
1205
|
and: {
|
|
1070
1206
|
source: {
|
|
1071
|
-
query:
|
|
1072
|
-
path:
|
|
1207
|
+
query: f,
|
|
1208
|
+
path: c
|
|
1073
1209
|
},
|
|
1074
|
-
effect: async (
|
|
1210
|
+
effect: async (g) => {
|
|
1075
1211
|
let {
|
|
1076
|
-
query:
|
|
1077
|
-
path:
|
|
1078
|
-
} =
|
|
1212
|
+
query: b,
|
|
1213
|
+
path: m
|
|
1214
|
+
} = g;
|
|
1079
1215
|
for (const {
|
|
1080
|
-
route:
|
|
1081
|
-
fromPath:
|
|
1082
|
-
} of
|
|
1083
|
-
const
|
|
1084
|
-
if (
|
|
1085
|
-
await
|
|
1086
|
-
query:
|
|
1087
|
-
params:
|
|
1216
|
+
route: x,
|
|
1217
|
+
fromPath: _
|
|
1218
|
+
} of A) {
|
|
1219
|
+
const I = _(m);
|
|
1220
|
+
if (I)
|
|
1221
|
+
await x.internal.openFx({
|
|
1222
|
+
query: b,
|
|
1223
|
+
params: I.params,
|
|
1088
1224
|
historyIgnore: !0
|
|
1089
1225
|
});
|
|
1090
1226
|
else {
|
|
1091
|
-
|
|
1227
|
+
x.internal.close();
|
|
1092
1228
|
continue;
|
|
1093
1229
|
}
|
|
1094
1230
|
}
|
|
@@ -1096,138 +1232,131 @@ function Ge(e) {
|
|
|
1096
1232
|
},
|
|
1097
1233
|
or: {
|
|
1098
1234
|
name: "openRoutesByPathFx",
|
|
1099
|
-
sid: "-
|
|
1235
|
+
sid: "-ro72fe"
|
|
1100
1236
|
}
|
|
1101
1237
|
});
|
|
1102
1238
|
for (const {
|
|
1103
|
-
route:
|
|
1104
|
-
toPath:
|
|
1105
|
-
} of
|
|
1106
|
-
|
|
1239
|
+
route: g,
|
|
1240
|
+
toPath: b
|
|
1241
|
+
} of A)
|
|
1242
|
+
S({
|
|
1107
1243
|
and: [{
|
|
1108
|
-
clock:
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
target: a
|
|
1113
|
-
}],
|
|
1114
|
-
or: {
|
|
1115
|
-
sid: "f0qyp9"
|
|
1116
|
-
}
|
|
1117
|
-
}), w({
|
|
1118
|
-
and: [{
|
|
1119
|
-
clock: l.opened,
|
|
1120
|
-
filter: (f) => !(f != null && f.historyIgnore),
|
|
1121
|
-
fn: (f) => {
|
|
1122
|
-
var b;
|
|
1244
|
+
clock: g.opened,
|
|
1245
|
+
filter: (m) => !(m != null && m.historyIgnore),
|
|
1246
|
+
fn: (m) => {
|
|
1247
|
+
var x;
|
|
1123
1248
|
return {
|
|
1124
|
-
path:
|
|
1125
|
-
query: (
|
|
1126
|
-
replace:
|
|
1249
|
+
path: b(m && "params" in m ? m.params : void 0),
|
|
1250
|
+
query: (x = m == null ? void 0 : m.query) !== null && x !== void 0 ? x : {},
|
|
1251
|
+
replace: m == null ? void 0 : m.replace
|
|
1127
1252
|
};
|
|
1128
1253
|
},
|
|
1129
|
-
target:
|
|
1130
|
-
}],
|
|
1131
|
-
or: {
|
|
1132
|
-
sid: "fgozwq"
|
|
1133
|
-
}
|
|
1134
|
-
}), w({
|
|
1135
|
-
and: [{
|
|
1136
|
-
clock: l.closed,
|
|
1137
|
-
source: a,
|
|
1138
|
-
fn: (f) => f.filter((b) => b !== l),
|
|
1139
|
-
target: a
|
|
1254
|
+
target: F
|
|
1140
1255
|
}],
|
|
1141
1256
|
or: {
|
|
1142
|
-
sid: "
|
|
1257
|
+
sid: "gfvtvu"
|
|
1143
1258
|
}
|
|
1144
1259
|
});
|
|
1145
|
-
return
|
|
1260
|
+
return S({
|
|
1146
1261
|
and: [{
|
|
1147
|
-
clock:
|
|
1148
|
-
target:
|
|
1262
|
+
clock: u,
|
|
1263
|
+
target: a
|
|
1149
1264
|
}],
|
|
1150
1265
|
or: {
|
|
1151
|
-
sid: "
|
|
1266
|
+
sid: "hbrw92"
|
|
1152
1267
|
}
|
|
1153
|
-
}),
|
|
1268
|
+
}), S({
|
|
1154
1269
|
and: [{
|
|
1155
|
-
clock:
|
|
1270
|
+
clock: a,
|
|
1156
1271
|
filter: Boolean,
|
|
1157
|
-
target:
|
|
1272
|
+
target: y
|
|
1158
1273
|
}],
|
|
1159
1274
|
or: {
|
|
1160
|
-
sid: "
|
|
1275
|
+
sid: "heiv7v"
|
|
1161
1276
|
}
|
|
1162
|
-
}),
|
|
1277
|
+
}), S({
|
|
1163
1278
|
and: [{
|
|
1164
|
-
clock:
|
|
1165
|
-
fn: (
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
target: [de({
|
|
1173
|
-
sid: "-3mx9rg",
|
|
1174
|
-
fn: () => pe({
|
|
1279
|
+
clock: P,
|
|
1280
|
+
fn: (g) => ({
|
|
1281
|
+
path: g.pathname,
|
|
1282
|
+
query: g.query
|
|
1283
|
+
}),
|
|
1284
|
+
target: Oe({
|
|
1285
|
+
sid: "-f70n8p",
|
|
1286
|
+
fn: () => Fe({
|
|
1175
1287
|
targets: {
|
|
1176
|
-
path:
|
|
1177
|
-
query:
|
|
1288
|
+
path: c,
|
|
1289
|
+
query: f
|
|
1178
1290
|
}
|
|
1179
1291
|
}),
|
|
1180
1292
|
name: "target",
|
|
1181
1293
|
method: "spread"
|
|
1182
|
-
})
|
|
1294
|
+
})
|
|
1183
1295
|
}],
|
|
1184
1296
|
or: {
|
|
1185
|
-
sid: "
|
|
1297
|
+
sid: "htdb8m"
|
|
1186
1298
|
}
|
|
1187
|
-
}),
|
|
1299
|
+
}), S({
|
|
1188
1300
|
and: [{
|
|
1189
|
-
clock:
|
|
1190
|
-
|
|
1301
|
+
clock: P,
|
|
1302
|
+
fn: (g) => ({
|
|
1303
|
+
path: g.pathname,
|
|
1304
|
+
query: g.query
|
|
1305
|
+
}),
|
|
1306
|
+
target: k
|
|
1191
1307
|
}],
|
|
1192
1308
|
or: {
|
|
1193
|
-
sid: "
|
|
1309
|
+
sid: "icm409"
|
|
1194
1310
|
}
|
|
1195
|
-
}),
|
|
1311
|
+
}), S({
|
|
1196
1312
|
and: [{
|
|
1197
|
-
clock:
|
|
1313
|
+
clock: F,
|
|
1314
|
+
target: j
|
|
1315
|
+
}],
|
|
1316
|
+
or: {
|
|
1317
|
+
sid: "sr2036"
|
|
1318
|
+
}
|
|
1319
|
+
}), S({
|
|
1320
|
+
and: [{
|
|
1321
|
+
clock: [f, c],
|
|
1198
1322
|
source: {
|
|
1199
|
-
query:
|
|
1200
|
-
path:
|
|
1323
|
+
query: f,
|
|
1324
|
+
path: c
|
|
1201
1325
|
},
|
|
1202
|
-
fn: (
|
|
1203
|
-
target:
|
|
1326
|
+
fn: (g) => g,
|
|
1327
|
+
target: F
|
|
1204
1328
|
}],
|
|
1205
1329
|
or: {
|
|
1206
|
-
sid: "
|
|
1330
|
+
sid: "t5cnik"
|
|
1207
1331
|
}
|
|
1208
1332
|
}), {
|
|
1209
|
-
$query:
|
|
1210
|
-
$path:
|
|
1211
|
-
$activeRoutes:
|
|
1212
|
-
back:
|
|
1213
|
-
forward:
|
|
1214
|
-
navigate:
|
|
1333
|
+
$query: f,
|
|
1334
|
+
$path: c,
|
|
1335
|
+
$activeRoutes: $,
|
|
1336
|
+
back: D,
|
|
1337
|
+
forward: v,
|
|
1338
|
+
navigate: F,
|
|
1215
1339
|
routes: r,
|
|
1216
|
-
setHistory:
|
|
1217
|
-
mappedRoutes:
|
|
1218
|
-
trackQuery: De(
|
|
1340
|
+
setHistory: u,
|
|
1341
|
+
mappedRoutes: A,
|
|
1342
|
+
trackQuery: De({
|
|
1343
|
+
$activeRoutes: $,
|
|
1344
|
+
$path: c,
|
|
1345
|
+
$query: f,
|
|
1346
|
+
navigateFx: j
|
|
1347
|
+
}),
|
|
1219
1348
|
"@@unitShape": () => ({
|
|
1220
|
-
query:
|
|
1221
|
-
path:
|
|
1222
|
-
activeRoutes:
|
|
1223
|
-
onBack:
|
|
1224
|
-
onForward:
|
|
1225
|
-
onNavigate:
|
|
1349
|
+
query: f,
|
|
1350
|
+
path: c,
|
|
1351
|
+
activeRoutes: $,
|
|
1352
|
+
onBack: D,
|
|
1353
|
+
onForward: v,
|
|
1354
|
+
onNavigate: F
|
|
1226
1355
|
})
|
|
1227
1356
|
};
|
|
1228
1357
|
}
|
|
1229
1358
|
export {
|
|
1230
1359
|
We as createRoute,
|
|
1231
1360
|
Ge as createRouter,
|
|
1232
|
-
|
|
1361
|
+
T as parameters
|
|
1233
1362
|
};
|