@fox-js/fox 3.0.1-28 → 3.0.1-29
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.cjs.js +2 -2
- package/libs/index.esm.d.ts +6 -3
- package/libs/index.esm.js +822 -811
- package/libs/index.umd.js +2 -2
- package/package.json +1 -1
package/libs/index.esm.js
CHANGED
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
import { ref as gr, getCurrentInstance as Mt, onUnmounted as it, shallowRef as kr, defineComponent as wr, inject as G, provide as
|
|
1
|
+
import { ref as gr, getCurrentInstance as Mt, onUnmounted as it, shallowRef as kr, defineComponent as wr, inject as G, provide as se, h as he } from "vue";
|
|
2
2
|
/*!
|
|
3
|
-
* fox v3.0.0 Wed
|
|
3
|
+
* fox v3.0.0 Wed Sep 06 2023 22:50:12 GMT+0800 (中国标准时间)
|
|
4
4
|
*/
|
|
5
|
-
const
|
|
5
|
+
const Ee = typeof window < "u", j = function() {
|
|
6
6
|
return window;
|
|
7
|
-
},
|
|
7
|
+
}, De = function() {
|
|
8
8
|
return window.document;
|
|
9
9
|
};
|
|
10
|
-
function Wr(
|
|
11
|
-
let e =
|
|
10
|
+
function Wr(s) {
|
|
11
|
+
let e = s, t = e.lastIndexOf("/");
|
|
12
12
|
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;
|
|
13
13
|
}
|
|
14
14
|
function ft() {
|
|
15
|
-
if (!
|
|
15
|
+
if (!Ee)
|
|
16
16
|
return "/";
|
|
17
|
-
let
|
|
18
|
-
return e += Wr(
|
|
17
|
+
let s = j().location, e = `${s.protocol}//${s.host}`;
|
|
18
|
+
return e += Wr(s.pathname), e;
|
|
19
19
|
}
|
|
20
|
-
function $t(
|
|
21
|
-
|
|
20
|
+
function $t(s, e, t) {
|
|
21
|
+
s.addEventListener ? s.addEventListener(e, t, !1) : s.attachEvent ? s.attachEvent(`on${e}`, t) : s[`on${e}`] = t;
|
|
22
22
|
}
|
|
23
|
-
function Tt(
|
|
24
|
-
|
|
23
|
+
function Tt(s, e, t) {
|
|
24
|
+
s.removeEventListener ? s.removeEventListener(e, t) : s.detachEvent ? s.detachEvent(`on${e}`, t) : s[`on${e}`] = null;
|
|
25
25
|
}
|
|
26
|
-
const
|
|
27
|
-
function br(
|
|
28
|
-
return
|
|
26
|
+
const on = Array.isArray, ln = (s) => Nt(s) === "[object Map]", an = (s) => Nt(s) === "[object Set]", fn = (s) => s instanceof Date, R = (s) => typeof s == "function", un = (s) => typeof s == "string", cn = (s) => typeof s == "symbol", zr = (s) => s !== null && typeof s == "object", hn = (s) => zr(s) && R(s.then) && R(s.catch), Jr = (s) => s == null, Gr = Object.prototype.toString, Nt = (s) => Gr.call(s), Qr = (s) => Nt(s) === "[object Object]", Xr = typeof Symbol == "function" && typeof Symbol.toStringTag == "symbol";
|
|
27
|
+
function br(s) {
|
|
28
|
+
return s.__esModule || Xr && s[Symbol.toStringTag] === "Module";
|
|
29
29
|
}
|
|
30
30
|
const Yr = typeof Promise < "u" && Promise.toString().indexOf("[native code]") !== -1;
|
|
31
|
-
function $(...
|
|
32
|
-
let e =
|
|
33
|
-
for (typeof e == "boolean" && (
|
|
34
|
-
if (
|
|
35
|
-
let i =
|
|
31
|
+
function $(...s) {
|
|
32
|
+
let e = s[0] !== void 0 && s[0] !== null ? s[0] : {}, t = 1, r = s.length, n = !1;
|
|
33
|
+
for (typeof e == "boolean" && (n = e, e = s[t] ?? {}, t++), typeof e != "object" && (e = {}); t < r; t++)
|
|
34
|
+
if (s[t] !== null && s[t] !== void 0) {
|
|
35
|
+
let i = s[t];
|
|
36
36
|
for (let o in i) {
|
|
37
37
|
let a = e[o], l = i[o];
|
|
38
38
|
if (a !== l)
|
|
39
|
-
if (
|
|
39
|
+
if (n === !0 && l && typeof l == "object") {
|
|
40
40
|
let f;
|
|
41
|
-
Array.isArray(l) ? f = a && Array.isArray(a) ? a : [] : f = a && typeof a == "object" ? a : {}, e[o] = $(
|
|
41
|
+
Array.isArray(l) ? f = a && Array.isArray(a) ? a : [] : f = a && typeof a == "object" ? a : {}, e[o] = $(n, f, l);
|
|
42
42
|
} else
|
|
43
43
|
l !== void 0 && (e[o] = l);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
return e;
|
|
47
47
|
}
|
|
48
|
-
function It(
|
|
48
|
+
function It(s, e, t = !1) {
|
|
49
49
|
if (!t)
|
|
50
|
-
$(!0,
|
|
50
|
+
$(!0, s, e);
|
|
51
51
|
else {
|
|
52
52
|
if (typeof e != "object")
|
|
53
53
|
return {};
|
|
54
|
-
typeof
|
|
54
|
+
typeof s != "object" && (s = {});
|
|
55
55
|
for (let r of Reflect.ownKeys(e)) {
|
|
56
|
-
let
|
|
57
|
-
if (
|
|
56
|
+
let n = s[r], i = e[r];
|
|
57
|
+
if (n !== i)
|
|
58
58
|
if (typeof i == "object") {
|
|
59
59
|
if (!Array.isArray(i) && !Qr(i))
|
|
60
60
|
continue;
|
|
61
|
-
|
|
61
|
+
n = It(n, i, t), s[r] = n;
|
|
62
62
|
} else {
|
|
63
63
|
if (typeof i == "function")
|
|
64
64
|
continue;
|
|
65
|
-
|
|
65
|
+
s[r] = i;
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
-
return
|
|
69
|
+
return s;
|
|
70
70
|
}
|
|
71
71
|
class le {
|
|
72
72
|
/**
|
|
@@ -82,18 +82,18 @@ class le {
|
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
const ut = Yr ? Promise.resolve() : null;
|
|
85
|
-
function
|
|
85
|
+
function Ie(s, ...e) {
|
|
86
86
|
ut !== null ? e && e.length > 0 ? ut.then(() => {
|
|
87
|
-
|
|
88
|
-
}) : ut.then(
|
|
89
|
-
|
|
90
|
-
}) : setTimeout(
|
|
87
|
+
s(e);
|
|
88
|
+
}) : ut.then(s) : e && e.length > 0 ? setTimeout(() => {
|
|
89
|
+
s(e);
|
|
90
|
+
}) : setTimeout(s);
|
|
91
91
|
}
|
|
92
|
-
function xr(
|
|
93
|
-
return
|
|
92
|
+
function xr(s) {
|
|
93
|
+
return s == null ? !1 : typeof s == "boolean" ? s : typeof s == "string" ? s.toLocaleLowerCase() === "true" : !!s;
|
|
94
94
|
}
|
|
95
|
-
function
|
|
96
|
-
return typeof
|
|
95
|
+
function yn(s) {
|
|
96
|
+
return typeof s == "number" ? s : Number(s);
|
|
97
97
|
}
|
|
98
98
|
const Zr = {
|
|
99
99
|
"[object Boolean]": "boolean",
|
|
@@ -105,33 +105,33 @@ const Zr = {
|
|
|
105
105
|
"[object RegExp]": "regExp",
|
|
106
106
|
"[object Object]": "object"
|
|
107
107
|
};
|
|
108
|
-
function zt(
|
|
109
|
-
let t = Object.prototype.toString.call(
|
|
110
|
-
return
|
|
108
|
+
function zt(s) {
|
|
109
|
+
let t = Object.prototype.toString.call(s);
|
|
110
|
+
return s == null ? String(s) : Zr[t] || "object";
|
|
111
111
|
}
|
|
112
|
-
function Jt(
|
|
113
|
-
if (
|
|
112
|
+
function Jt(s, e) {
|
|
113
|
+
if (s == e)
|
|
114
114
|
return !0;
|
|
115
|
-
if (
|
|
115
|
+
if (s === void 0 || e === void 0)
|
|
116
116
|
return !1;
|
|
117
|
-
let t = zt(
|
|
117
|
+
let t = zt(s), r = zt(e);
|
|
118
118
|
if (t !== r)
|
|
119
119
|
return !1;
|
|
120
120
|
if (t === "object") {
|
|
121
|
-
let
|
|
122
|
-
if (
|
|
121
|
+
let n = Object.keys(s), i = Object.keys(e);
|
|
122
|
+
if (n.length !== i.length)
|
|
123
123
|
return !1;
|
|
124
|
-
for (let o = 0; o <
|
|
125
|
-
let a =
|
|
124
|
+
for (let o = 0; o < n.length; o++) {
|
|
125
|
+
let a = n[o], l = s[a], f = e[a];
|
|
126
126
|
if (!Jt(l, f))
|
|
127
127
|
return !1;
|
|
128
128
|
}
|
|
129
129
|
return !0;
|
|
130
130
|
} else if (t === "array") {
|
|
131
|
-
if (
|
|
131
|
+
if (s.length !== e.length)
|
|
132
132
|
return !1;
|
|
133
|
-
for (let
|
|
134
|
-
let i = n
|
|
133
|
+
for (let n = 0; n < s.length; n++) {
|
|
134
|
+
let i = s[n], o = e[n];
|
|
135
135
|
if (!Jt(i, o))
|
|
136
136
|
return !1;
|
|
137
137
|
}
|
|
@@ -139,27 +139,27 @@ function Jt(n, e) {
|
|
|
139
139
|
}
|
|
140
140
|
return !1;
|
|
141
141
|
}
|
|
142
|
-
const Rr = (
|
|
142
|
+
const Rr = (s) => {
|
|
143
143
|
const e = {};
|
|
144
|
-
for (let t of Reflect.ownKeys(
|
|
145
|
-
let r =
|
|
144
|
+
for (let t of Reflect.ownKeys(s)) {
|
|
145
|
+
let r = s[t];
|
|
146
146
|
r && !Array.isArray(r) && typeof r == "object" && (r = Rr(r)), typeof t == "symbol" ? e[String(t)] = r : e[t] = r;
|
|
147
147
|
}
|
|
148
148
|
return e;
|
|
149
|
-
},
|
|
149
|
+
}, es = /^Symbol\((.*)\)$/, Sr = (s) => {
|
|
150
150
|
const e = {};
|
|
151
|
-
for (let t of Reflect.ownKeys(
|
|
152
|
-
let r =
|
|
151
|
+
for (let t of Reflect.ownKeys(s)) {
|
|
152
|
+
let r = s[t];
|
|
153
153
|
r && !Array.isArray(r) && typeof r == "object" && (r = Sr(r));
|
|
154
|
-
const
|
|
155
|
-
if (
|
|
156
|
-
const i = Symbol.for(
|
|
154
|
+
const n = es.exec(t);
|
|
155
|
+
if (n && n[1]) {
|
|
156
|
+
const i = Symbol.for(n[1]);
|
|
157
157
|
e[i] = r;
|
|
158
158
|
} else
|
|
159
159
|
e[t] = r;
|
|
160
160
|
}
|
|
161
161
|
return e;
|
|
162
|
-
}, Gt = Symbol("idKey"),
|
|
162
|
+
}, Gt = Symbol("idKey"), pe = Symbol("valueKey"), x = Symbol("childrenKey"), Q = Symbol("growKey");
|
|
163
163
|
class Pr {
|
|
164
164
|
/**
|
|
165
165
|
* 自动创建解决策略
|
|
@@ -172,7 +172,7 @@ class Pr {
|
|
|
172
172
|
/**
|
|
173
173
|
* value
|
|
174
174
|
*/
|
|
175
|
-
[
|
|
175
|
+
[pe] = gr();
|
|
176
176
|
/**
|
|
177
177
|
* children
|
|
178
178
|
*/
|
|
@@ -185,7 +185,7 @@ class Pr {
|
|
|
185
185
|
this[Gt] = e;
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
|
-
class
|
|
188
|
+
class ts {
|
|
189
189
|
/**
|
|
190
190
|
* 拦截get操作
|
|
191
191
|
* @param target
|
|
@@ -193,14 +193,14 @@ class tn {
|
|
|
193
193
|
*/
|
|
194
194
|
get(e, t) {
|
|
195
195
|
if (t == "value")
|
|
196
|
-
return e[
|
|
196
|
+
return e[pe].value;
|
|
197
197
|
if (t === "grow")
|
|
198
198
|
return e[Q];
|
|
199
199
|
let r = e[x].get(t);
|
|
200
200
|
if (r)
|
|
201
|
-
return
|
|
201
|
+
return He(r);
|
|
202
202
|
if (e[Q])
|
|
203
|
-
return r = Dt(t), r[Q] = e[Q], e[x].set(t, r),
|
|
203
|
+
return r = Dt(t), r[Q] = e[Q], e[x].set(t, r), He(r);
|
|
204
204
|
}
|
|
205
205
|
/**
|
|
206
206
|
* 拦截set操作
|
|
@@ -210,7 +210,7 @@ class tn {
|
|
|
210
210
|
* @returns
|
|
211
211
|
*/
|
|
212
212
|
set(e, t, r) {
|
|
213
|
-
return t == "value" ? (e[
|
|
213
|
+
return t == "value" ? (e[pe].value = r, !0) : t === "grow" ? (e[Q] = xr(r), !0) : r == null ? (e[x].delete(t), !0) : (console.error(`illegal property:${t}`), !1);
|
|
214
214
|
}
|
|
215
215
|
/**
|
|
216
216
|
* 拦截删除property属性
|
|
@@ -223,14 +223,14 @@ class tn {
|
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
225
|
const Ht = "__proxy__";
|
|
226
|
-
function Dt(
|
|
227
|
-
const e = new Pr(
|
|
228
|
-
return Reflect.set(e, Ht, new Proxy(e, new
|
|
226
|
+
function Dt(s) {
|
|
227
|
+
const e = new Pr(s);
|
|
228
|
+
return Reflect.set(e, Ht, new Proxy(e, new ts())), e;
|
|
229
229
|
}
|
|
230
|
-
function
|
|
231
|
-
return Reflect.get(
|
|
230
|
+
function He(s) {
|
|
231
|
+
return Reflect.get(s, Ht);
|
|
232
232
|
}
|
|
233
|
-
class
|
|
233
|
+
class rs {
|
|
234
234
|
/**
|
|
235
235
|
* 名称
|
|
236
236
|
*/
|
|
@@ -278,7 +278,7 @@ class rn {
|
|
|
278
278
|
let e = null;
|
|
279
279
|
if (this.persistPolicy === "custom")
|
|
280
280
|
e = this.storage;
|
|
281
|
-
else if (
|
|
281
|
+
else if (Ee) {
|
|
282
282
|
const t = j();
|
|
283
283
|
e = this.persistPolicy === "session" ? t.sessionStorage : t.localStorage;
|
|
284
284
|
}
|
|
@@ -317,8 +317,8 @@ class rn {
|
|
|
317
317
|
let t = this.getStorage();
|
|
318
318
|
if (t === null)
|
|
319
319
|
return;
|
|
320
|
-
const r = `_bus_${this.name}`,
|
|
321
|
-
|
|
320
|
+
const r = `_bus_${this.name}`, n = t.getItem(r);
|
|
321
|
+
n && (this.state = JSON.parse(n), Reflect.ownKeys(this.state).forEach((o) => {
|
|
322
322
|
if (typeof o != "string")
|
|
323
323
|
return;
|
|
324
324
|
const a = this.state[o], l = o.split(/\//g);
|
|
@@ -332,8 +332,8 @@ class rn {
|
|
|
332
332
|
put(e) {
|
|
333
333
|
if (this.initFlag && this.persistPolicy !== "momery")
|
|
334
334
|
try {
|
|
335
|
-
const t = e.length, r = e.slice(0, t - 1).join("/"),
|
|
336
|
-
this.state[r] =
|
|
335
|
+
const t = e.length, r = e.slice(0, t - 1).join("/"), n = e[t - 1];
|
|
336
|
+
this.state[r] = n, this.saveState();
|
|
337
337
|
} catch (t) {
|
|
338
338
|
console.error(t);
|
|
339
339
|
}
|
|
@@ -345,10 +345,10 @@ class rn {
|
|
|
345
345
|
remove(e) {
|
|
346
346
|
if (this.initFlag && this.persistPolicy !== "momery")
|
|
347
347
|
try {
|
|
348
|
-
const t = e.length, r = e.slice(0, t - 1).join("/"),
|
|
348
|
+
const t = e.length, r = e.slice(0, t - 1).join("/"), n = {};
|
|
349
349
|
Reflect.ownKeys(this.state).forEach((o) => {
|
|
350
|
-
typeof o == "string" && (o === r || o.startsWith(r) || (
|
|
351
|
-
}), this.state =
|
|
350
|
+
typeof o == "string" && (o === r || o.startsWith(r) || (n[o] = this.state[o]));
|
|
351
|
+
}), this.state = n, this.saveState();
|
|
352
352
|
} catch (t) {
|
|
353
353
|
console.error(t);
|
|
354
354
|
}
|
|
@@ -374,7 +374,7 @@ class Cr extends Pr {
|
|
|
374
374
|
* 默认构造函数
|
|
375
375
|
*/
|
|
376
376
|
constructor(e = {}) {
|
|
377
|
-
super("__root__"), this._persistHandler = new
|
|
377
|
+
super("__root__"), this._persistHandler = new rs(e), this._persistHandler.init(this);
|
|
378
378
|
}
|
|
379
379
|
/**
|
|
380
380
|
* 加入数据
|
|
@@ -386,11 +386,11 @@ class Cr extends Pr {
|
|
|
386
386
|
if (t < 2)
|
|
387
387
|
return console.error("参数至少包括一个(key, value)"), !1;
|
|
388
388
|
let r = this;
|
|
389
|
-
for (let
|
|
390
|
-
let i = e[
|
|
389
|
+
for (let n = 0; n < t - 1; n++) {
|
|
390
|
+
let i = e[n], o;
|
|
391
391
|
r[x].has(i) ? o = r[x].get(i) : (o = Dt(i), r[x].set(i, o)), r = o;
|
|
392
392
|
}
|
|
393
|
-
return r[
|
|
393
|
+
return r[pe].value = e[t - 1], this._persistHandler.put(e), !0;
|
|
394
394
|
}
|
|
395
395
|
/**
|
|
396
396
|
* 获取内容
|
|
@@ -402,14 +402,14 @@ class Cr extends Pr {
|
|
|
402
402
|
if (t === 0)
|
|
403
403
|
return;
|
|
404
404
|
let r = this;
|
|
405
|
-
for (let
|
|
406
|
-
let i = e[
|
|
405
|
+
for (let n = 0; n < t; n++) {
|
|
406
|
+
let i = e[n];
|
|
407
407
|
if (r[x].has(i))
|
|
408
408
|
r = r[x].get(i);
|
|
409
409
|
else
|
|
410
410
|
return;
|
|
411
411
|
}
|
|
412
|
-
return r[
|
|
412
|
+
return r[pe].value;
|
|
413
413
|
}
|
|
414
414
|
/**
|
|
415
415
|
* 移除数据
|
|
@@ -428,8 +428,8 @@ class Cr extends Pr {
|
|
|
428
428
|
else
|
|
429
429
|
return !1;
|
|
430
430
|
}
|
|
431
|
-
const
|
|
432
|
-
return r[x].has(
|
|
431
|
+
const n = e[t - 1];
|
|
432
|
+
return r[x].has(n) ? (r[x].delete(n), this._persistHandler.remove(e), !0) : !1;
|
|
433
433
|
}
|
|
434
434
|
/**
|
|
435
435
|
* 判断是否包含数据
|
|
@@ -448,8 +448,8 @@ class Cr extends Pr {
|
|
|
448
448
|
else
|
|
449
449
|
return !1;
|
|
450
450
|
}
|
|
451
|
-
const
|
|
452
|
-
return r[x].has(
|
|
451
|
+
const n = e[t - 1];
|
|
452
|
+
return r[x].has(n);
|
|
453
453
|
}
|
|
454
454
|
/**
|
|
455
455
|
* 清空所以数据
|
|
@@ -458,11 +458,11 @@ class Cr extends Pr {
|
|
|
458
458
|
this[x].clear(), this._persistHandler.clear();
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
const
|
|
462
|
-
function Qt(
|
|
463
|
-
return
|
|
461
|
+
const ss = ["put", "get", "contains", "remove", "clear", "_persistHandler"];
|
|
462
|
+
function Qt(s) {
|
|
463
|
+
return ss.includes(s);
|
|
464
464
|
}
|
|
465
|
-
class
|
|
465
|
+
class ns {
|
|
466
466
|
/**
|
|
467
467
|
* 拦截get操作
|
|
468
468
|
* @param target
|
|
@@ -470,18 +470,18 @@ class sn {
|
|
|
470
470
|
*/
|
|
471
471
|
get(e, t) {
|
|
472
472
|
if (t == "value")
|
|
473
|
-
return e[
|
|
473
|
+
return e[pe].value;
|
|
474
474
|
if (t === "grow")
|
|
475
475
|
return e[Q];
|
|
476
476
|
if (t === x)
|
|
477
477
|
return e[x];
|
|
478
478
|
if (typeof t == "string" && Qt(t))
|
|
479
479
|
return e[t];
|
|
480
|
-
let r = String(t),
|
|
481
|
-
if (
|
|
482
|
-
return
|
|
480
|
+
let r = String(t), n = e[x].get(r);
|
|
481
|
+
if (n)
|
|
482
|
+
return He(n);
|
|
483
483
|
if (e[Q])
|
|
484
|
-
return
|
|
484
|
+
return n = Dt(r), n[Q] = e[Q], e[x].set(r, n), He(n);
|
|
485
485
|
}
|
|
486
486
|
/**
|
|
487
487
|
* 拦截set操作
|
|
@@ -491,7 +491,7 @@ class sn {
|
|
|
491
491
|
* @returns
|
|
492
492
|
*/
|
|
493
493
|
set(e, t, r) {
|
|
494
|
-
return t == "value" ? (e[
|
|
494
|
+
return t == "value" ? (e[pe].value = r, !0) : t === "grow" ? (e[Q] = xr(r), !0) : Qt(t) ? !1 : r == null ? (e[x].delete(t), !0) : (console.error(`illegal property:${t}`), !1);
|
|
495
495
|
}
|
|
496
496
|
/**
|
|
497
497
|
* 拦截删除property属性
|
|
@@ -503,8 +503,8 @@ class sn {
|
|
|
503
503
|
return t === "value" || t == "grow" ? (console.error(`can not delete property:${String(t)}`), !1) : (e[x].delete(t), !0);
|
|
504
504
|
}
|
|
505
505
|
}
|
|
506
|
-
function
|
|
507
|
-
const e = new Cr(
|
|
506
|
+
function is(s) {
|
|
507
|
+
const e = new Cr(s), t = new ns(), r = new Proxy(e, t);
|
|
508
508
|
return Reflect.set(e, Ht, r), e;
|
|
509
509
|
}
|
|
510
510
|
const Xt = new Proxy(Cr, {
|
|
@@ -514,42 +514,42 @@ const Xt = new Proxy(Cr, {
|
|
|
514
514
|
* @param args
|
|
515
515
|
* @returns
|
|
516
516
|
*/
|
|
517
|
-
construct(
|
|
518
|
-
const t =
|
|
519
|
-
return
|
|
517
|
+
construct(s, e) {
|
|
518
|
+
const t = is(e[0] ?? {});
|
|
519
|
+
return He(t);
|
|
520
520
|
}
|
|
521
521
|
}), te = "default", Er = Symbol("sync"), I = Symbol("resolveRoute");
|
|
522
|
-
function Yt(
|
|
522
|
+
function Yt(s) {
|
|
523
523
|
let e = !1;
|
|
524
524
|
return function(...t) {
|
|
525
525
|
if (!e)
|
|
526
|
-
return e = !0, Reflect.apply(
|
|
526
|
+
return e = !0, Reflect.apply(s, {}, t);
|
|
527
527
|
};
|
|
528
528
|
}
|
|
529
|
-
function
|
|
530
|
-
let e =
|
|
529
|
+
function os(s) {
|
|
530
|
+
let e = s.src;
|
|
531
531
|
return new Promise((t, r) => {
|
|
532
|
-
const
|
|
533
|
-
br(a) && (a = a.default),
|
|
532
|
+
const n = Yt((a) => {
|
|
533
|
+
br(a) && (a = a.default), s.component = a, console.debug("success load async module"), t();
|
|
534
534
|
}), i = Yt((a) => {
|
|
535
535
|
console.debug("reject load async module"), r(a);
|
|
536
536
|
});
|
|
537
537
|
let o;
|
|
538
538
|
try {
|
|
539
|
-
o = e(
|
|
539
|
+
o = e(n, i);
|
|
540
540
|
} catch (a) {
|
|
541
541
|
i(a);
|
|
542
542
|
}
|
|
543
543
|
if (o)
|
|
544
544
|
if (typeof o.then == "function")
|
|
545
|
-
o.then(
|
|
545
|
+
o.then(n, i);
|
|
546
546
|
else {
|
|
547
547
|
const a = o.component;
|
|
548
|
-
a && typeof a.then == "function" && a.then(
|
|
548
|
+
a && typeof a.then == "function" && a.then(n, i);
|
|
549
549
|
}
|
|
550
550
|
});
|
|
551
551
|
}
|
|
552
|
-
class
|
|
552
|
+
class ls {
|
|
553
553
|
/**
|
|
554
554
|
* 插槽名称
|
|
555
555
|
*/
|
|
@@ -572,8 +572,8 @@ class an {
|
|
|
572
572
|
* @param level
|
|
573
573
|
* @param rootName
|
|
574
574
|
*/
|
|
575
|
-
constructor(e, t, r,
|
|
576
|
-
this.name = e, this.level = t, this.rootName = r, this.rootIndex =
|
|
575
|
+
constructor(e, t, r, n) {
|
|
576
|
+
this.name = e, this.level = t, this.rootName = r, this.rootIndex = n;
|
|
577
577
|
}
|
|
578
578
|
}
|
|
579
579
|
class tt {
|
|
@@ -736,14 +736,14 @@ class q {
|
|
|
736
736
|
let o = e[i];
|
|
737
737
|
r[i] = o;
|
|
738
738
|
}
|
|
739
|
-
const
|
|
740
|
-
if (Array.isArray(
|
|
741
|
-
for (let i of
|
|
739
|
+
const n = Object.getOwnPropertySymbols(e);
|
|
740
|
+
if (Array.isArray(n) && n.length > 0)
|
|
741
|
+
for (let i of n)
|
|
742
742
|
r[i] = e[i];
|
|
743
743
|
return t;
|
|
744
744
|
}
|
|
745
745
|
}
|
|
746
|
-
class
|
|
746
|
+
class as {
|
|
747
747
|
/**
|
|
748
748
|
* 唯一ID(用于区分model)
|
|
749
749
|
*/
|
|
@@ -776,8 +776,8 @@ class fn {
|
|
|
776
776
|
* @param props
|
|
777
777
|
* @param meta
|
|
778
778
|
*/
|
|
779
|
-
constructor(e, t, r,
|
|
780
|
-
this.id = le.get(), this.name = e, this.src = t, typeof t != "function" && (this.component = t), this.props = r, this.meta =
|
|
779
|
+
constructor(e, t, r, n) {
|
|
780
|
+
this.id = le.get(), this.name = e, this.src = t, typeof t != "function" && (this.component = t), this.props = r, this.meta = n;
|
|
781
781
|
}
|
|
782
782
|
/**
|
|
783
783
|
* 是否已经解析完成
|
|
@@ -789,7 +789,7 @@ class fn {
|
|
|
789
789
|
* 解析组件
|
|
790
790
|
*/
|
|
791
791
|
resolve() {
|
|
792
|
-
return
|
|
792
|
+
return os(this);
|
|
793
793
|
}
|
|
794
794
|
}
|
|
795
795
|
class Zt {
|
|
@@ -820,7 +820,7 @@ class ct {
|
|
|
820
820
|
*/
|
|
821
821
|
layers = [];
|
|
822
822
|
}
|
|
823
|
-
const D = Symbol("chainKey"), N = Symbol("cursorKey"), ht = Symbol("$persistentModeKey"), F = Symbol("statusKey"), Z = Symbol("argsKey"),
|
|
823
|
+
const D = Symbol("chainKey"), N = Symbol("cursorKey"), ht = Symbol("$persistentModeKey"), F = Symbol("statusKey"), Z = Symbol("argsKey"), Ve = Symbol("exArgsKey"), me = Symbol("successFnsKey"), Fe = Symbol("errorFnsKey"), ae = Symbol("sessionKey"), ee = Symbol("_go");
|
|
824
824
|
class rt {
|
|
825
825
|
/**
|
|
826
826
|
* 事件链路
|
|
@@ -845,15 +845,15 @@ class rt {
|
|
|
845
845
|
/**
|
|
846
846
|
* 异常参数
|
|
847
847
|
*/
|
|
848
|
-
[
|
|
848
|
+
[Ve] = [];
|
|
849
849
|
/**
|
|
850
850
|
* 移除函数
|
|
851
851
|
*/
|
|
852
|
-
[
|
|
852
|
+
[me] = [];
|
|
853
853
|
/**
|
|
854
854
|
* 错误函数
|
|
855
855
|
*/
|
|
856
|
-
[
|
|
856
|
+
[Fe] = [];
|
|
857
857
|
/**
|
|
858
858
|
* 链路session
|
|
859
859
|
*/
|
|
@@ -883,11 +883,11 @@ class rt {
|
|
|
883
883
|
if (this[F] = "Busy", this[N] += e, this[N] < 0 && (this[N] = 0), this[Z] = t, r === "Exception" || r === "Reject") {
|
|
884
884
|
let a = [{
|
|
885
885
|
session: this[ae]
|
|
886
|
-
}, ...this[
|
|
887
|
-
for (; this[
|
|
886
|
+
}, ...this[Ve]];
|
|
887
|
+
for (; this[Fe].length > 0; )
|
|
888
888
|
try {
|
|
889
|
-
let l = this[
|
|
890
|
-
typeof l == "function" &&
|
|
889
|
+
let l = this[Fe].shift();
|
|
890
|
+
typeof l == "function" && Ie(() => {
|
|
891
891
|
Reflect.apply(l, {}, a);
|
|
892
892
|
});
|
|
893
893
|
} catch (l) {
|
|
@@ -898,9 +898,9 @@ class rt {
|
|
|
898
898
|
let a = [{
|
|
899
899
|
session: this[ae]
|
|
900
900
|
}, ...this[Z]];
|
|
901
|
-
for (; this[
|
|
902
|
-
let l = this[
|
|
903
|
-
typeof l == "function" &&
|
|
901
|
+
for (; this[me].length > 0; ) {
|
|
902
|
+
let l = this[me].shift();
|
|
903
|
+
typeof l == "function" && Ie(() => {
|
|
904
904
|
Reflect.apply(l, {}, a);
|
|
905
905
|
});
|
|
906
906
|
}
|
|
@@ -908,7 +908,7 @@ class rt {
|
|
|
908
908
|
}
|
|
909
909
|
if (this[N] >= this[D].length)
|
|
910
910
|
return this[F] = "Free", this;
|
|
911
|
-
let
|
|
911
|
+
let n = this[D][this[N]];
|
|
912
912
|
this[ht] || (this[D].splice(0, this[N] + 1), this[N] = -1);
|
|
913
913
|
let i = this[N] + 1;
|
|
914
914
|
try {
|
|
@@ -932,8 +932,8 @@ class rt {
|
|
|
932
932
|
//session
|
|
933
933
|
session: this[ae]
|
|
934
934
|
};
|
|
935
|
-
|
|
936
|
-
Reflect.apply(
|
|
935
|
+
Ie(() => {
|
|
936
|
+
Reflect.apply(n, {}, [a, ...this[Z]]);
|
|
937
937
|
});
|
|
938
938
|
} catch (o) {
|
|
939
939
|
this.throw(o);
|
|
@@ -960,14 +960,14 @@ class rt {
|
|
|
960
960
|
* @param params
|
|
961
961
|
*/
|
|
962
962
|
reject(...e) {
|
|
963
|
-
return this[F] = "Reject", this[
|
|
963
|
+
return this[F] = "Reject", this[Ve] = e, Reflect.apply(this[ee], this, [0]);
|
|
964
964
|
}
|
|
965
965
|
/**
|
|
966
966
|
* 结束事件链调用,直接触发error函数
|
|
967
967
|
* @param params
|
|
968
968
|
*/
|
|
969
969
|
throw(...e) {
|
|
970
|
-
return this[F] = "Exception", this[
|
|
970
|
+
return this[F] = "Exception", this[Ve] = e, Reflect.apply(this[ee], this, [0]);
|
|
971
971
|
}
|
|
972
972
|
/**
|
|
973
973
|
* 重置事件链,直接触发wait函数
|
|
@@ -978,10 +978,10 @@ class rt {
|
|
|
978
978
|
let r = [{
|
|
979
979
|
session: this[ae]
|
|
980
980
|
}, ...this[Z]];
|
|
981
|
-
for (; this[
|
|
982
|
-
let
|
|
983
|
-
|
|
984
|
-
Reflect.apply(
|
|
981
|
+
for (; this[me].length > 0; ) {
|
|
982
|
+
let n = this[me].shift();
|
|
983
|
+
Ie(() => {
|
|
984
|
+
Reflect.apply(n, this, r);
|
|
985
985
|
});
|
|
986
986
|
}
|
|
987
987
|
return this[F] = "Free", this;
|
|
@@ -1001,7 +1001,7 @@ class rt {
|
|
|
1001
1001
|
* @returns
|
|
1002
1002
|
*/
|
|
1003
1003
|
wait(e, t) {
|
|
1004
|
-
return e && typeof e == "function" && this[
|
|
1004
|
+
return e && typeof e == "function" && this[me].push(e), t && typeof t == "function" && this[Fe].push(t), this[F] === "Busy" ? this : (Reflect.apply(this[ee], this, [0, ...this[Z]]), this);
|
|
1005
1005
|
}
|
|
1006
1006
|
/**
|
|
1007
1007
|
* 加入异常处理任务
|
|
@@ -1009,7 +1009,7 @@ class rt {
|
|
|
1009
1009
|
* @returns
|
|
1010
1010
|
*/
|
|
1011
1011
|
exception(e) {
|
|
1012
|
-
return e && typeof e == "function" && this[
|
|
1012
|
+
return e && typeof e == "function" && this[Fe].push(e), this[F] === "Busy" ? this : Reflect.apply(this[ee], this, [0, ...this[Z]]);
|
|
1013
1013
|
}
|
|
1014
1014
|
/**
|
|
1015
1015
|
* 判断事件链是否已经执行完成
|
|
@@ -1019,8 +1019,8 @@ class rt {
|
|
|
1019
1019
|
return this[F] == "Reject" || this[F] == "Free" && this[N] >= this[D].length;
|
|
1020
1020
|
}
|
|
1021
1021
|
}
|
|
1022
|
-
const
|
|
1023
|
-
class
|
|
1022
|
+
const ve = Symbol("registerKey");
|
|
1023
|
+
class fs {
|
|
1024
1024
|
/**
|
|
1025
1025
|
* 事件策略
|
|
1026
1026
|
*/
|
|
@@ -1042,7 +1042,7 @@ class er {
|
|
|
1042
1042
|
/**
|
|
1043
1043
|
* 注册表
|
|
1044
1044
|
*/
|
|
1045
|
-
[
|
|
1045
|
+
[ve] = /* @__PURE__ */ new Map();
|
|
1046
1046
|
/**
|
|
1047
1047
|
* 构造函数
|
|
1048
1048
|
*/
|
|
@@ -1056,10 +1056,10 @@ class er {
|
|
|
1056
1056
|
* @returns
|
|
1057
1057
|
*/
|
|
1058
1058
|
on(e, t, r = !1) {
|
|
1059
|
-
let
|
|
1060
|
-
|
|
1061
|
-
let i = r === !0 ? 1 : 0, o = new
|
|
1062
|
-
return
|
|
1059
|
+
let n = this[ve].get(e);
|
|
1060
|
+
n || (n = new Array(), this[ve].set(e, n));
|
|
1061
|
+
let i = r === !0 ? 1 : 0, o = new fs(t, i);
|
|
1062
|
+
return n.push(o), this;
|
|
1063
1063
|
}
|
|
1064
1064
|
/**
|
|
1065
1065
|
* 解除绑定
|
|
@@ -1069,12 +1069,12 @@ class er {
|
|
|
1069
1069
|
*/
|
|
1070
1070
|
off(e, t) {
|
|
1071
1071
|
if (!t)
|
|
1072
|
-
return this[
|
|
1073
|
-
let r = this[
|
|
1072
|
+
return this[ve].delete(e), this;
|
|
1073
|
+
let r = this[ve].get(e);
|
|
1074
1074
|
if (r) {
|
|
1075
|
-
for (let
|
|
1076
|
-
if (r[
|
|
1077
|
-
r.splice(
|
|
1075
|
+
for (let n = 0; n < r.length; n++)
|
|
1076
|
+
if (r[n].callback === t) {
|
|
1077
|
+
r.splice(n, 1);
|
|
1078
1078
|
break;
|
|
1079
1079
|
}
|
|
1080
1080
|
}
|
|
@@ -1119,10 +1119,10 @@ class er {
|
|
|
1119
1119
|
let r = e[t - 1];
|
|
1120
1120
|
if (typeof r != "function")
|
|
1121
1121
|
return console.error("callback can not benn empty"), this;
|
|
1122
|
-
let
|
|
1122
|
+
let n = t - 1, i = new Array(n), o = [].splice.call(e, 0, n);
|
|
1123
1123
|
for (let a = 0; a < o.length; a++)
|
|
1124
1124
|
this.once(o[a], (l) => {
|
|
1125
|
-
i[a] = l,
|
|
1125
|
+
i[a] = l, n -= 1, n == 0 && Reflect.apply(r, {}, i);
|
|
1126
1126
|
});
|
|
1127
1127
|
return this;
|
|
1128
1128
|
}
|
|
@@ -1132,14 +1132,14 @@ class er {
|
|
|
1132
1132
|
* @param value
|
|
1133
1133
|
*/
|
|
1134
1134
|
emit(e, ...t) {
|
|
1135
|
-
let r = this[
|
|
1135
|
+
let r = this[ve].get(e);
|
|
1136
1136
|
if (!r)
|
|
1137
1137
|
return this;
|
|
1138
|
-
for (let
|
|
1139
|
-
let i = r[
|
|
1140
|
-
if (i.policy == 1 ? r.splice(
|
|
1138
|
+
for (let n = 0; n < r.length; ) {
|
|
1139
|
+
let i = r[n];
|
|
1140
|
+
if (i.policy == 1 ? r.splice(n, 1) : n++, typeof i.callback == "function")
|
|
1141
1141
|
try {
|
|
1142
|
-
|
|
1142
|
+
Ie(() => {
|
|
1143
1143
|
Reflect.apply(i.callback, {}, t);
|
|
1144
1144
|
});
|
|
1145
1145
|
} catch (o) {
|
|
@@ -1158,12 +1158,12 @@ class er {
|
|
|
1158
1158
|
return Reflect.apply(this.emit, this, [e, ...t]);
|
|
1159
1159
|
}
|
|
1160
1160
|
}
|
|
1161
|
-
const
|
|
1162
|
-
class
|
|
1161
|
+
const _e = Symbol("registerKey");
|
|
1162
|
+
class us {
|
|
1163
1163
|
/**
|
|
1164
1164
|
* 数据列表
|
|
1165
1165
|
*/
|
|
1166
|
-
[
|
|
1166
|
+
[_e] = /* @__PURE__ */ new Map();
|
|
1167
1167
|
/**
|
|
1168
1168
|
* 构造函数
|
|
1169
1169
|
*/
|
|
@@ -1175,7 +1175,7 @@ class cn {
|
|
|
1175
1175
|
* @param value
|
|
1176
1176
|
*/
|
|
1177
1177
|
set(e, t) {
|
|
1178
|
-
this[
|
|
1178
|
+
this[_e].set(e, t);
|
|
1179
1179
|
}
|
|
1180
1180
|
/**
|
|
1181
1181
|
* 获取数据
|
|
@@ -1183,7 +1183,7 @@ class cn {
|
|
|
1183
1183
|
* @returns
|
|
1184
1184
|
*/
|
|
1185
1185
|
get(e) {
|
|
1186
|
-
return this[
|
|
1186
|
+
return this[_e].get(e);
|
|
1187
1187
|
}
|
|
1188
1188
|
/**
|
|
1189
1189
|
* 是否有对应的数据
|
|
@@ -1191,7 +1191,7 @@ class cn {
|
|
|
1191
1191
|
* @returns
|
|
1192
1192
|
*/
|
|
1193
1193
|
has(e) {
|
|
1194
|
-
return this[
|
|
1194
|
+
return this[_e].has(e);
|
|
1195
1195
|
}
|
|
1196
1196
|
/**
|
|
1197
1197
|
* 删除数据
|
|
@@ -1199,35 +1199,35 @@ class cn {
|
|
|
1199
1199
|
* @returns
|
|
1200
1200
|
*/
|
|
1201
1201
|
delete(e) {
|
|
1202
|
-
return this[
|
|
1202
|
+
return this[_e].delete(e);
|
|
1203
1203
|
}
|
|
1204
1204
|
}
|
|
1205
|
-
const
|
|
1206
|
-
function
|
|
1207
|
-
let t =
|
|
1208
|
-
if (Reflect.has(t,
|
|
1209
|
-
return t[
|
|
1205
|
+
const de = Symbol("lc");
|
|
1206
|
+
function st(s, e = !1) {
|
|
1207
|
+
let t = s;
|
|
1208
|
+
if (Reflect.has(t, de))
|
|
1209
|
+
return t[de];
|
|
1210
1210
|
if (e) {
|
|
1211
|
-
const r = new
|
|
1212
|
-
return t[
|
|
1211
|
+
const r = new us();
|
|
1212
|
+
return t[de] = r, r;
|
|
1213
1213
|
}
|
|
1214
1214
|
return null;
|
|
1215
1215
|
}
|
|
1216
|
-
function Ar(
|
|
1217
|
-
let t = null, r =
|
|
1218
|
-
for (; r && !(Reflect.has(r,
|
|
1216
|
+
function Ar(s, e = !1) {
|
|
1217
|
+
let t = null, r = s;
|
|
1218
|
+
for (; r && !(Reflect.has(r, de) && (t = r[de], t)); )
|
|
1219
1219
|
r = r.$parent;
|
|
1220
1220
|
if (!t && e) {
|
|
1221
|
-
const
|
|
1222
|
-
|
|
1221
|
+
const n = s;
|
|
1222
|
+
n && n.$parent && (t = st(n.$parent, e));
|
|
1223
1223
|
}
|
|
1224
1224
|
return t;
|
|
1225
1225
|
}
|
|
1226
|
-
function Fr(
|
|
1227
|
-
let t =
|
|
1226
|
+
function Fr(s, e) {
|
|
1227
|
+
let t = s;
|
|
1228
1228
|
for (; t; ) {
|
|
1229
|
-
if (Reflect.has(t,
|
|
1230
|
-
const r = t[
|
|
1229
|
+
if (Reflect.has(t, de)) {
|
|
1230
|
+
const r = t[de];
|
|
1231
1231
|
if (r.has(e))
|
|
1232
1232
|
return r.get(e);
|
|
1233
1233
|
}
|
|
@@ -1235,40 +1235,40 @@ function Fr(n, e) {
|
|
|
1235
1235
|
}
|
|
1236
1236
|
return null;
|
|
1237
1237
|
}
|
|
1238
|
-
function
|
|
1239
|
-
Ar(
|
|
1238
|
+
function dn(s, e, t) {
|
|
1239
|
+
Ar(s, !0)?.set(e, t);
|
|
1240
1240
|
}
|
|
1241
|
-
function
|
|
1242
|
-
Ar(
|
|
1241
|
+
function pn(s, e) {
|
|
1242
|
+
Ar(s, !0)?.delete(e);
|
|
1243
1243
|
}
|
|
1244
|
-
function tr(
|
|
1245
|
-
if (Array.isArray(
|
|
1246
|
-
let e =
|
|
1244
|
+
function tr(s) {
|
|
1245
|
+
if (Array.isArray(s.children) && s.children.length > 0) {
|
|
1246
|
+
let e = s.children[0];
|
|
1247
1247
|
if (e != null && e.component != null && e.component.proxy != null)
|
|
1248
|
-
return
|
|
1248
|
+
return st(e.component.proxy, !1);
|
|
1249
1249
|
}
|
|
1250
1250
|
return null;
|
|
1251
1251
|
}
|
|
1252
|
-
const
|
|
1253
|
-
function
|
|
1254
|
-
let e =
|
|
1255
|
-
e || (e = [],
|
|
1252
|
+
const nt = Symbol("hooksKey");
|
|
1253
|
+
function cs(s) {
|
|
1254
|
+
let e = s.get(nt);
|
|
1255
|
+
e || (e = [], s.set(nt, e));
|
|
1256
1256
|
}
|
|
1257
|
-
function rr(
|
|
1258
|
-
let t =
|
|
1257
|
+
function rr(s, e) {
|
|
1258
|
+
let t = s.get(nt);
|
|
1259
1259
|
if (t != null)
|
|
1260
1260
|
for (let r = t.length - 1; r >= 0; r--) {
|
|
1261
|
-
let
|
|
1262
|
-
if (
|
|
1261
|
+
let n = t[r];
|
|
1262
|
+
if (n.type === e)
|
|
1263
1263
|
try {
|
|
1264
|
-
Reflect.apply(
|
|
1264
|
+
Reflect.apply(n.hook, n.target, []);
|
|
1265
1265
|
} catch (i) {
|
|
1266
1266
|
console.error(i.message, i);
|
|
1267
1267
|
}
|
|
1268
1268
|
}
|
|
1269
1269
|
}
|
|
1270
|
-
var qt = /* @__PURE__ */ ((
|
|
1271
|
-
class
|
|
1270
|
+
var qt = /* @__PURE__ */ ((s) => (s.DEACTIVATED = "da", s.ACTIVATED = "a", s))(qt || {});
|
|
1271
|
+
class hs {
|
|
1272
1272
|
/**
|
|
1273
1273
|
* 类型
|
|
1274
1274
|
*/
|
|
@@ -1291,22 +1291,22 @@ class yn {
|
|
|
1291
1291
|
this.target = r, this.hook = t, this.type = e;
|
|
1292
1292
|
}
|
|
1293
1293
|
}
|
|
1294
|
-
function
|
|
1295
|
-
let
|
|
1296
|
-
return
|
|
1294
|
+
function ys(s, e, t, r) {
|
|
1295
|
+
let n = new hs(e, t, r);
|
|
1296
|
+
return s.push(n), !0;
|
|
1297
1297
|
}
|
|
1298
|
-
function
|
|
1299
|
-
let
|
|
1300
|
-
for (let i = 0; i <
|
|
1301
|
-
let o =
|
|
1298
|
+
function ds(s, e, t, r) {
|
|
1299
|
+
let n = -1;
|
|
1300
|
+
for (let i = 0; i < s.length; i++) {
|
|
1301
|
+
let o = s[i];
|
|
1302
1302
|
if (o.type === e && o.hook === t && o.target === r) {
|
|
1303
|
-
|
|
1303
|
+
n = i;
|
|
1304
1304
|
break;
|
|
1305
1305
|
}
|
|
1306
1306
|
}
|
|
1307
|
-
return
|
|
1307
|
+
return n != -1 ? (s.splice(n, 1), !0) : !1;
|
|
1308
1308
|
}
|
|
1309
|
-
function _r(
|
|
1309
|
+
function _r(s) {
|
|
1310
1310
|
return (e, t) => {
|
|
1311
1311
|
let r;
|
|
1312
1312
|
if (t)
|
|
@@ -1319,53 +1319,53 @@ function _r(n) {
|
|
|
1319
1319
|
}
|
|
1320
1320
|
r = i.proxy;
|
|
1321
1321
|
}
|
|
1322
|
-
const
|
|
1323
|
-
if (
|
|
1322
|
+
const n = Fr(r, nt);
|
|
1323
|
+
if (n == null) {
|
|
1324
1324
|
console.warn("can not get hooks context");
|
|
1325
1325
|
return;
|
|
1326
1326
|
}
|
|
1327
1327
|
it(() => {
|
|
1328
|
-
|
|
1329
|
-
}),
|
|
1328
|
+
ds(n, s, e, r);
|
|
1329
|
+
}), ys(n, s, e, r);
|
|
1330
1330
|
};
|
|
1331
1331
|
}
|
|
1332
|
-
const
|
|
1332
|
+
const mn = _r(
|
|
1333
1333
|
"a"
|
|
1334
1334
|
/* ACTIVATED */
|
|
1335
|
-
),
|
|
1335
|
+
), vn = _r(
|
|
1336
1336
|
"da"
|
|
1337
1337
|
/* DEACTIVATED */
|
|
1338
1338
|
), jt = Symbol("routeKey");
|
|
1339
|
-
function
|
|
1340
|
-
|
|
1339
|
+
function sr(s, e) {
|
|
1340
|
+
s.set(jt, e);
|
|
1341
1341
|
}
|
|
1342
|
-
function Vt(
|
|
1343
|
-
let e = Fr(
|
|
1342
|
+
function Vt(s) {
|
|
1343
|
+
let e = Fr(s, jt);
|
|
1344
1344
|
return typeof e == "function" ? e() : e ?? null;
|
|
1345
1345
|
}
|
|
1346
|
-
const ot = Symbol("rk"), yt = Symbol("vd"),
|
|
1347
|
-
function
|
|
1348
|
-
for (var e = [], t = 0; t <
|
|
1349
|
-
var r =
|
|
1346
|
+
const ot = Symbol("rk"), yt = Symbol("vd"), nr = Symbol("rv"), dt = Symbol("rvi"), ir = Symbol("pv"), pt = Symbol("pvi");
|
|
1347
|
+
function ps(s) {
|
|
1348
|
+
for (var e = [], t = 0; t < s.length; ) {
|
|
1349
|
+
var r = s[t];
|
|
1350
1350
|
if (r === "*" || r === "+" || r === "?") {
|
|
1351
|
-
e.push({ type: "MODIFIER", index: t, value:
|
|
1351
|
+
e.push({ type: "MODIFIER", index: t, value: s[t++] });
|
|
1352
1352
|
continue;
|
|
1353
1353
|
}
|
|
1354
1354
|
if (r === "\\") {
|
|
1355
|
-
e.push({ type: "ESCAPED_CHAR", index: t++, value:
|
|
1355
|
+
e.push({ type: "ESCAPED_CHAR", index: t++, value: s[t++] });
|
|
1356
1356
|
continue;
|
|
1357
1357
|
}
|
|
1358
1358
|
if (r === "{") {
|
|
1359
|
-
e.push({ type: "OPEN", index: t, value:
|
|
1359
|
+
e.push({ type: "OPEN", index: t, value: s[t++] });
|
|
1360
1360
|
continue;
|
|
1361
1361
|
}
|
|
1362
1362
|
if (r === "}") {
|
|
1363
|
-
e.push({ type: "CLOSE", index: t, value:
|
|
1363
|
+
e.push({ type: "CLOSE", index: t, value: s[t++] });
|
|
1364
1364
|
continue;
|
|
1365
1365
|
}
|
|
1366
1366
|
if (r === ":") {
|
|
1367
|
-
for (var
|
|
1368
|
-
var o =
|
|
1367
|
+
for (var n = "", i = t + 1; i < s.length; ) {
|
|
1368
|
+
var o = s.charCodeAt(i);
|
|
1369
1369
|
if (
|
|
1370
1370
|
// `0-9`
|
|
1371
1371
|
o >= 48 && o <= 57 || // `A-Z`
|
|
@@ -1373,33 +1373,33 @@ function mn(n) {
|
|
|
1373
1373
|
o >= 97 && o <= 122 || // `_`
|
|
1374
1374
|
o === 95
|
|
1375
1375
|
) {
|
|
1376
|
-
|
|
1376
|
+
n += s[i++];
|
|
1377
1377
|
continue;
|
|
1378
1378
|
}
|
|
1379
1379
|
break;
|
|
1380
1380
|
}
|
|
1381
|
-
if (!
|
|
1381
|
+
if (!n)
|
|
1382
1382
|
throw new TypeError("Missing parameter name at ".concat(t));
|
|
1383
|
-
e.push({ type: "NAME", index: t, value:
|
|
1383
|
+
e.push({ type: "NAME", index: t, value: n }), t = i;
|
|
1384
1384
|
continue;
|
|
1385
1385
|
}
|
|
1386
1386
|
if (r === "(") {
|
|
1387
1387
|
var a = 1, l = "", i = t + 1;
|
|
1388
|
-
if (
|
|
1388
|
+
if (s[i] === "?")
|
|
1389
1389
|
throw new TypeError('Pattern cannot start with "?" at '.concat(i));
|
|
1390
|
-
for (; i <
|
|
1391
|
-
if (
|
|
1392
|
-
l +=
|
|
1390
|
+
for (; i < s.length; ) {
|
|
1391
|
+
if (s[i] === "\\") {
|
|
1392
|
+
l += s[i++] + s[i++];
|
|
1393
1393
|
continue;
|
|
1394
1394
|
}
|
|
1395
|
-
if (
|
|
1395
|
+
if (s[i] === ")") {
|
|
1396
1396
|
if (a--, a === 0) {
|
|
1397
1397
|
i++;
|
|
1398
1398
|
break;
|
|
1399
1399
|
}
|
|
1400
|
-
} else if (
|
|
1400
|
+
} else if (s[i] === "(" && (a++, s[i + 1] !== "?"))
|
|
1401
1401
|
throw new TypeError("Capturing groups are not allowed at ".concat(i));
|
|
1402
|
-
l +=
|
|
1402
|
+
l += s[i++];
|
|
1403
1403
|
}
|
|
1404
1404
|
if (a)
|
|
1405
1405
|
throw new TypeError("Unbalanced pattern at ".concat(t));
|
|
@@ -1408,13 +1408,13 @@ function mn(n) {
|
|
|
1408
1408
|
e.push({ type: "PATTERN", index: t, value: l }), t = i;
|
|
1409
1409
|
continue;
|
|
1410
1410
|
}
|
|
1411
|
-
e.push({ type: "CHAR", index: t, value:
|
|
1411
|
+
e.push({ type: "CHAR", index: t, value: s[t++] });
|
|
1412
1412
|
}
|
|
1413
1413
|
return e.push({ type: "END", index: t, value: "" }), e;
|
|
1414
1414
|
}
|
|
1415
|
-
function Kr(
|
|
1415
|
+
function Kr(s, e) {
|
|
1416
1416
|
e === void 0 && (e = {});
|
|
1417
|
-
for (var t =
|
|
1417
|
+
for (var t = ps(s), r = e.prefixes, n = r === void 0 ? "./" : r, i = "[^".concat(Re(e.delimiter || "/#?"), "]+?"), o = [], a = 0, l = 0, f = "", u = function(E) {
|
|
1418
1418
|
if (l < t.length && t[l].type === E)
|
|
1419
1419
|
return t[l++].value;
|
|
1420
1420
|
}, c = function(E) {
|
|
@@ -1431,7 +1431,7 @@ function Kr(n, e) {
|
|
|
1431
1431
|
var y = u("CHAR"), d = u("NAME"), m = u("PATTERN");
|
|
1432
1432
|
if (d || m) {
|
|
1433
1433
|
var p = y || "";
|
|
1434
|
-
|
|
1434
|
+
n.indexOf(p) === -1 && (f += p, p = ""), f && (o.push(f), f = ""), o.push({
|
|
1435
1435
|
name: d || a++,
|
|
1436
1436
|
prefix: p,
|
|
1437
1437
|
suffix: "",
|
|
@@ -1462,20 +1462,20 @@ function Kr(n, e) {
|
|
|
1462
1462
|
}
|
|
1463
1463
|
return o;
|
|
1464
1464
|
}
|
|
1465
|
-
function
|
|
1466
|
-
return
|
|
1465
|
+
function ms(s, e) {
|
|
1466
|
+
return vs(Kr(s, e), e);
|
|
1467
1467
|
}
|
|
1468
|
-
function
|
|
1468
|
+
function vs(s, e) {
|
|
1469
1469
|
e === void 0 && (e = {});
|
|
1470
|
-
var t = Bt(e), r = e.encode,
|
|
1470
|
+
var t = Bt(e), r = e.encode, n = r === void 0 ? function(l) {
|
|
1471
1471
|
return l;
|
|
1472
|
-
} : r, i = e.validate, o = i === void 0 ? !0 : i, a =
|
|
1472
|
+
} : r, i = e.validate, o = i === void 0 ? !0 : i, a = s.map(function(l) {
|
|
1473
1473
|
if (typeof l == "object")
|
|
1474
1474
|
return new RegExp("^(?:".concat(l.pattern, ")$"), t);
|
|
1475
1475
|
});
|
|
1476
1476
|
return function(l) {
|
|
1477
|
-
for (var f = "", u = 0; u <
|
|
1478
|
-
var c =
|
|
1477
|
+
for (var f = "", u = 0; u < s.length; u++) {
|
|
1478
|
+
var c = s[u];
|
|
1479
1479
|
if (typeof c == "string") {
|
|
1480
1480
|
f += c;
|
|
1481
1481
|
continue;
|
|
@@ -1490,7 +1490,7 @@ function gn(n, e) {
|
|
|
1490
1490
|
throw new TypeError('Expected "'.concat(c.name, '" to not be empty'));
|
|
1491
1491
|
}
|
|
1492
1492
|
for (var m = 0; m < h.length; m++) {
|
|
1493
|
-
var p =
|
|
1493
|
+
var p = n(h[m], c);
|
|
1494
1494
|
if (o && !a[u].test(p))
|
|
1495
1495
|
throw new TypeError('Expected all "'.concat(c.name, '" to match "').concat(c.pattern, '", but got "').concat(p, '"'));
|
|
1496
1496
|
f += c.prefix + p + c.suffix;
|
|
@@ -1498,7 +1498,7 @@ function gn(n, e) {
|
|
|
1498
1498
|
continue;
|
|
1499
1499
|
}
|
|
1500
1500
|
if (typeof h == "string" || typeof h == "number") {
|
|
1501
|
-
var p =
|
|
1501
|
+
var p = n(String(h), c);
|
|
1502
1502
|
if (o && !a[u].test(p))
|
|
1503
1503
|
throw new TypeError('Expected "'.concat(c.name, '" to match "').concat(c.pattern, '", but got "').concat(p, '"'));
|
|
1504
1504
|
f += c.prefix + p + c.suffix;
|
|
@@ -1512,17 +1512,17 @@ function gn(n, e) {
|
|
|
1512
1512
|
return f;
|
|
1513
1513
|
};
|
|
1514
1514
|
}
|
|
1515
|
-
function
|
|
1516
|
-
var t = [], r = $r(
|
|
1517
|
-
return
|
|
1515
|
+
function gs(s, e) {
|
|
1516
|
+
var t = [], r = $r(s, t, e);
|
|
1517
|
+
return ws(r, t, e);
|
|
1518
1518
|
}
|
|
1519
|
-
function
|
|
1519
|
+
function ws(s, e, t) {
|
|
1520
1520
|
t === void 0 && (t = {});
|
|
1521
|
-
var r = t.decode,
|
|
1521
|
+
var r = t.decode, n = r === void 0 ? function(i) {
|
|
1522
1522
|
return i;
|
|
1523
1523
|
} : r;
|
|
1524
1524
|
return function(i) {
|
|
1525
|
-
var o =
|
|
1525
|
+
var o = s.exec(i);
|
|
1526
1526
|
if (!o)
|
|
1527
1527
|
return !1;
|
|
1528
1528
|
for (var a = o[0], l = o.index, f = /* @__PURE__ */ Object.create(null), u = function(h) {
|
|
@@ -1530,52 +1530,52 @@ function bn(n, e, t) {
|
|
|
1530
1530
|
return "continue";
|
|
1531
1531
|
var y = e[h - 1];
|
|
1532
1532
|
y.modifier === "*" || y.modifier === "+" ? f[y.name] = o[h].split(y.prefix + y.suffix).map(function(d) {
|
|
1533
|
-
return
|
|
1534
|
-
}) : f[y.name] =
|
|
1533
|
+
return n(d, y);
|
|
1534
|
+
}) : f[y.name] = n(o[h], y);
|
|
1535
1535
|
}, c = 1; c < o.length; c++)
|
|
1536
1536
|
u(c);
|
|
1537
1537
|
return { path: a, index: l, params: f };
|
|
1538
1538
|
};
|
|
1539
1539
|
}
|
|
1540
|
-
function
|
|
1541
|
-
return
|
|
1540
|
+
function Re(s) {
|
|
1541
|
+
return s.replace(/([.+*?=^!:${}()[\]|/\\])/g, "\\$1");
|
|
1542
1542
|
}
|
|
1543
|
-
function Bt(
|
|
1544
|
-
return
|
|
1543
|
+
function Bt(s) {
|
|
1544
|
+
return s && s.sensitive ? "" : "i";
|
|
1545
1545
|
}
|
|
1546
|
-
function
|
|
1546
|
+
function bs(s, e) {
|
|
1547
1547
|
if (!e)
|
|
1548
|
-
return
|
|
1549
|
-
for (var t = /\((?:\?<(.*?)>)?(?!\?)/g, r = 0,
|
|
1548
|
+
return s;
|
|
1549
|
+
for (var t = /\((?:\?<(.*?)>)?(?!\?)/g, r = 0, n = t.exec(s.source); n; )
|
|
1550
1550
|
e.push({
|
|
1551
1551
|
// Use parenthesized substring match if available, index otherwise
|
|
1552
|
-
name:
|
|
1552
|
+
name: n[1] || r++,
|
|
1553
1553
|
prefix: "",
|
|
1554
1554
|
suffix: "",
|
|
1555
1555
|
modifier: "",
|
|
1556
1556
|
pattern: ""
|
|
1557
|
-
}),
|
|
1558
|
-
return
|
|
1557
|
+
}), n = t.exec(s.source);
|
|
1558
|
+
return s;
|
|
1559
1559
|
}
|
|
1560
|
-
function
|
|
1561
|
-
var r =
|
|
1562
|
-
return $r(
|
|
1560
|
+
function xs(s, e, t) {
|
|
1561
|
+
var r = s.map(function(n) {
|
|
1562
|
+
return $r(n, e, t).source;
|
|
1563
1563
|
});
|
|
1564
1564
|
return new RegExp("(?:".concat(r.join("|"), ")"), Bt(t));
|
|
1565
1565
|
}
|
|
1566
|
-
function
|
|
1567
|
-
return
|
|
1566
|
+
function Rs(s, e, t) {
|
|
1567
|
+
return Ss(Kr(s, t), e, t);
|
|
1568
1568
|
}
|
|
1569
|
-
function
|
|
1569
|
+
function Ss(s, e, t) {
|
|
1570
1570
|
t === void 0 && (t = {});
|
|
1571
|
-
for (var r = t.strict,
|
|
1571
|
+
for (var r = t.strict, n = r === void 0 ? !1 : r, i = t.start, o = i === void 0 ? !0 : i, a = t.end, l = a === void 0 ? !0 : a, f = t.encode, u = f === void 0 ? function(L) {
|
|
1572
1572
|
return L;
|
|
1573
|
-
} : f, c = t.delimiter, h = c === void 0 ? "/#?" : c, y = t.endsWith, d = y === void 0 ? "" : y, m = "[".concat(
|
|
1573
|
+
} : f, c = t.delimiter, h = c === void 0 ? "/#?" : c, y = t.endsWith, d = y === void 0 ? "" : y, m = "[".concat(Re(d), "]|$"), p = "[".concat(Re(h), "]"), v = o ? "^" : "", g = 0, _ = s; g < _.length; g++) {
|
|
1574
1574
|
var b = _[g];
|
|
1575
1575
|
if (typeof b == "string")
|
|
1576
|
-
v +=
|
|
1576
|
+
v += Re(u(b));
|
|
1577
1577
|
else {
|
|
1578
|
-
var K =
|
|
1578
|
+
var K = Re(u(b.prefix)), E = Re(u(b.suffix));
|
|
1579
1579
|
if (b.pattern)
|
|
1580
1580
|
if (e && e.push(b), K || E)
|
|
1581
1581
|
if (b.modifier === "+" || b.modifier === "*") {
|
|
@@ -1590,19 +1590,19 @@ function Pn(n, e, t) {
|
|
|
1590
1590
|
}
|
|
1591
1591
|
}
|
|
1592
1592
|
if (l)
|
|
1593
|
-
|
|
1593
|
+
n || (v += "".concat(p, "?")), v += t.endsWith ? "(?=".concat(m, ")") : "$";
|
|
1594
1594
|
else {
|
|
1595
|
-
var P =
|
|
1596
|
-
|
|
1595
|
+
var P = s[s.length - 1], k = typeof P == "string" ? p.indexOf(P[P.length - 1]) > -1 : P === void 0;
|
|
1596
|
+
n || (v += "(?:".concat(p, "(?=").concat(m, "))?")), k || (v += "(?=".concat(p, "|").concat(m, ")"));
|
|
1597
1597
|
}
|
|
1598
1598
|
return new RegExp(v, Bt(t));
|
|
1599
1599
|
}
|
|
1600
|
-
function $r(
|
|
1601
|
-
return
|
|
1600
|
+
function $r(s, e, t) {
|
|
1601
|
+
return s instanceof RegExp ? bs(s, e) : Array.isArray(s) ? xs(s, e, t) : Rs(s, e, t);
|
|
1602
1602
|
}
|
|
1603
|
-
var A = /* @__PURE__ */ ((
|
|
1604
|
-
const J = Symbol("rootKey"), z = Symbol("rootNodeKey"),
|
|
1605
|
-
class
|
|
1603
|
+
var A = /* @__PURE__ */ ((s) => (s[s.Push = 0] = "Push", s[s.Replace = 1] = "Replace", s[s.Put = 2] = "Put", s[s.Append = 3] = "Append", s[s.Open = 4] = "Open", s))(A || {}), Ye = /* @__PURE__ */ ((s) => (s[s.Part = 0] = "Part", s[s.All = 1] = "All", s))(Ye || {});
|
|
1604
|
+
const J = Symbol("rootKey"), z = Symbol("rootNodeKey"), ye = Symbol("parentNodeKey"), Ze = Symbol("nameKey");
|
|
1605
|
+
class ne {
|
|
1606
1606
|
/**
|
|
1607
1607
|
* 实例
|
|
1608
1608
|
*/
|
|
@@ -1630,11 +1630,11 @@ class se {
|
|
|
1630
1630
|
* @param index
|
|
1631
1631
|
* @param active
|
|
1632
1632
|
*/
|
|
1633
|
-
constructor(e, t, r = 0,
|
|
1634
|
-
this.route = e, this.model = t, this.index = r, this.active =
|
|
1633
|
+
constructor(e, t, r = 0, n = !0) {
|
|
1634
|
+
this.route = e, this.model = t, this.index = r, this.active = n;
|
|
1635
1635
|
}
|
|
1636
1636
|
}
|
|
1637
|
-
class
|
|
1637
|
+
class Ke {
|
|
1638
1638
|
/**
|
|
1639
1639
|
* model slots列表
|
|
1640
1640
|
*/
|
|
@@ -1666,7 +1666,7 @@ class _e {
|
|
|
1666
1666
|
/**
|
|
1667
1667
|
* view的父亲记得引用(会在router的[sync]方法中建立关系)
|
|
1668
1668
|
*/
|
|
1669
|
-
[
|
|
1669
|
+
[ye] = null;
|
|
1670
1670
|
/**
|
|
1671
1671
|
* 名称
|
|
1672
1672
|
*/
|
|
@@ -1712,8 +1712,8 @@ class V {
|
|
|
1712
1712
|
*/
|
|
1713
1713
|
static include(e, t) {
|
|
1714
1714
|
for (let r = 0; r < e.length; r++) {
|
|
1715
|
-
let
|
|
1716
|
-
if (
|
|
1715
|
+
let n = e[r];
|
|
1716
|
+
if (n.view === t.view && (t.index == -1 || n.index === t.index) && n.level === t.level)
|
|
1717
1717
|
return !0;
|
|
1718
1718
|
}
|
|
1719
1719
|
return !1;
|
|
@@ -1725,13 +1725,13 @@ class mt {
|
|
|
1725
1725
|
*/
|
|
1726
1726
|
views = [];
|
|
1727
1727
|
}
|
|
1728
|
-
class
|
|
1728
|
+
class Ps {
|
|
1729
1729
|
/**
|
|
1730
1730
|
* 层
|
|
1731
1731
|
*/
|
|
1732
1732
|
layers = [];
|
|
1733
1733
|
}
|
|
1734
|
-
class
|
|
1734
|
+
class Cs {
|
|
1735
1735
|
/**
|
|
1736
1736
|
* time
|
|
1737
1737
|
*/
|
|
@@ -1741,7 +1741,7 @@ class En {
|
|
|
1741
1741
|
*/
|
|
1742
1742
|
route;
|
|
1743
1743
|
}
|
|
1744
|
-
class
|
|
1744
|
+
class Es {
|
|
1745
1745
|
/**
|
|
1746
1746
|
* 禁止重复提交时间间隔
|
|
1747
1747
|
*/
|
|
@@ -1749,7 +1749,7 @@ class An {
|
|
|
1749
1749
|
/**
|
|
1750
1750
|
* 提交路由记录
|
|
1751
1751
|
*/
|
|
1752
|
-
submitRecorder = new
|
|
1752
|
+
submitRecorder = new Cs();
|
|
1753
1753
|
/**
|
|
1754
1754
|
* 判断是否为同一个路由(只判断name、path和root是否一致)
|
|
1755
1755
|
* @param x
|
|
@@ -1779,7 +1779,7 @@ class An {
|
|
|
1779
1779
|
this.submitRecorder.time === e && (this.submitRecorder.route = void 0);
|
|
1780
1780
|
}
|
|
1781
1781
|
}
|
|
1782
|
-
const
|
|
1782
|
+
const Se = Symbol("_notifyChange");
|
|
1783
1783
|
class or {
|
|
1784
1784
|
//当前路由
|
|
1785
1785
|
currentRoute;
|
|
@@ -1794,9 +1794,9 @@ class or {
|
|
|
1794
1794
|
this.currentRoute = e, this.routes = t;
|
|
1795
1795
|
}
|
|
1796
1796
|
}
|
|
1797
|
-
const
|
|
1798
|
-
function wt(
|
|
1799
|
-
return typeof
|
|
1797
|
+
const fe = Symbol("historyChangeConsumerKey"), lr = Symbol("_navigateFirstRoute"), Be = Symbol("_getRouteMark"), vt = Symbol("_getUrlSearch"), gt = Symbol("_generateLocation"), $e = Symbol("_setRouteMarkRecorder"), Te = Symbol("beforeRestoreFiltersKey"), ar = Symbol("_beforeRestore"), fr = "Symbol(_fox_restore_point)";
|
|
1798
|
+
function wt(s, ...e) {
|
|
1799
|
+
return typeof s == "function" ? Reflect.apply(s, null, [...e]) : s;
|
|
1800
1800
|
}
|
|
1801
1801
|
class Tr {
|
|
1802
1802
|
/**
|
|
@@ -1836,13 +1836,13 @@ class Tr {
|
|
|
1836
1836
|
*/
|
|
1837
1837
|
historyChange;
|
|
1838
1838
|
/**
|
|
1839
|
-
*
|
|
1839
|
+
* history change消费者标志
|
|
1840
1840
|
*/
|
|
1841
|
-
[
|
|
1841
|
+
[fe] = !1;
|
|
1842
1842
|
/**
|
|
1843
1843
|
* before restore 过滤器队列(用于刷新还原)
|
|
1844
1844
|
*/
|
|
1845
|
-
[
|
|
1845
|
+
[Te] = new Array();
|
|
1846
1846
|
/**
|
|
1847
1847
|
* 构造函数
|
|
1848
1848
|
* @param mode
|
|
@@ -1852,8 +1852,8 @@ class Tr {
|
|
|
1852
1852
|
* @param historyMonitor
|
|
1853
1853
|
* @param traceless
|
|
1854
1854
|
*/
|
|
1855
|
-
constructor(e = "hash", t = "", r = "",
|
|
1856
|
-
this.mode = e, this.base = t, this.query = r, this.firstNavigate =
|
|
1855
|
+
constructor(e = "hash", t = "", r = "", n = !0, i = !0, o = !1, a) {
|
|
1856
|
+
this.mode = e, this.base = t, this.query = r, this.firstNavigate = n, this.historyMonitor = i, this.traceless = o, this.storage = a ?? j().sessionStorage;
|
|
1857
1857
|
}
|
|
1858
1858
|
/**
|
|
1859
1859
|
* 初始化
|
|
@@ -1863,18 +1863,22 @@ class Tr {
|
|
|
1863
1863
|
init(e = !0) {
|
|
1864
1864
|
const t = j();
|
|
1865
1865
|
return typeof this.historyChange != "function" && (this.historyChange = () => {
|
|
1866
|
-
if (this[
|
|
1867
|
-
this[
|
|
1866
|
+
if (typeof this[fe] == "function") {
|
|
1867
|
+
const r = this[fe]();
|
|
1868
|
+
if (this[fe] = !1, r)
|
|
1869
|
+
return;
|
|
1870
|
+
} else if (this[fe] === !0) {
|
|
1871
|
+
this[fe] = !1;
|
|
1868
1872
|
return;
|
|
1869
1873
|
}
|
|
1870
1874
|
if (wt(this.historyMonitor)) {
|
|
1871
1875
|
const r = t.history.state;
|
|
1872
|
-
this[
|
|
1876
|
+
this[Se](r);
|
|
1873
1877
|
try {
|
|
1874
|
-
let
|
|
1875
|
-
if (typeof r == "string" ?
|
|
1878
|
+
let n = [];
|
|
1879
|
+
if (typeof r == "string" ? n = JSON.parse(r) : n = r, Array.isArray(n) && n.length > 0) {
|
|
1876
1880
|
const i = this[Be]() ?? "/";
|
|
1877
|
-
this[
|
|
1881
|
+
this[$e](i, n);
|
|
1878
1882
|
}
|
|
1879
1883
|
} catch {
|
|
1880
1884
|
}
|
|
@@ -1897,10 +1901,10 @@ class Tr {
|
|
|
1897
1901
|
* @param mark
|
|
1898
1902
|
* @param routes
|
|
1899
1903
|
*/
|
|
1900
|
-
[ar](e, t, r,
|
|
1901
|
-
for (let i of this[
|
|
1904
|
+
[ar](e, t, r, n) {
|
|
1905
|
+
for (let i of this[Te])
|
|
1902
1906
|
try {
|
|
1903
|
-
const o = Reflect.apply(i, {}, [e, t, r,
|
|
1907
|
+
const o = Reflect.apply(i, {}, [e, t, r, n]);
|
|
1904
1908
|
if (o === !1)
|
|
1905
1909
|
return o;
|
|
1906
1910
|
} catch (o) {
|
|
@@ -1913,7 +1917,7 @@ class Tr {
|
|
|
1913
1917
|
* @param filter
|
|
1914
1918
|
*/
|
|
1915
1919
|
beforeRestoreEach(e) {
|
|
1916
|
-
this[
|
|
1920
|
+
this[Te].push(e);
|
|
1917
1921
|
}
|
|
1918
1922
|
/**
|
|
1919
1923
|
* 移除before restore filter
|
|
@@ -1921,8 +1925,8 @@ class Tr {
|
|
|
1921
1925
|
* @returns
|
|
1922
1926
|
*/
|
|
1923
1927
|
removeBeforeRestoreEach(e) {
|
|
1924
|
-
const t = this[
|
|
1925
|
-
return t !== -1 ? (this[
|
|
1928
|
+
const t = this[Te].indexOf(e);
|
|
1929
|
+
return t !== -1 ? (this[Te].splice(t, 1), !0) : !1;
|
|
1926
1930
|
}
|
|
1927
1931
|
/**
|
|
1928
1932
|
* 导航到第一个route
|
|
@@ -1936,33 +1940,33 @@ class Tr {
|
|
|
1936
1940
|
const a = o.routes.filter((l, f) => (l.params = l.params ? Sr(l.params) : {}, this[ar](l, f, e, o.routes)));
|
|
1937
1941
|
if (a.length > 0) {
|
|
1938
1942
|
const l = this[vt](), f = a.length - 1;
|
|
1939
|
-
a[f].query = l || a[f].query, this[
|
|
1943
|
+
a[f].query = l || a[f].query, this[Se](a);
|
|
1940
1944
|
return;
|
|
1941
1945
|
}
|
|
1942
1946
|
}
|
|
1943
1947
|
} catch {
|
|
1944
1948
|
}
|
|
1945
1949
|
const r = e.indexOf("!");
|
|
1946
|
-
let
|
|
1947
|
-
r != -1 ?
|
|
1950
|
+
let n;
|
|
1951
|
+
r != -1 ? n = e.substring(r + 1) : n = e;
|
|
1948
1952
|
const i = new q();
|
|
1949
|
-
i.path =
|
|
1953
|
+
i.path = n, i.query = this[vt](), this[Se]([i]);
|
|
1950
1954
|
}
|
|
1951
1955
|
/**
|
|
1952
1956
|
* 设置当前route mark的记录
|
|
1953
1957
|
* @param mark
|
|
1954
1958
|
* @param routes
|
|
1955
1959
|
*/
|
|
1956
|
-
[
|
|
1960
|
+
[$e](e, t) {
|
|
1957
1961
|
try {
|
|
1958
1962
|
t.forEach((i) => {
|
|
1959
1963
|
i.params = i.params ? Rr(i.params) : {};
|
|
1960
1964
|
});
|
|
1961
|
-
const
|
|
1965
|
+
const n = JSON.stringify({
|
|
1962
1966
|
mark: e,
|
|
1963
1967
|
routes: t
|
|
1964
1968
|
});
|
|
1965
|
-
this.storage.setItem(fr,
|
|
1969
|
+
this.storage.setItem(fr, n);
|
|
1966
1970
|
} catch (r) {
|
|
1967
1971
|
console.error(r.message, r);
|
|
1968
1972
|
}
|
|
@@ -1974,12 +1978,12 @@ class Tr {
|
|
|
1974
1978
|
*/
|
|
1975
1979
|
setRestorePoint(e) {
|
|
1976
1980
|
const t = this[Be]() ?? "/";
|
|
1977
|
-
this[
|
|
1981
|
+
this[$e](t, e);
|
|
1978
1982
|
}
|
|
1979
1983
|
/**
|
|
1980
1984
|
* 通知修改
|
|
1981
1985
|
*/
|
|
1982
|
-
[
|
|
1986
|
+
[Se](e) {
|
|
1983
1987
|
typeof this.changeHandler == "function" && this.changeHandler(e);
|
|
1984
1988
|
}
|
|
1985
1989
|
/**
|
|
@@ -2014,11 +2018,11 @@ class Tr {
|
|
|
2014
2018
|
/**
|
|
2015
2019
|
* 跳转
|
|
2016
2020
|
* @param delta
|
|
2017
|
-
* @param
|
|
2021
|
+
* @param consume
|
|
2018
2022
|
*/
|
|
2019
|
-
go(e, t = !
|
|
2023
|
+
go(e, t = !1) {
|
|
2020
2024
|
const r = j();
|
|
2021
|
-
this[
|
|
2025
|
+
this[fe] = t, r.history.go(e);
|
|
2022
2026
|
}
|
|
2023
2027
|
/**
|
|
2024
2028
|
* 加入记录
|
|
@@ -2028,7 +2032,7 @@ class Tr {
|
|
|
2028
2032
|
const t = this[gt](e.currentRoute);
|
|
2029
2033
|
wt(this.traceless, e.currentRoute) || j().history.pushState(e.routes, "", t);
|
|
2030
2034
|
const r = e.currentRoute.fullPath;
|
|
2031
|
-
this[
|
|
2035
|
+
this[$e](r, e.routes);
|
|
2032
2036
|
}
|
|
2033
2037
|
/**
|
|
2034
2038
|
* 替换当前记录
|
|
@@ -2038,7 +2042,7 @@ class Tr {
|
|
|
2038
2042
|
const t = this[gt](e.currentRoute);
|
|
2039
2043
|
wt(this.traceless, e.currentRoute) || j().history.replaceState(e.routes, "", t);
|
|
2040
2044
|
const r = e.currentRoute.fullPath;
|
|
2041
|
-
this[
|
|
2045
|
+
this[$e](r, e.routes);
|
|
2042
2046
|
}
|
|
2043
2047
|
/**
|
|
2044
2048
|
* 生成Location
|
|
@@ -2058,20 +2062,20 @@ class Tr {
|
|
|
2058
2062
|
a = e.query;
|
|
2059
2063
|
this.query ? (r = a.length > 0 ? `${this.query}&${a}` : this.query, r.length > 0 && r.charAt(0) !== "?" && (r = `?${r}`)) : a.length > 0 && (r = `?${a}`);
|
|
2060
2064
|
}
|
|
2061
|
-
const
|
|
2065
|
+
const n = t.location;
|
|
2062
2066
|
let i = e.alias ?? e.fullPath;
|
|
2063
2067
|
i.startsWith(te) && (i = i.substring(te.length + 1));
|
|
2064
2068
|
let o;
|
|
2065
|
-
return r ? this.mode == "path" ? i.indexOf("/") === 0 ? o = `${this.base}${i}${r}` : o = `${this.base}/${i}${r}` : o = `${
|
|
2069
|
+
return r ? this.mode == "path" ? i.indexOf("/") === 0 ? o = `${this.base}${i}${r}` : o = `${this.base}/${i}${r}` : o = `${n.pathname}${r}#${i}` : this.mode == "path" ? i.indexOf("/") === 0 ? o = `${this.base}${i}` : o = `${this.base}/${i}` : o = `${n.pathname}#${i}`, `${n.origin}${o}`;
|
|
2066
2070
|
}
|
|
2067
2071
|
}
|
|
2068
|
-
function
|
|
2069
|
-
return e !== null && (e = j().location.pathname), e && e.endsWith("/") && (e = e.substring(0, e.length - 1)), new Tr("path", e ?? "", t,
|
|
2072
|
+
function gn(s = !0, e = null, t = "", r = !0, n = !1, i) {
|
|
2073
|
+
return e !== null && (e = j().location.pathname), e && e.endsWith("/") && (e = e.substring(0, e.length - 1)), new Tr("path", e ?? "", t, s, r, n, i);
|
|
2070
2074
|
}
|
|
2071
|
-
function
|
|
2072
|
-
return new Tr("hash", "", e,
|
|
2075
|
+
function As(s = !0, e = "", t = !0, r = !1, n) {
|
|
2076
|
+
return new Tr("hash", "", e, s, t, r, n);
|
|
2073
2077
|
}
|
|
2074
|
-
class
|
|
2078
|
+
class Fs {
|
|
2075
2079
|
/**
|
|
2076
2080
|
* 历史最大记录
|
|
2077
2081
|
*/
|
|
@@ -2146,21 +2150,25 @@ class _n {
|
|
|
2146
2150
|
/**
|
|
2147
2151
|
* 通知修改
|
|
2148
2152
|
*/
|
|
2149
|
-
[
|
|
2153
|
+
[Se](e) {
|
|
2150
2154
|
typeof this.changeHandler == "function" && this.changeHandler(e);
|
|
2151
2155
|
}
|
|
2152
2156
|
/**
|
|
2153
2157
|
* 跳转
|
|
2154
2158
|
* @param delta
|
|
2155
|
-
* @param
|
|
2159
|
+
* @param consume 是否消费事件
|
|
2156
2160
|
*/
|
|
2157
|
-
go(e, t = !
|
|
2161
|
+
go(e, t = !1) {
|
|
2158
2162
|
if (this.queue.length == 0 || this.cursor <= 0 || this.cursor >= this.queue.length - 1)
|
|
2159
2163
|
return;
|
|
2160
2164
|
let r = this.cursor + e;
|
|
2161
|
-
if (r < 0 ? r = 0 : r > this.queue.length - 1 && (r = this.queue.length - 1), r != this.cursor
|
|
2162
|
-
|
|
2163
|
-
|
|
2165
|
+
if (r < 0 ? r = 0 : r > this.queue.length - 1 && (r = this.queue.length - 1), r != this.cursor) {
|
|
2166
|
+
this.cursor = r;
|
|
2167
|
+
let n = !1;
|
|
2168
|
+
if (typeof t == "function" ? n = t() : n = t, !n) {
|
|
2169
|
+
const i = this.queue[r];
|
|
2170
|
+
this[Se](i.routes);
|
|
2171
|
+
}
|
|
2164
2172
|
}
|
|
2165
2173
|
}
|
|
2166
2174
|
/**
|
|
@@ -2186,27 +2194,27 @@ class _n {
|
|
|
2186
2194
|
setRestorePoint(e) {
|
|
2187
2195
|
}
|
|
2188
2196
|
}
|
|
2189
|
-
function
|
|
2190
|
-
return new
|
|
2197
|
+
function _s(s = "", e = 50) {
|
|
2198
|
+
return new Fs(s, e);
|
|
2191
2199
|
}
|
|
2192
|
-
const Ue = Symbol("_constructRouteModel"), ke = Symbol("_findRouteModel"), bt = Symbol("_findRootView"), ur = Symbol("_getFirstView"),
|
|
2193
|
-
function
|
|
2194
|
-
return
|
|
2200
|
+
const Ue = Symbol("_constructRouteModel"), ke = Symbol("_findRouteModel"), bt = Symbol("_findRootView"), ur = Symbol("_getFirstView"), ue = Symbol("_removeView"), cr = Symbol("_buildPage"), hr = Symbol("_resolveComponent"), yr = Symbol("_update"), ie = Symbol("_merge"), xt = Symbol("_handleHistoryChange"), We = Symbol("_handleRouteUpdated"), ze = Symbol("routeUpdatedCallback"), w = Symbol("currentRoutes"), ge = Symbol("current"), dr = Symbol("_addRouteRecorder"), qe = Symbol("_removeRouteRecorder"), Je = Symbol("_cloneRouteRecorder"), T = Symbol("_handleError"), Ge = Symbol("errorCallback"), B = Symbol("registerKey"), Qe = Symbol("notFoundKey"), Rt = Symbol("notFoundPathKey"), U = Symbol("forestKey"), C = Symbol("historyKey"), je = Symbol("beforeFiltersKey"), Oe = Symbol("afterFiltersKey"), Le = Symbol("destroyFiltersKey"), St = Symbol("propsFilterKey"), we = Symbol("mainDispatcherKey"), Pt = Symbol("initKey"), ce = Symbol("readyKey"), Ct = Symbol("readyHandlersKey"), Xe = Symbol("_markReady"), pr = Symbol("_createNextFn"), Et = Symbol("_start"), At = Symbol("_before"), Ft = Symbol("_after"), mr = Symbol("_destroy"), _t = Symbol("_load"), Me = Symbol("_unload"), Ne = Symbol("routerGuardKey");
|
|
2201
|
+
function Ks(s) {
|
|
2202
|
+
return s.layers.length == 0 || s.layers[0].views.length == 0;
|
|
2195
2203
|
}
|
|
2196
|
-
function
|
|
2204
|
+
function $s(s) {
|
|
2197
2205
|
let e = [];
|
|
2198
|
-
return
|
|
2206
|
+
return s.layers.forEach((t) => {
|
|
2199
2207
|
t.models == null || t.models == null || t.models.forEach((r) => {
|
|
2200
2208
|
if (!(r == null || r == null))
|
|
2201
2209
|
if (typeof r.meta == "object") {
|
|
2202
|
-
let
|
|
2203
|
-
e.push(
|
|
2210
|
+
let n = $(!0, {}, r.meta);
|
|
2211
|
+
e.push(n);
|
|
2204
2212
|
} else
|
|
2205
2213
|
r.meta && e.push(r.meta);
|
|
2206
2214
|
});
|
|
2207
2215
|
}), e;
|
|
2208
2216
|
}
|
|
2209
|
-
class
|
|
2217
|
+
class Ts {
|
|
2210
2218
|
/**
|
|
2211
2219
|
* 注册表
|
|
2212
2220
|
*/
|
|
@@ -2222,7 +2230,7 @@ class qn {
|
|
|
2222
2230
|
/**
|
|
2223
2231
|
* ready
|
|
2224
2232
|
*/
|
|
2225
|
-
[
|
|
2233
|
+
[ce] = !1;
|
|
2226
2234
|
/**
|
|
2227
2235
|
* ready handlers
|
|
2228
2236
|
*/
|
|
@@ -2230,7 +2238,7 @@ class qn {
|
|
|
2230
2238
|
/**
|
|
2231
2239
|
* 页面根节点
|
|
2232
2240
|
*/
|
|
2233
|
-
[U] = new
|
|
2241
|
+
[U] = new Ps();
|
|
2234
2242
|
/**
|
|
2235
2243
|
* 历史记录控制器
|
|
2236
2244
|
*/
|
|
@@ -2250,15 +2258,15 @@ class qn {
|
|
|
2250
2258
|
/**
|
|
2251
2259
|
* before过滤器队列
|
|
2252
2260
|
*/
|
|
2253
|
-
[
|
|
2261
|
+
[je] = new Array();
|
|
2254
2262
|
/**
|
|
2255
2263
|
* after过滤器队列
|
|
2256
2264
|
*/
|
|
2257
|
-
[
|
|
2265
|
+
[Oe] = new Array();
|
|
2258
2266
|
/**
|
|
2259
2267
|
* destroy过滤器队列
|
|
2260
2268
|
*/
|
|
2261
|
-
[
|
|
2269
|
+
[Le] = new Array();
|
|
2262
2270
|
/**
|
|
2263
2271
|
* 属性传递过滤器
|
|
2264
2272
|
*/
|
|
@@ -2266,11 +2274,11 @@ class qn {
|
|
|
2266
2274
|
/**
|
|
2267
2275
|
* 主任务分发器
|
|
2268
2276
|
*/
|
|
2269
|
-
[
|
|
2277
|
+
[we] = new rt();
|
|
2270
2278
|
/**
|
|
2271
2279
|
* 路由守护者
|
|
2272
2280
|
*/
|
|
2273
|
-
[
|
|
2281
|
+
[Ne] = new Es();
|
|
2274
2282
|
/**
|
|
2275
2283
|
* 是否初始化
|
|
2276
2284
|
*/
|
|
@@ -2278,12 +2286,12 @@ class qn {
|
|
|
2278
2286
|
/**
|
|
2279
2287
|
* 当前最新路由
|
|
2280
2288
|
*/
|
|
2281
|
-
[
|
|
2289
|
+
[ge] = gr(null);
|
|
2282
2290
|
/**
|
|
2283
2291
|
* 获取当前最新route
|
|
2284
2292
|
*/
|
|
2285
2293
|
get current() {
|
|
2286
|
-
return this[
|
|
2294
|
+
return this[ge].value;
|
|
2287
2295
|
}
|
|
2288
2296
|
//属性
|
|
2289
2297
|
options;
|
|
@@ -2294,8 +2302,8 @@ class qn {
|
|
|
2294
2302
|
constructor(e) {
|
|
2295
2303
|
this.options = e ?? {}, this.options.notFoundPath && this.setNotFoundPath(this.options.notFoundPath);
|
|
2296
2304
|
let t = this.options.routes || [];
|
|
2297
|
-
this.addRoutes(t), this.options.notFound && this.setNotFoundRoute(this.options.notFound), e.history ? this[C] = e.history : this[C] =
|
|
2298
|
-
let
|
|
2305
|
+
this.addRoutes(t), this.options.notFound && this.setNotFoundRoute(this.options.notFound), e.history ? this[C] = e.history : this[C] = Ee ? As() : _s(), this[C]?.listen(async (r) => {
|
|
2306
|
+
let n = !0;
|
|
2299
2307
|
try {
|
|
2300
2308
|
if (typeof r == "string") {
|
|
2301
2309
|
const i = this[I](r);
|
|
@@ -2303,9 +2311,9 @@ class qn {
|
|
|
2303
2311
|
} else
|
|
2304
2312
|
await this[xt](r);
|
|
2305
2313
|
} catch (i) {
|
|
2306
|
-
console.error(i.message, i),
|
|
2314
|
+
console.error(i.message, i), n = !1;
|
|
2307
2315
|
}
|
|
2308
|
-
this[
|
|
2316
|
+
this[ce] === !1 && this[Xe](n);
|
|
2309
2317
|
});
|
|
2310
2318
|
}
|
|
2311
2319
|
/**
|
|
@@ -2330,13 +2338,13 @@ class qn {
|
|
|
2330
2338
|
* 初始化
|
|
2331
2339
|
*/
|
|
2332
2340
|
init() {
|
|
2333
|
-
this[Pt] !== !0 && (this[C]?.init(!this[
|
|
2341
|
+
this[Pt] !== !0 && (this[C]?.init(!this[ce]), this[Pt] = !0);
|
|
2334
2342
|
}
|
|
2335
2343
|
/**
|
|
2336
2344
|
* 第一次导航是否完成
|
|
2337
2345
|
*/
|
|
2338
2346
|
isReady() {
|
|
2339
|
-
return this[
|
|
2347
|
+
return this[ce] ? Promise.resolve() : new Promise((e, t) => {
|
|
2340
2348
|
this[Ct].push([e, t]);
|
|
2341
2349
|
});
|
|
2342
2350
|
}
|
|
@@ -2344,11 +2352,11 @@ class qn {
|
|
|
2344
2352
|
* 设置第一导航完成
|
|
2345
2353
|
*/
|
|
2346
2354
|
[Xe](e) {
|
|
2347
|
-
this[
|
|
2355
|
+
this[ce] = !0, this[Ct].forEach(([t, r]) => {
|
|
2348
2356
|
try {
|
|
2349
2357
|
e ? t() : r();
|
|
2350
|
-
} catch (
|
|
2351
|
-
console.error(
|
|
2358
|
+
} catch (n) {
|
|
2359
|
+
console.error(n.message, n);
|
|
2352
2360
|
}
|
|
2353
2361
|
});
|
|
2354
2362
|
}
|
|
@@ -2360,16 +2368,16 @@ class qn {
|
|
|
2360
2368
|
try {
|
|
2361
2369
|
if (!e) {
|
|
2362
2370
|
let o = [...this[w]].reverse();
|
|
2363
|
-
return this[
|
|
2371
|
+
return this[Me](o), Ee && j().location.reload(), Promise.resolve();
|
|
2364
2372
|
}
|
|
2365
|
-
let t = null, r = [],
|
|
2373
|
+
let t = null, r = [], n = [], i = 0;
|
|
2366
2374
|
for (; i < e.length && i < this[w].length && q.isSame(e[i], this[w][i]); i++)
|
|
2367
2375
|
e[i].active === !0 && e[i].active !== this[w][i].active && (t = e[i]);
|
|
2368
|
-
if (i < e.length && (r = e.slice(i)), i < this[w].length && (
|
|
2376
|
+
if (i < e.length && (r = e.slice(i)), i < this[w].length && (n = this[w].slice(i).reverse()), n.length === 0 && r.length === 0) {
|
|
2369
2377
|
if (t !== null)
|
|
2370
2378
|
return this.restore([t]);
|
|
2371
|
-
} else if (
|
|
2372
|
-
if (this[
|
|
2379
|
+
} else if (n.length > 0) {
|
|
2380
|
+
if (this[Me](n)) {
|
|
2373
2381
|
if (r.length > 0)
|
|
2374
2382
|
return this.restore(r);
|
|
2375
2383
|
if (t !== null)
|
|
@@ -2388,14 +2396,14 @@ class qn {
|
|
|
2388
2396
|
*/
|
|
2389
2397
|
[We](e) {
|
|
2390
2398
|
if (e)
|
|
2391
|
-
this[
|
|
2399
|
+
this[ge].value = e;
|
|
2392
2400
|
else {
|
|
2393
2401
|
let t = this[w].length;
|
|
2394
|
-
t > 0 ? this[
|
|
2402
|
+
t > 0 ? this[ge].value = this[w][t - 1] : this[ge].value = null;
|
|
2395
2403
|
}
|
|
2396
2404
|
if (typeof this[ze] == "function")
|
|
2397
2405
|
try {
|
|
2398
|
-
this[ze](this[
|
|
2406
|
+
this[ze](this[ge].value);
|
|
2399
2407
|
} catch {
|
|
2400
2408
|
}
|
|
2401
2409
|
}
|
|
@@ -2407,11 +2415,11 @@ class qn {
|
|
|
2407
2415
|
if (e.opsType === A.Open) {
|
|
2408
2416
|
let t = !1;
|
|
2409
2417
|
const r = this[w].length - 1;
|
|
2410
|
-
for (let
|
|
2411
|
-
const i = this[w][
|
|
2418
|
+
for (let n = r; n >= 0; n--) {
|
|
2419
|
+
const i = this[w][n];
|
|
2412
2420
|
if (e.root == i.root) {
|
|
2413
2421
|
if (e.path === i.path) {
|
|
2414
|
-
this[w].splice(
|
|
2422
|
+
this[w].splice(n, 1, e), t = !0;
|
|
2415
2423
|
continue;
|
|
2416
2424
|
}
|
|
2417
2425
|
e.active && (i.active = !1);
|
|
@@ -2438,7 +2446,7 @@ class qn {
|
|
|
2438
2446
|
*
|
|
2439
2447
|
* @param route
|
|
2440
2448
|
*/
|
|
2441
|
-
[
|
|
2449
|
+
[qe](e) {
|
|
2442
2450
|
if (!this[w])
|
|
2443
2451
|
return;
|
|
2444
2452
|
let t = -1;
|
|
@@ -2515,22 +2523,22 @@ class qn {
|
|
|
2515
2523
|
* @param filter
|
|
2516
2524
|
*/
|
|
2517
2525
|
beforeEach(e) {
|
|
2518
|
-
this[
|
|
2526
|
+
this[je].push(e);
|
|
2519
2527
|
}
|
|
2520
2528
|
/**
|
|
2521
2529
|
* 移除before filter
|
|
2522
2530
|
* @param filter
|
|
2523
2531
|
*/
|
|
2524
2532
|
removeBeforeEach(e) {
|
|
2525
|
-
const t = this[
|
|
2526
|
-
return t !== -1 ? (this[
|
|
2533
|
+
const t = this[je].indexOf(e);
|
|
2534
|
+
return t !== -1 ? (this[je].splice(t, 1), !0) : !1;
|
|
2527
2535
|
}
|
|
2528
2536
|
/**
|
|
2529
2537
|
* 添加after filter
|
|
2530
2538
|
* @param filter
|
|
2531
2539
|
*/
|
|
2532
2540
|
afterEach(e) {
|
|
2533
|
-
this[
|
|
2541
|
+
this[Oe].push(e);
|
|
2534
2542
|
}
|
|
2535
2543
|
/**
|
|
2536
2544
|
* 移除after filter
|
|
@@ -2538,15 +2546,15 @@ class qn {
|
|
|
2538
2546
|
* @returns
|
|
2539
2547
|
*/
|
|
2540
2548
|
removeAfterEach(e) {
|
|
2541
|
-
const t = this[
|
|
2542
|
-
return t !== -1 ? (this[
|
|
2549
|
+
const t = this[Oe].indexOf(e);
|
|
2550
|
+
return t !== -1 ? (this[Oe].splice(t, 1), !0) : !1;
|
|
2543
2551
|
}
|
|
2544
2552
|
/**
|
|
2545
2553
|
* 添加destroy filter
|
|
2546
2554
|
* @param filter
|
|
2547
2555
|
*/
|
|
2548
2556
|
destroyEach(e) {
|
|
2549
|
-
this[
|
|
2557
|
+
this[Le].push(e);
|
|
2550
2558
|
}
|
|
2551
2559
|
/**
|
|
2552
2560
|
* 移除after filter
|
|
@@ -2554,8 +2562,8 @@ class qn {
|
|
|
2554
2562
|
* @returns
|
|
2555
2563
|
*/
|
|
2556
2564
|
removeDestroyEach(e) {
|
|
2557
|
-
const t = this[
|
|
2558
|
-
return t !== -1 ? (this[
|
|
2565
|
+
const t = this[Le].indexOf(e);
|
|
2566
|
+
return t !== -1 ? (this[Le].splice(t, 1), !0) : !1;
|
|
2559
2567
|
}
|
|
2560
2568
|
/**
|
|
2561
2569
|
* 添加before restore filter
|
|
@@ -2594,8 +2602,8 @@ class qn {
|
|
|
2594
2602
|
if (t == -1)
|
|
2595
2603
|
this[B] = [...this[B], ...r];
|
|
2596
2604
|
else
|
|
2597
|
-
for (let
|
|
2598
|
-
this[B].splice(t, 0, r[
|
|
2605
|
+
for (let n = r.length - 1; n >= 0; n--)
|
|
2606
|
+
this[B].splice(t, 0, r[n]);
|
|
2599
2607
|
}
|
|
2600
2608
|
/**
|
|
2601
2609
|
* 移除路由
|
|
@@ -2607,10 +2615,10 @@ class qn {
|
|
|
2607
2615
|
if (t === null)
|
|
2608
2616
|
return console.warn("route格式错误", e), !1;
|
|
2609
2617
|
for (let r = 0; r < this[B].length; r++) {
|
|
2610
|
-
const
|
|
2611
|
-
if (t?.path &&
|
|
2618
|
+
const n = this[B][r];
|
|
2619
|
+
if (t?.path && n.path === t.path)
|
|
2612
2620
|
return this[B].splice(r, 1), !0;
|
|
2613
|
-
if (t?.name &&
|
|
2621
|
+
if (t?.name && n.name === t.name)
|
|
2614
2622
|
return this[B].splice(r, 1), !0;
|
|
2615
2623
|
}
|
|
2616
2624
|
return !1;
|
|
@@ -2622,8 +2630,8 @@ class qn {
|
|
|
2622
2630
|
*/
|
|
2623
2631
|
hasRoute(e) {
|
|
2624
2632
|
const t = this[I](e);
|
|
2625
|
-
return t === null ? (console.warn("route格式错误", e), !1) : this[B].findIndex((
|
|
2626
|
-
if (t?.path &&
|
|
2633
|
+
return t === null ? (console.warn("route格式错误", e), !1) : this[B].findIndex((n) => {
|
|
2634
|
+
if (t?.path && n.path === t.path || t?.name && n.name === t.name)
|
|
2627
2635
|
return !0;
|
|
2628
2636
|
}) !== -1;
|
|
2629
2637
|
}
|
|
@@ -2661,12 +2669,12 @@ class qn {
|
|
|
2661
2669
|
const a = new ct();
|
|
2662
2670
|
return a.path = t, a.redirect = e.redirect, [a];
|
|
2663
2671
|
}
|
|
2664
|
-
let
|
|
2672
|
+
let n = [];
|
|
2665
2673
|
for (let a in r) {
|
|
2666
2674
|
let l = r[a];
|
|
2667
2675
|
a.length === 0 && (a = te);
|
|
2668
|
-
let f = new
|
|
2669
|
-
|
|
2676
|
+
let f = new as(a, l, e.props, e.meta);
|
|
2677
|
+
n.push(f);
|
|
2670
2678
|
}
|
|
2671
2679
|
let i = !1, o = [];
|
|
2672
2680
|
if (e.children)
|
|
@@ -2676,12 +2684,12 @@ class qn {
|
|
|
2676
2684
|
let u = new ct();
|
|
2677
2685
|
u.name = f.name, f.path && f.path.length > 0 ? t !== "/" ? u.path = `${t}${f.path}` : u.path = f.path : (i = !0, u.path = t);
|
|
2678
2686
|
let c = new Zt();
|
|
2679
|
-
c.models = [...
|
|
2687
|
+
c.models = [...n], u.layers = [c, ...f.layers], o.push(u);
|
|
2680
2688
|
}
|
|
2681
2689
|
}
|
|
2682
2690
|
if (!i) {
|
|
2683
2691
|
const a = new Zt();
|
|
2684
|
-
a.models =
|
|
2692
|
+
a.models = n;
|
|
2685
2693
|
const l = new ct();
|
|
2686
2694
|
l.name = e.name, l.path = t, l.layers = [a], o.splice(0, 0, l);
|
|
2687
2695
|
}
|
|
@@ -2695,11 +2703,11 @@ class qn {
|
|
|
2695
2703
|
const t = e.route;
|
|
2696
2704
|
try {
|
|
2697
2705
|
for (let r of this[B]) {
|
|
2698
|
-
const
|
|
2699
|
-
if (
|
|
2706
|
+
const n = t.template ?? t.path, i = t.template ?? t.name;
|
|
2707
|
+
if (n && r.path) {
|
|
2700
2708
|
let o = r.match;
|
|
2701
|
-
o || (o = r.match =
|
|
2702
|
-
const a = o(
|
|
2709
|
+
o || (o = r.match = gs(r.path));
|
|
2710
|
+
const a = o(n);
|
|
2703
2711
|
if (!a)
|
|
2704
2712
|
continue;
|
|
2705
2713
|
if (r.redirect) {
|
|
@@ -2729,7 +2737,7 @@ class qn {
|
|
|
2729
2737
|
return e.find = r, t.template && e.find && (e.find = { ...e.find }, e.find.path = t.path), !0;
|
|
2730
2738
|
} else if (i === r.name) {
|
|
2731
2739
|
t.params = t.params ?? {};
|
|
2732
|
-
const o =
|
|
2740
|
+
const o = ms(r.path);
|
|
2733
2741
|
return t.path = o(t.params), e.find = r, t.template && e.find && (e.find = { ...e.find }, e.find.name = t.name), !0;
|
|
2734
2742
|
}
|
|
2735
2743
|
}
|
|
@@ -2797,66 +2805,69 @@ class qn {
|
|
|
2797
2805
|
/**
|
|
2798
2806
|
* 移除
|
|
2799
2807
|
* @param term
|
|
2808
|
+
* @param changeHistory
|
|
2800
2809
|
*/
|
|
2801
|
-
remove(e) {
|
|
2802
|
-
return new Promise((
|
|
2803
|
-
this[
|
|
2810
|
+
remove(e, t) {
|
|
2811
|
+
return new Promise((r) => {
|
|
2812
|
+
this[we].post((n) => {
|
|
2804
2813
|
try {
|
|
2805
2814
|
if (this[w].length === 0) {
|
|
2806
|
-
|
|
2815
|
+
n.resolve(), r(!1);
|
|
2807
2816
|
return;
|
|
2808
2817
|
}
|
|
2809
|
-
let
|
|
2818
|
+
let i = -1, o, a = [];
|
|
2810
2819
|
if (e) {
|
|
2811
|
-
if (e.root ?
|
|
2812
|
-
for (let
|
|
2813
|
-
let
|
|
2814
|
-
|
|
2820
|
+
if (e.root ? o = e.root : o = this[w][0].root ?? te, e.all)
|
|
2821
|
+
for (let f = this[w].length - 1; f > 0; f--) {
|
|
2822
|
+
let u = this[w][f];
|
|
2823
|
+
u.opsType === A.Append && u.root === o && (a.splice(0, 0, u), i = f - 1);
|
|
2815
2824
|
}
|
|
2816
2825
|
else if (e.until)
|
|
2817
|
-
for (let
|
|
2818
|
-
let
|
|
2819
|
-
if (
|
|
2820
|
-
if (e.until.charAt(0) === "/" && e.until ===
|
|
2821
|
-
|
|
2826
|
+
for (let f = this[w].length - 1; f > 0; f--) {
|
|
2827
|
+
let u = this[w][f];
|
|
2828
|
+
if (u.opsType === A.Append && u.root === o) {
|
|
2829
|
+
if (e.until.charAt(0) === "/" && e.until === u.path) {
|
|
2830
|
+
i = f;
|
|
2822
2831
|
break;
|
|
2823
|
-
} else if (e.until ===
|
|
2824
|
-
|
|
2832
|
+
} else if (e.until === u.name) {
|
|
2833
|
+
i = f;
|
|
2825
2834
|
break;
|
|
2826
2835
|
}
|
|
2827
|
-
|
|
2836
|
+
a.splice(0, 0, u);
|
|
2828
2837
|
}
|
|
2829
2838
|
}
|
|
2830
2839
|
} else {
|
|
2831
|
-
|
|
2832
|
-
let
|
|
2833
|
-
|
|
2834
|
-
for (let
|
|
2835
|
-
let
|
|
2836
|
-
if (
|
|
2837
|
-
|
|
2840
|
+
o = te;
|
|
2841
|
+
let f = this[ur](this[U]);
|
|
2842
|
+
f && (o = f.name);
|
|
2843
|
+
for (let u = this[w].length - 1; u > 0; u--) {
|
|
2844
|
+
let c = this[w][u];
|
|
2845
|
+
if (c.opsType === A.Append && c.root === o) {
|
|
2846
|
+
a.push(c), i = u - 1;
|
|
2838
2847
|
break;
|
|
2839
2848
|
}
|
|
2840
2849
|
}
|
|
2841
2850
|
}
|
|
2842
|
-
if (
|
|
2843
|
-
let
|
|
2844
|
-
console.warn(
|
|
2851
|
+
if (a.length === 0) {
|
|
2852
|
+
let f = "can not find route";
|
|
2853
|
+
console.warn(f), n.resolve(f), r(!1);
|
|
2845
2854
|
return;
|
|
2846
2855
|
}
|
|
2847
|
-
let
|
|
2848
|
-
if (this[w].forEach((
|
|
2849
|
-
|
|
2850
|
-
}), this[
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2856
|
+
let l = 0;
|
|
2857
|
+
if (this[w].forEach((f) => {
|
|
2858
|
+
f.opsType !== A.Put && l++;
|
|
2859
|
+
}), this[Me](a)) {
|
|
2860
|
+
if (t === !1)
|
|
2861
|
+
return n.resolve(), r(!0), !0;
|
|
2862
|
+
let f = 0;
|
|
2863
|
+
this[w].forEach((c) => {
|
|
2864
|
+
c.opsType !== A.Put && f++;
|
|
2854
2865
|
});
|
|
2855
|
-
const
|
|
2856
|
-
this[C]?.go(
|
|
2866
|
+
const u = f - l;
|
|
2867
|
+
this[C]?.go(u, () => (n.resolve(), r(!0), !0));
|
|
2857
2868
|
}
|
|
2858
|
-
} catch (
|
|
2859
|
-
this[T](
|
|
2869
|
+
} catch (i) {
|
|
2870
|
+
this[T](i), n.resolve(), r(!1);
|
|
2860
2871
|
}
|
|
2861
2872
|
});
|
|
2862
2873
|
});
|
|
@@ -2874,35 +2885,35 @@ class qn {
|
|
|
2874
2885
|
* @param args
|
|
2875
2886
|
*/
|
|
2876
2887
|
close(e) {
|
|
2877
|
-
return this[
|
|
2888
|
+
return this[we].post((t) => {
|
|
2878
2889
|
try {
|
|
2879
2890
|
let r = this[I](e);
|
|
2880
2891
|
if (!r) {
|
|
2881
2892
|
t.reject("resolve route fail");
|
|
2882
2893
|
return;
|
|
2883
2894
|
}
|
|
2884
|
-
let
|
|
2895
|
+
let n = [];
|
|
2885
2896
|
for (let i = 0; i < this[w].length; i++) {
|
|
2886
2897
|
let o = this[w][i];
|
|
2887
2898
|
if (o.root === r.root) {
|
|
2888
2899
|
if (!r.path && !r.name) {
|
|
2889
|
-
|
|
2900
|
+
n.push(o);
|
|
2890
2901
|
continue;
|
|
2891
2902
|
}
|
|
2892
2903
|
if (r.path && r.path === o.path) {
|
|
2893
|
-
|
|
2904
|
+
n.push(o);
|
|
2894
2905
|
break;
|
|
2895
2906
|
} else if (r.name && r.name === o.name) {
|
|
2896
|
-
|
|
2907
|
+
n.push(o);
|
|
2897
2908
|
break;
|
|
2898
2909
|
}
|
|
2899
2910
|
}
|
|
2900
2911
|
}
|
|
2901
|
-
if (
|
|
2912
|
+
if (n.length === 0) {
|
|
2902
2913
|
t.resolve();
|
|
2903
2914
|
return;
|
|
2904
2915
|
}
|
|
2905
|
-
this[
|
|
2916
|
+
this[Me](n) && this[We](), t.resolve();
|
|
2906
2917
|
} catch (r) {
|
|
2907
2918
|
this[T](r), t.resolve();
|
|
2908
2919
|
}
|
|
@@ -2916,8 +2927,8 @@ class qn {
|
|
|
2916
2927
|
let t = this[I](e);
|
|
2917
2928
|
if (!t)
|
|
2918
2929
|
return this[T]("resolve route fail", t), this;
|
|
2919
|
-
let r = this[
|
|
2920
|
-
return r == null ? (this[T]("route forbid", t), this) : (this[
|
|
2930
|
+
let r = this[Ne].acquire(t);
|
|
2931
|
+
return r == null ? (this[T]("route forbid", t), this) : (this[we].post((n) => {
|
|
2921
2932
|
try {
|
|
2922
2933
|
let i = this[Et](t);
|
|
2923
2934
|
this[At](i), this[_t](i), this[Ft](i), i.wait(
|
|
@@ -2930,20 +2941,20 @@ class qn {
|
|
|
2930
2941
|
} catch (f) {
|
|
2931
2942
|
console.error(f.message, f);
|
|
2932
2943
|
}
|
|
2933
|
-
if (this[
|
|
2944
|
+
if (this[Ne].release(r), this[We](l), typeof t.success == "function")
|
|
2934
2945
|
try {
|
|
2935
2946
|
Reflect.apply(t.success, {}, []);
|
|
2936
2947
|
} catch (f) {
|
|
2937
2948
|
console.error(f.message, f);
|
|
2938
2949
|
}
|
|
2939
|
-
this[
|
|
2950
|
+
this[ce] === !1 && this[Xe](!0), n.resolve();
|
|
2940
2951
|
},
|
|
2941
2952
|
(o, a) => {
|
|
2942
|
-
this[
|
|
2953
|
+
this[Ne].release(r), a !== null && this[T](a, t), this[ce] === !1 && this[Xe](!1), n.resolve();
|
|
2943
2954
|
}
|
|
2944
2955
|
);
|
|
2945
2956
|
} catch (i) {
|
|
2946
|
-
this[
|
|
2957
|
+
this[Ne].release(r), this[T](i, t), n.resolve();
|
|
2947
2958
|
}
|
|
2948
2959
|
}), this);
|
|
2949
2960
|
}
|
|
@@ -2952,7 +2963,7 @@ class qn {
|
|
|
2952
2963
|
* @param delta
|
|
2953
2964
|
*/
|
|
2954
2965
|
back(e = 1) {
|
|
2955
|
-
this[C]?.go(-e);
|
|
2966
|
+
this[C]?.go(-e, !1);
|
|
2956
2967
|
}
|
|
2957
2968
|
/**
|
|
2958
2969
|
* 创建next函数
|
|
@@ -2962,10 +2973,10 @@ class qn {
|
|
|
2962
2973
|
if (typeof t == "boolean")
|
|
2963
2974
|
e.session.redirect = !1, t ? e.resolve() : e.reject(r ?? null);
|
|
2964
2975
|
else if (t) {
|
|
2965
|
-
const
|
|
2966
|
-
if (
|
|
2976
|
+
const n = this[I](t);
|
|
2977
|
+
if (n) {
|
|
2967
2978
|
const i = e.session.to;
|
|
2968
|
-
|
|
2979
|
+
n.success = i.success, n.error = i.error, e.session.to = n, e.session.redirect = !0, e.session.routeModel = null, e.resolve();
|
|
2969
2980
|
} else
|
|
2970
2981
|
e.session.redirect = !1, e.reject("route resolve fail");
|
|
2971
2982
|
} else
|
|
@@ -2978,23 +2989,23 @@ class qn {
|
|
|
2978
2989
|
* @returns {EventChain}
|
|
2979
2990
|
*/
|
|
2980
2991
|
[Et](e) {
|
|
2981
|
-
let t = this[w].length > 0 ? this[w][0] : void 0, r = new tt(e, t),
|
|
2992
|
+
let t = this[w].length > 0 ? this[w][0] : void 0, r = new tt(e, t), n = {
|
|
2982
2993
|
//路由
|
|
2983
2994
|
route: e,
|
|
2984
2995
|
//查找结果
|
|
2985
2996
|
find: null
|
|
2986
2997
|
};
|
|
2987
|
-
return this[ke](
|
|
2998
|
+
return this[ke](n), n.find && (r.routeModel = n.find, e.matched = $s(n.find), Array.isArray(e.matched) && e.matched.length > 0 && (e.meta = n.find.layers[0].models[0].meta)), new rt(r);
|
|
2988
2999
|
}
|
|
2989
3000
|
/**
|
|
2990
3001
|
* 执行before事件
|
|
2991
3002
|
* @param chain
|
|
2992
3003
|
*/
|
|
2993
3004
|
[At](e) {
|
|
2994
|
-
for (let t of this[
|
|
3005
|
+
for (let t of this[je])
|
|
2995
3006
|
e.post((r) => {
|
|
2996
|
-
const
|
|
2997
|
-
Reflect.apply(t, {}, [r.session.to, r.session.from,
|
|
3007
|
+
const n = this[pr](r);
|
|
3008
|
+
Reflect.apply(t, {}, [r.session.to, r.session.from, n, r.session]);
|
|
2998
3009
|
});
|
|
2999
3010
|
}
|
|
3000
3011
|
/**
|
|
@@ -3003,11 +3014,11 @@ class qn {
|
|
|
3003
3014
|
*/
|
|
3004
3015
|
[Ft](e) {
|
|
3005
3016
|
e.post((t) => {
|
|
3006
|
-
for (let r of this[
|
|
3017
|
+
for (let r of this[Oe])
|
|
3007
3018
|
try {
|
|
3008
3019
|
Reflect.apply(r, {}, [t.session.to, t.session.from, t.session]);
|
|
3009
|
-
} catch (
|
|
3010
|
-
console.error(
|
|
3020
|
+
} catch (n) {
|
|
3021
|
+
console.error(n.message, n);
|
|
3011
3022
|
}
|
|
3012
3023
|
t.resolve();
|
|
3013
3024
|
});
|
|
@@ -3018,11 +3029,11 @@ class qn {
|
|
|
3018
3029
|
* @param session
|
|
3019
3030
|
*/
|
|
3020
3031
|
[mr](e, t) {
|
|
3021
|
-
for (let r of this[
|
|
3032
|
+
for (let r of this[Le])
|
|
3022
3033
|
try {
|
|
3023
3034
|
Reflect.apply(r, {}, [e, t]);
|
|
3024
|
-
} catch (
|
|
3025
|
-
console.error(
|
|
3035
|
+
} catch (n) {
|
|
3036
|
+
console.error(n.message, n);
|
|
3026
3037
|
}
|
|
3027
3038
|
typeof e.destroy == "function" && Reflect.apply(e.destroy, e, []);
|
|
3028
3039
|
}
|
|
@@ -3032,8 +3043,8 @@ class qn {
|
|
|
3032
3043
|
*/
|
|
3033
3044
|
[_t](e) {
|
|
3034
3045
|
e.post((t) => {
|
|
3035
|
-
let r = t.session.to,
|
|
3036
|
-
if (
|
|
3046
|
+
let r = t.session.to, n = t.session.routeModel;
|
|
3047
|
+
if (n == null) {
|
|
3037
3048
|
let o = {
|
|
3038
3049
|
//路由
|
|
3039
3050
|
route: r,
|
|
@@ -3041,16 +3052,16 @@ class qn {
|
|
|
3041
3052
|
find: null
|
|
3042
3053
|
};
|
|
3043
3054
|
if (this[ke](o))
|
|
3044
|
-
|
|
3055
|
+
n = o.find, t.session.routeModel = n;
|
|
3045
3056
|
else if (this[Qe])
|
|
3046
|
-
|
|
3057
|
+
n = this[Qe];
|
|
3047
3058
|
else {
|
|
3048
3059
|
t.reject(`not find route model, path:${r.path ?? r.name}`);
|
|
3049
3060
|
return;
|
|
3050
3061
|
}
|
|
3051
3062
|
}
|
|
3052
3063
|
let i = tt.from(t.session);
|
|
3053
|
-
this[cr](r,
|
|
3064
|
+
this[cr](r, n, i).then(
|
|
3054
3065
|
(o) => {
|
|
3055
3066
|
this[U], t.resolve();
|
|
3056
3067
|
},
|
|
@@ -3065,23 +3076,23 @@ class qn {
|
|
|
3065
3076
|
*
|
|
3066
3077
|
* @param routes
|
|
3067
3078
|
*/
|
|
3068
|
-
[
|
|
3079
|
+
[Me](e) {
|
|
3069
3080
|
if (e.length == 0)
|
|
3070
3081
|
return !0;
|
|
3071
3082
|
let t = this[U], r = [];
|
|
3072
|
-
for (let
|
|
3073
|
-
let i = this[bt](t,
|
|
3083
|
+
for (let n of e) {
|
|
3084
|
+
let i = this[bt](t, n);
|
|
3074
3085
|
i != null && r.push({
|
|
3075
3086
|
...i,
|
|
3076
|
-
route:
|
|
3087
|
+
route: n
|
|
3077
3088
|
});
|
|
3078
3089
|
}
|
|
3079
3090
|
if (r.length == 0) {
|
|
3080
|
-
let
|
|
3081
|
-
return this[T](
|
|
3091
|
+
let n = "can not find view index";
|
|
3092
|
+
return this[T](n), !1;
|
|
3082
3093
|
}
|
|
3083
|
-
for (let
|
|
3084
|
-
this[
|
|
3094
|
+
for (let n of r.reverse())
|
|
3095
|
+
this[ue](t, { x: n.x, y: n.y }, [n.route.index ?? 0], !0);
|
|
3085
3096
|
return !0;
|
|
3086
3097
|
}
|
|
3087
3098
|
/**
|
|
@@ -3091,13 +3102,13 @@ class qn {
|
|
|
3091
3102
|
*/
|
|
3092
3103
|
[bt](e, t) {
|
|
3093
3104
|
const r = t.root ?? te;
|
|
3094
|
-
let
|
|
3105
|
+
let n;
|
|
3095
3106
|
for (let i = 0; i < e.layers.length; i++) {
|
|
3096
3107
|
const o = e.layers[i];
|
|
3097
3108
|
for (let a = o.views.length - 1; a >= 0; a--) {
|
|
3098
3109
|
const l = o.views[a];
|
|
3099
3110
|
if (l[J] && l[Ze] === r)
|
|
3100
|
-
return
|
|
3111
|
+
return n = { x: a, y: i }, n;
|
|
3101
3112
|
}
|
|
3102
3113
|
}
|
|
3103
3114
|
return null;
|
|
@@ -3116,16 +3127,16 @@ class qn {
|
|
|
3116
3127
|
* @param indexList
|
|
3117
3128
|
* @param retainRoot
|
|
3118
3129
|
*/
|
|
3119
|
-
[
|
|
3130
|
+
[ue](e, t, r = null, n = !0) {
|
|
3120
3131
|
if (t.y >= e.layers.length || t.x >= e.layers[t.y].views.length)
|
|
3121
3132
|
return;
|
|
3122
3133
|
let i = e.layers[t.y].views[t.x], o = !1, a = [], l = !1, f = [...i.slots.value];
|
|
3123
3134
|
for (let c = f.length - 1; c >= 0; c--) {
|
|
3124
3135
|
let h = f[c];
|
|
3125
|
-
(!r || r.indexOf(h.index) != -1) && (h.route && i[J] && (this[
|
|
3136
|
+
(!r || r.indexOf(h.index) != -1) && (h.route && i[J] && (this[qe](h.route), h.active === !0 && h.route.opsType == A.Append && (l = !0)), a.push(new V(i, h.index, t.y)), f.splice(c, 1));
|
|
3126
3137
|
}
|
|
3127
3138
|
if (f.length == 0)
|
|
3128
|
-
|
|
3139
|
+
n ? i.slots.value = f : e.layers[t.y].views.splice(t.x, 1);
|
|
3129
3140
|
else {
|
|
3130
3141
|
if (l) {
|
|
3131
3142
|
let c = f.length - 1, h = f[c];
|
|
@@ -3139,11 +3150,11 @@ class qn {
|
|
|
3139
3150
|
let c = e.layers[u].views, h = [];
|
|
3140
3151
|
for (let y = c.length - 1; (o || a.length > 0) && y >= 0; y--) {
|
|
3141
3152
|
let d = c[y];
|
|
3142
|
-
if (d[
|
|
3153
|
+
if (d[ye] && (o || V.include(a, d[ye]))) {
|
|
3143
3154
|
let m = d.slots.value;
|
|
3144
3155
|
for (let p = m.length - 1; p >= 0; p--) {
|
|
3145
3156
|
let v = m[p];
|
|
3146
|
-
v.route && d[J] && this[
|
|
3157
|
+
v.route && d[J] && this[qe](v.route), h.push(new V(d, v.index, u)), m.splice(p, 1);
|
|
3147
3158
|
}
|
|
3148
3159
|
e.layers[u].views.splice(y, 1);
|
|
3149
3160
|
}
|
|
@@ -3166,11 +3177,11 @@ class qn {
|
|
|
3166
3177
|
}
|
|
3167
3178
|
return this[w] = [], this[We](), Promise.resolve();
|
|
3168
3179
|
} else
|
|
3169
|
-
return new Promise((r,
|
|
3180
|
+
return new Promise((r, n) => {
|
|
3170
3181
|
let i = null, o = !1;
|
|
3171
3182
|
for (let a = 0; a < e.length; a++) {
|
|
3172
3183
|
const l = e[a];
|
|
3173
|
-
this[
|
|
3184
|
+
this[we].post((f) => {
|
|
3174
3185
|
const u = this[Et](l);
|
|
3175
3186
|
this[At](u), this[_t](u), this[Ft](u), u.wait(
|
|
3176
3187
|
(c, h) => {
|
|
@@ -3182,7 +3193,7 @@ class qn {
|
|
|
3182
3193
|
);
|
|
3183
3194
|
});
|
|
3184
3195
|
}
|
|
3185
|
-
this[
|
|
3196
|
+
this[we].post((a) => {
|
|
3186
3197
|
if (i && o === !0) {
|
|
3187
3198
|
const l = q.clone(i, !0), f = new or(l, this[Je]());
|
|
3188
3199
|
this[C]?.replace(f);
|
|
@@ -3198,9 +3209,9 @@ class qn {
|
|
|
3198
3209
|
* @returns
|
|
3199
3210
|
*/
|
|
3200
3211
|
[cr](e, t, r) {
|
|
3201
|
-
let
|
|
3212
|
+
let n = e.updateType ?? Ye.Part;
|
|
3202
3213
|
return this[hr](t).then(() => {
|
|
3203
|
-
this[yr](t, e, r,
|
|
3214
|
+
this[yr](t, e, r, n);
|
|
3204
3215
|
});
|
|
3205
3216
|
}
|
|
3206
3217
|
/**
|
|
@@ -3209,9 +3220,9 @@ class qn {
|
|
|
3209
3220
|
[hr](e) {
|
|
3210
3221
|
let t = [];
|
|
3211
3222
|
for (let r = 0; r < e.layers.length; r++) {
|
|
3212
|
-
let
|
|
3213
|
-
for (let i = 0; i <
|
|
3214
|
-
let o =
|
|
3223
|
+
let n = e.layers[r];
|
|
3224
|
+
for (let i = 0; i < n.models.length; i++) {
|
|
3225
|
+
let o = n.models[i];
|
|
3215
3226
|
o.isResolved || t.push(o.resolve());
|
|
3216
3227
|
}
|
|
3217
3228
|
}
|
|
@@ -3225,18 +3236,18 @@ class qn {
|
|
|
3225
3236
|
* @param updateType
|
|
3226
3237
|
* @returns
|
|
3227
3238
|
*/
|
|
3228
|
-
[yr](e, t, r,
|
|
3239
|
+
[yr](e, t, r, n) {
|
|
3229
3240
|
if (e.layers[0].models.length !== 1)
|
|
3230
3241
|
return Promise.reject("illegal route structure(multi root node)");
|
|
3231
3242
|
const i = e.layers[0].models[0];
|
|
3232
|
-
let o = this[U], a =
|
|
3233
|
-
!a &&
|
|
3243
|
+
let o = this[U], a = Ks(o), l = t.root ?? te, f;
|
|
3244
|
+
!a && n == Ye.Part && (f = this[bt](o, t));
|
|
3234
3245
|
let u, c = 0;
|
|
3235
3246
|
if (f == null || f == null)
|
|
3236
|
-
if (a ||
|
|
3247
|
+
if (a || n === Ye.All) {
|
|
3237
3248
|
if (o.layers.length == 0 && (o.layers[0] = new mt()), o.layers[0].views.length == 0) {
|
|
3238
3249
|
let h = t.root ?? te;
|
|
3239
|
-
u = new
|
|
3250
|
+
u = new Ke(h, !0, null), o.layers[0].views = [u];
|
|
3240
3251
|
} else
|
|
3241
3252
|
u = o.layers[0].views[0];
|
|
3242
3253
|
f = { x: 0, y: 0 };
|
|
@@ -3263,7 +3274,7 @@ class qn {
|
|
|
3263
3274
|
}
|
|
3264
3275
|
if (!d)
|
|
3265
3276
|
return Promise.reject("can not insert view(not find root node ref)");
|
|
3266
|
-
u = new
|
|
3277
|
+
u = new Ke(l, !0, d), o.layers[y].views.push(u), f = { x: o.layers[y].views.length - 1, y };
|
|
3267
3278
|
}
|
|
3268
3279
|
else
|
|
3269
3280
|
u = o.layers[f.y].views[f.x];
|
|
@@ -3274,7 +3285,7 @@ class qn {
|
|
|
3274
3285
|
let v = h[h.length - 1];
|
|
3275
3286
|
v.active = !1, v.route && (v.route.active = v.active);
|
|
3276
3287
|
}
|
|
3277
|
-
let y = new
|
|
3288
|
+
let y = new ne(t, i, t.index, !0);
|
|
3278
3289
|
u.slots.value = [...h, y];
|
|
3279
3290
|
let d = c + 1, m = 1, p = new V(u, t.index, c);
|
|
3280
3291
|
this[ie](o, d, e, m, p);
|
|
@@ -3293,7 +3304,7 @@ class qn {
|
|
|
3293
3304
|
}
|
|
3294
3305
|
if (!d) {
|
|
3295
3306
|
t.index = le.get(), t.active = y;
|
|
3296
|
-
let m = new
|
|
3307
|
+
let m = new ne(t, i, t.index, y);
|
|
3297
3308
|
h.push(m);
|
|
3298
3309
|
let p = c + 1, v = 1, g = new V(u, t.index, c);
|
|
3299
3310
|
this[ie](o, p, e, v, g);
|
|
@@ -3302,30 +3313,30 @@ class qn {
|
|
|
3302
3313
|
} else {
|
|
3303
3314
|
let h = u.slots.value;
|
|
3304
3315
|
if (h.length == 0) {
|
|
3305
|
-
t.index = le.get(), t.active = !0, u.slots.value = [new
|
|
3316
|
+
t.index = le.get(), t.active = !0, u.slots.value = [new ne(t, i, t.index)];
|
|
3306
3317
|
let y = c + 1, d = 1, m = new V(u, t.index, c);
|
|
3307
3318
|
this[ie](o, y, e, d, m);
|
|
3308
3319
|
} else {
|
|
3309
3320
|
let y = h[0];
|
|
3310
3321
|
if (y.model !== i) {
|
|
3311
|
-
this[
|
|
3322
|
+
this[ue](o, f, null, !0), t.index = le.get(), t.active = !0, u.slots.value = [new ne(t, i, t.index)];
|
|
3312
3323
|
let d = c + 1, m = 1, p = new V(u, t.index, c);
|
|
3313
3324
|
this[ie](o, d, e, m, p);
|
|
3314
3325
|
} else {
|
|
3315
|
-
y.route !== null && this[
|
|
3326
|
+
y.route !== null && this[qe](y.route);
|
|
3316
3327
|
let d = !1;
|
|
3317
3328
|
const m = t.active ?? !0;
|
|
3318
3329
|
y.active !== m && (y.active = m, d = !0), t.active = m, t.index = y.index, y.route = t;
|
|
3319
3330
|
let p = [];
|
|
3320
3331
|
for (let K = 1; K < h.length; K++)
|
|
3321
3332
|
p.push(h[K].index);
|
|
3322
|
-
p.length > 0 ? this[
|
|
3333
|
+
p.length > 0 ? this[ue](o, f, p, !0) : d && (u.slots.value = [...h]);
|
|
3323
3334
|
let v = [new V(u, t.index, c)], g = c + 1, _ = 1, b = new V(u, t.index, c);
|
|
3324
3335
|
for (; v.length > 0 && g < o.layers.length && _ < e.layers.length; g++, _++) {
|
|
3325
3336
|
let K = [];
|
|
3326
3337
|
for (let S = 0; S < o.layers[g].views.length; S++) {
|
|
3327
3338
|
let P = o.layers[g].views[S];
|
|
3328
|
-
P[
|
|
3339
|
+
P[ye] && V.include(v, P[ye]) && K.unshift(S);
|
|
3329
3340
|
}
|
|
3330
3341
|
let E = [];
|
|
3331
3342
|
for (let S of K) {
|
|
@@ -3336,26 +3347,26 @@ class qn {
|
|
|
3336
3347
|
break;
|
|
3337
3348
|
}
|
|
3338
3349
|
if (!L)
|
|
3339
|
-
this[
|
|
3350
|
+
this[ue](o, { x: S, y: g }, null, !1);
|
|
3340
3351
|
else {
|
|
3341
3352
|
let M = P.slots.value;
|
|
3342
3353
|
if (M.length == 0) {
|
|
3343
3354
|
let X = 0;
|
|
3344
|
-
P.slots.value = [new
|
|
3355
|
+
P.slots.value = [new ne(null, L, X)];
|
|
3345
3356
|
let W = g + 1, re = _ + 1;
|
|
3346
3357
|
this[ie](o, W, e, re, b);
|
|
3347
3358
|
} else {
|
|
3348
3359
|
let X = M[0];
|
|
3349
3360
|
if (X.model !== L) {
|
|
3350
|
-
this[
|
|
3361
|
+
this[ue](o, { x: S, y: g }, null, !0), P.slots.value = [new ne(null, L, 0)];
|
|
3351
3362
|
let W = g + 1, re = _ + 1;
|
|
3352
3363
|
this[ie](o, W, e, re, b);
|
|
3353
3364
|
} else {
|
|
3354
|
-
P[J] && X.route !== null && this[
|
|
3365
|
+
P[J] && X.route !== null && this[qe](X.route);
|
|
3355
3366
|
let W = [];
|
|
3356
3367
|
for (let re = 1; re < M.length; re++)
|
|
3357
3368
|
W.push(M[re].index);
|
|
3358
|
-
W.length > 0 && this[
|
|
3369
|
+
W.length > 0 && this[ue](o, { x: S, y: g }, W, !0), E.push(new V(P, X.index, g));
|
|
3359
3370
|
}
|
|
3360
3371
|
}
|
|
3361
3372
|
P[J] = !1;
|
|
@@ -3369,7 +3380,7 @@ class qn {
|
|
|
3369
3380
|
}
|
|
3370
3381
|
if (u && u[z]) {
|
|
3371
3382
|
let h = u[z];
|
|
3372
|
-
h && (t.slot = new
|
|
3383
|
+
h && (t.slot = new ls(l, c, h?.view.name, h?.index ?? 0));
|
|
3373
3384
|
}
|
|
3374
3385
|
r.to = void 0, r.routeModel = void 0, t.session = r, this[dr](t);
|
|
3375
3386
|
}
|
|
@@ -3381,12 +3392,12 @@ class qn {
|
|
|
3381
3392
|
* @param startModelLevel
|
|
3382
3393
|
* @param rootNodeRef
|
|
3383
3394
|
*/
|
|
3384
|
-
[ie](e, t, r,
|
|
3385
|
-
let o =
|
|
3395
|
+
[ie](e, t, r, n, i) {
|
|
3396
|
+
let o = n, a = t;
|
|
3386
3397
|
for (; a < e.layers.length && o < r.layers.length; a++, o++) {
|
|
3387
3398
|
let l = e.layers[a].views;
|
|
3388
3399
|
for (let f of r.layers[o].models) {
|
|
3389
|
-
let u = new
|
|
3400
|
+
let u = new Ke(f.name, !1, i), c = new ne(null, f);
|
|
3390
3401
|
u.slots.value = [c], l.push(u);
|
|
3391
3402
|
}
|
|
3392
3403
|
}
|
|
@@ -3394,7 +3405,7 @@ class qn {
|
|
|
3394
3405
|
let l = new mt();
|
|
3395
3406
|
l.views = [];
|
|
3396
3407
|
for (let f of r.layers[o].models) {
|
|
3397
|
-
let u = new
|
|
3408
|
+
let u = new Ke(f.name, !1, i), c = new ne(null, f);
|
|
3398
3409
|
u.slots.value = [c], l.views.push(u);
|
|
3399
3410
|
}
|
|
3400
3411
|
e.layers.push(l);
|
|
@@ -3410,15 +3421,15 @@ class qn {
|
|
|
3410
3421
|
* @param parentViewIndex
|
|
3411
3422
|
* @returns
|
|
3412
3423
|
*/
|
|
3413
|
-
[Er](e, t, r,
|
|
3424
|
+
[Er](e, t, r, n, i, o) {
|
|
3414
3425
|
if (t < 0 || t > this[U].layers.length)
|
|
3415
3426
|
return null;
|
|
3416
3427
|
if (t < this[U].layers.length) {
|
|
3417
3428
|
let u = this[U].layers[t], c = null;
|
|
3418
3429
|
for (let h of u.views) {
|
|
3419
3430
|
let y = !1;
|
|
3420
|
-
if (r !== null ? (y = h.name === e && h[z]?.view === r, y &&
|
|
3421
|
-
i !== null && (h[
|
|
3431
|
+
if (r !== null ? (y = h.name === e && h[z]?.view === r, y && n !== -1 && (y = h[z]?.index === n)) : y = h.name === e, !!y) {
|
|
3432
|
+
i !== null && (h[ye] = {
|
|
3422
3433
|
view: i,
|
|
3423
3434
|
index: o,
|
|
3424
3435
|
level: t - 1
|
|
@@ -3439,8 +3450,8 @@ class qn {
|
|
|
3439
3450
|
index: o,
|
|
3440
3451
|
level: t - 1
|
|
3441
3452
|
});
|
|
3442
|
-
let f = new
|
|
3443
|
-
if (f[
|
|
3453
|
+
let f = new Ke(e, !0, a);
|
|
3454
|
+
if (f[ye] = l, t == this[U].layers.length) {
|
|
3444
3455
|
let u = new mt();
|
|
3445
3456
|
u.views = [f], this[U].layers.push(u);
|
|
3446
3457
|
} else
|
|
@@ -3448,61 +3459,61 @@ class qn {
|
|
|
3448
3459
|
return f;
|
|
3449
3460
|
}
|
|
3450
3461
|
}
|
|
3451
|
-
const
|
|
3452
|
-
function qr(
|
|
3462
|
+
const qs = "fox-router-view", js = "fox-router-link";
|
|
3463
|
+
function qr(s, e = !1) {
|
|
3453
3464
|
let t = null;
|
|
3454
|
-
return e ? t =
|
|
3465
|
+
return e ? t = s.showFromClass ?? s.enterFromClass : t = s.enterFromClass, t || (t = s.transitionName, t ? e ? `${t}-show-from` : `${t}-enter-from` : null);
|
|
3455
3466
|
}
|
|
3456
|
-
function jr(
|
|
3467
|
+
function jr(s, e = !1) {
|
|
3457
3468
|
let t = null;
|
|
3458
|
-
return e ? t =
|
|
3469
|
+
return e ? t = s.showActiveClass ?? s.enterActiveClass : t = s.enterActiveClass, t || (t = s.transitionName, t ? e ? `${t}-show-active` : `${t}-enter-active` : null);
|
|
3459
3470
|
}
|
|
3460
|
-
function
|
|
3471
|
+
function Os(s, e = !1) {
|
|
3461
3472
|
let t = null;
|
|
3462
|
-
return e ? t =
|
|
3473
|
+
return e ? t = s.showToClass ?? s.enterToClass : t = s.enterToClass, t || (t = s.transitionName, t ? e ? `${t}-show-to` : `${t}-enter-to` : null);
|
|
3463
3474
|
}
|
|
3464
|
-
function
|
|
3475
|
+
function Ls(s, e = !1) {
|
|
3465
3476
|
let t = null;
|
|
3466
|
-
return e ? t =
|
|
3477
|
+
return e ? t = s.hideFromClass ?? s.leaveFromClass : t = s.leaveFromClass, t || (t = s.transitionName, t ? e ? `${t}-hide-from` : `${t}-leave-from` : null);
|
|
3467
3478
|
}
|
|
3468
|
-
function
|
|
3479
|
+
function Ms(s, e = !1) {
|
|
3469
3480
|
let t = null;
|
|
3470
|
-
return e ? t =
|
|
3481
|
+
return e ? t = s.hideActiveClass ?? s.leaveActiveClass : t = s.leaveActiveClass, t || (t = s.transitionName, t ? e ? `${t}-hide-active` : `${t}-leave-active` : null);
|
|
3471
3482
|
}
|
|
3472
|
-
function
|
|
3483
|
+
function Ns(s, e = !1) {
|
|
3473
3484
|
let t = null;
|
|
3474
|
-
return e ? t =
|
|
3485
|
+
return e ? t = s.hideToClass ?? s.leaveToClass : t = s.leaveToClass, t || (t = s.transitionName, t ? e ? `${t}-hide-to` : `${t}-leave-to` : null);
|
|
3475
3486
|
}
|
|
3476
|
-
function
|
|
3487
|
+
function Is(s, e = !1) {
|
|
3477
3488
|
let t = null;
|
|
3478
|
-
return e ? t =
|
|
3489
|
+
return e ? t = s.beforeShow ?? s.beforeEnter : t = s.beforeEnter, t;
|
|
3479
3490
|
}
|
|
3480
|
-
function
|
|
3491
|
+
function Hs(s, e = !1) {
|
|
3481
3492
|
let t = null;
|
|
3482
|
-
return e ? t =
|
|
3493
|
+
return e ? t = s.show ?? s.enter : t = s.enter, t;
|
|
3483
3494
|
}
|
|
3484
|
-
function
|
|
3495
|
+
function Ds(s, e = !1) {
|
|
3485
3496
|
let t = null;
|
|
3486
|
-
return e ? t =
|
|
3497
|
+
return e ? t = s.afterShow ?? s.afterEnter : t = s.afterEnter, t;
|
|
3487
3498
|
}
|
|
3488
|
-
function
|
|
3499
|
+
function Vs(s, e = !1) {
|
|
3489
3500
|
let t = null;
|
|
3490
|
-
return e ? t =
|
|
3501
|
+
return e ? t = s.showCancelled ?? s.enterCancelled : t = s.enterCancelled, t;
|
|
3491
3502
|
}
|
|
3492
|
-
function
|
|
3503
|
+
function Bs(s, e = !1) {
|
|
3493
3504
|
let t = null;
|
|
3494
|
-
return e ? t =
|
|
3505
|
+
return e ? t = s.hide ?? s.leave : t = s.leave, t;
|
|
3495
3506
|
}
|
|
3496
|
-
function
|
|
3507
|
+
function Us(s, e = !1) {
|
|
3497
3508
|
let t = null;
|
|
3498
|
-
return e ? t =
|
|
3509
|
+
return e ? t = s.afterHide ?? s.afterLeave : t = s.afterLeave, t;
|
|
3499
3510
|
}
|
|
3500
|
-
function
|
|
3511
|
+
function ks(s, e = !1) {
|
|
3501
3512
|
let t = null;
|
|
3502
|
-
return e ? t =
|
|
3513
|
+
return e ? t = s.hideCancelled ?? s.leaveCancelled : t = s.leaveCancelled, t;
|
|
3503
3514
|
}
|
|
3504
|
-
function Ut(
|
|
3505
|
-
let e, t =
|
|
3515
|
+
function Ut(s) {
|
|
3516
|
+
let e, t = s.duration;
|
|
3506
3517
|
return typeof t == "object" ? e = {
|
|
3507
3518
|
enter: t.enter ?? -1,
|
|
3508
3519
|
leave: t.leave ?? -1,
|
|
@@ -3515,31 +3526,31 @@ function Ut(n) {
|
|
|
3515
3526
|
hide: t
|
|
3516
3527
|
}), e;
|
|
3517
3528
|
}
|
|
3518
|
-
function
|
|
3519
|
-
|
|
3529
|
+
function Pe(s, e) {
|
|
3530
|
+
s.classList.contains(e) || s.classList.add(e);
|
|
3520
3531
|
}
|
|
3521
|
-
function
|
|
3522
|
-
|
|
3532
|
+
function Ce(s, e) {
|
|
3533
|
+
s.classList.remove(e);
|
|
3523
3534
|
}
|
|
3524
|
-
const
|
|
3525
|
-
function kt(
|
|
3526
|
-
|
|
3535
|
+
const Ws = Ee && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : setTimeout;
|
|
3536
|
+
function kt(s) {
|
|
3537
|
+
Ws(s);
|
|
3527
3538
|
}
|
|
3528
|
-
function H(
|
|
3529
|
-
R(e) && (
|
|
3539
|
+
function H(s, e, t) {
|
|
3540
|
+
R(e) && (s == null && (s = {}), Reflect.apply(e, s, t));
|
|
3530
3541
|
}
|
|
3531
|
-
function Or(
|
|
3542
|
+
function Or(s, e, t, r = -1, n, i, o, a) {
|
|
3532
3543
|
if (R(i)) {
|
|
3533
|
-
if (
|
|
3544
|
+
if (n !== void 0 && n >= 0) {
|
|
3534
3545
|
setTimeout(() => {
|
|
3535
|
-
Reflect.apply(i,
|
|
3536
|
-
},
|
|
3546
|
+
Reflect.apply(i, s, [e, t, r]), R(a) && Reflect.apply(a, s, []);
|
|
3547
|
+
}, n);
|
|
3537
3548
|
return;
|
|
3538
3549
|
}
|
|
3539
3550
|
const l = ["animationend", "transitionend"], f = (u) => {
|
|
3540
3551
|
l.forEach((c) => {
|
|
3541
3552
|
Tt(e, c, f);
|
|
3542
|
-
}), Reflect.apply(i,
|
|
3553
|
+
}), Reflect.apply(i, s, [e, t, r]), a && Reflect.apply(a, s, []);
|
|
3543
3554
|
};
|
|
3544
3555
|
l.forEach((u) => {
|
|
3545
3556
|
$t(e, u, f);
|
|
@@ -3547,121 +3558,121 @@ function Or(n, e, t, r = -1, s, i, o, a) {
|
|
|
3547
3558
|
}
|
|
3548
3559
|
if (R(o)) {
|
|
3549
3560
|
const l = "animationcancel", f = (u) => {
|
|
3550
|
-
Reflect.apply(o,
|
|
3561
|
+
Reflect.apply(o, s, [e, t, r]), Tt(e, l, f);
|
|
3551
3562
|
};
|
|
3552
3563
|
$t(e, l, f);
|
|
3553
3564
|
}
|
|
3554
3565
|
}
|
|
3555
|
-
function Wt(
|
|
3556
|
-
return !
|
|
3566
|
+
function Wt(s) {
|
|
3567
|
+
return !Ee || s === null ? !1 : s.opsType === A.Append || s.opsType === A.Open;
|
|
3557
3568
|
}
|
|
3558
|
-
function Lr(
|
|
3559
|
-
if (e || Wt(
|
|
3569
|
+
function Lr(s, e, t, r = {}, n, i = -1) {
|
|
3570
|
+
if (e || Wt(n)) {
|
|
3560
3571
|
const o = qr(r, e);
|
|
3561
|
-
o &&
|
|
3572
|
+
o && Pe(t, o);
|
|
3562
3573
|
const a = jr(r, e);
|
|
3563
|
-
a &&
|
|
3564
|
-
const l =
|
|
3565
|
-
H(
|
|
3574
|
+
a && Pe(t, a);
|
|
3575
|
+
const l = Is(r, e);
|
|
3576
|
+
H(s, l, [t, e, n, i]);
|
|
3566
3577
|
}
|
|
3567
3578
|
}
|
|
3568
|
-
function Mr(
|
|
3579
|
+
function Mr(s, e, t, r = {}, n, i, o, a) {
|
|
3569
3580
|
if (!Wt(i) && !e) {
|
|
3570
|
-
R(a) && a(
|
|
3581
|
+
R(a) && a(s, a, [t]);
|
|
3571
3582
|
return;
|
|
3572
3583
|
}
|
|
3573
|
-
const l = qr(r, e), f = jr(r, e), u =
|
|
3584
|
+
const l = qr(r, e), f = jr(r, e), u = Os(r, e), c = Hs(r, e), h = Ds(r, e), y = Vs(r, e);
|
|
3574
3585
|
kt(() => {
|
|
3575
|
-
Or(
|
|
3576
|
-
f &&
|
|
3586
|
+
Or(s, t, i, o, n, () => {
|
|
3587
|
+
f && Ce(t, f), u && Ce(t, u), R(h) && H(s, h, [t, e, i, o]), R(a) && a(s, a, [t]);
|
|
3577
3588
|
}, () => {
|
|
3578
|
-
R(y) && H(
|
|
3579
|
-
}), l &&
|
|
3589
|
+
R(y) && H(s, y, [t, e, i, o]);
|
|
3590
|
+
}), l && Ce(t, l), u && Pe(t, u), R(c) && H(s, c, [t, e, i, o]);
|
|
3580
3591
|
});
|
|
3581
3592
|
}
|
|
3582
|
-
function Nr(
|
|
3593
|
+
function Nr(s, e, t, r = {}, n, i, o, a, l) {
|
|
3583
3594
|
if (!Wt(o) && !e) {
|
|
3584
3595
|
!e && R(i) && i();
|
|
3585
3596
|
return;
|
|
3586
3597
|
}
|
|
3587
|
-
const f =
|
|
3588
|
-
f &&
|
|
3589
|
-
Or(
|
|
3590
|
-
u &&
|
|
3598
|
+
const f = Ls(r, e), u = Ms(r, e), c = Ns(r, e), h = Bs(r, e), y = Us(r, e), d = ks(r, e);
|
|
3599
|
+
f && Pe(t, f), u && Pe(t, u), R(h) && H(s, h, [t, e, o, a]), kt(() => {
|
|
3600
|
+
Or(s, t, o, a, n, () => {
|
|
3601
|
+
u && Ce(t, u), c && Ce(t, c), R(y) && H(s, y, [t, e, o, a]), R(l) && H(s, l, [t]), !e && R(i) && i();
|
|
3591
3602
|
}, () => {
|
|
3592
|
-
R(d) && H(
|
|
3593
|
-
}), f &&
|
|
3603
|
+
R(d) && H(s, d, [t, e, o, a]), R(l) && H(s, l, [t]), !e && R(i) && i();
|
|
3604
|
+
}), f && Ce(t, f), c && Pe(t, c);
|
|
3594
3605
|
});
|
|
3595
3606
|
}
|
|
3596
|
-
function Ot(
|
|
3597
|
-
const
|
|
3607
|
+
function Ot(s, e = {}, t, r = -1) {
|
|
3608
|
+
const n = e.mode ?? "default", i = Ut(e);
|
|
3598
3609
|
return {
|
|
3599
3610
|
//mode
|
|
3600
|
-
mode:
|
|
3611
|
+
mode: n,
|
|
3601
3612
|
//如果是 true,表示这是一个不真实插入/删除元素的转换,而是切换显示/隐藏状态
|
|
3602
3613
|
persisted: !1,
|
|
3603
3614
|
//before enter
|
|
3604
3615
|
beforeEnter: (a) => {
|
|
3605
|
-
Lr(
|
|
3616
|
+
Lr(s, !1, a, e, t, r);
|
|
3606
3617
|
},
|
|
3607
3618
|
//enter
|
|
3608
3619
|
enter: (a) => {
|
|
3609
|
-
Mr(
|
|
3620
|
+
Mr(s, !1, a, e, i.enter, t, r);
|
|
3610
3621
|
},
|
|
3611
3622
|
//leave
|
|
3612
3623
|
leave: (a, l) => {
|
|
3613
|
-
Nr(
|
|
3624
|
+
Nr(s, !1, a, e, i.leave, l, t, r);
|
|
3614
3625
|
},
|
|
3615
3626
|
//clone
|
|
3616
|
-
clone: (a) => Ot(
|
|
3627
|
+
clone: (a) => Ot(s, e, t, r)
|
|
3617
3628
|
};
|
|
3618
3629
|
}
|
|
3619
|
-
function Ir(
|
|
3620
|
-
return
|
|
3630
|
+
function Ir(s) {
|
|
3631
|
+
return s.el;
|
|
3621
3632
|
}
|
|
3622
|
-
function
|
|
3633
|
+
function zs(s, e, t = {}, r, n, i, o) {
|
|
3623
3634
|
if (i) {
|
|
3624
3635
|
const a = Ir(e);
|
|
3625
3636
|
if (a == null)
|
|
3626
3637
|
return;
|
|
3627
3638
|
const l = Ut(t);
|
|
3628
|
-
Lr(
|
|
3629
|
-
R(o) && H(
|
|
3639
|
+
Lr(s, !0, a, t, r, n), Mr(s, !0, a, t, l.show, r, n, (f) => {
|
|
3640
|
+
R(o) && H(s, o, [f]);
|
|
3630
3641
|
});
|
|
3631
3642
|
} else
|
|
3632
|
-
R(o) && H(
|
|
3643
|
+
R(o) && H(s, o, []);
|
|
3633
3644
|
}
|
|
3634
|
-
function
|
|
3645
|
+
function Js(s, e, t = {}, r, n, i, o) {
|
|
3635
3646
|
if (i) {
|
|
3636
3647
|
const a = Ir(e);
|
|
3637
3648
|
if (a == null)
|
|
3638
3649
|
return;
|
|
3639
3650
|
const l = Ut(t);
|
|
3640
|
-
Nr(
|
|
3641
|
-
R(o) && H(
|
|
3651
|
+
Nr(s, !0, a, t, l.hide, null, r, n, (f) => {
|
|
3652
|
+
R(o) && H(s, o, [f]);
|
|
3642
3653
|
});
|
|
3643
3654
|
} else
|
|
3644
|
-
R(o) && H(
|
|
3655
|
+
R(o) && H(s, o, []);
|
|
3645
3656
|
}
|
|
3646
|
-
function
|
|
3657
|
+
function Gs(s, e = {}) {
|
|
3647
3658
|
kt(() => {
|
|
3648
|
-
for (let t = 0; t <
|
|
3649
|
-
Reflect.apply(
|
|
3659
|
+
for (let t = 0; t < s.length; t++)
|
|
3660
|
+
Reflect.apply(s[t], e, []);
|
|
3650
3661
|
});
|
|
3651
3662
|
}
|
|
3652
|
-
function oe(
|
|
3653
|
-
return typeof
|
|
3663
|
+
function oe(s, e, t) {
|
|
3664
|
+
return typeof s == "function" ? Reflect.apply(s, {}, [e, t]) : s;
|
|
3654
3665
|
}
|
|
3655
|
-
function Kt(
|
|
3656
|
-
if (!
|
|
3666
|
+
function Kt(s, e) {
|
|
3667
|
+
if (!s)
|
|
3657
3668
|
return null;
|
|
3658
|
-
const t =
|
|
3669
|
+
const t = s(e);
|
|
3659
3670
|
return t.length === 1 ? t[0] : t;
|
|
3660
3671
|
}
|
|
3661
|
-
function
|
|
3662
|
-
return typeof e == "function" ? e(
|
|
3672
|
+
function be(s, e) {
|
|
3673
|
+
return typeof e == "function" ? e(s) : s;
|
|
3663
3674
|
}
|
|
3664
|
-
class
|
|
3675
|
+
class Qs {
|
|
3665
3676
|
/**
|
|
3666
3677
|
* vue node
|
|
3667
3678
|
*/
|
|
@@ -3889,35 +3900,35 @@ const Lt = wr({
|
|
|
3889
3900
|
}
|
|
3890
3901
|
},
|
|
3891
3902
|
//setup
|
|
3892
|
-
setup(
|
|
3903
|
+
setup(s, e) {
|
|
3893
3904
|
const t = Mt();
|
|
3894
3905
|
if (t === null || t.proxy === null) {
|
|
3895
3906
|
console.error("instance or instance.proxy not exist");
|
|
3896
3907
|
return;
|
|
3897
3908
|
}
|
|
3898
|
-
const r =
|
|
3909
|
+
const r = s.multi === !0, n = G(ot, null), i = G(yt, 0), o = G(nr, null), a = G(dt, -1);
|
|
3899
3910
|
let l = null;
|
|
3900
|
-
const f =
|
|
3911
|
+
const f = s.modelSlot;
|
|
3901
3912
|
if (f) {
|
|
3902
|
-
if (
|
|
3913
|
+
if (se(yt, i + 1), se(dt, f.index), se(pt, f.index), !f.route) {
|
|
3903
3914
|
console.warn("child view render error, route not exist");
|
|
3904
3915
|
return;
|
|
3905
3916
|
}
|
|
3906
|
-
const h =
|
|
3907
|
-
|
|
3917
|
+
const h = st(t.proxy, !0);
|
|
3918
|
+
cs(h), sr(h, () => f.route ?? null);
|
|
3908
3919
|
} else {
|
|
3909
|
-
if (
|
|
3920
|
+
if (n == null) {
|
|
3910
3921
|
console.error("router is not been injected");
|
|
3911
3922
|
return;
|
|
3912
3923
|
}
|
|
3913
|
-
const c =
|
|
3914
|
-
if (l =
|
|
3924
|
+
const c = s.name, h = G(ir, null), y = G(pt, 0);
|
|
3925
|
+
if (l = n[Er](c, i, o, a, h, y), l === null)
|
|
3915
3926
|
return;
|
|
3916
|
-
|
|
3927
|
+
se(ir, l);
|
|
3917
3928
|
const d = l[J] === !0;
|
|
3918
|
-
if (d &&
|
|
3919
|
-
const m =
|
|
3920
|
-
|
|
3929
|
+
if (d && se(nr, l), !r && (se(dt, -1), se(yt, i + 1), se(pt, -1), d)) {
|
|
3930
|
+
const m = st(t.proxy, !0);
|
|
3931
|
+
sr(m, () => {
|
|
3921
3932
|
const p = l.slots.value;
|
|
3922
3933
|
return p.length > 0 ? p[0].route : null;
|
|
3923
3934
|
});
|
|
@@ -3930,64 +3941,64 @@ const Lt = wr({
|
|
|
3930
3941
|
if (r) {
|
|
3931
3942
|
const c = /* @__PURE__ */ new Map(), h = [], y = l?.slots.value, d = [];
|
|
3932
3943
|
for (let v = 0; v < y.length; v++) {
|
|
3933
|
-
const g = y[v], _ = `${
|
|
3944
|
+
const g = y[v], _ = `${s.name}_${g.index}`, b = oe(s.transition, g.route, v) ?? !0, K = { modelSlot: g };
|
|
3934
3945
|
let E;
|
|
3935
|
-
e.slots.default ? E =
|
|
3936
|
-
const S = {}, P = oe(
|
|
3946
|
+
e.slots.default ? E = he(Lt, K, { default: e.slots.default }) : E = he(Lt, K);
|
|
3947
|
+
const S = {}, P = oe(s.viewClass, g.route, v);
|
|
3937
3948
|
typeof P == "string" && P.length > 0 && (S[P] = !0);
|
|
3938
|
-
const k = oe(
|
|
3949
|
+
const k = oe(s.viewActiveClass, g.route, v), L = oe(s.viewInactiveClass, g.route, v), M = u.value.get(_);
|
|
3939
3950
|
if (typeof k == "string" && k.length > 0 && (S[k] = g.active), typeof L == "string" && L.length > 0 && (S[L] = !g.active), M && g.active !== M.state) {
|
|
3940
3951
|
const Y = M.node;
|
|
3941
3952
|
g.active ? d.unshift(() => {
|
|
3942
3953
|
const at = () => {
|
|
3943
|
-
let
|
|
3944
|
-
|
|
3954
|
+
let Ae = tr(Y);
|
|
3955
|
+
Ae != null && rr(Ae, qt.ACTIVATED);
|
|
3945
3956
|
};
|
|
3946
|
-
|
|
3957
|
+
zs(t, Y, s, g.route, v, b, at);
|
|
3947
3958
|
}) : d.push(() => {
|
|
3948
3959
|
const at = () => {
|
|
3949
|
-
const
|
|
3950
|
-
|
|
3960
|
+
const Ae = tr(Y);
|
|
3961
|
+
Ae != null && rr(Ae, qt.DEACTIVATED);
|
|
3951
3962
|
};
|
|
3952
|
-
|
|
3963
|
+
Js(t, Y, s, g.route, v, b, at);
|
|
3953
3964
|
});
|
|
3954
3965
|
}
|
|
3955
3966
|
const X = {
|
|
3956
3967
|
class: S,
|
|
3957
3968
|
key: _
|
|
3958
|
-
}, W = oe(
|
|
3969
|
+
}, W = oe(s.viewTagProps, g.route, v);
|
|
3959
3970
|
if (W !== null && typeof W == "object") {
|
|
3960
|
-
const Y =
|
|
3971
|
+
const Y = be(W, n?.propsFilter);
|
|
3961
3972
|
$(!0, X, Y);
|
|
3962
3973
|
}
|
|
3963
3974
|
if (g.route?.viewTagAttrs && typeof g.route?.viewTagAttrs == "object") {
|
|
3964
|
-
const Y =
|
|
3975
|
+
const Y = be(g.route.viewTagAttrs, n?.propsFilter);
|
|
3965
3976
|
$(!0, X, Y);
|
|
3966
3977
|
}
|
|
3967
|
-
const re = oe(
|
|
3968
|
-
if (c.set(_, new
|
|
3969
|
-
const Y = Ot(t,
|
|
3978
|
+
const re = oe(s.viewTag, g.route, v), lt = he(re, X, { default: () => [E] });
|
|
3979
|
+
if (c.set(_, new Qs(lt, g.active)), u.value.delete(_), b) {
|
|
3980
|
+
const Y = Ot(t, s, g.route, v);
|
|
3970
3981
|
lt.transition = Y;
|
|
3971
3982
|
}
|
|
3972
3983
|
h.push(lt);
|
|
3973
3984
|
}
|
|
3974
3985
|
u.value.forEach((v) => {
|
|
3975
3986
|
v.node.transition = null;
|
|
3976
|
-
}), u.value = c,
|
|
3977
|
-
const m = oe(
|
|
3978
|
-
return Object.assign(p, e.attrs),
|
|
3987
|
+
}), u.value = c, Gs(d, t);
|
|
3988
|
+
const m = oe(s.tag, null, -1), p = {};
|
|
3989
|
+
return Object.assign(p, e.attrs), he(m, p, { default: () => h });
|
|
3979
3990
|
} else if (f != null) {
|
|
3980
3991
|
const c = f.model, h = {};
|
|
3981
3992
|
if (c.props) {
|
|
3982
3993
|
if (typeof c.props == "object") {
|
|
3983
|
-
const d =
|
|
3994
|
+
const d = be(c.props, n?.propsFilter);
|
|
3984
3995
|
$(!1, h, d);
|
|
3985
3996
|
} else if (c.props === !0 && typeof f.route?.params == "object") {
|
|
3986
|
-
const d =
|
|
3997
|
+
const d = be(f.route.params, n?.propsFilter);
|
|
3987
3998
|
$(!1, h, d);
|
|
3988
3999
|
}
|
|
3989
4000
|
}
|
|
3990
|
-
const y =
|
|
4001
|
+
const y = he(c.component, h);
|
|
3991
4002
|
return Kt(e.slots.default, { Component: y, route: f.route }) ?? y;
|
|
3992
4003
|
} else {
|
|
3993
4004
|
const c = l.slots.value;
|
|
@@ -3995,16 +4006,16 @@ const Lt = wr({
|
|
|
3995
4006
|
const h = c[0], y = h.route ?? (t.proxy && Vt(t.proxy)) ?? null, d = h.model, m = {};
|
|
3996
4007
|
if (d.props) {
|
|
3997
4008
|
if (typeof d.props == "object") {
|
|
3998
|
-
const g =
|
|
4009
|
+
const g = be(d.props, n?.propsFilter);
|
|
3999
4010
|
$(!1, m, g);
|
|
4000
4011
|
} else if (d.props === !0 && typeof y?.params == "object") {
|
|
4001
|
-
const g =
|
|
4012
|
+
const g = be(y.params, n?.propsFilter);
|
|
4002
4013
|
$(!1, m, g);
|
|
4003
4014
|
}
|
|
4004
4015
|
}
|
|
4005
|
-
const p =
|
|
4006
|
-
if (oe(
|
|
4007
|
-
const g = Ot(t,
|
|
4016
|
+
const p = he(d.component, m);
|
|
4017
|
+
if (oe(s.transition, y, -1) ?? !0) {
|
|
4018
|
+
const g = Ot(t, s, y, -1);
|
|
4008
4019
|
p.transition = g;
|
|
4009
4020
|
}
|
|
4010
4021
|
return Kt(e.slots.default, { Component: p, route: y }) ?? p;
|
|
@@ -4014,26 +4025,26 @@ const Lt = wr({
|
|
|
4014
4025
|
};
|
|
4015
4026
|
}
|
|
4016
4027
|
});
|
|
4017
|
-
function
|
|
4018
|
-
if (!(
|
|
4019
|
-
if (
|
|
4020
|
-
const e =
|
|
4028
|
+
function Xs(s) {
|
|
4029
|
+
if (!(s.metaKey || s.altKey || s.ctrlKey || s.shiftKey) && !s.defaultPrevented && !(s.button != null && s.button !== 0)) {
|
|
4030
|
+
if (s.currentTarget && s.currentTarget.getAttribute) {
|
|
4031
|
+
const e = s.currentTarget.getAttribute("target");
|
|
4021
4032
|
if (/\b_blank\b/i.test(e))
|
|
4022
4033
|
return;
|
|
4023
4034
|
}
|
|
4024
|
-
return
|
|
4035
|
+
return s.preventDefault && s.preventDefault(), !0;
|
|
4025
4036
|
}
|
|
4026
4037
|
}
|
|
4027
|
-
function
|
|
4028
|
-
return
|
|
4038
|
+
function Ys(s, e) {
|
|
4039
|
+
return s == null || e == null ? !1 : !!(s === e || s.path && s.path === e.path || s.name && s.name === e.name);
|
|
4029
4040
|
}
|
|
4030
|
-
function
|
|
4031
|
-
return
|
|
4041
|
+
function Zs(s, e) {
|
|
4042
|
+
return s == null || e == null ? !1 : !!(s.path && e.path && e.path.startsWith(s.path) || s.name && s.name == e.name);
|
|
4032
4043
|
}
|
|
4033
|
-
function
|
|
4034
|
-
return typeof
|
|
4044
|
+
function xe(s, e) {
|
|
4045
|
+
return typeof s == "function" ? Reflect.apply(s, {}, [e]) : s;
|
|
4035
4046
|
}
|
|
4036
|
-
let
|
|
4047
|
+
let en = wr({
|
|
4037
4048
|
//名称
|
|
4038
4049
|
name: "RouterLink",
|
|
4039
4050
|
//继承特性
|
|
@@ -4080,26 +4091,26 @@ let ts = wr({
|
|
|
4080
4091
|
}
|
|
4081
4092
|
},
|
|
4082
4093
|
//setup
|
|
4083
|
-
setup(
|
|
4094
|
+
setup(s, e) {
|
|
4084
4095
|
const t = G(ot, null);
|
|
4085
4096
|
return () => {
|
|
4086
|
-
let r =
|
|
4087
|
-
if (
|
|
4097
|
+
let r = xe(s.to, null), n = xe(s.tag, r);
|
|
4098
|
+
if (n == null) {
|
|
4088
4099
|
console.warn("can not resolve link tag");
|
|
4089
4100
|
return;
|
|
4090
4101
|
}
|
|
4091
4102
|
let i = null, o = null;
|
|
4092
|
-
t !== null && (i = t[I](r),
|
|
4093
|
-
let a = {}, l =
|
|
4094
|
-
if (typeof l == "string" && l.length > 0 && (a[l] =
|
|
4095
|
-
let h =
|
|
4096
|
-
typeof h == "string" && h.length > 0 && (a[h] =
|
|
4103
|
+
t !== null && (i = t[I](r), s.root && (i.root = s.root), o = t.current);
|
|
4104
|
+
let a = {}, l = xe(s.activeClass, i);
|
|
4105
|
+
if (typeof l == "string" && l.length > 0 && (a[l] = Zs(i, o)), xe(s.exact, i) === !0) {
|
|
4106
|
+
let h = xe(s.exactActiveClass, i);
|
|
4107
|
+
typeof h == "string" && h.length > 0 && (a[h] = Ys(i, o));
|
|
4097
4108
|
}
|
|
4098
4109
|
let u = {
|
|
4099
4110
|
class: a
|
|
4100
4111
|
};
|
|
4101
|
-
(
|
|
4102
|
-
let c =
|
|
4112
|
+
(n === "a" || n === "A") && (u.href = i?.path ?? i?.name ?? "#"), $(!0, u, e.attrs);
|
|
4113
|
+
let c = xe(s.event, i);
|
|
4103
4114
|
if (typeof c == "string") {
|
|
4104
4115
|
const h = (y) => {
|
|
4105
4116
|
if (t == null) {
|
|
@@ -4110,16 +4121,16 @@ let ts = wr({
|
|
|
4110
4121
|
console.warn("route is not been resolved");
|
|
4111
4122
|
return;
|
|
4112
4123
|
}
|
|
4113
|
-
|
|
4124
|
+
Xs(y) && t.to(i);
|
|
4114
4125
|
};
|
|
4115
4126
|
u[c] = h;
|
|
4116
4127
|
}
|
|
4117
|
-
return
|
|
4128
|
+
return he(n, u, e.slots);
|
|
4118
4129
|
};
|
|
4119
4130
|
}
|
|
4120
4131
|
});
|
|
4121
|
-
var O = /* @__PURE__ */ ((
|
|
4122
|
-
class
|
|
4132
|
+
var O = /* @__PURE__ */ ((s) => (s[s.Loading = 0] = "Loading", s[s.Loaded = 1] = "Loaded", s[s.Defining = 2] = "Defining", s[s.Defined = 3] = "Defined", s))(O || {}), et = /* @__PURE__ */ ((s) => (s[s.normal = 0] = "normal", s[s.factory = 1] = "factory", s))(et || {});
|
|
4133
|
+
class tn {
|
|
4123
4134
|
/**
|
|
4124
4135
|
* 注册表
|
|
4125
4136
|
*/
|
|
@@ -4172,7 +4183,7 @@ class vr {
|
|
|
4172
4183
|
/**
|
|
4173
4184
|
* module manager
|
|
4174
4185
|
*/
|
|
4175
|
-
moduleManager = new
|
|
4186
|
+
moduleManager = new tn();
|
|
4176
4187
|
/**
|
|
4177
4188
|
* 参数配置
|
|
4178
4189
|
*/
|
|
@@ -4246,7 +4257,7 @@ class vr {
|
|
|
4246
4257
|
* 获取document head
|
|
4247
4258
|
*/
|
|
4248
4259
|
get head() {
|
|
4249
|
-
return
|
|
4260
|
+
return De().head;
|
|
4250
4261
|
}
|
|
4251
4262
|
/**
|
|
4252
4263
|
* 构造函数
|
|
@@ -4277,8 +4288,8 @@ class vr {
|
|
|
4277
4288
|
ensure(...e) {
|
|
4278
4289
|
const t = [];
|
|
4279
4290
|
let r = e.length - 1;
|
|
4280
|
-
const
|
|
4281
|
-
typeof e[r] == "object" && (Object.assign(
|
|
4291
|
+
const n = {};
|
|
4292
|
+
typeof e[r] == "object" && (Object.assign(n, e[r]), r--);
|
|
4282
4293
|
let i = null;
|
|
4283
4294
|
typeof e[r] == "function" && (i = e[r], r--);
|
|
4284
4295
|
for (let l = 0; l <= r; l++)
|
|
@@ -4291,7 +4302,7 @@ class vr {
|
|
|
4291
4302
|
for (let u = 0; u < f.length; u++)
|
|
4292
4303
|
f[u] && t.push(this.resolvePath(f[u]));
|
|
4293
4304
|
}
|
|
4294
|
-
const o = new
|
|
4305
|
+
const o = new rn(t.length, (l, f) => {
|
|
4295
4306
|
if (o.isOK())
|
|
4296
4307
|
try {
|
|
4297
4308
|
typeof i == "function" && Reflect.apply(i, {}, f);
|
|
@@ -4306,7 +4317,7 @@ class vr {
|
|
|
4306
4317
|
}
|
|
4307
4318
|
}), a = new rt();
|
|
4308
4319
|
for (let l = 0; l < t.length; l++) {
|
|
4309
|
-
const f = new
|
|
4320
|
+
const f = new sn(l, t[l], n, o);
|
|
4310
4321
|
this.mount(a, f);
|
|
4311
4322
|
}
|
|
4312
4323
|
return this;
|
|
@@ -4315,8 +4326,8 @@ class vr {
|
|
|
4315
4326
|
* 卸载
|
|
4316
4327
|
*/
|
|
4317
4328
|
remove(...e) {
|
|
4318
|
-
let t = [], r = e.length - 1,
|
|
4319
|
-
typeof e[r] == "object" && (Object.assign(
|
|
4329
|
+
let t = [], r = e.length - 1, n = {};
|
|
4330
|
+
typeof e[r] == "object" && (Object.assign(n, e[r]), r--);
|
|
4320
4331
|
let i = null;
|
|
4321
4332
|
typeof e[r] == "function" && (i = e[r], r--);
|
|
4322
4333
|
for (let o = 0; o <= r; o++)
|
|
@@ -4330,7 +4341,7 @@ class vr {
|
|
|
4330
4341
|
a[l] && t.push(this.resolvePath(a[l]));
|
|
4331
4342
|
}
|
|
4332
4343
|
return t.forEach((o) => {
|
|
4333
|
-
this.unmount(o,
|
|
4344
|
+
this.unmount(o, n);
|
|
4334
4345
|
}), typeof i == "function" && Reflect.apply(i, {}, []), this;
|
|
4335
4346
|
}
|
|
4336
4347
|
/**
|
|
@@ -4341,33 +4352,33 @@ class vr {
|
|
|
4341
4352
|
*/
|
|
4342
4353
|
mount(e, t) {
|
|
4343
4354
|
if (t.src === "exports") {
|
|
4344
|
-
e.post((
|
|
4345
|
-
t.progress.work(!0, t.index, "exports"),
|
|
4355
|
+
e.post((n) => {
|
|
4356
|
+
t.progress.work(!0, t.index, "exports"), n.resolve();
|
|
4346
4357
|
});
|
|
4347
4358
|
return;
|
|
4348
4359
|
} else if (t.src === "module") {
|
|
4349
|
-
e.post((
|
|
4350
|
-
t.progress.work(!0, t.index, "module"),
|
|
4360
|
+
e.post((n) => {
|
|
4361
|
+
t.progress.work(!0, t.index, "module"), n.resolve();
|
|
4351
4362
|
});
|
|
4352
4363
|
return;
|
|
4353
4364
|
}
|
|
4354
4365
|
if (this.isNaturePath(t.src)) {
|
|
4355
|
-
let
|
|
4356
|
-
|
|
4366
|
+
let n = t.params.jsPoint;
|
|
4367
|
+
n || (n = this.head), this.mountJS(e, t, n);
|
|
4357
4368
|
return;
|
|
4358
4369
|
} else if (this.isNaturePath(t.src)) {
|
|
4359
|
-
let
|
|
4360
|
-
|
|
4370
|
+
let n = t.params.cssPoint;
|
|
4371
|
+
n || (n = this.head), this.mountCSS(e, t, n);
|
|
4361
4372
|
return;
|
|
4362
4373
|
}
|
|
4363
4374
|
let r = this.getFileNamePostfix(t.src);
|
|
4364
4375
|
if (r === "js" || r.length === 0) {
|
|
4365
|
-
let
|
|
4366
|
-
|
|
4376
|
+
let n = t.params.jsPoint;
|
|
4377
|
+
n || (n = this.head), this.mountJS(e, t, n);
|
|
4367
4378
|
return;
|
|
4368
4379
|
} else if (r === "css") {
|
|
4369
|
-
let
|
|
4370
|
-
|
|
4380
|
+
let n = t.params.cssPoint;
|
|
4381
|
+
n || (n = this.head), this.mountCSS(e, t, n);
|
|
4371
4382
|
return;
|
|
4372
4383
|
}
|
|
4373
4384
|
}
|
|
@@ -4378,23 +4389,23 @@ class vr {
|
|
|
4378
4389
|
* @param point
|
|
4379
4390
|
*/
|
|
4380
4391
|
mountCSS(e, t, r) {
|
|
4381
|
-
e.post((
|
|
4392
|
+
e.post((n) => {
|
|
4382
4393
|
const i = t.src, o = this.moduleManager.get(i);
|
|
4383
4394
|
if (o && (o.status == O.Defined || o.status == O.Loaded) && o.exports) {
|
|
4384
|
-
o.type === et.factory && typeof o.exports == "function" ? t.progress.work(!0, t.index, o.exports()) : t.progress.work(!0, t.index, o.exports),
|
|
4395
|
+
o.type === et.factory && typeof o.exports == "function" ? t.progress.work(!0, t.index, o.exports()) : t.progress.work(!0, t.index, o.exports), n.resolve();
|
|
4385
4396
|
return;
|
|
4386
4397
|
}
|
|
4387
|
-
const a =
|
|
4398
|
+
const a = De(), l = a.createElement("link");
|
|
4388
4399
|
if (Reflect.has(l, "onload"))
|
|
4389
4400
|
l.onload = () => {
|
|
4390
|
-
l.onload = null, l.onerror = null, t.progress.work(!0, t.index, t.src),
|
|
4401
|
+
l.onload = null, l.onerror = null, t.progress.work(!0, t.index, t.src), n.resolve();
|
|
4391
4402
|
}, l.onerror = () => {
|
|
4392
4403
|
try {
|
|
4393
4404
|
r.removeChild(l);
|
|
4394
4405
|
} catch (c) {
|
|
4395
4406
|
console.error(c.message, c);
|
|
4396
4407
|
}
|
|
4397
|
-
l.onload = null, l.onerror = null, t.progress.work(!1, t.index, null),
|
|
4408
|
+
l.onload = null, l.onerror = null, t.progress.work(!1, t.index, null), n.reject();
|
|
4398
4409
|
};
|
|
4399
4410
|
else {
|
|
4400
4411
|
const c = {
|
|
@@ -4404,7 +4415,7 @@ class vr {
|
|
|
4404
4415
|
time: 0,
|
|
4405
4416
|
//定义成功回调函数
|
|
4406
4417
|
success: () => {
|
|
4407
|
-
t.progress.work(!0, t.index, t.src),
|
|
4418
|
+
t.progress.work(!0, t.index, t.src), n.resolve();
|
|
4408
4419
|
},
|
|
4409
4420
|
//定义错误回调函数
|
|
4410
4421
|
error: () => {
|
|
@@ -4413,7 +4424,7 @@ class vr {
|
|
|
4413
4424
|
} catch (h) {
|
|
4414
4425
|
console.error(h.message, h);
|
|
4415
4426
|
}
|
|
4416
|
-
t.progress.work(!1, t.index, null),
|
|
4427
|
+
t.progress.work(!1, t.index, null), n.resolve();
|
|
4417
4428
|
}
|
|
4418
4429
|
};
|
|
4419
4430
|
setTimeout(() => {
|
|
@@ -4432,16 +4443,16 @@ class vr {
|
|
|
4432
4443
|
* @param point
|
|
4433
4444
|
*/
|
|
4434
4445
|
mountJS(e, t, r) {
|
|
4435
|
-
e.post((
|
|
4446
|
+
e.post((n) => {
|
|
4436
4447
|
const i = t.src;
|
|
4437
4448
|
let o = this.moduleManager.get(i);
|
|
4438
4449
|
if (o && (o.status == O.Defined || o.status == O.Loaded)) {
|
|
4439
4450
|
if (o.exports) {
|
|
4440
|
-
o.type === et.factory && typeof o.exports == "function" ? t.progress.work(!0, t.index, o.exports()) : t.progress.work(!0, t.index, o.exports),
|
|
4451
|
+
o.type === et.factory && typeof o.exports == "function" ? t.progress.work(!0, t.index, o.exports()) : t.progress.work(!0, t.index, o.exports), n.resolve();
|
|
4441
4452
|
return;
|
|
4442
4453
|
}
|
|
4443
4454
|
if (document.querySelector(`script[src='${i}`)) {
|
|
4444
|
-
t.progress.work(!0, t.index, o.exports),
|
|
4455
|
+
t.progress.work(!0, t.index, o.exports), n.resolve();
|
|
4445
4456
|
return;
|
|
4446
4457
|
}
|
|
4447
4458
|
}
|
|
@@ -4453,22 +4464,22 @@ class vr {
|
|
|
4453
4464
|
status: O.Loading
|
|
4454
4465
|
// 状态
|
|
4455
4466
|
}, this.moduleManager.set(i, o);
|
|
4456
|
-
const l =
|
|
4467
|
+
const l = De().createElement("script");
|
|
4457
4468
|
if ("onload" in l)
|
|
4458
4469
|
l.onload = () => {
|
|
4459
|
-
l.onload = null, l.onerror = null, o.status == O.Loading && (o.status = O.Loaded, t.progress.work(!0, t.index, i)),
|
|
4470
|
+
l.onload = null, l.onerror = null, o.status == O.Loading && (o.status = O.Loaded, t.progress.work(!0, t.index, i)), n.resolve();
|
|
4460
4471
|
}, l.onerror = () => {
|
|
4461
4472
|
try {
|
|
4462
4473
|
r.removeChild(l);
|
|
4463
4474
|
} catch (c) {
|
|
4464
4475
|
console.error(c.message, c);
|
|
4465
4476
|
}
|
|
4466
|
-
l.onload = null, l.onerror = null, this.moduleManager.remove(i), t.progress.work(!1, t.index, null),
|
|
4477
|
+
l.onload = null, l.onerror = null, this.moduleManager.remove(i), t.progress.work(!1, t.index, null), n.resolve();
|
|
4467
4478
|
};
|
|
4468
4479
|
else {
|
|
4469
4480
|
const c = l;
|
|
4470
4481
|
c.onreadystatechange = () => {
|
|
4471
|
-
/loaded|complete/.test(c.readyState) && (c.onreadystatechange = null, o.status == O.Loading && (o.status = O.Loaded, t.progress.work(!0, t.index, i)),
|
|
4482
|
+
/loaded|complete/.test(c.readyState) && (c.onreadystatechange = null, o.status == O.Loading && (o.status = O.Loaded, t.progress.work(!0, t.index, i)), n.resolve());
|
|
4472
4483
|
};
|
|
4473
4484
|
}
|
|
4474
4485
|
l.defer = !0, l.src = i;
|
|
@@ -4480,12 +4491,12 @@ class vr {
|
|
|
4480
4491
|
* 卸载资源
|
|
4481
4492
|
*/
|
|
4482
4493
|
unmount(e, t = {}) {
|
|
4483
|
-
const r =
|
|
4484
|
-
if (
|
|
4494
|
+
const r = De(), n = this.getFileNamePostfix(e);
|
|
4495
|
+
if (n === "js" || n.length === 0) {
|
|
4485
4496
|
const i = r.querySelector(`script[src="${e}"]`);
|
|
4486
4497
|
i && i.parentNode && i.parentNode.removeChild(i), this.moduleManager.remove(e);
|
|
4487
4498
|
return;
|
|
4488
|
-
} else if (
|
|
4499
|
+
} else if (n === "css") {
|
|
4489
4500
|
const i = r.querySelector(`style[href="${e}"]`);
|
|
4490
4501
|
i && i.parentNode && i.parentNode.removeChild(i);
|
|
4491
4502
|
return;
|
|
@@ -4499,8 +4510,8 @@ class vr {
|
|
|
4499
4510
|
for (let r = 0; r < e.length; r++) {
|
|
4500
4511
|
if (e[r] === void 0 || e[r] === null)
|
|
4501
4512
|
continue;
|
|
4502
|
-
const
|
|
4503
|
-
|
|
4513
|
+
const n = e[r].trim();
|
|
4514
|
+
n.length !== 0 && t.push(n);
|
|
4504
4515
|
}
|
|
4505
4516
|
return t;
|
|
4506
4517
|
}
|
|
@@ -4511,7 +4522,7 @@ class vr {
|
|
|
4511
4522
|
* @returns
|
|
4512
4523
|
*/
|
|
4513
4524
|
createDefine(e, t) {
|
|
4514
|
-
const r = this,
|
|
4525
|
+
const r = this, n = function(...i) {
|
|
4515
4526
|
e.status = O.Defining;
|
|
4516
4527
|
let o, a, l, f = i.length;
|
|
4517
4528
|
f === 1 ? (l = i[0], o = void 0) : f === 2 ? (l = i[1], Array.isArray(i[0]) ? (a = r.trimEmptyElement(i[0]), o = void 0) : a = void 0) : (o = i[0], a = r.trimEmptyElement(i[1]), l = i[2]), o && (e.id = o, r.options.alias[o] = e.src), a && a.length > 0 ? r.ensure(a, (...u) => {
|
|
@@ -4524,7 +4535,7 @@ class vr {
|
|
|
4524
4535
|
e.status = O.Defined, t.progress.work(!0, t.index, e.exports);
|
|
4525
4536
|
}) : (typeof l == "function" ? e.exports = Reflect.apply(l, e, []) : e.exports = l, e.status = O.Defined, t.progress.work(!0, t.index, e.exports));
|
|
4526
4537
|
};
|
|
4527
|
-
return
|
|
4538
|
+
return n.amd = !0, n;
|
|
4528
4539
|
}
|
|
4529
4540
|
/**
|
|
4530
4541
|
* 解析路径
|
|
@@ -4551,8 +4562,8 @@ class vr {
|
|
|
4551
4562
|
let t = "";
|
|
4552
4563
|
if (e) {
|
|
4553
4564
|
for (let r in e) {
|
|
4554
|
-
let
|
|
4555
|
-
t += `${encodeURIComponent(r)}=${encodeURIComponent(
|
|
4565
|
+
let n = `${e[r]}`;
|
|
4566
|
+
t += `${encodeURIComponent(r)}=${encodeURIComponent(n)}&`;
|
|
4556
4567
|
}
|
|
4557
4568
|
t.length > 0 && (t = t.substring(0, t.length - 1));
|
|
4558
4569
|
}
|
|
@@ -4582,8 +4593,8 @@ class vr {
|
|
|
4582
4593
|
const t = this.options.nature;
|
|
4583
4594
|
if (t && Array.isArray(t))
|
|
4584
4595
|
for (let r = 0; r < t.length; r++) {
|
|
4585
|
-
const
|
|
4586
|
-
if (e.indexOf(
|
|
4596
|
+
const n = t[r];
|
|
4597
|
+
if (e.indexOf(n) === 0)
|
|
4587
4598
|
return !0;
|
|
4588
4599
|
}
|
|
4589
4600
|
return !1;
|
|
@@ -4603,36 +4614,36 @@ class vr {
|
|
|
4603
4614
|
if (e.indexOf("//") == 0)
|
|
4604
4615
|
return `${j().location.protocol}${e}`;
|
|
4605
4616
|
if (t) {
|
|
4606
|
-
let
|
|
4607
|
-
if (!
|
|
4617
|
+
let n = this.options.alias[e];
|
|
4618
|
+
if (!n) {
|
|
4608
4619
|
let i = e.indexOf("/");
|
|
4609
4620
|
if (i == -1)
|
|
4610
|
-
|
|
4621
|
+
n = e;
|
|
4611
4622
|
else {
|
|
4612
4623
|
let o = e.slice(0, i), a = this.options.paths[o];
|
|
4613
|
-
a ?
|
|
4624
|
+
a ? n = a + e.slice(i) : n = e;
|
|
4614
4625
|
}
|
|
4615
4626
|
}
|
|
4616
|
-
return this.parserPath(
|
|
4627
|
+
return this.parserPath(n, !1);
|
|
4617
4628
|
}
|
|
4618
4629
|
return `${ft()}${e}`;
|
|
4619
4630
|
}
|
|
4620
4631
|
}
|
|
4621
|
-
function Hr(
|
|
4622
|
-
let t =
|
|
4632
|
+
function Hr(s, e) {
|
|
4633
|
+
let t = s.sheet, r = !1;
|
|
4623
4634
|
if (e.isOldWebKit)
|
|
4624
4635
|
t && (r = !0);
|
|
4625
4636
|
else if (t)
|
|
4626
4637
|
try {
|
|
4627
4638
|
t.cssRules && (r = !0);
|
|
4628
|
-
} catch (
|
|
4629
|
-
|
|
4639
|
+
} catch (n) {
|
|
4640
|
+
n.name === "NS_ERROR_DOM_SECURITY_ERR" && (r = !0);
|
|
4630
4641
|
}
|
|
4631
4642
|
setTimeout(() => {
|
|
4632
|
-
e.time += 20, r ? e.success() : e.timeout > e.timeout ? e.error() : Hr(
|
|
4643
|
+
e.time += 20, r ? e.success() : e.timeout > e.timeout ? e.error() : Hr(s, e);
|
|
4633
4644
|
}, 20);
|
|
4634
4645
|
}
|
|
4635
|
-
class
|
|
4646
|
+
class rn {
|
|
4636
4647
|
/**
|
|
4637
4648
|
* 回调函数
|
|
4638
4649
|
*/
|
|
@@ -4669,8 +4680,8 @@ class ns {
|
|
|
4669
4680
|
if (this.status = e, this.status === !0 && (this.lastIndex !== t && this.size--, this.lastIndex = t, this.values.push(r)), this.size === 0 || this.status === !1)
|
|
4670
4681
|
try {
|
|
4671
4682
|
Reflect.apply(this.callback, this, [this.status, this.values]);
|
|
4672
|
-
} catch (
|
|
4673
|
-
console.error(
|
|
4683
|
+
} catch (n) {
|
|
4684
|
+
console.error(n.message, n);
|
|
4674
4685
|
}
|
|
4675
4686
|
}
|
|
4676
4687
|
/**
|
|
@@ -4680,7 +4691,7 @@ class ns {
|
|
|
4680
4691
|
return this.status;
|
|
4681
4692
|
}
|
|
4682
4693
|
}
|
|
4683
|
-
class
|
|
4694
|
+
class sn {
|
|
4684
4695
|
/**
|
|
4685
4696
|
* 索引
|
|
4686
4697
|
*/
|
|
@@ -4704,13 +4715,13 @@ class ss {
|
|
|
4704
4715
|
* @param params
|
|
4705
4716
|
* @param progress
|
|
4706
4717
|
*/
|
|
4707
|
-
constructor(e, t, r,
|
|
4708
|
-
this.index = e, this.src = t, this.params = r, this.progress =
|
|
4718
|
+
constructor(e, t, r, n) {
|
|
4719
|
+
this.index = e, this.src = t, this.params = r, this.progress = n;
|
|
4709
4720
|
}
|
|
4710
4721
|
}
|
|
4711
4722
|
const Dr = Symbol("fk"), Vr = Symbol("fbk"), Br = Symbol("fepk");
|
|
4712
|
-
function
|
|
4713
|
-
const e = new
|
|
4723
|
+
function wn(s = {}) {
|
|
4724
|
+
const e = new Ts(s), t = new Xt(), r = new er(), n = new vr(), i = {
|
|
4714
4725
|
/**
|
|
4715
4726
|
* 返回router
|
|
4716
4727
|
*/
|
|
@@ -4757,7 +4768,7 @@ function ws(n = {}) {
|
|
|
4757
4768
|
* 返回require
|
|
4758
4769
|
*/
|
|
4759
4770
|
get require() {
|
|
4760
|
-
return
|
|
4771
|
+
return n;
|
|
4761
4772
|
},
|
|
4762
4773
|
/**
|
|
4763
4774
|
* 返回extend
|
|
@@ -4781,7 +4792,7 @@ function ws(n = {}) {
|
|
|
4781
4792
|
* 安装
|
|
4782
4793
|
*/
|
|
4783
4794
|
install(o) {
|
|
4784
|
-
o.provide(ot, e), o.provide(Dr, i), o.provide(Vr, t), o.provide(Br, r), o.component(
|
|
4795
|
+
o.provide(ot, e), o.provide(Dr, i), o.provide(Vr, t), o.provide(Br, r), o.component(qs, Lt), o.component(js, en), Reflect.defineProperty(o.config.globalProperties, "$fox", {
|
|
4785
4796
|
get() {
|
|
4786
4797
|
return i;
|
|
4787
4798
|
}
|
|
@@ -4829,25 +4840,25 @@ function ws(n = {}) {
|
|
|
4829
4840
|
};
|
|
4830
4841
|
return i;
|
|
4831
4842
|
}
|
|
4832
|
-
function Ur(
|
|
4833
|
-
return
|
|
4843
|
+
function Ur(s) {
|
|
4844
|
+
return s ? s.$router : G(ot);
|
|
4834
4845
|
}
|
|
4835
|
-
function
|
|
4836
|
-
return
|
|
4846
|
+
function bn(s) {
|
|
4847
|
+
return s || (s = Mt()?.proxy ?? void 0), s ? Vt(s) : null;
|
|
4837
4848
|
}
|
|
4838
|
-
function
|
|
4839
|
-
return
|
|
4849
|
+
function xn(s) {
|
|
4850
|
+
return s ? s.$fox : G(Dr);
|
|
4840
4851
|
}
|
|
4841
|
-
function
|
|
4842
|
-
return
|
|
4852
|
+
function Rn(s) {
|
|
4853
|
+
return s ? s.$bus : G(Vr);
|
|
4843
4854
|
}
|
|
4844
|
-
function
|
|
4845
|
-
return
|
|
4855
|
+
function Sn(s) {
|
|
4856
|
+
return s ? s.$eventProxy : G(Br);
|
|
4846
4857
|
}
|
|
4847
|
-
function
|
|
4848
|
-
const e = Ur(), t = (r,
|
|
4858
|
+
function Pn(s) {
|
|
4859
|
+
const e = Ur(), t = (r, n, i) => {
|
|
4849
4860
|
try {
|
|
4850
|
-
Reflect.apply(
|
|
4861
|
+
Reflect.apply(s, {}, [r, n]);
|
|
4851
4862
|
} catch (o) {
|
|
4852
4863
|
console.error(o);
|
|
4853
4864
|
}
|
|
@@ -4857,10 +4868,10 @@ function Ps(n) {
|
|
|
4857
4868
|
e.removeBeforeEach(t);
|
|
4858
4869
|
});
|
|
4859
4870
|
}
|
|
4860
|
-
function
|
|
4861
|
-
const e = Ur(), t = (r,
|
|
4871
|
+
function Cn(s) {
|
|
4872
|
+
const e = Ur(), t = (r, n, i) => {
|
|
4862
4873
|
try {
|
|
4863
|
-
Reflect.apply(
|
|
4874
|
+
Reflect.apply(s, {}, [r, n]);
|
|
4864
4875
|
} catch (o) {
|
|
4865
4876
|
console.error(o);
|
|
4866
4877
|
}
|
|
@@ -4876,42 +4887,42 @@ export {
|
|
|
4876
4887
|
er as EventProxy,
|
|
4877
4888
|
q as Route,
|
|
4878
4889
|
It as clone,
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4890
|
+
wn as createFox,
|
|
4891
|
+
_s as createMemoryHistory,
|
|
4892
|
+
As as createWebHashHistory,
|
|
4893
|
+
gn as createWebHistory,
|
|
4894
|
+
pn as deleteContextValue,
|
|
4884
4895
|
$ as extend,
|
|
4885
4896
|
Vr as foxBusKey,
|
|
4886
4897
|
Br as foxEventProxyKey,
|
|
4887
4898
|
Dr as foxKey,
|
|
4888
4899
|
Fr as injectContextValue,
|
|
4889
|
-
|
|
4890
|
-
|
|
4900
|
+
on as isArray,
|
|
4901
|
+
fn as isDate,
|
|
4891
4902
|
br as isESModule,
|
|
4892
4903
|
Jt as isEqual,
|
|
4893
4904
|
R as isFunction,
|
|
4894
|
-
|
|
4905
|
+
ln as isMap,
|
|
4895
4906
|
Jr as isNil,
|
|
4896
4907
|
zr as isObject,
|
|
4897
4908
|
Qr as isPlainObject,
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4909
|
+
hn as isPromise,
|
|
4910
|
+
an as isSet,
|
|
4911
|
+
un as isString,
|
|
4912
|
+
cn as isSymbol,
|
|
4913
|
+
Cn as onAfterRouteUpdate,
|
|
4914
|
+
Pn as onBeforeRouteUpdate,
|
|
4915
|
+
mn as onFoxActivated,
|
|
4916
|
+
vn as onFoxInactivated,
|
|
4917
|
+
dn as provideContextValue,
|
|
4907
4918
|
ae as sessionKey,
|
|
4908
4919
|
xr as toBoolean,
|
|
4909
|
-
|
|
4920
|
+
yn as toNumber,
|
|
4910
4921
|
Nt as toTypeString,
|
|
4911
4922
|
zt as typeOf,
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4923
|
+
Rn as useBus,
|
|
4924
|
+
Sn as useEventProxy,
|
|
4925
|
+
xn as useFox,
|
|
4926
|
+
bn as useRoute,
|
|
4916
4927
|
Ur as useRouter
|
|
4917
4928
|
};
|