@fox-js/fox 3.1.1-1 → 3.1.1-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/libs/index.esm.js CHANGED
@@ -1,6 +1,6 @@
1
- import { ref as br, getCurrentInstance as Nt, onUnmounted as ft, shallowRef as Yr, defineComponent as xr, inject as Q, provide as se, h as he } from "vue";
1
+ import { ref as br, getCurrentInstance as Ht, onUnmounted as ft, shallowRef as Yr, defineComponent as xr, inject as Q, provide as se, h as he } from "vue";
2
2
  /*!
3
- * fox v3.1.0 Thu Mar 14 2024 16:30:45 GMT+0800 (中国标准时间)
3
+ * fox v3.1.0 Fri Mar 15 2024 23:11:53 GMT+0800 (中国标准时间)
4
4
  */
5
5
  const Ee = typeof window < "u", K = function() {
6
6
  return window;
@@ -34,7 +34,7 @@ const ke = (s, e, t) => {
34
34
  for (let a in e)
35
35
  a === "bubbles" ? n = !!e[a] : a === "cancelable" ? i = !!e[a] : r[a] = e[a];
36
36
  r.initEvent(s, n, i), (t ?? document).dispatchEvent(r);
37
- }, mn = Array.isArray, vn = (s) => Ht(s) === "[object Map]", gn = (s) => Ht(s) === "[object Set]", wn = (s) => s instanceof Date, x = (s) => typeof s == "function", bn = (s) => typeof s == "string", xn = (s) => typeof s == "symbol", es = (s) => s !== null && typeof s == "object", Rn = (s) => es(s) && x(s.then) && x(s.catch), ts = (s) => s == null, rs = Object.prototype.toString, Ht = (s) => rs.call(s), ss = (s) => Ht(s) === "[object Object]", ns = typeof Symbol == "function" && typeof Symbol.toStringTag == "symbol";
37
+ }, mn = Array.isArray, vn = (s) => Dt(s) === "[object Map]", gn = (s) => Dt(s) === "[object Set]", wn = (s) => s instanceof Date, x = (s) => typeof s == "function", bn = (s) => typeof s == "string", xn = (s) => typeof s == "symbol", es = (s) => s !== null && typeof s == "object", Rn = (s) => es(s) && x(s.then) && x(s.catch), ts = (s) => s == null, rs = Object.prototype.toString, Dt = (s) => rs.call(s), ss = (s) => Dt(s) === "[object Object]", ns = typeof Symbol == "function" && typeof Symbol.toStringTag == "symbol";
38
38
  function Rr(s) {
39
39
  return s.__esModule || ns && s[Symbol.toStringTag] === "Module";
40
40
  }
@@ -56,7 +56,7 @@ function $(...s) {
56
56
  }
57
57
  return e;
58
58
  }
59
- function Dt(s, e, t = !1) {
59
+ function Ut(s, e, t = !1) {
60
60
  if (!t)
61
61
  $(!0, s, e);
62
62
  else {
@@ -69,7 +69,7 @@ function Dt(s, e, t = !1) {
69
69
  if (typeof i == "object") {
70
70
  if (!Array.isArray(i) && !ss(i))
71
71
  continue;
72
- n = Dt(n, i, t), s[r] = n;
72
+ n = Ut(n, i, t), s[r] = n;
73
73
  } else {
74
74
  if (typeof i == "function")
75
75
  continue;
@@ -116,16 +116,16 @@ const os = {
116
116
  "[object RegExp]": "regExp",
117
117
  "[object Object]": "object"
118
118
  };
119
- function zt(s) {
119
+ function Jt(s) {
120
120
  let t = Object.prototype.toString.call(s);
121
121
  return s == null ? String(s) : os[t] || "object";
122
122
  }
123
- function Jt(s, e) {
123
+ function Gt(s, e) {
124
124
  if (s == e)
125
125
  return !0;
126
126
  if (s === void 0 || e === void 0)
127
127
  return !1;
128
- let t = zt(s), r = zt(e);
128
+ let t = Jt(s), r = Jt(e);
129
129
  if (t !== r)
130
130
  return !1;
131
131
  if (t === "object") {
@@ -134,7 +134,7 @@ function Jt(s, e) {
134
134
  return !1;
135
135
  for (let o = 0; o < n.length; o++) {
136
136
  let a = n[o], l = s[a], u = e[a];
137
- if (!Jt(l, u))
137
+ if (!Gt(l, u))
138
138
  return !1;
139
139
  }
140
140
  return !0;
@@ -143,7 +143,7 @@ function Jt(s, e) {
143
143
  return !1;
144
144
  for (let n = 0; n < s.length; n++) {
145
145
  let i = s[n], o = e[n];
146
- if (!Jt(i, o))
146
+ if (!Gt(i, o))
147
147
  return !1;
148
148
  }
149
149
  return !0;
@@ -170,7 +170,7 @@ const Pr = (s) => {
170
170
  e[t] = r;
171
171
  }
172
172
  return e;
173
- }, Gt = Symbol("idKey"), pe = Symbol("valueKey"), R = Symbol("childrenKey"), X = Symbol("growKey");
173
+ }, Qt = Symbol("idKey"), pe = Symbol("valueKey"), R = Symbol("childrenKey"), X = Symbol("growKey");
174
174
  class Cr {
175
175
  /**
176
176
  * 自动创建解决策略
@@ -179,7 +179,7 @@ class Cr {
179
179
  /**
180
180
  * id
181
181
  */
182
- [Gt];
182
+ [Qt];
183
183
  /**
184
184
  * value
185
185
  */
@@ -193,7 +193,7 @@ class Cr {
193
193
  * @param id
194
194
  */
195
195
  constructor(e) {
196
- this[Gt] = e;
196
+ this[Qt] = e;
197
197
  }
198
198
  }
199
199
  class as {
@@ -211,7 +211,7 @@ class as {
211
211
  if (r)
212
212
  return He(r);
213
213
  if (e[X])
214
- return r = kt(t), r[X] = e[X], e[R].set(t, r), He(r);
214
+ return r = Bt(t), r[X] = e[X], e[R].set(t, r), He(r);
215
215
  }
216
216
  /**
217
217
  * 拦截set操作
@@ -233,13 +233,13 @@ class as {
233
233
  return t === "value" || t == "grow" ? (console.error(`can not delete property:${String(t)}`), !1) : (e[R].delete(t), !0);
234
234
  }
235
235
  }
236
- const Ut = "__proxy__";
237
- function kt(s) {
236
+ const kt = "__proxy__";
237
+ function Bt(s) {
238
238
  const e = new Cr(s);
239
- return Reflect.set(e, Ut, new Proxy(e, new as())), e;
239
+ return Reflect.set(e, kt, new Proxy(e, new as())), e;
240
240
  }
241
241
  function He(s) {
242
- return Reflect.get(s, Ut);
242
+ return Reflect.get(s, kt);
243
243
  }
244
244
  class us {
245
245
  /**
@@ -376,7 +376,7 @@ class us {
376
376
  }
377
377
  }
378
378
  }
379
- class Ar extends Cr {
379
+ class Fr extends Cr {
380
380
  /**
381
381
  * 持久化处理器
382
382
  */
@@ -399,7 +399,7 @@ class Ar extends Cr {
399
399
  let r = this;
400
400
  for (let n = 0; n < t - 1; n++) {
401
401
  let i = e[n], o;
402
- r[R].has(i) ? o = r[R].get(i) : (o = kt(i), r[R].set(i, o)), r = o;
402
+ r[R].has(i) ? o = r[R].get(i) : (o = Bt(i), r[R].set(i, o)), r = o;
403
403
  }
404
404
  return r[pe].value = e[t - 1], this._persistHandler.put(e), !0;
405
405
  }
@@ -470,7 +470,7 @@ class Ar extends Cr {
470
470
  }
471
471
  }
472
472
  const fs = ["put", "get", "contains", "remove", "clear", "_persistHandler"];
473
- function Qt(s) {
473
+ function Xt(s) {
474
474
  return fs.includes(s);
475
475
  }
476
476
  class cs {
@@ -486,13 +486,13 @@ class cs {
486
486
  return e[X];
487
487
  if (t === R)
488
488
  return e[R];
489
- if (typeof t == "string" && Qt(t))
489
+ if (typeof t == "string" && Xt(t))
490
490
  return e[t];
491
491
  let r = String(t), n = e[R].get(r);
492
492
  if (n)
493
493
  return He(n);
494
494
  if (e[X])
495
- return n = kt(r), n[X] = e[X], e[R].set(r, n), He(n);
495
+ return n = Bt(r), n[X] = e[X], e[R].set(r, n), He(n);
496
496
  }
497
497
  /**
498
498
  * 拦截set操作
@@ -502,7 +502,7 @@ class cs {
502
502
  * @returns
503
503
  */
504
504
  set(e, t, r) {
505
- return t == "value" ? (e[pe].value = r, !0) : t === "grow" ? (e[X] = Sr(r), !0) : Qt(t) ? !1 : r == null ? (e[R].delete(t), !0) : (console.error(`illegal property:${t}`), !1);
505
+ return t == "value" ? (e[pe].value = r, !0) : t === "grow" ? (e[X] = Sr(r), !0) : Xt(t) ? !1 : r == null ? (e[R].delete(t), !0) : (console.error(`illegal property:${t}`), !1);
506
506
  }
507
507
  /**
508
508
  * 拦截删除property属性
@@ -515,10 +515,10 @@ class cs {
515
515
  }
516
516
  }
517
517
  function hs(s) {
518
- const e = new Ar(s), t = new cs(), r = new Proxy(e, t);
519
- return Reflect.set(e, Ut, r), e;
518
+ const e = new Fr(s), t = new cs(), r = new Proxy(e, t);
519
+ return Reflect.set(e, kt, r), e;
520
520
  }
521
- const Xt = new Proxy(Ar, {
521
+ const Yt = new Proxy(Fr, {
522
522
  /**
523
523
  * 拦截构造函数
524
524
  * @param target
@@ -529,8 +529,8 @@ const Xt = new Proxy(Ar, {
529
529
  const t = hs(e[0] ?? {});
530
530
  return He(t);
531
531
  }
532
- }), te = "default", Fr = Symbol("sync"), H = Symbol("resolveRoute");
533
- function Yt(s) {
532
+ }), te = "default", Ar = Symbol("sync"), H = Symbol("resolveRoute");
533
+ function Zt(s) {
534
534
  let e = !1;
535
535
  return function(...t) {
536
536
  if (!e)
@@ -540,9 +540,9 @@ function Yt(s) {
540
540
  function ys(s) {
541
541
  let e = s.src;
542
542
  return new Promise((t, r) => {
543
- const n = Yt((a) => {
543
+ const n = Zt((a) => {
544
544
  Rr(a) && (a = a.default), s.component = a, console.debug("success load async module"), t();
545
- }), i = Yt((a) => {
545
+ }), i = Zt((a) => {
546
546
  console.debug("reject load async module"), r(a);
547
547
  });
548
548
  let o;
@@ -721,7 +721,7 @@ class S {
721
721
  */
722
722
  static clone(e, t) {
723
723
  let r = new S();
724
- return Dt(r, e, t), r;
724
+ return Ut(r, e, t), r;
725
725
  }
726
726
  /**
727
727
  * 判断路由是否相同
@@ -811,7 +811,7 @@ class ps {
811
811
  return ys(this);
812
812
  }
813
813
  }
814
- class Zt {
814
+ class er {
815
815
  /**
816
816
  * 节点
817
817
  */
@@ -840,7 +840,7 @@ class vt {
840
840
  layers = [];
841
841
  }
842
842
  var q = /* @__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))(q || {});
843
- const ms = "FoxBeforeEnter", vs = "FoxEnter", gs = "FoxLeave", ws = "FoxLeave", er = "FoxAfterLeave", U = Symbol("chainKey"), N = Symbol("cursorKey"), gt = Symbol("$persistentModeKey"), F = Symbol("statusKey"), Z = Symbol("argsKey"), Be = Symbol("exArgsKey"), me = Symbol("successFnsKey"), Fe = Symbol("errorFnsKey"), ae = Symbol("sessionKey"), ee = Symbol("_go");
843
+ const ms = "FoxBeforeEnter", vs = "FoxEnter", gs = "FoxLeave", ws = "FoxLeave", Ot = "FoxLeaveEnd", U = Symbol("chainKey"), N = Symbol("cursorKey"), gt = Symbol("$persistentModeKey"), A = Symbol("statusKey"), Z = Symbol("argsKey"), Be = Symbol("exArgsKey"), me = Symbol("successFnsKey"), Ae = Symbol("errorFnsKey"), ae = Symbol("sessionKey"), ee = Symbol("_go");
844
844
  class lt {
845
845
  /**
846
846
  * 事件链路
@@ -857,7 +857,7 @@ class lt {
857
857
  /**
858
858
  * 状态
859
859
  */
860
- [F] = "Free";
860
+ [A] = "Free";
861
861
  /**
862
862
  * 参数
863
863
  */
@@ -873,7 +873,7 @@ class lt {
873
873
  /**
874
874
  * 错误函数
875
875
  */
876
- [Fe] = [];
876
+ [Ae] = [];
877
877
  /**
878
878
  * 链路session
879
879
  */
@@ -899,21 +899,21 @@ class lt {
899
899
  * @param params
900
900
  */
901
901
  [ee](e, ...t) {
902
- let r = this[F];
903
- if (this[F] = "Busy", this[N] += e, this[N] < 0 && (this[N] = 0), this[Z] = t, r === "Exception" || r === "Reject") {
902
+ let r = this[A];
903
+ if (this[A] = "Busy", this[N] += e, this[N] < 0 && (this[N] = 0), this[Z] = t, r === "Exception" || r === "Reject") {
904
904
  let a = [{
905
905
  session: this[ae]
906
906
  }, ...this[Be]];
907
- for (; this[Fe].length > 0; )
907
+ for (; this[Ae].length > 0; )
908
908
  try {
909
- let l = this[Fe].shift();
909
+ let l = this[Ae].shift();
910
910
  typeof l == "function" && Ne(() => {
911
911
  Reflect.apply(l, {}, a);
912
912
  });
913
913
  } catch (l) {
914
914
  console.error(l.message, l);
915
915
  }
916
- return this[F] = r, this[U] = [], this[N] = 0, this;
916
+ return this[A] = r, this[U] = [], this[N] = 0, this;
917
917
  } else if (r === "Finished" || this[N] >= this[U].length) {
918
918
  let a = [{
919
919
  session: this[ae]
@@ -924,10 +924,10 @@ class lt {
924
924
  Reflect.apply(l, {}, a);
925
925
  });
926
926
  }
927
- return this[F] = "Free", this;
927
+ return this[A] = "Free", this;
928
928
  }
929
929
  if (this[N] >= this[U].length)
930
- return this[F] = "Free", this;
930
+ return this[A] = "Free", this;
931
931
  let n = this[U][this[N]];
932
932
  this[gt] || (this[U].splice(0, this[N] + 1), this[N] = -1);
933
933
  let i = this[N] + 1;
@@ -973,28 +973,28 @@ class lt {
973
973
  * @param params
974
974
  */
975
975
  finish(...e) {
976
- return this[F] = "Finished", this[Z] = e, Reflect.apply(this[ee], this, [0]);
976
+ return this[A] = "Finished", this[Z] = e, Reflect.apply(this[ee], this, [0]);
977
977
  }
978
978
  /**
979
979
  * 结束事件链调用,直接触发wait函数(error方法)
980
980
  * @param params
981
981
  */
982
982
  reject(...e) {
983
- return this[F] = "Reject", this[Be] = e, Reflect.apply(this[ee], this, [0]);
983
+ return this[A] = "Reject", this[Be] = e, Reflect.apply(this[ee], this, [0]);
984
984
  }
985
985
  /**
986
986
  * 结束事件链调用,直接触发error函数
987
987
  * @param params
988
988
  */
989
989
  throw(...e) {
990
- return this[F] = "Exception", this[Be] = e, Reflect.apply(this[ee], this, [0]);
990
+ return this[A] = "Exception", this[Be] = e, Reflect.apply(this[ee], this, [0]);
991
991
  }
992
992
  /**
993
993
  * 重置事件链,直接触发wait函数
994
994
  * @param params
995
995
  */
996
996
  reset(...e) {
997
- this[F] = "Busy", this[Z] = e, this[U] = [], this[N] = 0;
997
+ this[A] = "Busy", this[Z] = e, this[U] = [], this[N] = 0;
998
998
  let r = [{
999
999
  session: this[ae]
1000
1000
  }, ...this[Z]];
@@ -1004,7 +1004,7 @@ class lt {
1004
1004
  Reflect.apply(n, this, r);
1005
1005
  });
1006
1006
  }
1007
- return this[F] = "Free", this;
1007
+ return this[A] = "Free", this;
1008
1008
  }
1009
1009
  /**
1010
1010
  * 加入任务
@@ -1012,7 +1012,7 @@ class lt {
1012
1012
  * @returns {EventChain}
1013
1013
  */
1014
1014
  post(e) {
1015
- return this[F] === "Reject" || this[F] === "Exception" ? this : (Array.isArray(e) ? this[U] = [...this[U], ...e] : this[U].push(e), this[F] === "Busy" ? this : (Reflect.apply(this[ee], this, [0, ...this[Z]]), this));
1015
+ return this[A] === "Reject" || this[A] === "Exception" ? this : (Array.isArray(e) ? this[U] = [...this[U], ...e] : this[U].push(e), this[A] === "Busy" ? this : (Reflect.apply(this[ee], this, [0, ...this[Z]]), this));
1016
1016
  }
1017
1017
  /**
1018
1018
  * 加入等待任务
@@ -1021,7 +1021,7 @@ class lt {
1021
1021
  * @returns
1022
1022
  */
1023
1023
  wait(e, t) {
1024
- 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);
1024
+ return e && typeof e == "function" && this[me].push(e), t && typeof t == "function" && this[Ae].push(t), this[A] === "Busy" ? this : (Reflect.apply(this[ee], this, [0, ...this[Z]]), this);
1025
1025
  }
1026
1026
  /**
1027
1027
  * 加入异常处理任务
@@ -1029,14 +1029,14 @@ class lt {
1029
1029
  * @returns
1030
1030
  */
1031
1031
  exception(e) {
1032
- return e && typeof e == "function" && this[Fe].push(e), this[F] === "Busy" ? this : Reflect.apply(this[ee], this, [0, ...this[Z]]);
1032
+ return e && typeof e == "function" && this[Ae].push(e), this[A] === "Busy" ? this : Reflect.apply(this[ee], this, [0, ...this[Z]]);
1033
1033
  }
1034
1034
  /**
1035
1035
  * 判断事件链是否已经执行完成
1036
1036
  * @returns {boolean}
1037
1037
  */
1038
1038
  isFinish() {
1039
- return this[F] == "Reject" || this[F] == "Free" && this[N] >= this[U].length;
1039
+ return this[A] == "Reject" || this[A] == "Free" && this[N] >= this[U].length;
1040
1040
  }
1041
1041
  }
1042
1042
  const ve = Symbol("registerKey");
@@ -1287,7 +1287,7 @@ function sr(s, e) {
1287
1287
  }
1288
1288
  }
1289
1289
  }
1290
- var Ot = /* @__PURE__ */ ((s) => (s.DEACTIVATED = "da", s.ACTIVATED = "a", s))(Ot || {});
1290
+ var Mt = /* @__PURE__ */ ((s) => (s.DEACTIVATED = "da", s.ACTIVATED = "a", s))(Mt || {});
1291
1291
  class Ss {
1292
1292
  /**
1293
1293
  * 类型
@@ -1332,7 +1332,7 @@ function Kr(s) {
1332
1332
  if (t)
1333
1333
  r = t;
1334
1334
  else {
1335
- const i = Nt();
1335
+ const i = Ht();
1336
1336
  if (i == null || i.proxy == null) {
1337
1337
  console.error("can not get current instance or proxy");
1338
1338
  return;
@@ -1352,14 +1352,14 @@ function Kr(s) {
1352
1352
  const Cn = Kr(
1353
1353
  "a"
1354
1354
  /* ACTIVATED */
1355
- ), An = Kr(
1355
+ ), Fn = Kr(
1356
1356
  "da"
1357
1357
  /* DEACTIVATED */
1358
1358
  ), $r = Symbol("routeKey");
1359
1359
  function nr(s, e) {
1360
1360
  s.set($r, e);
1361
1361
  }
1362
- function Bt(s) {
1362
+ function Vt(s) {
1363
1363
  let e = Tr(s, $r);
1364
1364
  return typeof e == "function" ? e() : e ?? null;
1365
1365
  }
@@ -1434,19 +1434,19 @@ function Cs(s) {
1434
1434
  }
1435
1435
  function qr(s, e) {
1436
1436
  e === void 0 && (e = {});
1437
- for (var t = Cs(s), r = e.prefixes, n = r === void 0 ? "./" : r, i = "[^".concat(Re(e.delimiter || "/#?"), "]+?"), o = [], a = 0, l = 0, u = "", f = function(A) {
1438
- if (l < t.length && t[l].type === A)
1437
+ for (var t = Cs(s), r = e.prefixes, n = r === void 0 ? "./" : r, i = "[^".concat(Re(e.delimiter || "/#?"), "]+?"), o = [], a = 0, l = 0, u = "", f = function(F) {
1438
+ if (l < t.length && t[l].type === F)
1439
1439
  return t[l++].value;
1440
- }, c = function(A) {
1441
- var P = f(A);
1440
+ }, c = function(F) {
1441
+ var P = f(F);
1442
1442
  if (P !== void 0)
1443
1443
  return P;
1444
1444
  var E = t[l], W = E.type, M = E.index;
1445
- throw new TypeError("Unexpected ".concat(W, " at ").concat(M, ", expected ").concat(A));
1445
+ throw new TypeError("Unexpected ".concat(W, " at ").concat(M, ", expected ").concat(F));
1446
1446
  }, h = function() {
1447
- for (var A = "", P; P = f("CHAR") || f("ESCAPED_CHAR"); )
1448
- A += P;
1449
- return A;
1447
+ for (var F = "", P; P = f("CHAR") || f("ESCAPED_CHAR"); )
1448
+ F += P;
1449
+ return F;
1450
1450
  }; l < t.length; ) {
1451
1451
  var y = f("CHAR"), d = f("NAME"), m = f("PATTERN");
1452
1452
  if (d || m) {
@@ -1482,12 +1482,12 @@ function qr(s, e) {
1482
1482
  }
1483
1483
  return o;
1484
1484
  }
1485
- function As(s, e) {
1486
- return Fs(qr(s, e), e);
1487
- }
1488
1485
  function Fs(s, e) {
1486
+ return As(qr(s, e), e);
1487
+ }
1488
+ function As(s, e) {
1489
1489
  e === void 0 && (e = {});
1490
- var t = Vt(e), r = e.encode, n = r === void 0 ? function(l) {
1490
+ var t = Wt(e), r = e.encode, n = r === void 0 ? function(l) {
1491
1491
  return l;
1492
1492
  } : r, i = e.validate, o = i === void 0 ? !0 : i, a = s.map(function(l) {
1493
1493
  if (typeof l == "object")
@@ -1560,7 +1560,7 @@ function Ts(s, e, t) {
1560
1560
  function Re(s) {
1561
1561
  return s.replace(/([.+*?=^!:${}()[\]|/\\])/g, "\\$1");
1562
1562
  }
1563
- function Vt(s) {
1563
+ function Wt(s) {
1564
1564
  return s && s.sensitive ? "" : "i";
1565
1565
  }
1566
1566
  function Ks(s, e) {
@@ -1581,7 +1581,7 @@ function $s(s, e, t) {
1581
1581
  var r = s.map(function(n) {
1582
1582
  return jr(n, e, t).source;
1583
1583
  });
1584
- return new RegExp("(?:".concat(r.join("|"), ")"), Vt(t));
1584
+ return new RegExp("(?:".concat(r.join("|"), ")"), Wt(t));
1585
1585
  }
1586
1586
  function qs(s, e, t) {
1587
1587
  return js(qr(s, t), e, t);
@@ -1595,18 +1595,18 @@ function js(s, e, t) {
1595
1595
  if (typeof b == "string")
1596
1596
  v += Re(f(b));
1597
1597
  else {
1598
- var T = Re(f(b.prefix)), A = Re(f(b.suffix));
1598
+ var T = Re(f(b.prefix)), F = Re(f(b.suffix));
1599
1599
  if (b.pattern)
1600
- if (e && e.push(b), T || A)
1600
+ if (e && e.push(b), T || F)
1601
1601
  if (b.modifier === "+" || b.modifier === "*") {
1602
1602
  var P = b.modifier === "*" ? "?" : "";
1603
- v += "(?:".concat(T, "((?:").concat(b.pattern, ")(?:").concat(A).concat(T, "(?:").concat(b.pattern, "))*)").concat(A, ")").concat(P);
1603
+ v += "(?:".concat(T, "((?:").concat(b.pattern, ")(?:").concat(F).concat(T, "(?:").concat(b.pattern, "))*)").concat(F, ")").concat(P);
1604
1604
  } else
1605
- v += "(?:".concat(T, "(").concat(b.pattern, ")").concat(A, ")").concat(b.modifier);
1605
+ v += "(?:".concat(T, "(").concat(b.pattern, ")").concat(F, ")").concat(b.modifier);
1606
1606
  else
1607
1607
  b.modifier === "+" || b.modifier === "*" ? v += "((?:".concat(b.pattern, ")").concat(b.modifier, ")") : v += "(".concat(b.pattern, ")").concat(b.modifier);
1608
1608
  else
1609
- v += "(?:".concat(T).concat(A, ")").concat(b.modifier);
1609
+ v += "(?:".concat(T).concat(F, ")").concat(b.modifier);
1610
1610
  }
1611
1611
  }
1612
1612
  if (l)
@@ -1615,7 +1615,7 @@ function js(s, e, t) {
1615
1615
  var E = s[s.length - 1], W = typeof E == "string" ? p.indexOf(E[E.length - 1]) > -1 : E === void 0;
1616
1616
  n || (v += "(?:".concat(p, "(?=").concat(m, "))?")), W || (v += "(?=".concat(p, "|").concat(m, ")"));
1617
1617
  }
1618
- return new RegExp(v, Vt(t));
1618
+ return new RegExp(v, Wt(t));
1619
1619
  }
1620
1620
  function jr(s, e, t) {
1621
1621
  return s instanceof RegExp ? Ks(s, e) : Array.isArray(s) ? $s(s, e, t) : qs(s, e, t);
@@ -2159,7 +2159,7 @@ class Lr {
2159
2159
  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}`;
2160
2160
  }
2161
2161
  }
2162
- function Fn(s = !0, e = null, t = "", r = !0, n = !1, i) {
2162
+ function An(s = !0, e = null, t = "", r = !0, n = !1, i) {
2163
2163
  return e !== null && (e = K().location.pathname), e && e.endsWith("/") && (e = e.substring(0, e.length - 1)), new Lr("path", e ?? "", t, s, r, n, i);
2164
2164
  }
2165
2165
  function Is(s = !0, e = "", t = !0, r = !1, n) {
@@ -2317,7 +2317,7 @@ class Ns {
2317
2317
  function Hs(s = "", e = 50) {
2318
2318
  return new Ns(s, e);
2319
2319
  }
2320
- const ze = Symbol("_constructRouteModel"), Je = Symbol("_findRouteModel"), Et = Symbol("_findRootView"), hr = Symbol("_getFirstView"), fe = Symbol("_removeView"), yr = Symbol("_buildPage"), dr = Symbol("_resolveComponent"), pr = Symbol("_update"), ie = Symbol("_merge"), Ct = Symbol("_handleHistoryChange"), Ge = Symbol("_handleRouteUpdated"), Qe = Symbol("routeUpdatedCallback"), w = Symbol("currentRoutes"), ge = Symbol("current"), mr = Symbol("_addRouteRecorder"), qe = Symbol("_removeRouteRecorder"), Xe = Symbol("_cloneRouteRecorder"), j = Symbol("_handleError"), Ye = Symbol("errorCallback"), B = Symbol("registerKey"), Ze = Symbol("notFoundKey"), At = Symbol("notFoundPathKey"), V = Symbol("forestKey"), C = Symbol("historyKey"), je = Symbol("beforeFiltersKey"), Le = Symbol("afterFiltersKey"), Oe = Symbol("destroyFiltersKey"), Ft = Symbol("propsFilterKey"), we = Symbol("mainDispatcherKey"), _t = Symbol("initKey"), ce = Symbol("readyKey"), Tt = Symbol("readyHandlersKey"), et = Symbol("_markReady"), vr = Symbol("_createNextFn"), Kt = Symbol("_start"), $t = Symbol("_before"), qt = Symbol("_after"), gr = Symbol("_destroy"), jt = Symbol("_load"), Me = Symbol("_unload"), Ie = Symbol("routerGuardKey");
2320
+ const ze = Symbol("_constructRouteModel"), Je = Symbol("_findRouteModel"), Et = Symbol("_findRootView"), hr = Symbol("_getFirstView"), fe = Symbol("_removeView"), yr = Symbol("_buildPage"), dr = Symbol("_resolveComponent"), pr = Symbol("_update"), ie = Symbol("_merge"), Ct = Symbol("_handleHistoryChange"), Ge = Symbol("_handleRouteUpdated"), Qe = Symbol("routeUpdatedCallback"), w = Symbol("currentRoutes"), ge = Symbol("current"), mr = Symbol("_addRouteRecorder"), qe = Symbol("_removeRouteRecorder"), Xe = Symbol("_cloneRouteRecorder"), j = Symbol("_handleError"), Ye = Symbol("errorCallback"), B = Symbol("registerKey"), Ze = Symbol("notFoundKey"), Ft = Symbol("notFoundPathKey"), V = Symbol("forestKey"), C = Symbol("historyKey"), je = Symbol("beforeFiltersKey"), Le = Symbol("afterFiltersKey"), Oe = Symbol("destroyFiltersKey"), At = Symbol("propsFilterKey"), we = Symbol("mainDispatcherKey"), _t = Symbol("initKey"), ce = Symbol("readyKey"), Tt = Symbol("readyHandlersKey"), et = Symbol("_markReady"), vr = Symbol("_createNextFn"), Kt = Symbol("_start"), $t = Symbol("_before"), qt = Symbol("_after"), gr = Symbol("_destroy"), jt = Symbol("_load"), Me = Symbol("_unload"), Ie = Symbol("routerGuardKey");
2321
2321
  function Ds(s) {
2322
2322
  return s.layers.length == 0 || s.layers[0].views.length == 0;
2323
2323
  }
@@ -2346,7 +2346,7 @@ class ks {
2346
2346
  /**
2347
2347
  * not found route path
2348
2348
  */
2349
- [At] = "*";
2349
+ [Ft] = "*";
2350
2350
  /**
2351
2351
  * ready
2352
2352
  */
@@ -2390,7 +2390,7 @@ class ks {
2390
2390
  /**
2391
2391
  * 属性传递过滤器
2392
2392
  */
2393
- [Ft] = null;
2393
+ [At] = null;
2394
2394
  /**
2395
2395
  * 主任务分发器
2396
2396
  */
@@ -2608,13 +2608,13 @@ class ks {
2608
2608
  * 设置属性传递过滤器
2609
2609
  */
2610
2610
  set propsFilter(e) {
2611
- this[Ft] = e;
2611
+ this[At] = e;
2612
2612
  }
2613
2613
  /**
2614
2614
  * 获取属性传递过滤器
2615
2615
  */
2616
2616
  get propsFilter() {
2617
- return this[Ft];
2617
+ return this[At];
2618
2618
  }
2619
2619
  /**
2620
2620
  * 设置还原点
@@ -2714,7 +2714,7 @@ class ks {
2714
2714
  * @param index
2715
2715
  */
2716
2716
  addRoute(e, t = -1) {
2717
- if (e.path === this[At]) {
2717
+ if (e.path === this[Ft]) {
2718
2718
  this.setNotFoundRoute(e);
2719
2719
  return;
2720
2720
  }
@@ -2760,7 +2760,7 @@ class ks {
2760
2760
  * @param path
2761
2761
  */
2762
2762
  setNotFoundPath(e) {
2763
- this[At] = e;
2763
+ this[Ft] = e;
2764
2764
  }
2765
2765
  /**
2766
2766
  * 配置not found路由配置
@@ -2803,12 +2803,12 @@ class ks {
2803
2803
  for (let u of l) {
2804
2804
  let f = new vt();
2805
2805
  f.name = u.name, u.path && u.path.length > 0 ? t !== "/" ? f.path = `${t}${u.path}` : f.path = u.path : (i = !0, f.path = t);
2806
- let c = new Zt();
2806
+ let c = new er();
2807
2807
  c.models = [...n], f.layers = [c, ...u.layers], o.push(f);
2808
2808
  }
2809
2809
  }
2810
2810
  if (!i) {
2811
- const a = new Zt();
2811
+ const a = new er();
2812
2812
  a.models = n;
2813
2813
  const l = new vt();
2814
2814
  l.name = e.name, l.path = t, l.layers = [a], o.splice(0, 0, l);
@@ -2857,7 +2857,7 @@ class ks {
2857
2857
  return e.find = r, t.template && e.find && (e.find = { ...e.find }, e.find.path = t.path), !0;
2858
2858
  } else if (i === r.name) {
2859
2859
  t.params = t.params ?? {};
2860
- const o = As(r.path);
2860
+ const o = Fs(r.path);
2861
2861
  return t.path = o(t.params), e.find = r, t.template && e.find && (e.find = { ...e.find }, e.find.name = t.name), !0;
2862
2862
  }
2863
2863
  }
@@ -3478,7 +3478,7 @@ class ks {
3478
3478
  let E = o.layers[g].views[P];
3479
3479
  E[ye] && k.include(v, E[ye]) && T.unshift(P);
3480
3480
  }
3481
- let A = [];
3481
+ let F = [];
3482
3482
  for (let P of T) {
3483
3483
  let E = o.layers[g].views[P], W = e.layers[_].models, M;
3484
3484
  for (let I = 0; I < W.length; I++)
@@ -3506,13 +3506,13 @@ class ks {
3506
3506
  let z = [];
3507
3507
  for (let re = 1; re < I.length; re++)
3508
3508
  z.push(I[re].index);
3509
- z.length > 0 && this[fe](o, { x: P, y: g }, z, !0), A.push(new k(E, Y.index, g));
3509
+ z.length > 0 && this[fe](o, { x: P, y: g }, z, !0), F.push(new k(E, Y.index, g));
3510
3510
  }
3511
3511
  }
3512
3512
  E[G] = !1;
3513
3513
  }
3514
3514
  }
3515
- v = A;
3515
+ v = F;
3516
3516
  }
3517
3517
  this[ie](o, g, e, _, b);
3518
3518
  }
@@ -3564,7 +3564,7 @@ class ks {
3564
3564
  * @param parentViewIndex
3565
3565
  * @returns
3566
3566
  */
3567
- [Fr](e, t, r, n, i, o) {
3567
+ [Ar](e, t, r, n, i, o) {
3568
3568
  if (t < 0 || t > this[V].layers.length)
3569
3569
  return null;
3570
3570
  if (t < this[V].layers.length) {
@@ -3659,7 +3659,7 @@ function tn(s, e = !1) {
3659
3659
  let t = null;
3660
3660
  return e ? t = s.hideCancelled ?? s.leaveCancelled : t = s.leaveCancelled, t;
3661
3661
  }
3662
- function Wt(s) {
3662
+ function zt(s) {
3663
3663
  let e, t = s.duration;
3664
3664
  return typeof t == "object" ? e = {
3665
3665
  enter: t.enter ?? -1,
@@ -3694,7 +3694,7 @@ function Hr(s, e, t, r = -1, n, i, o, a) {
3694
3694
  }, n);
3695
3695
  return;
3696
3696
  }
3697
- const l = ["animationend", "transitionend"], u = (f) => {
3697
+ const l = ["animationend", "transitionend", Ot], u = (f) => {
3698
3698
  const c = f.target || f.srcElement, h = f.currentTarget;
3699
3699
  c === h && (l.forEach((y) => {
3700
3700
  it(e, y, u);
@@ -3771,8 +3771,8 @@ function Br(s, e, t, r = {}, n, i, o, a, l) {
3771
3771
  }), u && Pe(t, u), c && Ce(t, c), x(h) && O(s, h, [t, e, o, a]);
3772
3772
  });
3773
3773
  }
3774
- function Mt(s, e = {}, t, r = -1) {
3775
- const n = e.mode ?? "default", i = Wt(e);
3774
+ function It(s, e = {}, t, r = -1) {
3775
+ const n = e.mode ?? "default", i = zt(e);
3776
3776
  return {
3777
3777
  //mode
3778
3778
  mode: n,
@@ -3791,7 +3791,7 @@ function Mt(s, e = {}, t, r = -1) {
3791
3791
  kr(s, !1, a, e, t, r), Br(s, !1, a, e, i.leave, l, t, r);
3792
3792
  },
3793
3793
  //clone
3794
- clone: (a) => Mt(s, e, t, r)
3794
+ clone: (a) => It(s, e, t, r)
3795
3795
  };
3796
3796
  }
3797
3797
  function Vr(s) {
@@ -3802,7 +3802,7 @@ function sn(s, e, t = {}, r, n, i, o) {
3802
3802
  const a = Vr(e);
3803
3803
  if (a == null)
3804
3804
  return;
3805
- const l = Wt(t);
3805
+ const l = zt(t);
3806
3806
  Dr(s, !0, a, t, r, n), Ur(s, !0, a, t, l.show, r, n, (u) => {
3807
3807
  x(o) && O(s, o, [u]);
3808
3808
  });
@@ -3814,7 +3814,7 @@ function nn(s, e, t = {}, r, n, i, o) {
3814
3814
  const a = Vr(e);
3815
3815
  if (a == null)
3816
3816
  return;
3817
- const l = Wt(t);
3817
+ const l = zt(t);
3818
3818
  kr(s, !0, a, t, r, n), Br(s, !0, a, t, l.hide, null, r, n, (u) => {
3819
3819
  x(o) && O(s, o, [u]);
3820
3820
  });
@@ -3846,9 +3846,9 @@ function Wr(s, e = {}, t, r = -1) {
3846
3846
  ke(gs, {}, o), ht(() => {
3847
3847
  const l = (u) => {
3848
3848
  const f = u.target || u.srcElement, c = u.currentTarget;
3849
- f === c && (it(o, er, l), a && Reflect.apply(a, s, []));
3849
+ f === c && (it(o, Ot, l), a && Reflect.apply(a, s, []));
3850
3850
  };
3851
- nt(o, er, l), ke(ws, {}, o);
3851
+ nt(o, Ot, l), ke(ws, {}, o);
3852
3852
  });
3853
3853
  },
3854
3854
  //clone
@@ -3883,7 +3883,7 @@ class ln {
3883
3883
  this.node = e, this.state = t;
3884
3884
  }
3885
3885
  }
3886
- const It = xr({
3886
+ const Nt = xr({
3887
3887
  //名称
3888
3888
  name: "RouterView",
3889
3889
  //继承特性
@@ -4096,7 +4096,7 @@ const It = xr({
4096
4096
  },
4097
4097
  //setup
4098
4098
  setup(s, e) {
4099
- const t = Nt();
4099
+ const t = Ht();
4100
4100
  if (t === null || t.proxy === null) {
4101
4101
  console.error("instance or instance.proxy not exist");
4102
4102
  return;
@@ -4117,7 +4117,7 @@ const It = xr({
4117
4117
  return;
4118
4118
  }
4119
4119
  const c = s.name, h = Q(or, null), y = Q(xt, 0);
4120
- if (l = n[Fr](c, i, o, a, h, y), l === null)
4120
+ if (l = n[Ar](c, i, o, a, h, y), l === null)
4121
4121
  return;
4122
4122
  se(or, l);
4123
4123
  const d = l[G] === !0;
@@ -4137,8 +4137,8 @@ const It = xr({
4137
4137
  const c = /* @__PURE__ */ new Map(), h = [], y = l?.slots.value, d = [];
4138
4138
  for (let v = 0; v < y.length; v++) {
4139
4139
  const g = y[v], _ = `${s.name}_${g.index}`, b = oe(s.transition, g.route, v) ?? !0, T = { modelSlot: g };
4140
- let A;
4141
- e.slots.default ? A = he(It, T, { default: e.slots.default }) : A = he(It, T);
4140
+ let F;
4141
+ e.slots.default ? F = he(Nt, T, { default: e.slots.default }) : F = he(Nt, T);
4142
4142
  const P = {}, E = oe(s.viewClass, g.route, v);
4143
4143
  typeof E == "string" && E.length > 0 && (P[E] = !0);
4144
4144
  const W = oe(s.viewActiveClass, g.route, v), M = oe(s.viewInactiveClass, g.route, v), I = f.value.get(_);
@@ -4146,14 +4146,14 @@ const It = xr({
4146
4146
  const D = I.node;
4147
4147
  g.active ? d.unshift(() => {
4148
4148
  const dt = () => {
4149
- let Ae = rr(D);
4150
- Ae != null && sr(Ae, Ot.ACTIVATED);
4149
+ let Fe = rr(D);
4150
+ Fe != null && sr(Fe, Mt.ACTIVATED);
4151
4151
  };
4152
4152
  sn(t, D, s, g.route, v, b, dt);
4153
4153
  }) : d.push(() => {
4154
4154
  const dt = () => {
4155
- const Ae = rr(D);
4156
- Ae != null && sr(Ae, Ot.DEACTIVATED);
4155
+ const Fe = rr(D);
4156
+ Fe != null && sr(Fe, Mt.DEACTIVATED);
4157
4157
  };
4158
4158
  nn(t, D, s, g.route, v, b, dt);
4159
4159
  });
@@ -4170,9 +4170,9 @@ const It = xr({
4170
4170
  const D = be(g.route.viewTagAttrs, n?.propsFilter);
4171
4171
  $(!0, Y, D);
4172
4172
  }
4173
- const re = oe(s.viewTag, g.route, v), De = he(re, Y, { default: () => [A] });
4173
+ const re = oe(s.viewTag, g.route, v), De = he(re, Y, { default: () => [F] });
4174
4174
  if (c.set(_, new ln(De, g.active)), f.value.delete(_), b === !0) {
4175
- const D = Mt(t, s, g.route, v);
4175
+ const D = It(t, s, g.route, v);
4176
4176
  De.transition = D;
4177
4177
  } else if (b === "custom") {
4178
4178
  const D = Wr(t, s, g.route, v);
@@ -4199,7 +4199,7 @@ const It = xr({
4199
4199
  } else {
4200
4200
  const c = l.slots.value;
4201
4201
  if (c.length > 0) {
4202
- const h = c[0], y = h.route ?? (t.proxy && Bt(t.proxy)) ?? null, d = h.model, m = {};
4202
+ const h = c[0], y = h.route ?? (t.proxy && Vt(t.proxy)) ?? null, d = h.model, m = {};
4203
4203
  if (d.props) {
4204
4204
  if (typeof d.props == "object") {
4205
4205
  const g = be(d.props, n?.propsFilter);
@@ -4211,7 +4211,7 @@ const It = xr({
4211
4211
  }
4212
4212
  const p = he(d.component, m);
4213
4213
  if (oe(s.transition, y, -1) ?? !0) {
4214
- const g = Mt(t, s, y, -1);
4214
+ const g = It(t, s, y, -1);
4215
4215
  p.transition = g;
4216
4216
  }
4217
4217
  return Lt(e.slots.default, { Component: p, route: y }) ?? p;
@@ -4917,7 +4917,7 @@ class dn {
4917
4917
  }
4918
4918
  const Jr = Symbol("fk"), Gr = Symbol("fbk"), Qr = Symbol("fepk");
4919
4919
  function _n(s = {}) {
4920
- const e = new ks(s), t = new Xt(), r = new tr(), n = new wr(), i = {
4920
+ const e = new ks(s), t = new Yt(), r = new tr(), n = new wr(), i = {
4921
4921
  /**
4922
4922
  * 返回router
4923
4923
  */
@@ -4934,7 +4934,7 @@ function _n(s = {}) {
4934
4934
  * 返回Bus类型
4935
4935
  */
4936
4936
  get Bus() {
4937
- return Xt;
4937
+ return Yt;
4938
4938
  },
4939
4939
  /**
4940
4940
  * 返回全局event proxy
@@ -4976,7 +4976,7 @@ function _n(s = {}) {
4976
4976
  * 返回clone
4977
4977
  */
4978
4978
  get clone() {
4979
- return Dt;
4979
+ return Ut;
4980
4980
  },
4981
4981
  /**
4982
4982
  * 判断是否为es模块
@@ -4988,7 +4988,7 @@ function _n(s = {}) {
4988
4988
  * 安装
4989
4989
  */
4990
4990
  install(o) {
4991
- o.provide(ct, e), o.provide(Jr, i), o.provide(Gr, t), o.provide(Qr, r), o.component(Bs, It), o.component(Vs, cn), Reflect.defineProperty(o.config.globalProperties, "$fox", {
4991
+ o.provide(ct, e), o.provide(Jr, i), o.provide(Gr, t), o.provide(Qr, r), o.component(Bs, Nt), o.component(Vs, cn), Reflect.defineProperty(o.config.globalProperties, "$fox", {
4992
4992
  get() {
4993
4993
  return i;
4994
4994
  }
@@ -5028,7 +5028,7 @@ function _n(s = {}) {
5028
5028
  computed: {
5029
5029
  //获取当前route
5030
5030
  $route() {
5031
- return Bt(this);
5031
+ return Vt(this);
5032
5032
  }
5033
5033
  }
5034
5034
  }), e.init();
@@ -5040,7 +5040,7 @@ function Xr(s) {
5040
5040
  return s ? s.$router : Q(ct);
5041
5041
  }
5042
5042
  function Tn(s) {
5043
- return s || (s = Nt()?.proxy ?? void 0), s ? Bt(s) : null;
5043
+ return s || (s = Ht()?.proxy ?? void 0), s ? Vt(s) : null;
5044
5044
  }
5045
5045
  function Kn(s) {
5046
5046
  return s ? s.$fox : Q(Jr);
@@ -5078,21 +5078,21 @@ function Ln(s) {
5078
5078
  });
5079
5079
  }
5080
5080
  export {
5081
- Xt as Bus,
5081
+ Yt as Bus,
5082
5082
  lt as EventChain,
5083
5083
  tr as EventProxy,
5084
- er as FoxAfterLeave,
5085
5084
  ms as FoxBeforeEnter,
5086
5085
  gs as FoxBeforeLeave,
5087
5086
  vs as FoxEnter,
5088
5087
  ws as FoxLeave,
5088
+ Ot as FoxLeaveEnd,
5089
5089
  q as OperationType,
5090
5090
  S as Route,
5091
- Dt as clone,
5091
+ Ut as clone,
5092
5092
  _n as createFox,
5093
5093
  Hs as createMemoryHistory,
5094
5094
  Is as createWebHashHistory,
5095
- Fn as createWebHistory,
5095
+ An as createWebHistory,
5096
5096
  En as deleteContextValue,
5097
5097
  $ as extend,
5098
5098
  Gr as foxBusKey,
@@ -5102,7 +5102,7 @@ export {
5102
5102
  mn as isArray,
5103
5103
  wn as isDate,
5104
5104
  Rr as isESModule,
5105
- Jt as isEqual,
5105
+ Gt as isEqual,
5106
5106
  x as isFunction,
5107
5107
  vn as isMap,
5108
5108
  ts as isNil,
@@ -5115,13 +5115,13 @@ export {
5115
5115
  Ln as onAfterRouteUpdate,
5116
5116
  jn as onBeforeRouteUpdate,
5117
5117
  Cn as onFoxActivated,
5118
- An as onFoxInactivated,
5118
+ Fn as onFoxInactivated,
5119
5119
  Pn as provideContextValue,
5120
5120
  ae as sessionKey,
5121
5121
  Sr as toBoolean,
5122
5122
  Sn as toNumber,
5123
- Ht as toTypeString,
5124
- zt as typeOf,
5123
+ Dt as toTypeString,
5124
+ Jt as typeOf,
5125
5125
  $n as useBus,
5126
5126
  qn as useEventProxy,
5127
5127
  Kn as useFox,