@fox-js/fox 3.0.1-13 → 3.0.1-15

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,88 +1,88 @@
1
- import { ref as ar, getCurrentInstance as $t, onUnmounted as Ye, shallowReactive as Mr, effectScope as Or, watch as Lr, shallowRef as Nr, defineComponent as fr, inject as G, provide as Z, h as le } from "vue";
1
+ import { ref as dr, getCurrentInstance as qt, onUnmounted as tt, shallowReactive as Ir, effectScope as Dr, watch as Hr, shallowRef as Vr, defineComponent as yr, inject as G, provide as ee, h as ae } from "vue";
2
2
  /*!
3
- * fox v3.0.0 Mon Jan 16 2023 10:46:28 GMT+0800 (中国标准时间)
3
+ * fox v3.0.0 Mon Jan 30 2023 14:33:59 GMT+0800 (中国标准时间)
4
4
  */
5
- const Hr = Array.isArray, Zn = (r) => jt(r) === "[object Map]", ei = (r) => jt(r) === "[object Set]", ti = (r) => r instanceof Date, S = (r) => typeof r == "function", ri = (r) => typeof r == "string", ni = (r) => typeof r == "symbol", Ir = (r) => r !== null && typeof r == "object", ii = (r) => Ir(r) && S(r.then) && S(r.catch), kr = Object.prototype.toString, jt = (r) => kr.call(r), St = (r) => jt(r) === "[object Object]", Vr = typeof Symbol == "function" && typeof Symbol.toStringTag == "symbol";
6
- function Dr(r) {
7
- return r.__esModule || Vr && r[Symbol.toStringTag] === "Module";
8
- }
9
- const Br = typeof Promise < "u" && Promise.toString().indexOf("[native code]") !== -1;
10
- function K(...r) {
11
- let t = r[0] !== void 0 && r[0] !== null ? r[0] : {}, e = 1, n = r.length, i = !1;
12
- for (typeof t == "boolean" && (i = t, t = r[e] ?? {}, e++), typeof t != "object" && (t = {}); e < n; e++)
13
- if (r[e] !== null && r[e] !== void 0) {
14
- let s = r[e];
15
- for (let o in s) {
16
- let l = t[o], u = s[o];
17
- if (l !== u)
18
- if (i === !0 && u && typeof u == "object") {
19
- let a;
20
- Array.isArray(u) ? a = l && Array.isArray(l) ? l : [] : a = l && typeof l == "object" ? l : {}, t[o] = K(i, a, u);
5
+ const es = Array.isArray, ts = (r) => Ot(r) === "[object Map]", rs = (r) => Ot(r) === "[object Set]", ns = (r) => r instanceof Date, S = (r) => typeof r == "function", ss = (r) => typeof r == "string", is = (r) => typeof r == "symbol", Br = (r) => r !== null && typeof r == "object", os = (r) => Br(r) && S(r.then) && S(r.catch), Ur = Object.prototype.toString, Ot = (r) => Ur.call(r), Vt = (r) => Ot(r) === "[object Object]", kr = typeof Symbol == "function" && typeof Symbol.toStringTag == "symbol";
6
+ function pr(r) {
7
+ return r.__esModule || kr && r[Symbol.toStringTag] === "Module";
8
+ }
9
+ const Wr = typeof Promise < "u" && Promise.toString().indexOf("[native code]") !== -1;
10
+ function $(...r) {
11
+ let e = r[0] !== void 0 && r[0] !== null ? r[0] : {}, t = 1, n = r.length, s = !1;
12
+ for (typeof e == "boolean" && (s = e, e = r[t] ?? {}, t++), typeof e != "object" && (e = {}); t < n; t++)
13
+ if (r[t] !== null && r[t] !== void 0) {
14
+ let i = r[t];
15
+ for (let o in i) {
16
+ let a = e[o], l = i[o];
17
+ if (a !== l)
18
+ if (s === !0 && l && typeof l == "object") {
19
+ let u;
20
+ Array.isArray(l) ? u = a && Array.isArray(a) ? a : [] : u = a && typeof a == "object" ? a : {}, e[o] = $(s, u, l);
21
21
  } else
22
- u !== void 0 && (t[o] = u);
22
+ l !== void 0 && (e[o] = l);
23
23
  }
24
24
  }
25
- return t;
25
+ return e;
26
26
  }
27
- function Ge(r, t, e = !1) {
28
- if (!e)
29
- K(!0, r, t);
27
+ function Xe(r, e, t = !1) {
28
+ if (!t)
29
+ $(!0, r, e);
30
30
  else {
31
- if (typeof t != "object")
31
+ if (typeof e != "object")
32
32
  return {};
33
33
  typeof r != "object" && (r = {});
34
- for (let i in t) {
35
- let s = r[i], o = t[i];
36
- if (s !== o)
34
+ for (let s in e) {
35
+ let i = r[s], o = e[s];
36
+ if (i !== o)
37
37
  if (typeof o == "object") {
38
- if (!Array.isArray(o) && !St(o))
38
+ if (!Array.isArray(o) && !Vt(o))
39
39
  continue;
40
- s = Ge(s, o, e), r[i] = s;
40
+ i = Xe(i, o, t), r[s] = i;
41
41
  } else {
42
42
  if (typeof o == "function")
43
43
  continue;
44
- r[i] = o;
44
+ r[s] = o;
45
45
  }
46
46
  }
47
- const n = Object.getOwnPropertySymbols(t);
48
- for (let i of n) {
49
- let s = r[i], o = t[i];
50
- if (s !== o)
47
+ const n = Object.getOwnPropertySymbols(e);
48
+ for (let s of n) {
49
+ let i = r[s], o = e[s];
50
+ if (i !== o)
51
51
  if (typeof o == "object") {
52
- if (!Array.isArray(o) && !St(o))
52
+ if (!Array.isArray(o) && !Vt(o))
53
53
  continue;
54
- s = Ge(s, o, e), r[i] = s;
54
+ i = Xe(i, o, t), r[s] = i;
55
55
  } else {
56
56
  if (typeof o == "function")
57
57
  continue;
58
- r[i] = o;
58
+ r[s] = o;
59
59
  }
60
60
  }
61
61
  }
62
62
  return r;
63
63
  }
64
- class ne {
64
+ class se {
65
65
  static seed = new Date().getTime();
66
66
  static get() {
67
- let t = ++ne.seed;
68
- return t >= Number.MAX_VALUE && (ne.seed = 0), t;
67
+ let e = ++se.seed;
68
+ return e >= Number.MAX_VALUE && (se.seed = 0), e;
69
69
  }
70
70
  }
71
- const nt = Br ? Promise.resolve() : null;
72
- function Ke(r, ...t) {
73
- nt !== null ? t && t.length > 0 ? nt.then(() => {
74
- r(t);
75
- }) : nt.then(r) : t && t.length > 0 ? setTimeout(() => {
76
- r(t);
71
+ const ot = Wr ? Promise.resolve() : null;
72
+ function Ke(r, ...e) {
73
+ ot !== null ? e && e.length > 0 ? ot.then(() => {
74
+ r(e);
75
+ }) : ot.then(r) : e && e.length > 0 ? setTimeout(() => {
76
+ r(e);
77
77
  }) : setTimeout(r);
78
78
  }
79
- function cr(r) {
79
+ function mr(r) {
80
80
  return r == null ? !1 : typeof r == "boolean" ? r : typeof r == "string" ? r.toLocaleLowerCase() === "true" : Boolean(r);
81
81
  }
82
- function si(r) {
82
+ function ls(r) {
83
83
  return typeof r == "number" ? r : Number(r);
84
84
  }
85
- const Ur = {
85
+ const zr = {
86
86
  "[object Boolean]": "boolean",
87
87
  "[object Number]": "number",
88
88
  "[object String]": "string",
@@ -92,250 +92,221 @@ const Ur = {
92
92
  "[object RegExp]": "regExp",
93
93
  "[object Object]": "object"
94
94
  };
95
- function Je(r) {
96
- let e = Object.prototype.toString.call(r);
97
- return r == null ? String(r) : Ur[e] || "object";
98
- }
99
- function hr(r) {
100
- return r && typeof r == "object" && "setInterval" in r;
101
- }
102
- function Mt(r) {
103
- let t = !!r && "length" in r && r.length, e = Je(r);
104
- return e === "function" || hr(r) ? !1 : e === "array" || t === 0 || typeof t == "number" && t > 0 && t - 1 in r;
105
- }
106
- function yr(r, t) {
107
- let e = +t.length, n = 0, i = r.length;
108
- for (; n < e; n++)
109
- r[i++] = t[n];
110
- return r.length = i, r;
111
- }
112
- function Wr(r, t = []) {
113
- let e = t;
114
- return r != null && (Mt(Object(r)) ? yr(e, typeof r == "string" ? [r] : r) : e.push(r)), e;
115
- }
116
- function zr(r, t, e) {
117
- if (Mt(r))
118
- Reflect.apply([].forEach, r, [t]);
119
- else
120
- for (let n in r)
121
- if (e && r.hasOwnProperty(n)) {
122
- if (Reflect.apply(t, r, [r[n]]) === !1)
123
- break;
124
- } else if (Reflect.apply(t, r, [r[n]]) === !1)
125
- break;
126
- return r;
95
+ function Bt(r) {
96
+ let t = Object.prototype.toString.call(r);
97
+ return r == null ? String(r) : zr[t] || "object";
127
98
  }
128
- function Pt(r, t) {
129
- if (r == t)
99
+ function Ut(r, e) {
100
+ if (r == e)
130
101
  return !0;
131
- if (r === void 0 || t === void 0)
102
+ if (r === void 0 || e === void 0)
132
103
  return !1;
133
- let e = Je(r), n = Je(t);
134
- if (e !== n)
104
+ let t = Bt(r), n = Bt(e);
105
+ if (t !== n)
135
106
  return !1;
136
- if (e === "object") {
137
- let i = Object.keys(r), s = Object.keys(t);
138
- if (i.length !== s.length)
107
+ if (t === "object") {
108
+ let s = Object.keys(r), i = Object.keys(e);
109
+ if (s.length !== i.length)
139
110
  return !1;
140
- for (let o = 0; o < i.length; o++) {
141
- let l = i[o], u = r[l], a = t[l];
142
- if (!Pt(u, a))
111
+ for (let o = 0; o < s.length; o++) {
112
+ let a = s[o], l = r[a], u = e[a];
113
+ if (!Ut(l, u))
143
114
  return !1;
144
115
  }
145
116
  return !0;
146
- } else if (e === "array") {
147
- if (r.length !== t.length)
117
+ } else if (t === "array") {
118
+ if (r.length !== e.length)
148
119
  return !1;
149
- for (let i = 0; i < r.length; i++) {
150
- let s = r[i], o = t[i];
151
- if (!Pt(s, o))
120
+ for (let s = 0; s < r.length; s++) {
121
+ let i = r[s], o = e[s];
122
+ if (!Ut(i, o))
152
123
  return !1;
153
124
  }
154
125
  return !0;
155
126
  }
156
127
  return !1;
157
128
  }
158
- const Vt = Symbol("idKey"), ae = Symbol("valueKey"), x = Symbol("childrenKey"), J = Symbol("growKey");
159
- class dr {
160
- [J] = !0;
161
- [Vt];
162
- [ae] = ar();
163
- [x] = /* @__PURE__ */ new Map();
164
- constructor(t) {
165
- this[Vt] = t;
166
- }
167
- }
168
- class Gr {
169
- get(t, e) {
170
- if (e == "value")
171
- return t[ae].value;
172
- if (e === "grow")
173
- return t[J];
174
- let n = t[x].get(e);
129
+ const kt = Symbol("idKey"), fe = Symbol("valueKey"), R = Symbol("childrenKey"), Q = Symbol("growKey");
130
+ class vr {
131
+ [Q] = !0;
132
+ [kt];
133
+ [fe] = dr();
134
+ [R] = /* @__PURE__ */ new Map();
135
+ constructor(e) {
136
+ this[kt] = e;
137
+ }
138
+ }
139
+ class Jr {
140
+ get(e, t) {
141
+ if (t == "value")
142
+ return e[fe].value;
143
+ if (t === "grow")
144
+ return e[Q];
145
+ let n = e[R].get(t);
175
146
  if (n)
176
- return qe(n);
177
- if (t[J])
178
- return n = Lt(e), n[J] = t[J], t[x].set(e, n), qe(n);
147
+ return je(n);
148
+ if (e[Q])
149
+ return n = Mt(t), n[Q] = e[Q], e[R].set(t, n), je(n);
179
150
  }
180
- set(t, e, n) {
181
- return e == "value" ? (t[ae].value = n, !0) : e === "grow" ? (t[J] = cr(n), !0) : n == null ? (t[x].delete(e), !0) : (console.error(`illegal property:${e}`), !1);
151
+ set(e, t, n) {
152
+ return t == "value" ? (e[fe].value = n, !0) : t === "grow" ? (e[Q] = mr(n), !0) : n == null ? (e[R].delete(t), !0) : (console.error(`illegal property:${t}`), !1);
182
153
  }
183
- deleteProperty(t, e) {
184
- return e === "value" || e == "grow" ? (console.error(`can not delete property:${String(e)}`), !1) : (t[x].delete(e), !0);
154
+ deleteProperty(e, t) {
155
+ return t === "value" || t == "grow" ? (console.error(`can not delete property:${String(t)}`), !1) : (e[R].delete(t), !0);
185
156
  }
186
157
  }
187
- const Ot = "__proxy__";
188
- function Lt(r) {
189
- let t = new dr(r);
190
- return Reflect.set(t, Ot, new Proxy(t, new Gr())), t;
158
+ const Lt = "__proxy__";
159
+ function Mt(r) {
160
+ let e = new vr(r);
161
+ return Reflect.set(e, Lt, new Proxy(e, new Jr())), e;
191
162
  }
192
- function qe(r) {
193
- return Reflect.get(r, Ot);
163
+ function je(r) {
164
+ return Reflect.get(r, Lt);
194
165
  }
195
- class vr extends dr {
166
+ class gr extends vr {
196
167
  constructor() {
197
168
  super("__root__");
198
169
  }
199
- put(...t) {
200
- let e = t.length;
201
- if (e < 2)
170
+ put(...e) {
171
+ let t = e.length;
172
+ if (t < 2)
202
173
  return console.error("参数至少包括一个(key, value)"), !1;
203
174
  let n = this;
204
- for (let i = 0; i < e - 1; i++) {
205
- let s = t[i], o;
206
- n[x].has(s) ? o = n[x].get(s) : (o = Lt(s), n[x].set(s, o)), n = o;
175
+ for (let s = 0; s < t - 1; s++) {
176
+ let i = e[s], o;
177
+ n[R].has(i) ? o = n[R].get(i) : (o = Mt(i), n[R].set(i, o)), n = o;
207
178
  }
208
- return n[ae].value = t[e - 1], !0;
179
+ return n[fe].value = e[t - 1], !0;
209
180
  }
210
- get(...t) {
211
- let e = t.length;
212
- if (e === 0)
181
+ get(...e) {
182
+ let t = e.length;
183
+ if (t === 0)
213
184
  return;
214
185
  let n = this;
215
- for (let i = 0; i < e; i++) {
216
- let s = t[i];
217
- if (n[x].has(s))
218
- n = n[x].get(s);
186
+ for (let s = 0; s < t; s++) {
187
+ let i = e[s];
188
+ if (n[R].has(i))
189
+ n = n[R].get(i);
219
190
  else
220
191
  return;
221
192
  }
222
- return n[ae].value;
193
+ return n[fe].value;
223
194
  }
224
- remove(...t) {
225
- let e = t.length;
226
- if (e == 0)
195
+ remove(...e) {
196
+ let t = e.length;
197
+ if (t == 0)
227
198
  return !1;
228
199
  let n = this;
229
- for (let s = 0; s < e - 1; s++) {
230
- let o = t[s];
231
- if (n[x].has(o))
232
- n = n[x].get(o);
200
+ for (let i = 0; i < t - 1; i++) {
201
+ let o = e[i];
202
+ if (n[R].has(o))
203
+ n = n[R].get(o);
233
204
  else
234
205
  return !1;
235
206
  }
236
- let i = t[e - 1];
237
- return n[x].has(i) ? (n[x].delete(i), !0) : !1;
207
+ let s = e[t - 1];
208
+ return n[R].has(s) ? (n[R].delete(s), !0) : !1;
238
209
  }
239
- contains(...t) {
240
- let e = t.length;
241
- if (e == 0)
210
+ contains(...e) {
211
+ let t = e.length;
212
+ if (t == 0)
242
213
  return !1;
243
214
  let n = this;
244
- for (let s = 0; s < e - 1; s++) {
245
- let o = t[s];
246
- if (n[x].has(o))
247
- n = n[x].get(o);
215
+ for (let i = 0; i < t - 1; i++) {
216
+ let o = e[i];
217
+ if (n[R].has(o))
218
+ n = n[R].get(o);
248
219
  else
249
220
  return !1;
250
221
  }
251
- let i = t[e - 1];
252
- return n[x].has(i);
222
+ let s = e[t - 1];
223
+ return n[R].has(s);
253
224
  }
254
225
  clear() {
255
- this[x].clear();
226
+ this[R].clear();
256
227
  }
257
228
  }
258
- const Jr = ["put", "get", "contains", "remove", "clear"];
259
- function Dt(r) {
260
- return Jr.includes(r);
229
+ const Gr = ["put", "get", "contains", "remove", "clear"];
230
+ function Wt(r) {
231
+ return Gr.includes(r);
261
232
  }
262
233
  class Qr {
263
- get(t, e) {
264
- if (e == "value")
265
- return t[ae].value;
266
- if (e === "grow")
267
- return t[J];
268
- if (e === x)
269
- return t[x];
270
- if (typeof e == "string" && Dt(e))
271
- return t[e];
272
- let n = String(e), i = t[x].get(n);
273
- if (i)
274
- return qe(i);
275
- if (t[J])
276
- return i = Lt(n), i[J] = t[J], t[x].set(n, i), qe(i);
277
- }
278
- set(t, e, n) {
279
- return e == "value" ? (t[ae].value = n, !0) : e === "grow" ? (t[J] = cr(n), !0) : Dt(e) ? !1 : n == null ? (t[x].delete(e), !0) : (console.error(`illegal property:${e}`), !1);
280
- }
281
- deleteProperty(t, e) {
282
- return e === "value" || e == "grow" ? (console.error(`can not delete property:${String(e)}`), !1) : (t[x].delete(e), !0);
234
+ get(e, t) {
235
+ if (t == "value")
236
+ return e[fe].value;
237
+ if (t === "grow")
238
+ return e[Q];
239
+ if (t === R)
240
+ return e[R];
241
+ if (typeof t == "string" && Wt(t))
242
+ return e[t];
243
+ let n = String(t), s = e[R].get(n);
244
+ if (s)
245
+ return je(s);
246
+ if (e[Q])
247
+ return s = Mt(n), s[Q] = e[Q], e[R].set(n, s), je(s);
248
+ }
249
+ set(e, t, n) {
250
+ return t == "value" ? (e[fe].value = n, !0) : t === "grow" ? (e[Q] = mr(n), !0) : Wt(t) ? !1 : n == null ? (e[R].delete(t), !0) : (console.error(`illegal property:${t}`), !1);
251
+ }
252
+ deleteProperty(e, t) {
253
+ return t === "value" || t == "grow" ? (console.error(`can not delete property:${String(t)}`), !1) : (e[R].delete(t), !0);
283
254
  }
284
255
  }
285
256
  function Xr() {
286
- let r = new vr(), t = new Qr(), e = new Proxy(r, t);
257
+ let r = new gr(), e = new Qr(), t = new Proxy(r, e);
287
258
  return Object.assign({
288
- put(...i) {
289
- return Reflect.apply(r.put, r, i);
259
+ put(...s) {
260
+ return Reflect.apply(r.put, r, s);
290
261
  },
291
- get(...i) {
292
- return Reflect.apply(r.get, r, i);
262
+ get(...s) {
263
+ return Reflect.apply(r.get, r, s);
293
264
  },
294
- remove(...i) {
295
- return Reflect.apply(r.remove, r, i);
265
+ remove(...s) {
266
+ return Reflect.apply(r.remove, r, s);
296
267
  },
297
- contains(...i) {
298
- return Reflect.apply(r.contains, r, i);
268
+ contains(...s) {
269
+ return Reflect.apply(r.contains, r, s);
299
270
  },
300
271
  clear() {
301
272
  return Reflect.apply(r.clear, r, []);
302
273
  }
303
- }, e), Reflect.set(r, Ot, e), r;
274
+ }, t), Reflect.set(r, Lt, t), r;
304
275
  }
305
- let Bt = new Proxy(vr, {
306
- construct(r, ...t) {
307
- let e = Xr();
308
- return qe(e);
276
+ let zt = new Proxy(gr, {
277
+ construct(r, ...e) {
278
+ let t = Xr();
279
+ return je(t);
309
280
  }
310
281
  });
311
- const Y = "default", mr = Symbol("sync"), L = Symbol("resolveRoute");
312
- function Ut(r) {
313
- let t = !1;
314
- return function(...e) {
315
- if (!t)
316
- return t = !0, Reflect.apply(r, {}, e);
282
+ const Z = "default", wr = Symbol("sync"), I = Symbol("resolveRoute");
283
+ function Jt(r) {
284
+ let e = !1;
285
+ return function(...t) {
286
+ if (!e)
287
+ return e = !0, Reflect.apply(r, {}, t);
317
288
  };
318
289
  }
319
290
  function Yr(r) {
320
- let t = r.src;
321
- return new Promise((e, n) => {
322
- const i = Ut((l) => {
323
- Dr(l) && (l = l.default), r.component = l, console.debug("success load async module"), e();
324
- }), s = Ut((l) => {
325
- console.debug("reject load async module"), n(l);
291
+ let e = r.src;
292
+ return new Promise((t, n) => {
293
+ const s = Jt((a) => {
294
+ pr(a) && (a = a.default), r.component = a, console.debug("success load async module"), t();
295
+ }), i = Jt((a) => {
296
+ console.debug("reject load async module"), n(a);
326
297
  });
327
298
  let o;
328
299
  try {
329
- o = t(i, s);
330
- } catch (l) {
331
- s(l);
300
+ o = e(s, i);
301
+ } catch (a) {
302
+ i(a);
332
303
  }
333
304
  if (o)
334
305
  if (typeof o.then == "function")
335
- o.then(i, s);
306
+ o.then(s, i);
336
307
  else {
337
- const l = o.component;
338
- l && typeof l.then == "function" && l.then(i, s);
308
+ const a = o.component;
309
+ a && typeof a.then == "function" && a.then(s, i);
339
310
  }
340
311
  });
341
312
  }
@@ -344,28 +315,28 @@ class Zr {
344
315
  level;
345
316
  rootName;
346
317
  rootIndex = 0;
347
- constructor(t, e, n, i) {
348
- this.name = t, this.level = e, this.rootName = n, this.rootIndex = i;
318
+ constructor(e, t, n, s) {
319
+ this.name = e, this.level = t, this.rootName = n, this.rootIndex = s;
349
320
  }
350
321
  }
351
- class Qe {
322
+ class Ye {
352
323
  to;
353
324
  routeModel;
354
325
  from;
355
326
  data = {};
356
- constructor(t, e) {
357
- this.to = t, this.from = e;
327
+ constructor(e, t) {
328
+ this.to = e, this.from = t;
358
329
  }
359
- static from(t) {
360
- let e = new Qe(t.to, t.from), n = t.data ?? {};
361
- return K(!0, e.data, n), e;
330
+ static from(e) {
331
+ let t = new Ye(e.to, e.from), n = e.data ?? {};
332
+ return $(!0, t.data, n), t;
362
333
  }
363
334
  }
364
- class $ {
335
+ class j {
365
336
  path;
366
337
  get fullPath() {
367
- const t = this.path ?? `/${this.name}`;
368
- return `${this.root ?? Y}!${t}`;
338
+ const e = this.path ?? `/${this.name}`;
339
+ return `${this.root ?? Z}!${e}`;
369
340
  }
370
341
  name;
371
342
  root;
@@ -383,30 +354,30 @@ class $ {
383
354
  active;
384
355
  slot;
385
356
  session;
386
- static clone(t, e) {
387
- let n = new $();
388
- return Ge(n, t, e), n;
357
+ static clone(e, t) {
358
+ let n = new j();
359
+ return Xe(n, e, t), n;
389
360
  }
390
- static isSame(t, e) {
391
- return t === e ? !0 : !(t == null || e == null || t.path && t.path !== e.path || t.name && t.name !== e.name || t.root !== e.root || t.index !== e.index);
361
+ static isSame(e, t) {
362
+ return e === t ? !0 : !(e == null || t == null || e.path && e.path !== t.path || e.name && e.name !== t.name || e.root !== t.root || e.index !== t.index);
392
363
  }
393
- static isSameForRouteModel(t, e) {
394
- return t === e ? !0 : !(t == null || e == null || t.path && t.path != e.path || t.name && t.name != e.name);
364
+ static isSameForRouteModel(e, t) {
365
+ return e === t ? !0 : !(e == null || t == null || e.path && e.path != t.path || e.name && e.name != t.name);
395
366
  }
396
- static from(t) {
397
- let e = new $();
398
- if (t == null)
399
- return e;
400
- let n = e;
401
- for (let s in t) {
402
- let o = t[s];
403
- n[s] = o;
404
- }
405
- const i = Object.getOwnPropertySymbols(t);
406
- if (Array.isArray(i) && i.length > 0)
407
- for (let s of i)
408
- n[s] = t[s];
409
- return e;
367
+ static from(e) {
368
+ let t = new j();
369
+ if (e == null)
370
+ return t;
371
+ let n = t;
372
+ for (let i in e) {
373
+ let o = e[i];
374
+ n[i] = o;
375
+ }
376
+ const s = Object.getOwnPropertySymbols(e);
377
+ if (Array.isArray(s) && s.length > 0)
378
+ for (let i of s)
379
+ n[i] = e[i];
380
+ return t;
410
381
  }
411
382
  }
412
383
  class en {
@@ -416,8 +387,8 @@ class en {
416
387
  meta;
417
388
  src;
418
389
  component;
419
- constructor(t, e, n, i) {
420
- this.id = ne.get(), this.name = t, this.src = e, typeof e != "function" && (this.component = e), this.props = n, this.meta = i;
390
+ constructor(e, t, n, s) {
391
+ this.id = se.get(), this.name = e, this.src = t, typeof t != "function" && (this.component = t), this.props = n, this.meta = s;
421
392
  }
422
393
  get isResolved() {
423
394
  return this.component !== void 0;
@@ -426,192 +397,192 @@ class en {
426
397
  return Yr(this);
427
398
  }
428
399
  }
429
- class Wt {
400
+ class Gt {
430
401
  models = [];
431
402
  }
432
- class it {
403
+ class lt {
433
404
  path;
434
405
  match;
435
406
  redirect;
436
407
  name;
437
408
  layers = [];
438
409
  }
439
- const H = Symbol("chainKey"), O = Symbol("cursorKey"), st = Symbol("$persistentModeKey"), E = Symbol("statusKey"), Q = Symbol("argsKey"), je = Symbol("exArgsKey"), ce = Symbol("successFnsKey"), xe = Symbol("errorFnsKey"), ie = Symbol("sessionKey"), X = Symbol("_go");
440
- class At {
410
+ const H = Symbol("chainKey"), N = Symbol("cursorKey"), at = Symbol("$persistentModeKey"), E = Symbol("statusKey"), X = Symbol("argsKey"), Oe = Symbol("exArgsKey"), he = Symbol("successFnsKey"), Se = Symbol("errorFnsKey"), ie = Symbol("sessionKey"), Y = Symbol("_go");
411
+ class Ze {
441
412
  [H] = [];
442
- [O] = 0;
443
- [st] = !1;
413
+ [N] = 0;
414
+ [at] = !1;
444
415
  [E] = "Free";
445
- [Q] = [];
446
- [je] = [];
447
- [ce] = [];
448
- [xe] = [];
416
+ [X] = [];
417
+ [Oe] = [];
418
+ [he] = [];
419
+ [Se] = [];
449
420
  [ie];
450
421
  get session() {
451
422
  return this[ie];
452
423
  }
453
- constructor(t, e = !1) {
454
- this[ie] = t, this[st] = e;
424
+ constructor(e, t = !1) {
425
+ this[ie] = e, this[at] = t;
455
426
  }
456
- [X](t, ...e) {
427
+ [Y](e, ...t) {
457
428
  let n = this[E];
458
- if (this[E] = "Busy", this[O] += t, this[O] < 0 && (this[O] = 0), this[Q] = e, n === "Exception" || n === "Reject") {
459
- let l = [{
429
+ if (this[E] = "Busy", this[N] += e, this[N] < 0 && (this[N] = 0), this[X] = t, n === "Exception" || n === "Reject") {
430
+ let a = [{
460
431
  session: this[ie]
461
- }, ...this[je]];
462
- for (; this[xe].length > 0; )
432
+ }, ...this[Oe]];
433
+ for (; this[Se].length > 0; )
463
434
  try {
464
- let u = this[xe].shift();
465
- typeof u == "function" && Ke(() => {
466
- Reflect.apply(u, {}, l);
435
+ let l = this[Se].shift();
436
+ typeof l == "function" && Ke(() => {
437
+ Reflect.apply(l, {}, a);
467
438
  });
468
- } catch (u) {
469
- console.error(u.message, u);
439
+ } catch (l) {
440
+ console.error(l.message, l);
470
441
  }
471
- return this[E] = n, this[H] = [], this[O] = 0, this;
472
- } else if (n === "Finished" || this[O] >= this[H].length) {
473
- let l = [{
442
+ return this[E] = n, this[H] = [], this[N] = 0, this;
443
+ } else if (n === "Finished" || this[N] >= this[H].length) {
444
+ let a = [{
474
445
  session: this[ie]
475
- }, ...this[Q]];
476
- for (; this[ce].length > 0; ) {
477
- let u = this[ce].shift();
478
- typeof u == "function" && Ke(() => {
479
- Reflect.apply(u, {}, l);
446
+ }, ...this[X]];
447
+ for (; this[he].length > 0; ) {
448
+ let l = this[he].shift();
449
+ typeof l == "function" && Ke(() => {
450
+ Reflect.apply(l, {}, a);
480
451
  });
481
452
  }
482
453
  return this[E] = "Free", this;
483
454
  }
484
- if (this[O] >= this[H].length)
455
+ if (this[N] >= this[H].length)
485
456
  return this[E] = "Free", this;
486
- let i = this[H][this[O]];
487
- this[st] || (this[H].splice(0, this[O] + 1), this[O] = -1);
488
- let s = this[O] + 1;
457
+ let s = this[H][this[N]];
458
+ this[at] || (this[H].splice(0, this[N] + 1), this[N] = -1);
459
+ let i = this[N] + 1;
489
460
  try {
490
- let o = !1, l = {
491
- go: (u, ...a) => {
492
- o || (o = !0, Reflect.apply(this[X], this, [u, ...a]));
461
+ let o = !1, a = {
462
+ go: (l, ...u) => {
463
+ o || (o = !0, Reflect.apply(this[Y], this, [l, ...u]));
493
464
  },
494
- resolve: (...u) => {
495
- o || (o = !0, Reflect.apply(this[X], this, [1, ...u]));
465
+ resolve: (...l) => {
466
+ o || (o = !0, Reflect.apply(this[Y], this, [1, ...l]));
496
467
  },
497
- reject: (...u) => {
498
- o || (o = !0, Reflect.apply(this.reject, this, [...u]));
468
+ reject: (...l) => {
469
+ o || (o = !0, Reflect.apply(this.reject, this, [...l]));
499
470
  },
500
- insert: (u) => {
501
- o || (this[H].splice(s, 0, u), s++);
471
+ insert: (l) => {
472
+ o || (this[H].splice(i, 0, l), i++);
502
473
  },
503
474
  session: this[ie]
504
475
  };
505
476
  Ke(() => {
506
- Reflect.apply(i, {}, [l, ...this[Q]]);
477
+ Reflect.apply(s, {}, [a, ...this[X]]);
507
478
  });
508
479
  } catch (o) {
509
480
  this.throw(o);
510
481
  }
511
482
  return this;
512
483
  }
513
- go(t, ...e) {
514
- return Reflect.apply(this[X], this, [t, ...e]);
484
+ go(e, ...t) {
485
+ return Reflect.apply(this[Y], this, [e, ...t]);
515
486
  }
516
- finish(...t) {
517
- return this[E] = "Finished", this[Q] = t, Reflect.apply(this[X], this, [0]);
487
+ finish(...e) {
488
+ return this[E] = "Finished", this[X] = e, Reflect.apply(this[Y], this, [0]);
518
489
  }
519
- reject(...t) {
520
- return this[E] = "Reject", this[je] = t, Reflect.apply(this[X], this, [0]);
490
+ reject(...e) {
491
+ return this[E] = "Reject", this[Oe] = e, Reflect.apply(this[Y], this, [0]);
521
492
  }
522
- throw(...t) {
523
- return this[E] = "Exception", this[je] = t, Reflect.apply(this[X], this, [0]);
493
+ throw(...e) {
494
+ return this[E] = "Exception", this[Oe] = e, Reflect.apply(this[Y], this, [0]);
524
495
  }
525
- reset(...t) {
526
- this[E] = "Busy", this[Q] = t, this[H] = [], this[O] = 0;
496
+ reset(...e) {
497
+ this[E] = "Busy", this[X] = e, this[H] = [], this[N] = 0;
527
498
  let n = [{
528
499
  session: this[ie]
529
- }, ...this[Q]];
530
- for (; this[ce].length > 0; ) {
531
- let i = this[ce].shift();
500
+ }, ...this[X]];
501
+ for (; this[he].length > 0; ) {
502
+ let s = this[he].shift();
532
503
  Ke(() => {
533
- Reflect.apply(i, this, n);
504
+ Reflect.apply(s, this, n);
534
505
  });
535
506
  }
536
507
  return this[E] = "Free", this;
537
508
  }
538
- post(t) {
539
- return this[E] === "Reject" || this[E] === "Exception" ? this : (Array.isArray(t) ? this[H] = [...this[H], ...t] : this[H].push(t), this[E] === "Busy" ? this : (Reflect.apply(this[X], this, [0, ...this[Q]]), this));
509
+ post(e) {
510
+ return this[E] === "Reject" || this[E] === "Exception" ? this : (Array.isArray(e) ? this[H] = [...this[H], ...e] : this[H].push(e), this[E] === "Busy" ? this : (Reflect.apply(this[Y], this, [0, ...this[X]]), this));
540
511
  }
541
- wait(t, e) {
542
- return t && typeof t == "function" && this[ce].push(t), e && typeof e == "function" && this[xe].push(e), this[E] === "Busy" ? this : (Reflect.apply(this[X], this, [0, ...this[Q]]), this);
512
+ wait(e, t) {
513
+ return e && typeof e == "function" && this[he].push(e), t && typeof t == "function" && this[Se].push(t), this[E] === "Busy" ? this : (Reflect.apply(this[Y], this, [0, ...this[X]]), this);
543
514
  }
544
- exception(t) {
545
- return t && typeof t == "function" && this[xe].push(t), this[E] === "Busy" ? this : Reflect.apply(this[X], this, [0, ...this[Q]]);
515
+ exception(e) {
516
+ return e && typeof e == "function" && this[Se].push(e), this[E] === "Busy" ? this : Reflect.apply(this[Y], this, [0, ...this[X]]);
546
517
  }
547
518
  isFinish() {
548
- return this[E] == "Reject" || this[E] == "Free" && this[O] >= this[H].length;
519
+ return this[E] == "Reject" || this[E] == "Free" && this[N] >= this[H].length;
549
520
  }
550
521
  }
551
- const he = Symbol("registerKey");
522
+ const de = Symbol("registerKey");
552
523
  class tn {
553
524
  policy;
554
525
  callback;
555
- constructor(t, e) {
556
- this.callback = t, this.policy = e;
526
+ constructor(e, t) {
527
+ this.callback = e, this.policy = t;
557
528
  }
558
529
  }
559
- class zt {
560
- [he] = /* @__PURE__ */ new Map();
530
+ class Qt {
531
+ [de] = /* @__PURE__ */ new Map();
561
532
  constructor() {
562
533
  }
563
- on(t, e, n = !1) {
564
- let i = this[he].get(t);
565
- i || (i = new Array(), this[he].set(t, i));
566
- let s = n === !0 ? 1 : 0, o = new tn(e, s);
567
- return i.push(o), this;
534
+ on(e, t, n = !1) {
535
+ let s = this[de].get(e);
536
+ s || (s = new Array(), this[de].set(e, s));
537
+ let i = n === !0 ? 1 : 0, o = new tn(t, i);
538
+ return s.push(o), this;
568
539
  }
569
- off(t, e) {
570
- if (!e)
571
- return this[he].delete(t), this;
572
- let n = this[he].get(t);
540
+ off(e, t) {
541
+ if (!t)
542
+ return this[de].delete(e), this;
543
+ let n = this[de].get(e);
573
544
  if (n) {
574
- for (let i = 0; i < n.length; i++)
575
- if (n[i].callback === e) {
576
- n.splice(i, 1);
545
+ for (let s = 0; s < n.length; s++)
546
+ if (n[s].callback === t) {
547
+ n.splice(s, 1);
577
548
  break;
578
549
  }
579
550
  }
580
551
  return this;
581
552
  }
582
- bind(t, e, n = !1) {
583
- return this.on(t, e, n);
553
+ bind(e, t, n = !1) {
554
+ return this.on(e, t, n);
584
555
  }
585
- unbind(t, e) {
586
- return this.off(t, e);
556
+ unbind(e, t) {
557
+ return this.off(e, t);
587
558
  }
588
- once(t, e) {
589
- return this.on(t, e, !0);
559
+ once(e, t) {
560
+ return this.on(e, t, !0);
590
561
  }
591
- all(...t) {
592
- let e = t.length;
593
- if (e < 1)
562
+ all(...e) {
563
+ let t = e.length;
564
+ if (t < 1)
594
565
  return this;
595
- let n = t[e - 1];
566
+ let n = e[t - 1];
596
567
  if (typeof n != "function")
597
568
  return console.error("callback can not benn empty"), this;
598
- let i = e - 1, s = new Array(i), o = [].splice.call(t, 0, i);
599
- for (let l = 0; l < o.length; l++)
600
- this.once(o[l], (u) => {
601
- s[l] = u, i -= 1, i == 0 && Reflect.apply(n, {}, s);
569
+ let s = t - 1, i = new Array(s), o = [].splice.call(e, 0, s);
570
+ for (let a = 0; a < o.length; a++)
571
+ this.once(o[a], (l) => {
572
+ i[a] = l, s -= 1, s == 0 && Reflect.apply(n, {}, i);
602
573
  });
603
574
  return this;
604
575
  }
605
- emit(t, ...e) {
606
- let n = this[he].get(t);
576
+ emit(e, ...t) {
577
+ let n = this[de].get(e);
607
578
  if (!n)
608
579
  return this;
609
- for (let i = 0; i < n.length; ) {
610
- let s = n[i];
611
- if (s.policy == 1 ? n.splice(i, 1) : i++, typeof s.callback == "function")
580
+ for (let s = 0; s < n.length; ) {
581
+ let i = n[s];
582
+ if (i.policy == 1 ? n.splice(s, 1) : s++, typeof i.callback == "function")
612
583
  try {
613
584
  Ke(() => {
614
- Reflect.apply(s.callback, {}, e);
585
+ Reflect.apply(i.callback, {}, t);
615
586
  });
616
587
  } catch (o) {
617
588
  console.error(o.message, o);
@@ -619,130 +590,130 @@ class zt {
619
590
  }
620
591
  return this;
621
592
  }
622
- trigger(t, ...e) {
623
- return Reflect.apply(this.emit, this, [t, ...e]);
593
+ trigger(e, ...t) {
594
+ return Reflect.apply(this.emit, this, [e, ...t]);
624
595
  }
625
596
  }
626
- const Se = Symbol("registerKey");
597
+ const Pe = Symbol("registerKey");
627
598
  class rn {
628
- [Se] = /* @__PURE__ */ new Map();
599
+ [Pe] = /* @__PURE__ */ new Map();
629
600
  constructor() {
630
601
  }
631
- set(t, e) {
632
- this[Se].set(t, e);
602
+ set(e, t) {
603
+ this[Pe].set(e, t);
633
604
  }
634
- get(t) {
635
- return this[Se].get(t);
605
+ get(e) {
606
+ return this[Pe].get(e);
636
607
  }
637
- has(t) {
638
- return this[Se].has(t);
608
+ has(e) {
609
+ return this[Pe].has(e);
639
610
  }
640
- delete(t) {
641
- return this[Se].delete(t);
611
+ delete(e) {
612
+ return this[Pe].delete(e);
642
613
  }
643
614
  }
644
- const Ct = Symbol("lc");
645
- function Ue(r, t = !1) {
646
- let e = r, n = e[Ct];
615
+ const Et = Symbol("lc");
616
+ function ze(r, e = !1) {
617
+ let t = r, n = t[Et];
647
618
  if (!n)
648
- if (t)
649
- n = new rn(), e[Ct] = n;
619
+ if (e)
620
+ n = new rn(), t[Et] = n;
650
621
  else
651
622
  return null;
652
623
  return n;
653
624
  }
654
- function gr(r, t) {
655
- let e = r;
656
- for (; e !== null; ) {
657
- const n = e[Ct];
658
- if (n && n.has(t))
659
- return n.get(t);
660
- e = e.$parent;
625
+ function br(r, e) {
626
+ let t = r;
627
+ for (; t !== null; ) {
628
+ const n = t[Et];
629
+ if (n && n.has(e))
630
+ return n.get(e);
631
+ t = t.$parent;
661
632
  }
662
633
  return null;
663
634
  }
664
- function Gt(r) {
635
+ function Xt(r) {
665
636
  if (Array.isArray(r.children) && r.children.length > 0) {
666
- let t = r.children[0];
667
- if (t != null && t.component != null && t.component.proxy != null)
668
- return Ue(t.component.proxy, !1);
637
+ let e = r.children[0];
638
+ if (e != null && e.component != null && e.component.proxy != null)
639
+ return ze(e.component.proxy, !1);
669
640
  }
670
641
  return null;
671
642
  }
672
- const Xe = Symbol("hooksKey");
643
+ const et = Symbol("hooksKey");
673
644
  function nn(r) {
674
- let t = r.get(Xe);
675
- t || (t = [], r.set(Xe, t));
676
- }
677
- function Jt(r, t) {
678
- let e = r.get(Xe);
679
- if (e != null)
680
- for (let n = e.length - 1; n >= 0; n--) {
681
- let i = e[n];
682
- if (i.type === t)
645
+ let e = r.get(et);
646
+ e || (e = [], r.set(et, e));
647
+ }
648
+ function Yt(r, e) {
649
+ let t = r.get(et);
650
+ if (t != null)
651
+ for (let n = t.length - 1; n >= 0; n--) {
652
+ let s = t[n];
653
+ if (s.type === e)
683
654
  try {
684
- Reflect.apply(i.hook, i.target, []);
685
- } catch (s) {
686
- console.error(s.message, s);
655
+ Reflect.apply(s.hook, s.target, []);
656
+ } catch (i) {
657
+ console.error(i.message, i);
687
658
  }
688
659
  }
689
660
  }
690
- var Et = /* @__PURE__ */ ((r) => (r.DEACTIVATED = "da", r.ACTIVATED = "a", r))(Et || {});
661
+ var Ft = /* @__PURE__ */ ((r) => (r.DEACTIVATED = "da", r.ACTIVATED = "a", r))(Ft || {});
691
662
  class sn {
692
663
  type;
693
664
  hook;
694
665
  target;
695
- constructor(t, e, n) {
696
- this.target = n, this.hook = e, this.type = t;
666
+ constructor(e, t, n) {
667
+ this.target = n, this.hook = t, this.type = e;
697
668
  }
698
669
  }
699
- function on(r, t, e, n) {
700
- let i = new sn(t, e, n);
701
- return r.push(i), !0;
670
+ function on(r, e, t, n) {
671
+ let s = new sn(e, t, n);
672
+ return r.push(s), !0;
702
673
  }
703
- function ln(r, t, e, n) {
704
- let i = -1;
705
- for (let s = 0; s < r.length; s++) {
706
- let o = r[s];
707
- if (o.type === t && o.hook === e && o.target === n) {
708
- i = s;
674
+ function ln(r, e, t, n) {
675
+ let s = -1;
676
+ for (let i = 0; i < r.length; i++) {
677
+ let o = r[i];
678
+ if (o.type === e && o.hook === t && o.target === n) {
679
+ s = i;
709
680
  break;
710
681
  }
711
682
  }
712
- return i != -1 ? (r.splice(i, 1), !0) : !1;
683
+ return s != -1 ? (r.splice(s, 1), !0) : !1;
713
684
  }
714
- function pr(r) {
715
- return (t, e) => {
685
+ function xr(r) {
686
+ return (e, t) => {
716
687
  let n;
717
- if (e)
718
- n = e;
688
+ if (t)
689
+ n = t;
719
690
  else {
720
- let s = $t();
721
- if (s == null || s.proxy == null) {
691
+ let i = qt();
692
+ if (i == null || i.proxy == null) {
722
693
  console.error("can not get current instance or proxy");
723
694
  return;
724
695
  }
725
- n = s.proxy;
696
+ n = i.proxy;
726
697
  }
727
- let i = gr(n, Xe);
728
- if (i == null) {
698
+ let s = br(n, et);
699
+ if (s == null) {
729
700
  console.warn("can not get hooks context");
730
701
  return;
731
702
  }
732
- Ye(() => {
733
- ln(i, r, t, n);
734
- }), on(i, r, t, n);
703
+ tt(() => {
704
+ ln(s, r, e, n);
705
+ }), on(s, r, e, n);
735
706
  };
736
707
  }
737
- let oi = pr("a"), li = pr("da");
738
- function un() {
739
- let r = new $();
740
- return r.path = "", r.name = "", r.params = {}, r.index = -1, Mr(r);
708
+ let as = xr("a"), us = xr("da");
709
+ function an() {
710
+ let r = new j();
711
+ return r.path = "", r.name = "", r.params = {}, r.index = -1, Ir(r);
741
712
  }
742
- const Ft = Symbol("routeKey");
743
- function ot(r, t) {
744
- let e = r.get(Ft);
745
- if (e) {
713
+ const Tt = Symbol("routeKey");
714
+ function ut(r, e) {
715
+ let t = r.get(Tt);
716
+ if (t) {
746
717
  let n = {
747
718
  path: "",
748
719
  name: "",
@@ -750,200 +721,200 @@ function ot(r, t) {
750
721
  index: -1,
751
722
  session: {}
752
723
  };
753
- Object.assign(n, t), Object.assign(e, n);
724
+ Object.assign(n, e), Object.assign(t, n);
754
725
  } else
755
- e = un(), Object.assign(e, t), r.set(Ft, e);
726
+ t = an(), Object.assign(t, e), r.set(Tt, t);
756
727
  }
757
- function wr(r) {
758
- let t = gr(r, Ft);
759
- return t ?? null;
728
+ function Rr(r) {
729
+ let e = br(r, Tt);
730
+ return e ?? null;
760
731
  }
761
- const Ze = Symbol("rk"), lt = Symbol("vd"), Qt = Symbol("rv"), ut = Symbol("rvi"), Xt = Symbol("pv"), at = Symbol("pvi");
762
- function an(r) {
763
- for (var t = [], e = 0; e < r.length; ) {
764
- var n = r[e];
732
+ const rt = Symbol("rk"), ft = Symbol("vd"), Zt = Symbol("rv"), ct = Symbol("rvi"), er = Symbol("pv"), ht = Symbol("pvi");
733
+ function un(r) {
734
+ for (var e = [], t = 0; t < r.length; ) {
735
+ var n = r[t];
765
736
  if (n === "*" || n === "+" || n === "?") {
766
- t.push({ type: "MODIFIER", index: e, value: r[e++] });
737
+ e.push({ type: "MODIFIER", index: t, value: r[t++] });
767
738
  continue;
768
739
  }
769
740
  if (n === "\\") {
770
- t.push({ type: "ESCAPED_CHAR", index: e++, value: r[e++] });
741
+ e.push({ type: "ESCAPED_CHAR", index: t++, value: r[t++] });
771
742
  continue;
772
743
  }
773
744
  if (n === "{") {
774
- t.push({ type: "OPEN", index: e, value: r[e++] });
745
+ e.push({ type: "OPEN", index: t, value: r[t++] });
775
746
  continue;
776
747
  }
777
748
  if (n === "}") {
778
- t.push({ type: "CLOSE", index: e, value: r[e++] });
749
+ e.push({ type: "CLOSE", index: t, value: r[t++] });
779
750
  continue;
780
751
  }
781
752
  if (n === ":") {
782
- for (var i = "", s = e + 1; s < r.length; ) {
783
- var o = r.charCodeAt(s);
753
+ for (var s = "", i = t + 1; i < r.length; ) {
754
+ var o = r.charCodeAt(i);
784
755
  if (o >= 48 && o <= 57 || o >= 65 && o <= 90 || o >= 97 && o <= 122 || o === 95) {
785
- i += r[s++];
756
+ s += r[i++];
786
757
  continue;
787
758
  }
788
759
  break;
789
760
  }
790
- if (!i)
791
- throw new TypeError("Missing parameter name at ".concat(e));
792
- t.push({ type: "NAME", index: e, value: i }), e = s;
761
+ if (!s)
762
+ throw new TypeError("Missing parameter name at ".concat(t));
763
+ e.push({ type: "NAME", index: t, value: s }), t = i;
793
764
  continue;
794
765
  }
795
766
  if (n === "(") {
796
- var l = 1, u = "", s = e + 1;
797
- if (r[s] === "?")
798
- throw new TypeError('Pattern cannot start with "?" at '.concat(s));
799
- for (; s < r.length; ) {
800
- if (r[s] === "\\") {
801
- u += r[s++] + r[s++];
767
+ var a = 1, l = "", i = t + 1;
768
+ if (r[i] === "?")
769
+ throw new TypeError('Pattern cannot start with "?" at '.concat(i));
770
+ for (; i < r.length; ) {
771
+ if (r[i] === "\\") {
772
+ l += r[i++] + r[i++];
802
773
  continue;
803
774
  }
804
- if (r[s] === ")") {
805
- if (l--, l === 0) {
806
- s++;
775
+ if (r[i] === ")") {
776
+ if (a--, a === 0) {
777
+ i++;
807
778
  break;
808
779
  }
809
- } else if (r[s] === "(" && (l++, r[s + 1] !== "?"))
810
- throw new TypeError("Capturing groups are not allowed at ".concat(s));
811
- u += r[s++];
780
+ } else if (r[i] === "(" && (a++, r[i + 1] !== "?"))
781
+ throw new TypeError("Capturing groups are not allowed at ".concat(i));
782
+ l += r[i++];
812
783
  }
813
- if (l)
814
- throw new TypeError("Unbalanced pattern at ".concat(e));
815
- if (!u)
816
- throw new TypeError("Missing pattern at ".concat(e));
817
- t.push({ type: "PATTERN", index: e, value: u }), e = s;
784
+ if (a)
785
+ throw new TypeError("Unbalanced pattern at ".concat(t));
786
+ if (!l)
787
+ throw new TypeError("Missing pattern at ".concat(t));
788
+ e.push({ type: "PATTERN", index: t, value: l }), t = i;
818
789
  continue;
819
790
  }
820
- t.push({ type: "CHAR", index: e, value: r[e++] });
791
+ e.push({ type: "CHAR", index: t, value: r[t++] });
821
792
  }
822
- return t.push({ type: "END", index: e, value: "" }), t;
793
+ return e.push({ type: "END", index: t, value: "" }), e;
823
794
  }
824
- function br(r, t) {
825
- t === void 0 && (t = {});
826
- for (var e = an(r), n = t.prefixes, i = n === void 0 ? "./" : n, s = "[^".concat(ge(t.delimiter || "/#?"), "]+?"), o = [], l = 0, u = 0, a = "", f = function(R) {
827
- if (u < e.length && e[u].type === R)
828
- return e[u++].value;
829
- }, h = function(R) {
830
- var q = f(R);
831
- if (q !== void 0)
832
- return q;
833
- var T = e[u], _ = T.type, M = T.index;
834
- throw new TypeError("Unexpected ".concat(_, " at ").concat(M, ", expected ").concat(R));
835
- }, c = function() {
836
- for (var R = "", q; q = f("CHAR") || f("ESCAPED_CHAR"); )
837
- R += q;
838
- return R;
839
- }; u < e.length; ) {
840
- var y = f("CHAR"), d = f("NAME"), g = f("PATTERN");
841
- if (d || g) {
842
- var v = y || "";
843
- i.indexOf(v) === -1 && (a += v, v = ""), a && (o.push(a), a = ""), o.push({
844
- name: d || l++,
845
- prefix: v,
795
+ function Sr(r, e) {
796
+ e === void 0 && (e = {});
797
+ for (var t = un(r), n = e.prefixes, s = n === void 0 ? "./" : n, i = "[^".concat(ge(e.delimiter || "/#?"), "]+?"), o = [], a = 0, l = 0, u = "", f = function(x) {
798
+ if (l < t.length && t[l].type === x)
799
+ return t[l++].value;
800
+ }, c = function(x) {
801
+ var K = f(x);
802
+ if (K !== void 0)
803
+ return K;
804
+ var T = t[l], _ = T.type, O = T.index;
805
+ throw new TypeError("Unexpected ".concat(_, " at ").concat(O, ", expected ").concat(x));
806
+ }, h = function() {
807
+ for (var x = "", K; K = f("CHAR") || f("ESCAPED_CHAR"); )
808
+ x += K;
809
+ return x;
810
+ }; l < t.length; ) {
811
+ var d = f("CHAR"), y = f("NAME"), v = f("PATTERN");
812
+ if (y || v) {
813
+ var p = d || "";
814
+ s.indexOf(p) === -1 && (u += p, p = ""), u && (o.push(u), u = ""), o.push({
815
+ name: y || a++,
816
+ prefix: p,
846
817
  suffix: "",
847
- pattern: g || s,
818
+ pattern: v || i,
848
819
  modifier: f("MODIFIER") || ""
849
820
  });
850
821
  continue;
851
822
  }
852
- var m = y || f("ESCAPED_CHAR");
823
+ var m = d || f("ESCAPED_CHAR");
853
824
  if (m) {
854
- a += m;
825
+ u += m;
855
826
  continue;
856
827
  }
857
- a && (o.push(a), a = "");
828
+ u && (o.push(u), u = "");
858
829
  var w = f("OPEN");
859
830
  if (w) {
860
- var v = c(), F = f("NAME") || "", b = f("PATTERN") || "", P = c();
861
- h("CLOSE"), o.push({
862
- name: F || (b ? l++ : ""),
863
- pattern: F && !b ? s : b,
864
- prefix: v,
831
+ var p = h(), F = f("NAME") || "", b = f("PATTERN") || "", P = h();
832
+ c("CLOSE"), o.push({
833
+ name: F || (b ? a++ : ""),
834
+ pattern: F && !b ? i : b,
835
+ prefix: p,
865
836
  suffix: P,
866
837
  modifier: f("MODIFIER") || ""
867
838
  });
868
839
  continue;
869
840
  }
870
- h("END");
841
+ c("END");
871
842
  }
872
843
  return o;
873
844
  }
874
- function fn(r, t) {
875
- return cn(br(r, t), t);
845
+ function fn(r, e) {
846
+ return cn(Sr(r, e), e);
876
847
  }
877
- function cn(r, t) {
878
- t === void 0 && (t = {});
879
- var e = Nt(t), n = t.encode, i = n === void 0 ? function(u) {
880
- return u;
881
- } : n, s = t.validate, o = s === void 0 ? !0 : s, l = r.map(function(u) {
882
- if (typeof u == "object")
883
- return new RegExp("^(?:".concat(u.pattern, ")$"), e);
848
+ function cn(r, e) {
849
+ e === void 0 && (e = {});
850
+ var t = Nt(e), n = e.encode, s = n === void 0 ? function(l) {
851
+ return l;
852
+ } : n, i = e.validate, o = i === void 0 ? !0 : i, a = r.map(function(l) {
853
+ if (typeof l == "object")
854
+ return new RegExp("^(?:".concat(l.pattern, ")$"), t);
884
855
  });
885
- return function(u) {
886
- for (var a = "", f = 0; f < r.length; f++) {
887
- var h = r[f];
888
- if (typeof h == "string") {
889
- a += h;
856
+ return function(l) {
857
+ for (var u = "", f = 0; f < r.length; f++) {
858
+ var c = r[f];
859
+ if (typeof c == "string") {
860
+ u += c;
890
861
  continue;
891
862
  }
892
- var c = u ? u[h.name] : void 0, y = h.modifier === "?" || h.modifier === "*", d = h.modifier === "*" || h.modifier === "+";
893
- if (Array.isArray(c)) {
894
- if (!d)
895
- throw new TypeError('Expected "'.concat(h.name, '" to not repeat, but got an array'));
896
- if (c.length === 0) {
897
- if (y)
863
+ var h = l ? l[c.name] : void 0, d = c.modifier === "?" || c.modifier === "*", y = c.modifier === "*" || c.modifier === "+";
864
+ if (Array.isArray(h)) {
865
+ if (!y)
866
+ throw new TypeError('Expected "'.concat(c.name, '" to not repeat, but got an array'));
867
+ if (h.length === 0) {
868
+ if (d)
898
869
  continue;
899
- throw new TypeError('Expected "'.concat(h.name, '" to not be empty'));
870
+ throw new TypeError('Expected "'.concat(c.name, '" to not be empty'));
900
871
  }
901
- for (var g = 0; g < c.length; g++) {
902
- var v = i(c[g], h);
903
- if (o && !l[f].test(v))
904
- throw new TypeError('Expected all "'.concat(h.name, '" to match "').concat(h.pattern, '", but got "').concat(v, '"'));
905
- a += h.prefix + v + h.suffix;
872
+ for (var v = 0; v < h.length; v++) {
873
+ var p = s(h[v], c);
874
+ if (o && !a[f].test(p))
875
+ throw new TypeError('Expected all "'.concat(c.name, '" to match "').concat(c.pattern, '", but got "').concat(p, '"'));
876
+ u += c.prefix + p + c.suffix;
906
877
  }
907
878
  continue;
908
879
  }
909
- if (typeof c == "string" || typeof c == "number") {
910
- var v = i(String(c), h);
911
- if (o && !l[f].test(v))
912
- throw new TypeError('Expected "'.concat(h.name, '" to match "').concat(h.pattern, '", but got "').concat(v, '"'));
913
- a += h.prefix + v + h.suffix;
880
+ if (typeof h == "string" || typeof h == "number") {
881
+ var p = s(String(h), c);
882
+ if (o && !a[f].test(p))
883
+ throw new TypeError('Expected "'.concat(c.name, '" to match "').concat(c.pattern, '", but got "').concat(p, '"'));
884
+ u += c.prefix + p + c.suffix;
914
885
  continue;
915
886
  }
916
- if (!y) {
917
- var m = d ? "an array" : "a string";
918
- throw new TypeError('Expected "'.concat(h.name, '" to be ').concat(m));
887
+ if (!d) {
888
+ var m = y ? "an array" : "a string";
889
+ throw new TypeError('Expected "'.concat(c.name, '" to be ').concat(m));
919
890
  }
920
891
  }
921
- return a;
892
+ return u;
922
893
  };
923
894
  }
924
- function hn(r, t) {
925
- var e = [], n = Rr(r, e, t);
926
- return yn(n, e, t);
895
+ function hn(r, e) {
896
+ var t = [], n = Pr(r, t, e);
897
+ return dn(n, t, e);
927
898
  }
928
- function yn(r, t, e) {
929
- e === void 0 && (e = {});
930
- var n = e.decode, i = n === void 0 ? function(s) {
931
- return s;
899
+ function dn(r, e, t) {
900
+ t === void 0 && (t = {});
901
+ var n = t.decode, s = n === void 0 ? function(i) {
902
+ return i;
932
903
  } : n;
933
- return function(s) {
934
- var o = r.exec(s);
904
+ return function(i) {
905
+ var o = r.exec(i);
935
906
  if (!o)
936
907
  return !1;
937
- for (var l = o[0], u = o.index, a = /* @__PURE__ */ Object.create(null), f = function(c) {
938
- if (o[c] === void 0)
908
+ for (var a = o[0], l = o.index, u = /* @__PURE__ */ Object.create(null), f = function(h) {
909
+ if (o[h] === void 0)
939
910
  return "continue";
940
- var y = t[c - 1];
941
- y.modifier === "*" || y.modifier === "+" ? a[y.name] = o[c].split(y.prefix + y.suffix).map(function(d) {
942
- return i(d, y);
943
- }) : a[y.name] = i(o[c], y);
944
- }, h = 1; h < o.length; h++)
945
- f(h);
946
- return { path: l, index: u, params: a };
911
+ var d = e[h - 1];
912
+ d.modifier === "*" || d.modifier === "+" ? u[d.name] = o[h].split(d.prefix + d.suffix).map(function(y) {
913
+ return s(y, d);
914
+ }) : u[d.name] = s(o[h], d);
915
+ }, c = 1; c < o.length; c++)
916
+ f(c);
917
+ return { path: a, index: l, params: u };
947
918
  };
948
919
  }
949
920
  function ge(r) {
@@ -952,127 +923,127 @@ function ge(r) {
952
923
  function Nt(r) {
953
924
  return r && r.sensitive ? "" : "i";
954
925
  }
955
- function dn(r, t) {
956
- if (!t)
926
+ function yn(r, e) {
927
+ if (!e)
957
928
  return r;
958
- for (var e = /\((?:\?<(.*?)>)?(?!\?)/g, n = 0, i = e.exec(r.source); i; )
959
- t.push({
960
- name: i[1] || n++,
929
+ for (var t = /\((?:\?<(.*?)>)?(?!\?)/g, n = 0, s = t.exec(r.source); s; )
930
+ e.push({
931
+ name: s[1] || n++,
961
932
  prefix: "",
962
933
  suffix: "",
963
934
  modifier: "",
964
935
  pattern: ""
965
- }), i = e.exec(r.source);
936
+ }), s = t.exec(r.source);
966
937
  return r;
967
938
  }
968
- function vn(r, t, e) {
969
- var n = r.map(function(i) {
970
- return Rr(i, t, e).source;
939
+ function pn(r, e, t) {
940
+ var n = r.map(function(s) {
941
+ return Pr(s, e, t).source;
971
942
  });
972
- return new RegExp("(?:".concat(n.join("|"), ")"), Nt(e));
943
+ return new RegExp("(?:".concat(n.join("|"), ")"), Nt(t));
973
944
  }
974
- function mn(r, t, e) {
975
- return gn(br(r, e), t, e);
945
+ function mn(r, e, t) {
946
+ return vn(Sr(r, t), e, t);
976
947
  }
977
- function gn(r, t, e) {
978
- e === void 0 && (e = {});
979
- for (var n = e.strict, i = n === void 0 ? !1 : n, s = e.start, o = s === void 0 ? !0 : s, l = e.end, u = l === void 0 ? !0 : l, a = e.encode, f = a === void 0 ? function(M) {
980
- return M;
981
- } : a, h = e.delimiter, c = h === void 0 ? "/#?" : h, y = e.endsWith, d = y === void 0 ? "" : y, g = "[".concat(ge(d), "]|$"), v = "[".concat(ge(c), "]"), m = o ? "^" : "", w = 0, F = r; w < F.length; w++) {
948
+ function vn(r, e, t) {
949
+ t === void 0 && (t = {});
950
+ for (var n = t.strict, s = n === void 0 ? !1 : n, i = t.start, o = i === void 0 ? !0 : i, a = t.end, l = a === void 0 ? !0 : a, u = t.encode, f = u === void 0 ? function(O) {
951
+ return O;
952
+ } : u, c = t.delimiter, h = c === void 0 ? "/#?" : c, d = t.endsWith, y = d === void 0 ? "" : d, v = "[".concat(ge(y), "]|$"), p = "[".concat(ge(h), "]"), m = o ? "^" : "", w = 0, F = r; w < F.length; w++) {
982
953
  var b = F[w];
983
954
  if (typeof b == "string")
984
955
  m += ge(f(b));
985
956
  else {
986
- var P = ge(f(b.prefix)), R = ge(f(b.suffix));
957
+ var P = ge(f(b.prefix)), x = ge(f(b.suffix));
987
958
  if (b.pattern)
988
- if (t && t.push(b), P || R)
959
+ if (e && e.push(b), P || x)
989
960
  if (b.modifier === "+" || b.modifier === "*") {
990
- var q = b.modifier === "*" ? "?" : "";
991
- m += "(?:".concat(P, "((?:").concat(b.pattern, ")(?:").concat(R).concat(P, "(?:").concat(b.pattern, "))*)").concat(R, ")").concat(q);
961
+ var K = b.modifier === "*" ? "?" : "";
962
+ m += "(?:".concat(P, "((?:").concat(b.pattern, ")(?:").concat(x).concat(P, "(?:").concat(b.pattern, "))*)").concat(x, ")").concat(K);
992
963
  } else
993
- m += "(?:".concat(P, "(").concat(b.pattern, ")").concat(R, ")").concat(b.modifier);
964
+ m += "(?:".concat(P, "(").concat(b.pattern, ")").concat(x, ")").concat(b.modifier);
994
965
  else
995
966
  b.modifier === "+" || b.modifier === "*" ? m += "((?:".concat(b.pattern, ")").concat(b.modifier, ")") : m += "(".concat(b.pattern, ")").concat(b.modifier);
996
967
  else
997
- m += "(?:".concat(P).concat(R, ")").concat(b.modifier);
968
+ m += "(?:".concat(P).concat(x, ")").concat(b.modifier);
998
969
  }
999
970
  }
1000
- if (u)
1001
- i || (m += "".concat(v, "?")), m += e.endsWith ? "(?=".concat(g, ")") : "$";
971
+ if (l)
972
+ s || (m += "".concat(p, "?")), m += t.endsWith ? "(?=".concat(v, ")") : "$";
1002
973
  else {
1003
- var T = r[r.length - 1], _ = typeof T == "string" ? v.indexOf(T[T.length - 1]) > -1 : T === void 0;
1004
- i || (m += "(?:".concat(v, "(?=").concat(g, "))?")), _ || (m += "(?=".concat(v, "|").concat(g, ")"));
974
+ var T = r[r.length - 1], _ = typeof T == "string" ? p.indexOf(T[T.length - 1]) > -1 : T === void 0;
975
+ s || (m += "(?:".concat(p, "(?=").concat(v, "))?")), _ || (m += "(?=".concat(p, "|").concat(v, ")"));
1005
976
  }
1006
- return new RegExp(m, Nt(e));
977
+ return new RegExp(m, Nt(t));
1007
978
  }
1008
- function Rr(r, t, e) {
1009
- return r instanceof RegExp ? dn(r, t) : Array.isArray(r) ? vn(r, t, e) : mn(r, t, e);
979
+ function Pr(r, e, t) {
980
+ return r instanceof RegExp ? yn(r, e) : Array.isArray(r) ? pn(r, e, t) : mn(r, e, t);
1010
981
  }
1011
- var C = /* @__PURE__ */ ((r) => (r[r.Push = 0] = "Push", r[r.Replace = 1] = "Replace", r[r.Put = 2] = "Put", r[r.Append = 3] = "Append", r[r.Open = 4] = "Open", r))(C || {}), We = /* @__PURE__ */ ((r) => (r[r.Part = 0] = "Part", r[r.All = 1] = "All", r))(We || {});
1012
- const z = Symbol("rootKey"), W = Symbol("rootNodeKey"), ue = Symbol("parentNodeKey"), ze = Symbol("nameKey");
1013
- class ee {
982
+ var A = /* @__PURE__ */ ((r) => (r[r.Push = 0] = "Push", r[r.Replace = 1] = "Replace", r[r.Put = 2] = "Put", r[r.Append = 3] = "Append", r[r.Open = 4] = "Open", r))(A || {}), Je = /* @__PURE__ */ ((r) => (r[r.Part = 0] = "Part", r[r.All = 1] = "All", r))(Je || {});
983
+ const J = Symbol("rootKey"), z = Symbol("rootNodeKey"), ue = Symbol("parentNodeKey"), Ge = Symbol("nameKey");
984
+ class te {
1014
985
  instance = null;
1015
986
  model;
1016
987
  route;
1017
988
  active = !0;
1018
989
  index = 0;
1019
- constructor(t, e, n = 0, i = !0) {
1020
- this.route = t, this.model = e, this.index = n, this.active = i;
990
+ constructor(e, t, n = 0, s = !0) {
991
+ this.route = e, this.model = t, this.index = n, this.active = s;
1021
992
  }
1022
993
  }
1023
- class Pe {
994
+ class Ce {
1024
995
  scope = null;
1025
- set compensation(t) {
1026
- this.scope !== null && this.scope.stop(), this.scope = Or(), this.scope.run(() => {
1027
- Lr(this.slots, () => {
1028
- let e = !1;
996
+ set compensation(e) {
997
+ this.scope !== null && this.scope.stop(), this.scope = Dr(), this.scope.run(() => {
998
+ Hr(this.slots, () => {
999
+ let t = !1;
1029
1000
  try {
1030
- e = t();
1001
+ t = e();
1031
1002
  } catch (n) {
1032
1003
  console.error(n);
1033
1004
  }
1034
- e && this.scope !== null && (this.scope.stop(), this.scope = null);
1005
+ t && this.scope !== null && (this.scope.stop(), this.scope = null);
1035
1006
  });
1036
1007
  });
1037
1008
  }
1038
1009
  _slots;
1039
1010
  get slots() {
1040
- return this._slots == null && (this._slots = Nr([])), this._slots;
1011
+ return this._slots == null && (this._slots = Vr([])), this._slots;
1041
1012
  }
1042
1013
  get empty() {
1043
1014
  return this._slots == null || this._slots.value.length == 0;
1044
1015
  }
1045
- [ze];
1046
- [z];
1047
- [W] = null;
1016
+ [Ge];
1017
+ [J];
1018
+ [z] = null;
1048
1019
  [ue] = null;
1049
1020
  get name() {
1050
- return this[ze];
1021
+ return this[Ge];
1051
1022
  }
1052
- constructor(t, e, n) {
1053
- this[ze] = t, this[z] = e, n && (this[W] = n);
1023
+ constructor(e, t, n) {
1024
+ this[Ge] = e, this[J] = t, n && (this[z] = n);
1054
1025
  }
1055
1026
  }
1056
- class I {
1027
+ class V {
1057
1028
  view;
1058
1029
  index;
1059
1030
  level;
1060
- constructor(t, e, n) {
1061
- this.view = t, this.index = e, this.level = n;
1031
+ constructor(e, t, n) {
1032
+ this.view = e, this.index = t, this.level = n;
1062
1033
  }
1063
- static include(t, e) {
1064
- for (let n = 0; n < t.length; n++) {
1065
- let i = t[n];
1066
- if (i.view === e.view && (e.index == -1 || i.index === e.index) && i.level === e.level)
1034
+ static include(e, t) {
1035
+ for (let n = 0; n < e.length; n++) {
1036
+ let s = e[n];
1037
+ if (s.view === t.view && (t.index == -1 || s.index === t.index) && s.level === t.level)
1067
1038
  return !0;
1068
1039
  }
1069
1040
  return !1;
1070
1041
  }
1071
1042
  }
1072
- class ft {
1043
+ class dt {
1073
1044
  views = [];
1074
1045
  }
1075
- class pn {
1046
+ class gn {
1076
1047
  layers = [];
1077
1048
  }
1078
1049
  class wn {
@@ -1082,54 +1053,55 @@ class wn {
1082
1053
  class bn {
1083
1054
  forbidTime = 300;
1084
1055
  submitRecorder = new wn();
1085
- isSameRoute(t, e) {
1086
- return t == null || e == null ? !1 : t.name === e.name && t.path === e.path && t.root === e.root;
1056
+ isSameRoute(e, t) {
1057
+ return e == null || t == null ? !1 : e.name === t.name && e.path === t.path && e.root === t.root;
1087
1058
  }
1088
- acquire(t) {
1089
- let e = new Date().getTime();
1090
- if (this.isSameRoute(t, this.submitRecorder.route) && this.submitRecorder.time && e - this.submitRecorder.time <= this.forbidTime) {
1091
- this.submitRecorder.time = e;
1059
+ acquire(e) {
1060
+ let t = new Date().getTime();
1061
+ if (this.isSameRoute(e, this.submitRecorder.route) && this.submitRecorder.time && t - this.submitRecorder.time <= this.forbidTime) {
1062
+ this.submitRecorder.time = t;
1092
1063
  return;
1093
1064
  }
1094
- return this.submitRecorder.route = t, this.submitRecorder.time = e, e;
1065
+ return this.submitRecorder.route = e, this.submitRecorder.time = t, t;
1095
1066
  }
1096
- release(t) {
1097
- this.submitRecorder.time === t && (this.submitRecorder.route = void 0);
1067
+ release(e) {
1068
+ this.submitRecorder.time === e && (this.submitRecorder.route = void 0);
1098
1069
  }
1099
1070
  }
1100
- const pe = Symbol("_notifyChange");
1101
- class Yt {
1071
+ const we = Symbol("_notifyChange");
1072
+ class tr {
1102
1073
  currentRoute;
1103
1074
  routes;
1104
- constructor(t, e) {
1105
- this.currentRoute = t, this.routes = e;
1075
+ constructor(e, t) {
1076
+ this.currentRoute = e, this.routes = t;
1106
1077
  }
1107
1078
  }
1108
- const $e = typeof window < "u", D = function() {
1079
+ const qe = typeof window < "u", M = function() {
1109
1080
  return window;
1081
+ }, Le = function() {
1082
+ return window.document;
1110
1083
  };
1111
- function Rn(r) {
1112
- let t = r, e = t.lastIndexOf("/");
1113
- return e > 0 && e < t.length - 1 ? t = t.substring(0, e + 1) : e === 0 && t.indexOf(".") !== -1 ? t = "/" : e === -1 && (t.indexOf(".") == -1 ? t = `/${t}/` : t = "/"), t.indexOf("/") !== 0 && (t = `/${t}`), t;
1084
+ function xn(r) {
1085
+ let e = r, t = e.lastIndexOf("/");
1086
+ return t > 0 && t < e.length - 1 ? e = e.substring(0, t + 1) : t === 0 && e.indexOf(".") !== -1 ? e = "/" : t === -1 && (e.indexOf(".") == -1 ? e = `/${e}/` : e = "/"), e.indexOf("/") !== 0 && (e = `/${e}`), e;
1114
1087
  }
1115
- function xn() {
1116
- if (!$e)
1088
+ function yt() {
1089
+ if (!qe)
1117
1090
  return "/";
1118
- let r = D().location, t = `${r.protocol}//${r.host}`;
1119
- return t += Rn(r.pathname), t;
1091
+ let r = M().location, e = `${r.protocol}//${r.host}`;
1092
+ return e += xn(r.pathname), e;
1120
1093
  }
1121
- function Tt(r, t, e) {
1122
- r.addEventListener ? r.addEventListener(t, e, !1) : r.attachEvent ? r.attachEvent(`on${t}`, e) : r[`on${t}`] = e;
1094
+ function _t(r, e, t) {
1095
+ r.addEventListener ? r.addEventListener(e, t, !1) : r.attachEvent ? r.attachEvent(`on${e}`, t) : r[`on${e}`] = t;
1123
1096
  }
1124
- function _t(r, t, e) {
1125
- r.removeEventListener ? r.removeEventListener(t, e) : r.detachEvent ? r.detachEvent(`on${t}`, e) : r[`on${t}`] = null;
1097
+ function $t(r, e, t) {
1098
+ r.removeEventListener ? r.removeEventListener(e, t) : r.detachEvent ? r.detachEvent(`on${e}`, t) : r[`on${e}`] = null;
1126
1099
  }
1127
- xn();
1128
- const Me = Symbol("ignoreHistoryChangeOnceKey"), Zt = Symbol("_navigateFirstRoute"), Oe = Symbol("_getRouteMark"), er = Symbol("_getUrlSearch"), ct = Symbol("_generateLocation"), Ae = Symbol("_setRouteMarkRecorder"), tr = "Symbol(_fox_restore_point)";
1129
- function ht(r, ...t) {
1130
- return typeof r == "function" ? Reflect.apply(r, null, [...t]) : r;
1100
+ const Me = Symbol("ignoreHistoryChangeOnceKey"), rr = Symbol("_navigateFirstRoute"), Ne = Symbol("_getRouteMark"), nr = Symbol("_getUrlSearch"), pt = Symbol("_generateLocation"), Ae = Symbol("_setRouteMarkRecorder"), sr = "Symbol(_fox_restore_point)";
1101
+ function mt(r, ...e) {
1102
+ return typeof r == "function" ? Reflect.apply(r, null, [...e]) : r;
1131
1103
  }
1132
- class xr {
1104
+ class Cr {
1133
1105
  base;
1134
1106
  storage;
1135
1107
  mode;
@@ -1140,129 +1112,129 @@ class xr {
1140
1112
  changeHandler;
1141
1113
  historyChange;
1142
1114
  [Me] = !1;
1143
- constructor(t = "hash", e = "", n = "", i = !0, s = !0, o = !1, l) {
1144
- this.mode = t, this.base = e, this.query = n, this.firstNavigate = i, this.historyMonitor = s, this.traceless = o, this.storage = l ?? D().sessionStorage;
1115
+ constructor(e = "hash", t = "", n = "", s = !0, i = !0, o = !1, a) {
1116
+ this.mode = e, this.base = t, this.query = n, this.firstNavigate = s, this.historyMonitor = i, this.traceless = o, this.storage = a ?? M().sessionStorage;
1145
1117
  }
1146
- init(t = !0) {
1147
- const e = D();
1118
+ init(e = !0) {
1119
+ const t = M();
1148
1120
  return typeof this.historyChange != "function" && (this.historyChange = () => {
1149
1121
  if (this[Me]) {
1150
1122
  this[Me] = !1;
1151
1123
  return;
1152
1124
  }
1153
- if (ht(this.historyMonitor)) {
1154
- const n = e.history.state;
1155
- this[pe](n);
1125
+ if (mt(this.historyMonitor)) {
1126
+ const n = t.history.state;
1127
+ this[we](n);
1156
1128
  try {
1157
- let i = [];
1158
- if (typeof n == "string" ? i = JSON.parse(n) : i = n, Array.isArray(i) && i.length > 0) {
1159
- const s = this[Oe]() ?? "/";
1160
- this[Ae](s, i);
1129
+ let s = [];
1130
+ if (typeof n == "string" ? s = JSON.parse(n) : s = n, Array.isArray(s) && s.length > 0) {
1131
+ const i = this[Ne]() ?? "/";
1132
+ this[Ae](i, s);
1161
1133
  }
1162
1134
  } catch {
1163
1135
  }
1164
1136
  }
1165
- }), Tt(e, "popstate", this.historyChange), this.firstNavigate && t && this[Zt](), Promise.resolve();
1137
+ }), _t(t, "popstate", this.historyChange), this.firstNavigate && e && this[rr](), Promise.resolve();
1166
1138
  }
1167
1139
  destroy() {
1168
1140
  if (this.historyChange) {
1169
- const t = D();
1170
- _t(t, "popstate", this.historyChange);
1141
+ const e = M();
1142
+ $t(e, "popstate", this.historyChange);
1171
1143
  }
1172
1144
  }
1173
- [Zt]() {
1174
- const t = this[Oe]() ?? "/", e = this.storage.getItem(tr);
1175
- if (e)
1145
+ [rr]() {
1146
+ const e = this[Ne]() ?? "/", t = this.storage.getItem(sr);
1147
+ if (t)
1176
1148
  try {
1177
- const o = JSON.parse(e);
1178
- if (o.mark === t) {
1179
- this[pe](o.routes);
1149
+ const o = JSON.parse(t);
1150
+ if (o.mark === e) {
1151
+ this[we](o.routes);
1180
1152
  return;
1181
1153
  }
1182
1154
  } catch {
1183
1155
  }
1184
- const n = t.indexOf("!");
1185
- let i;
1186
- n != -1 ? i = t.substring(n + 1) : i = t;
1187
- const s = new $();
1188
- s.path = i, s.query = this[er](), this[pe]([s]);
1156
+ const n = e.indexOf("!");
1157
+ let s;
1158
+ n != -1 ? s = e.substring(n + 1) : s = e;
1159
+ const i = new j();
1160
+ i.path = s, i.query = this[nr](), this[we]([i]);
1189
1161
  }
1190
- [Ae](t, e) {
1162
+ [Ae](e, t) {
1191
1163
  try {
1192
1164
  const n = {
1193
- mark: t,
1194
- routes: e
1195
- }, i = JSON.stringify(n);
1196
- this.storage.setItem(tr, i);
1165
+ mark: e,
1166
+ routes: t
1167
+ }, s = JSON.stringify(n);
1168
+ this.storage.setItem(sr, s);
1197
1169
  } catch (n) {
1198
1170
  console.error(n.message, n);
1199
1171
  }
1200
1172
  }
1201
- setRestorePoint(t) {
1202
- const e = this[Oe]() ?? "/";
1203
- this[Ae](e, t);
1173
+ setRestorePoint(e) {
1174
+ const t = this[Ne]() ?? "/";
1175
+ this[Ae](t, e);
1204
1176
  }
1205
- [pe](t) {
1206
- typeof this.changeHandler == "function" && this.changeHandler(t);
1177
+ [we](e) {
1178
+ typeof this.changeHandler == "function" && this.changeHandler(e);
1207
1179
  }
1208
- [Oe]() {
1209
- const t = D();
1180
+ [Ne]() {
1181
+ const e = M();
1210
1182
  if (this.mode === "path") {
1211
- let e = t.location.pathname;
1212
- return this.base && e.indexOf(this.base) === 0 && (e = e.substring(this.base.length)), e;
1183
+ let t = e.location.pathname;
1184
+ return this.base && t.indexOf(this.base) === 0 && (t = t.substring(this.base.length)), t;
1213
1185
  } else {
1214
- const e = t.location.hash, n = e.indexOf("#");
1186
+ const t = e.location.hash, n = t.indexOf("#");
1215
1187
  if (n != -1)
1216
- return e.substring(n + 1);
1188
+ return t.substring(n + 1);
1217
1189
  }
1218
1190
  return null;
1219
1191
  }
1220
- [er]() {
1221
- return D().location.search;
1192
+ [nr]() {
1193
+ return M().location.search;
1222
1194
  }
1223
- listen(t) {
1224
- this.changeHandler = t;
1195
+ listen(e) {
1196
+ this.changeHandler = e;
1225
1197
  }
1226
- go(t, e = !0) {
1227
- const n = D();
1228
- this[Me] = !e, n.history.go(t);
1198
+ go(e, t = !0) {
1199
+ const n = M();
1200
+ this[Me] = !t, n.history.go(e);
1229
1201
  }
1230
- push(t) {
1231
- let e = this[ct](t.currentRoute);
1232
- ht(this.traceless, t.currentRoute) || D().history.pushState(t.routes, "", e), this[Ae](t.currentRoute.fullPath, t.routes);
1202
+ push(e) {
1203
+ let t = this[pt](e.currentRoute);
1204
+ mt(this.traceless, e.currentRoute) || M().history.pushState(e.routes, "", t), this[Ae](e.currentRoute.fullPath, e.routes);
1233
1205
  }
1234
- replace(t) {
1235
- let e = this[ct](t.currentRoute);
1236
- ht(this.traceless, t.currentRoute) || D().history.replaceState(t.routes, "", e), this[Ae](t.currentRoute.fullPath, t.routes);
1206
+ replace(e) {
1207
+ let t = this[pt](e.currentRoute);
1208
+ mt(this.traceless, e.currentRoute) || M().history.replaceState(e.routes, "", t), this[Ae](e.currentRoute.fullPath, e.routes);
1237
1209
  }
1238
- [ct](t) {
1239
- const e = D();
1210
+ [pt](e) {
1211
+ const t = M();
1240
1212
  let n = "";
1241
- if (t.query) {
1242
- let l = "";
1243
- if (typeof t.query == "object")
1244
- for (let u in t.query) {
1245
- let a = encodeURIComponent(t.query[u]), f = `${encodeURIComponent(u)}=${a}`;
1246
- l.length > 0 && (l += "&"), l += f;
1213
+ if (e.query) {
1214
+ let a = "";
1215
+ if (typeof e.query == "object")
1216
+ for (let l in e.query) {
1217
+ let u = encodeURIComponent(e.query[l]), f = `${encodeURIComponent(l)}=${u}`;
1218
+ a.length > 0 && (a += "&"), a += f;
1247
1219
  }
1248
1220
  else
1249
- l = t.query;
1250
- this.query ? (n = `${this.query}&${l}`, n.charAt(0) !== "?" && (n = `?${n}`)) : n = `?${l}`;
1221
+ a = e.query;
1222
+ this.query ? (n = `${this.query}&${a}`, n.charAt(0) !== "?" && (n = `?${n}`)) : n = `?${a}`;
1251
1223
  }
1252
- const i = e.location;
1253
- let s = t.fullPath;
1254
- s.startsWith(Y) && (s = s.substring(Y.length + 1));
1224
+ const s = t.location;
1225
+ let i = e.fullPath;
1226
+ i.startsWith(Z) && (i = i.substring(Z.length + 1));
1255
1227
  let o;
1256
- return n ? this.mode == "path" ? o = `${this.base}/${s}${n}` : o = `${i.pathname}${n}#${s}` : this.mode == "path" ? o = `${this.base}/${s}` : o = `${i.pathname}#${s}`, `${i.origin}${o}`;
1228
+ return n ? this.mode == "path" ? o = `${this.base}/${i}${n}` : o = `${s.pathname}${n}#${i}` : this.mode == "path" ? o = `${this.base}/${i}` : o = `${s.pathname}#${i}`, `${s.origin}${o}`;
1257
1229
  }
1258
1230
  }
1259
- function ui(r = !0, t = null, e = "", n = !0, i = !1, s) {
1260
- return t !== null && (t = D().location.pathname), t && t.endsWith("/") && (t = t.substring(0, t.length - 1)), new xr("path", t ?? "", e, r, n, i, s);
1231
+ function fs(r = !0, e = null, t = "", n = !0, s = !1, i) {
1232
+ return e !== null && (e = M().location.pathname), e && e.endsWith("/") && (e = e.substring(0, e.length - 1)), new Cr("path", e ?? "", t, r, n, s, i);
1261
1233
  }
1262
- function Sn(r = !0, t = "", e = !0, n = !1, i) {
1263
- return new xr("hash", "", t, r, e, n, i);
1234
+ function Rn(r = !0, e = "", t = !0, n = !1, s) {
1235
+ return new Cr("hash", "", e, r, t, n, s);
1264
1236
  }
1265
- class Pn {
1237
+ class Sn {
1266
1238
  maxSize = 50;
1267
1239
  cursor = -1;
1268
1240
  queue = [];
@@ -1270,1147 +1242,1147 @@ class Pn {
1270
1242
  base;
1271
1243
  historyMonitor = !1;
1272
1244
  traceless = !1;
1273
- constructor(t, e = 50) {
1274
- this.base = t, this.maxSize = e;
1245
+ constructor(e, t = 50) {
1246
+ this.base = e, this.maxSize = t;
1275
1247
  }
1276
- init(t = !0) {
1248
+ init(e = !0) {
1277
1249
  return Promise.resolve();
1278
1250
  }
1279
1251
  destroy() {
1280
1252
  this.queue = [];
1281
1253
  }
1282
- listen(t) {
1283
- this.changeHandler = t;
1254
+ listen(e) {
1255
+ this.changeHandler = e;
1284
1256
  }
1285
- [pe](t) {
1286
- typeof this.changeHandler == "function" && this.changeHandler(t);
1257
+ [we](e) {
1258
+ typeof this.changeHandler == "function" && this.changeHandler(e);
1287
1259
  }
1288
- go(t, e = !0) {
1260
+ go(e, t = !0) {
1289
1261
  if (this.queue.length == 0 || this.cursor <= 0 || this.cursor >= this.queue.length - 1)
1290
1262
  return;
1291
- let n = this.cursor + t;
1292
- if (n < 0 ? n = 0 : n > this.queue.length - 1 && (n = this.queue.length - 1), n != this.cursor && (this.cursor = n, e)) {
1293
- const i = this.queue[n];
1294
- this[pe](i.routes);
1263
+ let n = this.cursor + e;
1264
+ if (n < 0 ? n = 0 : n > this.queue.length - 1 && (n = this.queue.length - 1), n != this.cursor && (this.cursor = n, t)) {
1265
+ const s = this.queue[n];
1266
+ this[we](s.routes);
1295
1267
  }
1296
1268
  }
1297
- push(t) {
1298
- this.queue.length >= this.maxSize && this.queue.splice(0, 1), this.queue.push(t), this.cursor = this.queue.length - 1;
1269
+ push(e) {
1270
+ this.queue.length >= this.maxSize && this.queue.splice(0, 1), this.queue.push(e), this.cursor = this.queue.length - 1;
1299
1271
  }
1300
- replace(t) {
1301
- let e = this.queue.length - this.cursor;
1302
- this.queue.splice(this.cursor, e), this.queue[this.cursor] = t;
1272
+ replace(e) {
1273
+ let t = this.queue.length - this.cursor;
1274
+ this.queue.splice(this.cursor, t), this.queue[this.cursor] = e;
1303
1275
  }
1304
- setRestorePoint(t) {
1276
+ setRestorePoint(e) {
1305
1277
  }
1306
1278
  }
1307
- function An(r = "", t = 50) {
1308
- return new Pn(r, t);
1279
+ function Pn(r = "", e = 50) {
1280
+ return new Sn(r, e);
1309
1281
  }
1310
- const Le = Symbol("_constructRouteModel"), Ne = Symbol("_findRouteModel"), yt = Symbol("_findRootView"), rr = Symbol("_getFirstView"), se = Symbol("_removeView"), nr = Symbol("_buildPage"), ir = Symbol("_resolveComponent"), sr = Symbol("_update"), te = Symbol("_merge"), dt = Symbol("_handleHistoryChange"), He = Symbol("_handleRouteUpdated"), Ie = Symbol("routeUpdatedCallback"), p = Symbol("currentRoutes"), ye = Symbol("current"), or = Symbol("_addRouteRecorder"), de = Symbol("_removeRouteRecorder"), ke = Symbol("_cloneRouteRecorder"), j = Symbol("_handleError"), Ve = Symbol("errorCallback"), k = Symbol("registerKey"), De = Symbol("notFoundKey"), vt = Symbol("notFoundPathKey"), V = Symbol("forestKey"), A = Symbol("historyKey"), Ce = Symbol("beforeFiltersKey"), Ee = Symbol("afterFiltersKey"), Fe = Symbol("destroyFiltersKey"), ve = Symbol("mainDispatcherKey"), mt = Symbol("initKey"), oe = Symbol("readyKey"), gt = Symbol("readyHandlersKey"), Be = Symbol("_markReady"), lr = Symbol("_createNextFn"), pt = Symbol("_start"), wt = Symbol("_before"), bt = Symbol("_after"), ur = Symbol("_destroy"), Rt = Symbol("_load"), Te = Symbol("_unload"), _e = Symbol("routerGuardKey");
1282
+ const Ie = Symbol("_constructRouteModel"), De = Symbol("_findRouteModel"), vt = Symbol("_findRootView"), ir = Symbol("_getFirstView"), oe = Symbol("_removeView"), or = Symbol("_buildPage"), lr = Symbol("_resolveComponent"), ar = Symbol("_update"), re = Symbol("_merge"), gt = Symbol("_handleHistoryChange"), He = Symbol("_handleRouteUpdated"), Ve = Symbol("routeUpdatedCallback"), g = Symbol("currentRoutes"), ye = Symbol("current"), ur = Symbol("_addRouteRecorder"), pe = Symbol("_removeRouteRecorder"), Be = Symbol("_cloneRouteRecorder"), q = Symbol("_handleError"), Ue = Symbol("errorCallback"), B = Symbol("registerKey"), ke = Symbol("notFoundKey"), wt = Symbol("notFoundPathKey"), U = Symbol("forestKey"), C = Symbol("historyKey"), Ee = Symbol("beforeFiltersKey"), Fe = Symbol("afterFiltersKey"), Te = Symbol("destroyFiltersKey"), me = Symbol("mainDispatcherKey"), bt = Symbol("initKey"), le = Symbol("readyKey"), xt = Symbol("readyHandlersKey"), We = Symbol("_markReady"), fr = Symbol("_createNextFn"), Rt = Symbol("_start"), St = Symbol("_before"), Pt = Symbol("_after"), cr = Symbol("_destroy"), Ct = Symbol("_load"), _e = Symbol("_unload"), $e = Symbol("routerGuardKey");
1311
1283
  function Cn(r) {
1312
1284
  return r.layers.length == 0 || r.layers[0].views.length == 0;
1313
1285
  }
1314
- function En(r) {
1315
- let t = [];
1316
- return r.layers.forEach((e) => {
1317
- e.models == null || e.models == null || e.models.forEach((n) => {
1286
+ function An(r) {
1287
+ let e = [];
1288
+ return r.layers.forEach((t) => {
1289
+ t.models == null || t.models == null || t.models.forEach((n) => {
1318
1290
  if (!(n == null || n == null))
1319
1291
  if (typeof n.meta == "object") {
1320
- let i = K(!0, {}, n.meta);
1321
- t.push(i);
1292
+ let s = $(!0, {}, n.meta);
1293
+ e.push(s);
1322
1294
  } else
1323
- n.meta && t.push(n.meta);
1295
+ n.meta && e.push(n.meta);
1324
1296
  });
1325
- }), t;
1326
- }
1327
- class Fn {
1328
- [k] = new Array();
1329
- [De];
1330
- [vt] = "*";
1331
- [oe] = !1;
1332
- [gt] = [];
1333
- [V] = new pn();
1334
- [A];
1335
- [p] = new Array();
1297
+ }), e;
1298
+ }
1299
+ class En {
1300
+ [B] = new Array();
1301
+ [ke];
1302
+ [wt] = "*";
1303
+ [le] = !1;
1304
+ [xt] = [];
1305
+ [U] = new gn();
1306
+ [C];
1307
+ [g] = new Array();
1308
+ [Ue] = null;
1336
1309
  [Ve] = null;
1337
- [Ie] = null;
1338
- [Ce] = new Array();
1339
1310
  [Ee] = new Array();
1340
1311
  [Fe] = new Array();
1341
- [ve] = new At();
1342
- [_e] = new bn();
1343
- [mt] = !1;
1344
- [ye] = ar(null);
1312
+ [Te] = new Array();
1313
+ [me] = new Ze();
1314
+ [$e] = new bn();
1315
+ [bt] = !1;
1316
+ [ye] = dr(null);
1345
1317
  get current() {
1346
1318
  return this[ye].value;
1347
1319
  }
1348
1320
  options;
1349
- constructor(t) {
1350
- this.options = t ?? {}, this.options.notFoundPath && this.setNotFoundPath(this.options.notFoundPath);
1351
- let e = this.options.routes || [];
1352
- this.addRoutes(e), this.options.notFound && this.setNotFoundRoute(this.options.notFound), t.history ? this[A] = t.history : this[A] = $e ? Sn() : An(), this[A]?.listen(async (n) => {
1353
- let i = !0;
1321
+ constructor(e) {
1322
+ this.options = e ?? {}, this.options.notFoundPath && this.setNotFoundPath(this.options.notFoundPath);
1323
+ let t = this.options.routes || [];
1324
+ this.addRoutes(t), this.options.notFound && this.setNotFoundRoute(this.options.notFound), e.history ? this[C] = e.history : this[C] = qe ? Rn() : Pn(), this[C]?.listen(async (n) => {
1325
+ let s = !0;
1354
1326
  try {
1355
1327
  if (typeof n == "string") {
1356
- const s = this[L](n);
1357
- s && await this[dt]([s]);
1328
+ const i = this[I](n);
1329
+ i && await this[gt]([i]);
1358
1330
  } else
1359
- await this[dt](n);
1360
- } catch (s) {
1361
- console.error(s.message, s), i = !1;
1331
+ await this[gt](n);
1332
+ } catch (i) {
1333
+ console.error(i.message, i), s = !1;
1362
1334
  }
1363
- this[oe] === !1 && this[Be](i);
1335
+ this[le] === !1 && this[We](s);
1364
1336
  });
1365
1337
  }
1366
- [j](t = "error", e) {
1367
- if (e && typeof e.error == "function")
1338
+ [q](e = "error", t) {
1339
+ if (t && typeof t.error == "function")
1368
1340
  try {
1369
- e.error(t);
1341
+ t.error(e);
1370
1342
  } catch {
1371
1343
  }
1372
- if (typeof this[Ve] == "function")
1344
+ if (typeof this[Ue] == "function")
1373
1345
  try {
1374
- this[Ve](t, e);
1346
+ this[Ue](e, t);
1375
1347
  } catch {
1376
1348
  }
1377
- console.error(t);
1349
+ console.error(e);
1378
1350
  }
1379
1351
  init() {
1380
- this[mt] !== !0 && (this[A]?.init(!this[oe]), this[mt] = !0);
1352
+ this[bt] !== !0 && (this[C]?.init(!this[le]), this[bt] = !0);
1381
1353
  }
1382
1354
  isReady() {
1383
- return this[oe] ? Promise.resolve() : new Promise((t, e) => {
1384
- this[gt].push([t, e]);
1355
+ return this[le] ? Promise.resolve() : new Promise((e, t) => {
1356
+ this[xt].push([e, t]);
1385
1357
  });
1386
1358
  }
1387
- [Be](t) {
1388
- this[oe] = !0, this[gt].forEach(([e, n]) => {
1359
+ [We](e) {
1360
+ this[le] = !0, this[xt].forEach(([t, n]) => {
1389
1361
  try {
1390
- t ? e() : n();
1391
- } catch (i) {
1392
- console.error(i.message, i);
1362
+ e ? t() : n();
1363
+ } catch (s) {
1364
+ console.error(s.message, s);
1393
1365
  }
1394
1366
  });
1395
1367
  }
1396
- [dt](t) {
1368
+ [gt](e) {
1397
1369
  try {
1398
- if (!t) {
1399
- let o = [...this[p]].reverse();
1400
- return this[Te](o), $e && D().location.reload(), Promise.resolve();
1370
+ if (!e) {
1371
+ let o = [...this[g]].reverse();
1372
+ return this[_e](o), qe && M().location.reload(), Promise.resolve();
1401
1373
  }
1402
- let e = null, n = [], i = [], s = 0;
1403
- for (; s < t.length && s < this[p].length && $.isSame(t[s], this[p][s]); s++)
1404
- t[s].opsType === C.Open && t[s].active === !0 && t[s].active !== this[p][s].active && (e = t[s]);
1405
- if (s < t.length && (n = t.slice(s)), s < this[p].length && (i = this[p].slice(s).reverse()), i.length == 0 && n.length == 0) {
1406
- if (e !== null)
1407
- return this.restore([e]);
1408
- } else if (i.length > 0) {
1409
- if (this[Te](i)) {
1374
+ let t = null, n = [], s = [], i = 0;
1375
+ for (; i < e.length && i < this[g].length && j.isSame(e[i], this[g][i]); i++)
1376
+ e[i].opsType === A.Open && e[i].active === !0 && e[i].active !== this[g][i].active && (t = e[i]);
1377
+ if (i < e.length && (n = e.slice(i)), i < this[g].length && (s = this[g].slice(i).reverse()), s.length == 0 && n.length == 0) {
1378
+ if (t !== null)
1379
+ return this.restore([t]);
1380
+ } else if (s.length > 0) {
1381
+ if (this[_e](s)) {
1410
1382
  if (n.length > 0)
1411
1383
  return this.restore(n);
1412
- if (e !== null)
1413
- return this.restore([e]);
1384
+ if (t !== null)
1385
+ return this.restore([t]);
1414
1386
  }
1415
1387
  } else
1416
1388
  return this.restore(n);
1417
- } catch (e) {
1418
- this[j](e);
1389
+ } catch (t) {
1390
+ this[q](t);
1419
1391
  }
1420
1392
  return Promise.resolve();
1421
1393
  }
1422
- [He](t) {
1423
- if (t)
1424
- this[ye].value = t;
1394
+ [He](e) {
1395
+ if (e)
1396
+ this[ye].value = e;
1425
1397
  else {
1426
- let e = this[p].length;
1427
- e > 0 ? this[ye].value = this[p][e - 1] : this[ye].value = null;
1398
+ let t = this[g].length;
1399
+ t > 0 ? this[ye].value = this[g][t - 1] : this[ye].value = null;
1428
1400
  }
1429
- if (typeof this[Ie] == "function")
1401
+ if (typeof this[Ve] == "function")
1430
1402
  try {
1431
- this[Ie](this[ye].value);
1403
+ this[Ve](this[ye].value);
1432
1404
  } catch {
1433
1405
  }
1434
1406
  }
1435
- [or](t, e = -1) {
1436
- e < 0 || e >= this[p].length ? this[p].push(t) : this[p].splice(e, 0, t);
1407
+ [ur](e, t = -1) {
1408
+ t < 0 || t >= this[g].length ? this[g].push(e) : this[g].splice(t, 0, e);
1437
1409
  }
1438
- [ke]() {
1439
- let t = [];
1440
- for (let e of this[p]) {
1441
- let n = $.clone(e, !0);
1442
- t.push(n);
1410
+ [Be]() {
1411
+ let e = [];
1412
+ for (let t of this[g]) {
1413
+ let n = j.clone(t, !0);
1414
+ e.push(n);
1443
1415
  }
1444
- return t;
1416
+ return e;
1445
1417
  }
1446
- [de](t) {
1447
- if (!this[p])
1418
+ [pe](e) {
1419
+ if (!this[g])
1448
1420
  return;
1449
- let e = -1;
1450
- for (let n = 0; n < this[p].length; n++)
1451
- if ($.isSame(this[p][n], t)) {
1452
- e = n;
1421
+ let t = -1;
1422
+ for (let n = 0; n < this[g].length; n++)
1423
+ if (j.isSame(this[g][n], e)) {
1424
+ t = n;
1453
1425
  break;
1454
1426
  }
1455
- if (e != -1) {
1456
- let n = this[p][e];
1457
- this[p].splice(e, 1), this[ur](n, n.session);
1427
+ if (t != -1) {
1428
+ let n = this[g][t];
1429
+ this[g].splice(t, 1), this[cr](n, n.session);
1458
1430
  }
1459
1431
  }
1460
- set historyMonitor(t) {
1461
- this[A] && (this[A].historyMonitor = t);
1432
+ set historyMonitor(e) {
1433
+ this[C] && (this[C].historyMonitor = e);
1462
1434
  }
1463
1435
  get historyMonitor() {
1464
- return this[A] ? this[A].historyMonitor : !1;
1436
+ return this[C] ? this[C].historyMonitor : !1;
1465
1437
  }
1466
- set traceless(t) {
1467
- this[A] && (this[A].traceless = t);
1438
+ set traceless(e) {
1439
+ this[C] && (this[C].traceless = e);
1468
1440
  }
1469
1441
  get traceless() {
1470
- return this[A] ? this[A].traceless : !1;
1442
+ return this[C] ? this[C].traceless : !1;
1471
1443
  }
1472
1444
  setRestorePoint() {
1473
- const t = this[ke]();
1474
- this[A]?.setRestorePoint(t);
1445
+ const e = this[Be]();
1446
+ this[C]?.setRestorePoint(e);
1475
1447
  }
1476
- onRouteUpdated(t) {
1477
- this[Ie] = t;
1448
+ onRouteUpdated(e) {
1449
+ this[Ve] = e;
1478
1450
  }
1479
- onError(t) {
1480
- this[Ve] = t;
1451
+ onError(e) {
1452
+ this[Ue] = e;
1481
1453
  }
1482
- beforeEach(t) {
1483
- this[Ce].push(t);
1454
+ beforeEach(e) {
1455
+ this[Ee].push(e);
1484
1456
  }
1485
- removeBeforeEach(t) {
1486
- const e = this[Ce].indexOf(t);
1487
- return e !== -1 ? (this[Ce].splice(e, 1), !0) : !1;
1457
+ removeBeforeEach(e) {
1458
+ const t = this[Ee].indexOf(e);
1459
+ return t !== -1 ? (this[Ee].splice(t, 1), !0) : !1;
1488
1460
  }
1489
- afterEach(t) {
1490
- this[Ee].push(t);
1461
+ afterEach(e) {
1462
+ this[Fe].push(e);
1491
1463
  }
1492
- removeAfterEach(t) {
1493
- const e = this[Ee].indexOf(t);
1494
- return e !== -1 ? (this[Ee].splice(e, 1), !0) : !1;
1464
+ removeAfterEach(e) {
1465
+ const t = this[Fe].indexOf(e);
1466
+ return t !== -1 ? (this[Fe].splice(t, 1), !0) : !1;
1495
1467
  }
1496
- destroyEach(t) {
1497
- this[Fe].push(t);
1468
+ destroyEach(e) {
1469
+ this[Te].push(e);
1498
1470
  }
1499
- removeDestroyEach(t) {
1500
- const e = this[Fe].indexOf(t);
1501
- return e !== -1 ? (this[Fe].splice(e, 1), !0) : !1;
1471
+ removeDestroyEach(e) {
1472
+ const t = this[Te].indexOf(e);
1473
+ return t !== -1 ? (this[Te].splice(t, 1), !0) : !1;
1502
1474
  }
1503
- addRoutes(t) {
1504
- for (let e of t)
1505
- this.addRoute(e);
1475
+ addRoutes(e) {
1476
+ for (let t of e)
1477
+ this.addRoute(t);
1506
1478
  }
1507
- addRoute(t, e = -1) {
1508
- if (t.path === this[vt]) {
1509
- this.setNotFoundRoute(t);
1479
+ addRoute(e, t = -1) {
1480
+ if (e.path === this[wt]) {
1481
+ this.setNotFoundRoute(e);
1510
1482
  return;
1511
1483
  }
1512
- const n = this[Le](t);
1513
- if (e == -1)
1514
- this[k] = [...this[k], ...n];
1484
+ const n = this[Ie](e);
1485
+ if (t == -1)
1486
+ this[B] = [...this[B], ...n];
1515
1487
  else
1516
- for (let i = n.length - 1; i >= 0; i--)
1517
- this[k].splice(e, 0, n[i]);
1518
- }
1519
- removeRoute(t) {
1520
- const e = this[L](t);
1521
- if (e === null)
1522
- return console.warn("route格式错误", t), !1;
1523
- for (let n = 0; n < this[k].length; n++) {
1524
- const i = this[k][n];
1525
- if (e?.path && i.path === e.path)
1526
- return this[k].splice(n, 1), !0;
1527
- if (e?.name && i.name === e.name)
1528
- return this[k].splice(n, 1), !0;
1488
+ for (let s = n.length - 1; s >= 0; s--)
1489
+ this[B].splice(t, 0, n[s]);
1490
+ }
1491
+ removeRoute(e) {
1492
+ const t = this[I](e);
1493
+ if (t === null)
1494
+ return console.warn("route格式错误", e), !1;
1495
+ for (let n = 0; n < this[B].length; n++) {
1496
+ const s = this[B][n];
1497
+ if (t?.path && s.path === t.path)
1498
+ return this[B].splice(n, 1), !0;
1499
+ if (t?.name && s.name === t.name)
1500
+ return this[B].splice(n, 1), !0;
1529
1501
  }
1530
1502
  return !1;
1531
1503
  }
1532
- hasRoute(t) {
1533
- const e = this[L](t);
1534
- return e === null ? (console.warn("route格式错误", t), !1) : this[k].findIndex((i) => {
1535
- if (e?.path && i.path === e.path || e?.name && i.name === e.name)
1504
+ hasRoute(e) {
1505
+ const t = this[I](e);
1506
+ return t === null ? (console.warn("route格式错误", e), !1) : this[B].findIndex((s) => {
1507
+ if (t?.path && s.path === t.path || t?.name && s.name === t.name)
1536
1508
  return !0;
1537
1509
  }) !== -1;
1538
1510
  }
1539
- setNotFoundPath(t) {
1540
- this[vt] = t;
1511
+ setNotFoundPath(e) {
1512
+ this[wt] = e;
1541
1513
  }
1542
- setNotFoundRoute(t) {
1543
- const e = this[Le](t);
1544
- this[De] = e[0];
1514
+ setNotFoundRoute(e) {
1515
+ const t = this[Ie](e);
1516
+ this[ke] = t[0];
1545
1517
  }
1546
1518
  getRoutes() {
1547
- return [...this[k]];
1519
+ return [...this[B]];
1548
1520
  }
1549
- [Le](t) {
1550
- let e = t.path ?? "";
1551
- e.length > 0 && e.charAt(0) !== "/" && (e = `/${e}`);
1552
- let n = t.components ?? (t.component && { "": t.component });
1521
+ [Ie](e) {
1522
+ let t = e.path ?? "";
1523
+ t.length > 0 && t.charAt(0) !== "/" && (t = `/${t}`);
1524
+ let n = e.components ?? (e.component && { "": e.component });
1553
1525
  if (n == null) {
1554
- let l = new it();
1555
- return l.path = e, l.redirect = t.redirect, [l];
1556
- }
1557
- let i = [];
1558
- for (let l in n) {
1559
- let u = n[l];
1560
- l.length === 0 && (l = Y);
1561
- let a = new en(l, u, t.props, t.meta);
1562
- i.push(a);
1563
- }
1564
- let s = !1, o = [];
1565
- if (t.children)
1566
- for (let l of t.children) {
1567
- let u = this[Le](l);
1568
- for (let a of u) {
1569
- let f = new it();
1570
- f.name = a.name, a.path && a.path.length > 0 ? e !== "/" ? f.path = `${e}${a.path}` : f.path = a.path : (s = !0, f.path = e);
1571
- let h = new Wt();
1572
- h.models = [...i], f.layers = [h, ...a.layers], o.push(f);
1526
+ let a = new lt();
1527
+ return a.path = t, a.redirect = e.redirect, [a];
1528
+ }
1529
+ let s = [];
1530
+ for (let a in n) {
1531
+ let l = n[a];
1532
+ a.length === 0 && (a = Z);
1533
+ let u = new en(a, l, e.props, e.meta);
1534
+ s.push(u);
1535
+ }
1536
+ let i = !1, o = [];
1537
+ if (e.children)
1538
+ for (let a of e.children) {
1539
+ let l = this[Ie](a);
1540
+ for (let u of l) {
1541
+ let f = new lt();
1542
+ f.name = u.name, u.path && u.path.length > 0 ? t !== "/" ? f.path = `${t}${u.path}` : f.path = u.path : (i = !0, f.path = t);
1543
+ let c = new Gt();
1544
+ c.models = [...s], f.layers = [c, ...u.layers], o.push(f);
1573
1545
  }
1574
1546
  }
1575
- if (!s) {
1576
- let l = new Wt();
1577
- l.models = i;
1578
- let u = new it();
1579
- u.name = t.name, u.path = e, u.layers = [l], o.splice(0, 0, u);
1547
+ if (!i) {
1548
+ let a = new Gt();
1549
+ a.models = s;
1550
+ let l = new lt();
1551
+ l.name = e.name, l.path = t, l.layers = [a], o.splice(0, 0, l);
1580
1552
  }
1581
1553
  return o;
1582
1554
  }
1583
- [Ne](t) {
1584
- const e = t.route;
1555
+ [De](e) {
1556
+ const t = e.route;
1585
1557
  try {
1586
- for (let n of this[k])
1587
- if (e.path && n.path) {
1588
- let i = n.match;
1589
- i || (i = n.match = hn(n.path));
1590
- let s = i(e.path);
1591
- if (!s)
1558
+ for (let n of this[B])
1559
+ if (t.path && n.path) {
1560
+ let s = n.match;
1561
+ s || (s = n.match = hn(n.path));
1562
+ let i = s(t.path);
1563
+ if (!i)
1592
1564
  continue;
1593
1565
  if (n.redirect) {
1594
- let o = new $();
1595
- K(!0, o, e), o.path = n.redirect;
1596
- let l = {
1566
+ let o = new j();
1567
+ $(!0, o, t), o.path = n.redirect;
1568
+ let a = {
1597
1569
  route: o,
1598
1570
  find: void 0
1599
1571
  };
1600
- return this[Ne](l) ? (t.route = l.route, t.find = l.find, !0) : !1;
1572
+ return this[De](a) ? (e.route = a.route, e.find = a.find, !0) : !1;
1601
1573
  }
1602
- if (e.params = e.params ?? {}, K(!0, e.params, s.params), e.query) {
1603
- let o = e.query;
1574
+ if (t.params = t.params ?? {}, $(!0, t.params, i.params), t.query) {
1575
+ let o = t.query;
1604
1576
  if (typeof o == "string") {
1605
- let l = {}, u = o.split("&");
1606
- for (let a of u) {
1607
- let f = a.split("=");
1577
+ let a = {}, l = o.split("&");
1578
+ for (let u of l) {
1579
+ let f = u.split("=");
1608
1580
  if (f.length !== 2)
1609
1581
  continue;
1610
- let h = decodeURIComponent(f[0].trim()), c = decodeURIComponent(f[1].trim());
1611
- l[h] = c;
1582
+ let c = decodeURIComponent(f[0].trim()), h = decodeURIComponent(f[1].trim());
1583
+ a[c] = h;
1612
1584
  }
1613
- K(!0, e.params, l);
1585
+ $(!0, t.params, a);
1614
1586
  } else
1615
- typeof o == "object" && K(!0, e.params, o);
1587
+ typeof o == "object" && $(!0, t.params, o);
1616
1588
  }
1617
- return t.find = n, !0;
1618
- } else if (e.name === n.name) {
1619
- e.params = e.params ?? {};
1620
- let i = fn(n.path);
1621
- return e.path = i(e.params), t.find = n, !0;
1589
+ return e.find = n, !0;
1590
+ } else if (t.name === n.name) {
1591
+ t.params = t.params ?? {};
1592
+ let s = fn(n.path);
1593
+ return t.path = s(t.params), e.find = n, !0;
1622
1594
  }
1623
1595
  } catch (n) {
1624
- console.error(n.message, n), typeof e.error == "function" && e.error(n.message);
1596
+ console.error(n.message, n), typeof t.error == "function" && t.error(n.message);
1625
1597
  }
1626
1598
  return !1;
1627
1599
  }
1628
- [L](t) {
1629
- let e = null;
1630
- if (Array.isArray(t))
1631
- if (e = new $(), typeof t[0] == "object")
1632
- e = $.from(t[0]);
1600
+ [I](e) {
1601
+ let t = null;
1602
+ if (Array.isArray(e))
1603
+ if (t = new j(), typeof e[0] == "object")
1604
+ t = j.from(e[0]);
1633
1605
  else
1634
- for (let n = 0; n < t.length; n++)
1635
- n === 0 ? t[n].charAt(0) === "/" ? e.path = t[n] : e.name = t[n] : n === 1 ? e.params = t[n] : n === 2 ? e.root = t[n] : n === 3 && K(!1, e, t[n]);
1606
+ for (let n = 0; n < e.length; n++)
1607
+ n === 0 ? e[n].charAt(0) === "/" ? t.path = e[n] : t.name = e[n] : n === 1 ? t.params = e[n] : n === 2 ? t.root = e[n] : n === 3 && $(!1, t, e[n]);
1636
1608
  else
1637
- typeof t == "object" ? e = $.from(t) : typeof t == "string" && (e = new $(), t.charAt(0) == "/" ? e.path = t : e.name = t);
1638
- if (e) {
1639
- if (e.path) {
1640
- let n = e.path.indexOf("?");
1641
- n !== -1 && n < e.path.length - 1 && (e.query = e.path.substring(n + 1), e.path = e.path.substring(0, n));
1609
+ typeof e == "object" ? t = j.from(e) : typeof e == "string" && (t = new j(), e.charAt(0) == "/" ? t.path = e : t.name = e);
1610
+ if (t) {
1611
+ if (t.path) {
1612
+ let n = t.path.indexOf("?");
1613
+ n !== -1 && n < t.path.length - 1 && (t.query = t.path.substring(n + 1), t.path = t.path.substring(0, n));
1642
1614
  }
1643
- e.root = e.root ?? Y, e.opsType = e.opsType ?? this.options.defaultOperationType ?? C.Push;
1615
+ t.root = t.root ?? Z, t.opsType = t.opsType ?? this.options.defaultOperationType ?? A.Push;
1644
1616
  }
1645
- return e;
1617
+ return t;
1646
1618
  }
1647
- push(...t) {
1648
- let e = this[L](t);
1649
- return e ? (e.opsType = e.opsType || C.Push, this.to(e)) : (this[j]("resolve route fail", e), this);
1619
+ push(...e) {
1620
+ let t = this[I](e);
1621
+ return t ? (t.opsType = t.opsType || A.Push, this.to(t)) : (this[q]("resolve route fail", t), this);
1650
1622
  }
1651
- put(...t) {
1652
- let e = this[L](t);
1653
- return e ? (e.opsType = C.Put, this.to(e)) : (this[j]("resolve route fail", e), this);
1623
+ put(...e) {
1624
+ let t = this[I](e);
1625
+ return t ? (t.opsType = A.Put, this.to(t)) : (this[q]("resolve route fail", t), this);
1654
1626
  }
1655
- replace(...t) {
1656
- let e = this[L](t);
1657
- return e ? (e.opsType = C.Replace, this.to(e)) : (this[j]("resolve route fail", e), this);
1627
+ replace(...e) {
1628
+ let t = this[I](e);
1629
+ return t ? (t.opsType = A.Replace, this.to(t)) : (this[q]("resolve route fail", t), this);
1658
1630
  }
1659
- append(...t) {
1660
- let e = this[L](t);
1661
- return e ? (e.opsType = C.Append, this.to(e)) : (this[j]("resolve route fail", e), this);
1631
+ append(...e) {
1632
+ let t = this[I](e);
1633
+ return t ? (t.opsType = A.Append, this.to(t)) : (this[q]("resolve route fail", t), this);
1662
1634
  }
1663
- remove(t) {
1664
- return new Promise((e) => {
1665
- this[ve].post((n) => {
1635
+ remove(e) {
1636
+ return new Promise((t) => {
1637
+ this[me].post((n) => {
1666
1638
  try {
1667
- if (this[p].length === 0) {
1668
- n.resolve(), e(!1);
1639
+ if (this[g].length === 0) {
1640
+ n.resolve(), t(!1);
1669
1641
  return;
1670
1642
  }
1671
- let i = -1, s, o = [];
1672
- if (t) {
1673
- if (t.root ? s = t.root : s = this[p][0].root ?? Y, t.all)
1674
- for (let u = this[p].length - 1; u > 0; u--) {
1675
- let a = this[p][u];
1676
- a.opsType === C.Append && a.root === s && (o.splice(0, 0, a), i = u - 1);
1643
+ let s = -1, i, o = [];
1644
+ if (e) {
1645
+ if (e.root ? i = e.root : i = this[g][0].root ?? Z, e.all)
1646
+ for (let l = this[g].length - 1; l > 0; l--) {
1647
+ let u = this[g][l];
1648
+ u.opsType === A.Append && u.root === i && (o.splice(0, 0, u), s = l - 1);
1677
1649
  }
1678
- else if (t.until)
1679
- for (let u = this[p].length - 1; u > 0; u--) {
1680
- let a = this[p][u];
1681
- if (a.opsType === C.Append && a.root === s) {
1682
- if (t.until.charAt(0) === "/" && t.until === a.path) {
1683
- i = u;
1650
+ else if (e.until)
1651
+ for (let l = this[g].length - 1; l > 0; l--) {
1652
+ let u = this[g][l];
1653
+ if (u.opsType === A.Append && u.root === i) {
1654
+ if (e.until.charAt(0) === "/" && e.until === u.path) {
1655
+ s = l;
1684
1656
  break;
1685
- } else if (t.until === a.name) {
1686
- i = u;
1657
+ } else if (e.until === u.name) {
1658
+ s = l;
1687
1659
  break;
1688
1660
  }
1689
- o.splice(0, 0, a);
1661
+ o.splice(0, 0, u);
1690
1662
  }
1691
1663
  }
1692
1664
  } else {
1693
- s = Y;
1694
- let u = this[rr](this[V]);
1695
- u && (s = u.name);
1696
- for (let a = this[p].length - 1; a > 0; a--) {
1697
- let f = this[p][a];
1698
- if (f.opsType === C.Append && f.root === s) {
1699
- o.push(f), i = a - 1;
1665
+ i = Z;
1666
+ let l = this[ir](this[U]);
1667
+ l && (i = l.name);
1668
+ for (let u = this[g].length - 1; u > 0; u--) {
1669
+ let f = this[g][u];
1670
+ if (f.opsType === A.Append && f.root === i) {
1671
+ o.push(f), s = u - 1;
1700
1672
  break;
1701
1673
  }
1702
1674
  }
1703
1675
  }
1704
1676
  if (o.length === 0) {
1705
- let u = "can not find route";
1706
- console.warn(u), n.resolve(u), e(!1);
1677
+ let l = "can not find route";
1678
+ console.warn(l), n.resolve(l), t(!1);
1707
1679
  return;
1708
1680
  }
1709
- let l = 0;
1710
- if (this[p].forEach((u) => {
1711
- u.opsType !== C.Put && l++;
1712
- }), this[Te](o)) {
1713
- let u = 0;
1714
- this[p].forEach((f) => {
1715
- f.opsType !== C.Put && u++;
1681
+ let a = 0;
1682
+ if (this[g].forEach((l) => {
1683
+ l.opsType !== A.Put && a++;
1684
+ }), this[_e](o)) {
1685
+ let l = 0;
1686
+ this[g].forEach((f) => {
1687
+ f.opsType !== A.Put && l++;
1716
1688
  });
1717
- const a = u - l;
1718
- this[A]?.go(a, !1), n.resolve(), e(!0);
1689
+ const u = l - a;
1690
+ this[C]?.go(u, !1), n.resolve(), t(!0);
1719
1691
  }
1720
- } catch (i) {
1721
- this[j](i), n.resolve(), e(!1);
1692
+ } catch (s) {
1693
+ this[q](s), n.resolve(), t(!1);
1722
1694
  }
1723
1695
  });
1724
1696
  });
1725
1697
  }
1726
- open(...t) {
1727
- let e = this[L](t);
1728
- return e ? (e.opsType = C.Open, this.to(e)) : (this[j]("resolve route fail", e), this);
1698
+ open(...e) {
1699
+ let t = this[I](e);
1700
+ return t ? (t.opsType = A.Open, this.to(t)) : (this[q]("resolve route fail", t), this);
1729
1701
  }
1730
- close(t) {
1731
- return this[ve].post((e) => {
1702
+ close(e) {
1703
+ return this[me].post((t) => {
1732
1704
  try {
1733
- let n = this[L](t);
1705
+ let n = this[I](e);
1734
1706
  if (!n) {
1735
- e.reject("resolve route fail");
1707
+ t.reject("resolve route fail");
1736
1708
  return;
1737
1709
  }
1738
- let i = [];
1739
- for (let s = 0; s < this[p].length; s++) {
1740
- let o = this[p][s];
1710
+ let s = [];
1711
+ for (let i = 0; i < this[g].length; i++) {
1712
+ let o = this[g][i];
1741
1713
  if (o.root === n.root) {
1742
1714
  if (!n.path && !n.name) {
1743
- i.push(o);
1715
+ s.push(o);
1744
1716
  continue;
1745
1717
  }
1746
1718
  if (n.path && n.path === o.path) {
1747
- i.push(o);
1719
+ s.push(o);
1748
1720
  break;
1749
1721
  } else if (n.name && n.name === o.name) {
1750
- i.push(o);
1722
+ s.push(o);
1751
1723
  break;
1752
1724
  }
1753
1725
  }
1754
1726
  }
1755
- if (i.length === 0) {
1756
- e.resolve();
1727
+ if (s.length === 0) {
1728
+ t.resolve();
1757
1729
  return;
1758
1730
  }
1759
- this[Te](i) && this[He](), e.resolve();
1731
+ this[_e](s) && this[He](), t.resolve();
1760
1732
  } catch (n) {
1761
- this[j](n), e.resolve();
1733
+ this[q](n), t.resolve();
1762
1734
  }
1763
1735
  }), this;
1764
1736
  }
1765
- to(...t) {
1766
- let e = this[L](t);
1767
- if (!e)
1768
- return this[j]("resolve route fail", e), this;
1769
- console.debug("route to", e.path, e.root);
1770
- let n = this[_e].acquire(e);
1771
- return n == null ? (this[j]("route forbid", e), this) : (this[ve].post((i) => {
1737
+ to(...e) {
1738
+ let t = this[I](e);
1739
+ if (!t)
1740
+ return this[q]("resolve route fail", t), this;
1741
+ console.debug("route to", t.path, t.root);
1742
+ let n = this[$e].acquire(t);
1743
+ return n == null ? (this[q]("route forbid", t), this) : (this[me].post((s) => {
1772
1744
  try {
1773
- let s = this[pt](e);
1774
- this[wt](s), this[Rt](s), this[bt](s), s.wait(
1775
- (o, l) => {
1776
- const u = o.session.to;
1745
+ let i = this[Rt](t);
1746
+ this[St](i), this[Ct](i), this[Pt](i), i.wait(
1747
+ (o, a) => {
1748
+ const l = o.session.to;
1777
1749
  try {
1778
- let a = $.clone(u, !0);
1779
- const f = new Yt(a, this[ke]());
1780
- u.opsType === C.Replace ? this[A]?.replace(f) : this[A]?.push(f);
1781
- } catch (a) {
1782
- console.error(a.message, a);
1750
+ let u = j.clone(l, !0);
1751
+ const f = new tr(u, this[Be]());
1752
+ l.opsType === A.Replace ? this[C]?.replace(f) : this[C]?.push(f);
1753
+ } catch (u) {
1754
+ console.error(u.message, u);
1783
1755
  }
1784
- if (this[_e].release(n), this[He](u), typeof e.success == "function")
1756
+ if (this[$e].release(n), this[He](l), typeof t.success == "function")
1785
1757
  try {
1786
- Reflect.apply(e.success, {}, []);
1787
- } catch (a) {
1788
- console.error(a.message, a);
1758
+ Reflect.apply(t.success, {}, []);
1759
+ } catch (u) {
1760
+ console.error(u.message, u);
1789
1761
  }
1790
- this[oe] === !1 && this[Be](!0), i.resolve();
1762
+ this[le] === !1 && this[We](!0), s.resolve();
1791
1763
  },
1792
- (o, l) => {
1793
- this[_e].release(n), l !== null && this[j](l, e), this[oe] === !1 && this[Be](!1), i.resolve();
1764
+ (o, a) => {
1765
+ this[$e].release(n), a !== null && this[q](a, t), this[le] === !1 && this[We](!1), s.resolve();
1794
1766
  }
1795
1767
  );
1796
- } catch (s) {
1797
- this[_e].release(n), this[j](s, e), i.resolve();
1768
+ } catch (i) {
1769
+ this[$e].release(n), this[q](i, t), s.resolve();
1798
1770
  }
1799
1771
  }), this);
1800
1772
  }
1801
- back(t = 1) {
1802
- this[A]?.go(-t);
1803
- }
1804
- [lr](t) {
1805
- return (e, n) => {
1806
- if (typeof e == "boolean")
1807
- t.session.redirect = !1, e ? t.resolve() : t.reject(n ?? null);
1808
- else if (e) {
1809
- const i = this[L](e);
1810
- if (i) {
1811
- const s = t.session.to;
1812
- i.success = s.success, i.error = s.error, t.session.to = i, t.session.redirect = !0, t.session.routeModel = null, t.resolve();
1773
+ back(e = 1) {
1774
+ this[C]?.go(-e);
1775
+ }
1776
+ [fr](e) {
1777
+ return (t, n) => {
1778
+ if (typeof t == "boolean")
1779
+ e.session.redirect = !1, t ? e.resolve() : e.reject(n ?? null);
1780
+ else if (t) {
1781
+ const s = this[I](t);
1782
+ if (s) {
1783
+ const i = e.session.to;
1784
+ s.success = i.success, s.error = i.error, e.session.to = s, e.session.redirect = !0, e.session.routeModel = null, e.resolve();
1813
1785
  } else
1814
- t.session.redirect = !1, t.reject("route resolve fail");
1786
+ e.session.redirect = !1, e.reject("route resolve fail");
1815
1787
  } else
1816
- t.session.redirect = !1, t.resolve();
1788
+ e.session.redirect = !1, e.resolve();
1817
1789
  };
1818
1790
  }
1819
- [pt](t) {
1820
- let e = this[p].length > 0 ? this[p][0] : void 0, n = new Qe(t, e), i = {
1821
- route: t,
1791
+ [Rt](e) {
1792
+ let t = this[g].length > 0 ? this[g][0] : void 0, n = new Ye(e, t), s = {
1793
+ route: e,
1822
1794
  find: null
1823
1795
  };
1824
- return this[Ne](i), i.find && (n.routeModel = i.find, t.matched = En(i.find), Array.isArray(t.matched) && t.matched.length > 0 && (t.meta = i.find.layers[0].models[0].meta)), new At(n);
1796
+ return this[De](s), s.find && (n.routeModel = s.find, e.matched = An(s.find), Array.isArray(e.matched) && e.matched.length > 0 && (e.meta = s.find.layers[0].models[0].meta)), new Ze(n);
1825
1797
  }
1826
- [wt](t) {
1827
- for (let e of this[Ce])
1828
- t.post((n) => {
1829
- let i = this[lr](n);
1830
- Reflect.apply(e, {}, [n.session.to, n.session.from, i, n.session]);
1798
+ [St](e) {
1799
+ for (let t of this[Ee])
1800
+ e.post((n) => {
1801
+ let s = this[fr](n);
1802
+ Reflect.apply(t, {}, [n.session.to, n.session.from, s, n.session]);
1831
1803
  });
1832
1804
  }
1833
- [bt](t) {
1834
- t.post((e) => {
1835
- for (let n of this[Ee])
1805
+ [Pt](e) {
1806
+ e.post((t) => {
1807
+ for (let n of this[Fe])
1836
1808
  try {
1837
- Reflect.apply(n, {}, [e.session.to, e.session.from, e.session]);
1838
- } catch (i) {
1839
- console.error(i.message, i);
1809
+ Reflect.apply(n, {}, [t.session.to, t.session.from, t.session]);
1810
+ } catch (s) {
1811
+ console.error(s.message, s);
1840
1812
  }
1841
- e.resolve();
1813
+ t.resolve();
1842
1814
  });
1843
1815
  }
1844
- [ur](t, e) {
1845
- for (let n of this[Fe])
1816
+ [cr](e, t) {
1817
+ for (let n of this[Te])
1846
1818
  try {
1847
- Reflect.apply(n, {}, [t, e]);
1848
- } catch (i) {
1849
- console.error(i.message, i);
1819
+ Reflect.apply(n, {}, [e, t]);
1820
+ } catch (s) {
1821
+ console.error(s.message, s);
1850
1822
  }
1851
- typeof t.destroy == "function" && Reflect.apply(t.destroy, t, []);
1823
+ typeof e.destroy == "function" && Reflect.apply(e.destroy, e, []);
1852
1824
  }
1853
- [Rt](t) {
1854
- t.post((e) => {
1855
- let n = e.session.to, i = e.session.routeModel;
1856
- if (i == null) {
1825
+ [Ct](e) {
1826
+ e.post((t) => {
1827
+ let n = t.session.to, s = t.session.routeModel;
1828
+ if (s == null) {
1857
1829
  let o = {
1858
1830
  route: n,
1859
1831
  find: null
1860
1832
  };
1861
- if (this[Ne](o))
1862
- i = o.find, e.session.routeModel = i;
1863
- else if (this[De])
1864
- i = this[De];
1833
+ if (this[De](o))
1834
+ s = o.find, t.session.routeModel = s;
1835
+ else if (this[ke])
1836
+ s = this[ke];
1865
1837
  else {
1866
- e.reject(`not find route model, path:${n.path ?? n.name}`);
1838
+ t.reject(`not find route model, path:${n.path ?? n.name}`);
1867
1839
  return;
1868
1840
  }
1869
1841
  }
1870
- let s = Qe.from(e.session);
1871
- this[nr](n, i, s).then(
1842
+ let i = Ye.from(t.session);
1843
+ this[or](n, s, i).then(
1872
1844
  (o) => {
1873
- this[V], e.resolve();
1845
+ this[U], t.resolve();
1874
1846
  },
1875
1847
  (o) => {
1876
- e.reject(o);
1848
+ t.reject(o);
1877
1849
  }
1878
1850
  );
1879
1851
  });
1880
1852
  }
1881
- [Te](t) {
1882
- if (t.length == 0)
1853
+ [_e](e) {
1854
+ if (e.length == 0)
1883
1855
  return !0;
1884
- let e = this[V], n = [];
1885
- for (let i of t) {
1886
- let s = this[yt](e, i);
1887
- s != null && n.push({
1888
- ...s,
1889
- route: i
1856
+ let t = this[U], n = [];
1857
+ for (let s of e) {
1858
+ let i = this[vt](t, s);
1859
+ i != null && n.push({
1860
+ ...i,
1861
+ route: s
1890
1862
  });
1891
1863
  }
1892
1864
  if (n.length == 0) {
1893
- let i = "can not find view index";
1894
- return this[j](i), !1;
1865
+ let s = "can not find view index";
1866
+ return this[q](s), !1;
1895
1867
  }
1896
- for (let i of n.reverse())
1897
- this[se](e, { x: i.x, y: i.y }, [i.route.index ?? 0], !0);
1868
+ for (let s of n.reverse())
1869
+ this[oe](t, { x: s.x, y: s.y }, [s.route.index ?? 0], !0);
1898
1870
  return !0;
1899
1871
  }
1900
- [yt](t, e) {
1901
- const n = e.root ?? Y;
1902
- let i;
1903
- for (let s = 0; s < t.layers.length; s++) {
1904
- const o = t.layers[s];
1905
- for (let l = o.views.length - 1; l >= 0; l--) {
1906
- const u = o.views[l];
1907
- if (u[z] && u[ze] === n)
1908
- return i = { x: l, y: s }, i;
1872
+ [vt](e, t) {
1873
+ const n = t.root ?? Z;
1874
+ let s;
1875
+ for (let i = 0; i < e.layers.length; i++) {
1876
+ const o = e.layers[i];
1877
+ for (let a = o.views.length - 1; a >= 0; a--) {
1878
+ const l = o.views[a];
1879
+ if (l[J] && l[Ge] === n)
1880
+ return s = { x: a, y: i }, s;
1909
1881
  }
1910
1882
  }
1911
1883
  return null;
1912
1884
  }
1913
- [rr](t) {
1914
- return t.layers.length > 0 && t.layers[0].views.length > 0 ? t.layers[0].views[0] : null;
1885
+ [ir](e) {
1886
+ return e.layers.length > 0 && e.layers[0].views.length > 0 ? e.layers[0].views[0] : null;
1915
1887
  }
1916
- [se](t, e, n = null, i = !0) {
1917
- if (e.y >= t.layers.length || e.x >= t.layers[e.y].views.length)
1888
+ [oe](e, t, n = null, s = !0) {
1889
+ if (t.y >= e.layers.length || t.x >= e.layers[t.y].views.length)
1918
1890
  return;
1919
- let s = t.layers[e.y].views[e.x], o = !1, l = [], u = !1, a = [...s.slots.value];
1920
- for (let h = a.length - 1; h >= 0; h--) {
1921
- let c = a[h];
1922
- (!n || n.indexOf(c.index) != -1) && (c.route && s[z] && (this[de](c.route), c.active === !0 && c.route.opsType == C.Append && (u = !0)), l.push(new I(s, c.index, e.y)), a.splice(h, 1));
1891
+ let i = e.layers[t.y].views[t.x], o = !1, a = [], l = !1, u = [...i.slots.value];
1892
+ for (let c = u.length - 1; c >= 0; c--) {
1893
+ let h = u[c];
1894
+ (!n || n.indexOf(h.index) != -1) && (h.route && i[J] && (this[pe](h.route), h.active === !0 && h.route.opsType == A.Append && (l = !0)), a.push(new V(i, h.index, t.y)), u.splice(c, 1));
1923
1895
  }
1924
- if (a.length == 0)
1925
- i ? s.slots.value = a : t.layers[e.y].views.splice(e.x, 1);
1896
+ if (u.length == 0)
1897
+ s ? i.slots.value = u : e.layers[t.y].views.splice(t.x, 1);
1926
1898
  else {
1927
- if (u) {
1928
- let h = a.length - 1, c = a[h];
1929
- c.active = !0, c.route && (c.route.active = c.active);
1899
+ if (l) {
1900
+ let c = u.length - 1, h = u[c];
1901
+ h.active = !0, h.route && (h.route.active = h.active);
1930
1902
  }
1931
- s.slots.value = a;
1932
- }
1933
- t.layers[e.y].views.length == 0 && (o = !0);
1934
- let f = e.y + 1;
1935
- for (; f < t.layers.length; f++) {
1936
- let h = t.layers[f].views, c = [];
1937
- for (let y = h.length - 1; (o || l.length > 0) && y >= 0; y--) {
1938
- let d = h[y];
1939
- if (d[ue] && (o || I.include(l, d[ue]))) {
1940
- let g = d.slots.value;
1941
- for (let v = g.length - 1; v >= 0; v--) {
1942
- let m = g[v];
1943
- m.route && d[z] && this[de](m.route), c.push(new I(d, m.index, f)), g.splice(v, 1);
1903
+ i.slots.value = u;
1904
+ }
1905
+ e.layers[t.y].views.length == 0 && (o = !0);
1906
+ let f = t.y + 1;
1907
+ for (; f < e.layers.length; f++) {
1908
+ let c = e.layers[f].views, h = [];
1909
+ for (let d = c.length - 1; (o || a.length > 0) && d >= 0; d--) {
1910
+ let y = c[d];
1911
+ if (y[ue] && (o || V.include(a, y[ue]))) {
1912
+ let v = y.slots.value;
1913
+ for (let p = v.length - 1; p >= 0; p--) {
1914
+ let m = v[p];
1915
+ m.route && y[J] && this[pe](m.route), h.push(new V(y, m.index, f)), v.splice(p, 1);
1944
1916
  }
1945
- t.layers[f].views.splice(y, 1);
1917
+ e.layers[f].views.splice(d, 1);
1946
1918
  }
1947
1919
  }
1948
- l = c, t.layers[f].views.length == 0 && (o = !0);
1920
+ a = h, e.layers[f].views.length == 0 && (o = !0);
1949
1921
  }
1950
1922
  }
1951
- restore(t) {
1952
- if (!t || this[k].length == 0) {
1953
- let e = this[V];
1954
- if (e.layers.length > 0) {
1955
- let n = e.layers[0].views;
1923
+ restore(e) {
1924
+ if (!e || this[B].length == 0) {
1925
+ let t = this[U];
1926
+ if (t.layers.length > 0) {
1927
+ let n = t.layers[0].views;
1956
1928
  n.length > 0 && (n[0].slots.value = []);
1957
1929
  }
1958
- return this[p] = [], this[He](), Promise.resolve();
1930
+ return this[g] = [], this[He](), Promise.resolve();
1959
1931
  } else
1960
- return new Promise((n, i) => {
1961
- let s = null, o = !1;
1962
- for (let l = 0; l < t.length; l++) {
1963
- let u = t[l];
1964
- this[ve].post((a) => {
1965
- let f = this[pt](u);
1966
- this[wt](f), this[Rt](f), this[bt](f), f.wait(
1967
- (h, c) => {
1968
- s = h.session.to, o = h.session.redirect, a.resolve();
1932
+ return new Promise((n, s) => {
1933
+ let i = null, o = !1;
1934
+ for (let a = 0; a < e.length; a++) {
1935
+ let l = e[a];
1936
+ this[me].post((u) => {
1937
+ let f = this[Rt](l);
1938
+ this[St](f), this[Ct](f), this[Pt](f), f.wait(
1939
+ (c, h) => {
1940
+ i = c.session.to, o = c.session.redirect, u.resolve();
1969
1941
  },
1970
- (h, c) => {
1971
- s = null, c !== null && this[j](c), a.resolve();
1942
+ (c, h) => {
1943
+ i = null, h !== null && this[q](h), u.resolve();
1972
1944
  }
1973
1945
  );
1974
1946
  });
1975
1947
  }
1976
- this[ve].post((l) => {
1977
- if (s && o === !0) {
1978
- const u = $.clone(s, !0), a = new Yt(u, this[ke]());
1979
- this[A]?.replace(a);
1948
+ this[me].post((a) => {
1949
+ if (i && o === !0) {
1950
+ const l = j.clone(i, !0), u = new tr(l, this[Be]());
1951
+ this[C]?.replace(u);
1980
1952
  }
1981
- l.resolve(), n();
1953
+ a.resolve(), n();
1982
1954
  });
1983
1955
  });
1984
1956
  }
1985
- [nr](t, e, n) {
1986
- let i = t.updateType ?? We.Part;
1987
- return this[ir](e).then(() => {
1988
- this[sr](e, t, n, i);
1957
+ [or](e, t, n) {
1958
+ let s = e.updateType ?? Je.Part;
1959
+ return this[lr](t).then(() => {
1960
+ this[ar](t, e, n, s);
1989
1961
  });
1990
1962
  }
1991
- [ir](t) {
1992
- let e = [];
1993
- for (let n = 0; n < t.layers.length; n++) {
1994
- let i = t.layers[n];
1995
- for (let s = 0; s < i.models.length; s++) {
1996
- let o = i.models[s];
1997
- o.isResolved || e.push(o.resolve());
1963
+ [lr](e) {
1964
+ let t = [];
1965
+ for (let n = 0; n < e.layers.length; n++) {
1966
+ let s = e.layers[n];
1967
+ for (let i = 0; i < s.models.length; i++) {
1968
+ let o = s.models[i];
1969
+ o.isResolved || t.push(o.resolve());
1998
1970
  }
1999
1971
  }
2000
- return e.length > 0 ? Promise.all(e) : Promise.resolve();
1972
+ return t.length > 0 ? Promise.all(t) : Promise.resolve();
2001
1973
  }
2002
- [sr](t, e, n, i) {
2003
- if (t.layers[0].models.length !== 1)
1974
+ [ar](e, t, n, s) {
1975
+ if (e.layers[0].models.length !== 1)
2004
1976
  return Promise.reject("illegal route structure(multi root node)");
2005
- const s = t.layers[0].models[0];
2006
- let o = this[V], l = Cn(o), u = e.root ?? Y, a;
2007
- !l && i == We.Part && (a = this[yt](o, e));
2008
- let f, h = 0;
2009
- if (a == null || a == null)
2010
- if (l || i === We.All) {
2011
- if (o.layers.length == 0 && (o.layers[0] = new ft()), o.layers[0].views.length == 0) {
2012
- let c = e.root ?? Y;
2013
- f = new Pe(c, !0, null), o.layers[0].views = [f];
1977
+ const i = e.layers[0].models[0];
1978
+ let o = this[U], a = Cn(o), l = t.root ?? Z, u;
1979
+ !a && s == Je.Part && (u = this[vt](o, t));
1980
+ let f, c = 0;
1981
+ if (u == null || u == null)
1982
+ if (a || s === Je.All) {
1983
+ if (o.layers.length == 0 && (o.layers[0] = new dt()), o.layers[0].views.length == 0) {
1984
+ let h = t.root ?? Z;
1985
+ f = new Ce(h, !0, null), o.layers[0].views = [f];
2014
1986
  } else
2015
1987
  f = o.layers[0].views[0];
2016
- a = { x: 0, y: 0 };
1988
+ u = { x: 0, y: 0 };
2017
1989
  } else {
2018
- let c = e.slot;
2019
- if (!c)
1990
+ let h = t.slot;
1991
+ if (!h)
2020
1992
  return Promise.reject("can not rebuild view(because not route slot)");
2021
- let y = c.level;
2022
- if (y > o.layers.length)
1993
+ let d = h.level;
1994
+ if (d > o.layers.length)
2023
1995
  return Promise.reject("can not insert view(override level)");
2024
- let d;
2025
- if (c.rootName) {
2026
- let g = o.layers[y - 1];
2027
- for (let v of g.views) {
2028
- if (v[z] && v.name === c.rootName) {
2029
- d = new I(v, c.rootIndex ?? 0, y - 1);
1996
+ let y;
1997
+ if (h.rootName) {
1998
+ let v = o.layers[d - 1];
1999
+ for (let p of v.views) {
2000
+ if (p[J] && p.name === h.rootName) {
2001
+ y = new V(p, h.rootIndex ?? 0, d - 1);
2030
2002
  break;
2031
2003
  }
2032
- if (v[W] && v[W].view.name === c.rootName && v[W].index === c.rootIndex) {
2033
- d = v[W];
2004
+ if (p[z] && p[z].view.name === h.rootName && p[z].index === h.rootIndex) {
2005
+ y = p[z];
2034
2006
  break;
2035
2007
  }
2036
2008
  }
2037
2009
  }
2038
- if (!d)
2010
+ if (!y)
2039
2011
  return Promise.reject("can not insert view(not find root node ref)");
2040
- f = new Pe(u, !0, d), o.layers[y].views.push(f), a = { x: o.layers[y].views.length - 1, y };
2012
+ f = new Ce(l, !0, y), o.layers[d].views.push(f), u = { x: o.layers[d].views.length - 1, y: d };
2041
2013
  }
2042
2014
  else
2043
- f = o.layers[a.y].views[a.x];
2044
- if (h = a.y, f[z] = !0, e.opsType === C.Append) {
2045
- e.index = ne.get();
2046
- let c = f.slots.value;
2047
- if (c.length > 0) {
2048
- let m = c[c.length - 1];
2015
+ f = o.layers[u.y].views[u.x];
2016
+ if (c = u.y, f[J] = !0, t.opsType === A.Append) {
2017
+ t.index = se.get();
2018
+ let h = f.slots.value;
2019
+ if (h.length > 0) {
2020
+ let m = h[h.length - 1];
2049
2021
  m.active = !1, m.route && (m.route.active = m.active);
2050
2022
  }
2051
- let y = new ee(e, s, e.index, !0);
2052
- f.slots.value = [...c, y];
2053
- let d = h + 1, g = 1, v = new I(f, e.index, h);
2054
- this[te](o, d, t, g, v);
2055
- } else if (e.opsType === C.Open) {
2056
- let c = f.slots.value, y = !1;
2057
- for (let d of c) {
2058
- if (d.route !== null && $.isSameForRouteModel(d.route, e)) {
2059
- if (d.active == !0)
2060
- return e.index = d.index, e.active = d.active, d.route = e, Promise.resolve();
2061
- d.active = !0, y = !0, e.index = d.index, e.active = d.active, d.route = e, this[de](d.route);
2023
+ let d = new te(t, i, t.index, !0);
2024
+ f.slots.value = [...h, d];
2025
+ let y = c + 1, v = 1, p = new V(f, t.index, c);
2026
+ this[re](o, y, e, v, p);
2027
+ } else if (t.opsType === A.Open) {
2028
+ let h = f.slots.value, d = !1;
2029
+ for (let y of h) {
2030
+ if (y.route !== null && j.isSameForRouteModel(y.route, t)) {
2031
+ if (y.active == !0)
2032
+ return t.index = y.index, t.active = y.active, y.route = t, Promise.resolve();
2033
+ y.active = !0, d = !0, t.index = y.index, t.active = y.active, y.route = t, this[pe](y.route);
2062
2034
  } else
2063
- d.active = !1;
2064
- d.route && (d.route.active = d.active);
2035
+ y.active = !1;
2036
+ y.route && (y.route.active = y.active);
2065
2037
  }
2066
- if (!y) {
2067
- e.index = ne.get(), e.active = !0;
2068
- let d = new ee(e, s, e.index, !0);
2069
- c.push(d);
2070
- let g = h + 1, v = 1, m = new I(f, e.index, h);
2071
- this[te](o, g, t, v, m);
2038
+ if (!d) {
2039
+ t.index = se.get(), t.active = !0;
2040
+ let y = new te(t, i, t.index, !0);
2041
+ h.push(y);
2042
+ let v = c + 1, p = 1, m = new V(f, t.index, c);
2043
+ this[re](o, v, e, p, m);
2072
2044
  }
2073
- f.slots.value = [...c];
2045
+ f.slots.value = [...h];
2074
2046
  } else {
2075
- let c = f.slots.value;
2076
- if (c.length == 0) {
2077
- e.index = ne.get(), f.slots.value = [new ee(e, s, e.index)];
2078
- let y = h + 1, d = 1, g = new I(f, e.index, h);
2079
- this[te](o, y, t, d, g);
2047
+ let h = f.slots.value;
2048
+ if (h.length == 0) {
2049
+ t.index = se.get(), f.slots.value = [new te(t, i, t.index)];
2050
+ let d = c + 1, y = 1, v = new V(f, t.index, c);
2051
+ this[re](o, d, e, y, v);
2080
2052
  } else {
2081
- let y = c[0];
2082
- if (y.model !== s) {
2083
- this[se](o, a, null, !0), e.index = ne.get(), f.slots.value = [new ee(e, s, e.index)];
2084
- let d = h + 1, g = 1, v = new I(f, e.index, h);
2085
- this[te](o, d, t, g, v);
2053
+ let d = h[0];
2054
+ if (d.model !== i) {
2055
+ this[oe](o, u, null, !0), t.index = se.get(), f.slots.value = [new te(t, i, t.index)];
2056
+ let y = c + 1, v = 1, p = new V(f, t.index, c);
2057
+ this[re](o, y, e, v, p);
2086
2058
  } else {
2087
- y.route !== null && this[de](y.route);
2088
- let d = [];
2089
- for (let F = 1; F < c.length; F++)
2090
- d.push(c[F].index);
2091
- d.length > 0 && this[se](o, a, d, !0), e.index = y.index, y.route = e;
2092
- let g = [new I(f, e.index, h)], v = h + 1, m = 1, w = new I(f, e.index, h);
2093
- for (; g.length > 0 && v < o.layers.length && m < t.layers.length; v++, m++) {
2059
+ d.route !== null && this[pe](d.route);
2060
+ let y = [];
2061
+ for (let F = 1; F < h.length; F++)
2062
+ y.push(h[F].index);
2063
+ y.length > 0 && this[oe](o, u, y, !0), t.index = d.index, d.route = t;
2064
+ let v = [new V(f, t.index, c)], p = c + 1, m = 1, w = new V(f, t.index, c);
2065
+ for (; v.length > 0 && p < o.layers.length && m < e.layers.length; p++, m++) {
2094
2066
  let F = [];
2095
- for (let P = 0; P < o.layers[v].views.length; P++) {
2096
- let R = o.layers[v].views[P];
2097
- R[ue] && I.include(g, R[ue]) && F.unshift(P);
2067
+ for (let P = 0; P < o.layers[p].views.length; P++) {
2068
+ let x = o.layers[p].views[P];
2069
+ x[ue] && V.include(v, x[ue]) && F.unshift(P);
2098
2070
  }
2099
2071
  let b = [];
2100
2072
  for (let P of F) {
2101
- let R = o.layers[v].views[P], q = t.layers[m].models, T;
2102
- for (let _ = 0; _ < q.length; _++)
2103
- if (R.name === q[_].name) {
2104
- T = q[_];
2073
+ let x = o.layers[p].views[P], K = e.layers[m].models, T;
2074
+ for (let _ = 0; _ < K.length; _++)
2075
+ if (x.name === K[_].name) {
2076
+ T = K[_];
2105
2077
  break;
2106
2078
  }
2107
2079
  if (!T)
2108
- this[se](o, { x: P, y: v }, null, !1);
2080
+ this[oe](o, { x: P, y: p }, null, !1);
2109
2081
  else {
2110
- let _ = R.slots.value;
2082
+ let _ = x.slots.value;
2111
2083
  if (_.length == 0) {
2112
- let M = 0;
2113
- R.slots.value = [new ee(null, T, M)];
2114
- let B = v + 1, U = m + 1;
2115
- this[te](o, B, t, U, w);
2084
+ let O = 0;
2085
+ x.slots.value = [new te(null, T, O)];
2086
+ let k = p + 1, W = m + 1;
2087
+ this[re](o, k, e, W, w);
2116
2088
  } else {
2117
- let M = _[0];
2118
- if (M.model !== T) {
2119
- this[se](o, { x: P, y: v }, null, !0), R.slots.value = [new ee(null, T, 0)];
2120
- let B = v + 1, U = m + 1;
2121
- this[te](o, B, t, U, w);
2089
+ let O = _[0];
2090
+ if (O.model !== T) {
2091
+ this[oe](o, { x: P, y: p }, null, !0), x.slots.value = [new te(null, T, 0)];
2092
+ let k = p + 1, W = m + 1;
2093
+ this[re](o, k, e, W, w);
2122
2094
  } else {
2123
- R[z] && M.route !== null && this[de](M.route);
2124
- let B = [];
2125
- for (let U = 1; U < _.length; U++)
2126
- B.push(_[U].index);
2127
- B.length > 0 && this[se](o, { x: P, y: v }, B, !0), b.push(new I(R, M.index, v));
2095
+ x[J] && O.route !== null && this[pe](O.route);
2096
+ let k = [];
2097
+ for (let W = 1; W < _.length; W++)
2098
+ k.push(_[W].index);
2099
+ k.length > 0 && this[oe](o, { x: P, y: p }, k, !0), b.push(new V(x, O.index, p));
2128
2100
  }
2129
2101
  }
2130
- R[z] = !1;
2102
+ x[J] = !1;
2131
2103
  }
2132
2104
  }
2133
- g = b;
2105
+ v = b;
2134
2106
  }
2135
- this[te](o, v, t, m, w);
2107
+ this[re](o, p, e, m, w);
2136
2108
  }
2137
2109
  }
2138
2110
  }
2139
- if (f && f[W]) {
2140
- let c = f[W];
2141
- c && (e.slot = new Zr(u, h, c?.view.name, c?.index ?? 0));
2111
+ if (f && f[z]) {
2112
+ let h = f[z];
2113
+ h && (t.slot = new Zr(l, c, h?.view.name, h?.index ?? 0));
2142
2114
  }
2143
- n.to = void 0, n.routeModel = void 0, e.session = n, this[or](e);
2115
+ n.to = void 0, n.routeModel = void 0, t.session = n, this[ur](t);
2144
2116
  }
2145
- [te](t, e, n, i, s) {
2146
- let o = i, l = e;
2147
- for (; l < t.layers.length && o < n.layers.length; l++, o++) {
2148
- let u = t.layers[l].views;
2149
- for (let a of n.layers[o].models) {
2150
- let f = new Pe(a.name, !1, s), h = new ee(null, a);
2151
- f.slots.value = [h], u.push(f);
2117
+ [re](e, t, n, s, i) {
2118
+ let o = s, a = t;
2119
+ for (; a < e.layers.length && o < n.layers.length; a++, o++) {
2120
+ let l = e.layers[a].views;
2121
+ for (let u of n.layers[o].models) {
2122
+ let f = new Ce(u.name, !1, i), c = new te(null, u);
2123
+ f.slots.value = [c], l.push(f);
2152
2124
  }
2153
2125
  }
2154
2126
  for (; o < n.layers.length; o++) {
2155
- let u = new ft();
2156
- u.views = [];
2157
- for (let a of n.layers[o].models) {
2158
- let f = new Pe(a.name, !1, s), h = new ee(null, a);
2159
- f.slots.value = [h], u.views.push(f);
2127
+ let l = new dt();
2128
+ l.views = [];
2129
+ for (let u of n.layers[o].models) {
2130
+ let f = new Ce(u.name, !1, i), c = new te(null, u);
2131
+ f.slots.value = [c], l.views.push(f);
2160
2132
  }
2161
- t.layers.push(u);
2133
+ e.layers.push(l);
2162
2134
  }
2163
2135
  }
2164
- [mr](t, e, n, i, s, o) {
2165
- if (e < 0 || e > this[V].layers.length)
2136
+ [wr](e, t, n, s, i, o) {
2137
+ if (t < 0 || t > this[U].layers.length)
2166
2138
  return null;
2167
- if (e < this[V].layers.length) {
2168
- let f = this[V].layers[e], h = null;
2169
- for (let c of f.views) {
2170
- let y = !1;
2171
- if (n !== null ? (y = c.name === t && c[W]?.view === n, y && i !== -1 && (y = c[W]?.index === i)) : y = c.name === t, !!y) {
2172
- s !== null && (c[ue] = {
2173
- view: s,
2139
+ if (t < this[U].layers.length) {
2140
+ let f = this[U].layers[t], c = null;
2141
+ for (let h of f.views) {
2142
+ let d = !1;
2143
+ if (n !== null ? (d = h.name === e && h[z]?.view === n, d && s !== -1 && (d = h[z]?.index === s)) : d = h.name === e, !!d) {
2144
+ i !== null && (h[ue] = {
2145
+ view: i,
2174
2146
  index: o,
2175
- level: e - 1
2176
- }), h = c;
2147
+ level: t - 1
2148
+ }), c = h;
2177
2149
  break;
2178
2150
  }
2179
2151
  }
2180
- if (h !== null)
2181
- return h;
2152
+ if (c !== null)
2153
+ return c;
2182
2154
  }
2183
- let l = null, u = null;
2184
- s !== null && (s[z] ? l = {
2185
- view: s,
2155
+ let a = null, l = null;
2156
+ i !== null && (i[J] ? a = {
2157
+ view: i,
2186
2158
  index: o,
2187
- level: e - 1
2188
- } : l = s[W], u = {
2189
- view: s,
2159
+ level: t - 1
2160
+ } : a = i[z], l = {
2161
+ view: i,
2190
2162
  index: o,
2191
- level: e - 1
2163
+ level: t - 1
2192
2164
  });
2193
- let a = new Pe(t, !0, l);
2194
- if (a[ue] = u, e == this[V].layers.length) {
2195
- let f = new ft();
2196
- f.views = [a], this[V].layers.push(f);
2165
+ let u = new Ce(e, !0, a);
2166
+ if (u[ue] = l, t == this[U].layers.length) {
2167
+ let f = new dt();
2168
+ f.views = [u], this[U].layers.push(f);
2197
2169
  } else
2198
- this[V].layers[e].views.push(a);
2199
- return a;
2170
+ this[U].layers[t].views.push(u);
2171
+ return u;
2200
2172
  }
2201
2173
  }
2202
- const Tn = "fox-router-view", _n = "fox-router-link";
2203
- function Sr(r, t = !1) {
2204
- let e = null;
2205
- return t ? e = r.showFromClass ?? r.enterFromClass : e = r.enterFromClass, e || (e = r.transitionName, e ? t ? `${e}-show-from` : `${e}-enter-from` : null);
2174
+ const Fn = "fox-router-view", Tn = "fox-router-link";
2175
+ function Ar(r, e = !1) {
2176
+ let t = null;
2177
+ return e ? t = r.showFromClass ?? r.enterFromClass : t = r.enterFromClass, t || (t = r.transitionName, t ? e ? `${t}-show-from` : `${t}-enter-from` : null);
2206
2178
  }
2207
- function Pr(r, t = !1) {
2208
- let e = null;
2209
- return t ? e = r.showActiveClass ?? r.enterActiveClass : e = r.enterActiveClass, e || (e = r.transitionName, e ? t ? `${e}-show-active` : `${e}-enter-active` : null);
2179
+ function Er(r, e = !1) {
2180
+ let t = null;
2181
+ return e ? t = r.showActiveClass ?? r.enterActiveClass : t = r.enterActiveClass, t || (t = r.transitionName, t ? e ? `${t}-show-active` : `${t}-enter-active` : null);
2210
2182
  }
2211
- function Kn(r, t = !1) {
2212
- let e = null;
2213
- return t ? e = r.showToClass ?? r.enterToClass : e = r.enterToClass, e || (e = r.transitionName, e ? t ? `${e}-show-to` : `${e}-enter-to` : null);
2183
+ function _n(r, e = !1) {
2184
+ let t = null;
2185
+ return e ? t = r.showToClass ?? r.enterToClass : t = r.enterToClass, t || (t = r.transitionName, t ? e ? `${t}-show-to` : `${t}-enter-to` : null);
2214
2186
  }
2215
- function qn(r, t = !1) {
2216
- let e = null;
2217
- return t ? e = r.hideFromClass ?? r.leaveFromClass : e = r.leaveFromClass, e || (e = r.transitionName, e ? t ? `${e}-hide-from` : `${e}-leave-from` : null);
2187
+ function $n(r, e = !1) {
2188
+ let t = null;
2189
+ return e ? t = r.hideFromClass ?? r.leaveFromClass : t = r.leaveFromClass, t || (t = r.transitionName, t ? e ? `${t}-hide-from` : `${t}-leave-from` : null);
2218
2190
  }
2219
- function $n(r, t = !1) {
2220
- let e = null;
2221
- return t ? e = r.hideActiveClass ?? r.leaveActiveClass : e = r.leaveActiveClass, e || (e = r.transitionName, e ? t ? `${e}-hide-active` : `${e}-leave-active` : null);
2191
+ function Kn(r, e = !1) {
2192
+ let t = null;
2193
+ return e ? t = r.hideActiveClass ?? r.leaveActiveClass : t = r.leaveActiveClass, t || (t = r.transitionName, t ? e ? `${t}-hide-active` : `${t}-leave-active` : null);
2222
2194
  }
2223
- function jn(r, t = !1) {
2224
- let e = null;
2225
- return t ? e = r.hideToClass ?? r.leaveToClass : e = r.leaveToClass, e || (e = r.transitionName, e ? t ? `${e}-hide-to` : `${e}-leave-to` : null);
2195
+ function jn(r, e = !1) {
2196
+ let t = null;
2197
+ return e ? t = r.hideToClass ?? r.leaveToClass : t = r.leaveToClass, t || (t = r.transitionName, t ? e ? `${t}-hide-to` : `${t}-leave-to` : null);
2226
2198
  }
2227
- function Mn(r, t = !1) {
2228
- let e = null;
2229
- return t ? e = r.beforeShow ?? r.beforeEnter : e = r.beforeEnter, e;
2199
+ function qn(r, e = !1) {
2200
+ let t = null;
2201
+ return e ? t = r.beforeShow ?? r.beforeEnter : t = r.beforeEnter, t;
2230
2202
  }
2231
- function On(r, t = !1) {
2232
- let e = null;
2233
- return t ? e = r.show ?? r.enter : e = r.enter, e;
2203
+ function On(r, e = !1) {
2204
+ let t = null;
2205
+ return e ? t = r.show ?? r.enter : t = r.enter, t;
2234
2206
  }
2235
- function Ln(r, t = !1) {
2236
- let e = null;
2237
- return t ? e = r.afterShow ?? r.afterEnter : e = r.afterEnter, e;
2207
+ function Ln(r, e = !1) {
2208
+ let t = null;
2209
+ return e ? t = r.afterShow ?? r.afterEnter : t = r.afterEnter, t;
2238
2210
  }
2239
- function Nn(r, t = !1) {
2240
- let e = null;
2241
- return t ? e = r.showCancelled ?? r.enterCancelled : e = r.enterCancelled, e;
2211
+ function Mn(r, e = !1) {
2212
+ let t = null;
2213
+ return e ? t = r.showCancelled ?? r.enterCancelled : t = r.enterCancelled, t;
2242
2214
  }
2243
- function Hn(r, t = !1) {
2244
- let e = null;
2245
- return t ? e = r.hide ?? r.leave : e = r.leave, e;
2215
+ function Nn(r, e = !1) {
2216
+ let t = null;
2217
+ return e ? t = r.hide ?? r.leave : t = r.leave, t;
2246
2218
  }
2247
- function In(r, t = !1) {
2248
- let e = null;
2249
- return t ? e = r.afterHide ?? r.afterLeave : e = r.afterLeave, e;
2219
+ function In(r, e = !1) {
2220
+ let t = null;
2221
+ return e ? t = r.afterHide ?? r.afterLeave : t = r.afterLeave, t;
2250
2222
  }
2251
- function kn(r, t = !1) {
2252
- let e = null;
2253
- return t ? e = r.hideCancelled ?? r.leaveCancelled : e = r.leaveCancelled, e;
2223
+ function Dn(r, e = !1) {
2224
+ let t = null;
2225
+ return e ? t = r.hideCancelled ?? r.leaveCancelled : t = r.leaveCancelled, t;
2254
2226
  }
2255
- function Ht(r) {
2256
- let t, e = r.duration;
2257
- return typeof e == "object" ? t = {
2258
- enter: e.enter ?? -1,
2259
- leave: e.leave ?? -1,
2260
- show: e.show ?? -1,
2261
- hide: e.hide ?? -1
2262
- } : (typeof e == "string" && (e = e.length == 0 ? -1 : Number(e)), t = {
2263
- enter: e,
2264
- leave: e,
2265
- show: e,
2266
- hide: e
2267
- }), t;
2268
- }
2269
- function we(r, t) {
2270
- r.classList.contains(t) || r.classList.add(t);
2271
- }
2272
- function be(r, t) {
2273
- r.classList.remove(t);
2274
- }
2275
- const Vn = $e && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : setTimeout;
2276
2227
  function It(r) {
2277
- Vn(r);
2228
+ let e, t = r.duration;
2229
+ return typeof t == "object" ? e = {
2230
+ enter: t.enter ?? -1,
2231
+ leave: t.leave ?? -1,
2232
+ show: t.show ?? -1,
2233
+ hide: t.hide ?? -1
2234
+ } : (typeof t == "string" && (t = t.length == 0 ? -1 : Number(t)), e = {
2235
+ enter: t,
2236
+ leave: t,
2237
+ show: t,
2238
+ hide: t
2239
+ }), e;
2240
+ }
2241
+ function be(r, e) {
2242
+ r.classList.contains(e) || r.classList.add(e);
2243
+ }
2244
+ function xe(r, e) {
2245
+ r.classList.remove(e);
2246
+ }
2247
+ const Hn = qe && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : setTimeout;
2248
+ function Dt(r) {
2249
+ Hn(r);
2278
2250
  }
2279
- function N(r, t, e) {
2280
- S(t) && (r == null && (r = {}), Reflect.apply(t, r, e));
2251
+ function D(r, e, t) {
2252
+ S(e) && (r == null && (r = {}), Reflect.apply(e, r, t));
2281
2253
  }
2282
- function Ar(r, t, e, n = -1, i, s, o, l) {
2283
- if (S(s)) {
2284
- if (i !== void 0 && i >= 0) {
2254
+ function Fr(r, e, t, n = -1, s, i, o, a) {
2255
+ if (S(i)) {
2256
+ if (s !== void 0 && s >= 0) {
2285
2257
  setTimeout(() => {
2286
- Reflect.apply(s, r, [t, e, n]), S(l) && Reflect.apply(l, r, []);
2287
- }, i);
2258
+ Reflect.apply(i, r, [e, t, n]), S(a) && Reflect.apply(a, r, []);
2259
+ }, s);
2288
2260
  return;
2289
2261
  }
2290
- const u = ["animationend", "transitionend"], a = (f) => {
2291
- u.forEach((h) => {
2292
- _t(t, h, a);
2293
- }), Reflect.apply(s, r, [t, e, n]), l && Reflect.apply(l, r, []);
2262
+ const l = ["animationend", "transitionend"], u = (f) => {
2263
+ l.forEach((c) => {
2264
+ $t(e, c, u);
2265
+ }), Reflect.apply(i, r, [e, t, n]), a && Reflect.apply(a, r, []);
2294
2266
  };
2295
- u.forEach((f) => {
2296
- Tt(t, f, a);
2267
+ l.forEach((f) => {
2268
+ _t(e, f, u);
2297
2269
  });
2298
2270
  }
2299
2271
  if (S(o)) {
2300
- const u = "animationcancel", a = (f) => {
2301
- Reflect.apply(o, r, [t, e, n]), _t(t, u, a);
2272
+ const l = "animationcancel", u = (f) => {
2273
+ Reflect.apply(o, r, [e, t, n]), $t(e, l, u);
2302
2274
  };
2303
- Tt(t, u, a);
2275
+ _t(e, l, u);
2304
2276
  }
2305
2277
  }
2306
- function kt(r) {
2307
- return !$e || r === null ? !1 : r.opsType === C.Append || r.opsType === C.Open;
2278
+ function Ht(r) {
2279
+ return !qe || r === null ? !1 : r.opsType === A.Append || r.opsType === A.Open;
2308
2280
  }
2309
- function Cr(r, t, e, n = {}, i, s = -1) {
2310
- if (t || kt(i)) {
2311
- const o = Sr(n, t);
2312
- o && we(e, o);
2313
- const l = Pr(n, t);
2314
- l && we(e, l);
2315
- const u = Mn(n, t);
2316
- N(r, u, [e, t, i, s]);
2281
+ function Tr(r, e, t, n = {}, s, i = -1) {
2282
+ if (e || Ht(s)) {
2283
+ const o = Ar(n, e);
2284
+ o && be(t, o);
2285
+ const a = Er(n, e);
2286
+ a && be(t, a);
2287
+ const l = qn(n, e);
2288
+ D(r, l, [t, e, s, i]);
2317
2289
  }
2318
2290
  }
2319
- function Er(r, t, e, n = {}, i, s, o, l) {
2320
- if (!kt(s) && !t) {
2321
- S(l) && l(r, l, [e]);
2291
+ function _r(r, e, t, n = {}, s, i, o, a) {
2292
+ if (!Ht(i) && !e) {
2293
+ S(a) && a(r, a, [t]);
2322
2294
  return;
2323
2295
  }
2324
- const u = Sr(n, t), a = Pr(n, t), f = Kn(n, t), h = On(n, t), c = Ln(n, t), y = Nn(n, t);
2325
- It(() => {
2326
- Ar(r, e, s, o, i, () => {
2327
- a && be(e, a), f && be(e, f), S(c) && N(r, c, [e, t, s, o]), S(l) && l(r, l, [e]);
2296
+ const l = Ar(n, e), u = Er(n, e), f = _n(n, e), c = On(n, e), h = Ln(n, e), d = Mn(n, e);
2297
+ Dt(() => {
2298
+ Fr(r, t, i, o, s, () => {
2299
+ u && xe(t, u), f && xe(t, f), S(h) && D(r, h, [t, e, i, o]), S(a) && a(r, a, [t]);
2328
2300
  }, () => {
2329
- S(y) && N(r, y, [e, t, s, o]);
2330
- }), u && be(e, u), f && we(e, f), S(h) && N(r, h, [e, t, s, o]);
2301
+ S(d) && D(r, d, [t, e, i, o]);
2302
+ }), l && xe(t, l), f && be(t, f), S(c) && D(r, c, [t, e, i, o]);
2331
2303
  });
2332
2304
  }
2333
- function Fr(r, t, e, n = {}, i, s, o, l, u) {
2334
- if (!kt(o) && !t) {
2335
- !t && S(s) && s();
2305
+ function $r(r, e, t, n = {}, s, i, o, a, l) {
2306
+ if (!Ht(o) && !e) {
2307
+ !e && S(i) && i();
2336
2308
  return;
2337
2309
  }
2338
- const a = qn(n, t), f = $n(n, t), h = jn(n, t), c = Hn(n, t), y = In(n, t), d = kn(n, t);
2339
- a && we(e, a), f && we(e, f), S(c) && N(r, c, [e, t, o, l]), It(() => {
2340
- Ar(r, e, o, l, i, () => {
2341
- f && be(e, f), h && be(e, h), S(y) && N(r, y, [e, t, o, l]), S(u) && N(r, u, [e]), !t && S(s) && s();
2310
+ const u = $n(n, e), f = Kn(n, e), c = jn(n, e), h = Nn(n, e), d = In(n, e), y = Dn(n, e);
2311
+ u && be(t, u), f && be(t, f), S(h) && D(r, h, [t, e, o, a]), Dt(() => {
2312
+ Fr(r, t, o, a, s, () => {
2313
+ f && xe(t, f), c && xe(t, c), S(d) && D(r, d, [t, e, o, a]), S(l) && D(r, l, [t]), !e && S(i) && i();
2342
2314
  }, () => {
2343
- S(d) && N(r, d, [e, t, o, l]), S(u) && N(r, u, [e]), !t && S(s) && s();
2344
- }), a && be(e, a), h && we(e, h);
2315
+ S(y) && D(r, y, [t, e, o, a]), S(l) && D(r, l, [t]), !e && S(i) && i();
2316
+ }), u && xe(t, u), c && be(t, c);
2345
2317
  });
2346
2318
  }
2347
- function Kt(r, t = {}, e, n = -1) {
2348
- const i = t.mode ?? "default", s = Ht(t);
2319
+ function Kt(r, e = {}, t, n = -1) {
2320
+ const s = e.mode ?? "default", i = It(e);
2349
2321
  return {
2350
- mode: i,
2322
+ mode: s,
2351
2323
  persisted: !1,
2352
- beforeEnter: (l) => {
2353
- Cr(r, !1, l, t, e, n);
2324
+ beforeEnter: (a) => {
2325
+ Tr(r, !1, a, e, t, n);
2354
2326
  },
2355
- enter: (l) => {
2356
- Er(r, !1, l, t, s.enter, e, n);
2327
+ enter: (a) => {
2328
+ _r(r, !1, a, e, i.enter, t, n);
2357
2329
  },
2358
- leave: (l, u) => {
2359
- Fr(r, !1, l, t, s.leave, u, e, n);
2330
+ leave: (a, l) => {
2331
+ $r(r, !1, a, e, i.leave, l, t, n);
2360
2332
  },
2361
- clone: (l) => Kt(r, t, e, n)
2333
+ clone: (a) => Kt(r, e, t, n)
2362
2334
  };
2363
2335
  }
2364
- function Tr(r) {
2336
+ function Kr(r) {
2365
2337
  return r.el;
2366
2338
  }
2367
- function Dn(r, t, e = {}, n, i, s, o) {
2368
- if (s) {
2369
- const l = Tr(t);
2370
- if (l == null)
2339
+ function Vn(r, e, t = {}, n, s, i, o) {
2340
+ if (i) {
2341
+ const a = Kr(e);
2342
+ if (a == null)
2371
2343
  return;
2372
- const u = Ht(e);
2373
- Cr(r, !0, l, e, n, i), Er(r, !0, l, e, u.show, n, i, (a) => {
2374
- S(o) && N(r, o, [a]);
2344
+ const l = It(t);
2345
+ Tr(r, !0, a, t, n, s), _r(r, !0, a, t, l.show, n, s, (u) => {
2346
+ S(o) && D(r, o, [u]);
2375
2347
  });
2376
2348
  } else
2377
- S(o) && N(r, o, []);
2349
+ S(o) && D(r, o, []);
2378
2350
  }
2379
- function Bn(r, t, e = {}, n, i, s, o) {
2380
- if (s) {
2381
- const l = Tr(t);
2382
- if (l == null)
2351
+ function Bn(r, e, t = {}, n, s, i, o) {
2352
+ if (i) {
2353
+ const a = Kr(e);
2354
+ if (a == null)
2383
2355
  return;
2384
- const u = Ht(e);
2385
- Fr(r, !0, l, e, u.hide, null, n, i, (a) => {
2386
- S(o) && N(r, o, [a]);
2356
+ const l = It(t);
2357
+ $r(r, !0, a, t, l.hide, null, n, s, (u) => {
2358
+ S(o) && D(r, o, [u]);
2387
2359
  });
2388
2360
  } else
2389
- S(o) && N(r, o, []);
2361
+ S(o) && D(r, o, []);
2390
2362
  }
2391
- function Un(r, t = {}) {
2392
- It(() => {
2393
- for (let e = 0; e < r.length; e++)
2394
- Reflect.apply(r[e], t, []);
2363
+ function Un(r, e = {}) {
2364
+ Dt(() => {
2365
+ for (let t = 0; t < r.length; t++)
2366
+ Reflect.apply(r[t], e, []);
2395
2367
  });
2396
2368
  }
2397
- function re(r, t, e) {
2398
- return typeof r == "function" ? Reflect.apply(r, {}, [t, e]) : r;
2369
+ function ne(r, e, t) {
2370
+ return typeof r == "function" ? Reflect.apply(r, {}, [e, t]) : r;
2399
2371
  }
2400
- function xt(r, t) {
2372
+ function At(r, e) {
2401
2373
  if (!r)
2402
2374
  return null;
2403
- const e = r(t);
2404
- return e.length === 1 ? e[0] : e;
2375
+ const t = r(e);
2376
+ return t.length === 1 ? t[0] : t;
2405
2377
  }
2406
- class Wn {
2378
+ class kn {
2407
2379
  node;
2408
2380
  state;
2409
- constructor(t, e) {
2410
- this.node = t, this.state = e;
2381
+ constructor(e, t) {
2382
+ this.node = e, this.state = t;
2411
2383
  }
2412
2384
  }
2413
- const qt = fr({
2385
+ const jt = yr({
2414
2386
  name: "RouterView",
2415
2387
  inheritAttrs: !1,
2416
2388
  props: {
@@ -2579,48 +2551,48 @@ const qt = fr({
2579
2551
  required: !1
2580
2552
  }
2581
2553
  },
2582
- setup(r, t) {
2583
- const e = $t();
2584
- if (e === null || e.proxy === null) {
2554
+ setup(r, e) {
2555
+ const t = qt();
2556
+ if (t === null || t.proxy === null) {
2585
2557
  console.error("instance or instance.proxy not exist");
2586
2558
  return;
2587
2559
  }
2588
- const n = r.multi === !0, i = G(Ze, null), s = G(lt, 0), o = G(Qt, null), l = G(ut, -1);
2589
- let u = null;
2590
- const a = r.modelSlot;
2591
- if (a) {
2592
- Z(lt, s + 1), Z(ut, a.index), Z(at, a.index);
2593
- const h = a.route;
2594
- if (!h) {
2560
+ const n = r.multi === !0, s = G(rt, null), i = G(ft, 0), o = G(Zt, null), a = G(ct, -1);
2561
+ let l = null;
2562
+ const u = r.modelSlot;
2563
+ if (u) {
2564
+ ee(ft, i + 1), ee(ct, u.index), ee(ht, u.index);
2565
+ const c = u.route;
2566
+ if (!c) {
2595
2567
  console.warn("child view render error, route not exist");
2596
2568
  return;
2597
2569
  }
2598
- const c = Ue(e.proxy, !0);
2599
- nn(c), ot(c, h);
2570
+ const h = ze(t.proxy, !0);
2571
+ nn(h), ut(h, c);
2600
2572
  } else {
2601
- if (i == null) {
2573
+ if (s == null) {
2602
2574
  console.error("router is not been injected");
2603
2575
  return;
2604
2576
  }
2605
- const h = r.name, c = G(Xt, null), y = G(at, 0);
2606
- if (u = i[mr](h, s, o, l, c, y), u === null)
2577
+ const c = r.name, h = G(er, null), d = G(ht, 0);
2578
+ if (l = s[wr](c, i, o, a, h, d), l === null)
2607
2579
  return;
2608
- if (Z(Xt, u), u[z] === !0 && Z(Qt, u), !n) {
2609
- Z(ut, -1), Z(lt, s + 1), Z(at, -1);
2610
- const g = u.slots.value;
2611
- if (g.length > 0) {
2612
- const v = g[0].route;
2613
- if (v) {
2614
- const m = Ue(e.proxy, !0);
2615
- ot(m, v);
2580
+ if (ee(er, l), l[J] === !0 && ee(Zt, l), !n) {
2581
+ ee(ct, -1), ee(ft, i + 1), ee(ht, -1);
2582
+ const v = l.slots.value;
2583
+ if (v.length > 0) {
2584
+ const p = v[0].route;
2585
+ if (p) {
2586
+ const m = ze(t.proxy, !0);
2587
+ ut(m, p);
2616
2588
  }
2617
2589
  } else {
2618
- const v = Ue(e.proxy, !0);
2619
- u.compensation = () => {
2620
- const m = u.slots.value;
2590
+ const p = ze(t.proxy, !0);
2591
+ l.compensation = () => {
2592
+ const m = l.slots.value;
2621
2593
  if (m.length > 0) {
2622
2594
  const w = m[0].route;
2623
- return w && ot(v, w), !0;
2595
+ return w && ut(p, w), !0;
2624
2596
  }
2625
2597
  return !1;
2626
2598
  };
@@ -2628,93 +2600,93 @@ const qt = fr({
2628
2600
  }
2629
2601
  }
2630
2602
  const f = { value: /* @__PURE__ */ new Map() };
2631
- return Ye(() => {
2603
+ return tt(() => {
2632
2604
  f.value && f.value.clear();
2633
2605
  }), () => {
2634
2606
  if (n) {
2635
- const h = /* @__PURE__ */ new Map(), c = [], y = u?.slots.value, d = [];
2636
- for (let m = 0; m < y.length; m++) {
2637
- const w = y[m], F = `${r.name}-${w.index}`, b = re(r.transition, w.route, m) ?? !0, P = { modelSlot: w };
2638
- let R;
2639
- t.slots.default ? R = le(qt, P, { default: t.slots.default }) : R = le(qt, P);
2640
- const q = {}, T = re(r.viewClass, w.route, m);
2641
- typeof T == "string" && T.length > 0 && (q[T] = !0);
2642
- const _ = re(r.viewActiveClass, w.route, m), M = re(r.viewInactiveClass, w.route, m), B = f.value.get(F);
2643
- if (typeof _ == "string" && _.length > 0 && (q[_] = w.active), typeof M == "string" && M.length > 0 && (q[M] = !w.active), B && w.active !== B.state) {
2644
- const fe = B.node;
2645
- w.active ? d.unshift(() => {
2646
- const rt = () => {
2647
- let Re = Gt(fe);
2648
- Re != null && Jt(Re, Et.ACTIVATED);
2607
+ const c = /* @__PURE__ */ new Map(), h = [], d = l?.slots.value, y = [];
2608
+ for (let m = 0; m < d.length; m++) {
2609
+ const w = d[m], F = `${r.name}-${w.index}`, b = ne(r.transition, w.route, m) ?? !0, P = { modelSlot: w };
2610
+ let x;
2611
+ e.slots.default ? x = ae(jt, P, { default: e.slots.default }) : x = ae(jt, P);
2612
+ const K = {}, T = ne(r.viewClass, w.route, m);
2613
+ typeof T == "string" && T.length > 0 && (K[T] = !0);
2614
+ const _ = ne(r.viewActiveClass, w.route, m), O = ne(r.viewInactiveClass, w.route, m), k = f.value.get(F);
2615
+ if (typeof _ == "string" && _.length > 0 && (K[_] = w.active), typeof O == "string" && O.length > 0 && (K[O] = !w.active), k && w.active !== k.state) {
2616
+ const ce = k.node;
2617
+ w.active ? y.unshift(() => {
2618
+ const it = () => {
2619
+ let Re = Xt(ce);
2620
+ Re != null && Yt(Re, Ft.ACTIVATED);
2649
2621
  };
2650
- Dn(e, fe, r, w.route, m, b, rt);
2651
- }) : d.push(() => {
2652
- const rt = () => {
2653
- const Re = Gt(fe);
2654
- Re != null && Jt(Re, Et.DEACTIVATED);
2622
+ Vn(t, ce, r, w.route, m, b, it);
2623
+ }) : y.push(() => {
2624
+ const it = () => {
2625
+ const Re = Xt(ce);
2626
+ Re != null && Yt(Re, Ft.DEACTIVATED);
2655
2627
  };
2656
- Bn(e, fe, r, w.route, m, b, rt);
2628
+ Bn(t, ce, r, w.route, m, b, it);
2657
2629
  });
2658
2630
  }
2659
- const U = {
2660
- class: q,
2631
+ const W = {
2632
+ class: K,
2661
2633
  key: F
2662
- }, et = re(r.viewTagProps, w.route, m);
2663
- et !== null && typeof et == "object" && K(!0, U, et), w.route?.viewTagAttrs && typeof w.route?.viewTagAttrs == "object" && K(!0, U, w.route.viewTagAttrs);
2664
- const jr = re(r.viewTag, w.route, m), tt = le(jr, U, { default: () => [R] });
2665
- if (h.set(F, new Wn(tt, w.active)), f.value.delete(F), b) {
2666
- const fe = Kt(e, r, w.route, m);
2667
- tt.transition = fe;
2634
+ }, nt = ne(r.viewTagProps, w.route, m);
2635
+ nt !== null && typeof nt == "object" && $(!0, W, nt), w.route?.viewTagAttrs && typeof w.route?.viewTagAttrs == "object" && $(!0, W, w.route.viewTagAttrs);
2636
+ const Nr = ne(r.viewTag, w.route, m), st = ae(Nr, W, { default: () => [x] });
2637
+ if (c.set(F, new kn(st, w.active)), f.value.delete(F), b) {
2638
+ const ce = Kt(t, r, w.route, m);
2639
+ st.transition = ce;
2668
2640
  }
2669
- c.push(tt);
2641
+ h.push(st);
2670
2642
  }
2671
2643
  f.value.forEach((m) => {
2672
2644
  m.node.transition = null;
2673
- }), f.value = h, Un(d, e);
2674
- const g = re(r.tag, null, -1), v = {};
2675
- return Object.assign(v, t.attrs), le(g, v, { default: () => c });
2676
- } else if (a != null) {
2677
- const h = a.model, c = {};
2678
- h.props && (typeof h.props == "object" ? K(!1, c, h.props) : h.props === !0 && typeof a.route?.params == "object" && K(!1, c, a.route?.params));
2679
- const y = le(h.component, c);
2680
- return xt(t.slots.default, { Component: y, route: a.route }) ?? y;
2645
+ }), f.value = c, Un(y, t);
2646
+ const v = ne(r.tag, null, -1), p = {};
2647
+ return Object.assign(p, e.attrs), ae(v, p, { default: () => h });
2648
+ } else if (u != null) {
2649
+ const c = u.model, h = {};
2650
+ c.props && (typeof c.props == "object" ? $(!1, h, c.props) : c.props === !0 && typeof u.route?.params == "object" && $(!1, h, u.route?.params));
2651
+ const d = ae(c.component, h);
2652
+ return At(e.slots.default, { Component: d, route: u.route }) ?? d;
2681
2653
  } else {
2682
- const h = u.slots.value;
2683
- if (h.length > 0) {
2684
- const c = h[0], y = c.model, d = {};
2685
- y.props && (typeof y.props == "object" ? K(!1, d, y.props) : y.props === !0 && typeof c.route?.params == "object" && K(!1, d, c.route?.params));
2686
- const g = le(y.component, d);
2687
- if (re(r.transition, c.route, -1) ?? !0) {
2688
- const m = Kt(e, r, c.route, -1);
2689
- g.transition = m;
2654
+ const c = l.slots.value;
2655
+ if (c.length > 0) {
2656
+ const h = c[0], d = h.model, y = {};
2657
+ d.props && (typeof d.props == "object" ? $(!1, y, d.props) : d.props === !0 && typeof h.route?.params == "object" && $(!1, y, h.route?.params));
2658
+ const v = ae(d.component, y);
2659
+ if (ne(r.transition, h.route, -1) ?? !0) {
2660
+ const m = Kt(t, r, h.route, -1);
2661
+ v.transition = m;
2690
2662
  }
2691
- return xt(t.slots.default, { Component: g, route: c.route }) ?? g;
2663
+ return At(e.slots.default, { Component: v, route: h.route }) ?? v;
2692
2664
  } else
2693
- return xt(t.slots.fallback, {});
2665
+ return At(e.slots.fallback, {});
2694
2666
  }
2695
2667
  };
2696
2668
  }
2697
2669
  });
2698
- function zn(r) {
2670
+ function Wn(r) {
2699
2671
  if (!(r.metaKey || r.altKey || r.ctrlKey || r.shiftKey) && !r.defaultPrevented && !(r.button != null && r.button !== 0)) {
2700
2672
  if (r.currentTarget && r.currentTarget.getAttribute) {
2701
- const t = r.currentTarget.getAttribute("target");
2702
- if (/\b_blank\b/i.test(t))
2673
+ const e = r.currentTarget.getAttribute("target");
2674
+ if (/\b_blank\b/i.test(e))
2703
2675
  return;
2704
2676
  }
2705
2677
  return r.preventDefault && r.preventDefault(), !0;
2706
2678
  }
2707
2679
  }
2708
- function Gn(r, t) {
2709
- return r == null || t == null ? !1 : !!(r === t || r.path && r.path === t.path || r.name && r.name === t.name);
2680
+ function zn(r, e) {
2681
+ return r == null || e == null ? !1 : !!(r === e || r.path && r.path === e.path || r.name && r.name === e.name);
2710
2682
  }
2711
- function Jn(r, t) {
2712
- return r == null || t == null ? !1 : !!(r.path && t.path && t.path.startsWith(r.path) || r.name && r.name == t.name);
2683
+ function Jn(r, e) {
2684
+ return r == null || e == null ? !1 : !!(r.path && e.path && e.path.startsWith(r.path) || r.name && r.name == e.name);
2713
2685
  }
2714
- function me(r, t) {
2715
- return typeof r == "function" ? Reflect.apply(r, {}, [t]) : r;
2686
+ function ve(r, e) {
2687
+ return typeof r == "function" ? Reflect.apply(r, {}, [e]) : r;
2716
2688
  }
2717
- let Qn = fr({
2689
+ let Gn = yr({
2718
2690
  name: "RouterLink",
2719
2691
  inheritAttrs: !1,
2720
2692
  props: {
@@ -2750,235 +2722,607 @@ let Qn = fr({
2750
2722
  default: "onClick"
2751
2723
  }
2752
2724
  },
2753
- setup(r, t) {
2754
- const e = G(Ze, null);
2725
+ setup(r, e) {
2726
+ const t = G(rt, null);
2755
2727
  return () => {
2756
- let n = me(r.to, null), i = me(r.tag, n);
2757
- if (i == null) {
2728
+ let n = ve(r.to, null), s = ve(r.tag, n);
2729
+ if (s == null) {
2758
2730
  console.warn("can not resolve link tag");
2759
2731
  return;
2760
2732
  }
2761
- let s = null, o = null;
2762
- e !== null && (s = e[L](n), r.root && (s.root = r.root), o = e.current);
2763
- let l = {}, u = me(r.activeClass, s);
2764
- if (typeof u == "string" && u.length > 0 && (l[u] = Jn(s, o)), me(r.exact, s) === !0) {
2765
- let c = me(r.exactActiveClass, s);
2766
- typeof c == "string" && c.length > 0 && (l[c] = Gn(s, o));
2733
+ let i = null, o = null;
2734
+ t !== null && (i = t[I](n), r.root && (i.root = r.root), o = t.current);
2735
+ let a = {}, l = ve(r.activeClass, i);
2736
+ if (typeof l == "string" && l.length > 0 && (a[l] = Jn(i, o)), ve(r.exact, i) === !0) {
2737
+ let h = ve(r.exactActiveClass, i);
2738
+ typeof h == "string" && h.length > 0 && (a[h] = zn(i, o));
2767
2739
  }
2768
2740
  let f = {
2769
- class: l
2741
+ class: a
2770
2742
  };
2771
- (i === "a" || i === "A") && (f.href = s?.path ?? s?.name ?? "#"), K(!0, f, t.attrs);
2772
- let h = me(r.event, s);
2773
- if (typeof h == "string") {
2774
- const c = (y) => {
2775
- if (e == null) {
2743
+ (s === "a" || s === "A") && (f.href = i?.path ?? i?.name ?? "#"), $(!0, f, e.attrs);
2744
+ let c = ve(r.event, i);
2745
+ if (typeof c == "string") {
2746
+ const h = (d) => {
2747
+ if (t == null) {
2776
2748
  console.warn("router is not been injected");
2777
2749
  return;
2778
2750
  }
2779
- if (s == null) {
2751
+ if (i == null) {
2780
2752
  console.warn("route is not been resolved");
2781
2753
  return;
2782
2754
  }
2783
- zn(y) && e.to(s);
2755
+ Wn(d) && t.to(i);
2784
2756
  };
2785
- f[h] = c;
2757
+ f[c] = h;
2786
2758
  }
2787
- return le(i, f, t.slots);
2759
+ return ae(s, f, e.slots);
2788
2760
  };
2789
2761
  }
2790
- }), Xn = {
2791
- get each() {
2792
- return zr;
2793
- },
2794
- get type() {
2795
- return Je;
2796
- },
2797
- get isFunction() {
2798
- return S;
2799
- },
2800
- get isArray() {
2801
- return Hr;
2802
- },
2803
- get isArrayLike() {
2804
- return Mt;
2805
- },
2806
- get makeArray() {
2807
- return Wr;
2808
- },
2809
- get merge() {
2810
- return yr;
2811
- },
2812
- get isWindow() {
2813
- return hr;
2814
- },
2815
- get isPlainObject() {
2816
- return St;
2817
- },
2818
- get isEqual() {
2819
- return Pt;
2762
+ });
2763
+ var L = /* @__PURE__ */ ((r) => (r[r.Loading = 0] = "Loading", r[r.Loaded = 1] = "Loaded", r[r.Defining = 2] = "Defining", r[r.Defined = 3] = "Defined", r))(L || {}), Qe = /* @__PURE__ */ ((r) => (r[r.normal = 0] = "normal", r[r.factory = 1] = "factory", r))(Qe || {});
2764
+ class Qn {
2765
+ register = /* @__PURE__ */ new Map();
2766
+ constructor() {
2820
2767
  }
2821
- };
2822
- const _r = Symbol("fk"), Kr = Symbol("fbk"), qr = Symbol("fepk");
2823
- function ai(r = {}) {
2824
- const t = new Fn(r), e = new Bt(), n = new zt(), i = {
2825
- ...Xn,
2768
+ get(e) {
2769
+ return this.register.get(e) ?? null;
2770
+ }
2771
+ set(e, t) {
2772
+ this.register.set(e, t);
2773
+ }
2774
+ remove(e) {
2775
+ let t = this.register.get(e);
2776
+ return this.register.delete(e), t ?? null;
2777
+ }
2778
+ has(e) {
2779
+ return this.register.has(e);
2780
+ }
2781
+ clear() {
2782
+ this.register.clear();
2783
+ }
2784
+ }
2785
+ class hr {
2786
+ moduleManager = new Qn();
2787
+ options = {
2788
+ paths: {},
2789
+ alias: {},
2790
+ nature: [],
2791
+ timeout: 3e3
2792
+ };
2793
+ set paths(e) {
2794
+ this.options.paths = e;
2795
+ }
2796
+ get paths() {
2797
+ return this.options.paths;
2798
+ }
2799
+ set alias(e) {
2800
+ this.options.alias = e;
2801
+ }
2802
+ get alias() {
2803
+ return this.options.alias;
2804
+ }
2805
+ set naturePaths(e) {
2806
+ this.options.nature = e;
2807
+ }
2808
+ get naturePaths() {
2809
+ return this.options.nature;
2810
+ }
2811
+ set timeout(e) {
2812
+ this.options.timeout = e;
2813
+ }
2814
+ get timeout() {
2815
+ return this.options.timeout;
2816
+ }
2817
+ _query;
2818
+ set query(e) {
2819
+ this._query = e;
2820
+ }
2821
+ get query() {
2822
+ return this._query;
2823
+ }
2824
+ get head() {
2825
+ return Le().head;
2826
+ }
2827
+ constructor() {
2828
+ }
2829
+ setModule(e, t) {
2830
+ const n = {
2831
+ id: e,
2832
+ src: "",
2833
+ status: L.Defined
2834
+ };
2835
+ typeof t == "function" ? (n.exports = t, n.type = Qe.factory) : n.exports = t, this.moduleManager.set(e, n);
2836
+ }
2837
+ removeModule(e) {
2838
+ this.moduleManager.remove(e);
2839
+ }
2840
+ ensure(...e) {
2841
+ const t = [];
2842
+ let n = e.length - 1;
2843
+ const s = {};
2844
+ typeof e[n] == "object" && (Object.assign(s, e[n]), n--);
2845
+ let i = null;
2846
+ typeof e[n] == "function" && (i = e[n], n--);
2847
+ for (let l = 0; l <= n; l++)
2848
+ if (Array.isArray(e[l])) {
2849
+ let u = e[l];
2850
+ for (let f = 0; f < u.length; f++)
2851
+ u[f] && t.push(this.resolvePath(u[f]));
2852
+ } else if (typeof e[l] == "string") {
2853
+ let u = e[l].split(",");
2854
+ for (let f = 0; f < u.length; f++)
2855
+ u[f] && t.push(this.resolvePath(u[f]));
2856
+ }
2857
+ const o = new Xn(t.length, (l, u) => {
2858
+ if (o.isOK())
2859
+ try {
2860
+ typeof i == "function" && Reflect.apply(i, {}, u);
2861
+ } catch (f) {
2862
+ console.error(f.message, f);
2863
+ }
2864
+ else
2865
+ try {
2866
+ console.error(l), typeof i == "function" && Reflect.apply(i, {}, []);
2867
+ } catch (f) {
2868
+ console.error(f.message, f);
2869
+ }
2870
+ }), a = new Ze();
2871
+ for (let l = 0; l < t.length; l++) {
2872
+ const u = new Yn(l, t[l], s, o);
2873
+ this.mount(a, u);
2874
+ }
2875
+ return this;
2876
+ }
2877
+ remove(...e) {
2878
+ let t = [], n = e.length - 1, s = {};
2879
+ typeof e[n] == "object" && (Object.assign(s, e[n]), n--);
2880
+ let i = null;
2881
+ typeof e[n] == "function" && (i = e[n], n--);
2882
+ for (let o = 0; o <= n; o++)
2883
+ if (Array.isArray(e[o])) {
2884
+ let a = e[o];
2885
+ for (let l = 0; l < a.length; l++)
2886
+ a[l] && t.push(this.resolvePath(a[l]));
2887
+ } else {
2888
+ let a = e[o].split(",");
2889
+ for (let l = 0; l < a.length; l++)
2890
+ a[l] && t.push(this.resolvePath(a[l]));
2891
+ }
2892
+ return t.forEach((o) => {
2893
+ this.unmount(o, s);
2894
+ }), typeof i == "function" && Reflect.apply(i, {}, []), this;
2895
+ }
2896
+ mount(e, t) {
2897
+ if (t.src === "exports") {
2898
+ e.post((s) => {
2899
+ t.progress.work(!0, t.index, "exports"), s.resolve();
2900
+ });
2901
+ return;
2902
+ } else if (t.src === "module") {
2903
+ e.post((s) => {
2904
+ t.progress.work(!0, t.index, "module"), s.resolve();
2905
+ });
2906
+ return;
2907
+ }
2908
+ if (this.isNaturePath(t.src)) {
2909
+ let s = t.params.jsPoint;
2910
+ s || (s = this.head), this.mountJS(e, t, s);
2911
+ return;
2912
+ } else if (this.isNaturePath(t.src)) {
2913
+ let s = t.params.cssPoint;
2914
+ s || (s = this.head), this.mountCSS(e, t, s);
2915
+ return;
2916
+ }
2917
+ let n = this.getFileNamePostfix(t.src);
2918
+ if (n === "js" || n.length === 0) {
2919
+ let s = t.params.jsPoint;
2920
+ s || (s = this.head), this.mountJS(e, t, s);
2921
+ return;
2922
+ } else if (n === "css") {
2923
+ let s = t.params.cssPoint;
2924
+ s || (s = this.head), this.mountCSS(e, t, s);
2925
+ return;
2926
+ }
2927
+ }
2928
+ mountCSS(e, t, n) {
2929
+ e.post((s) => {
2930
+ const i = t.src, o = this.moduleManager.get(i);
2931
+ if (o && (o.status == L.Defined || o.status == L.Loaded) && o.exports) {
2932
+ o.type === Qe.factory && typeof o.exports == "function" ? t.progress.work(!0, t.index, o.exports()) : t.progress.work(!0, t.index, o.exports), s.resolve();
2933
+ return;
2934
+ }
2935
+ const a = Le(), l = a.createElement("link");
2936
+ if (Reflect.has(l, "onload"))
2937
+ l.onload = () => {
2938
+ l.onload = null, l.onerror = null, t.progress.work(!0, t.index, t.src), s.resolve();
2939
+ }, l.onerror = () => {
2940
+ try {
2941
+ n.removeChild(l);
2942
+ } catch (c) {
2943
+ console.error(c.message, c);
2944
+ }
2945
+ l.onload = null, l.onerror = null, t.progress.work(!1, t.index, null), s.reject();
2946
+ };
2947
+ else {
2948
+ const c = {
2949
+ timeout: this.options.timeout ?? 3e3,
2950
+ time: 0,
2951
+ success: () => {
2952
+ t.progress.work(!0, t.index, t.src), s.resolve();
2953
+ },
2954
+ error: () => {
2955
+ try {
2956
+ n.removeChild(l);
2957
+ } catch (h) {
2958
+ console.error(h.message, h);
2959
+ }
2960
+ t.progress.work(!1, t.index, null), s.resolve();
2961
+ }
2962
+ };
2963
+ setTimeout(() => {
2964
+ jr(l, c);
2965
+ }, 1);
2966
+ }
2967
+ let f = a.getElementById(i);
2968
+ f && f.parentNode && f.parentNode.removeChild(f), l.rel = "stylesheet", l.type = "text/css", l.id = i, l.href = i, n.appendChild(l);
2969
+ });
2970
+ }
2971
+ mountJS(e, t, n) {
2972
+ e.post((s) => {
2973
+ const i = t.src;
2974
+ let o = this.moduleManager.get(i);
2975
+ if (o && (o.status == L.Defined || o.status == L.Loaded)) {
2976
+ if (o.exports) {
2977
+ o.type === Qe.factory && typeof o.exports == "function" ? t.progress.work(!0, t.index, o.exports()) : t.progress.work(!0, t.index, o.exports), s.resolve();
2978
+ return;
2979
+ }
2980
+ if (document.querySelector(`script[src='${i}`)) {
2981
+ t.progress.work(!0, t.index, o.exports), s.resolve();
2982
+ return;
2983
+ }
2984
+ }
2985
+ o = {
2986
+ id: i,
2987
+ src: i,
2988
+ status: L.Loading
2989
+ }, this.moduleManager.set(i, o);
2990
+ const l = Le().createElement("script");
2991
+ if ("onload" in l)
2992
+ l.onload = () => {
2993
+ l.onload = null, l.onerror = null, o.status == L.Loading && (o.status = L.Loaded, t.progress.work(!0, t.index, i)), s.resolve();
2994
+ }, l.onerror = () => {
2995
+ try {
2996
+ n.removeChild(l);
2997
+ } catch (c) {
2998
+ console.error(c.message, c);
2999
+ }
3000
+ l.onload = null, l.onerror = null, this.moduleManager.remove(i), t.progress.work(!1, t.index, null), s.resolve();
3001
+ };
3002
+ else {
3003
+ const c = l;
3004
+ c.onreadystatechange = () => {
3005
+ /loaded|complete/.test(c.readyState) && (c.onreadystatechange = null, o.status == L.Loading && (o.status = L.Loaded, t.progress.work(!0, t.index, i)), s.resolve());
3006
+ };
3007
+ }
3008
+ l.defer = !0, l.src = i;
3009
+ const f = M();
3010
+ f.define = this.createDefine(o, t), n.appendChild(l);
3011
+ });
3012
+ }
3013
+ unmount(e, t = {}) {
3014
+ const n = Le(), s = this.getFileNamePostfix(e);
3015
+ if (s === "js" || s.length === 0) {
3016
+ const i = n.querySelector(`script[src="${e}"]`);
3017
+ i && i.parentNode && i.parentNode.removeChild(i), this.moduleManager.remove(e);
3018
+ return;
3019
+ } else if (s === "css") {
3020
+ const i = n.querySelector(`style[href="${e}"]`);
3021
+ i && i.parentNode && i.parentNode.removeChild(i);
3022
+ return;
3023
+ }
3024
+ }
3025
+ trimEmptyElement(e) {
3026
+ let t = [];
3027
+ for (let n = 0; n < e.length; n++) {
3028
+ if (e[n] === void 0 || e[n] === null)
3029
+ continue;
3030
+ const s = e[n].trim();
3031
+ s.length !== 0 && t.push(s);
3032
+ }
3033
+ return t;
3034
+ }
3035
+ createDefine(e, t) {
3036
+ const n = this, s = function(...i) {
3037
+ e.status = L.Defining;
3038
+ let o, a, l, u = i.length;
3039
+ u === 1 ? (l = i[0], o = void 0) : u === 2 ? (l = i[1], Array.isArray(i[0]) ? (a = n.trimEmptyElement(i[0]), o = void 0) : a = void 0) : (o = i[0], a = n.trimEmptyElement(i[1]), l = i[2]), o && (e.id = o, n.options.alias[o] = e.src), a && a.length > 0 ? n.ensure(a, (...f) => {
3040
+ const c = f.map((h) => h === "exports" ? ((!e.exports || typeof e.exports != "object") && (e.exports = {}), e.exports) : h === "module" ? e : h);
3041
+ if (typeof l == "function") {
3042
+ const h = Reflect.apply(l, e, c);
3043
+ h && typeof h == "object" && (e.exports = h);
3044
+ } else
3045
+ e.exports = l;
3046
+ e.status = L.Defined, t.progress.work(!0, t.index, e.exports);
3047
+ }) : (typeof l == "function" ? e.exports = Reflect.apply(l, e, []) : e.exports = l, e.status = L.Defined, t.progress.work(!0, t.index, e.exports));
3048
+ };
3049
+ return s.amd = !0, s;
3050
+ }
3051
+ resolvePath(e) {
3052
+ try {
3053
+ if (e === "exports" || e === "module" || this.isNaturePath(e))
3054
+ return e;
3055
+ e = this.parserPath(e, !0);
3056
+ let t = this.getFileNamePostfix(e);
3057
+ t = t.toLowerCase();
3058
+ let n = this.createSearch(this.query);
3059
+ return e.indexOf("?") == -1 ? (t !== "js" && t !== "css" && (e += ".js"), n.length > 0 && (e += `?${n}`)) : n.length > 0 && (e += `&${n}`), e;
3060
+ } catch (t) {
3061
+ throw console.error(`resolve path[${e}] fail`, t), t;
3062
+ }
3063
+ }
3064
+ createSearch(e) {
3065
+ let t = "";
3066
+ if (e) {
3067
+ for (let n in e) {
3068
+ let s = `${e[n]}`;
3069
+ t += `${encodeURIComponent(n)}=${encodeURIComponent(s)}&`;
3070
+ }
3071
+ t.length > 0 && (t = t.substring(0, t.length - 1));
3072
+ }
3073
+ return t;
3074
+ }
3075
+ getFileNamePostfix(e) {
3076
+ let t = e.lastIndexOf("?");
3077
+ t == -1 && (t = e.length);
3078
+ let n = e.lastIndexOf(".", t);
3079
+ return n == -1 ? "" : e.substring(n + 1, t);
3080
+ }
3081
+ isNaturePath(e) {
3082
+ if (!this.options.nature)
3083
+ return !1;
3084
+ if (typeof this.options.nature == "function")
3085
+ return this.options.nature(e);
3086
+ const t = this.options.nature;
3087
+ if (t && Array.isArray(t))
3088
+ for (let n = 0; n < t.length; n++) {
3089
+ const s = t[n];
3090
+ if (e.indexOf(s) === 0)
3091
+ return !0;
3092
+ }
3093
+ return !1;
3094
+ }
3095
+ parserPath(e, t) {
3096
+ if (e.indexOf("http://") == 0 || e.indexOf("https://") == 0 || e.indexOf("file:///") == 0)
3097
+ return e;
3098
+ if (e.indexOf("/") == 0)
3099
+ return `${yt()}${e.slice(1)}`;
3100
+ if (e.indexOf("./") == 0)
3101
+ return `${yt()}${e.slice(2)}`;
3102
+ if (e.indexOf("//") == 0)
3103
+ return `${M().location.protocol}${e}`;
3104
+ if (t) {
3105
+ let s = this.options.alias[e];
3106
+ if (!s) {
3107
+ let i = e.indexOf("/");
3108
+ if (i == -1)
3109
+ s = e;
3110
+ else {
3111
+ let o = e.slice(0, i), a = this.options.paths[o];
3112
+ a ? s = a + e.slice(i) : s = e;
3113
+ }
3114
+ }
3115
+ return this.parserPath(s, !1);
3116
+ }
3117
+ return `${yt()}${e}`;
3118
+ }
3119
+ }
3120
+ function jr(r, e) {
3121
+ let t = r.sheet, n = !1;
3122
+ if (e.isOldWebKit)
3123
+ t && (n = !0);
3124
+ else if (t)
3125
+ try {
3126
+ t.cssRules && (n = !0);
3127
+ } catch (s) {
3128
+ s.name === "NS_ERROR_DOM_SECURITY_ERR" && (n = !0);
3129
+ }
3130
+ setTimeout(() => {
3131
+ e.time += 20, n ? e.success() : e.timeout > e.timeout ? e.error() : jr(r, e);
3132
+ }, 20);
3133
+ }
3134
+ class Xn {
3135
+ callback;
3136
+ values;
3137
+ status;
3138
+ size;
3139
+ lastIndex;
3140
+ constructor(e, t) {
3141
+ this.size = e, this.callback = t, this.status = !0, this.values = [], this.lastIndex = -1;
3142
+ }
3143
+ work(e, t, n) {
3144
+ if (this.status = e, this.status === !0 && (this.lastIndex !== t && this.size--, this.lastIndex = t, this.values.push(n)), this.size === 0 || this.status === !1)
3145
+ try {
3146
+ Reflect.apply(this.callback, this, [this.status, this.values]);
3147
+ } catch (s) {
3148
+ console.error(s.message, s);
3149
+ }
3150
+ }
3151
+ isOK() {
3152
+ return this.status;
3153
+ }
3154
+ }
3155
+ class Yn {
3156
+ index;
3157
+ src;
3158
+ params;
3159
+ progress;
3160
+ constructor(e, t, n, s) {
3161
+ this.index = e, this.src = t, this.params = n, this.progress = s;
3162
+ }
3163
+ }
3164
+ const qr = Symbol("fk"), Or = Symbol("fbk"), Lr = Symbol("fepk");
3165
+ function cs(r = {}) {
3166
+ const e = new En(r), t = new zt(), n = new Qt(), s = new hr(), i = {
2826
3167
  get router() {
2827
- return t;
3168
+ return e;
2828
3169
  },
2829
3170
  get bus() {
2830
- return e;
3171
+ return t;
2831
3172
  },
2832
3173
  get Bus() {
2833
- return Bt;
3174
+ return zt;
3175
+ },
3176
+ get EventProxy() {
3177
+ return Qt;
2834
3178
  },
2835
3179
  get eventproxy() {
2836
3180
  return n;
2837
3181
  },
2838
- get EventProxy() {
2839
- return zt;
2840
- },
2841
3182
  get EventChain() {
2842
- return At;
3183
+ return Ze;
2843
3184
  },
2844
- get require() {
2845
- return t.require;
3185
+ get Require() {
3186
+ return hr;
2846
3187
  },
2847
- get request() {
2848
- return request;
3188
+ get require() {
3189
+ return s;
2849
3190
  },
2850
3191
  get extend() {
2851
- return K;
3192
+ return $;
2852
3193
  },
2853
3194
  get clone() {
2854
- return Ge;
3195
+ return Xe;
3196
+ },
3197
+ get isESModule() {
3198
+ return pr;
2855
3199
  },
2856
- install(s) {
2857
- s.provide(Ze, t), s.provide(_r, i), s.provide(Kr, e), s.provide(qr, n), s.component(Tn, qt), s.component(_n, Qn), Reflect.defineProperty(s.config.globalProperties, "$fox", {
3200
+ install(o) {
3201
+ o.provide(rt, e), o.provide(qr, i), o.provide(Or, t), o.provide(Lr, n), o.component(Fn, jt), o.component(Tn, Gn), Reflect.defineProperty(o.config.globalProperties, "$fox", {
2858
3202
  get() {
2859
3203
  return i;
2860
3204
  }
2861
- }), Reflect.defineProperty(s.config.globalProperties, "$router", {
3205
+ }), Reflect.defineProperty(o.config.globalProperties, "$router", {
2862
3206
  get() {
2863
- return t;
3207
+ return e;
2864
3208
  }
2865
- }), Reflect.defineProperty(s.config.globalProperties, "$bus", {
3209
+ }), Reflect.defineProperty(o.config.globalProperties, "$bus", {
2866
3210
  get() {
2867
- return e;
3211
+ return t;
2868
3212
  }
2869
- }), Reflect.defineProperty(s.config.globalProperties, "$bus", {
3213
+ }), Reflect.defineProperty(o.config.globalProperties, "$bus", {
2870
3214
  get() {
2871
- return e;
3215
+ return t;
2872
3216
  }
2873
- }), Reflect.defineProperty(s.config.globalProperties, "$eventProxy", {
3217
+ }), Reflect.defineProperty(o.config.globalProperties, "$eventProxy", {
2874
3218
  get() {
2875
3219
  return n;
2876
3220
  }
2877
- }), s.config.globalProperties.$fox_on = function(o, l, u = !1) {
2878
- n.on(o, l, u);
2879
- }, s.config.globalProperties.$fox_off = function(o, l) {
2880
- n.off(o, l);
2881
- }, s.config.globalProperties.$fox_once = function(o, l) {
2882
- n.once(o, l);
2883
- }, s.config.globalProperties.$fox_all = function(...o) {
3221
+ }), o.config.globalProperties.$fox_on = function(a, l, u = !1) {
3222
+ n.on(a, l, u);
3223
+ }, o.config.globalProperties.$fox_off = function(a, l) {
3224
+ n.off(a, l);
3225
+ }, o.config.globalProperties.$fox_once = function(a, l) {
3226
+ n.once(a, l);
3227
+ }, o.config.globalProperties.$fox_all = function(...a) {
2884
3228
  let l = n;
2885
- Reflect.apply(l.all, l, o);
2886
- }, s.config.globalProperties.$fox_trigger = function(o, ...l) {
3229
+ Reflect.apply(l.all, l, a);
3230
+ }, o.config.globalProperties.$fox_trigger = function(a, ...l) {
2887
3231
  let u = n;
2888
- Reflect.apply(u.trigger, u, [o, ...l]);
2889
- }, s.config.globalProperties.$fox_emit = function(o, ...l) {
3232
+ Reflect.apply(u.trigger, u, [a, ...l]);
3233
+ }, o.config.globalProperties.$fox_emit = function(a, ...l) {
2890
3234
  let u = n;
2891
- Reflect.apply(u.trigger, u, [o, ...l]);
2892
- }, s.mixin({
3235
+ Reflect.apply(u.trigger, u, [a, ...l]);
3236
+ }, o.mixin({
2893
3237
  computed: {
2894
3238
  $route() {
2895
- return wr(this);
3239
+ return Rr(this);
2896
3240
  }
2897
3241
  }
2898
- }), t.init();
3242
+ }), e.init();
2899
3243
  }
2900
3244
  };
2901
3245
  return i;
2902
3246
  }
2903
- function $r(r) {
2904
- return r ? r.$router : G(Ze);
3247
+ function Mr(r) {
3248
+ return r ? r.$router : G(rt);
2905
3249
  }
2906
- function fi(r) {
2907
- return r || (r = $t()?.proxy ?? void 0), r ? wr(r) : null;
3250
+ function hs(r) {
3251
+ return r || (r = qt()?.proxy ?? void 0), r ? Rr(r) : null;
2908
3252
  }
2909
- function ci(r) {
2910
- return r ? r.$fox : G(_r);
3253
+ function ds(r) {
3254
+ return r ? r.$fox : G(qr);
2911
3255
  }
2912
- function hi(r) {
2913
- return r ? r.$bus : G(Kr);
3256
+ function ys(r) {
3257
+ return r ? r.$bus : G(Or);
2914
3258
  }
2915
- function yi(r) {
2916
- return r ? r.$eventProxy : G(qr);
3259
+ function ps(r) {
3260
+ return r ? r.$eventProxy : G(Lr);
2917
3261
  }
2918
- function di(r) {
2919
- const t = $r(), e = (n, i, s) => {
3262
+ function ms(r) {
3263
+ const e = Mr(), t = (n, s, i) => {
2920
3264
  try {
2921
- Reflect.apply(r, {}, [n, i]);
3265
+ Reflect.apply(r, {}, [n, s]);
2922
3266
  } catch (o) {
2923
3267
  console.error(o);
2924
3268
  }
2925
- s();
3269
+ i();
2926
3270
  };
2927
- t.beforeEach(e), Ye(() => {
2928
- t.removeBeforeEach(e);
3271
+ e.beforeEach(t), tt(() => {
3272
+ e.removeBeforeEach(t);
2929
3273
  });
2930
3274
  }
2931
- function vi(r) {
2932
- const t = $r(), e = (n, i, s) => {
3275
+ function vs(r) {
3276
+ const e = Mr(), t = (n, s, i) => {
2933
3277
  try {
2934
- Reflect.apply(r, {}, [n, i]);
3278
+ Reflect.apply(r, {}, [n, s]);
2935
3279
  } catch (o) {
2936
3280
  console.error(o);
2937
3281
  }
2938
- s();
3282
+ i();
2939
3283
  };
2940
- t.afterEach(e), Ye(() => {
2941
- t.removeAfterEach(e);
3284
+ e.afterEach(t), tt(() => {
3285
+ e.removeAfterEach(t);
2942
3286
  });
2943
3287
  }
2944
3288
  export {
2945
- Bt as Bus,
2946
- At as EventChain,
2947
- zt as EventProxy,
2948
- $ as Route,
2949
- Ge as clone,
2950
- ai as createFox,
2951
- An as createMemoryHistory,
2952
- Sn as createWebHashHistory,
2953
- ui as createWebHistory,
2954
- K as extend,
2955
- Kr as foxBusKey,
2956
- qr as foxEventProxyKey,
2957
- _r as foxKey,
2958
- Hr as isArray,
2959
- ti as isDate,
2960
- Dr as isESModule,
2961
- Pt as isEqual,
3289
+ zt as Bus,
3290
+ Ze as EventChain,
3291
+ Qt as EventProxy,
3292
+ j as Route,
3293
+ Xe as clone,
3294
+ cs as createFox,
3295
+ Pn as createMemoryHistory,
3296
+ Rn as createWebHashHistory,
3297
+ fs as createWebHistory,
3298
+ $ as extend,
3299
+ Or as foxBusKey,
3300
+ Lr as foxEventProxyKey,
3301
+ qr as foxKey,
3302
+ es as isArray,
3303
+ ns as isDate,
3304
+ pr as isESModule,
3305
+ Ut as isEqual,
2962
3306
  S as isFunction,
2963
- Zn as isMap,
2964
- Ir as isObject,
2965
- St as isPlainObject,
2966
- ii as isPromise,
2967
- ei as isSet,
2968
- ri as isString,
2969
- ni as isSymbol,
2970
- vi as onAfterRouteUpdate,
2971
- di as onBeforeRouteUpdate,
2972
- oi as onFoxActivated,
2973
- li as onFoxInactivated,
3307
+ ts as isMap,
3308
+ Br as isObject,
3309
+ Vt as isPlainObject,
3310
+ os as isPromise,
3311
+ rs as isSet,
3312
+ ss as isString,
3313
+ is as isSymbol,
3314
+ vs as onAfterRouteUpdate,
3315
+ ms as onBeforeRouteUpdate,
3316
+ as as onFoxActivated,
3317
+ us as onFoxInactivated,
2974
3318
  ie as sessionKey,
2975
- cr as toBoolean,
2976
- si as toNumber,
2977
- jt as toTypeString,
2978
- Je as typeOf,
2979
- hi as useBus,
2980
- yi as useEventProxy,
2981
- ci as useFox,
2982
- fi as useRoute,
2983
- $r as useRouter
3319
+ mr as toBoolean,
3320
+ ls as toNumber,
3321
+ Ot as toTypeString,
3322
+ Bt as typeOf,
3323
+ ys as useBus,
3324
+ ps as useEventProxy,
3325
+ ds as useFox,
3326
+ hs as useRoute,
3327
+ Mr as useRouter
2984
3328
  };