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