@fox-js/fox 3.1.1-25 → 3.1.1-27

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/libs/index.esm.js CHANGED
@@ -1,16 +1,16 @@
1
- import { defineComponent as _r, effectScope as us, getCurrentScope as Cr, h as he, hasInjectionContext as fs, inject as N, onActivated as cs, onDeactivated as hs, onScopeDispose as Fe, provide as te, reactive as ys, readonly as ds, ref as ms, shallowReactive as vs, shallowRef as Ar, toRaw as Bt, watch as ps } from "vue";
2
- var Pe = typeof window < "u", C = function() {
1
+ import { defineComponent as jr, effectScope as fs, getCurrentScope as Kr, h as he, hasInjectionContext as _e, inject as N, onActivated as cs, onDeactivated as hs, onScopeDispose as Fe, provide as te, reactive as ys, readonly as ds, ref as ms, shallowReactive as vs, shallowRef as Lr, toRaw as Ht, watch as ps } from "vue";
2
+ var Ee = typeof window < "u", C = function() {
3
3
  return window;
4
- }, Ve = function() {
4
+ }, Je = function() {
5
5
  return window.document;
6
6
  };
7
- function at(e, t, r, s = !1) {
7
+ function ft(e, t, r, s = !1) {
8
8
  e.addEventListener ? e.addEventListener(t, r, s) : e.attachEvent ? e.attachEvent(`on${t}`, r) : e[`on${t}`] = r;
9
9
  }
10
- function Wt(e, t, r) {
10
+ function Zt(e, t, r) {
11
11
  e.removeEventListener ? e.removeEventListener(t, r) : e.detachEvent ? e.detachEvent(`on${t}`, r) : e[`on${t}`] = null;
12
12
  }
13
- var We = (e, t, r) => {
13
+ var ze = (e, t, r) => {
14
14
  t = t ?? {
15
15
  bubbles: !1,
16
16
  cancelable: !1,
@@ -20,35 +20,35 @@ var We = (e, t, r) => {
20
20
  let i = !0, n = !0;
21
21
  for (let o in t) o === "bubbles" ? i = !!t[o] : o === "cancelable" ? n = !!t[o] : s[o] = t[o];
22
22
  s.initEvent(e, i, n), (r ?? document).dispatchEvent(s);
23
- }, er = Array.isArray, ji = (e) => Jt(e) === "[object Map]", Li = (e) => Jt(e) === "[object Set]", Mi = (e) => e instanceof Date, b = (e) => typeof e == "function", Ti = (e) => typeof e == "string", ki = (e) => typeof e == "symbol", gs = (e) => e !== null && typeof e == "object", Ii = (e) => gs(e) && b(e.then) && b(e.catch), Ue = (e) => e == null, ws = Object.prototype.toString, Jt = (e) => ws.call(e), bs = (e) => Jt(e) === "[object Object]", Rs = typeof Symbol == "function" && typeof Symbol.toStringTag == "symbol";
24
- function zt(e) {
23
+ }, or = Array.isArray, Ki = (e) => Yt(e) === "[object Map]", Li = (e) => Yt(e) === "[object Set]", Mi = (e) => e instanceof Date, w = (e) => typeof e == "function", ki = (e) => typeof e == "string", Ti = (e) => typeof e == "symbol", gs = (e) => e !== null && typeof e == "object", Ii = (e) => gs(e) && w(e.then) && w(e.catch), We = (e) => e == null, bs = Object.prototype.toString, Yt = (e) => bs.call(e), ws = (e) => Yt(e) === "[object Object]", Rs = typeof Symbol == "function" && typeof Symbol.toStringTag == "symbol";
24
+ function er(e) {
25
25
  return e.__esModule || Rs && e[Symbol.toStringTag] === "Module";
26
26
  }
27
27
  var xs = typeof Promise < "u" && Promise.toString().indexOf("[native code]") !== -1;
28
- function $(...e) {
28
+ function j(...e) {
29
29
  let t = e[0] !== void 0 && e[0] !== null ? e[0] : {}, r = 1, s = e.length, i = !1;
30
30
  for (typeof t == "boolean" && (i = t, t = e[r] ?? {}, r++), typeof t != "object" && (t = {}); r < s; r++) if (e[r] !== null && e[r] !== void 0) {
31
31
  let n = e[r];
32
32
  for (let o in n) {
33
- let u = t[o], l = n[o];
34
- if (u !== l)
35
- if (i === !0 && l && typeof l == "object") {
36
- let a;
37
- Array.isArray(l) ? a = u && Array.isArray(u) ? u : [] : a = u && typeof u == "object" ? u : {}, t[o] = $(i, a, l);
38
- } else l !== void 0 && (t[o] = l);
33
+ let l = t[o], a = n[o];
34
+ if (l !== a)
35
+ if (i === !0 && a && typeof a == "object") {
36
+ let u;
37
+ Array.isArray(a) ? u = l && Array.isArray(l) ? l : [] : u = l && typeof l == "object" ? l : {}, t[o] = j(i, u, a);
38
+ } else a !== void 0 && (t[o] = a);
39
39
  }
40
40
  }
41
41
  return t;
42
42
  }
43
- function qr(e, t, r = !1) {
43
+ function Mr(e, t, r = !1) {
44
44
  if (typeof t != "object") return {};
45
45
  typeof e != "object" && (e = {});
46
46
  for (let s of Reflect.ownKeys(t)) {
47
47
  let i = e[s], n = t[s];
48
48
  if (i !== n)
49
49
  if (typeof n == "object") {
50
- if (!Array.isArray(n) && !bs(n)) continue;
51
- i = qr(i, n, r), e[s] = i;
50
+ if (!Array.isArray(n) && !ws(n)) continue;
51
+ i = Mr(i, n, r), e[s] = i;
52
52
  } else {
53
53
  if (typeof n == "function") continue;
54
54
  e[s] = n;
@@ -56,21 +56,21 @@ function qr(e, t, r = !1) {
56
56
  }
57
57
  return e;
58
58
  }
59
- var Be = class Dt {
59
+ var De = class Nt {
60
60
  static seed = (/* @__PURE__ */ new Date()).getTime();
61
61
  static get() {
62
- let t = ++Dt.seed;
63
- return t >= Number.MAX_VALUE && (Dt.seed = 0), t;
62
+ let t = ++Nt.seed;
63
+ return t >= Number.MAX_VALUE && (Nt.seed = 0), t;
64
64
  }
65
- }, pt = xs ? Promise.resolve() : null;
66
- function De(e, ...t) {
67
- pt !== null ? t && t.length > 0 ? pt.then(() => {
65
+ }, gt = xs ? Promise.resolve() : null;
66
+ function He(e, ...t) {
67
+ gt !== null ? t && t.length > 0 ? gt.then(() => {
68
68
  e(t);
69
- }) : pt.then(e) : t && t.length > 0 ? setTimeout(() => {
69
+ }) : gt.then(e) : t && t.length > 0 ? setTimeout(() => {
70
70
  e(t);
71
71
  }) : setTimeout(e);
72
72
  }
73
- function Kr(e) {
73
+ function kr(e) {
74
74
  return e == null ? !1 : typeof e == "boolean" ? e : typeof e == "string" ? e.toLocaleLowerCase() === "true" : !!e;
75
75
  }
76
76
  function Oi(e) {
@@ -86,46 +86,46 @@ var Ss = {
86
86
  "[object RegExp]": "regExp",
87
87
  "[object Object]": "object"
88
88
  };
89
- function tr(e) {
89
+ function lr(e) {
90
90
  let t = Object.prototype.toString.call(e);
91
91
  return e == null ? String(e) : Ss[t] || "object";
92
92
  }
93
- function rr(e, t) {
93
+ function ar(e, t) {
94
94
  if (e == t) return !0;
95
95
  if (e === void 0 || t === void 0) return !1;
96
- let r = tr(e);
97
- if (r !== tr(t)) return !1;
96
+ let r = lr(e);
97
+ if (r !== lr(t)) return !1;
98
98
  if (r === "object") {
99
99
  let s = Object.keys(e), i = Object.keys(t);
100
100
  if (s.length !== i.length) return !1;
101
101
  for (let n = 0; n < s.length; n++) {
102
- let o = s[n], u = e[o], l = t[o];
103
- if (!rr(u, l)) return !1;
102
+ let o = s[n], l = e[o], a = t[o];
103
+ if (!ar(l, a)) return !1;
104
104
  }
105
105
  return !0;
106
106
  } else if (r === "array") {
107
107
  if (e.length !== t.length) return !1;
108
108
  for (let s = 0; s < e.length; s++) {
109
109
  let i = e[s], n = t[s];
110
- if (!rr(i, n)) return !1;
110
+ if (!ar(i, n)) return !1;
111
111
  }
112
112
  return !0;
113
113
  }
114
114
  return !1;
115
115
  }
116
- var $r = (e) => {
116
+ var Tr = (e) => {
117
117
  const t = {};
118
118
  for (let r of Reflect.ownKeys(e)) {
119
119
  let s = e[r];
120
- s && !Array.isArray(s) && typeof s == "object" && (s = $r(s)), typeof r == "symbol" ? t[String(r)] = s : t[r] = s;
120
+ s && !Array.isArray(s) && typeof s == "object" && (s = Tr(s)), typeof r == "symbol" ? t[String(r)] = s : t[r] = s;
121
121
  }
122
122
  return t;
123
- }, Ps = /^Symbol\((.*)\)$/, jr = (e) => {
123
+ }, Es = /^Symbol\((.*)\)$/, Ir = (e) => {
124
124
  const t = {};
125
125
  for (let r of Reflect.ownKeys(e)) {
126
126
  let s = e[r];
127
- s && !Array.isArray(s) && typeof s == "object" && (s = jr(s));
128
- const i = Ps.exec(r);
127
+ s && !Array.isArray(s) && typeof s == "object" && (s = Ir(s));
128
+ const i = Es.exec(r);
129
129
  if (i && i[1]) {
130
130
  const n = Symbol.for(i[1]);
131
131
  t[n] = s;
@@ -133,7 +133,7 @@ var $r = (e) => {
133
133
  }
134
134
  return t;
135
135
  };
136
- function Lr(e, t) {
136
+ function Or(e, t) {
137
137
  let r = null;
138
138
  return function(...s) {
139
139
  r && clearTimeout(r), r = setTimeout(() => {
@@ -141,45 +141,45 @@ function Lr(e, t) {
141
141
  }, t);
142
142
  };
143
143
  }
144
- var sr = /* @__PURE__ */ Symbol("idKey"), me = /* @__PURE__ */ Symbol("valueKey"), R = /* @__PURE__ */ Symbol("childrenKey"), X = /* @__PURE__ */ Symbol("growKey"), Mr = class {
144
+ var ur = /* @__PURE__ */ Symbol("idKey"), me = /* @__PURE__ */ Symbol("valueKey"), R = /* @__PURE__ */ Symbol("childrenKey"), X = /* @__PURE__ */ Symbol("growKey"), Br = class {
145
145
  [X] = !0;
146
- [sr];
146
+ [ur];
147
147
  [me] = ms();
148
148
  [R] = /* @__PURE__ */ new Map();
149
149
  constructor(e) {
150
- this[sr] = e;
150
+ this[ur] = e;
151
151
  }
152
- }, Es = class {
152
+ }, Ps = class {
153
153
  get(e, t) {
154
154
  if (t == "value") return e[me].value;
155
155
  if (t === "grow") return e[X];
156
156
  let r = e[R].get(t);
157
- if (r) return Ne(r);
157
+ if (r) return Ue(r);
158
158
  if (e[X])
159
- return r = Xt(t), r[X] = e[X], e[R].set(t, r), Ne(r);
159
+ return r = rr(t), r[X] = e[X], e[R].set(t, r), Ue(r);
160
160
  }
161
161
  set(e, t, r) {
162
- return t == "value" ? (e[me].value = r, !0) : t === "grow" ? (e[X] = Kr(r), !0) : r == null ? (e[R].delete(t), !0) : (console.error(`[Fox]illegal property:${t}`), !1);
162
+ return t == "value" ? (e[me].value = r, !0) : t === "grow" ? (e[X] = kr(r), !0) : r == null ? (e[R].delete(t), !0) : (console.error(`[Fox]illegal property:${t}`), !1);
163
163
  }
164
164
  deleteProperty(e, t) {
165
165
  return t === "value" || t == "grow" ? (console.error(`[Fox]can not delete property:${String(t)}`), !1) : (e[R].delete(t), !0);
166
166
  }
167
- }, Gt = "__proxy__";
168
- function Xt(e) {
169
- const t = new Mr(e);
170
- return Reflect.set(t, Gt, new Proxy(t, new Es())), t;
167
+ }, tr = "__proxy__";
168
+ function rr(e) {
169
+ const t = new Br(e);
170
+ return Reflect.set(t, tr, new Proxy(t, new Ps())), t;
171
171
  }
172
- function Ne(e) {
173
- return Reflect.get(e, Gt);
172
+ function Ue(e) {
173
+ return Reflect.get(e, tr);
174
174
  }
175
- var Fs = class {
175
+ var _s = class {
176
176
  name = "";
177
177
  persistPolicy = "memory";
178
178
  storage;
179
179
  initFlag = !1;
180
180
  state = {};
181
181
  constructor(e = {}, t) {
182
- if (e.persistPolicy && e.persistPolicy !== "memory" && Ue(e.name)) throw new Error("name can not be empty, where persistPolicy is not memory.");
182
+ if (e.persistPolicy && e.persistPolicy !== "memory" && We(e.name)) throw new Error("name can not be empty, where persistPolicy is not memory.");
183
183
  this.name = e.name ?? "", this.persistPolicy = e.persistPolicy ?? "memory", this.storage = e.storage, t && typeof t == "object" && Object.assign(this.state, t);
184
184
  }
185
185
  init(e) {
@@ -189,7 +189,7 @@ var Fs = class {
189
189
  if (!this.persistPolicy || this.persistPolicy === "memory") return null;
190
190
  let e = null;
191
191
  if (this.persistPolicy === "custom") e = this.storage;
192
- else if (Pe) {
192
+ else if (Ee) {
193
193
  const t = C();
194
194
  e = this.persistPolicy === "session" ? t.sessionStorage : t.localStorage;
195
195
  }
@@ -218,8 +218,8 @@ var Fs = class {
218
218
  const i = JSON.parse(s);
219
219
  Object.assign(this.state, i), Reflect.ownKeys(this.state).forEach((n) => {
220
220
  if (typeof n != "string") return;
221
- const o = this.state[n], u = n.split(/\//g);
222
- u.push(o), Reflect.apply(e.put, e, u);
221
+ const o = this.state[n], l = n.split(/\//g);
222
+ l.push(o), Reflect.apply(e.put, e, l);
223
223
  });
224
224
  }
225
225
  }
@@ -251,10 +251,10 @@ var Fs = class {
251
251
  console.error(e);
252
252
  }
253
253
  }
254
- }, Tr = class extends Mr {
254
+ }, Dr = class extends Br {
255
255
  _persistHandler;
256
256
  constructor(e = {}, t) {
257
- super("__root__"), this._persistHandler = new Fs(e, t), this._persistHandler.init(this);
257
+ super("__root__"), this._persistHandler = new _s(e, t), this._persistHandler.init(this);
258
258
  }
259
259
  put(...e) {
260
260
  let t = e.length;
@@ -263,7 +263,7 @@ var Fs = class {
263
263
  let r = this;
264
264
  for (let s = 0; s < t - 1; s++) {
265
265
  let i = e[s], n;
266
- r[R].has(i) ? n = r[R].get(i) : (n = Xt(i), r[R].set(i, n)), r = n;
266
+ r[R].has(i) ? n = r[R].get(i) : (n = rr(i), r[R].set(i, n)), r = n;
267
267
  }
268
268
  return r[me].value = e[t - 1], this._persistHandler.put(e), !0;
269
269
  }
@@ -305,7 +305,7 @@ var Fs = class {
305
305
  clear() {
306
306
  this[R].clear(), this._persistHandler.clear();
307
307
  }
308
- }, _s = [
308
+ }, Fs = [
309
309
  "put",
310
310
  "get",
311
311
  "contains",
@@ -313,48 +313,48 @@ var Fs = class {
313
313
  "clear",
314
314
  "_persistHandler"
315
315
  ];
316
- function ir(e) {
317
- return _s.includes(e);
316
+ function fr(e) {
317
+ return Fs.includes(e);
318
318
  }
319
319
  var Cs = class {
320
320
  get(e, t) {
321
321
  if (t == "value") return e[me].value;
322
322
  if (t === "grow") return e[X];
323
323
  if (t === R) return e[R];
324
- if (typeof t == "string" && ir(t)) return e[t];
324
+ if (typeof t == "string" && fr(t)) return e[t];
325
325
  const r = String(t);
326
326
  let s = e[R].get(r);
327
- if (s) return Ne(s);
327
+ if (s) return Ue(s);
328
328
  if (e[X])
329
- return s = Xt(r), s[X] = e[X], e[R].set(r, s), Ne(s);
329
+ return s = rr(r), s[X] = e[X], e[R].set(r, s), Ue(s);
330
330
  }
331
331
  set(e, t, r) {
332
- return t == "value" ? (e[me].value = r, !0) : t === "grow" ? (e[X] = Kr(r), !0) : ir(t) ? !1 : r == null ? (e[R].delete(t), !0) : (console.error(`[Fox]illegal property:${t}`), !1);
332
+ return t == "value" ? (e[me].value = r, !0) : t === "grow" ? (e[X] = kr(r), !0) : fr(t) ? !1 : r == null ? (e[R].delete(t), !0) : (console.error(`[Fox]illegal property:${t}`), !1);
333
333
  }
334
334
  deleteProperty(e, t) {
335
335
  return t === "value" || t == "grow" ? (console.error(`[Fox]can not delete property:${String(t)}`), !1) : (e[R].delete(t), !0);
336
336
  }
337
337
  };
338
338
  function As(e, t) {
339
- const r = new Tr(e, t), s = new Cs(), i = new Proxy(r, s);
340
- return Reflect.set(r, Gt, i), r;
339
+ const r = new Dr(e, t), s = new Cs(), i = new Proxy(r, s);
340
+ return Reflect.set(r, tr, i), r;
341
341
  }
342
- var nr = new Proxy(Tr, { construct(e, t) {
342
+ var cr = new Proxy(Dr, { construct(e, t) {
343
343
  const r = t[0] ?? {}, s = t[1];
344
- return Ne(As(r, s));
345
- } }), Qt = (e) => !e || typeof e != "object" ? !0 : Reflect.ownKeys(e).length === 0, kr = class {
344
+ return Ue(As(r, s));
345
+ } }), sr = (e) => !e || typeof e != "object" ? !0 : Reflect.ownKeys(e).length === 0, Hr = class {
346
346
  name = "";
347
347
  persistPolicy = "memory";
348
348
  storage;
349
349
  constructor(e = {}) {
350
- if (e.persistPolicy && e.persistPolicy !== "memory" && Ue(e.name)) throw new Error("name can not be empty, where persistPolicy is not memory.");
350
+ if (e.persistPolicy && e.persistPolicy !== "memory" && We(e.name)) throw new Error("name can not be empty, where persistPolicy is not memory.");
351
351
  this.name = e.name ?? "", this.persistPolicy = e.persistPolicy ?? "memory", this.storage = e.storage;
352
352
  }
353
353
  getStorage() {
354
354
  if (!this.persistPolicy || this.persistPolicy === "memory") return null;
355
355
  let e = null;
356
356
  if (this.persistPolicy === "custom") e = this.storage;
357
- else if (Pe) {
357
+ else if (Ee) {
358
358
  const t = C();
359
359
  e = this.persistPolicy === "session" ? t.sessionStorage : t.localStorage;
360
360
  }
@@ -363,7 +363,7 @@ var nr = new Proxy(Tr, { construct(e, t) {
363
363
  saveState(e) {
364
364
  if (!this.persistPolicy || this.persistPolicy === "memory") return;
365
365
  let t = this.getStorage();
366
- if (t === null || Qt(e)) return;
366
+ if (t === null || sr(e)) return;
367
367
  const r = `_state_${this.name}`, s = JSON.stringify(e ?? {});
368
368
  t.setItem(r, s);
369
369
  }
@@ -385,51 +385,51 @@ var nr = new Proxy(Tr, { construct(e, t) {
385
385
  }
386
386
  }
387
387
  };
388
- function Ir(e, t, r) {
389
- const s = new kr(r);
388
+ function Nr(e, t, r) {
389
+ const s = new Hr(r);
390
390
  s.restore(t);
391
- const i = (u) => {
392
- const l = Bt(u), a = {};
393
- for (let f in l) {
394
- const c = l[f];
395
- Ue(c) || (a[f] = c);
391
+ const i = (l) => {
392
+ const a = Ht(l), u = {};
393
+ for (let f in a) {
394
+ const c = a[f];
395
+ We(c) || (u[f] = c);
396
396
  }
397
- Qt(a) ? s.removeState() : s.saveState(a);
397
+ sr(u) ? s.removeState() : s.saveState(u);
398
398
  };
399
399
  let n = null;
400
- r && r.debounce === !1 ? n = i : n = Lr(i, r && r.debounceDelay ? r.debounceDelay : 250);
400
+ r && r.debounce === !1 ? n = i : n = Or(i, r && r.debounceDelay ? r.debounceDelay : 250);
401
401
  const o = e ? vs(t) : ys(t);
402
- return us(!0).run(() => {
403
- ps(o, (u) => {
404
- const l = Bt(u);
405
- n(l);
402
+ return fs(!0).run(() => {
403
+ ps(o, (l) => {
404
+ const a = Ht(l);
405
+ n(a);
406
406
  });
407
407
  }), o;
408
408
  }
409
409
  function Bi(e, t) {
410
- return Ir(!1, e, t);
410
+ return Nr(!1, e, t);
411
411
  }
412
412
  function Di(e, t) {
413
- return Ir(!0, e, t);
413
+ return Nr(!0, e, t);
414
414
  }
415
415
  function qs(e, t) {
416
- const r = new kr(t);
416
+ const r = new Hr(t);
417
417
  r.restore(e);
418
418
  const s = (n) => {
419
- const o = Bt(n), u = {};
420
- for (let l in o) {
421
- const a = o[l];
422
- Ue(a) || (u[l] = a);
419
+ const o = Ht(n), l = {};
420
+ for (let a in o) {
421
+ const u = o[a];
422
+ We(u) || (l[a] = u);
423
423
  }
424
- Qt(u) ? r.removeState() : r.saveState(u);
424
+ sr(l) ? r.removeState() : r.saveState(l);
425
425
  };
426
426
  let i = null;
427
- return t && t.debounce === !1 ? i = s : i = Lr(s, t && t.debounceDelay ? t.debounceDelay : 250), new Proxy(e, {
427
+ return t && t.debounce === !1 ? i = s : i = Or(s, t && t.debounceDelay ? t.debounceDelay : 250), new Proxy(e, {
428
428
  get(n, o) {
429
429
  return n[o];
430
430
  },
431
- set(n, o, u) {
432
- return n[o] = u, i(n), !0;
431
+ set(n, o, l) {
432
+ return n[o] = l, i(n), !0;
433
433
  }
434
434
  });
435
435
  }
@@ -438,98 +438,98 @@ function Hi(e, t) {
438
438
  }
439
439
  var de = /* @__PURE__ */ (function(e) {
440
440
  return e[e.Static = 0] = "Static", e[e.Param = 1] = "Param", e[e.Group = 2] = "Group", e;
441
- })({}), E = /* @__PURE__ */ (function(e) {
441
+ })({}), P = /* @__PURE__ */ (function(e) {
442
442
  return e[e.Static = 0] = "Static", e[e.Param = 1] = "Param", e[e.ParamRegExp = 2] = "ParamRegExp", e[e.ParamRegExpEnd = 3] = "ParamRegExpEnd", e[e.EscapeNext = 4] = "EscapeNext", e;
443
- })(E || {}), Ks = {
443
+ })(P || {}), $s = {
444
444
  type: de.Static,
445
445
  value: ""
446
- }, $s = /[a-zA-Z0-9_]/;
447
- function js(e) {
446
+ }, js = /[a-zA-Z0-9_]/;
447
+ function Ks(e) {
448
448
  if (!e) return [[]];
449
- if (e === "/") return [[Ks]];
449
+ if (e === "/") return [[$s]];
450
450
  if (!e.startsWith("/")) throw new Error(`Invalid path "${e}"`);
451
451
  function t(y) {
452
- throw new Error(`ERR (${r})/"${a}": ${y}`);
452
+ throw new Error(`ERR (${r})/"${u}": ${y}`);
453
453
  }
454
- let r = E.Static, s = r;
454
+ let r = P.Static, s = r;
455
455
  const i = [];
456
456
  let n;
457
457
  function o() {
458
458
  n && i.push(n), n = [];
459
459
  }
460
- let u = 0, l, a = "", f = "";
460
+ let l = 0, a, u = "", f = "";
461
461
  function c() {
462
- a && (r === E.Static ? n.push({
462
+ u && (r === P.Static ? n.push({
463
463
  type: de.Static,
464
- value: a
465
- }) : r === E.Param || r === E.ParamRegExp || r === E.ParamRegExpEnd ? (n.length > 1 && (l === "*" || l === "+") && t(`A repeatable param (${a}) must be alone in its segment. eg: '/:ids+.`), n.push({
464
+ value: u
465
+ }) : r === P.Param || r === P.ParamRegExp || r === P.ParamRegExpEnd ? (n.length > 1 && (a === "*" || a === "+") && t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`), n.push({
466
466
  type: de.Param,
467
- value: a,
467
+ value: u,
468
468
  regexp: f,
469
- repeatable: l === "*" || l === "+",
470
- optional: l === "*" || l === "?"
471
- })) : t("Invalid state to consume buffer"), a = "");
469
+ repeatable: a === "*" || a === "+",
470
+ optional: a === "*" || a === "?"
471
+ })) : t("Invalid state to consume buffer"), u = "");
472
472
  }
473
473
  function h() {
474
- a += l;
474
+ u += a;
475
475
  }
476
- for (; u < e.length; ) {
477
- if (l = e[u++], l === "\\" && r !== E.ParamRegExp) {
478
- s = r, r = E.EscapeNext;
476
+ for (; l < e.length; ) {
477
+ if (a = e[l++], a === "\\" && r !== P.ParamRegExp) {
478
+ s = r, r = P.EscapeNext;
479
479
  continue;
480
480
  }
481
481
  switch (r) {
482
- case E.Static:
483
- l === "/" ? (a && c(), o()) : l === ":" ? (c(), r = E.Param) : h();
482
+ case P.Static:
483
+ a === "/" ? (u && c(), o()) : a === ":" ? (c(), r = P.Param) : h();
484
484
  break;
485
- case E.EscapeNext:
485
+ case P.EscapeNext:
486
486
  h(), r = s;
487
487
  break;
488
- case E.Param:
489
- l === "(" ? r = E.ParamRegExp : $s.test(l) ? h() : (c(), r = E.Static, l !== "*" && l !== "?" && l !== "+" && u--);
488
+ case P.Param:
489
+ a === "(" ? r = P.ParamRegExp : js.test(a) ? h() : (c(), r = P.Static, a !== "*" && a !== "?" && a !== "+" && l--);
490
490
  break;
491
- case E.ParamRegExp:
492
- l === ")" ? f[f.length - 1] == "\\" ? f = f.slice(0, -1) + l : r = E.ParamRegExpEnd : f += l;
491
+ case P.ParamRegExp:
492
+ a === ")" ? f[f.length - 1] == "\\" ? f = f.slice(0, -1) + a : r = P.ParamRegExpEnd : f += a;
493
493
  break;
494
- case E.ParamRegExpEnd:
495
- c(), r = E.Static, l !== "*" && l !== "?" && l !== "+" && u--, f = "";
494
+ case P.ParamRegExpEnd:
495
+ c(), r = P.Static, a !== "*" && a !== "?" && a !== "+" && l--, f = "";
496
496
  break;
497
497
  default:
498
498
  t("Unknown state");
499
499
  break;
500
500
  }
501
501
  }
502
- return r === E.ParamRegExp && t(`Unfinished custom RegExp for param "${a}"`), c(), o(), i;
502
+ return r === P.ParamRegExp && t(`Unfinished custom RegExp for param "${u}"`), c(), o(), i;
503
503
  }
504
- var or = "[^/]+?", Ls = {
504
+ var hr = "[^/]+?", Ls = {
505
505
  sensitive: !1,
506
506
  strict: !1,
507
507
  start: !0,
508
508
  end: !0
509
509
  }, J = /* @__PURE__ */ (function(e) {
510
- return e[e._multiplier = 10] = "_multiplier", e[e.Root = 90] = "Root", e[e.Segment = 40] = "Segment", e[e.SubSegment = 30] = "SubSegment", e[e.Static = 40] = "Static", e[e.Dynamic = 20] = "Dynamic", e[e.BonusCustomRegExp = 10] = "BonusCustomRegExp", e[e.BonusWildcard = -50] = "BonusWildcard", e[e.BonusRepeatable = -20] = "BonusRepeatable", e[e.BonusOptional = -8] = "BonusOptional", e[e.BonusStrict = 0.7000000000000001] = "BonusStrict", e[e.BonusCaseSensitive = 0.25] = "BonusCaseSensitive", e;
510
+ return e[e._multiplier = 10] = "_multiplier", e[e.Root = 9 * e._multiplier] = "Root", e[e.Segment = 4 * e._multiplier] = "Segment", e[e.SubSegment = 3 * e._multiplier] = "SubSegment", e[e.Static = 4 * e._multiplier] = "Static", e[e.Dynamic = 2 * e._multiplier] = "Dynamic", e[e.BonusCustomRegExp = 1 * e._multiplier] = "BonusCustomRegExp", e[e.BonusWildcard = -4 * e._multiplier - e.BonusCustomRegExp] = "BonusWildcard", e[e.BonusRepeatable = -2 * e._multiplier] = "BonusRepeatable", e[e.BonusOptional = -0.8 * e._multiplier] = "BonusOptional", e[e.BonusStrict = 0.07 * e._multiplier] = "BonusStrict", e[e.BonusCaseSensitive = 0.025 * e._multiplier] = "BonusCaseSensitive", e;
511
511
  })(J || {}), Ms = /[.+*?^${}()[\]/\\]/g;
512
- function Ts(e, t) {
513
- const r = $(!0, {}, Ls, t), s = [];
512
+ function ks(e, t) {
513
+ const r = j(!0, {}, Ls, t), s = [];
514
514
  let i = r.start ? "^" : "";
515
515
  const n = [];
516
- for (const a of e) {
517
- const f = a.length ? [] : [J.Root];
518
- r.strict && !a.length && (i += "/");
519
- for (let c = 0; c < a.length; c++) {
520
- const h = a[c];
516
+ for (const u of e) {
517
+ const f = u.length ? [] : [J.Root];
518
+ r.strict && !u.length && (i += "/");
519
+ for (let c = 0; c < u.length; c++) {
520
+ const h = u[c];
521
521
  let y = J.Segment + (r.sensitive ? J.BonusCaseSensitive : 0);
522
522
  if (h.type === de.Static)
523
523
  c || (i += "/"), i += h.value.replace(Ms, "\\$&"), y += J.Static;
524
524
  else if (h.type === de.Param) {
525
- const { value: d, repeatable: m, optional: w, regexp: g } = h;
525
+ const { value: d, repeatable: m, optional: b, regexp: g } = h;
526
526
  n.push({
527
527
  name: d,
528
528
  repeatable: m,
529
- optional: w
529
+ optional: b
530
530
  });
531
- const v = g || or;
532
- if (v !== or) {
531
+ const v = g || hr;
532
+ if (v !== hr) {
533
533
  y += J.BonusCustomRegExp;
534
534
  try {
535
535
  new RegExp(`(${v})`);
@@ -537,21 +537,21 @@ function Ts(e, t) {
537
537
  throw new Error(`Invalid custom RegExp for param "${d}" (${v}): ` + L.message);
538
538
  }
539
539
  }
540
- let j = m ? `((?:${v})(?:/(?:${v}))*)` : `(${v})`;
541
- c || (j = w && a.length < 2 ? `(?:/${j})` : "/" + j), w && (j += "?"), i += j, y += J.Dynamic, w && (y += J.BonusOptional), m && (y += J.BonusRepeatable), v === ".*" && (y += J.BonusWildcard);
540
+ let K = m ? `((?:${v})(?:/(?:${v}))*)` : `(${v})`;
541
+ c || (K = b && u.length < 2 ? `(?:/${K})` : "/" + K), b && (K += "?"), i += K, y += J.Dynamic, b && (y += J.BonusOptional), m && (y += J.BonusRepeatable), v === ".*" && (y += J.BonusWildcard);
542
542
  }
543
543
  f.push(y);
544
544
  }
545
545
  s.push(f);
546
546
  }
547
547
  if (r.strict && r.end) {
548
- const a = s.length - 1;
549
- s[a][s[a].length - 1] += J.BonusStrict;
548
+ const u = s.length - 1;
549
+ s[u][s[u].length - 1] += J.BonusStrict;
550
550
  }
551
551
  r.strict || (i += "/?"), r.end ? i += "$" : r.strict && !i.endsWith("/") && (i += "(?:/|$)");
552
552
  const o = new RegExp(i, r.sensitive ? "" : "i");
553
- function u(a) {
554
- const f = a.match(o), c = {};
553
+ function l(u) {
554
+ const f = u.match(o), c = {};
555
555
  if (!f) return null;
556
556
  for (let h = 1; h < f.length; h++) {
557
557
  const y = f[h] || "", d = n[h - 1];
@@ -559,16 +559,16 @@ function Ts(e, t) {
559
559
  }
560
560
  return c;
561
561
  }
562
- function l(a) {
562
+ function a(u) {
563
563
  let f = "", c = !1;
564
564
  for (const h of e) {
565
565
  (!c || !f.endsWith("/")) && (f += "/"), c = !1;
566
566
  for (const y of h) if (y.type === de.Static) f += y.value;
567
567
  else if (y.type === de.Param) {
568
- const { value: d, repeatable: m, optional: w } = y, g = d in a ? a[d] : "";
569
- if (er(g) && !m) throw new Error(`Provided param "${d}" is an array but it is not repeatable (* or + modifiers)`);
570
- const v = er(g) ? g.join("/") : g;
571
- if (!v) if (w)
568
+ const { value: d, repeatable: m, optional: b } = y, g = d in u ? u[d] : "";
569
+ if (or(g) && !m) throw new Error(`Provided param "${d}" is an array but it is not repeatable (* or + modifiers)`);
570
+ const v = or(g) ? g.join("/") : g;
571
+ if (!v) if (b)
572
572
  h.length < 2 && (f.endsWith("/") ? f = f.slice(0, -1) : c = !0);
573
573
  else throw new Error(`Missing required param "${d}"`);
574
574
  f += v;
@@ -580,12 +580,12 @@ function Ts(e, t) {
580
580
  re: o,
581
581
  score: s,
582
582
  keys: n,
583
- parse: u,
584
- stringify: l
583
+ parse: l,
584
+ stringify: a
585
585
  };
586
586
  }
587
- function ks(e, t) {
588
- const r = Ts(js(e), t);
587
+ function Ts(e, t) {
588
+ const r = ks(Ks(e), t);
589
589
  return function(s) {
590
590
  const i = r.parse(s);
591
591
  return i ? {
@@ -594,8 +594,8 @@ function ks(e, t) {
594
594
  } : null;
595
595
  };
596
596
  }
597
- var Or = "default", Br = /* @__PURE__ */ Symbol("sync"), I = /* @__PURE__ */ Symbol("normalizeRoute");
598
- function lr(e) {
597
+ var Ur = "default", Vr = /* @__PURE__ */ Symbol("sync"), I = /* @__PURE__ */ Symbol("normalizeRoute");
598
+ function yr(e) {
599
599
  let t = !1;
600
600
  return function(...r) {
601
601
  if (!t)
@@ -605,21 +605,21 @@ function lr(e) {
605
605
  function Is(e) {
606
606
  let t = e.src;
607
607
  return new Promise((r, s) => {
608
- const i = lr((u) => {
609
- zt(u) && (u = u.default), e.component = u, console.debug("success load async module"), r();
610
- }), n = lr((u) => {
611
- `${u}`, console.debug("reject load async module"), s(u);
608
+ const i = yr((l) => {
609
+ er(l) && (l = l.default), e.component = l, console.debug("success load async module"), r();
610
+ }), n = yr((l) => {
611
+ `${l}`, console.debug("reject load async module"), s(l);
612
612
  });
613
613
  let o;
614
614
  try {
615
615
  o = t(i, n);
616
- } catch (u) {
617
- n(u);
616
+ } catch (l) {
617
+ n(l);
618
618
  }
619
619
  if (o) if (typeof o.then == "function") o.then(i, n);
620
620
  else {
621
- const u = o.component;
622
- u && typeof u.then == "function" && u.then(i, n);
621
+ const l = o.component;
622
+ l && typeof l.then == "function" && l.then(i, n);
623
623
  }
624
624
  });
625
625
  }
@@ -631,7 +631,7 @@ var Os = class {
631
631
  constructor(e, t, r, s) {
632
632
  this.name = e, this.level = t, this.rootName = r, this.rootIndex = s;
633
633
  }
634
- }, Je = class Dr {
634
+ }, Ge = class Wr {
635
635
  to;
636
636
  routeModel;
637
637
  from;
@@ -640,13 +640,13 @@ var Os = class {
640
640
  this.to = t, this.from = r;
641
641
  }
642
642
  static from(t) {
643
- const r = new Dr(t.to, t.from), s = t.data ?? {};
644
- return $(!0, r.data, s), r;
643
+ const r = new Wr(t.to, t.from), s = t.data ?? {};
644
+ return j(!0, r.data, s), r;
645
645
  }
646
646
  static clear(t) {
647
647
  for (let r in t) t[r] = void 0;
648
648
  }
649
- }, S = class Ht {
649
+ }, x = class Ut {
650
650
  path;
651
651
  get fullPath() {
652
652
  const t = this.path ?? `${this.name}`;
@@ -672,8 +672,8 @@ var Os = class {
672
672
  active;
673
673
  slot;
674
674
  static clone(t, r) {
675
- let s = new Ht();
676
- return qr(s, t, r), s;
675
+ let s = new Ut();
676
+ return Mr(s, t, r), s;
677
677
  }
678
678
  static isSame(t, r) {
679
679
  return !t || !r ? !1 : t === r ? !0 : t.root !== r.root || t.index !== r.index ? !1 : t.path && r.path && t.path === r.path ? !0 : !!(t.name && r.name && t.name === r.name);
@@ -682,7 +682,7 @@ var Os = class {
682
682
  return !t || !r ? !1 : t === r || t.path && r.path && t.path === r.path ? !0 : !!(t.name && r.name && t.name === r.name);
683
683
  }
684
684
  static from(t) {
685
- let r = new Ht();
685
+ let r = new Ut();
686
686
  if (t == null) return r;
687
687
  let s = r;
688
688
  for (let n in t) s[n] = t[n];
@@ -697,7 +697,7 @@ var Os = class {
697
697
  src;
698
698
  component;
699
699
  constructor(e, t, r) {
700
- this.id = Be.get(), this.name = e, this.src = t, typeof t != "function" && (this.component = t), this.props = r;
700
+ this.id = De.get(), this.name = e, this.src = t, typeof t != "function" && (this.component = t), this.props = r;
701
701
  }
702
702
  get isResolved() {
703
703
  return this.component !== void 0;
@@ -705,9 +705,9 @@ var Os = class {
705
705
  resolve() {
706
706
  return Is(this);
707
707
  }
708
- }, ar = class {
708
+ }, dr = class {
709
709
  models = [];
710
- }, gt = class {
710
+ }, bt = class {
711
711
  path;
712
712
  match;
713
713
  redirect;
@@ -715,11 +715,11 @@ var Os = class {
715
715
  meta;
716
716
  matchedRoutes;
717
717
  layers = [];
718
- }, _ = /* @__PURE__ */ (function(e) {
718
+ }, F = /* @__PURE__ */ (function(e) {
719
719
  return e[e.Push = 0] = "Push", e[e.Replace = 1] = "Replace", e[e.Put = 2] = "Put", e[e.Append = 3] = "Append", e[e.Open = 4] = "Open", e;
720
720
  })({}), wt = /* @__PURE__ */ (function(e) {
721
721
  return e[e.Part = 0] = "Part", e[e.All = 1] = "All", e;
722
- })({}), G = /* @__PURE__ */ Symbol("rootKey"), z = /* @__PURE__ */ Symbol("rootNodeKey"), ye = /* @__PURE__ */ Symbol("parentNodeKey"), ot = /* @__PURE__ */ Symbol("nameKey"), re = class {
722
+ })({}), G = /* @__PURE__ */ Symbol("rootKey"), z = /* @__PURE__ */ Symbol("rootNodeKey"), ye = /* @__PURE__ */ Symbol("parentNodeKey"), at = /* @__PURE__ */ Symbol("nameKey"), re = class {
723
723
  model;
724
724
  route;
725
725
  active = !0;
@@ -727,23 +727,23 @@ var Os = class {
727
727
  constructor(e, t, r = 0, s = !0) {
728
728
  this.route = e, this.model = t, this.index = r, this.active = s;
729
729
  }
730
- }, Ae = class {
730
+ }, qe = class {
731
731
  _slots;
732
732
  get slots() {
733
- return this._slots == null && (this._slots = Ar([])), this._slots;
733
+ return this._slots == null && (this._slots = Lr([])), this._slots;
734
734
  }
735
735
  get empty() {
736
736
  return this._slots == null || this._slots.value.length == 0;
737
737
  }
738
- [ot];
738
+ [at];
739
739
  [G];
740
740
  [z] = null;
741
741
  [ye] = null;
742
742
  get name() {
743
- return this[ot];
743
+ return this[at];
744
744
  }
745
745
  constructor(e, t, r) {
746
- this[ot] = e, this[G] = t, r && (this[z] = r);
746
+ this[at] = e, this[G] = t, r && (this[z] = r);
747
747
  }
748
748
  }, O = class {
749
749
  view;
@@ -759,7 +759,7 @@ var Os = class {
759
759
  }
760
760
  return !1;
761
761
  }
762
- }, bt = class {
762
+ }, Rt = class {
763
763
  views = [];
764
764
  }, Ds = class {
765
765
  layers = [];
@@ -783,69 +783,69 @@ var Os = class {
783
783
  release(e) {
784
784
  this.submitRecorder.time === e && (this.submitRecorder.route = void 0);
785
785
  }
786
- }, P = /* @__PURE__ */ (function(e) {
786
+ }, E = /* @__PURE__ */ (function(e) {
787
787
  return e.Busy = "Busy", e.Free = "Free", e.Reject = "Reject", e.Exception = "Exception", e.Finished = "Finished", e;
788
- })(P || {}), B = /* @__PURE__ */ Symbol("chainKey"), k = /* @__PURE__ */ Symbol("cursorKey"), Rt = /* @__PURE__ */ Symbol("$persistentModeKey"), F = /* @__PURE__ */ Symbol("statusKey"), Z = /* @__PURE__ */ Symbol("argsKey"), ze = /* @__PURE__ */ Symbol("exArgsKey"), pe = /* @__PURE__ */ Symbol("successFnsKey"), qe = /* @__PURE__ */ Symbol("errorFnsKey"), le = /* @__PURE__ */ Symbol("sessionKey"), Y = /* @__PURE__ */ Symbol("_go"), ut = class {
788
+ })(E || {}), B = /* @__PURE__ */ Symbol("chainKey"), T = /* @__PURE__ */ Symbol("cursorKey"), xt = /* @__PURE__ */ Symbol("$persistentModeKey"), _ = /* @__PURE__ */ Symbol("statusKey"), Z = /* @__PURE__ */ Symbol("argsKey"), Xe = /* @__PURE__ */ Symbol("exArgsKey"), pe = /* @__PURE__ */ Symbol("successFnsKey"), $e = /* @__PURE__ */ Symbol("errorFnsKey"), le = /* @__PURE__ */ Symbol("sessionKey"), Y = /* @__PURE__ */ Symbol("_go"), ct = class {
789
789
  [B] = [];
790
- [k] = 0;
791
- [Rt] = !1;
792
- [F] = P.Free;
790
+ [T] = 0;
791
+ [xt] = !1;
792
+ [_] = E.Free;
793
793
  [Z] = [];
794
- [ze] = [];
794
+ [Xe] = [];
795
795
  [pe] = [];
796
- [qe] = [];
796
+ [$e] = [];
797
797
  [le];
798
798
  get session() {
799
799
  return this[le];
800
800
  }
801
801
  constructor(e, t = !1) {
802
- this[le] = e, this[Rt] = t;
802
+ this[le] = e, this[xt] = t;
803
803
  }
804
804
  [Y](e, ...t) {
805
- let r = this[F];
806
- if (this[F] = P.Busy, this[k] += e, this[k] < 0 && (this[k] = 0), this[Z] = t, r === P.Exception || r === P.Reject) {
807
- let n = [{ session: this[le] }, ...this[ze]];
808
- for (; this[qe].length > 0; ) try {
809
- let o = this[qe].shift();
810
- typeof o == "function" && De(() => {
805
+ let r = this[_];
806
+ if (this[_] = E.Busy, this[T] += e, this[T] < 0 && (this[T] = 0), this[Z] = t, r === E.Exception || r === E.Reject) {
807
+ let n = [{ session: this[le] }, ...this[Xe]];
808
+ for (; this[$e].length > 0; ) try {
809
+ let o = this[$e].shift();
810
+ typeof o == "function" && He(() => {
811
811
  Reflect.apply(o, {}, n);
812
812
  });
813
813
  } catch (o) {
814
814
  console.error(o.message, o);
815
815
  }
816
- return this[F] = r, this[B] = [], this[k] = 0, this;
817
- } else if (r === P.Finished || this[k] >= this[B].length) {
816
+ return this[_] = r, this[B] = [], this[T] = 0, this;
817
+ } else if (r === E.Finished || this[T] >= this[B].length) {
818
818
  let n = [{ session: this[le] }, ...this[Z]];
819
819
  for (; this[pe].length > 0; ) {
820
820
  let o = this[pe].shift();
821
- typeof o == "function" && De(() => {
821
+ typeof o == "function" && He(() => {
822
822
  Reflect.apply(o, {}, n);
823
823
  });
824
824
  }
825
- return this[F] = P.Free, this;
825
+ return this[_] = E.Free, this;
826
826
  }
827
- if (this[k] >= this[B].length)
828
- return this[F] = P.Free, this;
829
- let s = this[B][this[k]];
830
- this[Rt] || (this[B].splice(0, this[k] + 1), this[k] = -1);
831
- let i = this[k] + 1;
827
+ if (this[T] >= this[B].length)
828
+ return this[_] = E.Free, this;
829
+ let s = this[B][this[T]];
830
+ this[xt] || (this[B].splice(0, this[T] + 1), this[T] = -1);
831
+ let i = this[T] + 1;
832
832
  try {
833
833
  let n = !1, o = {
834
- go: (u, ...l) => {
835
- n || (n = !0, Reflect.apply(this[Y], this, [u, ...l]));
834
+ go: (l, ...a) => {
835
+ n || (n = !0, Reflect.apply(this[Y], this, [l, ...a]));
836
836
  },
837
- resolve: (...u) => {
838
- n || (n = !0, Reflect.apply(this[Y], this, [1, ...u]));
837
+ resolve: (...l) => {
838
+ n || (n = !0, Reflect.apply(this[Y], this, [1, ...l]));
839
839
  },
840
- reject: (...u) => {
841
- n || (n = !0, Reflect.apply(this.reject, this, [...u]));
840
+ reject: (...l) => {
841
+ n || (n = !0, Reflect.apply(this.reject, this, [...l]));
842
842
  },
843
- insert: (u) => {
844
- n || (this[B].splice(i, 0, u), i++);
843
+ insert: (l) => {
844
+ n || (this[B].splice(i, 0, l), i++);
845
845
  },
846
846
  session: this[le]
847
847
  };
848
- De(() => {
848
+ He(() => {
849
849
  Reflect.apply(s, {}, [o, ...this[Z]]);
850
850
  });
851
851
  } catch (n) {
@@ -857,54 +857,54 @@ var Os = class {
857
857
  return Reflect.apply(this[Y], this, [e, ...t]);
858
858
  }
859
859
  finish(...e) {
860
- return this[F] = P.Finished, this[Z] = e, Reflect.apply(this[Y], this, [0]);
860
+ return this[_] = E.Finished, this[Z] = e, Reflect.apply(this[Y], this, [0]);
861
861
  }
862
862
  reject(...e) {
863
- return this[F] = P.Reject, this[ze] = e, Reflect.apply(this[Y], this, [0]);
863
+ return this[_] = E.Reject, this[Xe] = e, Reflect.apply(this[Y], this, [0]);
864
864
  }
865
865
  throw(...e) {
866
- return this[F] = P.Exception, this[ze] = e, Reflect.apply(this[Y], this, [0]);
866
+ return this[_] = E.Exception, this[Xe] = e, Reflect.apply(this[Y], this, [0]);
867
867
  }
868
868
  reset(...e) {
869
- this[F] = P.Busy, this[Z] = e, this[B] = [], this[k] = 0;
869
+ this[_] = E.Busy, this[Z] = e, this[B] = [], this[T] = 0;
870
870
  let t = [{ session: this[le] }, ...this[Z]];
871
871
  for (; this[pe].length > 0; ) {
872
872
  let r = this[pe].shift();
873
- De(() => {
873
+ He(() => {
874
874
  Reflect.apply(r, this, t);
875
875
  });
876
876
  }
877
- return this[F] = P.Free, this;
877
+ return this[_] = E.Free, this;
878
878
  }
879
879
  post(e) {
880
- return this[F] === P.Reject || this[F] === P.Exception ? this : (Array.isArray(e) ? this[B] = [...this[B], ...e] : this[B].push(e), this[F] === P.Busy ? this : (Reflect.apply(this[Y], this, [0, ...this[Z]]), this));
880
+ return this[_] === E.Reject || this[_] === E.Exception ? this : (Array.isArray(e) ? this[B] = [...this[B], ...e] : this[B].push(e), this[_] === E.Busy ? this : (Reflect.apply(this[Y], this, [0, ...this[Z]]), this));
881
881
  }
882
882
  wait(e, t) {
883
- return e && typeof e == "function" && this[pe].push(e), t && typeof t == "function" && this[qe].push(t), this[F] === P.Busy ? this : (Reflect.apply(this[Y], this, [0, ...this[Z]]), this);
883
+ return e && typeof e == "function" && this[pe].push(e), t && typeof t == "function" && this[$e].push(t), this[_] === E.Busy ? this : (Reflect.apply(this[Y], this, [0, ...this[Z]]), this);
884
884
  }
885
885
  exception(e) {
886
- return e && typeof e == "function" && this[qe].push(e), this[F] === P.Busy ? this : Reflect.apply(this[Y], this, [0, ...this[Z]]);
886
+ return e && typeof e == "function" && this[$e].push(e), this[_] === E.Busy ? this : Reflect.apply(this[Y], this, [0, ...this[Z]]);
887
887
  }
888
888
  isFinish() {
889
- return this[F] == P.Reject || this[F] == P.Free && this[k] >= this[B].length;
889
+ return this[_] == E.Reject || this[_] == E.Free && this[T] >= this[B].length;
890
890
  }
891
- }, xe = /* @__PURE__ */ Symbol("_notifyChange"), ur = class {
891
+ }, xe = /* @__PURE__ */ Symbol("_notifyChange"), St = class {
892
892
  currentRoute;
893
893
  routes;
894
894
  constructor(e, t) {
895
895
  this.currentRoute = e, this.routes = t;
896
896
  }
897
- }, ae = /* @__PURE__ */ Symbol("historyChangeConsumerKey"), fr = /* @__PURE__ */ Symbol("_navigateFirstRoute"), Ge = /* @__PURE__ */ Symbol("_getRouteMark"), xt = /* @__PURE__ */ Symbol("_getUrlSearch"), St = /* @__PURE__ */ Symbol("_generateLocation"), Xe = /* @__PURE__ */ Symbol("_setRouteMarkRecorder"), Ke = /* @__PURE__ */ Symbol("beforeRestoreFiltersKey"), cr = /* @__PURE__ */ Symbol("_beforeRestore"), hr = "Symbol(_fox_restore_point)";
898
- function $e(e, ...t) {
897
+ }, ae = /* @__PURE__ */ Symbol("historyChangeConsumerKey"), mr = /* @__PURE__ */ Symbol("_navigateFirstRoute"), Qe = /* @__PURE__ */ Symbol("_getRouteMark"), Et = /* @__PURE__ */ Symbol("_getUrlSearch"), Pt = /* @__PURE__ */ Symbol("_generateLocation"), Ze = /* @__PURE__ */ Symbol("_setRouteMarkRecorder"), je = /* @__PURE__ */ Symbol("beforeRestoreFiltersKey"), vr = /* @__PURE__ */ Symbol("_beforeRestore"), pr = "Symbol(_fox_restore_point)";
898
+ function Ye(e, ...t) {
899
899
  return typeof e == "function" ? Reflect.apply(e, null, [...t]) : e;
900
900
  }
901
- function yr(e) {
901
+ function gr(e) {
902
902
  if (!Array.isArray(e)) return !1;
903
903
  if (e.length === 0) return !0;
904
904
  const t = e[0];
905
- return !!(Reflect.has(t, "path") && Reflect.has(t, "root"));
905
+ return !!((Reflect.has(t, "path") || Reflect.has(t, "name")) && Reflect.has(t, "root"));
906
906
  }
907
- var Hr = class {
907
+ var Jr = class {
908
908
  base;
909
909
  storage;
910
910
  mode;
@@ -915,10 +915,10 @@ var Hr = class {
915
915
  changeHandler;
916
916
  historyChange;
917
917
  [ae] = !1;
918
- [Ke] = new Array();
918
+ [je] = new Array();
919
919
  backTimeout = 320;
920
- constructor(e = "hash", t = "", r = "", s = !0, i = !0, n = !1, o, u) {
921
- this.mode = e, this.base = t, this.query = r, this.firstNavigate = s, this.historyMonitor = i, this.traceless = n, this.storage = o ?? C().sessionStorage, this.backTimeout = u ?? 320;
920
+ constructor(e = "hash", t = "", r = "", s = !0, i = !0, n = !1, o, l) {
921
+ this.mode = e, this.base = t, this.query = r, this.firstNavigate = s, this.historyMonitor = i, this.traceless = n, this.storage = o ?? C().sessionStorage, this.backTimeout = l ?? 320;
922
922
  }
923
923
  init(e = !0) {
924
924
  const t = C();
@@ -930,25 +930,25 @@ var Hr = class {
930
930
  this[ae] = !1;
931
931
  return;
932
932
  }
933
- if ($e(this.historyMonitor)) {
933
+ if (Ye(this.historyMonitor)) {
934
934
  const r = t.history.state;
935
935
  this[xe](r);
936
936
  try {
937
937
  let s = [];
938
938
  if (typeof r == "string" ? s = JSON.parse(r) : s = r, Array.isArray(s) && s.length > 0) {
939
- const i = this[Ge]() ?? "/";
940
- this[Xe](i, s);
939
+ const i = this[Qe]() ?? "/";
940
+ this[Ze](i, s);
941
941
  }
942
942
  } catch {
943
943
  }
944
944
  }
945
- }), at(t, "popstate", this.historyChange), this.firstNavigate && e && this[fr](), Promise.resolve();
945
+ }), ft(t, "popstate", this.historyChange), this.firstNavigate && e && this[mr](), Promise.resolve();
946
946
  }
947
947
  destroy() {
948
- this.historyChange && Wt(C(), "popstate", this.historyChange);
948
+ this.historyChange && Zt(C(), "popstate", this.historyChange);
949
949
  }
950
- [cr](e, t, r, s) {
951
- for (let i of this[Ke]) try {
950
+ [vr](e, t, r, s) {
951
+ for (let i of this[je]) try {
952
952
  const n = Reflect.apply(i, {}, [
953
953
  e,
954
954
  t,
@@ -962,21 +962,21 @@ var Hr = class {
962
962
  return !0;
963
963
  }
964
964
  beforeRestoreEach(e) {
965
- this[Ke].push(e);
965
+ this[je].push(e);
966
966
  }
967
967
  removeBeforeRestoreEach(e) {
968
- const t = this[Ke].indexOf(e);
969
- return t !== -1 ? (this[Ke].splice(t, 1), !0) : !1;
968
+ const t = this[je].indexOf(e);
969
+ return t !== -1 ? (this[je].splice(t, 1), !0) : !1;
970
970
  }
971
- [fr]() {
972
- const e = this[Ge]() ?? "/", t = this.storage.getItem(hr);
971
+ [mr]() {
972
+ const e = this[Qe]() ?? "/", t = this.storage.getItem(pr);
973
973
  if (t) try {
974
974
  const n = JSON.parse(t);
975
975
  if (n.mark === e && Array.isArray(n.routes) && n.routes.length > 0) {
976
- const o = n.routes.filter((u, l) => (u.params = u.params ? jr(u.params) : {}, this[cr](u, l, e, n.routes)));
976
+ const o = n.routes.filter((l, a) => (l.params = l.params ? Ir(l.params) : {}, this[vr](l, a, e, n.routes)));
977
977
  if (o.length > 0) {
978
- const u = this[xt](), l = o.length - 1;
979
- o[l].query = u || o[l].query, this[xe](o);
978
+ const l = this[Et](), a = o.length - 1;
979
+ o[a].query = l || o[a].query, this[xe](o);
980
980
  return;
981
981
  }
982
982
  }
@@ -985,31 +985,31 @@ var Hr = class {
985
985
  const r = e.indexOf("!");
986
986
  let s;
987
987
  r != -1 ? s = e.substring(r + 1) : s = e;
988
- const i = new S();
989
- i.path = s, i.query = this[xt](), this[xe]([i]);
988
+ const i = new x();
989
+ i.path = s, i.query = this[Et](), this[xe]([i]);
990
990
  }
991
- [Xe](e, t) {
991
+ [Ze](e, t) {
992
992
  try {
993
993
  t.forEach((s) => {
994
- s.params = s.params ? $r(s.params) : {};
994
+ s.params = s.params ? Tr(s.params) : {};
995
995
  });
996
996
  const r = JSON.stringify({
997
997
  mark: e,
998
998
  routes: t
999
999
  });
1000
- this.storage.setItem(hr, r);
1000
+ this.storage.setItem(pr, r);
1001
1001
  } catch (r) {
1002
1002
  console.error(r.message, r);
1003
1003
  }
1004
1004
  }
1005
1005
  setRestorePoint(e) {
1006
- const t = this[Ge]() ?? "/";
1007
- this[Xe](t, e);
1006
+ const t = this[Qe]() ?? "/";
1007
+ this[Ze](t, e);
1008
1008
  }
1009
1009
  [xe](e) {
1010
1010
  typeof this.changeHandler == "function" && this.changeHandler(e);
1011
1011
  }
1012
- [Ge]() {
1012
+ [Qe]() {
1013
1013
  const e = C();
1014
1014
  if (this.mode === "path") {
1015
1015
  let t = e.location.pathname;
@@ -1020,7 +1020,7 @@ var Hr = class {
1020
1020
  }
1021
1021
  return null;
1022
1022
  }
1023
- [xt]() {
1023
+ [Et]() {
1024
1024
  let e = C().location.search;
1025
1025
  return e.length > 0 && e.indexOf("?") === 0 && (e = e.substring(1)), e;
1026
1026
  }
@@ -1033,11 +1033,11 @@ var Hr = class {
1033
1033
  }
1034
1034
  goBack(e, t) {
1035
1035
  const r = C(), s = r.history.state;
1036
- if (yr(s) && s.length > 0) {
1036
+ if (gr(s) && s.length > 0) {
1037
1037
  let i = !1;
1038
- for (let a = s.length - 1; a >= 0; a--) {
1039
- const f = S.from(s[a]);
1040
- if (!(f.historyUpdatePolicy === "traceless" || $e(this.traceless, f)) && S.isSame(f, e)) {
1038
+ for (let u = s.length - 1; u >= 0; u--) {
1039
+ const f = x.from(s[u]);
1040
+ if (x.isSame(f, e)) {
1041
1041
  i = !0;
1042
1042
  break;
1043
1043
  }
@@ -1048,71 +1048,71 @@ var Hr = class {
1048
1048
  }
1049
1049
  const n = this.backTimeout;
1050
1050
  let o = null;
1051
- const u = () => {
1052
- r.history.go(-1), o = setTimeout(u, n);
1053
- }, l = () => {
1051
+ const l = () => {
1052
+ r.history.go(-1), o = setTimeout(l, n);
1053
+ }, a = () => {
1054
1054
  clearTimeout(o);
1055
- const a = C().history.state;
1056
- if (yr(a) && a.length > 0) {
1057
- let f = a.length;
1058
- const c = a[f - 1], h = S.from(c);
1059
- if (S.isSame(h, e))
1055
+ const u = C().history.state;
1056
+ if (gr(u) && u.length > 0) {
1057
+ let f = u.length;
1058
+ const c = u[f - 1], h = x.from(c);
1059
+ if (x.isSame(h, e))
1060
1060
  return t(), !0;
1061
1061
  if (f > 0) {
1062
1062
  let y = !1;
1063
1063
  for (let d = f - 1; d >= 0; d--) {
1064
- const m = S.from(a[d]);
1065
- if (!(m.traceless === !0 || $e(this.traceless, m)) && S.isSame(m, e)) {
1064
+ const m = x.from(u[d]);
1065
+ if (!(m.traceless === !0 || Ye(this.traceless, m)) && x.isSame(m, e)) {
1066
1066
  y = !0;
1067
1067
  break;
1068
1068
  }
1069
1069
  }
1070
1070
  return y ? (setTimeout(() => {
1071
- o = setTimeout(u, n), this.go(-1, l);
1071
+ o = setTimeout(l, n), this.go(-1, a);
1072
1072
  }, 0), !0) : (t(), !0);
1073
1073
  }
1074
1074
  }
1075
1075
  return t(), !0;
1076
1076
  };
1077
- o = setTimeout(u, n), this.go(-1, l);
1077
+ o = setTimeout(l, n), this.go(-1, a);
1078
1078
  } else t();
1079
1079
  }
1080
1080
  setRouteMark(e) {
1081
1081
  const t = e.currentRoute.fullPath;
1082
- this[Xe](t, e.routes);
1082
+ this[Ze](t, e.routes);
1083
1083
  }
1084
1084
  push(e) {
1085
- const t = this[St](e.currentRoute);
1086
- e.currentRoute.historyUpdatePolicy !== "traceless" && !$e(this.traceless, e.currentRoute) && C().history.pushState(e.routes, "", t), this.setRouteMark(e);
1085
+ const t = this[Pt](e.currentRoute);
1086
+ e.currentRoute.historyUpdatePolicy !== "traceless" && !Ye(this.traceless, e.currentRoute) && C().history.pushState(e.routes, "", t), this.setRouteMark(e);
1087
1087
  }
1088
1088
  replace(e) {
1089
- const t = this[St](e.currentRoute);
1090
- (e.currentRoute.historyUpdatePolicy !== "traceless" || !$e(this.traceless, e.currentRoute)) && C().history.replaceState(e.routes, "", t), this.setRouteMark(e);
1089
+ const t = this[Pt](e.currentRoute);
1090
+ (e.currentRoute.historyUpdatePolicy !== "traceless" || !Ye(this.traceless, e.currentRoute)) && C().history.replaceState(e.routes, "", t), this.setRouteMark(e);
1091
1091
  }
1092
- [St](e) {
1092
+ [Pt](e) {
1093
1093
  const t = C();
1094
1094
  let r = "";
1095
1095
  if (e.query) {
1096
1096
  let o = "";
1097
- if (typeof e.query == "object") for (let u of Reflect.ownKeys(e.query)) {
1098
- let l = encodeURIComponent(e.query[u]), a = `${encodeURIComponent(String(u))}=${l}`;
1099
- o.length > 0 && (o += "&"), o += a;
1097
+ if (typeof e.query == "object") for (let l of Reflect.ownKeys(e.query)) {
1098
+ let a = encodeURIComponent(e.query[l]), u = `${encodeURIComponent(String(l))}=${a}`;
1099
+ o.length > 0 && (o += "&"), o += u;
1100
1100
  }
1101
1101
  else o = e.query;
1102
1102
  this.query ? (r = o.length > 0 ? `${this.query}&${o}` : this.query, r.length > 0 && r.charAt(0) !== "?" && (r = `?${r}`)) : o.length > 0 && (r = `?${o}`);
1103
1103
  }
1104
1104
  const s = t.location;
1105
1105
  let i = e.alias ?? e.fullPath;
1106
- i.startsWith("default") && (i = i.substring(Or.length + 1));
1106
+ i.startsWith("default") && (i = i.substring(Ur.length + 1));
1107
1107
  let n;
1108
1108
  return r ? this.mode == "path" ? i.indexOf("/") === 0 ? n = `${this.base}${i}${r}` : n = `${this.base}/${i}${r}` : n = `${s.pathname}${r}#${i}` : this.mode == "path" ? i.indexOf("/") === 0 ? n = `${this.base}${i}` : n = `${this.base}/${i}` : n = `${s.pathname}#${i}`, `${s.origin}${n}`;
1109
1109
  }
1110
1110
  };
1111
1111
  function Ni(e = !0, t = null, r = "", s = !0, i = !1, n) {
1112
- return t !== null && (t = C().location.pathname), t && t.endsWith("/") && (t = t.substring(0, t.length - 1)), new Hr("path", t ?? "", r, e, s, i, n);
1112
+ return t !== null && (t = C().location.pathname), t && t.endsWith("/") && (t = t.substring(0, t.length - 1)), new Jr("path", t ?? "", r, e, s, i, n);
1113
1113
  }
1114
1114
  function Us(e = !0, t = "", r = !0, s = !1, i) {
1115
- return new Hr("hash", "", t, e, r, s, i);
1115
+ return new Jr("hash", "", t, e, r, s, i);
1116
1116
  }
1117
1117
  var Vs = class {
1118
1118
  maxSize = 50;
@@ -1160,7 +1160,7 @@ var Vs = class {
1160
1160
  if (e === null) r = this.cursor + 1;
1161
1161
  else for (let s = this.cursor; s >= 0; s--) {
1162
1162
  const i = this.queue[s];
1163
- if (S.isSame(i.currentRoute, e)) break;
1163
+ if (x.isSame(i.currentRoute, e)) break;
1164
1164
  r++;
1165
1165
  }
1166
1166
  if (r === 0) {
@@ -1184,71 +1184,71 @@ var Vs = class {
1184
1184
  function Ws(e = "", t = 50) {
1185
1185
  return new Vs(e, t);
1186
1186
  }
1187
- var Qe = /* @__PURE__ */ Symbol("_constructRouteModel"), Ze = /* @__PURE__ */ Symbol("_findRouteModel"), Pt = /* @__PURE__ */ Symbol("_findRootView"), Js = /* @__PURE__ */ Symbol("_getFirstView"), ue = /* @__PURE__ */ Symbol("_removeView"), dr = /* @__PURE__ */ Symbol("_buildPage"), mr = /* @__PURE__ */ Symbol("_resolveComponent"), vr = /* @__PURE__ */ Symbol("_update"), se = /* @__PURE__ */ Symbol("_merge"), Et = /* @__PURE__ */ Symbol("_handleHistoryChange"), fe = /* @__PURE__ */ Symbol("_handleRouteUpdated"), Ye = /* @__PURE__ */ Symbol("routeUpdatedCallback"), Ft = /* @__PURE__ */ Symbol("currentRoute"), p = /* @__PURE__ */ Symbol("currentRoutes"), et = /* @__PURE__ */ Symbol("routeSessionCacheKey"), pr = /* @__PURE__ */ Symbol("_addRouteRecorder"), je = /* @__PURE__ */ Symbol("_removeRouteRecorder"), tt = /* @__PURE__ */ Symbol("_cloneRouteRecorder"), K = /* @__PURE__ */ Symbol("_handleError"), rt = /* @__PURE__ */ Symbol("errorCallback"), D = /* @__PURE__ */ Symbol("registerKey"), st = /* @__PURE__ */ Symbol("notFoundKey"), _t = /* @__PURE__ */ Symbol("notFoundPathKey"), W = /* @__PURE__ */ Symbol("forestKey"), x = /* @__PURE__ */ Symbol("historyKey"), Le = /* @__PURE__ */ Symbol("beforeFiltersKey"), Me = /* @__PURE__ */ Symbol("afterFiltersKey"), Te = /* @__PURE__ */ Symbol("destroyFiltersKey"), Ct = /* @__PURE__ */ Symbol("propsFilterKey"), ge = /* @__PURE__ */ Symbol("mainDispatcherKey"), At = /* @__PURE__ */ Symbol("initKey"), ce = /* @__PURE__ */ Symbol("readyKey"), qt = /* @__PURE__ */ Symbol("readyHandlersKey"), it = /* @__PURE__ */ Symbol("_markReady"), gr = /* @__PURE__ */ Symbol("_createNextFn"), Kt = /* @__PURE__ */ Symbol("_start"), $t = /* @__PURE__ */ Symbol("_before"), jt = /* @__PURE__ */ Symbol("_after"), wr = /* @__PURE__ */ Symbol("_destroy"), Lt = /* @__PURE__ */ Symbol("_load"), ke = /* @__PURE__ */ Symbol("_unload"), Ie = /* @__PURE__ */ Symbol("routerGuardKey");
1187
+ var et = /* @__PURE__ */ Symbol("_constructRouteModel"), tt = /* @__PURE__ */ Symbol("_findRouteModel"), _t = /* @__PURE__ */ Symbol("_findRootView"), Js = /* @__PURE__ */ Symbol("_getFirstView"), ue = /* @__PURE__ */ Symbol("_removeView"), br = /* @__PURE__ */ Symbol("_buildPage"), wr = /* @__PURE__ */ Symbol("_resolveComponent"), Rr = /* @__PURE__ */ Symbol("_update"), se = /* @__PURE__ */ Symbol("_merge"), Ft = /* @__PURE__ */ Symbol("_handleHistoryChange"), fe = /* @__PURE__ */ Symbol("_handleRouteUpdated"), rt = /* @__PURE__ */ Symbol("routeUpdatedCallback"), Ct = /* @__PURE__ */ Symbol("currentRoute"), p = /* @__PURE__ */ Symbol("currentRoutes"), st = /* @__PURE__ */ Symbol("routeSessionCacheKey"), xr = /* @__PURE__ */ Symbol("_addRouteRecorder"), Ke = /* @__PURE__ */ Symbol("_removeRouteRecorder"), Le = /* @__PURE__ */ Symbol("_cloneRouteRecorder"), $ = /* @__PURE__ */ Symbol("_handleError"), it = /* @__PURE__ */ Symbol("errorCallback"), D = /* @__PURE__ */ Symbol("registerKey"), nt = /* @__PURE__ */ Symbol("notFoundKey"), At = /* @__PURE__ */ Symbol("notFoundPathKey"), W = /* @__PURE__ */ Symbol("forestKey"), S = /* @__PURE__ */ Symbol("historyKey"), Me = /* @__PURE__ */ Symbol("beforeFiltersKey"), ke = /* @__PURE__ */ Symbol("afterFiltersKey"), Te = /* @__PURE__ */ Symbol("destroyFiltersKey"), qt = /* @__PURE__ */ Symbol("propsFilterKey"), ge = /* @__PURE__ */ Symbol("mainDispatcherKey"), $t = /* @__PURE__ */ Symbol("initKey"), ce = /* @__PURE__ */ Symbol("readyKey"), jt = /* @__PURE__ */ Symbol("readyHandlersKey"), ot = /* @__PURE__ */ Symbol("_markReady"), Sr = /* @__PURE__ */ Symbol("_createNextFn"), Kt = /* @__PURE__ */ Symbol("_start"), Lt = /* @__PURE__ */ Symbol("_before"), Mt = /* @__PURE__ */ Symbol("_after"), Er = /* @__PURE__ */ Symbol("_destroy"), kt = /* @__PURE__ */ Symbol("_load"), Ie = /* @__PURE__ */ Symbol("_unload"), Oe = /* @__PURE__ */ Symbol("routerGuardKey");
1188
1188
  function zs(e) {
1189
1189
  return e.layers.length == 0 || e.layers[0].views.length == 0;
1190
1190
  }
1191
1191
  var Gs = class {
1192
1192
  [D] = new Array();
1193
- [st];
1194
- [_t] = "*";
1193
+ [nt];
1194
+ [At] = "*";
1195
1195
  [ce] = !1;
1196
- [qt] = [];
1196
+ [jt] = [];
1197
1197
  [W] = new Ds();
1198
- [x];
1198
+ [S];
1199
1199
  [p] = new Array();
1200
- [Ft] = Ar(null);
1201
- [et] = /* @__PURE__ */ new WeakMap();
1200
+ [Ct] = Lr(null);
1201
+ [st] = /* @__PURE__ */ new WeakMap();
1202
+ [it] = null;
1202
1203
  [rt] = null;
1203
- [Ye] = null;
1204
- [Le] = new Array();
1205
1204
  [Me] = new Array();
1205
+ [ke] = new Array();
1206
1206
  [Te] = new Array();
1207
- [Ct] = null;
1208
- [ge] = new ut();
1209
- [Ie] = new Ns();
1210
- [At] = !1;
1207
+ [qt] = null;
1208
+ [ge] = new ct();
1209
+ [Oe] = new Ns();
1210
+ [$t] = !1;
1211
1211
  get currentRoute() {
1212
- return ds(this[Ft]);
1212
+ return ds(this[Ct]);
1213
1213
  }
1214
1214
  options;
1215
1215
  constructor(e) {
1216
1216
  this.options = e ?? {}, this.options.notFoundPath && this.setNotFoundPath(this.options.notFoundPath);
1217
1217
  let t = this.options.routes || [];
1218
- this.addRoutes(t), this.options.notFound && this.setNotFoundRoute(this.options.notFound), e.history ? this[x] = e.history : this[x] = Pe ? Us() : Ws(), this[x]?.listen(async (r) => {
1218
+ this.addRoutes(t), this.options.notFound && this.setNotFoundRoute(this.options.notFound), e.history ? this[S] = e.history : this[S] = Ee ? Us() : Ws(), this[S]?.listen(async (r) => {
1219
1219
  let s = !0;
1220
1220
  try {
1221
1221
  if (typeof r == "string") {
1222
1222
  const i = this[I](r);
1223
- i && await this[Et]([i]);
1224
- } else await this[Et](r);
1223
+ i && await this[Ft]([i]);
1224
+ } else await this[Ft](r);
1225
1225
  } catch (i) {
1226
1226
  console.error(i.message, i), s = !1;
1227
1227
  }
1228
- this[ce] === !1 && this[it](s);
1228
+ this[ce] === !1 && this[ot](s);
1229
1229
  });
1230
1230
  }
1231
- [K](e = "error", t) {
1231
+ [$](e = "error", t) {
1232
1232
  if (t && typeof t.error == "function") try {
1233
1233
  t.error(e);
1234
1234
  } catch {
1235
1235
  }
1236
- if (typeof this[rt] == "function") try {
1237
- this[rt](e, t);
1236
+ if (typeof this[it] == "function") try {
1237
+ this[it](e, t);
1238
1238
  } catch {
1239
1239
  }
1240
1240
  console.error(e);
1241
1241
  }
1242
1242
  init() {
1243
- this[At] !== !0 && (this[x]?.init(!this[ce]), this[At] = !0);
1243
+ this[$t] !== !0 && (this[S]?.init(!this[ce]), this[$t] = !0);
1244
1244
  }
1245
1245
  isReady() {
1246
1246
  return this[ce] ? Promise.resolve() : new Promise((e, t) => {
1247
- this[qt].push([e, t]);
1247
+ this[jt].push([e, t]);
1248
1248
  });
1249
1249
  }
1250
- [it](e) {
1251
- this[ce] = !0, this[qt].forEach(([t, r]) => {
1250
+ [ot](e) {
1251
+ this[ce] = !0, this[jt].forEach(([t, r]) => {
1252
1252
  try {
1253
1253
  e ? t() : r();
1254
1254
  } catch (s) {
@@ -1256,36 +1256,39 @@ var Gs = class {
1256
1256
  }
1257
1257
  });
1258
1258
  }
1259
- [Et](e) {
1259
+ [Ft](e) {
1260
1260
  try {
1261
1261
  if (!e) {
1262
1262
  let n = [...this[p]].reverse();
1263
- return this[ke](n), Pe && C().location.reload(), Promise.resolve();
1263
+ return this[Ie](n), Ee && C().location.reload(), Promise.resolve();
1264
1264
  }
1265
1265
  let t = null, r = [], s = [], i = 0;
1266
- for (; i < e.length && i < this[p].length && S.isSame(e[i], this[p][i]); i++)
1266
+ for (; i < e.length && i < this[p].length && x.isSame(e[i], this[p][i]); i++)
1267
1267
  e[i].active === !0 && e[i].active !== this[p][i].active && (t = e[i]);
1268
- if (i < e.length && (r = e.slice(i)), i < this[p].length && (s = this[p].slice(i).reverse()), s.length === 0 && r.length === 0) {
1268
+ if (i < e.length) r = e.slice(i);
1269
+ else if (i === e.length) for (; i < this[p].length && this[p][i].historyUpdatePolicy === "traceless"; i++)
1270
+ r.push(this[p][i]), t = e[i];
1271
+ if (i < this[p].length && (s = this[p].slice(i).reverse()), s.length === 0 && r.length === 0) {
1269
1272
  if (t !== null) return this.restore([t]);
1270
1273
  } else if (s.length > 0) {
1271
- if (this[ke](s)) {
1274
+ if (this[Ie](s)) {
1272
1275
  if (r.length > 0) return this.restore(r);
1273
1276
  if (t !== null) return this.restore([t]);
1274
1277
  }
1275
1278
  } else return this.restore(r);
1276
1279
  } catch (t) {
1277
- this[K](t);
1280
+ this[$](t);
1278
1281
  }
1279
1282
  return Promise.resolve();
1280
1283
  }
1281
1284
  [fe](e = null) {
1282
- if (this[Ft].value = e, typeof this[Ye] == "function") try {
1283
- this[Ye](e);
1285
+ if (this[Ct].value = e, typeof this[rt] == "function") try {
1286
+ this[rt](e);
1284
1287
  } catch {
1285
1288
  }
1286
1289
  }
1287
- [pr](e, t) {
1288
- if (e.opsType === _.Open) {
1290
+ [xr](e, t) {
1291
+ if (e.opsType === F.Open) {
1289
1292
  let r = !1;
1290
1293
  const s = this[p].length - 1;
1291
1294
  for (let i = s; i >= 0; i--) {
@@ -1300,77 +1303,77 @@ var Gs = class {
1300
1303
  }
1301
1304
  r || this[p].push(e);
1302
1305
  } else this[p].push(e);
1303
- this[et].set(e, t), this[fe](e);
1306
+ this[st].set(e, t), this[fe](e);
1304
1307
  }
1305
- [tt]() {
1308
+ [Le]() {
1306
1309
  let e = [];
1307
1310
  for (let t of this[p]) {
1308
- let r = S.clone(t, !0);
1311
+ let r = x.clone(t, !0);
1309
1312
  e.push(r);
1310
1313
  }
1311
1314
  return e;
1312
1315
  }
1313
- [je](e) {
1316
+ [Ke](e) {
1314
1317
  if (!this[p]) {
1315
1318
  this[fe](null);
1316
1319
  return;
1317
1320
  }
1318
1321
  let t = -1;
1319
- for (let r = 0; r < this[p].length; r++) if (S.isSame(this[p][r], e)) {
1322
+ for (let r = 0; r < this[p].length; r++) if (x.isSame(this[p][r], e)) {
1320
1323
  t = r;
1321
1324
  break;
1322
1325
  }
1323
1326
  if (t != -1) {
1324
1327
  const r = this[p][t];
1325
1328
  this[p].splice(t, 1);
1326
- const s = this[et].get(r);
1327
- if (this[et].delete(r), this[wr](r, s), r.opsType === _.Append) {
1329
+ const s = this[st].get(r);
1330
+ if (this[st].delete(r), this[Er](r, s), r.opsType === F.Append) {
1328
1331
  const i = this[p].length - 1;
1329
1332
  this[fe](this[p][i] ?? null);
1330
1333
  } else this[fe](null);
1331
1334
  } else this[fe](null);
1332
1335
  }
1333
1336
  set historyMonitor(e) {
1334
- this[x] && (this[x].historyMonitor = e);
1337
+ this[S] && (this[S].historyMonitor = e);
1335
1338
  }
1336
1339
  get historyMonitor() {
1337
- return this[x] ? this[x].historyMonitor : !1;
1340
+ return this[S] ? this[S].historyMonitor : !1;
1338
1341
  }
1339
1342
  set traceless(e) {
1340
- this[x] && (this[x].traceless = e);
1343
+ this[S] && (this[S].traceless = e);
1341
1344
  }
1342
1345
  get traceless() {
1343
- return this[x] ? this[x].traceless : !1;
1346
+ return this[S]?.traceless ?? !1;
1344
1347
  }
1345
1348
  set propsFilter(e) {
1346
- this[Ct] = e;
1349
+ this[qt] = e;
1347
1350
  }
1348
1351
  get propsFilter() {
1349
- return this[Ct];
1352
+ return this[qt];
1350
1353
  }
1351
1354
  setRestorePoint() {
1352
- const e = this[tt]();
1353
- this[x]?.setRestorePoint(e);
1355
+ const e = this[Le]();
1356
+ this[S]?.setRestorePoint(e);
1354
1357
  }
1355
1358
  onRouteUpdated(e) {
1356
- this[Ye] = e;
1359
+ this[rt] = e;
1357
1360
  }
1358
1361
  onError(e) {
1359
- this[rt] = e;
1362
+ this[it] = e;
1360
1363
  }
1361
1364
  beforeEach(e) {
1362
- this[Le].push(e);
1365
+ this[Me].push(e);
1363
1366
  }
1364
1367
  removeBeforeEach(e) {
1365
- const t = this[Le].indexOf(e);
1366
- return t !== -1 ? (this[Le].splice(t, 1), !0) : !1;
1368
+ const t = this[Me].indexOf(e);
1369
+ return t !== -1 ? (this[Me].splice(t, 1), !0) : !1;
1367
1370
  }
1368
1371
  afterEach(e) {
1369
- this[Me].push(e);
1372
+ this[ke].push(e);
1370
1373
  }
1371
1374
  removeAfterEach(e) {
1372
- const t = this[Me].indexOf(e);
1373
- return t !== -1 ? (this[Me].splice(t, 1), !0) : !1;
1375
+ const t = this[ke].indexOf(e);
1376
+ return t !== -1 ? (this[ke].splice(t, 1), !0) : !1;
1374
1377
  }
1375
1378
  destroyEach(e) {
1376
1379
  this[Te].push(e);
@@ -1380,27 +1383,27 @@ var Gs = class {
1380
1383
  return t !== -1 ? (this[Te].splice(t, 1), !0) : !1;
1381
1384
  }
1382
1385
  beforeRestoreEach(e) {
1383
- this[x]?.beforeRestoreEach(e);
1386
+ this[S]?.beforeRestoreEach(e);
1384
1387
  }
1385
1388
  removeBeforeRestoreEach(e) {
1386
- return this[x]?.removeBeforeRestoreEach(e) ?? !1;
1389
+ return this[S]?.removeBeforeRestoreEach(e) ?? !1;
1387
1390
  }
1388
1391
  addRoutes(e) {
1389
1392
  for (let t of e) this.addRoute(t);
1390
1393
  }
1391
1394
  addRoute(e, t = -1) {
1392
- if (e.path === this[_t]) {
1395
+ if (e.path === this[At]) {
1393
1396
  this.setNotFoundRoute(e);
1394
1397
  return;
1395
1398
  }
1396
- const r = this[Qe](e);
1399
+ const r = this[et](e);
1397
1400
  if (t == -1) this[D] = [...this[D], ...r];
1398
1401
  else for (let s = r.length - 1; s >= 0; s--) this[D].splice(t, 0, r[s]);
1399
1402
  }
1400
1403
  removeRoute(e) {
1401
1404
  const t = this[I](e);
1402
1405
  if (t === null)
1403
- return console.warn("[Fox]route格式错误", e), !1;
1406
+ return console.warn("[Fox]Illegal routing format", e), !1;
1404
1407
  for (let r = 0; r < this[D].length; r++) {
1405
1408
  const s = this[D][r];
1406
1409
  if (t?.path && s.path === t.path)
@@ -1412,85 +1415,86 @@ var Gs = class {
1412
1415
  }
1413
1416
  hasRoute(e) {
1414
1417
  const t = this[I](e);
1415
- return t === null ? (console.warn("[Fox]route格式错误", e), !1) : this[D].findIndex((r) => {
1418
+ return t === null ? (console.warn("[Fox]Illegal routing format", e), !1) : this[D].findIndex((r) => {
1416
1419
  if (t?.path && r.path === t.path || t?.name && r.name === t.name) return !0;
1417
1420
  }) !== -1;
1418
1421
  }
1419
1422
  setNotFoundPath(e) {
1420
- this[_t] = e;
1423
+ this[At] = e;
1421
1424
  }
1422
1425
  setNotFoundRoute(e) {
1423
- this[st] = this[Qe](e)[0];
1426
+ const t = this[et](e);
1427
+ this[nt] = t[0];
1424
1428
  }
1425
1429
  getRoutes() {
1426
1430
  return [...this[D]];
1427
1431
  }
1428
- [Qe](e) {
1432
+ [et](e) {
1429
1433
  let t = e.path ?? "";
1430
1434
  t.length > 0 && t.charAt(0) !== "/" && (t = `/${t}`);
1431
1435
  let r = e.components ?? (e.component && { "": e.component });
1432
1436
  if (!r) {
1433
- const u = new gt();
1434
- return u.path = t, u.redirect = e.redirect, [u];
1437
+ const l = new bt();
1438
+ return l.path = t, l.redirect = e.redirect, [l];
1435
1439
  }
1436
- const s = new S();
1440
+ const s = new x();
1437
1441
  s.path = t, s.name = e.name, s.meta = e.meta;
1438
1442
  let i = [];
1439
- for (let u in r) {
1440
- const l = r[u];
1441
- u.length === 0 && (u = Or);
1442
- const a = new Bs(u, l, e.props);
1443
- i.push(a);
1443
+ for (let l in r) {
1444
+ const a = r[l];
1445
+ l.length === 0 && (l = Ur);
1446
+ const u = new Bs(l, a, e.props);
1447
+ i.push(u);
1444
1448
  }
1445
1449
  let n = !1, o = [];
1446
- if (e.children) for (let u of e.children) {
1447
- const l = this[Qe](u);
1448
- for (let a of l) {
1449
- let f = new gt();
1450
- f.name = a.name, a.path && a.path.length > 0 ? t !== "/" ? f.path = `${t}${a.path}` : f.path = a.path : (n = !0, f.path = t);
1451
- let c = new ar();
1452
- c.models = [...i], f.layers = [c, ...a.layers], f.matchedRoutes = [s, ...a.matchedRoutes ?? []], o.push(f);
1450
+ if (e.children) for (let l of e.children) {
1451
+ const a = this[et](l);
1452
+ for (let u of a) {
1453
+ let f = new bt();
1454
+ f.name = u.name, u.path && u.path.length > 0 ? t !== "/" ? f.path = `${t}${u.path}` : f.path = u.path : (n = !0, f.path = t);
1455
+ let c = new dr();
1456
+ c.models = [...i], f.layers = [c, ...u.layers], f.matchedRoutes = [s, ...u.matchedRoutes ?? []], o.push(f);
1453
1457
  }
1454
1458
  }
1455
1459
  if (!n) {
1456
- const u = new ar();
1457
- u.models = i;
1458
- const l = new gt();
1459
- l.name = e.name, l.path = t, l.matchedRoutes = [s], l.layers = [u], o.splice(0, 0, l);
1460
+ const l = new dr();
1461
+ l.models = i;
1462
+ const a = new bt();
1463
+ a.name = e.name, a.path = t, a.matchedRoutes = [s], a.layers = [l], o.splice(0, 0, a);
1460
1464
  }
1461
1465
  return o;
1462
1466
  }
1463
- [Ze](e) {
1467
+ [tt](e) {
1464
1468
  const t = e.route;
1465
1469
  try {
1466
1470
  for (let r of this[D]) {
1467
1471
  const s = t.path ? t.template ?? t.path : null, i = t.name ? t.template ?? t.name : null;
1468
1472
  if (s && r.path) {
1469
1473
  let n = r.match;
1470
- n || (n = r.match = ks(r.path));
1474
+ n || (n = r.match = Ts(r.path));
1471
1475
  const o = n(s);
1472
1476
  if (!o) continue;
1473
1477
  if (r.redirect) {
1474
- const u = new S();
1475
- $(!0, u, t), u.path = r.redirect;
1476
- const l = {
1477
- route: u,
1478
+ const l = new x();
1479
+ j(!0, l, t), l.path = r.redirect;
1480
+ const a = {
1481
+ route: l,
1478
1482
  find: void 0
1479
1483
  };
1480
- return this[Ze](l) ? (e.route = l.route, e.find = l.find, t.template && e.find && (e.find = { ...e.find }, e.find.path = t.path), !0) : !1;
1484
+ return this[tt](a) ? (e.route = a.route, e.find = a.find, t.template && e.find && (e.find = { ...e.find }, e.find.path = t.path), !0) : !1;
1481
1485
  }
1482
- if (t.params = t.params ?? {}, $(!0, t.params, o.params), t.query) {
1483
- const u = t.query;
1484
- if (typeof u == "string") {
1485
- const l = {}, a = u.split("&");
1486
- for (let f of a) {
1486
+ if (t.params = t.params ?? {}, j(!0, t.params, o.params), t.query) {
1487
+ const l = t.query;
1488
+ if (typeof l == "string") {
1489
+ const a = {}, u = l.split("&");
1490
+ for (let f of u) {
1487
1491
  const c = f.split("=");
1488
1492
  if (c.length !== 2) continue;
1489
1493
  const h = decodeURIComponent(c[0].trim());
1490
- l[h] = decodeURIComponent(c[1].trim());
1494
+ a[h] = decodeURIComponent(c[1].trim());
1491
1495
  }
1492
- $(!0, t.params, l);
1493
- } else typeof u == "object" && $(!0, t.params, u);
1496
+ j(!0, t.params, a);
1497
+ } else typeof l == "object" && j(!0, t.params, l);
1494
1498
  }
1495
1499
  return e.find = r, t.template && e.find && (e.find = { ...e.find }, e.find.path = t.path), !0;
1496
1500
  } else if (i === r.name)
@@ -1504,33 +1508,33 @@ var Gs = class {
1504
1508
  [I](e) {
1505
1509
  let t = null;
1506
1510
  if (Array.isArray(e))
1507
- if (t = new S(), typeof e[0] == "object") t = S.from(e[0]);
1508
- else for (let r = 0; r < e.length; r++) r === 0 ? e[r].charAt(0) === "/" ? t.path = e[r] : t.name = e[r] : r === 1 ? t.params = e[r] : r === 2 ? t.root = e[r] : r === 3 && $(!1, t, e[r]);
1509
- else typeof e == "object" ? t = S.from(e) : typeof e == "string" && (t = new S(), e.charAt(0) == "/" ? t.path = e : t.name = e);
1511
+ if (t = new x(), typeof e[0] == "object") t = x.from(e[0]);
1512
+ else for (let r = 0; r < e.length; r++) r === 0 ? e[r].charAt(0) === "/" ? t.path = e[r] : t.name = e[r] : r === 1 ? t.params = e[r] : r === 2 ? t.root = e[r] : r === 3 && j(!1, t, e[r]);
1513
+ else typeof e == "object" ? t = x.from(e) : typeof e == "string" && (t = new x(), e.charAt(0) == "/" ? t.path = e : t.name = e);
1510
1514
  if (t) {
1511
1515
  if (t.path) {
1512
1516
  let r = t.path.indexOf("?");
1513
1517
  r !== -1 && r < t.path.length - 1 && (t.query = t.path.substring(r + 1), t.path = t.path.substring(0, r));
1514
1518
  }
1515
- t.root = t.root ?? "default", t.opsType = t.opsType ?? this.options.defaultOperationType ?? _.Push, t.traceless && !t.historyUpdatePolicy && (t.historyUpdatePolicy = "traceless");
1519
+ t.root = t.root ?? "default", t.opsType = t.opsType ?? this.options.defaultOperationType ?? F.Push, t.traceless && !t.historyUpdatePolicy && (t.historyUpdatePolicy = "traceless");
1516
1520
  }
1517
1521
  return t;
1518
1522
  }
1519
1523
  push(...e) {
1520
1524
  const t = this[I](e);
1521
- return t ? (t.opsType = _.Push, t.historyUpdatePolicy = t.historyUpdatePolicy ?? "push", this.to(t)) : (this[K]("resolve route fail", t), this);
1525
+ return t ? (t.opsType = F.Push, t.historyUpdatePolicy = t.historyUpdatePolicy ?? "push", this.to(t)) : (this[$]("resolve route fail", t), this);
1522
1526
  }
1523
1527
  put(...e) {
1524
1528
  const t = this[I](e);
1525
- return t ? (t.opsType = _.Put, t.historyUpdatePolicy = t.historyUpdatePolicy ?? "traceless", this.to(t)) : (this[K]("resolve route fail", t), this);
1529
+ return t ? (t.opsType = F.Put, t.historyUpdatePolicy = t.historyUpdatePolicy ?? "traceless", this.to(t)) : (this[$]("resolve route fail", t), this);
1526
1530
  }
1527
1531
  replace(...e) {
1528
1532
  const t = this[I](e);
1529
- return t ? (t.opsType = _.Replace, t.historyUpdatePolicy = t.historyUpdatePolicy ?? "replace", this.to(t)) : (this[K]("resolve route fail", t), this);
1533
+ return t ? (t.opsType = F.Replace, t.historyUpdatePolicy = t.historyUpdatePolicy ?? "replace", this.to(t)) : (this[$]("resolve route fail", t), this);
1530
1534
  }
1531
1535
  append(...e) {
1532
1536
  const t = this[I](e);
1533
- return t ? (t.opsType = _.Append, t.historyUpdatePolicy = t.historyUpdatePolicy ?? "push", this.to(t)) : (this[K]("resolve route fail", t), this);
1537
+ return t ? (t.opsType = F.Append, t.historyUpdatePolicy = t.historyUpdatePolicy ?? "push", this.to(t)) : (this[$]("resolve route fail", t), this);
1534
1538
  }
1535
1539
  remove(e, t) {
1536
1540
  return new Promise((r) => {
@@ -1540,75 +1544,78 @@ var Gs = class {
1540
1544
  s.resolve(), r(!1);
1541
1545
  return;
1542
1546
  }
1543
- let i = -1, n = null, o = [];
1547
+ let i = -1, n = null, o = [], l = this[p].length - 1, a = l !== -1 ? this[p][l] : null;
1544
1548
  if (e) {
1545
- if (n = e.root ?? "default", e.all) for (let l = this[p].length - 1; l > 0; l--) {
1546
- const a = this[p][l];
1547
- if (a.opsType === _.Append) {
1548
- const f = a.root ?? "default";
1549
- if (n && n !== f) continue;
1550
- o.splice(0, 0, a), i = l - 1;
1549
+ if (n = e.root ?? "default", e.all) for (let f = l; f > 0; f--) {
1550
+ const c = this[p][f];
1551
+ if (c.opsType === F.Append) {
1552
+ const h = c.root ?? "default";
1553
+ if (n && n !== h) continue;
1554
+ o.splice(0, 0, c), i = f - 1;
1551
1555
  }
1552
1556
  }
1553
- else if (e.until) for (let l = this[p].length - 1; l > 0; l--) {
1554
- let a = this[p][l];
1555
- if (a.opsType === _.Append && a.root === n) {
1556
- if (e.until.charAt(0) === "/" && e.until === a.path) {
1557
- i = l;
1557
+ else if (e.until) for (let f = l; f > 0; f--) {
1558
+ let c = this[p][f];
1559
+ if (c.opsType === F.Append && c.root === n) {
1560
+ if (e.until.charAt(0) === "/" && e.until === c.path) {
1561
+ i = f;
1558
1562
  break;
1559
- } else if (e.until === a.name) {
1560
- i = l;
1563
+ } else if (e.until === c.name) {
1564
+ i = f;
1561
1565
  break;
1562
1566
  }
1563
- o.splice(0, 0, a);
1567
+ o.splice(0, 0, c);
1564
1568
  }
1565
1569
  }
1566
- else if (e.to) for (let l = this[p].length - 1; l > 0; l--) {
1567
- const a = this[p][l];
1568
- if (a.opsType === _.Append) {
1569
- const f = a.root ?? "default";
1570
- if (n && n !== f) continue;
1571
- if (o.splice(0, 0, a), e.to.charAt(0) === "/" && e.to === a.path) {
1572
- i = l - 1;
1570
+ else if (e.to) for (let f = l; f > 0; f--) {
1571
+ const c = this[p][f];
1572
+ if (c.opsType === F.Append) {
1573
+ const h = c.root ?? "default";
1574
+ if (n && n !== h) continue;
1575
+ if (o.splice(0, 0, c), e.to.charAt(0) === "/" && e.to === c.path) {
1576
+ i = f - 1;
1573
1577
  break;
1574
- } else if (e.to === a.name) {
1575
- i = l - 1;
1578
+ } else if (e.to === c.name) {
1579
+ i = f - 1;
1576
1580
  break;
1577
1581
  }
1578
1582
  }
1579
1583
  }
1580
- } else for (let l = this[p].length - 1; l > 0; l--) {
1581
- let a = this[p][l];
1582
- if (a.opsType === _.Append) {
1583
- o.push(a), i = l - 1;
1584
+ } else for (let f = l; f > 0; f--) {
1585
+ let c = this[p][f];
1586
+ if (c.opsType === F.Append) {
1587
+ o.push(c), i = f - 1;
1584
1588
  break;
1585
1589
  }
1586
1590
  }
1587
1591
  if (i === -1 || o.length === 0) {
1588
- const l = "[Fox]can not find route";
1589
- console.warn(l), s.resolve(l), r(!1);
1592
+ const f = "[Fox]can not find route";
1593
+ console.warn(f), s.resolve(f), r(!1);
1590
1594
  return;
1591
1595
  }
1592
- let u = null;
1593
- if (i !== -1 && (u = this[p][i]), this[ke](o)) {
1596
+ const u = i !== -1 ? this[p][i] : null;
1597
+ if (this[Ie](o)) {
1594
1598
  if (t === !1)
1595
1599
  return s.resolve(), r(!0), !0;
1596
- const l = () => (s.resolve(), r(!0), !0), a = this[p].length;
1597
- if (u && S.isSame(u, this[p][a - 1])) {
1598
- this[x]?.goBack(u, l);
1600
+ const f = () => (s.resolve(), r(!0), !0), c = this[p].length;
1601
+ if (u && x.isSame(u, this[p][c - 1])) {
1602
+ if (a?.historyUpdatePolicy === "traceless") {
1603
+ const h = new St(x.clone(u, !0), this[Le]());
1604
+ this[S]?.replace(h), f();
1605
+ } else this[S]?.goBack(u, f);
1599
1606
  return;
1600
1607
  }
1601
- l();
1608
+ f();
1602
1609
  }
1603
1610
  } catch (i) {
1604
- this[K](i), s.resolve(), r(!1);
1611
+ this[$](i), s.resolve(), r(!1);
1605
1612
  }
1606
1613
  });
1607
1614
  });
1608
1615
  }
1609
1616
  open(...e) {
1610
1617
  const t = this[I](e);
1611
- return t ? (t.opsType = _.Open, t.historyUpdatePolicy = t.historyUpdatePolicy ?? "push", this.to(t)) : (this[K]("resolve route fail", t), this);
1618
+ return t ? (t.opsType = F.Open, t.historyUpdatePolicy = t.historyUpdatePolicy ?? "push", this.to(t)) : (this[$]("resolve route fail", t), this);
1612
1619
  }
1613
1620
  close(e) {
1614
1621
  return this[ge].post((t) => {
@@ -1639,46 +1646,46 @@ var Gs = class {
1639
1646
  t.resolve();
1640
1647
  return;
1641
1648
  }
1642
- this[ke](s), t.resolve();
1649
+ this[Ie](s), t.resolve();
1643
1650
  } catch (r) {
1644
- this[K](r), t.resolve();
1651
+ this[$](r), t.resolve();
1645
1652
  }
1646
1653
  }), this;
1647
1654
  }
1648
1655
  to(...e) {
1649
1656
  const t = this[I](e);
1650
1657
  if (!t)
1651
- return this[K]("resolve route fail", t), this;
1652
- const r = this[Ie].acquire(t);
1653
- return r == null ? (this[K]("route forbid", t), this) : (this[ge].post((s) => {
1658
+ return this[$]("resolve route fail", t), this;
1659
+ const r = this[Oe].acquire(t);
1660
+ return r == null ? (this[$]("route forbid", t), this) : (this[ge].post((s) => {
1654
1661
  try {
1655
1662
  let i = this[Kt](t);
1656
- this[$t](i), this[Lt](i), this[jt](i), i.wait((n, o) => {
1657
- const u = n.session.to;
1663
+ this[Lt](i), this[kt](i), this[Mt](i), i.wait((n, o) => {
1664
+ const l = n.session.to;
1658
1665
  if (n.session.updateResult && n.session.updateResult.status === "success") try {
1659
- const l = new ur(S.clone(u, !0), this[tt]());
1660
- u.historyUpdatePolicy === "replace" ? this[x]?.replace(l) : u.historyUpdatePolicy === "traceless" ? this[x]?.setRouteMark(l) : this[x]?.push(l);
1661
- } catch (l) {
1662
- console.error(l.message, l);
1666
+ const a = new St(x.clone(l, !0), this[Le]());
1667
+ l.historyUpdatePolicy === "replace" ? this[S]?.replace(a) : l.historyUpdatePolicy === "traceless" ? this[S]?.setRouteMark(a) : this[S]?.push(a);
1668
+ } catch (a) {
1669
+ console.error(a.message, a);
1663
1670
  }
1664
- if (Je.clear(n.session), this[Ie].release(r), typeof t.success == "function") try {
1671
+ if (Ge.clear(n.session), this[Oe].release(r), typeof t.success == "function") try {
1665
1672
  Reflect.apply(t.success, {}, []);
1666
- } catch (l) {
1667
- console.error(l.message, l);
1673
+ } catch (a) {
1674
+ console.error(a.message, a);
1668
1675
  }
1669
- this[ce] === !1 && this[it](!0), i = null, s.resolve();
1676
+ this[ce] === !1 && this[ot](!0), i = null, s.resolve();
1670
1677
  }, (n, o) => {
1671
- this[Ie].release(r), o !== null && this[K](o, t), this[ce] === !1 && this[it](!1), Je.clear(n.session), i = null, s.resolve();
1678
+ this[Oe].release(r), o !== null && this[$](o, t), this[ce] === !1 && this[ot](!1), Ge.clear(n.session), i = null, s.resolve();
1672
1679
  });
1673
1680
  } catch (i) {
1674
- this[Ie].release(r), this[K](i, t), s.resolve();
1681
+ this[Oe].release(r), this[$](i, t), s.resolve();
1675
1682
  }
1676
1683
  }), this);
1677
1684
  }
1678
1685
  back(e = 1) {
1679
- this[x]?.go(-e, !1);
1686
+ this[S]?.go(-e, !1);
1680
1687
  }
1681
- [gr](e) {
1688
+ [Sr](e) {
1682
1689
  return (t, r) => {
1683
1690
  if (typeof t == "boolean")
1684
1691
  e.session.redirect = !1, t ? e.resolve() : e.reject(r ?? null);
@@ -1694,11 +1701,11 @@ var Gs = class {
1694
1701
  };
1695
1702
  }
1696
1703
  [Kt](e) {
1697
- const t = new Je(e, this[p].length > 0 ? this[p][this[p].length - 1] : void 0), r = {
1704
+ const t = new Ge(e, this[p].length > 0 ? this[p][this[p].length - 1] : void 0), r = {
1698
1705
  route: e,
1699
1706
  find: null
1700
1707
  };
1701
- if (this[Ze](r), r.find) {
1708
+ if (this[tt](r), r.find) {
1702
1709
  t.routeModel = r.find, e.matched = r.find.matchedRoutes ?? [];
1703
1710
  const s = {};
1704
1711
  if (Array.isArray(r.find?.matchedRoutes)) for (let i = 0; i < r.find.matchedRoutes.length; i++) {
@@ -1707,11 +1714,11 @@ var Gs = class {
1707
1714
  }
1708
1715
  e.meta && typeof e.meta == "object" && Object.assign(s, e.meta), e.meta = s;
1709
1716
  }
1710
- return new ut(t);
1717
+ return new ct(t);
1711
1718
  }
1712
- [$t](e) {
1713
- for (let t of this[Le]) e.post((r) => {
1714
- const s = this[gr](r);
1719
+ [Lt](e) {
1720
+ for (let t of this[Me]) e.post((r) => {
1721
+ const s = this[Sr](r);
1715
1722
  Reflect.apply(t, {}, [
1716
1723
  r.session.to,
1717
1724
  r.session.from,
@@ -1720,9 +1727,9 @@ var Gs = class {
1720
1727
  ]);
1721
1728
  });
1722
1729
  }
1723
- [jt](e) {
1730
+ [Mt](e) {
1724
1731
  e.post((t) => {
1725
- for (let r of this[Me]) try {
1732
+ for (let r of this[ke]) try {
1726
1733
  Reflect.apply(r, {}, [
1727
1734
  t.session.to,
1728
1735
  t.session.from,
@@ -1734,7 +1741,7 @@ var Gs = class {
1734
1741
  t.resolve();
1735
1742
  });
1736
1743
  }
1737
- [wr](e, t) {
1744
+ [Er](e, t) {
1738
1745
  for (let r of this[Te]) try {
1739
1746
  Reflect.apply(r, {}, [e, t]);
1740
1747
  } catch (s) {
@@ -1742,7 +1749,7 @@ var Gs = class {
1742
1749
  }
1743
1750
  typeof e.destroy == "function" && Reflect.apply(e.destroy, e, []);
1744
1751
  }
1745
- [Lt](e) {
1752
+ [kt](e) {
1746
1753
  e.post((t) => {
1747
1754
  const r = t.session.to;
1748
1755
  let s = t.session.routeModel;
@@ -1751,15 +1758,15 @@ var Gs = class {
1751
1758
  route: r,
1752
1759
  find: null
1753
1760
  };
1754
- if (this[Ze](n)) s = n.find, t.session.routeModel = s;
1755
- else if (this[st]) s = this[st];
1761
+ if (this[tt](n)) s = n.find, t.session.routeModel = s;
1762
+ else if (this[nt]) s = this[nt];
1756
1763
  else {
1757
1764
  t.reject(`not find route model, path:${r.path ?? r.name}`);
1758
1765
  return;
1759
1766
  }
1760
1767
  }
1761
- const i = Je.from(t.session);
1762
- this[dr](r, s, i).then((n) => {
1768
+ const i = Ge.from(t.session);
1769
+ this[br](r, s, i).then((n) => {
1763
1770
  this[W], t.session.updateResult = n ?? {
1764
1771
  status: "success",
1765
1772
  message: ""
@@ -1769,32 +1776,32 @@ var Gs = class {
1769
1776
  });
1770
1777
  });
1771
1778
  }
1772
- [ke](e) {
1779
+ [Ie](e) {
1773
1780
  if (e.length == 0) return !0;
1774
1781
  let t = this[W], r = [];
1775
1782
  for (let s of e) {
1776
- let i = this[Pt](t, s);
1783
+ let i = this[_t](t, s);
1777
1784
  i != null && r.push({
1778
1785
  ...i,
1779
1786
  route: s
1780
1787
  });
1781
1788
  }
1782
1789
  if (r.length == 0)
1783
- return this[K]("can not find view index"), !1;
1790
+ return this[$]("can not find view index"), !1;
1784
1791
  for (let s of r.reverse()) this[ue](t, {
1785
1792
  x: s.x,
1786
1793
  y: s.y
1787
1794
  }, [s.route.index ?? 0], !0);
1788
1795
  return !0;
1789
1796
  }
1790
- [Pt](e, t) {
1797
+ [_t](e, t) {
1791
1798
  const r = t.root ?? "default";
1792
1799
  let s;
1793
1800
  for (let i = 0; i < e.layers.length; i++) {
1794
1801
  const n = e.layers[i];
1795
1802
  for (let o = n.views.length - 1; o >= 0; o--) {
1796
- const u = n.views[o];
1797
- if (u[G] && u[ot] === r)
1803
+ const l = n.views[o];
1804
+ if (l[G] && l[at] === r)
1798
1805
  return s = {
1799
1806
  x: o,
1800
1807
  y: i
@@ -1808,35 +1815,35 @@ var Gs = class {
1808
1815
  }
1809
1816
  [ue](e, t, r = null, s = !0) {
1810
1817
  if (t.y >= e.layers.length || t.x >= e.layers[t.y].views.length) return;
1811
- let i = e.layers[t.y].views[t.x], n = !1, o = [], u = !1, l = [...i.slots.value];
1812
- for (let f = l.length - 1; f >= 0; f--) {
1813
- let c = l[f];
1814
- (!r || r.indexOf(c.index) != -1) && (c.route && i[G] && (this[je](c.route), c.active === !0 && c.route.opsType == _.Append && (u = !0)), o.push(new O(i, c.index, t.y)), l.splice(f, 1));
1818
+ let i = e.layers[t.y].views[t.x], n = !1, o = [], l = !1, a = [...i.slots.value];
1819
+ for (let f = a.length - 1; f >= 0; f--) {
1820
+ let c = a[f];
1821
+ (!r || r.indexOf(c.index) != -1) && (c.route && i[G] && (this[Ke](c.route), c.active === !0 && c.route.opsType == F.Append && (l = !0)), o.push(new O(i, c.index, t.y)), a.splice(f, 1));
1815
1822
  }
1816
- if (l.length == 0) s ? i.slots.value = l : e.layers[t.y].views.splice(t.x, 1);
1823
+ if (a.length == 0) s ? i.slots.value = a : e.layers[t.y].views.splice(t.x, 1);
1817
1824
  else {
1818
- if (u) {
1819
- let f = l[l.length - 1];
1825
+ if (l) {
1826
+ let f = a[a.length - 1];
1820
1827
  f.active = !0, f.route && (f.route.active = f.active);
1821
1828
  }
1822
- i.slots.value = l;
1829
+ i.slots.value = a;
1823
1830
  }
1824
1831
  e.layers[t.y].views.length == 0 && (n = !0);
1825
- let a = t.y + 1;
1826
- for (; a < e.layers.length; a++) {
1827
- let f = e.layers[a].views, c = [];
1832
+ let u = t.y + 1;
1833
+ for (; u < e.layers.length; u++) {
1834
+ let f = e.layers[u].views, c = [];
1828
1835
  for (let h = f.length - 1; (n || o.length > 0) && h >= 0; h--) {
1829
1836
  let y = f[h];
1830
1837
  if (y[ye] && (n || O.include(o, y[ye]))) {
1831
1838
  let d = y.slots.value;
1832
1839
  for (let m = d.length - 1; m >= 0; m--) {
1833
- let w = d[m];
1834
- w.route && y[G] && this[je](w.route), c.push(new O(y, w.index, a)), d.splice(m, 1);
1840
+ let b = d[m];
1841
+ b.route && y[G] && this[Ke](b.route), c.push(new O(y, b.index, u)), d.splice(m, 1);
1835
1842
  }
1836
- e.layers[a].views.splice(h, 1);
1843
+ e.layers[u].views.splice(h, 1);
1837
1844
  }
1838
1845
  }
1839
- o = c, e.layers[a].views.length == 0 && (n = !0);
1846
+ o = c, e.layers[u].views.length == 0 && (n = !0);
1840
1847
  }
1841
1848
  }
1842
1849
  restore(e) {
@@ -1851,32 +1858,32 @@ var Gs = class {
1851
1858
  let s = null, i = !1;
1852
1859
  for (let n = 0; n < e.length; n++) {
1853
1860
  const o = e[n];
1854
- this[ge].post((u) => {
1855
- const l = this[Kt](o);
1856
- this[$t](l), this[Lt](l), this[jt](l), l.wait((a, f) => {
1857
- s = a.session.to, i = a.session.redirect, u.resolve();
1858
- }, (a, f) => {
1859
- s = null, f !== null && this[K](f), u.resolve();
1861
+ this[ge].post((l) => {
1862
+ const a = this[Kt](o);
1863
+ this[Lt](a), this[kt](a), this[Mt](a), a.wait((u, f) => {
1864
+ s = u.session.to, i = u.session.redirect, l.resolve();
1865
+ }, (u, f) => {
1866
+ s = null, f !== null && this[$](f), l.resolve();
1860
1867
  });
1861
1868
  });
1862
1869
  }
1863
1870
  this[ge].post((n) => {
1864
1871
  if (s && i === !0) {
1865
- const o = new ur(S.clone(s, !0), this[tt]());
1866
- this[x]?.replace(o);
1872
+ const o = new St(x.clone(s, !0), this[Le]());
1873
+ this[S]?.replace(o);
1867
1874
  }
1868
1875
  n.resolve(), t();
1869
1876
  });
1870
1877
  });
1871
1878
  }
1872
- async [dr](e, t, r) {
1879
+ async [br](e, t, r) {
1873
1880
  const s = e.updateType ?? wt.Part;
1874
- await this[mr](t);
1875
- const i = this[vr](t, e, r, s);
1881
+ await this[wr](t);
1882
+ const i = this[Rr](t, e, r, s);
1876
1883
  if (i.status === "error") throw Error(i.message);
1877
1884
  return i;
1878
1885
  }
1879
- [mr](e) {
1886
+ [wr](e) {
1880
1887
  let t = [];
1881
1888
  for (let r = 0; r < e.layers.length; r++) {
1882
1889
  let s = e.layers[r];
@@ -1887,17 +1894,17 @@ var Gs = class {
1887
1894
  }
1888
1895
  return t.length > 0 ? Promise.all(t) : Promise.resolve();
1889
1896
  }
1890
- [vr](e, t, r, s) {
1897
+ [Rr](e, t, r, s) {
1891
1898
  if (e.layers[0].models.length !== 1) return {
1892
1899
  status: "error",
1893
1900
  message: "illegal route structure(multi root node)"
1894
1901
  };
1895
1902
  const i = e.layers[0].models[0];
1896
- let n = this[W], o = zs(n), u = t.root ?? "default", l;
1897
- !o && s == wt.Part && (l = this[Pt](n, t));
1898
- let a, f = 0;
1899
- if (l == null || l == null) if (o || s === wt.All)
1900
- n.layers.length == 0 && (n.layers[0] = new bt()), n.layers[0].views.length == 0 ? (a = new Ae(t.root ?? "default", !0, null), n.layers[0].views = [a]) : a = n.layers[0].views[0], l = {
1903
+ let n = this[W], o = zs(n), l = t.root ?? "default", a;
1904
+ !o && s == wt.Part && (a = this[_t](n, t));
1905
+ let u, f = 0;
1906
+ if (a == null || a == null) if (o || s === wt.All)
1907
+ n.layers.length == 0 && (n.layers[0] = new Rt()), n.layers[0].views.length == 0 ? (u = new qe(t.root ?? "default", !0, null), n.layers[0].views = [u]) : u = n.layers[0].views[0], a = {
1901
1908
  x: 0,
1902
1909
  y: 0
1903
1910
  };
@@ -1930,29 +1937,29 @@ var Gs = class {
1930
1937
  status: "error",
1931
1938
  message: "can not insert view(not find root node ref)"
1932
1939
  };
1933
- a = new Ae(u, !0, y), n.layers[h].views.push(a), l = {
1940
+ u = new qe(l, !0, y), n.layers[h].views.push(u), a = {
1934
1941
  x: n.layers[h].views.length - 1,
1935
1942
  y: h
1936
1943
  };
1937
1944
  }
1938
- else a = n.layers[l.y].views[l.x];
1939
- if (f = l.y, a[G] = !0, t.opsType === _.Append) {
1940
- t.index = t.index ?? Be.get(), t.active = !0;
1941
- let c = a.slots.value;
1945
+ else u = n.layers[a.y].views[a.x];
1946
+ if (f = a.y, u[G] = !0, t.opsType === F.Append) {
1947
+ t.index = t.index ?? De.get(), t.active = !0;
1948
+ let c = u.slots.value;
1942
1949
  if (c.length > 0) {
1943
- let w = c[c.length - 1];
1944
- w.active = !1, w.route && (w.route.active = w.active);
1950
+ let b = c[c.length - 1];
1951
+ b.active = !1, b.route && (b.route.active = b.active);
1945
1952
  }
1946
1953
  let h = new re(t, i, t.index, !0);
1947
- a.slots.value = [...c, h];
1948
- let y = f + 1, d = 1, m = new O(a, t.index, f);
1954
+ u.slots.value = [...c, h];
1955
+ let y = f + 1, d = 1, m = new O(u, t.index, f);
1949
1956
  this[se](n, y, e, d, m);
1950
- } else if (t.opsType === _.Open) {
1951
- let c = a.slots.value;
1957
+ } else if (t.opsType === F.Open) {
1958
+ let c = u.slots.value;
1952
1959
  const h = t.active ?? !0;
1953
1960
  let y = !1;
1954
1961
  for (let d of c) {
1955
- if (d.route !== null && S.isSamePathForRoute(d.route, t)) {
1962
+ if (d.route !== null && x.isSamePathForRoute(d.route, t)) {
1956
1963
  if (d.active === h)
1957
1964
  return t.index = d.index, t.active = h, d.route = t, {
1958
1965
  status: "noChange",
@@ -1963,45 +1970,45 @@ var Gs = class {
1963
1970
  d.route && (d.route.active = d.active);
1964
1971
  }
1965
1972
  if (!y) {
1966
- t.index = t.index ?? Be.get(), t.active = h;
1973
+ t.index = t.index ?? De.get(), t.active = h;
1967
1974
  let d = new re(t, i, t.index, h);
1968
1975
  c.push(d);
1969
- let m = f + 1, w = 1, g = new O(a, t.index, f);
1970
- this[se](n, m, e, w, g);
1976
+ let m = f + 1, b = 1, g = new O(u, t.index, f);
1977
+ this[se](n, m, e, b, g);
1971
1978
  }
1972
- a.slots.value = [...c];
1979
+ u.slots.value = [...c];
1973
1980
  } else {
1974
- let c = a.slots.value;
1981
+ let c = u.slots.value;
1975
1982
  if (c.length == 0) {
1976
- t.index = t.index ?? Be.get(), t.active = !0, a.slots.value = [new re(t, i, t.index)];
1977
- let h = f + 1, y = 1, d = new O(a, t.index, f);
1983
+ t.index = t.index ?? De.get(), t.active = !0, u.slots.value = [new re(t, i, t.index)];
1984
+ let h = f + 1, y = 1, d = new O(u, t.index, f);
1978
1985
  this[se](n, h, e, y, d);
1979
1986
  } else {
1980
1987
  let h = c[0];
1981
1988
  if (h.model !== i) {
1982
- this[ue](n, l, null, !0), t.index = t.index ?? Be.get(), t.active = !0, a.slots.value = [new re(t, i, t.index)];
1983
- let y = f + 1, d = 1, m = new O(a, t.index, f);
1989
+ this[ue](n, a, null, !0), t.index = t.index ?? De.get(), t.active = !0, u.slots.value = [new re(t, i, t.index)];
1990
+ let y = f + 1, d = 1, m = new O(u, t.index, f);
1984
1991
  this[se](n, y, e, d, m);
1985
1992
  } else {
1986
- h.route !== null && this[je](h.route);
1993
+ h.route !== null && this[Ke](h.route);
1987
1994
  let y = !1;
1988
1995
  const d = t.active ?? !0;
1989
1996
  h.active !== d && (h.active = d, y = !0), t.active = d, t.index = h.index, h.route = t;
1990
1997
  let m = [];
1991
1998
  for (let L = 1; L < c.length; L++) m.push(c[L].index);
1992
- m.length > 0 ? this[ue](n, l, m, !0) : y && (a.slots.value = [...c]);
1993
- let w = [new O(a, t.index, f)], g = f + 1, v = 1, j = new O(a, t.index, f);
1994
- for (; w.length > 0 && g < n.layers.length && v < e.layers.length; g++, v++) {
1999
+ m.length > 0 ? this[ue](n, a, m, !0) : y && (u.slots.value = [...c]);
2000
+ let b = [new O(u, t.index, f)], g = f + 1, v = 1, K = new O(u, t.index, f);
2001
+ for (; b.length > 0 && g < n.layers.length && v < e.layers.length; g++, v++) {
1995
2002
  let L = [];
1996
2003
  for (let M = 0; M < n.layers[g].views.length; M++) {
1997
2004
  let q = n.layers[g].views[M];
1998
- q[ye] && O.include(w, q[ye]) && L.unshift(M);
2005
+ q[ye] && O.include(b, q[ye]) && L.unshift(M);
1999
2006
  }
2000
- let _e = [];
2007
+ let Ce = [];
2001
2008
  for (let M of L) {
2002
2009
  let q = n.layers[g].views[M], oe = e.layers[v].models, ee;
2003
- for (let T = 0; T < oe.length; T++) if (q.name === oe[T].name) {
2004
- ee = oe[T];
2010
+ for (let k = 0; k < oe.length; k++) if (q.name === oe[k].name) {
2011
+ ee = oe[k];
2005
2012
  break;
2006
2013
  }
2007
2014
  if (!ee) this[ue](n, {
@@ -2009,45 +2016,45 @@ var Gs = class {
2009
2016
  y: g
2010
2017
  }, null, !1);
2011
2018
  else {
2012
- let T = q.slots.value;
2013
- if (T.length == 0) {
2019
+ let k = q.slots.value;
2020
+ if (k.length == 0) {
2014
2021
  let Q = 0;
2015
2022
  q.slots.value = [new re(null, ee, Q)];
2016
2023
  let U = g + 1, V = v + 1;
2017
- this[se](n, U, e, V, j);
2024
+ this[se](n, U, e, V, K);
2018
2025
  } else {
2019
- let Q = T[0];
2026
+ let Q = k[0];
2020
2027
  if (Q.model !== ee) {
2021
2028
  this[ue](n, {
2022
2029
  x: M,
2023
2030
  y: g
2024
2031
  }, null, !0), q.slots.value = [new re(null, ee, 0)];
2025
2032
  let U = g + 1, V = v + 1;
2026
- this[se](n, U, e, V, j);
2033
+ this[se](n, U, e, V, K);
2027
2034
  } else {
2028
- q[G] && Q.route !== null && this[je](Q.route);
2035
+ q[G] && Q.route !== null && this[Ke](Q.route);
2029
2036
  let U = [];
2030
- for (let V = 1; V < T.length; V++) U.push(T[V].index);
2037
+ for (let V = 1; V < k.length; V++) U.push(k[V].index);
2031
2038
  U.length > 0 && this[ue](n, {
2032
2039
  x: M,
2033
2040
  y: g
2034
- }, U, !0), _e.push(new O(q, Q.index, g));
2041
+ }, U, !0), Ce.push(new O(q, Q.index, g));
2035
2042
  }
2036
2043
  }
2037
2044
  q[G] = !1;
2038
2045
  }
2039
2046
  }
2040
- w = _e;
2047
+ b = Ce;
2041
2048
  }
2042
- this[se](n, g, e, v, j);
2049
+ this[se](n, g, e, v, K);
2043
2050
  }
2044
2051
  }
2045
2052
  }
2046
- if (a && a[z]) {
2047
- let c = a[z];
2048
- c && (t.slot = new Os(u, f, c?.view.name, c?.index ?? 0));
2053
+ if (u && u[z]) {
2054
+ let c = u[z];
2055
+ c && (t.slot = new Os(l, f, c?.view.name, c?.index ?? 0));
2049
2056
  }
2050
- return r.to = void 0, r.routeModel = void 0, this[pr](t, r), {
2057
+ return r.to = void 0, r.routeModel = void 0, this[xr](t, r), {
2051
2058
  status: "success",
2052
2059
  message: ""
2053
2060
  };
@@ -2055,27 +2062,27 @@ var Gs = class {
2055
2062
  [se](e, t, r, s, i) {
2056
2063
  let n = s, o = t;
2057
2064
  for (; o < e.layers.length && n < r.layers.length; o++, n++) {
2058
- let u = e.layers[o].views;
2059
- for (let l of r.layers[n].models) {
2060
- let a = new Ae(l.name, !1, i), f = new re(null, l);
2061
- a.slots.value = [f], u.push(a);
2065
+ let l = e.layers[o].views;
2066
+ for (let a of r.layers[n].models) {
2067
+ let u = new qe(a.name, !1, i), f = new re(null, a);
2068
+ u.slots.value = [f], l.push(u);
2062
2069
  }
2063
2070
  }
2064
2071
  for (; n < r.layers.length; n++) {
2065
- let u = new bt();
2066
- u.views = [];
2067
- for (let l of r.layers[n].models) {
2068
- let a = new Ae(l.name, !1, i), f = new re(null, l);
2069
- a.slots.value = [f], u.views.push(a);
2072
+ let l = new Rt();
2073
+ l.views = [];
2074
+ for (let a of r.layers[n].models) {
2075
+ let u = new qe(a.name, !1, i), f = new re(null, a);
2076
+ u.slots.value = [f], l.views.push(u);
2070
2077
  }
2071
- e.layers.push(u);
2078
+ e.layers.push(l);
2072
2079
  }
2073
2080
  }
2074
- [Br](e, t, r, s, i, n) {
2081
+ [Vr](e, t, r, s, i, n) {
2075
2082
  if (t < 0 || t > this[W].layers.length) return null;
2076
2083
  if (t < this[W].layers.length) {
2077
- let a = this[W].layers[t], f = null;
2078
- for (let c of a.views) {
2084
+ let u = this[W].layers[t], f = null;
2085
+ for (let c of u.views) {
2079
2086
  let h = !1;
2080
2087
  if (r !== null ? (h = c.name === e && c[z]?.view === r, h && s !== -1 && (h = c[z]?.index === s)) : h = c.name === e, !!h) {
2081
2088
  i !== null && (c[ye] = {
@@ -2088,84 +2095,86 @@ var Gs = class {
2088
2095
  }
2089
2096
  if (f !== null) return f;
2090
2097
  }
2091
- let o = null, u = null;
2098
+ let o = null, l = null;
2092
2099
  i !== null && (i[G] ? o = {
2093
2100
  view: i,
2094
2101
  index: n,
2095
2102
  level: t - 1
2096
- } : o = i[z], u = {
2103
+ } : o = i[z], l = {
2097
2104
  view: i,
2098
2105
  index: n,
2099
2106
  level: t - 1
2100
2107
  });
2101
- let l = new Ae(e, !0, o);
2102
- if (l[ye] = u, t == this[W].layers.length) {
2103
- let a = new bt();
2104
- a.views = [l], this[W].layers.push(a);
2105
- } else this[W].layers[t].views.push(l);
2106
- return l;
2107
- }
2108
- }, ht = /* @__PURE__ */ Symbol("rk"), Mt = /* @__PURE__ */ Symbol("vd"), br = /* @__PURE__ */ Symbol("rv"), Tt = /* @__PURE__ */ Symbol("rvi"), Rr = /* @__PURE__ */ Symbol("pv"), kt = /* @__PURE__ */ Symbol("pvi"), Oe = /* @__PURE__ */ Symbol("registerKey"), Nr = /* @__PURE__ */ Symbol("lc"), Xs = class {
2109
- [Oe] = /* @__PURE__ */ new Map();
2108
+ let a = new qe(e, !0, o);
2109
+ if (a[ye] = l, t == this[W].layers.length) {
2110
+ let u = new Rt();
2111
+ u.views = [a], this[W].layers.push(u);
2112
+ } else this[W].layers[t].views.push(a);
2113
+ return a;
2114
+ }
2115
+ }, Ve = /* @__PURE__ */ Symbol("rk"), Tt = /* @__PURE__ */ Symbol("vd"), Pr = /* @__PURE__ */ Symbol("rv"), It = /* @__PURE__ */ Symbol("rvi"), _r = /* @__PURE__ */ Symbol("pv"), Ot = /* @__PURE__ */ Symbol("pvi"), Be = /* @__PURE__ */ Symbol("registerKey"), zr = /* @__PURE__ */ Symbol("lc"), Xs = class {
2116
+ [Be] = /* @__PURE__ */ new Map();
2110
2117
  constructor() {
2111
2118
  }
2112
2119
  set(e, t) {
2113
- this[Oe].set(e, t);
2120
+ this[Be].set(e, t);
2114
2121
  }
2115
2122
  get(e) {
2116
- return this[Oe].get(e);
2123
+ return this[Be].get(e);
2117
2124
  }
2118
2125
  has(e) {
2119
- return this[Oe].has(e);
2126
+ return this[Be].has(e);
2120
2127
  }
2121
2128
  delete(e) {
2122
- return this[Oe].delete(e);
2129
+ return this[Be].delete(e);
2123
2130
  }
2124
- }, ne = /* @__PURE__ */ new WeakMap(), He = [];
2125
- function nt(e, t = !1) {
2131
+ }, ne = /* @__PURE__ */ new WeakMap(), Ne = [];
2132
+ function lt(e, t = !1) {
2126
2133
  let r = e ? ne.get(e) ?? null : null;
2127
2134
  return t && !r && (r = new Xs(), e && ne.set(e, r), Fe(() => {
2128
2135
  e && ne.delete(e);
2129
- }), te(Nr, r)), r;
2136
+ }), te(zr, r)), r;
2130
2137
  }
2131
- function yt(e) {
2138
+ function dt(e) {
2132
2139
  let t = e ? ne.get(e) ?? null : null;
2133
- return !t && fs() && (t = N(Nr, null)), !t && He.length > 0 && (t = He[He.length - 1]), t;
2140
+ return !t && _e() && (t = N(zr, null)), !t && Ne.length > 0 && (t = Ne[Ne.length - 1]), t;
2134
2141
  }
2135
2142
  async function Qs(e, t) {
2136
- He.push(e);
2143
+ Ne.push(e);
2137
2144
  try {
2138
2145
  return await t();
2139
2146
  } finally {
2140
- He.pop();
2147
+ Ne.pop();
2141
2148
  }
2142
2149
  }
2143
2150
  function Ui(e) {
2144
- const t = Cr();
2151
+ const t = Kr();
2145
2152
  if (!t) return !1;
2146
- const r = yt();
2153
+ const r = dt();
2147
2154
  if (!r) return !1;
2148
- if (ne.set(t, r), Array.isArray(e)) for (let s = 0; s < e.length; s++) ne.set(e[s], r);
2155
+ if (ne.set(t, r), Array.isArray(e))
2156
+ for (let s = 0; s < e.length; s++) e[s] && typeof e[s] == "object" && ne.set(e[s], r);
2149
2157
  return Fe(() => {
2150
- if (ne.delete(t), Array.isArray(e)) for (let s = 0; s < e.length; s++) ne.delete(e[s]);
2158
+ if (ne.delete(t), Array.isArray(e))
2159
+ for (let s = 0; s < e.length; s++) e[s] && typeof e[s] == "object" && ne.delete(e[s]);
2151
2160
  }), !0;
2152
2161
  }
2153
- function Ur(e, t) {
2154
- return yt(e)?.get(t) ?? null;
2162
+ function Gr(e, t) {
2163
+ return dt(e)?.get(t) ?? null;
2155
2164
  }
2156
- function Vi(e, t, r, s) {
2157
- yt(e)?.set(t, r);
2165
+ function Vi(e, t, r) {
2166
+ dt(e)?.set(t, r);
2158
2167
  }
2159
2168
  function Wi(e, t, r) {
2160
- yt(e)?.delete(t);
2169
+ dt(e)?.delete(t);
2161
2170
  }
2162
- var ft = /* @__PURE__ */ Symbol("hooksKey");
2171
+ var ht = /* @__PURE__ */ Symbol("hooksKey");
2163
2172
  function Zs(e) {
2164
- let t = e.get(ft);
2165
- t || (t = [], e.set(ft, t));
2173
+ let t = e.get(ht);
2174
+ t || (t = [], e.set(ht, t));
2166
2175
  }
2167
- function xr(e, t) {
2168
- const r = e.get(ft);
2176
+ function Fr(e, t) {
2177
+ const r = e.get(ht);
2169
2178
  r != null && Qs(e, async () => {
2170
2179
  for (let s = r.length - 1; s >= 0; s--) {
2171
2180
  let i = r[s];
@@ -2178,7 +2187,7 @@ function xr(e, t) {
2178
2187
  }
2179
2188
  });
2180
2189
  }
2181
- var ct = /* @__PURE__ */ (function(e) {
2190
+ var yt = /* @__PURE__ */ (function(e) {
2182
2191
  return e.INACTIVATED = "ia", e.ACTIVATED = "a", e;
2183
2192
  })({}), Ys = class {
2184
2193
  type;
@@ -2202,9 +2211,9 @@ function ti(e, t, r) {
2202
2211
  }
2203
2212
  return s != -1 ? (e.splice(s, 1), !0) : !1;
2204
2213
  }
2205
- function Vr(e) {
2214
+ function Xr(e) {
2206
2215
  return (t) => {
2207
- const r = Ur(null, ft);
2216
+ const r = Gr(null, ht);
2208
2217
  if (r == null) {
2209
2218
  console.warn("[Fox]hooks context not found");
2210
2219
  return;
@@ -2215,23 +2224,23 @@ function Vr(e) {
2215
2224
  };
2216
2225
  }
2217
2226
  var Ji = function(e) {
2218
- cs(e), Vr(ct.ACTIVATED)(e);
2227
+ cs(e), Xr(yt.ACTIVATED)(e);
2219
2228
  }, zi = function(e) {
2220
- hs(e), Vr(ct.INACTIVATED)(e);
2221
- }, Wr = /* @__PURE__ */ Symbol("routeKey");
2222
- function Sr(e, t) {
2223
- e.set(Wr, t);
2229
+ hs(e), Xr(yt.INACTIVATED)(e);
2230
+ }, Qr = /* @__PURE__ */ Symbol("routeKey");
2231
+ function Cr(e, t) {
2232
+ e.set(Qr, t);
2224
2233
  }
2225
- function Jr(e) {
2226
- const t = Ur(e ?? null, Wr);
2234
+ function Vt(e) {
2235
+ const t = Gr(e ?? null, Qr);
2227
2236
  return typeof t == "function" ? t() : t;
2228
2237
  }
2229
- var ri = "FoxBeforeEnter", si = "FoxEnter", ii = "FoxLeave", ni = "FoxLeave", Nt = "FoxLeaveEnd";
2230
- function zr(e, t = !1) {
2238
+ var ri = "FoxBeforeEnter", si = "FoxEnter", ii = "FoxLeave", ni = "FoxLeave", Wt = "FoxLeaveEnd";
2239
+ function Zr(e, t = !1) {
2231
2240
  let r = null;
2232
2241
  return t ? r = e.showFromClass ?? e.enterFromClass : r = e.enterFromClass, r || (r = e.transitionName, r ? t ? `${r}-show-from` : `${r}-enter-from` : null);
2233
2242
  }
2234
- function Gr(e, t = !1) {
2243
+ function Yr(e, t = !1) {
2235
2244
  let r = null;
2236
2245
  return t ? r = e.showActiveClass ?? e.enterActiveClass : r = e.enterActiveClass, r || (r = e.transitionName, r ? t ? `${r}-show-active` : `${r}-enter-active` : null);
2237
2246
  }
@@ -2239,11 +2248,11 @@ function oi(e, t = !1) {
2239
2248
  let r = null;
2240
2249
  return t ? r = e.showToClass ?? e.enterToClass : r = e.enterToClass, r || (r = e.transitionName, r ? t ? `${r}-show-to` : `${r}-enter-to` : null);
2241
2250
  }
2242
- function Xr(e, t = !1) {
2251
+ function es(e, t = !1) {
2243
2252
  let r = null;
2244
2253
  return t ? r = e.hideFromClass ?? e.leaveFromClass : r = e.leaveFromClass, r || (r = e.transitionName, r ? t ? `${r}-hide-from` : `${r}-leave-from` : null);
2245
2254
  }
2246
- function Qr(e, t = !1) {
2255
+ function ts(e, t = !1) {
2247
2256
  let r = null;
2248
2257
  return t ? r = e.hideActiveClass ?? e.leaveActiveClass : r = e.leaveActiveClass, r || (r = e.transitionName, r ? t ? `${r}-hide-active` : `${r}-leave-active` : null);
2249
2258
  }
@@ -2283,7 +2292,7 @@ function mi(e, t = !1) {
2283
2292
  let r = null;
2284
2293
  return t ? r = e.hideCancelled ?? e.leaveCancelled : r = e.leaveCancelled, r;
2285
2294
  }
2286
- function Zt(e) {
2295
+ function ir(e) {
2287
2296
  let t, r = e.transitionDuration;
2288
2297
  return typeof r == "object" ? t = {
2289
2298
  enter: r.enter ?? -1,
@@ -2297,26 +2306,26 @@ function Zt(e) {
2297
2306
  hide: r
2298
2307
  }), t;
2299
2308
  }
2300
- function Ee(e, t) {
2309
+ function Pe(e, t) {
2301
2310
  e.classList.contains(t) || e.classList.add(t);
2302
2311
  }
2303
2312
  function Se(e, t) {
2304
2313
  e.classList.remove(t);
2305
2314
  }
2306
- var vi = Pe && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : setTimeout;
2307
- function dt(e) {
2315
+ var vi = Ee && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : setTimeout;
2316
+ function mt(e) {
2308
2317
  vi(e);
2309
2318
  }
2310
2319
  function A(e, t) {
2311
- b(e) && Reflect.apply(e, null, t);
2320
+ w(e) && Reflect.apply(e, null, t);
2312
2321
  }
2313
- function Zr(e, t, r = -1, s, i, n) {
2322
+ function rs(e, t, r = -1, s, i, n) {
2314
2323
  let o = [];
2315
- const u = () => {
2316
- for (let l of o) Wt(e, l.type, l.listener);
2324
+ const l = () => {
2325
+ for (let a of o) Zt(e, a.type, a.listener);
2317
2326
  o = [];
2318
2327
  };
2319
- if (b(i)) {
2328
+ if (w(i)) {
2320
2329
  if (s !== void 0 && s >= 0) {
2321
2330
  setTimeout(() => {
2322
2331
  Reflect.apply(i, null, [
@@ -2327,47 +2336,47 @@ function Zr(e, t, r = -1, s, i, n) {
2327
2336
  }, s);
2328
2337
  return;
2329
2338
  }
2330
- const l = [
2339
+ const a = [
2331
2340
  "animationend",
2332
2341
  "transitionend",
2333
- Nt
2334
- ], a = (f) => {
2335
- (f.target || f.srcElement) === f.currentTarget && (u(), Reflect.apply(i, null, [
2342
+ Wt
2343
+ ], u = (f) => {
2344
+ (f.target || f.srcElement) === f.currentTarget && (l(), Reflect.apply(i, null, [
2336
2345
  e,
2337
2346
  t,
2338
2347
  r
2339
2348
  ]));
2340
2349
  };
2341
- l.forEach((f) => {
2342
- at(e, f, a), o.push({
2350
+ a.forEach((f) => {
2351
+ ft(e, f, u), o.push({
2343
2352
  type: f,
2344
- listener: a
2353
+ listener: u
2345
2354
  });
2346
2355
  });
2347
2356
  }
2348
- if (b(n)) {
2349
- const l = "animationcancel", a = (f) => {
2350
- (f.target || f.srcElement) === f.currentTarget && (u(), Reflect.apply(n, null, [
2357
+ if (w(n)) {
2358
+ const a = "animationcancel", u = (f) => {
2359
+ (f.target || f.srcElement) === f.currentTarget && (l(), Reflect.apply(n, null, [
2351
2360
  e,
2352
2361
  t,
2353
2362
  r
2354
2363
  ]));
2355
2364
  };
2356
- at(e, l, a), o.push({
2357
- type: l,
2358
- listener: a
2365
+ ft(e, a, u), o.push({
2366
+ type: a,
2367
+ listener: u
2359
2368
  });
2360
2369
  }
2361
2370
  }
2362
- function mt(e) {
2363
- return !Pe || e === null ? !1 : e.opsType === _.Append || e.opsType === _.Open;
2364
- }
2365
- function Yr(e, t, r = {}, s, i = -1) {
2366
- if (e || mt(s)) {
2367
- const n = zr(r, e);
2368
- n && Ee(t, n);
2369
- const o = Gr(r, e);
2370
- o && Ee(t, o), A(ai(r, e), [
2371
+ function vt(e) {
2372
+ return !Ee || e === null ? !1 : e.opsType === F.Append || e.opsType === F.Open;
2373
+ }
2374
+ function ss(e, t, r = {}, s, i = -1) {
2375
+ if (e || vt(s)) {
2376
+ const n = Zr(r, e);
2377
+ n && Pe(t, n);
2378
+ const o = Yr(r, e);
2379
+ o && Pe(t, o), A(ai(r, e), [
2371
2380
  t,
2372
2381
  e,
2373
2382
  s,
@@ -2375,32 +2384,32 @@ function Yr(e, t, r = {}, s, i = -1) {
2375
2384
  ]);
2376
2385
  }
2377
2386
  }
2378
- function es(e, t, r = {}, s, i, n, o) {
2379
- if (!mt(i) && !e) {
2380
- b(o) && o(o, [t]);
2387
+ function is(e, t, r = {}, s, i, n, o) {
2388
+ if (!vt(i) && !e) {
2389
+ w(o) && o(o, [t]);
2381
2390
  return;
2382
2391
  }
2383
- const u = zr(r, e), l = Gr(r, e), a = oi(r, e), f = ui(r, e), c = fi(r, e), h = ci(r, e);
2384
- if (!u && !l && !a && !f) {
2385
- b(o) && o(o, [t]);
2392
+ const l = Zr(r, e), a = Yr(r, e), u = oi(r, e), f = ui(r, e), c = fi(r, e), h = ci(r, e);
2393
+ if (!l && !a && !u && !f) {
2394
+ w(o) && o(o, [t]);
2386
2395
  return;
2387
2396
  }
2388
- dt(() => {
2389
- Zr(t, i, n, s, () => {
2390
- l && Se(t, l), a && Se(t, a), b(c) && A(c, [
2397
+ mt(() => {
2398
+ rs(t, i, n, s, () => {
2399
+ a && Se(t, a), u && Se(t, u), w(c) && A(c, [
2391
2400
  t,
2392
2401
  e,
2393
2402
  i,
2394
2403
  n
2395
- ]), b(o) && o(o, [t]);
2404
+ ]), w(o) && o(o, [t]);
2396
2405
  }, () => {
2397
- b(h) && A(h, [
2406
+ w(h) && A(h, [
2398
2407
  t,
2399
2408
  e,
2400
2409
  i,
2401
2410
  n
2402
2411
  ]);
2403
- }), u && Se(t, u), a && Ee(t, a), b(f) && A(f, [
2412
+ }), l && Se(t, l), u && Pe(t, u), w(f) && A(f, [
2404
2413
  t,
2405
2414
  e,
2406
2415
  i,
@@ -2408,12 +2417,12 @@ function es(e, t, r = {}, s, i, n, o) {
2408
2417
  ]);
2409
2418
  });
2410
2419
  }
2411
- function ts(e, t, r = {}, s, i = -1) {
2412
- if (e || mt(s)) {
2413
- const n = Xr(r, e);
2414
- n && Ee(t, n);
2415
- const o = Qr(r, e);
2416
- o && Ee(t, o), A(hi(r, e), [
2420
+ function ns(e, t, r = {}, s, i = -1) {
2421
+ if (e || vt(s)) {
2422
+ const n = es(r, e);
2423
+ n && Pe(t, n);
2424
+ const o = ts(r, e);
2425
+ o && Pe(t, o), A(hi(r, e), [
2417
2426
  t,
2418
2427
  e,
2419
2428
  s,
@@ -2421,40 +2430,40 @@ function ts(e, t, r = {}, s, i = -1) {
2421
2430
  ]);
2422
2431
  }
2423
2432
  }
2424
- function rs(e, t, r = {}, s, i, n, o, u) {
2425
- if (!mt(n) && !e) {
2426
- b(u) && A(u, [t]), !e && b(i) && i();
2433
+ function os(e, t, r = {}, s, i, n, o, l) {
2434
+ if (!vt(n) && !e) {
2435
+ w(l) && A(l, [t]), !e && w(i) && i();
2427
2436
  return;
2428
2437
  }
2429
- const l = Xr(r, e), a = Qr(r, e), f = li(r, e), c = yi(r, e), h = di(r, e), y = mi(r, e);
2430
- if (!l && !a && !f && !c) {
2431
- b(u) && A(u, [t]), !e && b(i) && i();
2438
+ const a = es(r, e), u = ts(r, e), f = li(r, e), c = yi(r, e), h = di(r, e), y = mi(r, e);
2439
+ if (!a && !u && !f && !c) {
2440
+ w(l) && A(l, [t]), !e && w(i) && i();
2432
2441
  return;
2433
2442
  }
2434
- dt(() => {
2435
- Zr(t, n, o, s, () => {
2443
+ mt(() => {
2444
+ rs(t, n, o, s, () => {
2436
2445
  try {
2437
- a && Se(t, a), f && Se(t, f), b(h) && A(h, [
2446
+ u && Se(t, u), f && Se(t, f), w(h) && A(h, [
2438
2447
  t,
2439
2448
  e,
2440
2449
  n,
2441
2450
  o
2442
- ]), b(u) && A(u, [t]);
2451
+ ]), w(l) && A(l, [t]);
2443
2452
  } finally {
2444
- !e && b(i) && i();
2453
+ !e && w(i) && i();
2445
2454
  }
2446
2455
  }, () => {
2447
2456
  try {
2448
- b(y) && A(y, [
2457
+ w(y) && A(y, [
2449
2458
  t,
2450
2459
  e,
2451
2460
  n,
2452
2461
  o
2453
- ]), b(u) && A(u, [t]);
2462
+ ]), w(l) && A(l, [t]);
2454
2463
  } finally {
2455
- !e && b(i) && i();
2464
+ !e && w(i) && i();
2456
2465
  }
2457
- }), l && Se(t, l), f && Ee(t, f), b(c) && A(c, [
2466
+ }), a && Se(t, a), f && Pe(t, f), w(c) && A(c, [
2458
2467
  t,
2459
2468
  e,
2460
2469
  n,
@@ -2462,92 +2471,92 @@ function rs(e, t, r = {}, s, i, n, o, u) {
2462
2471
  ]);
2463
2472
  });
2464
2473
  }
2465
- function Ut(e, t = {}, r, s = -1) {
2466
- const i = t.mode ?? "default", n = Zt(t);
2474
+ function Jt(e, t = {}, r, s = -1) {
2475
+ const i = t.mode ?? "default", n = ir(t);
2467
2476
  return {
2468
2477
  mode: i,
2469
2478
  persisted: !1,
2470
2479
  beforeEnter: (o) => {
2471
- Yr(!1, o, t, r, s);
2480
+ ss(!1, o, t, r, s);
2472
2481
  },
2473
2482
  enter: (o) => {
2474
- es(!1, o, t, n.enter, r, s);
2483
+ is(!1, o, t, n.enter, r, s);
2475
2484
  },
2476
- leave: (o, u) => {
2477
- ts(!1, o, t, r, s), rs(!1, o, t, n.leave, u, r, s, () => {
2485
+ leave: (o, l) => {
2486
+ ns(!1, o, t, r, s), os(!1, o, t, n.leave, l, r, s, () => {
2478
2487
  e.transition = null;
2479
2488
  });
2480
2489
  },
2481
- clone: (o) => Ut(e, t, r, s)
2490
+ clone: (o) => Jt(e, t, r, s)
2482
2491
  };
2483
2492
  }
2484
- function ss(e) {
2493
+ function ls(e) {
2485
2494
  return e.el;
2486
2495
  }
2487
2496
  function pi(e, t = {}, r, s, i, n) {
2488
2497
  if (i === !0) {
2489
- const o = ss(e);
2498
+ const o = ls(e);
2490
2499
  if (o == null) return;
2491
- const u = Zt(t);
2492
- Yr(!0, o, t, r, s), es(!0, o, t, u.show, r, s, (l) => {
2493
- b(n) && A(n, [l]);
2500
+ const l = ir(t);
2501
+ ss(!0, o, t, r, s), is(!0, o, t, l.show, r, s, (a) => {
2502
+ w(n) && A(n, [a]);
2494
2503
  });
2495
- } else b(n) && A(n, []);
2504
+ } else w(n) && A(n, []);
2496
2505
  }
2497
2506
  function gi(e, t = {}, r, s, i, n) {
2498
2507
  if (i === !0) {
2499
- const o = ss(e);
2508
+ const o = ls(e);
2500
2509
  if (o == null) return;
2501
- const u = Zt(t);
2502
- ts(!0, o, t, r, s), rs(!0, o, t, u.hide, null, r, s, (l) => {
2503
- b(n) && A(n, [l]);
2510
+ const l = ir(t);
2511
+ ns(!0, o, t, r, s), os(!0, o, t, l.hide, null, r, s, (a) => {
2512
+ w(n) && A(n, [a]);
2504
2513
  });
2505
- } else b(n) && A(n, []);
2514
+ } else w(n) && A(n, []);
2506
2515
  }
2507
- function wi(e) {
2508
- dt(() => {
2516
+ function bi(e) {
2517
+ mt(() => {
2509
2518
  for (let t = 0; t < e.length; t++) Reflect.apply(e[t], null, []);
2510
2519
  });
2511
2520
  }
2512
- function is(e, t = {}, r, s = -1) {
2521
+ function as(e, t = {}, r, s = -1) {
2513
2522
  return {
2514
2523
  mode: t.mode ?? "default",
2515
2524
  persisted: !1,
2516
2525
  beforeEnter: (i) => {
2517
- We(ri, {}, i);
2526
+ ze(ri, {}, i);
2518
2527
  },
2519
2528
  enter: (i) => {
2520
- We(si, {}, i);
2529
+ ze(si, {}, i);
2521
2530
  },
2522
2531
  leave: (i, n) => {
2523
- We(ii, {}, i), dt(() => {
2524
- const o = (u) => {
2525
- (u.target || u.srcElement) === u.currentTarget && (Wt(i, Nt, o), n && Reflect.apply(n, null, []), e.transition = null);
2532
+ ze(ii, {}, i), mt(() => {
2533
+ const o = (l) => {
2534
+ (l.target || l.srcElement) === l.currentTarget && (Zt(i, Wt, o), n && Reflect.apply(n, null, []), e.transition = null);
2526
2535
  };
2527
- at(i, Nt, o), We(ni, {}, i);
2536
+ ft(i, Wt, o), ze(ni, {}, i);
2528
2537
  });
2529
2538
  },
2530
- clone: (i) => is(e, t, r, s)
2539
+ clone: (i) => as(e, t, r, s)
2531
2540
  };
2532
2541
  }
2533
2542
  function ie(e, t, r) {
2534
2543
  return typeof e == "function" ? Reflect.apply(e, {}, [t, r]) : e;
2535
2544
  }
2536
- function It(e, t) {
2545
+ function Bt(e, t) {
2537
2546
  if (!e) return null;
2538
2547
  const r = e(t);
2539
2548
  return r.length === 1 ? r[0] : r;
2540
2549
  }
2541
- function we(e, t) {
2550
+ function be(e, t) {
2542
2551
  return typeof t == "function" ? t(e) : e;
2543
2552
  }
2544
- var bi = class {
2553
+ var wi = class {
2545
2554
  node;
2546
2555
  state;
2547
2556
  constructor(e, t) {
2548
2557
  this.node = e, this.state = t;
2549
2558
  }
2550
- }, Vt = _r({
2559
+ }, zt = jr({
2551
2560
  name: "RouterView",
2552
2561
  inheritAttrs: !1,
2553
2562
  props: {
@@ -2737,94 +2746,94 @@ var bi = class {
2737
2746
  }
2738
2747
  },
2739
2748
  setup(e, t) {
2740
- const r = Cr(), s = e.multi === !0, i = N(ht, null), n = N(Mt, 0), o = N(br, null), u = N(Tt, -1);
2741
- let l = null, a = e.modelSlot ?? null;
2742
- if (a) {
2743
- if (te(Mt, n + 1), te(Tt, a.index), te(kt, a.index), !a.route) {
2749
+ const r = Kr(), s = e.multi === !0, i = N(Ve, null), n = N(Tt, 0), o = N(Pr, null), l = N(It, -1);
2750
+ let a = null, u = e.modelSlot ?? null;
2751
+ if (u) {
2752
+ if (te(Tt, n + 1), te(It, u.index), te(Ot, u.index), !u.route) {
2744
2753
  console.warn("[Fox]child view render error, route not exist");
2745
2754
  return;
2746
2755
  }
2747
- const c = nt(a, !0);
2748
- c && (Zs(c), Sr(c, () => a?.route ?? null));
2756
+ const c = lt(u, !0);
2757
+ c && (Zs(c), Cr(c, () => u?.route ?? null));
2749
2758
  } else {
2750
2759
  if (i == null) {
2751
2760
  console.error("[Fox]router is not been injected");
2752
2761
  return;
2753
2762
  }
2754
- const c = e.name, h = N(Rr, null), y = N(kt, 0);
2755
- if (l = i[Br](c, n, o, u, h, y), l === null) return;
2756
- te(Rr, l);
2757
- const d = l[G] === !0;
2758
- if (d && te(br, l), !s && (te(Tt, -1), te(Mt, n + 1), te(kt, -1), d && r)) {
2759
- const m = nt(r, !0);
2760
- m && Sr(m, () => {
2761
- const w = l?.slots.value ?? [];
2762
- return w.length > 0 ? w[0].route : null;
2763
+ const c = e.name, h = N(_r, null), y = N(Ot, 0);
2764
+ if (a = i[Vr](c, n, o, l, h, y), a === null) return;
2765
+ te(_r, a);
2766
+ const d = a[G] === !0;
2767
+ if (d && te(Pr, a), !s && (te(It, -1), te(Tt, n + 1), te(Ot, -1), d && r)) {
2768
+ const m = lt(r, !0);
2769
+ m && Cr(m, () => {
2770
+ const b = a?.slots.value ?? [];
2771
+ return b.length > 0 ? b[0].route : null;
2763
2772
  });
2764
2773
  }
2765
2774
  }
2766
2775
  const f = { value: /* @__PURE__ */ new Map() };
2767
2776
  return Fe(() => {
2768
- if (f.value && f.value.clear(), a) {
2769
- const c = a;
2770
- c.route = null, c.model = null, c.instance = null, a = null;
2777
+ if (f.value && f.value.clear(), u) {
2778
+ const c = u;
2779
+ c.route = null, c.model = null, c.instance = null, u = null;
2771
2780
  }
2772
2781
  }), () => {
2773
2782
  if (s) {
2774
- const c = /* @__PURE__ */ new Map(), h = [], y = l?.slots.value, d = [];
2783
+ const c = /* @__PURE__ */ new Map(), h = [], y = a?.slots.value, d = [];
2775
2784
  for (let g = 0; g < y.length; g++) {
2776
- const v = y[g], j = `${e.name}_${v.index}`, L = ie(e.transition, v.route, g) ?? !0, _e = { modelSlot: v };
2785
+ const v = y[g], K = `${e.name}_${v.index}`, L = ie(e.transition, v.route, g) ?? !0, Ce = { modelSlot: v };
2777
2786
  let M;
2778
- t.slots.default ? M = he(Vt, _e, { default: t.slots.default }) : M = he(Vt, _e);
2787
+ t.slots.default ? M = he(zt, Ce, { default: t.slots.default }) : M = he(zt, Ce);
2779
2788
  const q = {}, oe = ie(e.viewClass, v.route, g);
2780
2789
  typeof oe == "string" && oe.length > 0 && (q[oe] = !0);
2781
- const ee = ie(e.viewActiveClass, v.route, g), T = ie(e.viewInactiveClass, v.route, g), Q = f.value.get(j);
2782
- if (typeof ee == "string" && ee.length > 0 && (q[ee] = v.active), typeof T == "string" && T.length > 0 && (q[T] = !v.active), Q && v.active !== Q.state) {
2783
- const Yt = Q.node;
2790
+ const ee = ie(e.viewActiveClass, v.route, g), k = ie(e.viewInactiveClass, v.route, g), Q = f.value.get(K);
2791
+ if (typeof ee == "string" && ee.length > 0 && (q[ee] = v.active), typeof k == "string" && k.length > 0 && (q[k] = !v.active), Q && v.active !== Q.state) {
2792
+ const nr = Q.node;
2784
2793
  v.active ? d.unshift(() => {
2785
- const vt = () => {
2786
- const Ce = nt(v);
2787
- Ce != null && xr(Ce, ct.ACTIVATED);
2794
+ const pt = () => {
2795
+ const Ae = lt(v);
2796
+ Ae != null && Fr(Ae, yt.ACTIVATED);
2788
2797
  };
2789
- pi(Yt, e, v.route, g, L, vt);
2798
+ pi(nr, e, v.route, g, L, pt);
2790
2799
  }) : d.push(() => {
2791
- const vt = () => {
2792
- const Ce = nt(v);
2793
- Ce != null && xr(Ce, ct.INACTIVATED);
2800
+ const pt = () => {
2801
+ const Ae = lt(v);
2802
+ Ae != null && Fr(Ae, yt.INACTIVATED);
2794
2803
  };
2795
- gi(Yt, e, v.route, g, L, vt);
2804
+ gi(nr, e, v.route, g, L, pt);
2796
2805
  });
2797
2806
  }
2798
2807
  const U = {
2799
2808
  class: q,
2800
- key: j
2809
+ key: K
2801
2810
  }, V = ie(e.viewTagProps, v.route, g);
2802
- V !== null && typeof V == "object" && $(!0, U, we(V, i?.propsFilter)), v.route?.viewTagAttrs && typeof v.route?.viewTagAttrs == "object" && $(!0, U, we(v.route.viewTagAttrs, i?.propsFilter));
2811
+ V !== null && typeof V == "object" && j(!0, U, be(V, i?.propsFilter)), v.route?.viewTagAttrs && typeof v.route?.viewTagAttrs == "object" && j(!0, U, be(v.route.viewTagAttrs, i?.propsFilter));
2803
2812
  const ve = he(ie(e.viewTag, v.route, g), U, { default: () => [M] });
2804
- c.set(j, new bi(ve, v.active)), f.value.delete(j), L === !0 ? ve.transition = Ut(ve, e, v.route, g) : L === "custom" && (ve.transition = is(ve, e, v.route, g)), h.push(ve);
2813
+ c.set(K, new wi(ve, v.active)), f.value.delete(K), L === !0 ? ve.transition = Jt(ve, e, v.route, g) : L === "custom" && (ve.transition = as(ve, e, v.route, g)), h.push(ve);
2805
2814
  }
2806
- f.value = c, wi(d);
2807
- const m = ie(e.tag, null, -1), w = {};
2808
- return Object.assign(w, t.attrs), he(m, w, { default: () => h });
2809
- } else if (a != null) {
2810
- const c = a.model, h = {};
2811
- c.props && (typeof c.props == "object" ? $(!1, h, we(c.props, i?.propsFilter)) : c.props === !0 && typeof a.route?.params == "object" && $(!1, h, we(a.route.params, i?.propsFilter)));
2815
+ f.value = c, bi(d);
2816
+ const m = ie(e.tag, null, -1), b = {};
2817
+ return Object.assign(b, t.attrs), he(m, b, { default: () => h });
2818
+ } else if (u != null) {
2819
+ const c = u.model, h = {};
2820
+ c.props && (typeof c.props == "object" ? j(!1, h, be(c.props, i?.propsFilter)) : c.props === !0 && typeof u.route?.params == "object" && j(!1, h, be(u.route.params, i?.propsFilter)));
2812
2821
  const y = he(c.component, h);
2813
- return It(t.slots.default, {
2822
+ return Bt(t.slots.default, {
2814
2823
  Component: y,
2815
- route: a.route
2824
+ route: u.route
2816
2825
  }) ?? y;
2817
2826
  } else {
2818
- const c = l?.slots.value ?? [];
2827
+ const c = a?.slots.value ?? [];
2819
2828
  if (c.length > 0) {
2820
2829
  const h = c[0], y = h.route, d = h.model, m = {};
2821
- d.props && (typeof d.props == "object" ? $(!1, m, we(d.props, i?.propsFilter)) : d.props === !0 && typeof y?.params == "object" && $(!1, m, we(y.params, i?.propsFilter)));
2822
- const w = he(d.component, m);
2823
- return (ie(e.transition, y, -1) ?? !0) && (w.transition = Ut(w, e, y, -1)), It(t.slots.default, {
2824
- Component: w,
2830
+ d.props && (typeof d.props == "object" ? j(!1, m, be(d.props, i?.propsFilter)) : d.props === !0 && typeof y?.params == "object" && j(!1, m, be(y.params, i?.propsFilter)));
2831
+ const b = he(d.component, m);
2832
+ return (ie(e.transition, y, -1) ?? !0) && (b.transition = Jt(b, e, y, -1)), Bt(t.slots.default, {
2833
+ Component: b,
2825
2834
  route: y
2826
- }) ?? w;
2827
- } else return It(t.slots.fallback, {});
2835
+ }) ?? b;
2836
+ } else return Bt(t.slots.fallback, {});
2828
2837
  }
2829
2838
  };
2830
2839
  }
@@ -2841,10 +2850,10 @@ function Ri(e) {
2841
2850
  function xi(e, t) {
2842
2851
  return e == null || t == null ? !1 : !!(e.path && t.path && t.path.startsWith(e.path) || e.name && e.name == t.name);
2843
2852
  }
2844
- function be(e, t) {
2853
+ function we(e, t) {
2845
2854
  return typeof e == "function" ? Reflect.apply(e, {}, [t]) : e;
2846
2855
  }
2847
- var Si = _r({
2856
+ var Si = jr({
2848
2857
  name: "RouterLink",
2849
2858
  inheritAttrs: !1,
2850
2859
  props: {
@@ -2891,23 +2900,23 @@ var Si = _r({
2891
2900
  }
2892
2901
  },
2893
2902
  setup(e, t) {
2894
- const r = N(ht, null);
2903
+ const r = N(Ve, null);
2895
2904
  return () => {
2896
- let s = be(e.to, null), i = be(e.tag, s);
2905
+ let s = we(e.to, null), i = we(e.tag, s);
2897
2906
  if (i == null) {
2898
2907
  console.warn("[Fox]can not resolve link tag");
2899
2908
  return;
2900
2909
  }
2901
2910
  let n = null, o = null;
2902
2911
  r !== null && (n = r[I](s), e.root && (n.root = e.root), o = r.currentRoute.value);
2903
- let u = {}, l = be(e.activeClass, n);
2904
- if (typeof l == "string" && l.length > 0 && (u[l] = xi(n, o)), be(e.exact, n) === !0) {
2905
- let c = be(e.exactActiveClass, n);
2906
- typeof c == "string" && c.length > 0 && (u[c] = S.isSamePathForRoute(n, o));
2907
- }
2908
- let a = { class: u };
2909
- (i === "a" || i === "A") && (a.href = n?.path ?? n?.name ?? "#"), $(!0, a, t.attrs);
2910
- const f = be(e.event, n);
2912
+ let l = {}, a = we(e.activeClass, n);
2913
+ if (typeof a == "string" && a.length > 0 && (l[a] = xi(n, o)), we(e.exact, n) === !0) {
2914
+ let c = we(e.exactActiveClass, n);
2915
+ typeof c == "string" && c.length > 0 && (l[c] = x.isSamePathForRoute(n, o));
2916
+ }
2917
+ let u = { class: l };
2918
+ (i === "a" || i === "A") && (u.href = n?.path ?? n?.name ?? "#"), j(!0, u, t.attrs);
2919
+ const f = we(e.event, n);
2911
2920
  if (typeof f == "string") {
2912
2921
  const c = (h) => {
2913
2922
  if (r == null) {
@@ -2920,27 +2929,27 @@ var Si = _r({
2920
2929
  }
2921
2930
  Ri(h) && r.to(n);
2922
2931
  };
2923
- a[f] = c;
2932
+ u[f] = c;
2924
2933
  }
2925
- return he(i, a, t.slots);
2934
+ return he(i, u, t.slots);
2926
2935
  };
2927
2936
  }
2928
- }), lt = /* @__PURE__ */ (function(e) {
2937
+ }), ut = /* @__PURE__ */ (function(e) {
2929
2938
  return e[e.limitless = 0] = "limitless", e[e.once = 1] = "once", e;
2930
- })(lt || {}), Re = /* @__PURE__ */ Symbol("registerKey"), Pi = class {
2939
+ })(ut || {}), Re = /* @__PURE__ */ Symbol("registerKey"), Ei = class {
2931
2940
  policy;
2932
2941
  callback;
2933
2942
  constructor(e, t) {
2934
2943
  this.callback = e, this.policy = t;
2935
2944
  }
2936
- }, Pr = class {
2945
+ }, Ar = class {
2937
2946
  [Re] = /* @__PURE__ */ new Map();
2938
2947
  constructor() {
2939
2948
  }
2940
2949
  on(e, t, r = !1) {
2941
2950
  let s = this[Re].get(e);
2942
2951
  s || (s = new Array(), this[Re].set(e, s));
2943
- let i = new Pi(t, r === !0 ? lt.once : lt.limitless);
2952
+ let i = new Ei(t, r === !0 ? ut.once : ut.limitless);
2944
2953
  return s.push(i), this;
2945
2954
  }
2946
2955
  off(e, t) {
@@ -2971,8 +2980,8 @@ var Si = _r({
2971
2980
  if (typeof r != "function")
2972
2981
  return console.error("[Fox]callback can not be empty"), this;
2973
2982
  let s = t - 1, i = new Array(s), n = [].splice.call(e, 0, s);
2974
- for (let o = 0; o < n.length; o++) this.once(n[o], (u) => {
2975
- i[o] = u, s -= 1, s == 0 && Reflect.apply(r, {}, i);
2983
+ for (let o = 0; o < n.length; o++) this.once(n[o], (l) => {
2984
+ i[o] = l, s -= 1, s == 0 && Reflect.apply(r, {}, i);
2976
2985
  });
2977
2986
  return this;
2978
2987
  }
@@ -2981,8 +2990,8 @@ var Si = _r({
2981
2990
  if (!r) return this;
2982
2991
  for (let s = 0; s < r.length; ) {
2983
2992
  let i = r[s];
2984
- if (i.policy == lt.once ? r.splice(s, 1) : s++, typeof i.callback == "function") try {
2985
- De(() => {
2993
+ if (i.policy == ut.once ? r.splice(s, 1) : s++, typeof i.callback == "function") try {
2994
+ He(() => {
2986
2995
  Reflect.apply(i.callback, {}, t);
2987
2996
  });
2988
2997
  } catch (n) {
@@ -2994,13 +3003,13 @@ var Si = _r({
2994
3003
  trigger(e, ...t) {
2995
3004
  return Reflect.apply(this.emit, this, [e, ...t]);
2996
3005
  }
2997
- }, Ei = "FoxRouterView", Fi = "FoxRouterLink", H = /* @__PURE__ */ (function(e) {
3006
+ }, Pi = "FoxRouterView", _i = "FoxRouterLink", H = /* @__PURE__ */ (function(e) {
2998
3007
  return e[e.Loading = 0] = "Loading", e[e.Loaded = 1] = "Loaded", e[e.Defining = 2] = "Defining", e[e.Defined = 3] = "Defined", e;
2999
3008
  })({});
3000
- function _i(e) {
3009
+ function Fi(e) {
3001
3010
  return e == H.Loaded || e === H.Defined;
3002
3011
  }
3003
- var Er = /* @__PURE__ */ (function(e) {
3012
+ var qr = /* @__PURE__ */ (function(e) {
3004
3013
  return e[e.normal = 0] = "normal", e[e.factory = 1] = "factory", e;
3005
3014
  })({}), Ci = class {
3006
3015
  register = /* @__PURE__ */ new Map();
@@ -3040,7 +3049,7 @@ var Er = /* @__PURE__ */ (function(e) {
3040
3049
  clear() {
3041
3050
  this.register.clear(), this.regExpRegisters = [];
3042
3051
  }
3043
- }, Ot = [
3052
+ }, Dt = [
3044
3053
  "require",
3045
3054
  "exports",
3046
3055
  "module"
@@ -3048,7 +3057,7 @@ var Er = /* @__PURE__ */ (function(e) {
3048
3057
  async function Ai(e) {
3049
3058
  return await new Function("url", "return import(url)")(e);
3050
3059
  }
3051
- var Fr = class {
3060
+ var $r = class {
3052
3061
  moduleManager = new Ci();
3053
3062
  _alias = {};
3054
3063
  set alias(e) {
@@ -3079,7 +3088,7 @@ var Fr = class {
3079
3088
  return this._query;
3080
3089
  }
3081
3090
  get head() {
3082
- return Ve().head;
3091
+ return Je().head;
3083
3092
  }
3084
3093
  _cssMountPoint = null;
3085
3094
  set cssMountPoint(e) {
@@ -3101,14 +3110,14 @@ var Fr = class {
3101
3110
  src: "",
3102
3111
  status: H.Loaded
3103
3112
  };
3104
- typeof t == "function" ? (r.exports = t, r.type = Er.factory) : r.exports = t, this.moduleManager.set(e, r);
3113
+ typeof t == "function" ? (r.exports = t, r.type = qr.factory) : r.exports = t, this.moduleManager.set(e, r);
3105
3114
  }
3106
3115
  removeModule(e) {
3107
3116
  this.moduleManager.remove(e);
3108
3117
  }
3109
3118
  getModuleExports(e) {
3110
3119
  const t = this.moduleManager.get(e);
3111
- return t && _i(t.status) ? t.type === Er.factory && typeof t.exports == "function" ? t.exports() : t.exports : null;
3120
+ return t && Fi(t.status) ? t.type === qr.factory && typeof t.exports == "function" ? t.exports() : t.exports : null;
3112
3121
  }
3113
3122
  exposeRequire(e = "__foxRequire", t, r) {
3114
3123
  const s = t ?? C();
@@ -3119,7 +3128,7 @@ var Fr = class {
3119
3128
  }
3120
3129
  resloveResource(e) {
3121
3130
  if (typeof e == "string") {
3122
- if (Ot.includes(e)) return e;
3131
+ if (Dt.includes(e)) return e;
3123
3132
  if (e = this.alias?.[e] ?? e, typeof this.resourceParser == "function") {
3124
3133
  const r = this.resloveResource(e);
3125
3134
  if (!r) return r;
@@ -3151,31 +3160,31 @@ var Fr = class {
3151
3160
  const s = [];
3152
3161
  let i = e.length - 1, n = null;
3153
3162
  typeof e[i] == "function" && (n = e[i], i--);
3154
- for (let l = 0; l <= i; l++) if (Array.isArray(e[l])) {
3155
- const a = e[l];
3156
- for (let f = 0; f < a.length; f++) {
3157
- const c = this.resloveResource(a[f]);
3163
+ for (let a = 0; a <= i; a++) if (Array.isArray(e[a])) {
3164
+ const u = e[a];
3165
+ for (let f = 0; f < u.length; f++) {
3166
+ const c = this.resloveResource(u[f]);
3158
3167
  s.push(c);
3159
3168
  }
3160
- } else if (typeof e[l] == "string") {
3161
- const a = this.resloveResource(e[l]);
3162
- s.push(a);
3169
+ } else if (typeof e[a] == "string") {
3170
+ const u = this.resloveResource(e[a]);
3171
+ s.push(u);
3163
3172
  }
3164
- const o = new qi(s.length, (l, a) => {
3173
+ const o = new qi(s.length, (a, u) => {
3165
3174
  if (o.isOK()) try {
3166
- typeof n == "function" && Reflect.apply(n, {}, a), t(a);
3175
+ typeof n == "function" && Reflect.apply(n, {}, u), t(u);
3167
3176
  } catch (f) {
3168
3177
  console.error(f), r(f);
3169
3178
  }
3170
3179
  else try {
3171
- console.error(l), typeof n == "function" && Reflect.apply(n, {}, []), r(l);
3180
+ console.error(a), typeof n == "function" && Reflect.apply(n, {}, []), r(a);
3172
3181
  } catch (f) {
3173
3182
  console.error(f), r(f);
3174
3183
  }
3175
- }), u = new ut();
3176
- for (let l = 0; l < s.length; l++) {
3177
- const a = new Ki(l, s[l], o);
3178
- this.mount(u, a);
3184
+ }), l = new ct();
3185
+ for (let a = 0; a < s.length; a++) {
3186
+ const u = new $i(a, s[a], o);
3187
+ this.mount(l, u);
3179
3188
  }
3180
3189
  return this;
3181
3190
  });
@@ -3190,19 +3199,19 @@ var Fr = class {
3190
3199
  let i = e.length - 1, n = null;
3191
3200
  typeof e[i] == "function" && (n = e[i], i--);
3192
3201
  for (let o = 0; o <= i; o++) if (Array.isArray(e[o])) {
3193
- const u = e[o];
3194
- for (let l = 0; l < u.length; l++) {
3195
- const a = this.resloveResource(u[l]);
3196
- s.push(a);
3202
+ const l = e[o];
3203
+ for (let a = 0; a < l.length; a++) {
3204
+ const u = this.resloveResource(l[a]);
3205
+ s.push(u);
3197
3206
  }
3198
3207
  } else if (typeof e[o] == "string") {
3199
- const u = this.resloveResource(e[o]);
3200
- s.push(u);
3208
+ const l = this.resloveResource(e[o]);
3209
+ s.push(l);
3201
3210
  }
3202
3211
  for (let o = 0; o < s.length; o++) try {
3203
3212
  this.unmount(s[o]);
3204
- } catch (u) {
3205
- console.error(u);
3213
+ } catch (l) {
3214
+ console.error(l);
3206
3215
  }
3207
3216
  typeof n == "function" && Reflect.apply(n, {}, [!0]), t(!0);
3208
3217
  });
@@ -3215,7 +3224,7 @@ var Fr = class {
3215
3224
  return;
3216
3225
  }
3217
3226
  if (typeof t.resource == "string") {
3218
- if (Ot.includes(t.resource)) {
3227
+ if (Dt.includes(t.resource)) {
3219
3228
  e.post((i) => {
3220
3229
  t.progress.work(!0, t.index, t.resource), i.resolve();
3221
3230
  });
@@ -3247,19 +3256,19 @@ var Fr = class {
3247
3256
  t.progress.work(!0, t.index, n), s.resolve();
3248
3257
  return;
3249
3258
  }
3250
- const o = Ve(), u = o.createElement("link"), l = "onload" in u;
3251
- l && (u.onload = () => {
3252
- u.onload = null, u.onerror = null, t.progress.work(!0, t.index, i.path), s.resolve();
3253
- }, u.onerror = () => {
3259
+ const o = Je(), l = o.createElement("link"), a = "onload" in l;
3260
+ a && (l.onload = () => {
3261
+ l.onload = null, l.onerror = null, t.progress.work(!0, t.index, i.path), s.resolve();
3262
+ }, l.onerror = () => {
3254
3263
  try {
3255
- r.removeChild(u);
3264
+ r.removeChild(l);
3256
3265
  } catch (c) {
3257
3266
  console.error(c);
3258
3267
  }
3259
- u.onload = null, u.onerror = null, t.progress.work(!1, t.index, null), s.reject();
3268
+ l.onload = null, l.onerror = null, t.progress.work(!1, t.index, null), s.reject();
3260
3269
  });
3261
- const a = this.constructResourceUri(i.path), f = o.getElementById(i.path);
3262
- f && f.parentNode && f.parentNode.removeChild(f), u.rel = "stylesheet", u.type = "text/css", u.id = i.path, u.href = a, r.appendChild(u), l || (t.progress.work(!0, t.index, i.path), s.resolve());
3270
+ const u = this.constructResourceUri(i.path), f = o.getElementById(i.path);
3271
+ f && f.parentNode && f.parentNode.removeChild(f), l.rel = "stylesheet", l.type = "text/css", l.id = i.path, l.href = u, r.appendChild(l), a || (t.progress.work(!0, t.index, i.path), s.resolve());
3263
3272
  });
3264
3273
  }
3265
3274
  mountJS(e, t, r) {
@@ -3275,32 +3284,32 @@ var Fr = class {
3275
3284
  status: H.Loading
3276
3285
  };
3277
3286
  this.moduleManager.set(i.path, o);
3278
- const u = Ve().createElement("script");
3279
- if ("onload" in u)
3280
- u.onload = () => {
3281
- u.onload = null, u.onerror = null, o.status === H.Loading && (o.status = H.Loaded, t.progress.work(!0, t.index, i.path)), s.resolve();
3282
- }, u.onerror = () => {
3287
+ const l = Je().createElement("script");
3288
+ if ("onload" in l)
3289
+ l.onload = () => {
3290
+ l.onload = null, l.onerror = null, o.status === H.Loading && (o.status = H.Loaded, t.progress.work(!0, t.index, i.path)), s.resolve();
3291
+ }, l.onerror = () => {
3283
3292
  try {
3284
- r.removeChild(u);
3293
+ r.removeChild(l);
3285
3294
  } catch (h) {
3286
3295
  console.error(h);
3287
3296
  }
3288
- u.onload = null, u.onerror = null, this.moduleManager.remove(i.path), t.progress.work(!1, t.index, null), s.resolve();
3297
+ l.onload = null, l.onerror = null, this.moduleManager.remove(i.path), t.progress.work(!1, t.index, null), s.resolve();
3289
3298
  };
3290
3299
  else {
3291
- const h = u;
3300
+ const h = l;
3292
3301
  h.onreadystatechange = () => {
3293
3302
  /loaded|complete/.test(h.readyState) && (h.onreadystatechange = null, o.status == H.Loading && (o.status = H.Loaded, t.progress.work(!0, t.index, i.path)), s.resolve());
3294
3303
  };
3295
3304
  }
3296
- const l = this.constructResourceUri(i.path);
3297
- u.defer = !0, u.src = l;
3298
- const a = C(), f = this.createRequireLoad();
3299
- a.__require = a.__require ?? a.require, a.require = f;
3305
+ const a = this.constructResourceUri(i.path);
3306
+ l.defer = !0, l.src = a;
3307
+ const u = C(), f = this.createRequireLoad();
3308
+ u.__require = u.__require ?? u.require, u.require = f;
3300
3309
  const c = this.createDefine(o, f, t);
3301
- a.__define = a.__define ?? a.define, a.define = c, typeof t.progress.finalCallback != "function" && (t.progress.finalCallback = function() {
3302
- a.require = a.__require, a.__require = void 0, a.define = a.__define, a.__define = void 0;
3303
- }), r.appendChild(u);
3310
+ u.__define = u.__define ?? u.define, u.define = c, typeof t.progress.finalCallback != "function" && (t.progress.finalCallback = function() {
3311
+ u.require = u.__require, u.__require = void 0, u.define = u.__define, u.__define = void 0;
3312
+ }), r.appendChild(l);
3304
3313
  });
3305
3314
  }
3306
3315
  mountCJS(e, t) {
@@ -3312,7 +3321,7 @@ var Fr = class {
3312
3321
  }
3313
3322
  try {
3314
3323
  let n = await Ai(s.path);
3315
- if (zt(n) && (n = n.default ?? n), Ue(n)) {
3324
+ if (er(n) && (n = n.default ?? n), We(n)) {
3316
3325
  t.progress.work(!1, t.index, n), r.resolve();
3317
3326
  return;
3318
3327
  }
@@ -3331,7 +3340,7 @@ var Fr = class {
3331
3340
  unmount(e) {
3332
3341
  let t = "", r = "";
3333
3342
  typeof e == "string" ? (this.moduleManager.remove(e), r = this.getResourcePathSuffix(e), t = e) : (this.moduleManager.remove(e.path), r = e.type === "css" ? "css" : e.format ?? "", t = e.path);
3334
- const s = Ve();
3343
+ const s = Je();
3335
3344
  if (r === "umd") {
3336
3345
  let i = s.getElementById(t);
3337
3346
  i || (i = s.querySelector(`script[src="${t}"]`)), i && i.remove();
@@ -3355,24 +3364,24 @@ var Fr = class {
3355
3364
  createDefine(e, t, r) {
3356
3365
  const s = this, i = function(...n) {
3357
3366
  e.status = H.Defining;
3358
- let o, u, l, a = n.length;
3359
- if (a === 1 ? (l = n[0], o = void 0) : a === 2 ? (l = n[1], Array.isArray(n[0]) ? (u = s.trimEmptyElement(n[0]), o = void 0) : u = void 0) : (o = n[0], u = s.trimEmptyElement(n[1]), l = n[2]), o && (e.id = o, typeof s._alias == "object" && (s._alias[o] = e.src)), u && u.length > 0) s.ensure(u, (...f) => {
3367
+ let o, l, a, u = n.length;
3368
+ if (u === 1 ? (a = n[0], o = void 0) : u === 2 ? (a = n[1], Array.isArray(n[0]) ? (l = s.trimEmptyElement(n[0]), o = void 0) : l = void 0) : (o = n[0], l = s.trimEmptyElement(n[1]), a = n[2]), o && (e.id = o, typeof s._alias == "object" && (s._alias[o] = e.src)), l && l.length > 0) s.ensure(l, (...f) => {
3360
3369
  try {
3361
3370
  const c = f.map((h) => h === "exports" ? ((!e.exports || typeof e.exports != "object") && (e.exports = {}), e.exports) : h === "module" ? e : h === "require" ? t : h);
3362
- if (typeof l == "function") {
3363
- const h = Reflect.apply(l, e, c);
3371
+ if (typeof a == "function") {
3372
+ const h = Reflect.apply(a, e, c);
3364
3373
  h && typeof h == "object" && (e.exports = h);
3365
- } else e.exports = l;
3374
+ } else e.exports = a;
3366
3375
  e.status = H.Defined, r.progress.work(!0, r.index, e.exports);
3367
3376
  } catch (c) {
3368
3377
  console.error(c), r.progress.work(!1, r.index, []);
3369
3378
  }
3370
3379
  });
3371
3380
  else {
3372
- if (typeof l == "function") {
3373
- const f = Reflect.apply(l, e, []);
3381
+ if (typeof a == "function") {
3382
+ const f = Reflect.apply(a, e, []);
3374
3383
  f && typeof f == "object" && (e.exports = e.exports ?? {}, Object.assign(e.exports, f));
3375
- } else e.exports = l;
3384
+ } else e.exports = a;
3376
3385
  e.status = H.Defined, r.progress.work(!0, r.index, e.exports);
3377
3386
  }
3378
3387
  };
@@ -3383,7 +3392,7 @@ var Fr = class {
3383
3392
  }
3384
3393
  constructResourceUri(e) {
3385
3394
  try {
3386
- if (Ot.includes(e) || !this.query) return e;
3395
+ if (Dt.includes(e) || !this.query) return e;
3387
3396
  const t = this.createSearch(this.query);
3388
3397
  return e.indexOf("?") == -1 ? e += `?${t}` : t.length > 0 && (e += `&${t}`), e;
3389
3398
  } catch (t) {
@@ -3429,16 +3438,16 @@ var Fr = class {
3429
3438
  isOK() {
3430
3439
  return this.status;
3431
3440
  }
3432
- }, Ki = class {
3441
+ }, $i = class {
3433
3442
  index;
3434
3443
  resource;
3435
3444
  progress;
3436
3445
  constructor(e, t, r) {
3437
3446
  this.index = e, this.resource = t, this.progress = r;
3438
3447
  }
3439
- }, ns = /* @__PURE__ */ Symbol("fk"), os = /* @__PURE__ */ Symbol("fbk"), ls = /* @__PURE__ */ Symbol("fepk");
3448
+ }, Gt = /* @__PURE__ */ Symbol("fk"), Xt = /* @__PURE__ */ Symbol("fbk"), Qt = /* @__PURE__ */ Symbol("fepk");
3440
3449
  function Gi(e = {}) {
3441
- const t = new Gs(e), r = new nr(), s = new Pr(), i = new Fr(), n = {
3450
+ const t = new Gs(e), r = new cr(), s = new Ar(), i = new $r(), n = {
3442
3451
  get router() {
3443
3452
  return t;
3444
3453
  },
@@ -3446,28 +3455,28 @@ function Gi(e = {}) {
3446
3455
  return r;
3447
3456
  },
3448
3457
  get Bus() {
3449
- return nr;
3458
+ return cr;
3450
3459
  },
3451
3460
  get EventProxy() {
3452
- return Pr;
3461
+ return Ar;
3453
3462
  },
3454
3463
  get eventproxy() {
3455
3464
  return s;
3456
3465
  },
3457
3466
  get EventChain() {
3458
- return ut;
3467
+ return ct;
3459
3468
  },
3460
3469
  get Require() {
3461
- return Fr;
3470
+ return $r;
3462
3471
  },
3463
3472
  get require() {
3464
3473
  return i;
3465
3474
  },
3466
3475
  get isESModule() {
3467
- return zt;
3476
+ return er;
3468
3477
  },
3469
- install(o, u = {}) {
3470
- o.provide(ht, t), o.provide(ns, n), o.provide(os, r), o.provide(ls, s), u.install !== !1 && (o.component(Ei, Vt), o.component(Fi, Si)), u.optionsApi !== !1 && (Reflect.defineProperty(o.config.globalProperties, "$fox", { get() {
3478
+ install(o, l = {}) {
3479
+ o.provide(Ve, t), o.provide(Gt, n), o.provide(Xt, r), o.provide(Qt, s), l.install !== !1 && (o.component(Pi, zt), o.component(_i, Si)), l.optionsApi !== !1 && (Reflect.defineProperty(o.config.globalProperties, "$fox", { get() {
3471
3480
  return n;
3472
3481
  } }), Reflect.defineProperty(o.config.globalProperties, "$router", { get() {
3473
3482
  return t;
@@ -3477,45 +3486,51 @@ function Gi(e = {}) {
3477
3486
  return r;
3478
3487
  } }), Reflect.defineProperty(o.config.globalProperties, "$eventProxy", { get() {
3479
3488
  return s;
3480
- } }), o.config.globalProperties.$fox_on = function(l, a, f = !1) {
3481
- s.on(l, a, f);
3482
- }, o.config.globalProperties.$fox_off = function(l, a) {
3483
- s.off(l, a);
3484
- }, o.config.globalProperties.$fox_once = function(l, a) {
3485
- s.once(l, a);
3486
- }, o.config.globalProperties.$fox_all = function(...l) {
3487
- let a = s;
3488
- Reflect.apply(a.all, a, l);
3489
- }, o.config.globalProperties.$fox_trigger = function(l, ...a) {
3489
+ } }), o.config.globalProperties.$fox_on = function(a, u, f = !1) {
3490
+ s.on(a, u, f);
3491
+ }, o.config.globalProperties.$fox_off = function(a, u) {
3492
+ s.off(a, u);
3493
+ }, o.config.globalProperties.$fox_once = function(a, u) {
3494
+ s.once(a, u);
3495
+ }, o.config.globalProperties.$fox_all = function(...a) {
3496
+ let u = s;
3497
+ Reflect.apply(u.all, u, a);
3498
+ }, o.config.globalProperties.$fox_trigger = function(a, ...u) {
3490
3499
  let f = s;
3491
- Reflect.apply(f.trigger, f, [l, ...a]);
3492
- }, o.config.globalProperties.$fox_emit = function(l, ...a) {
3500
+ Reflect.apply(f.trigger, f, [a, ...u]);
3501
+ }, o.config.globalProperties.$fox_emit = function(a, ...u) {
3493
3502
  let f = s;
3494
- Reflect.apply(f.trigger, f, [l, ...a]);
3503
+ Reflect.apply(f.trigger, f, [a, ...u]);
3495
3504
  }, o.mixin({ setup() {
3496
- return { $route: Jr() };
3505
+ return { $route: Vt() };
3497
3506
  } })), t.init();
3498
3507
  }
3499
3508
  };
3500
3509
  return n;
3501
3510
  }
3502
- function as() {
3503
- return N(ht, null);
3511
+ function us(e) {
3512
+ return _e() ? N(Ve, null) : e ? e.$?.appContext?.provides?.[Ve] ?? null : null;
3504
3513
  }
3505
3514
  function Xi(e) {
3506
- return Jr(e);
3515
+ let t = Vt(e);
3516
+ if (!t && e && !_e()) {
3517
+ let r = e;
3518
+ for (r = r.$parent; r && (t = Vt(r), !t); )
3519
+ r = r.$parent;
3520
+ }
3521
+ return t;
3507
3522
  }
3508
- function Qi() {
3509
- return N(ns, null);
3523
+ function Qi(e) {
3524
+ return _e() ? N(Gt, null) : e ? e.$?.appContext?.provides?.[Gt] ?? null : null;
3510
3525
  }
3511
- function Zi() {
3512
- return N(os, null);
3526
+ function Zi(e) {
3527
+ return _e() ? N(Xt, null) : e ? e.$?.appContext?.provides?.[Xt] ?? null : null;
3513
3528
  }
3514
- function Yi() {
3515
- return N(ls, null);
3529
+ function Yi(e) {
3530
+ return _e() ? N(Qt, null) : e ? e.$?.appContext?.provides?.[Qt] ?? null : null;
3516
3531
  }
3517
3532
  function en(e) {
3518
- const t = as();
3533
+ const t = us();
3519
3534
  if (!t) {
3520
3535
  console.error("[Fox]router is not exist.");
3521
3536
  return;
@@ -3533,7 +3548,7 @@ function en(e) {
3533
3548
  });
3534
3549
  }
3535
3550
  function tn(e) {
3536
- const t = as();
3551
+ const t = us();
3537
3552
  if (!t) {
3538
3553
  console.error("[Fox]router is not exist.");
3539
3554
  return;
@@ -3551,41 +3566,41 @@ function tn(e) {
3551
3566
  });
3552
3567
  }
3553
3568
  export {
3554
- nr as Bus,
3555
- ut as EventChain,
3556
- Pr as EventProxy,
3569
+ cr as Bus,
3570
+ ct as EventChain,
3571
+ Ar as EventProxy,
3557
3572
  ri as FoxBeforeEnter,
3558
3573
  ii as FoxBeforeLeave,
3559
3574
  si as FoxEnter,
3560
3575
  ni as FoxLeave,
3561
- Nt as FoxLeaveEnd,
3562
- _ as OperationType,
3563
- S as Route,
3576
+ Wt as FoxLeaveEnd,
3577
+ F as OperationType,
3578
+ x as Route,
3564
3579
  Gs as Router,
3565
3580
  Si as RouterLink,
3566
- Vt as RouterView,
3581
+ zt as RouterView,
3567
3582
  Ui as bindLifecycleContextToCurrentScope,
3568
3583
  Gi as createFox,
3569
3584
  Ws as createMemoryHistory,
3570
3585
  Us as createWebHashHistory,
3571
3586
  Ni as createWebHistory,
3572
3587
  Wi as deleteContextValue,
3573
- $ as extend,
3574
- Ur as injectContextValue,
3575
- yt as injectLifecycleContext,
3576
- er as isArray,
3588
+ j as extend,
3589
+ Gr as injectContextValue,
3590
+ dt as injectLifecycleContext,
3591
+ or as isArray,
3577
3592
  Mi as isDate,
3578
- zt as isESModule,
3579
- rr as isEqual,
3580
- b as isFunction,
3581
- ji as isMap,
3582
- Ue as isNil,
3593
+ er as isESModule,
3594
+ ar as isEqual,
3595
+ w as isFunction,
3596
+ Ki as isMap,
3597
+ We as isNil,
3583
3598
  gs as isObject,
3584
- bs as isPlainObject,
3599
+ ws as isPlainObject,
3585
3600
  Ii as isPromise,
3586
3601
  Li as isSet,
3587
- Ti as isString,
3588
- ki as isSymbol,
3602
+ ki as isString,
3603
+ Ti as isSymbol,
3589
3604
  tn as onAfterRouteUpdate,
3590
3605
  en as onBeforeRouteUpdate,
3591
3606
  Ji as onFoxActivated,
@@ -3594,14 +3609,14 @@ export {
3594
3609
  Hi as rawState,
3595
3610
  Bi as reactiveState,
3596
3611
  Di as shallowReactiveState,
3597
- Kr as toBoolean,
3612
+ kr as toBoolean,
3598
3613
  Oi as toNumber,
3599
- Jt as toTypeString,
3600
- tr as typeOf,
3614
+ Yt as toTypeString,
3615
+ lr as typeOf,
3601
3616
  Zi as useBus,
3602
3617
  Yi as useEventProxy,
3603
3618
  Qi as useFox,
3604
3619
  Xi as useRoute,
3605
- as as useRouter,
3620
+ us as useRouter,
3606
3621
  Qs as withLifecycleContext
3607
3622
  };