@das-fed/utils 7.1.0-dev.11 → 7.1.0-dev.13
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/api-services/modules/app-manage/index.js +743 -725
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/bems/index.js +746 -728
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/index.js +702 -716
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/iot/index.js +984 -1002
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/justauth/index.js +726 -744
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/permission/index.js +725 -743
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/super-admin/index.js +727 -745
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/index.js +702 -716
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/index.js +743 -725
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/common-tools/platform-tools/index.d.ts +7 -2
- package/common-tools/platform-tools/index.js +27 -15
- package/common-tools/platform-tools/index.js.gz +0 -0
- package/create-api-service/sso/index.d.ts +9 -6
- package/create-api-service/sso/index.js +207 -193
- package/create-api-service/sso/index.js.gz +0 -0
- package/esm-map.json +2 -1
- package/package.json +4 -4
- package/token-tools/index.d.ts +4 -1
- package/token-tools/index.js +23 -23
- package/token-tools/index.js.gz +0 -0
|
@@ -243,10 +243,10 @@ const _n = (e) => {
|
|
|
243
243
|
asap: kn,
|
|
244
244
|
isIterable: Pn
|
|
245
245
|
};
|
|
246
|
-
function
|
|
246
|
+
function y(e, t, n, r, o) {
|
|
247
247
|
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), o && (this.response = o, this.status = o.status ? o.status : null);
|
|
248
248
|
}
|
|
249
|
-
c.inherits(
|
|
249
|
+
c.inherits(y, Error, {
|
|
250
250
|
toJSON: function() {
|
|
251
251
|
return {
|
|
252
252
|
// Standard
|
|
@@ -267,7 +267,7 @@ c.inherits(w, Error, {
|
|
|
267
267
|
};
|
|
268
268
|
}
|
|
269
269
|
});
|
|
270
|
-
const ht =
|
|
270
|
+
const ht = y.prototype, mt = {};
|
|
271
271
|
[
|
|
272
272
|
"ERR_BAD_OPTION_VALUE",
|
|
273
273
|
"ERR_BAD_OPTION",
|
|
@@ -285,13 +285,13 @@ const ht = w.prototype, mt = {};
|
|
|
285
285
|
].forEach((e) => {
|
|
286
286
|
mt[e] = { value: e };
|
|
287
287
|
});
|
|
288
|
-
Object.defineProperties(
|
|
288
|
+
Object.defineProperties(y, mt);
|
|
289
289
|
Object.defineProperty(ht, "isAxiosError", { value: !0 });
|
|
290
|
-
|
|
290
|
+
y.from = (e, t, n, r, o, s) => {
|
|
291
291
|
const i = Object.create(ht);
|
|
292
292
|
return c.toFlatObject(e, i, function(f) {
|
|
293
293
|
return f !== Error.prototype;
|
|
294
|
-
}, (a) => a !== "isAxiosError"),
|
|
294
|
+
}, (a) => a !== "isAxiosError"), y.call(i, e.message, t, n, r, o), i.cause = e, i.name = e.name, s && Object.assign(i, s), i;
|
|
295
295
|
};
|
|
296
296
|
const Ln = null;
|
|
297
297
|
function ge(e) {
|
|
@@ -318,55 +318,55 @@ function ue(e, t, n) {
|
|
|
318
318
|
metaTokens: !0,
|
|
319
319
|
dots: !1,
|
|
320
320
|
indexes: !1
|
|
321
|
-
}, !1, function(
|
|
322
|
-
return !c.isUndefined(h[
|
|
321
|
+
}, !1, function(m, h) {
|
|
322
|
+
return !c.isUndefined(h[m]);
|
|
323
323
|
});
|
|
324
|
-
const r = n.metaTokens, o = n.visitor ||
|
|
324
|
+
const r = n.metaTokens, o = n.visitor || l, s = n.dots, i = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && c.isSpecCompliantForm(t);
|
|
325
325
|
if (!c.isFunction(o))
|
|
326
326
|
throw new TypeError("visitor must be a function");
|
|
327
|
-
function
|
|
327
|
+
function u(p) {
|
|
328
328
|
if (p === null) return "";
|
|
329
329
|
if (c.isDate(p))
|
|
330
330
|
return p.toISOString();
|
|
331
331
|
if (c.isBoolean(p))
|
|
332
332
|
return p.toString();
|
|
333
333
|
if (!f && c.isBlob(p))
|
|
334
|
-
throw new
|
|
334
|
+
throw new y("Blob is not supported. Use a Buffer instead.");
|
|
335
335
|
return c.isArrayBuffer(p) || c.isTypedArray(p) ? f && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
|
|
336
336
|
}
|
|
337
|
-
function
|
|
337
|
+
function l(p, m, h) {
|
|
338
338
|
let E = p;
|
|
339
339
|
if (p && !h && typeof p == "object") {
|
|
340
|
-
if (c.endsWith(
|
|
341
|
-
|
|
342
|
-
else if (c.isArray(p) && Un(p) || (c.isFileList(p) || c.endsWith(
|
|
343
|
-
return
|
|
340
|
+
if (c.endsWith(m, "{}"))
|
|
341
|
+
m = r ? m : m.slice(0, -2), p = JSON.stringify(p);
|
|
342
|
+
else if (c.isArray(p) && Un(p) || (c.isFileList(p) || c.endsWith(m, "[]")) && (E = c.toArray(p)))
|
|
343
|
+
return m = yt(m), E.forEach(function(S, k) {
|
|
344
344
|
!(c.isUndefined(S) || S === null) && t.append(
|
|
345
345
|
// eslint-disable-next-line no-nested-ternary
|
|
346
|
-
i === !0 ? De([
|
|
347
|
-
|
|
346
|
+
i === !0 ? De([m], k, s) : i === null ? m : m + "[]",
|
|
347
|
+
u(S)
|
|
348
348
|
);
|
|
349
349
|
}), !1;
|
|
350
350
|
}
|
|
351
|
-
return ge(p) ? !0 : (t.append(De(h,
|
|
351
|
+
return ge(p) ? !0 : (t.append(De(h, m, s), u(p)), !1);
|
|
352
352
|
}
|
|
353
|
-
const d = [],
|
|
354
|
-
defaultVisitor:
|
|
355
|
-
convertValue:
|
|
353
|
+
const d = [], w = Object.assign(Nn, {
|
|
354
|
+
defaultVisitor: l,
|
|
355
|
+
convertValue: u,
|
|
356
356
|
isVisitable: ge
|
|
357
357
|
});
|
|
358
|
-
function g(p,
|
|
358
|
+
function g(p, m) {
|
|
359
359
|
if (!c.isUndefined(p)) {
|
|
360
360
|
if (d.indexOf(p) !== -1)
|
|
361
|
-
throw Error("Circular reference detected in " +
|
|
361
|
+
throw Error("Circular reference detected in " + m.join("."));
|
|
362
362
|
d.push(p), c.forEach(p, function(E, R) {
|
|
363
363
|
(!(c.isUndefined(E) || E === null) && o.call(
|
|
364
364
|
t,
|
|
365
365
|
E,
|
|
366
366
|
c.isString(R) ? R.trim() : R,
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
)) === !0 && g(E,
|
|
367
|
+
m,
|
|
368
|
+
w
|
|
369
|
+
)) === !0 && g(E, m ? m.concat(R) : [R]);
|
|
370
370
|
}), d.pop();
|
|
371
371
|
}
|
|
372
372
|
}
|
|
@@ -582,7 +582,7 @@ const Q = {
|
|
|
582
582
|
return JSON.parse(t);
|
|
583
583
|
} catch (a) {
|
|
584
584
|
if (i)
|
|
585
|
-
throw a.name === "SyntaxError" ?
|
|
585
|
+
throw a.name === "SyntaxError" ? y.from(a, y.ERR_BAD_RESPONSE, this, null, this.response) : a;
|
|
586
586
|
}
|
|
587
587
|
}
|
|
588
588
|
return t;
|
|
@@ -683,24 +683,24 @@ let _ = class {
|
|
|
683
683
|
}
|
|
684
684
|
set(t, n, r) {
|
|
685
685
|
const o = this;
|
|
686
|
-
function s(a, f,
|
|
687
|
-
const
|
|
688
|
-
if (!
|
|
686
|
+
function s(a, f, u) {
|
|
687
|
+
const l = H(f);
|
|
688
|
+
if (!l)
|
|
689
689
|
throw new Error("header name must be a non-empty string");
|
|
690
|
-
const d = c.findKey(o,
|
|
691
|
-
(!d || o[d] === void 0 ||
|
|
690
|
+
const d = c.findKey(o, l);
|
|
691
|
+
(!d || o[d] === void 0 || u === !0 || u === void 0 && o[d] !== !1) && (o[d || f] = ee(a));
|
|
692
692
|
}
|
|
693
|
-
const i = (a, f) => c.forEach(a, (
|
|
693
|
+
const i = (a, f) => c.forEach(a, (u, l) => s(u, l, f));
|
|
694
694
|
if (c.isPlainObject(t) || t instanceof this.constructor)
|
|
695
695
|
i(t, n);
|
|
696
696
|
else if (c.isString(t) && (t = t.trim()) && !Xn(t))
|
|
697
697
|
i(Kn(t), n);
|
|
698
698
|
else if (c.isObject(t) && c.isIterable(t)) {
|
|
699
|
-
let a = {}, f,
|
|
700
|
-
for (const
|
|
701
|
-
if (!c.isArray(
|
|
699
|
+
let a = {}, f, u;
|
|
700
|
+
for (const l of t) {
|
|
701
|
+
if (!c.isArray(l))
|
|
702
702
|
throw TypeError("Object iterator must return a key-value pair");
|
|
703
|
-
a[
|
|
703
|
+
a[u = l[0]] = (f = a[u]) ? c.isArray(f) ? [...f, l[1]] : [f, l[1]] : l[1];
|
|
704
704
|
}
|
|
705
705
|
i(a, n);
|
|
706
706
|
} else
|
|
@@ -825,16 +825,16 @@ function Rt(e) {
|
|
|
825
825
|
return !!(e && e.__CANCEL__);
|
|
826
826
|
}
|
|
827
827
|
function M(e, t, n) {
|
|
828
|
-
|
|
828
|
+
y.call(this, e ?? "canceled", y.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
829
829
|
}
|
|
830
|
-
c.inherits(M,
|
|
830
|
+
c.inherits(M, y, {
|
|
831
831
|
__CANCEL__: !0
|
|
832
832
|
});
|
|
833
833
|
function St(e, t, n) {
|
|
834
834
|
const r = n.config.validateStatus;
|
|
835
|
-
!n.status || !r || r(n.status) ? e(n) : t(new
|
|
835
|
+
!n.status || !r || r(n.status) ? e(n) : t(new y(
|
|
836
836
|
"Request failed with status code " + n.status,
|
|
837
|
-
[
|
|
837
|
+
[y.ERR_BAD_REQUEST, y.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
838
838
|
n.config,
|
|
839
839
|
n.request,
|
|
840
840
|
n
|
|
@@ -849,25 +849,25 @@ function er(e, t) {
|
|
|
849
849
|
const n = new Array(e), r = new Array(e);
|
|
850
850
|
let o = 0, s = 0, i;
|
|
851
851
|
return t = t !== void 0 ? t : 1e3, function(f) {
|
|
852
|
-
const
|
|
853
|
-
i || (i =
|
|
854
|
-
let d = s,
|
|
852
|
+
const u = Date.now(), l = r[s];
|
|
853
|
+
i || (i = u), n[o] = f, r[o] = u;
|
|
854
|
+
let d = s, w = 0;
|
|
855
855
|
for (; d !== o; )
|
|
856
|
-
|
|
857
|
-
if (o = (o + 1) % e, o === s && (s = (s + 1) % e),
|
|
856
|
+
w += n[d++], d = d % e;
|
|
857
|
+
if (o = (o + 1) % e, o === s && (s = (s + 1) % e), u - i < t)
|
|
858
858
|
return;
|
|
859
|
-
const g =
|
|
860
|
-
return g ? Math.round(
|
|
859
|
+
const g = l && u - l;
|
|
860
|
+
return g ? Math.round(w * 1e3 / g) : void 0;
|
|
861
861
|
};
|
|
862
862
|
}
|
|
863
863
|
function tr(e, t) {
|
|
864
864
|
let n = 0, r = 1e3 / t, o, s;
|
|
865
|
-
const i = (
|
|
866
|
-
n =
|
|
865
|
+
const i = (u, l = Date.now()) => {
|
|
866
|
+
n = l, o = null, s && (clearTimeout(s), s = null), e(...u);
|
|
867
867
|
};
|
|
868
|
-
return [(...
|
|
869
|
-
const
|
|
870
|
-
d >= r ? i(
|
|
868
|
+
return [(...u) => {
|
|
869
|
+
const l = Date.now(), d = l - n;
|
|
870
|
+
d >= r ? i(u, l) : (o = u, s || (s = setTimeout(() => {
|
|
871
871
|
s = null, i(o);
|
|
872
872
|
}, r - d)));
|
|
873
873
|
}, () => o && i(o)];
|
|
@@ -876,15 +876,15 @@ const re = (e, t, n = 3) => {
|
|
|
876
876
|
let r = 0;
|
|
877
877
|
const o = er(50, 250);
|
|
878
878
|
return tr((s) => {
|
|
879
|
-
const i = s.loaded, a = s.lengthComputable ? s.total : void 0, f = i - r,
|
|
879
|
+
const i = s.loaded, a = s.lengthComputable ? s.total : void 0, f = i - r, u = o(f), l = i <= a;
|
|
880
880
|
r = i;
|
|
881
881
|
const d = {
|
|
882
882
|
loaded: i,
|
|
883
883
|
total: a,
|
|
884
884
|
progress: a ? i / a : void 0,
|
|
885
885
|
bytes: f,
|
|
886
|
-
rate:
|
|
887
|
-
estimated:
|
|
886
|
+
rate: u || void 0,
|
|
887
|
+
estimated: u && a && l ? (a - i) / u : void 0,
|
|
888
888
|
event: s,
|
|
889
889
|
lengthComputable: a != null,
|
|
890
890
|
[t ? "download" : "upload"]: !0
|
|
@@ -942,30 +942,30 @@ const Me = (e) => e instanceof _ ? { ...e } : e;
|
|
|
942
942
|
function B(e, t) {
|
|
943
943
|
t = t || {};
|
|
944
944
|
const n = {};
|
|
945
|
-
function r(
|
|
946
|
-
return c.isPlainObject(
|
|
945
|
+
function r(u, l, d, w) {
|
|
946
|
+
return c.isPlainObject(u) && c.isPlainObject(l) ? c.merge.call({ caseless: w }, u, l) : c.isPlainObject(l) ? c.merge({}, l) : c.isArray(l) ? l.slice() : l;
|
|
947
947
|
}
|
|
948
|
-
function o(
|
|
949
|
-
if (c.isUndefined(
|
|
950
|
-
if (!c.isUndefined(
|
|
951
|
-
return r(void 0,
|
|
952
|
-
} else return r(
|
|
948
|
+
function o(u, l, d, w) {
|
|
949
|
+
if (c.isUndefined(l)) {
|
|
950
|
+
if (!c.isUndefined(u))
|
|
951
|
+
return r(void 0, u, d, w);
|
|
952
|
+
} else return r(u, l, d, w);
|
|
953
953
|
}
|
|
954
|
-
function s(
|
|
955
|
-
if (!c.isUndefined(
|
|
956
|
-
return r(void 0,
|
|
954
|
+
function s(u, l) {
|
|
955
|
+
if (!c.isUndefined(l))
|
|
956
|
+
return r(void 0, l);
|
|
957
957
|
}
|
|
958
|
-
function i(
|
|
959
|
-
if (c.isUndefined(
|
|
960
|
-
if (!c.isUndefined(
|
|
961
|
-
return r(void 0,
|
|
962
|
-
} else return r(void 0,
|
|
958
|
+
function i(u, l) {
|
|
959
|
+
if (c.isUndefined(l)) {
|
|
960
|
+
if (!c.isUndefined(u))
|
|
961
|
+
return r(void 0, u);
|
|
962
|
+
} else return r(void 0, l);
|
|
963
963
|
}
|
|
964
|
-
function a(
|
|
964
|
+
function a(u, l, d) {
|
|
965
965
|
if (d in t)
|
|
966
|
-
return r(
|
|
966
|
+
return r(u, l);
|
|
967
967
|
if (d in e)
|
|
968
|
-
return r(void 0,
|
|
968
|
+
return r(void 0, u);
|
|
969
969
|
}
|
|
970
970
|
const f = {
|
|
971
971
|
url: s,
|
|
@@ -996,11 +996,11 @@ function B(e, t) {
|
|
|
996
996
|
socketPath: i,
|
|
997
997
|
responseEncoding: i,
|
|
998
998
|
validateStatus: a,
|
|
999
|
-
headers: (
|
|
999
|
+
headers: (u, l, d) => o(Me(u), Me(l), d, !0)
|
|
1000
1000
|
};
|
|
1001
|
-
return c.forEach(Object.keys({ ...e, ...t }), function(
|
|
1002
|
-
const d = f[
|
|
1003
|
-
c.isUndefined(
|
|
1001
|
+
return c.forEach(Object.keys({ ...e, ...t }), function(l) {
|
|
1002
|
+
const d = f[l] || o, w = d(e[l], t[l], l);
|
|
1003
|
+
c.isUndefined(w) && d !== a || (n[l] = w);
|
|
1004
1004
|
}), n;
|
|
1005
1005
|
}
|
|
1006
1006
|
const Ot = (e) => {
|
|
@@ -1015,13 +1015,13 @@ const Ot = (e) => {
|
|
|
1015
1015
|
if (T.hasStandardBrowserEnv || T.hasStandardBrowserWebWorkerEnv)
|
|
1016
1016
|
i.setContentType(void 0);
|
|
1017
1017
|
else if ((f = i.getContentType()) !== !1) {
|
|
1018
|
-
const [
|
|
1019
|
-
i.setContentType([
|
|
1018
|
+
const [u, ...l] = f ? f.split(";").map((d) => d.trim()).filter(Boolean) : [];
|
|
1019
|
+
i.setContentType([u || "multipart/form-data", ...l].join("; "));
|
|
1020
1020
|
}
|
|
1021
1021
|
}
|
|
1022
1022
|
if (T.hasStandardBrowserEnv && (r && c.isFunction(r) && (r = r(t)), r || r !== !1 && nr(t.url))) {
|
|
1023
|
-
const
|
|
1024
|
-
|
|
1023
|
+
const u = o && s && rr.read(s);
|
|
1024
|
+
u && i.set(o, u);
|
|
1025
1025
|
}
|
|
1026
1026
|
return t;
|
|
1027
1027
|
}, ir = typeof XMLHttpRequest < "u", ar = ir && function(e) {
|
|
@@ -1029,9 +1029,9 @@ const Ot = (e) => {
|
|
|
1029
1029
|
const o = Ot(e);
|
|
1030
1030
|
let s = o.data;
|
|
1031
1031
|
const i = _.from(o.headers).normalize();
|
|
1032
|
-
let { responseType: a, onUploadProgress: f, onDownloadProgress:
|
|
1033
|
-
function
|
|
1034
|
-
g && g(), p && p(), o.cancelToken && o.cancelToken.unsubscribe(
|
|
1032
|
+
let { responseType: a, onUploadProgress: f, onDownloadProgress: u } = o, l, d, w, g, p;
|
|
1033
|
+
function m() {
|
|
1034
|
+
g && g(), p && p(), o.cancelToken && o.cancelToken.unsubscribe(l), o.signal && o.signal.removeEventListener("abort", l);
|
|
1035
1035
|
}
|
|
1036
1036
|
let h = new XMLHttpRequest();
|
|
1037
1037
|
h.open(o.method.toUpperCase(), o.url, !0), h.timeout = o.timeout;
|
|
@@ -1049,34 +1049,34 @@ const Ot = (e) => {
|
|
|
1049
1049
|
request: h
|
|
1050
1050
|
};
|
|
1051
1051
|
St(function(F) {
|
|
1052
|
-
n(F),
|
|
1052
|
+
n(F), m();
|
|
1053
1053
|
}, function(F) {
|
|
1054
|
-
r(F),
|
|
1054
|
+
r(F), m();
|
|
1055
1055
|
}, O), h = null;
|
|
1056
1056
|
}
|
|
1057
1057
|
"onloadend" in h ? h.onloadend = E : h.onreadystatechange = function() {
|
|
1058
1058
|
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(E);
|
|
1059
1059
|
}, h.onabort = function() {
|
|
1060
|
-
h && (r(new
|
|
1060
|
+
h && (r(new y("Request aborted", y.ECONNABORTED, e, h)), h = null);
|
|
1061
1061
|
}, h.onerror = function() {
|
|
1062
|
-
r(new
|
|
1062
|
+
r(new y("Network Error", y.ERR_NETWORK, e, h)), h = null;
|
|
1063
1063
|
}, h.ontimeout = function() {
|
|
1064
1064
|
let k = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
|
|
1065
1065
|
const O = o.transitional || bt;
|
|
1066
|
-
o.timeoutErrorMessage && (k = o.timeoutErrorMessage), r(new
|
|
1066
|
+
o.timeoutErrorMessage && (k = o.timeoutErrorMessage), r(new y(
|
|
1067
1067
|
k,
|
|
1068
|
-
O.clarifyTimeoutError ?
|
|
1068
|
+
O.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
|
|
1069
1069
|
e,
|
|
1070
1070
|
h
|
|
1071
1071
|
)), h = null;
|
|
1072
1072
|
}, s === void 0 && i.setContentType(null), "setRequestHeader" in h && c.forEach(i.toJSON(), function(k, O) {
|
|
1073
1073
|
h.setRequestHeader(O, k);
|
|
1074
|
-
}), c.isUndefined(o.withCredentials) || (h.withCredentials = !!o.withCredentials), a && a !== "json" && (h.responseType = o.responseType),
|
|
1074
|
+
}), c.isUndefined(o.withCredentials) || (h.withCredentials = !!o.withCredentials), a && a !== "json" && (h.responseType = o.responseType), u && ([w, p] = re(u, !0), h.addEventListener("progress", w)), f && h.upload && ([d, g] = re(f), h.upload.addEventListener("progress", d), h.upload.addEventListener("loadend", g)), (o.cancelToken || o.signal) && (l = (S) => {
|
|
1075
1075
|
h && (r(!S || S.type ? new M(null, e, h) : S), h.abort(), h = null);
|
|
1076
|
-
}, o.cancelToken && o.cancelToken.subscribe(
|
|
1076
|
+
}, o.cancelToken && o.cancelToken.subscribe(l), o.signal && (o.signal.aborted ? l() : o.signal.addEventListener("abort", l)));
|
|
1077
1077
|
const R = Yn(o.url);
|
|
1078
1078
|
if (R && T.protocols.indexOf(R) === -1) {
|
|
1079
|
-
r(new
|
|
1079
|
+
r(new y("Unsupported protocol " + R + ":", y.ERR_BAD_REQUEST, e));
|
|
1080
1080
|
return;
|
|
1081
1081
|
}
|
|
1082
1082
|
h.send(s || null);
|
|
@@ -1085,22 +1085,22 @@ const Ot = (e) => {
|
|
|
1085
1085
|
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1086
1086
|
if (t || n) {
|
|
1087
1087
|
let r = new AbortController(), o;
|
|
1088
|
-
const s = function(
|
|
1088
|
+
const s = function(u) {
|
|
1089
1089
|
if (!o) {
|
|
1090
1090
|
o = !0, a();
|
|
1091
|
-
const
|
|
1092
|
-
r.abort(
|
|
1091
|
+
const l = u instanceof Error ? u : this.reason;
|
|
1092
|
+
r.abort(l instanceof y ? l : new M(l instanceof Error ? l.message : l));
|
|
1093
1093
|
}
|
|
1094
1094
|
};
|
|
1095
1095
|
let i = t && setTimeout(() => {
|
|
1096
|
-
i = null, s(new
|
|
1096
|
+
i = null, s(new y(`timeout ${t} of ms exceeded`, y.ETIMEDOUT));
|
|
1097
1097
|
}, t);
|
|
1098
1098
|
const a = () => {
|
|
1099
|
-
e && (i && clearTimeout(i), i = null, e.forEach((
|
|
1100
|
-
|
|
1099
|
+
e && (i && clearTimeout(i), i = null, e.forEach((u) => {
|
|
1100
|
+
u.unsubscribe ? u.unsubscribe(s) : u.removeEventListener("abort", s);
|
|
1101
1101
|
}), e = null);
|
|
1102
1102
|
};
|
|
1103
|
-
e.forEach((
|
|
1103
|
+
e.forEach((u) => u.addEventListener("abort", s));
|
|
1104
1104
|
const { signal: f } = r;
|
|
1105
1105
|
return f.unsubscribe = () => c.asap(a), f;
|
|
1106
1106
|
}
|
|
@@ -1140,19 +1140,19 @@ const Ot = (e) => {
|
|
|
1140
1140
|
return new ReadableStream({
|
|
1141
1141
|
async pull(f) {
|
|
1142
1142
|
try {
|
|
1143
|
-
const { done:
|
|
1144
|
-
if (
|
|
1143
|
+
const { done: u, value: l } = await o.next();
|
|
1144
|
+
if (u) {
|
|
1145
1145
|
a(), f.close();
|
|
1146
1146
|
return;
|
|
1147
1147
|
}
|
|
1148
|
-
let d =
|
|
1148
|
+
let d = l.byteLength;
|
|
1149
1149
|
if (n) {
|
|
1150
|
-
let
|
|
1151
|
-
n(
|
|
1150
|
+
let w = s += d;
|
|
1151
|
+
n(w);
|
|
1152
1152
|
}
|
|
1153
|
-
f.enqueue(new Uint8Array(
|
|
1154
|
-
} catch (
|
|
1155
|
-
throw a(
|
|
1153
|
+
f.enqueue(new Uint8Array(l));
|
|
1154
|
+
} catch (u) {
|
|
1155
|
+
throw a(u), u;
|
|
1156
1156
|
}
|
|
1157
1157
|
},
|
|
1158
1158
|
cancel(f) {
|
|
@@ -1183,7 +1183,7 @@ const Ot = (e) => {
|
|
|
1183
1183
|
le && ((e) => {
|
|
1184
1184
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1185
1185
|
!oe[t] && (oe[t] = c.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
|
|
1186
|
-
throw new
|
|
1186
|
+
throw new y(`Response type '${t}' is not supported`, y.ERR_NOT_SUPPORT, r);
|
|
1187
1187
|
});
|
|
1188
1188
|
});
|
|
1189
1189
|
})(new Response());
|
|
@@ -1214,25 +1214,25 @@ const hr = async (e) => {
|
|
|
1214
1214
|
timeout: i,
|
|
1215
1215
|
onDownloadProgress: a,
|
|
1216
1216
|
onUploadProgress: f,
|
|
1217
|
-
responseType:
|
|
1218
|
-
headers:
|
|
1217
|
+
responseType: u,
|
|
1218
|
+
headers: l,
|
|
1219
1219
|
withCredentials: d = "same-origin",
|
|
1220
|
-
fetchOptions:
|
|
1220
|
+
fetchOptions: w
|
|
1221
1221
|
} = Ot(e);
|
|
1222
|
-
|
|
1222
|
+
u = u ? (u + "").toLowerCase() : "text";
|
|
1223
1223
|
let g = cr([o, s && s.toAbortSignal()], i), p;
|
|
1224
|
-
const
|
|
1224
|
+
const m = g && g.unsubscribe && (() => {
|
|
1225
1225
|
g.unsubscribe();
|
|
1226
1226
|
});
|
|
1227
1227
|
let h;
|
|
1228
1228
|
try {
|
|
1229
|
-
if (f && pr && n !== "get" && n !== "head" && (h = await mr(
|
|
1229
|
+
if (f && pr && n !== "get" && n !== "head" && (h = await mr(l, r)) !== 0) {
|
|
1230
1230
|
let O = new Request(t, {
|
|
1231
1231
|
method: "POST",
|
|
1232
1232
|
body: r,
|
|
1233
1233
|
duplex: "half"
|
|
1234
1234
|
}), P;
|
|
1235
|
-
if (c.isFormData(r) && (P = O.headers.get("content-type")) &&
|
|
1235
|
+
if (c.isFormData(r) && (P = O.headers.get("content-type")) && l.setContentType(P), O.body) {
|
|
1236
1236
|
const [F, X] = je(
|
|
1237
1237
|
h,
|
|
1238
1238
|
re(qe(f))
|
|
@@ -1243,17 +1243,17 @@ const hr = async (e) => {
|
|
|
1243
1243
|
c.isString(d) || (d = d ? "include" : "omit");
|
|
1244
1244
|
const E = "credentials" in Request.prototype;
|
|
1245
1245
|
p = new Request(t, {
|
|
1246
|
-
...
|
|
1246
|
+
...w,
|
|
1247
1247
|
signal: g,
|
|
1248
1248
|
method: n.toUpperCase(),
|
|
1249
|
-
headers:
|
|
1249
|
+
headers: l.normalize().toJSON(),
|
|
1250
1250
|
body: r,
|
|
1251
1251
|
duplex: "half",
|
|
1252
1252
|
credentials: E ? d : void 0
|
|
1253
1253
|
});
|
|
1254
|
-
let R = await fetch(p,
|
|
1255
|
-
const S = Ee && (
|
|
1256
|
-
if (Ee && (a || S &&
|
|
1254
|
+
let R = await fetch(p, w);
|
|
1255
|
+
const S = Ee && (u === "stream" || u === "response");
|
|
1256
|
+
if (Ee && (a || S && m)) {
|
|
1257
1257
|
const O = {};
|
|
1258
1258
|
["status", "statusText", "headers"].forEach((Ne) => {
|
|
1259
1259
|
O[Ne] = R[Ne];
|
|
@@ -1264,14 +1264,14 @@ const hr = async (e) => {
|
|
|
1264
1264
|
) || [];
|
|
1265
1265
|
R = new Response(
|
|
1266
1266
|
He(R.body, $e, F, () => {
|
|
1267
|
-
X && X(),
|
|
1267
|
+
X && X(), m && m();
|
|
1268
1268
|
}),
|
|
1269
1269
|
O
|
|
1270
1270
|
);
|
|
1271
1271
|
}
|
|
1272
|
-
|
|
1273
|
-
let k = await oe[c.findKey(oe,
|
|
1274
|
-
return !S &&
|
|
1272
|
+
u = u || "text";
|
|
1273
|
+
let k = await oe[c.findKey(oe, u) || "text"](R, e);
|
|
1274
|
+
return !S && m && m(), await new Promise((O, P) => {
|
|
1275
1275
|
St(O, P, {
|
|
1276
1276
|
data: k,
|
|
1277
1277
|
headers: _.from(R.headers),
|
|
@@ -1282,12 +1282,12 @@ const hr = async (e) => {
|
|
|
1282
1282
|
});
|
|
1283
1283
|
});
|
|
1284
1284
|
} catch (E) {
|
|
1285
|
-
throw
|
|
1286
|
-
new
|
|
1285
|
+
throw m && m(), E && E.name === "TypeError" && /Load failed|fetch/i.test(E.message) ? Object.assign(
|
|
1286
|
+
new y("Network Error", y.ERR_NETWORK, e, p),
|
|
1287
1287
|
{
|
|
1288
1288
|
cause: E.cause || E
|
|
1289
1289
|
}
|
|
1290
|
-
) :
|
|
1290
|
+
) : y.from(E, E && E.code, e, p);
|
|
1291
1291
|
}
|
|
1292
1292
|
}), Re = {
|
|
1293
1293
|
http: Ln,
|
|
@@ -1313,7 +1313,7 @@ const ze = (e) => `- ${e}`, wr = (e) => c.isFunction(e) || e === null || e === !
|
|
|
1313
1313
|
n = e[s];
|
|
1314
1314
|
let i;
|
|
1315
1315
|
if (r = n, !wr(n) && (r = Re[(i = String(n)).toLowerCase()], r === void 0))
|
|
1316
|
-
throw new
|
|
1316
|
+
throw new y(`Unknown adapter '${i}'`);
|
|
1317
1317
|
if (r)
|
|
1318
1318
|
break;
|
|
1319
1319
|
o[i || "#" + s] = r;
|
|
@@ -1325,7 +1325,7 @@ const ze = (e) => `- ${e}`, wr = (e) => c.isFunction(e) || e === null || e === !
|
|
|
1325
1325
|
let i = t ? s.length > 1 ? `since :
|
|
1326
1326
|
` + s.map(ze).join(`
|
|
1327
1327
|
`) : " " + ze(s[0]) : "as no adapter specified";
|
|
1328
|
-
throw new
|
|
1328
|
+
throw new y(
|
|
1329
1329
|
"There is no suitable adapter to dispatch the request " + i,
|
|
1330
1330
|
"ERR_NOT_SUPPORT"
|
|
1331
1331
|
);
|
|
@@ -1369,9 +1369,9 @@ fe.transitional = function(t, n, r) {
|
|
|
1369
1369
|
}
|
|
1370
1370
|
return (s, i, a) => {
|
|
1371
1371
|
if (t === !1)
|
|
1372
|
-
throw new
|
|
1372
|
+
throw new y(
|
|
1373
1373
|
o(i, " has been removed" + (n ? " in " + n : "")),
|
|
1374
|
-
|
|
1374
|
+
y.ERR_DEPRECATED
|
|
1375
1375
|
);
|
|
1376
1376
|
return n && !Ve[i] && (Ve[i] = !0), t ? t(s, i, a) : !0;
|
|
1377
1377
|
};
|
|
@@ -1381,7 +1381,7 @@ fe.spelling = function(t) {
|
|
|
1381
1381
|
};
|
|
1382
1382
|
function gr(e, t, n) {
|
|
1383
1383
|
if (typeof e != "object")
|
|
1384
|
-
throw new
|
|
1384
|
+
throw new y("options must be an object", y.ERR_BAD_OPTION_VALUE);
|
|
1385
1385
|
const r = Object.keys(e);
|
|
1386
1386
|
let o = r.length;
|
|
1387
1387
|
for (; o-- > 0; ) {
|
|
@@ -1389,11 +1389,11 @@ function gr(e, t, n) {
|
|
|
1389
1389
|
if (i) {
|
|
1390
1390
|
const a = e[s], f = a === void 0 || i(a, s, e);
|
|
1391
1391
|
if (f !== !0)
|
|
1392
|
-
throw new
|
|
1392
|
+
throw new y("option " + s + " must be " + f, y.ERR_BAD_OPTION_VALUE);
|
|
1393
1393
|
continue;
|
|
1394
1394
|
}
|
|
1395
1395
|
if (n !== !0)
|
|
1396
|
-
throw new
|
|
1396
|
+
throw new y("Unknown option " + s, y.ERR_BAD_OPTION);
|
|
1397
1397
|
}
|
|
1398
1398
|
}
|
|
1399
1399
|
const te = {
|
|
@@ -1460,39 +1460,39 @@ let I = class {
|
|
|
1460
1460
|
), n.headers = _.concat(i, s);
|
|
1461
1461
|
const a = [];
|
|
1462
1462
|
let f = !0;
|
|
1463
|
-
this.interceptors.request.forEach(function(
|
|
1464
|
-
typeof
|
|
1463
|
+
this.interceptors.request.forEach(function(m) {
|
|
1464
|
+
typeof m.runWhen == "function" && m.runWhen(n) === !1 || (f = f && m.synchronous, a.unshift(m.fulfilled, m.rejected));
|
|
1465
1465
|
});
|
|
1466
|
-
const
|
|
1467
|
-
this.interceptors.response.forEach(function(
|
|
1468
|
-
|
|
1466
|
+
const u = [];
|
|
1467
|
+
this.interceptors.response.forEach(function(m) {
|
|
1468
|
+
u.push(m.fulfilled, m.rejected);
|
|
1469
1469
|
});
|
|
1470
|
-
let
|
|
1470
|
+
let l, d = 0, w;
|
|
1471
1471
|
if (!f) {
|
|
1472
1472
|
const p = [Je.bind(this), void 0];
|
|
1473
|
-
for (p.unshift(...a), p.push(...
|
|
1474
|
-
|
|
1475
|
-
return
|
|
1473
|
+
for (p.unshift(...a), p.push(...u), w = p.length, l = Promise.resolve(n); d < w; )
|
|
1474
|
+
l = l.then(p[d++], p[d++]);
|
|
1475
|
+
return l;
|
|
1476
1476
|
}
|
|
1477
|
-
|
|
1477
|
+
w = a.length;
|
|
1478
1478
|
let g = n;
|
|
1479
|
-
for (d = 0; d <
|
|
1480
|
-
const p = a[d++],
|
|
1479
|
+
for (d = 0; d < w; ) {
|
|
1480
|
+
const p = a[d++], m = a[d++];
|
|
1481
1481
|
try {
|
|
1482
1482
|
g = p(g);
|
|
1483
1483
|
} catch (h) {
|
|
1484
|
-
|
|
1484
|
+
m.call(this, h);
|
|
1485
1485
|
break;
|
|
1486
1486
|
}
|
|
1487
1487
|
}
|
|
1488
1488
|
try {
|
|
1489
|
-
|
|
1489
|
+
l = Je.call(this, g);
|
|
1490
1490
|
} catch (p) {
|
|
1491
1491
|
return Promise.reject(p);
|
|
1492
1492
|
}
|
|
1493
|
-
for (d = 0,
|
|
1494
|
-
|
|
1495
|
-
return
|
|
1493
|
+
for (d = 0, w = u.length; d < w; )
|
|
1494
|
+
l = l.then(u[d++], u[d++]);
|
|
1495
|
+
return l;
|
|
1496
1496
|
}
|
|
1497
1497
|
getUri(t) {
|
|
1498
1498
|
t = B(this.defaults, t);
|
|
@@ -1686,7 +1686,7 @@ b.CancelToken = br;
|
|
|
1686
1686
|
b.isCancel = Rt;
|
|
1687
1687
|
b.VERSION = Ct;
|
|
1688
1688
|
b.toFormData = ue;
|
|
1689
|
-
b.AxiosError =
|
|
1689
|
+
b.AxiosError = y;
|
|
1690
1690
|
b.Cancel = b.CanceledError;
|
|
1691
1691
|
b.all = function(t) {
|
|
1692
1692
|
return Promise.all(t);
|
|
@@ -1750,10 +1750,10 @@ function Te(e, t) {
|
|
|
1750
1750
|
function r(o) {
|
|
1751
1751
|
if (!(typeof document > "u" || arguments.length && !o)) {
|
|
1752
1752
|
for (var s = document.cookie ? document.cookie.split("; ") : [], i = {}, a = 0; a < s.length; a++) {
|
|
1753
|
-
var f = s[a].split("="),
|
|
1753
|
+
var f = s[a].split("="), u = f.slice(1).join("=");
|
|
1754
1754
|
try {
|
|
1755
|
-
var
|
|
1756
|
-
if (i[
|
|
1755
|
+
var l = decodeURIComponent(f[0]);
|
|
1756
|
+
if (i[l] = e.read(u, l), o === l)
|
|
1757
1757
|
break;
|
|
1758
1758
|
} catch {
|
|
1759
1759
|
}
|
|
@@ -1804,16 +1804,16 @@ function Ar(e, t) {
|
|
|
1804
1804
|
}
|
|
1805
1805
|
function _r(e, t = !0, n = !0, r = !1) {
|
|
1806
1806
|
let o = 0, s, i = !0, a = Oe, f;
|
|
1807
|
-
const
|
|
1807
|
+
const u = () => {
|
|
1808
1808
|
s && (clearTimeout(s), s = void 0, a(), a = Oe);
|
|
1809
1809
|
};
|
|
1810
1810
|
return (d) => {
|
|
1811
|
-
const
|
|
1812
|
-
return
|
|
1813
|
-
a = r ? h :
|
|
1814
|
-
o = Date.now(), i = !0,
|
|
1815
|
-
}, Math.max(0,
|
|
1816
|
-
})), !n && !s && (s = setTimeout(() => i = !0,
|
|
1811
|
+
const w = Ue(e), g = Date.now() - o, p = () => f = d();
|
|
1812
|
+
return u(), w <= 0 ? (o = Date.now(), p()) : (g > w && (n || !i) ? (o = Date.now(), p()) : t && (f = new Promise((m, h) => {
|
|
1813
|
+
a = r ? h : m, s = setTimeout(() => {
|
|
1814
|
+
o = Date.now(), i = !0, m(p()), u();
|
|
1815
|
+
}, Math.max(0, w - g));
|
|
1816
|
+
})), !n && !s && (s = setTimeout(() => i = !0, w)), i = !1, f);
|
|
1817
1817
|
};
|
|
1818
1818
|
}
|
|
1819
1819
|
function xr(e) {
|
|
@@ -1834,13 +1834,13 @@ function Qe(...e) {
|
|
|
1834
1834
|
return Oe;
|
|
1835
1835
|
Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]);
|
|
1836
1836
|
const s = [], i = () => {
|
|
1837
|
-
s.forEach((
|
|
1838
|
-
}, a = (
|
|
1839
|
-
i(),
|
|
1840
|
-
}, { immediate: !0, flush: "post" }),
|
|
1837
|
+
s.forEach((l) => l()), s.length = 0;
|
|
1838
|
+
}, a = (l, d, w, g) => (l.addEventListener(d, w, g), () => l.removeEventListener(d, w, g)), f = xe(() => [kr(t), Ue(o)], ([l, d]) => {
|
|
1839
|
+
i(), l && s.push(...n.flatMap((w) => r.map((g) => a(l, w, g, d))));
|
|
1840
|
+
}, { immediate: !0, flush: "post" }), u = () => {
|
|
1841
1841
|
f(), i();
|
|
1842
1842
|
};
|
|
1843
|
-
return Cr(
|
|
1843
|
+
return Cr(u), u;
|
|
1844
1844
|
}
|
|
1845
1845
|
const Xe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Ge = "__vueuse_ssr_handlers__";
|
|
1846
1846
|
Xe[Ge] = Xe[Ge] || {};
|
|
@@ -1853,19 +1853,19 @@ function Ur(e = Lr, t = {}) {
|
|
|
1853
1853
|
window: s = Ut,
|
|
1854
1854
|
eventFilter: i = _r(50)
|
|
1855
1855
|
} = t, a = ne(n), f = ne(Ke());
|
|
1856
|
-
let
|
|
1857
|
-
const
|
|
1858
|
-
a.value = !1, f.value = Ke(), clearTimeout(
|
|
1856
|
+
let u;
|
|
1857
|
+
const l = Ar(i, () => {
|
|
1858
|
+
a.value = !1, f.value = Ke(), clearTimeout(u), u = setTimeout(() => a.value = !0, e);
|
|
1859
1859
|
});
|
|
1860
1860
|
if (s) {
|
|
1861
1861
|
const d = s.document;
|
|
1862
|
-
for (const
|
|
1863
|
-
Qe(s,
|
|
1862
|
+
for (const w of o)
|
|
1863
|
+
Qe(s, w, l, { passive: !0 });
|
|
1864
1864
|
r && Qe(d, "visibilitychange", () => {
|
|
1865
|
-
d.hidden ||
|
|
1865
|
+
d.hidden || l();
|
|
1866
1866
|
});
|
|
1867
1867
|
}
|
|
1868
|
-
return
|
|
1868
|
+
return u = setTimeout(() => a.value = !0, e), { idle: a, lastActive: f };
|
|
1869
1869
|
}
|
|
1870
1870
|
var Ze;
|
|
1871
1871
|
(function(e) {
|
|
@@ -1960,7 +1960,7 @@ const L = (e) => new URL(location.href).searchParams.get(e), _e = (e) => {
|
|
|
1960
1960
|
return new Promise(async (r) => {
|
|
1961
1961
|
const o = async (a) => {
|
|
1962
1962
|
try {
|
|
1963
|
-
const f = nt.feishu.login,
|
|
1963
|
+
const f = nt.feishu.login, u = Ce(t, { ignoreAuth: !0 }), d = (await b.create().get(f, { baseURL: tt, params: { code: a, _redirect_url: u } })).request.responseURL;
|
|
1964
1964
|
location.replace(d), r();
|
|
1965
1965
|
} catch {
|
|
1966
1966
|
v({ ...N, redirect_uri: U }), r();
|
|
@@ -2051,15 +2051,17 @@ const Hr = async () => {
|
|
|
2051
2051
|
}
|
|
2052
2052
|
}
|
|
2053
2053
|
);
|
|
2054
|
-
const { access_token: a = "",
|
|
2054
|
+
const { access_token: a = "", refresh_token: f = "", exp: u = 0, refresh_exp: l = 0, expires_in: d = 0 } = s.data, w = {
|
|
2055
2055
|
accessToken: a,
|
|
2056
|
-
|
|
2057
|
-
|
|
2056
|
+
exp: Number(u),
|
|
2057
|
+
accessTokenExpiredAt: Number(u),
|
|
2058
|
+
refreshToken: f,
|
|
2059
|
+
expires_in: Number(d),
|
|
2058
2060
|
info: s.data
|
|
2059
2061
|
};
|
|
2060
|
-
J().save(
|
|
2061
|
-
const
|
|
2062
|
-
return
|
|
2062
|
+
J().save(w), await st(a);
|
|
2063
|
+
const g = Number(l) - (/* @__PURE__ */ new Date()).getTime();
|
|
2064
|
+
return g && g > 0 && (It(g), g && localStorage.setItem("idelTime", g.toString())), t && (window.__isAutoCloseApp = !1, window.location.replace(decodeURIComponent(t))), a;
|
|
2063
2065
|
} catch {
|
|
2064
2066
|
return v({ ...N, redirect_uri: U });
|
|
2065
2067
|
}
|
|
@@ -2080,11 +2082,18 @@ const Hr = async () => {
|
|
|
2080
2082
|
);
|
|
2081
2083
|
});
|
|
2082
2084
|
let t = $();
|
|
2083
|
-
const {
|
|
2085
|
+
const { exp: n = 0 } = J().getData();
|
|
2084
2086
|
Z.value = !0;
|
|
2085
2087
|
try {
|
|
2086
2088
|
const r = L("code") || "";
|
|
2087
|
-
(L("authorizer") || "") === "feishu"
|
|
2089
|
+
if ((L("authorizer") || "") === "feishu")
|
|
2090
|
+
await qr();
|
|
2091
|
+
else if (r)
|
|
2092
|
+
t = await Hr();
|
|
2093
|
+
else {
|
|
2094
|
+
const s = Date.now() + 6e4;
|
|
2095
|
+
n > 0 && s > n && (t = await Jr(N));
|
|
2096
|
+
}
|
|
2088
2097
|
} catch {
|
|
2089
2098
|
} finally {
|
|
2090
2099
|
Z.value = !1;
|
|
@@ -2110,8 +2119,8 @@ const v = (e) => {
|
|
|
2110
2119
|
if (Ae) return Ae(t);
|
|
2111
2120
|
t.logout = "true", o && (t.locale = "locale");
|
|
2112
2121
|
const s = new URLSearchParams();
|
|
2113
|
-
Object.entries(t).forEach(([f,
|
|
2114
|
-
f !== "client_secret" && s.set(f, String(
|
|
2122
|
+
Object.entries(t).forEach(([f, u]) => {
|
|
2123
|
+
f !== "client_secret" && s.set(f, String(u));
|
|
2115
2124
|
});
|
|
2116
2125
|
const i = s.toString(), a = `${r}${j.oauth}?${i}`;
|
|
2117
2126
|
if (localStorage.removeItem("idelTime"), sessionStorage.clear(), J().remove(), $r())
|
|
@@ -2150,25 +2159,29 @@ const Jr = async (e) => {
|
|
|
2150
2159
|
nonce: Ft()
|
|
2151
2160
|
}
|
|
2152
2161
|
}
|
|
2153
|
-
), { access_token: o = "",
|
|
2162
|
+
), { access_token: o = "", refresh_token: s = "", exp: i = 0, expires_in: a = 0 } = r.data, f = {
|
|
2154
2163
|
accessToken: o,
|
|
2155
|
-
|
|
2156
|
-
|
|
2164
|
+
exp: Number(i),
|
|
2165
|
+
accessTokenExpiredAt: Number(i),
|
|
2166
|
+
expires_in: Number(a),
|
|
2167
|
+
refreshToken: s,
|
|
2157
2168
|
info: r.data
|
|
2158
2169
|
};
|
|
2159
|
-
return J().save(
|
|
2170
|
+
return J().save(f), await st(o), o;
|
|
2160
2171
|
} catch {
|
|
2161
2172
|
return v({ ...e, redirect_uri: U });
|
|
2162
2173
|
}
|
|
2163
2174
|
}, J = () => ({
|
|
2164
2175
|
getData: () => ({
|
|
2165
2176
|
accessToken: $(),
|
|
2166
|
-
|
|
2177
|
+
exp: de("exp") ? Number(de("exp")) : 0,
|
|
2167
2178
|
refreshToken: de("refreshToken")
|
|
2168
2179
|
}),
|
|
2169
2180
|
save: (e) => {
|
|
2170
2181
|
Ht(e.accessToken ?? "", {
|
|
2182
|
+
exp: e.exp,
|
|
2171
2183
|
accessTokenExpiredAt: e.accessTokenExpiredAt,
|
|
2184
|
+
expires_in: e.expires_in,
|
|
2172
2185
|
refreshToken: e.refreshToken
|
|
2173
2186
|
}), zt(e);
|
|
2174
2187
|
},
|
|
@@ -2183,5 +2196,6 @@ export {
|
|
|
2183
2196
|
N as getTokenParams,
|
|
2184
2197
|
v as login,
|
|
2185
2198
|
U as real_uri,
|
|
2199
|
+
Jr as refreshToken,
|
|
2186
2200
|
J as tokenStorage
|
|
2187
2201
|
};
|