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