@regulaforensics/facesdk-webclient 7.2.273-nightly → 7.2.275-nightly
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +6 -0
- package/{lib → dist}/index.d.ts +2493 -2499
- package/dist/index.js +3127 -0
- package/package.json +25 -44
- package/dist/main/index.cjs +0 -1
- package/dist/module/index.js +0 -1
package/dist/index.js
ADDED
|
@@ -0,0 +1,3127 @@
|
|
|
1
|
+
function Me(t, e) {
|
|
2
|
+
return function() {
|
|
3
|
+
return t.apply(e, arguments);
|
|
4
|
+
};
|
|
5
|
+
}
|
|
6
|
+
const { toString: dt } = Object.prototype, { getPrototypeOf: Pe } = Object, { iterator: ae, toStringTag: je } = Symbol, ie = /* @__PURE__ */ ((t) => (e) => {
|
|
7
|
+
const s = dt.call(e);
|
|
8
|
+
return t[s] || (t[s] = s.slice(8, -1).toLowerCase());
|
|
9
|
+
})(/* @__PURE__ */ Object.create(null)), U = (t) => (t = t.toLowerCase(), (e) => ie(e) === t), ce = (t) => (e) => typeof e === t, { isArray: $ } = Array, K = ce("undefined");
|
|
10
|
+
function pt(t) {
|
|
11
|
+
return t !== null && !K(t) && t.constructor !== null && !K(t.constructor) && L(t.constructor.isBuffer) && t.constructor.isBuffer(t);
|
|
12
|
+
}
|
|
13
|
+
const ke = U("ArrayBuffer");
|
|
14
|
+
function ht(t) {
|
|
15
|
+
let e;
|
|
16
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && ke(t.buffer), e;
|
|
17
|
+
}
|
|
18
|
+
const ft = ce("string"), L = ce("function"), ve = ce("number"), le = (t) => t !== null && typeof t == "object", mt = (t) => t === !0 || t === !1, ee = (t) => {
|
|
19
|
+
if (ie(t) !== "object")
|
|
20
|
+
return !1;
|
|
21
|
+
const e = Pe(t);
|
|
22
|
+
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(je in t) && !(ae in t);
|
|
23
|
+
}, Et = U("Date"), At = U("File"), Ot = U("Blob"), yt = U("FileList"), St = (t) => le(t) && L(t.pipe), Rt = (t) => {
|
|
24
|
+
let e;
|
|
25
|
+
return t && (typeof FormData == "function" && t instanceof FormData || L(t.append) && ((e = ie(t)) === "formdata" || // detect form-data instance
|
|
26
|
+
e === "object" && L(t.toString) && t.toString() === "[object FormData]"));
|
|
27
|
+
}, gt = U("URLSearchParams"), [Pt, Tt, Ct, _t] = ["ReadableStream", "Request", "Response", "Headers"].map(U), bt = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
28
|
+
function X(t, e, { allOwnKeys: s = !1 } = {}) {
|
|
29
|
+
if (t === null || typeof t > "u")
|
|
30
|
+
return;
|
|
31
|
+
let r, n;
|
|
32
|
+
if (typeof t != "object" && (t = [t]), $(t))
|
|
33
|
+
for (r = 0, n = t.length; r < n; r++)
|
|
34
|
+
e.call(null, t[r], r, t);
|
|
35
|
+
else {
|
|
36
|
+
const o = s ? Object.getOwnPropertyNames(t) : Object.keys(t), a = o.length;
|
|
37
|
+
let i;
|
|
38
|
+
for (r = 0; r < a; r++)
|
|
39
|
+
i = o[r], e.call(null, t[i], i, t);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function qe(t, e) {
|
|
43
|
+
e = e.toLowerCase();
|
|
44
|
+
const s = Object.keys(t);
|
|
45
|
+
let r = s.length, n;
|
|
46
|
+
for (; r-- > 0; )
|
|
47
|
+
if (n = s[r], e === n.toLowerCase())
|
|
48
|
+
return n;
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
const j = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, $e = (t) => !K(t) && t !== j;
|
|
52
|
+
function Ae() {
|
|
53
|
+
const { caseless: t } = $e(this) && this || {}, e = {}, s = (r, n) => {
|
|
54
|
+
const o = t && qe(e, n) || n;
|
|
55
|
+
ee(e[o]) && ee(r) ? e[o] = Ae(e[o], r) : ee(r) ? e[o] = Ae({}, r) : $(r) ? e[o] = r.slice() : e[o] = r;
|
|
56
|
+
};
|
|
57
|
+
for (let r = 0, n = arguments.length; r < n; r++)
|
|
58
|
+
arguments[r] && X(arguments[r], s);
|
|
59
|
+
return e;
|
|
60
|
+
}
|
|
61
|
+
const wt = (t, e, s, { allOwnKeys: r } = {}) => (X(e, (n, o) => {
|
|
62
|
+
s && L(n) ? t[o] = Me(n, s) : t[o] = n;
|
|
63
|
+
}, { allOwnKeys: r }), t), It = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), Nt = (t, e, s, r) => {
|
|
64
|
+
t.prototype = Object.create(e.prototype, r), t.prototype.constructor = t, Object.defineProperty(t, "super", {
|
|
65
|
+
value: e.prototype
|
|
66
|
+
}), s && Object.assign(t.prototype, s);
|
|
67
|
+
}, Lt = (t, e, s, r) => {
|
|
68
|
+
let n, o, a;
|
|
69
|
+
const i = {};
|
|
70
|
+
if (e = e || {}, t == null) return e;
|
|
71
|
+
do {
|
|
72
|
+
for (n = Object.getOwnPropertyNames(t), o = n.length; o-- > 0; )
|
|
73
|
+
a = n[o], (!r || r(a, t, e)) && !i[a] && (e[a] = t[a], i[a] = !0);
|
|
74
|
+
t = s !== !1 && Pe(t);
|
|
75
|
+
} while (t && (!s || s(t, e)) && t !== Object.prototype);
|
|
76
|
+
return e;
|
|
77
|
+
}, Ft = (t, e, s) => {
|
|
78
|
+
t = String(t), (s === void 0 || s > t.length) && (s = t.length), s -= e.length;
|
|
79
|
+
const r = t.indexOf(e, s);
|
|
80
|
+
return r !== -1 && r === s;
|
|
81
|
+
}, Ut = (t) => {
|
|
82
|
+
if (!t) return null;
|
|
83
|
+
if ($(t)) return t;
|
|
84
|
+
let e = t.length;
|
|
85
|
+
if (!ve(e)) return null;
|
|
86
|
+
const s = new Array(e);
|
|
87
|
+
for (; e-- > 0; )
|
|
88
|
+
s[e] = t[e];
|
|
89
|
+
return s;
|
|
90
|
+
}, Vt = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && Pe(Uint8Array)), Dt = (t, e) => {
|
|
91
|
+
const r = (t && t[ae]).call(t);
|
|
92
|
+
let n;
|
|
93
|
+
for (; (n = r.next()) && !n.done; ) {
|
|
94
|
+
const o = n.value;
|
|
95
|
+
e.call(t, o[0], o[1]);
|
|
96
|
+
}
|
|
97
|
+
}, Gt = (t, e) => {
|
|
98
|
+
let s;
|
|
99
|
+
const r = [];
|
|
100
|
+
for (; (s = t.exec(e)) !== null; )
|
|
101
|
+
r.push(s);
|
|
102
|
+
return r;
|
|
103
|
+
}, Ht = U("HTMLFormElement"), xt = (t) => t.toLowerCase().replace(
|
|
104
|
+
/[-_\s]([a-z\d])(\w*)/g,
|
|
105
|
+
function(s, r, n) {
|
|
106
|
+
return r.toUpperCase() + n;
|
|
107
|
+
}
|
|
108
|
+
), be = (({ hasOwnProperty: t }) => (e, s) => t.call(e, s))(Object.prototype), Bt = U("RegExp"), Qe = (t, e) => {
|
|
109
|
+
const s = Object.getOwnPropertyDescriptors(t), r = {};
|
|
110
|
+
X(s, (n, o) => {
|
|
111
|
+
let a;
|
|
112
|
+
(a = e(n, o, t)) !== !1 && (r[o] = a || n);
|
|
113
|
+
}), Object.defineProperties(t, r);
|
|
114
|
+
}, Mt = (t) => {
|
|
115
|
+
Qe(t, (e, s) => {
|
|
116
|
+
if (L(t) && ["arguments", "caller", "callee"].indexOf(s) !== -1)
|
|
117
|
+
return !1;
|
|
118
|
+
const r = t[s];
|
|
119
|
+
if (L(r)) {
|
|
120
|
+
if (e.enumerable = !1, "writable" in e) {
|
|
121
|
+
e.writable = !1;
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
e.set || (e.set = () => {
|
|
125
|
+
throw Error("Can not rewrite read-only method '" + s + "'");
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
}, jt = (t, e) => {
|
|
130
|
+
const s = {}, r = (n) => {
|
|
131
|
+
n.forEach((o) => {
|
|
132
|
+
s[o] = !0;
|
|
133
|
+
});
|
|
134
|
+
};
|
|
135
|
+
return $(t) ? r(t) : r(String(t).split(e)), s;
|
|
136
|
+
}, kt = () => {
|
|
137
|
+
}, vt = (t, e) => t != null && Number.isFinite(t = +t) ? t : e;
|
|
138
|
+
function qt(t) {
|
|
139
|
+
return !!(t && L(t.append) && t[je] === "FormData" && t[ae]);
|
|
140
|
+
}
|
|
141
|
+
const $t = (t) => {
|
|
142
|
+
const e = new Array(10), s = (r, n) => {
|
|
143
|
+
if (le(r)) {
|
|
144
|
+
if (e.indexOf(r) >= 0)
|
|
145
|
+
return;
|
|
146
|
+
if (!("toJSON" in r)) {
|
|
147
|
+
e[n] = r;
|
|
148
|
+
const o = $(r) ? [] : {};
|
|
149
|
+
return X(r, (a, i) => {
|
|
150
|
+
const c = s(a, n + 1);
|
|
151
|
+
!K(c) && (o[i] = c);
|
|
152
|
+
}), e[n] = void 0, o;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
return r;
|
|
156
|
+
};
|
|
157
|
+
return s(t, 0);
|
|
158
|
+
}, Qt = U("AsyncFunction"), Wt = (t) => t && (le(t) || L(t)) && L(t.then) && L(t.catch), We = ((t, e) => t ? setImmediate : e ? ((s, r) => (j.addEventListener("message", ({ source: n, data: o }) => {
|
|
159
|
+
n === j && o === s && r.length && r.shift()();
|
|
160
|
+
}, !1), (n) => {
|
|
161
|
+
r.push(n), j.postMessage(s, "*");
|
|
162
|
+
}))(`axios@${Math.random()}`, []) : (s) => setTimeout(s))(
|
|
163
|
+
typeof setImmediate == "function",
|
|
164
|
+
L(j.postMessage)
|
|
165
|
+
), zt = typeof queueMicrotask < "u" ? queueMicrotask.bind(j) : typeof process < "u" && process.nextTick || We, Kt = (t) => t != null && L(t[ae]), u = {
|
|
166
|
+
isArray: $,
|
|
167
|
+
isArrayBuffer: ke,
|
|
168
|
+
isBuffer: pt,
|
|
169
|
+
isFormData: Rt,
|
|
170
|
+
isArrayBufferView: ht,
|
|
171
|
+
isString: ft,
|
|
172
|
+
isNumber: ve,
|
|
173
|
+
isBoolean: mt,
|
|
174
|
+
isObject: le,
|
|
175
|
+
isPlainObject: ee,
|
|
176
|
+
isReadableStream: Pt,
|
|
177
|
+
isRequest: Tt,
|
|
178
|
+
isResponse: Ct,
|
|
179
|
+
isHeaders: _t,
|
|
180
|
+
isUndefined: K,
|
|
181
|
+
isDate: Et,
|
|
182
|
+
isFile: At,
|
|
183
|
+
isBlob: Ot,
|
|
184
|
+
isRegExp: Bt,
|
|
185
|
+
isFunction: L,
|
|
186
|
+
isStream: St,
|
|
187
|
+
isURLSearchParams: gt,
|
|
188
|
+
isTypedArray: Vt,
|
|
189
|
+
isFileList: yt,
|
|
190
|
+
forEach: X,
|
|
191
|
+
merge: Ae,
|
|
192
|
+
extend: wt,
|
|
193
|
+
trim: bt,
|
|
194
|
+
stripBOM: It,
|
|
195
|
+
inherits: Nt,
|
|
196
|
+
toFlatObject: Lt,
|
|
197
|
+
kindOf: ie,
|
|
198
|
+
kindOfTest: U,
|
|
199
|
+
endsWith: Ft,
|
|
200
|
+
toArray: Ut,
|
|
201
|
+
forEachEntry: Dt,
|
|
202
|
+
matchAll: Gt,
|
|
203
|
+
isHTMLForm: Ht,
|
|
204
|
+
hasOwnProperty: be,
|
|
205
|
+
hasOwnProp: be,
|
|
206
|
+
// an alias to avoid ESLint no-prototype-builtins detection
|
|
207
|
+
reduceDescriptors: Qe,
|
|
208
|
+
freezeMethods: Mt,
|
|
209
|
+
toObjectSet: jt,
|
|
210
|
+
toCamelCase: xt,
|
|
211
|
+
noop: kt,
|
|
212
|
+
toFiniteNumber: vt,
|
|
213
|
+
findKey: qe,
|
|
214
|
+
global: j,
|
|
215
|
+
isContextDefined: $e,
|
|
216
|
+
isSpecCompliantForm: qt,
|
|
217
|
+
toJSONObject: $t,
|
|
218
|
+
isAsyncFn: Qt,
|
|
219
|
+
isThenable: Wt,
|
|
220
|
+
setImmediate: We,
|
|
221
|
+
asap: zt,
|
|
222
|
+
isIterable: Kt
|
|
223
|
+
};
|
|
224
|
+
function E(t, e, s, r, n) {
|
|
225
|
+
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = t, this.name = "AxiosError", e && (this.code = e), s && (this.config = s), r && (this.request = r), n && (this.response = n, this.status = n.status ? n.status : null);
|
|
226
|
+
}
|
|
227
|
+
u.inherits(E, Error, {
|
|
228
|
+
toJSON: function() {
|
|
229
|
+
return {
|
|
230
|
+
// Standard
|
|
231
|
+
message: this.message,
|
|
232
|
+
name: this.name,
|
|
233
|
+
// Microsoft
|
|
234
|
+
description: this.description,
|
|
235
|
+
number: this.number,
|
|
236
|
+
// Mozilla
|
|
237
|
+
fileName: this.fileName,
|
|
238
|
+
lineNumber: this.lineNumber,
|
|
239
|
+
columnNumber: this.columnNumber,
|
|
240
|
+
stack: this.stack,
|
|
241
|
+
// Axios
|
|
242
|
+
config: u.toJSONObject(this.config),
|
|
243
|
+
code: this.code,
|
|
244
|
+
status: this.status
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
});
|
|
248
|
+
const ze = E.prototype, Ke = {};
|
|
249
|
+
[
|
|
250
|
+
"ERR_BAD_OPTION_VALUE",
|
|
251
|
+
"ERR_BAD_OPTION",
|
|
252
|
+
"ECONNABORTED",
|
|
253
|
+
"ETIMEDOUT",
|
|
254
|
+
"ERR_NETWORK",
|
|
255
|
+
"ERR_FR_TOO_MANY_REDIRECTS",
|
|
256
|
+
"ERR_DEPRECATED",
|
|
257
|
+
"ERR_BAD_RESPONSE",
|
|
258
|
+
"ERR_BAD_REQUEST",
|
|
259
|
+
"ERR_CANCELED",
|
|
260
|
+
"ERR_NOT_SUPPORT",
|
|
261
|
+
"ERR_INVALID_URL"
|
|
262
|
+
// eslint-disable-next-line func-names
|
|
263
|
+
].forEach((t) => {
|
|
264
|
+
Ke[t] = { value: t };
|
|
265
|
+
});
|
|
266
|
+
Object.defineProperties(E, Ke);
|
|
267
|
+
Object.defineProperty(ze, "isAxiosError", { value: !0 });
|
|
268
|
+
E.from = (t, e, s, r, n, o) => {
|
|
269
|
+
const a = Object.create(ze);
|
|
270
|
+
return u.toFlatObject(t, a, function(c) {
|
|
271
|
+
return c !== Error.prototype;
|
|
272
|
+
}, (i) => i !== "isAxiosError"), E.call(a, t.message, e, s, r, n), a.cause = t, a.name = t.name, o && Object.assign(a, o), a;
|
|
273
|
+
};
|
|
274
|
+
const Xt = null;
|
|
275
|
+
function Oe(t) {
|
|
276
|
+
return u.isPlainObject(t) || u.isArray(t);
|
|
277
|
+
}
|
|
278
|
+
function Xe(t) {
|
|
279
|
+
return u.endsWith(t, "[]") ? t.slice(0, -2) : t;
|
|
280
|
+
}
|
|
281
|
+
function we(t, e, s) {
|
|
282
|
+
return t ? t.concat(e).map(function(n, o) {
|
|
283
|
+
return n = Xe(n), !s && o ? "[" + n + "]" : n;
|
|
284
|
+
}).join(s ? "." : "") : e;
|
|
285
|
+
}
|
|
286
|
+
function Jt(t) {
|
|
287
|
+
return u.isArray(t) && !t.some(Oe);
|
|
288
|
+
}
|
|
289
|
+
const Yt = u.toFlatObject(u, {}, null, function(e) {
|
|
290
|
+
return /^is[A-Z]/.test(e);
|
|
291
|
+
});
|
|
292
|
+
function ue(t, e, s) {
|
|
293
|
+
if (!u.isObject(t))
|
|
294
|
+
throw new TypeError("target must be an object");
|
|
295
|
+
e = e || new FormData(), s = u.toFlatObject(s, {
|
|
296
|
+
metaTokens: !0,
|
|
297
|
+
dots: !1,
|
|
298
|
+
indexes: !1
|
|
299
|
+
}, !1, function(A, f) {
|
|
300
|
+
return !u.isUndefined(f[A]);
|
|
301
|
+
});
|
|
302
|
+
const r = s.metaTokens, n = s.visitor || d, o = s.dots, a = s.indexes, c = (s.Blob || typeof Blob < "u" && Blob) && u.isSpecCompliantForm(e);
|
|
303
|
+
if (!u.isFunction(n))
|
|
304
|
+
throw new TypeError("visitor must be a function");
|
|
305
|
+
function l(h) {
|
|
306
|
+
if (h === null) return "";
|
|
307
|
+
if (u.isDate(h))
|
|
308
|
+
return h.toISOString();
|
|
309
|
+
if (u.isBoolean(h))
|
|
310
|
+
return h.toString();
|
|
311
|
+
if (!c && u.isBlob(h))
|
|
312
|
+
throw new E("Blob is not supported. Use a Buffer instead.");
|
|
313
|
+
return u.isArrayBuffer(h) || u.isTypedArray(h) ? c && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
|
|
314
|
+
}
|
|
315
|
+
function d(h, A, f) {
|
|
316
|
+
let C = h;
|
|
317
|
+
if (h && !f && typeof h == "object") {
|
|
318
|
+
if (u.endsWith(A, "{}"))
|
|
319
|
+
A = r ? A : A.slice(0, -2), h = JSON.stringify(h);
|
|
320
|
+
else if (u.isArray(h) && Jt(h) || (u.isFileList(h) || u.endsWith(A, "[]")) && (C = u.toArray(h)))
|
|
321
|
+
return A = Xe(A), C.forEach(function(w, G) {
|
|
322
|
+
!(u.isUndefined(w) || w === null) && e.append(
|
|
323
|
+
// eslint-disable-next-line no-nested-ternary
|
|
324
|
+
a === !0 ? we([A], G, o) : a === null ? A : A + "[]",
|
|
325
|
+
l(w)
|
|
326
|
+
);
|
|
327
|
+
}), !1;
|
|
328
|
+
}
|
|
329
|
+
return Oe(h) ? !0 : (e.append(we(f, A, o), l(h)), !1);
|
|
330
|
+
}
|
|
331
|
+
const p = [], O = Object.assign(Yt, {
|
|
332
|
+
defaultVisitor: d,
|
|
333
|
+
convertValue: l,
|
|
334
|
+
isVisitable: Oe
|
|
335
|
+
});
|
|
336
|
+
function _(h, A) {
|
|
337
|
+
if (!u.isUndefined(h)) {
|
|
338
|
+
if (p.indexOf(h) !== -1)
|
|
339
|
+
throw Error("Circular reference detected in " + A.join("."));
|
|
340
|
+
p.push(h), u.forEach(h, function(C, b) {
|
|
341
|
+
(!(u.isUndefined(C) || C === null) && n.call(
|
|
342
|
+
e,
|
|
343
|
+
C,
|
|
344
|
+
u.isString(b) ? b.trim() : b,
|
|
345
|
+
A,
|
|
346
|
+
O
|
|
347
|
+
)) === !0 && _(C, A ? A.concat(b) : [b]);
|
|
348
|
+
}), p.pop();
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
if (!u.isObject(t))
|
|
352
|
+
throw new TypeError("data must be an object");
|
|
353
|
+
return _(t), e;
|
|
354
|
+
}
|
|
355
|
+
function Ie(t) {
|
|
356
|
+
const e = {
|
|
357
|
+
"!": "%21",
|
|
358
|
+
"'": "%27",
|
|
359
|
+
"(": "%28",
|
|
360
|
+
")": "%29",
|
|
361
|
+
"~": "%7E",
|
|
362
|
+
"%20": "+",
|
|
363
|
+
"%00": "\0"
|
|
364
|
+
};
|
|
365
|
+
return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g, function(r) {
|
|
366
|
+
return e[r];
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
function Te(t, e) {
|
|
370
|
+
this._pairs = [], t && ue(t, this, e);
|
|
371
|
+
}
|
|
372
|
+
const Je = Te.prototype;
|
|
373
|
+
Je.append = function(e, s) {
|
|
374
|
+
this._pairs.push([e, s]);
|
|
375
|
+
};
|
|
376
|
+
Je.toString = function(e) {
|
|
377
|
+
const s = e ? function(r) {
|
|
378
|
+
return e.call(this, r, Ie);
|
|
379
|
+
} : Ie;
|
|
380
|
+
return this._pairs.map(function(n) {
|
|
381
|
+
return s(n[0]) + "=" + s(n[1]);
|
|
382
|
+
}, "").join("&");
|
|
383
|
+
};
|
|
384
|
+
function Zt(t) {
|
|
385
|
+
return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
386
|
+
}
|
|
387
|
+
function Ye(t, e, s) {
|
|
388
|
+
if (!e)
|
|
389
|
+
return t;
|
|
390
|
+
const r = s && s.encode || Zt;
|
|
391
|
+
u.isFunction(s) && (s = {
|
|
392
|
+
serialize: s
|
|
393
|
+
});
|
|
394
|
+
const n = s && s.serialize;
|
|
395
|
+
let o;
|
|
396
|
+
if (n ? o = n(e, s) : o = u.isURLSearchParams(e) ? e.toString() : new Te(e, s).toString(r), o) {
|
|
397
|
+
const a = t.indexOf("#");
|
|
398
|
+
a !== -1 && (t = t.slice(0, a)), t += (t.indexOf("?") === -1 ? "?" : "&") + o;
|
|
399
|
+
}
|
|
400
|
+
return t;
|
|
401
|
+
}
|
|
402
|
+
class Ne {
|
|
403
|
+
constructor() {
|
|
404
|
+
this.handlers = [];
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* Add a new interceptor to the stack
|
|
408
|
+
*
|
|
409
|
+
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
410
|
+
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
411
|
+
*
|
|
412
|
+
* @return {Number} An ID used to remove interceptor later
|
|
413
|
+
*/
|
|
414
|
+
use(e, s, r) {
|
|
415
|
+
return this.handlers.push({
|
|
416
|
+
fulfilled: e,
|
|
417
|
+
rejected: s,
|
|
418
|
+
synchronous: r ? r.synchronous : !1,
|
|
419
|
+
runWhen: r ? r.runWhen : null
|
|
420
|
+
}), this.handlers.length - 1;
|
|
421
|
+
}
|
|
422
|
+
/**
|
|
423
|
+
* Remove an interceptor from the stack
|
|
424
|
+
*
|
|
425
|
+
* @param {Number} id The ID that was returned by `use`
|
|
426
|
+
*
|
|
427
|
+
* @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
|
|
428
|
+
*/
|
|
429
|
+
eject(e) {
|
|
430
|
+
this.handlers[e] && (this.handlers[e] = null);
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
* Clear all interceptors from the stack
|
|
434
|
+
*
|
|
435
|
+
* @returns {void}
|
|
436
|
+
*/
|
|
437
|
+
clear() {
|
|
438
|
+
this.handlers && (this.handlers = []);
|
|
439
|
+
}
|
|
440
|
+
/**
|
|
441
|
+
* Iterate over all the registered interceptors
|
|
442
|
+
*
|
|
443
|
+
* This method is particularly useful for skipping over any
|
|
444
|
+
* interceptors that may have become `null` calling `eject`.
|
|
445
|
+
*
|
|
446
|
+
* @param {Function} fn The function to call for each interceptor
|
|
447
|
+
*
|
|
448
|
+
* @returns {void}
|
|
449
|
+
*/
|
|
450
|
+
forEach(e) {
|
|
451
|
+
u.forEach(this.handlers, function(r) {
|
|
452
|
+
r !== null && e(r);
|
|
453
|
+
});
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
const Ze = {
|
|
457
|
+
silentJSONParsing: !0,
|
|
458
|
+
forcedJSONParsing: !0,
|
|
459
|
+
clarifyTimeoutError: !1
|
|
460
|
+
}, es = typeof URLSearchParams < "u" ? URLSearchParams : Te, ts = typeof FormData < "u" ? FormData : null, ss = typeof Blob < "u" ? Blob : null, rs = {
|
|
461
|
+
isBrowser: !0,
|
|
462
|
+
classes: {
|
|
463
|
+
URLSearchParams: es,
|
|
464
|
+
FormData: ts,
|
|
465
|
+
Blob: ss
|
|
466
|
+
},
|
|
467
|
+
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
468
|
+
}, Ce = typeof window < "u" && typeof document < "u", ye = typeof navigator == "object" && navigator || void 0, ns = Ce && (!ye || ["ReactNative", "NativeScript", "NS"].indexOf(ye.product) < 0), os = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
469
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", as = Ce && window.location.href || "http://localhost", is = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
470
|
+
__proto__: null,
|
|
471
|
+
hasBrowserEnv: Ce,
|
|
472
|
+
hasStandardBrowserEnv: ns,
|
|
473
|
+
hasStandardBrowserWebWorkerEnv: os,
|
|
474
|
+
navigator: ye,
|
|
475
|
+
origin: as
|
|
476
|
+
}, Symbol.toStringTag, { value: "Module" })), I = {
|
|
477
|
+
...is,
|
|
478
|
+
...rs
|
|
479
|
+
};
|
|
480
|
+
function cs(t, e) {
|
|
481
|
+
return ue(t, new I.classes.URLSearchParams(), Object.assign({
|
|
482
|
+
visitor: function(s, r, n, o) {
|
|
483
|
+
return I.isNode && u.isBuffer(s) ? (this.append(r, s.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
484
|
+
}
|
|
485
|
+
}, e));
|
|
486
|
+
}
|
|
487
|
+
function ls(t) {
|
|
488
|
+
return u.matchAll(/\w+|\[(\w*)]/g, t).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
|
|
489
|
+
}
|
|
490
|
+
function us(t) {
|
|
491
|
+
const e = {}, s = Object.keys(t);
|
|
492
|
+
let r;
|
|
493
|
+
const n = s.length;
|
|
494
|
+
let o;
|
|
495
|
+
for (r = 0; r < n; r++)
|
|
496
|
+
o = s[r], e[o] = t[o];
|
|
497
|
+
return e;
|
|
498
|
+
}
|
|
499
|
+
function et(t) {
|
|
500
|
+
function e(s, r, n, o) {
|
|
501
|
+
let a = s[o++];
|
|
502
|
+
if (a === "__proto__") return !0;
|
|
503
|
+
const i = Number.isFinite(+a), c = o >= s.length;
|
|
504
|
+
return a = !a && u.isArray(n) ? n.length : a, c ? (u.hasOwnProp(n, a) ? n[a] = [n[a], r] : n[a] = r, !i) : ((!n[a] || !u.isObject(n[a])) && (n[a] = []), e(s, r, n[a], o) && u.isArray(n[a]) && (n[a] = us(n[a])), !i);
|
|
505
|
+
}
|
|
506
|
+
if (u.isFormData(t) && u.isFunction(t.entries)) {
|
|
507
|
+
const s = {};
|
|
508
|
+
return u.forEachEntry(t, (r, n) => {
|
|
509
|
+
e(ls(r), n, s, 0);
|
|
510
|
+
}), s;
|
|
511
|
+
}
|
|
512
|
+
return null;
|
|
513
|
+
}
|
|
514
|
+
function ds(t, e, s) {
|
|
515
|
+
if (u.isString(t))
|
|
516
|
+
try {
|
|
517
|
+
return (e || JSON.parse)(t), u.trim(t);
|
|
518
|
+
} catch (r) {
|
|
519
|
+
if (r.name !== "SyntaxError")
|
|
520
|
+
throw r;
|
|
521
|
+
}
|
|
522
|
+
return (s || JSON.stringify)(t);
|
|
523
|
+
}
|
|
524
|
+
const J = {
|
|
525
|
+
transitional: Ze,
|
|
526
|
+
adapter: ["xhr", "http", "fetch"],
|
|
527
|
+
transformRequest: [function(e, s) {
|
|
528
|
+
const r = s.getContentType() || "", n = r.indexOf("application/json") > -1, o = u.isObject(e);
|
|
529
|
+
if (o && u.isHTMLForm(e) && (e = new FormData(e)), u.isFormData(e))
|
|
530
|
+
return n ? JSON.stringify(et(e)) : e;
|
|
531
|
+
if (u.isArrayBuffer(e) || u.isBuffer(e) || u.isStream(e) || u.isFile(e) || u.isBlob(e) || u.isReadableStream(e))
|
|
532
|
+
return e;
|
|
533
|
+
if (u.isArrayBufferView(e))
|
|
534
|
+
return e.buffer;
|
|
535
|
+
if (u.isURLSearchParams(e))
|
|
536
|
+
return s.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
|
|
537
|
+
let i;
|
|
538
|
+
if (o) {
|
|
539
|
+
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
540
|
+
return cs(e, this.formSerializer).toString();
|
|
541
|
+
if ((i = u.isFileList(e)) || r.indexOf("multipart/form-data") > -1) {
|
|
542
|
+
const c = this.env && this.env.FormData;
|
|
543
|
+
return ue(
|
|
544
|
+
i ? { "files[]": e } : e,
|
|
545
|
+
c && new c(),
|
|
546
|
+
this.formSerializer
|
|
547
|
+
);
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
return o || n ? (s.setContentType("application/json", !1), ds(e)) : e;
|
|
551
|
+
}],
|
|
552
|
+
transformResponse: [function(e) {
|
|
553
|
+
const s = this.transitional || J.transitional, r = s && s.forcedJSONParsing, n = this.responseType === "json";
|
|
554
|
+
if (u.isResponse(e) || u.isReadableStream(e))
|
|
555
|
+
return e;
|
|
556
|
+
if (e && u.isString(e) && (r && !this.responseType || n)) {
|
|
557
|
+
const a = !(s && s.silentJSONParsing) && n;
|
|
558
|
+
try {
|
|
559
|
+
return JSON.parse(e);
|
|
560
|
+
} catch (i) {
|
|
561
|
+
if (a)
|
|
562
|
+
throw i.name === "SyntaxError" ? E.from(i, E.ERR_BAD_RESPONSE, this, null, this.response) : i;
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
return e;
|
|
566
|
+
}],
|
|
567
|
+
/**
|
|
568
|
+
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
569
|
+
* timeout is not created.
|
|
570
|
+
*/
|
|
571
|
+
timeout: 0,
|
|
572
|
+
xsrfCookieName: "XSRF-TOKEN",
|
|
573
|
+
xsrfHeaderName: "X-XSRF-TOKEN",
|
|
574
|
+
maxContentLength: -1,
|
|
575
|
+
maxBodyLength: -1,
|
|
576
|
+
env: {
|
|
577
|
+
FormData: I.classes.FormData,
|
|
578
|
+
Blob: I.classes.Blob
|
|
579
|
+
},
|
|
580
|
+
validateStatus: function(e) {
|
|
581
|
+
return e >= 200 && e < 300;
|
|
582
|
+
},
|
|
583
|
+
headers: {
|
|
584
|
+
common: {
|
|
585
|
+
Accept: "application/json, text/plain, */*",
|
|
586
|
+
"Content-Type": void 0
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
};
|
|
590
|
+
u.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => {
|
|
591
|
+
J.headers[t] = {};
|
|
592
|
+
});
|
|
593
|
+
const ps = u.toObjectSet([
|
|
594
|
+
"age",
|
|
595
|
+
"authorization",
|
|
596
|
+
"content-length",
|
|
597
|
+
"content-type",
|
|
598
|
+
"etag",
|
|
599
|
+
"expires",
|
|
600
|
+
"from",
|
|
601
|
+
"host",
|
|
602
|
+
"if-modified-since",
|
|
603
|
+
"if-unmodified-since",
|
|
604
|
+
"last-modified",
|
|
605
|
+
"location",
|
|
606
|
+
"max-forwards",
|
|
607
|
+
"proxy-authorization",
|
|
608
|
+
"referer",
|
|
609
|
+
"retry-after",
|
|
610
|
+
"user-agent"
|
|
611
|
+
]), hs = (t) => {
|
|
612
|
+
const e = {};
|
|
613
|
+
let s, r, n;
|
|
614
|
+
return t && t.split(`
|
|
615
|
+
`).forEach(function(a) {
|
|
616
|
+
n = a.indexOf(":"), s = a.substring(0, n).trim().toLowerCase(), r = a.substring(n + 1).trim(), !(!s || e[s] && ps[s]) && (s === "set-cookie" ? e[s] ? e[s].push(r) : e[s] = [r] : e[s] = e[s] ? e[s] + ", " + r : r);
|
|
617
|
+
}), e;
|
|
618
|
+
}, Le = Symbol("internals");
|
|
619
|
+
function z(t) {
|
|
620
|
+
return t && String(t).trim().toLowerCase();
|
|
621
|
+
}
|
|
622
|
+
function te(t) {
|
|
623
|
+
return t === !1 || t == null ? t : u.isArray(t) ? t.map(te) : String(t);
|
|
624
|
+
}
|
|
625
|
+
function fs(t) {
|
|
626
|
+
const e = /* @__PURE__ */ Object.create(null), s = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
627
|
+
let r;
|
|
628
|
+
for (; r = s.exec(t); )
|
|
629
|
+
e[r[1]] = r[2];
|
|
630
|
+
return e;
|
|
631
|
+
}
|
|
632
|
+
const ms = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
|
|
633
|
+
function he(t, e, s, r, n) {
|
|
634
|
+
if (u.isFunction(r))
|
|
635
|
+
return r.call(this, e, s);
|
|
636
|
+
if (n && (e = s), !!u.isString(e)) {
|
|
637
|
+
if (u.isString(r))
|
|
638
|
+
return e.indexOf(r) !== -1;
|
|
639
|
+
if (u.isRegExp(r))
|
|
640
|
+
return r.test(e);
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
function Es(t) {
|
|
644
|
+
return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, s, r) => s.toUpperCase() + r);
|
|
645
|
+
}
|
|
646
|
+
function As(t, e) {
|
|
647
|
+
const s = u.toCamelCase(" " + e);
|
|
648
|
+
["get", "set", "has"].forEach((r) => {
|
|
649
|
+
Object.defineProperty(t, r + s, {
|
|
650
|
+
value: function(n, o, a) {
|
|
651
|
+
return this[r].call(this, e, n, o, a);
|
|
652
|
+
},
|
|
653
|
+
configurable: !0
|
|
654
|
+
});
|
|
655
|
+
});
|
|
656
|
+
}
|
|
657
|
+
let F = class {
|
|
658
|
+
constructor(e) {
|
|
659
|
+
e && this.set(e);
|
|
660
|
+
}
|
|
661
|
+
set(e, s, r) {
|
|
662
|
+
const n = this;
|
|
663
|
+
function o(i, c, l) {
|
|
664
|
+
const d = z(c);
|
|
665
|
+
if (!d)
|
|
666
|
+
throw new Error("header name must be a non-empty string");
|
|
667
|
+
const p = u.findKey(n, d);
|
|
668
|
+
(!p || n[p] === void 0 || l === !0 || l === void 0 && n[p] !== !1) && (n[p || c] = te(i));
|
|
669
|
+
}
|
|
670
|
+
const a = (i, c) => u.forEach(i, (l, d) => o(l, d, c));
|
|
671
|
+
if (u.isPlainObject(e) || e instanceof this.constructor)
|
|
672
|
+
a(e, s);
|
|
673
|
+
else if (u.isString(e) && (e = e.trim()) && !ms(e))
|
|
674
|
+
a(hs(e), s);
|
|
675
|
+
else if (u.isObject(e) && u.isIterable(e)) {
|
|
676
|
+
let i = {}, c, l;
|
|
677
|
+
for (const d of e) {
|
|
678
|
+
if (!u.isArray(d))
|
|
679
|
+
throw TypeError("Object iterator must return a key-value pair");
|
|
680
|
+
i[l = d[0]] = (c = i[l]) ? u.isArray(c) ? [...c, d[1]] : [c, d[1]] : d[1];
|
|
681
|
+
}
|
|
682
|
+
a(i, s);
|
|
683
|
+
} else
|
|
684
|
+
e != null && o(s, e, r);
|
|
685
|
+
return this;
|
|
686
|
+
}
|
|
687
|
+
get(e, s) {
|
|
688
|
+
if (e = z(e), e) {
|
|
689
|
+
const r = u.findKey(this, e);
|
|
690
|
+
if (r) {
|
|
691
|
+
const n = this[r];
|
|
692
|
+
if (!s)
|
|
693
|
+
return n;
|
|
694
|
+
if (s === !0)
|
|
695
|
+
return fs(n);
|
|
696
|
+
if (u.isFunction(s))
|
|
697
|
+
return s.call(this, n, r);
|
|
698
|
+
if (u.isRegExp(s))
|
|
699
|
+
return s.exec(n);
|
|
700
|
+
throw new TypeError("parser must be boolean|regexp|function");
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
has(e, s) {
|
|
705
|
+
if (e = z(e), e) {
|
|
706
|
+
const r = u.findKey(this, e);
|
|
707
|
+
return !!(r && this[r] !== void 0 && (!s || he(this, this[r], r, s)));
|
|
708
|
+
}
|
|
709
|
+
return !1;
|
|
710
|
+
}
|
|
711
|
+
delete(e, s) {
|
|
712
|
+
const r = this;
|
|
713
|
+
let n = !1;
|
|
714
|
+
function o(a) {
|
|
715
|
+
if (a = z(a), a) {
|
|
716
|
+
const i = u.findKey(r, a);
|
|
717
|
+
i && (!s || he(r, r[i], i, s)) && (delete r[i], n = !0);
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
return u.isArray(e) ? e.forEach(o) : o(e), n;
|
|
721
|
+
}
|
|
722
|
+
clear(e) {
|
|
723
|
+
const s = Object.keys(this);
|
|
724
|
+
let r = s.length, n = !1;
|
|
725
|
+
for (; r--; ) {
|
|
726
|
+
const o = s[r];
|
|
727
|
+
(!e || he(this, this[o], o, e, !0)) && (delete this[o], n = !0);
|
|
728
|
+
}
|
|
729
|
+
return n;
|
|
730
|
+
}
|
|
731
|
+
normalize(e) {
|
|
732
|
+
const s = this, r = {};
|
|
733
|
+
return u.forEach(this, (n, o) => {
|
|
734
|
+
const a = u.findKey(r, o);
|
|
735
|
+
if (a) {
|
|
736
|
+
s[a] = te(n), delete s[o];
|
|
737
|
+
return;
|
|
738
|
+
}
|
|
739
|
+
const i = e ? Es(o) : String(o).trim();
|
|
740
|
+
i !== o && delete s[o], s[i] = te(n), r[i] = !0;
|
|
741
|
+
}), this;
|
|
742
|
+
}
|
|
743
|
+
concat(...e) {
|
|
744
|
+
return this.constructor.concat(this, ...e);
|
|
745
|
+
}
|
|
746
|
+
toJSON(e) {
|
|
747
|
+
const s = /* @__PURE__ */ Object.create(null);
|
|
748
|
+
return u.forEach(this, (r, n) => {
|
|
749
|
+
r != null && r !== !1 && (s[n] = e && u.isArray(r) ? r.join(", ") : r);
|
|
750
|
+
}), s;
|
|
751
|
+
}
|
|
752
|
+
[Symbol.iterator]() {
|
|
753
|
+
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
754
|
+
}
|
|
755
|
+
toString() {
|
|
756
|
+
return Object.entries(this.toJSON()).map(([e, s]) => e + ": " + s).join(`
|
|
757
|
+
`);
|
|
758
|
+
}
|
|
759
|
+
getSetCookie() {
|
|
760
|
+
return this.get("set-cookie") || [];
|
|
761
|
+
}
|
|
762
|
+
get [Symbol.toStringTag]() {
|
|
763
|
+
return "AxiosHeaders";
|
|
764
|
+
}
|
|
765
|
+
static from(e) {
|
|
766
|
+
return e instanceof this ? e : new this(e);
|
|
767
|
+
}
|
|
768
|
+
static concat(e, ...s) {
|
|
769
|
+
const r = new this(e);
|
|
770
|
+
return s.forEach((n) => r.set(n)), r;
|
|
771
|
+
}
|
|
772
|
+
static accessor(e) {
|
|
773
|
+
const r = (this[Le] = this[Le] = {
|
|
774
|
+
accessors: {}
|
|
775
|
+
}).accessors, n = this.prototype;
|
|
776
|
+
function o(a) {
|
|
777
|
+
const i = z(a);
|
|
778
|
+
r[i] || (As(n, a), r[i] = !0);
|
|
779
|
+
}
|
|
780
|
+
return u.isArray(e) ? e.forEach(o) : o(e), this;
|
|
781
|
+
}
|
|
782
|
+
};
|
|
783
|
+
F.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
784
|
+
u.reduceDescriptors(F.prototype, ({ value: t }, e) => {
|
|
785
|
+
let s = e[0].toUpperCase() + e.slice(1);
|
|
786
|
+
return {
|
|
787
|
+
get: () => t,
|
|
788
|
+
set(r) {
|
|
789
|
+
this[s] = r;
|
|
790
|
+
}
|
|
791
|
+
};
|
|
792
|
+
});
|
|
793
|
+
u.freezeMethods(F);
|
|
794
|
+
function fe(t, e) {
|
|
795
|
+
const s = this || J, r = e || s, n = F.from(r.headers);
|
|
796
|
+
let o = r.data;
|
|
797
|
+
return u.forEach(t, function(i) {
|
|
798
|
+
o = i.call(s, o, n.normalize(), e ? e.status : void 0);
|
|
799
|
+
}), n.normalize(), o;
|
|
800
|
+
}
|
|
801
|
+
function tt(t) {
|
|
802
|
+
return !!(t && t.__CANCEL__);
|
|
803
|
+
}
|
|
804
|
+
function Q(t, e, s) {
|
|
805
|
+
E.call(this, t ?? "canceled", E.ERR_CANCELED, e, s), this.name = "CanceledError";
|
|
806
|
+
}
|
|
807
|
+
u.inherits(Q, E, {
|
|
808
|
+
__CANCEL__: !0
|
|
809
|
+
});
|
|
810
|
+
function st(t, e, s) {
|
|
811
|
+
const r = s.config.validateStatus;
|
|
812
|
+
!s.status || !r || r(s.status) ? t(s) : e(new E(
|
|
813
|
+
"Request failed with status code " + s.status,
|
|
814
|
+
[E.ERR_BAD_REQUEST, E.ERR_BAD_RESPONSE][Math.floor(s.status / 100) - 4],
|
|
815
|
+
s.config,
|
|
816
|
+
s.request,
|
|
817
|
+
s
|
|
818
|
+
));
|
|
819
|
+
}
|
|
820
|
+
function Os(t) {
|
|
821
|
+
const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(t);
|
|
822
|
+
return e && e[1] || "";
|
|
823
|
+
}
|
|
824
|
+
function ys(t, e) {
|
|
825
|
+
t = t || 10;
|
|
826
|
+
const s = new Array(t), r = new Array(t);
|
|
827
|
+
let n = 0, o = 0, a;
|
|
828
|
+
return e = e !== void 0 ? e : 1e3, function(c) {
|
|
829
|
+
const l = Date.now(), d = r[o];
|
|
830
|
+
a || (a = l), s[n] = c, r[n] = l;
|
|
831
|
+
let p = o, O = 0;
|
|
832
|
+
for (; p !== n; )
|
|
833
|
+
O += s[p++], p = p % t;
|
|
834
|
+
if (n = (n + 1) % t, n === o && (o = (o + 1) % t), l - a < e)
|
|
835
|
+
return;
|
|
836
|
+
const _ = d && l - d;
|
|
837
|
+
return _ ? Math.round(O * 1e3 / _) : void 0;
|
|
838
|
+
};
|
|
839
|
+
}
|
|
840
|
+
function Ss(t, e) {
|
|
841
|
+
let s = 0, r = 1e3 / e, n, o;
|
|
842
|
+
const a = (l, d = Date.now()) => {
|
|
843
|
+
s = d, n = null, o && (clearTimeout(o), o = null), t.apply(null, l);
|
|
844
|
+
};
|
|
845
|
+
return [(...l) => {
|
|
846
|
+
const d = Date.now(), p = d - s;
|
|
847
|
+
p >= r ? a(l, d) : (n = l, o || (o = setTimeout(() => {
|
|
848
|
+
o = null, a(n);
|
|
849
|
+
}, r - p)));
|
|
850
|
+
}, () => n && a(n)];
|
|
851
|
+
}
|
|
852
|
+
const re = (t, e, s = 3) => {
|
|
853
|
+
let r = 0;
|
|
854
|
+
const n = ys(50, 250);
|
|
855
|
+
return Ss((o) => {
|
|
856
|
+
const a = o.loaded, i = o.lengthComputable ? o.total : void 0, c = a - r, l = n(c), d = a <= i;
|
|
857
|
+
r = a;
|
|
858
|
+
const p = {
|
|
859
|
+
loaded: a,
|
|
860
|
+
total: i,
|
|
861
|
+
progress: i ? a / i : void 0,
|
|
862
|
+
bytes: c,
|
|
863
|
+
rate: l || void 0,
|
|
864
|
+
estimated: l && i && d ? (i - a) / l : void 0,
|
|
865
|
+
event: o,
|
|
866
|
+
lengthComputable: i != null,
|
|
867
|
+
[e ? "download" : "upload"]: !0
|
|
868
|
+
};
|
|
869
|
+
t(p);
|
|
870
|
+
}, s);
|
|
871
|
+
}, Fe = (t, e) => {
|
|
872
|
+
const s = t != null;
|
|
873
|
+
return [(r) => e[0]({
|
|
874
|
+
lengthComputable: s,
|
|
875
|
+
total: t,
|
|
876
|
+
loaded: r
|
|
877
|
+
}), e[1]];
|
|
878
|
+
}, Ue = (t) => (...e) => u.asap(() => t(...e)), Rs = I.hasStandardBrowserEnv ? /* @__PURE__ */ ((t, e) => (s) => (s = new URL(s, I.origin), t.protocol === s.protocol && t.host === s.host && (e || t.port === s.port)))(
|
|
879
|
+
new URL(I.origin),
|
|
880
|
+
I.navigator && /(msie|trident)/i.test(I.navigator.userAgent)
|
|
881
|
+
) : () => !0, gs = I.hasStandardBrowserEnv ? (
|
|
882
|
+
// Standard browser envs support document.cookie
|
|
883
|
+
{
|
|
884
|
+
write(t, e, s, r, n, o) {
|
|
885
|
+
const a = [t + "=" + encodeURIComponent(e)];
|
|
886
|
+
u.isNumber(s) && a.push("expires=" + new Date(s).toGMTString()), u.isString(r) && a.push("path=" + r), u.isString(n) && a.push("domain=" + n), o === !0 && a.push("secure"), document.cookie = a.join("; ");
|
|
887
|
+
},
|
|
888
|
+
read(t) {
|
|
889
|
+
const e = document.cookie.match(new RegExp("(^|;\\s*)(" + t + ")=([^;]*)"));
|
|
890
|
+
return e ? decodeURIComponent(e[3]) : null;
|
|
891
|
+
},
|
|
892
|
+
remove(t) {
|
|
893
|
+
this.write(t, "", Date.now() - 864e5);
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
) : (
|
|
897
|
+
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
898
|
+
{
|
|
899
|
+
write() {
|
|
900
|
+
},
|
|
901
|
+
read() {
|
|
902
|
+
return null;
|
|
903
|
+
},
|
|
904
|
+
remove() {
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
);
|
|
908
|
+
function Ps(t) {
|
|
909
|
+
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
|
|
910
|
+
}
|
|
911
|
+
function Ts(t, e) {
|
|
912
|
+
return e ? t.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : t;
|
|
913
|
+
}
|
|
914
|
+
function rt(t, e, s) {
|
|
915
|
+
let r = !Ps(e);
|
|
916
|
+
return t && (r || s == !1) ? Ts(t, e) : e;
|
|
917
|
+
}
|
|
918
|
+
const Ve = (t) => t instanceof F ? { ...t } : t;
|
|
919
|
+
function v(t, e) {
|
|
920
|
+
e = e || {};
|
|
921
|
+
const s = {};
|
|
922
|
+
function r(l, d, p, O) {
|
|
923
|
+
return u.isPlainObject(l) && u.isPlainObject(d) ? u.merge.call({ caseless: O }, l, d) : u.isPlainObject(d) ? u.merge({}, d) : u.isArray(d) ? d.slice() : d;
|
|
924
|
+
}
|
|
925
|
+
function n(l, d, p, O) {
|
|
926
|
+
if (u.isUndefined(d)) {
|
|
927
|
+
if (!u.isUndefined(l))
|
|
928
|
+
return r(void 0, l, p, O);
|
|
929
|
+
} else return r(l, d, p, O);
|
|
930
|
+
}
|
|
931
|
+
function o(l, d) {
|
|
932
|
+
if (!u.isUndefined(d))
|
|
933
|
+
return r(void 0, d);
|
|
934
|
+
}
|
|
935
|
+
function a(l, d) {
|
|
936
|
+
if (u.isUndefined(d)) {
|
|
937
|
+
if (!u.isUndefined(l))
|
|
938
|
+
return r(void 0, l);
|
|
939
|
+
} else return r(void 0, d);
|
|
940
|
+
}
|
|
941
|
+
function i(l, d, p) {
|
|
942
|
+
if (p in e)
|
|
943
|
+
return r(l, d);
|
|
944
|
+
if (p in t)
|
|
945
|
+
return r(void 0, l);
|
|
946
|
+
}
|
|
947
|
+
const c = {
|
|
948
|
+
url: o,
|
|
949
|
+
method: o,
|
|
950
|
+
data: o,
|
|
951
|
+
baseURL: a,
|
|
952
|
+
transformRequest: a,
|
|
953
|
+
transformResponse: a,
|
|
954
|
+
paramsSerializer: a,
|
|
955
|
+
timeout: a,
|
|
956
|
+
timeoutMessage: a,
|
|
957
|
+
withCredentials: a,
|
|
958
|
+
withXSRFToken: a,
|
|
959
|
+
adapter: a,
|
|
960
|
+
responseType: a,
|
|
961
|
+
xsrfCookieName: a,
|
|
962
|
+
xsrfHeaderName: a,
|
|
963
|
+
onUploadProgress: a,
|
|
964
|
+
onDownloadProgress: a,
|
|
965
|
+
decompress: a,
|
|
966
|
+
maxContentLength: a,
|
|
967
|
+
maxBodyLength: a,
|
|
968
|
+
beforeRedirect: a,
|
|
969
|
+
transport: a,
|
|
970
|
+
httpAgent: a,
|
|
971
|
+
httpsAgent: a,
|
|
972
|
+
cancelToken: a,
|
|
973
|
+
socketPath: a,
|
|
974
|
+
responseEncoding: a,
|
|
975
|
+
validateStatus: i,
|
|
976
|
+
headers: (l, d, p) => n(Ve(l), Ve(d), p, !0)
|
|
977
|
+
};
|
|
978
|
+
return u.forEach(Object.keys(Object.assign({}, t, e)), function(d) {
|
|
979
|
+
const p = c[d] || n, O = p(t[d], e[d], d);
|
|
980
|
+
u.isUndefined(O) && p !== i || (s[d] = O);
|
|
981
|
+
}), s;
|
|
982
|
+
}
|
|
983
|
+
const nt = (t) => {
|
|
984
|
+
const e = v({}, t);
|
|
985
|
+
let { data: s, withXSRFToken: r, xsrfHeaderName: n, xsrfCookieName: o, headers: a, auth: i } = e;
|
|
986
|
+
e.headers = a = F.from(a), e.url = Ye(rt(e.baseURL, e.url, e.allowAbsoluteUrls), t.params, t.paramsSerializer), i && a.set(
|
|
987
|
+
"Authorization",
|
|
988
|
+
"Basic " + btoa((i.username || "") + ":" + (i.password ? unescape(encodeURIComponent(i.password)) : ""))
|
|
989
|
+
);
|
|
990
|
+
let c;
|
|
991
|
+
if (u.isFormData(s)) {
|
|
992
|
+
if (I.hasStandardBrowserEnv || I.hasStandardBrowserWebWorkerEnv)
|
|
993
|
+
a.setContentType(void 0);
|
|
994
|
+
else if ((c = a.getContentType()) !== !1) {
|
|
995
|
+
const [l, ...d] = c ? c.split(";").map((p) => p.trim()).filter(Boolean) : [];
|
|
996
|
+
a.setContentType([l || "multipart/form-data", ...d].join("; "));
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
if (I.hasStandardBrowserEnv && (r && u.isFunction(r) && (r = r(e)), r || r !== !1 && Rs(e.url))) {
|
|
1000
|
+
const l = n && o && gs.read(o);
|
|
1001
|
+
l && a.set(n, l);
|
|
1002
|
+
}
|
|
1003
|
+
return e;
|
|
1004
|
+
}, Cs = typeof XMLHttpRequest < "u", _s = Cs && function(t) {
|
|
1005
|
+
return new Promise(function(s, r) {
|
|
1006
|
+
const n = nt(t);
|
|
1007
|
+
let o = n.data;
|
|
1008
|
+
const a = F.from(n.headers).normalize();
|
|
1009
|
+
let { responseType: i, onUploadProgress: c, onDownloadProgress: l } = n, d, p, O, _, h;
|
|
1010
|
+
function A() {
|
|
1011
|
+
_ && _(), h && h(), n.cancelToken && n.cancelToken.unsubscribe(d), n.signal && n.signal.removeEventListener("abort", d);
|
|
1012
|
+
}
|
|
1013
|
+
let f = new XMLHttpRequest();
|
|
1014
|
+
f.open(n.method.toUpperCase(), n.url, !0), f.timeout = n.timeout;
|
|
1015
|
+
function C() {
|
|
1016
|
+
if (!f)
|
|
1017
|
+
return;
|
|
1018
|
+
const w = F.from(
|
|
1019
|
+
"getAllResponseHeaders" in f && f.getAllResponseHeaders()
|
|
1020
|
+
), N = {
|
|
1021
|
+
data: !i || i === "text" || i === "json" ? f.responseText : f.response,
|
|
1022
|
+
status: f.status,
|
|
1023
|
+
statusText: f.statusText,
|
|
1024
|
+
headers: w,
|
|
1025
|
+
config: t,
|
|
1026
|
+
request: f
|
|
1027
|
+
};
|
|
1028
|
+
st(function(B) {
|
|
1029
|
+
s(B), A();
|
|
1030
|
+
}, function(B) {
|
|
1031
|
+
r(B), A();
|
|
1032
|
+
}, N), f = null;
|
|
1033
|
+
}
|
|
1034
|
+
"onloadend" in f ? f.onloadend = C : f.onreadystatechange = function() {
|
|
1035
|
+
!f || f.readyState !== 4 || f.status === 0 && !(f.responseURL && f.responseURL.indexOf("file:") === 0) || setTimeout(C);
|
|
1036
|
+
}, f.onabort = function() {
|
|
1037
|
+
f && (r(new E("Request aborted", E.ECONNABORTED, t, f)), f = null);
|
|
1038
|
+
}, f.onerror = function() {
|
|
1039
|
+
r(new E("Network Error", E.ERR_NETWORK, t, f)), f = null;
|
|
1040
|
+
}, f.ontimeout = function() {
|
|
1041
|
+
let G = n.timeout ? "timeout of " + n.timeout + "ms exceeded" : "timeout exceeded";
|
|
1042
|
+
const N = n.transitional || Ze;
|
|
1043
|
+
n.timeoutErrorMessage && (G = n.timeoutErrorMessage), r(new E(
|
|
1044
|
+
G,
|
|
1045
|
+
N.clarifyTimeoutError ? E.ETIMEDOUT : E.ECONNABORTED,
|
|
1046
|
+
t,
|
|
1047
|
+
f
|
|
1048
|
+
)), f = null;
|
|
1049
|
+
}, o === void 0 && a.setContentType(null), "setRequestHeader" in f && u.forEach(a.toJSON(), function(G, N) {
|
|
1050
|
+
f.setRequestHeader(N, G);
|
|
1051
|
+
}), u.isUndefined(n.withCredentials) || (f.withCredentials = !!n.withCredentials), i && i !== "json" && (f.responseType = n.responseType), l && ([O, h] = re(l, !0), f.addEventListener("progress", O)), c && f.upload && ([p, _] = re(c), f.upload.addEventListener("progress", p), f.upload.addEventListener("loadend", _)), (n.cancelToken || n.signal) && (d = (w) => {
|
|
1052
|
+
f && (r(!w || w.type ? new Q(null, t, f) : w), f.abort(), f = null);
|
|
1053
|
+
}, n.cancelToken && n.cancelToken.subscribe(d), n.signal && (n.signal.aborted ? d() : n.signal.addEventListener("abort", d)));
|
|
1054
|
+
const b = Os(n.url);
|
|
1055
|
+
if (b && I.protocols.indexOf(b) === -1) {
|
|
1056
|
+
r(new E("Unsupported protocol " + b + ":", E.ERR_BAD_REQUEST, t));
|
|
1057
|
+
return;
|
|
1058
|
+
}
|
|
1059
|
+
f.send(o || null);
|
|
1060
|
+
});
|
|
1061
|
+
}, bs = (t, e) => {
|
|
1062
|
+
const { length: s } = t = t ? t.filter(Boolean) : [];
|
|
1063
|
+
if (e || s) {
|
|
1064
|
+
let r = new AbortController(), n;
|
|
1065
|
+
const o = function(l) {
|
|
1066
|
+
if (!n) {
|
|
1067
|
+
n = !0, i();
|
|
1068
|
+
const d = l instanceof Error ? l : this.reason;
|
|
1069
|
+
r.abort(d instanceof E ? d : new Q(d instanceof Error ? d.message : d));
|
|
1070
|
+
}
|
|
1071
|
+
};
|
|
1072
|
+
let a = e && setTimeout(() => {
|
|
1073
|
+
a = null, o(new E(`timeout ${e} of ms exceeded`, E.ETIMEDOUT));
|
|
1074
|
+
}, e);
|
|
1075
|
+
const i = () => {
|
|
1076
|
+
t && (a && clearTimeout(a), a = null, t.forEach((l) => {
|
|
1077
|
+
l.unsubscribe ? l.unsubscribe(o) : l.removeEventListener("abort", o);
|
|
1078
|
+
}), t = null);
|
|
1079
|
+
};
|
|
1080
|
+
t.forEach((l) => l.addEventListener("abort", o));
|
|
1081
|
+
const { signal: c } = r;
|
|
1082
|
+
return c.unsubscribe = () => u.asap(i), c;
|
|
1083
|
+
}
|
|
1084
|
+
}, ws = function* (t, e) {
|
|
1085
|
+
let s = t.byteLength;
|
|
1086
|
+
if (s < e) {
|
|
1087
|
+
yield t;
|
|
1088
|
+
return;
|
|
1089
|
+
}
|
|
1090
|
+
let r = 0, n;
|
|
1091
|
+
for (; r < s; )
|
|
1092
|
+
n = r + e, yield t.slice(r, n), r = n;
|
|
1093
|
+
}, Is = async function* (t, e) {
|
|
1094
|
+
for await (const s of Ns(t))
|
|
1095
|
+
yield* ws(s, e);
|
|
1096
|
+
}, Ns = async function* (t) {
|
|
1097
|
+
if (t[Symbol.asyncIterator]) {
|
|
1098
|
+
yield* t;
|
|
1099
|
+
return;
|
|
1100
|
+
}
|
|
1101
|
+
const e = t.getReader();
|
|
1102
|
+
try {
|
|
1103
|
+
for (; ; ) {
|
|
1104
|
+
const { done: s, value: r } = await e.read();
|
|
1105
|
+
if (s)
|
|
1106
|
+
break;
|
|
1107
|
+
yield r;
|
|
1108
|
+
}
|
|
1109
|
+
} finally {
|
|
1110
|
+
await e.cancel();
|
|
1111
|
+
}
|
|
1112
|
+
}, De = (t, e, s, r) => {
|
|
1113
|
+
const n = Is(t, e);
|
|
1114
|
+
let o = 0, a, i = (c) => {
|
|
1115
|
+
a || (a = !0, r && r(c));
|
|
1116
|
+
};
|
|
1117
|
+
return new ReadableStream({
|
|
1118
|
+
async pull(c) {
|
|
1119
|
+
try {
|
|
1120
|
+
const { done: l, value: d } = await n.next();
|
|
1121
|
+
if (l) {
|
|
1122
|
+
i(), c.close();
|
|
1123
|
+
return;
|
|
1124
|
+
}
|
|
1125
|
+
let p = d.byteLength;
|
|
1126
|
+
if (s) {
|
|
1127
|
+
let O = o += p;
|
|
1128
|
+
s(O);
|
|
1129
|
+
}
|
|
1130
|
+
c.enqueue(new Uint8Array(d));
|
|
1131
|
+
} catch (l) {
|
|
1132
|
+
throw i(l), l;
|
|
1133
|
+
}
|
|
1134
|
+
},
|
|
1135
|
+
cancel(c) {
|
|
1136
|
+
return i(c), n.return();
|
|
1137
|
+
}
|
|
1138
|
+
}, {
|
|
1139
|
+
highWaterMark: 2
|
|
1140
|
+
});
|
|
1141
|
+
}, de = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", ot = de && typeof ReadableStream == "function", Ls = de && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((t) => (e) => t.encode(e))(new TextEncoder()) : async (t) => new Uint8Array(await new Response(t).arrayBuffer())), at = (t, ...e) => {
|
|
1142
|
+
try {
|
|
1143
|
+
return !!t(...e);
|
|
1144
|
+
} catch {
|
|
1145
|
+
return !1;
|
|
1146
|
+
}
|
|
1147
|
+
}, Fs = ot && at(() => {
|
|
1148
|
+
let t = !1;
|
|
1149
|
+
const e = new Request(I.origin, {
|
|
1150
|
+
body: new ReadableStream(),
|
|
1151
|
+
method: "POST",
|
|
1152
|
+
get duplex() {
|
|
1153
|
+
return t = !0, "half";
|
|
1154
|
+
}
|
|
1155
|
+
}).headers.has("Content-Type");
|
|
1156
|
+
return t && !e;
|
|
1157
|
+
}), Ge = 64 * 1024, Se = ot && at(() => u.isReadableStream(new Response("").body)), ne = {
|
|
1158
|
+
stream: Se && ((t) => t.body)
|
|
1159
|
+
};
|
|
1160
|
+
de && ((t) => {
|
|
1161
|
+
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((e) => {
|
|
1162
|
+
!ne[e] && (ne[e] = u.isFunction(t[e]) ? (s) => s[e]() : (s, r) => {
|
|
1163
|
+
throw new E(`Response type '${e}' is not supported`, E.ERR_NOT_SUPPORT, r);
|
|
1164
|
+
});
|
|
1165
|
+
});
|
|
1166
|
+
})(new Response());
|
|
1167
|
+
const Us = async (t) => {
|
|
1168
|
+
if (t == null)
|
|
1169
|
+
return 0;
|
|
1170
|
+
if (u.isBlob(t))
|
|
1171
|
+
return t.size;
|
|
1172
|
+
if (u.isSpecCompliantForm(t))
|
|
1173
|
+
return (await new Request(I.origin, {
|
|
1174
|
+
method: "POST",
|
|
1175
|
+
body: t
|
|
1176
|
+
}).arrayBuffer()).byteLength;
|
|
1177
|
+
if (u.isArrayBufferView(t) || u.isArrayBuffer(t))
|
|
1178
|
+
return t.byteLength;
|
|
1179
|
+
if (u.isURLSearchParams(t) && (t = t + ""), u.isString(t))
|
|
1180
|
+
return (await Ls(t)).byteLength;
|
|
1181
|
+
}, Vs = async (t, e) => {
|
|
1182
|
+
const s = u.toFiniteNumber(t.getContentLength());
|
|
1183
|
+
return s ?? Us(e);
|
|
1184
|
+
}, Ds = de && (async (t) => {
|
|
1185
|
+
let {
|
|
1186
|
+
url: e,
|
|
1187
|
+
method: s,
|
|
1188
|
+
data: r,
|
|
1189
|
+
signal: n,
|
|
1190
|
+
cancelToken: o,
|
|
1191
|
+
timeout: a,
|
|
1192
|
+
onDownloadProgress: i,
|
|
1193
|
+
onUploadProgress: c,
|
|
1194
|
+
responseType: l,
|
|
1195
|
+
headers: d,
|
|
1196
|
+
withCredentials: p = "same-origin",
|
|
1197
|
+
fetchOptions: O
|
|
1198
|
+
} = nt(t);
|
|
1199
|
+
l = l ? (l + "").toLowerCase() : "text";
|
|
1200
|
+
let _ = bs([n, o && o.toAbortSignal()], a), h;
|
|
1201
|
+
const A = _ && _.unsubscribe && (() => {
|
|
1202
|
+
_.unsubscribe();
|
|
1203
|
+
});
|
|
1204
|
+
let f;
|
|
1205
|
+
try {
|
|
1206
|
+
if (c && Fs && s !== "get" && s !== "head" && (f = await Vs(d, r)) !== 0) {
|
|
1207
|
+
let N = new Request(e, {
|
|
1208
|
+
method: "POST",
|
|
1209
|
+
body: r,
|
|
1210
|
+
duplex: "half"
|
|
1211
|
+
}), x;
|
|
1212
|
+
if (u.isFormData(r) && (x = N.headers.get("content-type")) && d.setContentType(x), N.body) {
|
|
1213
|
+
const [B, Y] = Fe(
|
|
1214
|
+
f,
|
|
1215
|
+
re(Ue(c))
|
|
1216
|
+
);
|
|
1217
|
+
r = De(N.body, Ge, B, Y);
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
u.isString(p) || (p = p ? "include" : "omit");
|
|
1221
|
+
const C = "credentials" in Request.prototype;
|
|
1222
|
+
h = new Request(e, {
|
|
1223
|
+
...O,
|
|
1224
|
+
signal: _,
|
|
1225
|
+
method: s.toUpperCase(),
|
|
1226
|
+
headers: d.normalize().toJSON(),
|
|
1227
|
+
body: r,
|
|
1228
|
+
duplex: "half",
|
|
1229
|
+
credentials: C ? p : void 0
|
|
1230
|
+
});
|
|
1231
|
+
let b = await fetch(h, O);
|
|
1232
|
+
const w = Se && (l === "stream" || l === "response");
|
|
1233
|
+
if (Se && (i || w && A)) {
|
|
1234
|
+
const N = {};
|
|
1235
|
+
["status", "statusText", "headers"].forEach((_e) => {
|
|
1236
|
+
N[_e] = b[_e];
|
|
1237
|
+
});
|
|
1238
|
+
const x = u.toFiniteNumber(b.headers.get("content-length")), [B, Y] = i && Fe(
|
|
1239
|
+
x,
|
|
1240
|
+
re(Ue(i), !0)
|
|
1241
|
+
) || [];
|
|
1242
|
+
b = new Response(
|
|
1243
|
+
De(b.body, Ge, B, () => {
|
|
1244
|
+
Y && Y(), A && A();
|
|
1245
|
+
}),
|
|
1246
|
+
N
|
|
1247
|
+
);
|
|
1248
|
+
}
|
|
1249
|
+
l = l || "text";
|
|
1250
|
+
let G = await ne[u.findKey(ne, l) || "text"](b, t);
|
|
1251
|
+
return !w && A && A(), await new Promise((N, x) => {
|
|
1252
|
+
st(N, x, {
|
|
1253
|
+
data: G,
|
|
1254
|
+
headers: F.from(b.headers),
|
|
1255
|
+
status: b.status,
|
|
1256
|
+
statusText: b.statusText,
|
|
1257
|
+
config: t,
|
|
1258
|
+
request: h
|
|
1259
|
+
});
|
|
1260
|
+
});
|
|
1261
|
+
} catch (C) {
|
|
1262
|
+
throw A && A(), C && C.name === "TypeError" && /Load failed|fetch/i.test(C.message) ? Object.assign(
|
|
1263
|
+
new E("Network Error", E.ERR_NETWORK, t, h),
|
|
1264
|
+
{
|
|
1265
|
+
cause: C.cause || C
|
|
1266
|
+
}
|
|
1267
|
+
) : E.from(C, C && C.code, t, h);
|
|
1268
|
+
}
|
|
1269
|
+
}), Re = {
|
|
1270
|
+
http: Xt,
|
|
1271
|
+
xhr: _s,
|
|
1272
|
+
fetch: Ds
|
|
1273
|
+
};
|
|
1274
|
+
u.forEach(Re, (t, e) => {
|
|
1275
|
+
if (t) {
|
|
1276
|
+
try {
|
|
1277
|
+
Object.defineProperty(t, "name", { value: e });
|
|
1278
|
+
} catch {
|
|
1279
|
+
}
|
|
1280
|
+
Object.defineProperty(t, "adapterName", { value: e });
|
|
1281
|
+
}
|
|
1282
|
+
});
|
|
1283
|
+
const He = (t) => `- ${t}`, Gs = (t) => u.isFunction(t) || t === null || t === !1, it = {
|
|
1284
|
+
getAdapter: (t) => {
|
|
1285
|
+
t = u.isArray(t) ? t : [t];
|
|
1286
|
+
const { length: e } = t;
|
|
1287
|
+
let s, r;
|
|
1288
|
+
const n = {};
|
|
1289
|
+
for (let o = 0; o < e; o++) {
|
|
1290
|
+
s = t[o];
|
|
1291
|
+
let a;
|
|
1292
|
+
if (r = s, !Gs(s) && (r = Re[(a = String(s)).toLowerCase()], r === void 0))
|
|
1293
|
+
throw new E(`Unknown adapter '${a}'`);
|
|
1294
|
+
if (r)
|
|
1295
|
+
break;
|
|
1296
|
+
n[a || "#" + o] = r;
|
|
1297
|
+
}
|
|
1298
|
+
if (!r) {
|
|
1299
|
+
const o = Object.entries(n).map(
|
|
1300
|
+
([i, c]) => `adapter ${i} ` + (c === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1301
|
+
);
|
|
1302
|
+
let a = e ? o.length > 1 ? `since :
|
|
1303
|
+
` + o.map(He).join(`
|
|
1304
|
+
`) : " " + He(o[0]) : "as no adapter specified";
|
|
1305
|
+
throw new E(
|
|
1306
|
+
"There is no suitable adapter to dispatch the request " + a,
|
|
1307
|
+
"ERR_NOT_SUPPORT"
|
|
1308
|
+
);
|
|
1309
|
+
}
|
|
1310
|
+
return r;
|
|
1311
|
+
},
|
|
1312
|
+
adapters: Re
|
|
1313
|
+
};
|
|
1314
|
+
function me(t) {
|
|
1315
|
+
if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
|
|
1316
|
+
throw new Q(null, t);
|
|
1317
|
+
}
|
|
1318
|
+
function xe(t) {
|
|
1319
|
+
return me(t), t.headers = F.from(t.headers), t.data = fe.call(
|
|
1320
|
+
t,
|
|
1321
|
+
t.transformRequest
|
|
1322
|
+
), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), it.getAdapter(t.adapter || J.adapter)(t).then(function(r) {
|
|
1323
|
+
return me(t), r.data = fe.call(
|
|
1324
|
+
t,
|
|
1325
|
+
t.transformResponse,
|
|
1326
|
+
r
|
|
1327
|
+
), r.headers = F.from(r.headers), r;
|
|
1328
|
+
}, function(r) {
|
|
1329
|
+
return tt(r) || (me(t), r && r.response && (r.response.data = fe.call(
|
|
1330
|
+
t,
|
|
1331
|
+
t.transformResponse,
|
|
1332
|
+
r.response
|
|
1333
|
+
), r.response.headers = F.from(r.response.headers))), Promise.reject(r);
|
|
1334
|
+
});
|
|
1335
|
+
}
|
|
1336
|
+
const ct = "1.10.0", pe = {};
|
|
1337
|
+
["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => {
|
|
1338
|
+
pe[t] = function(r) {
|
|
1339
|
+
return typeof r === t || "a" + (e < 1 ? "n " : " ") + t;
|
|
1340
|
+
};
|
|
1341
|
+
});
|
|
1342
|
+
const Be = {};
|
|
1343
|
+
pe.transitional = function(e, s, r) {
|
|
1344
|
+
function n(o, a) {
|
|
1345
|
+
return "[Axios v" + ct + "] Transitional option '" + o + "'" + a + (r ? ". " + r : "");
|
|
1346
|
+
}
|
|
1347
|
+
return (o, a, i) => {
|
|
1348
|
+
if (e === !1)
|
|
1349
|
+
throw new E(
|
|
1350
|
+
n(a, " has been removed" + (s ? " in " + s : "")),
|
|
1351
|
+
E.ERR_DEPRECATED
|
|
1352
|
+
);
|
|
1353
|
+
return s && !Be[a] && (Be[a] = !0, console.warn(
|
|
1354
|
+
n(
|
|
1355
|
+
a,
|
|
1356
|
+
" has been deprecated since v" + s + " and will be removed in the near future"
|
|
1357
|
+
)
|
|
1358
|
+
)), e ? e(o, a, i) : !0;
|
|
1359
|
+
};
|
|
1360
|
+
};
|
|
1361
|
+
pe.spelling = function(e) {
|
|
1362
|
+
return (s, r) => (console.warn(`${r} is likely a misspelling of ${e}`), !0);
|
|
1363
|
+
};
|
|
1364
|
+
function Hs(t, e, s) {
|
|
1365
|
+
if (typeof t != "object")
|
|
1366
|
+
throw new E("options must be an object", E.ERR_BAD_OPTION_VALUE);
|
|
1367
|
+
const r = Object.keys(t);
|
|
1368
|
+
let n = r.length;
|
|
1369
|
+
for (; n-- > 0; ) {
|
|
1370
|
+
const o = r[n], a = e[o];
|
|
1371
|
+
if (a) {
|
|
1372
|
+
const i = t[o], c = i === void 0 || a(i, o, t);
|
|
1373
|
+
if (c !== !0)
|
|
1374
|
+
throw new E("option " + o + " must be " + c, E.ERR_BAD_OPTION_VALUE);
|
|
1375
|
+
continue;
|
|
1376
|
+
}
|
|
1377
|
+
if (s !== !0)
|
|
1378
|
+
throw new E("Unknown option " + o, E.ERR_BAD_OPTION);
|
|
1379
|
+
}
|
|
1380
|
+
}
|
|
1381
|
+
const se = {
|
|
1382
|
+
assertOptions: Hs,
|
|
1383
|
+
validators: pe
|
|
1384
|
+
}, V = se.validators;
|
|
1385
|
+
let k = class {
|
|
1386
|
+
constructor(e) {
|
|
1387
|
+
this.defaults = e || {}, this.interceptors = {
|
|
1388
|
+
request: new Ne(),
|
|
1389
|
+
response: new Ne()
|
|
1390
|
+
};
|
|
1391
|
+
}
|
|
1392
|
+
/**
|
|
1393
|
+
* Dispatch a request
|
|
1394
|
+
*
|
|
1395
|
+
* @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
|
|
1396
|
+
* @param {?Object} config
|
|
1397
|
+
*
|
|
1398
|
+
* @returns {Promise} The Promise to be fulfilled
|
|
1399
|
+
*/
|
|
1400
|
+
async request(e, s) {
|
|
1401
|
+
try {
|
|
1402
|
+
return await this._request(e, s);
|
|
1403
|
+
} catch (r) {
|
|
1404
|
+
if (r instanceof Error) {
|
|
1405
|
+
let n = {};
|
|
1406
|
+
Error.captureStackTrace ? Error.captureStackTrace(n) : n = new Error();
|
|
1407
|
+
const o = n.stack ? n.stack.replace(/^.+\n/, "") : "";
|
|
1408
|
+
try {
|
|
1409
|
+
r.stack ? o && !String(r.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (r.stack += `
|
|
1410
|
+
` + o) : r.stack = o;
|
|
1411
|
+
} catch {
|
|
1412
|
+
}
|
|
1413
|
+
}
|
|
1414
|
+
throw r;
|
|
1415
|
+
}
|
|
1416
|
+
}
|
|
1417
|
+
_request(e, s) {
|
|
1418
|
+
typeof e == "string" ? (s = s || {}, s.url = e) : s = e || {}, s = v(this.defaults, s);
|
|
1419
|
+
const { transitional: r, paramsSerializer: n, headers: o } = s;
|
|
1420
|
+
r !== void 0 && se.assertOptions(r, {
|
|
1421
|
+
silentJSONParsing: V.transitional(V.boolean),
|
|
1422
|
+
forcedJSONParsing: V.transitional(V.boolean),
|
|
1423
|
+
clarifyTimeoutError: V.transitional(V.boolean)
|
|
1424
|
+
}, !1), n != null && (u.isFunction(n) ? s.paramsSerializer = {
|
|
1425
|
+
serialize: n
|
|
1426
|
+
} : se.assertOptions(n, {
|
|
1427
|
+
encode: V.function,
|
|
1428
|
+
serialize: V.function
|
|
1429
|
+
}, !0)), s.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? s.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : s.allowAbsoluteUrls = !0), se.assertOptions(s, {
|
|
1430
|
+
baseUrl: V.spelling("baseURL"),
|
|
1431
|
+
withXsrfToken: V.spelling("withXSRFToken")
|
|
1432
|
+
}, !0), s.method = (s.method || this.defaults.method || "get").toLowerCase();
|
|
1433
|
+
let a = o && u.merge(
|
|
1434
|
+
o.common,
|
|
1435
|
+
o[s.method]
|
|
1436
|
+
);
|
|
1437
|
+
o && u.forEach(
|
|
1438
|
+
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1439
|
+
(h) => {
|
|
1440
|
+
delete o[h];
|
|
1441
|
+
}
|
|
1442
|
+
), s.headers = F.concat(a, o);
|
|
1443
|
+
const i = [];
|
|
1444
|
+
let c = !0;
|
|
1445
|
+
this.interceptors.request.forEach(function(A) {
|
|
1446
|
+
typeof A.runWhen == "function" && A.runWhen(s) === !1 || (c = c && A.synchronous, i.unshift(A.fulfilled, A.rejected));
|
|
1447
|
+
});
|
|
1448
|
+
const l = [];
|
|
1449
|
+
this.interceptors.response.forEach(function(A) {
|
|
1450
|
+
l.push(A.fulfilled, A.rejected);
|
|
1451
|
+
});
|
|
1452
|
+
let d, p = 0, O;
|
|
1453
|
+
if (!c) {
|
|
1454
|
+
const h = [xe.bind(this), void 0];
|
|
1455
|
+
for (h.unshift.apply(h, i), h.push.apply(h, l), O = h.length, d = Promise.resolve(s); p < O; )
|
|
1456
|
+
d = d.then(h[p++], h[p++]);
|
|
1457
|
+
return d;
|
|
1458
|
+
}
|
|
1459
|
+
O = i.length;
|
|
1460
|
+
let _ = s;
|
|
1461
|
+
for (p = 0; p < O; ) {
|
|
1462
|
+
const h = i[p++], A = i[p++];
|
|
1463
|
+
try {
|
|
1464
|
+
_ = h(_);
|
|
1465
|
+
} catch (f) {
|
|
1466
|
+
A.call(this, f);
|
|
1467
|
+
break;
|
|
1468
|
+
}
|
|
1469
|
+
}
|
|
1470
|
+
try {
|
|
1471
|
+
d = xe.call(this, _);
|
|
1472
|
+
} catch (h) {
|
|
1473
|
+
return Promise.reject(h);
|
|
1474
|
+
}
|
|
1475
|
+
for (p = 0, O = l.length; p < O; )
|
|
1476
|
+
d = d.then(l[p++], l[p++]);
|
|
1477
|
+
return d;
|
|
1478
|
+
}
|
|
1479
|
+
getUri(e) {
|
|
1480
|
+
e = v(this.defaults, e);
|
|
1481
|
+
const s = rt(e.baseURL, e.url, e.allowAbsoluteUrls);
|
|
1482
|
+
return Ye(s, e.params, e.paramsSerializer);
|
|
1483
|
+
}
|
|
1484
|
+
};
|
|
1485
|
+
u.forEach(["delete", "get", "head", "options"], function(e) {
|
|
1486
|
+
k.prototype[e] = function(s, r) {
|
|
1487
|
+
return this.request(v(r || {}, {
|
|
1488
|
+
method: e,
|
|
1489
|
+
url: s,
|
|
1490
|
+
data: (r || {}).data
|
|
1491
|
+
}));
|
|
1492
|
+
};
|
|
1493
|
+
});
|
|
1494
|
+
u.forEach(["post", "put", "patch"], function(e) {
|
|
1495
|
+
function s(r) {
|
|
1496
|
+
return function(o, a, i) {
|
|
1497
|
+
return this.request(v(i || {}, {
|
|
1498
|
+
method: e,
|
|
1499
|
+
headers: r ? {
|
|
1500
|
+
"Content-Type": "multipart/form-data"
|
|
1501
|
+
} : {},
|
|
1502
|
+
url: o,
|
|
1503
|
+
data: a
|
|
1504
|
+
}));
|
|
1505
|
+
};
|
|
1506
|
+
}
|
|
1507
|
+
k.prototype[e] = s(), k.prototype[e + "Form"] = s(!0);
|
|
1508
|
+
});
|
|
1509
|
+
let xs = class lt {
|
|
1510
|
+
constructor(e) {
|
|
1511
|
+
if (typeof e != "function")
|
|
1512
|
+
throw new TypeError("executor must be a function.");
|
|
1513
|
+
let s;
|
|
1514
|
+
this.promise = new Promise(function(o) {
|
|
1515
|
+
s = o;
|
|
1516
|
+
});
|
|
1517
|
+
const r = this;
|
|
1518
|
+
this.promise.then((n) => {
|
|
1519
|
+
if (!r._listeners) return;
|
|
1520
|
+
let o = r._listeners.length;
|
|
1521
|
+
for (; o-- > 0; )
|
|
1522
|
+
r._listeners[o](n);
|
|
1523
|
+
r._listeners = null;
|
|
1524
|
+
}), this.promise.then = (n) => {
|
|
1525
|
+
let o;
|
|
1526
|
+
const a = new Promise((i) => {
|
|
1527
|
+
r.subscribe(i), o = i;
|
|
1528
|
+
}).then(n);
|
|
1529
|
+
return a.cancel = function() {
|
|
1530
|
+
r.unsubscribe(o);
|
|
1531
|
+
}, a;
|
|
1532
|
+
}, e(function(o, a, i) {
|
|
1533
|
+
r.reason || (r.reason = new Q(o, a, i), s(r.reason));
|
|
1534
|
+
});
|
|
1535
|
+
}
|
|
1536
|
+
/**
|
|
1537
|
+
* Throws a `CanceledError` if cancellation has been requested.
|
|
1538
|
+
*/
|
|
1539
|
+
throwIfRequested() {
|
|
1540
|
+
if (this.reason)
|
|
1541
|
+
throw this.reason;
|
|
1542
|
+
}
|
|
1543
|
+
/**
|
|
1544
|
+
* Subscribe to the cancel signal
|
|
1545
|
+
*/
|
|
1546
|
+
subscribe(e) {
|
|
1547
|
+
if (this.reason) {
|
|
1548
|
+
e(this.reason);
|
|
1549
|
+
return;
|
|
1550
|
+
}
|
|
1551
|
+
this._listeners ? this._listeners.push(e) : this._listeners = [e];
|
|
1552
|
+
}
|
|
1553
|
+
/**
|
|
1554
|
+
* Unsubscribe from the cancel signal
|
|
1555
|
+
*/
|
|
1556
|
+
unsubscribe(e) {
|
|
1557
|
+
if (!this._listeners)
|
|
1558
|
+
return;
|
|
1559
|
+
const s = this._listeners.indexOf(e);
|
|
1560
|
+
s !== -1 && this._listeners.splice(s, 1);
|
|
1561
|
+
}
|
|
1562
|
+
toAbortSignal() {
|
|
1563
|
+
const e = new AbortController(), s = (r) => {
|
|
1564
|
+
e.abort(r);
|
|
1565
|
+
};
|
|
1566
|
+
return this.subscribe(s), e.signal.unsubscribe = () => this.unsubscribe(s), e.signal;
|
|
1567
|
+
}
|
|
1568
|
+
/**
|
|
1569
|
+
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
1570
|
+
* cancels the `CancelToken`.
|
|
1571
|
+
*/
|
|
1572
|
+
static source() {
|
|
1573
|
+
let e;
|
|
1574
|
+
return {
|
|
1575
|
+
token: new lt(function(n) {
|
|
1576
|
+
e = n;
|
|
1577
|
+
}),
|
|
1578
|
+
cancel: e
|
|
1579
|
+
};
|
|
1580
|
+
}
|
|
1581
|
+
};
|
|
1582
|
+
function Bs(t) {
|
|
1583
|
+
return function(s) {
|
|
1584
|
+
return t.apply(null, s);
|
|
1585
|
+
};
|
|
1586
|
+
}
|
|
1587
|
+
function Ms(t) {
|
|
1588
|
+
return u.isObject(t) && t.isAxiosError === !0;
|
|
1589
|
+
}
|
|
1590
|
+
const ge = {
|
|
1591
|
+
Continue: 100,
|
|
1592
|
+
SwitchingProtocols: 101,
|
|
1593
|
+
Processing: 102,
|
|
1594
|
+
EarlyHints: 103,
|
|
1595
|
+
Ok: 200,
|
|
1596
|
+
Created: 201,
|
|
1597
|
+
Accepted: 202,
|
|
1598
|
+
NonAuthoritativeInformation: 203,
|
|
1599
|
+
NoContent: 204,
|
|
1600
|
+
ResetContent: 205,
|
|
1601
|
+
PartialContent: 206,
|
|
1602
|
+
MultiStatus: 207,
|
|
1603
|
+
AlreadyReported: 208,
|
|
1604
|
+
ImUsed: 226,
|
|
1605
|
+
MultipleChoices: 300,
|
|
1606
|
+
MovedPermanently: 301,
|
|
1607
|
+
Found: 302,
|
|
1608
|
+
SeeOther: 303,
|
|
1609
|
+
NotModified: 304,
|
|
1610
|
+
UseProxy: 305,
|
|
1611
|
+
Unused: 306,
|
|
1612
|
+
TemporaryRedirect: 307,
|
|
1613
|
+
PermanentRedirect: 308,
|
|
1614
|
+
BadRequest: 400,
|
|
1615
|
+
Unauthorized: 401,
|
|
1616
|
+
PaymentRequired: 402,
|
|
1617
|
+
Forbidden: 403,
|
|
1618
|
+
NotFound: 404,
|
|
1619
|
+
MethodNotAllowed: 405,
|
|
1620
|
+
NotAcceptable: 406,
|
|
1621
|
+
ProxyAuthenticationRequired: 407,
|
|
1622
|
+
RequestTimeout: 408,
|
|
1623
|
+
Conflict: 409,
|
|
1624
|
+
Gone: 410,
|
|
1625
|
+
LengthRequired: 411,
|
|
1626
|
+
PreconditionFailed: 412,
|
|
1627
|
+
PayloadTooLarge: 413,
|
|
1628
|
+
UriTooLong: 414,
|
|
1629
|
+
UnsupportedMediaType: 415,
|
|
1630
|
+
RangeNotSatisfiable: 416,
|
|
1631
|
+
ExpectationFailed: 417,
|
|
1632
|
+
ImATeapot: 418,
|
|
1633
|
+
MisdirectedRequest: 421,
|
|
1634
|
+
UnprocessableEntity: 422,
|
|
1635
|
+
Locked: 423,
|
|
1636
|
+
FailedDependency: 424,
|
|
1637
|
+
TooEarly: 425,
|
|
1638
|
+
UpgradeRequired: 426,
|
|
1639
|
+
PreconditionRequired: 428,
|
|
1640
|
+
TooManyRequests: 429,
|
|
1641
|
+
RequestHeaderFieldsTooLarge: 431,
|
|
1642
|
+
UnavailableForLegalReasons: 451,
|
|
1643
|
+
InternalServerError: 500,
|
|
1644
|
+
NotImplemented: 501,
|
|
1645
|
+
BadGateway: 502,
|
|
1646
|
+
ServiceUnavailable: 503,
|
|
1647
|
+
GatewayTimeout: 504,
|
|
1648
|
+
HttpVersionNotSupported: 505,
|
|
1649
|
+
VariantAlsoNegotiates: 506,
|
|
1650
|
+
InsufficientStorage: 507,
|
|
1651
|
+
LoopDetected: 508,
|
|
1652
|
+
NotExtended: 510,
|
|
1653
|
+
NetworkAuthenticationRequired: 511
|
|
1654
|
+
};
|
|
1655
|
+
Object.entries(ge).forEach(([t, e]) => {
|
|
1656
|
+
ge[e] = t;
|
|
1657
|
+
});
|
|
1658
|
+
function ut(t) {
|
|
1659
|
+
const e = new k(t), s = Me(k.prototype.request, e);
|
|
1660
|
+
return u.extend(s, k.prototype, e, { allOwnKeys: !0 }), u.extend(s, e, null, { allOwnKeys: !0 }), s.create = function(n) {
|
|
1661
|
+
return ut(v(t, n));
|
|
1662
|
+
}, s;
|
|
1663
|
+
}
|
|
1664
|
+
const m = ut(J);
|
|
1665
|
+
m.Axios = k;
|
|
1666
|
+
m.CanceledError = Q;
|
|
1667
|
+
m.CancelToken = xs;
|
|
1668
|
+
m.isCancel = tt;
|
|
1669
|
+
m.VERSION = ct;
|
|
1670
|
+
m.toFormData = ue;
|
|
1671
|
+
m.AxiosError = E;
|
|
1672
|
+
m.Cancel = m.CanceledError;
|
|
1673
|
+
m.all = function(e) {
|
|
1674
|
+
return Promise.all(e);
|
|
1675
|
+
};
|
|
1676
|
+
m.spread = Bs;
|
|
1677
|
+
m.isAxiosError = Ms;
|
|
1678
|
+
m.mergeConfig = v;
|
|
1679
|
+
m.AxiosHeaders = F;
|
|
1680
|
+
m.formToJSON = (t) => et(u.isHTMLForm(t) ? new FormData(t) : t);
|
|
1681
|
+
m.getAdapter = it.getAdapter;
|
|
1682
|
+
m.HttpStatusCode = ge;
|
|
1683
|
+
m.default = m;
|
|
1684
|
+
const {
|
|
1685
|
+
Axios: hr,
|
|
1686
|
+
AxiosError: fr,
|
|
1687
|
+
CanceledError: mr,
|
|
1688
|
+
isCancel: Er,
|
|
1689
|
+
CancelToken: Ar,
|
|
1690
|
+
VERSION: Or,
|
|
1691
|
+
all: yr,
|
|
1692
|
+
Cancel: Sr,
|
|
1693
|
+
isAxiosError: Rr,
|
|
1694
|
+
spread: gr,
|
|
1695
|
+
toFormData: Pr,
|
|
1696
|
+
AxiosHeaders: Tr,
|
|
1697
|
+
HttpStatusCode: Cr,
|
|
1698
|
+
formToJSON: _r,
|
|
1699
|
+
getAdapter: br,
|
|
1700
|
+
mergeConfig: wr
|
|
1701
|
+
} = m, S = "http://localhost:41101".replace(/\/+$/, "");
|
|
1702
|
+
class W {
|
|
1703
|
+
constructor(e, s = S, r = m) {
|
|
1704
|
+
this.basePath = s, this.axios = r, e && (this.configuration = e, this.basePath = e.basePath || this.basePath);
|
|
1705
|
+
}
|
|
1706
|
+
}
|
|
1707
|
+
class js extends Error {
|
|
1708
|
+
constructor(e, s) {
|
|
1709
|
+
super(s), this.field = e, this.name = "RequiredError";
|
|
1710
|
+
}
|
|
1711
|
+
}
|
|
1712
|
+
const R = "https://example.com", y = function(t, e, s) {
|
|
1713
|
+
if (s == null)
|
|
1714
|
+
throw new js(e, `Required parameter ${e} was null or undefined when calling ${t}.`);
|
|
1715
|
+
}, g = function(t, ...e) {
|
|
1716
|
+
const s = new URLSearchParams(t.search);
|
|
1717
|
+
for (const r of e)
|
|
1718
|
+
for (const n in r)
|
|
1719
|
+
if (Array.isArray(r[n])) {
|
|
1720
|
+
s.delete(n);
|
|
1721
|
+
for (const o of r[n])
|
|
1722
|
+
s.append(n, o);
|
|
1723
|
+
} else
|
|
1724
|
+
s.set(n, r[n]);
|
|
1725
|
+
t.search = s.toString();
|
|
1726
|
+
}, D = function(t, e, s) {
|
|
1727
|
+
const r = typeof t != "string";
|
|
1728
|
+
return (r && s && s.isJsonMime ? s.isJsonMime(e.headers["Content-Type"]) : r) ? JSON.stringify(t !== void 0 ? t : {}) : t || "";
|
|
1729
|
+
}, P = function(t) {
|
|
1730
|
+
return t.pathname + t.search + t.hash;
|
|
1731
|
+
}, T = function(t, e, s, r) {
|
|
1732
|
+
return (n = e, o = s) => {
|
|
1733
|
+
const a = { ...t.options, url: ((r == null ? void 0 : r.basePath) || o) + t.url };
|
|
1734
|
+
return n.request(a);
|
|
1735
|
+
};
|
|
1736
|
+
}, ks = function(t) {
|
|
1737
|
+
return {
|
|
1738
|
+
/**
|
|
1739
|
+
* Use the POST `api/detect` endpoint to analyze images, recognize faces in them, and return cropped and aligned portraits of the detected people. The Face Detection feature lets you: - **Check face image quality**: Assess whether a portrait meets certain standards, for example, ICAO, Schengen visa, USA visa. To perform image quality check, use the `processParam.quality` field. - **Evaluate face attributes**: Estimate the age range of a person; check whether the eyes are occluded, closed, or open; detect a facial expression or smile; see if there are glasses, sunglasses, head coverage, medical mask, etc. To evaluate attributes, add the `processParam.attributes` field. You can perform Face Detection in two ways: - By adding parameters manually. In this case, the configuration is not saved and can not be automatically repeated. - By a processing `scenario` that includes certain parameters. You can use predefined scenarios or add custom ones.
|
|
1740
|
+
* @summary detect and check quality
|
|
1741
|
+
* @param {DetectRequest} detectRequest
|
|
1742
|
+
* @param {string} [xRequestID] Request header label.
|
|
1743
|
+
* @param {*} [options] Override http request option.
|
|
1744
|
+
* @throws {RequiredError}
|
|
1745
|
+
*/
|
|
1746
|
+
detect: async (e, s, r = {}) => {
|
|
1747
|
+
y("detect", "detectRequest", e);
|
|
1748
|
+
const n = "/api/detect", o = new URL(n, R);
|
|
1749
|
+
let a;
|
|
1750
|
+
t && (a = t.baseOptions);
|
|
1751
|
+
const i = { method: "POST", ...a, ...r }, c = {}, l = {};
|
|
1752
|
+
s != null && (c["X-RequestID"] = String(s)), c["Content-Type"] = "application/json", g(o, l);
|
|
1753
|
+
let d = a && a.headers ? a.headers : {};
|
|
1754
|
+
return i.headers = { ...c, ...d, ...r.headers }, i.data = D(e, i, t), {
|
|
1755
|
+
url: P(o),
|
|
1756
|
+
options: i
|
|
1757
|
+
};
|
|
1758
|
+
},
|
|
1759
|
+
/**
|
|
1760
|
+
* To perform a comparison of faces in the same image or in two different images, use POST `/api/match`. It\'s possible to compare faces in the same image or in two different images, this is defined by the `images.type` parameter. <br><br> The face detection result is displayed in the `detections` field. Each face is identified by two parameters: `faceIndex` (the index number of the face) and `imageIndex` (the index number of the image on which the face is detected). So, if there are two images each of which has two faces in them, the parameters will be the following: - First face in the first image: `faceIndex: 0`, `imageIndex: 0` - Second face in the first image: `faceIndex: 1`, `imageIndex: 0` - First face of the second image: `faceIndex: 0`, `imageIndex: 1` - Second face in the second image: `faceIndex: 1`, `imageIndex: 1`
|
|
1761
|
+
* @summary compare faces (1:1)
|
|
1762
|
+
* @param {MatchRequest} matchRequest
|
|
1763
|
+
* @param {string} [xRequestID] Request header label.
|
|
1764
|
+
* @param {*} [options] Override http request option.
|
|
1765
|
+
* @throws {RequiredError}
|
|
1766
|
+
*/
|
|
1767
|
+
match: async (e, s, r = {}) => {
|
|
1768
|
+
y("match", "matchRequest", e);
|
|
1769
|
+
const n = "/api/match", o = new URL(n, R);
|
|
1770
|
+
let a;
|
|
1771
|
+
t && (a = t.baseOptions);
|
|
1772
|
+
const i = { method: "POST", ...a, ...r }, c = {}, l = {};
|
|
1773
|
+
s != null && (c["X-RequestID"] = String(s)), c["Content-Type"] = "application/json", g(o, l);
|
|
1774
|
+
let d = a && a.headers ? a.headers : {};
|
|
1775
|
+
return i.headers = { ...c, ...d, ...r.headers }, i.data = D(e, i, t), {
|
|
1776
|
+
url: P(o),
|
|
1777
|
+
options: i
|
|
1778
|
+
};
|
|
1779
|
+
},
|
|
1780
|
+
/**
|
|
1781
|
+
* To compare several images from a document and look up a person in the database in one request, use POST `/api/match_and_search`. In this case, the calculation of the descriptor will be performed only once, as opposed to using two requests for the same operation. If only one person is identified, match is not performed and only search is carried out.
|
|
1782
|
+
* @summary match and search (1:1 + 1:N)
|
|
1783
|
+
* @param {MatchAndSearchRequest} matchAndSearchRequest
|
|
1784
|
+
* @param {string} [xRequestID] Request header label.
|
|
1785
|
+
* @param {*} [options] Override http request option.
|
|
1786
|
+
* @throws {RequiredError}
|
|
1787
|
+
*/
|
|
1788
|
+
matchAndSearch: async (e, s, r = {}) => {
|
|
1789
|
+
y("matchAndSearch", "matchAndSearchRequest", e);
|
|
1790
|
+
const n = "/api/match_and_search", o = new URL(n, R);
|
|
1791
|
+
let a;
|
|
1792
|
+
t && (a = t.baseOptions);
|
|
1793
|
+
const i = { method: "POST", ...a, ...r }, c = {}, l = {};
|
|
1794
|
+
s != null && (c["X-RequestID"] = String(s)), c["Content-Type"] = "application/json", g(o, l);
|
|
1795
|
+
let d = a && a.headers ? a.headers : {};
|
|
1796
|
+
return i.headers = { ...c, ...d, ...r.headers }, i.data = D(e, i, t), {
|
|
1797
|
+
url: P(o),
|
|
1798
|
+
options: i
|
|
1799
|
+
};
|
|
1800
|
+
}
|
|
1801
|
+
};
|
|
1802
|
+
}, Ee = function(t) {
|
|
1803
|
+
const e = ks(t);
|
|
1804
|
+
return {
|
|
1805
|
+
/**
|
|
1806
|
+
* Use the POST `api/detect` endpoint to analyze images, recognize faces in them, and return cropped and aligned portraits of the detected people. The Face Detection feature lets you: - **Check face image quality**: Assess whether a portrait meets certain standards, for example, ICAO, Schengen visa, USA visa. To perform image quality check, use the `processParam.quality` field. - **Evaluate face attributes**: Estimate the age range of a person; check whether the eyes are occluded, closed, or open; detect a facial expression or smile; see if there are glasses, sunglasses, head coverage, medical mask, etc. To evaluate attributes, add the `processParam.attributes` field. You can perform Face Detection in two ways: - By adding parameters manually. In this case, the configuration is not saved and can not be automatically repeated. - By a processing `scenario` that includes certain parameters. You can use predefined scenarios or add custom ones.
|
|
1807
|
+
* @summary detect and check quality
|
|
1808
|
+
* @param {DetectRequest} detectRequest
|
|
1809
|
+
* @param {string} [xRequestID] Request header label.
|
|
1810
|
+
* @param {*} [options] Override http request option.
|
|
1811
|
+
* @throws {RequiredError}
|
|
1812
|
+
*/
|
|
1813
|
+
async detect(s, r, n) {
|
|
1814
|
+
const o = await e.detect(s, r, n);
|
|
1815
|
+
return T(o, m, S, t);
|
|
1816
|
+
},
|
|
1817
|
+
/**
|
|
1818
|
+
* To perform a comparison of faces in the same image or in two different images, use POST `/api/match`. It\'s possible to compare faces in the same image or in two different images, this is defined by the `images.type` parameter. <br><br> The face detection result is displayed in the `detections` field. Each face is identified by two parameters: `faceIndex` (the index number of the face) and `imageIndex` (the index number of the image on which the face is detected). So, if there are two images each of which has two faces in them, the parameters will be the following: - First face in the first image: `faceIndex: 0`, `imageIndex: 0` - Second face in the first image: `faceIndex: 1`, `imageIndex: 0` - First face of the second image: `faceIndex: 0`, `imageIndex: 1` - Second face in the second image: `faceIndex: 1`, `imageIndex: 1`
|
|
1819
|
+
* @summary compare faces (1:1)
|
|
1820
|
+
* @param {MatchRequest} matchRequest
|
|
1821
|
+
* @param {string} [xRequestID] Request header label.
|
|
1822
|
+
* @param {*} [options] Override http request option.
|
|
1823
|
+
* @throws {RequiredError}
|
|
1824
|
+
*/
|
|
1825
|
+
async match(s, r, n) {
|
|
1826
|
+
const o = await e.match(s, r, n);
|
|
1827
|
+
return T(o, m, S, t);
|
|
1828
|
+
},
|
|
1829
|
+
/**
|
|
1830
|
+
* To compare several images from a document and look up a person in the database in one request, use POST `/api/match_and_search`. In this case, the calculation of the descriptor will be performed only once, as opposed to using two requests for the same operation. If only one person is identified, match is not performed and only search is carried out.
|
|
1831
|
+
* @summary match and search (1:1 + 1:N)
|
|
1832
|
+
* @param {MatchAndSearchRequest} matchAndSearchRequest
|
|
1833
|
+
* @param {string} [xRequestID] Request header label.
|
|
1834
|
+
* @param {*} [options] Override http request option.
|
|
1835
|
+
* @throws {RequiredError}
|
|
1836
|
+
*/
|
|
1837
|
+
async matchAndSearch(s, r, n) {
|
|
1838
|
+
const o = await e.matchAndSearch(s, r, n);
|
|
1839
|
+
return T(o, m, S, t);
|
|
1840
|
+
}
|
|
1841
|
+
};
|
|
1842
|
+
};
|
|
1843
|
+
let vs = class extends W {
|
|
1844
|
+
/**
|
|
1845
|
+
* Use the POST `api/detect` endpoint to analyze images, recognize faces in them, and return cropped and aligned portraits of the detected people. The Face Detection feature lets you: - **Check face image quality**: Assess whether a portrait meets certain standards, for example, ICAO, Schengen visa, USA visa. To perform image quality check, use the `processParam.quality` field. - **Evaluate face attributes**: Estimate the age range of a person; check whether the eyes are occluded, closed, or open; detect a facial expression or smile; see if there are glasses, sunglasses, head coverage, medical mask, etc. To evaluate attributes, add the `processParam.attributes` field. You can perform Face Detection in two ways: - By adding parameters manually. In this case, the configuration is not saved and can not be automatically repeated. - By a processing `scenario` that includes certain parameters. You can use predefined scenarios or add custom ones.
|
|
1846
|
+
* @summary detect and check quality
|
|
1847
|
+
* @param {DetectRequest} detectRequest
|
|
1848
|
+
* @param {string} [xRequestID] Request header label.
|
|
1849
|
+
* @param {*} [options] Override http request option.
|
|
1850
|
+
* @throws {RequiredError}
|
|
1851
|
+
* @memberof MatchApi
|
|
1852
|
+
*/
|
|
1853
|
+
detect(e, s, r) {
|
|
1854
|
+
return Ee(this.configuration).detect(e, s, r).then((n) => n(this.axios, this.basePath));
|
|
1855
|
+
}
|
|
1856
|
+
/**
|
|
1857
|
+
* To perform a comparison of faces in the same image or in two different images, use POST `/api/match`. It\'s possible to compare faces in the same image or in two different images, this is defined by the `images.type` parameter. <br><br> The face detection result is displayed in the `detections` field. Each face is identified by two parameters: `faceIndex` (the index number of the face) and `imageIndex` (the index number of the image on which the face is detected). So, if there are two images each of which has two faces in them, the parameters will be the following: - First face in the first image: `faceIndex: 0`, `imageIndex: 0` - Second face in the first image: `faceIndex: 1`, `imageIndex: 0` - First face of the second image: `faceIndex: 0`, `imageIndex: 1` - Second face in the second image: `faceIndex: 1`, `imageIndex: 1`
|
|
1858
|
+
* @summary compare faces (1:1)
|
|
1859
|
+
* @param {MatchRequest} matchRequest
|
|
1860
|
+
* @param {string} [xRequestID] Request header label.
|
|
1861
|
+
* @param {*} [options] Override http request option.
|
|
1862
|
+
* @throws {RequiredError}
|
|
1863
|
+
* @memberof MatchApi
|
|
1864
|
+
*/
|
|
1865
|
+
match(e, s, r) {
|
|
1866
|
+
return Ee(this.configuration).match(e, s, r).then((n) => n(this.axios, this.basePath));
|
|
1867
|
+
}
|
|
1868
|
+
/**
|
|
1869
|
+
* To compare several images from a document and look up a person in the database in one request, use POST `/api/match_and_search`. In this case, the calculation of the descriptor will be performed only once, as opposed to using two requests for the same operation. If only one person is identified, match is not performed and only search is carried out.
|
|
1870
|
+
* @summary match and search (1:1 + 1:N)
|
|
1871
|
+
* @param {MatchAndSearchRequest} matchAndSearchRequest
|
|
1872
|
+
* @param {string} [xRequestID] Request header label.
|
|
1873
|
+
* @param {*} [options] Override http request option.
|
|
1874
|
+
* @throws {RequiredError}
|
|
1875
|
+
* @memberof MatchApi
|
|
1876
|
+
*/
|
|
1877
|
+
matchAndSearch(e, s, r) {
|
|
1878
|
+
return Ee(this.configuration).matchAndSearch(e, s, r).then((n) => n(this.axios, this.basePath));
|
|
1879
|
+
}
|
|
1880
|
+
};
|
|
1881
|
+
const Nr = {
|
|
1882
|
+
AGE: "Age",
|
|
1883
|
+
EMOTION: "Emotion",
|
|
1884
|
+
EYE_LEFT: "EyeLeft",
|
|
1885
|
+
EYE_RIGHT: "EyeRight",
|
|
1886
|
+
SMILE: "Smile",
|
|
1887
|
+
GLASSES: "Glasses",
|
|
1888
|
+
HEAD_COVERING: "HeadCovering",
|
|
1889
|
+
FOREHEAD_COVERING: "ForeheadCovering",
|
|
1890
|
+
MOUTH: "Mouth",
|
|
1891
|
+
MEDICAL_MASK: "MedicalMask",
|
|
1892
|
+
OCCLUSION: "Occlusion",
|
|
1893
|
+
STRONG_MAKEUP: "StrongMakeup",
|
|
1894
|
+
HEADPHONES: "Headphones"
|
|
1895
|
+
}, Lr = {
|
|
1896
|
+
ALIGN_3x4: 0,
|
|
1897
|
+
ALIGN_4x5: 1,
|
|
1898
|
+
ALIGN_2x3: 2,
|
|
1899
|
+
ALIGN_1x1: 3,
|
|
1900
|
+
ALIGN_7x9: 4
|
|
1901
|
+
}, Fr = {
|
|
1902
|
+
IMAGE_CHARACTERISTICS: 1,
|
|
1903
|
+
HEAD_SIZE_AND_POSITIONS: 2,
|
|
1904
|
+
FACE_QUALITY: 3,
|
|
1905
|
+
EYES_CHARACTERISTICS: 4,
|
|
1906
|
+
SHADOWS_AND_LIGHTNING: 5,
|
|
1907
|
+
POSE_AND_EXPRESSION: 6,
|
|
1908
|
+
HEAD_OCCLUSION: 7,
|
|
1909
|
+
BACKGROUND: 8
|
|
1910
|
+
}, Ur = {
|
|
1911
|
+
IMAGE_CHARACTERISTICS: "ImageCharacteristics",
|
|
1912
|
+
HEAD_SIZE_AND_POSITIONS: "HeadSizeAndPosition",
|
|
1913
|
+
FACE_QUALITY: "FaceQuality",
|
|
1914
|
+
EYES_CHARACTERISTICS: "EyesCharacteristics",
|
|
1915
|
+
SHADOWS_AND_LIGHTNING: "ShadowsAndLightning",
|
|
1916
|
+
POSE_AND_EXPRESSION: "PoseAndExpression",
|
|
1917
|
+
HEAD_OCCLUSION: "HeadOcclusion",
|
|
1918
|
+
BACKGROUND: "Background"
|
|
1919
|
+
}, Vr = {
|
|
1920
|
+
QUALITY_STATUS_FALSE: 0,
|
|
1921
|
+
QUALITY_STATUS_TRUE: 1,
|
|
1922
|
+
QUALITY_STATUS_UNDETERMINED: 2
|
|
1923
|
+
}, Dr = {
|
|
1924
|
+
IMAGE_WIDTH: "ImageWidth",
|
|
1925
|
+
IMAGE_HEIGHT: "ImageHeight",
|
|
1926
|
+
IMAGE_WIDTH_TO_HEIGHT: "ImageWidthToHeight",
|
|
1927
|
+
IMAGE_CHANNELS_NUMBER: "ImageChannelsNumber",
|
|
1928
|
+
PADDING_RATIO: "PaddingRatio",
|
|
1929
|
+
FACE_MID_POINT_HORIZONTAL_POSITION: "FaceMidPointHorizontalPosition",
|
|
1930
|
+
FACE_MID_POINT_VERTICAL_POSITION: "FaceMidPointVerticalPosition",
|
|
1931
|
+
HEAD_WIDTH_RATIO: "HeadWidthRatio",
|
|
1932
|
+
HEAD_HEIGHT_RATIO: "HeadHeightRatio",
|
|
1933
|
+
EYES_DISTANCE: "EyesDistance",
|
|
1934
|
+
YAW: "Yaw",
|
|
1935
|
+
PITCH: "Pitch",
|
|
1936
|
+
ROLL: "Roll",
|
|
1937
|
+
BLUR_LEVEL: "BlurLevel",
|
|
1938
|
+
NOISE_LEVEL: "NoiseLevel",
|
|
1939
|
+
EYE_RIGHT_CLOSED: "EyeRightClosed",
|
|
1940
|
+
EYE_LEFT_CLOSED: "EyeLeftClosed",
|
|
1941
|
+
EYE_RIGHT_OCCLUDED: "EyeRightOccluded",
|
|
1942
|
+
EYE_LEFT_OCCLUDED: "EyeLeftOccluded",
|
|
1943
|
+
EYES_RED: "EyesRed",
|
|
1944
|
+
EYE_RIGHT_COVERED_WITH_HAIR: "EyeRightCoveredWithHair",
|
|
1945
|
+
EYE_LEFT_COVERED_WITH_HAIR: "EyeLeftCoveredWithHair",
|
|
1946
|
+
OFF_GAZE: "OffGaze",
|
|
1947
|
+
FACE_DYNAMIC_RANGE: "FaceDynamicRange",
|
|
1948
|
+
UNNATURAL_SKIN_TONE: "UnnaturalSkinTone",
|
|
1949
|
+
TOO_DARK: "TooDark",
|
|
1950
|
+
TOO_LIGHT: "TooLight",
|
|
1951
|
+
FACE_GLARE: "FaceGlare",
|
|
1952
|
+
SHADOWS_ON_FACE: "ShadowsOnFace",
|
|
1953
|
+
DARK_GLASSES: "DarkGlasses",
|
|
1954
|
+
REFLECTION_ON_GLASSES: "ReflectionOnGlasses",
|
|
1955
|
+
FRAMES_TOO_HEAVY: "FramesTooHeavy",
|
|
1956
|
+
FACE_OCCLUDED: "FaceOccluded",
|
|
1957
|
+
HEAD_COVERING: "HeadCovering",
|
|
1958
|
+
BACKGROUND_UNIFORMITY: "BackgroundUniformity",
|
|
1959
|
+
SHADOWS_ON_BACKGROUND: "ShadowsOnBackground",
|
|
1960
|
+
OTHER_FACES: "OtherFaces",
|
|
1961
|
+
SHOULDERS_POSE: "ShouldersPose",
|
|
1962
|
+
EXPRESSION_LEVEL: "ExpressionLevel",
|
|
1963
|
+
MOUTH_OPEN: "MouthOpen",
|
|
1964
|
+
FOREHEAD_COVERING: "ForeheadCovering",
|
|
1965
|
+
SMILE: "Smile",
|
|
1966
|
+
STRONG_MAKEUP: "StrongMakeup",
|
|
1967
|
+
HEADPHONES: "Headphones",
|
|
1968
|
+
MEDICAL_MASK: "MedicalMask",
|
|
1969
|
+
BACKGROUND_COLOR_MATCH: "BackgroundColorMatch",
|
|
1970
|
+
ART_FACE: "ArtFace",
|
|
1971
|
+
CONTACT_LENSES: "ContactLenses"
|
|
1972
|
+
}, Gr = {
|
|
1973
|
+
OLD_MODE: "OldMode",
|
|
1974
|
+
QUALITY_FULL: "QualityFull",
|
|
1975
|
+
QUALITY_ICAO: "QualityICAO",
|
|
1976
|
+
QUALITY_VISA_SCHENGEN: "QualityVisaSchengen",
|
|
1977
|
+
QUALITY_VISA_USA: "QualityVisaUSA",
|
|
1978
|
+
CROP_CENTRAL_FACE: "CropCentralFace",
|
|
1979
|
+
CROP_ALL_FACES: "CropAllFaces",
|
|
1980
|
+
THUMBNAIL: "Thumbnail",
|
|
1981
|
+
EMPTY: ""
|
|
1982
|
+
}, Hr = {
|
|
1983
|
+
FACER_OK: 0,
|
|
1984
|
+
FR_IMAGE_EMPTY: 1,
|
|
1985
|
+
FR_FACE_NOT_DETECTED: 2,
|
|
1986
|
+
FR_LANDMARKS_NOT_DETECTED: 3,
|
|
1987
|
+
FR_FACE_ALIGHNER_FAILED: 4,
|
|
1988
|
+
FR_DESCRIPTOR_EXTRACTOR_ERROR: 5,
|
|
1989
|
+
FR_IMAGE_DECODE_ERROR: 6,
|
|
1990
|
+
FR_INTERNAL_ERROR: 7,
|
|
1991
|
+
FACER_CONFIG_ERROR: 199,
|
|
1992
|
+
FACER_NO_LICENSE: 200,
|
|
1993
|
+
FACER_IS_NOT_INITIALIZED: 201,
|
|
1994
|
+
FACER_COMMAND_IS_NOT_SUPPORTED: 202,
|
|
1995
|
+
FACER_COMMAND_PARAMS_READ_ERROR: 203,
|
|
1996
|
+
FACER_LESS_THAN_TWO_IMAGES_IN_REQUEST: 224,
|
|
1997
|
+
FACER_VIDEO_DECODE_ERROR: 227,
|
|
1998
|
+
FACER_NOT_ENOUGH_FRAMES: 228,
|
|
1999
|
+
FACER_OUTPUT_IS_NOT_DEFINED: 229,
|
|
2000
|
+
FACER_CLOSED_EYES_DETECTED: 230,
|
|
2001
|
+
FACER_LOW_QUALITY: 231,
|
|
2002
|
+
FACER_HIGH_ASYMMETRY: 232,
|
|
2003
|
+
FACER_FACE_OVER_EMOTIONAL: 233,
|
|
2004
|
+
FACER_SUNGLASSES_DETECTED: 234,
|
|
2005
|
+
FACER_SMALL_AGE: 235,
|
|
2006
|
+
FACER_HEADDRESS_DETECTED: 236,
|
|
2007
|
+
FACER_FACES_NOT_MATCHED: 237,
|
|
2008
|
+
FACER_IMAGES_COUNT_LIMIT_EXCEEDED: 238,
|
|
2009
|
+
FACER_MEDICINE_MASK_DETECTED: 239,
|
|
2010
|
+
FACER_OCCLUSION_DETECTED: 240,
|
|
2011
|
+
FACER_FOREHEAD_GLASSES_DETECTED: 242,
|
|
2012
|
+
FACER_MOUTH_OPENED: 243,
|
|
2013
|
+
FACER_ART_MASK_DETECTED: 244,
|
|
2014
|
+
FACER_ELECTRONIC_DEVICE_DETECTED: 245,
|
|
2015
|
+
FACER_TRACK_BREAK: 246,
|
|
2016
|
+
FACER_WRONG_GEO: 247,
|
|
2017
|
+
FACER_WRONG_OF: 248,
|
|
2018
|
+
FACER_WRONG_VIEW: 249,
|
|
2019
|
+
FACER_TIMEOUT_LIVENESS_TRANSACTION: 250,
|
|
2020
|
+
FACER_FAILED_LIVENESS_TRANSACTION: 251,
|
|
2021
|
+
FACER_ABORTED_LIVENESS_TRANSACTION: 252,
|
|
2022
|
+
FACER_GENERAL_ERROR: 253,
|
|
2023
|
+
FACER_PASSIVE_LIVENESS_FAIL: 254
|
|
2024
|
+
}, xr = {
|
|
2025
|
+
IN: "in",
|
|
2026
|
+
NOT_IN: "nin"
|
|
2027
|
+
}, qs = {
|
|
2028
|
+
DOCUMENT_PRINTED: 1,
|
|
2029
|
+
DOCUMENT_RFID: 2,
|
|
2030
|
+
LIVE: 3,
|
|
2031
|
+
DOCUMENT_WITH_LIVE: 4,
|
|
2032
|
+
EXTERNAL: 5,
|
|
2033
|
+
GHOST: 6,
|
|
2034
|
+
BARCODE: 7
|
|
2035
|
+
}, Br = {
|
|
2036
|
+
ACTIVE: 0,
|
|
2037
|
+
PASSIVE: 1
|
|
2038
|
+
};
|
|
2039
|
+
var q = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", $s = typeof Uint8Array > "u" ? [] : new Uint8Array(256);
|
|
2040
|
+
for (var Z = 0; Z < q.length; Z++)
|
|
2041
|
+
$s[q.charCodeAt(Z)] = Z;
|
|
2042
|
+
var oe = function(t) {
|
|
2043
|
+
var e = new Uint8Array(t), s, r = e.length, n = "";
|
|
2044
|
+
for (s = 0; s < r; s += 3)
|
|
2045
|
+
n += q[e[s] >> 2], n += q[(e[s] & 3) << 4 | e[s + 1] >> 4], n += q[(e[s + 1] & 15) << 2 | e[s + 2] >> 6], n += q[e[s + 2] & 63];
|
|
2046
|
+
return r % 3 === 2 ? n = n.substring(0, n.length - 1) + "=" : r % 3 === 1 && (n = n.substring(0, n.length - 2) + "=="), n;
|
|
2047
|
+
};
|
|
2048
|
+
class Qs {
|
|
2049
|
+
constructor(e, s, r) {
|
|
2050
|
+
this.superClass = new vs(e, s, r);
|
|
2051
|
+
}
|
|
2052
|
+
async match(e, s, r) {
|
|
2053
|
+
for (const o of e.images)
|
|
2054
|
+
o.type || (o.type = qs.LIVE), typeof o.data != "string" && (o.data = oe(o.data));
|
|
2055
|
+
return (await this.superClass.match(e, s, r)).data;
|
|
2056
|
+
}
|
|
2057
|
+
async detect(e, s, r) {
|
|
2058
|
+
return e.image && typeof e.image != "string" && (e.image = oe(e.image)), (await this.superClass.detect(e, s, r)).data;
|
|
2059
|
+
}
|
|
2060
|
+
}
|
|
2061
|
+
const Ws = function(t) {
|
|
2062
|
+
return {
|
|
2063
|
+
/**
|
|
2064
|
+
*
|
|
2065
|
+
* @summary Create group
|
|
2066
|
+
* @param {GroupToCreate} groupToCreate Request body for the group to create.
|
|
2067
|
+
* @param {string} [xRequestID] Request header label.
|
|
2068
|
+
* @param {*} [options] Override http request option.
|
|
2069
|
+
* @throws {RequiredError}
|
|
2070
|
+
*/
|
|
2071
|
+
createGroup: async (e, s, r = {}) => {
|
|
2072
|
+
y("createGroup", "groupToCreate", e);
|
|
2073
|
+
const n = "/api/groups", o = new URL(n, R);
|
|
2074
|
+
let a;
|
|
2075
|
+
t && (a = t.baseOptions);
|
|
2076
|
+
const i = { method: "POST", ...a, ...r }, c = {}, l = {};
|
|
2077
|
+
s != null && (c["X-RequestID"] = String(s)), c["Content-Type"] = "application/json", g(o, l);
|
|
2078
|
+
let d = a && a.headers ? a.headers : {};
|
|
2079
|
+
return i.headers = { ...c, ...d, ...r.headers }, i.data = D(e, i, t), {
|
|
2080
|
+
url: P(o),
|
|
2081
|
+
options: i
|
|
2082
|
+
};
|
|
2083
|
+
},
|
|
2084
|
+
/**
|
|
2085
|
+
*
|
|
2086
|
+
* @summary Delete group
|
|
2087
|
+
* @param {string} groupId Group ID.
|
|
2088
|
+
* @param {string} [xRequestID] Request header label.
|
|
2089
|
+
* @param {*} [options] Override http request option.
|
|
2090
|
+
* @throws {RequiredError}
|
|
2091
|
+
*/
|
|
2092
|
+
deleteGroup: async (e, s, r = {}) => {
|
|
2093
|
+
y("deleteGroup", "groupId", e);
|
|
2094
|
+
const n = "/api/groups/{groupId}".replace("{groupId}", encodeURIComponent(String(e))), o = new URL(n, R);
|
|
2095
|
+
let a;
|
|
2096
|
+
t && (a = t.baseOptions);
|
|
2097
|
+
const i = { method: "DELETE", ...a, ...r }, c = {}, l = {};
|
|
2098
|
+
s != null && (c["X-RequestID"] = String(s)), g(o, l);
|
|
2099
|
+
let d = a && a.headers ? a.headers : {};
|
|
2100
|
+
return i.headers = { ...c, ...d, ...r.headers }, {
|
|
2101
|
+
url: P(o),
|
|
2102
|
+
options: i
|
|
2103
|
+
};
|
|
2104
|
+
},
|
|
2105
|
+
/**
|
|
2106
|
+
*
|
|
2107
|
+
* @summary Get groups
|
|
2108
|
+
* @param {number} [page] The page number to get a list of persons or groups.
|
|
2109
|
+
* @param {number} [size] The page size with a list of persons or groups, items.
|
|
2110
|
+
* @param {string} [xRequestID] Request header label.
|
|
2111
|
+
* @param {*} [options] Override http request option.
|
|
2112
|
+
* @throws {RequiredError}
|
|
2113
|
+
*/
|
|
2114
|
+
getAllGroups: async (e, s, r, n = {}) => {
|
|
2115
|
+
const o = "/api/groups", a = new URL(o, R);
|
|
2116
|
+
let i;
|
|
2117
|
+
t && (i = t.baseOptions);
|
|
2118
|
+
const c = { method: "GET", ...i, ...n }, l = {}, d = {};
|
|
2119
|
+
e !== void 0 && (d.page = e), s !== void 0 && (d.size = s), r != null && (l["X-RequestID"] = String(r)), g(a, d);
|
|
2120
|
+
let p = i && i.headers ? i.headers : {};
|
|
2121
|
+
return c.headers = { ...l, ...p, ...n.headers }, {
|
|
2122
|
+
url: P(a),
|
|
2123
|
+
options: c
|
|
2124
|
+
};
|
|
2125
|
+
},
|
|
2126
|
+
/**
|
|
2127
|
+
*
|
|
2128
|
+
* @summary Get group persons
|
|
2129
|
+
* @param {string} groupId Group ID.
|
|
2130
|
+
* @param {number} [page] The page number to get a list of persons or groups.
|
|
2131
|
+
* @param {number} [size] The page size with a list of persons or groups, items.
|
|
2132
|
+
* @param {string} [xRequestID] Request header label.
|
|
2133
|
+
* @param {*} [options] Override http request option.
|
|
2134
|
+
* @throws {RequiredError}
|
|
2135
|
+
*/
|
|
2136
|
+
getAllPersonsByGroupId: async (e, s, r, n, o = {}) => {
|
|
2137
|
+
y("getAllPersonsByGroupId", "groupId", e);
|
|
2138
|
+
const a = "/api/groups/{groupId}/persons".replace("{groupId}", encodeURIComponent(String(e))), i = new URL(a, R);
|
|
2139
|
+
let c;
|
|
2140
|
+
t && (c = t.baseOptions);
|
|
2141
|
+
const l = { method: "GET", ...c, ...o }, d = {}, p = {};
|
|
2142
|
+
s !== void 0 && (p.page = s), r !== void 0 && (p.size = r), n != null && (d["X-RequestID"] = String(n)), g(i, p);
|
|
2143
|
+
let O = c && c.headers ? c.headers : {};
|
|
2144
|
+
return l.headers = { ...d, ...O, ...o.headers }, {
|
|
2145
|
+
url: P(i),
|
|
2146
|
+
options: l
|
|
2147
|
+
};
|
|
2148
|
+
},
|
|
2149
|
+
/**
|
|
2150
|
+
*
|
|
2151
|
+
* @summary Get group
|
|
2152
|
+
* @param {string} groupId Group ID.
|
|
2153
|
+
* @param {string} [xRequestID] Request header label.
|
|
2154
|
+
* @param {*} [options] Override http request option.
|
|
2155
|
+
* @throws {RequiredError}
|
|
2156
|
+
*/
|
|
2157
|
+
getGroup: async (e, s, r = {}) => {
|
|
2158
|
+
y("getGroup", "groupId", e);
|
|
2159
|
+
const n = "/api/groups/{groupId}".replace("{groupId}", encodeURIComponent(String(e))), o = new URL(n, R);
|
|
2160
|
+
let a;
|
|
2161
|
+
t && (a = t.baseOptions);
|
|
2162
|
+
const i = { method: "GET", ...a, ...r }, c = {}, l = {};
|
|
2163
|
+
s != null && (c["X-RequestID"] = String(s)), g(o, l);
|
|
2164
|
+
let d = a && a.headers ? a.headers : {};
|
|
2165
|
+
return i.headers = { ...c, ...d, ...r.headers }, {
|
|
2166
|
+
url: P(o),
|
|
2167
|
+
options: i
|
|
2168
|
+
};
|
|
2169
|
+
},
|
|
2170
|
+
/**
|
|
2171
|
+
*
|
|
2172
|
+
* @summary Update group
|
|
2173
|
+
* @param {string} groupId Group ID.
|
|
2174
|
+
* @param {GroupToCreate} groupToCreate Request body for the group to update.
|
|
2175
|
+
* @param {string} [xRequestID] Request header label.
|
|
2176
|
+
* @param {*} [options] Override http request option.
|
|
2177
|
+
* @throws {RequiredError}
|
|
2178
|
+
*/
|
|
2179
|
+
updateGroup: async (e, s, r, n = {}) => {
|
|
2180
|
+
y("updateGroup", "groupId", e), y("updateGroup", "groupToCreate", s);
|
|
2181
|
+
const o = "/api/groups/{groupId}".replace("{groupId}", encodeURIComponent(String(e))), a = new URL(o, R);
|
|
2182
|
+
let i;
|
|
2183
|
+
t && (i = t.baseOptions);
|
|
2184
|
+
const c = { method: "PUT", ...i, ...n }, l = {}, d = {};
|
|
2185
|
+
r != null && (l["X-RequestID"] = String(r)), l["Content-Type"] = "application/json", g(a, d);
|
|
2186
|
+
let p = i && i.headers ? i.headers : {};
|
|
2187
|
+
return c.headers = { ...l, ...p, ...n.headers }, c.data = D(s, c, t), {
|
|
2188
|
+
url: P(a),
|
|
2189
|
+
options: c
|
|
2190
|
+
};
|
|
2191
|
+
},
|
|
2192
|
+
/**
|
|
2193
|
+
*
|
|
2194
|
+
* @summary Add/remove persons to group
|
|
2195
|
+
* @param {string} groupId Group ID.
|
|
2196
|
+
* @param {UpdateGroup} updateGroup Request body for person IDs to add or remove.
|
|
2197
|
+
* @param {string} [xRequestID] Request header label.
|
|
2198
|
+
* @param {*} [options] Override http request option.
|
|
2199
|
+
* @throws {RequiredError}
|
|
2200
|
+
*/
|
|
2201
|
+
updatePersonsInGroup: async (e, s, r, n = {}) => {
|
|
2202
|
+
y("updatePersonsInGroup", "groupId", e), y("updatePersonsInGroup", "updateGroup", s);
|
|
2203
|
+
const o = "/api/groups/{groupId}/persons".replace("{groupId}", encodeURIComponent(String(e))), a = new URL(o, R);
|
|
2204
|
+
let i;
|
|
2205
|
+
t && (i = t.baseOptions);
|
|
2206
|
+
const c = { method: "PUT", ...i, ...n }, l = {}, d = {};
|
|
2207
|
+
r != null && (l["X-RequestID"] = String(r)), l["Content-Type"] = "application/json", g(a, d);
|
|
2208
|
+
let p = i && i.headers ? i.headers : {};
|
|
2209
|
+
return c.headers = { ...l, ...p, ...n.headers }, c.data = D(s, c, t), {
|
|
2210
|
+
url: P(a),
|
|
2211
|
+
options: c
|
|
2212
|
+
};
|
|
2213
|
+
}
|
|
2214
|
+
};
|
|
2215
|
+
}, M = function(t) {
|
|
2216
|
+
const e = Ws(t);
|
|
2217
|
+
return {
|
|
2218
|
+
/**
|
|
2219
|
+
*
|
|
2220
|
+
* @summary Create group
|
|
2221
|
+
* @param {GroupToCreate} groupToCreate Request body for the group to create.
|
|
2222
|
+
* @param {string} [xRequestID] Request header label.
|
|
2223
|
+
* @param {*} [options] Override http request option.
|
|
2224
|
+
* @throws {RequiredError}
|
|
2225
|
+
*/
|
|
2226
|
+
async createGroup(s, r, n) {
|
|
2227
|
+
const o = await e.createGroup(s, r, n);
|
|
2228
|
+
return T(o, m, S, t);
|
|
2229
|
+
},
|
|
2230
|
+
/**
|
|
2231
|
+
*
|
|
2232
|
+
* @summary Delete group
|
|
2233
|
+
* @param {string} groupId Group ID.
|
|
2234
|
+
* @param {string} [xRequestID] Request header label.
|
|
2235
|
+
* @param {*} [options] Override http request option.
|
|
2236
|
+
* @throws {RequiredError}
|
|
2237
|
+
*/
|
|
2238
|
+
async deleteGroup(s, r, n) {
|
|
2239
|
+
const o = await e.deleteGroup(s, r, n);
|
|
2240
|
+
return T(o, m, S, t);
|
|
2241
|
+
},
|
|
2242
|
+
/**
|
|
2243
|
+
*
|
|
2244
|
+
* @summary Get groups
|
|
2245
|
+
* @param {number} [page] The page number to get a list of persons or groups.
|
|
2246
|
+
* @param {number} [size] The page size with a list of persons or groups, items.
|
|
2247
|
+
* @param {string} [xRequestID] Request header label.
|
|
2248
|
+
* @param {*} [options] Override http request option.
|
|
2249
|
+
* @throws {RequiredError}
|
|
2250
|
+
*/
|
|
2251
|
+
async getAllGroups(s, r, n, o) {
|
|
2252
|
+
const a = await e.getAllGroups(s, r, n, o);
|
|
2253
|
+
return T(a, m, S, t);
|
|
2254
|
+
},
|
|
2255
|
+
/**
|
|
2256
|
+
*
|
|
2257
|
+
* @summary Get group persons
|
|
2258
|
+
* @param {string} groupId Group ID.
|
|
2259
|
+
* @param {number} [page] The page number to get a list of persons or groups.
|
|
2260
|
+
* @param {number} [size] The page size with a list of persons or groups, items.
|
|
2261
|
+
* @param {string} [xRequestID] Request header label.
|
|
2262
|
+
* @param {*} [options] Override http request option.
|
|
2263
|
+
* @throws {RequiredError}
|
|
2264
|
+
*/
|
|
2265
|
+
async getAllPersonsByGroupId(s, r, n, o, a) {
|
|
2266
|
+
const i = await e.getAllPersonsByGroupId(s, r, n, o, a);
|
|
2267
|
+
return T(i, m, S, t);
|
|
2268
|
+
},
|
|
2269
|
+
/**
|
|
2270
|
+
*
|
|
2271
|
+
* @summary Get group
|
|
2272
|
+
* @param {string} groupId Group ID.
|
|
2273
|
+
* @param {string} [xRequestID] Request header label.
|
|
2274
|
+
* @param {*} [options] Override http request option.
|
|
2275
|
+
* @throws {RequiredError}
|
|
2276
|
+
*/
|
|
2277
|
+
async getGroup(s, r, n) {
|
|
2278
|
+
const o = await e.getGroup(s, r, n);
|
|
2279
|
+
return T(o, m, S, t);
|
|
2280
|
+
},
|
|
2281
|
+
/**
|
|
2282
|
+
*
|
|
2283
|
+
* @summary Update group
|
|
2284
|
+
* @param {string} groupId Group ID.
|
|
2285
|
+
* @param {GroupToCreate} groupToCreate Request body for the group to update.
|
|
2286
|
+
* @param {string} [xRequestID] Request header label.
|
|
2287
|
+
* @param {*} [options] Override http request option.
|
|
2288
|
+
* @throws {RequiredError}
|
|
2289
|
+
*/
|
|
2290
|
+
async updateGroup(s, r, n, o) {
|
|
2291
|
+
const a = await e.updateGroup(s, r, n, o);
|
|
2292
|
+
return T(a, m, S, t);
|
|
2293
|
+
},
|
|
2294
|
+
/**
|
|
2295
|
+
*
|
|
2296
|
+
* @summary Add/remove persons to group
|
|
2297
|
+
* @param {string} groupId Group ID.
|
|
2298
|
+
* @param {UpdateGroup} updateGroup Request body for person IDs to add or remove.
|
|
2299
|
+
* @param {string} [xRequestID] Request header label.
|
|
2300
|
+
* @param {*} [options] Override http request option.
|
|
2301
|
+
* @throws {RequiredError}
|
|
2302
|
+
*/
|
|
2303
|
+
async updatePersonsInGroup(s, r, n, o) {
|
|
2304
|
+
const a = await e.updatePersonsInGroup(s, r, n, o);
|
|
2305
|
+
return T(a, m, S, t);
|
|
2306
|
+
}
|
|
2307
|
+
};
|
|
2308
|
+
};
|
|
2309
|
+
let zs = class extends W {
|
|
2310
|
+
/**
|
|
2311
|
+
*
|
|
2312
|
+
* @summary Create group
|
|
2313
|
+
* @param {GroupToCreate} groupToCreate Request body for the group to create.
|
|
2314
|
+
* @param {string} [xRequestID] Request header label.
|
|
2315
|
+
* @param {*} [options] Override http request option.
|
|
2316
|
+
* @throws {RequiredError}
|
|
2317
|
+
* @memberof GroupApi
|
|
2318
|
+
*/
|
|
2319
|
+
createGroup(e, s, r) {
|
|
2320
|
+
return M(this.configuration).createGroup(e, s, r).then((n) => n(this.axios, this.basePath));
|
|
2321
|
+
}
|
|
2322
|
+
/**
|
|
2323
|
+
*
|
|
2324
|
+
* @summary Delete group
|
|
2325
|
+
* @param {string} groupId Group ID.
|
|
2326
|
+
* @param {string} [xRequestID] Request header label.
|
|
2327
|
+
* @param {*} [options] Override http request option.
|
|
2328
|
+
* @throws {RequiredError}
|
|
2329
|
+
* @memberof GroupApi
|
|
2330
|
+
*/
|
|
2331
|
+
deleteGroup(e, s, r) {
|
|
2332
|
+
return M(this.configuration).deleteGroup(e, s, r).then((n) => n(this.axios, this.basePath));
|
|
2333
|
+
}
|
|
2334
|
+
/**
|
|
2335
|
+
*
|
|
2336
|
+
* @summary Get groups
|
|
2337
|
+
* @param {number} [page] The page number to get a list of persons or groups.
|
|
2338
|
+
* @param {number} [size] The page size with a list of persons or groups, items.
|
|
2339
|
+
* @param {string} [xRequestID] Request header label.
|
|
2340
|
+
* @param {*} [options] Override http request option.
|
|
2341
|
+
* @throws {RequiredError}
|
|
2342
|
+
* @memberof GroupApi
|
|
2343
|
+
*/
|
|
2344
|
+
getAllGroups(e, s, r, n) {
|
|
2345
|
+
return M(this.configuration).getAllGroups(e, s, r, n).then((o) => o(this.axios, this.basePath));
|
|
2346
|
+
}
|
|
2347
|
+
/**
|
|
2348
|
+
*
|
|
2349
|
+
* @summary Get group persons
|
|
2350
|
+
* @param {string} groupId Group ID.
|
|
2351
|
+
* @param {number} [page] The page number to get a list of persons or groups.
|
|
2352
|
+
* @param {number} [size] The page size with a list of persons or groups, items.
|
|
2353
|
+
* @param {string} [xRequestID] Request header label.
|
|
2354
|
+
* @param {*} [options] Override http request option.
|
|
2355
|
+
* @throws {RequiredError}
|
|
2356
|
+
* @memberof GroupApi
|
|
2357
|
+
*/
|
|
2358
|
+
getAllPersonsByGroupId(e, s, r, n, o) {
|
|
2359
|
+
return M(this.configuration).getAllPersonsByGroupId(e, s, r, n, o).then((a) => a(this.axios, this.basePath));
|
|
2360
|
+
}
|
|
2361
|
+
/**
|
|
2362
|
+
*
|
|
2363
|
+
* @summary Get group
|
|
2364
|
+
* @param {string} groupId Group ID.
|
|
2365
|
+
* @param {string} [xRequestID] Request header label.
|
|
2366
|
+
* @param {*} [options] Override http request option.
|
|
2367
|
+
* @throws {RequiredError}
|
|
2368
|
+
* @memberof GroupApi
|
|
2369
|
+
*/
|
|
2370
|
+
getGroup(e, s, r) {
|
|
2371
|
+
return M(this.configuration).getGroup(e, s, r).then((n) => n(this.axios, this.basePath));
|
|
2372
|
+
}
|
|
2373
|
+
/**
|
|
2374
|
+
*
|
|
2375
|
+
* @summary Update group
|
|
2376
|
+
* @param {string} groupId Group ID.
|
|
2377
|
+
* @param {GroupToCreate} groupToCreate Request body for the group to update.
|
|
2378
|
+
* @param {string} [xRequestID] Request header label.
|
|
2379
|
+
* @param {*} [options] Override http request option.
|
|
2380
|
+
* @throws {RequiredError}
|
|
2381
|
+
* @memberof GroupApi
|
|
2382
|
+
*/
|
|
2383
|
+
updateGroup(e, s, r, n) {
|
|
2384
|
+
return M(this.configuration).updateGroup(e, s, r, n).then((o) => o(this.axios, this.basePath));
|
|
2385
|
+
}
|
|
2386
|
+
/**
|
|
2387
|
+
*
|
|
2388
|
+
* @summary Add/remove persons to group
|
|
2389
|
+
* @param {string} groupId Group ID.
|
|
2390
|
+
* @param {UpdateGroup} updateGroup Request body for person IDs to add or remove.
|
|
2391
|
+
* @param {string} [xRequestID] Request header label.
|
|
2392
|
+
* @param {*} [options] Override http request option.
|
|
2393
|
+
* @throws {RequiredError}
|
|
2394
|
+
* @memberof GroupApi
|
|
2395
|
+
*/
|
|
2396
|
+
updatePersonsInGroup(e, s, r, n) {
|
|
2397
|
+
return M(this.configuration).updatePersonsInGroup(e, s, r, n).then((o) => o(this.axios, this.basePath));
|
|
2398
|
+
}
|
|
2399
|
+
};
|
|
2400
|
+
class Ks {
|
|
2401
|
+
constructor(e, s, r) {
|
|
2402
|
+
this.superClass = new zs(e, s, r);
|
|
2403
|
+
}
|
|
2404
|
+
async createGroup(e, s, r) {
|
|
2405
|
+
const n = {
|
|
2406
|
+
...e,
|
|
2407
|
+
metadata: e != null && e.metadata ? e.metadata : {}
|
|
2408
|
+
};
|
|
2409
|
+
return (await this.superClass.createGroup(n, s, r)).data;
|
|
2410
|
+
}
|
|
2411
|
+
async deleteGroup(e, s, r) {
|
|
2412
|
+
await this.superClass.deleteGroup(e, s, r);
|
|
2413
|
+
}
|
|
2414
|
+
async getAllGroups(e, s, r, n) {
|
|
2415
|
+
return (await this.superClass.getAllGroups(e, s, r, n)).data;
|
|
2416
|
+
}
|
|
2417
|
+
async getAllPersonsByGroupId(e, s, r, n, o) {
|
|
2418
|
+
return (await this.superClass.getAllPersonsByGroupId(r, e, s, n, o)).data;
|
|
2419
|
+
}
|
|
2420
|
+
async getGroup(e, s, r) {
|
|
2421
|
+
return (await this.superClass.getGroup(e, s, r)).data;
|
|
2422
|
+
}
|
|
2423
|
+
async updateGroup(e, s, r, n) {
|
|
2424
|
+
await this.superClass.updateGroup(e, s, r, n);
|
|
2425
|
+
}
|
|
2426
|
+
async updatePersonsInGroup(e, s, r, n) {
|
|
2427
|
+
await this.superClass.updatePersonsInGroup(e, s, r, n);
|
|
2428
|
+
}
|
|
2429
|
+
}
|
|
2430
|
+
const Xs = function(t) {
|
|
2431
|
+
return {
|
|
2432
|
+
/**
|
|
2433
|
+
*
|
|
2434
|
+
* @summary Add person image
|
|
2435
|
+
* @param {string} personId Person ID.
|
|
2436
|
+
* @param {AddImageToPersonRequest} addImageToPersonRequest Image to add.
|
|
2437
|
+
* @param {string} [xRequestID] Request header label.
|
|
2438
|
+
* @param {*} [options] Override http request option.
|
|
2439
|
+
* @throws {RequiredError}
|
|
2440
|
+
*/
|
|
2441
|
+
addImageToPerson: async (e, s, r, n = {}) => {
|
|
2442
|
+
y("addImageToPerson", "personId", e), y("addImageToPerson", "addImageToPersonRequest", s);
|
|
2443
|
+
const o = "/api/persons/{personId}/images".replace("{personId}", encodeURIComponent(String(e))), a = new URL(o, R);
|
|
2444
|
+
let i;
|
|
2445
|
+
t && (i = t.baseOptions);
|
|
2446
|
+
const c = { method: "POST", ...i, ...n }, l = {}, d = {};
|
|
2447
|
+
r != null && (l["X-RequestID"] = String(r)), l["Content-Type"] = "application/json", g(a, d);
|
|
2448
|
+
let p = i && i.headers ? i.headers : {};
|
|
2449
|
+
return c.headers = { ...l, ...p, ...n.headers }, c.data = D(s, c, t), {
|
|
2450
|
+
url: P(a),
|
|
2451
|
+
options: c
|
|
2452
|
+
};
|
|
2453
|
+
},
|
|
2454
|
+
/**
|
|
2455
|
+
*
|
|
2456
|
+
* @summary Create person
|
|
2457
|
+
* @param {PersonFields} personFields
|
|
2458
|
+
* @param {string} [xRequestID] Request header label.
|
|
2459
|
+
* @param {*} [options] Override http request option.
|
|
2460
|
+
* @throws {RequiredError}
|
|
2461
|
+
*/
|
|
2462
|
+
createPerson: async (e, s, r = {}) => {
|
|
2463
|
+
y("createPerson", "personFields", e);
|
|
2464
|
+
const n = "/api/persons", o = new URL(n, R);
|
|
2465
|
+
let a;
|
|
2466
|
+
t && (a = t.baseOptions);
|
|
2467
|
+
const i = { method: "POST", ...a, ...r }, c = {}, l = {};
|
|
2468
|
+
s != null && (c["X-RequestID"] = String(s)), c["Content-Type"] = "application/json", g(o, l);
|
|
2469
|
+
let d = a && a.headers ? a.headers : {};
|
|
2470
|
+
return i.headers = { ...c, ...d, ...r.headers }, i.data = D(e, i, t), {
|
|
2471
|
+
url: P(o),
|
|
2472
|
+
options: i
|
|
2473
|
+
};
|
|
2474
|
+
},
|
|
2475
|
+
/**
|
|
2476
|
+
*
|
|
2477
|
+
* @summary Delete image of person
|
|
2478
|
+
* @param {string} imageId Image ID.
|
|
2479
|
+
* @param {string} personId Person ID.
|
|
2480
|
+
* @param {string} [xRequestID] Request header label.
|
|
2481
|
+
* @param {*} [options] Override http request option.
|
|
2482
|
+
* @throws {RequiredError}
|
|
2483
|
+
*/
|
|
2484
|
+
deleteImageOfPerson: async (e, s, r, n = {}) => {
|
|
2485
|
+
y("deleteImageOfPerson", "imageId", e), y("deleteImageOfPerson", "personId", s);
|
|
2486
|
+
const o = "/api/persons/{personId}/images/{imageId}".replace("{imageId}", encodeURIComponent(String(e))).replace("{personId}", encodeURIComponent(String(s))), a = new URL(o, R);
|
|
2487
|
+
let i;
|
|
2488
|
+
t && (i = t.baseOptions);
|
|
2489
|
+
const c = { method: "DELETE", ...i, ...n }, l = {}, d = {};
|
|
2490
|
+
r != null && (l["X-RequestID"] = String(r)), g(a, d);
|
|
2491
|
+
let p = i && i.headers ? i.headers : {};
|
|
2492
|
+
return c.headers = { ...l, ...p, ...n.headers }, {
|
|
2493
|
+
url: P(a),
|
|
2494
|
+
options: c
|
|
2495
|
+
};
|
|
2496
|
+
},
|
|
2497
|
+
/**
|
|
2498
|
+
*
|
|
2499
|
+
* @summary Delete person
|
|
2500
|
+
* @param {string} personId Person ID.
|
|
2501
|
+
* @param {string} [xRequestID] Request header label.
|
|
2502
|
+
* @param {*} [options] Override http request option.
|
|
2503
|
+
* @throws {RequiredError}
|
|
2504
|
+
*/
|
|
2505
|
+
deletePerson: async (e, s, r = {}) => {
|
|
2506
|
+
y("deletePerson", "personId", e);
|
|
2507
|
+
const n = "/api/persons/{personId}".replace("{personId}", encodeURIComponent(String(e))), o = new URL(n, R);
|
|
2508
|
+
let a;
|
|
2509
|
+
t && (a = t.baseOptions);
|
|
2510
|
+
const i = { method: "DELETE", ...a, ...r }, c = {}, l = {};
|
|
2511
|
+
s != null && (c["X-RequestID"] = String(s)), g(o, l);
|
|
2512
|
+
let d = a && a.headers ? a.headers : {};
|
|
2513
|
+
return i.headers = { ...c, ...d, ...r.headers }, {
|
|
2514
|
+
url: P(o),
|
|
2515
|
+
options: i
|
|
2516
|
+
};
|
|
2517
|
+
},
|
|
2518
|
+
/**
|
|
2519
|
+
*
|
|
2520
|
+
* @summary Get person groups
|
|
2521
|
+
* @param {string} personId Person ID.
|
|
2522
|
+
* @param {number} [page] The page number to get a list of persons or groups.
|
|
2523
|
+
* @param {number} [size] The page size with a list of persons or groups, items.
|
|
2524
|
+
* @param {string} [xRequestID] Request header label.
|
|
2525
|
+
* @param {*} [options] Override http request option.
|
|
2526
|
+
* @throws {RequiredError}
|
|
2527
|
+
*/
|
|
2528
|
+
getAllGroupsByPersonId: async (e, s, r, n, o = {}) => {
|
|
2529
|
+
y("getAllGroupsByPersonId", "personId", e);
|
|
2530
|
+
const a = "/api/persons/{personId}/groups".replace("{personId}", encodeURIComponent(String(e))), i = new URL(a, R);
|
|
2531
|
+
let c;
|
|
2532
|
+
t && (c = t.baseOptions);
|
|
2533
|
+
const l = { method: "GET", ...c, ...o }, d = {}, p = {};
|
|
2534
|
+
s !== void 0 && (p.page = s), r !== void 0 && (p.size = r), n != null && (d["X-RequestID"] = String(n)), g(i, p);
|
|
2535
|
+
let O = c && c.headers ? c.headers : {};
|
|
2536
|
+
return l.headers = { ...d, ...O, ...o.headers }, {
|
|
2537
|
+
url: P(i),
|
|
2538
|
+
options: l
|
|
2539
|
+
};
|
|
2540
|
+
},
|
|
2541
|
+
/**
|
|
2542
|
+
*
|
|
2543
|
+
* @summary Get person images
|
|
2544
|
+
* @param {string} personId Person ID.
|
|
2545
|
+
* @param {number} [page] The page number to get a list of persons or groups.
|
|
2546
|
+
* @param {number} [size] The page size with a list of persons or groups, items.
|
|
2547
|
+
* @param {string} [xRequestID] Request header label.
|
|
2548
|
+
* @param {*} [options] Override http request option.
|
|
2549
|
+
* @throws {RequiredError}
|
|
2550
|
+
*/
|
|
2551
|
+
getAllImagesByPersonId: async (e, s, r, n, o = {}) => {
|
|
2552
|
+
y("getAllImagesByPersonId", "personId", e);
|
|
2553
|
+
const a = "/api/persons/{personId}/images".replace("{personId}", encodeURIComponent(String(e))), i = new URL(a, R);
|
|
2554
|
+
let c;
|
|
2555
|
+
t && (c = t.baseOptions);
|
|
2556
|
+
const l = { method: "GET", ...c, ...o }, d = {}, p = {};
|
|
2557
|
+
s !== void 0 && (p.page = s), r !== void 0 && (p.size = r), n != null && (d["X-RequestID"] = String(n)), g(i, p);
|
|
2558
|
+
let O = c && c.headers ? c.headers : {};
|
|
2559
|
+
return l.headers = { ...d, ...O, ...o.headers }, {
|
|
2560
|
+
url: P(i),
|
|
2561
|
+
options: l
|
|
2562
|
+
};
|
|
2563
|
+
},
|
|
2564
|
+
/**
|
|
2565
|
+
*
|
|
2566
|
+
* @summary Get person image by id
|
|
2567
|
+
* @param {string} imageId Image ID.
|
|
2568
|
+
* @param {string} personId Person ID.
|
|
2569
|
+
* @param {string} [xRequestID] Request header label.
|
|
2570
|
+
* @param {*} [options] Override http request option.
|
|
2571
|
+
* @throws {RequiredError}
|
|
2572
|
+
*/
|
|
2573
|
+
getImageOfPerson: async (e, s, r, n = {}) => {
|
|
2574
|
+
y("getImageOfPerson", "imageId", e), y("getImageOfPerson", "personId", s);
|
|
2575
|
+
const o = "/api/persons/{personId}/images/{imageId}".replace("{imageId}", encodeURIComponent(String(e))).replace("{personId}", encodeURIComponent(String(s))), a = new URL(o, R);
|
|
2576
|
+
let i;
|
|
2577
|
+
t && (i = t.baseOptions);
|
|
2578
|
+
const c = { method: "GET", ...i, ...n }, l = {}, d = {};
|
|
2579
|
+
r != null && (l["X-RequestID"] = String(r)), g(a, d);
|
|
2580
|
+
let p = i && i.headers ? i.headers : {};
|
|
2581
|
+
return c.headers = { ...l, ...p, ...n.headers }, {
|
|
2582
|
+
url: P(a),
|
|
2583
|
+
options: c
|
|
2584
|
+
};
|
|
2585
|
+
},
|
|
2586
|
+
/**
|
|
2587
|
+
*
|
|
2588
|
+
* @summary Get person
|
|
2589
|
+
* @param {string} personId Person ID.
|
|
2590
|
+
* @param {string} [xRequestID] Request header label.
|
|
2591
|
+
* @param {*} [options] Override http request option.
|
|
2592
|
+
* @throws {RequiredError}
|
|
2593
|
+
*/
|
|
2594
|
+
getPerson: async (e, s, r = {}) => {
|
|
2595
|
+
y("getPerson", "personId", e);
|
|
2596
|
+
const n = "/api/persons/{personId}".replace("{personId}", encodeURIComponent(String(e))), o = new URL(n, R);
|
|
2597
|
+
let a;
|
|
2598
|
+
t && (a = t.baseOptions);
|
|
2599
|
+
const i = { method: "GET", ...a, ...r }, c = {}, l = {};
|
|
2600
|
+
s != null && (c["X-RequestID"] = String(s)), g(o, l);
|
|
2601
|
+
let d = a && a.headers ? a.headers : {};
|
|
2602
|
+
return i.headers = { ...c, ...d, ...r.headers }, {
|
|
2603
|
+
url: P(o),
|
|
2604
|
+
options: i
|
|
2605
|
+
};
|
|
2606
|
+
},
|
|
2607
|
+
/**
|
|
2608
|
+
*
|
|
2609
|
+
* @summary Update person
|
|
2610
|
+
* @param {string} personId Person ID.
|
|
2611
|
+
* @param {PersonToUpdateFields} personToUpdateFields Request body for the Person to update.
|
|
2612
|
+
* @param {string} [xRequestID] Request header label.
|
|
2613
|
+
* @param {*} [options] Override http request option.
|
|
2614
|
+
* @throws {RequiredError}
|
|
2615
|
+
*/
|
|
2616
|
+
updatePerson: async (e, s, r, n = {}) => {
|
|
2617
|
+
y("updatePerson", "personId", e), y("updatePerson", "personToUpdateFields", s);
|
|
2618
|
+
const o = "/api/persons/{personId}".replace("{personId}", encodeURIComponent(String(e))), a = new URL(o, R);
|
|
2619
|
+
let i;
|
|
2620
|
+
t && (i = t.baseOptions);
|
|
2621
|
+
const c = { method: "PUT", ...i, ...n }, l = {}, d = {};
|
|
2622
|
+
r != null && (l["X-RequestID"] = String(r)), l["Content-Type"] = "application/json", g(a, d);
|
|
2623
|
+
let p = i && i.headers ? i.headers : {};
|
|
2624
|
+
return c.headers = { ...l, ...p, ...n.headers }, c.data = D(s, c, t), {
|
|
2625
|
+
url: P(a),
|
|
2626
|
+
options: c
|
|
2627
|
+
};
|
|
2628
|
+
}
|
|
2629
|
+
};
|
|
2630
|
+
}, H = function(t) {
|
|
2631
|
+
const e = Xs(t);
|
|
2632
|
+
return {
|
|
2633
|
+
/**
|
|
2634
|
+
*
|
|
2635
|
+
* @summary Add person image
|
|
2636
|
+
* @param {string} personId Person ID.
|
|
2637
|
+
* @param {AddImageToPersonRequest} addImageToPersonRequest Image to add.
|
|
2638
|
+
* @param {string} [xRequestID] Request header label.
|
|
2639
|
+
* @param {*} [options] Override http request option.
|
|
2640
|
+
* @throws {RequiredError}
|
|
2641
|
+
*/
|
|
2642
|
+
async addImageToPerson(s, r, n, o) {
|
|
2643
|
+
const a = await e.addImageToPerson(s, r, n, o);
|
|
2644
|
+
return T(a, m, S, t);
|
|
2645
|
+
},
|
|
2646
|
+
/**
|
|
2647
|
+
*
|
|
2648
|
+
* @summary Create person
|
|
2649
|
+
* @param {PersonFields} personFields
|
|
2650
|
+
* @param {string} [xRequestID] Request header label.
|
|
2651
|
+
* @param {*} [options] Override http request option.
|
|
2652
|
+
* @throws {RequiredError}
|
|
2653
|
+
*/
|
|
2654
|
+
async createPerson(s, r, n) {
|
|
2655
|
+
const o = await e.createPerson(s, r, n);
|
|
2656
|
+
return T(o, m, S, t);
|
|
2657
|
+
},
|
|
2658
|
+
/**
|
|
2659
|
+
*
|
|
2660
|
+
* @summary Delete image of person
|
|
2661
|
+
* @param {string} imageId Image ID.
|
|
2662
|
+
* @param {string} personId Person ID.
|
|
2663
|
+
* @param {string} [xRequestID] Request header label.
|
|
2664
|
+
* @param {*} [options] Override http request option.
|
|
2665
|
+
* @throws {RequiredError}
|
|
2666
|
+
*/
|
|
2667
|
+
async deleteImageOfPerson(s, r, n, o) {
|
|
2668
|
+
const a = await e.deleteImageOfPerson(s, r, n, o);
|
|
2669
|
+
return T(a, m, S, t);
|
|
2670
|
+
},
|
|
2671
|
+
/**
|
|
2672
|
+
*
|
|
2673
|
+
* @summary Delete person
|
|
2674
|
+
* @param {string} personId Person ID.
|
|
2675
|
+
* @param {string} [xRequestID] Request header label.
|
|
2676
|
+
* @param {*} [options] Override http request option.
|
|
2677
|
+
* @throws {RequiredError}
|
|
2678
|
+
*/
|
|
2679
|
+
async deletePerson(s, r, n) {
|
|
2680
|
+
const o = await e.deletePerson(s, r, n);
|
|
2681
|
+
return T(o, m, S, t);
|
|
2682
|
+
},
|
|
2683
|
+
/**
|
|
2684
|
+
*
|
|
2685
|
+
* @summary Get person groups
|
|
2686
|
+
* @param {string} personId Person ID.
|
|
2687
|
+
* @param {number} [page] The page number to get a list of persons or groups.
|
|
2688
|
+
* @param {number} [size] The page size with a list of persons or groups, items.
|
|
2689
|
+
* @param {string} [xRequestID] Request header label.
|
|
2690
|
+
* @param {*} [options] Override http request option.
|
|
2691
|
+
* @throws {RequiredError}
|
|
2692
|
+
*/
|
|
2693
|
+
async getAllGroupsByPersonId(s, r, n, o, a) {
|
|
2694
|
+
const i = await e.getAllGroupsByPersonId(s, r, n, o, a);
|
|
2695
|
+
return T(i, m, S, t);
|
|
2696
|
+
},
|
|
2697
|
+
/**
|
|
2698
|
+
*
|
|
2699
|
+
* @summary Get person images
|
|
2700
|
+
* @param {string} personId Person ID.
|
|
2701
|
+
* @param {number} [page] The page number to get a list of persons or groups.
|
|
2702
|
+
* @param {number} [size] The page size with a list of persons or groups, items.
|
|
2703
|
+
* @param {string} [xRequestID] Request header label.
|
|
2704
|
+
* @param {*} [options] Override http request option.
|
|
2705
|
+
* @throws {RequiredError}
|
|
2706
|
+
*/
|
|
2707
|
+
async getAllImagesByPersonId(s, r, n, o, a) {
|
|
2708
|
+
const i = await e.getAllImagesByPersonId(s, r, n, o, a);
|
|
2709
|
+
return T(i, m, S, t);
|
|
2710
|
+
},
|
|
2711
|
+
/**
|
|
2712
|
+
*
|
|
2713
|
+
* @summary Get person image by id
|
|
2714
|
+
* @param {string} imageId Image ID.
|
|
2715
|
+
* @param {string} personId Person ID.
|
|
2716
|
+
* @param {string} [xRequestID] Request header label.
|
|
2717
|
+
* @param {*} [options] Override http request option.
|
|
2718
|
+
* @throws {RequiredError}
|
|
2719
|
+
*/
|
|
2720
|
+
async getImageOfPerson(s, r, n, o) {
|
|
2721
|
+
const a = await e.getImageOfPerson(s, r, n, o);
|
|
2722
|
+
return T(a, m, S, t);
|
|
2723
|
+
},
|
|
2724
|
+
/**
|
|
2725
|
+
*
|
|
2726
|
+
* @summary Get person
|
|
2727
|
+
* @param {string} personId Person ID.
|
|
2728
|
+
* @param {string} [xRequestID] Request header label.
|
|
2729
|
+
* @param {*} [options] Override http request option.
|
|
2730
|
+
* @throws {RequiredError}
|
|
2731
|
+
*/
|
|
2732
|
+
async getPerson(s, r, n) {
|
|
2733
|
+
const o = await e.getPerson(s, r, n);
|
|
2734
|
+
return T(o, m, S, t);
|
|
2735
|
+
},
|
|
2736
|
+
/**
|
|
2737
|
+
*
|
|
2738
|
+
* @summary Update person
|
|
2739
|
+
* @param {string} personId Person ID.
|
|
2740
|
+
* @param {PersonToUpdateFields} personToUpdateFields Request body for the Person to update.
|
|
2741
|
+
* @param {string} [xRequestID] Request header label.
|
|
2742
|
+
* @param {*} [options] Override http request option.
|
|
2743
|
+
* @throws {RequiredError}
|
|
2744
|
+
*/
|
|
2745
|
+
async updatePerson(s, r, n, o) {
|
|
2746
|
+
const a = await e.updatePerson(s, r, n, o);
|
|
2747
|
+
return T(a, m, S, t);
|
|
2748
|
+
}
|
|
2749
|
+
};
|
|
2750
|
+
};
|
|
2751
|
+
let Js = class extends W {
|
|
2752
|
+
/**
|
|
2753
|
+
*
|
|
2754
|
+
* @summary Add person image
|
|
2755
|
+
* @param {string} personId Person ID.
|
|
2756
|
+
* @param {AddImageToPersonRequest} addImageToPersonRequest Image to add.
|
|
2757
|
+
* @param {string} [xRequestID] Request header label.
|
|
2758
|
+
* @param {*} [options] Override http request option.
|
|
2759
|
+
* @throws {RequiredError}
|
|
2760
|
+
* @memberof PersonApi
|
|
2761
|
+
*/
|
|
2762
|
+
addImageToPerson(e, s, r, n) {
|
|
2763
|
+
return H(this.configuration).addImageToPerson(e, s, r, n).then((o) => o(this.axios, this.basePath));
|
|
2764
|
+
}
|
|
2765
|
+
/**
|
|
2766
|
+
*
|
|
2767
|
+
* @summary Create person
|
|
2768
|
+
* @param {PersonFields} personFields
|
|
2769
|
+
* @param {string} [xRequestID] Request header label.
|
|
2770
|
+
* @param {*} [options] Override http request option.
|
|
2771
|
+
* @throws {RequiredError}
|
|
2772
|
+
* @memberof PersonApi
|
|
2773
|
+
*/
|
|
2774
|
+
createPerson(e, s, r) {
|
|
2775
|
+
return H(this.configuration).createPerson(e, s, r).then((n) => n(this.axios, this.basePath));
|
|
2776
|
+
}
|
|
2777
|
+
/**
|
|
2778
|
+
*
|
|
2779
|
+
* @summary Delete image of person
|
|
2780
|
+
* @param {string} imageId Image ID.
|
|
2781
|
+
* @param {string} personId Person ID.
|
|
2782
|
+
* @param {string} [xRequestID] Request header label.
|
|
2783
|
+
* @param {*} [options] Override http request option.
|
|
2784
|
+
* @throws {RequiredError}
|
|
2785
|
+
* @memberof PersonApi
|
|
2786
|
+
*/
|
|
2787
|
+
deleteImageOfPerson(e, s, r, n) {
|
|
2788
|
+
return H(this.configuration).deleteImageOfPerson(e, s, r, n).then((o) => o(this.axios, this.basePath));
|
|
2789
|
+
}
|
|
2790
|
+
/**
|
|
2791
|
+
*
|
|
2792
|
+
* @summary Delete person
|
|
2793
|
+
* @param {string} personId Person ID.
|
|
2794
|
+
* @param {string} [xRequestID] Request header label.
|
|
2795
|
+
* @param {*} [options] Override http request option.
|
|
2796
|
+
* @throws {RequiredError}
|
|
2797
|
+
* @memberof PersonApi
|
|
2798
|
+
*/
|
|
2799
|
+
deletePerson(e, s, r) {
|
|
2800
|
+
return H(this.configuration).deletePerson(e, s, r).then((n) => n(this.axios, this.basePath));
|
|
2801
|
+
}
|
|
2802
|
+
/**
|
|
2803
|
+
*
|
|
2804
|
+
* @summary Get person groups
|
|
2805
|
+
* @param {string} personId Person ID.
|
|
2806
|
+
* @param {number} [page] The page number to get a list of persons or groups.
|
|
2807
|
+
* @param {number} [size] The page size with a list of persons or groups, items.
|
|
2808
|
+
* @param {string} [xRequestID] Request header label.
|
|
2809
|
+
* @param {*} [options] Override http request option.
|
|
2810
|
+
* @throws {RequiredError}
|
|
2811
|
+
* @memberof PersonApi
|
|
2812
|
+
*/
|
|
2813
|
+
getAllGroupsByPersonId(e, s, r, n, o) {
|
|
2814
|
+
return H(this.configuration).getAllGroupsByPersonId(e, s, r, n, o).then((a) => a(this.axios, this.basePath));
|
|
2815
|
+
}
|
|
2816
|
+
/**
|
|
2817
|
+
*
|
|
2818
|
+
* @summary Get person images
|
|
2819
|
+
* @param {string} personId Person ID.
|
|
2820
|
+
* @param {number} [page] The page number to get a list of persons or groups.
|
|
2821
|
+
* @param {number} [size] The page size with a list of persons or groups, items.
|
|
2822
|
+
* @param {string} [xRequestID] Request header label.
|
|
2823
|
+
* @param {*} [options] Override http request option.
|
|
2824
|
+
* @throws {RequiredError}
|
|
2825
|
+
* @memberof PersonApi
|
|
2826
|
+
*/
|
|
2827
|
+
getAllImagesByPersonId(e, s, r, n, o) {
|
|
2828
|
+
return H(this.configuration).getAllImagesByPersonId(e, s, r, n, o).then((a) => a(this.axios, this.basePath));
|
|
2829
|
+
}
|
|
2830
|
+
/**
|
|
2831
|
+
*
|
|
2832
|
+
* @summary Get person image by id
|
|
2833
|
+
* @param {string} imageId Image ID.
|
|
2834
|
+
* @param {string} personId Person ID.
|
|
2835
|
+
* @param {string} [xRequestID] Request header label.
|
|
2836
|
+
* @param {*} [options] Override http request option.
|
|
2837
|
+
* @throws {RequiredError}
|
|
2838
|
+
* @memberof PersonApi
|
|
2839
|
+
*/
|
|
2840
|
+
getImageOfPerson(e, s, r, n) {
|
|
2841
|
+
return H(this.configuration).getImageOfPerson(e, s, r, n).then((o) => o(this.axios, this.basePath));
|
|
2842
|
+
}
|
|
2843
|
+
/**
|
|
2844
|
+
*
|
|
2845
|
+
* @summary Get person
|
|
2846
|
+
* @param {string} personId Person ID.
|
|
2847
|
+
* @param {string} [xRequestID] Request header label.
|
|
2848
|
+
* @param {*} [options] Override http request option.
|
|
2849
|
+
* @throws {RequiredError}
|
|
2850
|
+
* @memberof PersonApi
|
|
2851
|
+
*/
|
|
2852
|
+
getPerson(e, s, r) {
|
|
2853
|
+
return H(this.configuration).getPerson(e, s, r).then((n) => n(this.axios, this.basePath));
|
|
2854
|
+
}
|
|
2855
|
+
/**
|
|
2856
|
+
*
|
|
2857
|
+
* @summary Update person
|
|
2858
|
+
* @param {string} personId Person ID.
|
|
2859
|
+
* @param {PersonToUpdateFields} personToUpdateFields Request body for the Person to update.
|
|
2860
|
+
* @param {string} [xRequestID] Request header label.
|
|
2861
|
+
* @param {*} [options] Override http request option.
|
|
2862
|
+
* @throws {RequiredError}
|
|
2863
|
+
* @memberof PersonApi
|
|
2864
|
+
*/
|
|
2865
|
+
updatePerson(e, s, r, n) {
|
|
2866
|
+
return H(this.configuration).updatePerson(e, s, r, n).then((o) => o(this.axios, this.basePath));
|
|
2867
|
+
}
|
|
2868
|
+
};
|
|
2869
|
+
class Ys {
|
|
2870
|
+
constructor(e, s, r) {
|
|
2871
|
+
this.superClass = new Js(e, s, r);
|
|
2872
|
+
}
|
|
2873
|
+
async createPerson(e, s, r) {
|
|
2874
|
+
const n = {
|
|
2875
|
+
...e,
|
|
2876
|
+
metadata: e != null && e.metadata ? e.metadata : {}
|
|
2877
|
+
};
|
|
2878
|
+
return (await this.superClass.createPerson(n, s, r)).data;
|
|
2879
|
+
}
|
|
2880
|
+
async addImageToPerson(e, s, r, n) {
|
|
2881
|
+
var a;
|
|
2882
|
+
return (a = s == null ? void 0 : s.image) != null && a.content && typeof s.image.content != "string" && (s.image.content = oe(s.image.content)), (await this.superClass.addImageToPerson(e, s, r, n)).data;
|
|
2883
|
+
}
|
|
2884
|
+
async deleteImageOfPerson(e, s, r, n) {
|
|
2885
|
+
await this.superClass.deleteImageOfPerson(e, s, r, n);
|
|
2886
|
+
}
|
|
2887
|
+
async deletePerson(e, s, r) {
|
|
2888
|
+
await this.superClass.deletePerson(e, s, r);
|
|
2889
|
+
}
|
|
2890
|
+
async getAllGroupsByPersonId(e, s, r, n, o) {
|
|
2891
|
+
return (await this.superClass.getAllGroupsByPersonId(r, e, s, n, o)).data;
|
|
2892
|
+
}
|
|
2893
|
+
async getAllImagesByPersonId(e, s, r, n, o) {
|
|
2894
|
+
return (await this.superClass.getAllImagesByPersonId(r, e, s, n, o)).data;
|
|
2895
|
+
}
|
|
2896
|
+
async getImageOfPerson(e, s, r, n) {
|
|
2897
|
+
return (await this.superClass.getImageOfPerson(e, s, r, n)).data;
|
|
2898
|
+
}
|
|
2899
|
+
async getPerson(e, s, r) {
|
|
2900
|
+
return (await this.superClass.getPerson(e, s, r)).data;
|
|
2901
|
+
}
|
|
2902
|
+
async updatePerson(e, s, r, n) {
|
|
2903
|
+
await this.superClass.updatePerson(e, s, r, n);
|
|
2904
|
+
}
|
|
2905
|
+
}
|
|
2906
|
+
const Zs = function(t) {
|
|
2907
|
+
return {
|
|
2908
|
+
/**
|
|
2909
|
+
*
|
|
2910
|
+
* @summary Find person by image in groups
|
|
2911
|
+
* @param {SearchRequest} searchRequest
|
|
2912
|
+
* @param {string} [xRequestID] Request header label.
|
|
2913
|
+
* @param {*} [options] Override http request option.
|
|
2914
|
+
* @throws {RequiredError}
|
|
2915
|
+
*/
|
|
2916
|
+
search: async (e, s, r = {}) => {
|
|
2917
|
+
y("search", "searchRequest", e);
|
|
2918
|
+
const n = "/api/search", o = new URL(n, R);
|
|
2919
|
+
let a;
|
|
2920
|
+
t && (a = t.baseOptions);
|
|
2921
|
+
const i = { method: "POST", ...a, ...r }, c = {}, l = {};
|
|
2922
|
+
s != null && (c["X-RequestID"] = String(s)), c["Content-Type"] = "application/json", g(o, l);
|
|
2923
|
+
let d = a && a.headers ? a.headers : {};
|
|
2924
|
+
return i.headers = { ...c, ...d, ...r.headers }, i.data = D(e, i, t), {
|
|
2925
|
+
url: P(o),
|
|
2926
|
+
options: i
|
|
2927
|
+
};
|
|
2928
|
+
}
|
|
2929
|
+
};
|
|
2930
|
+
}, er = function(t) {
|
|
2931
|
+
const e = Zs(t);
|
|
2932
|
+
return {
|
|
2933
|
+
/**
|
|
2934
|
+
*
|
|
2935
|
+
* @summary Find person by image in groups
|
|
2936
|
+
* @param {SearchRequest} searchRequest
|
|
2937
|
+
* @param {string} [xRequestID] Request header label.
|
|
2938
|
+
* @param {*} [options] Override http request option.
|
|
2939
|
+
* @throws {RequiredError}
|
|
2940
|
+
*/
|
|
2941
|
+
async search(s, r, n) {
|
|
2942
|
+
const o = await e.search(s, r, n);
|
|
2943
|
+
return T(o, m, S, t);
|
|
2944
|
+
}
|
|
2945
|
+
};
|
|
2946
|
+
};
|
|
2947
|
+
let tr = class extends W {
|
|
2948
|
+
/**
|
|
2949
|
+
*
|
|
2950
|
+
* @summary Find person by image in groups
|
|
2951
|
+
* @param {SearchRequest} searchRequest
|
|
2952
|
+
* @param {string} [xRequestID] Request header label.
|
|
2953
|
+
* @param {*} [options] Override http request option.
|
|
2954
|
+
* @throws {RequiredError}
|
|
2955
|
+
* @memberof SearchApi
|
|
2956
|
+
*/
|
|
2957
|
+
search(e, s, r) {
|
|
2958
|
+
return er(this.configuration).search(e, s, r).then((n) => n(this.axios, this.basePath));
|
|
2959
|
+
}
|
|
2960
|
+
};
|
|
2961
|
+
class sr {
|
|
2962
|
+
constructor(e, s, r) {
|
|
2963
|
+
this.superClass = new tr(e, s, r);
|
|
2964
|
+
}
|
|
2965
|
+
async search(e, s, r) {
|
|
2966
|
+
var o;
|
|
2967
|
+
return (o = e == null ? void 0 : e.image) != null && o.content && typeof e.image.content != "string" && (e.image.content = oe(e.image.content)), (await this.superClass.search(e, s, r)).data;
|
|
2968
|
+
}
|
|
2969
|
+
}
|
|
2970
|
+
const rr = function(t) {
|
|
2971
|
+
return {
|
|
2972
|
+
/**
|
|
2973
|
+
*
|
|
2974
|
+
* @summary Checking the license status
|
|
2975
|
+
* @param {string} [xRequestID] Request header label.
|
|
2976
|
+
* @param {*} [options] Override http request option.
|
|
2977
|
+
* @throws {RequiredError}
|
|
2978
|
+
*/
|
|
2979
|
+
readiness: async (e, s = {}) => {
|
|
2980
|
+
const r = "/api/readiness", n = new URL(r, R);
|
|
2981
|
+
let o;
|
|
2982
|
+
t && (o = t.baseOptions);
|
|
2983
|
+
const a = { method: "GET", ...o, ...s }, i = {}, c = {};
|
|
2984
|
+
e != null && (i["X-RequestID"] = String(e)), g(n, c);
|
|
2985
|
+
let l = o && o.headers ? o.headers : {};
|
|
2986
|
+
return a.headers = { ...i, ...l, ...s.headers }, {
|
|
2987
|
+
url: P(n),
|
|
2988
|
+
options: a
|
|
2989
|
+
};
|
|
2990
|
+
}
|
|
2991
|
+
};
|
|
2992
|
+
}, nr = function(t) {
|
|
2993
|
+
const e = rr(t);
|
|
2994
|
+
return {
|
|
2995
|
+
/**
|
|
2996
|
+
*
|
|
2997
|
+
* @summary Checking the license status
|
|
2998
|
+
* @param {string} [xRequestID] Request header label.
|
|
2999
|
+
* @param {*} [options] Override http request option.
|
|
3000
|
+
* @throws {RequiredError}
|
|
3001
|
+
*/
|
|
3002
|
+
async readiness(s, r) {
|
|
3003
|
+
const n = await e.readiness(s, r);
|
|
3004
|
+
return T(n, m, S, t);
|
|
3005
|
+
}
|
|
3006
|
+
};
|
|
3007
|
+
};
|
|
3008
|
+
let or = class extends W {
|
|
3009
|
+
/**
|
|
3010
|
+
*
|
|
3011
|
+
* @summary Checking the license status
|
|
3012
|
+
* @param {string} [xRequestID] Request header label.
|
|
3013
|
+
* @param {*} [options] Override http request option.
|
|
3014
|
+
* @throws {RequiredError}
|
|
3015
|
+
* @memberof DiagnosticsApi
|
|
3016
|
+
*/
|
|
3017
|
+
readiness(e, s) {
|
|
3018
|
+
return nr(this.configuration).readiness(e, s).then((r) => r(this.axios, this.basePath));
|
|
3019
|
+
}
|
|
3020
|
+
};
|
|
3021
|
+
class ar {
|
|
3022
|
+
constructor(e, s, r) {
|
|
3023
|
+
this.superClass = new or(e, s, r);
|
|
3024
|
+
}
|
|
3025
|
+
async readiness(e, s) {
|
|
3026
|
+
return (await this.superClass.readiness(e, s)).data;
|
|
3027
|
+
}
|
|
3028
|
+
}
|
|
3029
|
+
const ir = function(t) {
|
|
3030
|
+
return {
|
|
3031
|
+
/**
|
|
3032
|
+
* To verify the presence of a real person in front of a camera, use the GET `/api/v2/liveness` endpoint. When starting, you can specify `tag` which all attempts to read liveness will be bound to. If left unspecified, the application automatically generates one. The calling application returns `tag` and `transactionId`. One session may include many transactions, and from a transaction ID it is clear which session it belongs to. When specifying `tag`, note that only Latin uppercase and lowercase letters, digits, and symbols `-` and `_` are allowed. The maximum supported number of characters is 127. The metadata (device model, screen data, frame size, app ID and version, OS version, platform, SDK version, etc.), a person\'s selfie and video of the liveness detection session are stored on the backend at: `faceapi-session/year={year}/month={month}/day={day}/hour={hour}/minute={minute}/{tag}/transactionId` By default, liveness checks operate with eventual consistency. This means that when you submit a request and receive a response, the associated data (like the selfie and session video) may be saved after the response is sent. If this doesn\'t meet your requirements, you can switch to strong consistency; refer to the [Architecture page](https://docs.regulaforensics.com/develop/face-sdk/overview/architecture/#consistency-models) for details. To access the liveness transaction data, use GET `/api/v2/liveness?transactionId={transactionId}`.
|
|
3033
|
+
* @summary liveness check
|
|
3034
|
+
* @param {string} transactionId ID of the current liveness transaction.
|
|
3035
|
+
* @param {*} [options] Override http request option.
|
|
3036
|
+
* @throws {RequiredError}
|
|
3037
|
+
*/
|
|
3038
|
+
getLivenessTransactionInfo: async (e, s = {}) => {
|
|
3039
|
+
y("getLivenessTransactionInfo", "transactionId", e);
|
|
3040
|
+
const r = "/api/v2/liveness", n = new URL(r, R);
|
|
3041
|
+
let o;
|
|
3042
|
+
t && (o = t.baseOptions);
|
|
3043
|
+
const a = { method: "GET", ...o, ...s }, i = {}, c = {};
|
|
3044
|
+
e !== void 0 && (c.transactionId = e), g(n, c);
|
|
3045
|
+
let l = o && o.headers ? o.headers : {};
|
|
3046
|
+
return a.headers = { ...i, ...l, ...s.headers }, {
|
|
3047
|
+
url: P(n),
|
|
3048
|
+
options: a
|
|
3049
|
+
};
|
|
3050
|
+
}
|
|
3051
|
+
};
|
|
3052
|
+
}, cr = function(t) {
|
|
3053
|
+
const e = ir(t);
|
|
3054
|
+
return {
|
|
3055
|
+
/**
|
|
3056
|
+
* To verify the presence of a real person in front of a camera, use the GET `/api/v2/liveness` endpoint. When starting, you can specify `tag` which all attempts to read liveness will be bound to. If left unspecified, the application automatically generates one. The calling application returns `tag` and `transactionId`. One session may include many transactions, and from a transaction ID it is clear which session it belongs to. When specifying `tag`, note that only Latin uppercase and lowercase letters, digits, and symbols `-` and `_` are allowed. The maximum supported number of characters is 127. The metadata (device model, screen data, frame size, app ID and version, OS version, platform, SDK version, etc.), a person\'s selfie and video of the liveness detection session are stored on the backend at: `faceapi-session/year={year}/month={month}/day={day}/hour={hour}/minute={minute}/{tag}/transactionId` By default, liveness checks operate with eventual consistency. This means that when you submit a request and receive a response, the associated data (like the selfie and session video) may be saved after the response is sent. If this doesn\'t meet your requirements, you can switch to strong consistency; refer to the [Architecture page](https://docs.regulaforensics.com/develop/face-sdk/overview/architecture/#consistency-models) for details. To access the liveness transaction data, use GET `/api/v2/liveness?transactionId={transactionId}`.
|
|
3057
|
+
* @summary liveness check
|
|
3058
|
+
* @param {string} transactionId ID of the current liveness transaction.
|
|
3059
|
+
* @param {*} [options] Override http request option.
|
|
3060
|
+
* @throws {RequiredError}
|
|
3061
|
+
*/
|
|
3062
|
+
async getLivenessTransactionInfo(s, r) {
|
|
3063
|
+
const n = await e.getLivenessTransactionInfo(s, r);
|
|
3064
|
+
return T(n, m, S, t);
|
|
3065
|
+
}
|
|
3066
|
+
};
|
|
3067
|
+
};
|
|
3068
|
+
let lr = class extends W {
|
|
3069
|
+
/**
|
|
3070
|
+
* To verify the presence of a real person in front of a camera, use the GET `/api/v2/liveness` endpoint. When starting, you can specify `tag` which all attempts to read liveness will be bound to. If left unspecified, the application automatically generates one. The calling application returns `tag` and `transactionId`. One session may include many transactions, and from a transaction ID it is clear which session it belongs to. When specifying `tag`, note that only Latin uppercase and lowercase letters, digits, and symbols `-` and `_` are allowed. The maximum supported number of characters is 127. The metadata (device model, screen data, frame size, app ID and version, OS version, platform, SDK version, etc.), a person\'s selfie and video of the liveness detection session are stored on the backend at: `faceapi-session/year={year}/month={month}/day={day}/hour={hour}/minute={minute}/{tag}/transactionId` By default, liveness checks operate with eventual consistency. This means that when you submit a request and receive a response, the associated data (like the selfie and session video) may be saved after the response is sent. If this doesn\'t meet your requirements, you can switch to strong consistency; refer to the [Architecture page](https://docs.regulaforensics.com/develop/face-sdk/overview/architecture/#consistency-models) for details. To access the liveness transaction data, use GET `/api/v2/liveness?transactionId={transactionId}`.
|
|
3071
|
+
* @summary liveness check
|
|
3072
|
+
* @param {string} transactionId ID of the current liveness transaction.
|
|
3073
|
+
* @param {*} [options] Override http request option.
|
|
3074
|
+
* @throws {RequiredError}
|
|
3075
|
+
* @memberof Liveness20Api
|
|
3076
|
+
*/
|
|
3077
|
+
getLivenessTransactionInfo(e, s) {
|
|
3078
|
+
return cr(this.configuration).getLivenessTransactionInfo(e, s).then((r) => r(this.axios, this.basePath));
|
|
3079
|
+
}
|
|
3080
|
+
};
|
|
3081
|
+
class ur {
|
|
3082
|
+
constructor(e, s, r) {
|
|
3083
|
+
this.superClass = new lr(e, s, r);
|
|
3084
|
+
}
|
|
3085
|
+
async getLivenessTransactionInfo(e, s) {
|
|
3086
|
+
return (await this.superClass.getLivenessTransactionInfo(e, s)).data;
|
|
3087
|
+
}
|
|
3088
|
+
}
|
|
3089
|
+
class $r {
|
|
3090
|
+
constructor(e, s = S, r = m) {
|
|
3091
|
+
this.basePath = s, this.axios = r, this.matchApi = new Qs(e, s, r), this.groupApi = new Ks(e, s, r), this.personApi = new Ys(e, s, r), this.searchApi = new sr(e, s, r), this.diagnosticsApi = new ar(e, s, r), this.livenessApi = new ur(e, s, r);
|
|
3092
|
+
}
|
|
3093
|
+
}
|
|
3094
|
+
class Qr {
|
|
3095
|
+
constructor(e = {}) {
|
|
3096
|
+
this.apiKey = e.apiKey, this.username = e.username, this.password = e.password, this.accessToken = e.accessToken, this.basePath = e.basePath, this.baseOptions = e.baseOptions, this.formDataCtor = e.formDataCtor;
|
|
3097
|
+
}
|
|
3098
|
+
/**
|
|
3099
|
+
* Check if the given MIME is a JSON MIME.
|
|
3100
|
+
* JSON MIME examples:
|
|
3101
|
+
* application/json
|
|
3102
|
+
* application/json; charset=UTF8
|
|
3103
|
+
* APPLICATION/JSON
|
|
3104
|
+
* application/vnd.company+json
|
|
3105
|
+
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
3106
|
+
* @return True if the given MIME is JSON, false otherwise.
|
|
3107
|
+
*/
|
|
3108
|
+
isJsonMime(e) {
|
|
3109
|
+
const s = new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$", "i");
|
|
3110
|
+
return e !== null && (s.test(e) || e.toLowerCase() === "application/json-patch+json");
|
|
3111
|
+
}
|
|
3112
|
+
}
|
|
3113
|
+
export {
|
|
3114
|
+
Qr as Configuration,
|
|
3115
|
+
Nr as FaceAttribute,
|
|
3116
|
+
Lr as FaceImageQualityAlignType,
|
|
3117
|
+
Fr as FaceImageQualityGroups,
|
|
3118
|
+
Ur as FaceImageQualityGroupsStrings,
|
|
3119
|
+
Vr as FaceImageQualityStatus,
|
|
3120
|
+
Dr as FaceQualityConfigName,
|
|
3121
|
+
Gr as FaceQualityScenarios,
|
|
3122
|
+
Hr as FaceSDKResultCode,
|
|
3123
|
+
$r as FaceSdk,
|
|
3124
|
+
xr as FilterOp,
|
|
3125
|
+
qs as ImageSource,
|
|
3126
|
+
Br as LivenessType
|
|
3127
|
+
};
|