@argon-router/core 0.5.0 → 0.6.0

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