@das-fed/utils 1.0.1 → 1.0.3

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.
Files changed (131) hide show
  1. package/api-services/index.d.ts +1 -0
  2. package/api-services/index.js +3 -19845
  3. package/api-services/modules/app-manage.d.ts +2 -0
  4. package/api-services/modules/app-manage.js +5 -6
  5. package/api-services/modules/authentication.d.ts +2 -0
  6. package/api-services/modules/authentication.js +5 -6
  7. package/api-services/modules/bems.d.ts +6 -0
  8. package/api-services/modules/bems.js +8 -10
  9. package/api-services/modules/contract.d.ts +2 -0
  10. package/api-services/modules/contract.js +5 -6
  11. package/api-services/modules/duty-manage.d.ts +7 -0
  12. package/api-services/modules/duty-manage.js +9 -10
  13. package/api-services/modules/enterpriseright.d.ts +2 -0
  14. package/api-services/modules/enterpriseright.js +5 -6
  15. package/api-services/modules/file.d.ts +36 -0
  16. package/api-services/modules/file.js +449 -354
  17. package/api-services/modules/gateway-edge.d.ts +2 -0
  18. package/api-services/modules/gateway-edge.js +5 -6
  19. package/api-services/modules/index.d.ts +21 -0
  20. package/api-services/modules/index.js +501 -435
  21. package/api-services/modules/iot.d.ts +15 -0
  22. package/api-services/modules/iot.js +17 -18
  23. package/api-services/modules/justauth.d.ts +3 -0
  24. package/api-services/modules/justauth.js +6 -7
  25. package/api-services/modules/knowledge.d.ts +2 -0
  26. package/api-services/modules/knowledge.js +5 -6
  27. package/api-services/modules/link.d.ts +2 -0
  28. package/api-services/modules/link.js +5 -6
  29. package/api-services/modules/permission.d.ts +2 -0
  30. package/api-services/modules/permission.js +5 -6
  31. package/api-services/modules/platformManage.d.ts +14 -0
  32. package/api-services/modules/platformManage.js +12 -13
  33. package/api-services/modules/portal.d.ts +2 -0
  34. package/api-services/modules/portal.js +5 -6
  35. package/api-services/modules/space-manage.d.ts +2 -0
  36. package/api-services/modules/space-manage.js +5 -6
  37. package/api-services/modules/super-admin.d.ts +8 -0
  38. package/api-services/modules/super-admin.js +8 -9
  39. package/api-services/modules/supplier.d.ts +6 -0
  40. package/api-services/modules/supplier.js +7 -8
  41. package/api-services/modules/supplychain-manage.d.ts +2 -0
  42. package/api-services/modules/supplychain-manage.js +5 -6
  43. package/api-services/modules/systemConfiguration.d.ts +2 -0
  44. package/api-services/modules/systemConfiguration.js +5 -6
  45. package/api-services/modules/tool.d.ts +2 -0
  46. package/api-services/modules/tool.js +5 -6
  47. package/api-services/src/create-service.d.ts +2 -0
  48. package/api-services/src/create-service.js +3119 -19726
  49. package/api-services/src/sso.d.ts +29 -0
  50. package/api-services/src/sso.js +1547 -156
  51. package/api-services/src/util.d.ts +1 -0
  52. package/api-services/src/util.js +1462 -19
  53. package/atob/index.d.ts +2 -0
  54. package/atob/index.js +9 -10
  55. package/common-info/getIframeUrl.d.ts +9 -0
  56. package/common-info/getIframeUrl.js +9 -11
  57. package/common-info/index.d.ts +42 -0
  58. package/common-info/index.js +138 -272
  59. package/common-info/setInfoFromUrl.d.ts +8 -0
  60. package/common-info/setInfoFromUrl.js +60 -128
  61. package/common-tools/arr-tools.d.ts +15 -0
  62. package/common-tools/arr-tools.js +6 -13
  63. package/common-tools/date-format.d.ts +7 -0
  64. package/common-tools/date-format.js +18 -21
  65. package/common-tools/get-url-params.d.ts +33 -0
  66. package/common-tools/get-url-params.js +48 -88
  67. package/common-tools/handle-data.d.ts +6 -0
  68. package/common-tools/handle-data.js +3 -4
  69. package/common-tools/index.d.ts +7 -0
  70. package/common-tools/index.js +7 -213
  71. package/common-tools/nest-tree-format.d.ts +30 -0
  72. package/common-tools/nest-tree-format.js +22 -49
  73. package/common-tools/obj-tools.d.ts +7 -0
  74. package/common-tools/obj-tools.js +17 -18
  75. package/common-tools/setHtmlMinWH.d.ts +5 -0
  76. package/common-tools/setHtmlMinWH.js +6 -10
  77. package/common-tools/throttled.d.ts +7 -0
  78. package/common-tools/throttled.js +7 -16
  79. package/config/index.d.ts +2 -0
  80. package/config/index.js +8 -25
  81. package/curring-http/index.d.ts +11 -0
  82. package/curring-http/index.js +5150 -17289
  83. package/directive/auth.d.ts +8 -0
  84. package/directive/auth.js +54 -104
  85. package/directive/clickOutside.d.ts +5 -0
  86. package/directive/clickOutside.js +23 -49
  87. package/directive/hoverInside.d.ts +5 -0
  88. package/directive/hoverInside.js +16 -35
  89. package/directive/index.d.ts +3 -0
  90. package/directive/index.js +7 -182
  91. package/directive/utils.d.ts +7 -0
  92. package/directive/utils.js +6 -11
  93. package/dom-check-in/index.d.ts +6 -0
  94. package/dom-check-in/index.js +7 -15
  95. package/dom-watcher/index.d.ts +25 -0
  96. package/dom-watcher/index.js +7 -8
  97. package/hooks/popup-manager/use-zindex.d.ts +5 -0
  98. package/hooks/popup-manager/use-zindex.js +17 -36
  99. package/index.d.ts +2 -0
  100. package/index.js +2 -215
  101. package/load-js/index.d.ts +3 -0
  102. package/load-js/index.js +10 -20
  103. package/oss/index.d.ts +2 -0
  104. package/oss/index.js +11 -15
  105. package/package.json +8 -13
  106. package/pinyin-first-character/index.d.ts +2 -0
  107. package/pinyin-first-character/index.js +25011 -12217
  108. package/process-engine-info/index.d.ts +10 -0
  109. package/process-engine-info/index.js +8 -10
  110. package/pure-image-src/index.d.ts +2 -0
  111. package/pure-image-src/index.js +3 -29
  112. package/set-personal-info/index.d.ts +5 -0
  113. package/set-personal-info/index.js +1460 -16
  114. package/size-watcher/index.d.ts +6 -0
  115. package/size-watcher/index.js +17 -24
  116. package/style/index.d.ts +2 -0
  117. package/style/index.js +62 -103
  118. package/style/math.d.ts +9 -0
  119. package/style/math.js +16 -31
  120. package/style/style.d.ts +30 -0
  121. package/style/style.js +49 -72
  122. package/token-tools/index.d.ts +18 -0
  123. package/token-tools/index.js +72 -149
  124. package/vue/hooks/use-model-value.d.ts +3 -0
  125. package/vue/hooks/use-model-value.js +9 -10
  126. package/vue/index.d.ts +1 -0
  127. package/vue/index.js +3 -10
  128. package/webSocket-service/index.d.ts +40 -0
  129. package/webSocket-service/index.js +62 -138
  130. package/with-install/index.d.ts +10 -0
  131. package/with-install/index.js +5 -7
@@ -1,24 +1,1468 @@
1
- import axios from 'axios';
2
- import { getProjectInfo } from '@das-fed/utils/common-info';
3
- import { getConfig } from '@das-fed/utils/config';
4
-
5
- const apis = {
6
- personalInfo: "/api/personal-center/personal-server/v1/info"
1
+ import { getProjectInfo as je } from "@das-fed/utils/common-info";
2
+ import { getConfig as Ie } from "@das-fed/utils/config";
3
+ function me(e, t) {
4
+ return function() {
5
+ return e.apply(t, arguments);
6
+ };
7
+ }
8
+ const { toString: He } = Object.prototype, { getPrototypeOf: Z } = Object, I = /* @__PURE__ */ ((e) => (t) => {
9
+ const n = He.call(t);
10
+ return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
11
+ })(/* @__PURE__ */ Object.create(null)), A = (e) => (e = e.toLowerCase(), (t) => I(t) === e), H = (e) => (t) => typeof t === e, { isArray: C } = Array, _ = H("undefined");
12
+ function qe(e) {
13
+ return e !== null && !_(e) && e.constructor !== null && !_(e.constructor) && R(e.constructor.isBuffer) && e.constructor.isBuffer(e);
14
+ }
15
+ const ye = A("ArrayBuffer");
16
+ function Me(e) {
17
+ let t;
18
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && ye(e.buffer), t;
19
+ }
20
+ const ze = H("string"), R = H("function"), Ee = H("number"), q = (e) => e !== null && typeof e == "object", Je = (e) => e === !0 || e === !1, L = (e) => {
21
+ if (I(e) !== "object")
22
+ return !1;
23
+ const t = Z(e);
24
+ return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
25
+ }, $e = A("Date"), Ve = A("File"), We = A("Blob"), Ke = A("FileList"), Ge = (e) => q(e) && R(e.pipe), Xe = (e) => {
26
+ let t;
27
+ return e && (typeof FormData == "function" && e instanceof FormData || R(e.append) && ((t = I(e)) === "formdata" || // detect form-data instance
28
+ t === "object" && R(e.toString) && e.toString() === "[object FormData]"));
29
+ }, ve = A("URLSearchParams"), Qe = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
30
+ function B(e, t, { allOwnKeys: n = !1 } = {}) {
31
+ if (e === null || typeof e > "u")
32
+ return;
33
+ let r, s;
34
+ if (typeof e != "object" && (e = [e]), C(e))
35
+ for (r = 0, s = e.length; r < s; r++)
36
+ t.call(null, e[r], r, e);
37
+ else {
38
+ const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
39
+ let c;
40
+ for (r = 0; r < i; r++)
41
+ c = o[r], t.call(null, e[c], c, e);
42
+ }
43
+ }
44
+ function we(e, t) {
45
+ t = t.toLowerCase();
46
+ const n = Object.keys(e);
47
+ let r = n.length, s;
48
+ for (; r-- > 0; )
49
+ if (s = n[r], t === s.toLowerCase())
50
+ return s;
51
+ return null;
52
+ }
53
+ const be = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Se = (e) => !_(e) && e !== be;
54
+ function K() {
55
+ const { caseless: e } = Se(this) && this || {}, t = {}, n = (r, s) => {
56
+ const o = e && we(t, s) || s;
57
+ L(t[o]) && L(r) ? t[o] = K(t[o], r) : L(r) ? t[o] = K({}, r) : C(r) ? t[o] = r.slice() : t[o] = r;
58
+ };
59
+ for (let r = 0, s = arguments.length; r < s; r++)
60
+ arguments[r] && B(arguments[r], n);
61
+ return t;
62
+ }
63
+ const Ze = (e, t, n, { allOwnKeys: r } = {}) => (B(t, (s, o) => {
64
+ n && R(s) ? e[o] = me(s, n) : e[o] = s;
65
+ }, { allOwnKeys: r }), e), Ye = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), et = (e, t, n, r) => {
66
+ e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
67
+ value: t.prototype
68
+ }), n && Object.assign(e.prototype, n);
69
+ }, tt = (e, t, n, r) => {
70
+ let s, o, i;
71
+ const c = {};
72
+ if (t = t || {}, e == null)
73
+ return t;
74
+ do {
75
+ for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
76
+ i = s[o], (!r || r(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
77
+ e = n !== !1 && Z(e);
78
+ } while (e && (!n || n(e, t)) && e !== Object.prototype);
79
+ return t;
80
+ }, nt = (e, t, n) => {
81
+ e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
82
+ const r = e.indexOf(t, n);
83
+ return r !== -1 && r === n;
84
+ }, rt = (e) => {
85
+ if (!e)
86
+ return null;
87
+ if (C(e))
88
+ return e;
89
+ let t = e.length;
90
+ if (!Ee(t))
91
+ return null;
92
+ const n = new Array(t);
93
+ for (; t-- > 0; )
94
+ n[t] = e[t];
95
+ return n;
96
+ }, st = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Z(Uint8Array)), ot = (e, t) => {
97
+ const r = (e && e[Symbol.iterator]).call(e);
98
+ let s;
99
+ for (; (s = r.next()) && !s.done; ) {
100
+ const o = s.value;
101
+ t.call(e, o[0], o[1]);
102
+ }
103
+ }, it = (e, t) => {
104
+ let n;
105
+ const r = [];
106
+ for (; (n = e.exec(t)) !== null; )
107
+ r.push(n);
108
+ return r;
109
+ }, at = A("HTMLFormElement"), ct = (e) => e.toLowerCase().replace(
110
+ /[-_\s]([a-z\d])(\w*)/g,
111
+ function(n, r, s) {
112
+ return r.toUpperCase() + s;
113
+ }
114
+ ), se = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), ut = A("RegExp"), Re = (e, t) => {
115
+ const n = Object.getOwnPropertyDescriptors(e), r = {};
116
+ B(n, (s, o) => {
117
+ let i;
118
+ (i = t(s, o, e)) !== !1 && (r[o] = i || s);
119
+ }), Object.defineProperties(e, r);
120
+ }, lt = (e) => {
121
+ Re(e, (t, n) => {
122
+ if (R(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
123
+ return !1;
124
+ const r = e[n];
125
+ if (R(r)) {
126
+ if (t.enumerable = !1, "writable" in t) {
127
+ t.writable = !1;
128
+ return;
129
+ }
130
+ t.set || (t.set = () => {
131
+ throw Error("Can not rewrite read-only method '" + n + "'");
132
+ });
133
+ }
134
+ });
135
+ }, ft = (e, t) => {
136
+ const n = {}, r = (s) => {
137
+ s.forEach((o) => {
138
+ n[o] = !0;
139
+ });
140
+ };
141
+ return C(e) ? r(e) : r(String(e).split(t)), n;
142
+ }, dt = () => {
143
+ }, pt = (e, t) => (e = +e, Number.isFinite(e) ? e : t), J = "abcdefghijklmnopqrstuvwxyz", oe = "0123456789", Oe = {
144
+ DIGIT: oe,
145
+ ALPHA: J,
146
+ ALPHA_DIGIT: J + J.toUpperCase() + oe
147
+ }, ht = (e = 16, t = Oe.ALPHA_DIGIT) => {
148
+ let n = "";
149
+ const { length: r } = t;
150
+ for (; e--; )
151
+ n += t[Math.random() * r | 0];
152
+ return n;
153
+ };
154
+ function mt(e) {
155
+ return !!(e && R(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
156
+ }
157
+ const yt = (e) => {
158
+ const t = new Array(10), n = (r, s) => {
159
+ if (q(r)) {
160
+ if (t.indexOf(r) >= 0)
161
+ return;
162
+ if (!("toJSON" in r)) {
163
+ t[s] = r;
164
+ const o = C(r) ? [] : {};
165
+ return B(r, (i, c) => {
166
+ const p = n(i, s + 1);
167
+ !_(p) && (o[c] = p);
168
+ }), t[s] = void 0, o;
169
+ }
170
+ }
171
+ return r;
172
+ };
173
+ return n(e, 0);
174
+ }, Et = A("AsyncFunction"), wt = (e) => e && (q(e) || R(e)) && R(e.then) && R(e.catch), a = {
175
+ isArray: C,
176
+ isArrayBuffer: ye,
177
+ isBuffer: qe,
178
+ isFormData: Xe,
179
+ isArrayBufferView: Me,
180
+ isString: ze,
181
+ isNumber: Ee,
182
+ isBoolean: Je,
183
+ isObject: q,
184
+ isPlainObject: L,
185
+ isUndefined: _,
186
+ isDate: $e,
187
+ isFile: Ve,
188
+ isBlob: We,
189
+ isRegExp: ut,
190
+ isFunction: R,
191
+ isStream: Ge,
192
+ isURLSearchParams: ve,
193
+ isTypedArray: st,
194
+ isFileList: Ke,
195
+ forEach: B,
196
+ merge: K,
197
+ extend: Ze,
198
+ trim: Qe,
199
+ stripBOM: Ye,
200
+ inherits: et,
201
+ toFlatObject: tt,
202
+ kindOf: I,
203
+ kindOfTest: A,
204
+ endsWith: nt,
205
+ toArray: rt,
206
+ forEachEntry: ot,
207
+ matchAll: it,
208
+ isHTMLForm: at,
209
+ hasOwnProperty: se,
210
+ hasOwnProp: se,
211
+ // an alias to avoid ESLint no-prototype-builtins detection
212
+ reduceDescriptors: Re,
213
+ freezeMethods: lt,
214
+ toObjectSet: ft,
215
+ toCamelCase: ct,
216
+ noop: dt,
217
+ toFiniteNumber: pt,
218
+ findKey: we,
219
+ global: be,
220
+ isContextDefined: Se,
221
+ ALPHABET: Oe,
222
+ generateString: ht,
223
+ isSpecCompliantForm: mt,
224
+ toJSONObject: yt,
225
+ isAsyncFn: Et,
226
+ isThenable: wt
227
+ };
228
+ function m(e, t, n, r, s) {
229
+ 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), s && (this.response = s);
230
+ }
231
+ a.inherits(m, Error, {
232
+ toJSON: function() {
233
+ return {
234
+ // Standard
235
+ message: this.message,
236
+ name: this.name,
237
+ // Microsoft
238
+ description: this.description,
239
+ number: this.number,
240
+ // Mozilla
241
+ fileName: this.fileName,
242
+ lineNumber: this.lineNumber,
243
+ columnNumber: this.columnNumber,
244
+ stack: this.stack,
245
+ // Axios
246
+ config: a.toJSONObject(this.config),
247
+ code: this.code,
248
+ status: this.response && this.response.status ? this.response.status : null
249
+ };
250
+ }
251
+ });
252
+ const Ae = m.prototype, Te = {};
253
+ [
254
+ "ERR_BAD_OPTION_VALUE",
255
+ "ERR_BAD_OPTION",
256
+ "ECONNABORTED",
257
+ "ETIMEDOUT",
258
+ "ERR_NETWORK",
259
+ "ERR_FR_TOO_MANY_REDIRECTS",
260
+ "ERR_DEPRECATED",
261
+ "ERR_BAD_RESPONSE",
262
+ "ERR_BAD_REQUEST",
263
+ "ERR_CANCELED",
264
+ "ERR_NOT_SUPPORT",
265
+ "ERR_INVALID_URL"
266
+ // eslint-disable-next-line func-names
267
+ ].forEach((e) => {
268
+ Te[e] = { value: e };
269
+ });
270
+ Object.defineProperties(m, Te);
271
+ Object.defineProperty(Ae, "isAxiosError", { value: !0 });
272
+ m.from = (e, t, n, r, s, o) => {
273
+ const i = Object.create(Ae);
274
+ return a.toFlatObject(e, i, function(p) {
275
+ return p !== Error.prototype;
276
+ }, (c) => c !== "isAxiosError"), m.call(i, e.message, t, n, r, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
277
+ };
278
+ const bt = null;
279
+ function G(e) {
280
+ return a.isPlainObject(e) || a.isArray(e);
281
+ }
282
+ function ge(e) {
283
+ return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
284
+ }
285
+ function ie(e, t, n) {
286
+ return e ? e.concat(t).map(function(s, o) {
287
+ return s = ge(s), !n && o ? "[" + s + "]" : s;
288
+ }).join(n ? "." : "") : t;
289
+ }
290
+ function St(e) {
291
+ return a.isArray(e) && !e.some(G);
292
+ }
293
+ const Rt = a.toFlatObject(a, {}, null, function(t) {
294
+ return /^is[A-Z]/.test(t);
295
+ });
296
+ function M(e, t, n) {
297
+ if (!a.isObject(e))
298
+ throw new TypeError("target must be an object");
299
+ t = t || new FormData(), n = a.toFlatObject(n, {
300
+ metaTokens: !0,
301
+ dots: !1,
302
+ indexes: !1
303
+ }, !1, function(d, w) {
304
+ return !a.isUndefined(w[d]);
305
+ });
306
+ const r = n.metaTokens, s = n.visitor || l, o = n.dots, i = n.indexes, p = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
307
+ if (!a.isFunction(s))
308
+ throw new TypeError("visitor must be a function");
309
+ function h(f) {
310
+ if (f === null)
311
+ return "";
312
+ if (a.isDate(f))
313
+ return f.toISOString();
314
+ if (!p && a.isBlob(f))
315
+ throw new m("Blob is not supported. Use a Buffer instead.");
316
+ return a.isArrayBuffer(f) || a.isTypedArray(f) ? p && typeof Blob == "function" ? new Blob([f]) : Buffer.from(f) : f;
317
+ }
318
+ function l(f, d, w) {
319
+ let b = f;
320
+ if (f && !w && typeof f == "object") {
321
+ if (a.endsWith(d, "{}"))
322
+ d = r ? d : d.slice(0, -2), f = JSON.stringify(f);
323
+ else if (a.isArray(f) && St(f) || (a.isFileList(f) || a.endsWith(d, "[]")) && (b = a.toArray(f)))
324
+ return d = ge(d), b.forEach(function(N, ke) {
325
+ !(a.isUndefined(N) || N === null) && t.append(
326
+ // eslint-disable-next-line no-nested-ternary
327
+ i === !0 ? ie([d], ke, o) : i === null ? d : d + "[]",
328
+ h(N)
329
+ );
330
+ }), !1;
331
+ }
332
+ return G(f) ? !0 : (t.append(ie(w, d, o), h(f)), !1);
333
+ }
334
+ const u = [], E = Object.assign(Rt, {
335
+ defaultVisitor: l,
336
+ convertValue: h,
337
+ isVisitable: G
338
+ });
339
+ function S(f, d) {
340
+ if (!a.isUndefined(f)) {
341
+ if (u.indexOf(f) !== -1)
342
+ throw Error("Circular reference detected in " + d.join("."));
343
+ u.push(f), a.forEach(f, function(b, g) {
344
+ (!(a.isUndefined(b) || b === null) && s.call(
345
+ t,
346
+ b,
347
+ a.isString(g) ? g.trim() : g,
348
+ d,
349
+ E
350
+ )) === !0 && S(b, d ? d.concat(g) : [g]);
351
+ }), u.pop();
352
+ }
353
+ }
354
+ if (!a.isObject(e))
355
+ throw new TypeError("data must be an object");
356
+ return S(e), t;
357
+ }
358
+ function ae(e) {
359
+ const t = {
360
+ "!": "%21",
361
+ "'": "%27",
362
+ "(": "%28",
363
+ ")": "%29",
364
+ "~": "%7E",
365
+ "%20": "+",
366
+ "%00": "\0"
367
+ };
368
+ return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) {
369
+ return t[r];
370
+ });
371
+ }
372
+ function Y(e, t) {
373
+ this._pairs = [], e && M(e, this, t);
374
+ }
375
+ const Ne = Y.prototype;
376
+ Ne.append = function(t, n) {
377
+ this._pairs.push([t, n]);
378
+ };
379
+ Ne.toString = function(t) {
380
+ const n = t ? function(r) {
381
+ return t.call(this, r, ae);
382
+ } : ae;
383
+ return this._pairs.map(function(s) {
384
+ return n(s[0]) + "=" + n(s[1]);
385
+ }, "").join("&");
386
+ };
387
+ function Ot(e) {
388
+ return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
389
+ }
390
+ function xe(e, t, n) {
391
+ if (!t)
392
+ return e;
393
+ const r = n && n.encode || Ot, s = n && n.serialize;
394
+ let o;
395
+ if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new Y(t, n).toString(r), o) {
396
+ const i = e.indexOf("#");
397
+ i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
398
+ }
399
+ return e;
400
+ }
401
+ class ce {
402
+ constructor() {
403
+ this.handlers = [];
404
+ }
405
+ /**
406
+ * Add a new interceptor to the stack
407
+ *
408
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
409
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
410
+ *
411
+ * @return {Number} An ID used to remove interceptor later
412
+ */
413
+ use(t, n, r) {
414
+ return this.handlers.push({
415
+ fulfilled: t,
416
+ rejected: n,
417
+ synchronous: r ? r.synchronous : !1,
418
+ runWhen: r ? r.runWhen : null
419
+ }), this.handlers.length - 1;
420
+ }
421
+ /**
422
+ * Remove an interceptor from the stack
423
+ *
424
+ * @param {Number} id The ID that was returned by `use`
425
+ *
426
+ * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
427
+ */
428
+ eject(t) {
429
+ this.handlers[t] && (this.handlers[t] = null);
430
+ }
431
+ /**
432
+ * Clear all interceptors from the stack
433
+ *
434
+ * @returns {void}
435
+ */
436
+ clear() {
437
+ this.handlers && (this.handlers = []);
438
+ }
439
+ /**
440
+ * Iterate over all the registered interceptors
441
+ *
442
+ * This method is particularly useful for skipping over any
443
+ * interceptors that may have become `null` calling `eject`.
444
+ *
445
+ * @param {Function} fn The function to call for each interceptor
446
+ *
447
+ * @returns {void}
448
+ */
449
+ forEach(t) {
450
+ a.forEach(this.handlers, function(r) {
451
+ r !== null && t(r);
452
+ });
453
+ }
454
+ }
455
+ const Pe = {
456
+ silentJSONParsing: !0,
457
+ forcedJSONParsing: !0,
458
+ clarifyTimeoutError: !1
459
+ }, At = typeof URLSearchParams < "u" ? URLSearchParams : Y, Tt = typeof FormData < "u" ? FormData : null, gt = typeof Blob < "u" ? Blob : null, Nt = {
460
+ isBrowser: !0,
461
+ classes: {
462
+ URLSearchParams: At,
463
+ FormData: Tt,
464
+ Blob: gt
465
+ },
466
+ protocols: ["http", "https", "file", "blob", "url", "data"]
467
+ }, Ce = typeof window < "u" && typeof document < "u", xt = ((e) => Ce && ["ReactNative", "NativeScript", "NS"].indexOf(e) < 0)(typeof navigator < "u" && navigator.product), Pt = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
468
+ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
469
+ __proto__: null,
470
+ hasBrowserEnv: Ce,
471
+ hasStandardBrowserEnv: xt,
472
+ hasStandardBrowserWebWorkerEnv: Pt
473
+ }, Symbol.toStringTag, { value: "Module" })), O = {
474
+ ...Ct,
475
+ ...Nt
476
+ };
477
+ function Ft(e, t) {
478
+ return M(e, new O.classes.URLSearchParams(), Object.assign({
479
+ visitor: function(n, r, s, o) {
480
+ return O.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
481
+ }
482
+ }, t));
483
+ }
484
+ function _t(e) {
485
+ return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
486
+ }
487
+ function Bt(e) {
488
+ const t = {}, n = Object.keys(e);
489
+ let r;
490
+ const s = n.length;
491
+ let o;
492
+ for (r = 0; r < s; r++)
493
+ o = n[r], t[o] = e[o];
494
+ return t;
495
+ }
496
+ function Fe(e) {
497
+ function t(n, r, s, o) {
498
+ let i = n[o++];
499
+ if (i === "__proto__")
500
+ return !0;
501
+ const c = Number.isFinite(+i), p = o >= n.length;
502
+ return i = !i && a.isArray(s) ? s.length : i, p ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !c) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && a.isArray(s[i]) && (s[i] = Bt(s[i])), !c);
503
+ }
504
+ if (a.isFormData(e) && a.isFunction(e.entries)) {
505
+ const n = {};
506
+ return a.forEachEntry(e, (r, s) => {
507
+ t(_t(r), s, n, 0);
508
+ }), n;
509
+ }
510
+ return null;
511
+ }
512
+ function Dt(e, t, n) {
513
+ if (a.isString(e))
514
+ try {
515
+ return (t || JSON.parse)(e), a.trim(e);
516
+ } catch (r) {
517
+ if (r.name !== "SyntaxError")
518
+ throw r;
519
+ }
520
+ return (n || JSON.stringify)(e);
521
+ }
522
+ const ee = {
523
+ transitional: Pe,
524
+ adapter: ["xhr", "http"],
525
+ transformRequest: [function(t, n) {
526
+ const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
527
+ if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
528
+ return s ? JSON.stringify(Fe(t)) : t;
529
+ if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t))
530
+ return t;
531
+ if (a.isArrayBufferView(t))
532
+ return t.buffer;
533
+ if (a.isURLSearchParams(t))
534
+ return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
535
+ let c;
536
+ if (o) {
537
+ if (r.indexOf("application/x-www-form-urlencoded") > -1)
538
+ return Ft(t, this.formSerializer).toString();
539
+ if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
540
+ const p = this.env && this.env.FormData;
541
+ return M(
542
+ c ? { "files[]": t } : t,
543
+ p && new p(),
544
+ this.formSerializer
545
+ );
546
+ }
547
+ }
548
+ return o || s ? (n.setContentType("application/json", !1), Dt(t)) : t;
549
+ }],
550
+ transformResponse: [function(t) {
551
+ const n = this.transitional || ee.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
552
+ if (t && a.isString(t) && (r && !this.responseType || s)) {
553
+ const i = !(n && n.silentJSONParsing) && s;
554
+ try {
555
+ return JSON.parse(t);
556
+ } catch (c) {
557
+ if (i)
558
+ throw c.name === "SyntaxError" ? m.from(c, m.ERR_BAD_RESPONSE, this, null, this.response) : c;
559
+ }
560
+ }
561
+ return t;
562
+ }],
563
+ /**
564
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
565
+ * timeout is not created.
566
+ */
567
+ timeout: 0,
568
+ xsrfCookieName: "XSRF-TOKEN",
569
+ xsrfHeaderName: "X-XSRF-TOKEN",
570
+ maxContentLength: -1,
571
+ maxBodyLength: -1,
572
+ env: {
573
+ FormData: O.classes.FormData,
574
+ Blob: O.classes.Blob
575
+ },
576
+ validateStatus: function(t) {
577
+ return t >= 200 && t < 300;
578
+ },
579
+ headers: {
580
+ common: {
581
+ Accept: "application/json, text/plain, */*",
582
+ "Content-Type": void 0
583
+ }
584
+ }
585
+ };
586
+ a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
587
+ ee.headers[e] = {};
588
+ });
589
+ const te = ee, Lt = a.toObjectSet([
590
+ "age",
591
+ "authorization",
592
+ "content-length",
593
+ "content-type",
594
+ "etag",
595
+ "expires",
596
+ "from",
597
+ "host",
598
+ "if-modified-since",
599
+ "if-unmodified-since",
600
+ "last-modified",
601
+ "location",
602
+ "max-forwards",
603
+ "proxy-authorization",
604
+ "referer",
605
+ "retry-after",
606
+ "user-agent"
607
+ ]), Ut = (e) => {
608
+ const t = {};
609
+ let n, r, s;
610
+ return e && e.split(`
611
+ `).forEach(function(i) {
612
+ s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && Lt[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
613
+ }), t;
614
+ }, ue = Symbol("internals");
615
+ function F(e) {
616
+ return e && String(e).trim().toLowerCase();
617
+ }
618
+ function U(e) {
619
+ return e === !1 || e == null ? e : a.isArray(e) ? e.map(U) : String(e);
620
+ }
621
+ function kt(e) {
622
+ const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
623
+ let r;
624
+ for (; r = n.exec(e); )
625
+ t[r[1]] = r[2];
626
+ return t;
627
+ }
628
+ const jt = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
629
+ function $(e, t, n, r, s) {
630
+ if (a.isFunction(r))
631
+ return r.call(this, t, n);
632
+ if (s && (t = n), !!a.isString(t)) {
633
+ if (a.isString(r))
634
+ return t.indexOf(r) !== -1;
635
+ if (a.isRegExp(r))
636
+ return r.test(t);
637
+ }
638
+ }
639
+ function It(e) {
640
+ return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
641
+ }
642
+ function Ht(e, t) {
643
+ const n = a.toCamelCase(" " + t);
644
+ ["get", "set", "has"].forEach((r) => {
645
+ Object.defineProperty(e, r + n, {
646
+ value: function(s, o, i) {
647
+ return this[r].call(this, t, s, o, i);
648
+ },
649
+ configurable: !0
650
+ });
651
+ });
652
+ }
653
+ class z {
654
+ constructor(t) {
655
+ t && this.set(t);
656
+ }
657
+ set(t, n, r) {
658
+ const s = this;
659
+ function o(c, p, h) {
660
+ const l = F(p);
661
+ if (!l)
662
+ throw new Error("header name must be a non-empty string");
663
+ const u = a.findKey(s, l);
664
+ (!u || s[u] === void 0 || h === !0 || h === void 0 && s[u] !== !1) && (s[u || p] = U(c));
665
+ }
666
+ const i = (c, p) => a.forEach(c, (h, l) => o(h, l, p));
667
+ return a.isPlainObject(t) || t instanceof this.constructor ? i(t, n) : a.isString(t) && (t = t.trim()) && !jt(t) ? i(Ut(t), n) : t != null && o(n, t, r), this;
668
+ }
669
+ get(t, n) {
670
+ if (t = F(t), t) {
671
+ const r = a.findKey(this, t);
672
+ if (r) {
673
+ const s = this[r];
674
+ if (!n)
675
+ return s;
676
+ if (n === !0)
677
+ return kt(s);
678
+ if (a.isFunction(n))
679
+ return n.call(this, s, r);
680
+ if (a.isRegExp(n))
681
+ return n.exec(s);
682
+ throw new TypeError("parser must be boolean|regexp|function");
683
+ }
684
+ }
685
+ }
686
+ has(t, n) {
687
+ if (t = F(t), t) {
688
+ const r = a.findKey(this, t);
689
+ return !!(r && this[r] !== void 0 && (!n || $(this, this[r], r, n)));
690
+ }
691
+ return !1;
692
+ }
693
+ delete(t, n) {
694
+ const r = this;
695
+ let s = !1;
696
+ function o(i) {
697
+ if (i = F(i), i) {
698
+ const c = a.findKey(r, i);
699
+ c && (!n || $(r, r[c], c, n)) && (delete r[c], s = !0);
700
+ }
701
+ }
702
+ return a.isArray(t) ? t.forEach(o) : o(t), s;
703
+ }
704
+ clear(t) {
705
+ const n = Object.keys(this);
706
+ let r = n.length, s = !1;
707
+ for (; r--; ) {
708
+ const o = n[r];
709
+ (!t || $(this, this[o], o, t, !0)) && (delete this[o], s = !0);
710
+ }
711
+ return s;
712
+ }
713
+ normalize(t) {
714
+ const n = this, r = {};
715
+ return a.forEach(this, (s, o) => {
716
+ const i = a.findKey(r, o);
717
+ if (i) {
718
+ n[i] = U(s), delete n[o];
719
+ return;
720
+ }
721
+ const c = t ? It(o) : String(o).trim();
722
+ c !== o && delete n[o], n[c] = U(s), r[c] = !0;
723
+ }), this;
724
+ }
725
+ concat(...t) {
726
+ return this.constructor.concat(this, ...t);
727
+ }
728
+ toJSON(t) {
729
+ const n = /* @__PURE__ */ Object.create(null);
730
+ return a.forEach(this, (r, s) => {
731
+ r != null && r !== !1 && (n[s] = t && a.isArray(r) ? r.join(", ") : r);
732
+ }), n;
733
+ }
734
+ [Symbol.iterator]() {
735
+ return Object.entries(this.toJSON())[Symbol.iterator]();
736
+ }
737
+ toString() {
738
+ return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
739
+ `);
740
+ }
741
+ get [Symbol.toStringTag]() {
742
+ return "AxiosHeaders";
743
+ }
744
+ static from(t) {
745
+ return t instanceof this ? t : new this(t);
746
+ }
747
+ static concat(t, ...n) {
748
+ const r = new this(t);
749
+ return n.forEach((s) => r.set(s)), r;
750
+ }
751
+ static accessor(t) {
752
+ const r = (this[ue] = this[ue] = {
753
+ accessors: {}
754
+ }).accessors, s = this.prototype;
755
+ function o(i) {
756
+ const c = F(i);
757
+ r[c] || (Ht(s, i), r[c] = !0);
758
+ }
759
+ return a.isArray(t) ? t.forEach(o) : o(t), this;
760
+ }
761
+ }
762
+ z.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
763
+ a.reduceDescriptors(z.prototype, ({ value: e }, t) => {
764
+ let n = t[0].toUpperCase() + t.slice(1);
765
+ return {
766
+ get: () => e,
767
+ set(r) {
768
+ this[n] = r;
769
+ }
770
+ };
771
+ });
772
+ a.freezeMethods(z);
773
+ const T = z;
774
+ function V(e, t) {
775
+ const n = this || te, r = t || n, s = T.from(r.headers);
776
+ let o = r.data;
777
+ return a.forEach(e, function(c) {
778
+ o = c.call(n, o, s.normalize(), t ? t.status : void 0);
779
+ }), s.normalize(), o;
780
+ }
781
+ function _e(e) {
782
+ return !!(e && e.__CANCEL__);
783
+ }
784
+ function D(e, t, n) {
785
+ m.call(this, e ?? "canceled", m.ERR_CANCELED, t, n), this.name = "CanceledError";
786
+ }
787
+ a.inherits(D, m, {
788
+ __CANCEL__: !0
789
+ });
790
+ function qt(e, t, n) {
791
+ const r = n.config.validateStatus;
792
+ !n.status || !r || r(n.status) ? e(n) : t(new m(
793
+ "Request failed with status code " + n.status,
794
+ [m.ERR_BAD_REQUEST, m.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
795
+ n.config,
796
+ n.request,
797
+ n
798
+ ));
799
+ }
800
+ const Mt = O.hasStandardBrowserEnv ? (
801
+ // Standard browser envs support document.cookie
802
+ {
803
+ write(e, t, n, r, s, o) {
804
+ const i = [e + "=" + encodeURIComponent(t)];
805
+ a.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), a.isString(r) && i.push("path=" + r), a.isString(s) && i.push("domain=" + s), o === !0 && i.push("secure"), document.cookie = i.join("; ");
806
+ },
807
+ read(e) {
808
+ const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
809
+ return t ? decodeURIComponent(t[3]) : null;
810
+ },
811
+ remove(e) {
812
+ this.write(e, "", Date.now() - 864e5);
813
+ }
814
+ }
815
+ ) : (
816
+ // Non-standard browser env (web workers, react-native) lack needed support.
817
+ {
818
+ write() {
819
+ },
820
+ read() {
821
+ return null;
822
+ },
823
+ remove() {
824
+ }
825
+ }
826
+ );
827
+ function zt(e) {
828
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
829
+ }
830
+ function Jt(e, t) {
831
+ return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
832
+ }
833
+ function Be(e, t) {
834
+ return e && !zt(t) ? Jt(e, t) : t;
835
+ }
836
+ const $t = O.hasStandardBrowserEnv ? (
837
+ // Standard browser envs have full support of the APIs needed to test
838
+ // whether the request URL is of the same origin as current location.
839
+ function() {
840
+ const t = /(msie|trident)/i.test(navigator.userAgent), n = document.createElement("a");
841
+ let r;
842
+ function s(o) {
843
+ let i = o;
844
+ return t && (n.setAttribute("href", i), i = n.href), n.setAttribute("href", i), {
845
+ href: n.href,
846
+ protocol: n.protocol ? n.protocol.replace(/:$/, "") : "",
847
+ host: n.host,
848
+ search: n.search ? n.search.replace(/^\?/, "") : "",
849
+ hash: n.hash ? n.hash.replace(/^#/, "") : "",
850
+ hostname: n.hostname,
851
+ port: n.port,
852
+ pathname: n.pathname.charAt(0) === "/" ? n.pathname : "/" + n.pathname
853
+ };
854
+ }
855
+ return r = s(window.location.href), function(i) {
856
+ const c = a.isString(i) ? s(i) : i;
857
+ return c.protocol === r.protocol && c.host === r.host;
858
+ };
859
+ }()
860
+ ) : (
861
+ // Non standard browser envs (web workers, react-native) lack needed support.
862
+ /* @__PURE__ */ function() {
863
+ return function() {
864
+ return !0;
865
+ };
866
+ }()
867
+ );
868
+ function Vt(e) {
869
+ const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
870
+ return t && t[1] || "";
871
+ }
872
+ function Wt(e, t) {
873
+ e = e || 10;
874
+ const n = new Array(e), r = new Array(e);
875
+ let s = 0, o = 0, i;
876
+ return t = t !== void 0 ? t : 1e3, function(p) {
877
+ const h = Date.now(), l = r[o];
878
+ i || (i = h), n[s] = p, r[s] = h;
879
+ let u = o, E = 0;
880
+ for (; u !== s; )
881
+ E += n[u++], u = u % e;
882
+ if (s = (s + 1) % e, s === o && (o = (o + 1) % e), h - i < t)
883
+ return;
884
+ const S = l && h - l;
885
+ return S ? Math.round(E * 1e3 / S) : void 0;
886
+ };
887
+ }
888
+ function le(e, t) {
889
+ let n = 0;
890
+ const r = Wt(50, 250);
891
+ return (s) => {
892
+ const o = s.loaded, i = s.lengthComputable ? s.total : void 0, c = o - n, p = r(c), h = o <= i;
893
+ n = o;
894
+ const l = {
895
+ loaded: o,
896
+ total: i,
897
+ progress: i ? o / i : void 0,
898
+ bytes: c,
899
+ rate: p || void 0,
900
+ estimated: p && i && h ? (i - o) / p : void 0,
901
+ event: s
902
+ };
903
+ l[t ? "download" : "upload"] = !0, e(l);
904
+ };
905
+ }
906
+ const Kt = typeof XMLHttpRequest < "u", Gt = Kt && function(e) {
907
+ return new Promise(function(n, r) {
908
+ let s = e.data;
909
+ const o = T.from(e.headers).normalize();
910
+ let { responseType: i, withXSRFToken: c } = e, p;
911
+ function h() {
912
+ e.cancelToken && e.cancelToken.unsubscribe(p), e.signal && e.signal.removeEventListener("abort", p);
913
+ }
914
+ let l;
915
+ if (a.isFormData(s)) {
916
+ if (O.hasStandardBrowserEnv || O.hasStandardBrowserWebWorkerEnv)
917
+ o.setContentType(!1);
918
+ else if ((l = o.getContentType()) !== !1) {
919
+ const [d, ...w] = l ? l.split(";").map((b) => b.trim()).filter(Boolean) : [];
920
+ o.setContentType([d || "multipart/form-data", ...w].join("; "));
921
+ }
922
+ }
923
+ let u = new XMLHttpRequest();
924
+ if (e.auth) {
925
+ const d = e.auth.username || "", w = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : "";
926
+ o.set("Authorization", "Basic " + btoa(d + ":" + w));
927
+ }
928
+ const E = Be(e.baseURL, e.url);
929
+ u.open(e.method.toUpperCase(), xe(E, e.params, e.paramsSerializer), !0), u.timeout = e.timeout;
930
+ function S() {
931
+ if (!u)
932
+ return;
933
+ const d = T.from(
934
+ "getAllResponseHeaders" in u && u.getAllResponseHeaders()
935
+ ), b = {
936
+ data: !i || i === "text" || i === "json" ? u.responseText : u.response,
937
+ status: u.status,
938
+ statusText: u.statusText,
939
+ headers: d,
940
+ config: e,
941
+ request: u
942
+ };
943
+ qt(function(N) {
944
+ n(N), h();
945
+ }, function(N) {
946
+ r(N), h();
947
+ }, b), u = null;
948
+ }
949
+ if ("onloadend" in u ? u.onloadend = S : u.onreadystatechange = function() {
950
+ !u || u.readyState !== 4 || u.status === 0 && !(u.responseURL && u.responseURL.indexOf("file:") === 0) || setTimeout(S);
951
+ }, u.onabort = function() {
952
+ u && (r(new m("Request aborted", m.ECONNABORTED, e, u)), u = null);
953
+ }, u.onerror = function() {
954
+ r(new m("Network Error", m.ERR_NETWORK, e, u)), u = null;
955
+ }, u.ontimeout = function() {
956
+ let w = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded";
957
+ const b = e.transitional || Pe;
958
+ e.timeoutErrorMessage && (w = e.timeoutErrorMessage), r(new m(
959
+ w,
960
+ b.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
961
+ e,
962
+ u
963
+ )), u = null;
964
+ }, O.hasStandardBrowserEnv && (c && a.isFunction(c) && (c = c(e)), c || c !== !1 && $t(E))) {
965
+ const d = e.xsrfHeaderName && e.xsrfCookieName && Mt.read(e.xsrfCookieName);
966
+ d && o.set(e.xsrfHeaderName, d);
967
+ }
968
+ s === void 0 && o.setContentType(null), "setRequestHeader" in u && a.forEach(o.toJSON(), function(w, b) {
969
+ u.setRequestHeader(b, w);
970
+ }), a.isUndefined(e.withCredentials) || (u.withCredentials = !!e.withCredentials), i && i !== "json" && (u.responseType = e.responseType), typeof e.onDownloadProgress == "function" && u.addEventListener("progress", le(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && u.upload && u.upload.addEventListener("progress", le(e.onUploadProgress)), (e.cancelToken || e.signal) && (p = (d) => {
971
+ u && (r(!d || d.type ? new D(null, e, u) : d), u.abort(), u = null);
972
+ }, e.cancelToken && e.cancelToken.subscribe(p), e.signal && (e.signal.aborted ? p() : e.signal.addEventListener("abort", p)));
973
+ const f = Vt(E);
974
+ if (f && O.protocols.indexOf(f) === -1) {
975
+ r(new m("Unsupported protocol " + f + ":", m.ERR_BAD_REQUEST, e));
976
+ return;
977
+ }
978
+ u.send(s || null);
979
+ });
980
+ }, X = {
981
+ http: bt,
982
+ xhr: Gt
983
+ };
984
+ a.forEach(X, (e, t) => {
985
+ if (e) {
986
+ try {
987
+ Object.defineProperty(e, "name", { value: t });
988
+ } catch {
989
+ }
990
+ Object.defineProperty(e, "adapterName", { value: t });
991
+ }
992
+ });
993
+ const fe = (e) => `- ${e}`, Xt = (e) => a.isFunction(e) || e === null || e === !1, De = {
994
+ getAdapter: (e) => {
995
+ e = a.isArray(e) ? e : [e];
996
+ const { length: t } = e;
997
+ let n, r;
998
+ const s = {};
999
+ for (let o = 0; o < t; o++) {
1000
+ n = e[o];
1001
+ let i;
1002
+ if (r = n, !Xt(n) && (r = X[(i = String(n)).toLowerCase()], r === void 0))
1003
+ throw new m(`Unknown adapter '${i}'`);
1004
+ if (r)
1005
+ break;
1006
+ s[i || "#" + o] = r;
1007
+ }
1008
+ if (!r) {
1009
+ const o = Object.entries(s).map(
1010
+ ([c, p]) => `adapter ${c} ` + (p === !1 ? "is not supported by the environment" : "is not available in the build")
1011
+ );
1012
+ let i = t ? o.length > 1 ? `since :
1013
+ ` + o.map(fe).join(`
1014
+ `) : " " + fe(o[0]) : "as no adapter specified";
1015
+ throw new m(
1016
+ "There is no suitable adapter to dispatch the request " + i,
1017
+ "ERR_NOT_SUPPORT"
1018
+ );
1019
+ }
1020
+ return r;
1021
+ },
1022
+ adapters: X
1023
+ };
1024
+ function W(e) {
1025
+ if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
1026
+ throw new D(null, e);
1027
+ }
1028
+ function de(e) {
1029
+ return W(e), e.headers = T.from(e.headers), e.data = V.call(
1030
+ e,
1031
+ e.transformRequest
1032
+ ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), De.getAdapter(e.adapter || te.adapter)(e).then(function(r) {
1033
+ return W(e), r.data = V.call(
1034
+ e,
1035
+ e.transformResponse,
1036
+ r
1037
+ ), r.headers = T.from(r.headers), r;
1038
+ }, function(r) {
1039
+ return _e(r) || (W(e), r && r.response && (r.response.data = V.call(
1040
+ e,
1041
+ e.transformResponse,
1042
+ r.response
1043
+ ), r.response.headers = T.from(r.response.headers))), Promise.reject(r);
1044
+ });
1045
+ }
1046
+ const pe = (e) => e instanceof T ? e.toJSON() : e;
1047
+ function P(e, t) {
1048
+ t = t || {};
1049
+ const n = {};
1050
+ function r(h, l, u) {
1051
+ return a.isPlainObject(h) && a.isPlainObject(l) ? a.merge.call({ caseless: u }, h, l) : a.isPlainObject(l) ? a.merge({}, l) : a.isArray(l) ? l.slice() : l;
1052
+ }
1053
+ function s(h, l, u) {
1054
+ if (a.isUndefined(l)) {
1055
+ if (!a.isUndefined(h))
1056
+ return r(void 0, h, u);
1057
+ } else
1058
+ return r(h, l, u);
1059
+ }
1060
+ function o(h, l) {
1061
+ if (!a.isUndefined(l))
1062
+ return r(void 0, l);
1063
+ }
1064
+ function i(h, l) {
1065
+ if (a.isUndefined(l)) {
1066
+ if (!a.isUndefined(h))
1067
+ return r(void 0, h);
1068
+ } else
1069
+ return r(void 0, l);
1070
+ }
1071
+ function c(h, l, u) {
1072
+ if (u in t)
1073
+ return r(h, l);
1074
+ if (u in e)
1075
+ return r(void 0, h);
1076
+ }
1077
+ const p = {
1078
+ url: o,
1079
+ method: o,
1080
+ data: o,
1081
+ baseURL: i,
1082
+ transformRequest: i,
1083
+ transformResponse: i,
1084
+ paramsSerializer: i,
1085
+ timeout: i,
1086
+ timeoutMessage: i,
1087
+ withCredentials: i,
1088
+ withXSRFToken: i,
1089
+ adapter: i,
1090
+ responseType: i,
1091
+ xsrfCookieName: i,
1092
+ xsrfHeaderName: i,
1093
+ onUploadProgress: i,
1094
+ onDownloadProgress: i,
1095
+ decompress: i,
1096
+ maxContentLength: i,
1097
+ maxBodyLength: i,
1098
+ beforeRedirect: i,
1099
+ transport: i,
1100
+ httpAgent: i,
1101
+ httpsAgent: i,
1102
+ cancelToken: i,
1103
+ socketPath: i,
1104
+ responseEncoding: i,
1105
+ validateStatus: c,
1106
+ headers: (h, l) => s(pe(h), pe(l), !0)
1107
+ };
1108
+ return a.forEach(Object.keys(Object.assign({}, e, t)), function(l) {
1109
+ const u = p[l] || s, E = u(e[l], t[l], l);
1110
+ a.isUndefined(E) && u !== c || (n[l] = E);
1111
+ }), n;
1112
+ }
1113
+ const Le = "1.6.7", ne = {};
1114
+ ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
1115
+ ne[e] = function(r) {
1116
+ return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
1117
+ };
1118
+ });
1119
+ const he = {};
1120
+ ne.transitional = function(t, n, r) {
1121
+ function s(o, i) {
1122
+ return "[Axios v" + Le + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
1123
+ }
1124
+ return (o, i, c) => {
1125
+ if (t === !1)
1126
+ throw new m(
1127
+ s(i, " has been removed" + (n ? " in " + n : "")),
1128
+ m.ERR_DEPRECATED
1129
+ );
1130
+ return n && !he[i] && (he[i] = !0, console.warn(
1131
+ s(
1132
+ i,
1133
+ " has been deprecated since v" + n + " and will be removed in the near future"
1134
+ )
1135
+ )), t ? t(o, i, c) : !0;
1136
+ };
1137
+ };
1138
+ function vt(e, t, n) {
1139
+ if (typeof e != "object")
1140
+ throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
1141
+ const r = Object.keys(e);
1142
+ let s = r.length;
1143
+ for (; s-- > 0; ) {
1144
+ const o = r[s], i = t[o];
1145
+ if (i) {
1146
+ const c = e[o], p = c === void 0 || i(c, o, e);
1147
+ if (p !== !0)
1148
+ throw new m("option " + o + " must be " + p, m.ERR_BAD_OPTION_VALUE);
1149
+ continue;
1150
+ }
1151
+ if (n !== !0)
1152
+ throw new m("Unknown option " + o, m.ERR_BAD_OPTION);
1153
+ }
1154
+ }
1155
+ const v = {
1156
+ assertOptions: vt,
1157
+ validators: ne
1158
+ }, x = v.validators;
1159
+ class j {
1160
+ constructor(t) {
1161
+ this.defaults = t, this.interceptors = {
1162
+ request: new ce(),
1163
+ response: new ce()
1164
+ };
1165
+ }
1166
+ /**
1167
+ * Dispatch a request
1168
+ *
1169
+ * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
1170
+ * @param {?Object} config
1171
+ *
1172
+ * @returns {Promise} The Promise to be fulfilled
1173
+ */
1174
+ async request(t, n) {
1175
+ try {
1176
+ return await this._request(t, n);
1177
+ } catch (r) {
1178
+ if (r instanceof Error) {
1179
+ let s;
1180
+ Error.captureStackTrace ? Error.captureStackTrace(s = {}) : s = new Error();
1181
+ const o = s.stack ? s.stack.replace(/^.+\n/, "") : "";
1182
+ r.stack ? o && !String(r.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (r.stack += `
1183
+ ` + o) : r.stack = o;
1184
+ }
1185
+ throw r;
1186
+ }
1187
+ }
1188
+ _request(t, n) {
1189
+ typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = P(this.defaults, n);
1190
+ const { transitional: r, paramsSerializer: s, headers: o } = n;
1191
+ r !== void 0 && v.assertOptions(r, {
1192
+ silentJSONParsing: x.transitional(x.boolean),
1193
+ forcedJSONParsing: x.transitional(x.boolean),
1194
+ clarifyTimeoutError: x.transitional(x.boolean)
1195
+ }, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
1196
+ serialize: s
1197
+ } : v.assertOptions(s, {
1198
+ encode: x.function,
1199
+ serialize: x.function
1200
+ }, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
1201
+ let i = o && a.merge(
1202
+ o.common,
1203
+ o[n.method]
1204
+ );
1205
+ o && a.forEach(
1206
+ ["delete", "get", "head", "post", "put", "patch", "common"],
1207
+ (f) => {
1208
+ delete o[f];
1209
+ }
1210
+ ), n.headers = T.concat(i, o);
1211
+ const c = [];
1212
+ let p = !0;
1213
+ this.interceptors.request.forEach(function(d) {
1214
+ typeof d.runWhen == "function" && d.runWhen(n) === !1 || (p = p && d.synchronous, c.unshift(d.fulfilled, d.rejected));
1215
+ });
1216
+ const h = [];
1217
+ this.interceptors.response.forEach(function(d) {
1218
+ h.push(d.fulfilled, d.rejected);
1219
+ });
1220
+ let l, u = 0, E;
1221
+ if (!p) {
1222
+ const f = [de.bind(this), void 0];
1223
+ for (f.unshift.apply(f, c), f.push.apply(f, h), E = f.length, l = Promise.resolve(n); u < E; )
1224
+ l = l.then(f[u++], f[u++]);
1225
+ return l;
1226
+ }
1227
+ E = c.length;
1228
+ let S = n;
1229
+ for (u = 0; u < E; ) {
1230
+ const f = c[u++], d = c[u++];
1231
+ try {
1232
+ S = f(S);
1233
+ } catch (w) {
1234
+ d.call(this, w);
1235
+ break;
1236
+ }
1237
+ }
1238
+ try {
1239
+ l = de.call(this, S);
1240
+ } catch (f) {
1241
+ return Promise.reject(f);
1242
+ }
1243
+ for (u = 0, E = h.length; u < E; )
1244
+ l = l.then(h[u++], h[u++]);
1245
+ return l;
1246
+ }
1247
+ getUri(t) {
1248
+ t = P(this.defaults, t);
1249
+ const n = Be(t.baseURL, t.url);
1250
+ return xe(n, t.params, t.paramsSerializer);
1251
+ }
1252
+ }
1253
+ a.forEach(["delete", "get", "head", "options"], function(t) {
1254
+ j.prototype[t] = function(n, r) {
1255
+ return this.request(P(r || {}, {
1256
+ method: t,
1257
+ url: n,
1258
+ data: (r || {}).data
1259
+ }));
1260
+ };
1261
+ });
1262
+ a.forEach(["post", "put", "patch"], function(t) {
1263
+ function n(r) {
1264
+ return function(o, i, c) {
1265
+ return this.request(P(c || {}, {
1266
+ method: t,
1267
+ headers: r ? {
1268
+ "Content-Type": "multipart/form-data"
1269
+ } : {},
1270
+ url: o,
1271
+ data: i
1272
+ }));
1273
+ };
1274
+ }
1275
+ j.prototype[t] = n(), j.prototype[t + "Form"] = n(!0);
1276
+ });
1277
+ const k = j;
1278
+ class re {
1279
+ constructor(t) {
1280
+ if (typeof t != "function")
1281
+ throw new TypeError("executor must be a function.");
1282
+ let n;
1283
+ this.promise = new Promise(function(o) {
1284
+ n = o;
1285
+ });
1286
+ const r = this;
1287
+ this.promise.then((s) => {
1288
+ if (!r._listeners)
1289
+ return;
1290
+ let o = r._listeners.length;
1291
+ for (; o-- > 0; )
1292
+ r._listeners[o](s);
1293
+ r._listeners = null;
1294
+ }), this.promise.then = (s) => {
1295
+ let o;
1296
+ const i = new Promise((c) => {
1297
+ r.subscribe(c), o = c;
1298
+ }).then(s);
1299
+ return i.cancel = function() {
1300
+ r.unsubscribe(o);
1301
+ }, i;
1302
+ }, t(function(o, i, c) {
1303
+ r.reason || (r.reason = new D(o, i, c), n(r.reason));
1304
+ });
1305
+ }
1306
+ /**
1307
+ * Throws a `CanceledError` if cancellation has been requested.
1308
+ */
1309
+ throwIfRequested() {
1310
+ if (this.reason)
1311
+ throw this.reason;
1312
+ }
1313
+ /**
1314
+ * Subscribe to the cancel signal
1315
+ */
1316
+ subscribe(t) {
1317
+ if (this.reason) {
1318
+ t(this.reason);
1319
+ return;
1320
+ }
1321
+ this._listeners ? this._listeners.push(t) : this._listeners = [t];
1322
+ }
1323
+ /**
1324
+ * Unsubscribe from the cancel signal
1325
+ */
1326
+ unsubscribe(t) {
1327
+ if (!this._listeners)
1328
+ return;
1329
+ const n = this._listeners.indexOf(t);
1330
+ n !== -1 && this._listeners.splice(n, 1);
1331
+ }
1332
+ /**
1333
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
1334
+ * cancels the `CancelToken`.
1335
+ */
1336
+ static source() {
1337
+ let t;
1338
+ return {
1339
+ token: new re(function(s) {
1340
+ t = s;
1341
+ }),
1342
+ cancel: t
1343
+ };
1344
+ }
1345
+ }
1346
+ const Qt = re;
1347
+ function Zt(e) {
1348
+ return function(n) {
1349
+ return e.apply(null, n);
1350
+ };
1351
+ }
1352
+ function Yt(e) {
1353
+ return a.isObject(e) && e.isAxiosError === !0;
1354
+ }
1355
+ const Q = {
1356
+ Continue: 100,
1357
+ SwitchingProtocols: 101,
1358
+ Processing: 102,
1359
+ EarlyHints: 103,
1360
+ Ok: 200,
1361
+ Created: 201,
1362
+ Accepted: 202,
1363
+ NonAuthoritativeInformation: 203,
1364
+ NoContent: 204,
1365
+ ResetContent: 205,
1366
+ PartialContent: 206,
1367
+ MultiStatus: 207,
1368
+ AlreadyReported: 208,
1369
+ ImUsed: 226,
1370
+ MultipleChoices: 300,
1371
+ MovedPermanently: 301,
1372
+ Found: 302,
1373
+ SeeOther: 303,
1374
+ NotModified: 304,
1375
+ UseProxy: 305,
1376
+ Unused: 306,
1377
+ TemporaryRedirect: 307,
1378
+ PermanentRedirect: 308,
1379
+ BadRequest: 400,
1380
+ Unauthorized: 401,
1381
+ PaymentRequired: 402,
1382
+ Forbidden: 403,
1383
+ NotFound: 404,
1384
+ MethodNotAllowed: 405,
1385
+ NotAcceptable: 406,
1386
+ ProxyAuthenticationRequired: 407,
1387
+ RequestTimeout: 408,
1388
+ Conflict: 409,
1389
+ Gone: 410,
1390
+ LengthRequired: 411,
1391
+ PreconditionFailed: 412,
1392
+ PayloadTooLarge: 413,
1393
+ UriTooLong: 414,
1394
+ UnsupportedMediaType: 415,
1395
+ RangeNotSatisfiable: 416,
1396
+ ExpectationFailed: 417,
1397
+ ImATeapot: 418,
1398
+ MisdirectedRequest: 421,
1399
+ UnprocessableEntity: 422,
1400
+ Locked: 423,
1401
+ FailedDependency: 424,
1402
+ TooEarly: 425,
1403
+ UpgradeRequired: 426,
1404
+ PreconditionRequired: 428,
1405
+ TooManyRequests: 429,
1406
+ RequestHeaderFieldsTooLarge: 431,
1407
+ UnavailableForLegalReasons: 451,
1408
+ InternalServerError: 500,
1409
+ NotImplemented: 501,
1410
+ BadGateway: 502,
1411
+ ServiceUnavailable: 503,
1412
+ GatewayTimeout: 504,
1413
+ HttpVersionNotSupported: 505,
1414
+ VariantAlsoNegotiates: 506,
1415
+ InsufficientStorage: 507,
1416
+ LoopDetected: 508,
1417
+ NotExtended: 510,
1418
+ NetworkAuthenticationRequired: 511
1419
+ };
1420
+ Object.entries(Q).forEach(([e, t]) => {
1421
+ Q[t] = e;
1422
+ });
1423
+ const en = Q;
1424
+ function Ue(e) {
1425
+ const t = new k(e), n = me(k.prototype.request, t);
1426
+ return a.extend(n, k.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
1427
+ return Ue(P(e, s));
1428
+ }, n;
1429
+ }
1430
+ const y = Ue(te);
1431
+ y.Axios = k;
1432
+ y.CanceledError = D;
1433
+ y.CancelToken = Qt;
1434
+ y.isCancel = _e;
1435
+ y.VERSION = Le;
1436
+ y.toFormData = M;
1437
+ y.AxiosError = m;
1438
+ y.Cancel = y.CanceledError;
1439
+ y.all = function(t) {
1440
+ return Promise.all(t);
7
1441
  };
8
- const setPersonalInfo = async (token) => {
9
- const res = await axios.create().get(apis.personalInfo, {
10
- baseURL: getConfig().baseURL,
1442
+ y.spread = Zt;
1443
+ y.isAxiosError = Yt;
1444
+ y.mergeConfig = P;
1445
+ y.AxiosHeaders = T;
1446
+ y.formToJSON = (e) => Fe(a.isHTMLForm(e) ? new FormData(e) : e);
1447
+ y.getAdapter = De.getAdapter;
1448
+ y.HttpStatusCode = en;
1449
+ y.default = y;
1450
+ const tn = {
1451
+ personalInfo: "/api/personal-center/personal-server/v1/info"
1452
+ }, sn = async (e) => {
1453
+ var n;
1454
+ const t = await y.create().get(tn.personalInfo, {
1455
+ baseURL: Ie().baseURL,
11
1456
  params: {
12
- project: getProjectInfo()?.id || "",
1457
+ project: ((n = je()) == null ? void 0 : n.id) || "",
13
1458
  timestamp: (/* @__PURE__ */ new Date()).getTime()
14
1459
  },
15
1460
  headers: {
16
- Authorization: `Bearer ${token}`
1461
+ Authorization: `Bearer ${e}`
17
1462
  }
18
1463
  });
19
- if (res?.data) {
20
- sessionStorage.setItem("userInfo", JSON.stringify(res.data));
21
- }
1464
+ t != null && t.data && sessionStorage.setItem("userInfo", JSON.stringify(t.data));
1465
+ };
1466
+ export {
1467
+ sn as setPersonalInfo
22
1468
  };
23
-
24
- export { setPersonalInfo };