@qikdev/sdk 1.0.10 → 1.0.13

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/main.js CHANGED
@@ -69,44 +69,44 @@ function Xr() {
69
69
  if (Cr) return Ye;
70
70
  Cr = 1;
71
71
  var e = "Function.prototype.bind called on incompatible ", r = Object.prototype.toString, i = Math.max, t = "[object Function]", a = function(c, p) {
72
- for (var w = [], A = 0; A < c.length; A += 1)
73
- w[A] = c[A];
72
+ for (var S = [], g = 0; g < c.length; g += 1)
73
+ S[g] = c[g];
74
74
  for (var u = 0; u < p.length; u += 1)
75
- w[u + c.length] = p[u];
76
- return w;
75
+ S[u + c.length] = p[u];
76
+ return S;
77
77
  }, n = function(c, p) {
78
- for (var w = [], A = p, u = 0; A < c.length; A += 1, u += 1)
79
- w[u] = c[A];
80
- return w;
81
- }, s = function(f, c) {
82
- for (var p = "", w = 0; w < f.length; w += 1)
83
- p += f[w], w + 1 < f.length && (p += c);
78
+ for (var S = [], g = p, u = 0; g < c.length; g += 1, u += 1)
79
+ S[u] = c[g];
80
+ return S;
81
+ }, s = function(d, c) {
82
+ for (var p = "", S = 0; S < d.length; S += 1)
83
+ p += d[S], S + 1 < d.length && (p += c);
84
84
  return p;
85
85
  };
86
86
  return Ye = function(c) {
87
87
  var p = this;
88
88
  if (typeof p != "function" || r.apply(p) !== t)
89
89
  throw new TypeError(e + p);
90
- for (var w = n(arguments, 1), A, u = function() {
91
- if (this instanceof A) {
90
+ for (var S = n(arguments, 1), g, u = function() {
91
+ if (this instanceof g) {
92
92
  var l = p.apply(
93
93
  this,
94
- a(w, arguments)
94
+ a(S, arguments)
95
95
  );
96
96
  return Object(l) === l ? l : this;
97
97
  }
98
98
  return p.apply(
99
99
  c,
100
- a(w, arguments)
100
+ a(S, arguments)
101
101
  );
102
- }, o = i(0, p.length - w.length), m = [], h = 0; h < o; h++)
103
- m[h] = "$" + h;
104
- if (A = Function("binder", "return function (" + s(m, ",") + "){ return binder.apply(this,arguments); }")(u), p.prototype) {
105
- var d = function() {
102
+ }, o = i(0, p.length - S.length), f = [], w = 0; w < o; w++)
103
+ f[w] = "$" + w;
104
+ if (g = Function("binder", "return function (" + s(f, ",") + "){ return binder.apply(this,arguments); }")(u), p.prototype) {
105
+ var m = function() {
106
106
  };
107
- d.prototype = p.prototype, A.prototype = new d(), d.prototype = null;
107
+ m.prototype = p.prototype, g.prototype = new m(), m.prototype = null;
108
108
  }
109
- return A;
109
+ return g;
110
110
  }, Ye;
111
111
  }
112
112
  var Xe, Mr;
@@ -116,20 +116,20 @@ function yr() {
116
116
  var e = Xr();
117
117
  return Xe = Function.prototype.bind || e, Xe;
118
118
  }
119
- var er, Ir;
119
+ var er, Tr;
120
120
  function et() {
121
- if (Ir) return er;
122
- Ir = 1;
121
+ if (Tr) return er;
122
+ Tr = 1;
123
123
  var e = yr();
124
124
  return er = e.call(Function.call, Object.prototype.hasOwnProperty), er;
125
125
  }
126
- var rr, Tr;
126
+ var rr, Rr;
127
127
  function hr() {
128
- if (Tr) return rr;
129
- Tr = 1;
130
- var e, r = SyntaxError, i = Function, t = TypeError, a = function($) {
128
+ if (Rr) return rr;
129
+ Rr = 1;
130
+ var e, r = SyntaxError, i = Function, t = TypeError, a = function(U) {
131
131
  try {
132
- return i('"use strict"; return (' + $ + ").constructor;")();
132
+ return i('"use strict"; return (' + U + ").constructor;")();
133
133
  } catch {
134
134
  }
135
135
  }, n = Object.getOwnPropertyDescriptor;
@@ -141,7 +141,7 @@ function hr() {
141
141
  }
142
142
  var s = function() {
143
143
  throw new t();
144
- }, f = n ? (function() {
144
+ }, d = n ? (function() {
145
145
  try {
146
146
  return arguments.callee, s;
147
147
  } catch {
@@ -151,18 +151,18 @@ function hr() {
151
151
  return s;
152
152
  }
153
153
  }
154
- })() : s, c = Yr()(), p = Object.getPrototypeOf || function($) {
155
- return $.__proto__;
156
- }, w = {}, A = typeof Uint8Array > "u" ? e : p(Uint8Array), u = {
154
+ })() : s, c = Yr()(), p = Object.getPrototypeOf || function(U) {
155
+ return U.__proto__;
156
+ }, S = {}, g = typeof Uint8Array > "u" ? e : p(Uint8Array), u = {
157
157
  "%AggregateError%": typeof AggregateError > "u" ? e : AggregateError,
158
158
  "%Array%": Array,
159
159
  "%ArrayBuffer%": typeof ArrayBuffer > "u" ? e : ArrayBuffer,
160
160
  "%ArrayIteratorPrototype%": c ? p([][Symbol.iterator]()) : e,
161
161
  "%AsyncFromSyncIteratorPrototype%": e,
162
- "%AsyncFunction%": w,
163
- "%AsyncGenerator%": w,
164
- "%AsyncGeneratorFunction%": w,
165
- "%AsyncIteratorPrototype%": w,
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,7 +180,7 @@ function hr() {
180
180
  "%Float64Array%": typeof Float64Array > "u" ? e : Float64Array,
181
181
  "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? e : FinalizationRegistry,
182
182
  "%Function%": i,
183
- "%GeneratorFunction%": w,
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,
@@ -208,8 +208,8 @@ function hr() {
208
208
  "%StringIteratorPrototype%": c ? p(""[Symbol.iterator]()) : e,
209
209
  "%Symbol%": c ? Symbol : e,
210
210
  "%SyntaxError%": r,
211
- "%ThrowTypeError%": f,
212
- "%TypedArray%": A,
211
+ "%ThrowTypeError%": d,
212
+ "%TypedArray%": g,
213
213
  "%TypeError%": t,
214
214
  "%Uint8Array%": typeof Uint8Array > "u" ? e : Uint8Array,
215
215
  "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? e : Uint8ClampedArray,
@@ -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
- }, o = function $(L) {
223
- var F;
224
- if (L === "%AsyncFunction%")
225
- F = a("async function () {}");
226
- else if (L === "%GeneratorFunction%")
227
- F = a("function* () {}");
228
- else if (L === "%AsyncGeneratorFunction%")
229
- F = a("async function* () {}");
230
- else if (L === "%AsyncGenerator%") {
231
- var k = $("%AsyncGeneratorFunction%");
232
- k && (F = k.prototype);
233
- } else if (L === "%AsyncIteratorPrototype%") {
234
- var R = $("%AsyncGenerator%");
235
- R && (F = p(R.prototype));
222
+ }, o = function U(x) {
223
+ var T;
224
+ if (x === "%AsyncFunction%")
225
+ T = a("async function () {}");
226
+ else if (x === "%GeneratorFunction%")
227
+ T = a("function* () {}");
228
+ else if (x === "%AsyncGeneratorFunction%")
229
+ T = a("async function* () {}");
230
+ else if (x === "%AsyncGenerator%") {
231
+ var I = U("%AsyncGeneratorFunction%");
232
+ I && (T = I.prototype);
233
+ } else if (x === "%AsyncIteratorPrototype%") {
234
+ var N = U("%AsyncGenerator%");
235
+ N && (T = p(N.prototype));
236
236
  }
237
- return u[L] = F, F;
238
- }, m = {
237
+ return u[x] = T, T;
238
+ }, f = {
239
239
  "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
240
240
  "%ArrayPrototype%": ["Array", "prototype"],
241
241
  "%ArrayProto_entries%": ["Array", "prototype", "entries"],
@@ -287,80 +287,80 @@ function hr() {
287
287
  "%URIErrorPrototype%": ["URIError", "prototype"],
288
288
  "%WeakMapPrototype%": ["WeakMap", "prototype"],
289
289
  "%WeakSetPrototype%": ["WeakSet", "prototype"]
290
- }, h = yr(), d = et(), l = h.call(Function.call, Array.prototype.concat), v = h.call(Function.apply, Array.prototype.splice), S = h.call(Function.call, String.prototype.replace), O = h.call(Function.call, String.prototype.slice), x = h.call(Function.call, RegExp.prototype.exec), T = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, N = /\\(\\)?/g, M = function(L) {
291
- var F = O(L, 0, 1), k = O(L, -1);
292
- if (F === "%" && k !== "%")
290
+ }, w = yr(), m = et(), l = w.call(Function.call, Array.prototype.concat), v = w.call(Function.apply, Array.prototype.splice), b = w.call(Function.call, String.prototype.replace), O = w.call(Function.call, String.prototype.slice), P = w.call(Function.call, RegExp.prototype.exec), k = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, L = /\\(\\)?/g, R = function(x) {
291
+ var T = O(x, 0, 1), I = O(x, -1);
292
+ if (T === "%" && I !== "%")
293
293
  throw new r("invalid intrinsic syntax, expected closing `%`");
294
- if (k === "%" && F !== "%")
294
+ if (I === "%" && T !== "%")
295
295
  throw new r("invalid intrinsic syntax, expected opening `%`");
296
- var R = [];
297
- return S(L, T, function(U, z, _, Z) {
298
- R[R.length] = _ ? S(Z, N, "$1") : z || U;
299
- }), R;
300
- }, V = function(L, F) {
301
- var k = L, R;
302
- if (d(m, k) && (R = m[k], k = "%" + R[0] + "%"), d(u, k)) {
303
- var U = u[k];
304
- if (U === w && (U = o(k)), typeof U > "u" && !F)
305
- throw new t("intrinsic " + L + " exists, but is not available. Please file an issue!");
296
+ var N = [];
297
+ return b(x, k, function($, z, F, Z) {
298
+ N[N.length] = F ? b(Z, L, "$1") : z || $;
299
+ }), N;
300
+ }, j = function(x, T) {
301
+ var I = x, N;
302
+ if (m(f, I) && (N = f[I], I = "%" + N[0] + "%"), m(u, I)) {
303
+ var $ = u[I];
304
+ if ($ === S && ($ = o(I)), typeof $ > "u" && !T)
305
+ throw new t("intrinsic " + x + " exists, but is not available. Please file an issue!");
306
306
  return {
307
- alias: R,
308
- name: k,
309
- value: U
307
+ alias: N,
308
+ name: I,
309
+ value: $
310
310
  };
311
311
  }
312
- throw new r("intrinsic " + L + " does not exist!");
312
+ throw new r("intrinsic " + x + " does not exist!");
313
313
  };
314
- return rr = function(L, F) {
315
- if (typeof L != "string" || L.length === 0)
314
+ return rr = function(x, T) {
315
+ if (typeof x != "string" || x.length === 0)
316
316
  throw new t("intrinsic name must be a non-empty string");
317
- if (arguments.length > 1 && typeof F != "boolean")
317
+ if (arguments.length > 1 && typeof T != "boolean")
318
318
  throw new t('"allowMissing" argument must be a boolean');
319
- if (x(/^%?[^%]*%?$/, L) === null)
319
+ if (P(/^%?[^%]*%?$/, x) === null)
320
320
  throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
321
- var k = M(L), R = k.length > 0 ? k[0] : "", U = V("%" + R + "%", F), z = U.name, _ = U.value, Z = !1, Q = U.alias;
322
- Q && (R = Q[0], v(k, l([0, 1], Q)));
323
- for (var ne = 1, X = !0; ne < k.length; ne += 1) {
324
- var K = k[ne], ie = O(K, 0, 1), re = O(K, -1);
321
+ var I = R(x), N = I.length > 0 ? I[0] : "", $ = j("%" + N + "%", T), z = $.name, F = $.value, Z = !1, Q = $.alias;
322
+ Q && (N = Q[0], v(I, l([0, 1], Q)));
323
+ for (var ne = 1, X = !0; ne < I.length; ne += 1) {
324
+ var K = I[ne], ie = O(K, 0, 1), re = O(K, -1);
325
325
  if ((ie === '"' || ie === "'" || ie === "`" || re === '"' || re === "'" || re === "`") && ie !== re)
326
326
  throw new r("property names with quotes must have matching quotes");
327
- if ((K === "constructor" || !X) && (Z = !0), R += "." + K, z = "%" + R + "%", d(u, z))
328
- _ = u[z];
329
- else if (_ != null) {
330
- if (!(K in _)) {
331
- if (!F)
332
- throw new t("base intrinsic for " + L + " exists, but the property is not available.");
327
+ if ((K === "constructor" || !X) && (Z = !0), N += "." + K, z = "%" + N + "%", m(u, z))
328
+ F = u[z];
329
+ else if (F != null) {
330
+ if (!(K in F)) {
331
+ if (!T)
332
+ throw new t("base intrinsic for " + x + " exists, but the property is not available.");
333
333
  return;
334
334
  }
335
- if (n && ne + 1 >= k.length) {
336
- var te = n(_, K);
337
- X = !!te, X && "get" in te && !("originalValue" in te.get) ? _ = te.get : _ = _[K];
335
+ if (n && ne + 1 >= I.length) {
336
+ var te = n(F, K);
337
+ X = !!te, X && "get" in te && !("originalValue" in te.get) ? F = te.get : F = F[K];
338
338
  } else
339
- X = d(_, K), _ = _[K];
340
- X && !Z && (u[z] = _);
339
+ X = m(F, K), F = F[K];
340
+ X && !Z && (u[z] = F);
341
341
  }
342
342
  }
343
- return _;
343
+ return F;
344
344
  }, rr;
345
345
  }
346
346
  var tr = { exports: {} }, kr;
347
347
  function rt() {
348
348
  return kr || (kr = 1, (function(e) {
349
- var r = yr(), i = hr(), t = i("%Function.prototype.apply%"), a = i("%Function.prototype.call%"), n = i("%Reflect.apply%", !0) || r.call(a, t), s = i("%Object.getOwnPropertyDescriptor%", !0), f = i("%Object.defineProperty%", !0), c = i("%Math.max%");
350
- if (f)
349
+ var r = yr(), i = hr(), t = i("%Function.prototype.apply%"), a = i("%Function.prototype.call%"), n = i("%Reflect.apply%", !0) || r.call(a, t), s = i("%Object.getOwnPropertyDescriptor%", !0), d = i("%Object.defineProperty%", !0), c = i("%Math.max%");
350
+ if (d)
351
351
  try {
352
- f({}, "a", { value: 1 });
352
+ d({}, "a", { value: 1 });
353
353
  } catch {
354
- f = null;
354
+ d = null;
355
355
  }
356
- e.exports = function(A) {
356
+ e.exports = function(g) {
357
357
  var u = n(r, a, arguments);
358
- if (s && f) {
358
+ if (s && d) {
359
359
  var o = s(u, "length");
360
- o.configurable && f(
360
+ o.configurable && d(
361
361
  u,
362
362
  "length",
363
- { value: 1 + c(0, A.length - (arguments.length - 1)) }
363
+ { value: 1 + c(0, g.length - (arguments.length - 1)) }
364
364
  );
365
365
  }
366
366
  return u;
@@ -368,13 +368,13 @@ function rt() {
368
368
  var p = function() {
369
369
  return n(r, t, arguments);
370
370
  };
371
- f ? f(e.exports, "apply", { value: p }) : e.exports.apply = p;
371
+ d ? d(e.exports, "apply", { value: p }) : e.exports.apply = p;
372
372
  })(tr)), tr.exports;
373
373
  }
374
- var ar, Rr;
374
+ var ar, Ir;
375
375
  function tt() {
376
- if (Rr) return ar;
377
- Rr = 1;
376
+ if (Ir) return ar;
377
+ Ir = 1;
378
378
  var e = hr(), r = rt(), i = r(e("String.prototype.indexOf"));
379
379
  return ar = function(a, n) {
380
380
  var s = e(a, !!n);
@@ -389,352 +389,352 @@ 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, i = e && r && typeof r.get == "function" ? r.get : null, t = e && Map.prototype.forEach, a = typeof Set == "function" && Set.prototype, n = Object.getOwnPropertyDescriptor && a ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, s = a && n && typeof n.get == "function" ? n.get : null, f = a && Set.prototype.forEach, c = typeof WeakMap == "function" && WeakMap.prototype, p = c ? WeakMap.prototype.has : null, w = typeof WeakSet == "function" && WeakSet.prototype, A = w ? WeakSet.prototype.has : null, u = typeof WeakRef == "function" && WeakRef.prototype, o = u ? WeakRef.prototype.deref : null, m = Boolean.prototype.valueOf, h = Object.prototype.toString, d = Function.prototype.toString, l = String.prototype.match, v = String.prototype.slice, S = String.prototype.replace, O = String.prototype.toUpperCase, x = String.prototype.toLowerCase, T = RegExp.prototype.test, N = Array.prototype.concat, M = Array.prototype.join, V = Array.prototype.slice, $ = Math.floor, L = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, F = Object.getOwnPropertySymbols, k = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, R = typeof Symbol == "function" && typeof Symbol.iterator == "object", U = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === R || !0) ? Symbol.toStringTag : null, z = Object.prototype.propertyIsEnumerable, _ = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(g) {
393
- return g.__proto__;
392
+ var e = typeof Map == "function" && Map.prototype, r = Object.getOwnPropertyDescriptor && e ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, i = e && r && typeof r.get == "function" ? r.get : null, t = e && Map.prototype.forEach, a = typeof Set == "function" && Set.prototype, n = Object.getOwnPropertyDescriptor && a ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, s = a && n && typeof n.get == "function" ? n.get : null, d = a && Set.prototype.forEach, c = typeof WeakMap == "function" && WeakMap.prototype, p = c ? WeakMap.prototype.has : null, S = typeof WeakSet == "function" && WeakSet.prototype, g = S ? WeakSet.prototype.has : null, u = typeof WeakRef == "function" && WeakRef.prototype, o = u ? WeakRef.prototype.deref : null, f = Boolean.prototype.valueOf, w = Object.prototype.toString, m = Function.prototype.toString, l = String.prototype.match, v = String.prototype.slice, b = String.prototype.replace, O = String.prototype.toUpperCase, P = String.prototype.toLowerCase, k = RegExp.prototype.test, L = Array.prototype.concat, R = Array.prototype.join, j = Array.prototype.slice, U = Math.floor, x = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, T = Object.getOwnPropertySymbols, I = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, N = typeof Symbol == "function" && typeof Symbol.iterator == "object", $ = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === N || !0) ? Symbol.toStringTag : null, z = Object.prototype.propertyIsEnumerable, F = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(h) {
393
+ return h.__proto__;
394
394
  } : null);
395
- function Z(g, b) {
396
- if (g === 1 / 0 || g === -1 / 0 || g !== g || g && g > -1e3 && g < 1e3 || T.call(/e/, b))
397
- return b;
395
+ function Z(h, A) {
396
+ if (h === 1 / 0 || h === -1 / 0 || h !== h || h && h > -1e3 && h < 1e3 || k.call(/e/, A))
397
+ return A;
398
398
  var D = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
399
- if (typeof g == "number") {
400
- var y = g < 0 ? -$(-g) : $(g);
401
- if (y !== g) {
402
- var E = String(y), P = v.call(b, E.length + 1);
403
- return S.call(E, D, "$&_") + "." + S.call(S.call(P, /([0-9]{3})/g, "$&_"), /_$/, "");
399
+ if (typeof h == "number") {
400
+ var y = h < 0 ? -U(-h) : U(h);
401
+ if (y !== h) {
402
+ var E = String(y), C = v.call(A, E.length + 1);
403
+ return b.call(E, D, "$&_") + "." + b.call(b.call(C, /([0-9]{3})/g, "$&_"), /_$/, "");
404
404
  }
405
405
  }
406
- return S.call(b, D, "$&_");
406
+ return b.call(A, D, "$&_");
407
407
  }
408
408
  var Q = it, ne = Q.custom, X = se(ne) ? ne : null;
409
- nr = function g(b, D, y, E) {
410
- var P = D || {};
411
- if (J(P, "quoteStyle") && P.quoteStyle !== "single" && P.quoteStyle !== "double")
409
+ nr = function h(A, D, y, E) {
410
+ var C = D || {};
411
+ if (J(C, "quoteStyle") && C.quoteStyle !== "single" && C.quoteStyle !== "double")
412
412
  throw new TypeError('option "quoteStyle" must be "single" or "double"');
413
- if (J(P, "maxStringLength") && (typeof P.maxStringLength == "number" ? P.maxStringLength < 0 && P.maxStringLength !== 1 / 0 : P.maxStringLength !== null))
413
+ if (J(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 = J(P, "customInspect") ? P.customInspect : !0;
415
+ var G = J(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 (J(P, "indent") && P.indent !== null && P.indent !== " " && !(parseInt(P.indent, 10) === P.indent && P.indent > 0))
418
+ if (J(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 (J(P, "numericSeparator") && typeof P.numericSeparator != "boolean")
420
+ if (J(C, "numericSeparator") && typeof C.numericSeparator != "boolean")
421
421
  throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
422
- var ae = P.numericSeparator;
423
- if (typeof b > "u")
422
+ var ae = C.numericSeparator;
423
+ if (typeof A > "u")
424
424
  return "undefined";
425
- if (b === null)
425
+ if (A === null)
426
426
  return "null";
427
- if (typeof b == "boolean")
428
- return b ? "true" : "false";
429
- if (typeof b == "string")
430
- return Oe(b, P);
431
- if (typeof b == "number") {
432
- if (b === 0)
433
- return 1 / 0 / b > 0 ? "0" : "-0";
434
- var W = String(b);
435
- return ae ? Z(b, W) : W;
427
+ if (typeof A == "boolean")
428
+ return A ? "true" : "false";
429
+ if (typeof A == "string")
430
+ return Oe(A, C);
431
+ if (typeof A == "number") {
432
+ if (A === 0)
433
+ return 1 / 0 / A > 0 ? "0" : "-0";
434
+ var W = String(A);
435
+ return ae ? Z(A, W) : W;
436
436
  }
437
- if (typeof b == "bigint") {
438
- var C = String(b) + "n";
439
- return ae ? Z(b, C) : C;
437
+ if (typeof A == "bigint") {
438
+ var M = String(A) + "n";
439
+ return ae ? Z(A, M) : M;
440
440
  }
441
- var B = typeof P.depth > "u" ? 5 : P.depth;
442
- if (typeof y > "u" && (y = 0), y >= B && B > 0 && typeof b == "object")
443
- return re(b) ? "[Array]" : "[Object]";
444
- var j = Le(P, y);
441
+ var B = typeof C.depth > "u" ? 5 : C.depth;
442
+ if (typeof y > "u" && (y = 0), y >= B && B > 0 && typeof A == "object")
443
+ return re(A) ? "[Array]" : "[Object]";
444
+ var V = Le(C, y);
445
445
  if (typeof E > "u")
446
446
  E = [];
447
- else if (xe(E, b) >= 0)
447
+ else if (xe(E, A) >= 0)
448
448
  return "[Circular]";
449
449
  function H(Me, Be, Jr) {
450
- if (Be && (E = V.call(E), E.push(Be)), Jr) {
450
+ if (Be && (E = j.call(E), E.push(Be)), Jr) {
451
451
  var xr = {
452
- depth: P.depth
452
+ depth: C.depth
453
453
  };
454
- return J(P, "quoteStyle") && (xr.quoteStyle = P.quoteStyle), g(Me, xr, y + 1, E);
454
+ return J(C, "quoteStyle") && (xr.quoteStyle = C.quoteStyle), h(Me, xr, y + 1, E);
455
455
  }
456
- return g(Me, P, y + 1, E);
456
+ return h(Me, C, y + 1, E);
457
457
  }
458
- if (typeof b == "function" && !ce(b)) {
459
- var Y = Ie(b), Ee = ge(b, H);
460
- return "[Function" + (Y ? ": " + Y : " (anonymous)") + "]" + (Ee.length > 0 ? " { " + M.call(Ee, ", ") + " }" : "");
458
+ if (typeof A == "function" && !ce(A)) {
459
+ var Y = Te(A), Ee = ge(A, H);
460
+ return "[Function" + (Y ? ": " + Y : " (anonymous)") + "]" + (Ee.length > 0 ? " { " + R.call(Ee, ", ") + " }" : "");
461
461
  }
462
- if (se(b)) {
463
- var Ar = R ? S.call(String(b), /^(Symbol\(.*\))_[^)]*$/, "$1") : k.call(b);
464
- return typeof b == "object" && !R ? le(Ar) : Ar;
462
+ if (se(A)) {
463
+ var Ar = N ? b.call(String(A), /^(Symbol\(.*\))_[^)]*$/, "$1") : I.call(A);
464
+ return typeof A == "object" && !N ? le(Ar) : Ar;
465
465
  }
466
- if (_e(b)) {
467
- for (var Fe = "<" + x.call(String(b.nodeName)), ze = b.attributes || [], $e = 0; $e < ze.length; $e++)
468
- Fe += " " + ze[$e].name + "=" + K(ie(ze[$e].value), "double", P);
469
- return Fe += ">", b.childNodes && b.childNodes.length && (Fe += "..."), Fe += "</" + x.call(String(b.nodeName)) + ">", Fe;
466
+ if (_e(A)) {
467
+ for (var Fe = "<" + P.call(String(A.nodeName)), ze = A.attributes || [], $e = 0; $e < ze.length; $e++)
468
+ Fe += " " + ze[$e].name + "=" + K(ie(ze[$e].value), "double", C);
469
+ return Fe += ">", A.childNodes && A.childNodes.length && (Fe += "..."), Fe += "</" + P.call(String(A.nodeName)) + ">", Fe;
470
470
  }
471
- if (re(b)) {
472
- if (b.length === 0)
471
+ if (re(A)) {
472
+ if (A.length === 0)
473
473
  return "[]";
474
- var Ke = ge(b, H);
475
- return j && !Ce(Ke) ? "[" + he(Ke, j) + "]" : "[ " + M.call(Ke, ", ") + " ]";
474
+ var Ke = ge(A, H);
475
+ return V && !Ce(Ke) ? "[" + he(Ke, V) + "]" : "[ " + R.call(Ke, ", ") + " ]";
476
476
  }
477
- if (ue(b)) {
478
- var We = ge(b, H);
479
- return !("cause" in Error.prototype) && "cause" in b && !z.call(b, "cause") ? "{ [" + String(b) + "] " + M.call(N.call("[cause]: " + H(b.cause), We), ", ") + " }" : We.length === 0 ? "[" + String(b) + "]" : "{ [" + String(b) + "] " + M.call(We, ", ") + " }";
477
+ if (ue(A)) {
478
+ var We = ge(A, H);
479
+ return !("cause" in Error.prototype) && "cause" in A && !z.call(A, "cause") ? "{ [" + String(A) + "] " + R.call(L.call("[cause]: " + H(A.cause), We), ", ") + " }" : We.length === 0 ? "[" + String(A) + "]" : "{ [" + String(A) + "] " + R.call(We, ", ") + " }";
480
480
  }
481
- if (typeof b == "object" && G) {
482
- if (X && typeof b[X] == "function" && Q)
483
- return Q(b, { depth: B - y });
484
- if (G !== "symbol" && typeof b.inspect == "function")
485
- return b.inspect();
481
+ if (typeof A == "object" && G) {
482
+ if (X && typeof A[X] == "function" && Q)
483
+ return Q(A, { depth: B - y });
484
+ if (G !== "symbol" && typeof A.inspect == "function")
485
+ return A.inspect();
486
486
  }
487
- if (Te(b)) {
487
+ if (Re(A)) {
488
488
  var br = [];
489
- return t.call(b, function(Me, Be) {
490
- br.push(H(Be, b, !0) + " => " + H(Me, b));
491
- }), we("Map", i.call(b), br, j);
489
+ return t.call(A, function(Me, Be) {
490
+ br.push(H(Be, A, !0) + " => " + H(Me, A));
491
+ }), we("Map", i.call(A), br, V);
492
492
  }
493
- if (ke(b)) {
493
+ if (ke(A)) {
494
494
  var Sr = [];
495
- return f.call(b, function(Me) {
496
- Sr.push(H(Me, b));
497
- }), we("Set", s.call(b), Sr, j);
495
+ return d.call(A, function(Me) {
496
+ Sr.push(H(Me, A));
497
+ }), we("Set", s.call(A), Sr, V);
498
498
  }
499
- if (me(b))
499
+ if (me(A))
500
500
  return fe("WeakMap");
501
- if (Re(b))
501
+ if (Ie(A))
502
502
  return fe("WeakSet");
503
- if (Pe(b))
503
+ if (Pe(A))
504
504
  return fe("WeakRef");
505
- if (de(b))
506
- return le(H(Number(b)));
507
- if (ye(b))
508
- return le(H(L.call(b)));
509
- if (pe(b))
510
- return le(m.call(b));
511
- if (oe(b))
512
- return le(H(String(b)));
513
- if (!te(b) && !ce(b)) {
514
- var He = ge(b, H), wr = _ ? _(b) === Object.prototype : b instanceof Object || b.constructor === Object, Je = b instanceof Object ? "" : "null prototype", Er = !wr && U && Object(b) === b && U in b ? v.call(ee(b), 8, -1) : Je ? "Object" : "", Hr = wr || typeof b.constructor != "function" ? "" : b.constructor.name ? b.constructor.name + " " : "", qe = Hr + (Er || Je ? "[" + M.call(N.call([], Er || [], Je || []), ": ") + "] " : "");
515
- return He.length === 0 ? qe + "{}" : j ? qe + "{" + he(He, j) + "}" : qe + "{ " + M.call(He, ", ") + " }";
505
+ if (de(A))
506
+ return le(H(Number(A)));
507
+ if (ye(A))
508
+ return le(H(x.call(A)));
509
+ if (pe(A))
510
+ return le(f.call(A));
511
+ if (oe(A))
512
+ return le(H(String(A)));
513
+ if (!te(A) && !ce(A)) {
514
+ var He = ge(A, H), wr = F ? F(A) === Object.prototype : A instanceof Object || A.constructor === Object, Je = A instanceof Object ? "" : "null prototype", Er = !wr && $ && Object(A) === A && $ in A ? v.call(ee(A), 8, -1) : Je ? "Object" : "", Hr = wr || typeof A.constructor != "function" ? "" : A.constructor.name ? A.constructor.name + " " : "", qe = Hr + (Er || Je ? "[" + R.call(L.call([], Er || [], Je || []), ": ") + "] " : "");
515
+ return He.length === 0 ? qe + "{}" : V ? qe + "{" + he(He, V) + "}" : qe + "{ " + R.call(He, ", ") + " }";
516
516
  }
517
- return String(b);
517
+ return String(A);
518
518
  };
519
- function K(g, b, D) {
520
- var y = (D.quoteStyle || b) === "double" ? '"' : "'";
521
- return y + g + y;
519
+ function K(h, A, D) {
520
+ var y = (D.quoteStyle || A) === "double" ? '"' : "'";
521
+ return y + h + y;
522
522
  }
523
- function ie(g) {
524
- return S.call(String(g), /"/g, "&quot;");
523
+ function ie(h) {
524
+ return b.call(String(h), /"/g, "&quot;");
525
525
  }
526
- function re(g) {
527
- return ee(g) === "[object Array]" && (!U || !(typeof g == "object" && U in g));
526
+ function re(h) {
527
+ return ee(h) === "[object Array]" && (!$ || !(typeof h == "object" && $ in h));
528
528
  }
529
- function te(g) {
530
- return ee(g) === "[object Date]" && (!U || !(typeof g == "object" && U in g));
529
+ function te(h) {
530
+ return ee(h) === "[object Date]" && (!$ || !(typeof h == "object" && $ in h));
531
531
  }
532
- function ce(g) {
533
- return ee(g) === "[object RegExp]" && (!U || !(typeof g == "object" && U in g));
532
+ function ce(h) {
533
+ return ee(h) === "[object RegExp]" && (!$ || !(typeof h == "object" && $ in h));
534
534
  }
535
- function ue(g) {
536
- return ee(g) === "[object Error]" && (!U || !(typeof g == "object" && U in g));
535
+ function ue(h) {
536
+ return ee(h) === "[object Error]" && (!$ || !(typeof h == "object" && $ in h));
537
537
  }
538
- function oe(g) {
539
- return ee(g) === "[object String]" && (!U || !(typeof g == "object" && U in g));
538
+ function oe(h) {
539
+ return ee(h) === "[object String]" && (!$ || !(typeof h == "object" && $ in h));
540
540
  }
541
- function de(g) {
542
- return ee(g) === "[object Number]" && (!U || !(typeof g == "object" && U in g));
541
+ function de(h) {
542
+ return ee(h) === "[object Number]" && (!$ || !(typeof h == "object" && $ in h));
543
543
  }
544
- function pe(g) {
545
- return ee(g) === "[object Boolean]" && (!U || !(typeof g == "object" && U in g));
544
+ function pe(h) {
545
+ return ee(h) === "[object Boolean]" && (!$ || !(typeof h == "object" && $ in h));
546
546
  }
547
- function se(g) {
548
- if (R)
549
- return g && typeof g == "object" && g instanceof Symbol;
550
- if (typeof g == "symbol")
547
+ function se(h) {
548
+ if (N)
549
+ return h && typeof h == "object" && h instanceof Symbol;
550
+ if (typeof h == "symbol")
551
551
  return !0;
552
- if (!g || typeof g != "object" || !k)
552
+ if (!h || typeof h != "object" || !I)
553
553
  return !1;
554
554
  try {
555
- return k.call(g), !0;
555
+ return I.call(h), !0;
556
556
  } catch {
557
557
  }
558
558
  return !1;
559
559
  }
560
- function ye(g) {
561
- if (!g || typeof g != "object" || !L)
560
+ function ye(h) {
561
+ if (!h || typeof h != "object" || !x)
562
562
  return !1;
563
563
  try {
564
- return L.call(g), !0;
564
+ return x.call(h), !0;
565
565
  } catch {
566
566
  }
567
567
  return !1;
568
568
  }
569
- var Se = Object.prototype.hasOwnProperty || function(g) {
570
- return g in this;
569
+ var Se = Object.prototype.hasOwnProperty || function(h) {
570
+ return h in this;
571
571
  };
572
- function J(g, b) {
573
- return Se.call(g, b);
574
- }
575
- function ee(g) {
576
- return h.call(g);
577
- }
578
- function Ie(g) {
579
- if (g.name)
580
- return g.name;
581
- var b = l.call(d.call(g), /^function\s*([\w$]+)/);
582
- return b ? b[1] : null;
583
- }
584
- function xe(g, b) {
585
- if (g.indexOf)
586
- return g.indexOf(b);
587
- for (var D = 0, y = g.length; D < y; D++)
588
- if (g[D] === b)
572
+ function J(h, A) {
573
+ return Se.call(h, A);
574
+ }
575
+ function ee(h) {
576
+ return w.call(h);
577
+ }
578
+ function Te(h) {
579
+ if (h.name)
580
+ return h.name;
581
+ var A = l.call(m.call(h), /^function\s*([\w$]+)/);
582
+ return A ? A[1] : null;
583
+ }
584
+ function xe(h, A) {
585
+ if (h.indexOf)
586
+ return h.indexOf(A);
587
+ for (var D = 0, y = h.length; D < y; D++)
588
+ if (h[D] === A)
589
589
  return D;
590
590
  return -1;
591
591
  }
592
- function Te(g) {
593
- if (!i || !g || typeof g != "object")
592
+ function Re(h) {
593
+ if (!i || !h || typeof h != "object")
594
594
  return !1;
595
595
  try {
596
- i.call(g);
596
+ i.call(h);
597
597
  try {
598
- s.call(g);
598
+ s.call(h);
599
599
  } catch {
600
600
  return !0;
601
601
  }
602
- return g instanceof Map;
602
+ return h instanceof Map;
603
603
  } catch {
604
604
  }
605
605
  return !1;
606
606
  }
607
- function me(g) {
608
- if (!p || !g || typeof g != "object")
607
+ function me(h) {
608
+ if (!p || !h || typeof h != "object")
609
609
  return !1;
610
610
  try {
611
- p.call(g, p);
611
+ p.call(h, p);
612
612
  try {
613
- A.call(g, A);
613
+ g.call(h, g);
614
614
  } catch {
615
615
  return !0;
616
616
  }
617
- return g instanceof WeakMap;
617
+ return h instanceof WeakMap;
618
618
  } catch {
619
619
  }
620
620
  return !1;
621
621
  }
622
- function Pe(g) {
623
- if (!o || !g || typeof g != "object")
622
+ function Pe(h) {
623
+ if (!o || !h || typeof h != "object")
624
624
  return !1;
625
625
  try {
626
- return o.call(g), !0;
626
+ return o.call(h), !0;
627
627
  } catch {
628
628
  }
629
629
  return !1;
630
630
  }
631
- function ke(g) {
632
- if (!s || !g || typeof g != "object")
631
+ function ke(h) {
632
+ if (!s || !h || typeof h != "object")
633
633
  return !1;
634
634
  try {
635
- s.call(g);
635
+ s.call(h);
636
636
  try {
637
- i.call(g);
637
+ i.call(h);
638
638
  } catch {
639
639
  return !0;
640
640
  }
641
- return g instanceof Set;
641
+ return h instanceof Set;
642
642
  } catch {
643
643
  }
644
644
  return !1;
645
645
  }
646
- function Re(g) {
647
- if (!A || !g || typeof g != "object")
646
+ function Ie(h) {
647
+ if (!g || !h || typeof h != "object")
648
648
  return !1;
649
649
  try {
650
- A.call(g, A);
650
+ g.call(h, g);
651
651
  try {
652
- p.call(g, p);
652
+ p.call(h, p);
653
653
  } catch {
654
654
  return !0;
655
655
  }
656
- return g instanceof WeakSet;
656
+ return h instanceof WeakSet;
657
657
  } catch {
658
658
  }
659
659
  return !1;
660
660
  }
661
- function _e(g) {
662
- return !g || typeof g != "object" ? !1 : typeof HTMLElement < "u" && g instanceof HTMLElement ? !0 : typeof g.nodeName == "string" && typeof g.getAttribute == "function";
661
+ function _e(h) {
662
+ return !h || typeof h != "object" ? !1 : typeof HTMLElement < "u" && h instanceof HTMLElement ? !0 : typeof h.nodeName == "string" && typeof h.getAttribute == "function";
663
663
  }
664
- function Oe(g, b) {
665
- if (g.length > b.maxStringLength) {
666
- var D = g.length - b.maxStringLength, y = "... " + D + " more character" + (D > 1 ? "s" : "");
667
- return Oe(v.call(g, 0, b.maxStringLength), b) + y;
664
+ function Oe(h, A) {
665
+ if (h.length > A.maxStringLength) {
666
+ var D = h.length - A.maxStringLength, y = "... " + D + " more character" + (D > 1 ? "s" : "");
667
+ return Oe(v.call(h, 0, A.maxStringLength), A) + y;
668
668
  }
669
- var E = S.call(S.call(g, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, Ne);
670
- return K(E, "single", b);
669
+ var E = b.call(b.call(h, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, Ne);
670
+ return K(E, "single", A);
671
671
  }
672
- function Ne(g) {
673
- var b = g.charCodeAt(0), D = {
672
+ function Ne(h) {
673
+ var A = h.charCodeAt(0), D = {
674
674
  8: "b",
675
675
  9: "t",
676
676
  10: "n",
677
677
  12: "f",
678
678
  13: "r"
679
- }[b];
680
- return D ? "\\" + D : "\\x" + (b < 16 ? "0" : "") + O.call(b.toString(16));
679
+ }[A];
680
+ return D ? "\\" + D : "\\x" + (A < 16 ? "0" : "") + O.call(A.toString(16));
681
681
  }
682
- function le(g) {
683
- return "Object(" + g + ")";
682
+ function le(h) {
683
+ return "Object(" + h + ")";
684
684
  }
685
- function fe(g) {
686
- return g + " { ? }";
685
+ function fe(h) {
686
+ return h + " { ? }";
687
687
  }
688
- function we(g, b, D, y) {
689
- var E = y ? he(D, y) : M.call(D, ", ");
690
- return g + " (" + b + ") {" + E + "}";
688
+ function we(h, A, D, y) {
689
+ var E = y ? he(D, y) : R.call(D, ", ");
690
+ return h + " (" + A + ") {" + E + "}";
691
691
  }
692
- function Ce(g) {
693
- for (var b = 0; b < g.length; b++)
694
- if (xe(g[b], `
692
+ function Ce(h) {
693
+ for (var A = 0; A < h.length; A++)
694
+ if (xe(h[A], `
695
695
  `) >= 0)
696
696
  return !1;
697
697
  return !0;
698
698
  }
699
- function Le(g, b) {
699
+ function Le(h, A) {
700
700
  var D;
701
- if (g.indent === " ")
701
+ if (h.indent === " ")
702
702
  D = " ";
703
- else if (typeof g.indent == "number" && g.indent > 0)
704
- D = M.call(Array(g.indent + 1), " ");
703
+ else if (typeof h.indent == "number" && h.indent > 0)
704
+ D = R.call(Array(h.indent + 1), " ");
705
705
  else
706
706
  return null;
707
707
  return {
708
708
  base: D,
709
- prev: M.call(Array(b + 1), D)
709
+ prev: R.call(Array(A + 1), D)
710
710
  };
711
711
  }
712
- function he(g, b) {
713
- if (g.length === 0)
712
+ function he(h, A) {
713
+ if (h.length === 0)
714
714
  return "";
715
715
  var D = `
716
- ` + b.prev + b.base;
717
- return D + M.call(g, "," + D) + `
718
- ` + b.prev;
716
+ ` + A.prev + A.base;
717
+ return D + R.call(h, "," + D) + `
718
+ ` + A.prev;
719
719
  }
720
- function ge(g, b) {
721
- var D = re(g), y = [];
720
+ function ge(h, A) {
721
+ var D = re(h), y = [];
722
722
  if (D) {
723
- y.length = g.length;
724
- for (var E = 0; E < g.length; E++)
725
- y[E] = J(g, E) ? b(g[E], g) : "";
723
+ y.length = h.length;
724
+ for (var E = 0; E < h.length; E++)
725
+ y[E] = J(h, E) ? A(h[E], h) : "";
726
726
  }
727
- var P = typeof F == "function" ? F(g) : [], G;
728
- if (R) {
727
+ var C = typeof T == "function" ? T(h) : [], G;
728
+ if (N) {
729
729
  G = {};
730
- for (var ae = 0; ae < P.length; ae++)
731
- G["$" + P[ae]] = P[ae];
730
+ for (var ae = 0; ae < C.length; ae++)
731
+ G["$" + C[ae]] = C[ae];
732
732
  }
733
- for (var W in g)
734
- J(g, W) && (D && String(Number(W)) === W && W < g.length || R && G["$" + W] instanceof Symbol || (T.call(/[^\w$]/, W) ? y.push(b(W, g) + ": " + b(g[W], g)) : y.push(W + ": " + b(g[W], g))));
735
- if (typeof F == "function")
736
- for (var C = 0; C < P.length; C++)
737
- z.call(g, P[C]) && y.push("[" + b(P[C]) + "]: " + b(g[P[C]], g));
733
+ for (var W in h)
734
+ J(h, W) && (D && String(Number(W)) === W && W < h.length || N && G["$" + W] instanceof Symbol || (k.call(/[^\w$]/, W) ? y.push(A(W, h) + ": " + A(h[W], h)) : y.push(W + ": " + A(h[W], h))));
735
+ if (typeof T == "function")
736
+ for (var M = 0; M < C.length; M++)
737
+ z.call(h, C[M]) && y.push("[" + A(C[M]) + "]: " + A(h[C[M]], h));
738
738
  return y;
739
739
  }
740
740
  return nr;
@@ -743,53 +743,53 @@ var ir, Nr;
743
743
  function st() {
744
744
  if (Nr) return ir;
745
745
  Nr = 1;
746
- var e = hr(), r = tt(), i = /* @__PURE__ */ ot(), t = e("%TypeError%"), a = e("%WeakMap%", !0), n = e("%Map%", !0), s = r("WeakMap.prototype.get", !0), f = r("WeakMap.prototype.set", !0), c = r("WeakMap.prototype.has", !0), p = r("Map.prototype.get", !0), w = r("Map.prototype.set", !0), A = r("Map.prototype.has", !0), u = function(d, l) {
747
- for (var v = d, S; (S = v.next) !== null; v = S)
748
- if (S.key === l)
749
- return v.next = S.next, S.next = d.next, d.next = S, S;
750
- }, o = function(d, l) {
751
- var v = u(d, l);
746
+ var e = hr(), r = tt(), i = /* @__PURE__ */ ot(), t = e("%TypeError%"), a = e("%WeakMap%", !0), n = e("%Map%", !0), s = r("WeakMap.prototype.get", !0), d = r("WeakMap.prototype.set", !0), c = r("WeakMap.prototype.has", !0), p = r("Map.prototype.get", !0), S = r("Map.prototype.set", !0), g = r("Map.prototype.has", !0), u = function(m, l) {
747
+ for (var v = m, b; (b = v.next) !== null; v = b)
748
+ if (b.key === l)
749
+ return v.next = b.next, b.next = m.next, m.next = b, b;
750
+ }, o = function(m, l) {
751
+ var v = u(m, l);
752
752
  return v && v.value;
753
- }, m = function(d, l, v) {
754
- var S = u(d, l);
755
- S ? S.value = v : d.next = {
753
+ }, f = function(m, l, v) {
754
+ var b = u(m, l);
755
+ b ? b.value = v : m.next = {
756
756
  // eslint-disable-line no-param-reassign
757
757
  key: l,
758
- next: d.next,
758
+ next: m.next,
759
759
  value: v
760
760
  };
761
- }, h = function(d, l) {
762
- return !!u(d, l);
761
+ }, w = function(m, l) {
762
+ return !!u(m, l);
763
763
  };
764
764
  return ir = function() {
765
- var l, v, S, O = {
766
- assert: function(x) {
767
- if (!O.has(x))
768
- throw new t("Side channel does not contain " + i(x));
765
+ var l, v, b, O = {
766
+ assert: function(P) {
767
+ if (!O.has(P))
768
+ throw new t("Side channel does not contain " + i(P));
769
769
  },
770
- get: function(x) {
771
- if (a && x && (typeof x == "object" || typeof x == "function")) {
770
+ get: function(P) {
771
+ if (a && P && (typeof P == "object" || typeof P == "function")) {
772
772
  if (l)
773
- return s(l, x);
773
+ return s(l, P);
774
774
  } else if (n) {
775
775
  if (v)
776
- return p(v, x);
777
- } else if (S)
778
- return o(S, x);
776
+ return p(v, P);
777
+ } else if (b)
778
+ return o(b, P);
779
779
  },
780
- has: function(x) {
781
- if (a && x && (typeof x == "object" || typeof x == "function")) {
780
+ has: function(P) {
781
+ if (a && P && (typeof P == "object" || typeof P == "function")) {
782
782
  if (l)
783
- return c(l, x);
783
+ return c(l, P);
784
784
  } else if (n) {
785
785
  if (v)
786
- return A(v, x);
787
- } else if (S)
788
- return h(S, x);
786
+ return g(v, P);
787
+ } else if (b)
788
+ return w(b, P);
789
789
  return !1;
790
790
  },
791
- set: function(x, T) {
792
- a && x && (typeof x == "object" || typeof x == "function") ? (l || (l = new a()), f(l, x, T)) : n ? (v || (v = new n()), w(v, x, T)) : (S || (S = { key: {}, next: null }), m(S, x, T));
791
+ set: function(P, k) {
792
+ a && P && (typeof P == "object" || typeof P == "function") ? (l || (l = new a()), d(l, P, k)) : n ? (v || (v = new n()), S(v, P, k)) : (b || (b = { key: {}, next: null }), f(b, P, k));
793
793
  }
794
794
  };
795
795
  return O;
@@ -822,53 +822,53 @@ function Kr() {
822
822
  if (Fr) return sr;
823
823
  Fr = 1;
824
824
  var e = gr(), r = Object.prototype.hasOwnProperty, i = Array.isArray, t = (function() {
825
- for (var h = [], d = 0; d < 256; ++d)
826
- h.push("%" + ((d < 16 ? "0" : "") + d.toString(16)).toUpperCase());
827
- return h;
828
- })(), a = function(d) {
829
- for (; d.length > 1; ) {
830
- var l = d.pop(), v = l.obj[l.prop];
825
+ for (var w = [], m = 0; m < 256; ++m)
826
+ w.push("%" + ((m < 16 ? "0" : "") + m.toString(16)).toUpperCase());
827
+ return w;
828
+ })(), a = function(m) {
829
+ for (; m.length > 1; ) {
830
+ var l = m.pop(), v = l.obj[l.prop];
831
831
  if (i(v)) {
832
- for (var S = [], O = 0; O < v.length; ++O)
833
- typeof v[O] < "u" && S.push(v[O]);
834
- l.obj[l.prop] = S;
832
+ for (var b = [], O = 0; O < v.length; ++O)
833
+ typeof v[O] < "u" && b.push(v[O]);
834
+ l.obj[l.prop] = b;
835
835
  }
836
836
  }
837
- }, n = function(d, l) {
838
- for (var v = l && l.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, S = 0; S < d.length; ++S)
839
- typeof d[S] < "u" && (v[S] = d[S]);
837
+ }, n = function(m, l) {
838
+ for (var v = l && l.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, b = 0; b < m.length; ++b)
839
+ typeof m[b] < "u" && (v[b] = m[b]);
840
840
  return v;
841
- }, s = function h(d, l, v) {
841
+ }, s = function w(m, l, v) {
842
842
  if (!l)
843
- return d;
843
+ return m;
844
844
  if (typeof l != "object") {
845
- if (i(d))
846
- d.push(l);
847
- else if (d && typeof d == "object")
848
- (v && (v.plainObjects || v.allowPrototypes) || !r.call(Object.prototype, l)) && (d[l] = !0);
845
+ if (i(m))
846
+ m.push(l);
847
+ else if (m && typeof m == "object")
848
+ (v && (v.plainObjects || v.allowPrototypes) || !r.call(Object.prototype, l)) && (m[l] = !0);
849
849
  else
850
- return [d, l];
851
- return d;
850
+ return [m, l];
851
+ return m;
852
852
  }
853
- if (!d || typeof d != "object")
854
- return [d].concat(l);
855
- var S = d;
856
- return i(d) && !i(l) && (S = n(d, v)), i(d) && i(l) ? (l.forEach(function(O, x) {
857
- if (r.call(d, x)) {
858
- var T = d[x];
859
- T && typeof T == "object" && O && typeof O == "object" ? d[x] = h(T, O, v) : d.push(O);
853
+ if (!m || typeof m != "object")
854
+ return [m].concat(l);
855
+ var b = m;
856
+ return i(m) && !i(l) && (b = n(m, v)), i(m) && i(l) ? (l.forEach(function(O, P) {
857
+ if (r.call(m, P)) {
858
+ var k = m[P];
859
+ k && typeof k == "object" && O && typeof O == "object" ? m[P] = w(k, O, v) : m.push(O);
860
860
  } else
861
- d[x] = O;
862
- }), d) : Object.keys(l).reduce(function(O, x) {
863
- var T = l[x];
864
- return r.call(O, x) ? O[x] = h(O[x], T, v) : O[x] = T, O;
865
- }, S);
866
- }, f = function(d, l) {
867
- return Object.keys(l).reduce(function(v, S) {
868
- return v[S] = l[S], v;
869
- }, d);
870
- }, c = function(h, d, l) {
871
- var v = h.replace(/\+/g, " ");
861
+ m[P] = O;
862
+ }), m) : Object.keys(l).reduce(function(O, P) {
863
+ var k = l[P];
864
+ return r.call(O, P) ? O[P] = w(O[P], k, v) : O[P] = k, O;
865
+ }, b);
866
+ }, d = function(m, l) {
867
+ return Object.keys(l).reduce(function(v, b) {
868
+ return v[b] = l[b], v;
869
+ }, m);
870
+ }, c = function(w, m, l) {
871
+ var v = w.replace(/\+/g, " ");
872
872
  if (l === "iso-8859-1")
873
873
  return v.replace(/%[0-9a-f]{2}/gi, unescape);
874
874
  try {
@@ -876,66 +876,66 @@ function Kr() {
876
876
  } catch {
877
877
  return v;
878
878
  }
879
- }, p = function(d, l, v, S, O) {
880
- if (d.length === 0)
881
- return d;
882
- var x = d;
883
- if (typeof d == "symbol" ? x = Symbol.prototype.toString.call(d) : typeof d != "string" && (x = String(d)), v === "iso-8859-1")
884
- return escape(x).replace(/%u[0-9a-f]{4}/gi, function(V) {
885
- return "%26%23" + parseInt(V.slice(2), 16) + "%3B";
879
+ }, p = function(m, l, v, b, O) {
880
+ if (m.length === 0)
881
+ return m;
882
+ var P = m;
883
+ if (typeof m == "symbol" ? P = Symbol.prototype.toString.call(m) : typeof m != "string" && (P = String(m)), v === "iso-8859-1")
884
+ return escape(P).replace(/%u[0-9a-f]{4}/gi, function(j) {
885
+ return "%26%23" + parseInt(j.slice(2), 16) + "%3B";
886
886
  });
887
- for (var T = "", N = 0; N < x.length; ++N) {
888
- var M = x.charCodeAt(N);
889
- if (M === 45 || M === 46 || M === 95 || M === 126 || M >= 48 && M <= 57 || M >= 65 && M <= 90 || M >= 97 && M <= 122 || O === e.RFC1738 && (M === 40 || M === 41)) {
890
- T += x.charAt(N);
887
+ for (var k = "", L = 0; L < P.length; ++L) {
888
+ var R = P.charCodeAt(L);
889
+ if (R === 45 || R === 46 || R === 95 || R === 126 || R >= 48 && R <= 57 || R >= 65 && R <= 90 || R >= 97 && R <= 122 || O === e.RFC1738 && (R === 40 || R === 41)) {
890
+ k += P.charAt(L);
891
891
  continue;
892
892
  }
893
- if (M < 128) {
894
- T = T + t[M];
893
+ if (R < 128) {
894
+ k = k + t[R];
895
895
  continue;
896
896
  }
897
- if (M < 2048) {
898
- T = T + (t[192 | M >> 6] + t[128 | M & 63]);
897
+ if (R < 2048) {
898
+ k = k + (t[192 | R >> 6] + t[128 | R & 63]);
899
899
  continue;
900
900
  }
901
- if (M < 55296 || M >= 57344) {
902
- T = T + (t[224 | M >> 12] + t[128 | M >> 6 & 63] + t[128 | M & 63]);
901
+ if (R < 55296 || R >= 57344) {
902
+ k = k + (t[224 | R >> 12] + t[128 | R >> 6 & 63] + t[128 | R & 63]);
903
903
  continue;
904
904
  }
905
- N += 1, M = 65536 + ((M & 1023) << 10 | x.charCodeAt(N) & 1023), T += t[240 | M >> 18] + t[128 | M >> 12 & 63] + t[128 | M >> 6 & 63] + t[128 | M & 63];
905
+ L += 1, R = 65536 + ((R & 1023) << 10 | P.charCodeAt(L) & 1023), k += t[240 | R >> 18] + t[128 | R >> 12 & 63] + t[128 | R >> 6 & 63] + t[128 | R & 63];
906
906
  }
907
- return T;
908
- }, w = function(d) {
909
- for (var l = [{ obj: { o: d }, prop: "o" }], v = [], S = 0; S < l.length; ++S)
910
- for (var O = l[S], x = O.obj[O.prop], T = Object.keys(x), N = 0; N < T.length; ++N) {
911
- var M = T[N], V = x[M];
912
- typeof V == "object" && V !== null && v.indexOf(V) === -1 && (l.push({ obj: x, prop: M }), v.push(V));
907
+ return k;
908
+ }, S = function(m) {
909
+ for (var l = [{ obj: { o: m }, prop: "o" }], v = [], b = 0; b < l.length; ++b)
910
+ for (var O = l[b], P = O.obj[O.prop], k = Object.keys(P), L = 0; L < k.length; ++L) {
911
+ var R = k[L], j = P[R];
912
+ typeof j == "object" && j !== null && v.indexOf(j) === -1 && (l.push({ obj: P, prop: R }), v.push(j));
913
913
  }
914
- return a(l), d;
915
- }, A = function(d) {
916
- return Object.prototype.toString.call(d) === "[object RegExp]";
917
- }, u = function(d) {
918
- return !d || typeof d != "object" ? !1 : !!(d.constructor && d.constructor.isBuffer && d.constructor.isBuffer(d));
919
- }, o = function(d, l) {
920
- return [].concat(d, l);
921
- }, m = function(d, l) {
922
- if (i(d)) {
923
- for (var v = [], S = 0; S < d.length; S += 1)
924
- v.push(l(d[S]));
914
+ return a(l), m;
915
+ }, g = function(m) {
916
+ return Object.prototype.toString.call(m) === "[object RegExp]";
917
+ }, u = function(m) {
918
+ return !m || typeof m != "object" ? !1 : !!(m.constructor && m.constructor.isBuffer && m.constructor.isBuffer(m));
919
+ }, o = function(m, l) {
920
+ return [].concat(m, l);
921
+ }, f = function(m, l) {
922
+ if (i(m)) {
923
+ for (var v = [], b = 0; b < m.length; b += 1)
924
+ v.push(l(m[b]));
925
925
  return v;
926
926
  }
927
- return l(d);
927
+ return l(m);
928
928
  };
929
929
  return sr = {
930
930
  arrayToObject: n,
931
- assign: f,
931
+ assign: d,
932
932
  combine: o,
933
- compact: w,
933
+ compact: S,
934
934
  decode: c,
935
935
  encode: p,
936
936
  isBuffer: u,
937
- isRegExp: A,
938
- maybeMap: m,
937
+ isRegExp: g,
938
+ maybeMap: f,
939
939
  merge: s
940
940
  }, sr;
941
941
  }
@@ -954,9 +954,9 @@ function ut() {
954
954
  repeat: function(l) {
955
955
  return l;
956
956
  }
957
- }, n = Array.isArray, s = String.prototype.split, f = Array.prototype.push, c = function(d, l) {
958
- f.apply(d, n(l) ? l : [l]);
959
- }, p = Date.prototype.toISOString, w = i.default, A = {
957
+ }, n = Array.isArray, s = String.prototype.split, d = Array.prototype.push, c = function(m, l) {
958
+ d.apply(m, n(l) ? l : [l]);
959
+ }, p = Date.prototype.toISOString, S = i.default, g = {
960
960
  addQueryPrefix: !1,
961
961
  allowDots: !1,
962
962
  charset: "utf-8",
@@ -965,8 +965,8 @@ function ut() {
965
965
  encode: !0,
966
966
  encoder: r.encode,
967
967
  encodeValuesOnly: !1,
968
- format: w,
969
- formatter: i.formatters[w],
968
+ format: S,
969
+ formatter: i.formatters[S],
970
970
  // deprecated
971
971
  indices: !1,
972
972
  serializeDate: function(l) {
@@ -976,8 +976,8 @@ function ut() {
976
976
  strictNullHandling: !1
977
977
  }, u = function(l) {
978
978
  return typeof l == "string" || typeof l == "number" || typeof l == "boolean" || typeof l == "symbol" || typeof l == "bigint";
979
- }, o = {}, m = function d(l, v, S, O, x, T, N, M, V, $, L, F, k, R, U, z) {
980
- for (var _ = l, Z = z, Q = 0, ne = !1; (Z = Z.get(o)) !== void 0 && !ne; ) {
979
+ }, o = {}, f = function m(l, v, b, O, P, k, L, R, j, U, x, T, I, N, $, z) {
980
+ for (var F = l, Z = z, Q = 0, ne = !1; (Z = Z.get(o)) !== void 0 && !ne; ) {
981
981
  var X = Z.get(l);
982
982
  if (Q += 1, typeof X < "u") {
983
983
  if (X === Q)
@@ -986,133 +986,133 @@ function ut() {
986
986
  }
987
987
  typeof Z.get(o) > "u" && (Q = 0);
988
988
  }
989
- if (typeof M == "function" ? _ = M(v, _) : _ instanceof Date ? _ = L(_) : S === "comma" && n(_) && (_ = r.maybeMap(_, function(ee) {
990
- return ee instanceof Date ? L(ee) : ee;
991
- })), _ === null) {
992
- if (x)
993
- return N && !R ? N(v, A.encoder, U, "key", F) : v;
994
- _ = "";
989
+ if (typeof R == "function" ? F = R(v, F) : F instanceof Date ? F = x(F) : b === "comma" && n(F) && (F = r.maybeMap(F, function(ee) {
990
+ return ee instanceof Date ? x(ee) : ee;
991
+ })), F === null) {
992
+ if (P)
993
+ return L && !N ? L(v, g.encoder, $, "key", T) : v;
994
+ F = "";
995
995
  }
996
- if (u(_) || r.isBuffer(_)) {
997
- if (N) {
998
- var K = R ? v : N(v, A.encoder, U, "key", F);
999
- if (S === "comma" && R) {
1000
- for (var ie = s.call(String(_), ","), re = "", te = 0; te < ie.length; ++te)
1001
- re += (te === 0 ? "" : ",") + k(N(ie[te], A.encoder, U, "value", F));
1002
- return [k(K) + (O && n(_) && ie.length === 1 ? "[]" : "") + "=" + re];
996
+ if (u(F) || r.isBuffer(F)) {
997
+ if (L) {
998
+ var K = N ? v : L(v, g.encoder, $, "key", T);
999
+ if (b === "comma" && N) {
1000
+ for (var ie = s.call(String(F), ","), re = "", te = 0; te < ie.length; ++te)
1001
+ re += (te === 0 ? "" : ",") + I(L(ie[te], g.encoder, $, "value", T));
1002
+ return [I(K) + (O && n(F) && ie.length === 1 ? "[]" : "") + "=" + re];
1003
1003
  }
1004
- return [k(K) + "=" + k(N(_, A.encoder, U, "value", F))];
1004
+ return [I(K) + "=" + I(L(F, g.encoder, $, "value", T))];
1005
1005
  }
1006
- return [k(v) + "=" + k(String(_))];
1006
+ return [I(v) + "=" + I(String(F))];
1007
1007
  }
1008
1008
  var ce = [];
1009
- if (typeof _ > "u")
1009
+ if (typeof F > "u")
1010
1010
  return ce;
1011
1011
  var ue;
1012
- if (S === "comma" && n(_))
1013
- ue = [{ value: _.length > 0 ? _.join(",") || null : void 0 }];
1014
- else if (n(M))
1015
- ue = M;
1012
+ if (b === "comma" && n(F))
1013
+ ue = [{ value: F.length > 0 ? F.join(",") || null : void 0 }];
1014
+ else if (n(R))
1015
+ ue = R;
1016
1016
  else {
1017
- var oe = Object.keys(_);
1018
- ue = V ? oe.sort(V) : oe;
1017
+ var oe = Object.keys(F);
1018
+ ue = j ? oe.sort(j) : oe;
1019
1019
  }
1020
- for (var de = O && n(_) && _.length === 1 ? v + "[]" : v, pe = 0; pe < ue.length; ++pe) {
1021
- var se = ue[pe], ye = typeof se == "object" && typeof se.value < "u" ? se.value : _[se];
1022
- if (!(T && ye === null)) {
1023
- var Se = n(_) ? typeof S == "function" ? S(de, se) : de : de + ($ ? "." + se : "[" + se + "]");
1020
+ for (var de = O && n(F) && F.length === 1 ? v + "[]" : v, pe = 0; pe < ue.length; ++pe) {
1021
+ var se = ue[pe], ye = typeof se == "object" && typeof se.value < "u" ? se.value : F[se];
1022
+ if (!(k && ye === null)) {
1023
+ var Se = n(F) ? typeof b == "function" ? b(de, se) : de : de + (U ? "." + se : "[" + se + "]");
1024
1024
  z.set(l, Q);
1025
1025
  var J = e();
1026
- J.set(o, z), c(ce, d(
1026
+ J.set(o, z), c(ce, m(
1027
1027
  ye,
1028
1028
  Se,
1029
- S,
1029
+ b,
1030
1030
  O,
1031
+ P,
1032
+ k,
1033
+ L,
1034
+ R,
1035
+ j,
1036
+ U,
1031
1037
  x,
1032
1038
  T,
1039
+ I,
1033
1040
  N,
1034
- M,
1035
- V,
1036
1041
  $,
1037
- L,
1038
- F,
1039
- k,
1040
- R,
1041
- U,
1042
1042
  J
1043
1043
  ));
1044
1044
  }
1045
1045
  }
1046
1046
  return ce;
1047
- }, h = function(l) {
1047
+ }, w = function(l) {
1048
1048
  if (!l)
1049
- return A;
1049
+ return g;
1050
1050
  if (l.encoder !== null && typeof l.encoder < "u" && typeof l.encoder != "function")
1051
1051
  throw new TypeError("Encoder has to be a function.");
1052
- var v = l.charset || A.charset;
1052
+ var v = l.charset || g.charset;
1053
1053
  if (typeof l.charset < "u" && l.charset !== "utf-8" && l.charset !== "iso-8859-1")
1054
1054
  throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
1055
- var S = i.default;
1055
+ var b = i.default;
1056
1056
  if (typeof l.format < "u") {
1057
1057
  if (!t.call(i.formatters, l.format))
1058
1058
  throw new TypeError("Unknown format option provided.");
1059
- S = l.format;
1059
+ b = l.format;
1060
1060
  }
1061
- var O = i.formatters[S], x = A.filter;
1062
- return (typeof l.filter == "function" || n(l.filter)) && (x = l.filter), {
1063
- addQueryPrefix: typeof l.addQueryPrefix == "boolean" ? l.addQueryPrefix : A.addQueryPrefix,
1064
- allowDots: typeof l.allowDots > "u" ? A.allowDots : !!l.allowDots,
1061
+ var O = i.formatters[b], P = g.filter;
1062
+ return (typeof l.filter == "function" || n(l.filter)) && (P = l.filter), {
1063
+ addQueryPrefix: typeof l.addQueryPrefix == "boolean" ? l.addQueryPrefix : g.addQueryPrefix,
1064
+ allowDots: typeof l.allowDots > "u" ? g.allowDots : !!l.allowDots,
1065
1065
  charset: v,
1066
- charsetSentinel: typeof l.charsetSentinel == "boolean" ? l.charsetSentinel : A.charsetSentinel,
1067
- delimiter: typeof l.delimiter > "u" ? A.delimiter : l.delimiter,
1068
- encode: typeof l.encode == "boolean" ? l.encode : A.encode,
1069
- encoder: typeof l.encoder == "function" ? l.encoder : A.encoder,
1070
- encodeValuesOnly: typeof l.encodeValuesOnly == "boolean" ? l.encodeValuesOnly : A.encodeValuesOnly,
1071
- filter: x,
1072
- format: S,
1066
+ charsetSentinel: typeof l.charsetSentinel == "boolean" ? l.charsetSentinel : g.charsetSentinel,
1067
+ delimiter: typeof l.delimiter > "u" ? g.delimiter : l.delimiter,
1068
+ encode: typeof l.encode == "boolean" ? l.encode : g.encode,
1069
+ encoder: typeof l.encoder == "function" ? l.encoder : g.encoder,
1070
+ encodeValuesOnly: typeof l.encodeValuesOnly == "boolean" ? l.encodeValuesOnly : g.encodeValuesOnly,
1071
+ filter: P,
1072
+ format: b,
1073
1073
  formatter: O,
1074
- serializeDate: typeof l.serializeDate == "function" ? l.serializeDate : A.serializeDate,
1075
- skipNulls: typeof l.skipNulls == "boolean" ? l.skipNulls : A.skipNulls,
1074
+ serializeDate: typeof l.serializeDate == "function" ? l.serializeDate : g.serializeDate,
1075
+ skipNulls: typeof l.skipNulls == "boolean" ? l.skipNulls : g.skipNulls,
1076
1076
  sort: typeof l.sort == "function" ? l.sort : null,
1077
- strictNullHandling: typeof l.strictNullHandling == "boolean" ? l.strictNullHandling : A.strictNullHandling
1077
+ strictNullHandling: typeof l.strictNullHandling == "boolean" ? l.strictNullHandling : g.strictNullHandling
1078
1078
  };
1079
1079
  };
1080
- return ur = function(d, l) {
1081
- var v = d, S = h(l), O, x;
1082
- typeof S.filter == "function" ? (x = S.filter, v = x("", v)) : n(S.filter) && (x = S.filter, O = x);
1083
- var T = [];
1080
+ return ur = function(m, l) {
1081
+ var v = m, b = w(l), O, P;
1082
+ typeof b.filter == "function" ? (P = b.filter, v = P("", v)) : n(b.filter) && (P = b.filter, O = P);
1083
+ var k = [];
1084
1084
  if (typeof v != "object" || v === null)
1085
1085
  return "";
1086
- var N;
1087
- l && l.arrayFormat in a ? N = l.arrayFormat : l && "indices" in l ? N = l.indices ? "indices" : "repeat" : N = "indices";
1088
- var M = a[N];
1086
+ var L;
1087
+ l && l.arrayFormat in a ? L = l.arrayFormat : l && "indices" in l ? L = l.indices ? "indices" : "repeat" : L = "indices";
1088
+ var R = a[L];
1089
1089
  if (l && "commaRoundTrip" in l && typeof l.commaRoundTrip != "boolean")
1090
1090
  throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
1091
- var V = M === "comma" && l && l.commaRoundTrip;
1092
- O || (O = Object.keys(v)), S.sort && O.sort(S.sort);
1093
- for (var $ = e(), L = 0; L < O.length; ++L) {
1094
- var F = O[L];
1095
- S.skipNulls && v[F] === null || c(T, m(
1096
- v[F],
1097
- F,
1098
- M,
1099
- V,
1100
- S.strictNullHandling,
1101
- S.skipNulls,
1102
- S.encode ? S.encoder : null,
1103
- S.filter,
1104
- S.sort,
1105
- S.allowDots,
1106
- S.serializeDate,
1107
- S.format,
1108
- S.formatter,
1109
- S.encodeValuesOnly,
1110
- S.charset,
1111
- $
1091
+ var j = R === "comma" && l && l.commaRoundTrip;
1092
+ O || (O = Object.keys(v)), b.sort && O.sort(b.sort);
1093
+ for (var U = e(), x = 0; x < O.length; ++x) {
1094
+ var T = O[x];
1095
+ b.skipNulls && v[T] === null || c(k, f(
1096
+ v[T],
1097
+ T,
1098
+ R,
1099
+ j,
1100
+ b.strictNullHandling,
1101
+ b.skipNulls,
1102
+ b.encode ? b.encoder : null,
1103
+ b.filter,
1104
+ b.sort,
1105
+ b.allowDots,
1106
+ b.serializeDate,
1107
+ b.format,
1108
+ b.formatter,
1109
+ b.encodeValuesOnly,
1110
+ b.charset,
1111
+ U
1112
1112
  ));
1113
1113
  }
1114
- var k = T.join(S.delimiter), R = S.addQueryPrefix === !0 ? "?" : "";
1115
- return S.charsetSentinel && (S.charset === "iso-8859-1" ? R += "utf8=%26%2310003%3B&" : R += "utf8=%E2%9C%93&"), k.length > 0 ? R + k : "";
1114
+ var I = k.join(b.delimiter), N = b.addQueryPrefix === !0 ? "?" : "";
1115
+ return b.charsetSentinel && (b.charset === "iso-8859-1" ? N += "utf8=%26%2310003%3B&" : N += "utf8=%E2%9C%93&"), I.length > 0 ? N + I : "";
1116
1116
  }, ur;
1117
1117
  }
1118
1118
  var cr, $r;
@@ -1137,69 +1137,69 @@ function ct() {
1137
1137
  plainObjects: !1,
1138
1138
  strictNullHandling: !1
1139
1139
  }, a = function(u) {
1140
- return u.replace(/&#(\d+);/g, function(o, m) {
1141
- return String.fromCharCode(parseInt(m, 10));
1140
+ return u.replace(/&#(\d+);/g, function(o, f) {
1141
+ return String.fromCharCode(parseInt(f, 10));
1142
1142
  });
1143
1143
  }, n = function(u, o) {
1144
1144
  return u && typeof u == "string" && o.comma && u.indexOf(",") > -1 ? u.split(",") : u;
1145
- }, s = "utf8=%26%2310003%3B", f = "utf8=%E2%9C%93", c = function(o, m) {
1146
- var h = {}, d = m.ignoreQueryPrefix ? o.replace(/^\?/, "") : o, l = m.parameterLimit === 1 / 0 ? void 0 : m.parameterLimit, v = d.split(m.delimiter, l), S = -1, O, x = m.charset;
1147
- if (m.charsetSentinel)
1145
+ }, s = "utf8=%26%2310003%3B", d = "utf8=%E2%9C%93", c = function(o, f) {
1146
+ var w = {}, m = f.ignoreQueryPrefix ? o.replace(/^\?/, "") : o, l = f.parameterLimit === 1 / 0 ? void 0 : f.parameterLimit, v = m.split(f.delimiter, l), b = -1, O, P = f.charset;
1147
+ if (f.charsetSentinel)
1148
1148
  for (O = 0; O < v.length; ++O)
1149
- v[O].indexOf("utf8=") === 0 && (v[O] === f ? x = "utf-8" : v[O] === s && (x = "iso-8859-1"), S = O, O = v.length);
1149
+ v[O].indexOf("utf8=") === 0 && (v[O] === d ? P = "utf-8" : v[O] === s && (P = "iso-8859-1"), b = O, O = v.length);
1150
1150
  for (O = 0; O < v.length; ++O)
1151
- if (O !== S) {
1152
- var T = v[O], N = T.indexOf("]="), M = N === -1 ? T.indexOf("=") : N + 1, V, $;
1153
- M === -1 ? (V = m.decoder(T, t.decoder, x, "key"), $ = m.strictNullHandling ? null : "") : (V = m.decoder(T.slice(0, M), t.decoder, x, "key"), $ = e.maybeMap(
1154
- n(T.slice(M + 1), m),
1155
- function(L) {
1156
- return m.decoder(L, t.decoder, x, "value");
1151
+ if (O !== b) {
1152
+ var k = v[O], L = k.indexOf("]="), R = L === -1 ? k.indexOf("=") : L + 1, j, U;
1153
+ R === -1 ? (j = f.decoder(k, t.decoder, P, "key"), U = f.strictNullHandling ? null : "") : (j = f.decoder(k.slice(0, R), t.decoder, P, "key"), U = e.maybeMap(
1154
+ n(k.slice(R + 1), f),
1155
+ function(x) {
1156
+ return f.decoder(x, t.decoder, P, "value");
1157
1157
  }
1158
- )), $ && m.interpretNumericEntities && x === "iso-8859-1" && ($ = a($)), T.indexOf("[]=") > -1 && ($ = i($) ? [$] : $), r.call(h, V) ? h[V] = e.combine(h[V], $) : h[V] = $;
1158
+ )), U && f.interpretNumericEntities && P === "iso-8859-1" && (U = a(U)), k.indexOf("[]=") > -1 && (U = i(U) ? [U] : U), r.call(w, j) ? w[j] = e.combine(w[j], U) : w[j] = U;
1159
1159
  }
1160
- return h;
1161
- }, p = function(u, o, m, h) {
1162
- for (var d = h ? o : n(o, m), l = u.length - 1; l >= 0; --l) {
1163
- var v, S = u[l];
1164
- if (S === "[]" && m.parseArrays)
1165
- v = [].concat(d);
1160
+ return w;
1161
+ }, p = function(u, o, f, w) {
1162
+ for (var m = w ? o : n(o, f), l = u.length - 1; l >= 0; --l) {
1163
+ var v, b = u[l];
1164
+ if (b === "[]" && f.parseArrays)
1165
+ v = [].concat(m);
1166
1166
  else {
1167
- v = m.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
1168
- var O = S.charAt(0) === "[" && S.charAt(S.length - 1) === "]" ? S.slice(1, -1) : S, x = parseInt(O, 10);
1169
- !m.parseArrays && O === "" ? v = { 0: d } : !isNaN(x) && S !== O && String(x) === O && x >= 0 && m.parseArrays && x <= m.arrayLimit ? (v = [], v[x] = d) : O !== "__proto__" && (v[O] = d);
1167
+ v = f.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
1168
+ var O = b.charAt(0) === "[" && b.charAt(b.length - 1) === "]" ? b.slice(1, -1) : b, P = parseInt(O, 10);
1169
+ !f.parseArrays && O === "" ? v = { 0: m } : !isNaN(P) && b !== O && String(P) === O && P >= 0 && f.parseArrays && P <= f.arrayLimit ? (v = [], v[P] = m) : O !== "__proto__" && (v[O] = m);
1170
1170
  }
1171
- d = v;
1171
+ m = v;
1172
1172
  }
1173
- return d;
1174
- }, w = function(o, m, h, d) {
1173
+ return m;
1174
+ }, S = function(o, f, w, m) {
1175
1175
  if (o) {
1176
- var l = h.allowDots ? o.replace(/\.([^.[]+)/g, "[$1]") : o, v = /(\[[^[\]]*])/, S = /(\[[^[\]]*])/g, O = h.depth > 0 && v.exec(l), x = O ? l.slice(0, O.index) : l, T = [];
1177
- if (x) {
1178
- if (!h.plainObjects && r.call(Object.prototype, x) && !h.allowPrototypes)
1176
+ var l = w.allowDots ? o.replace(/\.([^.[]+)/g, "[$1]") : o, v = /(\[[^[\]]*])/, b = /(\[[^[\]]*])/g, O = w.depth > 0 && v.exec(l), P = O ? l.slice(0, O.index) : l, k = [];
1177
+ if (P) {
1178
+ if (!w.plainObjects && r.call(Object.prototype, P) && !w.allowPrototypes)
1179
1179
  return;
1180
- T.push(x);
1180
+ k.push(P);
1181
1181
  }
1182
- for (var N = 0; h.depth > 0 && (O = S.exec(l)) !== null && N < h.depth; ) {
1183
- if (N += 1, !h.plainObjects && r.call(Object.prototype, O[1].slice(1, -1)) && !h.allowPrototypes)
1182
+ for (var L = 0; w.depth > 0 && (O = b.exec(l)) !== null && L < w.depth; ) {
1183
+ if (L += 1, !w.plainObjects && r.call(Object.prototype, O[1].slice(1, -1)) && !w.allowPrototypes)
1184
1184
  return;
1185
- T.push(O[1]);
1185
+ k.push(O[1]);
1186
1186
  }
1187
- return O && T.push("[" + l.slice(O.index) + "]"), p(T, m, h, d);
1187
+ return O && k.push("[" + l.slice(O.index) + "]"), p(k, f, w, m);
1188
1188
  }
1189
- }, A = function(o) {
1189
+ }, g = function(o) {
1190
1190
  if (!o)
1191
1191
  return t;
1192
1192
  if (o.decoder !== null && o.decoder !== void 0 && typeof o.decoder != "function")
1193
1193
  throw new TypeError("Decoder has to be a function.");
1194
1194
  if (typeof o.charset < "u" && o.charset !== "utf-8" && o.charset !== "iso-8859-1")
1195
1195
  throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
1196
- var m = typeof o.charset > "u" ? t.charset : o.charset;
1196
+ var f = typeof o.charset > "u" ? t.charset : o.charset;
1197
1197
  return {
1198
1198
  allowDots: typeof o.allowDots > "u" ? t.allowDots : !!o.allowDots,
1199
1199
  allowPrototypes: typeof o.allowPrototypes == "boolean" ? o.allowPrototypes : t.allowPrototypes,
1200
1200
  allowSparse: typeof o.allowSparse == "boolean" ? o.allowSparse : t.allowSparse,
1201
1201
  arrayLimit: typeof o.arrayLimit == "number" ? o.arrayLimit : t.arrayLimit,
1202
- charset: m,
1202
+ charset: f,
1203
1203
  charsetSentinel: typeof o.charsetSentinel == "boolean" ? o.charsetSentinel : t.charsetSentinel,
1204
1204
  comma: typeof o.comma == "boolean" ? o.comma : t.comma,
1205
1205
  decoder: typeof o.decoder == "function" ? o.decoder : t.decoder,
@@ -1215,14 +1215,14 @@ function ct() {
1215
1215
  };
1216
1216
  };
1217
1217
  return cr = function(u, o) {
1218
- var m = A(o);
1218
+ var f = g(o);
1219
1219
  if (u === "" || u === null || typeof u > "u")
1220
- return m.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
1221
- for (var h = typeof u == "string" ? c(u, m) : u, d = m.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, l = Object.keys(h), v = 0; v < l.length; ++v) {
1222
- var S = l[v], O = w(S, h[S], m, typeof u == "string");
1223
- d = e.merge(d, O, m);
1220
+ return f.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
1221
+ for (var w = typeof u == "string" ? c(u, f) : u, m = f.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, l = Object.keys(w), v = 0; v < l.length; ++v) {
1222
+ var b = l[v], O = S(b, w[b], f, typeof u == "string");
1223
+ m = e.merge(m, O, f);
1224
1224
  }
1225
- return m.allowSparse === !0 ? d : e.compact(d);
1225
+ return f.allowSparse === !0 ? m : e.compact(m);
1226
1226
  }, cr;
1227
1227
  }
1228
1228
  var lr, Br;
@@ -1237,7 +1237,7 @@ function lt() {
1237
1237
  }, lr;
1238
1238
  }
1239
1239
  var ft = lt();
1240
- const dt = /* @__PURE__ */ mr(ft), vr = "1.0.10", pt = Ae.CancelToken;
1240
+ const dt = /* @__PURE__ */ mr(ft), vr = "1.0.13", pt = Ae.CancelToken;
1241
1241
  var mt = function(e) {
1242
1242
  var r;
1243
1243
  typeof window < "u" && (r = e.cache.get("api"));
@@ -1255,9 +1255,9 @@ var mt = function(e) {
1255
1255
  ].filter(Boolean).join("-");
1256
1256
  return p;
1257
1257
  }
1258
- const a = {}, s = f(function(c) {
1258
+ const a = {}, s = d(function(c) {
1259
1259
  var p = t(c);
1260
- return a[p] || (a[p] = new Promise(function(w, A) {
1260
+ return a[p] || (a[p] = new Promise(function(S, g) {
1261
1261
  var u, o;
1262
1262
  switch (String(c.method).toLowerCase()) {
1263
1263
  case "post":
@@ -1267,97 +1267,97 @@ var mt = function(e) {
1267
1267
  c.cache || (c.cache = !1);
1268
1268
  break;
1269
1269
  }
1270
- return c.cache === !1 || (u = c.cache || r, u && (o = u.get(p))), o ? w(o) : (Object.assign(c, { adapter: i }), Ae.request(c).then(
1271
- function(m) {
1272
- delete a[p], w(m);
1270
+ return c.cache === !1 || (u = c.cache || r, u && (o = u.get(p))), o ? S(o) : (Object.assign(c, { adapter: i }), Ae.request(c).then(
1271
+ function(f) {
1272
+ delete a[p], S(f);
1273
1273
  },
1274
- function(m) {
1275
- delete a[p], A(m);
1274
+ function(f) {
1275
+ delete a[p], g(f);
1276
1276
  }
1277
1277
  ));
1278
1278
  })), a[p];
1279
1279
  });
1280
- s.generateEndpointURL = function(c, p, w) {
1281
- w = w || {}, p = p || {};
1282
- var A;
1283
- const u = w.file && e.fileAPI || e.apiURL;
1284
- w.withoutToken || (delete p.access_token, A = e.auth.getCurrentToken()), c[0] == "/" && c.slice(1);
1280
+ s.generateEndpointURL = function(c, p, S) {
1281
+ S = S || {}, p = p || {};
1282
+ var g;
1283
+ const u = S.file && e.fileAPI || e.apiURL;
1284
+ S.withoutToken || (delete p.access_token, g = e.auth.getCurrentToken()), c[0] == "/" && c.slice(1);
1285
1285
  var o = e.utils.mapParameters(p);
1286
- A ? o = o ? `?access_token=${A}&${o}` : `?access_token=${A}` : o = o ? `?${o}` : "";
1287
- var m = `${u}${c}${o}`;
1288
- return m;
1286
+ g ? o = o ? `?access_token=${g}&${o}` : `?access_token=${g}` : o = o ? `?${o}` : "";
1287
+ var f = `${u}${c}${o}`;
1288
+ return f;
1289
1289
  }, s.wasCancelled = function(c) {
1290
1290
  return Ae.isCancel(c);
1291
1291
  };
1292
- function f(c) {
1292
+ function d(c) {
1293
1293
  var p = Ae.create({
1294
1294
  paramsSerializer: {
1295
- serialize: (A) => dt.stringify(A, { arrayFormat: "repeat" })
1295
+ serialize: (g) => dt.stringify(g, { arrayFormat: "repeat" })
1296
1296
  },
1297
1297
  adapter: c
1298
1298
  });
1299
- p.defaults.baseURL = e.apiURL, p.defaults.headers.common.Accept = "application/json", p.interceptors.request.use(function(A) {
1300
- if (t(A), A.withoutToken)
1301
- return A;
1302
- if (A.headers["qik-request-date"] = (/* @__PURE__ */ new Date()).getTime(), Intl) {
1299
+ p.defaults.baseURL = e.apiURL, p.defaults.headers.common.Accept = "application/json", p.interceptors.request.use(function(g) {
1300
+ if (t(g), g.withoutToken)
1301
+ return g;
1302
+ if (g.headers["qik-request-date"] = (/* @__PURE__ */ new Date()).getTime(), Intl) {
1303
1303
  const o = Intl.DateTimeFormat().resolvedOptions().timeZone;
1304
- o && (A.headers["qik-request-timezone"] = o);
1304
+ o && (g.headers["qik-request-timezone"] = o);
1305
1305
  }
1306
- A.headers["qik-api-version"] = vr, e?.socket?.windowID && (A.headers["qik-socket-window"] = e.socket.windowID);
1306
+ g.headers["qik-api-version"] = vr, e?.socket?.windowID && (g.headers["qik-socket-window"] = e.socket.windowID);
1307
1307
  var u = e.auth.getCurrentToken();
1308
- return u && (A.headers.Authorization = `Bearer ${u}`, A.params && A.params.access_token && delete A.params.access_token), A;
1308
+ return u && (g.headers.Authorization = `Bearer ${u}`, g.params && g.params.access_token && delete g.params.access_token), g;
1309
1309
  });
1310
- let w = 0;
1310
+ let S = 0;
1311
1311
  return p.interceptors.response.use(
1312
- function(A) {
1313
- var u = A.config, o = A.status;
1312
+ function(g) {
1313
+ var u = g.config, o = g.status;
1314
1314
  switch (o) {
1315
1315
  case 204:
1316
- if (w < 5)
1317
- return w++, new Promise(function(m, h) {
1316
+ if (S < 5)
1317
+ return S++, new Promise(function(f, w) {
1318
1318
  setTimeout(function() {
1319
- return p.request(u).then(m, h);
1319
+ return p.request(u).then(f, w);
1320
1320
  }, 800);
1321
1321
  });
1322
- console.log("Failed after 5 retries"), w = 0;
1322
+ console.log("Failed after 5 retries"), S = 0;
1323
1323
  break;
1324
1324
  }
1325
- return A;
1325
+ return g;
1326
1326
  },
1327
- function(A) {
1328
- if (Ae.isCancel(A))
1329
- return Promise.reject(A);
1330
- var u = A?.response?.status || A.status;
1327
+ function(g) {
1328
+ if (Ae.isCancel(g))
1329
+ return Promise.reject(g);
1330
+ var u = g?.response?.status || g.status;
1331
1331
  switch (u) {
1332
1332
  case 401:
1333
1333
  break;
1334
1334
  case 429: {
1335
- var o = A.config || {};
1335
+ var o = g.config || {};
1336
1336
  if (o.__retry429 = (o.__retry429 || 0) + 1, o.__retry429 <= 3) {
1337
- var m = parseInt(
1338
- A?.response?.headers?.["retry-after"],
1337
+ var f = parseInt(
1338
+ g?.response?.headers?.["retry-after"],
1339
1339
  10
1340
- ), h = Number.isFinite(m) ? m * 1e3 : 800 * o.__retry429, d = Math.floor(Math.random() * 500);
1340
+ ), w = Number.isFinite(f) ? f * 1e3 : 800 * o.__retry429, m = Math.floor(Math.random() * 500);
1341
1341
  return new Promise(function(l, v) {
1342
1342
  setTimeout(function() {
1343
1343
  return p.request(o).then(l, v);
1344
- }, h + d);
1344
+ }, w + m);
1345
1345
  });
1346
1346
  }
1347
1347
  break;
1348
1348
  }
1349
1349
  case 502:
1350
1350
  case 504:
1351
- if (w < 5)
1352
- return w++, new Promise(function(l, v) {
1351
+ if (S < 5)
1352
+ return S++, new Promise(function(l, v) {
1353
1353
  setTimeout(function() {
1354
- return p.request(A.config).then(l, v);
1354
+ return p.request(g.config).then(l, v);
1355
1355
  }, 800);
1356
1356
  });
1357
- console.log("Failed after 5 retries"), w = 0;
1357
+ console.log("Failed after 5 retries"), S = 0;
1358
1358
  break;
1359
1359
  }
1360
- return Promise.reject(A);
1360
+ return Promise.reject(g);
1361
1361
  }
1362
1362
  ), p;
1363
1363
  }
@@ -1366,11 +1366,11 @@ var mt = function(e) {
1366
1366
  function yt() {
1367
1367
  if (Gr) return fr;
1368
1368
  Gr = 1;
1369
- var e = "Expected a function", r = "__lodash_hash_undefined__", i = "[object Function]", t = "[object GeneratorFunction]", a = "[object Symbol]", n = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, s = /^\w*$/, f = /^\./, c = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, p = /[\\^$.*+?()[\]{}|]/g, w = /\\(\\)?/g, A = /^\[object .+?Constructor\]$/, u = typeof be == "object" && be && be.Object === Object && be, o = typeof self == "object" && self && self.Object === Object && self, m = u || o || Function("return this")();
1370
- function h(y, E) {
1369
+ var e = "Expected a function", r = "__lodash_hash_undefined__", i = "[object Function]", t = "[object GeneratorFunction]", a = "[object Symbol]", n = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, s = /^\w*$/, d = /^\./, c = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, p = /[\\^$.*+?()[\]{}|]/g, S = /\\(\\)?/g, g = /^\[object .+?Constructor\]$/, u = typeof be == "object" && be && be.Object === Object && be, o = typeof self == "object" && self && self.Object === Object && self, f = u || o || Function("return this")();
1370
+ function w(y, E) {
1371
1371
  return y?.[E];
1372
1372
  }
1373
- function d(y) {
1373
+ function m(y) {
1374
1374
  var E = !1;
1375
1375
  if (y != null && typeof y.toString != "function")
1376
1376
  try {
@@ -1379,45 +1379,45 @@ function yt() {
1379
1379
  }
1380
1380
  return E;
1381
1381
  }
1382
- var l = Array.prototype, v = Function.prototype, S = Object.prototype, O = m["__core-js_shared__"], x = (function() {
1382
+ var l = Array.prototype, v = Function.prototype, b = Object.prototype, O = f["__core-js_shared__"], P = (function() {
1383
1383
  var y = /[^.]+$/.exec(O && O.keys && O.keys.IE_PROTO || "");
1384
1384
  return y ? "Symbol(src)_1." + y : "";
1385
- })(), T = v.toString, N = S.hasOwnProperty, M = S.toString, V = RegExp(
1386
- "^" + T.call(N).replace(p, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
1387
- ), $ = m.Symbol, L = l.splice, F = Pe(m, "Map"), k = Pe(Object, "create"), R = $ ? $.prototype : void 0, U = R ? R.toString : void 0;
1385
+ })(), k = v.toString, L = b.hasOwnProperty, R = b.toString, j = RegExp(
1386
+ "^" + k.call(L).replace(p, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
1387
+ ), U = f.Symbol, x = l.splice, T = Pe(f, "Map"), I = Pe(Object, "create"), N = U ? U.prototype : void 0, $ = N ? N.toString : void 0;
1388
1388
  function z(y) {
1389
- var E = -1, P = y ? y.length : 0;
1390
- for (this.clear(); ++E < P; ) {
1389
+ var E = -1, C = y ? y.length : 0;
1390
+ for (this.clear(); ++E < C; ) {
1391
1391
  var G = y[E];
1392
1392
  this.set(G[0], G[1]);
1393
1393
  }
1394
1394
  }
1395
- function _() {
1396
- this.__data__ = k ? k(null) : {};
1395
+ function F() {
1396
+ this.__data__ = I ? I(null) : {};
1397
1397
  }
1398
1398
  function Z(y) {
1399
1399
  return this.has(y) && delete this.__data__[y];
1400
1400
  }
1401
1401
  function Q(y) {
1402
1402
  var E = this.__data__;
1403
- if (k) {
1404
- var P = E[y];
1405
- return P === r ? void 0 : P;
1403
+ if (I) {
1404
+ var C = E[y];
1405
+ return C === r ? void 0 : C;
1406
1406
  }
1407
- return N.call(E, y) ? E[y] : void 0;
1407
+ return L.call(E, y) ? E[y] : void 0;
1408
1408
  }
1409
1409
  function ne(y) {
1410
1410
  var E = this.__data__;
1411
- return k ? E[y] !== void 0 : N.call(E, y);
1411
+ return I ? E[y] !== void 0 : L.call(E, y);
1412
1412
  }
1413
1413
  function X(y, E) {
1414
- var P = this.__data__;
1415
- return P[y] = k && E === void 0 ? r : E, this;
1414
+ var C = this.__data__;
1415
+ return C[y] = I && E === void 0 ? r : E, this;
1416
1416
  }
1417
- z.prototype.clear = _, z.prototype.delete = Z, z.prototype.get = Q, z.prototype.has = ne, z.prototype.set = X;
1417
+ z.prototype.clear = F, z.prototype.delete = Z, z.prototype.get = Q, z.prototype.has = ne, z.prototype.set = X;
1418
1418
  function K(y) {
1419
- var E = -1, P = y ? y.length : 0;
1420
- for (this.clear(); ++E < P; ) {
1419
+ var E = -1, C = y ? y.length : 0;
1420
+ for (this.clear(); ++E < C; ) {
1421
1421
  var G = y[E];
1422
1422
  this.set(G[0], G[1]);
1423
1423
  }
@@ -1426,27 +1426,27 @@ function yt() {
1426
1426
  this.__data__ = [];
1427
1427
  }
1428
1428
  function re(y) {
1429
- var E = this.__data__, P = J(E, y);
1430
- if (P < 0)
1429
+ var E = this.__data__, C = J(E, y);
1430
+ if (C < 0)
1431
1431
  return !1;
1432
1432
  var G = E.length - 1;
1433
- return P == G ? E.pop() : L.call(E, P, 1), !0;
1433
+ return C == G ? E.pop() : x.call(E, C, 1), !0;
1434
1434
  }
1435
1435
  function te(y) {
1436
- var E = this.__data__, P = J(E, y);
1437
- return P < 0 ? void 0 : E[P][1];
1436
+ var E = this.__data__, C = J(E, y);
1437
+ return C < 0 ? void 0 : E[C][1];
1438
1438
  }
1439
1439
  function ce(y) {
1440
1440
  return J(this.__data__, y) > -1;
1441
1441
  }
1442
1442
  function ue(y, E) {
1443
- var P = this.__data__, G = J(P, y);
1444
- return G < 0 ? P.push([y, E]) : P[G][1] = E, this;
1443
+ var C = this.__data__, G = J(C, y);
1444
+ return G < 0 ? C.push([y, E]) : C[G][1] = E, this;
1445
1445
  }
1446
1446
  K.prototype.clear = ie, K.prototype.delete = re, K.prototype.get = te, K.prototype.has = ce, K.prototype.set = ue;
1447
1447
  function oe(y) {
1448
- var E = -1, P = y ? y.length : 0;
1449
- for (this.clear(); ++E < P; ) {
1448
+ var E = -1, C = y ? y.length : 0;
1449
+ for (this.clear(); ++E < C; ) {
1450
1450
  var G = y[E];
1451
1451
  this.set(G[0], G[1]);
1452
1452
  }
@@ -1454,7 +1454,7 @@ function yt() {
1454
1454
  function de() {
1455
1455
  this.__data__ = {
1456
1456
  hash: new z(),
1457
- map: new (F || K)(),
1457
+ map: new (T || K)(),
1458
1458
  string: new z()
1459
1459
  };
1460
1460
  }
@@ -1472,64 +1472,64 @@ function yt() {
1472
1472
  }
1473
1473
  oe.prototype.clear = de, oe.prototype.delete = pe, oe.prototype.get = se, oe.prototype.has = ye, oe.prototype.set = Se;
1474
1474
  function J(y, E) {
1475
- for (var P = y.length; P--; )
1476
- if (we(y[P][0], E))
1477
- return P;
1475
+ for (var C = y.length; C--; )
1476
+ if (we(y[C][0], E))
1477
+ return C;
1478
1478
  return -1;
1479
1479
  }
1480
1480
  function ee(y, E) {
1481
- E = ke(E, y) ? [E] : Te(E);
1482
- for (var P = 0, G = E.length; y != null && P < G; )
1483
- y = y[Ne(E[P++])];
1484
- return P && P == G ? y : void 0;
1481
+ E = ke(E, y) ? [E] : Re(E);
1482
+ for (var C = 0, G = E.length; y != null && C < G; )
1483
+ y = y[Ne(E[C++])];
1484
+ return C && C == G ? y : void 0;
1485
1485
  }
1486
- function Ie(y) {
1486
+ function Te(y) {
1487
1487
  if (!he(y) || _e(y))
1488
1488
  return !1;
1489
- var E = Le(y) || d(y) ? V : A;
1489
+ var E = Le(y) || m(y) ? j : g;
1490
1490
  return E.test(le(y));
1491
1491
  }
1492
1492
  function xe(y) {
1493
1493
  if (typeof y == "string")
1494
1494
  return y;
1495
- if (g(y))
1496
- return U ? U.call(y) : "";
1495
+ if (h(y))
1496
+ return $ ? $.call(y) : "";
1497
1497
  var E = y + "";
1498
1498
  return E == "0" && 1 / y == -1 / 0 ? "-0" : E;
1499
1499
  }
1500
- function Te(y) {
1500
+ function Re(y) {
1501
1501
  return Ce(y) ? y : Oe(y);
1502
1502
  }
1503
1503
  function me(y, E) {
1504
- var P = y.__data__;
1505
- return Re(E) ? P[typeof E == "string" ? "string" : "hash"] : P.map;
1504
+ var C = y.__data__;
1505
+ return Ie(E) ? C[typeof E == "string" ? "string" : "hash"] : C.map;
1506
1506
  }
1507
1507
  function Pe(y, E) {
1508
- var P = h(y, E);
1509
- return Ie(P) ? P : void 0;
1508
+ var C = w(y, E);
1509
+ return Te(C) ? C : void 0;
1510
1510
  }
1511
1511
  function ke(y, E) {
1512
1512
  if (Ce(y))
1513
1513
  return !1;
1514
- var P = typeof y;
1515
- return P == "number" || P == "symbol" || P == "boolean" || y == null || g(y) ? !0 : s.test(y) || !n.test(y) || E != null && y in Object(E);
1514
+ var C = typeof y;
1515
+ return C == "number" || C == "symbol" || C == "boolean" || y == null || h(y) ? !0 : s.test(y) || !n.test(y) || E != null && y in Object(E);
1516
1516
  }
1517
- function Re(y) {
1517
+ function Ie(y) {
1518
1518
  var E = typeof y;
1519
1519
  return E == "string" || E == "number" || E == "symbol" || E == "boolean" ? y !== "__proto__" : y === null;
1520
1520
  }
1521
1521
  function _e(y) {
1522
- return !!x && x in y;
1522
+ return !!P && P in y;
1523
1523
  }
1524
1524
  var Oe = fe(function(y) {
1525
- y = b(y);
1525
+ y = A(y);
1526
1526
  var E = [];
1527
- return f.test(y) && E.push(""), y.replace(c, function(P, G, ae, W) {
1528
- E.push(ae ? W.replace(w, "$1") : G || P);
1527
+ return d.test(y) && E.push(""), y.replace(c, function(C, G, ae, W) {
1528
+ E.push(ae ? W.replace(S, "$1") : G || C);
1529
1529
  }), E;
1530
1530
  });
1531
1531
  function Ne(y) {
1532
- if (typeof y == "string" || g(y))
1532
+ if (typeof y == "string" || h(y))
1533
1533
  return y;
1534
1534
  var E = y + "";
1535
1535
  return E == "0" && 1 / y == -1 / 0 ? "-0" : E;
@@ -1537,7 +1537,7 @@ function yt() {
1537
1537
  function le(y) {
1538
1538
  if (y != null) {
1539
1539
  try {
1540
- return T.call(y);
1540
+ return k.call(y);
1541
1541
  } catch {
1542
1542
  }
1543
1543
  try {
@@ -1550,14 +1550,14 @@ function yt() {
1550
1550
  function fe(y, E) {
1551
1551
  if (typeof y != "function" || E && typeof E != "function")
1552
1552
  throw new TypeError(e);
1553
- var P = function() {
1554
- var G = arguments, ae = E ? E.apply(this, G) : G[0], W = P.cache;
1553
+ var C = function() {
1554
+ var G = arguments, ae = E ? E.apply(this, G) : G[0], W = C.cache;
1555
1555
  if (W.has(ae))
1556
1556
  return W.get(ae);
1557
- var C = y.apply(this, G);
1558
- return P.cache = W.set(ae, C), C;
1557
+ var M = y.apply(this, G);
1558
+ return C.cache = W.set(ae, M), M;
1559
1559
  };
1560
- return P.cache = new (fe.Cache || oe)(), P;
1560
+ return C.cache = new (fe.Cache || oe)(), C;
1561
1561
  }
1562
1562
  fe.Cache = oe;
1563
1563
  function we(y, E) {
@@ -1565,7 +1565,7 @@ function yt() {
1565
1565
  }
1566
1566
  var Ce = Array.isArray;
1567
1567
  function Le(y) {
1568
- var E = he(y) ? M.call(y) : "";
1568
+ var E = he(y) ? R.call(y) : "";
1569
1569
  return E == i || E == t;
1570
1570
  }
1571
1571
  function he(y) {
@@ -1575,15 +1575,15 @@ function yt() {
1575
1575
  function ge(y) {
1576
1576
  return !!y && typeof y == "object";
1577
1577
  }
1578
- function g(y) {
1579
- return typeof y == "symbol" || ge(y) && M.call(y) == a;
1578
+ function h(y) {
1579
+ return typeof y == "symbol" || ge(y) && R.call(y) == a;
1580
1580
  }
1581
- function b(y) {
1581
+ function A(y) {
1582
1582
  return y == null ? "" : xe(y);
1583
1583
  }
1584
- function D(y, E, P) {
1584
+ function D(y, E, C) {
1585
1585
  var G = y == null ? void 0 : ee(y, E);
1586
- return G === void 0 ? P : G;
1586
+ return G === void 0 ? C : G;
1587
1587
  }
1588
1588
  return fr = D, fr;
1589
1589
  }
@@ -1593,14 +1593,14 @@ var dr, Dr;
1593
1593
  function gt() {
1594
1594
  if (Dr) return dr;
1595
1595
  Dr = 1;
1596
- var e = "[object Symbol]", r = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, i = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, t = "\\ud800-\\udfff", a = "\\u0300-\\u036f\\ufe20-\\ufe23", n = "\\u20d0-\\u20f0", s = "\\u2700-\\u27bf", f = "a-z\\xdf-\\xf6\\xf8-\\xff", c = "\\xac\\xb1\\xd7\\xf7", p = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", w = "\\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", u = "A-Z\\xc0-\\xd6\\xd8-\\xde", o = "\\ufe0e\\ufe0f", m = c + p + w + A, h = "['’]", d = "[" + t + "]", l = "[" + m + "]", v = "[" + a + n + "]", S = "\\d+", O = "[" + s + "]", x = "[" + f + "]", T = "[^" + t + m + S + s + f + u + "]", N = "\\ud83c[\\udffb-\\udfff]", M = "(?:" + v + "|" + N + ")", V = "[^" + t + "]", $ = "(?:\\ud83c[\\udde6-\\uddff]){2}", L = "[\\ud800-\\udbff][\\udc00-\\udfff]", F = "[" + u + "]", k = "\\u200d", R = "(?:" + x + "|" + T + ")", U = "(?:" + F + "|" + T + ")", z = "(?:" + h + "(?:d|ll|m|re|s|t|ve))?", _ = "(?:" + h + "(?:D|LL|M|RE|S|T|VE))?", Z = M + "?", Q = "[" + o + "]?", ne = "(?:" + k + "(?:" + [V, $, L].join("|") + ")" + Q + Z + ")*", X = Q + Z + ne, K = "(?:" + [O, $, L].join("|") + ")" + X, ie = "(?:" + [V + v + "?", v, $, L, d].join("|") + ")", re = RegExp(h, "g"), te = RegExp(v, "g"), ce = RegExp(N + "(?=" + N + ")|" + ie + X, "g"), ue = RegExp([
1597
- F + "?" + x + "+" + z + "(?=" + [l, F, "$"].join("|") + ")",
1598
- U + "+" + _ + "(?=" + [l, F + R, "$"].join("|") + ")",
1599
- F + "?" + R + "+" + z,
1600
- F + "+" + _,
1601
- S,
1596
+ var e = "[object Symbol]", r = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, i = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, t = "\\ud800-\\udfff", a = "\\u0300-\\u036f\\ufe20-\\ufe23", n = "\\u20d0-\\u20f0", s = "\\u2700-\\u27bf", d = "a-z\\xdf-\\xf6\\xf8-\\xff", c = "\\xac\\xb1\\xd7\\xf7", p = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", S = "\\u2000-\\u206f", g = " \\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", u = "A-Z\\xc0-\\xd6\\xd8-\\xde", o = "\\ufe0e\\ufe0f", f = c + p + S + g, w = "['’]", m = "[" + t + "]", l = "[" + f + "]", v = "[" + a + n + "]", b = "\\d+", O = "[" + s + "]", P = "[" + d + "]", k = "[^" + t + f + b + s + d + u + "]", L = "\\ud83c[\\udffb-\\udfff]", R = "(?:" + v + "|" + L + ")", j = "[^" + t + "]", U = "(?:\\ud83c[\\udde6-\\uddff]){2}", x = "[\\ud800-\\udbff][\\udc00-\\udfff]", T = "[" + u + "]", I = "\\u200d", N = "(?:" + P + "|" + k + ")", $ = "(?:" + T + "|" + k + ")", z = "(?:" + w + "(?:d|ll|m|re|s|t|ve))?", F = "(?:" + w + "(?:D|LL|M|RE|S|T|VE))?", Z = R + "?", Q = "[" + o + "]?", ne = "(?:" + I + "(?:" + [j, U, x].join("|") + ")" + Q + Z + ")*", X = Q + Z + ne, K = "(?:" + [O, U, x].join("|") + ")" + X, ie = "(?:" + [j + v + "?", v, U, x, m].join("|") + ")", re = RegExp(w, "g"), te = RegExp(v, "g"), ce = RegExp(L + "(?=" + L + ")|" + ie + X, "g"), ue = RegExp([
1597
+ T + "?" + P + "+" + z + "(?=" + [l, T, "$"].join("|") + ")",
1598
+ $ + "+" + F + "(?=" + [l, T + N, "$"].join("|") + ")",
1599
+ T + "?" + N + "+" + z,
1600
+ T + "+" + F,
1601
+ b,
1602
1602
  K
1603
- ].join("|"), "g"), oe = RegExp("[" + k + t + a + n + o + "]"), 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 = {
1603
+ ].join("|"), "g"), oe = RegExp("[" + I + t + a + n + o + "]"), 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 = {
1604
1604
  // Latin-1 Supplement block.
1605
1605
  À: "A",
1606
1606
  Á: "A",
@@ -1794,91 +1794,91 @@ function gt() {
1794
1794
  ʼn: "'n",
1795
1795
  ſ: "ss"
1796
1796
  }, se = typeof be == "object" && be && be.Object === Object && be, ye = typeof self == "object" && self && self.Object === Object && self, Se = se || ye || Function("return this")();
1797
- function J(C, B, j, H) {
1798
- for (var Y = -1, Ee = C ? C.length : 0; ++Y < Ee; )
1799
- j = B(j, C[Y], Y, C);
1800
- return j;
1797
+ function J(M, B, V, H) {
1798
+ for (var Y = -1, Ee = M ? M.length : 0; ++Y < Ee; )
1799
+ V = B(V, M[Y], Y, M);
1800
+ return V;
1801
1801
  }
1802
- function ee(C) {
1803
- return C.split("");
1802
+ function ee(M) {
1803
+ return M.split("");
1804
1804
  }
1805
- function Ie(C) {
1806
- return C.match(r) || [];
1805
+ function Te(M) {
1806
+ return M.match(r) || [];
1807
1807
  }
1808
- function xe(C) {
1808
+ function xe(M) {
1809
1809
  return function(B) {
1810
- return C?.[B];
1810
+ return M?.[B];
1811
1811
  };
1812
1812
  }
1813
- var Te = xe(pe);
1814
- function me(C) {
1815
- return oe.test(C);
1813
+ var Re = xe(pe);
1814
+ function me(M) {
1815
+ return oe.test(M);
1816
1816
  }
1817
- function Pe(C) {
1818
- return de.test(C);
1817
+ function Pe(M) {
1818
+ return de.test(M);
1819
1819
  }
1820
- function ke(C) {
1821
- return me(C) ? Re(C) : ee(C);
1820
+ function ke(M) {
1821
+ return me(M) ? Ie(M) : ee(M);
1822
1822
  }
1823
- function Re(C) {
1824
- return C.match(ce) || [];
1823
+ function Ie(M) {
1824
+ return M.match(ce) || [];
1825
1825
  }
1826
- function _e(C) {
1827
- return C.match(ue) || [];
1826
+ function _e(M) {
1827
+ return M.match(ue) || [];
1828
1828
  }
1829
1829
  var Oe = Object.prototype, Ne = Oe.toString, le = Se.Symbol, fe = le ? le.prototype : void 0, we = fe ? fe.toString : void 0;
1830
- function Ce(C, B, j) {
1831
- var H = -1, Y = C.length;
1832
- B < 0 && (B = -B > Y ? 0 : Y + B), j = j > Y ? Y : j, j < 0 && (j += Y), Y = B > j ? 0 : j - B >>> 0, B >>>= 0;
1830
+ function Ce(M, B, V) {
1831
+ var H = -1, Y = M.length;
1832
+ B < 0 && (B = -B > Y ? 0 : Y + B), V = V > Y ? Y : V, V < 0 && (V += Y), Y = B > V ? 0 : V - B >>> 0, B >>>= 0;
1833
1833
  for (var Ee = Array(Y); ++H < Y; )
1834
- Ee[H] = C[H + B];
1834
+ Ee[H] = M[H + B];
1835
1835
  return Ee;
1836
1836
  }
1837
- function Le(C) {
1838
- if (typeof C == "string")
1839
- return C;
1840
- if (D(C))
1841
- return we ? we.call(C) : "";
1842
- var B = C + "";
1843
- return B == "0" && 1 / C == -1 / 0 ? "-0" : B;
1837
+ function Le(M) {
1838
+ if (typeof M == "string")
1839
+ return M;
1840
+ if (D(M))
1841
+ return we ? we.call(M) : "";
1842
+ var B = M + "";
1843
+ return B == "0" && 1 / M == -1 / 0 ? "-0" : B;
1844
1844
  }
1845
- function he(C, B, j) {
1846
- var H = C.length;
1847
- return j = j === void 0 ? H : j, !B && j >= H ? C : Ce(C, B, j);
1845
+ function he(M, B, V) {
1846
+ var H = M.length;
1847
+ return V = V === void 0 ? H : V, !B && V >= H ? M : Ce(M, B, V);
1848
1848
  }
1849
- function ge(C) {
1849
+ function ge(M) {
1850
1850
  return function(B) {
1851
1851
  B = y(B);
1852
- var j = me(B) ? ke(B) : void 0, H = j ? j[0] : B.charAt(0), Y = j ? he(j, 1).join("") : B.slice(1);
1853
- return H[C]() + Y;
1852
+ var V = me(B) ? ke(B) : void 0, H = V ? V[0] : B.charAt(0), Y = V ? he(V, 1).join("") : B.slice(1);
1853
+ return H[M]() + Y;
1854
1854
  };
1855
1855
  }
1856
- function g(C) {
1856
+ function h(M) {
1857
1857
  return function(B) {
1858
- return J(W(G(B).replace(re, "")), C, "");
1858
+ return J(W(G(B).replace(re, "")), M, "");
1859
1859
  };
1860
1860
  }
1861
- function b(C) {
1862
- return !!C && typeof C == "object";
1861
+ function A(M) {
1862
+ return !!M && typeof M == "object";
1863
1863
  }
1864
- function D(C) {
1865
- return typeof C == "symbol" || b(C) && Ne.call(C) == e;
1864
+ function D(M) {
1865
+ return typeof M == "symbol" || A(M) && Ne.call(M) == e;
1866
1866
  }
1867
- function y(C) {
1868
- return C == null ? "" : Le(C);
1867
+ function y(M) {
1868
+ return M == null ? "" : Le(M);
1869
1869
  }
1870
- var E = g(function(C, B, j) {
1871
- return B = B.toLowerCase(), C + (j ? P(B) : B);
1870
+ var E = h(function(M, B, V) {
1871
+ return B = B.toLowerCase(), M + (V ? C(B) : B);
1872
1872
  });
1873
- function P(C) {
1874
- return ae(y(C).toLowerCase());
1873
+ function C(M) {
1874
+ return ae(y(M).toLowerCase());
1875
1875
  }
1876
- function G(C) {
1877
- return C = y(C), C && C.replace(i, Te).replace(te, "");
1876
+ function G(M) {
1877
+ return M = y(M), M && M.replace(i, Re).replace(te, "");
1878
1878
  }
1879
1879
  var ae = ge("toUpperCase");
1880
- function W(C, B, j) {
1881
- return C = y(C), B = B, B === void 0 ? Pe(C) ? _e(C) : Ie(C) : C.match(B) || [];
1880
+ function W(M, B, V) {
1881
+ return M = y(M), B = B, B === void 0 ? Pe(M) ? _e(M) : Te(M) : M.match(B) || [];
1882
1882
  }
1883
1883
  return dr = E, dr;
1884
1884
  }
@@ -1898,8 +1898,8 @@ function bt() {
1898
1898
  return ve.isBrowser = r, ve.isWebWorker = t, ve.isNode = i, ve.isJsDom = a, ve.isDeno = n, ve;
1899
1899
  }
1900
1900
  bt();
1901
- const I = {}, Ge = {};
1902
- I.loadExternalScript = function(e) {
1901
+ const _ = {}, Ge = {};
1902
+ _.loadExternalScript = function(e) {
1903
1903
  if (Ge[e])
1904
1904
  return Ge[e];
1905
1905
  const r = Ge[e] = new Promise(i);
@@ -1914,7 +1914,7 @@ I.loadExternalScript = function(e) {
1914
1914
  return r;
1915
1915
  };
1916
1916
  const Vr = {};
1917
- I.loadExternalStyle = function(e) {
1917
+ _.loadExternalStyle = function(e) {
1918
1918
  const r = new Promise(i);
1919
1919
  function i(t, a) {
1920
1920
  if (!document)
@@ -1929,7 +1929,7 @@ I.loadExternalStyle = function(e) {
1929
1929
  }
1930
1930
  return r;
1931
1931
  };
1932
- I.exists = function(e) {
1932
+ _.exists = function(e) {
1933
1933
  var r;
1934
1934
  if (Array.isArray(e) || e === 0)
1935
1935
  return !0;
@@ -1951,7 +1951,7 @@ I.exists = function(e) {
1951
1951
  }
1952
1952
  return !r;
1953
1953
  };
1954
- I.parseDate = function(e) {
1954
+ _.parseDate = function(e) {
1955
1955
  if (e) {
1956
1956
  if (e instanceof Date)
1957
1957
  return e;
@@ -1960,12 +1960,12 @@ I.parseDate = function(e) {
1960
1960
  return r;
1961
1961
  }
1962
1962
  };
1963
- I.parseURL = function(e) {
1963
+ _.parseURL = function(e) {
1964
1964
  if (!e)
1965
1965
  return !1;
1966
1966
  if (e.startsWith("/") || e.startsWith("://") || e.startsWith("mailto:") || e.startsWith("tel:") || e.startsWith("sms:"))
1967
1967
  return e;
1968
- var i = I.parseEmail(e);
1968
+ var i = _.parseEmail(e);
1969
1969
  if (i && i === e)
1970
1970
  return `mailto:${i}`;
1971
1971
  const t = (p) => /^https?:\/\//i.test(p) ? p : `http://${p}`;
@@ -1978,10 +1978,10 @@ I.parseURL = function(e) {
1978
1978
  }
1979
1979
  if (!a)
1980
1980
  return !1;
1981
- var s = a.split("."), f = s.length === 4 && s.every(function(p) {
1981
+ var s = a.split("."), d = s.length === 4 && s.every(function(p) {
1982
1982
  return /^\d{1,3}$/.test(p);
1983
1983
  });
1984
- if (!f) {
1984
+ if (!d) {
1985
1985
  if (s.length < 2)
1986
1986
  return !1;
1987
1987
  var c = s.every(function(p) {
@@ -1992,16 +1992,16 @@ I.parseURL = function(e) {
1992
1992
  }
1993
1993
  return t(e);
1994
1994
  };
1995
- I.parseNumber = function(e, r) {
1995
+ _.parseNumber = function(e, r) {
1996
1996
  if (!e || (e = Number(e), isNaN(e)))
1997
1997
  return 0;
1998
1998
  if (r) {
1999
1999
  var i = e.toFixed(r);
2000
- e = I.parseNumber(i);
2000
+ e = _.parseNumber(i);
2001
2001
  }
2002
2002
  return e;
2003
2003
  };
2004
- I.isValidEmailAddress = function(e) {
2004
+ _.isValidEmailAddress = function(e) {
2005
2005
  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])+$/;
2006
2006
  if (!e) return !1;
2007
2007
  var i = e.split("@");
@@ -2014,48 +2014,48 @@ I.isValidEmailAddress = function(e) {
2014
2014
  return s.length > 63;
2015
2015
  }) || !r.test(e));
2016
2016
  };
2017
- I.parseEmail = function(e) {
2017
+ _.parseEmail = function(e) {
2018
2018
  if (!e)
2019
2019
  return !1;
2020
- var r = String(e).toLowerCase(), i = I.isValidEmailAddress(r);
2020
+ var r = String(e).toLowerCase(), i = _.isValidEmailAddress(r);
2021
2021
  return i ? r : !1;
2022
2022
  };
2023
- I.parseInt = function(e) {
2023
+ _.parseInt = function(e) {
2024
2024
  return !e || (e = parseInt(e), isNaN(e)) ? 0 : e;
2025
2025
  };
2026
- I.cleanValue = function(e, r, i) {
2026
+ _.cleanValue = function(e, r, i) {
2027
2027
  i || (i = {});
2028
- var t = I.exists(e);
2028
+ var t = _.exists(e);
2029
2029
  if (i.strict && t && r != "boolean")
2030
2030
  return e;
2031
2031
  switch (r) {
2032
2032
  case "reference":
2033
- return I.id(e, !0);
2033
+ return _.id(e, !0);
2034
2034
  case "boolean":
2035
- return I.parseBoolean(e);
2035
+ return _.parseBoolean(e);
2036
2036
  case "url":
2037
- return I.parseURL(e);
2037
+ return _.parseURL(e);
2038
2038
  case "key":
2039
- return I.machineName(e);
2039
+ return _.machineName(e);
2040
2040
  case "email":
2041
- return I.parseEmail(e);
2041
+ return _.parseEmail(e);
2042
2042
  case "date":
2043
- var a = I.parseDate(e, i);
2043
+ var a = _.parseDate(e, i);
2044
2044
  return a === void 0 ? void 0 : a;
2045
2045
  case "number":
2046
2046
  case "decimal":
2047
2047
  case "float":
2048
- var n = I.parseNumber(e);
2048
+ var n = _.parseNumber(e);
2049
2049
  return String(n) == String(Number(e)) ? n : void 0;
2050
2050
  case "integer":
2051
- var n = I.parseInt(e);
2051
+ var n = _.parseInt(e);
2052
2052
  return String(n) == String(parseInt(e)) ? n : void 0;
2053
2053
  case "group":
2054
2054
  return e;
2055
2055
  case "object":
2056
2056
  return typeof e == "object" && e !== null && !Array.isArray(e) ? e : void 0;
2057
2057
  case "string":
2058
- if (I.exists(e)) {
2058
+ if (_.exists(e)) {
2059
2059
  var s = String(e);
2060
2060
  return s == "[object Object]" ? void 0 : s;
2061
2061
  } else
@@ -2075,43 +2075,43 @@ I.cleanValue = function(e, r, i) {
2075
2075
  return String(e);
2076
2076
  }
2077
2077
  };
2078
- I.isValidValue = function(e, r, i) {
2079
- var t = I.exists(e), a = typeof e == "number", n = !1;
2078
+ _.isValidValue = function(e, r, i) {
2079
+ var t = _.exists(e), a = typeof e == "number", n = !1;
2080
2080
  if (!t)
2081
2081
  return !1;
2082
2082
  switch (r) {
2083
2083
  case "url":
2084
- i ? n = e.startsWith("/") || e.startsWith("://") || e.startsWith("http://") || e.startsWith("https://") : n = String(e) === I.parseURL(e);
2084
+ i ? n = e.startsWith("/") || e.startsWith("://") || e.startsWith("http://") || e.startsWith("https://") : n = String(e) === _.parseURL(e);
2085
2085
  break;
2086
2086
  case "key":
2087
- n = String(e) === I.machineName(e);
2087
+ n = String(e) === _.machineName(e);
2088
2088
  break;
2089
2089
  case "date":
2090
2090
  if (i && (typeof e != "object" || !(e instanceof Date)))
2091
2091
  return !1;
2092
- var s = I.parseDate(e);
2092
+ var s = _.parseDate(e);
2093
2093
  return s !== void 0;
2094
2094
  case "email":
2095
- i ? n = e === I.parseEmail(e) : n = String(e).toLowerCase() === I.parseEmail(e);
2095
+ i ? n = e === _.parseEmail(e) : n = String(e).toLowerCase() === _.parseEmail(e);
2096
2096
  break;
2097
2097
  case "number":
2098
2098
  case "decimal":
2099
2099
  case "float":
2100
- i ? n = a && Number(e) === I.parseNumber(e) : n = Number(e) === I.parseNumber(e);
2100
+ i ? n = a && Number(e) === _.parseNumber(e) : n = Number(e) === _.parseNumber(e);
2101
2101
  break;
2102
2102
  case "integer":
2103
- i ? n = a && Number(e) === I.parseInt(e) : n = Number(e) === I.parseInt(e);
2103
+ i ? n = a && Number(e) === _.parseInt(e) : n = Number(e) === _.parseInt(e);
2104
2104
  break;
2105
2105
  case "boolean":
2106
- var s = I.parseBoolean(e);
2106
+ var s = _.parseBoolean(e);
2107
2107
  i ? (e === !0 || e === !1) && (n = e === s) : n = s === !0 || s === !1;
2108
2108
  break;
2109
2109
  case "reference":
2110
- i ? n = String(e) === I.id(e) : n = !!I.id(e);
2110
+ i ? n = String(e) === _.id(e) : n = !!_.id(e);
2111
2111
  break;
2112
2112
  case "string":
2113
- var f = String(e);
2114
- if (i && typeof e != "string" || f == "[object Object]")
2113
+ var d = String(e);
2114
+ if (i && typeof e != "string" || d == "[object Object]")
2115
2115
  return !1;
2116
2116
  n = !0;
2117
2117
  break;
@@ -2127,7 +2127,7 @@ I.isValidValue = function(e, r, i) {
2127
2127
  }
2128
2128
  return n;
2129
2129
  };
2130
- I.parseBoolean = function(e) {
2130
+ _.parseBoolean = function(e) {
2131
2131
  switch (String(e).toLowerCase()) {
2132
2132
  case "true":
2133
2133
  case "y":
@@ -2150,10 +2150,10 @@ I.parseBoolean = function(e) {
2150
2150
  }
2151
2151
  return !!e;
2152
2152
  };
2153
- I.clone = function(e) {
2153
+ _.clone = function(e) {
2154
2154
  return JSON.parse(JSON.stringify(e));
2155
2155
  };
2156
- I.getAllFields = function(e) {
2156
+ _.getAllFields = function(e) {
2157
2157
  const r = e.definesType === "profile" || e.key === "profile", i = e.definesType === "submission";
2158
2158
  var t = [...e.fields], a = e.definedFields || [];
2159
2159
  if (a.length)
@@ -2205,7 +2205,7 @@ I.getAllFields = function(e) {
2205
2205
  maximum: 1,
2206
2206
  type: "date"
2207
2207
  }));
2208
- var f = I.mapFields(t).filter(function(c) {
2208
+ var d = _.mapFields(t).filter(function(c) {
2209
2209
  var p = c.type == "group" && c.asObject && c.minimum == 1 && c.maximum == 1;
2210
2210
  return !p;
2211
2211
  }).map(function(c) {
@@ -2213,30 +2213,30 @@ I.getAllFields = function(e) {
2213
2213
  }).sort(function(c, p) {
2214
2214
  return c.title < p.title ? -1 : 1;
2215
2215
  });
2216
- return f;
2216
+ return d;
2217
2217
  };
2218
- I.mapFields = function(e, r) {
2218
+ _.mapFields = function(e, r) {
2219
2219
  r || (r = {});
2220
- var i = [], t = [], a = [], n = 1, s = r.depth, f = r.arrayDelimeter || "[]";
2220
+ var i = [], t = [], a = [], n = 1, s = r.depth, d = r.arrayDelimeter || "[]";
2221
2221
  e.forEach(c);
2222
- function c(p, w) {
2223
- var A = p.key, u = p.type == "group", o = p.minimum === p.maximum && p.minimum === 1, m = p.asObject, h = u && !m, d = r.original ? p : I.clone(p);
2224
- d.trail = t.slice(), d.trail.push(A), d.path = d.trail.join("."), d.titles = a.slice(), d.titles.push(p.filterTitle || p.title || ""), (!h || r.includeLayout) && i.push(d);
2222
+ function c(p, S) {
2223
+ var g = p.key, u = p.type == "group", o = p.minimum === p.maximum && p.minimum === 1, f = p.asObject, w = u && !f, m = r.original ? p : _.clone(p);
2224
+ m.trail = t.slice(), m.trail.push(g), m.path = m.trail.join("."), m.titles = a.slice(), m.titles.push(p.filterTitle || p.title || ""), (!w || r.includeLayout) && i.push(m);
2225
2225
  var v = s && n >= s;
2226
2226
  if (p.fields && p.fields.length)
2227
- if (h)
2227
+ if (w)
2228
2228
  p.fields.forEach(c);
2229
2229
  else {
2230
2230
  if (v)
2231
2231
  return;
2232
2232
  n++;
2233
- let S = A;
2234
- r.includeArrayDelimeter && (o || (S = `${A}${f}`)), t.push(S), a.push(p.filterTitle || p.title), p.fields.forEach(c), n--, t.pop(), a.pop();
2233
+ let b = g;
2234
+ r.includeArrayDelimeter && (o || (b = `${g}${d}`)), t.push(b), a.push(p.filterTitle || p.title), p.fields.forEach(c), n--, t.pop(), a.pop();
2235
2235
  }
2236
2236
  }
2237
2237
  return i;
2238
2238
  };
2239
- I.mapParameters = function(e) {
2239
+ _.mapParameters = function(e) {
2240
2240
  e = e || {};
2241
2241
  var r = [];
2242
2242
  return Object.entries(e).forEach(function([i, t]) {
@@ -2245,13 +2245,13 @@ I.mapParameters = function(e) {
2245
2245
  }) : r.push(encodeURIComponent(i) + "=" + encodeURIComponent(t)));
2246
2246
  }), r.join("&");
2247
2247
  };
2248
- I.formatCurrency = function(e, r, i) {
2248
+ _.formatCurrency = function(e, r, i) {
2249
2249
  (!e || isNaN(e)) && (e = 0), i = i || 2;
2250
- var t = I.currencySymbol(r);
2250
+ var t = _.currencySymbol(r);
2251
2251
  return `${t}${parseFloat(Number(e) / 100).toFixed(i)}`;
2252
2252
  };
2253
- I.getTypeFromID = function(e) {
2254
- if (e = I.id(e), !e)
2253
+ _.getTypeFromID = function(e) {
2254
+ if (e = _.id(e), !e)
2255
2255
  return;
2256
2256
  const r = {
2257
2257
  21: "organisation",
@@ -2314,7 +2314,7 @@ I.getTypeFromID = function(e) {
2314
2314
  return r[i];
2315
2315
  };
2316
2316
  const St = { gbp: "£", eur: "€" };
2317
- I.currencySymbol = function(e) {
2317
+ _.currencySymbol = function(e) {
2318
2318
  return St[String(e).toLowerCase()] || "$";
2319
2319
  };
2320
2320
  const wt = [
@@ -2325,9 +2325,9 @@ const wt = [
2325
2325
  { code: "nzd", countries: ["NZ"] },
2326
2326
  { code: "sgd", countries: ["SG"] }
2327
2327
  ];
2328
- I.getAvailableCurrencies = function(e) {
2328
+ _.getAvailableCurrencies = function(e) {
2329
2329
  let r = wt.map(({ code: i, countries: t }) => ({
2330
- name: `${i.toUpperCase()} (${I.currencySymbol(i)})`,
2330
+ name: `${i.toUpperCase()} (${_.currencySymbol(i)})`,
2331
2331
  value: i,
2332
2332
  countryCode: Object.fromEntries(t.map((a) => [a, !0]))
2333
2333
  }));
@@ -2340,97 +2340,97 @@ I.getAvailableCurrencies = function(e) {
2340
2340
  }
2341
2341
  return r;
2342
2342
  };
2343
- I.hash = function(e, r) {
2343
+ _.hash = function(e, r) {
2344
2344
  return e = Array.isArray(e) ? e : [], e.reduce(function(i, t) {
2345
2345
  const a = r ? je(t, r) : t;
2346
2346
  return i[a] = t, i;
2347
2347
  }, {});
2348
2348
  };
2349
- I.extractFromArray = function(e, r, i, t, a, n, s) {
2349
+ _.extractFromArray = function(e, r, i, t, a, n, s) {
2350
2350
  s = s || {}, i && (s.sum = i), t && (s.flatten = !0), a && (s.unique = !0), n && (s.excludeNull = !0);
2351
- var f = e.reduce(function(c, p) {
2352
- var w = je(p, r), A = !w && w !== !1 && w !== 0;
2353
- return s.excludeNull && A || c.push(w), c;
2351
+ var d = e.reduce(function(c, p) {
2352
+ var S = je(p, r), g = !S && S !== !1 && S !== 0;
2353
+ return s.excludeNull && g || c.push(S), c;
2354
2354
  }, []);
2355
- return s.flatten && (f = f.flat()), s.unique && (f = [...new Set(f)]), s.sum && (f = f.reduce(function(c, p) {
2355
+ return s.flatten && (d = d.flat()), s.unique && (d = [...new Set(d)]), s.sum && (d = d.reduce(function(c, p) {
2356
2356
  return c + p;
2357
- }, 0)), f;
2357
+ }, 0)), d;
2358
2358
  };
2359
- I.matchInArray = function(e, r, i, t) {
2359
+ _.matchInArray = function(e, r, i, t) {
2360
2360
  var a = e.filter(function(n) {
2361
- var s = je(n, r), f;
2361
+ var s = je(n, r), d;
2362
2362
  switch (t) {
2363
2363
  case "in":
2364
- f = s.includes(i);
2364
+ d = s.includes(i);
2365
2365
  break;
2366
2366
  case ">=":
2367
- f = s >= i;
2367
+ d = s >= i;
2368
2368
  break;
2369
2369
  case "<=":
2370
- f = s <= i;
2370
+ d = s <= i;
2371
2371
  break;
2372
2372
  case "<":
2373
- f = s < i;
2373
+ d = s < i;
2374
2374
  break;
2375
2375
  case ">":
2376
- f = s > i;
2376
+ d = s > i;
2377
2377
  break;
2378
2378
  case "==":
2379
2379
  default:
2380
- i === void 0 ? f = s : f = s == i;
2380
+ i === void 0 ? d = s : d = s == i;
2381
2381
  break;
2382
2382
  }
2383
- return f;
2383
+ return d;
2384
2384
  });
2385
2385
  return a;
2386
2386
  };
2387
- I.comma = function(e, r, i) {
2387
+ _.comma = function(e, r, i) {
2388
2388
  return i && (e = e.slice(0, i)), e.filter(function(t) {
2389
2389
  return t != null && t !== void 0 && t !== "";
2390
2390
  }).map(function(t) {
2391
2391
  return r && r.length ? je(t, r) : t;
2392
2392
  }).join(", ");
2393
2393
  };
2394
- I.id = function(e) {
2394
+ _.id = function(e) {
2395
2395
  if (e) {
2396
2396
  var r;
2397
2397
  e._id ? r = String(e._id) : r = String(e);
2398
- var i = I.isValidID(r);
2398
+ var i = _.isValidID(r);
2399
2399
  if (i)
2400
2400
  return r;
2401
2401
  }
2402
2402
  };
2403
- I.ids = function(e) {
2403
+ _.ids = function(e) {
2404
2404
  if (!e)
2405
2405
  return [];
2406
2406
  var r = Object.keys(
2407
2407
  e.reduce(function(i, t) {
2408
2408
  if (!t)
2409
2409
  return i;
2410
- var a = I.id(t);
2410
+ var a = _.id(t);
2411
2411
  return a && (i[a] = 1), i;
2412
2412
  }, {})
2413
2413
  );
2414
2414
  return r;
2415
2415
  };
2416
- I.isValidID = function(e) {
2416
+ _.isValidID = function(e) {
2417
2417
  var r = new RegExp("^[0-9a-fA-F]{24}$");
2418
2418
  return r.test(String(e));
2419
2419
  };
2420
- I.errorMessage = function(e) {
2420
+ _.errorMessage = function(e) {
2421
2421
  if (!e)
2422
2422
  return;
2423
2423
  Array.isArray(e) && (e = e[0]);
2424
2424
  let r = e?.response?.data?.message || (typeof e?.response?.data == "string" ? e.response.data : null) || e?.message || null;
2425
2425
  return Array.isArray(r) && (r = r[0]), r || JSON.stringify(e);
2426
2426
  };
2427
- I.guid = function() {
2427
+ _.guid = function() {
2428
2428
  return typeof crypto < "u" && crypto.randomUUID ? crypto.randomUUID() : "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
2429
2429
  const r = Math.random() * 16 | 0;
2430
2430
  return (e === "x" ? r : r & 3 | 8).toString(16);
2431
2431
  });
2432
2432
  };
2433
- I.machineName = function(e) {
2433
+ _.machineName = function(e) {
2434
2434
  if (!(!e || !e.length)) {
2435
2435
  var r = /[^a-zA-Z0-9-_]+/g;
2436
2436
  return String(e).replace(r, " ").split("_").map((i) => At(i)).join("_");
@@ -2438,11 +2438,11 @@ I.machineName = function(e) {
2438
2438
  };
2439
2439
  function De() {
2440
2440
  const e = /* @__PURE__ */ new Map(), r = {
2441
- dispatch(i, t) {
2441
+ dispatch(i, ...t) {
2442
2442
  const a = e.get(i);
2443
2443
  if (a)
2444
2444
  for (const n of a)
2445
- n(t);
2445
+ n(...t);
2446
2446
  },
2447
2447
  addEventListener(i, t) {
2448
2448
  if (typeof t != "function")
@@ -2665,176 +2665,178 @@ var Pt = function(e) {
2665
2665
  });
2666
2666
  const a = new De();
2667
2667
  a.bootstrap(t);
2668
- function n(f) {
2668
+ function n(d) {
2669
2669
  var c = r.getUser();
2670
- t.onChange && t.onChange(c), a.dispatch("change", c, f);
2670
+ t.onChange && t.onChange(c, d), a.dispatch("change", c, d);
2671
2671
  }
2672
- t.set = function(f, c, p) {
2673
- const w = r.getUser();
2674
- if (JSON.stringify(w) != JSON.stringify(f) && (r.setUser(f), !p))
2672
+ t.set = function(d, c, p) {
2673
+ const S = r.getUser();
2674
+ if (JSON.stringify(S) != JSON.stringify(d) && (r.setUser(d), !p))
2675
2675
  return n(c);
2676
2676
  }, t.logout = function() {
2677
2677
  return r.clearUser(), e.cache.reset(), n();
2678
- }, t.changeOrganisation = function(f, c) {
2679
- f = e.utils.id(f), c || (c = {});
2678
+ }, t.changeOrganisation = function(d, c) {
2679
+ d = e.utils.id(d), c || (c = {});
2680
2680
  var p = !0;
2681
- return c.disableAutoAuthentication && (p = !1), new Promise(function(w, A) {
2682
- e.api.post(`/user/switch/${f}`).then(function(u) {
2683
- p && (e.cache.reset(), t.set(u.data)), w(u.data);
2684
- }).catch(A);
2681
+ return c.disableAutoAuthentication && (p = !1), new Promise(function(S, g) {
2682
+ e.api.post(`/user/switch/${d}`).then(function(u) {
2683
+ p && (e.cache.reset(), t.set(u.data)), S(u.data);
2684
+ }).catch(g);
2685
2685
  });
2686
- }, t.impersonate = function(f, c) {
2687
- f = e.utils.id(f), c || (c = {});
2686
+ }, t.impersonate = function(d, c) {
2687
+ d = e.utils.id(d), c || (c = {});
2688
2688
  var p = !0;
2689
2689
  c.disableAutoAuthentication && (p = !1);
2690
- var w = e.api.post(`/user/impersonate/${f}`);
2691
- return w.then(function(A) {
2692
- p && (e.cache.reset(), t.set(A.data));
2693
- }, function(A) {
2694
- }), w;
2695
- }, t.login = async function(f, c) {
2690
+ var S = { persona: d };
2691
+ c.application && (S.application = e.utils.id(c.application));
2692
+ var g = e.api.post("/user/impersonate", S);
2693
+ return g.then(function(u) {
2694
+ p && (e.cache.reset(), t.set(u.data));
2695
+ }, function(u) {
2696
+ }), g;
2697
+ }, t.login = async function(d, c) {
2696
2698
  c || (c = {});
2697
2699
  var p = !0;
2698
2700
  c.disableAutoAuthentication && (p = !1);
2699
- var w = new Promise(A);
2700
- function A(u, o) {
2701
- if (!f)
2701
+ var S = new Promise(g);
2702
+ function g(u, o) {
2703
+ if (!d)
2702
2704
  return o({
2703
2705
  message: "Login requires an email and password"
2704
2706
  });
2705
- if (!f.email || !f.email.length)
2707
+ if (!d.email || !d.email.length)
2706
2708
  return o({
2707
2709
  message: "An email address is required to log in"
2708
2710
  });
2709
- if (!f.password || !f.password.length)
2711
+ if (!d.password || !d.password.length)
2710
2712
  return o({
2711
2713
  message: "A password is required to log in"
2712
2714
  });
2713
- var m = {
2715
+ var f = {
2714
2716
  bypassInterceptor: !0
2715
2717
  };
2716
- r.isCookieMode && r.isCookieMode() && (f.useCookies = !0, m.withCredentials = !0);
2717
- var d = `${e.apiURL}/user/login`;
2718
- c.url && (d = c.url), e.api.post(d, f, m).then(function(l) {
2719
- p && t.set(l.data), u(l);
2718
+ r.isCookieMode && r.isCookieMode() && (d.useCookies = !0, f.withCredentials = !0);
2719
+ var m = `${e.apiURL}/user/login`;
2720
+ c.url && (m = c.url), e.api.post(m, d, f).then(function(l) {
2721
+ p && !(l.data && l.data.mfa) && t.set(l.data), u(l);
2720
2722
  }, o);
2721
2723
  }
2722
- return w;
2723
- }, t.signup = async function(f, c) {
2724
+ return S;
2725
+ }, t.signup = async function(d, c) {
2724
2726
  c || (c = {});
2725
2727
  var p = !0;
2726
2728
  c.disableAutoAuthentication && (p = !1);
2727
- var w = new Promise(A);
2728
- function A(u, o) {
2729
- if (!f)
2729
+ var S = new Promise(g);
2730
+ function g(u, o) {
2731
+ if (!d)
2730
2732
  return o({
2731
2733
  message: "Signup details are required"
2732
2734
  });
2733
- if (!f.firstName || !f.firstName.length)
2735
+ if (!d.firstName || !d.firstName.length)
2734
2736
  return o({
2735
2737
  message: "Please provide a first name"
2736
2738
  });
2737
- if (!f.lastName || !f.lastName.length)
2739
+ if (!d.lastName || !d.lastName.length)
2738
2740
  return o({
2739
2741
  message: "Please provide a last name"
2740
2742
  });
2741
- if (!f.email || !f.email.length)
2743
+ if (!d.email || !d.email.length)
2742
2744
  return o({
2743
2745
  message: "An email address is required to sign up"
2744
2746
  });
2745
- if (!f.password || !f.password.length)
2747
+ if (!d.password || !d.password.length)
2746
2748
  return o({
2747
2749
  message: "A password is required to sign up"
2748
2750
  });
2749
- if (!f.confirmPassword || !f.confirmPassword.length)
2751
+ if (!d.confirmPassword || !d.confirmPassword.length)
2750
2752
  return o({
2751
2753
  message: "Please confirm your password"
2752
2754
  });
2753
- if (f.confirmPassword != f.password)
2755
+ if (d.confirmPassword != d.password)
2754
2756
  return o({
2755
2757
  message: "Password and confirmation do not match"
2756
2758
  });
2757
- var m = {
2759
+ var f = {
2758
2760
  bypassInterceptor: !0
2759
2761
  };
2760
- r.isCookieMode && r.isCookieMode() && (f.useCookies = !0, m.withCredentials = !0);
2761
- var d = `${e.apiURL}/user/signup`;
2762
- c.application && (d = `${e.domain || ""}/qik/application/signup`), c.url && (d = c.url), e.api.post(d, f, m).then(function(l) {
2762
+ r.isCookieMode && r.isCookieMode() && (d.useCookies = !0, f.withCredentials = !0);
2763
+ var m = `${e.apiURL}/user/signup`;
2764
+ c.application && (m = `${e.domain || ""}/qik/application/signup`), c.url && (m = c.url), e.api.post(m, d, f).then(function(l) {
2763
2765
  p && t.set(l.data), u(l);
2764
2766
  }, o);
2765
2767
  }
2766
- return w;
2767
- }, t.retrieveUserFromResetToken = async function(f, c) {
2768
+ return S;
2769
+ }, t.retrieveUserFromResetToken = async function(d, c) {
2768
2770
  c || (c = {});
2769
2771
  var p = {
2770
2772
  bypassInterceptor: !0
2771
2773
  };
2772
- return new Promise(function(w, A) {
2773
- e.api.get(c.url || `${e.apiURL}/user/reset/${f}`, p).then(function(u) {
2774
- return w(u.data);
2775
- }, A);
2774
+ return new Promise(function(S, g) {
2775
+ e.api.get(c.url || `${e.apiURL}/user/reset/${d}`, p).then(function(u) {
2776
+ return S(u.data);
2777
+ }, g);
2776
2778
  });
2777
- }, t.updateUserWithToken = async function(f, c, p) {
2779
+ }, t.updateUserWithToken = async function(d, c, p) {
2778
2780
  p || (p = {});
2779
- var w = !0;
2780
- return p.disableAutoAuthentication && (w = !1), new Promise(function(A, u) {
2781
+ var S = !0;
2782
+ return p.disableAutoAuthentication && (S = !1), new Promise(function(g, u) {
2781
2783
  var o = {
2782
2784
  bypassInterceptor: !0
2783
2785
  };
2784
- e.api.post(p.url || `${e.apiURL}/user/reset/${f}`, c, o).then(function(m) {
2785
- return w && (e.cache.reset(), t.set(m.data)), A(m.data);
2786
+ e.api.post(p.url || `${e.apiURL}/user/reset/${d}`, c, o).then(function(f) {
2787
+ return S && (e.cache.reset(), t.set(f.data)), g(f.data);
2786
2788
  }, u);
2787
2789
  });
2788
- }, t.sendResetPasswordRequest = function(f, c) {
2789
- return c || (c = {}), f ? !f.email || !f.email.length ? Promise.reject({
2790
+ }, t.sendResetPasswordRequest = function(d, c) {
2791
+ return c || (c = {}), d ? !d.email || !d.email.length ? Promise.reject({
2790
2792
  message: "An email address is required for password reset"
2791
- }) : new Promise(function(p, w) {
2792
- var A = {
2793
+ }) : new Promise(function(p, S) {
2794
+ var g = {
2793
2795
  bypassInterceptor: !0
2794
2796
  };
2795
- e.api.post(c.url || `${e.apiURL}/user/forgot`, f, A).then(p, w);
2797
+ e.api.post(c.url || `${e.apiURL}/user/forgot`, d, g).then(p, S);
2796
2798
  }) : Promise.reject({
2797
2799
  message: "Please provide your account details to reset your password"
2798
2800
  });
2799
- }, t.ensureValidToken = async function(f) {
2801
+ }, t.ensureValidToken = async function(d) {
2800
2802
  var c = t.getCurrentUser();
2801
2803
  if (!c)
2802
2804
  return Promise.reject(new Error("No user"));
2803
2805
  if (r.isCookieMode && r.isCookieMode())
2804
- return f ? await t.refreshAccessToken() : "cookie_mode_token";
2805
- var { token: w } = c;
2806
- if (!w)
2806
+ return d ? await t.refreshAccessToken() : "cookie_mode_token";
2807
+ var { token: S } = c;
2808
+ if (!S)
2807
2809
  return Promise.reject("No token");
2808
- var A = /* @__PURE__ */ new Date();
2809
- A.setSeconds(A.getSeconds() + i);
2810
- var u = new Date(w.expires);
2811
- return f ? await t.refreshAccessToken(w.refreshToken) : A < u ? w : await t.refreshAccessToken(w.refreshToken);
2810
+ var g = /* @__PURE__ */ new Date();
2811
+ g.setSeconds(g.getSeconds() + i);
2812
+ var u = new Date(S.expires);
2813
+ return d ? await t.refreshAccessToken(S.refreshToken) : g < u ? S : await t.refreshAccessToken(S.refreshToken);
2812
2814
  };
2813
2815
  const s = {};
2814
- return t.refreshAccessToken = async function(f) {
2816
+ return t.refreshAccessToken = async function(d) {
2815
2817
  if (s.inflightRefreshRequest)
2816
2818
  return s.inflightRefreshRequest;
2817
2819
  const c = r.isCookieMode && r.isCookieMode();
2818
- return s.inflightRefreshRequest = new Promise(function(p, w) {
2819
- let A = {}, u = {
2820
+ return s.inflightRefreshRequest = new Promise(function(p, S) {
2821
+ let g = {}, u = {
2820
2822
  bypassInterceptor: !0,
2821
2823
  withoutToken: !0
2822
2824
  };
2823
2825
  if (c)
2824
2826
  u.withCredentials = !0;
2825
2827
  else {
2826
- if (!f)
2827
- return s.inflightRefreshRequest = null, w(new Error("No refresh token provided for localStorage mode"));
2828
- A.refreshToken = f;
2828
+ if (!d)
2829
+ return s.inflightRefreshRequest = null, S(new Error("No refresh token provided for localStorage mode"));
2830
+ g.refreshToken = d;
2829
2831
  }
2830
- e.api.post("/user/refresh", A, u).then(function(m) {
2831
- if (!m || !m.data)
2832
- return s.inflightRefreshRequest = null, w(new Error("Invalid refresh response"));
2833
- if (t.set(m.data), n(), c)
2832
+ e.api.post("/user/refresh", g, u).then(function(f) {
2833
+ if (!f || !f.data)
2834
+ return s.inflightRefreshRequest = null, S(new Error("Invalid refresh response"));
2835
+ if (t.set(f.data), n(), c)
2834
2836
  p("cookie_token_refreshed");
2835
2837
  else {
2836
- const h = m.data.token?.accessToken;
2837
- h ? p(h) : w(new Error("No access token in refresh response"));
2838
+ const w = f.data.token?.accessToken;
2839
+ w ? p(w) : S(new Error("No access token in refresh response"));
2838
2840
  }
2839
2841
  setTimeout(function() {
2840
2842
  s.inflightRefreshRequest = null;
@@ -2842,30 +2844,30 @@ var Pt = function(e) {
2842
2844
  }).catch(function(o) {
2843
2845
  setTimeout(function() {
2844
2846
  s.inflightRefreshRequest = null;
2845
- }), w(o);
2847
+ }), S(o);
2846
2848
  });
2847
2849
  }), s.inflightRefreshRequest;
2848
- }, t.sync = function() {
2849
- return e.api.get("/user").then(function(f) {
2850
- if (f.data) {
2851
- const c = r.getUser();
2852
- if (c) {
2853
- const p = { ...c };
2854
- p.session ? Object.assign(p.session, f.data) : p.session = f.data, t.set(p);
2850
+ }, t.sync = function(d) {
2851
+ return d = d || {}, e.api.get("/user").then(function(c) {
2852
+ if (c.data) {
2853
+ const p = r.getUser();
2854
+ if (p) {
2855
+ const S = { ...p };
2856
+ S.session ? Object.assign(S.session, c.data) : S.session = c.data, t.set(S);
2855
2857
  } else
2856
- t.set(f.data);
2858
+ t.set(c.data);
2857
2859
  } else
2858
2860
  t.set(null);
2859
2861
  n();
2860
- }).catch(function(f) {
2861
- t.set(null), n();
2862
+ }).catch(function(c) {
2863
+ d.keepOnError || (t.set(null), n());
2862
2864
  });
2863
2865
  }, t.getCurrentUser = function() {
2864
2866
  return r.getUser();
2865
2867
  }, t.getCurrentToken = function() {
2866
- var f = r.getAccessToken();
2867
- if (f)
2868
- return f;
2868
+ var d = r.getAccessToken();
2869
+ if (d)
2870
+ return d;
2869
2871
  var c = t.getCurrentUser();
2870
2872
  if (!c)
2871
2873
  return e.applicationToken ? e.applicationToken : void 0;
@@ -2873,47 +2875,47 @@ var Pt = function(e) {
2873
2875
  if (p)
2874
2876
  return p.accessToken;
2875
2877
  }, e.api.interceptors.request.use(
2876
- async function(f) {
2877
- if (f.bypassInterceptor)
2878
- return f;
2879
- var c = f;
2878
+ async function(d) {
2879
+ if (d.bypassInterceptor)
2880
+ return d;
2881
+ var c = d;
2880
2882
  if (r.isCookieMode && r.isCookieMode())
2881
2883
  return c.withCredentials || (c.withCredentials = !0), c;
2882
- var w = t.getCurrentUser(), A, u, o;
2883
- if (w) {
2884
- var { token: m } = w;
2885
- m && (A = m.accessToken, u = m.refreshToken, o = m.expires);
2884
+ var S = t.getCurrentUser(), g, u, o;
2885
+ if (S) {
2886
+ var { token: f } = S;
2887
+ f && (g = f.accessToken, u = f.refreshToken, o = f.expires);
2886
2888
  }
2887
- if (A)
2888
- c.headers.Authorization = `Bearer ${A}`;
2889
+ if (g)
2890
+ c.headers.Authorization = `Bearer ${g}`;
2889
2891
  else
2890
2892
  return c;
2891
2893
  if (!u)
2892
2894
  return c;
2893
- var h = /* @__PURE__ */ new Date();
2894
- h.setSeconds(h.getSeconds() + i);
2895
- var d = new Date(o);
2896
- return h < d ? c : new Promise(async function(l, v) {
2897
- await t.refreshAccessToken(u).then(function(S) {
2898
- return c.headers.Authorization = `Bearer ${S}`, l(c);
2899
- }).catch(function(S) {
2900
- return v(S);
2895
+ var w = /* @__PURE__ */ new Date();
2896
+ w.setSeconds(w.getSeconds() + i);
2897
+ var m = new Date(o);
2898
+ return w < m ? c : new Promise(async function(l, v) {
2899
+ await t.refreshAccessToken(u).then(function(b) {
2900
+ return c.headers.Authorization = `Bearer ${b}`, l(c);
2901
+ }).catch(function(b) {
2902
+ return v(b);
2901
2903
  });
2902
2904
  });
2903
2905
  },
2904
- function(f) {
2905
- return Promise.reject(f);
2906
+ function(d) {
2907
+ return Promise.reject(d);
2906
2908
  }
2907
- ), e.api.interceptors.response.use(function(f) {
2908
- return f;
2909
- }, function(f) {
2910
- var c = f && f.response && f.response.status || f.status;
2909
+ ), e.api.interceptors.response.use(function(d) {
2910
+ return d;
2911
+ }, function(d) {
2912
+ var c = d && d.response && d.response.status || d.status;
2911
2913
  switch (c) {
2912
2914
  case 401:
2913
2915
  t.logout();
2914
2916
  break;
2915
2917
  }
2916
- return Promise.reject(f);
2918
+ return Promise.reject(d);
2917
2919
  }), t;
2918
2920
  }, q = {};
2919
2921
  function pr(e) {
@@ -2926,7 +2928,7 @@ function Wr(e) {
2926
2928
  return !pr(e);
2927
2929
  }
2928
2930
  q.cleanKey = function(e) {
2929
- return e = String(e).split("|")[0], e[0] == "." && (e = e.slice(1)), e;
2931
+ return e == null ? "" : (e = String(e).split("|")[0], e[0] == "." && (e = e.slice(1)), e);
2930
2932
  };
2931
2933
  q.isValidFilter = function(e) {
2932
2934
  if (!e)
@@ -2971,8 +2973,8 @@ q.activeFilterKeys = function(e, r) {
2971
2973
  var i = q.activeFilters(e), t = i.filter(function(n) {
2972
2974
  return !n.operator;
2973
2975
  }).reduce(function(n, s) {
2974
- var f = q.cleanKey(s.key);
2975
- return r.trimArrayDelimeters !== !1 && (f = f.split("[]").join("")), n[f] = !0, n;
2976
+ var d = q.cleanKey(s.key);
2977
+ return r.trimArrayDelimeters !== !1 && (d = d.split("[]").join("")), n[d] = !0, n;
2976
2978
  }, {}), a = Object.keys(t);
2977
2979
  return a;
2978
2980
  };
@@ -3022,8 +3024,8 @@ function Ot(e) {
3022
3024
  return n.extension?.length && (n.extension.includes(".") ? s = `${s}/${n.extension}` : s = `${s}/${i}.${n.extension}`), e.api.generateEndpointURL(s, a, n);
3023
3025
  }, r.filesize = function(i, t) {
3024
3026
  if (i == 0) return "0 Bytes";
3025
- var a = 1024, n = t || 2, s = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"], f = Math.floor(Math.log(i) / Math.log(a));
3026
- return parseFloat((i / Math.pow(a, f)).toFixed(n)) + " " + s[f];
3027
+ var a = 1024, n = t || 2, s = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"], d = Math.floor(Math.log(i) / Math.log(a));
3028
+ return parseFloat((i / Math.pow(a, d)).toFixed(n)) + " " + s[d];
3027
3029
  }, r.getBinaryTypeFromMime = function(i) {
3028
3030
  if (!i)
3029
3031
  return "file";
@@ -3066,8 +3068,12 @@ function Ot(e) {
3066
3068
  var Ue = {}, Ct = {
3067
3069
  ///////////////////////////////////////////////////
3068
3070
  /**
3069
- * A helper function to reset all caches, useful if changing organisation or logging in or out as another user
3070
- * @alias cache.reset
3071
+ * Empties every cache created with sdk.cache.get (the caches themselves stay available, just empty).
3072
+ * sdk.auth.logout() and sdk.auth.changeOrganisation() call this for you.
3073
+ * @alias cache.reset
3074
+ * @returns {undefined}
3075
+ * @example
3076
+ * sdk.cache.reset();
3071
3077
  */
3072
3078
  reset() {
3073
3079
  Object.entries(Ue).forEach(([e, r]) => {
@@ -3076,10 +3082,21 @@ var Ue = {}, Ct = {
3076
3082
  },
3077
3083
  ///////////////////////////////////////////////////
3078
3084
  /**
3079
- * A helper function to retrieve a specific cache
3080
- * @alias cache.get
3081
- * @param {string} key The key for the cache you want to retrieve
3082
- * @return {LRUCache} The cache store for the specified key
3085
+ * Returns the cache with this name, creating it the first time. Later calls with the same name return the
3086
+ * same cache, whatever options they pass.
3087
+ * @alias cache.get
3088
+ * @param {String} key The cache's name.
3089
+ * @param {Object} [options] lru-cache options, used only when the cache is created. Default { max: 5 } (five entries).
3090
+ * @param {Number} [options.max] Maximum number of entries.
3091
+ * @param {Number} [options.ttl] Milliseconds before an entry expires.
3092
+ * @returns {LRUCache} An lru-cache instance: get(key), set(key, value), has(key), delete(key), clear().
3093
+ * @example
3094
+ * const cache = sdk.cache.get('people', { max: 500, ttl: 60000 });
3095
+ * let person = cache.get(id);
3096
+ * if (!person) {
3097
+ * person = await sdk.content.get(id);
3098
+ * cache.set(id, person);
3099
+ * }
3083
3100
  */
3084
3101
  get(e, r) {
3085
3102
  return r = r || { max: 5 }, Ue[e] || (Ue[e] = new qr(r)), Ue[e];
@@ -3102,9 +3119,9 @@ var Ue = {}, Ct = {
3102
3119
  }, r.getAllDescendants = function(a) {
3103
3120
  var n = /* @__PURE__ */ new Set();
3104
3121
  s(a);
3105
- function s(f) {
3106
- var c = e.utils.id(f);
3107
- n.add(c), (f.children || []).forEach(function(p) {
3122
+ function s(d) {
3123
+ var c = e.utils.id(d);
3124
+ n.add(c), (d.children || []).forEach(function(p) {
3108
3125
  s(p);
3109
3126
  });
3110
3127
  }
@@ -3116,127 +3133,127 @@ var Ue = {}, Ct = {
3116
3133
  if (n && t && t.key === n && Date.now() - t.at < i)
3117
3134
  return t.value;
3118
3135
  var s = /* @__PURE__ */ new Map();
3119
- for (var f in a?.permissions || {}) {
3120
- var c = a?.permissions[f], p = r.getAllDescendants(c);
3121
- (c.permissions || []).forEach(function(A) {
3122
- var u = s.get(A);
3123
- u || (u = /* @__PURE__ */ new Set(), s.set(A, u));
3136
+ for (var d in a?.permissions || {}) {
3137
+ var c = a?.permissions[d], p = r.getAllDescendants(c);
3138
+ (c.permissions || []).forEach(function(g) {
3139
+ var u = s.get(g);
3140
+ u || (u = /* @__PURE__ */ new Set(), s.set(g, u));
3124
3141
  for (var o = 0; o < p.length; o++)
3125
3142
  u.add(p[o]);
3126
3143
  });
3127
3144
  }
3128
- var w = {};
3129
- return s.forEach(function(A, u) {
3130
- w[u] = Array.from(A);
3131
- }), n && (t = { key: n, value: w, at: Date.now() }), w;
3145
+ var S = {};
3146
+ return s.forEach(function(g, u) {
3147
+ S[u] = Array.from(g);
3148
+ }), n && (t = { key: n, value: S, at: Date.now() }), S;
3132
3149
  }, r.allUserScopes = function(a) {
3133
3150
  var n = {}, s = a?.permissions || {};
3134
- function f(p) {
3151
+ function d(p) {
3135
3152
  if (p) {
3136
- var w = e.utils.id(p);
3137
- w && (n[w] = 1, p.children && p.children.length && p.children.forEach(function(A) {
3138
- f(A);
3153
+ var S = e.utils.id(p);
3154
+ S && (n[S] = 1, p.children && p.children.length && p.children.forEach(function(g) {
3155
+ d(g);
3139
3156
  }));
3140
3157
  }
3141
3158
  }
3142
3159
  for (var c in s)
3143
- f(s[c]);
3160
+ d(s[c]);
3144
3161
  return Object.keys(n);
3145
- }, r.actionableScopes = function(a, n, s, f, c) {
3162
+ }, r.actionableScopes = function(a, n, s, d, c) {
3146
3163
  c = c || {};
3147
3164
  var p = [];
3148
3165
  if (a?.userType == "administrator")
3149
3166
  p = r.allUserScopes(a, c);
3150
3167
  else {
3151
- var w = r.hashPermissions(a), A = s || f;
3152
- if (!A)
3168
+ var S = r.hashPermissions(a), g = s || d;
3169
+ if (!g)
3153
3170
  return p;
3154
- let u = s ? w[`${s}.${n}`] || [] : [], o = f ? w[`${f}.${n}`] || [] : [];
3171
+ let u = s ? S[`${s}.${n}`] || [] : [], o = d ? S[`${d}.${n}`] || [] : [];
3155
3172
  p = [...u, ...o];
3156
3173
  }
3157
3174
  return p || [];
3158
3175
  }, r.isOwner = function(a, n) {
3159
- var s = e.utils.id(a), f = e.utils.id(a?.persona), c = n.meta;
3176
+ var s = e.utils.id(a), d = e.utils.id(a?.persona), c = n.meta;
3160
3177
  if (!c)
3161
3178
  return !1;
3162
- var p = c.userOwners || [], w = e.utils.ids([...p, c.userAuthor]), A = e.utils.hash(w);
3163
- if (A[s])
3179
+ var p = c.userOwners || [], S = e.utils.ids([...p, c.userAuthor]), g = e.utils.hash(S);
3180
+ if (g[s])
3164
3181
  return !0;
3165
3182
  var u = c.personaOwners || [], o = e.utils.ids([
3166
3183
  ...u,
3167
3184
  c.personaAuthor
3168
- ]), m = e.utils.hash(o);
3169
- return m[f] ? !0 : r.isAssignee(a, n);
3185
+ ]), f = e.utils.hash(o);
3186
+ return f[d] ? !0 : r.isAssignee(a, n);
3170
3187
  }, r.isAssignee = function(a, n) {
3171
3188
  const s = e.utils.ids(a?.profiles);
3172
3189
  if (!s.length)
3173
3190
  return !1;
3174
- const f = e.utils.ids(n.assignees);
3175
- if (!f.length)
3191
+ const d = e.utils.ids(n.assignees);
3192
+ if (!d.length)
3176
3193
  return !1;
3177
- const c = new Set(f);
3178
- return !!s.filter((A) => c.has(A)).length;
3194
+ const c = new Set(d);
3195
+ return !!s.filter((g) => c.has(g)).length;
3179
3196
  }, r.allPermissions = function(a) {
3180
3197
  var n = Object.values(a?.permissions || {}).map(function(s) {
3181
3198
  return s.permissions;
3182
3199
  }).flat();
3183
3200
  return n;
3184
3201
  }, r.allPermissionTypes = function(a, n) {
3185
- return n ? r.allPermissions(a).reduce(function(s, f) {
3186
- var c = f.split(".")[0];
3202
+ return n ? r.allPermissions(a).reduce(function(s, d) {
3203
+ var c = d.split(".")[0];
3187
3204
  return s[c] = !0, s;
3188
3205
  }, {}) : r.allPermissions(a).map(function(s) {
3189
3206
  return s.split(".")[0];
3190
3207
  });
3191
3208
  }, r.canKnowOf = function(a, n, s) {
3192
3209
  return s = s || {}, s.cache = s.cache || {}, r.allPermissionTypes(a, !0)[n];
3193
- }, r.checkActionAccess = function(a, n, s, f, c) {
3210
+ }, r.checkActionAccess = function(a, n, s, d, c) {
3194
3211
  if (c = c || {}, c.cache = c.cache || {}, r.isAdministrator(a))
3195
3212
  return !0;
3196
- var p = n.meta?.type, w = n.meta?.definition || p;
3197
- if (!w)
3213
+ var p = n.meta?.type, S = n.meta?.definition || p;
3214
+ if (!S)
3198
3215
  return !1;
3199
- if ((s == "listany" || f == "listown") && p === "scope") {
3200
- var A = e.utils.id(n);
3201
- return !!a.permissions[A];
3216
+ if ((s == "listany" || d == "listown") && p === "scope") {
3217
+ var g = e.utils.id(n);
3218
+ return !!a.permissions[g];
3202
3219
  }
3203
3220
  var u = e.utils.ids(n.meta.scopes || []);
3204
3221
  p === "scope" && (u = [
3205
3222
  ...e.utils.ids(n.path || []),
3206
3223
  e.utils.id(n)
3207
3224
  ]);
3208
- var o, m = `access-${a?.cacheKey}-${s}-${w}-${p}`;
3209
- if (c.cache[m])
3210
- o = c.cache[m];
3225
+ var o, f = `access-${a?.cacheKey}-${s}-${S}-${p}`;
3226
+ if (c.cache[f])
3227
+ o = c.cache[f];
3211
3228
  else {
3212
- var h = e.utils.ids(
3213
- r.actionableScopes(a, s, w, p, c)
3229
+ var w = e.utils.ids(
3230
+ r.actionableScopes(a, s, S, p, c)
3214
3231
  );
3215
- o = e.utils.hash(h), c.cache[m] = o;
3232
+ o = e.utils.hash(w), c.cache[f] = o;
3216
3233
  }
3217
3234
  if (o) {
3218
- var d = u.some(function(T) {
3219
- return o[T];
3235
+ var m = u.some(function(k) {
3236
+ return o[k];
3220
3237
  });
3221
- if (d)
3238
+ if (m)
3222
3239
  return !0;
3223
3240
  }
3224
3241
  var l = r.isOwner(a, n);
3225
3242
  if (l) {
3226
- var v, S = `access-${a?.cacheKey}-${f}-${w}-${p}`;
3227
- if (c.cache[S])
3228
- v = c.cache[S];
3243
+ var v, b = `access-${a?.cacheKey}-${d}-${S}-${p}`;
3244
+ if (c.cache[b])
3245
+ v = c.cache[b];
3229
3246
  else {
3230
3247
  var O = e.utils.ids(
3231
- r.actionableScopes(a, f, w, p, c)
3248
+ r.actionableScopes(a, d, S, p, c)
3232
3249
  );
3233
- v = e.utils.hash(O), c.cache[S] = v;
3250
+ v = e.utils.hash(O), c.cache[b] = v;
3234
3251
  }
3235
3252
  if (v) {
3236
- var x = u.some(function(T) {
3237
- return v[T];
3253
+ var P = u.some(function(k) {
3254
+ return v[k];
3238
3255
  });
3239
- if (x)
3256
+ if (P)
3240
3257
  return !0;
3241
3258
  }
3242
3259
  }
@@ -3246,8 +3263,8 @@ var Ue = {}, Ct = {
3246
3263
  return !0;
3247
3264
  var s = r.hashPermissions(a);
3248
3265
  return s[n];
3249
- }, r.canCreate = function(a, n, s, f) {
3250
- if (f = f || {}, f.cache = f.cache || {}, r.isAdministrator(a))
3266
+ }, r.canCreate = function(a, n, s, d) {
3267
+ if (d = d || {}, d.cache = d.cache || {}, r.isAdministrator(a))
3251
3268
  return !0;
3252
3269
  var c = r.actionableScopes(
3253
3270
  a,
@@ -3258,40 +3275,40 @@ var Ue = {}, Ct = {
3258
3275
  return c.length;
3259
3276
  }, r.canListItem = function(a, n, s) {
3260
3277
  s = s || {}, s.cache = s.cache || {};
3261
- var f = r.checkActionAccess(
3278
+ var d = r.checkActionAccess(
3262
3279
  a,
3263
3280
  n,
3264
3281
  "listany",
3265
3282
  "listown",
3266
3283
  s
3267
3284
  );
3268
- if (f)
3285
+ if (d)
3269
3286
  return !0;
3270
3287
  var c = r.canViewItem(a, n, s);
3271
3288
  return !!c;
3272
3289
  }, r.canViewItem = function(a, n, s) {
3273
3290
  s = s || {}, s.cache = s.cache || {};
3274
- var f = r.checkActionAccess(
3291
+ var d = r.checkActionAccess(
3275
3292
  a,
3276
3293
  n,
3277
3294
  "viewany",
3278
- "viewOwn",
3295
+ "viewown",
3279
3296
  s
3280
3297
  );
3281
- if (f)
3298
+ if (d)
3282
3299
  return !0;
3283
3300
  var c = r.canEditItem(a, n, s);
3284
3301
  return !!c;
3285
3302
  }, r.canEditItem = function(a, n, s) {
3286
3303
  s = s || {}, s.cache = s.cache || {};
3287
- var f = r.checkActionAccess(
3304
+ var d = r.checkActionAccess(
3288
3305
  a,
3289
3306
  n,
3290
3307
  "editany",
3291
3308
  "editown",
3292
3309
  s
3293
3310
  );
3294
- return f;
3311
+ return d;
3295
3312
  }, r.canDeleteItem = function(a, n, s) {
3296
3313
  return s = s || {}, s.cache = s.cache || {}, r.checkActionAccess(
3297
3314
  a,
@@ -3318,7 +3335,7 @@ var Ue = {}, Ct = {
3318
3335
  );
3319
3336
  }, r;
3320
3337
  };
3321
- function It(e) {
3338
+ function Tt(e) {
3322
3339
  if (!e.api)
3323
3340
  throw new Error("Can't Instantiate QikContent before QikAPI exists");
3324
3341
  var r = {
@@ -3329,16 +3346,16 @@ function It(e) {
3329
3346
  let t;
3330
3347
  r.variables = async function(u, o) {
3331
3348
  o = o || {}, u = u || [];
3332
- var m = o.refresh || o.reload || !i.data;
3333
- if (m) {
3349
+ var f = o.refresh || o.reload || !i.data;
3350
+ if (f) {
3334
3351
  if (!t) {
3335
- let d = function() {
3352
+ let m = function() {
3336
3353
  t = null;
3337
3354
  };
3338
- t = e.api.post("/variables", { keys: u }), t.then(d, d);
3355
+ t = e.api.post("/variables", { keys: u }), t.then(m, m);
3339
3356
  }
3340
- const { data: h } = await t;
3341
- i.data = h, e.dispatch("variables", h);
3357
+ const { data: w } = await t;
3358
+ i.data = w, e.dispatch("variables", w);
3342
3359
  }
3343
3360
  return i.data;
3344
3361
  };
@@ -3349,41 +3366,41 @@ function It(e) {
3349
3366
  typeof requestIdleCallback == "function" ? requestIdleCallback(u, { timeout: 50 }) : setTimeout(u, 0);
3350
3367
  });
3351
3368
  }
3352
- async function f({ _s: u, _k: o, types: m }) {
3353
- function h(v) {
3369
+ async function d({ _s: u, _k: o, types: f }) {
3370
+ function w(v) {
3354
3371
  if (typeof v == "string" && v[0] === "~")
3355
3372
  return u[parseInt(v.slice(1))];
3356
- if (Array.isArray(v)) return v.map(h);
3373
+ if (Array.isArray(v)) return v.map(w);
3357
3374
  if (v && typeof v == "object") {
3358
- const S = {};
3359
- for (const [O, x] of Object.entries(v))
3360
- S[o[O] || O] = h(x);
3361
- return S;
3375
+ const b = {};
3376
+ for (const [O, P] of Object.entries(v))
3377
+ b[o[O] || O] = w(P);
3378
+ return b;
3362
3379
  }
3363
3380
  return v;
3364
3381
  }
3365
- const d = 50, l = [];
3366
- for (let v = 0; v < m.length; v += d) {
3367
- const S = m.slice(v, v + d);
3368
- l.push(...S.map(h)), v + d < m.length && await s();
3382
+ const m = 50, l = [];
3383
+ for (let v = 0; v < f.length; v += m) {
3384
+ const b = f.slice(v, v + m);
3385
+ l.push(...b.map(w)), v + m < f.length && await s();
3369
3386
  }
3370
3387
  return l;
3371
3388
  }
3372
3389
  r.glossary = async function(u) {
3373
3390
  u = u || {};
3374
- let o = a.get("glossary"), h = !!!u.uncompressed;
3375
- var d = u.refresh || u.reload || !o;
3376
- if (d) {
3391
+ let o = a.get("glossary"), w = !!!u.uncompressed;
3392
+ var m = u.refresh || u.reload || !o;
3393
+ if (m) {
3377
3394
  if (!n) {
3378
- let x = function() {
3395
+ let P = function() {
3379
3396
  n = null, r.loadingGlossary = !1;
3380
3397
  };
3381
3398
  r.loadingGlossary = !0;
3382
- const O = h ? "/glossary/compressed" : "/glossary";
3383
- n = e.api.get(O, { cache: !1 }), n.then(x, x);
3399
+ const O = w ? "/glossary/compressed" : "/glossary";
3400
+ n = e.api.get(O, { cache: !1 }), n.then(P, P);
3384
3401
  }
3385
- const { data: v } = await n, S = v._s && v._k && v.types ? await f(v) : v;
3386
- a.set("glossary", S), o = S, e.dispatch("glossary", S);
3402
+ const { data: v } = await n, b = v._s && v._k && v.types ? await d(v) : v;
3403
+ a.set("glossary", b), o = b, e.dispatch("glossary", b);
3387
3404
  }
3388
3405
  if (u.hash) {
3389
3406
  var l = e.utils.hash(o, "key");
@@ -3402,171 +3419,171 @@ function It(e) {
3402
3419
  var o = u.refresh || u.reload || !c.data;
3403
3420
  if (o) {
3404
3421
  if (!p) {
3405
- let d = function() {
3422
+ let m = function() {
3406
3423
  p = null;
3407
3424
  };
3408
3425
  p = e.api.get("/scope/glossary", {
3409
3426
  cache: !1
3410
- }), p.then(d, d);
3427
+ }), p.then(m, m);
3411
3428
  }
3412
- const { data: h } = await p;
3413
- c.data = h;
3429
+ const { data: w } = await p;
3430
+ c.data = w;
3414
3431
  }
3415
3432
  if (u.hash) {
3416
- var m = e.utils.hash(c.data, "_id");
3417
- return m;
3433
+ var f = e.utils.hash(c.data, "_id");
3434
+ return f;
3418
3435
  }
3419
3436
  return c.data;
3420
3437
  };
3421
- const w = {};
3438
+ const S = {};
3422
3439
  r.comparators = async function(u) {
3423
3440
  u = u || {};
3424
- var o = u.reload || u.refresh || !w.data;
3441
+ var o = u.reload || u.refresh || !S.data;
3425
3442
  if (o) {
3426
- const { data: m } = await e.api.get("/system/comparators");
3427
- m.available = {}, Object.entries(m.types).forEach(([h, d]) => {
3428
- m.available[h] = d.map(function(l) {
3429
- return m.hash[l];
3443
+ const { data: f } = await e.api.get("/system/comparators");
3444
+ f.available = {}, Object.entries(f.types).forEach(([w, m]) => {
3445
+ f.available[w] = m.map(function(l) {
3446
+ return f.hash[l];
3430
3447
  });
3431
- }), w.data = m;
3448
+ }), S.data = f;
3432
3449
  }
3433
- return w.data;
3450
+ return S.data;
3434
3451
  };
3435
- function A(u) {
3436
- var { minimum: o, maximum: m } = u;
3437
- return o = e.utils.parseInt(o), o = Math.max(o, 0), m = e.utils.parseInt(m), m = Math.max(m, 0), m == 0 || (m = Math.max(m, o)), { minimum: o, maximum: m };
3438
- }
3439
- return r.meetsValidationRequirements = function(u, o, m) {
3440
- if (m.minLength) {
3441
- var h = String(u).length;
3442
- if (h < m.minLength)
3443
- return `Must be at least ${m.minLength} characters`;
3452
+ function g(u) {
3453
+ var { minimum: o, maximum: f } = u;
3454
+ return o = e.utils.parseInt(o), o = Math.max(o, 0), f = e.utils.parseInt(f), f = Math.max(f, 0), f == 0 || (f = Math.max(f, o)), { minimum: o, maximum: f };
3455
+ }
3456
+ return r.meetsValidationRequirements = function(u, o, f) {
3457
+ if (f.minLength) {
3458
+ var w = String(u).length;
3459
+ if (w < f.minLength)
3460
+ return `Must be at least ${f.minLength} characters`;
3444
3461
  }
3445
- if (m.maxLength) {
3446
- var h = String(u).length;
3447
- if (h > m.maxLength)
3448
- return `Can be no more than ${m.maxLength} characters`;
3462
+ if (f.maxLength) {
3463
+ var w = String(u).length;
3464
+ if (w > f.maxLength)
3465
+ return `Can be no more than ${f.maxLength} characters`;
3449
3466
  }
3450
- if (m.minValue && u !== void 0) {
3451
- var d = Number(u);
3452
- if (d < m.minValue)
3453
- return `Must be at least ${m.minValue}`;
3467
+ if (f.minValue && u !== void 0) {
3468
+ var m = Number(u);
3469
+ if (m < f.minValue)
3470
+ return `Must be at least ${f.minValue}`;
3454
3471
  }
3455
- if (m.maxValue && u !== void 0) {
3456
- var d = Number(u);
3457
- if (d > m.maxValue)
3458
- return `Can be no greater than ${m.maxValue}`;
3472
+ if (f.maxValue && u !== void 0) {
3473
+ var m = Number(u);
3474
+ if (m > f.maxValue)
3475
+ return `Can be no greater than ${f.maxValue}`;
3459
3476
  }
3460
- }, r.validateField = function(u, o, m) {
3461
- m = m || {};
3462
- var h = o.type || "string", { minimum: d, maximum: l } = A(o), v = o.type == "group" && o.asObject, S = v ? d === l && l === 1 : l === 1, O = !S, x = e.utils.exists(u);
3463
- if (o.type === "boolean" && u !== !0 && (x = !1), d) {
3464
- if (!x)
3477
+ }, r.validateField = function(u, o, f) {
3478
+ f = f || {};
3479
+ var w = o.type || "string", { minimum: m, maximum: l } = g(o), v = o.type == "group" && o.asObject, b = v ? m === l && l === 1 : l === 1, O = !b, P = e.utils.exists(u);
3480
+ if (o.type === "boolean" && u !== !0 && (P = !1), m) {
3481
+ if (!P)
3465
3482
  return {
3466
3483
  valid: !1,
3467
3484
  message: `${o.title} is a required field`,
3468
3485
  status: 400
3469
3486
  };
3470
- } else if (!x)
3487
+ } else if (!P)
3471
3488
  return {
3472
3489
  valid: !0
3473
3490
  };
3474
3491
  if (O) {
3475
3492
  if (!Array.isArray(u))
3476
- return d ? {
3493
+ return m ? {
3477
3494
  valid: !1,
3478
- message: `${o.title} requires at least ${d} values`,
3495
+ message: `${o.title} requires at least ${m} values`,
3479
3496
  status: 400
3480
3497
  } : (console.log("NOT PROVIDED AS ARRAY", o.title, u), {
3481
3498
  valid: !1,
3482
3499
  message: `${o.title} must be provided as an array`,
3483
3500
  status: 400
3484
3501
  });
3485
- var T = u;
3486
- if (T = T.filter(function(k) {
3487
- var R = k == null || k === "";
3488
- return !R;
3489
- }), d == l && d && T.length != d)
3502
+ var k = u;
3503
+ if (k = k.filter(function(I) {
3504
+ var N = I == null || I === "";
3505
+ return !N;
3506
+ }), m == l && m && k.length != m)
3490
3507
  return {
3491
3508
  valid: !1,
3492
3509
  message: `${o.title} requires exactly ${l} values`,
3493
3510
  status: 400
3494
3511
  };
3495
- if (l && T.length > l)
3512
+ if (l && k.length > l)
3496
3513
  return {
3497
3514
  valid: !1,
3498
3515
  message: `${o.title} requires less than ${l + 1} values`,
3499
3516
  status: 400
3500
3517
  };
3501
- if (T.length < d)
3518
+ if (k.length < m)
3502
3519
  return {
3503
3520
  valid: !1,
3504
- message: `${o.title} requires at least ${d} values`,
3521
+ message: `${o.title} requires at least ${m} values`,
3505
3522
  status: 400
3506
3523
  };
3507
- var N;
3508
- if (T.find(function(k) {
3509
- var R = h;
3510
- o.type === "group" && (R = "object"), o.type === "reference" && o.widget === "form" && (R = "object");
3511
- var U = e.utils.isValidValue(
3512
- k,
3513
- R,
3514
- m.strict
3524
+ var L;
3525
+ if (k.find(function(I) {
3526
+ var N = w;
3527
+ o.type === "group" && (N = "object"), o.type === "reference" && o.widget === "form" && (N = "object");
3528
+ var $ = e.utils.isValidValue(
3529
+ I,
3530
+ N,
3531
+ f.strict
3515
3532
  );
3516
- if (!U)
3517
- return N = !0, !0;
3533
+ if (!$)
3534
+ return L = !0, !0;
3518
3535
  if (o.validation) {
3519
3536
  var z = r.meetsValidationRequirements(
3520
- k,
3521
- h,
3537
+ I,
3538
+ w,
3522
3539
  o.validation
3523
3540
  );
3524
3541
  if (z)
3525
- return N = !0, !0;
3542
+ return L = !0, !0;
3526
3543
  }
3527
- }), N)
3544
+ }), L)
3528
3545
  return {
3529
3546
  valid: !1,
3530
3547
  message: `Invalid input for ${o.title}`,
3531
3548
  status: 400
3532
3549
  };
3533
3550
  } else {
3534
- var M = h, V = o.widget;
3535
- M === "group" && (M = "object"), M === "reference" && V === "form" && (M = "object");
3536
- var $ = r.getCleanedValue(u, M, m), L = e.utils.isValidValue(
3537
- $,
3538
- M,
3539
- m.strict
3551
+ var R = w, j = o.widget;
3552
+ R === "group" && (R = "object"), R === "reference" && j === "form" && (R = "object");
3553
+ var U = r.getCleanedValue(u, R, f), x = e.utils.isValidValue(
3554
+ U,
3555
+ R,
3556
+ f.strict
3540
3557
  );
3541
- if (!L)
3558
+ if (!x)
3542
3559
  return {
3543
3560
  valid: !1,
3544
- message: `Single value '${u}' is not a valid ${M} for ${o.title}`,
3561
+ message: `Single value '${u}' is not a valid ${R} for ${o.title}`,
3545
3562
  criteria: {
3546
- isValidValue: L,
3547
- cleanedValue: $,
3548
- fieldType: h,
3549
- options: m
3563
+ isValidValue: x,
3564
+ cleanedValue: U,
3565
+ fieldType: w,
3566
+ options: f
3550
3567
  },
3551
3568
  status: 400
3552
3569
  };
3553
- let k = !1;
3554
- const R = {};
3555
- if (String(o.minValue) && (R.minValue = parseInt(o.minValue), k = !0), String(o.maxValue) && (R.maxValue = parseInt(o.maxValue), k = !0), String(o.minLength) && (R.minLength = parseInt(o.minLength), k = !0), String(o.maxLength) && (R.maxLength = parseInt(o.maxLength), k = !0), k) {
3556
- const U = Object.assign(
3570
+ let I = !1;
3571
+ const N = {};
3572
+ if (String(o.minValue) && (N.minValue = parseInt(o.minValue), I = !0), String(o.maxValue) && (N.maxValue = parseInt(o.maxValue), I = !0), String(o.minLength) && (N.minLength = parseInt(o.minLength), I = !0), String(o.maxLength) && (N.maxLength = parseInt(o.maxLength), I = !0), I) {
3573
+ const $ = Object.assign(
3557
3574
  {},
3558
- R,
3575
+ N,
3559
3576
  o.validation || {}
3560
3577
  );
3561
- var F = r.meetsValidationRequirements(
3578
+ var T = r.meetsValidationRequirements(
3562
3579
  u,
3563
- h,
3564
- U
3580
+ w,
3581
+ $
3565
3582
  );
3566
- if (F)
3583
+ if (T)
3567
3584
  return {
3568
3585
  valid: !1,
3569
- message: F,
3586
+ message: T,
3570
3587
  status: 400
3571
3588
  };
3572
3589
  }
@@ -3574,8 +3591,8 @@ function It(e) {
3574
3591
  return {
3575
3592
  valid: !0
3576
3593
  };
3577
- }, r.getCleanedValue = function(u, o, m) {
3578
- switch (o) {
3594
+ }, r.getCleanedValue = function(u, o, f) {
3595
+ switch (f = f || {}, o) {
3579
3596
  case "number":
3580
3597
  case "float":
3581
3598
  case "decimal":
@@ -3585,66 +3602,75 @@ function It(e) {
3585
3602
  case "boolean":
3586
3603
  return e.utils.exists(u) ? e.utils.parseBoolean(u) : void 0;
3587
3604
  case "email":
3588
- return m.strict ? u : String(u).toLowerCase();
3605
+ return f.strict ? u : String(u).toLowerCase();
3589
3606
  case "reference":
3590
- return m.strict ? u : e.utils.id(u);
3607
+ return f.strict ? u : e.utils.id(u);
3591
3608
  default:
3592
- return m.strict ? u : e.utils.cleanValue(u, o, m);
3609
+ return f.strict ? u : e.utils.cleanValue(u, o, f);
3593
3610
  }
3594
3611
  return u;
3595
- }, r.list = async function(u, o, m) {
3596
- m || (m = {});
3597
- const h = m.remoteURL || `/content/${u}/list`;
3598
- if (m.cancellable) {
3599
- m.config || (m.config = {});
3612
+ }, r.list = async function(u, o, f) {
3613
+ f || (f = {});
3614
+ const w = f.remoteURL || `/content/${u}/list`;
3615
+ if (f.cancellable) {
3616
+ f.config || (f.config = {});
3600
3617
  const l = e.api.CancelToken.source();
3601
- return m.config.cancelToken = l.token, {
3602
- promise: e.api.post(h, o, m.config),
3603
- cancel(S) {
3604
- l.cancel(S || "Operation canceled by the user.");
3618
+ return f.config.cancelToken = l.token, {
3619
+ promise: e.api.post(w, o, f.config),
3620
+ cancel(b) {
3621
+ l.cancel(b || "Operation canceled by the user.");
3605
3622
  }
3606
3623
  };
3607
3624
  } else {
3608
- const { data: d } = await e.api.post(h, o, m.config);
3609
- return d;
3625
+ const { data: m } = await e.api.post(w, o, f.config);
3626
+ return m;
3610
3627
  }
3611
3628
  }, r.create = async function(u, o) {
3612
- const m = { ...o };
3613
- m.meta?.scopes && (m.meta.scopes = e.utils.ids(m.meta.scopes));
3614
- const { data: h } = await e.api.post(`/content/${u}/create`, m);
3615
- return h;
3629
+ const f = { ...o };
3630
+ f.meta?.scopes && (f.meta = {
3631
+ ...f.meta,
3632
+ scopes: e.utils.ids(f.meta.scopes)
3633
+ });
3634
+ const { data: w } = await e.api.post(`/content/${u}/create`, f);
3635
+ return w;
3616
3636
  }, r.update = async function(u, o) {
3617
3637
  u = e.utils.id(u);
3618
- const m = { ...o };
3619
- m.meta?.scopes && (m.meta.scopes = e.utils.ids(m.meta.scopes));
3620
- const { data: h } = await e.api.put(`/content/${u}`, m);
3621
- return h;
3638
+ const f = { ...o };
3639
+ f.meta?.scopes && (f.meta = {
3640
+ ...f.meta,
3641
+ scopes: e.utils.ids(f.meta.scopes)
3642
+ });
3643
+ const { data: w } = await e.api.put(`/content/${u}`, f);
3644
+ return w;
3622
3645
  }, r.patch = async function(u, o) {
3623
3646
  u = e.utils.id(u);
3624
- const m = { ...o };
3625
- m.meta?.scopes && (m.meta.scopes = e.utils.ids(m.meta.scopes));
3626
- const { data: h } = await e.api.patch(`/content/${u}`, m);
3627
- return h;
3647
+ const f = { ...o };
3648
+ f.meta?.scopes && (f.meta = {
3649
+ ...f.meta,
3650
+ scopes: e.utils.ids(f.meta.scopes)
3651
+ });
3652
+ const { data: w } = await e.api.patch(`/content/${u}`, f);
3653
+ return w;
3628
3654
  }, r.get = async function(u, o) {
3629
3655
  u = e.utils.id(u), o = o || {};
3630
- const { data: m } = await e.api.get(`/content/${u}`, o);
3631
- return m;
3656
+ const { data: f } = await e.api.get(`/content/${u}`, o);
3657
+ return f;
3632
3658
  }, r.getFromID = async function(u) {
3633
3659
  return r.get(u);
3634
3660
  }, r.delete = async function(u, o) {
3635
3661
  u = e.utils.id(u);
3636
- const { data: m } = await e.api.delete(`/content/${u}`, o);
3637
- return m;
3662
+ const { data: f } = await e.api.delete(`/content/${u}`, o);
3663
+ return f;
3638
3664
  }, r.restore = async function(u, o) {
3639
3665
  u = e.utils.id(u);
3640
- const { data: m } = await e.api.get(`/content/${u}/restore`, o);
3641
- return m;
3666
+ const { data: f } = await e.api.get(`/content/${u}/restore`, o);
3667
+ return f;
3642
3668
  }, r.getFromSlug = async function(u) {
3643
3669
  const { data: o } = await e.api.get(`/content/slug/${u}`);
3644
3670
  return o;
3645
3671
  }, r;
3646
3672
  }
3647
- function Tt(e) {
3673
+ function Rt(e) {
3648
3674
  var r = {}, i;
3649
3675
  return r.countries = async function() {
3650
3676
  return i || (i = new Promise(async function(t, a) {
@@ -3660,10 +3686,10 @@ function kt(e) {
3660
3686
  return !(typeof window > "u" || !window.navigator || !window.navigator.geolocation);
3661
3687
  }
3662
3688
  return r.distance = function({ lat: t, lon: a }, { lat: n, lon: s }) {
3663
- function f(m) {
3664
- return m * (Math.PI / 180);
3689
+ function d(f) {
3690
+ return f * (Math.PI / 180);
3665
3691
  }
3666
- var c = 6371e3, p = f(n - t), w = f(s - a), A = Math.sin(p / 2) * Math.sin(p / 2) + Math.cos(f(t)) * Math.cos(f(n)) * Math.sin(w / 2) * Math.sin(w / 2), u = 2 * Math.atan2(Math.sqrt(A), Math.sqrt(1 - A)), o = c * u;
3692
+ var c = 6371e3, p = d(n - t), S = d(s - a), g = Math.sin(p / 2) * Math.sin(p / 2) + Math.cos(d(t)) * Math.cos(d(n)) * Math.sin(S / 2) * Math.sin(S / 2), u = 2 * Math.atan2(Math.sqrt(g), Math.sqrt(1 - g)), o = c * u;
3667
3693
  return o;
3668
3694
  }, r.getPosition = async function() {
3669
3695
  return i() ? (console.log("qik:geo: getting location"), new Promise(function(t, a) {
@@ -3677,9 +3703,9 @@ function kt(e) {
3677
3703
  });
3678
3704
  })) : Promise.reject({ message: "Geolocation is not enabled" });
3679
3705
  }, r.stopWatchPosition = async function(t) {
3680
- return i() ? (console.log("qik:geo: watch stopped"), navigator.geolocation.clearWatch(this.watchID), !0) : Promise.reject({ message: "Geolocation is not enabled" });
3706
+ return i() ? (console.log("qik:geo: watch stopped"), navigator.geolocation.clearWatch(t), !0) : Promise.reject({ message: "Geolocation is not enabled" });
3681
3707
  }, r.getDefaultTimezone = function() {
3682
- const { session: t } = e.auth.getCurrentUser();
3708
+ const t = e.auth.getCurrentUser()?.session;
3683
3709
  if (t) {
3684
3710
  const a = t?.organisation?.timezone;
3685
3711
  if (a)
@@ -4384,7 +4410,7 @@ function kt(e) {
4384
4410
  "Pacific/Wake",
4385
4411
  "Pacific/Wallis"
4386
4412
  ], r.getDefaultCountry = function() {
4387
- const { session: t } = e.auth.getCurrentUser();
4413
+ const t = e.auth.getCurrentUser()?.session;
4388
4414
  if (t) {
4389
4415
  const a = t?.organisation?.countryCode;
4390
4416
  if (a) {
@@ -4397,7 +4423,7 @@ function kt(e) {
4397
4423
  }
4398
4424
  }, r;
4399
4425
  }
4400
- const Rt = function(e, r) {
4426
+ const It = function(e, r) {
4401
4427
  if (r = r || "production", !e.auth)
4402
4428
  throw new Error("Can't Instantiate QikSocket before QikAuth exists");
4403
4429
  const i = e.utils.guid();
@@ -4407,64 +4433,84 @@ const Rt = function(e, r) {
4407
4433
  connected: !1,
4408
4434
  windowID: i,
4409
4435
  autoreconnect: !0
4410
- }, a, n = {};
4411
- const s = {}, f = new De();
4412
- f.bootstrap(t), t.channel = async function(h) {
4413
- if (n[h])
4414
- return n[h];
4415
- const d = new De();
4416
- function l(v) {
4417
- d.dispatch("message", v);
4436
+ }, a, n, s, d = 0, c = [], p = !1, S = {};
4437
+ const g = {}, u = 1e3, o = 3e4, f = new De();
4438
+ f.bootstrap(t), t.channel = async function(x) {
4439
+ if (S[x])
4440
+ return S[x];
4441
+ const T = new De();
4442
+ function I(N) {
4443
+ T.dispatch("message", N);
4418
4444
  }
4419
- return d.destroy = function() {
4420
- t.removeEventListener(h, l), t.unsubscribe(h), d.removeAllListeners(), delete n[h];
4421
- }, n[h] = d, t.connected || await t.connect(), t.subscribe(h), t.addEventListener(h, l), n[h];
4445
+ return T.destroy = function() {
4446
+ t.removeEventListener(x, I), t.unsubscribe(x), T.removeAllListeners(), delete S[x];
4447
+ }, S[x] = T, t.connected || await t.connect(), t.subscribe(x), t.addEventListener(x, I), S[x];
4422
4448
  };
4423
- function c(h) {
4424
- t.debug && console.log("[socket] Connection open", h), t.connected = !0, f.dispatch("connected", h), Object.keys(s).forEach(function(d) {
4425
- u({
4426
- action: "subscribe",
4427
- channel: d
4428
- });
4429
- });
4430
- }
4431
- async function p(h) {
4432
- h.wasClean ? t.debug && console.log(`[socket] Connection closed cleanly, code=${h.code} reason=${h.reason}`) : t.debug && console.log("[socket] - connection closed due to error", h), t.connected = !1, f.dispatch("disconnected", h), a = null, t.autoreconnect && t.reconnect();
4449
+ function w(x) {
4450
+ t.debug && console.log("[socket] Connection open", x), t.connected = !0, d = 0, f.dispatch("connected", x), L(Object.keys(g));
4433
4451
  }
4434
- function w(h) {
4435
- console.log("[event] socketError", event), t.debug && console.log("[socket] Error", h), f.dispatch("error", h);
4452
+ async function m(x) {
4453
+ x.wasClean ? t.debug && console.log(`[socket] Connection closed cleanly, code=${x.code} reason=${x.reason}`) : t.debug && console.log("[socket] - connection closed due to error", x), t.connected = !1, f.dispatch("disconnected", x), a = null, t.autoreconnect && l();
4436
4454
  }
4437
- function A(h) {
4438
- const d = JSON.parse(h.data);
4439
- t.debug && console.log("[socket] message received", d), f.dispatch("message", d), d.channel && f.dispatch(d.channel, d);
4455
+ function l() {
4456
+ if (s)
4457
+ return;
4458
+ const x = Math.min(o, u * Math.pow(2, d)), T = Math.round(x * (0.5 + Math.random() / 2));
4459
+ d++, t.debug && console.log(`[socket] reconnecting in ${T}ms`), s = setTimeout(function() {
4460
+ s = null, t.reconnect();
4461
+ }, T);
4462
+ }
4463
+ function v(x) {
4464
+ console.log("[event] socketError", x), t.debug && console.log("[socket] Error", x), f.dispatch("error", x);
4465
+ }
4466
+ function b(x) {
4467
+ const T = JSON.parse(x.data);
4468
+ t.debug && console.log("[socket] message received", T), f.dispatch("message", T), T.channel && f.dispatch(T.channel, T);
4469
+ const I = T.message;
4470
+ I && I.type === "session" && I.action === "changed" && Promise.resolve(e.auth.sync({ keepOnError: !0 })).catch(function() {
4471
+ });
4440
4472
  }
4441
- async function u(h) {
4473
+ async function O(x) {
4442
4474
  if (!a || a.readyState !== WebSocket.OPEN) {
4443
- t.debug && console.log("[socket] - frame dropped, socket not open", h);
4475
+ t.debug && console.log("[socket] - frame dropped, socket not open", x);
4444
4476
  return;
4445
4477
  }
4446
- a.send(JSON.stringify(h));
4447
- }
4448
- function o() {
4449
- return new Promise(function(h) {
4450
- function d() {
4451
- if (t.connected)
4452
- return h(a);
4453
- setTimeout(d, 1e3);
4478
+ a.send(JSON.stringify(x));
4479
+ }
4480
+ function P() {
4481
+ return t.connected ? Promise.resolve(a) : new Promise(function(x) {
4482
+ function T() {
4483
+ t.removeEventListener("connected", T), x(a);
4454
4484
  }
4455
- d();
4485
+ t.addEventListener("connected", T);
4456
4486
  });
4457
4487
  }
4458
4488
  t.connect = async function() {
4459
4489
  if (a)
4460
- return a.connected ? (console.log("[socket] - Socket is already connected"), a) : o();
4461
- const h = e.auth.getCurrentToken();
4462
- if (!h) {
4490
+ return a.connected ? (console.log("[socket] - Socket is already connected"), a) : P();
4491
+ if (n)
4492
+ return n;
4493
+ n = k();
4494
+ try {
4495
+ return await n;
4496
+ } finally {
4497
+ n = null;
4498
+ }
4499
+ };
4500
+ async function k() {
4501
+ try {
4502
+ await e.auth.ensureValidToken();
4503
+ } catch (T) {
4504
+ t.debug && console.log("[socket] - could not refresh token before connecting", T);
4505
+ }
4506
+ const x = e.auth.getCurrentToken();
4507
+ if (!x) {
4463
4508
  t.debug && console.log("[socket] - Must be authenticated to connect to socket");
4464
4509
  return;
4465
4510
  }
4466
- return a = new WebSocket(`${t.url}?access_token=${h}&windowid=${i}`), a.addEventListener("close", p), a.addEventListener("error", w), a.addEventListener("open", c), a.addEventListener("message", A), t.debug && console.log("[socket] - Connected with event listeners"), o();
4467
- }, t.reconnect = async function() {
4511
+ return a = new WebSocket(`${t.url}?access_token=${x}&windowid=${i}`), a.addEventListener("close", m), a.addEventListener("error", v), a.addEventListener("open", w), a.addEventListener("message", b), t.debug && console.log("[socket] - Connected with event listeners"), P();
4512
+ }
4513
+ t.reconnect = async function() {
4468
4514
  if (!t.connected)
4469
4515
  return t.debug && console.log("[socket] reconnecting..."), await t.connect();
4470
4516
  }, t.close = async function() {
@@ -4472,31 +4518,50 @@ const Rt = function(e, r) {
4472
4518
  console.log("[socket] - Socket is not connected");
4473
4519
  return;
4474
4520
  }
4475
- const h = t.autoreconnect;
4476
- t.autoreconnect = !1, a.close(), a.removeEventListener("close", p), a.removeEventListener("error", w), a.removeEventListener("open", c), a.removeEventListener("message", A), a = null, p({ wasClean: !0 }), t.autoreconnect = h;
4477
- }, t.disconnect = t.close, t.subscribe = async function(h) {
4521
+ s && (clearTimeout(s), s = null);
4522
+ const x = t.autoreconnect;
4523
+ t.autoreconnect = !1, a.close(), a.removeEventListener("close", m), a.removeEventListener("error", v), a.removeEventListener("open", w), a.removeEventListener("message", b), a = null, m({ wasClean: !0 }), t.autoreconnect = x;
4524
+ }, t.disconnect = t.close;
4525
+ function L(x) {
4526
+ x.forEach(function(T) {
4527
+ c.includes(T) || c.push(T);
4528
+ }), !p && (p = !0, setTimeout(R, 0));
4529
+ }
4530
+ function R() {
4531
+ p = !1;
4532
+ const x = c.filter(function(T) {
4533
+ return g[T];
4534
+ });
4535
+ c = [], x.length && (x.length === 1 ? O({ action: "subscribe", channel: x[0] }) : O({ action: "subscribe", channels: x }));
4536
+ }
4537
+ t.subscribe = async function(x) {
4478
4538
  if (!a) {
4479
4539
  console.log("[socket] - Can't subscribe to channel as socket is not connected");
4480
4540
  return;
4481
4541
  }
4482
- u({
4483
- action: "subscribe",
4484
- channel: h
4485
- }), s[h] = !0, f.dispatch("subscribe", h), t.debug && console.log(`[socket] - subscribed to ${h}`);
4486
- }, t.unsubscribe = async function(h) {
4542
+ g[x] = !0, L([x]), f.dispatch("subscribe", x), t.debug && console.log(`[socket] - subscribed to ${x}`);
4543
+ }, t.unsubscribe = async function(x) {
4487
4544
  if (!a) {
4488
4545
  console.log("[socket] - Can't unsubscribe from channel as socket is not connected");
4489
4546
  return;
4490
4547
  }
4491
- u({
4548
+ O({
4492
4549
  action: "unsubscribe",
4493
- channel: h
4494
- }), delete s[h], f.dispatch("unsubscribe", h), t.debug && console.log(`[socket] - unsubscribed from ${h}`);
4550
+ channel: x
4551
+ }), delete g[x], f.dispatch("unsubscribe", x), t.debug && console.log(`[socket] - unsubscribed from ${x}`);
4495
4552
  };
4496
- let m = e.utils.id(e.auth.getCurrentUser()?.organisation);
4497
- return e.auth.addEventListener("change", async function(h) {
4498
- const d = e.utils.id(h?.organisation);
4499
- d !== m && (m = d, a && (t.debug && console.log("[socket] - organisation changed, reconnecting"), await t.close(), await t.reconnect()));
4553
+ function j(x) {
4554
+ const T = x && x.session;
4555
+ return T ? [
4556
+ e.utils.id(T.organisation),
4557
+ e.utils.id(T.persona),
4558
+ e.utils.id(T._id)
4559
+ ].join("|") : "";
4560
+ }
4561
+ let U = j(e.auth.getCurrentUser());
4562
+ return e.auth.addEventListener("change", async function(x) {
4563
+ const T = j(x);
4564
+ T !== U && (U = T, a && (t.debug && console.log("[socket] - signed-in identity changed, reconnecting"), await t.close(), await t.reconnect()));
4500
4565
  }), t;
4501
4566
  };
4502
4567
  function Ft(e) {
@@ -4523,7 +4588,7 @@ function Ft(e) {
4523
4588
  value: Ct,
4524
4589
  writable: !1
4525
4590
  });
4526
- const t = I;
4591
+ const t = _;
4527
4592
  Object.defineProperty(r, "utils", {
4528
4593
  value: t,
4529
4594
  writable: !1
@@ -4535,14 +4600,14 @@ function Ft(e) {
4535
4600
  Object.defineProperty(r, "files", {
4536
4601
  value: n,
4537
4602
  writable: !1
4538
- }), new De().bootstrap(r), r.error = function(m) {
4539
- return r.dispatch("error", t.errorMessage(m));
4540
- }, r.notify = function(m, h) {
4541
- return r.dispatch("notification", { message: m, options: h });
4603
+ }), new De().bootstrap(r), r.error = function(f) {
4604
+ return r.dispatch("error", t.errorMessage(f));
4605
+ }, r.notify = function(f, w) {
4606
+ return r.dispatch("notification", { message: f, options: w });
4542
4607
  };
4543
- const f = new mt(r);
4608
+ const d = new mt(r);
4544
4609
  Object.defineProperty(r, "api", {
4545
- value: f,
4610
+ value: d,
4546
4611
  writable: !1
4547
4612
  });
4548
4613
  const c = new Pt(r);
@@ -4550,19 +4615,19 @@ function Ft(e) {
4550
4615
  value: c,
4551
4616
  writable: !1
4552
4617
  });
4553
- const p = new Rt(r);
4618
+ const p = new It(r);
4554
4619
  Object.defineProperty(r, "socket", {
4555
4620
  value: p,
4556
4621
  writable: !1
4557
4622
  });
4558
- const w = new Mt(r);
4623
+ const S = new Mt(r);
4559
4624
  Object.defineProperty(r, "access", {
4560
- value: w,
4625
+ value: S,
4561
4626
  writable: !1
4562
4627
  });
4563
- const A = new Tt(r);
4628
+ const g = new Rt(r);
4564
4629
  Object.defineProperty(r, "system", {
4565
- value: A,
4630
+ value: g,
4566
4631
  writable: !1
4567
4632
  });
4568
4633
  const u = new kt(r);
@@ -4570,7 +4635,7 @@ function Ft(e) {
4570
4635
  value: u,
4571
4636
  writable: !1
4572
4637
  });
4573
- const o = new It(r);
4638
+ const o = new Tt(r);
4574
4639
  return Object.defineProperty(r, "content", {
4575
4640
  value: o,
4576
4641
  writable: !1