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