qlfy-ecological-login 1.0.6 → 1.0.7

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/lib/index.mjs CHANGED
@@ -1,11 +1,11 @@
1
- import { getCurrentInstance as de, inject as le, ref as A, computed as O, unref as w, readonly as gr, getCurrentScope as hr, onScopeDispose as yr, onMounted as pn, nextTick as Me, watch as ee, isRef as mn, warn as br, provide as wr, defineComponent as I, createElementBlock as J, openBlock as R, mergeProps as gn, renderSlot as Oe, createElementVNode as W, normalizeClass as K, createVNode as B, Transition as gt, withCtx as D, withDirectives as ht, normalizeStyle as hn, createTextVNode as at, toDisplayString as yn, vShow as yt, reactive as bt, h as ye, createApp as vr, toRefs as _r, shallowReactive as Sr, createBlock as Q, createCommentVNode as Se, resolveDynamicComponent as Er, Fragment as Cr, withModifiers as Or, isVNode as bn, render as At, resolveComponent as be, onBeforeUnmount as xr } from "vue";
2
- const wn = Symbol(), Ie = "el", Tr = "is-", Z = (e, t, n, r, o) => {
1
+ import { getCurrentInstance as de, inject as le, ref as A, computed as O, unref as v, readonly as gr, getCurrentScope as hr, onScopeDispose as yr, onMounted as pn, nextTick as Me, watch as ee, isRef as mn, warn as br, provide as vr, defineComponent as k, createElementBlock as J, openBlock as R, mergeProps as gn, renderSlot as Oe, createElementVNode as W, normalizeClass as K, createVNode as B, Transition as gt, withCtx as D, withDirectives as ht, normalizeStyle as hn, createTextVNode as at, toDisplayString as yn, vShow as yt, reactive as bt, h as ye, createApp as wr, toRefs as _r, shallowReactive as Sr, createBlock as Q, createCommentVNode as Se, resolveDynamicComponent as Er, Fragment as Cr, withModifiers as Or, isVNode as bn, render as At, resolveComponent as be, onBeforeUnmount as xr } from "vue";
2
+ const vn = Symbol(), ke = "el", Tr = "is-", Z = (e, t, n, r, o) => {
3
3
  let s = `${e}-${t}`;
4
4
  return n && (s += `-${n}`), r && (s += `__${r}`), o && (s += `--${o}`), s;
5
- }, vn = Symbol("namespaceContextKey"), Rr = (e) => {
6
- const t = e || (de() ? le(vn, A(Ie)) : A(Ie));
7
- return O(() => w(t) || Ie);
8
- }, wt = (e, t) => {
5
+ }, wn = Symbol("namespaceContextKey"), Rr = (e) => {
6
+ const t = e || (de() ? le(wn, A(ke)) : A(ke));
7
+ return O(() => v(t) || ke);
8
+ }, vt = (e, t) => {
9
9
  const n = Rr(t);
10
10
  return {
11
11
  namespace: n,
@@ -15,22 +15,22 @@ const wn = Symbol(), Ie = "el", Tr = "is-", Z = (e, t, n, r, o) => {
15
15
  be: (p, m) => p && m ? Z(n.value, e, p, m, "") : "",
16
16
  em: (p, m) => p && m ? Z(n.value, e, "", p, m) : "",
17
17
  bm: (p, m) => p && m ? Z(n.value, e, p, "", m) : "",
18
- bem: (p, m, v) => p && m && v ? Z(n.value, e, p, m, v) : "",
18
+ bem: (p, m, w) => p && m && w ? Z(n.value, e, p, m, w) : "",
19
19
  is: (p, ...m) => {
20
- const v = m.length >= 1 ? m[0] : !0;
21
- return p && v ? `${Tr}${p}` : "";
20
+ const w = m.length >= 1 ? m[0] : !0;
21
+ return p && w ? `${Tr}${p}` : "";
22
22
  },
23
23
  cssVar: (p) => {
24
24
  const m = {};
25
- for (const v in p)
26
- p[v] && (m[`--${n.value}-${v}`] = p[v]);
25
+ for (const w in p)
26
+ p[w] && (m[`--${n.value}-${w}`] = p[w]);
27
27
  return m;
28
28
  },
29
29
  cssVarName: (p) => `--${n.value}-${p}`,
30
30
  cssVarBlock: (p) => {
31
31
  const m = {};
32
- for (const v in p)
33
- p[v] && (m[`--${n.value}-${e}-${v}`] = p[v]);
32
+ for (const w in p)
33
+ p[w] && (m[`--${n.value}-${e}-${w}`] = p[w]);
34
34
  return m;
35
35
  },
36
36
  cssVarBlockName: (p) => `--${n.value}-${e}-${p}`
@@ -48,27 +48,27 @@ const Pr = Object.prototype.hasOwnProperty, Nt = (e, t) => Pr.call(e, t), De = (
48
48
  return (n) => t[n] || (t[n] = e(n));
49
49
  }, Ar = /-(\w)/g, Nr = _n(
50
50
  (e) => e.replace(Ar, (t, n) => n ? n.toUpperCase() : "")
51
- ), Ir = /\B([A-Z])/g, kr = _n(
52
- (e) => e.replace(Ir, "-$1").toLowerCase()
51
+ ), kr = /\B([A-Z])/g, Ir = _n(
52
+ (e) => e.replace(kr, "-$1").toLowerCase()
53
53
  );
54
- var $r = typeof global == "object" && global && global.Object === Object && global, Lr = typeof self == "object" && self && self.Object === Object && self, vt = $r || Lr || Function("return this")(), fe = vt.Symbol, Sn = Object.prototype, Br = Sn.hasOwnProperty, Dr = Sn.toString, we = fe ? fe.toStringTag : void 0;
54
+ var $r = typeof global == "object" && global && global.Object === Object && global, Lr = typeof self == "object" && self && self.Object === Object && self, wt = $r || Lr || Function("return this")(), fe = wt.Symbol, Sn = Object.prototype, Br = Sn.hasOwnProperty, Dr = Sn.toString, ve = fe ? fe.toStringTag : void 0;
55
55
  function Fr(e) {
56
- var t = Br.call(e, we), n = e[we];
56
+ var t = Br.call(e, ve), n = e[ve];
57
57
  try {
58
- e[we] = void 0;
58
+ e[ve] = void 0;
59
59
  var r = !0;
60
60
  } catch {
61
61
  }
62
62
  var o = Dr.call(e);
63
- return r && (t ? e[we] = n : delete e[we]), o;
63
+ return r && (t ? e[ve] = n : delete e[ve]), o;
64
64
  }
65
65
  var jr = Object.prototype, Ur = jr.toString;
66
66
  function zr(e) {
67
67
  return Ur.call(e);
68
68
  }
69
- var Mr = "[object Null]", qr = "[object Undefined]", It = fe ? fe.toStringTag : void 0;
69
+ var Mr = "[object Null]", qr = "[object Undefined]", kt = fe ? fe.toStringTag : void 0;
70
70
  function En(e) {
71
- return e == null ? e === void 0 ? qr : Mr : It && It in Object(e) ? Fr(e) : zr(e);
71
+ return e == null ? e === void 0 ? qr : Mr : kt && kt in Object(e) ? Fr(e) : zr(e);
72
72
  }
73
73
  function Vr(e) {
74
74
  return e != null && typeof e == "object";
@@ -82,7 +82,7 @@ function Jr(e, t) {
82
82
  o[n] = t(e[n], n, e);
83
83
  return o;
84
84
  }
85
- var St = Array.isArray, kt = fe ? fe.prototype : void 0, $t = kt ? kt.toString : void 0;
85
+ var St = Array.isArray, It = fe ? fe.prototype : void 0, $t = It ? It.toString : void 0;
86
86
  function Cn(e) {
87
87
  if (typeof e == "string")
88
88
  return e;
@@ -104,7 +104,7 @@ function Xr(e) {
104
104
  var t = En(e);
105
105
  return t == Wr || t == Gr || t == Kr || t == Zr;
106
106
  }
107
- var tt = vt["__core-js_shared__"], Lt = function() {
107
+ var tt = wt["__core-js_shared__"], Lt = function() {
108
108
  var e = /[^.]+$/.exec(tt && tt.keys && tt.keys.IE_PROTO || "");
109
109
  return e ? "Symbol(src)_1." + e : "";
110
110
  }();
@@ -159,14 +159,14 @@ function yo(e) {
159
159
  var t = this.has(e) && delete this.__data__[e];
160
160
  return this.size -= t ? 1 : 0, t;
161
161
  }
162
- var bo = "__lodash_hash_undefined__", wo = Object.prototype, vo = wo.hasOwnProperty;
162
+ var bo = "__lodash_hash_undefined__", vo = Object.prototype, wo = vo.hasOwnProperty;
163
163
  function _o(e) {
164
164
  var t = this.__data__;
165
165
  if (xe) {
166
166
  var n = t[e];
167
167
  return n === bo ? void 0 : n;
168
168
  }
169
- return vo.call(t, e) ? t[e] : void 0;
169
+ return wo.call(t, e) ? t[e] : void 0;
170
170
  }
171
171
  var So = Object.prototype, Eo = So.hasOwnProperty;
172
172
  function Co(e) {
@@ -211,10 +211,10 @@ function No(e) {
211
211
  var t = this.__data__, n = Ve(t, e);
212
212
  return n < 0 ? void 0 : t[n][1];
213
213
  }
214
- function Io(e) {
214
+ function ko(e) {
215
215
  return Ve(this.__data__, e) > -1;
216
216
  }
217
- function ko(e, t) {
217
+ function Io(e, t) {
218
218
  var n = this.__data__, r = Ve(n, e);
219
219
  return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this;
220
220
  }
@@ -228,9 +228,9 @@ function me(e) {
228
228
  me.prototype.clear = To;
229
229
  me.prototype.delete = Ao;
230
230
  me.prototype.get = No;
231
- me.prototype.has = Io;
232
- me.prototype.set = ko;
233
- var $o = xn(vt, "Map");
231
+ me.prototype.has = ko;
232
+ me.prototype.set = Io;
233
+ var $o = xn(wt, "Map");
234
234
  function Lo() {
235
235
  this.size = 0, this.__data__ = {
236
236
  hash: new re(),
@@ -334,7 +334,7 @@ const G = typeof window < "u", ns = (e) => typeof e == "string", rs = () => {
334
334
  };
335
335
  G && ((Bt = window == null ? void 0 : window.navigator) != null && Bt.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
336
336
  function Ct(e) {
337
- return typeof e == "function" ? e() : w(e);
337
+ return typeof e == "function" ? e() : v(e);
338
338
  }
339
339
  function os(e) {
340
340
  return e;
@@ -471,9 +471,9 @@ function Je(e, t) {
471
471
  }
472
472
  const qt = {
473
473
  current: 0
474
- }, Vt = A(0), Pn = 2e3, Ht = Symbol("elZIndexContextKey"), An = Symbol("zIndexContextKey"), ws = (e) => {
474
+ }, Vt = A(0), Pn = 2e3, Ht = Symbol("elZIndexContextKey"), An = Symbol("zIndexContextKey"), vs = (e) => {
475
475
  const t = de() ? le(Ht, qt) : qt, n = e || (de() ? le(An, void 0) : void 0), r = O(() => {
476
- const a = w(n);
476
+ const a = v(n);
477
477
  return oe(a) ? a : Pn;
478
478
  }), o = O(() => r.value + Vt.value), s = () => (t.current++, Vt.value = t.current, o.value);
479
479
  return !G && !le(Ht) && Je("ZIndexInjection", `Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed
@@ -483,7 +483,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`), {
483
483
  nextZIndex: s
484
484
  };
485
485
  };
486
- var vs = {
486
+ var ws = {
487
487
  name: "en",
488
488
  el: {
489
489
  breadcrumb: {
@@ -662,11 +662,11 @@ var vs = {
662
662
  }
663
663
  }
664
664
  };
665
- const _s = (e) => (t, n) => Ss(t, n, w(e)), Ss = (e, t, n) => Xo(n, e, e).replace(/\{(\w+)\}/g, (r, o) => {
665
+ const _s = (e) => (t, n) => Ss(t, n, v(e)), Ss = (e, t, n) => Xo(n, e, e).replace(/\{(\w+)\}/g, (r, o) => {
666
666
  var s;
667
667
  return `${(s = t == null ? void 0 : t[o]) != null ? s : `{${o}}`}`;
668
668
  }), Es = (e) => {
669
- const t = O(() => w(e).name), n = mn(e) ? e : A(e);
669
+ const t = O(() => v(e).name), n = mn(e) ? e : A(e);
670
670
  return {
671
671
  lang: t,
672
672
  locale: n,
@@ -674,8 +674,8 @@ const _s = (e) => (t, n) => Ss(t, n, w(e)), Ss = (e, t, n) => Xo(n, e, e).replac
674
674
  };
675
675
  }, Nn = Symbol("localeContextKey"), Cs = (e) => {
676
676
  const t = e || le(Nn, A());
677
- return Es(O(() => t.value || vs));
678
- }, In = "__epPropKey", z = (e) => e, Os = (e) => qe(e) && !!e[In], kn = (e, t) => {
677
+ return Es(O(() => t.value || ws));
678
+ }, kn = "__epPropKey", z = (e) => e, Os = (e) => qe(e) && !!e[kn], In = (e, t) => {
679
679
  if (!qe(e) || Os(e))
680
680
  return e;
681
681
  const { values: n, required: r, default: o, type: s, validator: a } = e, f = {
@@ -689,13 +689,13 @@ const _s = (e) => (t, n) => Ss(t, n, w(e)), Ss = (e, t, n) => Xo(n, e, e).replac
689
689
  }
690
690
  return c;
691
691
  } : void 0,
692
- [In]: !0
692
+ [kn]: !0
693
693
  };
694
694
  return Nt(e, "default") && (f.default = o), f;
695
695
  }, Re = (e) => Qo(Object.entries(e).map(([t, n]) => [
696
696
  t,
697
- kn(n, t)
698
- ])), xs = ["", "default", "small", "large"], Ts = kn({
697
+ In(n, t)
698
+ ])), xs = ["", "default", "small", "large"], Ts = In({
699
699
  type: String,
700
700
  values: xs,
701
701
  required: !1
@@ -708,23 +708,23 @@ const _s = (e) => (t, n) => Ss(t, n, w(e)), Ss = (e, t, n) => Xo(n, e, e).replac
708
708
  }
709
709
  }), Jt = (e) => Object.keys(e), Fe = A();
710
710
  function $n(e, t = void 0) {
711
- return de() ? le(wn, Fe) : Fe;
711
+ return de() ? le(vn, Fe) : Fe;
712
712
  }
713
713
  function Ln(e, t) {
714
- const n = $n(), r = wt(e, O(() => {
714
+ const n = $n(), r = vt(e, O(() => {
715
715
  var i;
716
- return ((i = n.value) == null ? void 0 : i.namespace) || Ie;
716
+ return ((i = n.value) == null ? void 0 : i.namespace) || ke;
717
717
  })), o = Cs(O(() => {
718
718
  var i;
719
719
  return (i = n.value) == null ? void 0 : i.locale;
720
- })), s = ws(O(() => {
720
+ })), s = vs(O(() => {
721
721
  var i;
722
722
  return ((i = n.value) == null ? void 0 : i.zIndex) || Pn;
723
723
  })), a = O(() => {
724
724
  var i;
725
- return w(t) || ((i = n.value) == null ? void 0 : i.size) || "";
725
+ return v(t) || ((i = n.value) == null ? void 0 : i.size) || "";
726
726
  });
727
- return Bn(O(() => w(n) || {})), {
727
+ return Bn(O(() => v(n) || {})), {
728
728
  ns: r,
729
729
  locale: o,
730
730
  zIndex: s,
@@ -733,16 +733,16 @@ function Ln(e, t) {
733
733
  }
734
734
  const Bn = (e, t, n = !1) => {
735
735
  var r;
736
- const o = !!de(), s = o ? $n() : void 0, a = (r = void 0) != null ? r : o ? wr : void 0;
736
+ const o = !!de(), s = o ? $n() : void 0, a = (r = void 0) != null ? r : o ? vr : void 0;
737
737
  if (!a) {
738
738
  Je("provideGlobalConfig", "provideGlobalConfig() can only be used inside setup().");
739
739
  return;
740
740
  }
741
741
  const i = O(() => {
742
- const f = w(e);
742
+ const f = v(e);
743
743
  return s != null && s.value ? Ns(s.value, f) : f;
744
744
  });
745
- return a(wn, i), a(Nn, O(() => i.value.locale)), a(vn, O(() => i.value.namespace)), a(An, O(() => i.value.zIndex)), a(Rs, {
745
+ return a(vn, i), a(Nn, O(() => i.value.locale)), a(wn, O(() => i.value.namespace)), a(An, O(() => i.value.zIndex)), a(Rs, {
746
746
  size: O(() => i.value.size || "")
747
747
  }), a(Ps, O(() => ({
748
748
  emptyValues: i.value.emptyValues,
@@ -760,11 +760,11 @@ var xt = (e, t) => {
760
760
  n[r] = o;
761
761
  return n;
762
762
  };
763
- const Is = "utils/dom/style", Dn = (e = "") => e.split(" ").filter((t) => !!t.trim()), Kt = (e, t) => {
763
+ const ks = "utils/dom/style", Dn = (e = "") => e.split(" ").filter((t) => !!t.trim()), Kt = (e, t) => {
764
764
  !e || !t.trim() || e.classList.add(...Dn(t));
765
765
  }, je = (e, t) => {
766
766
  !e || !t.trim() || e.classList.remove(...Dn(t));
767
- }, ve = (e, t) => {
767
+ }, we = (e, t) => {
768
768
  var n;
769
769
  if (!G || !e || !t)
770
770
  return "";
@@ -787,12 +787,12 @@ function it(e, t = "px") {
787
787
  return `${e}${t}`;
788
788
  if (ne(e))
789
789
  return e;
790
- Je(Is, "binding value must be a string or number");
790
+ Je(ks, "binding value must be a string or number");
791
791
  }
792
792
  const Fn = (e, t) => (e.install = (n) => {
793
793
  for (const r of [e, ...Object.values({})])
794
794
  n.component(r.name, r);
795
- }, e), ks = (e, t) => (e.install = (n) => {
795
+ }, e), Is = (e, t) => (e.install = (n) => {
796
796
  e._context = n._context, n.config.globalProperties[t] = e;
797
797
  }, e), $s = Re({
798
798
  size: {
@@ -801,14 +801,14 @@ const Fn = (e, t) => (e.install = (n) => {
801
801
  color: {
802
802
  type: String
803
803
  }
804
- }), Ls = I({
804
+ }), Ls = k({
805
805
  name: "ElIcon",
806
806
  inheritAttrs: !1
807
- }), Bs = /* @__PURE__ */ I({
807
+ }), Bs = /* @__PURE__ */ k({
808
808
  ...Ls,
809
809
  props: $s,
810
810
  setup(e) {
811
- const t = e, n = wt("icon"), r = O(() => {
811
+ const t = e, n = vt("icon"), r = O(() => {
812
812
  const { size: o, color: s } = t;
813
813
  return !o && !s ? {} : {
814
814
  fontSize: Yo(o) ? void 0 : it(o),
@@ -816,8 +816,8 @@ const Fn = (e, t) => (e.install = (n) => {
816
816
  };
817
817
  });
818
818
  return (o, s) => (R(), J("i", gn({
819
- class: w(n).b(),
820
- style: w(r)
819
+ class: v(n).b(),
820
+ style: v(r)
821
821
  }, o.$attrs), [
822
822
  Oe(o.$slots, "default")
823
823
  ], 16));
@@ -826,7 +826,7 @@ const Fn = (e, t) => (e.install = (n) => {
826
826
  var Ds = /* @__PURE__ */ xt(Bs, [["__file", "icon.vue"]]);
827
827
  const Wt = Fn(Ds);
828
828
  /*! Element Plus Icons Vue v2.3.1 */
829
- var Fs = /* @__PURE__ */ I({
829
+ var Fs = /* @__PURE__ */ k({
830
830
  name: "CircleCloseFilled",
831
831
  __name: "circle-close-filled",
832
832
  setup(e) {
@@ -840,7 +840,7 @@ var Fs = /* @__PURE__ */ I({
840
840
  })
841
841
  ]));
842
842
  }
843
- }), js = Fs, Us = /* @__PURE__ */ I({
843
+ }), js = Fs, Us = /* @__PURE__ */ k({
844
844
  name: "Close",
845
845
  __name: "close",
846
846
  setup(e) {
@@ -854,7 +854,7 @@ var Fs = /* @__PURE__ */ I({
854
854
  })
855
855
  ]));
856
856
  }
857
- }), zs = Us, Ms = /* @__PURE__ */ I({
857
+ }), zs = Us, Ms = /* @__PURE__ */ k({
858
858
  name: "InfoFilled",
859
859
  __name: "info-filled",
860
860
  setup(e) {
@@ -868,7 +868,7 @@ var Fs = /* @__PURE__ */ I({
868
868
  })
869
869
  ]));
870
870
  }
871
- }), Gt = Ms, qs = /* @__PURE__ */ I({
871
+ }), Gt = Ms, qs = /* @__PURE__ */ k({
872
872
  name: "SuccessFilled",
873
873
  __name: "success-filled",
874
874
  setup(e) {
@@ -882,7 +882,7 @@ var Fs = /* @__PURE__ */ I({
882
882
  })
883
883
  ]));
884
884
  }
885
- }), Vs = qs, Hs = /* @__PURE__ */ I({
885
+ }), Vs = qs, Hs = /* @__PURE__ */ k({
886
886
  name: "WarningFilled",
887
887
  __name: "warning-filled",
888
888
  setup(e) {
@@ -942,13 +942,13 @@ const Ks = z([
942
942
  badgeClass: {
943
943
  type: String
944
944
  }
945
- }), Qs = I({
945
+ }), Qs = k({
946
946
  name: "ElBadge"
947
- }), Ys = /* @__PURE__ */ I({
947
+ }), Ys = /* @__PURE__ */ k({
948
948
  ...Qs,
949
949
  props: Xs,
950
950
  setup(e, { expose: t }) {
951
- const n = e, r = wt("badge"), o = O(() => n.isDot ? "" : oe(n.value) && oe(n.max) ? n.max < n.value ? `${n.max}+` : `${n.value}` : `${n.value}`), s = O(() => {
951
+ const n = e, r = vt("badge"), o = O(() => n.isDot ? "" : oe(n.value) && oe(n.max) ? n.max < n.value ? `${n.max}+` : `${n.value}` : `${n.value}`), s = O(() => {
952
952
  var a, i, f, u, c;
953
953
  return [
954
954
  {
@@ -962,30 +962,30 @@ const Ks = z([
962
962
  return t({
963
963
  content: o
964
964
  }), (a, i) => (R(), J("div", {
965
- class: K(w(r).b())
965
+ class: K(v(r).b())
966
966
  }, [
967
967
  Oe(a.$slots, "default"),
968
968
  B(gt, {
969
- name: `${w(r).namespace.value}-zoom-in-center`,
969
+ name: `${v(r).namespace.value}-zoom-in-center`,
970
970
  persisted: ""
971
971
  }, {
972
972
  default: D(() => [
973
973
  ht(W("sup", {
974
974
  class: K([
975
- w(r).e("content"),
976
- w(r).em("content", a.type),
977
- w(r).is("fixed", !!a.$slots.default),
978
- w(r).is("dot", a.isDot),
979
- w(r).is("hide-zero", !a.showZero && n.value === 0),
975
+ v(r).e("content"),
976
+ v(r).em("content", a.type),
977
+ v(r).is("fixed", !!a.$slots.default),
978
+ v(r).is("dot", a.isDot),
979
+ v(r).is("hide-zero", !a.showZero && n.value === 0),
980
980
  a.badgeClass
981
981
  ]),
982
- style: hn(w(s))
982
+ style: hn(v(s))
983
983
  }, [
984
- Oe(a.$slots, "content", { value: w(o) }, () => [
985
- at(yn(w(o)), 1)
984
+ Oe(a.$slots, "content", { value: v(o) }, () => [
985
+ at(yn(v(o)), 1)
986
986
  ])
987
987
  ], 6), [
988
- [yt, !a.hidden && (w(o) || a.isDot || a.$slots.content)]
988
+ [yt, !a.hidden && (v(o) || a.isDot || a.$slots.content)]
989
989
  ])
990
990
  ]),
991
991
  _: 3
@@ -1026,7 +1026,7 @@ const ta = Fn(ea), na = Re({
1026
1026
  },
1027
1027
  ...As
1028
1028
  }), L = {};
1029
- I({
1029
+ k({
1030
1030
  name: "ElConfigProvider",
1031
1031
  props: na,
1032
1032
  setup(e, { slots: t }) {
@@ -1070,7 +1070,7 @@ function ra(e, t) {
1070
1070
  const h = o.parent;
1071
1071
  r.value = !1, h.vLoadingAddClassList = void 0, a();
1072
1072
  }
1073
- const c = I({
1073
+ const c = k({
1074
1074
  name: "ElLoading",
1075
1075
  setup(h, { expose: g }) {
1076
1076
  const { ns: p, zIndex: m } = Ln("loading");
@@ -1078,10 +1078,10 @@ function ra(e, t) {
1078
1078
  ns: p,
1079
1079
  zIndex: m
1080
1080
  }), () => {
1081
- const v = o.spinner || o.svg, b = ye("svg", {
1081
+ const w = o.spinner || o.svg, b = ye("svg", {
1082
1082
  class: "circular",
1083
1083
  viewBox: o.svgViewBox ? o.svgViewBox : "0 0 50 50",
1084
- ...v ? { innerHTML: v } : {}
1084
+ ...w ? { innerHTML: w } : {}
1085
1085
  }, [
1086
1086
  ye("circle", {
1087
1087
  class: "path",
@@ -1114,7 +1114,7 @@ function ra(e, t) {
1114
1114
  });
1115
1115
  };
1116
1116
  }
1117
- }), d = vr(c);
1117
+ }), d = wr(c);
1118
1118
  Object.assign(d._context, t ?? {});
1119
1119
  const y = d.mount(document.createElement("div"));
1120
1120
  return {
@@ -1167,17 +1167,17 @@ const ce = function(e = {}) {
1167
1167
  }, sa = async (e, t, n) => {
1168
1168
  const { nextZIndex: r } = n.vm.zIndex || n.vm._.exposed.zIndex, o = {};
1169
1169
  if (e.fullscreen)
1170
- n.originalPosition.value = ve(document.body, "position"), n.originalOverflow.value = ve(document.body, "overflow"), o.zIndex = r();
1170
+ n.originalPosition.value = we(document.body, "position"), n.originalOverflow.value = we(document.body, "overflow"), o.zIndex = r();
1171
1171
  else if (e.parent === document.body) {
1172
- n.originalPosition.value = ve(document.body, "position"), await Me();
1172
+ n.originalPosition.value = we(document.body, "position"), await Me();
1173
1173
  for (const s of ["top", "left"]) {
1174
1174
  const a = s === "top" ? "scrollTop" : "scrollLeft";
1175
- o[s] = `${e.target.getBoundingClientRect()[s] + document.body[a] + document.documentElement[a] - Number.parseInt(ve(document.body, `margin-${s}`), 10)}px`;
1175
+ o[s] = `${e.target.getBoundingClientRect()[s] + document.body[a] + document.documentElement[a] - Number.parseInt(we(document.body, `margin-${s}`), 10)}px`;
1176
1176
  }
1177
1177
  for (const s of ["height", "width"])
1178
1178
  o[s] = `${e.target.getBoundingClientRect()[s]}px`;
1179
1179
  } else
1180
- n.originalPosition.value = ve(t, "position");
1180
+ n.originalPosition.value = we(t, "position");
1181
1181
  for (const [s, a] of Object.entries(o))
1182
1182
  n.$el.style[s] = a;
1183
1183
  }, Xt = (e, t, n) => {
@@ -1185,7 +1185,7 @@ const ce = function(e = {}) {
1185
1185
  ["absolute", "fixed", "sticky"].includes(n.originalPosition.value) ? je(t, r.bm("parent", "relative")) : Kt(t, r.bm("parent", "relative")), e.fullscreen && e.lock ? Kt(t, r.bm("parent", "hidden")) : je(t, r.bm("parent", "hidden"));
1186
1186
  };
1187
1187
  ce._context = null;
1188
- const Ee = Symbol("ElLoading"), X = (e) => `element-loading-${kr(e)}`, Qt = (e, t) => {
1188
+ const Ee = Symbol("ElLoading"), X = (e) => `element-loading-${Ir(e)}`, Qt = (e, t) => {
1189
1189
  var n, r, o, s;
1190
1190
  const a = t.instance, i = (h) => qe(t.value) ? t.value[h] : void 0, f = (h) => {
1191
1191
  const g = ne(h) && (a == null ? void 0 : a[h]) || h;
@@ -1333,9 +1333,9 @@ const ia = {
1333
1333
  }, da = (e) => {
1334
1334
  const { prev: t } = ua(e);
1335
1335
  return t ? t.vm.exposed.bottom.value : 0;
1336
- }, fa = (e, t) => M.findIndex((r) => r.id === e) > 0 ? 16 : t, pa = I({
1336
+ }, fa = (e, t) => M.findIndex((r) => r.id === e) > 0 ? 16 : t, pa = k({
1337
1337
  name: "ElMessage"
1338
- }), ma = /* @__PURE__ */ I({
1338
+ }), ma = /* @__PURE__ */ k({
1339
1339
  ...pa,
1340
1340
  props: la,
1341
1341
  emits: ca,
@@ -1345,7 +1345,7 @@ const ia = {
1345
1345
  const g = O(() => r.type ? r.type === "error" ? "danger" : r.type : "info"), p = O(() => {
1346
1346
  const E = r.type;
1347
1347
  return { [a.bm("icon", E)]: E && Zt[E] };
1348
- }), m = O(() => r.icon || Zt[r.type] || ""), v = O(() => da(r.id)), b = O(() => fa(r.id, r.offset) + v.value), _ = O(() => y.value + b.value), T = O(() => ({
1348
+ }), m = O(() => r.icon || Zt[r.type] || ""), w = O(() => da(r.id)), b = O(() => fa(r.id, r.offset) + w.value), _ = O(() => y.value + b.value), T = O(() => ({
1349
1349
  top: `${b.value}px`,
1350
1350
  zIndex: f.value
1351
1351
  }));
@@ -1377,7 +1377,7 @@ const ia = {
1377
1377
  bottom: _,
1378
1378
  close: F
1379
1379
  }), (E, tl) => (R(), Q(gt, {
1380
- name: w(a).b("fade"),
1380
+ name: v(a).b("fade"),
1381
1381
  onBeforeEnter: (mr) => s.value = !0,
1382
1382
  onBeforeLeave: E.onClose,
1383
1383
  onAfterLeave: (mr) => E.$emit("destroy"),
@@ -1389,29 +1389,29 @@ const ia = {
1389
1389
  ref_key: "messageRef",
1390
1390
  ref: c,
1391
1391
  class: K([
1392
- w(a).b(),
1393
- { [w(a).m(E.type)]: E.type },
1394
- w(a).is("closable", E.showClose),
1395
- w(a).is("plain", E.plain),
1392
+ v(a).b(),
1393
+ { [v(a).m(E.type)]: E.type },
1394
+ v(a).is("closable", E.showClose),
1395
+ v(a).is("plain", E.plain),
1396
1396
  E.customClass
1397
1397
  ]),
1398
- style: hn(w(T)),
1398
+ style: hn(v(T)),
1399
1399
  role: "alert",
1400
1400
  onMouseenter: j,
1401
1401
  onMouseleave: C
1402
1402
  }, [
1403
- E.repeatNum > 1 ? (R(), Q(w(ta), {
1403
+ E.repeatNum > 1 ? (R(), Q(v(ta), {
1404
1404
  key: 0,
1405
1405
  value: E.repeatNum,
1406
- type: w(g),
1407
- class: K(w(a).e("badge"))
1406
+ type: v(g),
1407
+ class: K(v(a).e("badge"))
1408
1408
  }, null, 8, ["value", "type", "class"])) : Se("v-if", !0),
1409
- w(m) ? (R(), Q(w(Wt), {
1409
+ v(m) ? (R(), Q(v(Wt), {
1410
1410
  key: 1,
1411
- class: K([w(a).e("icon"), w(p)])
1411
+ class: K([v(a).e("icon"), v(p)])
1412
1412
  }, {
1413
1413
  default: D(() => [
1414
- (R(), Q(Er(w(m))))
1414
+ (R(), Q(Er(v(m))))
1415
1415
  ]),
1416
1416
  _: 1
1417
1417
  }, 8, ["class"])) : Se("v-if", !0),
@@ -1419,21 +1419,21 @@ const ia = {
1419
1419
  E.dangerouslyUseHTMLString ? (R(), J(Cr, { key: 1 }, [
1420
1420
  Se(" Caution here, message could've been compromised, never use user's input as message "),
1421
1421
  W("p", {
1422
- class: K(w(a).e("content")),
1422
+ class: K(v(a).e("content")),
1423
1423
  innerHTML: E.message
1424
1424
  }, null, 10, ["innerHTML"])
1425
1425
  ], 2112)) : (R(), J("p", {
1426
1426
  key: 0,
1427
- class: K(w(a).e("content"))
1427
+ class: K(v(a).e("content"))
1428
1428
  }, yn(E.message), 3))
1429
1429
  ]),
1430
- E.showClose ? (R(), Q(w(Wt), {
1430
+ E.showClose ? (R(), Q(v(Wt), {
1431
1431
  key: 2,
1432
- class: K(w(a).e("closeBtn")),
1432
+ class: K(v(a).e("closeBtn")),
1433
1433
  onClick: Or(F, ["stop"])
1434
1434
  }, {
1435
1435
  default: D(() => [
1436
- B(w(o))
1436
+ B(v(o))
1437
1437
  ]),
1438
1438
  _: 1
1439
1439
  }, 8, ["class", "onClick"])) : Se("v-if", !0)
@@ -1517,41 +1517,41 @@ jn.forEach((e) => {
1517
1517
  return pe({ ...r, type: e }, n);
1518
1518
  };
1519
1519
  });
1520
- function wa(e) {
1520
+ function va(e) {
1521
1521
  const t = [...M];
1522
1522
  for (const n of t)
1523
1523
  (!e || e === n.props.type) && n.handler.close();
1524
1524
  }
1525
- pe.closeAll = wa;
1525
+ pe.closeAll = va;
1526
1526
  pe._context = null;
1527
- const ke = ks(pe, "$message");
1527
+ const Ie = Is(pe, "$message");
1528
1528
  function zn(e, t) {
1529
1529
  return function() {
1530
1530
  return e.apply(t, arguments);
1531
1531
  };
1532
1532
  }
1533
- const { toString: va } = Object.prototype, { getPrototypeOf: Tt } = Object, { iterator: Ke, toStringTag: Mn } = Symbol, We = /* @__PURE__ */ ((e) => (t) => {
1534
- const n = va.call(t);
1533
+ const { toString: wa } = Object.prototype, { getPrototypeOf: Tt } = Object, { iterator: Ke, toStringTag: Mn } = Symbol, We = /* @__PURE__ */ ((e) => (t) => {
1534
+ const n = wa.call(t);
1535
1535
  return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
1536
1536
  })(/* @__PURE__ */ Object.create(null)), q = (e) => (e = e.toLowerCase(), (t) => We(t) === e), Ge = (e) => (t) => typeof t === e, { isArray: ge } = Array, Te = Ge("undefined");
1537
1537
  function _a(e) {
1538
- return e !== null && !Te(e) && e.constructor !== null && !Te(e.constructor) && k(e.constructor.isBuffer) && e.constructor.isBuffer(e);
1538
+ return e !== null && !Te(e) && e.constructor !== null && !Te(e.constructor) && I(e.constructor.isBuffer) && e.constructor.isBuffer(e);
1539
1539
  }
1540
1540
  const qn = q("ArrayBuffer");
1541
1541
  function Sa(e) {
1542
1542
  let t;
1543
1543
  return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && qn(e.buffer), t;
1544
1544
  }
1545
- const Ea = Ge("string"), k = Ge("function"), Vn = Ge("number"), Ze = (e) => e !== null && typeof e == "object", Ca = (e) => e === !0 || e === !1, $e = (e) => {
1545
+ const Ea = Ge("string"), I = Ge("function"), Vn = Ge("number"), Ze = (e) => e !== null && typeof e == "object", Ca = (e) => e === !0 || e === !1, $e = (e) => {
1546
1546
  if (We(e) !== "object")
1547
1547
  return !1;
1548
1548
  const t = Tt(e);
1549
1549
  return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Mn in e) && !(Ke in e);
1550
- }, Oa = q("Date"), xa = q("File"), Ta = q("Blob"), Ra = q("FileList"), Pa = (e) => Ze(e) && k(e.pipe), Aa = (e) => {
1550
+ }, Oa = q("Date"), xa = q("File"), Ta = q("Blob"), Ra = q("FileList"), Pa = (e) => Ze(e) && I(e.pipe), Aa = (e) => {
1551
1551
  let t;
1552
- return e && (typeof FormData == "function" && e instanceof FormData || k(e.append) && ((t = We(e)) === "formdata" || // detect form-data instance
1553
- t === "object" && k(e.toString) && e.toString() === "[object FormData]"));
1554
- }, Na = q("URLSearchParams"), [Ia, ka, $a, La] = ["ReadableStream", "Request", "Response", "Headers"].map(q), Ba = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
1552
+ return e && (typeof FormData == "function" && e instanceof FormData || I(e.append) && ((t = We(e)) === "formdata" || // detect form-data instance
1553
+ t === "object" && I(e.toString) && e.toString() === "[object FormData]"));
1554
+ }, Na = q("URLSearchParams"), [ka, Ia, $a, La] = ["ReadableStream", "Request", "Response", "Headers"].map(q), Ba = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
1555
1555
  function Pe(e, t, { allOwnKeys: n = !1 } = {}) {
1556
1556
  if (e === null || typeof e > "u")
1557
1557
  return;
@@ -1586,7 +1586,7 @@ function lt() {
1586
1586
  return t;
1587
1587
  }
1588
1588
  const Da = (e, t, n, { allOwnKeys: r } = {}) => (Pe(t, (o, s) => {
1589
- n && k(o) ? e[s] = zn(o, n) : e[s] = o;
1589
+ n && I(o) ? e[s] = zn(o, n) : e[s] = o;
1590
1590
  }, { allOwnKeys: r }), e), Fa = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), ja = (e, t, n, r) => {
1591
1591
  e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
1592
1592
  value: t.prototype
@@ -1640,10 +1640,10 @@ const Da = (e, t, n, { allOwnKeys: r } = {}) => (Pe(t, (o, s) => {
1640
1640
  }), Object.defineProperties(e, r);
1641
1641
  }, Ga = (e) => {
1642
1642
  Kn(e, (t, n) => {
1643
- if (k(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
1643
+ if (I(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
1644
1644
  return !1;
1645
1645
  const r = e[n];
1646
- if (k(r)) {
1646
+ if (I(r)) {
1647
1647
  if (t.enumerable = !1, "writable" in t) {
1648
1648
  t.writable = !1;
1649
1649
  return;
@@ -1663,7 +1663,7 @@ const Da = (e, t, n, { allOwnKeys: r } = {}) => (Pe(t, (o, s) => {
1663
1663
  }, Xa = () => {
1664
1664
  }, Qa = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
1665
1665
  function Ya(e) {
1666
- return !!(e && k(e.append) && e[Mn] === "FormData" && e[Ke]);
1666
+ return !!(e && I(e.append) && e[Mn] === "FormData" && e[Ke]);
1667
1667
  }
1668
1668
  const ei = (e) => {
1669
1669
  const t = new Array(10), n = (r, o) => {
@@ -1682,14 +1682,14 @@ const ei = (e) => {
1682
1682
  return r;
1683
1683
  };
1684
1684
  return n(e, 0);
1685
- }, ti = q("AsyncFunction"), ni = (e) => e && (Ze(e) || k(e)) && k(e.then) && k(e.catch), Wn = ((e, t) => e ? setImmediate : t ? ((n, r) => (Y.addEventListener("message", ({ source: o, data: s }) => {
1685
+ }, ti = q("AsyncFunction"), ni = (e) => e && (Ze(e) || I(e)) && I(e.then) && I(e.catch), Wn = ((e, t) => e ? setImmediate : t ? ((n, r) => (Y.addEventListener("message", ({ source: o, data: s }) => {
1686
1686
  o === Y && s === n && r.length && r.shift()();
1687
1687
  }, !1), (o) => {
1688
1688
  r.push(o), Y.postMessage(n, "*");
1689
1689
  }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
1690
1690
  typeof setImmediate == "function",
1691
- k(Y.postMessage)
1692
- ), ri = typeof queueMicrotask < "u" ? queueMicrotask.bind(Y) : typeof process < "u" && process.nextTick || Wn, oi = (e) => e != null && k(e[Ke]), l = {
1691
+ I(Y.postMessage)
1692
+ ), ri = typeof queueMicrotask < "u" ? queueMicrotask.bind(Y) : typeof process < "u" && process.nextTick || Wn, oi = (e) => e != null && I(e[Ke]), l = {
1693
1693
  isArray: ge,
1694
1694
  isArrayBuffer: qn,
1695
1695
  isBuffer: _a,
@@ -1700,8 +1700,8 @@ const ei = (e) => {
1700
1700
  isBoolean: Ca,
1701
1701
  isObject: Ze,
1702
1702
  isPlainObject: $e,
1703
- isReadableStream: Ia,
1704
- isRequest: ka,
1703
+ isReadableStream: ka,
1704
+ isRequest: Ia,
1705
1705
  isResponse: $a,
1706
1706
  isHeaders: La,
1707
1707
  isUndefined: Te,
@@ -1709,7 +1709,7 @@ const ei = (e) => {
1709
1709
  isFile: xa,
1710
1710
  isBlob: Ta,
1711
1711
  isRegExp: Wa,
1712
- isFunction: k,
1712
+ isFunction: I,
1713
1713
  isStream: Pa,
1714
1714
  isURLSearchParams: Na,
1715
1715
  isTypedArray: qa,
@@ -1840,12 +1840,12 @@ function Xe(e, t, n) {
1840
1840
  return l.isArrayBuffer(g) || l.isTypedArray(g) ? f && typeof Blob == "function" ? new Blob([g]) : Buffer.from(g) : g;
1841
1841
  }
1842
1842
  function c(g, p, m) {
1843
- let v = g;
1843
+ let w = g;
1844
1844
  if (g && !m && typeof g == "object") {
1845
1845
  if (l.endsWith(p, "{}"))
1846
1846
  p = r ? p : p.slice(0, -2), g = JSON.stringify(g);
1847
- else if (l.isArray(g) && ai(g) || (l.isFileList(g) || l.endsWith(p, "[]")) && (v = l.toArray(g)))
1848
- return p = Xn(p), v.forEach(function(_, T) {
1847
+ else if (l.isArray(g) && ai(g) || (l.isFileList(g) || l.endsWith(p, "[]")) && (w = l.toArray(g)))
1848
+ return p = Xn(p), w.forEach(function(_, T) {
1849
1849
  !(l.isUndefined(_) || _ === null) && t.append(
1850
1850
  // eslint-disable-next-line no-nested-ternary
1851
1851
  a === !0 ? en([p], T, s) : a === null ? p : p + "[]",
@@ -1864,14 +1864,14 @@ function Xe(e, t, n) {
1864
1864
  if (!l.isUndefined(g)) {
1865
1865
  if (d.indexOf(g) !== -1)
1866
1866
  throw Error("Circular reference detected in " + p.join("."));
1867
- d.push(g), l.forEach(g, function(v, b) {
1868
- (!(l.isUndefined(v) || v === null) && o.call(
1867
+ d.push(g), l.forEach(g, function(w, b) {
1868
+ (!(l.isUndefined(w) || w === null) && o.call(
1869
1869
  t,
1870
- v,
1870
+ w,
1871
1871
  l.isString(b) ? b.trim() : b,
1872
1872
  p,
1873
1873
  y
1874
- )) === !0 && h(v, p ? p.concat(b) : [b]);
1874
+ )) === !0 && h(w, p ? p.concat(b) : [b]);
1875
1875
  }), d.pop();
1876
1876
  }
1877
1877
  }
@@ -2014,7 +2014,7 @@ function yi(e, t) {
2014
2014
  function bi(e) {
2015
2015
  return l.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
2016
2016
  }
2017
- function wi(e) {
2017
+ function vi(e) {
2018
2018
  const t = {}, n = Object.keys(e);
2019
2019
  let r;
2020
2020
  const o = n.length;
@@ -2028,7 +2028,7 @@ function tr(e) {
2028
2028
  let a = n[s++];
2029
2029
  if (a === "__proto__") return !0;
2030
2030
  const i = Number.isFinite(+a), f = s >= n.length;
2031
- return a = !a && l.isArray(o) ? o.length : a, f ? (l.hasOwnProp(o, a) ? o[a] = [o[a], r] : o[a] = r, !i) : ((!o[a] || !l.isObject(o[a])) && (o[a] = []), t(n, r, o[a], s) && l.isArray(o[a]) && (o[a] = wi(o[a])), !i);
2031
+ return a = !a && l.isArray(o) ? o.length : a, f ? (l.hasOwnProp(o, a) ? o[a] = [o[a], r] : o[a] = r, !i) : ((!o[a] || !l.isObject(o[a])) && (o[a] = []), t(n, r, o[a], s) && l.isArray(o[a]) && (o[a] = vi(o[a])), !i);
2032
2032
  }
2033
2033
  if (l.isFormData(e) && l.isFunction(e.entries)) {
2034
2034
  const n = {};
@@ -2038,7 +2038,7 @@ function tr(e) {
2038
2038
  }
2039
2039
  return null;
2040
2040
  }
2041
- function vi(e, t, n) {
2041
+ function wi(e, t, n) {
2042
2042
  if (l.isString(e))
2043
2043
  try {
2044
2044
  return (t || JSON.parse)(e), l.trim(e);
@@ -2074,7 +2074,7 @@ const Ae = {
2074
2074
  );
2075
2075
  }
2076
2076
  }
2077
- return s || o ? (n.setContentType("application/json", !1), vi(t)) : t;
2077
+ return s || o ? (n.setContentType("application/json", !1), wi(t)) : t;
2078
2078
  }],
2079
2079
  transformResponse: [function(t) {
2080
2080
  const n = this.transitional || Ae.transitional, r = n && n.forcedJSONParsing, o = this.responseType === "json";
@@ -2432,15 +2432,15 @@ const Ue = (e, t, n = 3) => {
2432
2432
  }
2433
2433
  }
2434
2434
  );
2435
- function Ii(e) {
2435
+ function ki(e) {
2436
2436
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
2437
2437
  }
2438
- function ki(e, t) {
2438
+ function Ii(e, t) {
2439
2439
  return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
2440
2440
  }
2441
2441
  function or(e, t, n) {
2442
- let r = !Ii(t);
2443
- return e && (r || n == !1) ? ki(e, t) : t;
2442
+ let r = !ki(t);
2443
+ return e && (r || n == !1) ? Ii(e, t) : t;
2444
2444
  }
2445
2445
  const an = (e) => e instanceof $ ? { ...e } : e;
2446
2446
  function se(e, t) {
@@ -2539,7 +2539,7 @@ const sr = (e) => {
2539
2539
  }
2540
2540
  let m = new XMLHttpRequest();
2541
2541
  m.open(o.method.toUpperCase(), o.url, !0), m.timeout = o.timeout;
2542
- function v() {
2542
+ function w() {
2543
2543
  if (!m)
2544
2544
  return;
2545
2545
  const _ = $.from(
@@ -2558,8 +2558,8 @@ const sr = (e) => {
2558
2558
  r(F), p();
2559
2559
  }, C), m = null;
2560
2560
  }
2561
- "onloadend" in m ? m.onloadend = v : m.onreadystatechange = function() {
2562
- !m || m.readyState !== 4 || m.status === 0 && !(m.responseURL && m.responseURL.indexOf("file:") === 0) || setTimeout(v);
2561
+ "onloadend" in m ? m.onloadend = w : m.onreadystatechange = function() {
2562
+ !m || m.readyState !== 4 || m.status === 0 && !(m.responseURL && m.responseURL.indexOf("file:") === 0) || setTimeout(w);
2563
2563
  }, m.onabort = function() {
2564
2564
  m && (r(new S("Request aborted", S.ECONNABORTED, e, m)), m = null);
2565
2565
  }, m.onerror = function() {
@@ -2745,7 +2745,7 @@ const Mi = async (e) => {
2745
2745
  }
2746
2746
  }
2747
2747
  l.isString(d) || (d = d ? "include" : "omit");
2748
- const v = "credentials" in Request.prototype;
2748
+ const w = "credentials" in Request.prototype;
2749
2749
  g = new Request(t, {
2750
2750
  ...y,
2751
2751
  signal: h,
@@ -2753,7 +2753,7 @@ const Mi = async (e) => {
2753
2753
  headers: c.normalize().toJSON(),
2754
2754
  body: r,
2755
2755
  duplex: "half",
2756
- credentials: v ? d : void 0
2756
+ credentials: w ? d : void 0
2757
2757
  });
2758
2758
  let b = await fetch(g, y);
2759
2759
  const _ = dt && (u === "stream" || u === "response");
@@ -2785,13 +2785,13 @@ const Mi = async (e) => {
2785
2785
  request: g
2786
2786
  });
2787
2787
  });
2788
- } catch (v) {
2789
- throw p && p(), v && v.name === "TypeError" && /Load failed|fetch/i.test(v.message) ? Object.assign(
2788
+ } catch (w) {
2789
+ throw p && p(), w && w.name === "TypeError" && /Load failed|fetch/i.test(w.message) ? Object.assign(
2790
2790
  new S("Network Error", S.ERR_NETWORK, e, g),
2791
2791
  {
2792
- cause: v.cause || v
2792
+ cause: w.cause || w
2793
2793
  }
2794
- ) : S.from(v, v && v.code, e, g);
2794
+ ) : S.from(w, w && w.code, e, g);
2795
2795
  }
2796
2796
  }), ft = {
2797
2797
  http: si,
@@ -3223,8 +3223,8 @@ const {
3223
3223
  AxiosHeaders: hl,
3224
3224
  HttpStatusCode: yl,
3225
3225
  formToJSON: bl,
3226
- getAdapter: wl,
3227
- mergeConfig: vl
3226
+ getAdapter: vl,
3227
+ mergeConfig: wl
3228
3228
  } = x;
3229
3229
  class et {
3230
3230
  /**
@@ -3338,7 +3338,7 @@ function El() {
3338
3338
  function Cl(e) {
3339
3339
  H.elDialogConfig = e;
3340
3340
  }
3341
- const el = /* @__PURE__ */ I({
3341
+ const el = /* @__PURE__ */ k({
3342
3342
  __name: "EditForm",
3343
3343
  props: {
3344
3344
  dialogConfig: { default: (e) => ({}) }
@@ -3368,7 +3368,7 @@ const el = /* @__PURE__ */ I({
3368
3368
  function i() {
3369
3369
  const d = o.get("qlfyEcologicalLogin_" + U.componentId);
3370
3370
  if (!d || !d.loginServiceBaseAddress)
3371
- return ke.error("组件参数获取失败~");
3371
+ return Ie.error("组件参数获取失败~");
3372
3372
  let y = {
3373
3373
  oldPassword: n.formData.oldPassword,
3374
3374
  newPassword: n.formData.newPassword
@@ -3380,8 +3380,8 @@ const el = /* @__PURE__ */ I({
3380
3380
  "tenant-id": d.tenantId
3381
3381
  }
3382
3382
  }).then((g) => {
3383
- if (h.close(), g.data.code) return ke.warning(g.data.msg);
3384
- ke.success("修改成功"), r.isShow = !1;
3383
+ if (h.close(), g.data.code) return Ie.warning(g.data.msg);
3384
+ Ie.success("修改成功"), r.isShow = !1;
3385
3385
  }).catch((g) => {
3386
3386
  h.close();
3387
3387
  });
@@ -3406,17 +3406,17 @@ const el = /* @__PURE__ */ I({
3406
3406
  });
3407
3407
  }
3408
3408
  return (d, y) => {
3409
- const h = be("el-input"), g = be("el-form-item"), p = be("el-form"), m = be("el-button"), v = be("el-dialog");
3410
- return R(), Q(v, gn({
3411
- modelValue: w(H).isShow,
3412
- "onUpdate:modelValue": y[4] || (y[4] = (b) => w(H).isShow = b),
3409
+ const h = be("el-input"), g = be("el-form-item"), p = be("el-form"), m = be("el-button"), w = be("el-dialog");
3410
+ return R(), Q(w, gn({
3411
+ modelValue: v(H).isShow,
3412
+ "onUpdate:modelValue": y[4] || (y[4] = (b) => v(H).isShow = b),
3413
3413
  title: "修改密码",
3414
3414
  class: "edit-password-dialog",
3415
3415
  width: "500px"
3416
- }, { ...s.dialogConfig, ...w(H).elDialogConfig }), {
3416
+ }, { ...s.dialogConfig, ...v(H).elDialogConfig }), {
3417
3417
  footer: D(() => [
3418
3418
  B(m, {
3419
- onClick: y[3] || (y[3] = (b) => w(H).isShow = !1)
3419
+ onClick: y[3] || (y[3] = (b) => v(H).isShow = !1)
3420
3420
  }, {
3421
3421
  default: D(() => y[5] || (y[5] = [
3422
3422
  at("取 消")
@@ -3491,7 +3491,7 @@ const el = /* @__PURE__ */ I({
3491
3491
  }, 16, ["modelValue"]);
3492
3492
  };
3493
3493
  }
3494
- }), pr = /* @__PURE__ */ I({
3494
+ }), pr = /* @__PURE__ */ k({
3495
3495
  __name: "index",
3496
3496
  props: {
3497
3497
  clientId: {},
@@ -3564,9 +3564,9 @@ const el = /* @__PURE__ */ I({
3564
3564
  b && i.set(r.tokenName, b, r.tokenValidity);
3565
3565
  const _ = !!s.value.query.token;
3566
3566
  if (U.userPermission = null, !b && _) {
3567
- a("loggingIn", s.value.query.token), i.set(r.tokenName, s.value.query.token, r.tokenValidity);
3567
+ a("loggingIn", s.value.query.token), i.set(r.tokenName, s.value.query.token, r.tokenValidity), i.set("refreshToken", s.value.query.refreshToken);
3568
3568
  let T = { ...s.value.query };
3569
- delete T.token, o.replace({
3569
+ delete T.token, delete T.refreshToken, o.replace({
3570
3570
  path: s.value.path,
3571
3571
  query: T
3572
3572
  }), p(b);
@@ -3586,7 +3586,7 @@ const el = /* @__PURE__ */ I({
3586
3586
  i.remove(r.tokenName), mt();
3587
3587
  return;
3588
3588
  }
3589
- p(b), v();
3589
+ p(b), w();
3590
3590
  }).catch((C) => {
3591
3591
  console.log(C);
3592
3592
  });
@@ -3615,9 +3615,9 @@ const el = /* @__PURE__ */ I({
3615
3615
  const b = { ...r };
3616
3616
  delete b.useRouter, i.set("qlfyEcologicalLogin_" + c, b);
3617
3617
  }
3618
- function v() {
3618
+ function w() {
3619
3619
  r.listenToken && (f && clearInterval(f), f = setInterval(() => {
3620
- i.get(r.tokenName) || (clearInterval(f), ke.warning("登录状态丢失,正在重新获取~"), setTimeout(() => {
3620
+ i.get(r.tokenName) || (clearInterval(f), Ie.warning("登录状态丢失,正在重新获取~"), setTimeout(() => {
3621
3621
  h();
3622
3622
  }, 2e3));
3623
3623
  }, 1e3));
package/lib/index.mjs.gz CHANGED
Binary file
package/lib/index.umd.js CHANGED
@@ -8,4 +8,4 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:r,curr
8
8
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[wn]=this[wn]={accessors:{}}).accessors,o=this.prototype;function a(i){const l=me(i);r[l]||(Ia(o,i),r[l]=!0)}return c.isArray(t)?t.forEach(a):a(t),this}};k.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),c.reduceDescriptors(k.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),c.freezeMethods(k);function nt(e,t){const n=this||pe,r=t||n,o=k.from(r.headers);let a=r.data;return c.forEach(e,function(l){a=l.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function _n(e){return!!(e&&e.__CANCEL__)}function ne(e,t,n){S.call(this,e??"canceled",S.ERR_CANCELED,t,n),this.name="CanceledError"}c.inherits(ne,S,{__CANCEL__:!0});function Sn(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new S("Request failed with status code "+n.status,[S.ERR_BAD_REQUEST,S.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Ba(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function $a(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,a=0,i;return t=t!==void 0?t:1e3,function(p){const d=Date.now(),u=r[a];i||(i=d),n[o]=p,r[o]=d;let f=a,b=0;for(;f!==o;)b+=n[f++],f=f%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),d-i<t)return;const y=u&&d-u;return y?Math.round(b*1e3/y):void 0}}function La(e,t){let n=0,r=1e3/t,o,a;const i=(d,u=Date.now())=>{n=u,o=null,a&&(clearTimeout(a),a=null),e.apply(null,d)};return[(...d)=>{const u=Date.now(),f=u-n;f>=r?i(d,u):(o=d,a||(a=setTimeout(()=>{a=null,i(o)},r-f)))},()=>o&&i(o)]}const ve=(e,t,n=3)=>{let r=0;const o=$a(50,250);return La(a=>{const i=a.loaded,l=a.lengthComputable?a.total:void 0,p=i-r,d=o(p),u=i<=l;r=i;const f={loaded:i,total:l,progress:l?i/l:void 0,bytes:p,rate:d||void 0,estimated:d&&l&&u?(l-i)/d:void 0,event:a,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(f)},n)},Cn=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},En=e=>(...t)=>c.asap(()=>e(...t)),Da=N.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,N.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(N.origin),N.navigator&&/(msie|trident)/i.test(N.navigator.userAgent)):()=>!0,Fa=N.hasStandardBrowserEnv?{write(e,t,n,r,o,a){const i=[e+"="+encodeURIComponent(t)];c.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),c.isString(r)&&i.push("path="+r),c.isString(o)&&i.push("domain="+o),a===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function ja(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Ua(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function xn(e,t,n){let r=!ja(t);return e&&(r||n==!1)?Ua(e,t):t}const On=e=>e instanceof k?{...e}:e;function G(e,t){t=t||{};const n={};function r(d,u,f,b){return c.isPlainObject(d)&&c.isPlainObject(u)?c.merge.call({caseless:b},d,u):c.isPlainObject(u)?c.merge({},u):c.isArray(u)?u.slice():u}function o(d,u,f,b){if(c.isUndefined(u)){if(!c.isUndefined(d))return r(void 0,d,f,b)}else return r(d,u,f,b)}function a(d,u){if(!c.isUndefined(u))return r(void 0,u)}function i(d,u){if(c.isUndefined(u)){if(!c.isUndefined(d))return r(void 0,d)}else return r(void 0,u)}function l(d,u,f){if(f in t)return r(d,u);if(f in e)return r(void 0,d)}const p={url:a,method:a,data:a,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:l,headers:(d,u,f)=>o(On(d),On(u),f,!0)};return c.forEach(Object.keys(Object.assign({},e,t)),function(u){const f=p[u]||o,b=f(e[u],t[u],u);c.isUndefined(b)&&f!==l||(n[u]=b)}),n}const Tn=e=>{const t=G({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:a,headers:i,auth:l}=t;t.headers=i=k.from(i),t.url=hn(xn(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&i.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let p;if(c.isFormData(n)){if(N.hasStandardBrowserEnv||N.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((p=i.getContentType())!==!1){const[d,...u]=p?p.split(";").map(f=>f.trim()).filter(Boolean):[];i.setContentType([d||"multipart/form-data",...u].join("; "))}}if(N.hasStandardBrowserEnv&&(r&&c.isFunction(r)&&(r=r(t)),r||r!==!1&&Da(t.url))){const d=o&&a&&Fa.read(a);d&&i.set(o,d)}return t},za=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const o=Tn(e);let a=o.data;const i=k.from(o.headers).normalize();let{responseType:l,onUploadProgress:p,onDownloadProgress:d}=o,u,f,b,y,g;function m(){y&&y(),g&&g(),o.cancelToken&&o.cancelToken.unsubscribe(u),o.signal&&o.signal.removeEventListener("abort",u)}let h=new XMLHttpRequest;h.open(o.method.toUpperCase(),o.url,!0),h.timeout=o.timeout;function _(){if(!h)return;const C=k.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),x={data:!l||l==="text"||l==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:C,config:e,request:h};Sn(function(I){n(I),m()},function(I){r(I),m()},x),h=null}"onloadend"in h?h.onloadend=_:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(_)},h.onabort=function(){h&&(r(new S("Request aborted",S.ECONNABORTED,e,h)),h=null)},h.onerror=function(){r(new S("Network Error",S.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let T=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const x=o.transitional||yn;o.timeoutErrorMessage&&(T=o.timeoutErrorMessage),r(new S(T,x.clarifyTimeoutError?S.ETIMEDOUT:S.ECONNABORTED,e,h)),h=null},a===void 0&&i.setContentType(null),"setRequestHeader"in h&&c.forEach(i.toJSON(),function(T,x){h.setRequestHeader(x,T)}),c.isUndefined(o.withCredentials)||(h.withCredentials=!!o.withCredentials),l&&l!=="json"&&(h.responseType=o.responseType),d&&([b,g]=ve(d,!0),h.addEventListener("progress",b)),p&&h.upload&&([f,y]=ve(p),h.upload.addEventListener("progress",f),h.upload.addEventListener("loadend",y)),(o.cancelToken||o.signal)&&(u=C=>{h&&(r(!C||C.type?new ne(null,e,h):C),h.abort(),h=null)},o.cancelToken&&o.cancelToken.subscribe(u),o.signal&&(o.signal.aborted?u():o.signal.addEventListener("abort",u)));const w=Ba(o.url);if(w&&N.protocols.indexOf(w)===-1){r(new S("Unsupported protocol "+w+":",S.ERR_BAD_REQUEST,e));return}h.send(a||null)})},Va=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const a=function(d){if(!o){o=!0,l();const u=d instanceof Error?d:this.reason;r.abort(u instanceof S?u:new ne(u instanceof Error?u.message:u))}};let i=t&&setTimeout(()=>{i=null,a(new S(`timeout ${t} of ms exceeded`,S.ETIMEDOUT))},t);const l=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(a):d.removeEventListener("abort",a)}),e=null)};e.forEach(d=>d.addEventListener("abort",a));const{signal:p}=r;return p.unsubscribe=()=>c.asap(l),p}},Ma=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},qa=async function*(e,t){for await(const n of Ha(e))yield*Ma(n,t)},Ha=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},Nn=(e,t,n,r)=>{const o=qa(e,t);let a=0,i,l=p=>{i||(i=!0,r&&r(p))};return new ReadableStream({async pull(p){try{const{done:d,value:u}=await o.next();if(d){l(),p.close();return}let f=u.byteLength;if(n){let b=a+=f;n(b)}p.enqueue(new Uint8Array(u))}catch(d){throw l(d),d}},cancel(p){return l(p),o.return()}},{highWaterMark:2})},Ie=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Rn=Ie&&typeof ReadableStream=="function",Ja=Ie&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Pn=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Ka=Rn&&Pn(()=>{let e=!1;const t=new Request(N.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),An=64*1024,rt=Rn&&Pn(()=>c.isReadableStream(new Response("").body)),Be={stream:rt&&(e=>e.body)};Ie&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Be[t]&&(Be[t]=c.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new S(`Response type '${t}' is not supported`,S.ERR_NOT_SUPPORT,r)})})})(new Response);const Wa=async e=>{if(e==null)return 0;if(c.isBlob(e))return e.size;if(c.isSpecCompliantForm(e))return(await new Request(N.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(c.isArrayBufferView(e)||c.isArrayBuffer(e))return e.byteLength;if(c.isURLSearchParams(e)&&(e=e+""),c.isString(e))return(await Ja(e)).byteLength},Ga=async(e,t)=>{const n=c.toFiniteNumber(e.getContentLength());return n??Wa(t)},ot={http:ga,xhr:za,fetch:Ie&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:a,timeout:i,onDownloadProgress:l,onUploadProgress:p,responseType:d,headers:u,withCredentials:f="same-origin",fetchOptions:b}=Tn(e);d=d?(d+"").toLowerCase():"text";let y=Va([o,a&&a.toAbortSignal()],i),g;const m=y&&y.unsubscribe&&(()=>{y.unsubscribe()});let h;try{if(p&&Ka&&n!=="get"&&n!=="head"&&(h=await Ga(u,r))!==0){let x=new Request(t,{method:"POST",body:r,duplex:"half"}),F;if(c.isFormData(r)&&(F=x.headers.get("content-type"))&&u.setContentType(F),x.body){const[I,oe]=Cn(h,ve(En(p)));r=Nn(x.body,An,I,oe)}}c.isString(f)||(f=f?"include":"omit");const _="credentials"in Request.prototype;g=new Request(t,{...b,signal:y,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:_?f:void 0});let w=await fetch(g,b);const C=rt&&(d==="stream"||d==="response");if(rt&&(l||C&&m)){const x={};["status","statusText","headers"].forEach(E=>{x[E]=w[E]});const F=c.toFiniteNumber(w.headers.get("content-length")),[I,oe]=l&&Cn(F,ve(En(l),!0))||[];w=new Response(Nn(w.body,An,I,()=>{oe&&oe(),m&&m()}),x)}d=d||"text";let T=await Be[c.findKey(Be,d)||"text"](w,e);return!C&&m&&m(),await new Promise((x,F)=>{Sn(x,F,{data:T,headers:k.from(w.headers),status:w.status,statusText:w.statusText,config:e,request:g})})}catch(_){throw m&&m(),_&&_.name==="TypeError"&&/Load failed|fetch/i.test(_.message)?Object.assign(new S("Network Error",S.ERR_NETWORK,e,g),{cause:_.cause||_}):S.from(_,_&&_.code,e,g)}})};c.forEach(ot,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const kn=e=>`- ${e}`,Za=e=>c.isFunction(e)||e===null||e===!1,vn={getAdapter:e=>{e=c.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let a=0;a<t;a++){n=e[a];let i;if(r=n,!Za(n)&&(r=ot[(i=String(n)).toLowerCase()],r===void 0))throw new S(`Unknown adapter '${i}'`);if(r)break;o[i||"#"+a]=r}if(!r){const a=Object.entries(o).map(([l,p])=>`adapter ${l} `+(p===!1?"is not supported by the environment":"is not available in the build"));let i=t?a.length>1?`since :
9
9
  `+a.map(kn).join(`
10
10
  `):" "+kn(a[0]):"as no adapter specified";throw new S("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:ot};function st(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ne(null,e)}function In(e){return st(e),e.headers=k.from(e.headers),e.data=nt.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),vn.getAdapter(e.adapter||pe.adapter)(e).then(function(r){return st(e),r.data=nt.call(e,e.transformResponse,r),r.headers=k.from(r.headers),r},function(r){return _n(r)||(st(e),r&&r.response&&(r.response.data=nt.call(e,e.transformResponse,r.response),r.response.headers=k.from(r.response.headers))),Promise.reject(r)})}const Bn="1.10.0",$e={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{$e[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const $n={};$e.transitional=function(t,n,r){function o(a,i){return"[Axios v"+Bn+"] Transitional option '"+a+"'"+i+(r?". "+r:"")}return(a,i,l)=>{if(t===!1)throw new S(o(i," has been removed"+(n?" in "+n:"")),S.ERR_DEPRECATED);return n&&!$n[i]&&($n[i]=!0,console.warn(o(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,i,l):!0}},$e.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Xa(e,t,n){if(typeof e!="object")throw new S("options must be an object",S.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const a=r[o],i=t[a];if(i){const l=e[a],p=l===void 0||i(l,a,e);if(p!==!0)throw new S("option "+a+" must be "+p,S.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new S("Unknown option "+a,S.ERR_BAD_OPTION)}}const Le={assertOptions:Xa,validators:$e},j=Le.validators;let Z=class{constructor(t){this.defaults=t||{},this.interceptors={request:new gn,response:new gn}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const a=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?a&&!String(r.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(r.stack+=`
11
- `+a):r.stack=a}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=G(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&Le.assertOptions(r,{silentJSONParsing:j.transitional(j.boolean),forcedJSONParsing:j.transitional(j.boolean),clarifyTimeoutError:j.transitional(j.boolean)},!1),o!=null&&(c.isFunction(o)?n.paramsSerializer={serialize:o}:Le.assertOptions(o,{encode:j.function,serialize:j.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Le.assertOptions(n,{baseUrl:j.spelling("baseURL"),withXsrfToken:j.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=a&&c.merge(a.common,a[n.method]);a&&c.forEach(["delete","get","head","post","put","patch","common"],g=>{delete a[g]}),n.headers=k.concat(i,a);const l=[];let p=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(p=p&&m.synchronous,l.unshift(m.fulfilled,m.rejected))});const d=[];this.interceptors.response.forEach(function(m){d.push(m.fulfilled,m.rejected)});let u,f=0,b;if(!p){const g=[In.bind(this),void 0];for(g.unshift.apply(g,l),g.push.apply(g,d),b=g.length,u=Promise.resolve(n);f<b;)u=u.then(g[f++],g[f++]);return u}b=l.length;let y=n;for(f=0;f<b;){const g=l[f++],m=l[f++];try{y=g(y)}catch(h){m.call(this,h);break}}try{u=In.call(this,y)}catch(g){return Promise.reject(g)}for(f=0,b=d.length;f<b;)u=u.then(d[f++],d[f++]);return u}getUri(t){t=G(this.defaults,t);const n=xn(t.baseURL,t.url,t.allowAbsoluteUrls);return hn(n,t.params,t.paramsSerializer)}};c.forEach(["delete","get","head","options"],function(t){Z.prototype[t]=function(n,r){return this.request(G(r||{},{method:t,url:n,data:(r||{}).data}))}}),c.forEach(["post","put","patch"],function(t){function n(r){return function(a,i,l){return this.request(G(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:i}))}}Z.prototype[t]=n(),Z.prototype[t+"Form"]=n(!0)});let Qa=class Un{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(o=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](o);r._listeners=null}),this.promise.then=o=>{let a;const i=new Promise(l=>{r.subscribe(l),a=l}).then(o);return i.cancel=function(){r.unsubscribe(a)},i},t(function(a,i,l){r.reason||(r.reason=new ne(a,i,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Un(function(o){t=o}),cancel:t}}};function Ya(e){return function(n){return e.apply(null,n)}}function ei(e){return c.isObject(e)&&e.isAxiosError===!0}const at={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(at).forEach(([e,t])=>{at[t]=e});function Ln(e){const t=new Z(e),n=Yt(Z.prototype.request,t);return c.extend(n,Z.prototype,t,{allOwnKeys:!0}),c.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Ln(G(e,o))},n}const O=Ln(pe);O.Axios=Z,O.CanceledError=ne,O.CancelToken=Qa,O.isCancel=_n,O.VERSION=Bn,O.toFormData=Ae,O.AxiosError=S,O.Cancel=O.CanceledError,O.all=function(t){return Promise.all(t)},O.spread=Ya,O.isAxiosError=ei,O.mergeConfig=G,O.AxiosHeaders=k,O.formToJSON=e=>bn(c.isHTMLForm(e)?new FormData(e):e),O.getAdapter=vn.getAdapter,O.HttpStatusCode=at,O.default=O;const{Axios:_i,AxiosError:Si,CanceledError:Ci,isCancel:Ei,CancelToken:xi,VERSION:Oi,all:Ti,Cancel:Ni,isAxiosError:Ri,spread:Pi,toFormData:Ai,AxiosHeaders:ki,HttpStatusCode:vi,formToJSON:Ii,getAdapter:Bi,mergeConfig:$i}=O;class De{set(t,n,r){let o=null;if(typeof r=="number"&&r>0)o=Date.now()+r*1e3;else if(typeof r>"u"){const i=this.getRaw(t);o=i?i.expire:null}const a={value:n,expire:o};localStorage.setItem(t,JSON.stringify(a))}get(t){const n=this.getRaw(t);return n?n.expire&&Date.now()>n.expire?(this.remove(t),null):n.value:null}getRaw(t){try{const n=localStorage.getItem(t);if(!n)return null;const r=JSON.parse(n);return r&&typeof r=="object"&&"value"in r&&"expire"in r?r:{value:n,expire:null}}catch{return{value:localStorage.getItem(t),expire:null}}}remove(t){localStorage.removeItem(t)}clear(){localStorage.clear()}}const ti=Object.freeze(Object.defineProperty({__proto__:null,default:De},Symbol.toStringTag,{value:"Module"})),D={componentId:"",userPermission:null},re=new De;function Dn(){const e=re.get("qlfyEcologicalLogin_"+D.componentId);if(!e||!e.isEnabled)return console.error(new Error("统一登陆未开启,请检查配置")),null;let t=re.get(e.tokenName);console.log(t),O({method:"post",url:e.loginServiceBaseAddress+"/admin-api/system/auth/logout",headers:{"tenant-id":e.tenantId,Authorization:"Bearer "+t}}).then(n=>{n.data.code||(re.remove(e.tokenName),lt())})}function it(){const e=re.get("qlfyEcologicalLogin_"+D.componentId);return console.log(e),!e||!e.isEnabled?null:re.get(e.tokenName)}function lt(){const e=re.get("qlfyEcologicalLogin_"+D.componentId),t=ni(e.loginPageBaseAddress,e.clientId,e.clientSecret,e.tenantId,e.redirectPath);t&&window.open(t,"_self")}function ni(e,t,n,r,o){return!t||!n?(console.error("未配置应用id或应用密钥"),""):r?(o=o||encodeURIComponent(window.location.href),console.log(`${e}/#/login?clientId=${t}&clientSecret=${n}&tenantId=${r}&redirectUrl=${o}`),`${e}/#/login?clientId=${t}&clientSecret=${n}&tenantId=${r}&redirectUrl=${o}`):(console.error("未配置租户id"),"")}function ri(){let e="",t;for(let n=0;n<32;n++)t=Math.random()*16|0,(n===8||n===12||n===16||n===20)&&(e+="-"),e+=(n===12?4:n===16?t&3|8:t).toString(16);return e}function Fn(){return D.userPermission}let U=s.reactive({isShow:!1,elDialogConfig:{}});function oi(){U.isShow=!0,console.log(U)}function si(){U.isShow=!1}function ai(e){U.elDialogConfig=e}const ii=s.defineComponent({__name:"EditForm",props:{dialogConfig:{default:e=>({})}},setup(e){class t{constructor(){this.dialogVisible=!1,this.formData={oldPassword:"",newPassword:"",newPasswordAgain:""}}}const n=s.reactive(new t),r=U,o=new De,a=e,i={oldPassword:[{required:!0,message:"请输入旧密码",trigger:"blur"}],newPassword:[{required:!0,message:"请输入新密码",trigger:"blur"}],newPasswordAgain:[{required:!0,message:"请输入确认密码",trigger:"blur"},{validator:(f,b,y)=>{b!==n.formData.newPassword?y(new Error("两次输入的密码不一致")):y(void 0)}}]};function l(){const f=o.get("qlfyEcologicalLogin_"+D.componentId);if(!f||!f.loginServiceBaseAddress)return xe.error("组件参数获取失败~");let b={oldPassword:n.formData.oldPassword,newPassword:n.formData.newPassword};const y=u(".edit-password-dialog","加载中",!0);O.put(f.loginServiceBaseAddress+"/admin-api/system/user/profile/update-password",b,{headers:{Authorization:it(),"tenant-id":f.tenantId}}).then(g=>{if(y.close(),g.data.code)return xe.warning(g.data.msg);xe.success("修改成功"),r.isShow=!1}).catch(g=>{y.close()})}const p=s.ref();function d(){p.value.validate(f=>{f&&l()})}function u(f,b,y){return ws.service({target:document.querySelector(f),text:b,lock:y,background:"rgba(0, 0, 0, 0.7)"})}return(f,b)=>{const y=s.resolveComponent("el-input"),g=s.resolveComponent("el-form-item"),m=s.resolveComponent("el-form"),h=s.resolveComponent("el-button"),_=s.resolveComponent("el-dialog");return s.openBlock(),s.createBlock(_,s.mergeProps({modelValue:s.unref(U).isShow,"onUpdate:modelValue":b[4]||(b[4]=w=>s.unref(U).isShow=w),title:"修改密码",class:"edit-password-dialog",width:"500px"},{...a.dialogConfig,...s.unref(U).elDialogConfig}),{footer:s.withCtx(()=>[s.createVNode(h,{onClick:b[3]||(b[3]=w=>s.unref(U).isShow=!1)},{default:s.withCtx(()=>b[5]||(b[5]=[s.createTextVNode("取 消")])),_:1,__:[5]}),s.createVNode(h,{type:"primary",onClick:d},{default:s.withCtx(()=>b[6]||(b[6]=[s.createTextVNode("确 定")])),_:1,__:[6]})]),default:s.withCtx(()=>[s.createVNode(m,{ref_key:"formRef",ref:p,model:n.formData,"label-width":"120px",rules:i},{default:s.withCtx(()=>[s.createVNode(g,{label:"旧密码",prop:"oldPassword"},{default:s.withCtx(()=>[s.createVNode(y,{modelValue:n.formData.oldPassword,"onUpdate:modelValue":b[0]||(b[0]=w=>n.formData.oldPassword=w),type:"password"},null,8,["modelValue"])]),_:1}),s.createVNode(g,{label:"新密码",prop:"newPassword"},{default:s.withCtx(()=>[s.createVNode(y,{modelValue:n.formData.newPassword,"onUpdate:modelValue":b[1]||(b[1]=w=>n.formData.newPassword=w),type:"password"},null,8,["modelValue"])]),_:1}),s.createVNode(g,{label:"确认密码",prop:"newPasswordAgain"},{default:s.withCtx(()=>[s.createVNode(y,{modelValue:n.formData.newPasswordAgain,"onUpdate:modelValue":b[2]||(b[2]=w=>n.formData.newPasswordAgain=w),type:"password"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},16,["modelValue"])}}}),jn=s.defineComponent({__name:"index",props:{clientId:{},clientSecret:{},loginPageBaseAddress:{},loginServiceBaseAddress:{},useRouter:{},token:{},isEnabled:{type:Boolean,default:!0},listenToken:{type:Boolean,default:!1},redirectPath:{default:""},tokenName:{default:"access_token"},tokenValidity:{default:60*30},tenantId:{default:7},dialogConfig:{default:e=>({})}},emits:["loggingIn","loginSuccess"],setup(e,{expose:t,emit:n}){const r=e,o=r.useRouter,a=r.useRouter.currentRoute,i=n,l=new De;let p=null,d=!0;const u=ri();let f=null;const b=s.ref(!1);t({logout:Dn,getToken:it,getUserPermission:Fn}),D.componentId||(D.componentId=u,b.value=!0),s.onBeforeUnmount(()=>{p&&clearInterval(p);for(let w=0;w<localStorage.length;w++){let C=localStorage.key(w);C&&C.indexOf("qlfyEcologicalLogin_")>=0&&l.remove(C)}}),s.watch(()=>a.value.path,(w,C)=>{f&&clearTimeout(f),f=setTimeout(()=>{r.isEnabled&&y()},200)},{deep:!0,immediate:!0}),s.watch(()=>r.isEnabled,()=>{setTimeout(()=>{if(y(),!r.isEnabled){l.remove(r.tokenName);for(let w=0;w<localStorage.length;w++){let C=localStorage.key(w);C&&C.indexOf("qlfyEcologicalLogin_")===0&&l.remove(C)}l.remove("loginInfo")}})},{deep:!0}),s.watch(()=>r.token,w=>{},{});function y(){if(!r.isEnabled||u!==D.componentId)return;h(),r.token?(l.set(r.tokenName,r.token,r.tokenValidity),l.set("tokenType",1)):l.get(r.tokenName)&&(l.get("tokenType")==1&&l.remove(r.tokenName),l.set("tokenType",0));const w=l.get(r.tokenName);w&&l.set(r.tokenName,w,r.tokenValidity);const C=!!a.value.query.token;if(D.userPermission=null,!w&&C){i("loggingIn",a.value.query.token),l.set(r.tokenName,a.value.query.token,r.tokenValidity);let T={...a.value.query};delete T.token,o.replace({path:a.value.path,query:T}),m(w)}else w&&d?(g(w),d=!1):lt()}function g(w){let C={token:w};const T={"tenant-id":r.tenantId,Authorization:"Basic "+btoa(r.clientId+":"+r.clientSecret)};O.post(r.loginServiceBaseAddress+"/admin-api/system/oauth2/check-token","",{params:C,headers:T}).then(x=>{if(x.data.code){l.remove(r.tokenName),lt();return}m(w),_()}).catch(x=>{console.log(x)})}function m(w){let C={clientId:r.clientId};const T={"tenant-id":r.tenantId,Authorization:w};O.get(r.loginServiceBaseAddress+"/admin-api/system/auth/get-permission-info",{params:C,headers:T}).then(x=>{D.userPermission=u,i("loginSuccess",x.data)}).catch(x=>{console.log(x)})}function h(){if(u!==D.componentId)return;for(let C=0;C<localStorage.length;C++){let T=localStorage.key(C);T&&T.indexOf("qlfyEcologicalLogin_")===0&&l.remove(T)}const w={...r};delete w.useRouter,l.set("qlfyEcologicalLogin_"+u,w)}function _(){r.listenToken&&(p&&clearInterval(p),p=setInterval(()=>{l.get(r.tokenName)||(clearInterval(p),xe.warning("登录状态丢失,正在重新获取~"),setTimeout(()=>{y()},2e3))},1e3))}return(w,C)=>b.value?(s.openBlock(),s.createBlock(ii,{key:0,"dialog-config":r.dialogConfig},null,8,["dialog-config"])):s.createCommentVNode("",!0)}}),li=jn,ci={install(e){e.component("qlfyEcologicalLogin",jn)}};R.LocalStorageManager=ti,R.closeChangePassword=si,R.default=ci,R.getToken=it,R.getUserPermission=Fn,R.logout=Dn,R.openChangePassword=oi,R.qlfyEcologicalLogin=li,R.setDialogConfig=ai,Object.defineProperties(R,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
11
+ `+a):r.stack=a}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=G(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&Le.assertOptions(r,{silentJSONParsing:j.transitional(j.boolean),forcedJSONParsing:j.transitional(j.boolean),clarifyTimeoutError:j.transitional(j.boolean)},!1),o!=null&&(c.isFunction(o)?n.paramsSerializer={serialize:o}:Le.assertOptions(o,{encode:j.function,serialize:j.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Le.assertOptions(n,{baseUrl:j.spelling("baseURL"),withXsrfToken:j.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=a&&c.merge(a.common,a[n.method]);a&&c.forEach(["delete","get","head","post","put","patch","common"],g=>{delete a[g]}),n.headers=k.concat(i,a);const l=[];let p=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(p=p&&m.synchronous,l.unshift(m.fulfilled,m.rejected))});const d=[];this.interceptors.response.forEach(function(m){d.push(m.fulfilled,m.rejected)});let u,f=0,b;if(!p){const g=[In.bind(this),void 0];for(g.unshift.apply(g,l),g.push.apply(g,d),b=g.length,u=Promise.resolve(n);f<b;)u=u.then(g[f++],g[f++]);return u}b=l.length;let y=n;for(f=0;f<b;){const g=l[f++],m=l[f++];try{y=g(y)}catch(h){m.call(this,h);break}}try{u=In.call(this,y)}catch(g){return Promise.reject(g)}for(f=0,b=d.length;f<b;)u=u.then(d[f++],d[f++]);return u}getUri(t){t=G(this.defaults,t);const n=xn(t.baseURL,t.url,t.allowAbsoluteUrls);return hn(n,t.params,t.paramsSerializer)}};c.forEach(["delete","get","head","options"],function(t){Z.prototype[t]=function(n,r){return this.request(G(r||{},{method:t,url:n,data:(r||{}).data}))}}),c.forEach(["post","put","patch"],function(t){function n(r){return function(a,i,l){return this.request(G(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:i}))}}Z.prototype[t]=n(),Z.prototype[t+"Form"]=n(!0)});let Qa=class Un{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(o=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](o);r._listeners=null}),this.promise.then=o=>{let a;const i=new Promise(l=>{r.subscribe(l),a=l}).then(o);return i.cancel=function(){r.unsubscribe(a)},i},t(function(a,i,l){r.reason||(r.reason=new ne(a,i,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Un(function(o){t=o}),cancel:t}}};function Ya(e){return function(n){return e.apply(null,n)}}function ei(e){return c.isObject(e)&&e.isAxiosError===!0}const at={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(at).forEach(([e,t])=>{at[t]=e});function Ln(e){const t=new Z(e),n=Yt(Z.prototype.request,t);return c.extend(n,Z.prototype,t,{allOwnKeys:!0}),c.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Ln(G(e,o))},n}const O=Ln(pe);O.Axios=Z,O.CanceledError=ne,O.CancelToken=Qa,O.isCancel=_n,O.VERSION=Bn,O.toFormData=Ae,O.AxiosError=S,O.Cancel=O.CanceledError,O.all=function(t){return Promise.all(t)},O.spread=Ya,O.isAxiosError=ei,O.mergeConfig=G,O.AxiosHeaders=k,O.formToJSON=e=>bn(c.isHTMLForm(e)?new FormData(e):e),O.getAdapter=vn.getAdapter,O.HttpStatusCode=at,O.default=O;const{Axios:_i,AxiosError:Si,CanceledError:Ci,isCancel:Ei,CancelToken:xi,VERSION:Oi,all:Ti,Cancel:Ni,isAxiosError:Ri,spread:Pi,toFormData:Ai,AxiosHeaders:ki,HttpStatusCode:vi,formToJSON:Ii,getAdapter:Bi,mergeConfig:$i}=O;class De{set(t,n,r){let o=null;if(typeof r=="number"&&r>0)o=Date.now()+r*1e3;else if(typeof r>"u"){const i=this.getRaw(t);o=i?i.expire:null}const a={value:n,expire:o};localStorage.setItem(t,JSON.stringify(a))}get(t){const n=this.getRaw(t);return n?n.expire&&Date.now()>n.expire?(this.remove(t),null):n.value:null}getRaw(t){try{const n=localStorage.getItem(t);if(!n)return null;const r=JSON.parse(n);return r&&typeof r=="object"&&"value"in r&&"expire"in r?r:{value:n,expire:null}}catch{return{value:localStorage.getItem(t),expire:null}}}remove(t){localStorage.removeItem(t)}clear(){localStorage.clear()}}const ti=Object.freeze(Object.defineProperty({__proto__:null,default:De},Symbol.toStringTag,{value:"Module"})),D={componentId:"",userPermission:null},re=new De;function Dn(){const e=re.get("qlfyEcologicalLogin_"+D.componentId);if(!e||!e.isEnabled)return console.error(new Error("统一登陆未开启,请检查配置")),null;let t=re.get(e.tokenName);console.log(t),O({method:"post",url:e.loginServiceBaseAddress+"/admin-api/system/auth/logout",headers:{"tenant-id":e.tenantId,Authorization:"Bearer "+t}}).then(n=>{n.data.code||(re.remove(e.tokenName),lt())})}function it(){const e=re.get("qlfyEcologicalLogin_"+D.componentId);return console.log(e),!e||!e.isEnabled?null:re.get(e.tokenName)}function lt(){const e=re.get("qlfyEcologicalLogin_"+D.componentId),t=ni(e.loginPageBaseAddress,e.clientId,e.clientSecret,e.tenantId,e.redirectPath);t&&window.open(t,"_self")}function ni(e,t,n,r,o){return!t||!n?(console.error("未配置应用id或应用密钥"),""):r?(o=o||encodeURIComponent(window.location.href),console.log(`${e}/#/login?clientId=${t}&clientSecret=${n}&tenantId=${r}&redirectUrl=${o}`),`${e}/#/login?clientId=${t}&clientSecret=${n}&tenantId=${r}&redirectUrl=${o}`):(console.error("未配置租户id"),"")}function ri(){let e="",t;for(let n=0;n<32;n++)t=Math.random()*16|0,(n===8||n===12||n===16||n===20)&&(e+="-"),e+=(n===12?4:n===16?t&3|8:t).toString(16);return e}function Fn(){return D.userPermission}let U=s.reactive({isShow:!1,elDialogConfig:{}});function oi(){U.isShow=!0,console.log(U)}function si(){U.isShow=!1}function ai(e){U.elDialogConfig=e}const ii=s.defineComponent({__name:"EditForm",props:{dialogConfig:{default:e=>({})}},setup(e){class t{constructor(){this.dialogVisible=!1,this.formData={oldPassword:"",newPassword:"",newPasswordAgain:""}}}const n=s.reactive(new t),r=U,o=new De,a=e,i={oldPassword:[{required:!0,message:"请输入旧密码",trigger:"blur"}],newPassword:[{required:!0,message:"请输入新密码",trigger:"blur"}],newPasswordAgain:[{required:!0,message:"请输入确认密码",trigger:"blur"},{validator:(f,b,y)=>{b!==n.formData.newPassword?y(new Error("两次输入的密码不一致")):y(void 0)}}]};function l(){const f=o.get("qlfyEcologicalLogin_"+D.componentId);if(!f||!f.loginServiceBaseAddress)return xe.error("组件参数获取失败~");let b={oldPassword:n.formData.oldPassword,newPassword:n.formData.newPassword};const y=u(".edit-password-dialog","加载中",!0);O.put(f.loginServiceBaseAddress+"/admin-api/system/user/profile/update-password",b,{headers:{Authorization:it(),"tenant-id":f.tenantId}}).then(g=>{if(y.close(),g.data.code)return xe.warning(g.data.msg);xe.success("修改成功"),r.isShow=!1}).catch(g=>{y.close()})}const p=s.ref();function d(){p.value.validate(f=>{f&&l()})}function u(f,b,y){return ws.service({target:document.querySelector(f),text:b,lock:y,background:"rgba(0, 0, 0, 0.7)"})}return(f,b)=>{const y=s.resolveComponent("el-input"),g=s.resolveComponent("el-form-item"),m=s.resolveComponent("el-form"),h=s.resolveComponent("el-button"),_=s.resolveComponent("el-dialog");return s.openBlock(),s.createBlock(_,s.mergeProps({modelValue:s.unref(U).isShow,"onUpdate:modelValue":b[4]||(b[4]=w=>s.unref(U).isShow=w),title:"修改密码",class:"edit-password-dialog",width:"500px"},{...a.dialogConfig,...s.unref(U).elDialogConfig}),{footer:s.withCtx(()=>[s.createVNode(h,{onClick:b[3]||(b[3]=w=>s.unref(U).isShow=!1)},{default:s.withCtx(()=>b[5]||(b[5]=[s.createTextVNode("取 消")])),_:1,__:[5]}),s.createVNode(h,{type:"primary",onClick:d},{default:s.withCtx(()=>b[6]||(b[6]=[s.createTextVNode("确 定")])),_:1,__:[6]})]),default:s.withCtx(()=>[s.createVNode(m,{ref_key:"formRef",ref:p,model:n.formData,"label-width":"120px",rules:i},{default:s.withCtx(()=>[s.createVNode(g,{label:"旧密码",prop:"oldPassword"},{default:s.withCtx(()=>[s.createVNode(y,{modelValue:n.formData.oldPassword,"onUpdate:modelValue":b[0]||(b[0]=w=>n.formData.oldPassword=w),type:"password"},null,8,["modelValue"])]),_:1}),s.createVNode(g,{label:"新密码",prop:"newPassword"},{default:s.withCtx(()=>[s.createVNode(y,{modelValue:n.formData.newPassword,"onUpdate:modelValue":b[1]||(b[1]=w=>n.formData.newPassword=w),type:"password"},null,8,["modelValue"])]),_:1}),s.createVNode(g,{label:"确认密码",prop:"newPasswordAgain"},{default:s.withCtx(()=>[s.createVNode(y,{modelValue:n.formData.newPasswordAgain,"onUpdate:modelValue":b[2]||(b[2]=w=>n.formData.newPasswordAgain=w),type:"password"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},16,["modelValue"])}}}),jn=s.defineComponent({__name:"index",props:{clientId:{},clientSecret:{},loginPageBaseAddress:{},loginServiceBaseAddress:{},useRouter:{},token:{},isEnabled:{type:Boolean,default:!0},listenToken:{type:Boolean,default:!1},redirectPath:{default:""},tokenName:{default:"access_token"},tokenValidity:{default:60*30},tenantId:{default:7},dialogConfig:{default:e=>({})}},emits:["loggingIn","loginSuccess"],setup(e,{expose:t,emit:n}){const r=e,o=r.useRouter,a=r.useRouter.currentRoute,i=n,l=new De;let p=null,d=!0;const u=ri();let f=null;const b=s.ref(!1);t({logout:Dn,getToken:it,getUserPermission:Fn}),D.componentId||(D.componentId=u,b.value=!0),s.onBeforeUnmount(()=>{p&&clearInterval(p);for(let w=0;w<localStorage.length;w++){let C=localStorage.key(w);C&&C.indexOf("qlfyEcologicalLogin_")>=0&&l.remove(C)}}),s.watch(()=>a.value.path,(w,C)=>{f&&clearTimeout(f),f=setTimeout(()=>{r.isEnabled&&y()},200)},{deep:!0,immediate:!0}),s.watch(()=>r.isEnabled,()=>{setTimeout(()=>{if(y(),!r.isEnabled){l.remove(r.tokenName);for(let w=0;w<localStorage.length;w++){let C=localStorage.key(w);C&&C.indexOf("qlfyEcologicalLogin_")===0&&l.remove(C)}l.remove("loginInfo")}})},{deep:!0}),s.watch(()=>r.token,w=>{},{});function y(){if(!r.isEnabled||u!==D.componentId)return;h(),r.token?(l.set(r.tokenName,r.token,r.tokenValidity),l.set("tokenType",1)):l.get(r.tokenName)&&(l.get("tokenType")==1&&l.remove(r.tokenName),l.set("tokenType",0));const w=l.get(r.tokenName);w&&l.set(r.tokenName,w,r.tokenValidity);const C=!!a.value.query.token;if(D.userPermission=null,!w&&C){i("loggingIn",a.value.query.token),l.set(r.tokenName,a.value.query.token,r.tokenValidity),l.set("refreshToken",a.value.query.refreshToken);let T={...a.value.query};delete T.token,delete T.refreshToken,o.replace({path:a.value.path,query:T}),m(w)}else w&&d?(g(w),d=!1):lt()}function g(w){let C={token:w};const T={"tenant-id":r.tenantId,Authorization:"Basic "+btoa(r.clientId+":"+r.clientSecret)};O.post(r.loginServiceBaseAddress+"/admin-api/system/oauth2/check-token","",{params:C,headers:T}).then(x=>{if(x.data.code){l.remove(r.tokenName),lt();return}m(w),_()}).catch(x=>{console.log(x)})}function m(w){let C={clientId:r.clientId};const T={"tenant-id":r.tenantId,Authorization:w};O.get(r.loginServiceBaseAddress+"/admin-api/system/auth/get-permission-info",{params:C,headers:T}).then(x=>{D.userPermission=u,i("loginSuccess",x.data)}).catch(x=>{console.log(x)})}function h(){if(u!==D.componentId)return;for(let C=0;C<localStorage.length;C++){let T=localStorage.key(C);T&&T.indexOf("qlfyEcologicalLogin_")===0&&l.remove(T)}const w={...r};delete w.useRouter,l.set("qlfyEcologicalLogin_"+u,w)}function _(){r.listenToken&&(p&&clearInterval(p),p=setInterval(()=>{l.get(r.tokenName)||(clearInterval(p),xe.warning("登录状态丢失,正在重新获取~"),setTimeout(()=>{y()},2e3))},1e3))}return(w,C)=>b.value?(s.openBlock(),s.createBlock(ii,{key:0,"dialog-config":r.dialogConfig},null,8,["dialog-config"])):s.createCommentVNode("",!0)}}),li=jn,ci={install(e){e.component("qlfyEcologicalLogin",jn)}};R.LocalStorageManager=ti,R.closeChangePassword=si,R.default=ci,R.getToken=it,R.getUserPermission=Fn,R.logout=Dn,R.openChangePassword=oi,R.qlfyEcologicalLogin=li,R.setDialogConfig=ai,Object.defineProperties(R,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qlfy-ecological-login",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "",
5
5
  "types": "lib/index.d.ts",
6
6
  "module": "lib/index.umd.js",