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