@qikdev/sdk 0.1.208 → 0.1.210
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/inflate-glossary.worker-CGZQmJtn.js +24 -0
- package/dist/main.js +1739 -1723
- package/package.json +1 -1
- package/src/api/qik.content.js +65 -23
- package/src/version.js +1 -1
- package/src/workers/inflate-glossary.worker.js +38 -0
package/dist/main.js
CHANGED
|
@@ -9,18 +9,18 @@ function Zr(e) {
|
|
|
9
9
|
var r = e.default;
|
|
10
10
|
if (typeof r == "function") {
|
|
11
11
|
var a = function t() {
|
|
12
|
-
var
|
|
12
|
+
var i = !1;
|
|
13
13
|
try {
|
|
14
|
-
|
|
14
|
+
i = this instanceof t;
|
|
15
15
|
} catch {
|
|
16
16
|
}
|
|
17
|
-
return
|
|
17
|
+
return i ? Reflect.construct(r, arguments, this.constructor) : r.apply(this, arguments);
|
|
18
18
|
};
|
|
19
19
|
a.prototype = r.prototype;
|
|
20
20
|
} else a = {};
|
|
21
21
|
return Object.defineProperty(a, "__esModule", { value: !0 }), Object.keys(e).forEach(function(t) {
|
|
22
|
-
var
|
|
23
|
-
Object.defineProperty(a, t,
|
|
22
|
+
var i = Object.getOwnPropertyDescriptor(e, t);
|
|
23
|
+
Object.defineProperty(a, t, i.get ? i : {
|
|
24
24
|
enumerable: !0,
|
|
25
25
|
get: function() {
|
|
26
26
|
return e[t];
|
|
@@ -38,18 +38,18 @@ function Qr() {
|
|
|
38
38
|
var r = {}, a = Symbol("test"), t = Object(a);
|
|
39
39
|
if (typeof a == "string" || Object.prototype.toString.call(a) !== "[object Symbol]" || Object.prototype.toString.call(t) !== "[object Symbol]")
|
|
40
40
|
return !1;
|
|
41
|
-
var
|
|
42
|
-
r[a] =
|
|
41
|
+
var i = 42;
|
|
42
|
+
r[a] = i;
|
|
43
43
|
for (a in r)
|
|
44
44
|
return !1;
|
|
45
45
|
if (typeof Object.keys == "function" && Object.keys(r).length !== 0 || typeof Object.getOwnPropertyNames == "function" && Object.getOwnPropertyNames(r).length !== 0)
|
|
46
46
|
return !1;
|
|
47
|
-
var
|
|
48
|
-
if (
|
|
47
|
+
var s = Object.getOwnPropertySymbols(r);
|
|
48
|
+
if (s.length !== 1 || s[0] !== a || !Object.prototype.propertyIsEnumerable.call(r, a))
|
|
49
49
|
return !1;
|
|
50
50
|
if (typeof Object.getOwnPropertyDescriptor == "function") {
|
|
51
|
-
var
|
|
52
|
-
if (
|
|
51
|
+
var f = Object.getOwnPropertyDescriptor(r, a);
|
|
52
|
+
if (f.value !== i || f.enumerable !== !0)
|
|
53
53
|
return !1;
|
|
54
54
|
}
|
|
55
55
|
return !0;
|
|
@@ -68,43 +68,43 @@ var Ye, Or;
|
|
|
68
68
|
function Xr() {
|
|
69
69
|
if (Or) return Ye;
|
|
70
70
|
Or = 1;
|
|
71
|
-
var e = "Function.prototype.bind called on incompatible ", r = Object.prototype.toString, a = Math.max, t = "[object Function]",
|
|
72
|
-
for (var
|
|
73
|
-
|
|
74
|
-
for (var
|
|
75
|
-
|
|
76
|
-
return
|
|
77
|
-
},
|
|
78
|
-
for (var
|
|
79
|
-
|
|
80
|
-
return
|
|
81
|
-
},
|
|
82
|
-
for (var
|
|
83
|
-
|
|
84
|
-
return
|
|
71
|
+
var e = "Function.prototype.bind called on incompatible ", r = Object.prototype.toString, a = Math.max, t = "[object Function]", i = function(d, m) {
|
|
72
|
+
for (var S = [], A = 0; A < d.length; A += 1)
|
|
73
|
+
S[A] = d[A];
|
|
74
|
+
for (var P = 0; P < m.length; P += 1)
|
|
75
|
+
S[P + d.length] = m[P];
|
|
76
|
+
return S;
|
|
77
|
+
}, s = function(d, m) {
|
|
78
|
+
for (var S = [], A = m, P = 0; A < d.length; A += 1, P += 1)
|
|
79
|
+
S[P] = d[A];
|
|
80
|
+
return S;
|
|
81
|
+
}, f = function(u, d) {
|
|
82
|
+
for (var m = "", S = 0; S < u.length; S += 1)
|
|
83
|
+
m += u[S], S + 1 < u.length && (m += d);
|
|
84
|
+
return m;
|
|
85
85
|
};
|
|
86
|
-
return Ye = function(
|
|
87
|
-
var
|
|
88
|
-
if (typeof
|
|
89
|
-
throw new TypeError(e +
|
|
90
|
-
for (var
|
|
86
|
+
return Ye = function(d) {
|
|
87
|
+
var m = this;
|
|
88
|
+
if (typeof m != "function" || r.apply(m) !== t)
|
|
89
|
+
throw new TypeError(e + m);
|
|
90
|
+
for (var S = s(arguments, 1), A, P = function() {
|
|
91
91
|
if (this instanceof A) {
|
|
92
|
-
var
|
|
92
|
+
var n = m.apply(
|
|
93
93
|
this,
|
|
94
|
-
|
|
94
|
+
i(S, arguments)
|
|
95
95
|
);
|
|
96
|
-
return Object(
|
|
96
|
+
return Object(n) === n ? n : this;
|
|
97
97
|
}
|
|
98
|
-
return
|
|
99
|
-
|
|
100
|
-
|
|
98
|
+
return m.apply(
|
|
99
|
+
d,
|
|
100
|
+
i(S, arguments)
|
|
101
101
|
);
|
|
102
|
-
},
|
|
103
|
-
|
|
104
|
-
if (A = Function("binder", "return function (" +
|
|
105
|
-
var
|
|
102
|
+
}, v = a(0, m.length - S.length), g = [], x = 0; x < v; x++)
|
|
103
|
+
g[x] = "$" + x;
|
|
104
|
+
if (A = Function("binder", "return function (" + f(g, ",") + "){ return binder.apply(this,arguments); }")(P), m.prototype) {
|
|
105
|
+
var o = function() {
|
|
106
106
|
};
|
|
107
|
-
|
|
107
|
+
o.prototype = m.prototype, A.prototype = new o(), o.prototype = null;
|
|
108
108
|
}
|
|
109
109
|
return A;
|
|
110
110
|
}, Ye;
|
|
@@ -127,42 +127,42 @@ var rr, Ir;
|
|
|
127
127
|
function hr() {
|
|
128
128
|
if (Ir) return rr;
|
|
129
129
|
Ir = 1;
|
|
130
|
-
var e, r = SyntaxError, a = Function, t = TypeError,
|
|
130
|
+
var e, r = SyntaxError, a = Function, t = TypeError, i = function(F) {
|
|
131
131
|
try {
|
|
132
|
-
return a('"use strict"; return (' +
|
|
132
|
+
return a('"use strict"; return (' + F + ").constructor;")();
|
|
133
133
|
} catch {
|
|
134
134
|
}
|
|
135
|
-
},
|
|
136
|
-
if (
|
|
135
|
+
}, s = Object.getOwnPropertyDescriptor;
|
|
136
|
+
if (s)
|
|
137
137
|
try {
|
|
138
|
-
|
|
138
|
+
s({}, "");
|
|
139
139
|
} catch {
|
|
140
|
-
|
|
140
|
+
s = null;
|
|
141
141
|
}
|
|
142
|
-
var
|
|
142
|
+
var f = function() {
|
|
143
143
|
throw new t();
|
|
144
|
-
},
|
|
144
|
+
}, u = s ? (function() {
|
|
145
145
|
try {
|
|
146
|
-
return arguments.callee,
|
|
146
|
+
return arguments.callee, f;
|
|
147
147
|
} catch {
|
|
148
148
|
try {
|
|
149
|
-
return
|
|
149
|
+
return s(arguments, "callee").get;
|
|
150
150
|
} catch {
|
|
151
|
-
return
|
|
151
|
+
return f;
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
|
-
})() :
|
|
155
|
-
return
|
|
156
|
-
},
|
|
154
|
+
})() : f, d = Yr()(), m = Object.getPrototypeOf || function(F) {
|
|
155
|
+
return F.__proto__;
|
|
156
|
+
}, S = {}, A = typeof Uint8Array > "u" ? e : m(Uint8Array), P = {
|
|
157
157
|
"%AggregateError%": typeof AggregateError > "u" ? e : AggregateError,
|
|
158
158
|
"%Array%": Array,
|
|
159
159
|
"%ArrayBuffer%": typeof ArrayBuffer > "u" ? e : ArrayBuffer,
|
|
160
|
-
"%ArrayIteratorPrototype%":
|
|
160
|
+
"%ArrayIteratorPrototype%": d ? m([][Symbol.iterator]()) : e,
|
|
161
161
|
"%AsyncFromSyncIteratorPrototype%": e,
|
|
162
|
-
"%AsyncFunction%":
|
|
163
|
-
"%AsyncGenerator%":
|
|
164
|
-
"%AsyncGeneratorFunction%":
|
|
165
|
-
"%AsyncIteratorPrototype%":
|
|
162
|
+
"%AsyncFunction%": S,
|
|
163
|
+
"%AsyncGenerator%": S,
|
|
164
|
+
"%AsyncGeneratorFunction%": S,
|
|
165
|
+
"%AsyncIteratorPrototype%": S,
|
|
166
166
|
"%Atomics%": typeof Atomics > "u" ? e : Atomics,
|
|
167
167
|
"%BigInt%": typeof BigInt > "u" ? e : BigInt,
|
|
168
168
|
"%Boolean%": Boolean,
|
|
@@ -180,16 +180,16 @@ function hr() {
|
|
|
180
180
|
"%Float64Array%": typeof Float64Array > "u" ? e : Float64Array,
|
|
181
181
|
"%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? e : FinalizationRegistry,
|
|
182
182
|
"%Function%": a,
|
|
183
|
-
"%GeneratorFunction%":
|
|
183
|
+
"%GeneratorFunction%": S,
|
|
184
184
|
"%Int8Array%": typeof Int8Array > "u" ? e : Int8Array,
|
|
185
185
|
"%Int16Array%": typeof Int16Array > "u" ? e : Int16Array,
|
|
186
186
|
"%Int32Array%": typeof Int32Array > "u" ? e : Int32Array,
|
|
187
187
|
"%isFinite%": isFinite,
|
|
188
188
|
"%isNaN%": isNaN,
|
|
189
|
-
"%IteratorPrototype%":
|
|
189
|
+
"%IteratorPrototype%": d ? m(m([][Symbol.iterator]())) : e,
|
|
190
190
|
"%JSON%": typeof JSON == "object" ? JSON : e,
|
|
191
191
|
"%Map%": typeof Map > "u" ? e : Map,
|
|
192
|
-
"%MapIteratorPrototype%": typeof Map > "u" || !
|
|
192
|
+
"%MapIteratorPrototype%": typeof Map > "u" || !d ? e : m((/* @__PURE__ */ new Map())[Symbol.iterator]()),
|
|
193
193
|
"%Math%": Math,
|
|
194
194
|
"%Number%": Number,
|
|
195
195
|
"%Object%": Object,
|
|
@@ -202,13 +202,13 @@ function hr() {
|
|
|
202
202
|
"%Reflect%": typeof Reflect > "u" ? e : Reflect,
|
|
203
203
|
"%RegExp%": RegExp,
|
|
204
204
|
"%Set%": typeof Set > "u" ? e : Set,
|
|
205
|
-
"%SetIteratorPrototype%": typeof Set > "u" || !
|
|
205
|
+
"%SetIteratorPrototype%": typeof Set > "u" || !d ? e : m((/* @__PURE__ */ new Set())[Symbol.iterator]()),
|
|
206
206
|
"%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? e : SharedArrayBuffer,
|
|
207
207
|
"%String%": String,
|
|
208
|
-
"%StringIteratorPrototype%":
|
|
209
|
-
"%Symbol%":
|
|
208
|
+
"%StringIteratorPrototype%": d ? m(""[Symbol.iterator]()) : e,
|
|
209
|
+
"%Symbol%": d ? Symbol : e,
|
|
210
210
|
"%SyntaxError%": r,
|
|
211
|
-
"%ThrowTypeError%":
|
|
211
|
+
"%ThrowTypeError%": u,
|
|
212
212
|
"%TypedArray%": A,
|
|
213
213
|
"%TypeError%": t,
|
|
214
214
|
"%Uint8Array%": typeof Uint8Array > "u" ? e : Uint8Array,
|
|
@@ -219,23 +219,23 @@ function hr() {
|
|
|
219
219
|
"%WeakMap%": typeof WeakMap > "u" ? e : WeakMap,
|
|
220
220
|
"%WeakRef%": typeof WeakRef > "u" ? e : WeakRef,
|
|
221
221
|
"%WeakSet%": typeof WeakSet > "u" ? e : WeakSet
|
|
222
|
-
},
|
|
223
|
-
var
|
|
224
|
-
if (
|
|
225
|
-
|
|
226
|
-
else if (
|
|
227
|
-
|
|
228
|
-
else if (
|
|
229
|
-
|
|
230
|
-
else if (
|
|
231
|
-
var
|
|
232
|
-
|
|
233
|
-
} else if (
|
|
234
|
-
var
|
|
235
|
-
|
|
222
|
+
}, v = function F(N) {
|
|
223
|
+
var _;
|
|
224
|
+
if (N === "%AsyncFunction%")
|
|
225
|
+
_ = i("async function () {}");
|
|
226
|
+
else if (N === "%GeneratorFunction%")
|
|
227
|
+
_ = i("function* () {}");
|
|
228
|
+
else if (N === "%AsyncGeneratorFunction%")
|
|
229
|
+
_ = i("async function* () {}");
|
|
230
|
+
else if (N === "%AsyncGenerator%") {
|
|
231
|
+
var L = F("%AsyncGeneratorFunction%");
|
|
232
|
+
L && (_ = L.prototype);
|
|
233
|
+
} else if (N === "%AsyncIteratorPrototype%") {
|
|
234
|
+
var B = F("%AsyncGenerator%");
|
|
235
|
+
B && (_ = m(B.prototype));
|
|
236
236
|
}
|
|
237
|
-
return
|
|
238
|
-
},
|
|
237
|
+
return P[N] = _, _;
|
|
238
|
+
}, g = {
|
|
239
239
|
"%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
|
|
240
240
|
"%ArrayPrototype%": ["Array", "prototype"],
|
|
241
241
|
"%ArrayProto_entries%": ["Array", "prototype", "entries"],
|
|
@@ -287,88 +287,88 @@ function hr() {
|
|
|
287
287
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
288
288
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
289
289
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
290
|
-
},
|
|
291
|
-
var
|
|
292
|
-
if (
|
|
290
|
+
}, x = yr(), o = et(), n = x.call(Function.call, Array.prototype.concat), c = x.call(Function.apply, Array.prototype.splice), y = x.call(Function.call, String.prototype.replace), b = x.call(Function.call, String.prototype.slice), E = x.call(Function.call, RegExp.prototype.exec), I = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, R = /\\(\\)?/g, k = function(N) {
|
|
291
|
+
var _ = b(N, 0, 1), L = b(N, -1);
|
|
292
|
+
if (_ === "%" && L !== "%")
|
|
293
293
|
throw new r("invalid intrinsic syntax, expected closing `%`");
|
|
294
|
-
if (
|
|
294
|
+
if (L === "%" && _ !== "%")
|
|
295
295
|
throw new r("invalid intrinsic syntax, expected opening `%`");
|
|
296
|
-
var
|
|
297
|
-
return
|
|
298
|
-
|
|
299
|
-
}),
|
|
300
|
-
},
|
|
301
|
-
var
|
|
302
|
-
if (
|
|
303
|
-
var $ =
|
|
304
|
-
if ($ ===
|
|
305
|
-
throw new t("intrinsic " +
|
|
296
|
+
var B = [];
|
|
297
|
+
return y(N, I, function($, W, T, z) {
|
|
298
|
+
B[B.length] = T ? y(z, R, "$1") : W || $;
|
|
299
|
+
}), B;
|
|
300
|
+
}, j = function(N, _) {
|
|
301
|
+
var L = N, B;
|
|
302
|
+
if (o(g, L) && (B = g[L], L = "%" + B[0] + "%"), o(P, L)) {
|
|
303
|
+
var $ = P[L];
|
|
304
|
+
if ($ === S && ($ = v(L)), typeof $ > "u" && !_)
|
|
305
|
+
throw new t("intrinsic " + N + " exists, but is not available. Please file an issue!");
|
|
306
306
|
return {
|
|
307
|
-
alias:
|
|
308
|
-
name:
|
|
307
|
+
alias: B,
|
|
308
|
+
name: L,
|
|
309
309
|
value: $
|
|
310
310
|
};
|
|
311
311
|
}
|
|
312
|
-
throw new r("intrinsic " +
|
|
312
|
+
throw new r("intrinsic " + N + " does not exist!");
|
|
313
313
|
};
|
|
314
|
-
return rr = function(
|
|
315
|
-
if (typeof
|
|
314
|
+
return rr = function(N, _) {
|
|
315
|
+
if (typeof N != "string" || N.length === 0)
|
|
316
316
|
throw new t("intrinsic name must be a non-empty string");
|
|
317
|
-
if (arguments.length > 1 && typeof
|
|
317
|
+
if (arguments.length > 1 && typeof _ != "boolean")
|
|
318
318
|
throw new t('"allowMissing" argument must be a boolean');
|
|
319
|
-
if (
|
|
319
|
+
if (E(/^%?[^%]*%?$/, N) === null)
|
|
320
320
|
throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
321
|
-
var
|
|
322
|
-
|
|
323
|
-
for (var
|
|
324
|
-
var
|
|
325
|
-
if ((ie === '"' || ie === "'" || ie === "`" ||
|
|
321
|
+
var L = k(N), B = L.length > 0 ? L[0] : "", $ = j("%" + B + "%", _), W = $.name, T = $.value, z = !1, H = $.alias;
|
|
322
|
+
H && (B = H[0], c(L, n([0, 1], H)));
|
|
323
|
+
for (var X = 1, ee = !0; X < L.length; X += 1) {
|
|
324
|
+
var K = L[X], ie = b(K, 0, 1), te = b(K, -1);
|
|
325
|
+
if ((ie === '"' || ie === "'" || ie === "`" || te === '"' || te === "'" || te === "`") && ie !== te)
|
|
326
326
|
throw new r("property names with quotes must have matching quotes");
|
|
327
|
-
if ((
|
|
328
|
-
|
|
329
|
-
else if (
|
|
330
|
-
if (!(
|
|
331
|
-
if (!
|
|
332
|
-
throw new t("base intrinsic for " +
|
|
327
|
+
if ((K === "constructor" || !ee) && (z = !0), B += "." + K, W = "%" + B + "%", o(P, W))
|
|
328
|
+
T = P[W];
|
|
329
|
+
else if (T != null) {
|
|
330
|
+
if (!(K in T)) {
|
|
331
|
+
if (!_)
|
|
332
|
+
throw new t("base intrinsic for " + N + " exists, but the property is not available.");
|
|
333
333
|
return;
|
|
334
334
|
}
|
|
335
|
-
if (
|
|
336
|
-
var
|
|
337
|
-
|
|
335
|
+
if (s && X + 1 >= L.length) {
|
|
336
|
+
var ae = s(T, K);
|
|
337
|
+
ee = !!ae, ee && "get" in ae && !("originalValue" in ae.get) ? T = ae.get : T = T[K];
|
|
338
338
|
} else
|
|
339
|
-
|
|
340
|
-
|
|
339
|
+
ee = o(T, K), T = T[K];
|
|
340
|
+
ee && !z && (P[W] = T);
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
|
-
return
|
|
343
|
+
return T;
|
|
344
344
|
}, rr;
|
|
345
345
|
}
|
|
346
346
|
var tr = { exports: {} }, Tr;
|
|
347
347
|
function rt() {
|
|
348
348
|
return Tr || (Tr = 1, (function(e) {
|
|
349
|
-
var r = yr(), a = hr(), t = a("%Function.prototype.apply%"),
|
|
350
|
-
if (
|
|
349
|
+
var r = yr(), a = hr(), t = a("%Function.prototype.apply%"), i = a("%Function.prototype.call%"), s = a("%Reflect.apply%", !0) || r.call(i, t), f = a("%Object.getOwnPropertyDescriptor%", !0), u = a("%Object.defineProperty%", !0), d = a("%Math.max%");
|
|
350
|
+
if (u)
|
|
351
351
|
try {
|
|
352
|
-
|
|
352
|
+
u({}, "a", { value: 1 });
|
|
353
353
|
} catch {
|
|
354
|
-
|
|
354
|
+
u = null;
|
|
355
355
|
}
|
|
356
356
|
e.exports = function(A) {
|
|
357
|
-
var
|
|
358
|
-
if (
|
|
359
|
-
var
|
|
360
|
-
|
|
361
|
-
|
|
357
|
+
var P = s(r, i, arguments);
|
|
358
|
+
if (f && u) {
|
|
359
|
+
var v = f(P, "length");
|
|
360
|
+
v.configurable && u(
|
|
361
|
+
P,
|
|
362
362
|
"length",
|
|
363
|
-
{ value: 1 +
|
|
363
|
+
{ value: 1 + d(0, A.length - (arguments.length - 1)) }
|
|
364
364
|
);
|
|
365
365
|
}
|
|
366
|
-
return
|
|
366
|
+
return P;
|
|
367
367
|
};
|
|
368
|
-
var
|
|
369
|
-
return
|
|
368
|
+
var m = function() {
|
|
369
|
+
return s(r, t, arguments);
|
|
370
370
|
};
|
|
371
|
-
|
|
371
|
+
u ? u(e.exports, "apply", { value: m }) : e.exports.apply = m;
|
|
372
372
|
})(tr)), tr.exports;
|
|
373
373
|
}
|
|
374
374
|
var ar, Rr;
|
|
@@ -376,9 +376,9 @@ function tt() {
|
|
|
376
376
|
if (Rr) return ar;
|
|
377
377
|
Rr = 1;
|
|
378
378
|
var e = hr(), r = rt(), a = r(e("String.prototype.indexOf"));
|
|
379
|
-
return ar = function(
|
|
380
|
-
var
|
|
381
|
-
return typeof
|
|
379
|
+
return ar = function(i, s) {
|
|
380
|
+
var f = e(i, !!s);
|
|
381
|
+
return typeof f == "function" && a(i, ".prototype.") > -1 ? r(f) : f;
|
|
382
382
|
}, ar;
|
|
383
383
|
}
|
|
384
384
|
const at = {}, nt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -389,353 +389,353 @@ var nr, _r;
|
|
|
389
389
|
function ot() {
|
|
390
390
|
if (_r) return nr;
|
|
391
391
|
_r = 1;
|
|
392
|
-
var e = typeof Map == "function" && Map.prototype, r = Object.getOwnPropertyDescriptor && e ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, a = e && r && typeof r.get == "function" ? r.get : null, t = e && Map.prototype.forEach,
|
|
393
|
-
return
|
|
392
|
+
var e = typeof Map == "function" && Map.prototype, r = Object.getOwnPropertyDescriptor && e ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, a = e && r && typeof r.get == "function" ? r.get : null, t = e && Map.prototype.forEach, i = typeof Set == "function" && Set.prototype, s = Object.getOwnPropertyDescriptor && i ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, f = i && s && typeof s.get == "function" ? s.get : null, u = i && Set.prototype.forEach, d = typeof WeakMap == "function" && WeakMap.prototype, m = d ? WeakMap.prototype.has : null, S = typeof WeakSet == "function" && WeakSet.prototype, A = S ? WeakSet.prototype.has : null, P = typeof WeakRef == "function" && WeakRef.prototype, v = P ? WeakRef.prototype.deref : null, g = Boolean.prototype.valueOf, x = Object.prototype.toString, o = Function.prototype.toString, n = String.prototype.match, c = String.prototype.slice, y = String.prototype.replace, b = String.prototype.toUpperCase, E = String.prototype.toLowerCase, I = RegExp.prototype.test, R = Array.prototype.concat, k = Array.prototype.join, j = Array.prototype.slice, F = Math.floor, N = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, _ = Object.getOwnPropertySymbols, L = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, B = typeof Symbol == "function" && typeof Symbol.iterator == "object", $ = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === B || !0) ? Symbol.toStringTag : null, W = Object.prototype.propertyIsEnumerable, T = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(p) {
|
|
393
|
+
return p.__proto__;
|
|
394
394
|
} : null);
|
|
395
|
-
function
|
|
396
|
-
if (
|
|
397
|
-
return
|
|
395
|
+
function z(p, h) {
|
|
396
|
+
if (p === 1 / 0 || p === -1 / 0 || p !== p || p && p > -1e3 && p < 1e3 || I.call(/e/, h))
|
|
397
|
+
return h;
|
|
398
398
|
var D = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
|
|
399
|
-
if (typeof
|
|
400
|
-
var
|
|
401
|
-
if (
|
|
402
|
-
var
|
|
403
|
-
return
|
|
399
|
+
if (typeof p == "number") {
|
|
400
|
+
var l = p < 0 ? -F(-p) : F(p);
|
|
401
|
+
if (l !== p) {
|
|
402
|
+
var w = String(l), C = c.call(h, w.length + 1);
|
|
403
|
+
return y.call(w, D, "$&_") + "." + y.call(y.call(C, /([0-9]{3})/g, "$&_"), /_$/, "");
|
|
404
404
|
}
|
|
405
405
|
}
|
|
406
|
-
return
|
|
406
|
+
return y.call(h, D, "$&_");
|
|
407
407
|
}
|
|
408
|
-
var
|
|
409
|
-
nr = function h
|
|
410
|
-
var
|
|
411
|
-
if (
|
|
408
|
+
var H = it, X = H.custom, ee = se(X) ? X : null;
|
|
409
|
+
nr = function p(h, D, l, w) {
|
|
410
|
+
var C = D || {};
|
|
411
|
+
if (Z(C, "quoteStyle") && C.quoteStyle !== "single" && C.quoteStyle !== "double")
|
|
412
412
|
throw new TypeError('option "quoteStyle" must be "single" or "double"');
|
|
413
|
-
if (
|
|
413
|
+
if (Z(C, "maxStringLength") && (typeof C.maxStringLength == "number" ? C.maxStringLength < 0 && C.maxStringLength !== 1 / 0 : C.maxStringLength !== null))
|
|
414
414
|
throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
|
|
415
|
-
var G =
|
|
415
|
+
var G = Z(C, "customInspect") ? C.customInspect : !0;
|
|
416
416
|
if (typeof G != "boolean" && G !== "symbol")
|
|
417
417
|
throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
|
|
418
|
-
if (
|
|
418
|
+
if (Z(C, "indent") && C.indent !== null && C.indent !== " " && !(parseInt(C.indent, 10) === C.indent && C.indent > 0))
|
|
419
419
|
throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
|
|
420
|
-
if (
|
|
420
|
+
if (Z(C, "numericSeparator") && typeof C.numericSeparator != "boolean")
|
|
421
421
|
throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
|
|
422
|
-
var
|
|
423
|
-
if (typeof
|
|
422
|
+
var ne = C.numericSeparator;
|
|
423
|
+
if (typeof h > "u")
|
|
424
424
|
return "undefined";
|
|
425
|
-
if (
|
|
425
|
+
if (h === null)
|
|
426
426
|
return "null";
|
|
427
|
-
if (typeof
|
|
428
|
-
return
|
|
429
|
-
if (typeof
|
|
430
|
-
return Ce(
|
|
431
|
-
if (typeof
|
|
432
|
-
if (
|
|
433
|
-
return 1 / 0 /
|
|
434
|
-
var
|
|
435
|
-
return
|
|
427
|
+
if (typeof h == "boolean")
|
|
428
|
+
return h ? "true" : "false";
|
|
429
|
+
if (typeof h == "string")
|
|
430
|
+
return Ce(h, C);
|
|
431
|
+
if (typeof h == "number") {
|
|
432
|
+
if (h === 0)
|
|
433
|
+
return 1 / 0 / h > 0 ? "0" : "-0";
|
|
434
|
+
var J = String(h);
|
|
435
|
+
return ne ? z(h, J) : J;
|
|
436
436
|
}
|
|
437
|
-
if (typeof
|
|
438
|
-
var O = String(
|
|
439
|
-
return
|
|
437
|
+
if (typeof h == "bigint") {
|
|
438
|
+
var O = String(h) + "n";
|
|
439
|
+
return ne ? z(h, O) : O;
|
|
440
440
|
}
|
|
441
|
-
var
|
|
442
|
-
if (typeof
|
|
443
|
-
return
|
|
444
|
-
var
|
|
445
|
-
if (typeof
|
|
446
|
-
|
|
447
|
-
else if (Pe(
|
|
441
|
+
var U = typeof C.depth > "u" ? 5 : C.depth;
|
|
442
|
+
if (typeof l > "u" && (l = 0), l >= U && U > 0 && typeof h == "object")
|
|
443
|
+
return te(h) ? "[Array]" : "[Object]";
|
|
444
|
+
var V = Le(C, l);
|
|
445
|
+
if (typeof w > "u")
|
|
446
|
+
w = [];
|
|
447
|
+
else if (Pe(w, h) >= 0)
|
|
448
448
|
return "[Circular]";
|
|
449
|
-
function
|
|
450
|
-
if (Ge && (
|
|
449
|
+
function q(Me, Ge, Jr) {
|
|
450
|
+
if (Ge && (w = j.call(w), w.push(Ge)), Jr) {
|
|
451
451
|
var Pr = {
|
|
452
|
-
depth:
|
|
452
|
+
depth: C.depth
|
|
453
453
|
};
|
|
454
|
-
return
|
|
454
|
+
return Z(C, "quoteStyle") && (Pr.quoteStyle = C.quoteStyle), p(Me, Pr, l + 1, w);
|
|
455
455
|
}
|
|
456
|
-
return
|
|
456
|
+
return p(Me, C, l + 1, w);
|
|
457
457
|
}
|
|
458
|
-
if (typeof
|
|
459
|
-
var Y = ke(
|
|
460
|
-
return "[Function" + (Y ? ": " + Y : " (anonymous)") + "]" + (we.length > 0 ? " { " +
|
|
458
|
+
if (typeof h == "function" && !ce(h)) {
|
|
459
|
+
var Y = ke(h), we = ge(h, q);
|
|
460
|
+
return "[Function" + (Y ? ": " + Y : " (anonymous)") + "]" + (we.length > 0 ? " { " + k.call(we, ", ") + " }" : "");
|
|
461
461
|
}
|
|
462
|
-
if (se(
|
|
463
|
-
var Ar =
|
|
464
|
-
return typeof
|
|
462
|
+
if (se(h)) {
|
|
463
|
+
var Ar = B ? y.call(String(h), /^(Symbol\(.*\))_[^)]*$/, "$1") : L.call(h);
|
|
464
|
+
return typeof h == "object" && !B ? le(Ar) : Ar;
|
|
465
465
|
}
|
|
466
|
-
if (_e(
|
|
467
|
-
for (var Fe = "<" +
|
|
468
|
-
Fe += " " + ze[Be].name + "=" +
|
|
469
|
-
return Fe += ">",
|
|
466
|
+
if (_e(h)) {
|
|
467
|
+
for (var Fe = "<" + E.call(String(h.nodeName)), ze = h.attributes || [], Be = 0; Be < ze.length; Be++)
|
|
468
|
+
Fe += " " + ze[Be].name + "=" + K(ie(ze[Be].value), "double", C);
|
|
469
|
+
return Fe += ">", h.childNodes && h.childNodes.length && (Fe += "..."), Fe += "</" + E.call(String(h.nodeName)) + ">", Fe;
|
|
470
470
|
}
|
|
471
|
-
if (
|
|
472
|
-
if (
|
|
471
|
+
if (te(h)) {
|
|
472
|
+
if (h.length === 0)
|
|
473
473
|
return "[]";
|
|
474
|
-
var We = ge(
|
|
475
|
-
return
|
|
474
|
+
var We = ge(h, q);
|
|
475
|
+
return V && !Oe(We) ? "[" + he(We, V) + "]" : "[ " + k.call(We, ", ") + " ]";
|
|
476
476
|
}
|
|
477
|
-
if (ue(
|
|
478
|
-
var Ke = ge(
|
|
479
|
-
return !("cause" in Error.prototype) && "cause" in
|
|
477
|
+
if (ue(h)) {
|
|
478
|
+
var Ke = ge(h, q);
|
|
479
|
+
return !("cause" in Error.prototype) && "cause" in h && !W.call(h, "cause") ? "{ [" + String(h) + "] " + k.call(R.call("[cause]: " + q(h.cause), Ke), ", ") + " }" : Ke.length === 0 ? "[" + String(h) + "]" : "{ [" + String(h) + "] " + k.call(Ke, ", ") + " }";
|
|
480
480
|
}
|
|
481
|
-
if (typeof
|
|
482
|
-
if (
|
|
483
|
-
return
|
|
484
|
-
if (G !== "symbol" && typeof
|
|
485
|
-
return
|
|
481
|
+
if (typeof h == "object" && G) {
|
|
482
|
+
if (ee && typeof h[ee] == "function" && H)
|
|
483
|
+
return H(h, { depth: U - l });
|
|
484
|
+
if (G !== "symbol" && typeof h.inspect == "function")
|
|
485
|
+
return h.inspect();
|
|
486
486
|
}
|
|
487
|
-
if (Ie(
|
|
487
|
+
if (Ie(h)) {
|
|
488
488
|
var br = [];
|
|
489
|
-
return t.call(
|
|
490
|
-
br.push(
|
|
491
|
-
}), Se("Map", a.call(
|
|
489
|
+
return t.call(h, function(Me, Ge) {
|
|
490
|
+
br.push(q(Ge, h, !0) + " => " + q(Me, h));
|
|
491
|
+
}), Se("Map", a.call(h), br, V);
|
|
492
492
|
}
|
|
493
|
-
if (Te(
|
|
493
|
+
if (Te(h)) {
|
|
494
494
|
var Sr = [];
|
|
495
|
-
return
|
|
496
|
-
Sr.push(
|
|
497
|
-
}), Se("Set",
|
|
495
|
+
return u.call(h, function(Me) {
|
|
496
|
+
Sr.push(q(Me, h));
|
|
497
|
+
}), Se("Set", f.call(h), Sr, V);
|
|
498
498
|
}
|
|
499
|
-
if (me(
|
|
499
|
+
if (me(h))
|
|
500
500
|
return fe("WeakMap");
|
|
501
|
-
if (Re(
|
|
501
|
+
if (Re(h))
|
|
502
502
|
return fe("WeakSet");
|
|
503
|
-
if (xe(
|
|
503
|
+
if (xe(h))
|
|
504
504
|
return fe("WeakRef");
|
|
505
|
-
if (de(
|
|
506
|
-
return le(
|
|
507
|
-
if (ye(
|
|
508
|
-
return le(
|
|
509
|
-
if (pe(
|
|
510
|
-
return le(
|
|
511
|
-
if (oe(
|
|
512
|
-
return le(
|
|
513
|
-
if (!
|
|
514
|
-
var He = ge(
|
|
515
|
-
return He.length === 0 ? qe + "{}" :
|
|
505
|
+
if (de(h))
|
|
506
|
+
return le(q(Number(h)));
|
|
507
|
+
if (ye(h))
|
|
508
|
+
return le(q(N.call(h)));
|
|
509
|
+
if (pe(h))
|
|
510
|
+
return le(g.call(h));
|
|
511
|
+
if (oe(h))
|
|
512
|
+
return le(q(String(h)));
|
|
513
|
+
if (!ae(h) && !ce(h)) {
|
|
514
|
+
var He = ge(h, q), wr = T ? T(h) === Object.prototype : h instanceof Object || h.constructor === Object, Je = h instanceof Object ? "" : "null prototype", Er = !wr && $ && Object(h) === h && $ in h ? c.call(re(h), 8, -1) : Je ? "Object" : "", Hr = wr || typeof h.constructor != "function" ? "" : h.constructor.name ? h.constructor.name + " " : "", qe = Hr + (Er || Je ? "[" + k.call(R.call([], Er || [], Je || []), ": ") + "] " : "");
|
|
515
|
+
return He.length === 0 ? qe + "{}" : V ? qe + "{" + he(He, V) + "}" : qe + "{ " + k.call(He, ", ") + " }";
|
|
516
516
|
}
|
|
517
|
-
return String(
|
|
517
|
+
return String(h);
|
|
518
518
|
};
|
|
519
|
-
function
|
|
520
|
-
var
|
|
521
|
-
return
|
|
519
|
+
function K(p, h, D) {
|
|
520
|
+
var l = (D.quoteStyle || h) === "double" ? '"' : "'";
|
|
521
|
+
return l + p + l;
|
|
522
522
|
}
|
|
523
|
-
function ie(
|
|
524
|
-
return
|
|
523
|
+
function ie(p) {
|
|
524
|
+
return y.call(String(p), /"/g, """);
|
|
525
525
|
}
|
|
526
|
-
function
|
|
527
|
-
return
|
|
526
|
+
function te(p) {
|
|
527
|
+
return re(p) === "[object Array]" && (!$ || !(typeof p == "object" && $ in p));
|
|
528
528
|
}
|
|
529
|
-
function
|
|
530
|
-
return
|
|
529
|
+
function ae(p) {
|
|
530
|
+
return re(p) === "[object Date]" && (!$ || !(typeof p == "object" && $ in p));
|
|
531
531
|
}
|
|
532
|
-
function ce(
|
|
533
|
-
return
|
|
532
|
+
function ce(p) {
|
|
533
|
+
return re(p) === "[object RegExp]" && (!$ || !(typeof p == "object" && $ in p));
|
|
534
534
|
}
|
|
535
|
-
function ue(
|
|
536
|
-
return
|
|
535
|
+
function ue(p) {
|
|
536
|
+
return re(p) === "[object Error]" && (!$ || !(typeof p == "object" && $ in p));
|
|
537
537
|
}
|
|
538
|
-
function oe(
|
|
539
|
-
return
|
|
538
|
+
function oe(p) {
|
|
539
|
+
return re(p) === "[object String]" && (!$ || !(typeof p == "object" && $ in p));
|
|
540
540
|
}
|
|
541
|
-
function de(
|
|
542
|
-
return
|
|
541
|
+
function de(p) {
|
|
542
|
+
return re(p) === "[object Number]" && (!$ || !(typeof p == "object" && $ in p));
|
|
543
543
|
}
|
|
544
|
-
function pe(
|
|
545
|
-
return
|
|
544
|
+
function pe(p) {
|
|
545
|
+
return re(p) === "[object Boolean]" && (!$ || !(typeof p == "object" && $ in p));
|
|
546
546
|
}
|
|
547
|
-
function se(
|
|
548
|
-
if (
|
|
549
|
-
return
|
|
550
|
-
if (typeof
|
|
547
|
+
function se(p) {
|
|
548
|
+
if (B)
|
|
549
|
+
return p && typeof p == "object" && p instanceof Symbol;
|
|
550
|
+
if (typeof p == "symbol")
|
|
551
551
|
return !0;
|
|
552
|
-
if (!
|
|
552
|
+
if (!p || typeof p != "object" || !L)
|
|
553
553
|
return !1;
|
|
554
554
|
try {
|
|
555
|
-
return
|
|
555
|
+
return L.call(p), !0;
|
|
556
556
|
} catch {
|
|
557
557
|
}
|
|
558
558
|
return !1;
|
|
559
559
|
}
|
|
560
|
-
function ye(
|
|
561
|
-
if (!
|
|
560
|
+
function ye(p) {
|
|
561
|
+
if (!p || typeof p != "object" || !N)
|
|
562
562
|
return !1;
|
|
563
563
|
try {
|
|
564
|
-
return
|
|
564
|
+
return N.call(p), !0;
|
|
565
565
|
} catch {
|
|
566
566
|
}
|
|
567
567
|
return !1;
|
|
568
568
|
}
|
|
569
|
-
var be = Object.prototype.hasOwnProperty || function(
|
|
570
|
-
return
|
|
569
|
+
var be = Object.prototype.hasOwnProperty || function(p) {
|
|
570
|
+
return p in this;
|
|
571
571
|
};
|
|
572
|
-
function
|
|
573
|
-
return be.call(
|
|
574
|
-
}
|
|
575
|
-
function
|
|
576
|
-
return
|
|
577
|
-
}
|
|
578
|
-
function ke(
|
|
579
|
-
if (
|
|
580
|
-
return
|
|
581
|
-
var
|
|
582
|
-
return
|
|
583
|
-
}
|
|
584
|
-
function Pe(
|
|
585
|
-
if (
|
|
586
|
-
return
|
|
587
|
-
for (var D = 0,
|
|
588
|
-
if (
|
|
572
|
+
function Z(p, h) {
|
|
573
|
+
return be.call(p, h);
|
|
574
|
+
}
|
|
575
|
+
function re(p) {
|
|
576
|
+
return x.call(p);
|
|
577
|
+
}
|
|
578
|
+
function ke(p) {
|
|
579
|
+
if (p.name)
|
|
580
|
+
return p.name;
|
|
581
|
+
var h = n.call(o.call(p), /^function\s*([\w$]+)/);
|
|
582
|
+
return h ? h[1] : null;
|
|
583
|
+
}
|
|
584
|
+
function Pe(p, h) {
|
|
585
|
+
if (p.indexOf)
|
|
586
|
+
return p.indexOf(h);
|
|
587
|
+
for (var D = 0, l = p.length; D < l; D++)
|
|
588
|
+
if (p[D] === h)
|
|
589
589
|
return D;
|
|
590
590
|
return -1;
|
|
591
591
|
}
|
|
592
|
-
function Ie(
|
|
593
|
-
if (!a || !
|
|
592
|
+
function Ie(p) {
|
|
593
|
+
if (!a || !p || typeof p != "object")
|
|
594
594
|
return !1;
|
|
595
595
|
try {
|
|
596
|
-
a.call(
|
|
596
|
+
a.call(p);
|
|
597
597
|
try {
|
|
598
|
-
|
|
598
|
+
f.call(p);
|
|
599
599
|
} catch {
|
|
600
600
|
return !0;
|
|
601
601
|
}
|
|
602
|
-
return
|
|
602
|
+
return p instanceof Map;
|
|
603
603
|
} catch {
|
|
604
604
|
}
|
|
605
605
|
return !1;
|
|
606
606
|
}
|
|
607
|
-
function me(
|
|
608
|
-
if (!
|
|
607
|
+
function me(p) {
|
|
608
|
+
if (!m || !p || typeof p != "object")
|
|
609
609
|
return !1;
|
|
610
610
|
try {
|
|
611
|
-
|
|
611
|
+
m.call(p, m);
|
|
612
612
|
try {
|
|
613
|
-
A.call(
|
|
613
|
+
A.call(p, A);
|
|
614
614
|
} catch {
|
|
615
615
|
return !0;
|
|
616
616
|
}
|
|
617
|
-
return
|
|
617
|
+
return p instanceof WeakMap;
|
|
618
618
|
} catch {
|
|
619
619
|
}
|
|
620
620
|
return !1;
|
|
621
621
|
}
|
|
622
|
-
function xe(
|
|
623
|
-
if (!
|
|
622
|
+
function xe(p) {
|
|
623
|
+
if (!v || !p || typeof p != "object")
|
|
624
624
|
return !1;
|
|
625
625
|
try {
|
|
626
|
-
return
|
|
626
|
+
return v.call(p), !0;
|
|
627
627
|
} catch {
|
|
628
628
|
}
|
|
629
629
|
return !1;
|
|
630
630
|
}
|
|
631
|
-
function Te(
|
|
632
|
-
if (!
|
|
631
|
+
function Te(p) {
|
|
632
|
+
if (!f || !p || typeof p != "object")
|
|
633
633
|
return !1;
|
|
634
634
|
try {
|
|
635
|
-
|
|
635
|
+
f.call(p);
|
|
636
636
|
try {
|
|
637
|
-
a.call(
|
|
637
|
+
a.call(p);
|
|
638
638
|
} catch {
|
|
639
639
|
return !0;
|
|
640
640
|
}
|
|
641
|
-
return
|
|
641
|
+
return p instanceof Set;
|
|
642
642
|
} catch {
|
|
643
643
|
}
|
|
644
644
|
return !1;
|
|
645
645
|
}
|
|
646
|
-
function Re(
|
|
647
|
-
if (!A || !
|
|
646
|
+
function Re(p) {
|
|
647
|
+
if (!A || !p || typeof p != "object")
|
|
648
648
|
return !1;
|
|
649
649
|
try {
|
|
650
|
-
A.call(
|
|
650
|
+
A.call(p, A);
|
|
651
651
|
try {
|
|
652
|
-
|
|
652
|
+
m.call(p, m);
|
|
653
653
|
} catch {
|
|
654
654
|
return !0;
|
|
655
655
|
}
|
|
656
|
-
return
|
|
656
|
+
return p instanceof WeakSet;
|
|
657
657
|
} catch {
|
|
658
658
|
}
|
|
659
659
|
return !1;
|
|
660
660
|
}
|
|
661
|
-
function _e(
|
|
662
|
-
return !
|
|
661
|
+
function _e(p) {
|
|
662
|
+
return !p || typeof p != "object" ? !1 : typeof HTMLElement < "u" && p instanceof HTMLElement ? !0 : typeof p.nodeName == "string" && typeof p.getAttribute == "function";
|
|
663
663
|
}
|
|
664
|
-
function Ce(
|
|
665
|
-
if (
|
|
666
|
-
var D =
|
|
667
|
-
return Ce(
|
|
664
|
+
function Ce(p, h) {
|
|
665
|
+
if (p.length > h.maxStringLength) {
|
|
666
|
+
var D = p.length - h.maxStringLength, l = "... " + D + " more character" + (D > 1 ? "s" : "");
|
|
667
|
+
return Ce(c.call(p, 0, h.maxStringLength), h) + l;
|
|
668
668
|
}
|
|
669
|
-
var
|
|
670
|
-
return
|
|
669
|
+
var w = y.call(y.call(p, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, Ne);
|
|
670
|
+
return K(w, "single", h);
|
|
671
671
|
}
|
|
672
|
-
function Ne(
|
|
673
|
-
var
|
|
672
|
+
function Ne(p) {
|
|
673
|
+
var h = p.charCodeAt(0), D = {
|
|
674
674
|
8: "b",
|
|
675
675
|
9: "t",
|
|
676
676
|
10: "n",
|
|
677
677
|
12: "f",
|
|
678
678
|
13: "r"
|
|
679
|
-
}[
|
|
680
|
-
return D ? "\\" + D : "\\x" + (
|
|
679
|
+
}[h];
|
|
680
|
+
return D ? "\\" + D : "\\x" + (h < 16 ? "0" : "") + b.call(h.toString(16));
|
|
681
681
|
}
|
|
682
|
-
function le(
|
|
683
|
-
return "Object(" +
|
|
682
|
+
function le(p) {
|
|
683
|
+
return "Object(" + p + ")";
|
|
684
684
|
}
|
|
685
|
-
function fe(
|
|
686
|
-
return
|
|
685
|
+
function fe(p) {
|
|
686
|
+
return p + " { ? }";
|
|
687
687
|
}
|
|
688
|
-
function Se(
|
|
689
|
-
var
|
|
690
|
-
return
|
|
688
|
+
function Se(p, h, D, l) {
|
|
689
|
+
var w = l ? he(D, l) : k.call(D, ", ");
|
|
690
|
+
return p + " (" + h + ") {" + w + "}";
|
|
691
691
|
}
|
|
692
|
-
function Oe(
|
|
693
|
-
for (var
|
|
694
|
-
if (Pe(h
|
|
692
|
+
function Oe(p) {
|
|
693
|
+
for (var h = 0; h < p.length; h++)
|
|
694
|
+
if (Pe(p[h], `
|
|
695
695
|
`) >= 0)
|
|
696
696
|
return !1;
|
|
697
697
|
return !0;
|
|
698
698
|
}
|
|
699
|
-
function Le(
|
|
699
|
+
function Le(p, h) {
|
|
700
700
|
var D;
|
|
701
|
-
if (
|
|
701
|
+
if (p.indent === " ")
|
|
702
702
|
D = " ";
|
|
703
|
-
else if (typeof
|
|
704
|
-
D =
|
|
703
|
+
else if (typeof p.indent == "number" && p.indent > 0)
|
|
704
|
+
D = k.call(Array(p.indent + 1), " ");
|
|
705
705
|
else
|
|
706
706
|
return null;
|
|
707
707
|
return {
|
|
708
708
|
base: D,
|
|
709
|
-
prev:
|
|
709
|
+
prev: k.call(Array(h + 1), D)
|
|
710
710
|
};
|
|
711
711
|
}
|
|
712
|
-
function he(
|
|
713
|
-
if (
|
|
712
|
+
function he(p, h) {
|
|
713
|
+
if (p.length === 0)
|
|
714
714
|
return "";
|
|
715
715
|
var D = `
|
|
716
|
-
` +
|
|
717
|
-
return D +
|
|
718
|
-
` +
|
|
716
|
+
` + h.prev + h.base;
|
|
717
|
+
return D + k.call(p, "," + D) + `
|
|
718
|
+
` + h.prev;
|
|
719
719
|
}
|
|
720
|
-
function ge(
|
|
721
|
-
var D =
|
|
720
|
+
function ge(p, h) {
|
|
721
|
+
var D = te(p), l = [];
|
|
722
722
|
if (D) {
|
|
723
|
-
|
|
724
|
-
for (var
|
|
725
|
-
|
|
723
|
+
l.length = p.length;
|
|
724
|
+
for (var w = 0; w < p.length; w++)
|
|
725
|
+
l[w] = Z(p, w) ? h(p[w], p) : "";
|
|
726
726
|
}
|
|
727
|
-
var
|
|
728
|
-
if (
|
|
727
|
+
var C = typeof _ == "function" ? _(p) : [], G;
|
|
728
|
+
if (B) {
|
|
729
729
|
G = {};
|
|
730
|
-
for (var
|
|
731
|
-
G["$" +
|
|
730
|
+
for (var ne = 0; ne < C.length; ne++)
|
|
731
|
+
G["$" + C[ne]] = C[ne];
|
|
732
732
|
}
|
|
733
|
-
for (var
|
|
734
|
-
|
|
735
|
-
if (typeof
|
|
736
|
-
for (var O = 0; O <
|
|
737
|
-
|
|
738
|
-
return
|
|
733
|
+
for (var J in p)
|
|
734
|
+
Z(p, J) && (D && String(Number(J)) === J && J < p.length || B && G["$" + J] instanceof Symbol || (I.call(/[^\w$]/, J) ? l.push(h(J, p) + ": " + h(p[J], p)) : l.push(J + ": " + h(p[J], p))));
|
|
735
|
+
if (typeof _ == "function")
|
|
736
|
+
for (var O = 0; O < C.length; O++)
|
|
737
|
+
W.call(p, C[O]) && l.push("[" + h(C[O]) + "]: " + h(p[C[O]], p));
|
|
738
|
+
return l;
|
|
739
739
|
}
|
|
740
740
|
return nr;
|
|
741
741
|
}
|
|
@@ -743,56 +743,56 @@ var ir, Nr;
|
|
|
743
743
|
function st() {
|
|
744
744
|
if (Nr) return ir;
|
|
745
745
|
Nr = 1;
|
|
746
|
-
var e = hr(), r = tt(), a = /* @__PURE__ */ ot(), t = e("%TypeError%"),
|
|
747
|
-
for (var
|
|
748
|
-
if (
|
|
749
|
-
return
|
|
750
|
-
},
|
|
751
|
-
var
|
|
752
|
-
return
|
|
753
|
-
},
|
|
754
|
-
var
|
|
755
|
-
|
|
746
|
+
var e = hr(), r = tt(), a = /* @__PURE__ */ ot(), t = e("%TypeError%"), i = e("%WeakMap%", !0), s = e("%Map%", !0), f = r("WeakMap.prototype.get", !0), u = r("WeakMap.prototype.set", !0), d = r("WeakMap.prototype.has", !0), m = r("Map.prototype.get", !0), S = r("Map.prototype.set", !0), A = r("Map.prototype.has", !0), P = function(o, n) {
|
|
747
|
+
for (var c = o, y; (y = c.next) !== null; c = y)
|
|
748
|
+
if (y.key === n)
|
|
749
|
+
return c.next = y.next, y.next = o.next, o.next = y, y;
|
|
750
|
+
}, v = function(o, n) {
|
|
751
|
+
var c = P(o, n);
|
|
752
|
+
return c && c.value;
|
|
753
|
+
}, g = function(o, n, c) {
|
|
754
|
+
var y = P(o, n);
|
|
755
|
+
y ? y.value = c : o.next = {
|
|
756
756
|
// eslint-disable-line no-param-reassign
|
|
757
|
-
key:
|
|
758
|
-
next:
|
|
759
|
-
value:
|
|
757
|
+
key: n,
|
|
758
|
+
next: o.next,
|
|
759
|
+
value: c
|
|
760
760
|
};
|
|
761
|
-
},
|
|
762
|
-
return !!
|
|
761
|
+
}, x = function(o, n) {
|
|
762
|
+
return !!P(o, n);
|
|
763
763
|
};
|
|
764
764
|
return ir = function() {
|
|
765
|
-
var
|
|
766
|
-
assert: function(
|
|
767
|
-
if (!
|
|
768
|
-
throw new t("Side channel does not contain " + a(
|
|
765
|
+
var n, c, y, b = {
|
|
766
|
+
assert: function(E) {
|
|
767
|
+
if (!b.has(E))
|
|
768
|
+
throw new t("Side channel does not contain " + a(E));
|
|
769
769
|
},
|
|
770
|
-
get: function(
|
|
771
|
-
if (
|
|
770
|
+
get: function(E) {
|
|
771
|
+
if (i && E && (typeof E == "object" || typeof E == "function")) {
|
|
772
|
+
if (n)
|
|
773
|
+
return f(n, E);
|
|
774
|
+
} else if (s) {
|
|
772
775
|
if (c)
|
|
773
|
-
return m(c,
|
|
774
|
-
} else if (
|
|
775
|
-
|
|
776
|
-
return y(b, P);
|
|
777
|
-
} else if (v)
|
|
778
|
-
return s(v, P);
|
|
776
|
+
return m(c, E);
|
|
777
|
+
} else if (y)
|
|
778
|
+
return v(y, E);
|
|
779
779
|
},
|
|
780
|
-
has: function(
|
|
781
|
-
if (
|
|
780
|
+
has: function(E) {
|
|
781
|
+
if (i && E && (typeof E == "object" || typeof E == "function")) {
|
|
782
|
+
if (n)
|
|
783
|
+
return d(n, E);
|
|
784
|
+
} else if (s) {
|
|
782
785
|
if (c)
|
|
783
|
-
return
|
|
784
|
-
} else if (
|
|
785
|
-
|
|
786
|
-
return A(b, P);
|
|
787
|
-
} else if (v)
|
|
788
|
-
return S(v, P);
|
|
786
|
+
return A(c, E);
|
|
787
|
+
} else if (y)
|
|
788
|
+
return x(y, E);
|
|
789
789
|
return !1;
|
|
790
790
|
},
|
|
791
|
-
set: function(
|
|
792
|
-
|
|
791
|
+
set: function(E, I) {
|
|
792
|
+
i && E && (typeof E == "object" || typeof E == "function") ? (n || (n = new i()), u(n, E, I)) : s ? (c || (c = new s()), S(c, E, I)) : (y || (y = { key: {}, next: null }), g(y, E, I));
|
|
793
793
|
}
|
|
794
794
|
};
|
|
795
|
-
return
|
|
795
|
+
return b;
|
|
796
796
|
}, ir;
|
|
797
797
|
}
|
|
798
798
|
var or, Lr;
|
|
@@ -822,141 +822,141 @@ function Wr() {
|
|
|
822
822
|
if (Fr) return sr;
|
|
823
823
|
Fr = 1;
|
|
824
824
|
var e = gr(), r = Object.prototype.hasOwnProperty, a = Array.isArray, t = (function() {
|
|
825
|
-
for (var
|
|
826
|
-
|
|
827
|
-
return
|
|
828
|
-
})(),
|
|
829
|
-
for (;
|
|
830
|
-
var
|
|
831
|
-
if (a(
|
|
832
|
-
for (var
|
|
833
|
-
typeof b
|
|
834
|
-
|
|
825
|
+
for (var x = [], o = 0; o < 256; ++o)
|
|
826
|
+
x.push("%" + ((o < 16 ? "0" : "") + o.toString(16)).toUpperCase());
|
|
827
|
+
return x;
|
|
828
|
+
})(), i = function(o) {
|
|
829
|
+
for (; o.length > 1; ) {
|
|
830
|
+
var n = o.pop(), c = n.obj[n.prop];
|
|
831
|
+
if (a(c)) {
|
|
832
|
+
for (var y = [], b = 0; b < c.length; ++b)
|
|
833
|
+
typeof c[b] < "u" && y.push(c[b]);
|
|
834
|
+
n.obj[n.prop] = y;
|
|
835
835
|
}
|
|
836
836
|
}
|
|
837
|
-
},
|
|
838
|
-
for (var
|
|
839
|
-
typeof
|
|
840
|
-
return
|
|
841
|
-
},
|
|
842
|
-
if (!
|
|
843
|
-
return
|
|
844
|
-
if (typeof
|
|
845
|
-
if (a(
|
|
846
|
-
|
|
847
|
-
else if (
|
|
848
|
-
(
|
|
837
|
+
}, s = function(o, n) {
|
|
838
|
+
for (var c = n && n.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, y = 0; y < o.length; ++y)
|
|
839
|
+
typeof o[y] < "u" && (c[y] = o[y]);
|
|
840
|
+
return c;
|
|
841
|
+
}, f = function x(o, n, c) {
|
|
842
|
+
if (!n)
|
|
843
|
+
return o;
|
|
844
|
+
if (typeof n != "object") {
|
|
845
|
+
if (a(o))
|
|
846
|
+
o.push(n);
|
|
847
|
+
else if (o && typeof o == "object")
|
|
848
|
+
(c && (c.plainObjects || c.allowPrototypes) || !r.call(Object.prototype, n)) && (o[n] = !0);
|
|
849
849
|
else
|
|
850
|
-
return [
|
|
851
|
-
return
|
|
850
|
+
return [o, n];
|
|
851
|
+
return o;
|
|
852
852
|
}
|
|
853
|
-
if (!
|
|
854
|
-
return [
|
|
855
|
-
var
|
|
856
|
-
return a(
|
|
857
|
-
if (r.call(
|
|
858
|
-
var I =
|
|
859
|
-
I && typeof I == "object" &&
|
|
853
|
+
if (!o || typeof o != "object")
|
|
854
|
+
return [o].concat(n);
|
|
855
|
+
var y = o;
|
|
856
|
+
return a(o) && !a(n) && (y = s(o, c)), a(o) && a(n) ? (n.forEach(function(b, E) {
|
|
857
|
+
if (r.call(o, E)) {
|
|
858
|
+
var I = o[E];
|
|
859
|
+
I && typeof I == "object" && b && typeof b == "object" ? o[E] = x(I, b, c) : o.push(b);
|
|
860
860
|
} else
|
|
861
|
-
|
|
862
|
-
}),
|
|
863
|
-
var I =
|
|
864
|
-
return r.call(
|
|
865
|
-
},
|
|
866
|
-
},
|
|
867
|
-
return Object.keys(
|
|
868
|
-
return
|
|
869
|
-
},
|
|
870
|
-
},
|
|
871
|
-
var
|
|
872
|
-
if (
|
|
873
|
-
return
|
|
861
|
+
o[E] = b;
|
|
862
|
+
}), o) : Object.keys(n).reduce(function(b, E) {
|
|
863
|
+
var I = n[E];
|
|
864
|
+
return r.call(b, E) ? b[E] = x(b[E], I, c) : b[E] = I, b;
|
|
865
|
+
}, y);
|
|
866
|
+
}, u = function(o, n) {
|
|
867
|
+
return Object.keys(n).reduce(function(c, y) {
|
|
868
|
+
return c[y] = n[y], c;
|
|
869
|
+
}, o);
|
|
870
|
+
}, d = function(x, o, n) {
|
|
871
|
+
var c = x.replace(/\+/g, " ");
|
|
872
|
+
if (n === "iso-8859-1")
|
|
873
|
+
return c.replace(/%[0-9a-f]{2}/gi, unescape);
|
|
874
874
|
try {
|
|
875
|
-
return decodeURIComponent(
|
|
875
|
+
return decodeURIComponent(c);
|
|
876
876
|
} catch {
|
|
877
|
-
return
|
|
877
|
+
return c;
|
|
878
878
|
}
|
|
879
|
-
},
|
|
880
|
-
if (
|
|
881
|
-
return
|
|
882
|
-
var
|
|
883
|
-
if (typeof
|
|
884
|
-
return escape(
|
|
885
|
-
return "%26%23" + parseInt(
|
|
879
|
+
}, m = function(o, n, c, y, b) {
|
|
880
|
+
if (o.length === 0)
|
|
881
|
+
return o;
|
|
882
|
+
var E = o;
|
|
883
|
+
if (typeof o == "symbol" ? E = Symbol.prototype.toString.call(o) : typeof o != "string" && (E = String(o)), c === "iso-8859-1")
|
|
884
|
+
return escape(E).replace(/%u[0-9a-f]{4}/gi, function(j) {
|
|
885
|
+
return "%26%23" + parseInt(j.slice(2), 16) + "%3B";
|
|
886
886
|
});
|
|
887
|
-
for (var I = "",
|
|
888
|
-
var
|
|
889
|
-
if (
|
|
890
|
-
I +=
|
|
887
|
+
for (var I = "", R = 0; R < E.length; ++R) {
|
|
888
|
+
var k = E.charCodeAt(R);
|
|
889
|
+
if (k === 45 || k === 46 || k === 95 || k === 126 || k >= 48 && k <= 57 || k >= 65 && k <= 90 || k >= 97 && k <= 122 || b === e.RFC1738 && (k === 40 || k === 41)) {
|
|
890
|
+
I += E.charAt(R);
|
|
891
891
|
continue;
|
|
892
892
|
}
|
|
893
|
-
if (
|
|
894
|
-
I = I + t[
|
|
893
|
+
if (k < 128) {
|
|
894
|
+
I = I + t[k];
|
|
895
895
|
continue;
|
|
896
896
|
}
|
|
897
|
-
if (
|
|
898
|
-
I = I + (t[192 |
|
|
897
|
+
if (k < 2048) {
|
|
898
|
+
I = I + (t[192 | k >> 6] + t[128 | k & 63]);
|
|
899
899
|
continue;
|
|
900
900
|
}
|
|
901
|
-
if (
|
|
902
|
-
I = I + (t[224 |
|
|
901
|
+
if (k < 55296 || k >= 57344) {
|
|
902
|
+
I = I + (t[224 | k >> 12] + t[128 | k >> 6 & 63] + t[128 | k & 63]);
|
|
903
903
|
continue;
|
|
904
904
|
}
|
|
905
|
-
|
|
905
|
+
R += 1, k = 65536 + ((k & 1023) << 10 | E.charCodeAt(R) & 1023), I += t[240 | k >> 18] + t[128 | k >> 12 & 63] + t[128 | k >> 6 & 63] + t[128 | k & 63];
|
|
906
906
|
}
|
|
907
907
|
return I;
|
|
908
|
-
},
|
|
909
|
-
for (var
|
|
910
|
-
for (var
|
|
911
|
-
var
|
|
912
|
-
typeof
|
|
908
|
+
}, S = function(o) {
|
|
909
|
+
for (var n = [{ obj: { o }, prop: "o" }], c = [], y = 0; y < n.length; ++y)
|
|
910
|
+
for (var b = n[y], E = b.obj[b.prop], I = Object.keys(E), R = 0; R < I.length; ++R) {
|
|
911
|
+
var k = I[R], j = E[k];
|
|
912
|
+
typeof j == "object" && j !== null && c.indexOf(j) === -1 && (n.push({ obj: E, prop: k }), c.push(j));
|
|
913
913
|
}
|
|
914
|
-
return n
|
|
915
|
-
}, A = function(
|
|
916
|
-
return Object.prototype.toString.call(
|
|
917
|
-
},
|
|
918
|
-
return !
|
|
919
|
-
},
|
|
920
|
-
return [].concat(
|
|
921
|
-
},
|
|
922
|
-
if (a(
|
|
923
|
-
for (var
|
|
924
|
-
|
|
925
|
-
return
|
|
914
|
+
return i(n), o;
|
|
915
|
+
}, A = function(o) {
|
|
916
|
+
return Object.prototype.toString.call(o) === "[object RegExp]";
|
|
917
|
+
}, P = function(o) {
|
|
918
|
+
return !o || typeof o != "object" ? !1 : !!(o.constructor && o.constructor.isBuffer && o.constructor.isBuffer(o));
|
|
919
|
+
}, v = function(o, n) {
|
|
920
|
+
return [].concat(o, n);
|
|
921
|
+
}, g = function(o, n) {
|
|
922
|
+
if (a(o)) {
|
|
923
|
+
for (var c = [], y = 0; y < o.length; y += 1)
|
|
924
|
+
c.push(n(o[y]));
|
|
925
|
+
return c;
|
|
926
926
|
}
|
|
927
|
-
return
|
|
927
|
+
return n(o);
|
|
928
928
|
};
|
|
929
929
|
return sr = {
|
|
930
|
-
arrayToObject:
|
|
931
|
-
assign:
|
|
932
|
-
combine:
|
|
933
|
-
compact:
|
|
934
|
-
decode:
|
|
935
|
-
encode:
|
|
936
|
-
isBuffer:
|
|
930
|
+
arrayToObject: s,
|
|
931
|
+
assign: u,
|
|
932
|
+
combine: v,
|
|
933
|
+
compact: S,
|
|
934
|
+
decode: d,
|
|
935
|
+
encode: m,
|
|
936
|
+
isBuffer: P,
|
|
937
937
|
isRegExp: A,
|
|
938
|
-
maybeMap:
|
|
939
|
-
merge:
|
|
938
|
+
maybeMap: g,
|
|
939
|
+
merge: f
|
|
940
940
|
}, sr;
|
|
941
941
|
}
|
|
942
942
|
var ur, $r;
|
|
943
943
|
function ut() {
|
|
944
944
|
if ($r) return ur;
|
|
945
945
|
$r = 1;
|
|
946
|
-
var e = st(), r = Wr(), a = gr(), t = Object.prototype.hasOwnProperty,
|
|
947
|
-
brackets: function(
|
|
948
|
-
return
|
|
946
|
+
var e = st(), r = Wr(), a = gr(), t = Object.prototype.hasOwnProperty, i = {
|
|
947
|
+
brackets: function(n) {
|
|
948
|
+
return n + "[]";
|
|
949
949
|
},
|
|
950
950
|
comma: "comma",
|
|
951
|
-
indices: function(
|
|
952
|
-
return
|
|
951
|
+
indices: function(n, c) {
|
|
952
|
+
return n + "[" + c + "]";
|
|
953
953
|
},
|
|
954
|
-
repeat: function(
|
|
955
|
-
return
|
|
954
|
+
repeat: function(n) {
|
|
955
|
+
return n;
|
|
956
956
|
}
|
|
957
|
-
},
|
|
958
|
-
|
|
959
|
-
},
|
|
957
|
+
}, s = Array.isArray, f = String.prototype.split, u = Array.prototype.push, d = function(o, n) {
|
|
958
|
+
u.apply(o, s(n) ? n : [n]);
|
|
959
|
+
}, m = Date.prototype.toISOString, S = a.default, A = {
|
|
960
960
|
addQueryPrefix: !1,
|
|
961
961
|
allowDots: !1,
|
|
962
962
|
charset: "utf-8",
|
|
@@ -965,154 +965,154 @@ function ut() {
|
|
|
965
965
|
encode: !0,
|
|
966
966
|
encoder: r.encode,
|
|
967
967
|
encodeValuesOnly: !1,
|
|
968
|
-
format:
|
|
969
|
-
formatter: a.formatters[
|
|
968
|
+
format: S,
|
|
969
|
+
formatter: a.formatters[S],
|
|
970
970
|
// deprecated
|
|
971
971
|
indices: !1,
|
|
972
|
-
serializeDate: function(
|
|
973
|
-
return
|
|
972
|
+
serializeDate: function(n) {
|
|
973
|
+
return m.call(n);
|
|
974
974
|
},
|
|
975
975
|
skipNulls: !1,
|
|
976
976
|
strictNullHandling: !1
|
|
977
|
-
},
|
|
978
|
-
return typeof
|
|
979
|
-
},
|
|
980
|
-
for (var
|
|
981
|
-
var
|
|
982
|
-
if (
|
|
983
|
-
if (
|
|
977
|
+
}, P = function(n) {
|
|
978
|
+
return typeof n == "string" || typeof n == "number" || typeof n == "boolean" || typeof n == "symbol" || typeof n == "bigint";
|
|
979
|
+
}, v = {}, g = function o(n, c, y, b, E, I, R, k, j, F, N, _, L, B, $, W) {
|
|
980
|
+
for (var T = n, z = W, H = 0, X = !1; (z = z.get(v)) !== void 0 && !X; ) {
|
|
981
|
+
var ee = z.get(n);
|
|
982
|
+
if (H += 1, typeof ee < "u") {
|
|
983
|
+
if (ee === H)
|
|
984
984
|
throw new RangeError("Cyclic object value");
|
|
985
|
-
|
|
985
|
+
X = !0;
|
|
986
986
|
}
|
|
987
|
-
typeof
|
|
987
|
+
typeof z.get(v) > "u" && (H = 0);
|
|
988
988
|
}
|
|
989
|
-
if (typeof
|
|
990
|
-
return
|
|
991
|
-
})),
|
|
992
|
-
if (
|
|
993
|
-
return
|
|
994
|
-
|
|
989
|
+
if (typeof k == "function" ? T = k(c, T) : T instanceof Date ? T = N(T) : y === "comma" && s(T) && (T = r.maybeMap(T, function(re) {
|
|
990
|
+
return re instanceof Date ? N(re) : re;
|
|
991
|
+
})), T === null) {
|
|
992
|
+
if (E)
|
|
993
|
+
return R && !B ? R(c, A.encoder, $, "key", _) : c;
|
|
994
|
+
T = "";
|
|
995
995
|
}
|
|
996
|
-
if (
|
|
997
|
-
if (
|
|
998
|
-
var
|
|
999
|
-
if (
|
|
1000
|
-
for (var ie =
|
|
1001
|
-
|
|
1002
|
-
return [
|
|
996
|
+
if (P(T) || r.isBuffer(T)) {
|
|
997
|
+
if (R) {
|
|
998
|
+
var K = B ? c : R(c, A.encoder, $, "key", _);
|
|
999
|
+
if (y === "comma" && B) {
|
|
1000
|
+
for (var ie = f.call(String(T), ","), te = "", ae = 0; ae < ie.length; ++ae)
|
|
1001
|
+
te += (ae === 0 ? "" : ",") + L(R(ie[ae], A.encoder, $, "value", _));
|
|
1002
|
+
return [L(K) + (b && s(T) && ie.length === 1 ? "[]" : "") + "=" + te];
|
|
1003
1003
|
}
|
|
1004
|
-
return [
|
|
1004
|
+
return [L(K) + "=" + L(R(T, A.encoder, $, "value", _))];
|
|
1005
1005
|
}
|
|
1006
|
-
return [
|
|
1006
|
+
return [L(c) + "=" + L(String(T))];
|
|
1007
1007
|
}
|
|
1008
1008
|
var ce = [];
|
|
1009
|
-
if (typeof
|
|
1009
|
+
if (typeof T > "u")
|
|
1010
1010
|
return ce;
|
|
1011
1011
|
var ue;
|
|
1012
|
-
if (
|
|
1013
|
-
ue = [{ value:
|
|
1014
|
-
else if (
|
|
1015
|
-
ue =
|
|
1012
|
+
if (y === "comma" && s(T))
|
|
1013
|
+
ue = [{ value: T.length > 0 ? T.join(",") || null : void 0 }];
|
|
1014
|
+
else if (s(k))
|
|
1015
|
+
ue = k;
|
|
1016
1016
|
else {
|
|
1017
|
-
var oe = Object.keys(
|
|
1018
|
-
ue =
|
|
1017
|
+
var oe = Object.keys(T);
|
|
1018
|
+
ue = j ? oe.sort(j) : oe;
|
|
1019
1019
|
}
|
|
1020
|
-
for (var de =
|
|
1021
|
-
var se = ue[pe], ye = typeof se == "object" && typeof se.value < "u" ? se.value :
|
|
1020
|
+
for (var de = b && s(T) && T.length === 1 ? c + "[]" : c, pe = 0; pe < ue.length; ++pe) {
|
|
1021
|
+
var se = ue[pe], ye = typeof se == "object" && typeof se.value < "u" ? se.value : T[se];
|
|
1022
1022
|
if (!(I && ye === null)) {
|
|
1023
|
-
var be =
|
|
1024
|
-
|
|
1025
|
-
var
|
|
1026
|
-
|
|
1023
|
+
var be = s(T) ? typeof y == "function" ? y(de, se) : de : de + (F ? "." + se : "[" + se + "]");
|
|
1024
|
+
W.set(n, H);
|
|
1025
|
+
var Z = e();
|
|
1026
|
+
Z.set(v, W), d(ce, o(
|
|
1027
1027
|
ye,
|
|
1028
1028
|
be,
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1029
|
+
y,
|
|
1030
|
+
b,
|
|
1031
|
+
E,
|
|
1032
1032
|
I,
|
|
1033
|
+
R,
|
|
1034
|
+
k,
|
|
1035
|
+
j,
|
|
1036
|
+
F,
|
|
1033
1037
|
N,
|
|
1034
|
-
|
|
1035
|
-
V,
|
|
1036
|
-
U,
|
|
1038
|
+
_,
|
|
1037
1039
|
L,
|
|
1038
|
-
|
|
1039
|
-
T,
|
|
1040
|
-
R,
|
|
1040
|
+
B,
|
|
1041
1041
|
$,
|
|
1042
|
-
|
|
1042
|
+
Z
|
|
1043
1043
|
));
|
|
1044
1044
|
}
|
|
1045
1045
|
}
|
|
1046
1046
|
return ce;
|
|
1047
|
-
},
|
|
1048
|
-
if (!
|
|
1047
|
+
}, x = function(n) {
|
|
1048
|
+
if (!n)
|
|
1049
1049
|
return A;
|
|
1050
|
-
if (
|
|
1050
|
+
if (n.encoder !== null && typeof n.encoder < "u" && typeof n.encoder != "function")
|
|
1051
1051
|
throw new TypeError("Encoder has to be a function.");
|
|
1052
|
-
var
|
|
1053
|
-
if (typeof
|
|
1052
|
+
var c = n.charset || A.charset;
|
|
1053
|
+
if (typeof n.charset < "u" && n.charset !== "utf-8" && n.charset !== "iso-8859-1")
|
|
1054
1054
|
throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
|
|
1055
|
-
var
|
|
1056
|
-
if (typeof
|
|
1057
|
-
if (!t.call(a.formatters,
|
|
1055
|
+
var y = a.default;
|
|
1056
|
+
if (typeof n.format < "u") {
|
|
1057
|
+
if (!t.call(a.formatters, n.format))
|
|
1058
1058
|
throw new TypeError("Unknown format option provided.");
|
|
1059
|
-
|
|
1059
|
+
y = n.format;
|
|
1060
1060
|
}
|
|
1061
|
-
var
|
|
1062
|
-
return (typeof
|
|
1063
|
-
addQueryPrefix: typeof
|
|
1064
|
-
allowDots: typeof
|
|
1065
|
-
charset:
|
|
1066
|
-
charsetSentinel: typeof
|
|
1067
|
-
delimiter: typeof
|
|
1068
|
-
encode: typeof
|
|
1069
|
-
encoder: typeof
|
|
1070
|
-
encodeValuesOnly: typeof
|
|
1071
|
-
filter:
|
|
1072
|
-
format:
|
|
1073
|
-
formatter:
|
|
1074
|
-
serializeDate: typeof
|
|
1075
|
-
skipNulls: typeof
|
|
1076
|
-
sort: typeof
|
|
1077
|
-
strictNullHandling: typeof
|
|
1061
|
+
var b = a.formatters[y], E = A.filter;
|
|
1062
|
+
return (typeof n.filter == "function" || s(n.filter)) && (E = n.filter), {
|
|
1063
|
+
addQueryPrefix: typeof n.addQueryPrefix == "boolean" ? n.addQueryPrefix : A.addQueryPrefix,
|
|
1064
|
+
allowDots: typeof n.allowDots > "u" ? A.allowDots : !!n.allowDots,
|
|
1065
|
+
charset: c,
|
|
1066
|
+
charsetSentinel: typeof n.charsetSentinel == "boolean" ? n.charsetSentinel : A.charsetSentinel,
|
|
1067
|
+
delimiter: typeof n.delimiter > "u" ? A.delimiter : n.delimiter,
|
|
1068
|
+
encode: typeof n.encode == "boolean" ? n.encode : A.encode,
|
|
1069
|
+
encoder: typeof n.encoder == "function" ? n.encoder : A.encoder,
|
|
1070
|
+
encodeValuesOnly: typeof n.encodeValuesOnly == "boolean" ? n.encodeValuesOnly : A.encodeValuesOnly,
|
|
1071
|
+
filter: E,
|
|
1072
|
+
format: y,
|
|
1073
|
+
formatter: b,
|
|
1074
|
+
serializeDate: typeof n.serializeDate == "function" ? n.serializeDate : A.serializeDate,
|
|
1075
|
+
skipNulls: typeof n.skipNulls == "boolean" ? n.skipNulls : A.skipNulls,
|
|
1076
|
+
sort: typeof n.sort == "function" ? n.sort : null,
|
|
1077
|
+
strictNullHandling: typeof n.strictNullHandling == "boolean" ? n.strictNullHandling : A.strictNullHandling
|
|
1078
1078
|
};
|
|
1079
1079
|
};
|
|
1080
|
-
return ur = function(
|
|
1081
|
-
var
|
|
1082
|
-
typeof
|
|
1080
|
+
return ur = function(o, n) {
|
|
1081
|
+
var c = o, y = x(n), b, E;
|
|
1082
|
+
typeof y.filter == "function" ? (E = y.filter, c = E("", c)) : s(y.filter) && (E = y.filter, b = E);
|
|
1083
1083
|
var I = [];
|
|
1084
|
-
if (typeof
|
|
1084
|
+
if (typeof c != "object" || c === null)
|
|
1085
1085
|
return "";
|
|
1086
|
-
var
|
|
1087
|
-
|
|
1088
|
-
var
|
|
1089
|
-
if (
|
|
1086
|
+
var R;
|
|
1087
|
+
n && n.arrayFormat in i ? R = n.arrayFormat : n && "indices" in n ? R = n.indices ? "indices" : "repeat" : R = "indices";
|
|
1088
|
+
var k = i[R];
|
|
1089
|
+
if (n && "commaRoundTrip" in n && typeof n.commaRoundTrip != "boolean")
|
|
1090
1090
|
throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
|
|
1091
|
-
var
|
|
1092
|
-
|
|
1093
|
-
for (var
|
|
1094
|
-
var
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1091
|
+
var j = k === "comma" && n && n.commaRoundTrip;
|
|
1092
|
+
b || (b = Object.keys(c)), y.sort && b.sort(y.sort);
|
|
1093
|
+
for (var F = e(), N = 0; N < b.length; ++N) {
|
|
1094
|
+
var _ = b[N];
|
|
1095
|
+
y.skipNulls && c[_] === null || d(I, g(
|
|
1096
|
+
c[_],
|
|
1097
|
+
_,
|
|
1098
|
+
k,
|
|
1099
|
+
j,
|
|
1100
|
+
y.strictNullHandling,
|
|
1101
|
+
y.skipNulls,
|
|
1102
|
+
y.encode ? y.encoder : null,
|
|
1103
|
+
y.filter,
|
|
1104
|
+
y.sort,
|
|
1105
|
+
y.allowDots,
|
|
1106
|
+
y.serializeDate,
|
|
1107
|
+
y.format,
|
|
1108
|
+
y.formatter,
|
|
1109
|
+
y.encodeValuesOnly,
|
|
1110
|
+
y.charset,
|
|
1111
|
+
F
|
|
1112
1112
|
));
|
|
1113
1113
|
}
|
|
1114
|
-
var
|
|
1115
|
-
return
|
|
1114
|
+
var L = I.join(y.delimiter), B = y.addQueryPrefix === !0 ? "?" : "";
|
|
1115
|
+
return y.charsetSentinel && (y.charset === "iso-8859-1" ? B += "utf8=%26%2310003%3B&" : B += "utf8=%E2%9C%93&"), L.length > 0 ? B + L : "";
|
|
1116
1116
|
}, ur;
|
|
1117
1117
|
}
|
|
1118
1118
|
var cr, Ur;
|
|
@@ -1136,93 +1136,93 @@ function ct() {
|
|
|
1136
1136
|
parseArrays: !0,
|
|
1137
1137
|
plainObjects: !1,
|
|
1138
1138
|
strictNullHandling: !1
|
|
1139
|
-
},
|
|
1140
|
-
return
|
|
1141
|
-
return String.fromCharCode(parseInt(
|
|
1139
|
+
}, i = function(P) {
|
|
1140
|
+
return P.replace(/&#(\d+);/g, function(v, g) {
|
|
1141
|
+
return String.fromCharCode(parseInt(g, 10));
|
|
1142
1142
|
});
|
|
1143
|
-
},
|
|
1144
|
-
return
|
|
1145
|
-
},
|
|
1146
|
-
var
|
|
1147
|
-
if (
|
|
1148
|
-
for (
|
|
1149
|
-
b
|
|
1150
|
-
for (
|
|
1151
|
-
if (
|
|
1152
|
-
var I = b
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
function(
|
|
1156
|
-
return
|
|
1143
|
+
}, s = function(P, v) {
|
|
1144
|
+
return P && typeof P == "string" && v.comma && P.indexOf(",") > -1 ? P.split(",") : P;
|
|
1145
|
+
}, f = "utf8=%26%2310003%3B", u = "utf8=%E2%9C%93", d = function(v, g) {
|
|
1146
|
+
var x = {}, o = g.ignoreQueryPrefix ? v.replace(/^\?/, "") : v, n = g.parameterLimit === 1 / 0 ? void 0 : g.parameterLimit, c = o.split(g.delimiter, n), y = -1, b, E = g.charset;
|
|
1147
|
+
if (g.charsetSentinel)
|
|
1148
|
+
for (b = 0; b < c.length; ++b)
|
|
1149
|
+
c[b].indexOf("utf8=") === 0 && (c[b] === u ? E = "utf-8" : c[b] === f && (E = "iso-8859-1"), y = b, b = c.length);
|
|
1150
|
+
for (b = 0; b < c.length; ++b)
|
|
1151
|
+
if (b !== y) {
|
|
1152
|
+
var I = c[b], R = I.indexOf("]="), k = R === -1 ? I.indexOf("=") : R + 1, j, F;
|
|
1153
|
+
k === -1 ? (j = g.decoder(I, t.decoder, E, "key"), F = g.strictNullHandling ? null : "") : (j = g.decoder(I.slice(0, k), t.decoder, E, "key"), F = e.maybeMap(
|
|
1154
|
+
s(I.slice(k + 1), g),
|
|
1155
|
+
function(N) {
|
|
1156
|
+
return g.decoder(N, t.decoder, E, "value");
|
|
1157
1157
|
}
|
|
1158
|
-
)),
|
|
1158
|
+
)), F && g.interpretNumericEntities && E === "iso-8859-1" && (F = i(F)), I.indexOf("[]=") > -1 && (F = a(F) ? [F] : F), r.call(x, j) ? x[j] = e.combine(x[j], F) : x[j] = F;
|
|
1159
1159
|
}
|
|
1160
|
-
return
|
|
1161
|
-
},
|
|
1162
|
-
for (var
|
|
1163
|
-
var
|
|
1164
|
-
if (
|
|
1165
|
-
|
|
1160
|
+
return x;
|
|
1161
|
+
}, m = function(P, v, g, x) {
|
|
1162
|
+
for (var o = x ? v : s(v, g), n = P.length - 1; n >= 0; --n) {
|
|
1163
|
+
var c, y = P[n];
|
|
1164
|
+
if (y === "[]" && g.parseArrays)
|
|
1165
|
+
c = [].concat(o);
|
|
1166
1166
|
else {
|
|
1167
|
-
|
|
1168
|
-
var
|
|
1169
|
-
!
|
|
1167
|
+
c = g.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
|
|
1168
|
+
var b = y.charAt(0) === "[" && y.charAt(y.length - 1) === "]" ? y.slice(1, -1) : y, E = parseInt(b, 10);
|
|
1169
|
+
!g.parseArrays && b === "" ? c = { 0: o } : !isNaN(E) && y !== b && String(E) === b && E >= 0 && g.parseArrays && E <= g.arrayLimit ? (c = [], c[E] = o) : b !== "__proto__" && (c[b] = o);
|
|
1170
1170
|
}
|
|
1171
|
-
|
|
1171
|
+
o = c;
|
|
1172
1172
|
}
|
|
1173
|
-
return
|
|
1174
|
-
},
|
|
1175
|
-
if (
|
|
1176
|
-
var
|
|
1177
|
-
if (
|
|
1178
|
-
if (!
|
|
1173
|
+
return o;
|
|
1174
|
+
}, S = function(v, g, x, o) {
|
|
1175
|
+
if (v) {
|
|
1176
|
+
var n = x.allowDots ? v.replace(/\.([^.[]+)/g, "[$1]") : v, c = /(\[[^[\]]*])/, y = /(\[[^[\]]*])/g, b = x.depth > 0 && c.exec(n), E = b ? n.slice(0, b.index) : n, I = [];
|
|
1177
|
+
if (E) {
|
|
1178
|
+
if (!x.plainObjects && r.call(Object.prototype, E) && !x.allowPrototypes)
|
|
1179
1179
|
return;
|
|
1180
|
-
I.push(
|
|
1180
|
+
I.push(E);
|
|
1181
1181
|
}
|
|
1182
|
-
for (var
|
|
1183
|
-
if (
|
|
1182
|
+
for (var R = 0; x.depth > 0 && (b = y.exec(n)) !== null && R < x.depth; ) {
|
|
1183
|
+
if (R += 1, !x.plainObjects && r.call(Object.prototype, b[1].slice(1, -1)) && !x.allowPrototypes)
|
|
1184
1184
|
return;
|
|
1185
|
-
I.push(
|
|
1185
|
+
I.push(b[1]);
|
|
1186
1186
|
}
|
|
1187
|
-
return
|
|
1187
|
+
return b && I.push("[" + n.slice(b.index) + "]"), m(I, g, x, o);
|
|
1188
1188
|
}
|
|
1189
|
-
}, A = function(
|
|
1190
|
-
if (!
|
|
1189
|
+
}, A = function(v) {
|
|
1190
|
+
if (!v)
|
|
1191
1191
|
return t;
|
|
1192
|
-
if (
|
|
1192
|
+
if (v.decoder !== null && v.decoder !== void 0 && typeof v.decoder != "function")
|
|
1193
1193
|
throw new TypeError("Decoder has to be a function.");
|
|
1194
|
-
if (typeof
|
|
1194
|
+
if (typeof v.charset < "u" && v.charset !== "utf-8" && v.charset !== "iso-8859-1")
|
|
1195
1195
|
throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
|
|
1196
|
-
var
|
|
1196
|
+
var g = typeof v.charset > "u" ? t.charset : v.charset;
|
|
1197
1197
|
return {
|
|
1198
|
-
allowDots: typeof
|
|
1199
|
-
allowPrototypes: typeof
|
|
1200
|
-
allowSparse: typeof
|
|
1201
|
-
arrayLimit: typeof
|
|
1202
|
-
charset:
|
|
1203
|
-
charsetSentinel: typeof
|
|
1204
|
-
comma: typeof
|
|
1205
|
-
decoder: typeof
|
|
1206
|
-
delimiter: typeof
|
|
1198
|
+
allowDots: typeof v.allowDots > "u" ? t.allowDots : !!v.allowDots,
|
|
1199
|
+
allowPrototypes: typeof v.allowPrototypes == "boolean" ? v.allowPrototypes : t.allowPrototypes,
|
|
1200
|
+
allowSparse: typeof v.allowSparse == "boolean" ? v.allowSparse : t.allowSparse,
|
|
1201
|
+
arrayLimit: typeof v.arrayLimit == "number" ? v.arrayLimit : t.arrayLimit,
|
|
1202
|
+
charset: g,
|
|
1203
|
+
charsetSentinel: typeof v.charsetSentinel == "boolean" ? v.charsetSentinel : t.charsetSentinel,
|
|
1204
|
+
comma: typeof v.comma == "boolean" ? v.comma : t.comma,
|
|
1205
|
+
decoder: typeof v.decoder == "function" ? v.decoder : t.decoder,
|
|
1206
|
+
delimiter: typeof v.delimiter == "string" || e.isRegExp(v.delimiter) ? v.delimiter : t.delimiter,
|
|
1207
1207
|
// eslint-disable-next-line no-implicit-coercion, no-extra-parens
|
|
1208
|
-
depth: typeof
|
|
1209
|
-
ignoreQueryPrefix:
|
|
1210
|
-
interpretNumericEntities: typeof
|
|
1211
|
-
parameterLimit: typeof
|
|
1212
|
-
parseArrays:
|
|
1213
|
-
plainObjects: typeof
|
|
1214
|
-
strictNullHandling: typeof
|
|
1208
|
+
depth: typeof v.depth == "number" || v.depth === !1 ? +v.depth : t.depth,
|
|
1209
|
+
ignoreQueryPrefix: v.ignoreQueryPrefix === !0,
|
|
1210
|
+
interpretNumericEntities: typeof v.interpretNumericEntities == "boolean" ? v.interpretNumericEntities : t.interpretNumericEntities,
|
|
1211
|
+
parameterLimit: typeof v.parameterLimit == "number" ? v.parameterLimit : t.parameterLimit,
|
|
1212
|
+
parseArrays: v.parseArrays !== !1,
|
|
1213
|
+
plainObjects: typeof v.plainObjects == "boolean" ? v.plainObjects : t.plainObjects,
|
|
1214
|
+
strictNullHandling: typeof v.strictNullHandling == "boolean" ? v.strictNullHandling : t.strictNullHandling
|
|
1215
1215
|
};
|
|
1216
1216
|
};
|
|
1217
|
-
return cr = function(
|
|
1218
|
-
var
|
|
1219
|
-
if (
|
|
1220
|
-
return
|
|
1221
|
-
for (var
|
|
1222
|
-
var
|
|
1223
|
-
|
|
1217
|
+
return cr = function(P, v) {
|
|
1218
|
+
var g = A(v);
|
|
1219
|
+
if (P === "" || P === null || typeof P > "u")
|
|
1220
|
+
return g.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
|
|
1221
|
+
for (var x = typeof P == "string" ? d(P, g) : P, o = g.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, n = Object.keys(x), c = 0; c < n.length; ++c) {
|
|
1222
|
+
var y = n[c], b = S(y, x[y], g, typeof P == "string");
|
|
1223
|
+
o = e.merge(o, b, g);
|
|
1224
1224
|
}
|
|
1225
|
-
return
|
|
1225
|
+
return g.allowSparse === !0 ? o : e.compact(o);
|
|
1226
1226
|
}, cr;
|
|
1227
1227
|
}
|
|
1228
1228
|
var lr, Br;
|
|
@@ -1237,87 +1237,87 @@ function lt() {
|
|
|
1237
1237
|
}, lr;
|
|
1238
1238
|
}
|
|
1239
1239
|
var ft = lt();
|
|
1240
|
-
const dt = /* @__PURE__ */ mr(ft), vr = "0.1.
|
|
1240
|
+
const dt = /* @__PURE__ */ mr(ft), vr = "0.1.210", pt = Ee.CancelToken;
|
|
1241
1241
|
var mt = function(e) {
|
|
1242
1242
|
var r;
|
|
1243
1243
|
typeof window < "u" && (r = e.cache.get("api"));
|
|
1244
1244
|
const a = Ee.defaults.adapter;
|
|
1245
|
-
function t(
|
|
1246
|
-
var
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1245
|
+
function t(d) {
|
|
1246
|
+
var m = [
|
|
1247
|
+
d.method,
|
|
1248
|
+
d.url,
|
|
1249
|
+
d.headers?.Authorization,
|
|
1250
|
+
d.headers.Accept,
|
|
1251
1251
|
JSON.stringify({
|
|
1252
|
-
params:
|
|
1253
|
-
data:
|
|
1252
|
+
params: d.params,
|
|
1253
|
+
data: d.data
|
|
1254
1254
|
})
|
|
1255
1255
|
].filter(Boolean).join("-");
|
|
1256
|
-
return
|
|
1256
|
+
return m;
|
|
1257
1257
|
}
|
|
1258
|
-
const
|
|
1259
|
-
var
|
|
1260
|
-
return
|
|
1261
|
-
var
|
|
1262
|
-
switch (String(
|
|
1258
|
+
const i = {}, f = u(function(d) {
|
|
1259
|
+
var m = t(d);
|
|
1260
|
+
return i[m] || (i[m] = new Promise(function(S, A) {
|
|
1261
|
+
var P, v;
|
|
1262
|
+
switch (String(d.method).toLowerCase()) {
|
|
1263
1263
|
case "post":
|
|
1264
1264
|
case "patch":
|
|
1265
1265
|
case "put":
|
|
1266
1266
|
case "delete":
|
|
1267
|
-
|
|
1267
|
+
d.cache || (d.cache = !1);
|
|
1268
1268
|
break;
|
|
1269
1269
|
}
|
|
1270
|
-
return
|
|
1271
|
-
function(
|
|
1272
|
-
delete
|
|
1270
|
+
return d.cache === !1 || (P = d.cache || r, P && (v = P.get(m))), v ? S(v) : (Object.assign(d, { adapter: a }), Ee.request(d).then(
|
|
1271
|
+
function(g) {
|
|
1272
|
+
delete i[m], S(g);
|
|
1273
1273
|
},
|
|
1274
|
-
function(
|
|
1275
|
-
delete
|
|
1274
|
+
function(g) {
|
|
1275
|
+
delete i[m], A(g);
|
|
1276
1276
|
}
|
|
1277
1277
|
));
|
|
1278
|
-
})),
|
|
1278
|
+
})), i[m];
|
|
1279
1279
|
});
|
|
1280
|
-
|
|
1281
|
-
|
|
1280
|
+
f.generateEndpointURL = function(d, m, S) {
|
|
1281
|
+
S = S || {}, m = m || {};
|
|
1282
1282
|
var A;
|
|
1283
|
-
const
|
|
1284
|
-
|
|
1285
|
-
var
|
|
1286
|
-
A ?
|
|
1287
|
-
var
|
|
1288
|
-
return
|
|
1289
|
-
},
|
|
1290
|
-
return Ee.isCancel(
|
|
1283
|
+
const P = S.file && e.fileAPI || e.apiURL;
|
|
1284
|
+
S.withoutToken || (delete m.access_token, A = e.auth.getCurrentToken()), d[0] == "/" && d.slice(1);
|
|
1285
|
+
var v = e.utils.mapParameters(m);
|
|
1286
|
+
A ? v = v ? `?access_token=${A}&${v}` : `?access_token=${A}` : v = v ? `?${v}` : "";
|
|
1287
|
+
var g = `${P}${d}${v}`;
|
|
1288
|
+
return g;
|
|
1289
|
+
}, f.wasCancelled = function(d) {
|
|
1290
|
+
return Ee.isCancel(d);
|
|
1291
1291
|
};
|
|
1292
|
-
function
|
|
1293
|
-
var
|
|
1292
|
+
function u(d) {
|
|
1293
|
+
var m = Ee.create({
|
|
1294
1294
|
paramsSerializer: (A) => dt.stringify(A, { arrayFormat: "repeat" }),
|
|
1295
|
-
adapter:
|
|
1295
|
+
adapter: d
|
|
1296
1296
|
});
|
|
1297
|
-
|
|
1297
|
+
m.defaults.baseURL = e.apiURL, m.defaults.headers.common.Accept = "application/json", m.interceptors.request.use(function(A) {
|
|
1298
1298
|
if (t(A), A.withoutToken)
|
|
1299
1299
|
return A;
|
|
1300
1300
|
if (A.headers["qik-request-date"] = (/* @__PURE__ */ new Date()).getTime(), Intl) {
|
|
1301
|
-
const
|
|
1302
|
-
|
|
1301
|
+
const v = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
1302
|
+
v && (A.headers["qik-request-timezone"] = v);
|
|
1303
1303
|
}
|
|
1304
1304
|
A.headers["qik-api-version"] = vr, e?.socket?.windowID && (A.headers["qik-socket-window"] = e.socket.windowID);
|
|
1305
|
-
var
|
|
1306
|
-
return
|
|
1305
|
+
var P = e.auth.getCurrentToken();
|
|
1306
|
+
return P && (A.headers.Authorization = `Bearer ${P}`, A.params && A.params.access_token && delete A.params.access_token), A;
|
|
1307
1307
|
});
|
|
1308
|
-
let
|
|
1309
|
-
return
|
|
1308
|
+
let S = 0;
|
|
1309
|
+
return m.interceptors.response.use(
|
|
1310
1310
|
function(A) {
|
|
1311
|
-
var
|
|
1312
|
-
switch (
|
|
1311
|
+
var P = A.config, v = A.status;
|
|
1312
|
+
switch (v) {
|
|
1313
1313
|
case 204:
|
|
1314
|
-
if (
|
|
1315
|
-
return
|
|
1314
|
+
if (S < 5)
|
|
1315
|
+
return S++, new Promise(function(g, x) {
|
|
1316
1316
|
setTimeout(function() {
|
|
1317
|
-
return
|
|
1317
|
+
return m.request(P).then(g, x);
|
|
1318
1318
|
}, 800);
|
|
1319
1319
|
});
|
|
1320
|
-
console.log("Failed after 5 retries"),
|
|
1320
|
+
console.log("Failed after 5 retries"), S = 0;
|
|
1321
1321
|
break;
|
|
1322
1322
|
}
|
|
1323
1323
|
return A;
|
|
@@ -1325,248 +1325,248 @@ var mt = function(e) {
|
|
|
1325
1325
|
function(A) {
|
|
1326
1326
|
if (Ee.isCancel(A))
|
|
1327
1327
|
return Promise.reject(A);
|
|
1328
|
-
var
|
|
1329
|
-
switch (
|
|
1328
|
+
var P = A?.response?.status || A.status;
|
|
1329
|
+
switch (P) {
|
|
1330
1330
|
case 401:
|
|
1331
1331
|
break;
|
|
1332
1332
|
case 502:
|
|
1333
1333
|
case 504:
|
|
1334
|
-
if (
|
|
1335
|
-
return
|
|
1334
|
+
if (S < 5)
|
|
1335
|
+
return S++, new Promise(function(v, g) {
|
|
1336
1336
|
setTimeout(function() {
|
|
1337
|
-
return
|
|
1337
|
+
return m.request(A.config).then(v, g);
|
|
1338
1338
|
}, 800);
|
|
1339
1339
|
});
|
|
1340
|
-
console.log("Failed after 5 retries"),
|
|
1340
|
+
console.log("Failed after 5 retries"), S = 0;
|
|
1341
1341
|
break;
|
|
1342
1342
|
}
|
|
1343
1343
|
return Promise.reject(A);
|
|
1344
1344
|
}
|
|
1345
|
-
),
|
|
1345
|
+
), m;
|
|
1346
1346
|
}
|
|
1347
|
-
return
|
|
1347
|
+
return f.CancelToken = pt, f.axios = Ee, f;
|
|
1348
1348
|
}, fr, Gr;
|
|
1349
1349
|
function yt() {
|
|
1350
1350
|
if (Gr) return fr;
|
|
1351
1351
|
Gr = 1;
|
|
1352
|
-
var e = "Expected a function", r = "__lodash_hash_undefined__", a = "[object Function]", t = "[object GeneratorFunction]",
|
|
1353
|
-
function
|
|
1354
|
-
return
|
|
1352
|
+
var e = "Expected a function", r = "__lodash_hash_undefined__", a = "[object Function]", t = "[object GeneratorFunction]", i = "[object Symbol]", s = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, f = /^\w*$/, u = /^\./, d = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, m = /[\\^$.*+?()[\]{}|]/g, S = /\\(\\)?/g, A = /^\[object .+?Constructor\]$/, P = typeof Ae == "object" && Ae && Ae.Object === Object && Ae, v = typeof self == "object" && self && self.Object === Object && self, g = P || v || Function("return this")();
|
|
1353
|
+
function x(l, w) {
|
|
1354
|
+
return l?.[w];
|
|
1355
1355
|
}
|
|
1356
|
-
function
|
|
1357
|
-
var
|
|
1358
|
-
if (
|
|
1356
|
+
function o(l) {
|
|
1357
|
+
var w = !1;
|
|
1358
|
+
if (l != null && typeof l.toString != "function")
|
|
1359
1359
|
try {
|
|
1360
|
-
|
|
1360
|
+
w = !!(l + "");
|
|
1361
1361
|
} catch {
|
|
1362
1362
|
}
|
|
1363
|
-
return
|
|
1364
|
-
}
|
|
1365
|
-
var
|
|
1366
|
-
var
|
|
1367
|
-
return
|
|
1368
|
-
})(), I =
|
|
1369
|
-
"^" + I.call(
|
|
1370
|
-
),
|
|
1371
|
-
function
|
|
1372
|
-
var
|
|
1373
|
-
for (this.clear(); ++
|
|
1374
|
-
var G =
|
|
1363
|
+
return w;
|
|
1364
|
+
}
|
|
1365
|
+
var n = Array.prototype, c = Function.prototype, y = Object.prototype, b = g["__core-js_shared__"], E = (function() {
|
|
1366
|
+
var l = /[^.]+$/.exec(b && b.keys && b.keys.IE_PROTO || "");
|
|
1367
|
+
return l ? "Symbol(src)_1." + l : "";
|
|
1368
|
+
})(), I = c.toString, R = y.hasOwnProperty, k = y.toString, j = RegExp(
|
|
1369
|
+
"^" + I.call(R).replace(m, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
1370
|
+
), F = g.Symbol, N = n.splice, _ = xe(g, "Map"), L = xe(Object, "create"), B = F ? F.prototype : void 0, $ = B ? B.toString : void 0;
|
|
1371
|
+
function W(l) {
|
|
1372
|
+
var w = -1, C = l ? l.length : 0;
|
|
1373
|
+
for (this.clear(); ++w < C; ) {
|
|
1374
|
+
var G = l[w];
|
|
1375
1375
|
this.set(G[0], G[1]);
|
|
1376
1376
|
}
|
|
1377
1377
|
}
|
|
1378
|
-
function
|
|
1379
|
-
this.__data__ =
|
|
1378
|
+
function T() {
|
|
1379
|
+
this.__data__ = L ? L(null) : {};
|
|
1380
1380
|
}
|
|
1381
|
-
function
|
|
1382
|
-
return this.has(
|
|
1381
|
+
function z(l) {
|
|
1382
|
+
return this.has(l) && delete this.__data__[l];
|
|
1383
1383
|
}
|
|
1384
|
-
function
|
|
1385
|
-
var
|
|
1386
|
-
if (
|
|
1387
|
-
var
|
|
1388
|
-
return
|
|
1384
|
+
function H(l) {
|
|
1385
|
+
var w = this.__data__;
|
|
1386
|
+
if (L) {
|
|
1387
|
+
var C = w[l];
|
|
1388
|
+
return C === r ? void 0 : C;
|
|
1389
1389
|
}
|
|
1390
|
-
return
|
|
1390
|
+
return R.call(w, l) ? w[l] : void 0;
|
|
1391
1391
|
}
|
|
1392
|
-
function
|
|
1393
|
-
var
|
|
1394
|
-
return
|
|
1392
|
+
function X(l) {
|
|
1393
|
+
var w = this.__data__;
|
|
1394
|
+
return L ? w[l] !== void 0 : R.call(w, l);
|
|
1395
1395
|
}
|
|
1396
|
-
function
|
|
1397
|
-
var
|
|
1398
|
-
return
|
|
1396
|
+
function ee(l, w) {
|
|
1397
|
+
var C = this.__data__;
|
|
1398
|
+
return C[l] = L && w === void 0 ? r : w, this;
|
|
1399
1399
|
}
|
|
1400
|
-
|
|
1401
|
-
function
|
|
1402
|
-
var
|
|
1403
|
-
for (this.clear(); ++
|
|
1404
|
-
var G =
|
|
1400
|
+
W.prototype.clear = T, W.prototype.delete = z, W.prototype.get = H, W.prototype.has = X, W.prototype.set = ee;
|
|
1401
|
+
function K(l) {
|
|
1402
|
+
var w = -1, C = l ? l.length : 0;
|
|
1403
|
+
for (this.clear(); ++w < C; ) {
|
|
1404
|
+
var G = l[w];
|
|
1405
1405
|
this.set(G[0], G[1]);
|
|
1406
1406
|
}
|
|
1407
1407
|
}
|
|
1408
1408
|
function ie() {
|
|
1409
1409
|
this.__data__ = [];
|
|
1410
1410
|
}
|
|
1411
|
-
function
|
|
1412
|
-
var
|
|
1413
|
-
if (
|
|
1411
|
+
function te(l) {
|
|
1412
|
+
var w = this.__data__, C = Z(w, l);
|
|
1413
|
+
if (C < 0)
|
|
1414
1414
|
return !1;
|
|
1415
|
-
var G =
|
|
1416
|
-
return
|
|
1415
|
+
var G = w.length - 1;
|
|
1416
|
+
return C == G ? w.pop() : N.call(w, C, 1), !0;
|
|
1417
1417
|
}
|
|
1418
|
-
function
|
|
1419
|
-
var
|
|
1420
|
-
return
|
|
1418
|
+
function ae(l) {
|
|
1419
|
+
var w = this.__data__, C = Z(w, l);
|
|
1420
|
+
return C < 0 ? void 0 : w[C][1];
|
|
1421
1421
|
}
|
|
1422
|
-
function ce(
|
|
1423
|
-
return
|
|
1422
|
+
function ce(l) {
|
|
1423
|
+
return Z(this.__data__, l) > -1;
|
|
1424
1424
|
}
|
|
1425
|
-
function ue(
|
|
1426
|
-
var
|
|
1427
|
-
return G < 0 ?
|
|
1425
|
+
function ue(l, w) {
|
|
1426
|
+
var C = this.__data__, G = Z(C, l);
|
|
1427
|
+
return G < 0 ? C.push([l, w]) : C[G][1] = w, this;
|
|
1428
1428
|
}
|
|
1429
|
-
|
|
1430
|
-
function oe(
|
|
1431
|
-
var
|
|
1432
|
-
for (this.clear(); ++
|
|
1433
|
-
var G =
|
|
1429
|
+
K.prototype.clear = ie, K.prototype.delete = te, K.prototype.get = ae, K.prototype.has = ce, K.prototype.set = ue;
|
|
1430
|
+
function oe(l) {
|
|
1431
|
+
var w = -1, C = l ? l.length : 0;
|
|
1432
|
+
for (this.clear(); ++w < C; ) {
|
|
1433
|
+
var G = l[w];
|
|
1434
1434
|
this.set(G[0], G[1]);
|
|
1435
1435
|
}
|
|
1436
1436
|
}
|
|
1437
1437
|
function de() {
|
|
1438
1438
|
this.__data__ = {
|
|
1439
|
-
hash: new
|
|
1440
|
-
map: new (
|
|
1441
|
-
string: new
|
|
1439
|
+
hash: new W(),
|
|
1440
|
+
map: new (_ || K)(),
|
|
1441
|
+
string: new W()
|
|
1442
1442
|
};
|
|
1443
1443
|
}
|
|
1444
|
-
function pe(
|
|
1445
|
-
return me(this,
|
|
1444
|
+
function pe(l) {
|
|
1445
|
+
return me(this, l).delete(l);
|
|
1446
1446
|
}
|
|
1447
|
-
function se(
|
|
1448
|
-
return me(this,
|
|
1447
|
+
function se(l) {
|
|
1448
|
+
return me(this, l).get(l);
|
|
1449
1449
|
}
|
|
1450
|
-
function ye(
|
|
1451
|
-
return me(this,
|
|
1450
|
+
function ye(l) {
|
|
1451
|
+
return me(this, l).has(l);
|
|
1452
1452
|
}
|
|
1453
|
-
function be(
|
|
1454
|
-
return me(this,
|
|
1453
|
+
function be(l, w) {
|
|
1454
|
+
return me(this, l).set(l, w), this;
|
|
1455
1455
|
}
|
|
1456
1456
|
oe.prototype.clear = de, oe.prototype.delete = pe, oe.prototype.get = se, oe.prototype.has = ye, oe.prototype.set = be;
|
|
1457
|
-
function
|
|
1458
|
-
for (var
|
|
1459
|
-
if (Se(
|
|
1460
|
-
return
|
|
1457
|
+
function Z(l, w) {
|
|
1458
|
+
for (var C = l.length; C--; )
|
|
1459
|
+
if (Se(l[C][0], w))
|
|
1460
|
+
return C;
|
|
1461
1461
|
return -1;
|
|
1462
1462
|
}
|
|
1463
|
-
function
|
|
1464
|
-
|
|
1465
|
-
for (var
|
|
1466
|
-
|
|
1467
|
-
return
|
|
1463
|
+
function re(l, w) {
|
|
1464
|
+
w = Te(w, l) ? [w] : Ie(w);
|
|
1465
|
+
for (var C = 0, G = w.length; l != null && C < G; )
|
|
1466
|
+
l = l[Ne(w[C++])];
|
|
1467
|
+
return C && C == G ? l : void 0;
|
|
1468
1468
|
}
|
|
1469
|
-
function ke(
|
|
1470
|
-
if (!he(
|
|
1469
|
+
function ke(l) {
|
|
1470
|
+
if (!he(l) || _e(l))
|
|
1471
1471
|
return !1;
|
|
1472
|
-
var
|
|
1473
|
-
return
|
|
1474
|
-
}
|
|
1475
|
-
function Pe(
|
|
1476
|
-
if (typeof
|
|
1477
|
-
return
|
|
1478
|
-
if (
|
|
1479
|
-
return $ ? $.call(
|
|
1480
|
-
var
|
|
1481
|
-
return
|
|
1482
|
-
}
|
|
1483
|
-
function Ie(
|
|
1484
|
-
return Oe(
|
|
1485
|
-
}
|
|
1486
|
-
function me(
|
|
1487
|
-
var
|
|
1488
|
-
return Re(
|
|
1489
|
-
}
|
|
1490
|
-
function xe(
|
|
1491
|
-
var
|
|
1492
|
-
return ke(
|
|
1493
|
-
}
|
|
1494
|
-
function Te(
|
|
1495
|
-
if (Oe(
|
|
1472
|
+
var w = Le(l) || o(l) ? j : A;
|
|
1473
|
+
return w.test(le(l));
|
|
1474
|
+
}
|
|
1475
|
+
function Pe(l) {
|
|
1476
|
+
if (typeof l == "string")
|
|
1477
|
+
return l;
|
|
1478
|
+
if (p(l))
|
|
1479
|
+
return $ ? $.call(l) : "";
|
|
1480
|
+
var w = l + "";
|
|
1481
|
+
return w == "0" && 1 / l == -1 / 0 ? "-0" : w;
|
|
1482
|
+
}
|
|
1483
|
+
function Ie(l) {
|
|
1484
|
+
return Oe(l) ? l : Ce(l);
|
|
1485
|
+
}
|
|
1486
|
+
function me(l, w) {
|
|
1487
|
+
var C = l.__data__;
|
|
1488
|
+
return Re(w) ? C[typeof w == "string" ? "string" : "hash"] : C.map;
|
|
1489
|
+
}
|
|
1490
|
+
function xe(l, w) {
|
|
1491
|
+
var C = x(l, w);
|
|
1492
|
+
return ke(C) ? C : void 0;
|
|
1493
|
+
}
|
|
1494
|
+
function Te(l, w) {
|
|
1495
|
+
if (Oe(l))
|
|
1496
1496
|
return !1;
|
|
1497
|
-
var
|
|
1498
|
-
return
|
|
1499
|
-
}
|
|
1500
|
-
function Re(
|
|
1501
|
-
var
|
|
1502
|
-
return
|
|
1503
|
-
}
|
|
1504
|
-
function _e(
|
|
1505
|
-
return !!
|
|
1506
|
-
}
|
|
1507
|
-
var Ce = fe(function(
|
|
1508
|
-
|
|
1509
|
-
var
|
|
1510
|
-
return
|
|
1511
|
-
|
|
1512
|
-
}),
|
|
1497
|
+
var C = typeof l;
|
|
1498
|
+
return C == "number" || C == "symbol" || C == "boolean" || l == null || p(l) ? !0 : f.test(l) || !s.test(l) || w != null && l in Object(w);
|
|
1499
|
+
}
|
|
1500
|
+
function Re(l) {
|
|
1501
|
+
var w = typeof l;
|
|
1502
|
+
return w == "string" || w == "number" || w == "symbol" || w == "boolean" ? l !== "__proto__" : l === null;
|
|
1503
|
+
}
|
|
1504
|
+
function _e(l) {
|
|
1505
|
+
return !!E && E in l;
|
|
1506
|
+
}
|
|
1507
|
+
var Ce = fe(function(l) {
|
|
1508
|
+
l = h(l);
|
|
1509
|
+
var w = [];
|
|
1510
|
+
return u.test(l) && w.push(""), l.replace(d, function(C, G, ne, J) {
|
|
1511
|
+
w.push(ne ? J.replace(S, "$1") : G || C);
|
|
1512
|
+
}), w;
|
|
1513
1513
|
});
|
|
1514
|
-
function Ne(
|
|
1515
|
-
if (typeof
|
|
1516
|
-
return
|
|
1517
|
-
var
|
|
1518
|
-
return
|
|
1519
|
-
}
|
|
1520
|
-
function le(
|
|
1521
|
-
if (
|
|
1514
|
+
function Ne(l) {
|
|
1515
|
+
if (typeof l == "string" || p(l))
|
|
1516
|
+
return l;
|
|
1517
|
+
var w = l + "";
|
|
1518
|
+
return w == "0" && 1 / l == -1 / 0 ? "-0" : w;
|
|
1519
|
+
}
|
|
1520
|
+
function le(l) {
|
|
1521
|
+
if (l != null) {
|
|
1522
1522
|
try {
|
|
1523
|
-
return I.call(
|
|
1523
|
+
return I.call(l);
|
|
1524
1524
|
} catch {
|
|
1525
1525
|
}
|
|
1526
1526
|
try {
|
|
1527
|
-
return
|
|
1527
|
+
return l + "";
|
|
1528
1528
|
} catch {
|
|
1529
1529
|
}
|
|
1530
1530
|
}
|
|
1531
1531
|
return "";
|
|
1532
1532
|
}
|
|
1533
|
-
function fe(
|
|
1534
|
-
if (typeof
|
|
1533
|
+
function fe(l, w) {
|
|
1534
|
+
if (typeof l != "function" || w && typeof w != "function")
|
|
1535
1535
|
throw new TypeError(e);
|
|
1536
|
-
var
|
|
1537
|
-
var G = arguments,
|
|
1538
|
-
if (
|
|
1539
|
-
return
|
|
1540
|
-
var O =
|
|
1541
|
-
return
|
|
1536
|
+
var C = function() {
|
|
1537
|
+
var G = arguments, ne = w ? w.apply(this, G) : G[0], J = C.cache;
|
|
1538
|
+
if (J.has(ne))
|
|
1539
|
+
return J.get(ne);
|
|
1540
|
+
var O = l.apply(this, G);
|
|
1541
|
+
return C.cache = J.set(ne, O), O;
|
|
1542
1542
|
};
|
|
1543
|
-
return
|
|
1543
|
+
return C.cache = new (fe.Cache || oe)(), C;
|
|
1544
1544
|
}
|
|
1545
1545
|
fe.Cache = oe;
|
|
1546
|
-
function Se(
|
|
1547
|
-
return
|
|
1546
|
+
function Se(l, w) {
|
|
1547
|
+
return l === w || l !== l && w !== w;
|
|
1548
1548
|
}
|
|
1549
1549
|
var Oe = Array.isArray;
|
|
1550
|
-
function Le(
|
|
1551
|
-
var
|
|
1552
|
-
return
|
|
1550
|
+
function Le(l) {
|
|
1551
|
+
var w = he(l) ? k.call(l) : "";
|
|
1552
|
+
return w == a || w == t;
|
|
1553
1553
|
}
|
|
1554
|
-
function he(
|
|
1555
|
-
var
|
|
1556
|
-
return !!
|
|
1554
|
+
function he(l) {
|
|
1555
|
+
var w = typeof l;
|
|
1556
|
+
return !!l && (w == "object" || w == "function");
|
|
1557
1557
|
}
|
|
1558
|
-
function ge(
|
|
1559
|
-
return !!
|
|
1558
|
+
function ge(l) {
|
|
1559
|
+
return !!l && typeof l == "object";
|
|
1560
1560
|
}
|
|
1561
|
-
function
|
|
1562
|
-
return typeof
|
|
1561
|
+
function p(l) {
|
|
1562
|
+
return typeof l == "symbol" || ge(l) && k.call(l) == i;
|
|
1563
1563
|
}
|
|
1564
|
-
function
|
|
1565
|
-
return
|
|
1564
|
+
function h(l) {
|
|
1565
|
+
return l == null ? "" : Pe(l);
|
|
1566
1566
|
}
|
|
1567
|
-
function D(
|
|
1568
|
-
var G =
|
|
1569
|
-
return G === void 0 ?
|
|
1567
|
+
function D(l, w, C) {
|
|
1568
|
+
var G = l == null ? void 0 : re(l, w);
|
|
1569
|
+
return G === void 0 ? C : G;
|
|
1570
1570
|
}
|
|
1571
1571
|
return fr = D, fr;
|
|
1572
1572
|
}
|
|
@@ -1576,14 +1576,14 @@ var dr, Dr;
|
|
|
1576
1576
|
function gt() {
|
|
1577
1577
|
if (Dr) return dr;
|
|
1578
1578
|
Dr = 1;
|
|
1579
|
-
var e = "[object Symbol]", r = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, a = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, t = "\\ud800-\\udfff",
|
|
1580
|
-
|
|
1581
|
-
$ + "+" +
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
].join("|"), "g"), oe = RegExp("[" +
|
|
1579
|
+
var e = "[object Symbol]", r = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, a = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, t = "\\ud800-\\udfff", i = "\\u0300-\\u036f\\ufe20-\\ufe23", s = "\\u20d0-\\u20f0", f = "\\u2700-\\u27bf", u = "a-z\\xdf-\\xf6\\xf8-\\xff", d = "\\xac\\xb1\\xd7\\xf7", m = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", S = "\\u2000-\\u206f", A = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", P = "A-Z\\xc0-\\xd6\\xd8-\\xde", v = "\\ufe0e\\ufe0f", g = d + m + S + A, x = "['’]", o = "[" + t + "]", n = "[" + g + "]", c = "[" + i + s + "]", y = "\\d+", b = "[" + f + "]", E = "[" + u + "]", I = "[^" + t + g + y + f + u + P + "]", R = "\\ud83c[\\udffb-\\udfff]", k = "(?:" + c + "|" + R + ")", j = "[^" + t + "]", F = "(?:\\ud83c[\\udde6-\\uddff]){2}", N = "[\\ud800-\\udbff][\\udc00-\\udfff]", _ = "[" + P + "]", L = "\\u200d", B = "(?:" + E + "|" + I + ")", $ = "(?:" + _ + "|" + I + ")", W = "(?:" + x + "(?:d|ll|m|re|s|t|ve))?", T = "(?:" + x + "(?:D|LL|M|RE|S|T|VE))?", z = k + "?", H = "[" + v + "]?", X = "(?:" + L + "(?:" + [j, F, N].join("|") + ")" + H + z + ")*", ee = H + z + X, K = "(?:" + [b, F, N].join("|") + ")" + ee, ie = "(?:" + [j + c + "?", c, F, N, o].join("|") + ")", te = RegExp(x, "g"), ae = RegExp(c, "g"), ce = RegExp(R + "(?=" + R + ")|" + ie + ee, "g"), ue = RegExp([
|
|
1580
|
+
_ + "?" + E + "+" + W + "(?=" + [n, _, "$"].join("|") + ")",
|
|
1581
|
+
$ + "+" + T + "(?=" + [n, _ + B, "$"].join("|") + ")",
|
|
1582
|
+
_ + "?" + B + "+" + W,
|
|
1583
|
+
_ + "+" + T,
|
|
1584
|
+
y,
|
|
1585
|
+
K
|
|
1586
|
+
].join("|"), "g"), oe = RegExp("[" + L + t + i + s + v + "]"), de = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, pe = {
|
|
1587
1587
|
// Latin-1 Supplement block.
|
|
1588
1588
|
À: "A",
|
|
1589
1589
|
Á: "A",
|
|
@@ -1777,20 +1777,20 @@ function gt() {
|
|
|
1777
1777
|
ʼn: "'n",
|
|
1778
1778
|
ſ: "ss"
|
|
1779
1779
|
}, se = typeof Ae == "object" && Ae && Ae.Object === Object && Ae, ye = typeof self == "object" && self && self.Object === Object && self, be = se || ye || Function("return this")();
|
|
1780
|
-
function
|
|
1780
|
+
function Z(O, U, V, q) {
|
|
1781
1781
|
for (var Y = -1, we = O ? O.length : 0; ++Y < we; )
|
|
1782
|
-
|
|
1783
|
-
return
|
|
1782
|
+
V = U(V, O[Y], Y, O);
|
|
1783
|
+
return V;
|
|
1784
1784
|
}
|
|
1785
|
-
function
|
|
1785
|
+
function re(O) {
|
|
1786
1786
|
return O.split("");
|
|
1787
1787
|
}
|
|
1788
1788
|
function ke(O) {
|
|
1789
1789
|
return O.match(r) || [];
|
|
1790
1790
|
}
|
|
1791
1791
|
function Pe(O) {
|
|
1792
|
-
return function(
|
|
1793
|
-
return O?.[
|
|
1792
|
+
return function(U) {
|
|
1793
|
+
return O?.[U];
|
|
1794
1794
|
};
|
|
1795
1795
|
}
|
|
1796
1796
|
var Ie = Pe(pe);
|
|
@@ -1801,7 +1801,7 @@ function gt() {
|
|
|
1801
1801
|
return de.test(O);
|
|
1802
1802
|
}
|
|
1803
1803
|
function Te(O) {
|
|
1804
|
-
return me(O) ? Re(O) :
|
|
1804
|
+
return me(O) ? Re(O) : re(O);
|
|
1805
1805
|
}
|
|
1806
1806
|
function Re(O) {
|
|
1807
1807
|
return O.match(ce) || [];
|
|
@@ -1810,11 +1810,11 @@ function gt() {
|
|
|
1810
1810
|
return O.match(ue) || [];
|
|
1811
1811
|
}
|
|
1812
1812
|
var Ce = Object.prototype, Ne = Ce.toString, le = be.Symbol, fe = le ? le.prototype : void 0, Se = fe ? fe.toString : void 0;
|
|
1813
|
-
function Oe(O,
|
|
1814
|
-
var
|
|
1815
|
-
|
|
1816
|
-
for (var we = Array(Y); ++
|
|
1817
|
-
we[
|
|
1813
|
+
function Oe(O, U, V) {
|
|
1814
|
+
var q = -1, Y = O.length;
|
|
1815
|
+
U < 0 && (U = -U > Y ? 0 : Y + U), V = V > Y ? Y : V, V < 0 && (V += Y), Y = U > V ? 0 : V - U >>> 0, U >>>= 0;
|
|
1816
|
+
for (var we = Array(Y); ++q < Y; )
|
|
1817
|
+
we[q] = O[q + U];
|
|
1818
1818
|
return we;
|
|
1819
1819
|
}
|
|
1820
1820
|
function Le(O) {
|
|
@@ -1822,48 +1822,48 @@ function gt() {
|
|
|
1822
1822
|
return O;
|
|
1823
1823
|
if (D(O))
|
|
1824
1824
|
return Se ? Se.call(O) : "";
|
|
1825
|
-
var
|
|
1826
|
-
return
|
|
1825
|
+
var U = O + "";
|
|
1826
|
+
return U == "0" && 1 / O == -1 / 0 ? "-0" : U;
|
|
1827
1827
|
}
|
|
1828
|
-
function he(O,
|
|
1829
|
-
var
|
|
1830
|
-
return
|
|
1828
|
+
function he(O, U, V) {
|
|
1829
|
+
var q = O.length;
|
|
1830
|
+
return V = V === void 0 ? q : V, !U && V >= q ? O : Oe(O, U, V);
|
|
1831
1831
|
}
|
|
1832
1832
|
function ge(O) {
|
|
1833
|
-
return function(
|
|
1834
|
-
|
|
1835
|
-
var
|
|
1836
|
-
return
|
|
1833
|
+
return function(U) {
|
|
1834
|
+
U = l(U);
|
|
1835
|
+
var V = me(U) ? Te(U) : void 0, q = V ? V[0] : U.charAt(0), Y = V ? he(V, 1).join("") : U.slice(1);
|
|
1836
|
+
return q[O]() + Y;
|
|
1837
1837
|
};
|
|
1838
1838
|
}
|
|
1839
|
-
function
|
|
1840
|
-
return function(
|
|
1841
|
-
return J(
|
|
1839
|
+
function p(O) {
|
|
1840
|
+
return function(U) {
|
|
1841
|
+
return Z(J(G(U).replace(te, "")), O, "");
|
|
1842
1842
|
};
|
|
1843
1843
|
}
|
|
1844
|
-
function
|
|
1844
|
+
function h(O) {
|
|
1845
1845
|
return !!O && typeof O == "object";
|
|
1846
1846
|
}
|
|
1847
1847
|
function D(O) {
|
|
1848
|
-
return typeof O == "symbol" ||
|
|
1848
|
+
return typeof O == "symbol" || h(O) && Ne.call(O) == e;
|
|
1849
1849
|
}
|
|
1850
|
-
function
|
|
1850
|
+
function l(O) {
|
|
1851
1851
|
return O == null ? "" : Le(O);
|
|
1852
1852
|
}
|
|
1853
|
-
var
|
|
1854
|
-
return
|
|
1853
|
+
var w = p(function(O, U, V) {
|
|
1854
|
+
return U = U.toLowerCase(), O + (V ? C(U) : U);
|
|
1855
1855
|
});
|
|
1856
|
-
function
|
|
1857
|
-
return
|
|
1856
|
+
function C(O) {
|
|
1857
|
+
return ne(l(O).toLowerCase());
|
|
1858
1858
|
}
|
|
1859
1859
|
function G(O) {
|
|
1860
|
-
return O =
|
|
1860
|
+
return O = l(O), O && O.replace(a, Ie).replace(ae, "");
|
|
1861
1861
|
}
|
|
1862
|
-
var
|
|
1863
|
-
function
|
|
1864
|
-
return O =
|
|
1862
|
+
var ne = ge("toUpperCase");
|
|
1863
|
+
function J(O, U, V) {
|
|
1864
|
+
return O = l(O), U = U, U === void 0 ? xe(O) ? _e(O) : ke(O) : O.match(U) || [];
|
|
1865
1865
|
}
|
|
1866
|
-
return dr =
|
|
1866
|
+
return dr = w, dr;
|
|
1867
1867
|
}
|
|
1868
1868
|
var vt = gt();
|
|
1869
1869
|
const At = /* @__PURE__ */ mr(vt);
|
|
@@ -1873,46 +1873,46 @@ function bt() {
|
|
|
1873
1873
|
jr = 1, Object.defineProperty(ve, "__esModule", {
|
|
1874
1874
|
value: !0
|
|
1875
1875
|
});
|
|
1876
|
-
var e = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(
|
|
1877
|
-
return typeof
|
|
1878
|
-
} : function(
|
|
1879
|
-
return
|
|
1880
|
-
}, r = typeof window < "u" && typeof window.document < "u", a = typeof process < "u" && process.versions != null && process.versions.node != null, t = (typeof self > "u" ? "undefined" : e(self)) === "object" && self.constructor && self.constructor.name === "DedicatedWorkerGlobalScope",
|
|
1881
|
-
return ve.isBrowser = r, ve.isWebWorker = t, ve.isNode = a, ve.isJsDom =
|
|
1876
|
+
var e = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(f) {
|
|
1877
|
+
return typeof f;
|
|
1878
|
+
} : function(f) {
|
|
1879
|
+
return f && typeof Symbol == "function" && f.constructor === Symbol && f !== Symbol.prototype ? "symbol" : typeof f;
|
|
1880
|
+
}, r = typeof window < "u" && typeof window.document < "u", a = typeof process < "u" && process.versions != null && process.versions.node != null, t = (typeof self > "u" ? "undefined" : e(self)) === "object" && self.constructor && self.constructor.name === "DedicatedWorkerGlobalScope", i = typeof window < "u" && window.name === "nodejs" || typeof navigator < "u" && (navigator.userAgent.includes("Node.js") || navigator.userAgent.includes("jsdom")), s = typeof Deno < "u" && typeof Deno.core < "u";
|
|
1881
|
+
return ve.isBrowser = r, ve.isWebWorker = t, ve.isNode = a, ve.isJsDom = i, ve.isDeno = s, ve;
|
|
1882
1882
|
}
|
|
1883
1883
|
bt();
|
|
1884
|
-
const
|
|
1885
|
-
|
|
1884
|
+
const M = {}, De = {};
|
|
1885
|
+
M.loadExternalScript = function(e) {
|
|
1886
1886
|
if (De[e])
|
|
1887
1887
|
return De[e];
|
|
1888
1888
|
const r = De[e] = new Promise(a);
|
|
1889
|
-
function a(t,
|
|
1889
|
+
function a(t, i) {
|
|
1890
1890
|
if (!document)
|
|
1891
|
-
return delete De[e],
|
|
1892
|
-
var
|
|
1893
|
-
|
|
1891
|
+
return delete De[e], i("document is undefined");
|
|
1892
|
+
var s = document.createElement("script");
|
|
1893
|
+
s.type = "text/javascript", s.async = !0, s.onload = function() {
|
|
1894
1894
|
return console.log("Loaded external script", e), t(e);
|
|
1895
|
-
},
|
|
1895
|
+
}, s.src = e, document.head.appendChild(s);
|
|
1896
1896
|
}
|
|
1897
1897
|
return r;
|
|
1898
1898
|
};
|
|
1899
1899
|
const Vr = {};
|
|
1900
|
-
|
|
1900
|
+
M.loadExternalStyle = function(e) {
|
|
1901
1901
|
const r = new Promise(a);
|
|
1902
|
-
function a(t,
|
|
1902
|
+
function a(t, i) {
|
|
1903
1903
|
if (!document)
|
|
1904
|
-
return
|
|
1904
|
+
return i("document is undefined");
|
|
1905
1905
|
if (Vr[e])
|
|
1906
1906
|
return t(e);
|
|
1907
1907
|
Vr[e] = !0;
|
|
1908
|
-
var
|
|
1909
|
-
|
|
1908
|
+
var s = document.createElement("link");
|
|
1909
|
+
s.setAttribute("rel", "stylesheet"), s.setAttribute("type", "text/css"), s.setAttribute("href", e), s.onload = function() {
|
|
1910
1910
|
return console.log("Loaded external stylesheet", e), t(e);
|
|
1911
|
-
}, document.head.appendChild(
|
|
1911
|
+
}, document.head.appendChild(s);
|
|
1912
1912
|
}
|
|
1913
1913
|
return r;
|
|
1914
1914
|
};
|
|
1915
|
-
|
|
1915
|
+
M.exists = function(e) {
|
|
1916
1916
|
var r;
|
|
1917
1917
|
if (Array.isArray(e) || e === 0)
|
|
1918
1918
|
return !0;
|
|
@@ -1934,7 +1934,7 @@ k.exists = function(e) {
|
|
|
1934
1934
|
}
|
|
1935
1935
|
return !r;
|
|
1936
1936
|
};
|
|
1937
|
-
|
|
1937
|
+
M.parseDate = function(e) {
|
|
1938
1938
|
if (e) {
|
|
1939
1939
|
if (e instanceof Date)
|
|
1940
1940
|
return e;
|
|
@@ -1943,88 +1943,88 @@ k.parseDate = function(e) {
|
|
|
1943
1943
|
return r;
|
|
1944
1944
|
}
|
|
1945
1945
|
};
|
|
1946
|
-
|
|
1946
|
+
M.parseURL = function(e) {
|
|
1947
1947
|
if (!e)
|
|
1948
1948
|
return !1;
|
|
1949
1949
|
if (e.startsWith("/") || e.startsWith("://") || e.startsWith("mailto:") || e.startsWith("tel:") || e.startsWith("sms:"))
|
|
1950
1950
|
return e;
|
|
1951
|
-
var a =
|
|
1951
|
+
var a = M.parseEmail(e);
|
|
1952
1952
|
if (a && a === e)
|
|
1953
1953
|
return `mailto:${a}`;
|
|
1954
|
-
const t = (
|
|
1954
|
+
const t = (s) => /^https?:\/\//i.test(s) ? s : `http://${s}`;
|
|
1955
1955
|
e = t(e), e = e.replace(/\s/g, "");
|
|
1956
|
-
var
|
|
1956
|
+
var i = RegExp(
|
|
1957
1957
|
"(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+@]*)*(\\?[;&a-z\\d%_.~+=-@]*)?(\\#[-a-z\\d_@]*)?$",
|
|
1958
1958
|
"i"
|
|
1959
1959
|
).test(e);
|
|
1960
|
-
return
|
|
1960
|
+
return i ? t(e) : !1;
|
|
1961
1961
|
};
|
|
1962
|
-
|
|
1962
|
+
M.parseNumber = function(e, r) {
|
|
1963
1963
|
if (!e || (e = Number(e), isNaN(e)))
|
|
1964
1964
|
return 0;
|
|
1965
1965
|
if (r) {
|
|
1966
1966
|
var a = e.toFixed(r);
|
|
1967
|
-
e =
|
|
1967
|
+
e = M.parseNumber(a);
|
|
1968
1968
|
}
|
|
1969
1969
|
return e;
|
|
1970
1970
|
};
|
|
1971
|
-
|
|
1971
|
+
M.isValidEmailAddress = function(e) {
|
|
1972
1972
|
var r = /^[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~](\.?[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-*\.?[a-zA-Z0-9])*\.[a-zA-Z](-?[a-zA-Z0-9])+$/;
|
|
1973
1973
|
if (!e) return !1;
|
|
1974
1974
|
var a = e.split("@");
|
|
1975
1975
|
if (a.length !== 2) return !1;
|
|
1976
|
-
var t = a[0],
|
|
1976
|
+
var t = a[0], i = a[1];
|
|
1977
1977
|
if (t.length > 64) return !1;
|
|
1978
|
-
if (
|
|
1979
|
-
var
|
|
1980
|
-
return !(
|
|
1981
|
-
return
|
|
1978
|
+
if (i.length > 255) return !1;
|
|
1979
|
+
var s = i.split(".");
|
|
1980
|
+
return !(s.some(function(f) {
|
|
1981
|
+
return f.length > 63;
|
|
1982
1982
|
}) || !r.test(e));
|
|
1983
1983
|
};
|
|
1984
|
-
|
|
1984
|
+
M.parseEmail = function(e) {
|
|
1985
1985
|
if (!e)
|
|
1986
1986
|
return !1;
|
|
1987
|
-
var r = String(e).toLowerCase(), a =
|
|
1987
|
+
var r = String(e).toLowerCase(), a = M.isValidEmailAddress(r);
|
|
1988
1988
|
return a ? r : !1;
|
|
1989
1989
|
};
|
|
1990
|
-
|
|
1990
|
+
M.parseInt = function(e) {
|
|
1991
1991
|
return !e || (e = parseInt(e), isNaN(e)) ? 0 : e;
|
|
1992
1992
|
};
|
|
1993
|
-
|
|
1993
|
+
M.cleanValue = function(e, r, a) {
|
|
1994
1994
|
a || (a = {});
|
|
1995
|
-
var t =
|
|
1995
|
+
var t = M.exists(e);
|
|
1996
1996
|
if (a.strict && t && r != "boolean")
|
|
1997
1997
|
return e;
|
|
1998
1998
|
switch (r) {
|
|
1999
1999
|
case "reference":
|
|
2000
|
-
return
|
|
2000
|
+
return M.id(e, !0);
|
|
2001
2001
|
case "boolean":
|
|
2002
|
-
return
|
|
2002
|
+
return M.parseBoolean(e);
|
|
2003
2003
|
case "url":
|
|
2004
|
-
return
|
|
2004
|
+
return M.parseURL(e);
|
|
2005
2005
|
case "key":
|
|
2006
|
-
return
|
|
2006
|
+
return M.machineName(e);
|
|
2007
2007
|
case "email":
|
|
2008
|
-
return
|
|
2008
|
+
return M.parseEmail(e);
|
|
2009
2009
|
case "date":
|
|
2010
|
-
var
|
|
2011
|
-
return
|
|
2010
|
+
var i = M.parseDate(e, a);
|
|
2011
|
+
return i === void 0 ? void 0 : i;
|
|
2012
2012
|
case "number":
|
|
2013
2013
|
case "decimal":
|
|
2014
2014
|
case "float":
|
|
2015
|
-
var
|
|
2016
|
-
return String(
|
|
2015
|
+
var s = M.parseNumber(e);
|
|
2016
|
+
return String(s) == String(Number(e)) ? s : void 0;
|
|
2017
2017
|
case "integer":
|
|
2018
|
-
var
|
|
2019
|
-
return String(
|
|
2018
|
+
var s = M.parseInt(e);
|
|
2019
|
+
return String(s) == String(parseInt(e)) ? s : void 0;
|
|
2020
2020
|
case "group":
|
|
2021
2021
|
return e;
|
|
2022
2022
|
case "object":
|
|
2023
2023
|
return typeof e == "object" && e !== null && !Array.isArray(e) ? e : void 0;
|
|
2024
2024
|
case "string":
|
|
2025
|
-
if (
|
|
2026
|
-
var
|
|
2027
|
-
return
|
|
2025
|
+
if (M.exists(e)) {
|
|
2026
|
+
var f = String(e);
|
|
2027
|
+
return f == "[object Object]" ? void 0 : f;
|
|
2028
2028
|
} else
|
|
2029
2029
|
return;
|
|
2030
2030
|
// if(!data) {
|
|
@@ -2042,59 +2042,59 @@ k.cleanValue = function(e, r, a) {
|
|
|
2042
2042
|
return String(e);
|
|
2043
2043
|
}
|
|
2044
2044
|
};
|
|
2045
|
-
|
|
2046
|
-
var t =
|
|
2045
|
+
M.isValidValue = function(e, r, a) {
|
|
2046
|
+
var t = M.exists(e), i = typeof e == "number", s = !1;
|
|
2047
2047
|
if (!t)
|
|
2048
2048
|
return !1;
|
|
2049
2049
|
switch (r) {
|
|
2050
2050
|
case "url":
|
|
2051
|
-
a ?
|
|
2051
|
+
a ? s = e.startsWith("/") || e.startsWith("://") || e.startsWith("http://") || e.startsWith("https://") : s = String(e) === M.parseURL(e);
|
|
2052
2052
|
break;
|
|
2053
2053
|
case "key":
|
|
2054
|
-
|
|
2054
|
+
s = String(e) === M.machineName(e);
|
|
2055
2055
|
break;
|
|
2056
2056
|
case "date":
|
|
2057
2057
|
if (a && (typeof e != "object" || !(e instanceof Date)))
|
|
2058
2058
|
return !1;
|
|
2059
|
-
var
|
|
2060
|
-
return
|
|
2059
|
+
var f = M.parseDate(e);
|
|
2060
|
+
return f !== void 0;
|
|
2061
2061
|
case "email":
|
|
2062
|
-
a ?
|
|
2062
|
+
a ? s = e === M.parseEmail(e) : s = String(e).toLowerCase() === M.parseEmail(e);
|
|
2063
2063
|
break;
|
|
2064
2064
|
case "number":
|
|
2065
2065
|
case "decimal":
|
|
2066
2066
|
case "float":
|
|
2067
|
-
a ?
|
|
2067
|
+
a ? s = i && Number(e) === M.parseNumber(e) : s = Number(e) === M.parseNumber(e);
|
|
2068
2068
|
break;
|
|
2069
2069
|
case "integer":
|
|
2070
|
-
a ?
|
|
2070
|
+
a ? s = i && Number(e) === M.parseInt(e) : s = Number(e) === M.parseInt(e);
|
|
2071
2071
|
break;
|
|
2072
2072
|
case "boolean":
|
|
2073
|
-
var
|
|
2074
|
-
a ? (e === !0 || e === !1) && (
|
|
2073
|
+
var f = M.parseBoolean(e);
|
|
2074
|
+
a ? (e === !0 || e === !1) && (s = e === f) : s = f === !0 || f === !1;
|
|
2075
2075
|
break;
|
|
2076
2076
|
case "reference":
|
|
2077
|
-
a ?
|
|
2077
|
+
a ? s = String(e) === M.id(e) : s = !!M.id(e);
|
|
2078
2078
|
break;
|
|
2079
2079
|
case "string":
|
|
2080
|
-
var
|
|
2081
|
-
if (a && typeof e != "string" ||
|
|
2080
|
+
var u = String(e);
|
|
2081
|
+
if (a && typeof e != "string" || u == "[object Object]")
|
|
2082
2082
|
return !1;
|
|
2083
|
-
|
|
2083
|
+
s = !0;
|
|
2084
2084
|
break;
|
|
2085
2085
|
// case 'group':
|
|
2086
2086
|
// isValidEntry = _isObject(value);
|
|
2087
2087
|
// break;
|
|
2088
2088
|
case "object":
|
|
2089
|
-
|
|
2089
|
+
s = typeof e == "object" && e !== null && !Array.isArray(e);
|
|
2090
2090
|
break;
|
|
2091
2091
|
case "array":
|
|
2092
|
-
|
|
2092
|
+
s = Array.isArray(e);
|
|
2093
2093
|
break;
|
|
2094
2094
|
}
|
|
2095
|
-
return
|
|
2095
|
+
return s;
|
|
2096
2096
|
};
|
|
2097
|
-
|
|
2097
|
+
M.parseBoolean = function(e) {
|
|
2098
2098
|
switch (String(e).toLowerCase()) {
|
|
2099
2099
|
case "true":
|
|
2100
2100
|
case "y":
|
|
@@ -2117,47 +2117,47 @@ k.parseBoolean = function(e) {
|
|
|
2117
2117
|
}
|
|
2118
2118
|
return !!e;
|
|
2119
2119
|
};
|
|
2120
|
-
|
|
2120
|
+
M.clone = function(e) {
|
|
2121
2121
|
return JSON.parse(JSON.stringify(e));
|
|
2122
2122
|
};
|
|
2123
|
-
|
|
2123
|
+
M.getAllFields = function(e) {
|
|
2124
2124
|
const r = e.definesType === "profile" || e.key === "profile", a = e.definesType === "submission";
|
|
2125
|
-
var t = [...e.fields],
|
|
2126
|
-
if (
|
|
2125
|
+
var t = [...e.fields], i = e.definedFields || [];
|
|
2126
|
+
if (i.length)
|
|
2127
2127
|
if (a) {
|
|
2128
|
-
var
|
|
2128
|
+
var s = {
|
|
2129
2129
|
title: "Form Data",
|
|
2130
2130
|
minimum: 1,
|
|
2131
2131
|
maximum: 1,
|
|
2132
2132
|
key: "formData",
|
|
2133
2133
|
asObject: !0,
|
|
2134
2134
|
type: "group",
|
|
2135
|
-
fields:
|
|
2135
|
+
fields: i
|
|
2136
2136
|
};
|
|
2137
|
-
t.push(
|
|
2138
|
-
var
|
|
2137
|
+
t.push(s);
|
|
2138
|
+
var f = {
|
|
2139
2139
|
title: "Data",
|
|
2140
2140
|
minimum: 1,
|
|
2141
2141
|
maximum: 1,
|
|
2142
2142
|
key: "data",
|
|
2143
2143
|
asObject: !0,
|
|
2144
2144
|
type: "group",
|
|
2145
|
-
fields:
|
|
2146
|
-
return
|
|
2145
|
+
fields: i.map(function(m) {
|
|
2146
|
+
return m.type === "reference" && (m = JSON.parse(JSON.stringify(m)), delete m.fields), m;
|
|
2147
2147
|
})
|
|
2148
2148
|
};
|
|
2149
|
-
t.push(
|
|
2149
|
+
t.push(f);
|
|
2150
2150
|
} else {
|
|
2151
|
-
var
|
|
2151
|
+
var f = {
|
|
2152
2152
|
title: `${e.title}`,
|
|
2153
2153
|
minimum: 1,
|
|
2154
2154
|
maximum: 1,
|
|
2155
2155
|
key: "data",
|
|
2156
2156
|
asObject: !0,
|
|
2157
2157
|
type: "group",
|
|
2158
|
-
fields:
|
|
2158
|
+
fields: i
|
|
2159
2159
|
};
|
|
2160
|
-
t.push(
|
|
2160
|
+
t.push(f);
|
|
2161
2161
|
}
|
|
2162
2162
|
r && (t.push({
|
|
2163
2163
|
title: "Age",
|
|
@@ -2172,53 +2172,53 @@ k.getAllFields = function(e) {
|
|
|
2172
2172
|
maximum: 1,
|
|
2173
2173
|
type: "date"
|
|
2174
2174
|
}));
|
|
2175
|
-
var
|
|
2176
|
-
var
|
|
2177
|
-
return !
|
|
2178
|
-
}).map(function(
|
|
2179
|
-
return
|
|
2180
|
-
}).sort(function(
|
|
2181
|
-
return
|
|
2175
|
+
var u = M.mapFields(t).filter(function(d) {
|
|
2176
|
+
var m = d.type == "group" && d.asObject && d.minimum == 1 && d.maximum == 1;
|
|
2177
|
+
return !m;
|
|
2178
|
+
}).map(function(d) {
|
|
2179
|
+
return d.title = d.filterTitle || d.titles.filter(Boolean).join(" › "), d;
|
|
2180
|
+
}).sort(function(d, m) {
|
|
2181
|
+
return d.title < m.title ? -1 : 1;
|
|
2182
2182
|
});
|
|
2183
|
-
return
|
|
2183
|
+
return u;
|
|
2184
2184
|
};
|
|
2185
|
-
|
|
2185
|
+
M.mapFields = function(e, r) {
|
|
2186
2186
|
r || (r = {});
|
|
2187
|
-
var a = [], t = [],
|
|
2188
|
-
e.forEach(
|
|
2189
|
-
function
|
|
2190
|
-
var A =
|
|
2191
|
-
|
|
2192
|
-
var
|
|
2193
|
-
if (
|
|
2194
|
-
if (
|
|
2195
|
-
|
|
2187
|
+
var a = [], t = [], i = [], s = 1, f = r.depth, u = r.arrayDelimeter || "[]";
|
|
2188
|
+
e.forEach(d);
|
|
2189
|
+
function d(m, S) {
|
|
2190
|
+
var A = m.key, P = m.type == "group", v = m.minimum === m.maximum && m.minimum === 1, g = m.asObject, x = P && !g, o = r.original ? m : M.clone(m);
|
|
2191
|
+
o.trail = t.slice(), o.trail.push(A), o.path = o.trail.join("."), o.titles = i.slice(), o.titles.push(m.filterTitle || m.title || ""), (!x || r.includeLayout) && a.push(o);
|
|
2192
|
+
var c = f && s >= f;
|
|
2193
|
+
if (m.fields && m.fields.length)
|
|
2194
|
+
if (x)
|
|
2195
|
+
m.fields.forEach(d);
|
|
2196
2196
|
else {
|
|
2197
|
-
if (
|
|
2197
|
+
if (c)
|
|
2198
2198
|
return;
|
|
2199
|
-
|
|
2200
|
-
let
|
|
2201
|
-
r.includeArrayDelimeter && (
|
|
2199
|
+
s++;
|
|
2200
|
+
let y = A;
|
|
2201
|
+
r.includeArrayDelimeter && (v || (y = `${A}${u}`)), t.push(y), i.push(m.filterTitle || m.title), m.fields.forEach(d), s--, t.pop(), i.pop();
|
|
2202
2202
|
}
|
|
2203
2203
|
}
|
|
2204
2204
|
return a;
|
|
2205
2205
|
};
|
|
2206
|
-
|
|
2206
|
+
M.mapParameters = function(e) {
|
|
2207
2207
|
e = e || {};
|
|
2208
2208
|
var r = [];
|
|
2209
2209
|
return Object.entries(e).forEach(function([a, t]) {
|
|
2210
|
-
t == null || t == !1 || (Array.isArray(t) ? t.forEach(function(
|
|
2211
|
-
r.push(`${a}=${encodeURIComponent(
|
|
2210
|
+
t == null || t == !1 || (Array.isArray(t) ? t.forEach(function(i) {
|
|
2211
|
+
r.push(`${a}=${encodeURIComponent(i)}`);
|
|
2212
2212
|
}) : r.push(encodeURIComponent(a) + "=" + encodeURIComponent(t)));
|
|
2213
2213
|
}), r.join("&");
|
|
2214
2214
|
};
|
|
2215
|
-
|
|
2215
|
+
M.formatCurrency = function(e, r, a) {
|
|
2216
2216
|
(!e || isNaN(e)) && (e = 0), a = a || 2;
|
|
2217
|
-
var t =
|
|
2217
|
+
var t = M.currencySymbol(r);
|
|
2218
2218
|
return `${t}${parseFloat(Number(e) / 100).toFixed(a)}`;
|
|
2219
2219
|
};
|
|
2220
|
-
|
|
2221
|
-
if (e =
|
|
2220
|
+
M.getTypeFromID = function(e) {
|
|
2221
|
+
if (e = M.id(e), !e)
|
|
2222
2222
|
return;
|
|
2223
2223
|
const r = {
|
|
2224
2224
|
21: "organisation",
|
|
@@ -2280,7 +2280,7 @@ k.getTypeFromID = function(e) {
|
|
|
2280
2280
|
var a = e.slice(8, 10);
|
|
2281
2281
|
return r[a];
|
|
2282
2282
|
};
|
|
2283
|
-
|
|
2283
|
+
M.currencySymbol = function(e) {
|
|
2284
2284
|
switch (e = String(e).toLowerCase(), String(e).toLowerCase()) {
|
|
2285
2285
|
case "gbp":
|
|
2286
2286
|
return "£";
|
|
@@ -2290,138 +2290,138 @@ k.currencySymbol = function(e) {
|
|
|
2290
2290
|
return "$";
|
|
2291
2291
|
}
|
|
2292
2292
|
};
|
|
2293
|
-
|
|
2293
|
+
M.getAvailableCurrencies = function(e) {
|
|
2294
2294
|
var r = [];
|
|
2295
2295
|
if (r.push({
|
|
2296
|
-
name: `USD (${
|
|
2296
|
+
name: `USD (${M.currencySymbol("usd")})`,
|
|
2297
2297
|
value: "usd",
|
|
2298
2298
|
countryCode: { US: !0 }
|
|
2299
2299
|
}), r.push({
|
|
2300
|
-
name: `GBP (${
|
|
2300
|
+
name: `GBP (${M.currencySymbol("gbp")})`,
|
|
2301
2301
|
value: "gbp",
|
|
2302
2302
|
countryCode: { GB: !0, UK: !0 }
|
|
2303
2303
|
}), r.push({
|
|
2304
|
-
name: `CAD (${
|
|
2304
|
+
name: `CAD (${M.currencySymbol("cad")})`,
|
|
2305
2305
|
value: "cad",
|
|
2306
2306
|
countryCode: { CA: !0 }
|
|
2307
2307
|
}), r.push({
|
|
2308
|
-
name: `AUD (${
|
|
2308
|
+
name: `AUD (${M.currencySymbol("aud")})`,
|
|
2309
2309
|
value: "aud",
|
|
2310
2310
|
countryCode: { AU: !0 }
|
|
2311
2311
|
}), r.push({
|
|
2312
|
-
name: `NZD (${
|
|
2312
|
+
name: `NZD (${M.currencySymbol("nzd")})`,
|
|
2313
2313
|
value: "nzd",
|
|
2314
2314
|
countryCode: { NZ: !0 }
|
|
2315
2315
|
}), r.push({
|
|
2316
|
-
name: `SGD (${
|
|
2316
|
+
name: `SGD (${M.currencySymbol("sgd")})`,
|
|
2317
2317
|
value: "sgd",
|
|
2318
2318
|
countryCode: { SG: !0 }
|
|
2319
2319
|
}), e) {
|
|
2320
|
-
var a = r.findIndex(function(
|
|
2321
|
-
return
|
|
2320
|
+
var a = r.findIndex(function(i) {
|
|
2321
|
+
return i.countryCode[e];
|
|
2322
2322
|
});
|
|
2323
|
-
const t = (
|
|
2324
|
-
const
|
|
2325
|
-
return
|
|
2323
|
+
const t = (i, s, f) => {
|
|
2324
|
+
const u = [...i];
|
|
2325
|
+
return u.splice(f, 0, ...u.splice(s, 1)), u;
|
|
2326
2326
|
};
|
|
2327
2327
|
a != -1 && (r = t(r, a, 0));
|
|
2328
2328
|
}
|
|
2329
2329
|
return r;
|
|
2330
2330
|
};
|
|
2331
|
-
|
|
2331
|
+
M.hash = function(e, r) {
|
|
2332
2332
|
return e = Array.isArray(e) ? e : [], e.reduce(function(a, t) {
|
|
2333
|
-
const
|
|
2334
|
-
return a[
|
|
2333
|
+
const i = r ? Ue(t, r) : t;
|
|
2334
|
+
return a[i] = t, a;
|
|
2335
2335
|
}, {});
|
|
2336
2336
|
};
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
var
|
|
2340
|
-
var
|
|
2341
|
-
return
|
|
2337
|
+
M.extractFromArray = function(e, r, a, t, i, s, f) {
|
|
2338
|
+
f = f || {}, a && (f.sum = a), t && (f.flatten = !0), i && (f.unique = !0), s && (f.excludeNull = !0);
|
|
2339
|
+
var u = e.reduce(function(d, m) {
|
|
2340
|
+
var S = Ue(m, r), A = !S && S !== !1 && S !== 0;
|
|
2341
|
+
return f.excludeNull && A || d.push(S), d;
|
|
2342
2342
|
}, []);
|
|
2343
|
-
return
|
|
2344
|
-
return
|
|
2345
|
-
}, 0)),
|
|
2343
|
+
return f.flatten && (u = u.flat()), f.unique && (u = [...new Set(u)]), f.sum && (u = u.reduce(function(d, m) {
|
|
2344
|
+
return d + m;
|
|
2345
|
+
}, 0)), u;
|
|
2346
2346
|
};
|
|
2347
|
-
|
|
2348
|
-
var
|
|
2349
|
-
var
|
|
2347
|
+
M.matchInArray = function(e, r, a, t) {
|
|
2348
|
+
var i = e.filter(function(s) {
|
|
2349
|
+
var f = Ue(s, r), u;
|
|
2350
2350
|
switch (t) {
|
|
2351
2351
|
case "in":
|
|
2352
|
-
|
|
2352
|
+
u = f.includes(a);
|
|
2353
2353
|
break;
|
|
2354
2354
|
case ">=":
|
|
2355
|
-
|
|
2355
|
+
u = f >= a;
|
|
2356
2356
|
break;
|
|
2357
2357
|
case "<=":
|
|
2358
|
-
|
|
2358
|
+
u = f <= a;
|
|
2359
2359
|
break;
|
|
2360
2360
|
case "<":
|
|
2361
|
-
|
|
2361
|
+
u = f < a;
|
|
2362
2362
|
break;
|
|
2363
2363
|
case ">":
|
|
2364
|
-
|
|
2364
|
+
u = f > a;
|
|
2365
2365
|
break;
|
|
2366
2366
|
case "==":
|
|
2367
2367
|
default:
|
|
2368
|
-
a === void 0 ?
|
|
2368
|
+
a === void 0 ? u = f : u = f == a;
|
|
2369
2369
|
break;
|
|
2370
2370
|
}
|
|
2371
|
-
return
|
|
2371
|
+
return u;
|
|
2372
2372
|
});
|
|
2373
|
-
return
|
|
2373
|
+
return i;
|
|
2374
2374
|
};
|
|
2375
|
-
|
|
2375
|
+
M.comma = function(e, r, a) {
|
|
2376
2376
|
return a && (e = e.slice(0, a)), e.filter(function(t) {
|
|
2377
2377
|
return t != null && t !== void 0 && t !== "";
|
|
2378
2378
|
}).map(function(t) {
|
|
2379
2379
|
return r && r.length ? Ue(t, r) : t;
|
|
2380
2380
|
}).join(", ");
|
|
2381
2381
|
};
|
|
2382
|
-
|
|
2382
|
+
M.id = function(e) {
|
|
2383
2383
|
if (e) {
|
|
2384
2384
|
var r;
|
|
2385
2385
|
e._id ? r = String(e._id) : r = String(e);
|
|
2386
|
-
var a =
|
|
2386
|
+
var a = M.isValidID(r);
|
|
2387
2387
|
if (a)
|
|
2388
2388
|
return r;
|
|
2389
2389
|
}
|
|
2390
2390
|
};
|
|
2391
|
-
|
|
2391
|
+
M.ids = function(e) {
|
|
2392
2392
|
if (!e)
|
|
2393
2393
|
return [];
|
|
2394
2394
|
var r = Object.keys(
|
|
2395
2395
|
e.reduce(function(a, t) {
|
|
2396
2396
|
if (!t)
|
|
2397
2397
|
return a;
|
|
2398
|
-
var
|
|
2399
|
-
return
|
|
2398
|
+
var i = M.id(t);
|
|
2399
|
+
return i && (a[i] = 1), a;
|
|
2400
2400
|
}, {})
|
|
2401
2401
|
);
|
|
2402
2402
|
return r;
|
|
2403
2403
|
};
|
|
2404
|
-
|
|
2404
|
+
M.isValidID = function(e) {
|
|
2405
2405
|
var r = new RegExp("^[0-9a-fA-F]{24}$");
|
|
2406
2406
|
return r.test(String(e));
|
|
2407
2407
|
};
|
|
2408
|
-
|
|
2408
|
+
M.errorMessage = function(e) {
|
|
2409
2409
|
if (e) {
|
|
2410
2410
|
Array.isArray(e) && (e = e[0]);
|
|
2411
2411
|
var r = ["response.data.message", "response.data", "message"], a;
|
|
2412
2412
|
return r.forEach(function(t) {
|
|
2413
2413
|
if (!a) {
|
|
2414
|
-
var
|
|
2415
|
-
|
|
2414
|
+
var i = Ue(e, t);
|
|
2415
|
+
i && (a = i);
|
|
2416
2416
|
}
|
|
2417
2417
|
}), Array.isArray(a) && (a = a[0]), a = a || JSON.stringify(e), a;
|
|
2418
2418
|
}
|
|
2419
2419
|
};
|
|
2420
|
-
|
|
2420
|
+
M.guid = function() {
|
|
2421
2421
|
var e = (/* @__PURE__ */ new Date()).getTime().toString(16) + Math.random().toString(16).substring(2) + "0".repeat(16);
|
|
2422
2422
|
return e.substr(0, 8) + "-" + e.substr(8, 4) + "-4000-8" + e.substr(12, 3) + "-" + e.substr(15, 12);
|
|
2423
2423
|
};
|
|
2424
|
-
|
|
2424
|
+
M.machineName = function(e) {
|
|
2425
2425
|
if (!(!e || !e.length)) {
|
|
2426
2426
|
var r = /[^a-zA-Z0-9-_]+/g;
|
|
2427
2427
|
return String(e).replace(r, " ").split("_").map((a) => At(a)).join("_");
|
|
@@ -2432,21 +2432,21 @@ function je() {
|
|
|
2432
2432
|
return r.removeAllListeners = function() {
|
|
2433
2433
|
e = {};
|
|
2434
2434
|
}, r.dispatch = function(a, t) {
|
|
2435
|
-
e[a] && e[a].forEach(function(
|
|
2436
|
-
return
|
|
2435
|
+
e[a] && e[a].forEach(function(i) {
|
|
2436
|
+
return i(t);
|
|
2437
2437
|
});
|
|
2438
2438
|
}, r.addEventListener = function(a, t) {
|
|
2439
2439
|
e[a] || (e[a] = []);
|
|
2440
|
-
const
|
|
2441
|
-
if (
|
|
2440
|
+
const i = typeof t;
|
|
2441
|
+
if (i !== "function")
|
|
2442
2442
|
throw new Error(
|
|
2443
|
-
`addEventListener() requires a function but ${
|
|
2443
|
+
`addEventListener() requires a function but ${i} was added`
|
|
2444
2444
|
);
|
|
2445
2445
|
e[a].indexOf(t) == -1 && e[a].push(t);
|
|
2446
2446
|
}, r.removeEventListener = function(a, t) {
|
|
2447
2447
|
e[a] || (e[a] = []);
|
|
2448
|
-
var
|
|
2449
|
-
|
|
2448
|
+
var i = e[a].indexOf(t);
|
|
2449
|
+
i != -1 && e[a].splice(i, 1);
|
|
2450
2450
|
}, r.bootstrap = function(a) {
|
|
2451
2451
|
a && (a.dispatch = r.dispatch, a.addEventListener = r.addEventListener, a.removeEventListener = r.removeEventListener, a.removeAllListeners = r.removeAllListeners);
|
|
2452
2452
|
}, r;
|
|
@@ -2568,9 +2568,9 @@ class St extends Ve {
|
|
|
2568
2568
|
*/
|
|
2569
2569
|
_setCookie(r, a, t = {}) {
|
|
2570
2570
|
if (typeof document > "u") return;
|
|
2571
|
-
const
|
|
2572
|
-
let
|
|
2573
|
-
|
|
2571
|
+
const i = { ...this.options, ...t };
|
|
2572
|
+
let s = `${r}=${a}`;
|
|
2573
|
+
i.domain && (s += `; Domain=${i.domain}`), i.secure && (s += "; Secure"), i.sameSite && (s += `; SameSite=${i.sameSite}`), i.maxAge && (s += `; Max-Age=${i.maxAge}`), document.cookie = s;
|
|
2574
2574
|
}
|
|
2575
2575
|
/**
|
|
2576
2576
|
* Delete a cookie
|
|
@@ -2650,259 +2650,259 @@ var Et = function(e) {
|
|
|
2650
2650
|
},
|
|
2651
2651
|
enumerable: !0
|
|
2652
2652
|
});
|
|
2653
|
-
const
|
|
2654
|
-
|
|
2655
|
-
function
|
|
2656
|
-
var
|
|
2657
|
-
t.onChange && t.onChange(
|
|
2658
|
-
}
|
|
2659
|
-
t.set = function(
|
|
2660
|
-
const
|
|
2661
|
-
if (JSON.stringify(
|
|
2662
|
-
return
|
|
2653
|
+
const i = new je();
|
|
2654
|
+
i.bootstrap(t);
|
|
2655
|
+
function s(u) {
|
|
2656
|
+
var d = r.getUser();
|
|
2657
|
+
t.onChange && t.onChange(d), i.dispatch("change", d, u);
|
|
2658
|
+
}
|
|
2659
|
+
t.set = function(u, d, m) {
|
|
2660
|
+
const S = r.getUser();
|
|
2661
|
+
if (JSON.stringify(S) != JSON.stringify(u) && (r.setUser(u), !m))
|
|
2662
|
+
return s(d);
|
|
2663
2663
|
}, t.logout = function() {
|
|
2664
|
-
return r.clearUser(), e.cache.reset(),
|
|
2665
|
-
}, t.changeOrganisation = function(
|
|
2666
|
-
|
|
2667
|
-
var
|
|
2668
|
-
return
|
|
2669
|
-
e.api.post(`/user/switch/${
|
|
2670
|
-
|
|
2664
|
+
return r.clearUser(), e.cache.reset(), s();
|
|
2665
|
+
}, t.changeOrganisation = function(u, d) {
|
|
2666
|
+
u = e.utils.id(u), d || (d = {});
|
|
2667
|
+
var m = !0;
|
|
2668
|
+
return d.disableAutoAuthentication && (m = !1), new Promise(function(S, A) {
|
|
2669
|
+
e.api.post(`/user/switch/${u}`).then(function(P) {
|
|
2670
|
+
m && (e.cache.reset(), t.set(P.data)), S(P.data);
|
|
2671
2671
|
}).catch(A);
|
|
2672
2672
|
});
|
|
2673
|
-
}, t.impersonate = function(
|
|
2674
|
-
|
|
2675
|
-
var
|
|
2676
|
-
|
|
2677
|
-
var
|
|
2678
|
-
return
|
|
2679
|
-
|
|
2673
|
+
}, t.impersonate = function(u, d) {
|
|
2674
|
+
u = e.utils.id(u), d || (d = {});
|
|
2675
|
+
var m = !0;
|
|
2676
|
+
d.disableAutoAuthentication && (m = !1);
|
|
2677
|
+
var S = e.api.post(`/user/impersonate/${u}`);
|
|
2678
|
+
return S.then(function(A) {
|
|
2679
|
+
m && (e.cache.reset(), t.set(A.data));
|
|
2680
2680
|
}, function(A) {
|
|
2681
|
-
}),
|
|
2682
|
-
}, t.login = async function(
|
|
2683
|
-
|
|
2684
|
-
var
|
|
2685
|
-
|
|
2686
|
-
var
|
|
2687
|
-
function A(
|
|
2688
|
-
if (!
|
|
2689
|
-
return
|
|
2681
|
+
}), S;
|
|
2682
|
+
}, t.login = async function(u, d) {
|
|
2683
|
+
d || (d = {});
|
|
2684
|
+
var m = !0;
|
|
2685
|
+
d.disableAutoAuthentication && (m = !1);
|
|
2686
|
+
var S = new Promise(A);
|
|
2687
|
+
function A(P, v) {
|
|
2688
|
+
if (!u)
|
|
2689
|
+
return v({
|
|
2690
2690
|
message: "Missing credentials!"
|
|
2691
2691
|
});
|
|
2692
|
-
if (!
|
|
2693
|
-
return
|
|
2692
|
+
if (!u.email || !u.email.length)
|
|
2693
|
+
return v({
|
|
2694
2694
|
message: "Username was not provided"
|
|
2695
2695
|
});
|
|
2696
|
-
if (!
|
|
2697
|
-
return
|
|
2696
|
+
if (!u.password || !u.password.length)
|
|
2697
|
+
return v({
|
|
2698
2698
|
message: "Password was not provided"
|
|
2699
2699
|
});
|
|
2700
|
-
var
|
|
2700
|
+
var g = {
|
|
2701
2701
|
bypassInterceptor: !0
|
|
2702
2702
|
};
|
|
2703
|
-
r.isCookieMode && r.isCookieMode() && (
|
|
2704
|
-
var
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
},
|
|
2703
|
+
r.isCookieMode && r.isCookieMode() && (u.useCookies = !0, g.withCredentials = !0);
|
|
2704
|
+
var o = `${e.apiURL}/user/login`;
|
|
2705
|
+
d.url && (o = d.url), e.api.post(o, u, g).then(function(n) {
|
|
2706
|
+
m && t.set(n.data), P(n);
|
|
2707
|
+
}, v);
|
|
2708
2708
|
}
|
|
2709
|
-
return
|
|
2710
|
-
}, t.signup = async function(
|
|
2711
|
-
|
|
2712
|
-
var
|
|
2713
|
-
|
|
2714
|
-
var
|
|
2715
|
-
function A(
|
|
2716
|
-
if (!
|
|
2717
|
-
return
|
|
2709
|
+
return S;
|
|
2710
|
+
}, t.signup = async function(u, d) {
|
|
2711
|
+
d || (d = {});
|
|
2712
|
+
var m = !0;
|
|
2713
|
+
d.disableAutoAuthentication && (m = !1);
|
|
2714
|
+
var S = new Promise(A);
|
|
2715
|
+
function A(P, v) {
|
|
2716
|
+
if (!u)
|
|
2717
|
+
return v({
|
|
2718
2718
|
message: "No details provided"
|
|
2719
2719
|
});
|
|
2720
|
-
if (!
|
|
2721
|
-
return
|
|
2720
|
+
if (!u.firstName || !u.firstName.length)
|
|
2721
|
+
return v({
|
|
2722
2722
|
message: "First Name was not provided"
|
|
2723
2723
|
});
|
|
2724
|
-
if (!
|
|
2725
|
-
return
|
|
2724
|
+
if (!u.lastName || !u.lastName.length)
|
|
2725
|
+
return v({
|
|
2726
2726
|
message: "Last Name was not provided"
|
|
2727
2727
|
});
|
|
2728
|
-
if (!
|
|
2729
|
-
return
|
|
2728
|
+
if (!u.email || !u.email.length)
|
|
2729
|
+
return v({
|
|
2730
2730
|
message: "Email/Username was not provided"
|
|
2731
2731
|
});
|
|
2732
|
-
if (!
|
|
2733
|
-
return
|
|
2732
|
+
if (!u.password || !u.password.length)
|
|
2733
|
+
return v({
|
|
2734
2734
|
message: "Password was not provided"
|
|
2735
2735
|
});
|
|
2736
|
-
if (!
|
|
2737
|
-
return
|
|
2736
|
+
if (!u.confirmPassword || !u.confirmPassword.length)
|
|
2737
|
+
return v({
|
|
2738
2738
|
message: "Confirm Password was not provided"
|
|
2739
2739
|
});
|
|
2740
|
-
if (
|
|
2741
|
-
return
|
|
2740
|
+
if (u.confirmPassword != u.password)
|
|
2741
|
+
return v({
|
|
2742
2742
|
message: "Your passwords do not match"
|
|
2743
2743
|
});
|
|
2744
|
-
var
|
|
2744
|
+
var g = {
|
|
2745
2745
|
bypassInterceptor: !0
|
|
2746
2746
|
};
|
|
2747
|
-
r.isCookieMode && r.isCookieMode() && (
|
|
2748
|
-
var
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
},
|
|
2747
|
+
r.isCookieMode && r.isCookieMode() && (u.useCookies = !0, g.withCredentials = !0);
|
|
2748
|
+
var o = `${e.apiURL}/user/signup`;
|
|
2749
|
+
d.application && (o = `${e.domain || ""}/qik/application/signup`), d.url && (o = d.url), e.api.post(o, u, g).then(function(n) {
|
|
2750
|
+
m && t.set(n.data), P(n);
|
|
2751
|
+
}, v);
|
|
2752
2752
|
}
|
|
2753
|
-
return
|
|
2754
|
-
}, t.retrieveUserFromResetToken = async function(
|
|
2755
|
-
|
|
2756
|
-
var
|
|
2753
|
+
return S;
|
|
2754
|
+
}, t.retrieveUserFromResetToken = async function(u, d) {
|
|
2755
|
+
d || (d = {});
|
|
2756
|
+
var m = {
|
|
2757
2757
|
bypassInterceptor: !0
|
|
2758
2758
|
};
|
|
2759
|
-
return new Promise(function(
|
|
2760
|
-
e.api.get(
|
|
2761
|
-
return
|
|
2759
|
+
return new Promise(function(S, A) {
|
|
2760
|
+
e.api.get(d.url || `${e.apiURL}/user/reset/${u}`, m).then(function(P) {
|
|
2761
|
+
return S(P.data);
|
|
2762
2762
|
}, A);
|
|
2763
2763
|
});
|
|
2764
|
-
}, t.updateUserWithToken = async function(
|
|
2765
|
-
|
|
2766
|
-
var
|
|
2767
|
-
return
|
|
2768
|
-
var
|
|
2764
|
+
}, t.updateUserWithToken = async function(u, d, m) {
|
|
2765
|
+
m || (m = {});
|
|
2766
|
+
var S = !0;
|
|
2767
|
+
return m.disableAutoAuthentication && (S = !1), new Promise(function(A, P) {
|
|
2768
|
+
var v = {
|
|
2769
2769
|
bypassInterceptor: !0
|
|
2770
2770
|
};
|
|
2771
|
-
e.api.post(
|
|
2772
|
-
return
|
|
2773
|
-
},
|
|
2771
|
+
e.api.post(m.url || `${e.apiURL}/user/reset/${u}`, d, v).then(function(g) {
|
|
2772
|
+
return S && (e.cache.reset(), t.set(g.data)), A(g.data);
|
|
2773
|
+
}, P);
|
|
2774
2774
|
});
|
|
2775
|
-
}, t.sendResetPasswordRequest = function(
|
|
2776
|
-
return
|
|
2775
|
+
}, t.sendResetPasswordRequest = function(u, d) {
|
|
2776
|
+
return d || (d = {}), u ? !u.email || !u.email.length ? Promise.reject({
|
|
2777
2777
|
message: "Email is required but was not provided"
|
|
2778
|
-
}) : new Promise(function(
|
|
2778
|
+
}) : new Promise(function(m, S) {
|
|
2779
2779
|
var A = {
|
|
2780
2780
|
bypassInterceptor: !0
|
|
2781
2781
|
};
|
|
2782
|
-
e.api.post(
|
|
2782
|
+
e.api.post(d.url || `${e.apiURL}/user/forgot`, u, A).then(m, S);
|
|
2783
2783
|
}) : Promise.reject({
|
|
2784
2784
|
message: "No details were provided for password reset request"
|
|
2785
2785
|
});
|
|
2786
|
-
}, t.ensureValidToken = async function(
|
|
2787
|
-
var
|
|
2788
|
-
if (!
|
|
2786
|
+
}, t.ensureValidToken = async function(u) {
|
|
2787
|
+
var d = t.getCurrentUser();
|
|
2788
|
+
if (!d)
|
|
2789
2789
|
return Promise.reject("No user");
|
|
2790
2790
|
if (r.isCookieMode && r.isCookieMode())
|
|
2791
|
-
return
|
|
2792
|
-
var { token:
|
|
2793
|
-
if (!
|
|
2791
|
+
return u ? await t.refreshAccessToken() : "cookie_mode_token";
|
|
2792
|
+
var { token: S } = d;
|
|
2793
|
+
if (!S)
|
|
2794
2794
|
return Promise.reject("No token");
|
|
2795
2795
|
var A = /* @__PURE__ */ new Date();
|
|
2796
2796
|
A.setSeconds(A.getSeconds() + a);
|
|
2797
|
-
var
|
|
2798
|
-
return
|
|
2797
|
+
var P = new Date(S.expires);
|
|
2798
|
+
return u ? await t.refreshAccessToken(S.refreshToken) : A < P ? S : await t.refreshAccessToken(S.refreshToken);
|
|
2799
2799
|
};
|
|
2800
|
-
const
|
|
2801
|
-
return t.refreshAccessToken = async function(
|
|
2802
|
-
if (
|
|
2803
|
-
return
|
|
2804
|
-
const
|
|
2805
|
-
return
|
|
2806
|
-
let A = {},
|
|
2800
|
+
const f = {};
|
|
2801
|
+
return t.refreshAccessToken = async function(u) {
|
|
2802
|
+
if (f.inflightRefreshRequest)
|
|
2803
|
+
return f.inflightRefreshRequest;
|
|
2804
|
+
const d = r.isCookieMode && r.isCookieMode();
|
|
2805
|
+
return f.inflightRefreshRequest = new Promise(function(m, S) {
|
|
2806
|
+
let A = {}, P = {
|
|
2807
2807
|
bypassInterceptor: !0,
|
|
2808
2808
|
withoutToken: !0
|
|
2809
2809
|
};
|
|
2810
|
-
if (
|
|
2811
|
-
|
|
2810
|
+
if (d)
|
|
2811
|
+
P.withCredentials = !0;
|
|
2812
2812
|
else {
|
|
2813
|
-
if (!
|
|
2814
|
-
return
|
|
2815
|
-
A.refreshToken =
|
|
2813
|
+
if (!u)
|
|
2814
|
+
return f.inflightRefreshRequest = null, S(new Error("No refresh token provided for localStorage mode"));
|
|
2815
|
+
A.refreshToken = u;
|
|
2816
2816
|
}
|
|
2817
|
-
e.api.post("/user/refresh", A,
|
|
2818
|
-
if (!
|
|
2819
|
-
return
|
|
2820
|
-
if (t.set(
|
|
2821
|
-
|
|
2817
|
+
e.api.post("/user/refresh", A, P).then(function(g) {
|
|
2818
|
+
if (!g || !g.data)
|
|
2819
|
+
return f.inflightRefreshRequest = null, S(new Error("Invalid refresh response"));
|
|
2820
|
+
if (t.set(g.data), s(), d)
|
|
2821
|
+
m("cookie_token_refreshed");
|
|
2822
2822
|
else {
|
|
2823
|
-
const
|
|
2824
|
-
|
|
2823
|
+
const x = g.data.token?.accessToken;
|
|
2824
|
+
x ? m(x) : S(new Error("No access token in refresh response"));
|
|
2825
2825
|
}
|
|
2826
2826
|
setTimeout(function() {
|
|
2827
|
-
|
|
2827
|
+
f.inflightRefreshRequest = null;
|
|
2828
2828
|
});
|
|
2829
|
-
}).catch(function(
|
|
2829
|
+
}).catch(function(v) {
|
|
2830
2830
|
setTimeout(function() {
|
|
2831
|
-
|
|
2832
|
-
}),
|
|
2831
|
+
f.inflightRefreshRequest = null;
|
|
2832
|
+
}), S(v);
|
|
2833
2833
|
});
|
|
2834
|
-
}),
|
|
2834
|
+
}), f.inflightRefreshRequest;
|
|
2835
2835
|
}, t.sync = function() {
|
|
2836
|
-
return e.api.get("/user").then(function(
|
|
2837
|
-
if (
|
|
2838
|
-
const
|
|
2839
|
-
if (
|
|
2840
|
-
const
|
|
2841
|
-
|
|
2836
|
+
return e.api.get("/user").then(function(u) {
|
|
2837
|
+
if (u.data) {
|
|
2838
|
+
const d = r.getUser();
|
|
2839
|
+
if (d) {
|
|
2840
|
+
const m = { ...d };
|
|
2841
|
+
m.session ? Object.assign(m.session, u.data) : m.session = u.data, t.set(m);
|
|
2842
2842
|
} else
|
|
2843
|
-
t.set(
|
|
2843
|
+
t.set(u.data);
|
|
2844
2844
|
} else
|
|
2845
2845
|
t.set(null);
|
|
2846
|
-
|
|
2847
|
-
}).catch(function(
|
|
2848
|
-
t.set(null),
|
|
2846
|
+
s();
|
|
2847
|
+
}).catch(function(u) {
|
|
2848
|
+
t.set(null), s();
|
|
2849
2849
|
});
|
|
2850
2850
|
}, t.getCurrentUser = function() {
|
|
2851
2851
|
return r.getUser();
|
|
2852
2852
|
}, t.getCurrentToken = function() {
|
|
2853
|
-
var
|
|
2854
|
-
if (
|
|
2855
|
-
return
|
|
2856
|
-
var
|
|
2857
|
-
if (!
|
|
2853
|
+
var u = r.getAccessToken();
|
|
2854
|
+
if (u)
|
|
2855
|
+
return u;
|
|
2856
|
+
var d = t.getCurrentUser();
|
|
2857
|
+
if (!d)
|
|
2858
2858
|
return e.applicationToken ? e.applicationToken : void 0;
|
|
2859
|
-
var { token:
|
|
2860
|
-
if (
|
|
2861
|
-
return
|
|
2859
|
+
var { token: m } = d;
|
|
2860
|
+
if (m)
|
|
2861
|
+
return m.accessToken;
|
|
2862
2862
|
}, e.api.interceptors.request.use(
|
|
2863
|
-
async function(
|
|
2864
|
-
if (
|
|
2865
|
-
return
|
|
2866
|
-
var
|
|
2863
|
+
async function(u) {
|
|
2864
|
+
if (u.bypassInterceptor)
|
|
2865
|
+
return u;
|
|
2866
|
+
var d = u;
|
|
2867
2867
|
if (r.isCookieMode && r.isCookieMode())
|
|
2868
|
-
return
|
|
2869
|
-
var
|
|
2870
|
-
if (
|
|
2871
|
-
var { token:
|
|
2872
|
-
|
|
2868
|
+
return d.withCredentials || (d.withCredentials = !0), d;
|
|
2869
|
+
var S = t.getCurrentUser(), A, P, v;
|
|
2870
|
+
if (S) {
|
|
2871
|
+
var { token: g } = S;
|
|
2872
|
+
g && (A = g.accessToken, P = g.refreshToken, v = g.expires);
|
|
2873
2873
|
}
|
|
2874
2874
|
if (A)
|
|
2875
|
-
|
|
2875
|
+
d.headers.Authorization = `Bearer ${A}`;
|
|
2876
2876
|
else
|
|
2877
|
-
return
|
|
2878
|
-
if (!
|
|
2879
|
-
return
|
|
2880
|
-
var
|
|
2881
|
-
|
|
2882
|
-
var
|
|
2883
|
-
return
|
|
2884
|
-
await t.refreshAccessToken(
|
|
2885
|
-
return
|
|
2886
|
-
}).catch(function(
|
|
2887
|
-
return
|
|
2877
|
+
return d;
|
|
2878
|
+
if (!P)
|
|
2879
|
+
return d;
|
|
2880
|
+
var x = /* @__PURE__ */ new Date();
|
|
2881
|
+
x.setSeconds(x.getSeconds() + a);
|
|
2882
|
+
var o = new Date(v);
|
|
2883
|
+
return x < o ? d : new Promise(async function(n, c) {
|
|
2884
|
+
await t.refreshAccessToken(P).then(function(y) {
|
|
2885
|
+
return d.headers.Authorization = `Bearer ${y}`, n(d);
|
|
2886
|
+
}).catch(function(y) {
|
|
2887
|
+
return c(y);
|
|
2888
2888
|
});
|
|
2889
2889
|
});
|
|
2890
2890
|
},
|
|
2891
|
-
function(
|
|
2892
|
-
return Promise.reject(
|
|
2891
|
+
function(u) {
|
|
2892
|
+
return Promise.reject(u);
|
|
2893
2893
|
}
|
|
2894
|
-
), e.api.interceptors.response.use(function(
|
|
2895
|
-
return
|
|
2896
|
-
}, function(
|
|
2897
|
-
var
|
|
2898
|
-
switch (
|
|
2894
|
+
), e.api.interceptors.response.use(function(u) {
|
|
2895
|
+
return u;
|
|
2896
|
+
}, function(u) {
|
|
2897
|
+
var d = u && u.response && u.response.status || u.status;
|
|
2898
|
+
switch (d) {
|
|
2899
2899
|
case 401:
|
|
2900
2900
|
t.logout();
|
|
2901
2901
|
break;
|
|
2902
2902
|
}
|
|
2903
|
-
return Promise.reject(
|
|
2903
|
+
return Promise.reject(u);
|
|
2904
2904
|
}), t;
|
|
2905
|
-
},
|
|
2905
|
+
}, Q = {};
|
|
2906
2906
|
function pr(e) {
|
|
2907
2907
|
if (e === 0)
|
|
2908
2908
|
return !1;
|
|
@@ -2912,15 +2912,15 @@ function pr(e) {
|
|
|
2912
2912
|
function Kr(e) {
|
|
2913
2913
|
return !pr(e);
|
|
2914
2914
|
}
|
|
2915
|
-
|
|
2915
|
+
Q.cleanKey = function(e) {
|
|
2916
2916
|
return e = String(e).split("|")[0], e[0] == "." && (e = e.slice(1)), e;
|
|
2917
2917
|
};
|
|
2918
|
-
|
|
2918
|
+
Q.isValidFilter = function(e) {
|
|
2919
2919
|
if (!e)
|
|
2920
2920
|
return !1;
|
|
2921
2921
|
if (e.operator)
|
|
2922
|
-
return !e.filters || !e.filters.length ? !1 : e.filters.some(
|
|
2923
|
-
var r =
|
|
2922
|
+
return !e.filters || !e.filters.length ? !1 : e.filters.some(Q.isValidFilter);
|
|
2923
|
+
var r = Q.cleanKey(e.key);
|
|
2924
2924
|
if (!r)
|
|
2925
2925
|
return !1;
|
|
2926
2926
|
switch (e.comparator) {
|
|
@@ -2941,76 +2941,76 @@ q.isValidFilter = function(e) {
|
|
|
2941
2941
|
var a = (e.values || []).filter(Kr);
|
|
2942
2942
|
return !pr(e.value) || !pr(e.value2) || a.length;
|
|
2943
2943
|
};
|
|
2944
|
-
|
|
2944
|
+
Q.activeFilters = function(e) {
|
|
2945
2945
|
var r = [];
|
|
2946
2946
|
return a(e, r), r;
|
|
2947
|
-
function a(t,
|
|
2947
|
+
function a(t, i) {
|
|
2948
2948
|
if (t) {
|
|
2949
|
-
var
|
|
2950
|
-
|
|
2951
|
-
a(
|
|
2949
|
+
var s = Q.isValidFilter(t);
|
|
2950
|
+
s && i.push(t), t.filters && t.filters.length && t.filters.forEach(function(f) {
|
|
2951
|
+
a(f, i);
|
|
2952
2952
|
});
|
|
2953
2953
|
}
|
|
2954
2954
|
}
|
|
2955
2955
|
};
|
|
2956
|
-
|
|
2956
|
+
Q.activeFilterKeys = function(e, r) {
|
|
2957
2957
|
r = r || {};
|
|
2958
|
-
var a =
|
|
2959
|
-
return !
|
|
2960
|
-
}).reduce(function(
|
|
2961
|
-
var
|
|
2962
|
-
return r.trimArrayDelimeters !== !1 && (
|
|
2963
|
-
}, {}),
|
|
2964
|
-
return
|
|
2958
|
+
var a = Q.activeFilters(e), t = a.filter(function(s) {
|
|
2959
|
+
return !s.operator;
|
|
2960
|
+
}).reduce(function(s, f) {
|
|
2961
|
+
var u = Q.cleanKey(f.key);
|
|
2962
|
+
return r.trimArrayDelimeters !== !1 && (u = u.split("[]").join("")), s[u] = !0, s;
|
|
2963
|
+
}, {}), i = Object.keys(t);
|
|
2964
|
+
return i;
|
|
2965
2965
|
};
|
|
2966
|
-
|
|
2967
|
-
var r =
|
|
2966
|
+
Q.activeFilterComparators = function(e) {
|
|
2967
|
+
var r = Q.activeFilters(e).filter(function(a) {
|
|
2968
2968
|
return !a.operator;
|
|
2969
2969
|
}).reduce(function(a, t) {
|
|
2970
2970
|
return a[t.comparator] = !0, a;
|
|
2971
2971
|
}, {});
|
|
2972
2972
|
return Object.keys(r);
|
|
2973
2973
|
};
|
|
2974
|
-
|
|
2975
|
-
var r =
|
|
2974
|
+
Q.activeFilterOperators = function(e) {
|
|
2975
|
+
var r = Q.activeFilters(e).filter(function(a) {
|
|
2976
2976
|
return a.operator;
|
|
2977
2977
|
}).reduce(function(a, t) {
|
|
2978
2978
|
return a[t.operator] = !0, a;
|
|
2979
2979
|
}, {});
|
|
2980
2980
|
return Object.keys(r);
|
|
2981
2981
|
};
|
|
2982
|
-
|
|
2983
|
-
var a =
|
|
2984
|
-
function t(
|
|
2985
|
-
if (
|
|
2986
|
-
return
|
|
2987
|
-
}
|
|
2988
|
-
var
|
|
2989
|
-
return !
|
|
2990
|
-
}).reduce(function(
|
|
2991
|
-
return
|
|
2982
|
+
Q.activeFilterValues = function(e, r) {
|
|
2983
|
+
var a = Q.activeFilters(e);
|
|
2984
|
+
function t(s) {
|
|
2985
|
+
if (s)
|
|
2986
|
+
return s._id || s.id || s.title || s.name || s;
|
|
2987
|
+
}
|
|
2988
|
+
var i = a.filter(function(s) {
|
|
2989
|
+
return !s.operator;
|
|
2990
|
+
}).reduce(function(s, f) {
|
|
2991
|
+
return s = [...s, ...(f.values || []).map(t), t(f.value), t(f.value2)], s;
|
|
2992
2992
|
}, []).filter(Kr);
|
|
2993
|
-
return
|
|
2993
|
+
return i;
|
|
2994
2994
|
};
|
|
2995
|
-
|
|
2996
|
-
var r =
|
|
2995
|
+
Q.filterChangeString = function(e) {
|
|
2996
|
+
var r = Q.activeFilters(e);
|
|
2997
2997
|
return JSON.stringify(r);
|
|
2998
2998
|
};
|
|
2999
2999
|
function Pt(e) {
|
|
3000
3000
|
var r = {};
|
|
3001
|
-
return r.downloadUrl = function(a, t,
|
|
3002
|
-
return
|
|
3001
|
+
return r.downloadUrl = function(a, t, i, s) {
|
|
3002
|
+
return s = s || {}, i = i || {}, i.download = !0, t = e.utils.id(t), e.api.generateEndpointURL(`/${a}/${t}`, i, s);
|
|
3003
3003
|
}, r.duration = function(a) {
|
|
3004
|
-
const t = Math.round(a),
|
|
3005
|
-
return
|
|
3006
|
-
}, r.mediaUrl = function(a, t,
|
|
3007
|
-
|
|
3008
|
-
let
|
|
3009
|
-
return
|
|
3004
|
+
const t = Math.round(a), i = Math.floor(t / 3600), s = Math.floor(t % 3600 / 60), f = t % 60;
|
|
3005
|
+
return i > 0 ? `${i}:${s.toString().padStart(2, "0")}:${f.toString().padStart(2, "0")}` : `${s}:${f.toString().padStart(2, "0")}`;
|
|
3006
|
+
}, r.mediaUrl = function(a, t, i, s) {
|
|
3007
|
+
s = s || {}, i = i || {}, t = e.utils.id(t);
|
|
3008
|
+
let f = `/${a}/${t}`;
|
|
3009
|
+
return s.extension?.length && (s.extension.includes(".") ? f = `${f}/${s.extension}` : f = `${f}/${a}.${s.extension}`), e.api.generateEndpointURL(f, i, s);
|
|
3010
3010
|
}, r.filesize = function(a, t) {
|
|
3011
3011
|
if (a == 0) return "0 Bytes";
|
|
3012
|
-
var
|
|
3013
|
-
return parseFloat((a / Math.pow(
|
|
3012
|
+
var i = 1024, s = t || 2, f = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"], u = Math.floor(Math.log(a) / Math.log(i));
|
|
3013
|
+
return parseFloat((a / Math.pow(i, u)).toFixed(s)) + " " + f[u];
|
|
3014
3014
|
}, r.getBinaryTypeFromMime = function(a) {
|
|
3015
3015
|
if (!a)
|
|
3016
3016
|
return "file";
|
|
@@ -3109,133 +3109,133 @@ var $e = {}, xt = {
|
|
|
3109
3109
|
}, r.featureIsIncludedInByteflag = function(a, t) {
|
|
3110
3110
|
return (a & r.featureFlags[t]) === r.featureFlags[t];
|
|
3111
3111
|
}, r.hasFeature = function(a, t) {
|
|
3112
|
-
const
|
|
3113
|
-
if (
|
|
3112
|
+
const i = a?.organisation || {}, s = i.features || {};
|
|
3113
|
+
if (s.all || s[t])
|
|
3114
3114
|
return !0;
|
|
3115
|
-
const
|
|
3116
|
-
return r.featureIsIncludedInByteflag(
|
|
3115
|
+
const f = i.ff;
|
|
3116
|
+
return r.featureIsIncludedInByteflag(f, "all") ? !0 : r.featureIsIncludedInByteflag(f, t);
|
|
3117
3117
|
}, r.isAdministrator = function(a) {
|
|
3118
3118
|
return a && a?.userType == "administrator";
|
|
3119
3119
|
}, r.getAllDescendants = function(a) {
|
|
3120
3120
|
var t = [];
|
|
3121
|
-
|
|
3122
|
-
function
|
|
3123
|
-
var
|
|
3124
|
-
t.push(
|
|
3125
|
-
|
|
3121
|
+
i(a);
|
|
3122
|
+
function i(s) {
|
|
3123
|
+
var f = e.utils.id(s);
|
|
3124
|
+
t.push(f), (s.children || []).forEach(function(u) {
|
|
3125
|
+
i(u);
|
|
3126
3126
|
});
|
|
3127
3127
|
}
|
|
3128
3128
|
return t;
|
|
3129
3129
|
}, r.hashPermissions = function(a) {
|
|
3130
3130
|
var t = {};
|
|
3131
|
-
for (var
|
|
3132
|
-
var
|
|
3133
|
-
(
|
|
3134
|
-
t[
|
|
3135
|
-
...new Set(t[
|
|
3131
|
+
for (var i in a?.permissions || {}) {
|
|
3132
|
+
var s = a?.permissions[i], f = r.getAllDescendants(s);
|
|
3133
|
+
(s.permissions || []).forEach(function(u) {
|
|
3134
|
+
t[u] || (t[u] = []), t[u] = [
|
|
3135
|
+
...new Set(t[u].concat(f))
|
|
3136
3136
|
];
|
|
3137
3137
|
});
|
|
3138
3138
|
}
|
|
3139
3139
|
return t;
|
|
3140
3140
|
}, r.allUserScopes = function(a) {
|
|
3141
|
-
var t = {},
|
|
3142
|
-
function
|
|
3143
|
-
if (
|
|
3144
|
-
var
|
|
3145
|
-
|
|
3146
|
-
|
|
3141
|
+
var t = {}, i = a?.permissions || {};
|
|
3142
|
+
function s(u) {
|
|
3143
|
+
if (u) {
|
|
3144
|
+
var d = e.utils.id(u);
|
|
3145
|
+
d && (t[d] = 1, u.children && u.children.length && u.children.forEach(function(m) {
|
|
3146
|
+
s(m);
|
|
3147
3147
|
}));
|
|
3148
3148
|
}
|
|
3149
3149
|
}
|
|
3150
|
-
for (var
|
|
3151
|
-
|
|
3150
|
+
for (var f in i)
|
|
3151
|
+
s(i[f]);
|
|
3152
3152
|
return Object.keys(t);
|
|
3153
|
-
}, r.actionableScopes = function(a, t,
|
|
3154
|
-
|
|
3155
|
-
var
|
|
3153
|
+
}, r.actionableScopes = function(a, t, i, s, f) {
|
|
3154
|
+
f = f || {};
|
|
3155
|
+
var u = [];
|
|
3156
3156
|
if (a?.userType == "administrator")
|
|
3157
|
-
|
|
3157
|
+
u = r.allUserScopes(a, f);
|
|
3158
3158
|
else {
|
|
3159
|
-
var
|
|
3160
|
-
if (!
|
|
3161
|
-
return
|
|
3162
|
-
let
|
|
3163
|
-
|
|
3159
|
+
var d = r.hashPermissions(a), m = i || s;
|
|
3160
|
+
if (!m)
|
|
3161
|
+
return u;
|
|
3162
|
+
let S = i ? d[`${i}.${t}`] || [] : [], A = s ? d[`${s}.${t}`] || [] : [];
|
|
3163
|
+
u = [...S, ...A];
|
|
3164
3164
|
}
|
|
3165
|
-
return
|
|
3165
|
+
return u || [];
|
|
3166
3166
|
}, r.isOwner = function(a, t) {
|
|
3167
|
-
var
|
|
3168
|
-
if (!
|
|
3167
|
+
var i = e.utils.id(a), s = e.utils.id(a?.persona), f = t.meta;
|
|
3168
|
+
if (!f)
|
|
3169
3169
|
return !1;
|
|
3170
|
-
var
|
|
3171
|
-
if (
|
|
3170
|
+
var u = f.userOwners || [], d = e.utils.ids([...u, f.userAuthor]), m = e.utils.hash(d);
|
|
3171
|
+
if (m[i])
|
|
3172
3172
|
return !0;
|
|
3173
|
-
var
|
|
3174
|
-
...
|
|
3175
|
-
|
|
3176
|
-
]),
|
|
3177
|
-
return
|
|
3173
|
+
var S = f.personaOwners || [], A = e.utils.ids([
|
|
3174
|
+
...S,
|
|
3175
|
+
f.personaAuthor
|
|
3176
|
+
]), P = e.utils.hash(A);
|
|
3177
|
+
return P[s] ? !0 : r.isAssignee(a, t);
|
|
3178
3178
|
}, r.isAssignee = function(a, t) {
|
|
3179
|
-
const
|
|
3180
|
-
if (!
|
|
3179
|
+
const i = e.utils.ids(a?.profiles);
|
|
3180
|
+
if (!i.length)
|
|
3181
3181
|
return !1;
|
|
3182
|
-
const
|
|
3183
|
-
if (!
|
|
3182
|
+
const s = e.utils.ids(t.assignees);
|
|
3183
|
+
if (!s.length)
|
|
3184
3184
|
return !1;
|
|
3185
|
-
const
|
|
3186
|
-
return !!
|
|
3185
|
+
const f = new Set(s);
|
|
3186
|
+
return !!i.filter((m) => f.has(m)).length;
|
|
3187
3187
|
}, r.allPermissions = function(a) {
|
|
3188
|
-
var t = Object.values(a?.permissions || {}).map(function(
|
|
3189
|
-
return
|
|
3188
|
+
var t = Object.values(a?.permissions || {}).map(function(i) {
|
|
3189
|
+
return i.permissions;
|
|
3190
3190
|
}).flat();
|
|
3191
3191
|
return t;
|
|
3192
3192
|
}, r.allPermissionTypes = function(a, t) {
|
|
3193
|
-
return t ? r.allPermissions(a).reduce(function(
|
|
3194
|
-
var
|
|
3195
|
-
return
|
|
3196
|
-
}, {}) : r.allPermissions(a).map(function(
|
|
3197
|
-
return
|
|
3193
|
+
return t ? r.allPermissions(a).reduce(function(i, s) {
|
|
3194
|
+
var f = s.split(".")[0];
|
|
3195
|
+
return i[f] = !0, i;
|
|
3196
|
+
}, {}) : r.allPermissions(a).map(function(i) {
|
|
3197
|
+
return i.split(".")[0];
|
|
3198
3198
|
});
|
|
3199
|
-
}, r.canKnowOf = function(a, t,
|
|
3200
|
-
return
|
|
3201
|
-
}, r.checkActionAccess = function(a, t,
|
|
3202
|
-
if (
|
|
3199
|
+
}, r.canKnowOf = function(a, t, i) {
|
|
3200
|
+
return i = i || {}, i.cache = i.cache || {}, r.allPermissionTypes(a, !0)[t];
|
|
3201
|
+
}, r.checkActionAccess = function(a, t, i, s, f) {
|
|
3202
|
+
if (f = f || {}, f.cache = f.cache || {}, r.isAdministrator(a))
|
|
3203
3203
|
return !0;
|
|
3204
|
-
var
|
|
3205
|
-
if (!
|
|
3204
|
+
var u = t.meta?.type, d = t.meta?.definition || u;
|
|
3205
|
+
if (!d)
|
|
3206
3206
|
return !1;
|
|
3207
|
-
var
|
|
3208
|
-
if (
|
|
3209
|
-
|
|
3207
|
+
var m = e.utils.ids(t.meta.scopes || []), S, A = `access-${a?.cacheKey}-${i}-${d}-${u}`;
|
|
3208
|
+
if (f.cache[A])
|
|
3209
|
+
S = f.cache[A];
|
|
3210
3210
|
else {
|
|
3211
|
-
var
|
|
3212
|
-
r.actionableScopes(a,
|
|
3211
|
+
var P = e.utils.ids(
|
|
3212
|
+
r.actionableScopes(a, i, d, u, f)
|
|
3213
3213
|
);
|
|
3214
|
-
|
|
3214
|
+
S = e.utils.hash(P), f.cache[A] = S;
|
|
3215
3215
|
}
|
|
3216
|
-
if (
|
|
3217
|
-
var
|
|
3218
|
-
return
|
|
3216
|
+
if (S) {
|
|
3217
|
+
var v = m.some(function(y) {
|
|
3218
|
+
return S[y];
|
|
3219
3219
|
});
|
|
3220
|
-
if (
|
|
3220
|
+
if (v)
|
|
3221
3221
|
return !0;
|
|
3222
3222
|
}
|
|
3223
|
-
var
|
|
3224
|
-
if (
|
|
3225
|
-
var
|
|
3226
|
-
if (
|
|
3227
|
-
|
|
3223
|
+
var g = r.isOwner(a, t);
|
|
3224
|
+
if (g) {
|
|
3225
|
+
var x, o = `access-${a?.cacheKey}-${s}-${d}-${u}`;
|
|
3226
|
+
if (f.cache[o])
|
|
3227
|
+
x = f.cache[o];
|
|
3228
3228
|
else {
|
|
3229
|
-
var
|
|
3230
|
-
r.actionableScopes(a,
|
|
3229
|
+
var n = e.utils.ids(
|
|
3230
|
+
r.actionableScopes(a, s, d, u, f)
|
|
3231
3231
|
);
|
|
3232
|
-
|
|
3232
|
+
x = e.utils.hash(n), f.cache[o] = x;
|
|
3233
3233
|
}
|
|
3234
|
-
if (
|
|
3235
|
-
var
|
|
3236
|
-
return
|
|
3234
|
+
if (x) {
|
|
3235
|
+
var c = m.some(function(y) {
|
|
3236
|
+
return x[y];
|
|
3237
3237
|
});
|
|
3238
|
-
if (
|
|
3238
|
+
if (c)
|
|
3239
3239
|
return !0;
|
|
3240
3240
|
}
|
|
3241
3241
|
}
|
|
@@ -3243,77 +3243,77 @@ var $e = {}, xt = {
|
|
|
3243
3243
|
}, r.has = function(a, t) {
|
|
3244
3244
|
if (r.isAdministrator(a))
|
|
3245
3245
|
return !0;
|
|
3246
|
-
var
|
|
3247
|
-
return
|
|
3248
|
-
}, r.canCreate = function(a, t,
|
|
3249
|
-
if (
|
|
3246
|
+
var i = r.hashPermissions(a);
|
|
3247
|
+
return i[t];
|
|
3248
|
+
}, r.canCreate = function(a, t, i, s) {
|
|
3249
|
+
if (s = s || {}, s.cache = s.cache || {}, r.isAdministrator(a))
|
|
3250
3250
|
return !0;
|
|
3251
|
-
var
|
|
3251
|
+
var f = r.actionableScopes(
|
|
3252
3252
|
a,
|
|
3253
3253
|
"create",
|
|
3254
3254
|
t,
|
|
3255
|
-
|
|
3255
|
+
i
|
|
3256
3256
|
);
|
|
3257
|
-
return
|
|
3258
|
-
}, r.canListItem = function(a, t,
|
|
3259
|
-
|
|
3260
|
-
var
|
|
3257
|
+
return f.length;
|
|
3258
|
+
}, r.canListItem = function(a, t, i) {
|
|
3259
|
+
i = i || {}, i.cache = i.cache || {};
|
|
3260
|
+
var s = r.checkActionAccess(
|
|
3261
3261
|
a,
|
|
3262
3262
|
t,
|
|
3263
3263
|
"listany",
|
|
3264
3264
|
"listown",
|
|
3265
|
-
|
|
3265
|
+
i
|
|
3266
3266
|
);
|
|
3267
|
-
if (
|
|
3267
|
+
if (s)
|
|
3268
3268
|
return !0;
|
|
3269
|
-
var
|
|
3270
|
-
return !!
|
|
3271
|
-
}, r.canViewItem = function(a, t,
|
|
3272
|
-
|
|
3273
|
-
var
|
|
3269
|
+
var f = r.canViewItem(a, t, i);
|
|
3270
|
+
return !!f;
|
|
3271
|
+
}, r.canViewItem = function(a, t, i) {
|
|
3272
|
+
i = i || {}, i.cache = i.cache || {};
|
|
3273
|
+
var s = r.checkActionAccess(
|
|
3274
3274
|
a,
|
|
3275
3275
|
t,
|
|
3276
3276
|
"viewany",
|
|
3277
3277
|
"viewOwn",
|
|
3278
|
-
|
|
3278
|
+
i
|
|
3279
3279
|
);
|
|
3280
|
-
if (
|
|
3280
|
+
if (s)
|
|
3281
3281
|
return !0;
|
|
3282
|
-
var
|
|
3283
|
-
return !!
|
|
3284
|
-
}, r.canEditItem = function(a, t,
|
|
3285
|
-
|
|
3286
|
-
var
|
|
3282
|
+
var f = r.canEditItem(a, t, i);
|
|
3283
|
+
return !!f;
|
|
3284
|
+
}, r.canEditItem = function(a, t, i) {
|
|
3285
|
+
i = i || {}, i.cache = i.cache || {};
|
|
3286
|
+
var s = r.checkActionAccess(
|
|
3287
3287
|
a,
|
|
3288
3288
|
t,
|
|
3289
3289
|
"editany",
|
|
3290
3290
|
"editown",
|
|
3291
|
-
|
|
3291
|
+
i
|
|
3292
3292
|
);
|
|
3293
|
-
return
|
|
3294
|
-
}, r.canDeleteItem = function(a, t,
|
|
3295
|
-
return
|
|
3293
|
+
return s;
|
|
3294
|
+
}, r.canDeleteItem = function(a, t, i) {
|
|
3295
|
+
return i = i || {}, i.cache = i.cache || {}, r.checkActionAccess(
|
|
3296
3296
|
a,
|
|
3297
3297
|
t,
|
|
3298
3298
|
"deleteany",
|
|
3299
3299
|
"deleteown",
|
|
3300
|
-
|
|
3300
|
+
i
|
|
3301
3301
|
);
|
|
3302
|
-
}, r.canRestoreItem = function(a, t,
|
|
3303
|
-
return
|
|
3302
|
+
}, r.canRestoreItem = function(a, t, i) {
|
|
3303
|
+
return i = i || {}, i.cache = i.cache || {}, r.checkActionAccess(
|
|
3304
3304
|
a,
|
|
3305
3305
|
t,
|
|
3306
3306
|
"restoreany",
|
|
3307
3307
|
"restoreown",
|
|
3308
|
-
|
|
3308
|
+
i
|
|
3309
3309
|
);
|
|
3310
|
-
}, r.canEraseItem = function(a, t,
|
|
3311
|
-
return
|
|
3310
|
+
}, r.canEraseItem = function(a, t, i) {
|
|
3311
|
+
return i = i || {}, i.cache = i.cache || {}, r.checkActionAccess(
|
|
3312
3312
|
a,
|
|
3313
3313
|
t,
|
|
3314
3314
|
"eraseany",
|
|
3315
3315
|
"eraseown",
|
|
3316
|
-
|
|
3316
|
+
i
|
|
3317
3317
|
);
|
|
3318
3318
|
}, r;
|
|
3319
3319
|
};
|
|
@@ -3326,246 +3326,262 @@ function Ot(e) {
|
|
|
3326
3326
|
};
|
|
3327
3327
|
const a = {};
|
|
3328
3328
|
let t;
|
|
3329
|
-
r.variables = async function(
|
|
3330
|
-
|
|
3331
|
-
var
|
|
3332
|
-
if (
|
|
3329
|
+
r.variables = async function(o, n) {
|
|
3330
|
+
n = n || {}, o = o || [];
|
|
3331
|
+
var c = n.refresh || n.reload || !a.data;
|
|
3332
|
+
if (c) {
|
|
3333
3333
|
if (!t) {
|
|
3334
|
-
let
|
|
3334
|
+
let b = function() {
|
|
3335
3335
|
t = null;
|
|
3336
3336
|
};
|
|
3337
|
-
t = e.api.post("/variables", { keys:
|
|
3337
|
+
t = e.api.post("/variables", { keys: o }), t.then(b, b);
|
|
3338
3338
|
}
|
|
3339
|
-
const { data:
|
|
3340
|
-
a.data =
|
|
3339
|
+
const { data: y } = await t;
|
|
3340
|
+
a.data = y, e.dispatch("variables", y);
|
|
3341
3341
|
}
|
|
3342
3342
|
return a.data;
|
|
3343
3343
|
};
|
|
3344
|
-
const
|
|
3345
|
-
let
|
|
3346
|
-
function
|
|
3347
|
-
return
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3344
|
+
const i = e.cache.get("user:glossary");
|
|
3345
|
+
let s, f = null, u = null;
|
|
3346
|
+
async function d() {
|
|
3347
|
+
return u || (u = import("./inflate-glossary.worker-CGZQmJtn.js"), u);
|
|
3348
|
+
}
|
|
3349
|
+
async function m() {
|
|
3350
|
+
if (f) return f;
|
|
3351
|
+
const o = await d();
|
|
3352
|
+
return f = new o.default(), f;
|
|
3353
|
+
}
|
|
3354
|
+
function S({ _s: o, _k: n, types: c }) {
|
|
3355
|
+
function y(b) {
|
|
3353
3356
|
if (typeof b == "string" && b[0] === "~")
|
|
3354
|
-
return
|
|
3355
|
-
if (Array.isArray(b)) return b.map(
|
|
3357
|
+
return o[parseInt(b.slice(1))];
|
|
3358
|
+
if (Array.isArray(b)) return b.map(y);
|
|
3356
3359
|
if (b && typeof b == "object") {
|
|
3357
|
-
const
|
|
3358
|
-
for (const [
|
|
3359
|
-
|
|
3360
|
-
return
|
|
3360
|
+
const E = {};
|
|
3361
|
+
for (const [I, R] of Object.entries(b))
|
|
3362
|
+
E[n[I] || I] = y(R);
|
|
3363
|
+
return E;
|
|
3361
3364
|
}
|
|
3362
3365
|
return b;
|
|
3363
3366
|
}
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3367
|
+
return c.map(y);
|
|
3368
|
+
}
|
|
3369
|
+
async function A(o) {
|
|
3370
|
+
if (typeof Worker > "u")
|
|
3371
|
+
return S(o);
|
|
3372
|
+
try {
|
|
3373
|
+
const n = await m();
|
|
3374
|
+
return new Promise((c) => {
|
|
3375
|
+
const y = [], b = (I) => {
|
|
3376
|
+
const { chunk: R, done: k } = I.data;
|
|
3377
|
+
y.push(...R), k && (n.removeEventListener("message", b), n.removeEventListener("error", E), c(y));
|
|
3378
|
+
}, E = () => {
|
|
3379
|
+
n.removeEventListener("message", b), n.removeEventListener("error", E), c(S(o));
|
|
3380
|
+
};
|
|
3381
|
+
n.addEventListener("message", b), n.addEventListener("error", E), n.postMessage(o);
|
|
3382
|
+
});
|
|
3383
|
+
} catch {
|
|
3384
|
+
return S(o);
|
|
3368
3385
|
}
|
|
3369
|
-
return c;
|
|
3370
3386
|
}
|
|
3371
|
-
r.glossary = async function(
|
|
3372
|
-
|
|
3373
|
-
let
|
|
3374
|
-
var
|
|
3375
|
-
if (
|
|
3376
|
-
if (!
|
|
3377
|
-
let
|
|
3378
|
-
|
|
3387
|
+
r.glossary = async function(o) {
|
|
3388
|
+
o = o || {};
|
|
3389
|
+
let n = i.get("glossary"), y = !!!o.uncompressed;
|
|
3390
|
+
var b = o.refresh || o.reload || !n;
|
|
3391
|
+
if (b) {
|
|
3392
|
+
if (!s) {
|
|
3393
|
+
let j = function() {
|
|
3394
|
+
s = null, r.loadingGlossary = !1;
|
|
3379
3395
|
};
|
|
3380
3396
|
r.loadingGlossary = !0;
|
|
3381
|
-
const
|
|
3382
|
-
|
|
3397
|
+
const k = y ? "/glossary/compressed" : "/glossary";
|
|
3398
|
+
s = e.api.get(k, { cache: !1 }), s.then(j, j);
|
|
3383
3399
|
}
|
|
3384
|
-
const { data:
|
|
3385
|
-
|
|
3400
|
+
const { data: I } = await s, R = I._s && I._k && I.types ? await A(I) : I;
|
|
3401
|
+
i.set("glossary", R), n = R, e.dispatch("glossary", R);
|
|
3386
3402
|
}
|
|
3387
|
-
if (
|
|
3388
|
-
var
|
|
3389
|
-
return
|
|
3403
|
+
if (o.hash) {
|
|
3404
|
+
var E = e.utils.hash(n, "key");
|
|
3405
|
+
return E;
|
|
3390
3406
|
}
|
|
3391
|
-
if (
|
|
3392
|
-
var
|
|
3393
|
-
return
|
|
3407
|
+
if (o.hex) {
|
|
3408
|
+
var E = e.utils.hash(n, "hex");
|
|
3409
|
+
return E;
|
|
3394
3410
|
}
|
|
3395
|
-
return
|
|
3411
|
+
return n;
|
|
3396
3412
|
};
|
|
3397
|
-
const
|
|
3398
|
-
let
|
|
3399
|
-
r.scopeGlossary = async function(
|
|
3400
|
-
|
|
3401
|
-
var
|
|
3402
|
-
if (
|
|
3403
|
-
if (!
|
|
3404
|
-
let
|
|
3405
|
-
|
|
3413
|
+
const P = {};
|
|
3414
|
+
let v;
|
|
3415
|
+
r.scopeGlossary = async function(o) {
|
|
3416
|
+
o = o || {};
|
|
3417
|
+
var n = o.refresh || o.reload || !P.data;
|
|
3418
|
+
if (n) {
|
|
3419
|
+
if (!v) {
|
|
3420
|
+
let b = function() {
|
|
3421
|
+
v = null;
|
|
3406
3422
|
};
|
|
3407
|
-
|
|
3423
|
+
v = e.api.get("/scope/glossary", {
|
|
3408
3424
|
cache: !1
|
|
3409
|
-
}),
|
|
3425
|
+
}), v.then(b, b);
|
|
3410
3426
|
}
|
|
3411
|
-
const { data:
|
|
3412
|
-
|
|
3427
|
+
const { data: y } = await v;
|
|
3428
|
+
P.data = y;
|
|
3413
3429
|
}
|
|
3414
|
-
if (
|
|
3415
|
-
var
|
|
3416
|
-
return
|
|
3430
|
+
if (o.hash) {
|
|
3431
|
+
var c = e.utils.hash(P.data, "_id");
|
|
3432
|
+
return c;
|
|
3417
3433
|
}
|
|
3418
|
-
return
|
|
3434
|
+
return P.data;
|
|
3419
3435
|
};
|
|
3420
|
-
const
|
|
3421
|
-
r.comparators = async function(
|
|
3422
|
-
|
|
3423
|
-
var
|
|
3424
|
-
if (
|
|
3425
|
-
const { data:
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
return
|
|
3436
|
+
const g = {};
|
|
3437
|
+
r.comparators = async function(o) {
|
|
3438
|
+
o = o || {};
|
|
3439
|
+
var n = o.reload || o.refresh || !g.data;
|
|
3440
|
+
if (n) {
|
|
3441
|
+
const { data: c } = await e.api.get("/system/comparators");
|
|
3442
|
+
c.available = {}, Object.entries(c.types).forEach(([y, b]) => {
|
|
3443
|
+
c.available[y] = b.map(function(E) {
|
|
3444
|
+
return c.hash[E];
|
|
3429
3445
|
});
|
|
3430
|
-
}),
|
|
3446
|
+
}), g.data = c;
|
|
3431
3447
|
}
|
|
3432
|
-
return
|
|
3448
|
+
return g.data;
|
|
3433
3449
|
};
|
|
3434
|
-
function
|
|
3435
|
-
var { minimum:
|
|
3436
|
-
return
|
|
3437
|
-
}
|
|
3438
|
-
return r.meetsValidationRequirements = function(
|
|
3439
|
-
if (
|
|
3440
|
-
var
|
|
3441
|
-
if (
|
|
3442
|
-
return `Must be at least ${
|
|
3450
|
+
function x(o) {
|
|
3451
|
+
var { minimum: n, maximum: c } = o;
|
|
3452
|
+
return n = e.utils.parseInt(n), n = Math.max(n, 0), c = e.utils.parseInt(c), c = Math.max(c, 0), c == 0 || (c = Math.max(c, n)), { minimum: n, maximum: c };
|
|
3453
|
+
}
|
|
3454
|
+
return r.meetsValidationRequirements = function(o, n, c) {
|
|
3455
|
+
if (c.minLength) {
|
|
3456
|
+
var y = String(o).length;
|
|
3457
|
+
if (y < c.minLength)
|
|
3458
|
+
return `Must be at least ${c.minLength} characters`;
|
|
3443
3459
|
}
|
|
3444
|
-
if (
|
|
3445
|
-
var
|
|
3446
|
-
if (
|
|
3447
|
-
return `Can be no more than ${
|
|
3460
|
+
if (c.maxLength) {
|
|
3461
|
+
var y = String(o).length;
|
|
3462
|
+
if (y > c.maxLength)
|
|
3463
|
+
return `Can be no more than ${c.maxLength} characters`;
|
|
3448
3464
|
}
|
|
3449
|
-
if (
|
|
3450
|
-
var
|
|
3451
|
-
if (
|
|
3452
|
-
return `Must be at least ${
|
|
3465
|
+
if (c.minValue && o !== void 0) {
|
|
3466
|
+
var b = Number(o);
|
|
3467
|
+
if (b < c.minValue)
|
|
3468
|
+
return `Must be at least ${c.minValue}`;
|
|
3453
3469
|
}
|
|
3454
|
-
if (
|
|
3455
|
-
var
|
|
3456
|
-
if (
|
|
3457
|
-
return `Can be no greater than ${
|
|
3470
|
+
if (c.maxValue && o !== void 0) {
|
|
3471
|
+
var b = Number(o);
|
|
3472
|
+
if (b > c.maxValue)
|
|
3473
|
+
return `Can be no greater than ${c.maxValue}`;
|
|
3458
3474
|
}
|
|
3459
|
-
}, r.validateField = function(
|
|
3460
|
-
|
|
3461
|
-
var
|
|
3462
|
-
if (
|
|
3463
|
-
if (!
|
|
3475
|
+
}, r.validateField = function(o, n, c) {
|
|
3476
|
+
c = c || {};
|
|
3477
|
+
var y = n.type || "string", { minimum: b, maximum: E } = x(n), I = n.type == "group" && n.asObject, R = I ? b === E && E === 1 : E === 1, k = !R, j = e.utils.exists(o);
|
|
3478
|
+
if (b) {
|
|
3479
|
+
if (!j)
|
|
3464
3480
|
return {
|
|
3465
3481
|
valid: !1,
|
|
3466
|
-
message: `${
|
|
3482
|
+
message: `${n.title} is a required field`,
|
|
3467
3483
|
status: 400
|
|
3468
3484
|
};
|
|
3469
|
-
} else if (!
|
|
3485
|
+
} else if (!j)
|
|
3470
3486
|
return {
|
|
3471
3487
|
valid: !0
|
|
3472
3488
|
};
|
|
3473
|
-
if (
|
|
3474
|
-
if (!Array.isArray(
|
|
3475
|
-
return
|
|
3489
|
+
if (k) {
|
|
3490
|
+
if (!Array.isArray(o))
|
|
3491
|
+
return b ? {
|
|
3476
3492
|
valid: !1,
|
|
3477
|
-
message: `${
|
|
3493
|
+
message: `${n.title} requires at least ${b} values`,
|
|
3478
3494
|
status: 400
|
|
3479
|
-
} : (console.log("NOT PROVIDED AS ARRAY",
|
|
3495
|
+
} : (console.log("NOT PROVIDED AS ARRAY", n.title, o), {
|
|
3480
3496
|
valid: !1,
|
|
3481
|
-
message: `${
|
|
3497
|
+
message: `${n.title} must be provided as an array`,
|
|
3482
3498
|
status: 400
|
|
3483
3499
|
});
|
|
3484
|
-
var
|
|
3485
|
-
if (
|
|
3486
|
-
var
|
|
3487
|
-
return !
|
|
3488
|
-
}),
|
|
3500
|
+
var F = o;
|
|
3501
|
+
if (F = F.filter(function(T) {
|
|
3502
|
+
var z = T == null || T === "";
|
|
3503
|
+
return !z;
|
|
3504
|
+
}), b == E && b && F.length != b)
|
|
3489
3505
|
return {
|
|
3490
3506
|
valid: !1,
|
|
3491
|
-
message: `${
|
|
3507
|
+
message: `${n.title} requires exactly ${E} values`,
|
|
3492
3508
|
status: 400
|
|
3493
3509
|
};
|
|
3494
|
-
if (
|
|
3510
|
+
if (E && F.length > E)
|
|
3495
3511
|
return {
|
|
3496
3512
|
valid: !1,
|
|
3497
|
-
message: `${
|
|
3513
|
+
message: `${n.title} requires less than ${E + 1} values`,
|
|
3498
3514
|
status: 400
|
|
3499
3515
|
};
|
|
3500
|
-
if (
|
|
3516
|
+
if (F.length < b)
|
|
3501
3517
|
return {
|
|
3502
3518
|
valid: !1,
|
|
3503
|
-
message: `${
|
|
3519
|
+
message: `${n.title} requires at least ${b} values`,
|
|
3504
3520
|
status: 400
|
|
3505
3521
|
};
|
|
3506
3522
|
var N;
|
|
3507
|
-
if (
|
|
3508
|
-
var
|
|
3509
|
-
|
|
3510
|
-
var
|
|
3523
|
+
if (F.find(function(T) {
|
|
3524
|
+
var z = y;
|
|
3525
|
+
n.type === "group" && (z = "object"), n.type === "reference" && n.widget === "form" && (z = "object");
|
|
3526
|
+
var H = e.utils.isValidValue(
|
|
3511
3527
|
T,
|
|
3512
|
-
|
|
3513
|
-
|
|
3528
|
+
z,
|
|
3529
|
+
c.strict
|
|
3514
3530
|
);
|
|
3515
|
-
if (
|
|
3531
|
+
if (!H)
|
|
3516
3532
|
return N = !0, !0;
|
|
3517
|
-
if (
|
|
3518
|
-
var
|
|
3533
|
+
if (n.validation) {
|
|
3534
|
+
var X = r.meetsValidationRequirements(
|
|
3519
3535
|
T,
|
|
3520
|
-
|
|
3521
|
-
|
|
3536
|
+
y,
|
|
3537
|
+
n.validation
|
|
3522
3538
|
);
|
|
3523
|
-
if (
|
|
3539
|
+
if (X)
|
|
3524
3540
|
return N = !0, !0;
|
|
3525
3541
|
}
|
|
3526
3542
|
}), N)
|
|
3527
3543
|
return {
|
|
3528
3544
|
valid: !1,
|
|
3529
|
-
message: `Invalid input for ${
|
|
3545
|
+
message: `Invalid input for ${n.title}`,
|
|
3530
3546
|
status: 400
|
|
3531
3547
|
};
|
|
3532
3548
|
} else {
|
|
3533
|
-
var
|
|
3534
|
-
|
|
3535
|
-
var
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3549
|
+
var _ = y, L = n.widget;
|
|
3550
|
+
_ === "group" && (_ = "object"), _ === "reference" && L === "form" && (_ = "object");
|
|
3551
|
+
var B = r.getCleanedValue(o, _, c), $ = e.utils.isValidValue(
|
|
3552
|
+
B,
|
|
3553
|
+
_,
|
|
3554
|
+
c.strict
|
|
3539
3555
|
);
|
|
3540
|
-
if (
|
|
3556
|
+
if (!$)
|
|
3541
3557
|
return {
|
|
3542
3558
|
valid: !1,
|
|
3543
|
-
message: `Single value '${
|
|
3559
|
+
message: `Single value '${o}' is not a valid ${_} for ${n.title}`,
|
|
3544
3560
|
criteria: {
|
|
3545
|
-
isValidValue:
|
|
3546
|
-
cleanedValue:
|
|
3547
|
-
fieldType:
|
|
3548
|
-
options:
|
|
3561
|
+
isValidValue: $,
|
|
3562
|
+
cleanedValue: B,
|
|
3563
|
+
fieldType: y,
|
|
3564
|
+
options: c
|
|
3549
3565
|
},
|
|
3550
3566
|
status: 400
|
|
3551
3567
|
};
|
|
3552
3568
|
let T = !1;
|
|
3553
|
-
const
|
|
3554
|
-
if (String(
|
|
3555
|
-
const
|
|
3569
|
+
const z = {};
|
|
3570
|
+
if (String(n.minValue) && (z.minValue = parseInt(n.minValue), T = !0), String(n.maxValue) && (z.maxValue = parseInt(n.maxValue), T = !0), String(n.minLength) && (z.minLength = parseInt(n.minLength), T = !0), String(n.maxLength) && (z.maxLength = parseInt(n.maxLength), T = !0), T) {
|
|
3571
|
+
const H = Object.assign(
|
|
3556
3572
|
{},
|
|
3557
|
-
|
|
3558
|
-
|
|
3573
|
+
z,
|
|
3574
|
+
n.validation || {}
|
|
3559
3575
|
);
|
|
3560
|
-
var
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3576
|
+
var W = r.meetsValidationRequirements(
|
|
3577
|
+
o,
|
|
3578
|
+
y,
|
|
3579
|
+
H
|
|
3564
3580
|
);
|
|
3565
|
-
if (
|
|
3581
|
+
if (W)
|
|
3566
3582
|
return {
|
|
3567
3583
|
valid: !1,
|
|
3568
|
-
message:
|
|
3584
|
+
message: W,
|
|
3569
3585
|
status: 400
|
|
3570
3586
|
};
|
|
3571
3587
|
}
|
|
@@ -3573,83 +3589,83 @@ function Ot(e) {
|
|
|
3573
3589
|
return {
|
|
3574
3590
|
valid: !0
|
|
3575
3591
|
};
|
|
3576
|
-
}, r.getCleanedValue = function(
|
|
3577
|
-
switch (
|
|
3592
|
+
}, r.getCleanedValue = function(o, n, c) {
|
|
3593
|
+
switch (n) {
|
|
3578
3594
|
case "number":
|
|
3579
3595
|
case "float":
|
|
3580
3596
|
case "decimal":
|
|
3581
|
-
return e.utils.exists(
|
|
3597
|
+
return e.utils.exists(o) ? Number(o) : void 0;
|
|
3582
3598
|
case "integer":
|
|
3583
|
-
return e.utils.exists(
|
|
3599
|
+
return e.utils.exists(o) ? parseInt(o) : void 0;
|
|
3584
3600
|
case "boolean":
|
|
3585
|
-
return e.utils.exists(
|
|
3601
|
+
return e.utils.exists(o) ? e.utils.parseBoolean(o) : void 0;
|
|
3586
3602
|
case "email":
|
|
3587
|
-
return
|
|
3603
|
+
return c.strict ? o : String(o).toLowerCase();
|
|
3588
3604
|
case "reference":
|
|
3589
|
-
return
|
|
3605
|
+
return c.strict ? o : e.utils.id(o);
|
|
3590
3606
|
default:
|
|
3591
|
-
return
|
|
3607
|
+
return c.strict ? o : e.utils.cleanValue(o, n, c);
|
|
3592
3608
|
}
|
|
3593
|
-
return
|
|
3594
|
-
}, r.list = async function(
|
|
3595
|
-
|
|
3596
|
-
const
|
|
3597
|
-
if (
|
|
3598
|
-
|
|
3599
|
-
const
|
|
3600
|
-
return
|
|
3601
|
-
promise: e.api.post(
|
|
3602
|
-
cancel(
|
|
3603
|
-
|
|
3609
|
+
return o;
|
|
3610
|
+
}, r.list = async function(o, n, c) {
|
|
3611
|
+
c || (c = {});
|
|
3612
|
+
const y = c.remoteURL || `/content/${o}/list`;
|
|
3613
|
+
if (c.cancellable) {
|
|
3614
|
+
c.config || (c.config = {});
|
|
3615
|
+
const E = e.api.CancelToken.source();
|
|
3616
|
+
return c.config.cancelToken = E.token, {
|
|
3617
|
+
promise: e.api.post(y, n, c.config),
|
|
3618
|
+
cancel(R) {
|
|
3619
|
+
E.cancel(R || "Operation canceled by the user.");
|
|
3604
3620
|
}
|
|
3605
3621
|
};
|
|
3606
3622
|
} else {
|
|
3607
|
-
const { data:
|
|
3608
|
-
return
|
|
3623
|
+
const { data: b } = await e.api.post(y, n, c.config);
|
|
3624
|
+
return b;
|
|
3609
3625
|
}
|
|
3610
|
-
}, r.create = async function(
|
|
3611
|
-
const
|
|
3612
|
-
|
|
3613
|
-
const { data:
|
|
3614
|
-
return
|
|
3615
|
-
}, r.update = async function(
|
|
3616
|
-
|
|
3617
|
-
const
|
|
3618
|
-
|
|
3619
|
-
const { data:
|
|
3620
|
-
return
|
|
3621
|
-
}, r.patch = async function(
|
|
3622
|
-
|
|
3623
|
-
const
|
|
3624
|
-
|
|
3625
|
-
const { data:
|
|
3626
|
-
return
|
|
3627
|
-
}, r.get = async function(
|
|
3628
|
-
|
|
3629
|
-
const { data:
|
|
3630
|
-
return
|
|
3631
|
-
}, r.getFromID = async function(
|
|
3632
|
-
return r.get(
|
|
3633
|
-
}, r.delete = async function(
|
|
3634
|
-
|
|
3635
|
-
const { data:
|
|
3636
|
-
return
|
|
3637
|
-
}, r.restore = async function(
|
|
3638
|
-
|
|
3639
|
-
const { data:
|
|
3640
|
-
return
|
|
3641
|
-
}, r.getFromSlug = async function(
|
|
3642
|
-
const { data:
|
|
3643
|
-
return
|
|
3626
|
+
}, r.create = async function(o, n) {
|
|
3627
|
+
const c = { ...n };
|
|
3628
|
+
c.meta?.scopes && (c.meta.scopes = e.utils.ids(c.meta.scopes));
|
|
3629
|
+
const { data: y } = await e.api.post(`/content/${o}/create`, c);
|
|
3630
|
+
return y;
|
|
3631
|
+
}, r.update = async function(o, n) {
|
|
3632
|
+
o = e.utils.id(o);
|
|
3633
|
+
const c = { ...n };
|
|
3634
|
+
c.meta?.scopes && (c.meta.scopes = e.utils.ids(c.meta.scopes));
|
|
3635
|
+
const { data: y } = await e.api.put(`/content/${o}`, c);
|
|
3636
|
+
return y;
|
|
3637
|
+
}, r.patch = async function(o, n) {
|
|
3638
|
+
o = e.utils.id(o);
|
|
3639
|
+
const c = { ...n };
|
|
3640
|
+
c.meta?.scopes && (c.meta.scopes = e.utils.ids(c.meta.scopes));
|
|
3641
|
+
const { data: y } = await e.api.patch(`/content/${o}`, c);
|
|
3642
|
+
return y;
|
|
3643
|
+
}, r.get = async function(o, n) {
|
|
3644
|
+
o = e.utils.id(o), n = n || {};
|
|
3645
|
+
const { data: c } = await e.api.get(`/content/${o}`, n);
|
|
3646
|
+
return c;
|
|
3647
|
+
}, r.getFromID = async function(o) {
|
|
3648
|
+
return r.get(o);
|
|
3649
|
+
}, r.delete = async function(o, n) {
|
|
3650
|
+
o = e.utils.id(o);
|
|
3651
|
+
const { data: c } = await e.api.delete(`/content/${o}`, n);
|
|
3652
|
+
return c;
|
|
3653
|
+
}, r.restore = async function(o, n) {
|
|
3654
|
+
o = e.utils.id(o);
|
|
3655
|
+
const { data: c } = await e.api.get(`/content/${o}/restore`, n);
|
|
3656
|
+
return c;
|
|
3657
|
+
}, r.getFromSlug = async function(o) {
|
|
3658
|
+
const { data: n } = await e.api.get(`/content/slug/${o}`);
|
|
3659
|
+
return n;
|
|
3644
3660
|
}, r;
|
|
3645
3661
|
}
|
|
3646
3662
|
function Mt(e) {
|
|
3647
3663
|
var r = {}, a;
|
|
3648
3664
|
return r.countries = async function() {
|
|
3649
|
-
return a || (a = new Promise(async function(t,
|
|
3650
|
-
e.api.get("/system/countries").then(function(
|
|
3651
|
-
return t(
|
|
3652
|
-
}).catch(
|
|
3665
|
+
return a || (a = new Promise(async function(t, i) {
|
|
3666
|
+
e.api.get("/system/countries").then(function(s) {
|
|
3667
|
+
return t(s.data);
|
|
3668
|
+
}).catch(i);
|
|
3653
3669
|
})), a;
|
|
3654
3670
|
}, r;
|
|
3655
3671
|
}
|
|
@@ -3658,21 +3674,21 @@ function kt(e) {
|
|
|
3658
3674
|
function a() {
|
|
3659
3675
|
return !(typeof window > "u" || !window.navigator || !window.navigator.geolocation);
|
|
3660
3676
|
}
|
|
3661
|
-
return r.distance = function({ lat: t, lon:
|
|
3662
|
-
function
|
|
3663
|
-
return
|
|
3677
|
+
return r.distance = function({ lat: t, lon: i }, { lat: s, lon: f }) {
|
|
3678
|
+
function u(g) {
|
|
3679
|
+
return g * (Math.PI / 180);
|
|
3664
3680
|
}
|
|
3665
|
-
var
|
|
3666
|
-
return
|
|
3681
|
+
var d = 6371e3, m = u(s - t), S = u(f - i), A = Math.sin(m / 2) * Math.sin(m / 2) + Math.cos(u(t)) * Math.cos(u(s)) * Math.sin(S / 2) * Math.sin(S / 2), P = 2 * Math.atan2(Math.sqrt(A), Math.sqrt(1 - A)), v = d * P;
|
|
3682
|
+
return v;
|
|
3667
3683
|
}, r.getPosition = async function() {
|
|
3668
|
-
return a() ? (console.log("qik:geo: getting location"), new Promise(function(t,
|
|
3669
|
-
navigator.geolocation.getCurrentPosition(t,
|
|
3684
|
+
return a() ? (console.log("qik:geo: getting location"), new Promise(function(t, i) {
|
|
3685
|
+
navigator.geolocation.getCurrentPosition(t, i);
|
|
3670
3686
|
})) : Promise.reject({ message: "Geolocation is not enabled" });
|
|
3671
3687
|
}, r.watchPosition = async function(t) {
|
|
3672
|
-
return a() ? (console.log("qik:geo: watching location"), new Promise(function(
|
|
3673
|
-
const
|
|
3674
|
-
|
|
3675
|
-
id:
|
|
3688
|
+
return a() ? (console.log("qik:geo: watching location"), new Promise(function(i, s) {
|
|
3689
|
+
const f = navigator.geolocation.watchPosition(t, s);
|
|
3690
|
+
i({
|
|
3691
|
+
id: f
|
|
3676
3692
|
});
|
|
3677
3693
|
})) : Promise.reject({ message: "Geolocation is not enabled" });
|
|
3678
3694
|
}, r.stopWatchPosition = async function(t) {
|
|
@@ -3680,9 +3696,9 @@ function kt(e) {
|
|
|
3680
3696
|
}, r.getDefaultTimezone = function() {
|
|
3681
3697
|
const { session: t } = e.auth.getCurrentUser();
|
|
3682
3698
|
if (t) {
|
|
3683
|
-
const
|
|
3684
|
-
if (
|
|
3685
|
-
return
|
|
3699
|
+
const i = t?.organisation?.timezone;
|
|
3700
|
+
if (i)
|
|
3701
|
+
return i;
|
|
3686
3702
|
}
|
|
3687
3703
|
if (!(typeof window > "u") && window.Intl)
|
|
3688
3704
|
return window.Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
@@ -4385,12 +4401,12 @@ function kt(e) {
|
|
|
4385
4401
|
], r.getDefaultCountry = function() {
|
|
4386
4402
|
const { session: t } = e.auth.getCurrentUser();
|
|
4387
4403
|
if (t) {
|
|
4388
|
-
const
|
|
4389
|
-
if (
|
|
4390
|
-
const
|
|
4404
|
+
const i = t?.organisation?.countryCode;
|
|
4405
|
+
if (i) {
|
|
4406
|
+
const s = r.countryLookup[i];
|
|
4391
4407
|
return {
|
|
4392
|
-
code:
|
|
4393
|
-
name:
|
|
4408
|
+
code: i,
|
|
4409
|
+
name: s
|
|
4394
4410
|
};
|
|
4395
4411
|
}
|
|
4396
4412
|
}
|
|
@@ -4406,88 +4422,88 @@ const It = function(e, r) {
|
|
|
4406
4422
|
connected: !1,
|
|
4407
4423
|
windowID: a,
|
|
4408
4424
|
autoreconnect: !0
|
|
4409
|
-
},
|
|
4410
|
-
const
|
|
4411
|
-
|
|
4412
|
-
if (
|
|
4413
|
-
return
|
|
4414
|
-
const
|
|
4415
|
-
|
|
4416
|
-
function
|
|
4417
|
-
|
|
4425
|
+
}, i, s = {};
|
|
4426
|
+
const f = {}, u = new je();
|
|
4427
|
+
u.bootstrap(t), t.channel = async function(g) {
|
|
4428
|
+
if (s[g])
|
|
4429
|
+
return s[g];
|
|
4430
|
+
const x = new je();
|
|
4431
|
+
s[g] = x, t.connected || await t.connect(), t.subscribe(g), t.addEventListener(g, o);
|
|
4432
|
+
function o(n) {
|
|
4433
|
+
x.dispatch("message", n);
|
|
4418
4434
|
}
|
|
4419
|
-
return
|
|
4420
|
-
t.removeAllListeners(),
|
|
4421
|
-
},
|
|
4435
|
+
return x.destroy = function() {
|
|
4436
|
+
t.removeAllListeners(), s[g] = null;
|
|
4437
|
+
}, s[g];
|
|
4422
4438
|
};
|
|
4423
|
-
function
|
|
4424
|
-
t.debug && console.log("[socket] Connection open",
|
|
4439
|
+
function d(g) {
|
|
4440
|
+
t.debug && console.log("[socket] Connection open", g), t.connected = !0, u.dispatch("connected", g);
|
|
4425
4441
|
}
|
|
4426
|
-
async function
|
|
4427
|
-
|
|
4442
|
+
async function m(g) {
|
|
4443
|
+
g.wasClean ? t.debug && console.log(`[socket] Connection closed cleanly, code=${g.code} reason=${g.reason}`) : t.debug && console.log("[socket] - connection closed due to error", g), t.connected = !1, u.dispatch("disconnected", g), i = null, t.autoreconnect && t.reconnect();
|
|
4428
4444
|
}
|
|
4429
|
-
function
|
|
4430
|
-
console.log("[event] socketError", event), t.debug && console.log("[socket] Error",
|
|
4445
|
+
function S(g) {
|
|
4446
|
+
console.log("[event] socketError", event), t.debug && console.log("[socket] Error", g), u.dispatch("error", g);
|
|
4431
4447
|
}
|
|
4432
|
-
function A(
|
|
4433
|
-
const
|
|
4434
|
-
t.debug && console.log("[socket] message received",
|
|
4448
|
+
function A(g) {
|
|
4449
|
+
const x = JSON.parse(g.data);
|
|
4450
|
+
t.debug && console.log("[socket] message received", x), u.dispatch("message", x), x.channel && u.dispatch(x.channel, x);
|
|
4435
4451
|
}
|
|
4436
|
-
async function
|
|
4437
|
-
|
|
4452
|
+
async function P(g) {
|
|
4453
|
+
i.send(JSON.stringify(g));
|
|
4438
4454
|
}
|
|
4439
|
-
function
|
|
4440
|
-
return new Promise(function(
|
|
4441
|
-
function
|
|
4455
|
+
function v() {
|
|
4456
|
+
return new Promise(function(g) {
|
|
4457
|
+
function x() {
|
|
4442
4458
|
if (t.connected)
|
|
4443
|
-
return i
|
|
4444
|
-
setTimeout(
|
|
4459
|
+
return g(i);
|
|
4460
|
+
setTimeout(x, 1e3);
|
|
4445
4461
|
}
|
|
4446
|
-
|
|
4462
|
+
x();
|
|
4447
4463
|
});
|
|
4448
4464
|
}
|
|
4449
4465
|
return t.connect = async function() {
|
|
4450
|
-
if (
|
|
4451
|
-
return
|
|
4452
|
-
const
|
|
4453
|
-
if (!
|
|
4466
|
+
if (i)
|
|
4467
|
+
return i.connected ? (console.log("[socket] - Socket is already connected"), i) : v();
|
|
4468
|
+
const g = e.auth.getCurrentToken();
|
|
4469
|
+
if (!g) {
|
|
4454
4470
|
t.debug && console.log("[socket] - Must be authenticated to connect to socket");
|
|
4455
4471
|
return;
|
|
4456
4472
|
}
|
|
4457
|
-
return
|
|
4473
|
+
return i = new WebSocket(`${t.url}?access_token=${g}&windowid=${a}`), i.addEventListener("close", m), i.addEventListener("error", S), i.addEventListener("open", d), i.addEventListener("message", A), t.debug && console.log("[socket] - Connected with event listeners"), v();
|
|
4458
4474
|
}, t.reconnect = async function() {
|
|
4459
4475
|
if (t.connected)
|
|
4460
4476
|
return;
|
|
4461
4477
|
t.debug && console.log("[socket] reconnecting...");
|
|
4462
|
-
const
|
|
4463
|
-
return Object.keys(
|
|
4464
|
-
t.subscribe(
|
|
4465
|
-
}),
|
|
4478
|
+
const g = await t.connect();
|
|
4479
|
+
return Object.keys(f).forEach(function(o) {
|
|
4480
|
+
t.subscribe(o);
|
|
4481
|
+
}), g;
|
|
4466
4482
|
}, t.close = async function() {
|
|
4467
|
-
if (!
|
|
4483
|
+
if (!i) {
|
|
4468
4484
|
console.log("[socket] - Socket is not connected");
|
|
4469
4485
|
return;
|
|
4470
4486
|
}
|
|
4471
|
-
const
|
|
4472
|
-
t.autoreconnect = !1,
|
|
4473
|
-
}, t.disconnect = t.close, t.subscribe = async function(
|
|
4474
|
-
if (!
|
|
4487
|
+
const g = t.autoreconnect;
|
|
4488
|
+
t.autoreconnect = !1, i.close(), i.removeEventListener("close", m), i.removeEventListener("error", S), i.removeEventListener("open", d), i.removeEventListener("message", A), i = null, m({ wasClean: !0 }), t.autoreconnect = g;
|
|
4489
|
+
}, t.disconnect = t.close, t.subscribe = async function(g) {
|
|
4490
|
+
if (!i) {
|
|
4475
4491
|
console.log("[socket] - Can't subscribe to channel as socket is not connected");
|
|
4476
4492
|
return;
|
|
4477
4493
|
}
|
|
4478
|
-
|
|
4494
|
+
P({
|
|
4479
4495
|
action: "subscribe",
|
|
4480
|
-
channel:
|
|
4481
|
-
}),
|
|
4482
|
-
}, t.unsubscribe = async function(
|
|
4483
|
-
if (!
|
|
4496
|
+
channel: g
|
|
4497
|
+
}), f[g] = !0, u.dispatch("subscribe", g), t.debug && console.log(`[socket] - subscribed to ${g}`);
|
|
4498
|
+
}, t.unsubscribe = async function(g) {
|
|
4499
|
+
if (!i) {
|
|
4484
4500
|
console.log("[socket] - Can't unsubscribe from channel as socket is not connected");
|
|
4485
4501
|
return;
|
|
4486
4502
|
}
|
|
4487
|
-
|
|
4503
|
+
P({
|
|
4488
4504
|
action: "unsubscribe",
|
|
4489
|
-
channel:
|
|
4490
|
-
}), delete
|
|
4505
|
+
channel: g
|
|
4506
|
+
}), delete f[g], u.dispatch("unsubscribe", g), t.debug && console.log(`[socket] - unsubscribed from ${g}`);
|
|
4491
4507
|
}, t;
|
|
4492
4508
|
};
|
|
4493
4509
|
function Nt(e) {
|
|
@@ -4516,41 +4532,41 @@ function Nt(e) {
|
|
|
4516
4532
|
value: xt,
|
|
4517
4533
|
writable: !1
|
|
4518
4534
|
});
|
|
4519
|
-
const t =
|
|
4535
|
+
const t = M;
|
|
4520
4536
|
Object.defineProperty(r, "utils", {
|
|
4521
4537
|
value: t,
|
|
4522
4538
|
writable: !1
|
|
4523
4539
|
}), Object.defineProperty(r, "filter", {
|
|
4524
|
-
value:
|
|
4540
|
+
value: Q,
|
|
4525
4541
|
writable: !1
|
|
4526
4542
|
});
|
|
4527
|
-
const
|
|
4543
|
+
const s = new Pt(r);
|
|
4528
4544
|
Object.defineProperty(r, "files", {
|
|
4529
|
-
value:
|
|
4545
|
+
value: s,
|
|
4530
4546
|
writable: !1
|
|
4531
|
-
}), new je().bootstrap(r), r.error = function(
|
|
4532
|
-
return r.dispatch("error", t.errorMessage(
|
|
4533
|
-
}, r.notify = function(
|
|
4534
|
-
return r.dispatch("notification", { message:
|
|
4547
|
+
}), new je().bootstrap(r), r.error = function(g) {
|
|
4548
|
+
return r.dispatch("error", t.errorMessage(g));
|
|
4549
|
+
}, r.notify = function(g, x) {
|
|
4550
|
+
return r.dispatch("notification", { message: g, options: x });
|
|
4535
4551
|
};
|
|
4536
|
-
const
|
|
4552
|
+
const u = new mt(r);
|
|
4537
4553
|
Object.defineProperty(r, "api", {
|
|
4538
|
-
value:
|
|
4554
|
+
value: u,
|
|
4539
4555
|
writable: !1
|
|
4540
4556
|
});
|
|
4541
|
-
const
|
|
4557
|
+
const d = new Et(r);
|
|
4542
4558
|
Object.defineProperty(r, "auth", {
|
|
4543
|
-
value:
|
|
4559
|
+
value: d,
|
|
4544
4560
|
writable: !1
|
|
4545
4561
|
});
|
|
4546
|
-
const
|
|
4562
|
+
const m = new It(r);
|
|
4547
4563
|
Object.defineProperty(r, "socket", {
|
|
4548
|
-
value:
|
|
4564
|
+
value: m,
|
|
4549
4565
|
writable: !1
|
|
4550
4566
|
});
|
|
4551
|
-
const
|
|
4567
|
+
const S = new Ct(r);
|
|
4552
4568
|
Object.defineProperty(r, "access", {
|
|
4553
|
-
value:
|
|
4569
|
+
value: S,
|
|
4554
4570
|
writable: !1
|
|
4555
4571
|
});
|
|
4556
4572
|
const A = new Mt(r);
|
|
@@ -4558,14 +4574,14 @@ function Nt(e) {
|
|
|
4558
4574
|
value: A,
|
|
4559
4575
|
writable: !1
|
|
4560
4576
|
});
|
|
4561
|
-
const
|
|
4577
|
+
const P = new kt(r);
|
|
4562
4578
|
Object.defineProperty(r, "geo", {
|
|
4563
|
-
value:
|
|
4579
|
+
value: P,
|
|
4564
4580
|
writable: !1
|
|
4565
4581
|
});
|
|
4566
|
-
const
|
|
4582
|
+
const v = new Ot(r);
|
|
4567
4583
|
return Object.defineProperty(r, "content", {
|
|
4568
|
-
value:
|
|
4584
|
+
value: v,
|
|
4569
4585
|
writable: !1
|
|
4570
4586
|
}), r;
|
|
4571
4587
|
}
|