yxuse 3.0.20 → 3.0.21

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.
Binary file
package/lib/index.es3.js CHANGED
@@ -1,7 +1,7 @@
1
1
  var nt = Object.defineProperty;
2
2
  var we = Object.getOwnPropertySymbols;
3
3
  var rt = Object.prototype.hasOwnProperty, st = Object.prototype.propertyIsEnumerable;
4
- var X = (e, t, n) => t in e ? nt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, k = (e, t) => {
4
+ var X = (e, t, n) => t in e ? nt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, L = (e, t) => {
5
5
  for (var n in t || (t = {}))
6
6
  rt.call(t, n) && X(e, n, t[n]);
7
7
  if (we)
@@ -35,9 +35,9 @@ function Ue(e, t) {
35
35
  const { toString: _e } = Object.prototype, { getPrototypeOf: ie } = Object, ae = /* @__PURE__ */ ((e) => (t) => {
36
36
  const n = _e.call(t);
37
37
  return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
38
- })(/* @__PURE__ */ Object.create(null)), A = (e) => (e = e.toLowerCase(), (t) => ae(t) === e), z = (e) => (t) => typeof t === e, { isArray: C } = Array, _ = z("undefined");
38
+ })(/* @__PURE__ */ Object.create(null)), A = (e) => (e = e.toLowerCase(), (t) => ae(t) === e), z = (e) => (t) => typeof t === e, { isArray: C } = Array, F = z("undefined");
39
39
  function it(e) {
40
- return e !== null && !_(e) && e.constructor !== null && !_(e.constructor) && N(e.constructor.isBuffer) && e.constructor.isBuffer(e);
40
+ return e !== null && !F(e) && e.constructor !== null && !F(e.constructor) && N(e.constructor.isBuffer) && e.constructor.isBuffer(e);
41
41
  }
42
42
  const Fe = A("ArrayBuffer");
43
43
  function at(e) {
@@ -53,7 +53,7 @@ const ct = z("string"), N = z("function"), Be = z("number"), ce = (e) => e !== n
53
53
  const t = "[object FormData]";
54
54
  return e && (typeof FormData == "function" && e instanceof FormData || _e.call(e) === t || N(e.toString) && e.toString() === t);
55
55
  }, yt = A("URLSearchParams"), wt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
56
- function F(e, t, { allOwnKeys: n = !1 } = {}) {
56
+ function B(e, t, { allOwnKeys: n = !1 } = {}) {
57
57
  if (e === null || typeof e == "undefined")
58
58
  return;
59
59
  let r, s;
@@ -76,17 +76,17 @@ function De(e, t) {
76
76
  return s;
77
77
  return null;
78
78
  }
79
- const ke = typeof globalThis != "undefined" ? globalThis : typeof self != "undefined" ? self : typeof window != "undefined" ? window : global, Ie = (e) => !_(e) && e !== ke;
79
+ const ke = typeof globalThis != "undefined" ? globalThis : typeof self != "undefined" ? self : typeof window != "undefined" ? window : global, Ie = (e) => !F(e) && e !== ke;
80
80
  function te() {
81
81
  const { caseless: e } = Ie(this) && this || {}, t = {}, n = (r, s) => {
82
82
  const i = e && De(t, s) || s;
83
83
  j(t[i]) && j(r) ? t[i] = te(t[i], r) : j(r) ? t[i] = te({}, r) : C(r) ? t[i] = r.slice() : t[i] = r;
84
84
  };
85
85
  for (let r = 0, s = arguments.length; r < s; r++)
86
- arguments[r] && F(arguments[r], n);
86
+ arguments[r] && B(arguments[r], n);
87
87
  return t;
88
88
  }
89
- const Et = (e, t, n, { allOwnKeys: r } = {}) => (F(t, (s, i) => {
89
+ const Et = (e, t, n, { allOwnKeys: r } = {}) => (B(t, (s, i) => {
90
90
  n && N(s) ? e[i] = Ue(s, n) : e[i] = s;
91
91
  }, { allOwnKeys: r }), e), St = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), bt = (e, t, n, r) => {
92
92
  e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
@@ -139,7 +139,7 @@ const Et = (e, t, n, { allOwnKeys: r } = {}) => (F(t, (s, i) => {
139
139
  }
140
140
  ), be = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Ct = A("RegExp"), je = (e, t) => {
141
141
  const n = Object.getOwnPropertyDescriptors(e), r = {};
142
- F(n, (s, i) => {
142
+ B(n, (s, i) => {
143
143
  t(s, i, e) !== !1 && (r[i] = s);
144
144
  }), Object.defineProperties(e, r);
145
145
  }, Lt = (e) => {
@@ -187,9 +187,9 @@ const kt = (e) => {
187
187
  if (!("toJSON" in r)) {
188
188
  t[s] = r;
189
189
  const i = C(r) ? [] : {};
190
- return F(r, (o, c) => {
190
+ return B(r, (o, c) => {
191
191
  const l = n(o, s + 1);
192
- !_(l) && (i[c] = l);
192
+ !F(l) && (i[c] = l);
193
193
  }), t[s] = void 0, i;
194
194
  }
195
195
  }
@@ -207,7 +207,7 @@ const kt = (e) => {
207
207
  isBoolean: ut,
208
208
  isObject: ce,
209
209
  isPlainObject: j,
210
- isUndefined: _,
210
+ isUndefined: F,
211
211
  isDate: lt,
212
212
  isFile: ft,
213
213
  isBlob: dt,
@@ -217,7 +217,7 @@ const kt = (e) => {
217
217
  isURLSearchParams: yt,
218
218
  isTypedArray: At,
219
219
  isFileList: pt,
220
- forEach: F,
220
+ forEach: B,
221
221
  merge: te,
222
222
  extend: Et,
223
223
  trim: wt,
@@ -344,11 +344,11 @@ function V(e, t, n) {
344
344
  if (a.endsWith(h, "{}"))
345
345
  h = r ? h : h.slice(0, -2), d = JSON.stringify(d);
346
346
  else if (a.isArray(d) && jt(d) || (a.isFileList(d) || a.endsWith(h, "[]")) && (b = a.toArray(d)))
347
- return h = Je(h), b.forEach(function(D, tt) {
348
- !(a.isUndefined(D) || D === null) && t.append(
347
+ return h = Je(h), b.forEach(function(k, tt) {
348
+ !(a.isUndefined(k) || k === null) && t.append(
349
349
  // eslint-disable-next-line no-nested-ternary
350
350
  o === !0 ? ge([h], tt, i) : o === null ? h : h + "[]",
351
- u(D)
351
+ u(k)
352
352
  );
353
353
  }), !1;
354
354
  }
@@ -635,7 +635,7 @@ const le = G, Xt = a.toObjectSet([
635
635
  s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || t[n] && Xt[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
636
636
  }), t;
637
637
  }, Te = Symbol("internals");
638
- function L(e) {
638
+ function U(e) {
639
639
  return e && String(e).trim().toLowerCase();
640
640
  }
641
641
  function H(e) {
@@ -682,7 +682,7 @@ class $ {
682
682
  set(t, n, r) {
683
683
  const s = this;
684
684
  function i(c, l, u) {
685
- const f = L(l);
685
+ const f = U(l);
686
686
  if (!f)
687
687
  throw new Error("header name must be a non-empty string");
688
688
  const p = a.findKey(s, f);
@@ -692,7 +692,7 @@ class $ {
692
692
  return a.isPlainObject(t) || t instanceof this.constructor ? o(t, n) : a.isString(t) && (t = t.trim()) && !Zt(t) ? o(Qt(t), n) : t != null && i(n, t, r), this;
693
693
  }
694
694
  get(t, n) {
695
- if (t = L(t), t) {
695
+ if (t = U(t), t) {
696
696
  const r = a.findKey(this, t);
697
697
  if (r) {
698
698
  const s = this[r];
@@ -709,7 +709,7 @@ class $ {
709
709
  }
710
710
  }
711
711
  has(t, n) {
712
- if (t = L(t), t) {
712
+ if (t = U(t), t) {
713
713
  const r = a.findKey(this, t);
714
714
  return !!(r && this[r] !== void 0 && (!n || Y(this, this[r], r, n)));
715
715
  }
@@ -719,7 +719,7 @@ class $ {
719
719
  const r = this;
720
720
  let s = !1;
721
721
  function i(o) {
722
- if (o = L(o), o) {
722
+ if (o = U(o), o) {
723
723
  const c = a.findKey(r, o);
724
724
  c && (!n || Y(r, r[c], c, n)) && (delete r[c], s = !0);
725
725
  }
@@ -778,7 +778,7 @@ class $ {
778
778
  accessors: {}
779
779
  }).accessors, s = this.prototype;
780
780
  function i(o) {
781
- const c = L(o);
781
+ const c = U(o);
782
782
  r[c] || (tn(s, o), r[c] = !0);
783
783
  }
784
784
  return a.isArray(t) ? t.forEach(i) : i(t), this;
@@ -798,10 +798,10 @@ function Z(e, t) {
798
798
  function ve(e) {
799
799
  return !!(e && e.__CANCEL__);
800
800
  }
801
- function B(e, t, n) {
801
+ function D(e, t, n) {
802
802
  m.call(this, e == null ? "canceled" : e, m.ERR_CANCELED, t, n), this.name = "CanceledError";
803
803
  }
804
- a.inherits(B, m, {
804
+ a.inherits(D, m, {
805
805
  __CANCEL__: !0
806
806
  });
807
807
  function nn(e, t, n) {
@@ -981,7 +981,7 @@ const ln = typeof XMLHttpRequest != "undefined", fn = ln && function(e) {
981
981
  s === void 0 && i.setContentType(null), "setRequestHeader" in u && a.forEach(i.toJSON(), function(d, h) {
982
982
  u.setRequestHeader(h, d);
983
983
  }), a.isUndefined(e.withCredentials) || (u.withCredentials = !!e.withCredentials), o && o !== "json" && (u.responseType = e.responseType), typeof e.onDownloadProgress == "function" && u.addEventListener("progress", Ne(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && u.upload && u.upload.addEventListener("progress", Ne(e.onUploadProgress)), (e.cancelToken || e.signal) && (c = (y) => {
984
- u && (r(!y || y.type ? new B(null, e, u) : y), u.abort(), u = null);
984
+ u && (r(!y || y.type ? new D(null, e, u) : y), u.abort(), u = null);
985
985
  }, e.cancelToken && e.cancelToken.subscribe(c), e.signal && (e.signal.aborted ? c() : e.signal.addEventListener("abort", c)));
986
986
  const E = cn(f);
987
987
  if (E && O.protocols.indexOf(E) === -1) {
@@ -1025,7 +1025,7 @@ const dn = {
1025
1025
  };
1026
1026
  function ee(e) {
1027
1027
  if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
1028
- throw new B(null, e);
1028
+ throw new D(null, e);
1029
1029
  }
1030
1030
  function Pe(e) {
1031
1031
  return ee(e), e.headers = R.from(e.headers), e.data = Z.call(
@@ -1285,7 +1285,7 @@ class de {
1285
1285
  r.unsubscribe(i);
1286
1286
  }, o;
1287
1287
  }, t(function(i, o, c) {
1288
- r.reason || (r.reason = new B(i, o, c), n(r.reason));
1288
+ r.reason || (r.reason = new D(i, o, c), n(r.reason));
1289
1289
  });
1290
1290
  }
1291
1291
  /**
@@ -1414,7 +1414,7 @@ function Xe(e) {
1414
1414
  }
1415
1415
  const w = Xe(le);
1416
1416
  w.Axios = q;
1417
- w.CanceledError = B;
1417
+ w.CanceledError = D;
1418
1418
  w.CancelToken = hn;
1419
1419
  w.isCancel = ve;
1420
1420
  w.VERSION = We;
@@ -1467,7 +1467,7 @@ const En = {
1467
1467
  window.location.replace(he());
1468
1468
  }, he = () => W("homeUrl"), me = (e) => {
1469
1469
  var r;
1470
- const t = (r = localStorage.getItem("ttcGlobalState")) != null ? r : "{}", n = k(k({}, JSON.parse(t)), e);
1470
+ const t = (r = localStorage.getItem("ttcGlobalState")) != null ? r : "{}", n = L(L({}, JSON.parse(t)), e);
1471
1471
  localStorage.setItem("ttcGlobalState", JSON.stringify(n));
1472
1472
  }, W = (e) => {
1473
1473
  var n, r;
@@ -1534,11 +1534,11 @@ const Pn = {
1534
1534
  }, Cn = () => {
1535
1535
  et.close();
1536
1536
  };
1537
- let U = 0;
1537
+ let _ = 0;
1538
1538
  const Ln = () => {
1539
- U === 0 && xn(), U++;
1539
+ _ === 0 && xn(), _++;
1540
1540
  }, Le = () => {
1541
- U <= 0 || (U--, U === 0 && Cn());
1541
+ _ <= 0 || (_--, _ === 0 && Cn());
1542
1542
  };
1543
1543
  var oe = /* @__PURE__ */ ((e) => (e[e.SUCCESS = 200] = "SUCCESS", e[e.ERROR = 500] = "ERROR", e[e.OVERDUE = 401] = "OVERDUE", e[e.TIMEOUT = 3e4] = "TIMEOUT", e))(oe || {});
1544
1544
  const Un = {
@@ -1627,7 +1627,7 @@ class Fn {
1627
1627
  * @description get 请求
1628
1628
  */
1629
1629
  get(t, n, r = {}) {
1630
- return this.service.get(t, k({ params: n }, r));
1630
+ return this.service.get(t, L({ params: n }, r));
1631
1631
  }
1632
1632
  /**
1633
1633
  *
@@ -1655,7 +1655,7 @@ class Fn {
1655
1655
  * @param options : AxiosRequestConfig
1656
1656
  */
1657
1657
  delete(t, n, r = {}) {
1658
- return this.service.delete(t, n, r);
1658
+ return this.service.delete(t, L({ params: n }, r));
1659
1659
  }
1660
1660
  }
1661
1661
  const ye = new Fn(Un);
Binary file