@das-fed/utils 7.0.7-hot.5 → 7.0.7-hot.6
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/enterpriseright/index.js +743 -725
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/file/index.js +766 -748
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/index.js +725 -743
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/iot/index.js +1002 -984
- 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/knowledge/index.js +725 -743
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/portal/index.js +743 -725
- package/api-services/modules/portal/index.js.gz +0 -0
- package/create-api-service/index.js +717 -699
- package/create-api-service/index.js.gz +0 -0
- package/create-api-service/sso/index.js +177 -179
- package/create-api-service/sso/index.js.gz +0 -0
- package/package.json +4 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { unref as Nt, getCurrentScope as Ft, onScopeDispose as Dt, ref as ee, watch as Oe } from "vue";
|
|
2
2
|
import { encryption as vt } from "@das-fed/utils/atob";
|
|
3
3
|
import { getConfig as Ae } from "@das-fed/utils/config";
|
|
4
|
-
import { getAccessToken as
|
|
4
|
+
import { getAccessToken as H, removeAccessToken as It, setAccessToken as Bt, getAccessTokenInfo as fe } from "@das-fed/utils/token-tools";
|
|
5
5
|
import { removeProcessEngineToken as jt, setProcessEngineToken as qt } from "@das-fed/utils/process-engine-info";
|
|
6
6
|
import { setPersonalInfo as tt } from "@das-fed/utils/common-info/set-personal-info";
|
|
7
7
|
function nt(e, t) {
|
|
@@ -12,42 +12,42 @@ function nt(e, t) {
|
|
|
12
12
|
const { toString: Ht } = Object.prototype, { getPrototypeOf: _e } = Object, { iterator: oe, toStringTag: rt } = Symbol, se = /* @__PURE__ */ ((e) => (t) => {
|
|
13
13
|
const n = Ht.call(t);
|
|
14
14
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
15
|
-
})(/* @__PURE__ */ Object.create(null)), x = (e) => (e = e.toLowerCase(), (t) => se(t) === e), ie = (e) => (t) => typeof t === e, { isArray:
|
|
16
|
-
function
|
|
17
|
-
return e !== null &&
|
|
15
|
+
})(/* @__PURE__ */ Object.create(null)), x = (e) => (e = e.toLowerCase(), (t) => se(t) === e), ie = (e) => (t) => typeof t === e, { isArray: v } = Array, M = ie("undefined");
|
|
16
|
+
function z(e) {
|
|
17
|
+
return e !== null && !M(e) && e.constructor !== null && !M(e.constructor) && A(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
18
18
|
}
|
|
19
19
|
const ot = x("ArrayBuffer");
|
|
20
20
|
function Mt(e) {
|
|
21
21
|
let t;
|
|
22
22
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && ot(e.buffer), t;
|
|
23
23
|
}
|
|
24
|
-
const $t = ie("string"), A = ie("function"), st = ie("number"),
|
|
24
|
+
const $t = ie("string"), A = ie("function"), st = ie("number"), J = (e) => e !== null && typeof e == "object", zt = (e) => e === !0 || e === !1, G = (e) => {
|
|
25
25
|
if (se(e) !== "object")
|
|
26
26
|
return !1;
|
|
27
27
|
const t = _e(e);
|
|
28
28
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(rt in e) && !(oe in e);
|
|
29
29
|
}, Jt = (e) => {
|
|
30
|
-
if (!
|
|
30
|
+
if (!J(e) || z(e))
|
|
31
31
|
return !1;
|
|
32
32
|
try {
|
|
33
33
|
return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
|
|
34
34
|
} catch {
|
|
35
35
|
return !1;
|
|
36
36
|
}
|
|
37
|
-
}, Vt = x("Date"), Wt = x("File"), Kt = x("Blob"), Qt = x("FileList"), Xt = (e) =>
|
|
37
|
+
}, Vt = x("Date"), Wt = x("File"), Kt = x("Blob"), Qt = x("FileList"), Xt = (e) => J(e) && A(e.pipe), Gt = (e) => {
|
|
38
38
|
let t;
|
|
39
39
|
return e && (typeof FormData == "function" && e instanceof FormData || A(e.append) && ((t = se(e)) === "formdata" || // detect form-data instance
|
|
40
40
|
t === "object" && A(e.toString) && e.toString() === "[object FormData]"));
|
|
41
41
|
}, Zt = x("URLSearchParams"), [Yt, en, tn, nn] = ["ReadableStream", "Request", "Response", "Headers"].map(x), rn = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
42
|
-
function
|
|
42
|
+
function V(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
43
43
|
if (e === null || typeof e > "u")
|
|
44
44
|
return;
|
|
45
45
|
let r, o;
|
|
46
|
-
if (typeof e != "object" && (e = [e]),
|
|
46
|
+
if (typeof e != "object" && (e = [e]), v(e))
|
|
47
47
|
for (r = 0, o = e.length; r < o; r++)
|
|
48
48
|
t.call(null, e[r], r, e);
|
|
49
49
|
else {
|
|
50
|
-
if (
|
|
50
|
+
if (z(e))
|
|
51
51
|
return;
|
|
52
52
|
const s = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = s.length;
|
|
53
53
|
let c;
|
|
@@ -56,7 +56,7 @@ function W(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
function it(e, t) {
|
|
59
|
-
if (
|
|
59
|
+
if (z(e))
|
|
60
60
|
return null;
|
|
61
61
|
t = t.toLowerCase();
|
|
62
62
|
const n = Object.keys(e);
|
|
@@ -66,17 +66,17 @@ function it(e, t) {
|
|
|
66
66
|
return o;
|
|
67
67
|
return null;
|
|
68
68
|
}
|
|
69
|
-
const L = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, at = (e) =>
|
|
69
|
+
const L = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, at = (e) => !M(e) && e !== L;
|
|
70
70
|
function me() {
|
|
71
71
|
const { caseless: e } = at(this) && this || {}, t = {}, n = (r, o) => {
|
|
72
72
|
const s = e && it(t, o) || o;
|
|
73
|
-
G(t[s]) && G(r) ? t[s] = me(t[s], r) : G(r) ? t[s] = me({}, r) :
|
|
73
|
+
G(t[s]) && G(r) ? t[s] = me(t[s], r) : G(r) ? t[s] = me({}, r) : v(r) ? t[s] = r.slice() : t[s] = r;
|
|
74
74
|
};
|
|
75
75
|
for (let r = 0, o = arguments.length; r < o; r++)
|
|
76
|
-
arguments[r] &&
|
|
76
|
+
arguments[r] && V(arguments[r], n);
|
|
77
77
|
return t;
|
|
78
78
|
}
|
|
79
|
-
const on = (e, t, n, { allOwnKeys: r } = {}) => (
|
|
79
|
+
const on = (e, t, n, { allOwnKeys: r } = {}) => (V(t, (o, s) => {
|
|
80
80
|
n && A(o) ? e[s] = nt(o, n) : e[s] = o;
|
|
81
81
|
}, { allOwnKeys: r }), e), sn = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), an = (e, t, n, r) => {
|
|
82
82
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
@@ -98,7 +98,7 @@ const on = (e, t, n, { allOwnKeys: r } = {}) => (W(t, (o, s) => {
|
|
|
98
98
|
return r !== -1 && r === n;
|
|
99
99
|
}, un = (e) => {
|
|
100
100
|
if (!e) return null;
|
|
101
|
-
if (
|
|
101
|
+
if (v(e)) return e;
|
|
102
102
|
let t = e.length;
|
|
103
103
|
if (!st(t)) return null;
|
|
104
104
|
const n = new Array(t);
|
|
@@ -125,7 +125,7 @@ const on = (e, t, n, { allOwnKeys: r } = {}) => (W(t, (o, s) => {
|
|
|
125
125
|
}
|
|
126
126
|
), Ue = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), yn = x("RegExp"), ct = (e, t) => {
|
|
127
127
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
128
|
-
|
|
128
|
+
V(n, (o, s) => {
|
|
129
129
|
let i;
|
|
130
130
|
(i = t(o, s, e)) !== !1 && (r[s] = i || o);
|
|
131
131
|
}), Object.defineProperties(e, r);
|
|
@@ -150,32 +150,32 @@ const on = (e, t, n, { allOwnKeys: r } = {}) => (W(t, (o, s) => {
|
|
|
150
150
|
n[s] = !0;
|
|
151
151
|
});
|
|
152
152
|
};
|
|
153
|
-
return
|
|
153
|
+
return v(e) ? r(e) : r(String(e).split(t)), n;
|
|
154
154
|
}, bn = () => {
|
|
155
155
|
}, En = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
156
156
|
function Sn(e) {
|
|
157
157
|
return !!(e && A(e.append) && e[rt] === "FormData" && e[oe]);
|
|
158
158
|
}
|
|
159
|
-
const
|
|
159
|
+
const Rn = (e) => {
|
|
160
160
|
const t = new Array(10), n = (r, o) => {
|
|
161
|
-
if (
|
|
161
|
+
if (J(r)) {
|
|
162
162
|
if (t.indexOf(r) >= 0)
|
|
163
163
|
return;
|
|
164
|
-
if (
|
|
164
|
+
if (z(r))
|
|
165
165
|
return r;
|
|
166
166
|
if (!("toJSON" in r)) {
|
|
167
167
|
t[o] = r;
|
|
168
|
-
const s =
|
|
169
|
-
return
|
|
168
|
+
const s = v(r) ? [] : {};
|
|
169
|
+
return V(r, (i, c) => {
|
|
170
170
|
const f = n(i, o + 1);
|
|
171
|
-
|
|
171
|
+
!M(f) && (s[c] = f);
|
|
172
172
|
}), t[o] = void 0, s;
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
175
|
return r;
|
|
176
176
|
};
|
|
177
177
|
return n(e, 0);
|
|
178
|
-
},
|
|
178
|
+
}, Tn = x("AsyncFunction"), On = (e) => e && (J(e) || A(e)) && A(e.then) && A(e.catch), lt = ((e, t) => e ? setImmediate : t ? ((n, r) => (L.addEventListener("message", ({ source: o, data: s }) => {
|
|
179
179
|
o === L && s === n && r.length && r.shift()();
|
|
180
180
|
}, !1), (o) => {
|
|
181
181
|
r.push(o), L.postMessage(n, "*");
|
|
@@ -183,22 +183,22 @@ const Tn = (e) => {
|
|
|
183
183
|
typeof setImmediate == "function",
|
|
184
184
|
A(L.postMessage)
|
|
185
185
|
), An = typeof queueMicrotask < "u" ? queueMicrotask.bind(L) : typeof process < "u" && process.nextTick || lt, _n = (e) => e != null && A(e[oe]), a = {
|
|
186
|
-
isArray:
|
|
186
|
+
isArray: v,
|
|
187
187
|
isArrayBuffer: ot,
|
|
188
|
-
isBuffer:
|
|
188
|
+
isBuffer: z,
|
|
189
189
|
isFormData: Gt,
|
|
190
190
|
isArrayBufferView: Mt,
|
|
191
191
|
isString: $t,
|
|
192
192
|
isNumber: st,
|
|
193
193
|
isBoolean: zt,
|
|
194
|
-
isObject:
|
|
194
|
+
isObject: J,
|
|
195
195
|
isPlainObject: G,
|
|
196
196
|
isEmptyObject: Jt,
|
|
197
197
|
isReadableStream: Yt,
|
|
198
198
|
isRequest: en,
|
|
199
199
|
isResponse: tn,
|
|
200
200
|
isHeaders: nn,
|
|
201
|
-
isUndefined:
|
|
201
|
+
isUndefined: M,
|
|
202
202
|
isDate: Vt,
|
|
203
203
|
isFile: Wt,
|
|
204
204
|
isBlob: Kt,
|
|
@@ -208,7 +208,7 @@ const Tn = (e) => {
|
|
|
208
208
|
isURLSearchParams: Zt,
|
|
209
209
|
isTypedArray: fn,
|
|
210
210
|
isFileList: Qt,
|
|
211
|
-
forEach:
|
|
211
|
+
forEach: V,
|
|
212
212
|
merge: me,
|
|
213
213
|
extend: on,
|
|
214
214
|
trim: rn,
|
|
@@ -235,8 +235,8 @@ const Tn = (e) => {
|
|
|
235
235
|
global: L,
|
|
236
236
|
isContextDefined: at,
|
|
237
237
|
isSpecCompliantForm: Sn,
|
|
238
|
-
toJSONObject:
|
|
239
|
-
isAsyncFn:
|
|
238
|
+
toJSONObject: Rn,
|
|
239
|
+
isAsyncFn: Tn,
|
|
240
240
|
isThenable: On,
|
|
241
241
|
setImmediate: lt,
|
|
242
242
|
asap: An,
|
|
@@ -304,10 +304,10 @@ function Le(e, t, n) {
|
|
|
304
304
|
return o = dt(o), !n && s ? "[" + o + "]" : o;
|
|
305
305
|
}).join(n ? "." : "") : t;
|
|
306
306
|
}
|
|
307
|
-
function
|
|
307
|
+
function kn(e) {
|
|
308
308
|
return a.isArray(e) && !e.some(ye);
|
|
309
309
|
}
|
|
310
|
-
const
|
|
310
|
+
const Cn = a.toFlatObject(a, {}, null, function(t) {
|
|
311
311
|
return /^is[A-Z]/.test(t);
|
|
312
312
|
});
|
|
313
313
|
function ae(e, t, n) {
|
|
@@ -338,18 +338,18 @@ function ae(e, t, n) {
|
|
|
338
338
|
if (p && !h && typeof p == "object") {
|
|
339
339
|
if (a.endsWith(m, "{}"))
|
|
340
340
|
m = r ? m : m.slice(0, -2), p = JSON.stringify(p);
|
|
341
|
-
else if (a.isArray(p) &&
|
|
342
|
-
return m = dt(m), E.forEach(function(
|
|
343
|
-
!(a.isUndefined(
|
|
341
|
+
else if (a.isArray(p) && kn(p) || (a.isFileList(p) || a.endsWith(m, "[]")) && (E = a.toArray(p)))
|
|
342
|
+
return m = dt(m), E.forEach(function(R, C) {
|
|
343
|
+
!(a.isUndefined(R) || R === null) && t.append(
|
|
344
344
|
// eslint-disable-next-line no-nested-ternary
|
|
345
|
-
i === !0 ? Le([m],
|
|
346
|
-
u(
|
|
345
|
+
i === !0 ? Le([m], C, s) : i === null ? m : m + "[]",
|
|
346
|
+
u(R)
|
|
347
347
|
);
|
|
348
348
|
}), !1;
|
|
349
349
|
}
|
|
350
350
|
return ye(p) ? !0 : (t.append(Le(h, m, s), u(p)), !1);
|
|
351
351
|
}
|
|
352
|
-
const d = [], w = Object.assign(
|
|
352
|
+
const d = [], w = Object.assign(Cn, {
|
|
353
353
|
defaultVisitor: l,
|
|
354
354
|
convertValue: u,
|
|
355
355
|
isVisitable: ye
|
|
@@ -486,22 +486,22 @@ const mt = {
|
|
|
486
486
|
Blob: Nn
|
|
487
487
|
},
|
|
488
488
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
489
|
-
},
|
|
490
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", In =
|
|
489
|
+
}, ke = typeof window < "u" && typeof document < "u", we = typeof navigator == "object" && navigator || void 0, Dn = ke && (!we || ["ReactNative", "NativeScript", "NS"].indexOf(we.product) < 0), vn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
490
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", In = ke && window.location.href || "http://localhost", Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
491
491
|
__proto__: null,
|
|
492
|
-
hasBrowserEnv:
|
|
492
|
+
hasBrowserEnv: ke,
|
|
493
493
|
hasStandardBrowserEnv: Dn,
|
|
494
494
|
hasStandardBrowserWebWorkerEnv: vn,
|
|
495
495
|
navigator: we,
|
|
496
496
|
origin: In
|
|
497
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
497
|
+
}, Symbol.toStringTag, { value: "Module" })), T = {
|
|
498
498
|
...Bn,
|
|
499
499
|
...Fn
|
|
500
500
|
};
|
|
501
501
|
function jn(e, t) {
|
|
502
|
-
return ae(e, new
|
|
502
|
+
return ae(e, new T.classes.URLSearchParams(), {
|
|
503
503
|
visitor: function(n, r, o, s) {
|
|
504
|
-
return
|
|
504
|
+
return T.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
|
|
505
505
|
},
|
|
506
506
|
...t
|
|
507
507
|
});
|
|
@@ -543,7 +543,7 @@ function Mn(e, t, n) {
|
|
|
543
543
|
}
|
|
544
544
|
return (n || JSON.stringify)(e);
|
|
545
545
|
}
|
|
546
|
-
const
|
|
546
|
+
const W = {
|
|
547
547
|
transitional: mt,
|
|
548
548
|
adapter: ["xhr", "http", "fetch"],
|
|
549
549
|
transformRequest: [function(t, n) {
|
|
@@ -572,7 +572,7 @@ const K = {
|
|
|
572
572
|
return s || o ? (n.setContentType("application/json", !1), Mn(t)) : t;
|
|
573
573
|
}],
|
|
574
574
|
transformResponse: [function(t) {
|
|
575
|
-
const n = this.transitional ||
|
|
575
|
+
const n = this.transitional || W.transitional, r = n && n.forcedJSONParsing, o = this.responseType === "json";
|
|
576
576
|
if (a.isResponse(t) || a.isReadableStream(t))
|
|
577
577
|
return t;
|
|
578
578
|
if (t && a.isString(t) && (r && !this.responseType || o)) {
|
|
@@ -596,8 +596,8 @@ const K = {
|
|
|
596
596
|
maxContentLength: -1,
|
|
597
597
|
maxBodyLength: -1,
|
|
598
598
|
env: {
|
|
599
|
-
FormData:
|
|
600
|
-
Blob:
|
|
599
|
+
FormData: T.classes.FormData,
|
|
600
|
+
Blob: T.classes.Blob
|
|
601
601
|
},
|
|
602
602
|
validateStatus: function(t) {
|
|
603
603
|
return t >= 200 && t < 300;
|
|
@@ -610,7 +610,7 @@ const K = {
|
|
|
610
610
|
}
|
|
611
611
|
};
|
|
612
612
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
613
|
-
|
|
613
|
+
W.headers[e] = {};
|
|
614
614
|
});
|
|
615
615
|
const $n = a.toObjectSet([
|
|
616
616
|
"age",
|
|
@@ -638,7 +638,7 @@ const $n = a.toObjectSet([
|
|
|
638
638
|
o = i.indexOf(":"), n = i.substring(0, o).trim().toLowerCase(), r = i.substring(o + 1).trim(), !(!n || t[n] && $n[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
639
639
|
}), t;
|
|
640
640
|
}, De = Symbol("internals");
|
|
641
|
-
function
|
|
641
|
+
function B(e) {
|
|
642
642
|
return e && String(e).trim().toLowerCase();
|
|
643
643
|
}
|
|
644
644
|
function Z(e) {
|
|
@@ -683,7 +683,7 @@ let _ = class {
|
|
|
683
683
|
set(t, n, r) {
|
|
684
684
|
const o = this;
|
|
685
685
|
function s(c, f, u) {
|
|
686
|
-
const l =
|
|
686
|
+
const l = B(f);
|
|
687
687
|
if (!l)
|
|
688
688
|
throw new Error("header name must be a non-empty string");
|
|
689
689
|
const d = a.findKey(o, l);
|
|
@@ -707,7 +707,7 @@ let _ = class {
|
|
|
707
707
|
return this;
|
|
708
708
|
}
|
|
709
709
|
get(t, n) {
|
|
710
|
-
if (t =
|
|
710
|
+
if (t = B(t), t) {
|
|
711
711
|
const r = a.findKey(this, t);
|
|
712
712
|
if (r) {
|
|
713
713
|
const o = this[r];
|
|
@@ -724,7 +724,7 @@ let _ = class {
|
|
|
724
724
|
}
|
|
725
725
|
}
|
|
726
726
|
has(t, n) {
|
|
727
|
-
if (t =
|
|
727
|
+
if (t = B(t), t) {
|
|
728
728
|
const r = a.findKey(this, t);
|
|
729
729
|
return !!(r && this[r] !== void 0 && (!n || de(this, this[r], r, n)));
|
|
730
730
|
}
|
|
@@ -734,7 +734,7 @@ let _ = class {
|
|
|
734
734
|
const r = this;
|
|
735
735
|
let o = !1;
|
|
736
736
|
function s(i) {
|
|
737
|
-
if (i =
|
|
737
|
+
if (i = B(i), i) {
|
|
738
738
|
const c = a.findKey(r, i);
|
|
739
739
|
c && (!n || de(r, r[c], c, n)) && (delete r[c], o = !0);
|
|
740
740
|
}
|
|
@@ -796,7 +796,7 @@ let _ = class {
|
|
|
796
796
|
accessors: {}
|
|
797
797
|
}).accessors, o = this.prototype;
|
|
798
798
|
function s(i) {
|
|
799
|
-
const c =
|
|
799
|
+
const c = B(i);
|
|
800
800
|
r[c] || (Kn(o, i), r[c] = !0);
|
|
801
801
|
}
|
|
802
802
|
return a.isArray(t) ? t.forEach(s) : s(t), this;
|
|
@@ -814,7 +814,7 @@ a.reduceDescriptors(_.prototype, ({ value: e }, t) => {
|
|
|
814
814
|
});
|
|
815
815
|
a.freezeMethods(_);
|
|
816
816
|
function pe(e, t) {
|
|
817
|
-
const n = this ||
|
|
817
|
+
const n = this || W, r = t || n, o = _.from(r.headers);
|
|
818
818
|
let s = r.data;
|
|
819
819
|
return a.forEach(e, function(c) {
|
|
820
820
|
s = c.call(n, s, o.normalize(), t ? t.status : void 0);
|
|
@@ -823,10 +823,10 @@ function pe(e, t) {
|
|
|
823
823
|
function wt(e) {
|
|
824
824
|
return !!(e && e.__CANCEL__);
|
|
825
825
|
}
|
|
826
|
-
function
|
|
826
|
+
function I(e, t, n) {
|
|
827
827
|
y.call(this, e ?? "canceled", y.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
828
828
|
}
|
|
829
|
-
a.inherits(
|
|
829
|
+
a.inherits(I, y, {
|
|
830
830
|
__CANCEL__: !0
|
|
831
831
|
});
|
|
832
832
|
function gt(e, t, n) {
|
|
@@ -897,10 +897,10 @@ const te = (e, t, n = 3) => {
|
|
|
897
897
|
total: e,
|
|
898
898
|
loaded: r
|
|
899
899
|
}), t[1]];
|
|
900
|
-
}, Ie = (e) => (...t) => a.asap(() => e(...t)), Zn =
|
|
901
|
-
new URL(
|
|
902
|
-
|
|
903
|
-
) : () => !0, Yn =
|
|
900
|
+
}, Ie = (e) => (...t) => a.asap(() => e(...t)), Zn = 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)))(
|
|
901
|
+
new URL(T.origin),
|
|
902
|
+
T.navigator && /(msie|trident)/i.test(T.navigator.userAgent)
|
|
903
|
+
) : () => !0, Yn = T.hasStandardBrowserEnv ? (
|
|
904
904
|
// Standard browser envs support document.cookie
|
|
905
905
|
{
|
|
906
906
|
write(e, t, n, r, o, s) {
|
|
@@ -1011,14 +1011,14 @@ const Et = (e) => {
|
|
|
1011
1011
|
);
|
|
1012
1012
|
let f;
|
|
1013
1013
|
if (a.isFormData(n)) {
|
|
1014
|
-
if (
|
|
1014
|
+
if (T.hasStandardBrowserEnv || T.hasStandardBrowserWebWorkerEnv)
|
|
1015
1015
|
i.setContentType(void 0);
|
|
1016
1016
|
else if ((f = i.getContentType()) !== !1) {
|
|
1017
1017
|
const [u, ...l] = f ? f.split(";").map((d) => d.trim()).filter(Boolean) : [];
|
|
1018
1018
|
i.setContentType([u || "multipart/form-data", ...l].join("; "));
|
|
1019
1019
|
}
|
|
1020
1020
|
}
|
|
1021
|
-
if (
|
|
1021
|
+
if (T.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && Zn(t.url))) {
|
|
1022
1022
|
const u = o && s && Yn.read(s);
|
|
1023
1023
|
u && i.set(o, u);
|
|
1024
1024
|
}
|
|
@@ -1037,13 +1037,13 @@ const Et = (e) => {
|
|
|
1037
1037
|
function E() {
|
|
1038
1038
|
if (!h)
|
|
1039
1039
|
return;
|
|
1040
|
-
const
|
|
1040
|
+
const R = _.from(
|
|
1041
1041
|
"getAllResponseHeaders" in h && h.getAllResponseHeaders()
|
|
1042
1042
|
), O = {
|
|
1043
1043
|
data: !c || c === "text" || c === "json" ? h.responseText : h.response,
|
|
1044
1044
|
status: h.status,
|
|
1045
1045
|
statusText: h.statusText,
|
|
1046
|
-
headers:
|
|
1046
|
+
headers: R,
|
|
1047
1047
|
config: e,
|
|
1048
1048
|
request: h
|
|
1049
1049
|
};
|
|
@@ -1060,21 +1060,21 @@ const Et = (e) => {
|
|
|
1060
1060
|
}, h.onerror = function() {
|
|
1061
1061
|
r(new y("Network Error", y.ERR_NETWORK, e, h)), h = null;
|
|
1062
1062
|
}, h.ontimeout = function() {
|
|
1063
|
-
let
|
|
1063
|
+
let C = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
|
|
1064
1064
|
const O = o.transitional || mt;
|
|
1065
|
-
o.timeoutErrorMessage && (
|
|
1066
|
-
|
|
1065
|
+
o.timeoutErrorMessage && (C = o.timeoutErrorMessage), r(new y(
|
|
1066
|
+
C,
|
|
1067
1067
|
O.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
|
|
1068
1068
|
e,
|
|
1069
1069
|
h
|
|
1070
1070
|
)), h = null;
|
|
1071
|
-
}, s === void 0 && i.setContentType(null), "setRequestHeader" in h && a.forEach(i.toJSON(), function(
|
|
1072
|
-
h.setRequestHeader(O,
|
|
1073
|
-
}), a.isUndefined(o.withCredentials) || (h.withCredentials = !!o.withCredentials), c && c !== "json" && (h.responseType = o.responseType), u && ([w, p] = te(u, !0), h.addEventListener("progress", w)), f && h.upload && ([d, g] = te(f), h.upload.addEventListener("progress", d), h.upload.addEventListener("loadend", g)), (o.cancelToken || o.signal) && (l = (
|
|
1074
|
-
h && (r(!
|
|
1071
|
+
}, s === void 0 && i.setContentType(null), "setRequestHeader" in h && a.forEach(i.toJSON(), function(C, O) {
|
|
1072
|
+
h.setRequestHeader(O, C);
|
|
1073
|
+
}), a.isUndefined(o.withCredentials) || (h.withCredentials = !!o.withCredentials), c && c !== "json" && (h.responseType = o.responseType), u && ([w, p] = te(u, !0), h.addEventListener("progress", w)), f && h.upload && ([d, g] = te(f), h.upload.addEventListener("progress", d), h.upload.addEventListener("loadend", g)), (o.cancelToken || o.signal) && (l = (R) => {
|
|
1074
|
+
h && (r(!R || R.type ? new I(null, e, h) : R), h.abort(), h = null);
|
|
1075
1075
|
}, o.cancelToken && o.cancelToken.subscribe(l), o.signal && (o.signal.aborted ? l() : o.signal.addEventListener("abort", l)));
|
|
1076
1076
|
const S = Qn(o.url);
|
|
1077
|
-
if (S &&
|
|
1077
|
+
if (S && T.protocols.indexOf(S) === -1) {
|
|
1078
1078
|
r(new y("Unsupported protocol " + S + ":", y.ERR_BAD_REQUEST, e));
|
|
1079
1079
|
return;
|
|
1080
1080
|
}
|
|
@@ -1088,7 +1088,7 @@ const Et = (e) => {
|
|
|
1088
1088
|
if (!o) {
|
|
1089
1089
|
o = !0, c();
|
|
1090
1090
|
const l = u instanceof Error ? u : this.reason;
|
|
1091
|
-
r.abort(l instanceof y ? l : new
|
|
1091
|
+
r.abort(l instanceof y ? l : new I(l instanceof Error ? l.message : l));
|
|
1092
1092
|
}
|
|
1093
1093
|
};
|
|
1094
1094
|
let i = t && setTimeout(() => {
|
|
@@ -1160,15 +1160,15 @@ const Et = (e) => {
|
|
|
1160
1160
|
}, {
|
|
1161
1161
|
highWaterMark: 2
|
|
1162
1162
|
});
|
|
1163
|
-
}, ce = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", St = ce && typeof ReadableStream == "function", cr = ce && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())),
|
|
1163
|
+
}, ce = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", St = ce && typeof ReadableStream == "function", cr = ce && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Rt = (e, ...t) => {
|
|
1164
1164
|
try {
|
|
1165
1165
|
return !!e(...t);
|
|
1166
1166
|
} catch {
|
|
1167
1167
|
return !1;
|
|
1168
1168
|
}
|
|
1169
|
-
}, lr = St &&
|
|
1169
|
+
}, lr = St && Rt(() => {
|
|
1170
1170
|
let e = !1;
|
|
1171
|
-
const t = new Request(
|
|
1171
|
+
const t = new Request(T.origin, {
|
|
1172
1172
|
body: new ReadableStream(),
|
|
1173
1173
|
method: "POST",
|
|
1174
1174
|
get duplex() {
|
|
@@ -1176,7 +1176,7 @@ const Et = (e) => {
|
|
|
1176
1176
|
}
|
|
1177
1177
|
}).headers.has("Content-Type");
|
|
1178
1178
|
return e && !t;
|
|
1179
|
-
}), qe = 64 * 1024, ge = St &&
|
|
1179
|
+
}), qe = 64 * 1024, ge = St && Rt(() => a.isReadableStream(new Response("").body)), ne = {
|
|
1180
1180
|
stream: ge && ((e) => e.body)
|
|
1181
1181
|
};
|
|
1182
1182
|
ce && ((e) => {
|
|
@@ -1192,7 +1192,7 @@ const ur = async (e) => {
|
|
|
1192
1192
|
if (a.isBlob(e))
|
|
1193
1193
|
return e.size;
|
|
1194
1194
|
if (a.isSpecCompliantForm(e))
|
|
1195
|
-
return (await new Request(
|
|
1195
|
+
return (await new Request(T.origin, {
|
|
1196
1196
|
method: "POST",
|
|
1197
1197
|
body: e
|
|
1198
1198
|
}).arrayBuffer()).byteLength;
|
|
@@ -1232,11 +1232,11 @@ const ur = async (e) => {
|
|
|
1232
1232
|
duplex: "half"
|
|
1233
1233
|
}), P;
|
|
1234
1234
|
if (a.isFormData(r) && (P = O.headers.get("content-type")) && l.setContentType(P), O.body) {
|
|
1235
|
-
const [U,
|
|
1235
|
+
const [U, K] = ve(
|
|
1236
1236
|
h,
|
|
1237
1237
|
te(Ie(f))
|
|
1238
1238
|
);
|
|
1239
|
-
r = je(O.body, qe, U,
|
|
1239
|
+
r = je(O.body, qe, U, K);
|
|
1240
1240
|
}
|
|
1241
1241
|
}
|
|
1242
1242
|
a.isString(d) || (d = d ? "include" : "omit");
|
|
@@ -1251,28 +1251,28 @@ const ur = async (e) => {
|
|
|
1251
1251
|
credentials: E ? d : void 0
|
|
1252
1252
|
});
|
|
1253
1253
|
let S = await fetch(p, w);
|
|
1254
|
-
const
|
|
1255
|
-
if (ge && (c ||
|
|
1254
|
+
const R = ge && (u === "stream" || u === "response");
|
|
1255
|
+
if (ge && (c || R && m)) {
|
|
1256
1256
|
const O = {};
|
|
1257
1257
|
["status", "statusText", "headers"].forEach((Pe) => {
|
|
1258
1258
|
O[Pe] = S[Pe];
|
|
1259
1259
|
});
|
|
1260
|
-
const P = a.toFiniteNumber(S.headers.get("content-length")), [U,
|
|
1260
|
+
const P = a.toFiniteNumber(S.headers.get("content-length")), [U, K] = c && ve(
|
|
1261
1261
|
P,
|
|
1262
1262
|
te(Ie(c), !0)
|
|
1263
1263
|
) || [];
|
|
1264
1264
|
S = new Response(
|
|
1265
1265
|
je(S.body, qe, U, () => {
|
|
1266
|
-
|
|
1266
|
+
K && K(), m && m();
|
|
1267
1267
|
}),
|
|
1268
1268
|
O
|
|
1269
1269
|
);
|
|
1270
1270
|
}
|
|
1271
1271
|
u = u || "text";
|
|
1272
|
-
let
|
|
1273
|
-
return !
|
|
1272
|
+
let C = await ne[a.findKey(ne, u) || "text"](S, e);
|
|
1273
|
+
return !R && m && m(), await new Promise((O, P) => {
|
|
1274
1274
|
gt(O, P, {
|
|
1275
|
-
data:
|
|
1275
|
+
data: C,
|
|
1276
1276
|
headers: _.from(S.headers),
|
|
1277
1277
|
status: S.status,
|
|
1278
1278
|
statusText: S.statusText,
|
|
@@ -1302,7 +1302,7 @@ a.forEach(be, (e, t) => {
|
|
|
1302
1302
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1303
1303
|
}
|
|
1304
1304
|
});
|
|
1305
|
-
const He = (e) => `- ${e}`, pr = (e) => a.isFunction(e) || e === null || e === !1,
|
|
1305
|
+
const He = (e) => `- ${e}`, pr = (e) => a.isFunction(e) || e === null || e === !1, Tt = {
|
|
1306
1306
|
getAdapter: (e) => {
|
|
1307
1307
|
e = a.isArray(e) ? e : [e];
|
|
1308
1308
|
const { length: t } = e;
|
|
@@ -1335,13 +1335,13 @@ const He = (e) => `- ${e}`, pr = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1335
1335
|
};
|
|
1336
1336
|
function he(e) {
|
|
1337
1337
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1338
|
-
throw new
|
|
1338
|
+
throw new I(null, e);
|
|
1339
1339
|
}
|
|
1340
1340
|
function Me(e) {
|
|
1341
1341
|
return he(e), e.headers = _.from(e.headers), e.data = pe.call(
|
|
1342
1342
|
e,
|
|
1343
1343
|
e.transformRequest
|
|
1344
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1344
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Tt.getAdapter(e.adapter || W.adapter)(e).then(function(r) {
|
|
1345
1345
|
return he(e), r.data = pe.call(
|
|
1346
1346
|
e,
|
|
1347
1347
|
e.transformResponse,
|
|
@@ -1398,7 +1398,7 @@ function hr(e, t, n) {
|
|
|
1398
1398
|
const Y = {
|
|
1399
1399
|
assertOptions: hr,
|
|
1400
1400
|
validators: le
|
|
1401
|
-
},
|
|
1401
|
+
}, k = Y.validators;
|
|
1402
1402
|
let N = class {
|
|
1403
1403
|
constructor(t) {
|
|
1404
1404
|
this.defaults = t || {}, this.interceptors = {
|
|
@@ -1435,17 +1435,17 @@ let N = class {
|
|
|
1435
1435
|
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = F(this.defaults, n);
|
|
1436
1436
|
const { transitional: r, paramsSerializer: o, headers: s } = n;
|
|
1437
1437
|
r !== void 0 && Y.assertOptions(r, {
|
|
1438
|
-
silentJSONParsing:
|
|
1439
|
-
forcedJSONParsing:
|
|
1440
|
-
clarifyTimeoutError:
|
|
1438
|
+
silentJSONParsing: k.transitional(k.boolean),
|
|
1439
|
+
forcedJSONParsing: k.transitional(k.boolean),
|
|
1440
|
+
clarifyTimeoutError: k.transitional(k.boolean)
|
|
1441
1441
|
}, !1), o != null && (a.isFunction(o) ? n.paramsSerializer = {
|
|
1442
1442
|
serialize: o
|
|
1443
1443
|
} : Y.assertOptions(o, {
|
|
1444
|
-
encode:
|
|
1445
|
-
serialize:
|
|
1444
|
+
encode: k.function,
|
|
1445
|
+
serialize: k.function
|
|
1446
1446
|
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), Y.assertOptions(n, {
|
|
1447
|
-
baseUrl:
|
|
1448
|
-
withXsrfToken:
|
|
1447
|
+
baseUrl: k.spelling("baseURL"),
|
|
1448
|
+
withXsrfToken: k.spelling("withXSRFToken")
|
|
1449
1449
|
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1450
1450
|
let i = s && a.merge(
|
|
1451
1451
|
s.common,
|
|
@@ -1547,7 +1547,7 @@ let mr = class At {
|
|
|
1547
1547
|
r.unsubscribe(s);
|
|
1548
1548
|
}, i;
|
|
1549
1549
|
}, t(function(s, i, c) {
|
|
1550
|
-
r.reason || (r.reason = new
|
|
1550
|
+
r.reason || (r.reason = new I(s, i, c), n(r.reason));
|
|
1551
1551
|
});
|
|
1552
1552
|
}
|
|
1553
1553
|
/**
|
|
@@ -1678,9 +1678,9 @@ function _t(e) {
|
|
|
1678
1678
|
return _t(F(e, o));
|
|
1679
1679
|
}, n;
|
|
1680
1680
|
}
|
|
1681
|
-
const b = _t(
|
|
1681
|
+
const b = _t(W);
|
|
1682
1682
|
b.Axios = N;
|
|
1683
|
-
b.CanceledError =
|
|
1683
|
+
b.CanceledError = I;
|
|
1684
1684
|
b.CancelToken = mr;
|
|
1685
1685
|
b.isCancel = wt;
|
|
1686
1686
|
b.VERSION = Ot;
|
|
@@ -1695,7 +1695,7 @@ b.isAxiosError = wr;
|
|
|
1695
1695
|
b.mergeConfig = F;
|
|
1696
1696
|
b.AxiosHeaders = _;
|
|
1697
1697
|
b.formToJSON = (e) => yt(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1698
|
-
b.getAdapter =
|
|
1698
|
+
b.getAdapter = Tt.getAdapter;
|
|
1699
1699
|
b.HttpStatusCode = Ee;
|
|
1700
1700
|
b.default = b;
|
|
1701
1701
|
const {
|
|
@@ -1717,7 +1717,7 @@ const {
|
|
|
1717
1717
|
mergeConfig: fo
|
|
1718
1718
|
} = b;
|
|
1719
1719
|
/*! js-cookie v3.0.5 | MIT */
|
|
1720
|
-
function
|
|
1720
|
+
function Q(e) {
|
|
1721
1721
|
for (var t = 1; t < arguments.length; t++) {
|
|
1722
1722
|
var n = arguments[t];
|
|
1723
1723
|
for (var r in n)
|
|
@@ -1739,7 +1739,7 @@ var gr = {
|
|
|
1739
1739
|
function Se(e, t) {
|
|
1740
1740
|
function n(o, s, i) {
|
|
1741
1741
|
if (!(typeof document > "u")) {
|
|
1742
|
-
i =
|
|
1742
|
+
i = Q({}, t, i), typeof i.expires == "number" && (i.expires = new Date(Date.now() + i.expires * 864e5)), i.expires && (i.expires = i.expires.toUTCString()), o = encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
1743
1743
|
var c = "";
|
|
1744
1744
|
for (var f in i)
|
|
1745
1745
|
i[f] && (c += "; " + f, i[f] !== !0 && (c += "=" + i[f].split(";")[0]));
|
|
@@ -1768,16 +1768,16 @@ function Se(e, t) {
|
|
|
1768
1768
|
n(
|
|
1769
1769
|
o,
|
|
1770
1770
|
"",
|
|
1771
|
-
|
|
1771
|
+
Q({}, s, {
|
|
1772
1772
|
expires: -1
|
|
1773
1773
|
})
|
|
1774
1774
|
);
|
|
1775
1775
|
},
|
|
1776
1776
|
withAttributes: function(o) {
|
|
1777
|
-
return Se(this.converter,
|
|
1777
|
+
return Se(this.converter, Q({}, this.attributes, o));
|
|
1778
1778
|
},
|
|
1779
1779
|
withConverter: function(o) {
|
|
1780
|
-
return Se(
|
|
1780
|
+
return Se(Q({}, this.converter, o), this.attributes);
|
|
1781
1781
|
}
|
|
1782
1782
|
},
|
|
1783
1783
|
{
|
|
@@ -1787,10 +1787,10 @@ function Se(e, t) {
|
|
|
1787
1787
|
);
|
|
1788
1788
|
}
|
|
1789
1789
|
var br = Se(gr, { path: "/" }), ze;
|
|
1790
|
-
const xt = typeof window < "u", Er = (e) => typeof e == "string", Je = () => +Date.now(),
|
|
1790
|
+
const xt = typeof window < "u", Er = (e) => typeof e == "string", Je = () => +Date.now(), Re = () => {
|
|
1791
1791
|
};
|
|
1792
1792
|
xt && ((ze = window == null ? void 0 : window.navigator) != null && ze.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
|
1793
|
-
function
|
|
1793
|
+
function Ce(e) {
|
|
1794
1794
|
return typeof e == "function" ? e() : Nt(e);
|
|
1795
1795
|
}
|
|
1796
1796
|
function Sr(e, t) {
|
|
@@ -1801,13 +1801,13 @@ function Sr(e, t) {
|
|
|
1801
1801
|
}
|
|
1802
1802
|
return n;
|
|
1803
1803
|
}
|
|
1804
|
-
function
|
|
1805
|
-
let o = 0, s, i = !0, c =
|
|
1804
|
+
function Rr(e, t = !0, n = !0, r = !1) {
|
|
1805
|
+
let o = 0, s, i = !0, c = Re, f;
|
|
1806
1806
|
const u = () => {
|
|
1807
|
-
s && (clearTimeout(s), s = void 0, c(), c =
|
|
1807
|
+
s && (clearTimeout(s), s = void 0, c(), c = Re);
|
|
1808
1808
|
};
|
|
1809
1809
|
return (d) => {
|
|
1810
|
-
const w =
|
|
1810
|
+
const w = Ce(e), g = Date.now() - o, p = () => f = d();
|
|
1811
1811
|
return u(), w <= 0 ? (o = Date.now(), p()) : (g > w && (n || !i) ? (o = Date.now(), p()) : t && (f = new Promise((m, h) => {
|
|
1812
1812
|
c = r ? h : m, s = setTimeout(() => {
|
|
1813
1813
|
o = Date.now(), i = !0, m(p()), u();
|
|
@@ -1815,7 +1815,7 @@ function Tr(e, t = !0, n = !0, r = !1) {
|
|
|
1815
1815
|
})), !n && !s && (s = setTimeout(() => i = !0, w)), i = !1, f);
|
|
1816
1816
|
};
|
|
1817
1817
|
}
|
|
1818
|
-
function
|
|
1818
|
+
function Tr(e) {
|
|
1819
1819
|
return e;
|
|
1820
1820
|
}
|
|
1821
1821
|
function Or(e) {
|
|
@@ -1823,18 +1823,18 @@ function Or(e) {
|
|
|
1823
1823
|
}
|
|
1824
1824
|
function Ar(e) {
|
|
1825
1825
|
var t;
|
|
1826
|
-
const n =
|
|
1826
|
+
const n = Ce(e);
|
|
1827
1827
|
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
1828
1828
|
}
|
|
1829
|
-
const
|
|
1829
|
+
const kt = xt ? window : void 0;
|
|
1830
1830
|
function Ve(...e) {
|
|
1831
1831
|
let t, n, r, o;
|
|
1832
|
-
if (Er(e[0]) || Array.isArray(e[0]) ? ([n, r, o] = e, t =
|
|
1833
|
-
return
|
|
1832
|
+
if (Er(e[0]) || Array.isArray(e[0]) ? ([n, r, o] = e, t = kt) : [t, n, r, o] = e, !t)
|
|
1833
|
+
return Re;
|
|
1834
1834
|
Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]);
|
|
1835
1835
|
const s = [], i = () => {
|
|
1836
1836
|
s.forEach((l) => l()), s.length = 0;
|
|
1837
|
-
}, c = (l, d, w, g) => (l.addEventListener(d, w, g), () => l.removeEventListener(d, w, g)), f = Oe(() => [Ar(t),
|
|
1837
|
+
}, c = (l, d, w, g) => (l.addEventListener(d, w, g), () => l.removeEventListener(d, w, g)), f = Oe(() => [Ar(t), Ce(o)], ([l, d]) => {
|
|
1838
1838
|
i(), l && s.push(...n.flatMap((w) => r.map((g) => c(l, w, g, d))));
|
|
1839
1839
|
}, { immediate: !0, flush: "post" }), u = () => {
|
|
1840
1840
|
f(), i();
|
|
@@ -1844,13 +1844,13 @@ function Ve(...e) {
|
|
|
1844
1844
|
const We = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Ke = "__vueuse_ssr_handlers__";
|
|
1845
1845
|
We[Ke] = We[Ke] || {};
|
|
1846
1846
|
const _r = ["mousemove", "mousedown", "resize", "keydown", "touchstart", "wheel"], xr = 6e4;
|
|
1847
|
-
function
|
|
1847
|
+
function kr(e = xr, t = {}) {
|
|
1848
1848
|
const {
|
|
1849
1849
|
initialState: n = !1,
|
|
1850
1850
|
listenForVisibilityChange: r = !0,
|
|
1851
1851
|
events: o = _r,
|
|
1852
|
-
window: s =
|
|
1853
|
-
eventFilter: i =
|
|
1852
|
+
window: s = kt,
|
|
1853
|
+
eventFilter: i = Rr(50)
|
|
1854
1854
|
} = t, c = ee(n), f = ee(Je());
|
|
1855
1855
|
let u;
|
|
1856
1856
|
const l = Sr(i, () => {
|
|
@@ -1870,7 +1870,7 @@ var Qe;
|
|
|
1870
1870
|
(function(e) {
|
|
1871
1871
|
e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
|
|
1872
1872
|
})(Qe || (Qe = {}));
|
|
1873
|
-
var
|
|
1873
|
+
var Cr = Object.defineProperty, Xe = Object.getOwnPropertySymbols, Pr = Object.prototype.hasOwnProperty, Ur = Object.prototype.propertyIsEnumerable, Ge = (e, t, n) => t in e ? Cr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Lr = (e, t) => {
|
|
1874
1874
|
for (var n in t || (t = {}))
|
|
1875
1875
|
Pr.call(t, n) && Ge(e, n, t[n]);
|
|
1876
1876
|
if (Xe)
|
|
@@ -1905,22 +1905,22 @@ const Nr = {
|
|
|
1905
1905
|
easeInOutBack: [0.68, -0.6, 0.32, 1.6]
|
|
1906
1906
|
};
|
|
1907
1907
|
Lr({
|
|
1908
|
-
linear:
|
|
1908
|
+
linear: Tr
|
|
1909
1909
|
}, Nr);
|
|
1910
|
-
let
|
|
1911
|
-
const
|
|
1912
|
-
|
|
1910
|
+
let Te;
|
|
1911
|
+
const Ct = { triggerProxySso: "triggerProxySso" }, Fr = () => {
|
|
1912
|
+
Te = (e) => {
|
|
1913
1913
|
var n;
|
|
1914
1914
|
const { origin: t } = new URL(location.href);
|
|
1915
1915
|
(n = window.top) == null || n.postMessage(
|
|
1916
|
-
{ type:
|
|
1916
|
+
{ type: Ct.triggerProxySso, data: { ...e || {}, redirect_uri: `${t}/` } },
|
|
1917
1917
|
t
|
|
1918
1918
|
);
|
|
1919
1919
|
};
|
|
1920
1920
|
}, Dr = (e) => {
|
|
1921
1921
|
window.top === window.self && window.addEventListener("message", (t) => {
|
|
1922
1922
|
const { type: n, data: r } = t.data;
|
|
1923
|
-
n ===
|
|
1923
|
+
n === Ct.triggerProxySso && (e == null || e(r));
|
|
1924
1924
|
});
|
|
1925
1925
|
};
|
|
1926
1926
|
window.top !== window.self && Fr();
|
|
@@ -1932,14 +1932,14 @@ let Pt = (e = 21) => {
|
|
|
1932
1932
|
}
|
|
1933
1933
|
return t;
|
|
1934
1934
|
};
|
|
1935
|
-
const
|
|
1935
|
+
const X = (e) => new URL(location.href).searchParams.get(e), D = {
|
|
1936
1936
|
oauth: "/api/justauth/oauth-server/v1/visitor/oauth/authorize",
|
|
1937
1937
|
// 重定向到登录页
|
|
1938
1938
|
logoutCurpage: "/api/justauth/oauth-server/v1/visitor/logout-curpage",
|
|
1939
1939
|
// 清除登录信息
|
|
1940
1940
|
token: "/api/justauth/oauth-server/v1/visitor/oauth/token"
|
|
1941
1941
|
// 通过code获取token
|
|
1942
|
-
}, { baseURL: Ze, noRedireLogin: vr = !1 } = Ae(), Ir = "/home", re = location.origin + Ir,
|
|
1942
|
+
}, { baseURL: Ze, noRedireLogin: vr = !1 } = Ae(), Ir = "/home", re = location.origin + Ir, q = {
|
|
1943
1943
|
response_type: "code",
|
|
1944
1944
|
scope: "sever",
|
|
1945
1945
|
client_id: "sys",
|
|
@@ -1952,7 +1952,7 @@ const H = (e) => new URL(location.href).searchParams.get(e), v = {
|
|
|
1952
1952
|
}), t.search = n.toString(), window.history.replaceState({}, "", t);
|
|
1953
1953
|
}, Ut = ee(!1), Lt = (e) => {
|
|
1954
1954
|
if (e <= 0) return;
|
|
1955
|
-
const { idle: t } =
|
|
1955
|
+
const { idle: t } = kr(e);
|
|
1956
1956
|
Oe(
|
|
1957
1957
|
() => t.value,
|
|
1958
1958
|
(n) => {
|
|
@@ -1963,30 +1963,30 @@ const H = (e) => new URL(location.href).searchParams.get(e), v = {
|
|
|
1963
1963
|
localStorage.getItem("idelTime") && Lt(Number(localStorage.getItem("idelTime")));
|
|
1964
1964
|
let et = "";
|
|
1965
1965
|
const Br = async () => {
|
|
1966
|
-
const e =
|
|
1967
|
-
if (!e) return
|
|
1968
|
-
const r =
|
|
1969
|
-
if (
|
|
1970
|
-
return Ye(["code", "state", "kingdee_token", "redirect_url"]), window.__isAutoCloseApp = !1, window.location.replace(decodeURIComponent(t)),
|
|
1966
|
+
const e = X("code") || "", t = X("redirect_url") || "/", n = X("kingdee_token") || "";
|
|
1967
|
+
if (!e) return H();
|
|
1968
|
+
const r = X("loginType") || "";
|
|
1969
|
+
if (localStorage.setItem("loginType", r), e === et)
|
|
1970
|
+
return Ye(["code", "state", "kingdee_token", "redirect_url"]), window.__isAutoCloseApp = !1, window.location.replace(decodeURIComponent(t)), H();
|
|
1971
1971
|
et = e, Ye(["code", "state", "kingdee_token", "redirect_url", "loginType"]);
|
|
1972
1972
|
let o = {};
|
|
1973
1973
|
const s = {
|
|
1974
1974
|
grant_type: "authorization_code",
|
|
1975
1975
|
code: e,
|
|
1976
|
-
client_id:
|
|
1977
|
-
client_secret:
|
|
1976
|
+
client_id: q.client_id,
|
|
1977
|
+
client_secret: q.client_secret,
|
|
1978
1978
|
redirect_uri: re,
|
|
1979
1979
|
timestamp: (/* @__PURE__ */ new Date()).getTime(),
|
|
1980
1980
|
nonce: Pt()
|
|
1981
1981
|
};
|
|
1982
1982
|
n && (sessionStorage.setItem("kingdee_token", n), s.redirect_uri = `${s.redirect_uri}?kingdee_token=${n}`);
|
|
1983
1983
|
try {
|
|
1984
|
-
await b.create().get(
|
|
1984
|
+
await b.create().get(D.token, { baseURL: Ze });
|
|
1985
1985
|
} catch {
|
|
1986
1986
|
}
|
|
1987
1987
|
try {
|
|
1988
1988
|
o = await b.create().post(
|
|
1989
|
-
|
|
1989
|
+
D.token,
|
|
1990
1990
|
{},
|
|
1991
1991
|
{
|
|
1992
1992
|
baseURL: Ze,
|
|
@@ -2003,39 +2003,37 @@ const Br = async () => {
|
|
|
2003
2003
|
refreshToken: f,
|
|
2004
2004
|
info: o.data
|
|
2005
2005
|
};
|
|
2006
|
-
|
|
2006
|
+
$().save(l), await tt(i);
|
|
2007
2007
|
const d = Number(u) - (/* @__PURE__ */ new Date()).getTime();
|
|
2008
2008
|
return d && d > 0 && (Lt(d), d && localStorage.setItem("idelTime", d.toString())), t && (window.__isAutoCloseApp = !1, window.location.replace(decodeURIComponent(t))), i;
|
|
2009
2009
|
} catch {
|
|
2010
|
-
return ue({ ...
|
|
2010
|
+
return ue({ ...q, redirect_uri: re });
|
|
2011
2011
|
}
|
|
2012
|
-
},
|
|
2013
|
-
var o;
|
|
2012
|
+
}, j = ee(!1), po = async (e) => {
|
|
2014
2013
|
if (e.public) return "";
|
|
2015
2014
|
if (Ut.value)
|
|
2016
|
-
return ue({ ...
|
|
2017
|
-
if (
|
|
2018
|
-
return await new Promise(async (
|
|
2015
|
+
return ue({ ...q, redirect_uri: re });
|
|
2016
|
+
if (j.value)
|
|
2017
|
+
return await new Promise(async (r) => {
|
|
2019
2018
|
Oe(
|
|
2020
|
-
() =>
|
|
2021
|
-
(
|
|
2022
|
-
if (!
|
|
2023
|
-
const
|
|
2024
|
-
s
|
|
2019
|
+
() => j.value,
|
|
2020
|
+
(o) => {
|
|
2021
|
+
if (!o) {
|
|
2022
|
+
const s = H();
|
|
2023
|
+
r(s);
|
|
2025
2024
|
}
|
|
2026
2025
|
}
|
|
2027
2026
|
);
|
|
2028
2027
|
});
|
|
2029
|
-
const { accessTokenExpiredAt: t } =
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
q.value = !0;
|
|
2028
|
+
const { accessTokenExpiredAt: t } = $().getData();
|
|
2029
|
+
let n = H();
|
|
2030
|
+
j.value = !0;
|
|
2033
2031
|
try {
|
|
2034
|
-
typeof t == "number" && t > 0 && +/* @__PURE__ */ new Date() + 6e4 > t && (
|
|
2032
|
+
typeof t == "number" && t > 0 && +/* @__PURE__ */ new Date() + 6e4 > t && (n = await Hr(q)), n = await Br(), j.value = !1;
|
|
2035
2033
|
} catch {
|
|
2036
|
-
|
|
2034
|
+
j.value = !1;
|
|
2037
2035
|
}
|
|
2038
|
-
return
|
|
2036
|
+
return n;
|
|
2039
2037
|
}, jr = () => {
|
|
2040
2038
|
let e = !1;
|
|
2041
2039
|
return localStorage.getItem("thirdLogouSource") === "zhongshen" && (e = !0), e;
|
|
@@ -2046,17 +2044,17 @@ const Br = async () => {
|
|
|
2046
2044
|
}
|
|
2047
2045
|
}, ue = (e) => {
|
|
2048
2046
|
if (vr) return;
|
|
2049
|
-
const t = { ...e }, n = localStorage.getItem("loginType");
|
|
2050
|
-
|
|
2047
|
+
const t = { ...e }, n = localStorage.getItem("loginType") || "";
|
|
2048
|
+
t.loginType = n;
|
|
2051
2049
|
const { baseURL: r, ssoLocale: o } = Ae();
|
|
2052
|
-
if (
|
|
2050
|
+
if (Te) return Te(t);
|
|
2053
2051
|
t.logout = "true", o && (t.locale = "locale");
|
|
2054
|
-
const s = Object.keys(t).filter((c) => c !== "client_secret").map((c) => `${c}=${t[c]}`).join("&"), i = `${r}${
|
|
2055
|
-
if (localStorage.removeItem("idelTime"),
|
|
2052
|
+
const s = Object.keys(t).filter((c) => c !== "client_secret").map((c) => `${c}=${t[c]}`).join("&"), i = `${r}${D.oauth}?${s}`;
|
|
2053
|
+
if (localStorage.removeItem("idelTime"), sessionStorage.clear(), $().remove(), jr())
|
|
2056
2054
|
qr(i);
|
|
2057
2055
|
else {
|
|
2058
2056
|
try {
|
|
2059
|
-
b.create().get(
|
|
2057
|
+
b.create().get(D.logoutCurpage, { baseURL: r });
|
|
2060
2058
|
} catch {
|
|
2061
2059
|
}
|
|
2062
2060
|
window.__isAutoCloseApp = !1, location.replace(i);
|
|
@@ -2064,14 +2062,14 @@ const Br = async () => {
|
|
|
2064
2062
|
};
|
|
2065
2063
|
Dr(ue);
|
|
2066
2064
|
const Hr = async (e) => {
|
|
2067
|
-
const { baseURL: t } = Ae(), { refreshToken: n } =
|
|
2065
|
+
const { baseURL: t } = Ae(), { refreshToken: n } = $().getData();
|
|
2068
2066
|
try {
|
|
2069
|
-
await b.create().get(
|
|
2067
|
+
await b.create().get(D.token, { baseURL: t });
|
|
2070
2068
|
} catch {
|
|
2071
2069
|
}
|
|
2072
2070
|
try {
|
|
2073
2071
|
const r = await b.create().post(
|
|
2074
|
-
|
|
2072
|
+
D.token,
|
|
2075
2073
|
{},
|
|
2076
2074
|
{
|
|
2077
2075
|
baseURL: t,
|
|
@@ -2090,13 +2088,13 @@ const Hr = async (e) => {
|
|
|
2090
2088
|
refreshToken: i,
|
|
2091
2089
|
info: r.data
|
|
2092
2090
|
};
|
|
2093
|
-
return
|
|
2091
|
+
return $().save(c), await tt(o), o;
|
|
2094
2092
|
} catch {
|
|
2095
2093
|
return ue({ ...e, redirect_uri: re });
|
|
2096
2094
|
}
|
|
2097
|
-
},
|
|
2095
|
+
}, $ = () => ({
|
|
2098
2096
|
getData: () => ({
|
|
2099
|
-
accessToken:
|
|
2097
|
+
accessToken: H(),
|
|
2100
2098
|
accessTokenExpiredAt: fe("accessTokenExpiredAt") ? Number(fe("accessTokenExpiredAt")) : "",
|
|
2101
2099
|
refreshToken: fe("refreshToken")
|
|
2102
2100
|
}),
|
|
@@ -2111,11 +2109,11 @@ const Hr = async (e) => {
|
|
|
2111
2109
|
}
|
|
2112
2110
|
});
|
|
2113
2111
|
export {
|
|
2114
|
-
|
|
2112
|
+
X as getQuery,
|
|
2115
2113
|
po as getToken,
|
|
2116
2114
|
Br as getTokenFromCode,
|
|
2117
|
-
|
|
2115
|
+
q as getTokenParams,
|
|
2118
2116
|
ue as login,
|
|
2119
2117
|
re as real_uri,
|
|
2120
|
-
|
|
2118
|
+
$ as tokenStorage
|
|
2121
2119
|
};
|