@das-fed/utils 1.0.1 → 1.0.2

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