@das-fed/utils 7.0.7-hot.64 → 7.0.7-hot.65

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.
@@ -1,11 +1,11 @@
1
- import { getConfig as Be } from "@das-fed/utils/config";
1
+ import { getConfig as ae } from "@das-fed/utils/config";
2
2
  import { clearPlatformAuthStorage as De, getAccessToken as lt } from "@das-fed/utils/token-tools";
3
3
  function je(e, t) {
4
4
  return function() {
5
5
  return e.apply(t, arguments);
6
6
  };
7
7
  }
8
- const { toString: ft } = Object.prototype, { getPrototypeOf: me } = Object, { iterator: Q, toStringTag: Ie } = Symbol, Y = /* @__PURE__ */ ((e) => (t) => {
8
+ const { toString: ft } = Object.prototype, { getPrototypeOf: ye } = Object, { iterator: Q, toStringTag: Ie } = Symbol, Y = /* @__PURE__ */ ((e) => (t) => {
9
9
  const n = ft.call(t);
10
10
  return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
11
11
  })(/* @__PURE__ */ Object.create(null)), x = (e) => (e = e.toLowerCase(), (t) => Y(t) === e), Z = (e) => (t) => typeof t === e, { isArray: B } = Array, I = Z("undefined");
@@ -20,7 +20,7 @@ function dt(e) {
20
20
  const pt = Z("string"), A = Z("function"), Me = Z("number"), M = (e) => e !== null && typeof e == "object", ht = (e) => e === !0 || e === !1, J = (e) => {
21
21
  if (Y(e) !== "object")
22
22
  return !1;
23
- const t = me(e);
23
+ const t = ye(e);
24
24
  return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Ie in e) && !(Q in e);
25
25
  }, mt = (e) => {
26
26
  if (!M(e) || q(e))
@@ -30,11 +30,11 @@ const pt = Z("string"), A = Z("function"), Me = Z("number"), M = (e) => e !== nu
30
30
  } catch {
31
31
  return !1;
32
32
  }
33
- }, yt = x("Date"), wt = x("File"), gt = x("Blob"), bt = x("FileList"), Et = (e) => M(e) && A(e.pipe), St = (e) => {
33
+ }, yt = x("Date"), wt = x("File"), gt = x("Blob"), bt = x("FileList"), St = (e) => M(e) && A(e.pipe), Et = (e) => {
34
34
  let t;
35
35
  return e && (typeof FormData == "function" && e instanceof FormData || A(e.append) && ((t = Y(e)) === "formdata" || // detect form-data instance
36
36
  t === "object" && A(e.toString) && e.toString() === "[object FormData]"));
37
- }, Rt = x("URLSearchParams"), [Tt, Ot, At, Ct] = ["ReadableStream", "Request", "Response", "Headers"].map(x), xt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
37
+ }, Rt = x("URLSearchParams"), [Ot, Tt, At, Ct] = ["ReadableStream", "Request", "Response", "Headers"].map(x), xt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
38
38
  function H(e, t, { allOwnKeys: n = !1 } = {}) {
39
39
  if (e === null || typeof e > "u")
40
40
  return;
@@ -63,10 +63,10 @@ function He(e, t) {
63
63
  return null;
64
64
  }
65
65
  const N = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, ze = (e) => !I(e) && e !== N;
66
- function ae() {
66
+ function ce() {
67
67
  const { caseless: e } = ze(this) && this || {}, t = {}, n = (r, s) => {
68
68
  const i = e && He(t, s) || s;
69
- J(t[i]) && J(r) ? t[i] = ae(t[i], r) : J(r) ? t[i] = ae({}, r) : B(r) ? t[i] = r.slice() : t[i] = r;
69
+ J(t[i]) && J(r) ? t[i] = ce(t[i], r) : J(r) ? t[i] = ce({}, r) : B(r) ? t[i] = r.slice() : t[i] = r;
70
70
  };
71
71
  for (let r = 0, s = arguments.length; r < s; r++)
72
72
  arguments[r] && H(arguments[r], n);
@@ -85,7 +85,7 @@ const _t = (e, t, n, { allOwnKeys: r } = {}) => (H(t, (s, i) => {
85
85
  do {
86
86
  for (s = Object.getOwnPropertyNames(e), i = s.length; i-- > 0; )
87
87
  o = s[i], (!r || r(o, e, t)) && !c[o] && (t[o] = e[o], c[o] = !0);
88
- e = n !== !1 && me(e);
88
+ e = n !== !1 && ye(e);
89
89
  } while (e && (!n || n(e, t)) && e !== Object.prototype);
90
90
  return t;
91
91
  }, Nt = (e, t, n) => {
@@ -101,7 +101,7 @@ const _t = (e, t, n, { allOwnKeys: r } = {}) => (H(t, (s, i) => {
101
101
  for (; t-- > 0; )
102
102
  n[t] = e[t];
103
103
  return n;
104
- }, kt = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && me(Uint8Array)), Bt = (e, t) => {
104
+ }, kt = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && ye(Uint8Array)), Bt = (e, t) => {
105
105
  const r = (e && e[Q]).call(e);
106
106
  let s;
107
107
  for (; (s = r.next()) && !s.done; ) {
@@ -119,7 +119,7 @@ const _t = (e, t, n, { allOwnKeys: r } = {}) => (H(t, (s, i) => {
119
119
  function(n, r, s) {
120
120
  return r.toUpperCase() + s;
121
121
  }
122
- ), Se = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), qt = x("RegExp"), $e = (e, t) => {
122
+ ), Re = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), qt = x("RegExp"), $e = (e, t) => {
123
123
  const n = Object.getOwnPropertyDescriptors(e), r = {};
124
124
  H(n, (s, i) => {
125
125
  let o;
@@ -182,7 +182,7 @@ const Jt = (e) => {
182
182
  isArray: B,
183
183
  isArrayBuffer: qe,
184
184
  isBuffer: q,
185
- isFormData: St,
185
+ isFormData: Et,
186
186
  isArrayBufferView: dt,
187
187
  isString: pt,
188
188
  isNumber: Me,
@@ -190,8 +190,8 @@ const Jt = (e) => {
190
190
  isObject: M,
191
191
  isPlainObject: J,
192
192
  isEmptyObject: mt,
193
- isReadableStream: Tt,
194
- isRequest: Ot,
193
+ isReadableStream: Ot,
194
+ isRequest: Tt,
195
195
  isResponse: At,
196
196
  isHeaders: Ct,
197
197
  isUndefined: I,
@@ -200,12 +200,12 @@ const Jt = (e) => {
200
200
  isBlob: gt,
201
201
  isRegExp: qt,
202
202
  isFunction: A,
203
- isStream: Et,
203
+ isStream: St,
204
204
  isURLSearchParams: Rt,
205
205
  isTypedArray: kt,
206
206
  isFileList: bt,
207
207
  forEach: H,
208
- merge: ae,
208
+ merge: ce,
209
209
  extend: _t,
210
210
  trim: xt,
211
211
  stripBOM: Ut,
@@ -218,8 +218,8 @@ const Jt = (e) => {
218
218
  forEachEntry: Bt,
219
219
  matchAll: Dt,
220
220
  isHTMLForm: jt,
221
- hasOwnProperty: Se,
222
- hasOwnProp: Se,
221
+ hasOwnProperty: Re,
222
+ hasOwnProp: Re,
223
223
  // an alias to avoid ESLint no-prototype-builtins detection
224
224
  reduceDescriptors: $e,
225
225
  freezeMethods: Mt,
@@ -289,19 +289,19 @@ m.from = (e, t, n, r, s, i) => {
289
289
  }, (c) => c !== "isAxiosError"), m.call(o, e.message, t, n, r, s), o.cause = e, o.name = e.name, i && Object.assign(o, i), o;
290
290
  };
291
291
  const Xt = null;
292
- function ce(e) {
292
+ function ue(e) {
293
293
  return a.isPlainObject(e) || a.isArray(e);
294
294
  }
295
295
  function Ke(e) {
296
296
  return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
297
297
  }
298
- function Re(e, t, n) {
298
+ function Oe(e, t, n) {
299
299
  return e ? e.concat(t).map(function(s, i) {
300
300
  return s = Ke(s), !n && i ? "[" + s + "]" : s;
301
301
  }).join(n ? "." : "") : t;
302
302
  }
303
303
  function Qt(e) {
304
- return a.isArray(e) && !e.some(ce);
304
+ return a.isArray(e) && !e.some(ue);
305
305
  }
306
306
  const Yt = a.toFlatObject(a, {}, null, function(t) {
307
307
  return /^is[A-Z]/.test(t);
@@ -338,36 +338,36 @@ function ee(e, t, n) {
338
338
  return y = Ke(y), b.forEach(function(R, U) {
339
339
  !(a.isUndefined(R) || R === null) && t.append(
340
340
  // eslint-disable-next-line no-nested-ternary
341
- o === !0 ? Re([y], U, i) : o === null ? y : y + "[]",
341
+ o === !0 ? Oe([y], U, i) : o === null ? y : y + "[]",
342
342
  l(R)
343
343
  );
344
344
  }), !1;
345
345
  }
346
- return ce(p) ? !0 : (t.append(Re(h, y, i), l(p)), !1);
346
+ return ue(p) ? !0 : (t.append(Oe(h, y, i), l(p)), !1);
347
347
  }
348
348
  const d = [], w = Object.assign(Yt, {
349
349
  defaultVisitor: u,
350
350
  convertValue: l,
351
- isVisitable: ce
351
+ isVisitable: ue
352
352
  });
353
- function E(p, y) {
353
+ function S(p, y) {
354
354
  if (!a.isUndefined(p)) {
355
355
  if (d.indexOf(p) !== -1)
356
356
  throw Error("Circular reference detected in " + y.join("."));
357
- d.push(p), a.forEach(p, function(b, S) {
357
+ d.push(p), a.forEach(p, function(b, E) {
358
358
  (!(a.isUndefined(b) || b === null) && s.call(
359
359
  t,
360
360
  b,
361
- a.isString(S) ? S.trim() : S,
361
+ a.isString(E) ? E.trim() : E,
362
362
  y,
363
363
  w
364
- )) === !0 && E(b, y ? y.concat(S) : [S]);
364
+ )) === !0 && S(b, y ? y.concat(E) : [E]);
365
365
  }), d.pop();
366
366
  }
367
367
  }
368
368
  if (!a.isObject(e))
369
369
  throw new TypeError("data must be an object");
370
- return E(e), t;
370
+ return S(e), t;
371
371
  }
372
372
  function Te(e) {
373
373
  const t = {
@@ -383,10 +383,10 @@ function Te(e) {
383
383
  return t[r];
384
384
  });
385
385
  }
386
- function ye(e, t) {
386
+ function we(e, t) {
387
387
  this._pairs = [], e && ee(e, this, t);
388
388
  }
389
- const We = ye.prototype;
389
+ const We = we.prototype;
390
390
  We.append = function(t, n) {
391
391
  this._pairs.push([t, n]);
392
392
  };
@@ -410,13 +410,13 @@ function Ge(e, t, n) {
410
410
  });
411
411
  const s = n && n.serialize;
412
412
  let i;
413
- if (s ? i = s(t, n) : i = a.isURLSearchParams(t) ? t.toString() : new ye(t, n).toString(r), i) {
413
+ if (s ? i = s(t, n) : i = a.isURLSearchParams(t) ? t.toString() : new we(t, n).toString(r), i) {
414
414
  const o = e.indexOf("#");
415
415
  o !== -1 && (e = e.slice(0, o)), e += (e.indexOf("?") === -1 ? "?" : "&") + i;
416
416
  }
417
417
  return e;
418
418
  }
419
- class Oe {
419
+ class Ae {
420
420
  constructor() {
421
421
  this.handlers = [];
422
422
  }
@@ -474,7 +474,7 @@ const Xe = {
474
474
  silentJSONParsing: !0,
475
475
  forcedJSONParsing: !0,
476
476
  clarifyTimeoutError: !1
477
- }, en = typeof URLSearchParams < "u" ? URLSearchParams : ye, tn = typeof FormData < "u" ? FormData : null, nn = typeof Blob < "u" ? Blob : null, rn = {
477
+ }, en = typeof URLSearchParams < "u" ? URLSearchParams : we, tn = typeof FormData < "u" ? FormData : null, nn = typeof Blob < "u" ? Blob : null, rn = {
478
478
  isBrowser: !0,
479
479
  classes: {
480
480
  URLSearchParams: en,
@@ -482,22 +482,22 @@ const Xe = {
482
482
  Blob: nn
483
483
  },
484
484
  protocols: ["http", "https", "file", "blob", "url", "data"]
485
- }, we = typeof window < "u" && typeof document < "u", ue = typeof navigator == "object" && navigator || void 0, sn = we && (!ue || ["ReactNative", "NativeScript", "NS"].indexOf(ue.product) < 0), on = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
486
- self instanceof WorkerGlobalScope && typeof self.importScripts == "function", an = we && window.location.href || "http://localhost", cn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
485
+ }, ge = typeof window < "u" && typeof document < "u", le = typeof navigator == "object" && navigator || void 0, sn = ge && (!le || ["ReactNative", "NativeScript", "NS"].indexOf(le.product) < 0), on = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
486
+ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", an = ge && window.location.href || "http://localhost", cn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
487
487
  __proto__: null,
488
- hasBrowserEnv: we,
488
+ hasBrowserEnv: ge,
489
489
  hasStandardBrowserEnv: sn,
490
490
  hasStandardBrowserWebWorkerEnv: on,
491
- navigator: ue,
491
+ navigator: le,
492
492
  origin: an
493
- }, Symbol.toStringTag, { value: "Module" })), T = {
493
+ }, Symbol.toStringTag, { value: "Module" })), O = {
494
494
  ...cn,
495
495
  ...rn
496
496
  };
497
497
  function un(e, t) {
498
- return ee(e, new T.classes.URLSearchParams(), {
498
+ return ee(e, new O.classes.URLSearchParams(), {
499
499
  visitor: function(n, r, s, i) {
500
- return T.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
500
+ return O.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
501
501
  },
502
502
  ...t
503
503
  });
@@ -592,8 +592,8 @@ const z = {
592
592
  maxContentLength: -1,
593
593
  maxBodyLength: -1,
594
594
  env: {
595
- FormData: T.classes.FormData,
596
- Blob: T.classes.Blob
595
+ FormData: O.classes.FormData,
596
+ Blob: O.classes.Blob
597
597
  },
598
598
  validateStatus: function(t) {
599
599
  return t >= 200 && t < 300;
@@ -633,7 +633,7 @@ const pn = a.toObjectSet([
633
633
  `).forEach(function(o) {
634
634
  s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || t[n] && pn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
635
635
  }), t;
636
- }, Ae = Symbol("internals");
636
+ }, Ce = Symbol("internals");
637
637
  function j(e) {
638
638
  return e && String(e).trim().toLowerCase();
639
639
  }
@@ -788,7 +788,7 @@ let C = class {
788
788
  return n.forEach((s) => r.set(s)), r;
789
789
  }
790
790
  static accessor(t) {
791
- const r = (this[Ae] = this[Ae] = {
791
+ const r = (this[Ce] = this[Ce] = {
792
792
  accessors: {}
793
793
  }).accessors, s = this.prototype;
794
794
  function i(o) {
@@ -839,7 +839,7 @@ function bn(e) {
839
839
  const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
840
840
  return t && t[1] || "";
841
841
  }
842
- function En(e, t) {
842
+ function Sn(e, t) {
843
843
  e = e || 10;
844
844
  const n = new Array(e), r = new Array(e);
845
845
  let s = 0, i = 0, o;
@@ -851,11 +851,11 @@ function En(e, t) {
851
851
  w += n[d++], d = d % e;
852
852
  if (s = (s + 1) % e, s === i && (i = (i + 1) % e), l - o < t)
853
853
  return;
854
- const E = u && l - u;
855
- return E ? Math.round(w * 1e3 / E) : void 0;
854
+ const S = u && l - u;
855
+ return S ? Math.round(w * 1e3 / S) : void 0;
856
856
  };
857
857
  }
858
- function Sn(e, t) {
858
+ function En(e, t) {
859
859
  let n = 0, r = 1e3 / t, s, i;
860
860
  const o = (l, u = Date.now()) => {
861
861
  n = u, s = null, i && (clearTimeout(i), i = null), e(...l);
@@ -869,8 +869,8 @@ function Sn(e, t) {
869
869
  }
870
870
  const W = (e, t, n = 3) => {
871
871
  let r = 0;
872
- const s = En(50, 250);
873
- return Sn((i) => {
872
+ const s = Sn(50, 250);
873
+ return En((i) => {
874
874
  const o = i.loaded, c = i.lengthComputable ? i.total : void 0, f = o - r, l = s(f), u = o <= c;
875
875
  r = o;
876
876
  const d = {
@@ -886,17 +886,17 @@ const W = (e, t, n = 3) => {
886
886
  };
887
887
  e(d);
888
888
  }, n);
889
- }, Ce = (e, t) => {
889
+ }, xe = (e, t) => {
890
890
  const n = e != null;
891
891
  return [(r) => t[0]({
892
892
  lengthComputable: n,
893
893
  total: e,
894
894
  loaded: r
895
895
  }), t[1]];
896
- }, xe = (e) => (...t) => a.asap(() => e(...t)), Rn = T.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, T.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
897
- new URL(T.origin),
898
- T.navigator && /(msie|trident)/i.test(T.navigator.userAgent)
899
- ) : () => !0, Tn = T.hasStandardBrowserEnv ? (
896
+ }, _e = (e) => (...t) => a.asap(() => e(...t)), Rn = O.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, O.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
897
+ new URL(O.origin),
898
+ O.navigator && /(msie|trident)/i.test(O.navigator.userAgent)
899
+ ) : () => !0, On = O.hasStandardBrowserEnv ? (
900
900
  // Standard browser envs support document.cookie
901
901
  {
902
902
  write(e, t, n, r, s, i) {
@@ -923,17 +923,17 @@ const W = (e, t, n = 3) => {
923
923
  }
924
924
  }
925
925
  );
926
- function On(e) {
926
+ function Tn(e) {
927
927
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
928
928
  }
929
929
  function An(e, t) {
930
930
  return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
931
931
  }
932
932
  function et(e, t, n) {
933
- let r = !On(t);
933
+ let r = !Tn(t);
934
934
  return e && (r || n == !1) ? An(e, t) : t;
935
935
  }
936
- const _e = (e) => e instanceof C ? { ...e } : e;
936
+ const Ue = (e) => e instanceof C ? { ...e } : e;
937
937
  function k(e, t) {
938
938
  t = t || {};
939
939
  const n = {};
@@ -991,7 +991,7 @@ function k(e, t) {
991
991
  socketPath: o,
992
992
  responseEncoding: o,
993
993
  validateStatus: c,
994
- headers: (l, u, d) => s(_e(l), _e(u), d, !0)
994
+ headers: (l, u, d) => s(Ue(l), Ue(u), d, !0)
995
995
  };
996
996
  return a.forEach(Object.keys({ ...e, ...t }), function(u) {
997
997
  const d = f[u] || s, w = d(e[u], t[u], u);
@@ -1007,15 +1007,15 @@ const tt = (e) => {
1007
1007
  );
1008
1008
  let f;
1009
1009
  if (a.isFormData(n)) {
1010
- if (T.hasStandardBrowserEnv || T.hasStandardBrowserWebWorkerEnv)
1010
+ if (O.hasStandardBrowserEnv || O.hasStandardBrowserWebWorkerEnv)
1011
1011
  o.setContentType(void 0);
1012
1012
  else if ((f = o.getContentType()) !== !1) {
1013
1013
  const [l, ...u] = f ? f.split(";").map((d) => d.trim()).filter(Boolean) : [];
1014
1014
  o.setContentType([l || "multipart/form-data", ...u].join("; "));
1015
1015
  }
1016
1016
  }
1017
- if (T.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && Rn(t.url))) {
1018
- const l = s && i && Tn.read(i);
1017
+ if (O.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && Rn(t.url))) {
1018
+ const l = s && i && On.read(i);
1019
1019
  l && o.set(s, l);
1020
1020
  }
1021
1021
  return t;
@@ -1024,9 +1024,9 @@ const tt = (e) => {
1024
1024
  const s = tt(e);
1025
1025
  let i = s.data;
1026
1026
  const o = C.from(s.headers).normalize();
1027
- let { responseType: c, onUploadProgress: f, onDownloadProgress: l } = s, u, d, w, E, p;
1027
+ let { responseType: c, onUploadProgress: f, onDownloadProgress: l } = s, u, d, w, S, p;
1028
1028
  function y() {
1029
- E && E(), p && p(), s.cancelToken && s.cancelToken.unsubscribe(u), s.signal && s.signal.removeEventListener("abort", u);
1029
+ S && S(), p && p(), s.cancelToken && s.cancelToken.unsubscribe(u), s.signal && s.signal.removeEventListener("abort", u);
1030
1030
  }
1031
1031
  let h = new XMLHttpRequest();
1032
1032
  h.open(s.method.toUpperCase(), s.url, !0), h.timeout = s.timeout;
@@ -1035,7 +1035,7 @@ const tt = (e) => {
1035
1035
  return;
1036
1036
  const R = C.from(
1037
1037
  "getAllResponseHeaders" in h && h.getAllResponseHeaders()
1038
- ), O = {
1038
+ ), T = {
1039
1039
  data: !c || c === "text" || c === "json" ? h.responseText : h.response,
1040
1040
  status: h.status,
1041
1041
  statusText: h.statusText,
@@ -1047,7 +1047,7 @@ const tt = (e) => {
1047
1047
  n(P), y();
1048
1048
  }, function(P) {
1049
1049
  r(P), y();
1050
- }, O), h = null;
1050
+ }, T), h = null;
1051
1051
  }
1052
1052
  "onloadend" in h ? h.onloadend = b : h.onreadystatechange = function() {
1053
1053
  !h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(b);
@@ -1057,21 +1057,21 @@ const tt = (e) => {
1057
1057
  r(new m("Network Error", m.ERR_NETWORK, e, h)), h = null;
1058
1058
  }, h.ontimeout = function() {
1059
1059
  let U = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
1060
- const O = s.transitional || Xe;
1060
+ const T = s.transitional || Xe;
1061
1061
  s.timeoutErrorMessage && (U = s.timeoutErrorMessage), r(new m(
1062
1062
  U,
1063
- O.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
1063
+ T.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
1064
1064
  e,
1065
1065
  h
1066
1066
  )), h = null;
1067
- }, i === void 0 && o.setContentType(null), "setRequestHeader" in h && a.forEach(o.toJSON(), function(U, O) {
1068
- h.setRequestHeader(O, U);
1069
- }), a.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), c && c !== "json" && (h.responseType = s.responseType), l && ([w, p] = W(l, !0), h.addEventListener("progress", w)), f && h.upload && ([d, E] = W(f), h.upload.addEventListener("progress", d), h.upload.addEventListener("loadend", E)), (s.cancelToken || s.signal) && (u = (R) => {
1067
+ }, i === void 0 && o.setContentType(null), "setRequestHeader" in h && a.forEach(o.toJSON(), function(U, T) {
1068
+ h.setRequestHeader(T, U);
1069
+ }), a.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), c && c !== "json" && (h.responseType = s.responseType), l && ([w, p] = W(l, !0), h.addEventListener("progress", w)), f && h.upload && ([d, S] = W(f), h.upload.addEventListener("progress", d), h.upload.addEventListener("loadend", S)), (s.cancelToken || s.signal) && (u = (R) => {
1070
1070
  h && (r(!R || R.type ? new D(null, e, h) : R), h.abort(), h = null);
1071
1071
  }, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
1072
- const S = bn(s.url);
1073
- if (S && T.protocols.indexOf(S) === -1) {
1074
- r(new m("Unsupported protocol " + S + ":", m.ERR_BAD_REQUEST, e));
1072
+ const E = bn(s.url);
1073
+ if (E && O.protocols.indexOf(E) === -1) {
1074
+ r(new m("Unsupported protocol " + E + ":", m.ERR_BAD_REQUEST, e));
1075
1075
  return;
1076
1076
  }
1077
1077
  h.send(i || null);
@@ -1127,7 +1127,7 @@ const tt = (e) => {
1127
1127
  } finally {
1128
1128
  await t.cancel();
1129
1129
  }
1130
- }, Ue = (e, t, n, r) => {
1130
+ }, Le = (e, t, n, r) => {
1131
1131
  const s = Ln(e, t);
1132
1132
  let i = 0, o, c = (f) => {
1133
1133
  o || (o = !0, r && r(f));
@@ -1164,7 +1164,7 @@ const tt = (e) => {
1164
1164
  }
1165
1165
  }, Fn = nt && rt(() => {
1166
1166
  let e = !1;
1167
- const t = new Request(T.origin, {
1167
+ const t = new Request(O.origin, {
1168
1168
  body: new ReadableStream(),
1169
1169
  method: "POST",
1170
1170
  get duplex() {
@@ -1172,8 +1172,8 @@ const tt = (e) => {
1172
1172
  }
1173
1173
  }).headers.has("Content-Type");
1174
1174
  return e && !t;
1175
- }), Le = 64 * 1024, le = nt && rt(() => a.isReadableStream(new Response("").body)), G = {
1176
- stream: le && ((e) => e.body)
1175
+ }), Pe = 64 * 1024, fe = nt && rt(() => a.isReadableStream(new Response("").body)), G = {
1176
+ stream: fe && ((e) => e.body)
1177
1177
  };
1178
1178
  te && ((e) => {
1179
1179
  ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
@@ -1188,7 +1188,7 @@ const kn = async (e) => {
1188
1188
  if (a.isBlob(e))
1189
1189
  return e.size;
1190
1190
  if (a.isSpecCompliantForm(e))
1191
- return (await new Request(T.origin, {
1191
+ return (await new Request(O.origin, {
1192
1192
  method: "POST",
1193
1193
  body: e
1194
1194
  }).arrayBuffer()).byteLength;
@@ -1215,63 +1215,63 @@ const kn = async (e) => {
1215
1215
  fetchOptions: w
1216
1216
  } = tt(e);
1217
1217
  l = l ? (l + "").toLowerCase() : "text";
1218
- let E = _n([s, i && i.toAbortSignal()], o), p;
1219
- const y = E && E.unsubscribe && (() => {
1220
- E.unsubscribe();
1218
+ let S = _n([s, i && i.toAbortSignal()], o), p;
1219
+ const y = S && S.unsubscribe && (() => {
1220
+ S.unsubscribe();
1221
1221
  });
1222
1222
  let h;
1223
1223
  try {
1224
1224
  if (f && Fn && n !== "get" && n !== "head" && (h = await Bn(u, r)) !== 0) {
1225
- let O = new Request(t, {
1225
+ let T = new Request(t, {
1226
1226
  method: "POST",
1227
1227
  body: r,
1228
1228
  duplex: "half"
1229
1229
  }), L;
1230
- if (a.isFormData(r) && (L = O.headers.get("content-type")) && u.setContentType(L), O.body) {
1231
- const [P, $] = Ce(
1230
+ if (a.isFormData(r) && (L = T.headers.get("content-type")) && u.setContentType(L), T.body) {
1231
+ const [P, $] = xe(
1232
1232
  h,
1233
- W(xe(f))
1233
+ W(_e(f))
1234
1234
  );
1235
- r = Ue(O.body, Le, P, $);
1235
+ r = Le(T.body, Pe, P, $);
1236
1236
  }
1237
1237
  }
1238
1238
  a.isString(d) || (d = d ? "include" : "omit");
1239
1239
  const b = "credentials" in Request.prototype;
1240
1240
  p = new Request(t, {
1241
1241
  ...w,
1242
- signal: E,
1242
+ signal: S,
1243
1243
  method: n.toUpperCase(),
1244
1244
  headers: u.normalize().toJSON(),
1245
1245
  body: r,
1246
1246
  duplex: "half",
1247
1247
  credentials: b ? d : void 0
1248
1248
  });
1249
- let S = await fetch(p, w);
1250
- const R = le && (l === "stream" || l === "response");
1251
- if (le && (c || R && y)) {
1252
- const O = {};
1249
+ let E = await fetch(p, w);
1250
+ const R = fe && (l === "stream" || l === "response");
1251
+ if (fe && (c || R && y)) {
1252
+ const T = {};
1253
1253
  ["status", "statusText", "headers"].forEach((Ee) => {
1254
- O[Ee] = S[Ee];
1254
+ T[Ee] = E[Ee];
1255
1255
  });
1256
- const L = a.toFiniteNumber(S.headers.get("content-length")), [P, $] = c && Ce(
1256
+ const L = a.toFiniteNumber(E.headers.get("content-length")), [P, $] = c && xe(
1257
1257
  L,
1258
- W(xe(c), !0)
1258
+ W(_e(c), !0)
1259
1259
  ) || [];
1260
- S = new Response(
1261
- Ue(S.body, Le, P, () => {
1260
+ E = new Response(
1261
+ Le(E.body, Pe, P, () => {
1262
1262
  $ && $(), y && y();
1263
1263
  }),
1264
- O
1264
+ T
1265
1265
  );
1266
1266
  }
1267
1267
  l = l || "text";
1268
- let U = await G[a.findKey(G, l) || "text"](S, e);
1269
- return !R && y && y(), await new Promise((O, L) => {
1270
- Ze(O, L, {
1268
+ let U = await G[a.findKey(G, l) || "text"](E, e);
1269
+ return !R && y && y(), await new Promise((T, L) => {
1270
+ Ze(T, L, {
1271
1271
  data: U,
1272
- headers: C.from(S.headers),
1273
- status: S.status,
1274
- statusText: S.statusText,
1272
+ headers: C.from(E.headers),
1273
+ status: E.status,
1274
+ statusText: E.statusText,
1275
1275
  config: e,
1276
1276
  request: p
1277
1277
  });
@@ -1284,12 +1284,12 @@ const kn = async (e) => {
1284
1284
  }
1285
1285
  ) : m.from(b, b && b.code, e, p);
1286
1286
  }
1287
- }), fe = {
1287
+ }), de = {
1288
1288
  http: Xt,
1289
1289
  xhr: xn,
1290
1290
  fetch: Dn
1291
1291
  };
1292
- a.forEach(fe, (e, t) => {
1292
+ a.forEach(de, (e, t) => {
1293
1293
  if (e) {
1294
1294
  try {
1295
1295
  Object.defineProperty(e, "name", { value: t });
@@ -1298,7 +1298,7 @@ a.forEach(fe, (e, t) => {
1298
1298
  Object.defineProperty(e, "adapterName", { value: t });
1299
1299
  }
1300
1300
  });
1301
- const Pe = (e) => `- ${e}`, jn = (e) => a.isFunction(e) || e === null || e === !1, st = {
1301
+ const Ne = (e) => `- ${e}`, jn = (e) => a.isFunction(e) || e === null || e === !1, st = {
1302
1302
  getAdapter: (e) => {
1303
1303
  e = a.isArray(e) ? e : [e];
1304
1304
  const { length: t } = e;
@@ -1307,7 +1307,7 @@ const Pe = (e) => `- ${e}`, jn = (e) => a.isFunction(e) || e === null || e === !
1307
1307
  for (let i = 0; i < t; i++) {
1308
1308
  n = e[i];
1309
1309
  let o;
1310
- if (r = n, !jn(n) && (r = fe[(o = String(n)).toLowerCase()], r === void 0))
1310
+ if (r = n, !jn(n) && (r = de[(o = String(n)).toLowerCase()], r === void 0))
1311
1311
  throw new m(`Unknown adapter '${o}'`);
1312
1312
  if (r)
1313
1313
  break;
@@ -1318,8 +1318,8 @@ const Pe = (e) => `- ${e}`, jn = (e) => a.isFunction(e) || e === null || e === !
1318
1318
  ([c, f]) => `adapter ${c} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
1319
1319
  );
1320
1320
  let o = t ? i.length > 1 ? `since :
1321
- ` + i.map(Pe).join(`
1322
- `) : " " + Pe(i[0]) : "as no adapter specified";
1321
+ ` + i.map(Ne).join(`
1322
+ `) : " " + Ne(i[0]) : "as no adapter specified";
1323
1323
  throw new m(
1324
1324
  "There is no suitable adapter to dispatch the request " + o,
1325
1325
  "ERR_NOT_SUPPORT"
@@ -1327,13 +1327,13 @@ const Pe = (e) => `- ${e}`, jn = (e) => a.isFunction(e) || e === null || e === !
1327
1327
  }
1328
1328
  return r;
1329
1329
  },
1330
- adapters: fe
1330
+ adapters: de
1331
1331
  };
1332
1332
  function oe(e) {
1333
1333
  if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
1334
1334
  throw new D(null, e);
1335
1335
  }
1336
- function Ne(e) {
1336
+ function Fe(e) {
1337
1337
  return oe(e), e.headers = C.from(e.headers), e.data = se.call(
1338
1338
  e,
1339
1339
  e.transformRequest
@@ -1357,7 +1357,7 @@ const ot = "1.11.0", ne = {};
1357
1357
  return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
1358
1358
  };
1359
1359
  });
1360
- const Fe = {};
1360
+ const ke = {};
1361
1361
  ne.transitional = function(t, n, r) {
1362
1362
  function s(i, o) {
1363
1363
  return "[Axios v" + ot + "] Transitional option '" + i + "'" + o + (r ? ". " + r : "");
@@ -1368,7 +1368,7 @@ ne.transitional = function(t, n, r) {
1368
1368
  s(o, " has been removed" + (n ? " in " + n : "")),
1369
1369
  m.ERR_DEPRECATED
1370
1370
  );
1371
- return n && !Fe[o] && (Fe[o] = !0), t ? t(i, o, c) : !0;
1371
+ return n && !ke[o] && (ke[o] = !0), t ? t(i, o, c) : !0;
1372
1372
  };
1373
1373
  };
1374
1374
  ne.spelling = function(t) {
@@ -1398,8 +1398,8 @@ const K = {
1398
1398
  let F = class {
1399
1399
  constructor(t) {
1400
1400
  this.defaults = t || {}, this.interceptors = {
1401
- request: new Oe(),
1402
- response: new Oe()
1401
+ request: new Ae(),
1402
+ response: new Ae()
1403
1403
  };
1404
1404
  }
1405
1405
  /**
@@ -1464,24 +1464,24 @@ let F = class {
1464
1464
  });
1465
1465
  let u, d = 0, w;
1466
1466
  if (!f) {
1467
- const p = [Ne.bind(this), void 0];
1467
+ const p = [Fe.bind(this), void 0];
1468
1468
  for (p.unshift(...c), p.push(...l), w = p.length, u = Promise.resolve(n); d < w; )
1469
1469
  u = u.then(p[d++], p[d++]);
1470
1470
  return u;
1471
1471
  }
1472
1472
  w = c.length;
1473
- let E = n;
1473
+ let S = n;
1474
1474
  for (d = 0; d < w; ) {
1475
1475
  const p = c[d++], y = c[d++];
1476
1476
  try {
1477
- E = p(E);
1477
+ S = p(S);
1478
1478
  } catch (h) {
1479
1479
  y.call(this, h);
1480
1480
  break;
1481
1481
  }
1482
1482
  }
1483
1483
  try {
1484
- u = Ne.call(this, E);
1484
+ u = Fe.call(this, S);
1485
1485
  } catch (p) {
1486
1486
  return Promise.reject(p);
1487
1487
  }
@@ -1600,7 +1600,7 @@ function Mn(e) {
1600
1600
  function Hn(e) {
1601
1601
  return a.isObject(e) && e.isAxiosError === !0;
1602
1602
  }
1603
- const de = {
1603
+ const pe = {
1604
1604
  Continue: 100,
1605
1605
  SwitchingProtocols: 101,
1606
1606
  Processing: 102,
@@ -1665,8 +1665,8 @@ const de = {
1665
1665
  NotExtended: 510,
1666
1666
  NetworkAuthenticationRequired: 511
1667
1667
  };
1668
- Object.entries(de).forEach(([e, t]) => {
1669
- de[t] = e;
1668
+ Object.entries(pe).forEach(([e, t]) => {
1669
+ pe[t] = e;
1670
1670
  });
1671
1671
  function at(e) {
1672
1672
  const t = new F(e), n = je(F.prototype.request, t);
@@ -1692,25 +1692,25 @@ g.mergeConfig = k;
1692
1692
  g.AxiosHeaders = C;
1693
1693
  g.formToJSON = (e) => Qe(a.isHTMLForm(e) ? new FormData(e) : e);
1694
1694
  g.getAdapter = st.getAdapter;
1695
- g.HttpStatusCode = de;
1695
+ g.HttpStatusCode = pe;
1696
1696
  g.default = g;
1697
1697
  const {
1698
- Axios: nr,
1699
- AxiosError: rr,
1700
- CanceledError: sr,
1701
- isCancel: or,
1702
- CancelToken: ir,
1703
- VERSION: ar,
1704
- all: cr,
1705
- Cancel: ur,
1706
- isAxiosError: lr,
1707
- spread: fr,
1708
- toFormData: dr,
1709
- AxiosHeaders: pr,
1710
- HttpStatusCode: hr,
1711
- formToJSON: mr,
1712
- getAdapter: yr,
1713
- mergeConfig: wr
1698
+ Axios: rr,
1699
+ AxiosError: sr,
1700
+ CanceledError: or,
1701
+ isCancel: ir,
1702
+ CancelToken: ar,
1703
+ VERSION: cr,
1704
+ all: ur,
1705
+ Cancel: lr,
1706
+ isAxiosError: fr,
1707
+ spread: dr,
1708
+ toFormData: pr,
1709
+ AxiosHeaders: hr,
1710
+ HttpStatusCode: mr,
1711
+ formToJSON: yr,
1712
+ getAdapter: wr,
1713
+ mergeConfig: gr
1714
1714
  } = g;
1715
1715
  /*! js-cookie v3.0.5 | MIT */
1716
1716
  function v(e) {
@@ -1732,7 +1732,7 @@ var zn = {
1732
1732
  );
1733
1733
  }
1734
1734
  };
1735
- function pe(e, t) {
1735
+ function he(e, t) {
1736
1736
  function n(s, i, o) {
1737
1737
  if (!(typeof document > "u")) {
1738
1738
  o = v({}, t, o), typeof o.expires == "number" && (o.expires = new Date(Date.now() + o.expires * 864e5)), o.expires && (o.expires = o.expires.toUTCString()), s = encodeURIComponent(s).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
@@ -1770,10 +1770,10 @@ function pe(e, t) {
1770
1770
  );
1771
1771
  },
1772
1772
  withAttributes: function(s) {
1773
- return pe(this.converter, v({}, this.attributes, s));
1773
+ return he(this.converter, v({}, this.attributes, s));
1774
1774
  },
1775
1775
  withConverter: function(s) {
1776
- return pe(v({}, this.converter, s), this.attributes);
1776
+ return he(v({}, this.converter, s), this.attributes);
1777
1777
  }
1778
1778
  },
1779
1779
  {
@@ -1782,38 +1782,38 @@ function pe(e, t) {
1782
1782
  }
1783
1783
  );
1784
1784
  }
1785
- var ke = pe(zn, { path: "/" });
1785
+ var Be = he(zn, { path: "/" });
1786
1786
  const ie = "loginType", $n = (e) => new URL(location.href).searchParams.get(e), vn = () => {
1787
1787
  const e = $n(ie) || "";
1788
1788
  return e ? (localStorage.setItem(ie, e), e) : localStorage.getItem(ie) || "";
1789
- }, Jn = "/api/justauth/client/v1/visitor/sso-param", Vn = "/api/justauth/client/v1/visitor/jmc/sso/status", X = "thirdLogouSource", Kn = ["zhongshen", "jmc"], Wn = {
1789
+ }, Jn = "/api/justauth/client/v1/visitor/sso-param", Vn = "/api/justauth/client/v1/visitor/jmc/sso/status", Kn = "/api/justauth/client/v1/jmc/sso/logout", X = "thirdLogouSource", Wn = ["zhongshen", "jmc"], Gn = {
1790
1790
  uat: "https://sso-uat.jmc.com.cn"
1791
1791
  };
1792
- let ge = "";
1793
- const he = (e) => {
1792
+ let be = "";
1793
+ const me = (e) => {
1794
1794
  if (e == null) return "";
1795
1795
  const t = String(e).trim();
1796
1796
  if (!t) return "";
1797
1797
  const n = t.toLowerCase();
1798
1798
  return n === "undefined" || n === "null" ? "" : t;
1799
- }, gr = (e) => {
1800
- const t = he(e);
1799
+ }, br = (e) => {
1800
+ const t = me(e);
1801
1801
  return t ? (localStorage.setItem(X, t), !0) : !1;
1802
- }, be = () => {
1803
- const e = localStorage.getItem(X), t = he(e);
1804
- return e !== null && !t && localStorage.removeItem(X), t || he(ge);
1802
+ }, Se = () => {
1803
+ const e = localStorage.getItem(X), t = me(e);
1804
+ return e !== null && !t && localStorage.removeItem(X), t || me(be);
1805
1805
  }, ct = (e) => {
1806
1806
  const t = vn();
1807
- return e === "jmc" && t === "das" ? !1 : Kn.includes(e);
1808
- }, br = () => ct(be()), ut = (e) => {
1809
- ge = be(), localStorage.removeItem(X), window.__isAutoCloseApp = !1, location.href = e;
1810
- }, Gn = (e) => {
1807
+ return e === "jmc" && t === "das" ? !1 : Wn.includes(e);
1808
+ }, Sr = () => ct(Se()), ut = (e) => {
1809
+ be = Se(), localStorage.removeItem(X), window.__isAutoCloseApp = !1, location.href = e;
1810
+ }, Xn = (e) => {
1811
1811
  De();
1812
1812
  const n = `https://iam.shenyejituan.com:443/idp/profile/OAUTH2/Redirect/GLO?redirctToUrl=${encodeURIComponent(e)}&entityId=AIoT&redirectToLogin=true`;
1813
1813
  ut(n);
1814
- }, Xn = async (e = "") => {
1814
+ }, Qn = async (e = "") => {
1815
1815
  try {
1816
- const { baseURL: t } = Be();
1816
+ const { baseURL: t } = ae();
1817
1817
  await g.create().post(
1818
1818
  Vn,
1819
1819
  {
@@ -1825,12 +1825,12 @@ const he = (e) => {
1825
1825
  );
1826
1826
  } catch {
1827
1827
  }
1828
- }, Qn = async () => {
1828
+ }, Yn = async () => {
1829
1829
  let e = "";
1830
1830
  try {
1831
- const { baseURL: s } = Be();
1831
+ const { baseURL: r } = ae();
1832
1832
  e = (await g.create().get(Jn, {
1833
- baseURL: s,
1833
+ baseURL: r,
1834
1834
  params: {
1835
1835
  source: "jmc",
1836
1836
  fieldKey: "homeUrl"
@@ -1838,33 +1838,34 @@ const he = (e) => {
1838
1838
  })).data || "";
1839
1839
  } catch {
1840
1840
  }
1841
- const t = (() => {
1841
+ const n = (() => {
1842
1842
  if (!e) return "";
1843
1843
  try {
1844
1844
  return new URL(e).origin;
1845
1845
  } catch {
1846
1846
  return "";
1847
1847
  }
1848
- })(), n = t === Wn.uat ? ke.get("sso_access_token_uat") : ke.get("sso_access_token"), r = `${t}/oauth2/system/auth/logout?sso_token=${n}`;
1848
+ })() === Gn.uat ? Be.get("sso_access_token_uat") : Be.get("sso_access_token");
1849
1849
  try {
1850
- await g.post(r);
1850
+ const { baseURL: r } = ae();
1851
+ await g.create().post(Kn, { ssoToken: n }, { baseURL: r });
1851
1852
  } catch {
1852
1853
  }
1853
- await Xn(n), De(), ut(e);
1854
+ await Qn(n), De(), ut(e);
1854
1855
  }, Er = async (e = "") => {
1855
- const t = be();
1856
+ const t = Se();
1856
1857
  if (ct(t)) {
1857
- if (ge = t, t === "zhongshen") {
1858
- Gn(e);
1858
+ if (be = t, t === "zhongshen") {
1859
+ Xn(e);
1859
1860
  return;
1860
1861
  }
1861
- t === "jmc" && await Qn();
1862
+ t === "jmc" && await Yn();
1862
1863
  }
1863
1864
  };
1864
1865
  export {
1865
- br as isThirdLogin,
1866
- Qn as jmcLogout,
1867
- gr as setThirdLogoutSource,
1866
+ Sr as isThirdLogin,
1867
+ Yn as jmcLogout,
1868
+ br as setThirdLogoutSource,
1868
1869
  Er as thirdLogout,
1869
- Gn as zhongshenLogout
1870
+ Xn as zhongshenLogout
1870
1871
  };