bt-core-app 1.4.92 → 1.4.94
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/bt-core-app.js +904 -898
- package/dist/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/bt-core-app.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ref as z, shallowRef as
|
|
2
|
-
import { watchArray as Or, useStorage as Zt, useEventListener as me, toValue as
|
|
1
|
+
import { ref as z, shallowRef as Ne, computed as ee, toValue as Q, watch as Te, toRef as Yt, onMounted as Xr } from "vue";
|
|
2
|
+
import { watchArray as Or, useStorage as Zt, useEventListener as me, toValue as Ee, useParentElement as Jt, useResizeObserver as jt, useArrayUnique as Kt, useArrayDifference as Gr, watchDebounced as Qt, tryOnMounted as Xt } from "@vueuse/core";
|
|
3
3
|
import { defineStore as pr } from "pinia";
|
|
4
4
|
import { DateTime as he } from "luxon";
|
|
5
|
-
import { useRouter as
|
|
5
|
+
import { useRouter as Lr, useRoute as et } from "vue-router";
|
|
6
6
|
function Ot(e) {
|
|
7
7
|
return (e || "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx").replace(/[xy]/g, pt);
|
|
8
8
|
}
|
|
@@ -11,8 +11,8 @@ function pt(e) {
|
|
|
11
11
|
return (e == "x" ? t : t & 3 | 8).toString(16);
|
|
12
12
|
}
|
|
13
13
|
function en(e) {
|
|
14
|
-
const t = z([]), l =
|
|
15
|
-
function
|
|
14
|
+
const t = z([]), l = Ne(), S = Ne(), s = Ne(), g = ee(() => l.value != null);
|
|
15
|
+
function D(d) {
|
|
16
16
|
t.value = t.value.filter((h) => h.id != d);
|
|
17
17
|
}
|
|
18
18
|
function P(d) {
|
|
@@ -25,7 +25,7 @@ function en(e) {
|
|
|
25
25
|
function _(d) {
|
|
26
26
|
d != null && (S.value = d.toString());
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function M() {
|
|
29
29
|
S.value = void 0;
|
|
30
30
|
}
|
|
31
31
|
async function $(d, h) {
|
|
@@ -44,7 +44,7 @@ function en(e) {
|
|
|
44
44
|
_(u.errorMsg ?? I ?? "error");
|
|
45
45
|
}
|
|
46
46
|
} finally {
|
|
47
|
-
|
|
47
|
+
D(r);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
return Or(t, (d) => {
|
|
@@ -53,17 +53,17 @@ function en(e) {
|
|
|
53
53
|
actionErrorMsg: S,
|
|
54
54
|
actionLoadingMsg: l,
|
|
55
55
|
actionCompleteMsg: s,
|
|
56
|
-
clearErrors:
|
|
56
|
+
clearErrors: M,
|
|
57
57
|
doAction: $,
|
|
58
58
|
isLoading: g,
|
|
59
59
|
logError: _
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
|
-
var
|
|
62
|
+
var Xe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
63
63
|
function rn(e) {
|
|
64
64
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
65
65
|
}
|
|
66
|
-
var
|
|
66
|
+
var Re = function() {
|
|
67
67
|
function e(s) {
|
|
68
68
|
return s;
|
|
69
69
|
}
|
|
@@ -72,17 +72,17 @@ var Ue = function() {
|
|
|
72
72
|
}
|
|
73
73
|
function l(s, g) {
|
|
74
74
|
if (g = typeof g == "object" ? g : { direction: g }, typeof s != "function") {
|
|
75
|
-
var
|
|
75
|
+
var D = s;
|
|
76
76
|
s = function(d) {
|
|
77
|
-
return d[
|
|
77
|
+
return d[D] ? d[D] : "";
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
80
|
if (s.length === 1) {
|
|
81
|
-
var P = s, _ = g.ignoreCase ? t : e,
|
|
81
|
+
var P = s, _ = g.ignoreCase ? t : e, M = g.cmp || function(d, h) {
|
|
82
82
|
return d < h ? -1 : d > h ? 1 : 0;
|
|
83
83
|
};
|
|
84
84
|
s = function(d, h) {
|
|
85
|
-
return
|
|
85
|
+
return M(_(P(d)), _(P(h)));
|
|
86
86
|
};
|
|
87
87
|
}
|
|
88
88
|
const $ = { "-1": "", desc: "" };
|
|
@@ -91,14 +91,14 @@ var Ue = function() {
|
|
|
91
91
|
} : s;
|
|
92
92
|
}
|
|
93
93
|
function S(s, g) {
|
|
94
|
-
var
|
|
95
|
-
return
|
|
94
|
+
var D = typeof this == "function" && !this.firstBy ? this : !1, P = l(s, g), _ = D ? function(M, $) {
|
|
95
|
+
return D(M, $) || P(M, $);
|
|
96
96
|
} : P;
|
|
97
97
|
return _.thenBy = S, _;
|
|
98
98
|
}
|
|
99
99
|
return S.firstBy = S, S;
|
|
100
100
|
}();
|
|
101
|
-
function
|
|
101
|
+
function Ue(e, t) {
|
|
102
102
|
let l = e ?? "", S = t ?? "";
|
|
103
103
|
if (l.endsWith("/"))
|
|
104
104
|
do
|
|
@@ -170,8 +170,8 @@ async function pn(e, t = !0) {
|
|
|
170
170
|
s.setAttribute("crossOrigin", "anonymous"), s.onload = function() {
|
|
171
171
|
var g = document.createElement("canvas");
|
|
172
172
|
g.width = this.width, g.height = this.height;
|
|
173
|
-
var
|
|
174
|
-
|
|
173
|
+
var D = g.getContext("2d");
|
|
174
|
+
D == null || D.drawImage(this, 0, 0), l(g.toDataURL("image/png"));
|
|
175
175
|
}, s.onerror = function() {
|
|
176
176
|
console.log("errr"), t ? S("image could not be loaded for some reason") : l(null);
|
|
177
177
|
}, e != null && (s.src = e);
|
|
@@ -189,7 +189,7 @@ function ea(e) {
|
|
|
189
189
|
function nn(e) {
|
|
190
190
|
return e == null ? e : e.replace(/\w\S*/g, (t) => t.replace(/^\w/, (l) => l.toUpperCase()));
|
|
191
191
|
}
|
|
192
|
-
const
|
|
192
|
+
const Ze = [
|
|
193
193
|
{ value: 1, short: "sun", values: ["sun", "sunday"] },
|
|
194
194
|
{ value: 2, short: "mon", values: ["mon", "monday"] },
|
|
195
195
|
{ value: 3, short: "tue", values: ["tue", "tues", "tuesday"] },
|
|
@@ -202,33 +202,33 @@ const Ye = [
|
|
|
202
202
|
function ra(e) {
|
|
203
203
|
if (e == null)
|
|
204
204
|
return 0;
|
|
205
|
-
const t = e.replaceAll(" ", "").split(",").map((S) => S.toLowerCase()), l =
|
|
205
|
+
const t = e.replaceAll(" ", "").split(",").map((S) => S.toLowerCase()), l = Ze.filter((S) => S.values.some((s) => t.some((g) => s == g))).map((S) => S.value);
|
|
206
206
|
return l.length == 0 ? 8 : Math.min(...l);
|
|
207
207
|
}
|
|
208
208
|
function ta(e) {
|
|
209
209
|
return e == null ? e : e.toLowerCase().replaceAll(" ", "").split(",").map((t) => {
|
|
210
|
-
let l =
|
|
210
|
+
let l = Ze.find((S) => S.values.some((s) => s == t));
|
|
211
211
|
return l != null ? l.short : "";
|
|
212
212
|
}).filter((t) => t != null && t.length > 0).toString();
|
|
213
213
|
}
|
|
214
214
|
function na(e, t) {
|
|
215
215
|
if (e == null || t == null)
|
|
216
216
|
return !0;
|
|
217
|
-
const l = e.replaceAll(" ", "").split(",").map((g) => g.toLowerCase()), S = t.replaceAll(" ", "").toLowerCase(), s =
|
|
218
|
-
return s != null && l.some((g) => g == s.short || s.values.some((
|
|
217
|
+
const l = e.replaceAll(" ", "").split(",").map((g) => g.toLowerCase()), S = t.replaceAll(" ", "").toLowerCase(), s = Ze.find((g) => g.values.some((D) => D == S));
|
|
218
|
+
return s != null && l.some((g) => g == s.short || s.values.some((D) => D == g));
|
|
219
219
|
}
|
|
220
220
|
function aa(e, t) {
|
|
221
221
|
if (t == null)
|
|
222
222
|
return e;
|
|
223
223
|
let l = e ?? "";
|
|
224
224
|
l = `${l},${t}`;
|
|
225
|
-
let S = [...new Set(l.replaceAll(" ", "").toLowerCase().split(",").map((s) =>
|
|
225
|
+
let S = [...new Set(l.replaceAll(" ", "").toLowerCase().split(",").map((s) => Ze.find((g) => g.values.some((D) => D == s))).filter((s) => s != null).sort(Re.firstBy((s) => (s == null ? void 0 : s.value) ?? 0)).map((s) => s == null ? void 0 : s.short))].toString();
|
|
226
226
|
return S.length > 0 ? S : void 0;
|
|
227
227
|
}
|
|
228
228
|
function la(e, t) {
|
|
229
229
|
if (t == null || e == null)
|
|
230
230
|
return e;
|
|
231
|
-
let l = e ?? "", S = t.replaceAll(" ", "").toLowerCase(), s = [...new Set(l.replaceAll(" ", "").toLowerCase().split(",").map((g) =>
|
|
231
|
+
let l = e ?? "", S = t.replaceAll(" ", "").toLowerCase(), s = [...new Set(l.replaceAll(" ", "").toLowerCase().split(",").map((g) => Ze.find((D) => D.values.some((P) => P == g && P != S))).filter((g) => g != null).sort(Re.firstBy((g) => (g == null ? void 0 : g.value) ?? 0)).map((g) => g == null ? void 0 : g.short))].toString();
|
|
232
232
|
return s.length > 0 ? s : void 0;
|
|
233
233
|
}
|
|
234
234
|
function ua(e, t) {
|
|
@@ -267,12 +267,12 @@ function un(e, t) {
|
|
|
267
267
|
var l = e.split(","), S = t.split(",");
|
|
268
268
|
return l.some((s) => S.some((g) => g == s));
|
|
269
269
|
}
|
|
270
|
-
function
|
|
270
|
+
function Nr(e) {
|
|
271
271
|
if (!e)
|
|
272
272
|
return e;
|
|
273
273
|
let t, l = Array.isArray(e) ? [] : {};
|
|
274
274
|
for (const S in e)
|
|
275
|
-
t = e[S], l[S] = typeof t == "object" ?
|
|
275
|
+
t = e[S], l[S] = typeof t == "object" ? Nr(t) : t;
|
|
276
276
|
return l;
|
|
277
277
|
}
|
|
278
278
|
function cn(e) {
|
|
@@ -354,7 +354,7 @@ function hn(e) {
|
|
|
354
354
|
function mn(e) {
|
|
355
355
|
return e.endsWith("ies") ? e.slice(0, e.length - 3) : e.endsWith("s") ? e.slice(0, e.length - 1) : e;
|
|
356
356
|
}
|
|
357
|
-
function
|
|
357
|
+
function Oe(e) {
|
|
358
358
|
throw new Error('Could not dynamically require "' + e + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
359
359
|
}
|
|
360
360
|
var nt = { exports: {} };
|
|
@@ -369,34 +369,34 @@ var nt = { exports: {} };
|
|
|
369
369
|
e.exports = l();
|
|
370
370
|
})(function() {
|
|
371
371
|
return function l(S, s, g) {
|
|
372
|
-
function
|
|
373
|
-
if (!s[
|
|
374
|
-
if (!S[
|
|
375
|
-
var d = typeof
|
|
372
|
+
function D(M, $) {
|
|
373
|
+
if (!s[M]) {
|
|
374
|
+
if (!S[M]) {
|
|
375
|
+
var d = typeof Oe == "function" && Oe;
|
|
376
376
|
if (!$ && d)
|
|
377
|
-
return d(
|
|
377
|
+
return d(M, !0);
|
|
378
378
|
if (P)
|
|
379
|
-
return P(
|
|
380
|
-
var h = new Error("Cannot find module '" +
|
|
379
|
+
return P(M, !0);
|
|
380
|
+
var h = new Error("Cannot find module '" + M + "'");
|
|
381
381
|
throw h.code = "MODULE_NOT_FOUND", h;
|
|
382
382
|
}
|
|
383
|
-
var u = s[
|
|
384
|
-
S[
|
|
385
|
-
var y = S[
|
|
386
|
-
return
|
|
383
|
+
var u = s[M] = { exports: {} };
|
|
384
|
+
S[M][0].call(u.exports, function(r) {
|
|
385
|
+
var y = S[M][1][r];
|
|
386
|
+
return D(y || r);
|
|
387
387
|
}, u, u.exports, l, S, s, g);
|
|
388
388
|
}
|
|
389
|
-
return s[
|
|
389
|
+
return s[M].exports;
|
|
390
390
|
}
|
|
391
|
-
for (var P = typeof
|
|
392
|
-
|
|
393
|
-
return
|
|
391
|
+
for (var P = typeof Oe == "function" && Oe, _ = 0; _ < g.length; _++)
|
|
392
|
+
D(g[_]);
|
|
393
|
+
return D;
|
|
394
394
|
}({ 1: [function(l, S, s) {
|
|
395
395
|
(function(g) {
|
|
396
|
-
var
|
|
397
|
-
if (
|
|
398
|
-
var _ = 0,
|
|
399
|
-
|
|
396
|
+
var D = g.MutationObserver || g.WebKitMutationObserver, P;
|
|
397
|
+
if (D) {
|
|
398
|
+
var _ = 0, M = new D(r), $ = g.document.createTextNode("");
|
|
399
|
+
M.observe($, {
|
|
400
400
|
characterData: !0
|
|
401
401
|
}), P = function() {
|
|
402
402
|
$.data = _ = ++_ % 2;
|
|
@@ -429,33 +429,33 @@ var nt = { exports: {} };
|
|
|
429
429
|
function y(I) {
|
|
430
430
|
u.push(I) === 1 && !h && P();
|
|
431
431
|
}
|
|
432
|
-
}).call(this, typeof
|
|
432
|
+
}).call(this, typeof Xe < "u" ? Xe : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
433
433
|
}, {}], 2: [function(l, S, s) {
|
|
434
434
|
var g = l(1);
|
|
435
|
-
function
|
|
435
|
+
function D() {
|
|
436
436
|
}
|
|
437
|
-
var P = {}, _ = ["REJECTED"],
|
|
437
|
+
var P = {}, _ = ["REJECTED"], M = ["FULFILLED"], $ = ["PENDING"];
|
|
438
438
|
S.exports = d;
|
|
439
439
|
function d(b) {
|
|
440
440
|
if (typeof b != "function")
|
|
441
441
|
throw new TypeError("resolver must be a function");
|
|
442
|
-
this.state = $, this.queue = [], this.outcome = void 0, b !==
|
|
442
|
+
this.state = $, this.queue = [], this.outcome = void 0, b !== D && y(this, b);
|
|
443
443
|
}
|
|
444
444
|
d.prototype.catch = function(b) {
|
|
445
445
|
return this.then(null, b);
|
|
446
446
|
}, d.prototype.then = function(b, T) {
|
|
447
|
-
if (typeof b != "function" && this.state ===
|
|
447
|
+
if (typeof b != "function" && this.state === M || typeof T != "function" && this.state === _)
|
|
448
448
|
return this;
|
|
449
|
-
var
|
|
449
|
+
var x = new this.constructor(D);
|
|
450
450
|
if (this.state !== $) {
|
|
451
|
-
var
|
|
452
|
-
u(
|
|
451
|
+
var N = this.state === M ? b : T;
|
|
452
|
+
u(x, N, this.outcome);
|
|
453
453
|
} else
|
|
454
|
-
this.queue.push(new h(
|
|
455
|
-
return
|
|
454
|
+
this.queue.push(new h(x, b, T));
|
|
455
|
+
return x;
|
|
456
456
|
};
|
|
457
|
-
function h(b, T,
|
|
458
|
-
this.promise = b, typeof T == "function" && (this.onFulfilled = T, this.callFulfilled = this.otherCallFulfilled), typeof
|
|
457
|
+
function h(b, T, x) {
|
|
458
|
+
this.promise = b, typeof T == "function" && (this.onFulfilled = T, this.callFulfilled = this.otherCallFulfilled), typeof x == "function" && (this.onRejected = x, this.callRejected = this.otherCallRejected);
|
|
459
459
|
}
|
|
460
460
|
h.prototype.callFulfilled = function(b) {
|
|
461
461
|
P.resolve(this.promise, b);
|
|
@@ -466,34 +466,34 @@ var nt = { exports: {} };
|
|
|
466
466
|
}, h.prototype.otherCallRejected = function(b) {
|
|
467
467
|
u(this.promise, this.onRejected, b);
|
|
468
468
|
};
|
|
469
|
-
function u(b, T,
|
|
469
|
+
function u(b, T, x) {
|
|
470
470
|
g(function() {
|
|
471
|
-
var
|
|
471
|
+
var N;
|
|
472
472
|
try {
|
|
473
|
-
|
|
473
|
+
N = T(x);
|
|
474
474
|
} catch (f) {
|
|
475
475
|
return P.reject(b, f);
|
|
476
476
|
}
|
|
477
|
-
|
|
477
|
+
N === b ? P.reject(b, new TypeError("Cannot resolve promise with itself")) : P.resolve(b, N);
|
|
478
478
|
});
|
|
479
479
|
}
|
|
480
480
|
P.resolve = function(b, T) {
|
|
481
|
-
var
|
|
482
|
-
if (
|
|
483
|
-
return P.reject(b,
|
|
484
|
-
var
|
|
485
|
-
if (
|
|
486
|
-
y(b,
|
|
481
|
+
var x = I(r, T);
|
|
482
|
+
if (x.status === "error")
|
|
483
|
+
return P.reject(b, x.value);
|
|
484
|
+
var N = x.value;
|
|
485
|
+
if (N)
|
|
486
|
+
y(b, N);
|
|
487
487
|
else {
|
|
488
|
-
b.state =
|
|
488
|
+
b.state = M, b.outcome = T;
|
|
489
489
|
for (var f = -1, A = b.queue.length; ++f < A; )
|
|
490
490
|
b.queue[f].callFulfilled(T);
|
|
491
491
|
}
|
|
492
492
|
return b;
|
|
493
493
|
}, P.reject = function(b, T) {
|
|
494
494
|
b.state = _, b.outcome = T;
|
|
495
|
-
for (var
|
|
496
|
-
b.queue[
|
|
495
|
+
for (var x = -1, N = b.queue.length; ++x < N; )
|
|
496
|
+
b.queue[x].callRejected(T);
|
|
497
497
|
return b;
|
|
498
498
|
};
|
|
499
499
|
function r(b) {
|
|
@@ -504,35 +504,35 @@ var nt = { exports: {} };
|
|
|
504
504
|
};
|
|
505
505
|
}
|
|
506
506
|
function y(b, T) {
|
|
507
|
-
var
|
|
508
|
-
function
|
|
509
|
-
|
|
507
|
+
var x = !1;
|
|
508
|
+
function N(X) {
|
|
509
|
+
x || (x = !0, P.reject(b, X));
|
|
510
510
|
}
|
|
511
|
-
function f(
|
|
512
|
-
|
|
511
|
+
function f(X) {
|
|
512
|
+
x || (x = !0, P.resolve(b, X));
|
|
513
513
|
}
|
|
514
514
|
function A() {
|
|
515
|
-
T(f,
|
|
515
|
+
T(f, N);
|
|
516
516
|
}
|
|
517
|
-
var
|
|
518
|
-
|
|
517
|
+
var j = I(A);
|
|
518
|
+
j.status === "error" && N(j.value);
|
|
519
519
|
}
|
|
520
520
|
function I(b, T) {
|
|
521
|
-
var
|
|
521
|
+
var x = {};
|
|
522
522
|
try {
|
|
523
|
-
|
|
524
|
-
} catch (
|
|
525
|
-
|
|
523
|
+
x.value = b(T), x.status = "success";
|
|
524
|
+
} catch (N) {
|
|
525
|
+
x.status = "error", x.value = N;
|
|
526
526
|
}
|
|
527
|
-
return
|
|
527
|
+
return x;
|
|
528
528
|
}
|
|
529
529
|
d.resolve = i;
|
|
530
530
|
function i(b) {
|
|
531
|
-
return b instanceof this ? b : P.resolve(new this(
|
|
531
|
+
return b instanceof this ? b : P.resolve(new this(D), b);
|
|
532
532
|
}
|
|
533
533
|
d.reject = E;
|
|
534
534
|
function E(b) {
|
|
535
|
-
var T = new this(
|
|
535
|
+
var T = new this(D);
|
|
536
536
|
return P.reject(T, b);
|
|
537
537
|
}
|
|
538
538
|
d.all = w;
|
|
@@ -540,51 +540,51 @@ var nt = { exports: {} };
|
|
|
540
540
|
var T = this;
|
|
541
541
|
if (Object.prototype.toString.call(b) !== "[object Array]")
|
|
542
542
|
return this.reject(new TypeError("must be an array"));
|
|
543
|
-
var
|
|
544
|
-
if (!
|
|
543
|
+
var x = b.length, N = !1;
|
|
544
|
+
if (!x)
|
|
545
545
|
return this.resolve([]);
|
|
546
|
-
for (var f = new Array(
|
|
547
|
-
|
|
548
|
-
return
|
|
549
|
-
function
|
|
550
|
-
T.resolve(
|
|
551
|
-
|
|
546
|
+
for (var f = new Array(x), A = 0, j = -1, X = new this(D); ++j < x; )
|
|
547
|
+
re(b[j], j);
|
|
548
|
+
return X;
|
|
549
|
+
function re(ue, be) {
|
|
550
|
+
T.resolve(ue).then(G, function(Y) {
|
|
551
|
+
N || (N = !0, P.reject(X, Y));
|
|
552
552
|
});
|
|
553
|
-
function
|
|
554
|
-
f[
|
|
553
|
+
function G(Y) {
|
|
554
|
+
f[be] = Y, ++A === x && !N && (N = !0, P.resolve(X, f));
|
|
555
555
|
}
|
|
556
556
|
}
|
|
557
557
|
}
|
|
558
|
-
d.race =
|
|
559
|
-
function
|
|
558
|
+
d.race = L;
|
|
559
|
+
function L(b) {
|
|
560
560
|
var T = this;
|
|
561
561
|
if (Object.prototype.toString.call(b) !== "[object Array]")
|
|
562
562
|
return this.reject(new TypeError("must be an array"));
|
|
563
|
-
var
|
|
564
|
-
if (!
|
|
563
|
+
var x = b.length, N = !1;
|
|
564
|
+
if (!x)
|
|
565
565
|
return this.resolve([]);
|
|
566
|
-
for (var f = -1, A = new this(
|
|
567
|
-
|
|
566
|
+
for (var f = -1, A = new this(D); ++f < x; )
|
|
567
|
+
j(b[f]);
|
|
568
568
|
return A;
|
|
569
|
-
function
|
|
570
|
-
T.resolve(
|
|
571
|
-
|
|
572
|
-
}, function(
|
|
573
|
-
|
|
569
|
+
function j(X) {
|
|
570
|
+
T.resolve(X).then(function(re) {
|
|
571
|
+
N || (N = !0, P.resolve(A, re));
|
|
572
|
+
}, function(re) {
|
|
573
|
+
N || (N = !0, P.reject(A, re));
|
|
574
574
|
});
|
|
575
575
|
}
|
|
576
576
|
}
|
|
577
577
|
}, { 1: 1 }], 3: [function(l, S, s) {
|
|
578
578
|
(function(g) {
|
|
579
579
|
typeof g.Promise != "function" && (g.Promise = l(2));
|
|
580
|
-
}).call(this, typeof
|
|
580
|
+
}).call(this, typeof Xe < "u" ? Xe : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
581
581
|
}, { 2: 2 }], 4: [function(l, S, s) {
|
|
582
582
|
var g = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(n) {
|
|
583
583
|
return typeof n;
|
|
584
584
|
} : function(n) {
|
|
585
585
|
return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
|
|
586
586
|
};
|
|
587
|
-
function
|
|
587
|
+
function D(n, c) {
|
|
588
588
|
if (!(n instanceof c))
|
|
589
589
|
throw new TypeError("Cannot call a class as a function");
|
|
590
590
|
}
|
|
@@ -605,7 +605,7 @@ var nt = { exports: {} };
|
|
|
605
605
|
}
|
|
606
606
|
}
|
|
607
607
|
var _ = P();
|
|
608
|
-
function
|
|
608
|
+
function M() {
|
|
609
609
|
try {
|
|
610
610
|
if (!_ || !_.open)
|
|
611
611
|
return !1;
|
|
@@ -650,13 +650,13 @@ var nt = { exports: {} };
|
|
|
650
650
|
if (arguments.length && typeof arguments[arguments.length - 1] == "function")
|
|
651
651
|
return arguments[arguments.length - 1];
|
|
652
652
|
}
|
|
653
|
-
var I = "local-forage-detect-blob-support", i = void 0, E = {}, w = Object.prototype.toString,
|
|
653
|
+
var I = "local-forage-detect-blob-support", i = void 0, E = {}, w = Object.prototype.toString, L = "readonly", b = "readwrite";
|
|
654
654
|
function T(n) {
|
|
655
655
|
for (var c = n.length, a = new ArrayBuffer(c), m = new Uint8Array(a), v = 0; v < c; v++)
|
|
656
656
|
m[v] = n.charCodeAt(v);
|
|
657
657
|
return a;
|
|
658
658
|
}
|
|
659
|
-
function
|
|
659
|
+
function x(n) {
|
|
660
660
|
return new d(function(c) {
|
|
661
661
|
var a = n.transaction(I, b), m = $([""]);
|
|
662
662
|
a.objectStore(I).put(m, "key"), a.onabort = function(v) {
|
|
@@ -669,8 +669,8 @@ var nt = { exports: {} };
|
|
|
669
669
|
return !1;
|
|
670
670
|
});
|
|
671
671
|
}
|
|
672
|
-
function
|
|
673
|
-
return typeof i == "boolean" ? d.resolve(i) :
|
|
672
|
+
function N(n) {
|
|
673
|
+
return typeof i == "boolean" ? d.resolve(i) : x(n).then(function(c) {
|
|
674
674
|
return i = c, i;
|
|
675
675
|
});
|
|
676
676
|
}
|
|
@@ -687,12 +687,12 @@ var nt = { exports: {} };
|
|
|
687
687
|
if (a)
|
|
688
688
|
return a.resolve(), a.promise;
|
|
689
689
|
}
|
|
690
|
-
function
|
|
690
|
+
function j(n, c) {
|
|
691
691
|
var a = E[n.name], m = a.deferredOperations.pop();
|
|
692
692
|
if (m)
|
|
693
693
|
return m.reject(c), m.promise;
|
|
694
694
|
}
|
|
695
|
-
function
|
|
695
|
+
function X(n, c) {
|
|
696
696
|
return new d(function(a, m) {
|
|
697
697
|
if (E[n.name] = E[n.name] || ne(), n.db)
|
|
698
698
|
if (c)
|
|
@@ -722,13 +722,13 @@ var nt = { exports: {} };
|
|
|
722
722
|
};
|
|
723
723
|
});
|
|
724
724
|
}
|
|
725
|
-
function
|
|
726
|
-
return
|
|
725
|
+
function re(n) {
|
|
726
|
+
return X(n, !1);
|
|
727
727
|
}
|
|
728
|
-
function
|
|
729
|
-
return
|
|
728
|
+
function ue(n) {
|
|
729
|
+
return X(n, !0);
|
|
730
730
|
}
|
|
731
|
-
function
|
|
731
|
+
function be(n, c) {
|
|
732
732
|
if (!n.db)
|
|
733
733
|
return !0;
|
|
734
734
|
var a = !n.db.objectStoreNames.contains(n.storeName), m = n.version < n.db.version, v = n.version > n.db.version;
|
|
@@ -741,7 +741,7 @@ var nt = { exports: {} };
|
|
|
741
741
|
}
|
|
742
742
|
return !1;
|
|
743
743
|
}
|
|
744
|
-
function
|
|
744
|
+
function G(n) {
|
|
745
745
|
return new d(function(c, a) {
|
|
746
746
|
var m = new FileReader();
|
|
747
747
|
m.onerror = a, m.onloadend = function(v) {
|
|
@@ -761,7 +761,7 @@ var nt = { exports: {} };
|
|
|
761
761
|
function H(n) {
|
|
762
762
|
return n && n.__local_forage_encoded_blob;
|
|
763
763
|
}
|
|
764
|
-
function
|
|
764
|
+
function ie(n) {
|
|
765
765
|
var c = this, a = c._initReady().then(function() {
|
|
766
766
|
var m = E[c._dbInfo.name];
|
|
767
767
|
if (m && m.dbReady)
|
|
@@ -769,23 +769,23 @@ var nt = { exports: {} };
|
|
|
769
769
|
});
|
|
770
770
|
return u(a, n, n), a;
|
|
771
771
|
}
|
|
772
|
-
function
|
|
772
|
+
function Z(n) {
|
|
773
773
|
f(n);
|
|
774
774
|
for (var c = E[n.name], a = c.forages, m = 0; m < a.length; m++) {
|
|
775
775
|
var v = a[m];
|
|
776
776
|
v._dbInfo.db && (v._dbInfo.db.close(), v._dbInfo.db = null);
|
|
777
777
|
}
|
|
778
|
-
return n.db = null,
|
|
779
|
-
return n.db = o,
|
|
778
|
+
return n.db = null, re(n).then(function(o) {
|
|
779
|
+
return n.db = o, be(n) ? ue(n) : o;
|
|
780
780
|
}).then(function(o) {
|
|
781
781
|
n.db = c.db = o;
|
|
782
782
|
for (var C = 0; C < a.length; C++)
|
|
783
783
|
a[C]._dbInfo.db = o;
|
|
784
784
|
}).catch(function(o) {
|
|
785
|
-
throw
|
|
785
|
+
throw j(n, o), o;
|
|
786
786
|
});
|
|
787
787
|
}
|
|
788
|
-
function
|
|
788
|
+
function W(n, c, a, m) {
|
|
789
789
|
m === void 0 && (m = 1);
|
|
790
790
|
try {
|
|
791
791
|
var v = n.db.transaction(n.storeName, c);
|
|
@@ -794,10 +794,10 @@ var nt = { exports: {} };
|
|
|
794
794
|
if (m > 0 && (!n.db || o.name === "InvalidStateError" || o.name === "NotFoundError"))
|
|
795
795
|
return d.resolve().then(function() {
|
|
796
796
|
if (!n.db || o.name === "NotFoundError" && !n.db.objectStoreNames.contains(n.storeName) && n.version <= n.db.version)
|
|
797
|
-
return n.db && (n.version = n.db.version + 1),
|
|
797
|
+
return n.db && (n.version = n.db.version + 1), ue(n);
|
|
798
798
|
}).then(function() {
|
|
799
|
-
return
|
|
800
|
-
|
|
799
|
+
return Z(n).then(function() {
|
|
800
|
+
W(n, c, a, m - 1);
|
|
801
801
|
});
|
|
802
802
|
}).catch(a);
|
|
803
803
|
a(o);
|
|
@@ -815,7 +815,7 @@ var nt = { exports: {} };
|
|
|
815
815
|
deferredOperations: []
|
|
816
816
|
};
|
|
817
817
|
}
|
|
818
|
-
function
|
|
818
|
+
function ce(n) {
|
|
819
819
|
var c = this, a = {
|
|
820
820
|
db: null
|
|
821
821
|
};
|
|
@@ -823,7 +823,7 @@ var nt = { exports: {} };
|
|
|
823
823
|
for (var m in n)
|
|
824
824
|
a[m] = n[m];
|
|
825
825
|
var v = E[a.name];
|
|
826
|
-
v || (v = ne(), E[a.name] = v), v.forages.push(c), c._initReady || (c._initReady = c.ready, c.ready =
|
|
826
|
+
v || (v = ne(), E[a.name] = v), v.forages.push(c), c._initReady || (c._initReady = c.ready, c.ready = ie);
|
|
827
827
|
var o = [];
|
|
828
828
|
function C() {
|
|
829
829
|
return d.resolve();
|
|
@@ -834,23 +834,23 @@ var nt = { exports: {} };
|
|
|
834
834
|
}
|
|
835
835
|
var F = v.forages.slice(0);
|
|
836
836
|
return d.all(o).then(function() {
|
|
837
|
-
return a.db = v.db,
|
|
837
|
+
return a.db = v.db, re(a);
|
|
838
838
|
}).then(function(k) {
|
|
839
|
-
return a.db = k,
|
|
839
|
+
return a.db = k, be(a, c._defaultConfig.version) ? ue(a) : k;
|
|
840
840
|
}).then(function(k) {
|
|
841
841
|
a.db = v.db = k, c._dbInfo = a;
|
|
842
842
|
for (var q = 0; q < F.length; q++) {
|
|
843
|
-
var
|
|
844
|
-
|
|
843
|
+
var J = F[q];
|
|
844
|
+
J !== c && (J._dbInfo.db = a.db, J._dbInfo.version = a.version);
|
|
845
845
|
}
|
|
846
846
|
});
|
|
847
847
|
}
|
|
848
|
-
function
|
|
848
|
+
function se(n, c) {
|
|
849
849
|
var a = this;
|
|
850
850
|
n = r(n);
|
|
851
851
|
var m = new d(function(v, o) {
|
|
852
852
|
a.ready().then(function() {
|
|
853
|
-
|
|
853
|
+
W(a._dbInfo, L, function(C, R) {
|
|
854
854
|
if (C)
|
|
855
855
|
return o(C);
|
|
856
856
|
try {
|
|
@@ -869,10 +869,10 @@ var nt = { exports: {} };
|
|
|
869
869
|
});
|
|
870
870
|
return h(m, c), m;
|
|
871
871
|
}
|
|
872
|
-
function
|
|
872
|
+
function ge(n, c) {
|
|
873
873
|
var a = this, m = new d(function(v, o) {
|
|
874
874
|
a.ready().then(function() {
|
|
875
|
-
|
|
875
|
+
W(a._dbInfo, L, function(C, R) {
|
|
876
876
|
if (C)
|
|
877
877
|
return o(C);
|
|
878
878
|
try {
|
|
@@ -880,10 +880,10 @@ var nt = { exports: {} };
|
|
|
880
880
|
F.onsuccess = function() {
|
|
881
881
|
var q = F.result;
|
|
882
882
|
if (q) {
|
|
883
|
-
var
|
|
884
|
-
H(
|
|
885
|
-
var
|
|
886
|
-
|
|
883
|
+
var J = q.value;
|
|
884
|
+
H(J) && (J = Y(J));
|
|
885
|
+
var p = n(J, q.key, k++);
|
|
886
|
+
p !== void 0 ? v(p) : q.continue();
|
|
887
887
|
} else
|
|
888
888
|
v();
|
|
889
889
|
}, F.onerror = function() {
|
|
@@ -897,43 +897,43 @@ var nt = { exports: {} };
|
|
|
897
897
|
});
|
|
898
898
|
return h(m, c), m;
|
|
899
899
|
}
|
|
900
|
-
function
|
|
900
|
+
function Be(n, c, a) {
|
|
901
901
|
var m = this;
|
|
902
902
|
n = r(n);
|
|
903
903
|
var v = new d(function(o, C) {
|
|
904
904
|
var R;
|
|
905
905
|
m.ready().then(function() {
|
|
906
|
-
return R = m._dbInfo, w.call(c) === "[object Blob]" ?
|
|
907
|
-
return B ? c :
|
|
906
|
+
return R = m._dbInfo, w.call(c) === "[object Blob]" ? N(R.db).then(function(B) {
|
|
907
|
+
return B ? c : G(c);
|
|
908
908
|
}) : c;
|
|
909
909
|
}).then(function(B) {
|
|
910
|
-
|
|
910
|
+
W(m._dbInfo, b, function(F, k) {
|
|
911
911
|
if (F)
|
|
912
912
|
return C(F);
|
|
913
913
|
try {
|
|
914
914
|
var q = k.objectStore(m._dbInfo.storeName);
|
|
915
915
|
B === null && (B = void 0);
|
|
916
|
-
var
|
|
916
|
+
var J = q.put(B, n);
|
|
917
917
|
k.oncomplete = function() {
|
|
918
918
|
B === void 0 && (B = null), o(B);
|
|
919
919
|
}, k.onabort = k.onerror = function() {
|
|
920
|
-
var
|
|
921
|
-
C(
|
|
920
|
+
var p = J.error ? J.error : J.transaction.error;
|
|
921
|
+
C(p);
|
|
922
922
|
};
|
|
923
|
-
} catch (
|
|
924
|
-
C(
|
|
923
|
+
} catch (p) {
|
|
924
|
+
C(p);
|
|
925
925
|
}
|
|
926
926
|
});
|
|
927
927
|
}).catch(C);
|
|
928
928
|
});
|
|
929
929
|
return h(v, a), v;
|
|
930
930
|
}
|
|
931
|
-
function
|
|
931
|
+
function $e(n, c) {
|
|
932
932
|
var a = this;
|
|
933
933
|
n = r(n);
|
|
934
934
|
var m = new d(function(v, o) {
|
|
935
935
|
a.ready().then(function() {
|
|
936
|
-
|
|
936
|
+
W(a._dbInfo, b, function(C, R) {
|
|
937
937
|
if (C)
|
|
938
938
|
return o(C);
|
|
939
939
|
try {
|
|
@@ -954,10 +954,10 @@ var nt = { exports: {} };
|
|
|
954
954
|
});
|
|
955
955
|
return h(m, c), m;
|
|
956
956
|
}
|
|
957
|
-
function
|
|
957
|
+
function Fe(n) {
|
|
958
958
|
var c = this, a = new d(function(m, v) {
|
|
959
959
|
c.ready().then(function() {
|
|
960
|
-
|
|
960
|
+
W(c._dbInfo, b, function(o, C) {
|
|
961
961
|
if (o)
|
|
962
962
|
return v(o);
|
|
963
963
|
try {
|
|
@@ -979,7 +979,7 @@ var nt = { exports: {} };
|
|
|
979
979
|
function tr(n) {
|
|
980
980
|
var c = this, a = new d(function(m, v) {
|
|
981
981
|
c.ready().then(function() {
|
|
982
|
-
|
|
982
|
+
W(c._dbInfo, L, function(o, C) {
|
|
983
983
|
if (o)
|
|
984
984
|
return v(o);
|
|
985
985
|
try {
|
|
@@ -1004,7 +1004,7 @@ var nt = { exports: {} };
|
|
|
1004
1004
|
return;
|
|
1005
1005
|
}
|
|
1006
1006
|
a.ready().then(function() {
|
|
1007
|
-
|
|
1007
|
+
W(a._dbInfo, L, function(C, R) {
|
|
1008
1008
|
if (C)
|
|
1009
1009
|
return o(C);
|
|
1010
1010
|
try {
|
|
@@ -1027,10 +1027,10 @@ var nt = { exports: {} };
|
|
|
1027
1027
|
});
|
|
1028
1028
|
return h(m, c), m;
|
|
1029
1029
|
}
|
|
1030
|
-
function
|
|
1030
|
+
function Ce(n) {
|
|
1031
1031
|
var c = this, a = new d(function(m, v) {
|
|
1032
1032
|
c.ready().then(function() {
|
|
1033
|
-
|
|
1033
|
+
W(c._dbInfo, L, function(o, C) {
|
|
1034
1034
|
if (o)
|
|
1035
1035
|
return v(o);
|
|
1036
1036
|
try {
|
|
@@ -1061,7 +1061,7 @@ var nt = { exports: {} };
|
|
|
1061
1061
|
if (!n.name)
|
|
1062
1062
|
v = d.reject("Invalid arguments");
|
|
1063
1063
|
else {
|
|
1064
|
-
var o = n.name === a.name && m._dbInfo.db, C = o ? d.resolve(m._dbInfo.db) :
|
|
1064
|
+
var o = n.name === a.name && m._dbInfo.db, C = o ? d.resolve(m._dbInfo.db) : re(n).then(function(R) {
|
|
1065
1065
|
var B = E[n.name], F = B.forages;
|
|
1066
1066
|
B.db = R;
|
|
1067
1067
|
for (var k = 0; k < F.length; k++)
|
|
@@ -1075,31 +1075,31 @@ var nt = { exports: {} };
|
|
|
1075
1075
|
var F = E[n.name], k = F.forages;
|
|
1076
1076
|
R.close();
|
|
1077
1077
|
for (var q = 0; q < k.length; q++) {
|
|
1078
|
-
var
|
|
1079
|
-
|
|
1078
|
+
var J = k[q];
|
|
1079
|
+
J._dbInfo.db = null, J._dbInfo.version = B;
|
|
1080
1080
|
}
|
|
1081
|
-
var
|
|
1082
|
-
var
|
|
1083
|
-
|
|
1084
|
-
var
|
|
1085
|
-
|
|
1086
|
-
},
|
|
1087
|
-
var
|
|
1088
|
-
|
|
1089
|
-
},
|
|
1090
|
-
var
|
|
1091
|
-
|
|
1081
|
+
var p = new d(function(te, fe) {
|
|
1082
|
+
var ae = _.open(n.name, B);
|
|
1083
|
+
ae.onerror = function(we) {
|
|
1084
|
+
var Ye = ae.result;
|
|
1085
|
+
Ye.close(), fe(we);
|
|
1086
|
+
}, ae.onupgradeneeded = function() {
|
|
1087
|
+
var we = ae.result;
|
|
1088
|
+
we.deleteObjectStore(n.storeName);
|
|
1089
|
+
}, ae.onsuccess = function() {
|
|
1090
|
+
var we = ae.result;
|
|
1091
|
+
we.close(), te(we);
|
|
1092
1092
|
};
|
|
1093
1093
|
});
|
|
1094
|
-
return
|
|
1095
|
-
F.db =
|
|
1096
|
-
for (var
|
|
1097
|
-
var
|
|
1098
|
-
|
|
1094
|
+
return p.then(function(te) {
|
|
1095
|
+
F.db = te;
|
|
1096
|
+
for (var fe = 0; fe < k.length; fe++) {
|
|
1097
|
+
var ae = k[fe];
|
|
1098
|
+
ae._dbInfo.db = te, A(ae._dbInfo);
|
|
1099
1099
|
}
|
|
1100
|
-
}).catch(function(
|
|
1101
|
-
throw (
|
|
1102
|
-
}),
|
|
1100
|
+
}).catch(function(te) {
|
|
1101
|
+
throw (j(n, te) || d.resolve()).catch(function() {
|
|
1102
|
+
}), te;
|
|
1103
1103
|
});
|
|
1104
1104
|
}
|
|
1105
1105
|
}) : v = C.then(function(R) {
|
|
@@ -1110,27 +1110,27 @@ var nt = { exports: {} };
|
|
|
1110
1110
|
var q = F[k];
|
|
1111
1111
|
q._dbInfo.db = null;
|
|
1112
1112
|
}
|
|
1113
|
-
var
|
|
1114
|
-
var
|
|
1115
|
-
|
|
1116
|
-
var
|
|
1117
|
-
|
|
1118
|
-
},
|
|
1113
|
+
var J = new d(function(p, te) {
|
|
1114
|
+
var fe = _.deleteDatabase(n.name);
|
|
1115
|
+
fe.onerror = function() {
|
|
1116
|
+
var ae = fe.result;
|
|
1117
|
+
ae && ae.close(), te(fe.error);
|
|
1118
|
+
}, fe.onblocked = function() {
|
|
1119
1119
|
console.warn('dropInstance blocked for database "' + n.name + '" until all open connections are closed');
|
|
1120
|
-
},
|
|
1121
|
-
var
|
|
1122
|
-
|
|
1120
|
+
}, fe.onsuccess = function() {
|
|
1121
|
+
var ae = fe.result;
|
|
1122
|
+
ae && ae.close(), p(ae);
|
|
1123
1123
|
};
|
|
1124
1124
|
});
|
|
1125
|
-
return
|
|
1126
|
-
B.db =
|
|
1127
|
-
for (var
|
|
1128
|
-
var
|
|
1129
|
-
A(
|
|
1125
|
+
return J.then(function(p) {
|
|
1126
|
+
B.db = p;
|
|
1127
|
+
for (var te = 0; te < F.length; te++) {
|
|
1128
|
+
var fe = F[te];
|
|
1129
|
+
A(fe._dbInfo);
|
|
1130
1130
|
}
|
|
1131
|
-
}).catch(function(
|
|
1132
|
-
throw (
|
|
1133
|
-
}),
|
|
1131
|
+
}).catch(function(p) {
|
|
1132
|
+
throw (j(n, p) || d.resolve()).catch(function() {
|
|
1133
|
+
}), p;
|
|
1134
1134
|
});
|
|
1135
1135
|
});
|
|
1136
1136
|
}
|
|
@@ -1138,46 +1138,46 @@ var nt = { exports: {} };
|
|
|
1138
1138
|
}
|
|
1139
1139
|
var lr = {
|
|
1140
1140
|
_driver: "asyncStorage",
|
|
1141
|
-
_initStorage:
|
|
1142
|
-
_support:
|
|
1143
|
-
iterate:
|
|
1144
|
-
getItem:
|
|
1145
|
-
setItem:
|
|
1146
|
-
removeItem:
|
|
1147
|
-
clear:
|
|
1141
|
+
_initStorage: ce,
|
|
1142
|
+
_support: M(),
|
|
1143
|
+
iterate: ge,
|
|
1144
|
+
getItem: se,
|
|
1145
|
+
setItem: Be,
|
|
1146
|
+
removeItem: $e,
|
|
1147
|
+
clear: Fe,
|
|
1148
1148
|
length: tr,
|
|
1149
1149
|
key: nr,
|
|
1150
|
-
keys:
|
|
1150
|
+
keys: Ce,
|
|
1151
1151
|
dropInstance: ar
|
|
1152
1152
|
};
|
|
1153
1153
|
function ur() {
|
|
1154
1154
|
return typeof openDatabase == "function";
|
|
1155
1155
|
}
|
|
1156
|
-
var
|
|
1157
|
-
function
|
|
1156
|
+
var Se = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", ir = "~~local_forage_type~", Je = /^~~local_forage_type~([^~]+)~/, ke = "__lfsc__:", Pe = ke.length, qe = "arbf", Ie = "blob", je = "si08", Ke = "ui08", He = "uic8", Ve = "si16", U = "si32", K = "ur16", V = "ui32", O = "fl32", de = "fl64", ye = Pe + qe.length, De = Object.prototype.toString;
|
|
1157
|
+
function Ae(n) {
|
|
1158
1158
|
var c = n.length * 0.75, a = n.length, m, v = 0, o, C, R, B;
|
|
1159
1159
|
n[n.length - 1] === "=" && (c--, n[n.length - 2] === "=" && c--);
|
|
1160
1160
|
var F = new ArrayBuffer(c), k = new Uint8Array(F);
|
|
1161
1161
|
for (m = 0; m < a; m += 4)
|
|
1162
|
-
o =
|
|
1162
|
+
o = Se.indexOf(n[m]), C = Se.indexOf(n[m + 1]), R = Se.indexOf(n[m + 2]), B = Se.indexOf(n[m + 3]), k[v++] = o << 2 | C >> 4, k[v++] = (C & 15) << 4 | R >> 2, k[v++] = (R & 3) << 6 | B & 63;
|
|
1163
1163
|
return F;
|
|
1164
1164
|
}
|
|
1165
1165
|
function oe(n) {
|
|
1166
1166
|
var c = new Uint8Array(n), a = "", m;
|
|
1167
1167
|
for (m = 0; m < c.length; m += 3)
|
|
1168
|
-
a +=
|
|
1168
|
+
a += Se[c[m] >> 2], a += Se[(c[m] & 3) << 4 | c[m + 1] >> 4], a += Se[(c[m + 1] & 15) << 2 | c[m + 2] >> 6], a += Se[c[m + 2] & 63];
|
|
1169
1169
|
return c.length % 3 === 2 ? a = a.substring(0, a.length - 1) + "=" : c.length % 3 === 1 && (a = a.substring(0, a.length - 2) + "=="), a;
|
|
1170
1170
|
}
|
|
1171
1171
|
function Me(n, c) {
|
|
1172
1172
|
var a = "";
|
|
1173
1173
|
if (n && (a = De.call(n)), n && (a === "[object ArrayBuffer]" || n.buffer && De.call(n.buffer) === "[object ArrayBuffer]")) {
|
|
1174
|
-
var m, v =
|
|
1175
|
-
n instanceof ArrayBuffer ? (m = n, v +=
|
|
1174
|
+
var m, v = ke;
|
|
1175
|
+
n instanceof ArrayBuffer ? (m = n, v += qe) : (m = n.buffer, a === "[object Int8Array]" ? v += je : a === "[object Uint8Array]" ? v += Ke : a === "[object Uint8ClampedArray]" ? v += He : a === "[object Int16Array]" ? v += Ve : a === "[object Uint16Array]" ? v += K : a === "[object Int32Array]" ? v += U : a === "[object Uint32Array]" ? v += V : a === "[object Float32Array]" ? v += O : a === "[object Float64Array]" ? v += de : c(new Error("Failed to get type for BinaryArray"))), c(v + oe(m));
|
|
1176
1176
|
} else if (a === "[object Blob]") {
|
|
1177
1177
|
var o = new FileReader();
|
|
1178
1178
|
o.onload = function() {
|
|
1179
1179
|
var C = ir + n.type + "~" + oe(this.result);
|
|
1180
|
-
c(
|
|
1180
|
+
c(ke + Ie + C);
|
|
1181
1181
|
}, o.readAsArrayBuffer(n);
|
|
1182
1182
|
} else
|
|
1183
1183
|
try {
|
|
@@ -1187,34 +1187,34 @@ var nt = { exports: {} };
|
|
|
1187
1187
|
}
|
|
1188
1188
|
}
|
|
1189
1189
|
function ct(n) {
|
|
1190
|
-
if (n.substring(0,
|
|
1190
|
+
if (n.substring(0, Pe) !== ke)
|
|
1191
1191
|
return JSON.parse(n);
|
|
1192
|
-
var c = n.substring(
|
|
1193
|
-
if (a === Ie &&
|
|
1194
|
-
var v = c.match(
|
|
1192
|
+
var c = n.substring(ye), a = n.substring(Pe, ye), m;
|
|
1193
|
+
if (a === Ie && Je.test(c)) {
|
|
1194
|
+
var v = c.match(Je);
|
|
1195
1195
|
m = v[1], c = c.substring(v[0].length);
|
|
1196
1196
|
}
|
|
1197
|
-
var o =
|
|
1197
|
+
var o = Ae(c);
|
|
1198
1198
|
switch (a) {
|
|
1199
|
-
case
|
|
1199
|
+
case qe:
|
|
1200
1200
|
return o;
|
|
1201
1201
|
case Ie:
|
|
1202
1202
|
return $([o], { type: m });
|
|
1203
|
-
case Je:
|
|
1204
|
-
return new Int8Array(o);
|
|
1205
1203
|
case je:
|
|
1204
|
+
return new Int8Array(o);
|
|
1205
|
+
case Ke:
|
|
1206
1206
|
return new Uint8Array(o);
|
|
1207
|
-
case qe:
|
|
1208
|
-
return new Uint8ClampedArray(o);
|
|
1209
1207
|
case He:
|
|
1208
|
+
return new Uint8ClampedArray(o);
|
|
1209
|
+
case Ve:
|
|
1210
1210
|
return new Int16Array(o);
|
|
1211
|
-
case
|
|
1211
|
+
case K:
|
|
1212
1212
|
return new Uint16Array(o);
|
|
1213
1213
|
case U:
|
|
1214
1214
|
return new Int32Array(o);
|
|
1215
1215
|
case V:
|
|
1216
1216
|
return new Uint32Array(o);
|
|
1217
|
-
case
|
|
1217
|
+
case O:
|
|
1218
1218
|
return new Float32Array(o);
|
|
1219
1219
|
case de:
|
|
1220
1220
|
return new Float64Array(o);
|
|
@@ -1225,7 +1225,7 @@ var nt = { exports: {} };
|
|
|
1225
1225
|
var cr = {
|
|
1226
1226
|
serialize: Me,
|
|
1227
1227
|
deserialize: ct,
|
|
1228
|
-
stringToBuffer:
|
|
1228
|
+
stringToBuffer: Ae,
|
|
1229
1229
|
bufferToString: oe
|
|
1230
1230
|
};
|
|
1231
1231
|
function Rr(n, c, a, m) {
|
|
@@ -1287,10 +1287,10 @@ var nt = { exports: {} };
|
|
|
1287
1287
|
var C = a._dbInfo;
|
|
1288
1288
|
C.db.transaction(function(R) {
|
|
1289
1289
|
xe(R, C, "SELECT * FROM " + C.storeName, [], function(B, F) {
|
|
1290
|
-
for (var k = F.rows, q = k.length,
|
|
1291
|
-
var
|
|
1292
|
-
if (
|
|
1293
|
-
v(
|
|
1290
|
+
for (var k = F.rows, q = k.length, J = 0; J < q; J++) {
|
|
1291
|
+
var p = k.item(J), te = p.value;
|
|
1292
|
+
if (te && (te = C.serializer.deserialize(te)), te = n(te, p.key, J + 1), te !== void 0) {
|
|
1293
|
+
v(te);
|
|
1294
1294
|
return;
|
|
1295
1295
|
}
|
|
1296
1296
|
}
|
|
@@ -1311,19 +1311,19 @@ var nt = { exports: {} };
|
|
|
1311
1311
|
c === void 0 && (c = null);
|
|
1312
1312
|
var B = c, F = v._dbInfo;
|
|
1313
1313
|
F.serializer.serialize(c, function(k, q) {
|
|
1314
|
-
q ? R(q) : F.db.transaction(function(
|
|
1315
|
-
xe(
|
|
1314
|
+
q ? R(q) : F.db.transaction(function(J) {
|
|
1315
|
+
xe(J, F, "INSERT OR REPLACE INTO " + F.storeName + " (key, value) VALUES (?, ?)", [n, k], function() {
|
|
1316
1316
|
C(B);
|
|
1317
|
-
}, function(
|
|
1318
|
-
R(
|
|
1317
|
+
}, function(p, te) {
|
|
1318
|
+
R(te);
|
|
1319
1319
|
});
|
|
1320
|
-
}, function(
|
|
1321
|
-
if (
|
|
1320
|
+
}, function(J) {
|
|
1321
|
+
if (J.code === J.QUOTA_ERR) {
|
|
1322
1322
|
if (m > 0) {
|
|
1323
1323
|
C(Ur.apply(v, [n, B, a, m - 1]));
|
|
1324
1324
|
return;
|
|
1325
1325
|
}
|
|
1326
|
-
R(
|
|
1326
|
+
R(J);
|
|
1327
1327
|
}
|
|
1328
1328
|
});
|
|
1329
1329
|
});
|
|
@@ -1447,21 +1447,21 @@ var nt = { exports: {} };
|
|
|
1447
1447
|
}).then(function(o) {
|
|
1448
1448
|
return new d(function(C, R) {
|
|
1449
1449
|
o.db.transaction(function(B) {
|
|
1450
|
-
function F(
|
|
1451
|
-
return new d(function(
|
|
1452
|
-
B.executeSql("DROP TABLE IF EXISTS " +
|
|
1453
|
-
|
|
1454
|
-
}, function(
|
|
1455
|
-
|
|
1450
|
+
function F(p) {
|
|
1451
|
+
return new d(function(te, fe) {
|
|
1452
|
+
B.executeSql("DROP TABLE IF EXISTS " + p, [], function() {
|
|
1453
|
+
te();
|
|
1454
|
+
}, function(ae, we) {
|
|
1455
|
+
fe(we);
|
|
1456
1456
|
});
|
|
1457
1457
|
});
|
|
1458
1458
|
}
|
|
1459
|
-
for (var k = [], q = 0,
|
|
1459
|
+
for (var k = [], q = 0, J = o.storeNames.length; q < J; q++)
|
|
1460
1460
|
k.push(F(o.storeNames[q]));
|
|
1461
1461
|
d.all(k).then(function() {
|
|
1462
1462
|
C();
|
|
1463
|
-
}).catch(function(
|
|
1464
|
-
R(
|
|
1463
|
+
}).catch(function(p) {
|
|
1464
|
+
R(p);
|
|
1465
1465
|
});
|
|
1466
1466
|
}, function(B) {
|
|
1467
1467
|
R(B);
|
|
@@ -1566,13 +1566,13 @@ var nt = { exports: {} };
|
|
|
1566
1566
|
});
|
|
1567
1567
|
return h(a, n), a;
|
|
1568
1568
|
}
|
|
1569
|
-
function
|
|
1569
|
+
function Mt(n) {
|
|
1570
1570
|
var c = this, a = c.keys().then(function(m) {
|
|
1571
1571
|
return m.length;
|
|
1572
1572
|
});
|
|
1573
1573
|
return h(a, n), a;
|
|
1574
1574
|
}
|
|
1575
|
-
function
|
|
1575
|
+
function Lt(n, c) {
|
|
1576
1576
|
var a = this;
|
|
1577
1577
|
n = r(n);
|
|
1578
1578
|
var m = a.ready().then(function() {
|
|
@@ -1581,7 +1581,7 @@ var nt = { exports: {} };
|
|
|
1581
1581
|
});
|
|
1582
1582
|
return h(m, c), m;
|
|
1583
1583
|
}
|
|
1584
|
-
function
|
|
1584
|
+
function Nt(n, c, a) {
|
|
1585
1585
|
var m = this;
|
|
1586
1586
|
n = r(n);
|
|
1587
1587
|
var v = m.ready().then(function() {
|
|
@@ -1624,10 +1624,10 @@ var nt = { exports: {} };
|
|
|
1624
1624
|
_support: At(),
|
|
1625
1625
|
iterate: _t,
|
|
1626
1626
|
getItem: Tt,
|
|
1627
|
-
setItem:
|
|
1628
|
-
removeItem:
|
|
1627
|
+
setItem: Nt,
|
|
1628
|
+
removeItem: Lt,
|
|
1629
1629
|
clear: xt,
|
|
1630
|
-
length:
|
|
1630
|
+
length: Mt,
|
|
1631
1631
|
key: Ct,
|
|
1632
1632
|
keys: Pt,
|
|
1633
1633
|
dropInstance: Rt
|
|
@@ -1642,11 +1642,11 @@ var nt = { exports: {} };
|
|
|
1642
1642
|
return !1;
|
|
1643
1643
|
}, $r = Array.isArray || function(n) {
|
|
1644
1644
|
return Object.prototype.toString.call(n) === "[object Array]";
|
|
1645
|
-
},
|
|
1645
|
+
}, ze = {}, Fr = {}, Ge = {
|
|
1646
1646
|
INDEXEDDB: lr,
|
|
1647
1647
|
WEBSQL: St,
|
|
1648
1648
|
LOCALSTORAGE: Ut
|
|
1649
|
-
}, Ft = [
|
|
1649
|
+
}, Ft = [Ge.INDEXEDDB._driver, Ge.WEBSQL._driver, Ge.LOCALSTORAGE._driver], Qe = ["dropInstance"], fr = ["clear", "getItem", "iterate", "key", "keys", "length", "removeItem", "setItem"].concat(Qe), kt = {
|
|
1650
1650
|
description: "",
|
|
1651
1651
|
driver: Ft.slice(),
|
|
1652
1652
|
name: "localforage",
|
|
@@ -1675,11 +1675,11 @@ var nt = { exports: {} };
|
|
|
1675
1675
|
}
|
|
1676
1676
|
var Wt = function() {
|
|
1677
1677
|
function n(c) {
|
|
1678
|
-
|
|
1679
|
-
for (var a in
|
|
1680
|
-
if (
|
|
1681
|
-
var m =
|
|
1682
|
-
this[a] = v,
|
|
1678
|
+
D(this, n);
|
|
1679
|
+
for (var a in Ge)
|
|
1680
|
+
if (Ge.hasOwnProperty(a)) {
|
|
1681
|
+
var m = Ge[a], v = m._driver;
|
|
1682
|
+
this[a] = v, ze[v] || this.defineDriver(m);
|
|
1683
1683
|
}
|
|
1684
1684
|
this._defaultConfig = sr({}, kt), this._config = sr({}, this._defaultConfig, c), this._driverSet = null, this._initDriver = null, this._ready = !1, this._dbInfo = null, this._wrapLibraryMethodsWithReady(), this.setDriver(this._config.driver).catch(function() {
|
|
1685
1685
|
});
|
|
@@ -1704,38 +1704,38 @@ var nt = { exports: {} };
|
|
|
1704
1704
|
R(F);
|
|
1705
1705
|
return;
|
|
1706
1706
|
}
|
|
1707
|
-
for (var k = fr.concat("_initStorage"), q = 0,
|
|
1708
|
-
var
|
|
1709
|
-
if ((
|
|
1707
|
+
for (var k = fr.concat("_initStorage"), q = 0, J = k.length; q < J; q++) {
|
|
1708
|
+
var p = k[q], te = !$t(Qe, p);
|
|
1709
|
+
if ((te || a[p]) && typeof a[p] != "function") {
|
|
1710
1710
|
R(F);
|
|
1711
1711
|
return;
|
|
1712
1712
|
}
|
|
1713
1713
|
}
|
|
1714
|
-
var
|
|
1715
|
-
for (var
|
|
1714
|
+
var fe = function() {
|
|
1715
|
+
for (var Ye = function(Vt) {
|
|
1716
1716
|
return function() {
|
|
1717
1717
|
var zt = new Error("Method " + Vt + " is not implemented by the current driver"), kr = d.reject(zt);
|
|
1718
1718
|
return h(kr, arguments[arguments.length - 1]), kr;
|
|
1719
1719
|
};
|
|
1720
|
-
}, or = 0, Ht =
|
|
1721
|
-
var dr =
|
|
1722
|
-
a[dr] || (a[dr] =
|
|
1720
|
+
}, or = 0, Ht = Qe.length; or < Ht; or++) {
|
|
1721
|
+
var dr = Qe[or];
|
|
1722
|
+
a[dr] || (a[dr] = Ye(dr));
|
|
1723
1723
|
}
|
|
1724
1724
|
};
|
|
1725
|
-
|
|
1726
|
-
var
|
|
1727
|
-
|
|
1725
|
+
fe();
|
|
1726
|
+
var ae = function(Ye) {
|
|
1727
|
+
ze[B] && console.info("Redefining LocalForage driver: " + B), ze[B] = a, Fr[B] = Ye, C();
|
|
1728
1728
|
};
|
|
1729
|
-
"_support" in a ? a._support && typeof a._support == "function" ? a._support().then(
|
|
1730
|
-
} catch (
|
|
1731
|
-
R(
|
|
1729
|
+
"_support" in a ? a._support && typeof a._support == "function" ? a._support().then(ae, R) : ae(!!a._support) : ae(!0);
|
|
1730
|
+
} catch (we) {
|
|
1731
|
+
R(we);
|
|
1732
1732
|
}
|
|
1733
1733
|
});
|
|
1734
1734
|
return u(o, m, v), o;
|
|
1735
1735
|
}, n.prototype.driver = function() {
|
|
1736
1736
|
return this._driver || null;
|
|
1737
1737
|
}, n.prototype.getDriver = function(a, m, v) {
|
|
1738
|
-
var o =
|
|
1738
|
+
var o = ze[a] ? d.resolve(ze[a]) : d.reject(new Error("Driver not found."));
|
|
1739
1739
|
return u(o, m, v), o;
|
|
1740
1740
|
}, n.prototype.getSerializer = function(a) {
|
|
1741
1741
|
var m = d.resolve(cr);
|
|
@@ -1757,17 +1757,17 @@ var nt = { exports: {} };
|
|
|
1757
1757
|
}
|
|
1758
1758
|
function F(q) {
|
|
1759
1759
|
return function() {
|
|
1760
|
-
var
|
|
1761
|
-
function
|
|
1762
|
-
for (;
|
|
1763
|
-
var
|
|
1764
|
-
return
|
|
1760
|
+
var J = 0;
|
|
1761
|
+
function p() {
|
|
1762
|
+
for (; J < q.length; ) {
|
|
1763
|
+
var te = q[J];
|
|
1764
|
+
return J++, o._dbInfo = null, o._ready = null, o.getDriver(te).then(B).catch(p);
|
|
1765
1765
|
}
|
|
1766
1766
|
R();
|
|
1767
|
-
var
|
|
1768
|
-
return o._driverSet = d.reject(
|
|
1767
|
+
var fe = new Error("No available storage method found.");
|
|
1768
|
+
return o._driverSet = d.reject(fe), o._driverSet;
|
|
1769
1769
|
}
|
|
1770
|
-
return
|
|
1770
|
+
return p();
|
|
1771
1771
|
};
|
|
1772
1772
|
}
|
|
1773
1773
|
var k = this._driverSet !== null ? this._driverSet.catch(function() {
|
|
@@ -1775,8 +1775,8 @@ var nt = { exports: {} };
|
|
|
1775
1775
|
}) : d.resolve();
|
|
1776
1776
|
return this._driverSet = k.then(function() {
|
|
1777
1777
|
var q = C[0];
|
|
1778
|
-
return o._dbInfo = null, o._ready = null, o.getDriver(q).then(function(
|
|
1779
|
-
o._driver =
|
|
1778
|
+
return o._dbInfo = null, o._ready = null, o.getDriver(q).then(function(J) {
|
|
1779
|
+
o._driver = J._driver, R(), o._wrapLibraryMethodsWithReady(), o._initDriver = F(C);
|
|
1780
1780
|
});
|
|
1781
1781
|
}).catch(function() {
|
|
1782
1782
|
R();
|
|
@@ -1806,35 +1806,35 @@ var nt = { exports: {} };
|
|
|
1806
1806
|
})(nt);
|
|
1807
1807
|
var vn = nt.exports;
|
|
1808
1808
|
const at = /* @__PURE__ */ rn(vn);
|
|
1809
|
-
let
|
|
1809
|
+
let le;
|
|
1810
1810
|
function lt() {
|
|
1811
|
-
const e =
|
|
1812
|
-
return
|
|
1811
|
+
const e = le == null ? void 0 : le.getEnv();
|
|
1812
|
+
return le == null ? e : (le[e] ?? le.development).localDbName ?? e;
|
|
1813
1813
|
}
|
|
1814
1814
|
function Wr() {
|
|
1815
|
-
const e =
|
|
1816
|
-
return console.log(`env var: ${e}`),
|
|
1815
|
+
const e = le == null ? void 0 : le.getEnv();
|
|
1816
|
+
return console.log(`env var: ${e}`), le == null ? "" : (le[e] ?? le.development).auth ?? "";
|
|
1817
1817
|
}
|
|
1818
1818
|
function gn(e) {
|
|
1819
|
-
const t =
|
|
1820
|
-
if (
|
|
1819
|
+
const t = le == null ? void 0 : le.getEnv();
|
|
1820
|
+
if (le == null)
|
|
1821
1821
|
return "";
|
|
1822
|
-
const l =
|
|
1822
|
+
const l = le[t] ?? le.development;
|
|
1823
1823
|
return e == null ? l.data ?? "" : l.other[e] ?? l.data ?? "";
|
|
1824
1824
|
}
|
|
1825
1825
|
function ha() {
|
|
1826
|
-
return
|
|
1826
|
+
return le;
|
|
1827
1827
|
}
|
|
1828
1828
|
function yn(e) {
|
|
1829
|
-
return
|
|
1829
|
+
return le = e, le;
|
|
1830
1830
|
}
|
|
1831
|
-
let
|
|
1831
|
+
let pe = null;
|
|
1832
1832
|
at.config({
|
|
1833
1833
|
name: lt()
|
|
1834
1834
|
});
|
|
1835
1835
|
function ve() {
|
|
1836
1836
|
const e = lt();
|
|
1837
|
-
return (
|
|
1837
|
+
return (pe == null || pe.config.name != e) && (pe = at.createInstance({ name: e })), pe;
|
|
1838
1838
|
}
|
|
1839
1839
|
function ma() {
|
|
1840
1840
|
async function e(s) {
|
|
@@ -1859,40 +1859,42 @@ function ma() {
|
|
|
1859
1859
|
saveAsync: S
|
|
1860
1860
|
};
|
|
1861
1861
|
}
|
|
1862
|
-
let
|
|
1862
|
+
let rr;
|
|
1863
1863
|
function va(e) {
|
|
1864
|
-
return
|
|
1864
|
+
return rr(e)();
|
|
1865
1865
|
}
|
|
1866
1866
|
function Le(e) {
|
|
1867
|
-
return
|
|
1867
|
+
return rr(e);
|
|
1868
1868
|
}
|
|
1869
1869
|
function wn(e) {
|
|
1870
|
-
return
|
|
1870
|
+
return rr = (t) => bn({
|
|
1871
1871
|
...e,
|
|
1872
1872
|
...t
|
|
1873
|
-
}),
|
|
1873
|
+
}), rr;
|
|
1874
1874
|
}
|
|
1875
1875
|
function bn(e) {
|
|
1876
|
-
var
|
|
1877
|
-
|
|
1876
|
+
var l, S, s, g, D;
|
|
1877
|
+
e.storeMode ?? (e.storeMode = ((S = (l = e.navigation) == null ? void 0 : l.findItem(e.nav)) == null ? void 0 : S.storeMode) ?? "session"), e.storageMode ?? (e.storageMode = ((g = (s = e.navigation) == null ? void 0 : s.findItem(e.nav)) == null ? void 0 : g.storageMode) ?? "local-cache"), e.storeName ?? (e.storeName = ((D = e.navigation) == null ? void 0 : D.findStoreName(e.nav)) ?? e.nav);
|
|
1878
|
+
const t = { ...e, storeName: e.storeName ?? "" };
|
|
1879
|
+
if (console.log("creating store def"), console.log(t), e.storeName == null)
|
|
1878
1880
|
throw new Error("no store name provided");
|
|
1879
1881
|
if (e.storeMode == "whole-last-updated") {
|
|
1880
1882
|
if (e.api == null)
|
|
1881
1883
|
throw new Error("Must supply an api object to use store");
|
|
1882
|
-
return qr(
|
|
1884
|
+
return qr(t);
|
|
1883
1885
|
} else if (e.storeMode == "partial-last-updated") {
|
|
1884
1886
|
if (e.api == null)
|
|
1885
1887
|
throw new Error("Must supply an api object to use store");
|
|
1886
|
-
return qr(
|
|
1888
|
+
return qr(t);
|
|
1887
1889
|
} else
|
|
1888
|
-
return An(
|
|
1890
|
+
return An(t);
|
|
1889
1891
|
}
|
|
1890
1892
|
const Sn = (e) => {
|
|
1891
|
-
let t =
|
|
1892
|
-
if (e.additionalUrl != null && (t == null ? t = e.additionalUrl : t =
|
|
1893
|
+
let t = Q(e.url) ?? void 0;
|
|
1894
|
+
if (e.additionalUrl != null && (t == null ? t = e.additionalUrl : t = Ue(t, e.additionalUrl)), e.id != null && (t != null && t.includes("{id}") ? t = t.replaceAll("{id}", e.id) : t = Ue(t, e.id)), e.params != null) {
|
|
1893
1895
|
t ?? (t = "");
|
|
1894
1896
|
let l = new URLSearchParams();
|
|
1895
|
-
Object.entries(e.params).sort(
|
|
1897
|
+
Object.entries(e.params).sort(Re.firstBy((s) => s[0])).forEach((s) => {
|
|
1896
1898
|
s[1] != null && l.append(s[0], s[1].toString());
|
|
1897
1899
|
}), t = `${t}?${l.toString()}`;
|
|
1898
1900
|
}
|
|
@@ -1902,15 +1904,15 @@ function An(e) {
|
|
|
1902
1904
|
return pr(e.storeName, () => {
|
|
1903
1905
|
var u;
|
|
1904
1906
|
const t = he.utc().toSeconds() / 86400, l = z({}), S = z({}), s = e.storageMode == "local-cache", g = e.buildUrl ?? ((u = e.api) == null ? void 0 : u.buildUrl) ?? Sn;
|
|
1905
|
-
function
|
|
1907
|
+
function D(r) {
|
|
1906
1908
|
var i, E;
|
|
1907
1909
|
let y = "";
|
|
1908
1910
|
const I = r.params ?? {};
|
|
1909
|
-
return I != null && (y = Object.entries(I).sort(
|
|
1911
|
+
return I != null && (y = Object.entries(I).sort(Re.firstBy((w) => w[0])).map((w) => `${w[0]}=${JSON.stringify(w[1])}`).join("&")), `${e.storeName ?? "base"}_${((i = e.auth) == null ? void 0 : i.credentials.value.userID) ?? "no-user-id"}_${r.id ?? ((E = r.data) == null ? void 0 : E.id) ?? "no-item-id"}_${y ?? "no-params"}`;
|
|
1910
1912
|
}
|
|
1911
1913
|
async function P(r) {
|
|
1912
1914
|
r.additionalUrl ?? (r.additionalUrl = "/getAll"), g(r);
|
|
1913
|
-
const y =
|
|
1915
|
+
const y = D(r), I = r.refresh;
|
|
1914
1916
|
if (!I && l.value[y] !== void 0)
|
|
1915
1917
|
return l.value[y];
|
|
1916
1918
|
if (!I && s == !0) {
|
|
@@ -1922,18 +1924,18 @@ function An(e) {
|
|
|
1922
1924
|
return l.value[y];
|
|
1923
1925
|
try {
|
|
1924
1926
|
let i = S.value[y];
|
|
1925
|
-
i == null && (i = new Promise(async (w,
|
|
1927
|
+
i == null && (i = new Promise(async (w, L) => {
|
|
1926
1928
|
var b;
|
|
1927
1929
|
try {
|
|
1928
|
-
const T = await ((b = e.api) == null ? void 0 : b.getAll(r)),
|
|
1930
|
+
const T = await ((b = e.api) == null ? void 0 : b.getAll(r)), x = {
|
|
1929
1931
|
meta: { storedOn: t.toString() },
|
|
1930
1932
|
data: T == null ? void 0 : T.data,
|
|
1931
1933
|
count: T == null ? void 0 : T.count,
|
|
1932
1934
|
filters: (T == null ? void 0 : T.filters) ?? []
|
|
1933
1935
|
};
|
|
1934
|
-
s == !0 && await ve().setItem(y,
|
|
1936
|
+
s == !0 && await ve().setItem(y, x), w(x);
|
|
1935
1937
|
} catch (T) {
|
|
1936
|
-
|
|
1938
|
+
L(T);
|
|
1937
1939
|
} finally {
|
|
1938
1940
|
delete S.value[y];
|
|
1939
1941
|
}
|
|
@@ -1950,7 +1952,7 @@ function An(e) {
|
|
|
1950
1952
|
}
|
|
1951
1953
|
async function _(r) {
|
|
1952
1954
|
r.additionalUrl ?? (r.additionalUrl = "/get"), g(r);
|
|
1953
|
-
const y =
|
|
1955
|
+
const y = D(r), I = r.refresh;
|
|
1954
1956
|
if (!I && l.value[y] !== void 0)
|
|
1955
1957
|
return l.value[y];
|
|
1956
1958
|
if (!I && s == !0) {
|
|
@@ -1962,17 +1964,17 @@ function An(e) {
|
|
|
1962
1964
|
return l.value[y];
|
|
1963
1965
|
try {
|
|
1964
1966
|
let i = S.value[y];
|
|
1965
|
-
i == null && (i = new Promise(async (w,
|
|
1967
|
+
i == null && (i = new Promise(async (w, L) => {
|
|
1966
1968
|
var b;
|
|
1967
1969
|
try {
|
|
1968
1970
|
let T = await ((b = e.api) == null ? void 0 : b.get(r));
|
|
1969
|
-
const
|
|
1971
|
+
const x = {
|
|
1970
1972
|
meta: { storedOn: t.toString() },
|
|
1971
1973
|
data: T == null ? void 0 : T.data
|
|
1972
1974
|
};
|
|
1973
|
-
s == !0 && await ve().setItem(y,
|
|
1975
|
+
s == !0 && await ve().setItem(y, x), w(x);
|
|
1974
1976
|
} catch (T) {
|
|
1975
|
-
|
|
1977
|
+
L(T);
|
|
1976
1978
|
} finally {
|
|
1977
1979
|
delete S.value[y];
|
|
1978
1980
|
}
|
|
@@ -1983,10 +1985,10 @@ function An(e) {
|
|
|
1983
1985
|
throw i;
|
|
1984
1986
|
}
|
|
1985
1987
|
}
|
|
1986
|
-
async function
|
|
1988
|
+
async function M(r) {
|
|
1987
1989
|
var i;
|
|
1988
1990
|
r.additionalUrl ?? (r.additionalUrl = "/patch"), g(r);
|
|
1989
|
-
const y =
|
|
1991
|
+
const y = D(r);
|
|
1990
1992
|
let I;
|
|
1991
1993
|
if (e.api != null)
|
|
1992
1994
|
try {
|
|
@@ -2002,21 +2004,21 @@ function An(e) {
|
|
|
2002
2004
|
meta: { storedOn: t.toString() },
|
|
2003
2005
|
data: { ...(i = l.value[y]) == null ? void 0 : i.data, ...I }
|
|
2004
2006
|
};
|
|
2005
|
-
return l.value[y] = E, s == !0 && await ve().setItem(y, E), I.id != null && I.rowVersion != null && Object.entries(l.value).forEach((
|
|
2006
|
-
const b =
|
|
2007
|
+
return l.value[y] = E, s == !0 && await ve().setItem(y, E), I.id != null && I.rowVersion != null && Object.entries(l.value).forEach((L) => {
|
|
2008
|
+
const b = L[1].data;
|
|
2007
2009
|
if (b != null)
|
|
2008
2010
|
if (Array.isArray(b))
|
|
2009
2011
|
for (let T = 0; T < b.length; T++)
|
|
2010
2012
|
b[T].id == I.id && b.splice(T, 1, E.data);
|
|
2011
2013
|
else
|
|
2012
|
-
b.id == I.id && (l.value[
|
|
2014
|
+
b.id == I.id && (l.value[L[0]] = E);
|
|
2013
2015
|
}), E.data;
|
|
2014
2016
|
}
|
|
2015
2017
|
return I;
|
|
2016
2018
|
}
|
|
2017
2019
|
async function $(r) {
|
|
2018
2020
|
r.additionalUrl ?? (r.additionalUrl = "/post"), g(r);
|
|
2019
|
-
const y =
|
|
2021
|
+
const y = D(r);
|
|
2020
2022
|
let I;
|
|
2021
2023
|
if (e.api != null)
|
|
2022
2024
|
try {
|
|
@@ -2039,7 +2041,7 @@ function An(e) {
|
|
|
2039
2041
|
async function d(r) {
|
|
2040
2042
|
var i;
|
|
2041
2043
|
r.additionalUrl ?? (r.additionalUrl = "/delete"), g(r);
|
|
2042
|
-
const y =
|
|
2044
|
+
const y = D(r);
|
|
2043
2045
|
if (e.api != null)
|
|
2044
2046
|
try {
|
|
2045
2047
|
let E = await e.api.deleteItem(r);
|
|
@@ -2051,11 +2053,11 @@ function An(e) {
|
|
|
2051
2053
|
delete l.value[y];
|
|
2052
2054
|
const I = ((i = r.data) == null ? void 0 : i.id) ?? r.id;
|
|
2053
2055
|
I != null && Object.entries(l.value).forEach((w) => {
|
|
2054
|
-
const
|
|
2055
|
-
if (
|
|
2056
|
-
if (Array.isArray(
|
|
2057
|
-
for (let b = 0; b <
|
|
2058
|
-
|
|
2056
|
+
const L = w[1].data;
|
|
2057
|
+
if (L != null)
|
|
2058
|
+
if (Array.isArray(L))
|
|
2059
|
+
for (let b = 0; b < L.length; b++)
|
|
2060
|
+
L[b].id == I && L.splice(b, 1);
|
|
2059
2061
|
else
|
|
2060
2062
|
delete l.value[w[0]];
|
|
2061
2063
|
}), s == !0 && await ve().removeItem(y);
|
|
@@ -2073,7 +2075,7 @@ function An(e) {
|
|
|
2073
2075
|
deleteItem: d,
|
|
2074
2076
|
get: _,
|
|
2075
2077
|
getAll: P,
|
|
2076
|
-
patch:
|
|
2078
|
+
patch: M,
|
|
2077
2079
|
post: $,
|
|
2078
2080
|
restore: h,
|
|
2079
2081
|
searchMemory: l
|
|
@@ -2083,12 +2085,12 @@ function An(e) {
|
|
|
2083
2085
|
}
|
|
2084
2086
|
function qr(e) {
|
|
2085
2087
|
return pr(e.storeName, () => {
|
|
2086
|
-
const t = z(), l = z(0), S = he.utc().toSeconds() / 3600, s = z(), g = z(),
|
|
2088
|
+
const t = z(), l = z(0), S = he.utc().toSeconds() / 3600, s = z(), g = z(), D = z({}), P = e.storageMode == "local-cache";
|
|
2087
2089
|
function _() {
|
|
2088
2090
|
var i;
|
|
2089
2091
|
return `${e.storeName}_${((i = e.auth) == null ? void 0 : i.credentials.value.userID) ?? "no-user-id"}`;
|
|
2090
2092
|
}
|
|
2091
|
-
async function
|
|
2093
|
+
async function M() {
|
|
2092
2094
|
P == !0 && await ve().setItem(_(), {
|
|
2093
2095
|
meta: g.value,
|
|
2094
2096
|
data: t.value,
|
|
@@ -2098,44 +2100,44 @@ function qr(e) {
|
|
|
2098
2100
|
}
|
|
2099
2101
|
function $(i) {
|
|
2100
2102
|
const E = _();
|
|
2101
|
-
return
|
|
2103
|
+
return D.value[E] || (D.value[E] = new Promise(async (w, L) => {
|
|
2102
2104
|
var b, T;
|
|
2103
2105
|
try {
|
|
2104
|
-
let
|
|
2106
|
+
let x = await ((T = e.api) == null ? void 0 : T.getAll({
|
|
2105
2107
|
additionalUrl: "/getAll",
|
|
2106
2108
|
nav: i.nav,
|
|
2107
2109
|
params: {
|
|
2108
2110
|
lastUpdate: ((b = g.value) == null ? void 0 : b.lastUpdate) ?? ln()
|
|
2109
2111
|
}
|
|
2110
2112
|
}));
|
|
2111
|
-
|
|
2112
|
-
var A,
|
|
2113
|
-
const f = t.value.findIndex((
|
|
2114
|
-
f >= 0 ? (A = t.value) == null || A.splice(f, 1,
|
|
2113
|
+
x == null ? L(x) : (t.value ?? (t.value = []), x.data.forEach((N) => {
|
|
2114
|
+
var A, j;
|
|
2115
|
+
const f = t.value.findIndex((X) => X.id == N.id);
|
|
2116
|
+
f >= 0 ? (A = t.value) == null || A.splice(f, 1, N) : (j = t.value) == null || j.push(N);
|
|
2115
2117
|
}), l.value = t.value.length, g.value = {
|
|
2116
2118
|
lastUpdate: he.utc().toString(),
|
|
2117
2119
|
storedOn: S.toString()
|
|
2118
|
-
}, await
|
|
2119
|
-
} catch (
|
|
2120
|
-
|
|
2120
|
+
}, await M(), w(x));
|
|
2121
|
+
} catch (x) {
|
|
2122
|
+
L(x);
|
|
2121
2123
|
} finally {
|
|
2122
|
-
delete
|
|
2124
|
+
delete D.value[E];
|
|
2123
2125
|
}
|
|
2124
|
-
})),
|
|
2126
|
+
})), D.value[E];
|
|
2125
2127
|
}
|
|
2126
2128
|
async function d(i) {
|
|
2127
|
-
var
|
|
2129
|
+
var L, b, T;
|
|
2128
2130
|
const E = _(), w = i.refresh;
|
|
2129
2131
|
if (!w && t.value != null)
|
|
2130
2132
|
return {
|
|
2131
|
-
count: (
|
|
2133
|
+
count: (L = t.value) == null ? void 0 : L.length,
|
|
2132
2134
|
data: t.value,
|
|
2133
2135
|
filters: []
|
|
2134
2136
|
};
|
|
2135
2137
|
if (!w && P == !0) {
|
|
2136
|
-
const
|
|
2137
|
-
if (
|
|
2138
|
-
return t.value =
|
|
2138
|
+
const x = await ve().getItem(E);
|
|
2139
|
+
if (x != null && parseFloat(x.meta.storedOn) > S - 7)
|
|
2140
|
+
return t.value = x.data, l.value = x.data.length, s.value = x.filters ?? [], g.value = x.meta, {
|
|
2139
2141
|
count: (b = t.value) == null ? void 0 : b.length,
|
|
2140
2142
|
data: t.value ?? [],
|
|
2141
2143
|
filters: []
|
|
@@ -2150,45 +2152,45 @@ function qr(e) {
|
|
|
2150
2152
|
t.value ?? (t.value = []);
|
|
2151
2153
|
try {
|
|
2152
2154
|
return await $(i);
|
|
2153
|
-
} catch (
|
|
2154
|
-
let
|
|
2155
|
-
throw new Error(
|
|
2155
|
+
} catch (x) {
|
|
2156
|
+
let N = x;
|
|
2157
|
+
throw new Error(N.message ?? "Problem");
|
|
2156
2158
|
}
|
|
2157
2159
|
}
|
|
2158
2160
|
async function h(i) {
|
|
2159
|
-
var b, T,
|
|
2161
|
+
var b, T, x, N;
|
|
2160
2162
|
const E = _(), w = i.id ?? ((b = i.data) == null ? void 0 : b.id);
|
|
2161
2163
|
if (w == null)
|
|
2162
2164
|
throw new Error("no id provided");
|
|
2163
|
-
let
|
|
2164
|
-
if (!
|
|
2165
|
+
let L = i.refresh;
|
|
2166
|
+
if (!L && t.value != null) {
|
|
2165
2167
|
const f = t.value.find((A) => A.id == w);
|
|
2166
2168
|
if (f != null)
|
|
2167
2169
|
return { data: f };
|
|
2168
2170
|
}
|
|
2169
|
-
if (!
|
|
2171
|
+
if (!L && P == !0) {
|
|
2170
2172
|
const f = await ve().getItem(E);
|
|
2171
2173
|
if (f != null && parseFloat(f.meta.storedOn) > S - 12) {
|
|
2172
2174
|
t.value = f.data, l.value = f.data.length, s.value = f.filters ?? [], g.value = f.meta;
|
|
2173
|
-
let A = (T = t.value) == null ? void 0 : T.find((
|
|
2175
|
+
let A = (T = t.value) == null ? void 0 : T.find((j) => j.id == i.id);
|
|
2174
2176
|
if (A != null)
|
|
2175
2177
|
return { data: A };
|
|
2176
2178
|
}
|
|
2177
2179
|
}
|
|
2178
2180
|
if (e.api == null)
|
|
2179
2181
|
return {
|
|
2180
|
-
data: (
|
|
2182
|
+
data: (x = t.value) == null ? void 0 : x.find((f) => f.id == i.id)
|
|
2181
2183
|
};
|
|
2182
2184
|
t.value ?? (t.value = []);
|
|
2183
2185
|
try {
|
|
2184
|
-
return await $(i), { data: (
|
|
2186
|
+
return await $(i), { data: (N = t.value) == null ? void 0 : N.find((f) => f.id == i.id) };
|
|
2185
2187
|
} catch (f) {
|
|
2186
2188
|
let A = f;
|
|
2187
2189
|
throw new Error(A.message ?? "Problem");
|
|
2188
2190
|
}
|
|
2189
2191
|
}
|
|
2190
2192
|
async function u(i) {
|
|
2191
|
-
var w,
|
|
2193
|
+
var w, L, b;
|
|
2192
2194
|
i.additionalUrl ?? (i.additionalUrl = "/patch");
|
|
2193
2195
|
let E;
|
|
2194
2196
|
if (e.api != null)
|
|
@@ -2196,19 +2198,19 @@ function qr(e) {
|
|
|
2196
2198
|
let T = await e.api.patch(i);
|
|
2197
2199
|
E = { ...i.data, ...T == null ? void 0 : T.data };
|
|
2198
2200
|
} catch (T) {
|
|
2199
|
-
let
|
|
2200
|
-
throw new Error(
|
|
2201
|
+
let x = T;
|
|
2202
|
+
throw new Error(x.message ?? "Patch Problem");
|
|
2201
2203
|
}
|
|
2202
2204
|
else
|
|
2203
2205
|
E = i.data;
|
|
2204
2206
|
if (E != null) {
|
|
2205
|
-
let T = (w = t.value) == null ? void 0 : w.findIndex((
|
|
2206
|
-
T != null && T >= 0 && (t.value ?? (t.value = []), (
|
|
2207
|
+
let T = (w = t.value) == null ? void 0 : w.findIndex((x) => x.id == E.id);
|
|
2208
|
+
T != null && T >= 0 && (t.value ?? (t.value = []), (L = t.value) == null || L.splice(T, 1, E), await M());
|
|
2207
2209
|
}
|
|
2208
2210
|
return (b = t.value) == null ? void 0 : b.find((T) => T.id == (i.id ?? i.data.id));
|
|
2209
2211
|
}
|
|
2210
2212
|
async function r(i) {
|
|
2211
|
-
var w,
|
|
2213
|
+
var w, L;
|
|
2212
2214
|
i.additionalUrl ?? (i.additionalUrl = "/post");
|
|
2213
2215
|
let E;
|
|
2214
2216
|
if (e.api != null)
|
|
@@ -2221,10 +2223,10 @@ function qr(e) {
|
|
|
2221
2223
|
}
|
|
2222
2224
|
else
|
|
2223
2225
|
E = i.data;
|
|
2224
|
-
return E != null && (t.value ?? (t.value = []), (w = t.value) == null || w.unshift(E), l.value += 1, await
|
|
2226
|
+
return E != null && (t.value ?? (t.value = []), (w = t.value) == null || w.unshift(E), l.value += 1, await M()), (L = t.value) == null ? void 0 : L.find((b) => b.id == (i.id ?? i.data.id));
|
|
2225
2227
|
}
|
|
2226
2228
|
async function y(i) {
|
|
2227
|
-
var w,
|
|
2229
|
+
var w, L;
|
|
2228
2230
|
if (i.additionalUrl ?? (i.additionalUrl = "/delete"), e.api != null)
|
|
2229
2231
|
try {
|
|
2230
2232
|
let b = await e.api.deleteItem(i);
|
|
@@ -2237,7 +2239,7 @@ function qr(e) {
|
|
|
2237
2239
|
const E = i.id ?? i.data.id;
|
|
2238
2240
|
if (E != null) {
|
|
2239
2241
|
let b = (w = t.value) == null ? void 0 : w.findIndex((T) => T.id == E);
|
|
2240
|
-
b != null && b >= 0 && (t.value ?? (t.value = []), (
|
|
2242
|
+
b != null && b >= 0 && (t.value ?? (t.value = []), (L = t.value) == null || L.splice(b, 1), await M());
|
|
2241
2243
|
}
|
|
2242
2244
|
}
|
|
2243
2245
|
async function I(i) {
|
|
@@ -2246,14 +2248,14 @@ function qr(e) {
|
|
|
2246
2248
|
try {
|
|
2247
2249
|
await e.api.patch(i);
|
|
2248
2250
|
} catch (w) {
|
|
2249
|
-
let
|
|
2250
|
-
throw new Error(
|
|
2251
|
+
let L = w;
|
|
2252
|
+
throw new Error(L.message ?? "Patch Problem");
|
|
2251
2253
|
}
|
|
2252
2254
|
try {
|
|
2253
2255
|
i.additionalUrl = "/getAll", await $(i);
|
|
2254
2256
|
} catch (w) {
|
|
2255
|
-
let
|
|
2256
|
-
throw new Error(
|
|
2257
|
+
let L = w;
|
|
2258
|
+
throw new Error(L.message ?? "Problem");
|
|
2257
2259
|
}
|
|
2258
2260
|
return (E = t.value) == null ? void 0 : E.find((w) => w.id == (i.id ?? i.data.id));
|
|
2259
2261
|
}
|
|
@@ -2272,7 +2274,7 @@ function Er() {
|
|
|
2272
2274
|
return Ar;
|
|
2273
2275
|
}
|
|
2274
2276
|
function En(e) {
|
|
2275
|
-
const t = (e == null ? void 0 : e.buildHeaders) ?? P, l = (e == null ? void 0 : e.buildQuery) ?? g, S = (e == null ? void 0 : e.buildUrl) ??
|
|
2277
|
+
const t = (e == null ? void 0 : e.buildHeaders) ?? P, l = (e == null ? void 0 : e.buildQuery) ?? g, S = (e == null ? void 0 : e.buildUrl) ?? D, s = e == null ? void 0 : e.demo;
|
|
2276
2278
|
function g(u) {
|
|
2277
2279
|
let r = new URLSearchParams();
|
|
2278
2280
|
return Object.entries(u).forEach((y) => {
|
|
@@ -2281,9 +2283,9 @@ function En(e) {
|
|
|
2281
2283
|
y[1] != null && r.append(y[0], y[1].toString());
|
|
2282
2284
|
}), r.toString();
|
|
2283
2285
|
}
|
|
2284
|
-
function
|
|
2285
|
-
let r =
|
|
2286
|
-
return r == null && (e == null ? void 0 : e.findPath) != null && (r = e.findPath(u.nav)), u.additionalUrl != null && (r == null ? r = u.additionalUrl : r =
|
|
2286
|
+
function D(u) {
|
|
2287
|
+
let r = Q(u.url) ?? void 0, y = Q(u.id);
|
|
2288
|
+
return r == null && (e == null ? void 0 : e.findPath) != null && (r = e.findPath(u.nav)), u.additionalUrl != null && (r == null ? r = u.additionalUrl : r = Ue(r, u.additionalUrl)), y != null && (r != null && r.includes("{id}") ? r = r.replaceAll("{id}", y) : r = Ue(r, y)), u.params != null && (r = `${r}?${l(u.params)}`), u.finalUrl = r, u.finalUrl ?? "";
|
|
2287
2289
|
}
|
|
2288
2290
|
function P(u) {
|
|
2289
2291
|
var y, I;
|
|
@@ -2310,22 +2312,22 @@ function En(e) {
|
|
|
2310
2312
|
name: "Unauthorized",
|
|
2311
2313
|
message: w.statusText
|
|
2312
2314
|
};
|
|
2313
|
-
let
|
|
2314
|
-
throw new Error(
|
|
2315
|
+
let L = await w.text();
|
|
2316
|
+
throw new Error(L ?? w.statusText ?? "Get error");
|
|
2315
2317
|
}
|
|
2316
2318
|
if (I)
|
|
2317
2319
|
return await w.text();
|
|
2318
2320
|
if (y)
|
|
2319
2321
|
return await w.json();
|
|
2320
2322
|
throw new Error();
|
|
2321
|
-
} catch (
|
|
2322
|
-
const b = `${(w == null ? void 0 : w.status) ?? ""} ${(w == null ? void 0 : w.statusText) ?? ""} ${
|
|
2323
|
+
} catch (L) {
|
|
2324
|
+
const b = `${(w == null ? void 0 : w.status) ?? ""} ${(w == null ? void 0 : w.statusText) ?? ""} ${L.message}`;
|
|
2323
2325
|
if (!r)
|
|
2324
2326
|
return;
|
|
2325
|
-
throw
|
|
2327
|
+
throw L.code == 401 ? L : new Error(b);
|
|
2326
2328
|
}
|
|
2327
2329
|
}
|
|
2328
|
-
async function
|
|
2330
|
+
async function M(u) {
|
|
2329
2331
|
const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, I = u.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
|
|
2330
2332
|
let i = u.finalUrl, E = u.headers;
|
|
2331
2333
|
if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (E = t(u)), s != null && s.isDemoing.value)
|
|
@@ -2345,19 +2347,19 @@ function En(e) {
|
|
|
2345
2347
|
name: "Unauthorized",
|
|
2346
2348
|
message: w.statusText
|
|
2347
2349
|
};
|
|
2348
|
-
let
|
|
2349
|
-
throw new Error(
|
|
2350
|
+
let L = await w.text();
|
|
2351
|
+
throw new Error(L ?? w.statusText ?? "Get all error");
|
|
2350
2352
|
}
|
|
2351
2353
|
if (I)
|
|
2352
2354
|
return await w.text();
|
|
2353
2355
|
if (y)
|
|
2354
2356
|
return await w.json();
|
|
2355
2357
|
throw new Error();
|
|
2356
|
-
} catch (
|
|
2357
|
-
const b = `${(w == null ? void 0 : w.status) ?? ""} ${(w == null ? void 0 : w.statusText) ?? ""} ${
|
|
2358
|
+
} catch (L) {
|
|
2359
|
+
const b = `${(w == null ? void 0 : w.status) ?? ""} ${(w == null ? void 0 : w.statusText) ?? ""} ${L.message}`;
|
|
2358
2360
|
if (!r)
|
|
2359
2361
|
return;
|
|
2360
|
-
throw
|
|
2362
|
+
throw L.code == 401 ? L : new Error(b);
|
|
2361
2363
|
}
|
|
2362
2364
|
}
|
|
2363
2365
|
async function $(u) {
|
|
@@ -2381,19 +2383,19 @@ function En(e) {
|
|
|
2381
2383
|
name: "Unauthorized",
|
|
2382
2384
|
message: w.statusText
|
|
2383
2385
|
};
|
|
2384
|
-
let
|
|
2385
|
-
throw new Error(
|
|
2386
|
+
let L = await w.text();
|
|
2387
|
+
throw new Error(L ?? w.statusText ?? "Post error!");
|
|
2386
2388
|
}
|
|
2387
2389
|
if (I)
|
|
2388
2390
|
return await w.text();
|
|
2389
2391
|
if (y)
|
|
2390
2392
|
return await w.json();
|
|
2391
2393
|
throw new Error();
|
|
2392
|
-
} catch (
|
|
2394
|
+
} catch (L) {
|
|
2393
2395
|
if (w.status == 200 || !r)
|
|
2394
2396
|
return;
|
|
2395
|
-
const b = `${(w == null ? void 0 : w.status) ?? ""} ${(w == null ? void 0 : w.statusText) ?? ""} ${
|
|
2396
|
-
throw
|
|
2397
|
+
const b = `${(w == null ? void 0 : w.status) ?? ""} ${(w == null ? void 0 : w.statusText) ?? ""} ${L.message}`;
|
|
2398
|
+
throw L.code == 401 ? L : new Error(b);
|
|
2397
2399
|
}
|
|
2398
2400
|
}
|
|
2399
2401
|
async function d(u) {
|
|
@@ -2417,19 +2419,19 @@ function En(e) {
|
|
|
2417
2419
|
name: "Unauthorized",
|
|
2418
2420
|
message: w.statusText
|
|
2419
2421
|
};
|
|
2420
|
-
let
|
|
2421
|
-
throw new Error(
|
|
2422
|
+
let L = await w.text();
|
|
2423
|
+
throw new Error(L ?? w.statusText ?? "Patch error!");
|
|
2422
2424
|
}
|
|
2423
2425
|
if (I)
|
|
2424
2426
|
return await w.text();
|
|
2425
2427
|
if (y)
|
|
2426
2428
|
return await w.json();
|
|
2427
2429
|
throw new Error();
|
|
2428
|
-
} catch (
|
|
2430
|
+
} catch (L) {
|
|
2429
2431
|
if (w.status == 200 || !r)
|
|
2430
2432
|
return;
|
|
2431
|
-
const b = `${(w == null ? void 0 : w.status) ?? ""} ${(w == null ? void 0 : w.statusText) ?? ""} ${
|
|
2432
|
-
throw
|
|
2433
|
+
const b = `${(w == null ? void 0 : w.status) ?? ""} ${(w == null ? void 0 : w.statusText) ?? ""} ${L.message}`;
|
|
2434
|
+
throw L.code == 401 ? L : new Error(b);
|
|
2433
2435
|
}
|
|
2434
2436
|
}
|
|
2435
2437
|
async function h(u) {
|
|
@@ -2466,13 +2468,13 @@ function En(e) {
|
|
|
2466
2468
|
buildUrl: S,
|
|
2467
2469
|
deleteItem: h,
|
|
2468
2470
|
get: _,
|
|
2469
|
-
getAll:
|
|
2471
|
+
getAll: M,
|
|
2470
2472
|
patch: d,
|
|
2471
2473
|
post: $
|
|
2472
2474
|
}, Ar;
|
|
2473
2475
|
}
|
|
2474
2476
|
function ut(e) {
|
|
2475
|
-
const { actionErrorMsg: t, actionLoadingMsg: l, clearErrors: S, isLoading: s, doAction: g, logError:
|
|
2477
|
+
const { actionErrorMsg: t, actionLoadingMsg: l, clearErrors: S, isLoading: s, doAction: g, logError: D } = en(e);
|
|
2476
2478
|
function P(r) {
|
|
2477
2479
|
r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.refresh ?? (r.refresh = e == null ? void 0 : e.refresh), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), r.confirmationMsg ?? (r.confirmationMsg = r.requireConfirmation === !0 ? "Are you sure you want to delete this item?" : void 0);
|
|
2478
2480
|
let y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
|
|
@@ -2482,11 +2484,11 @@ function ut(e) {
|
|
|
2482
2484
|
const i = r.id ?? ((w = r.data) == null ? void 0 : w.id);
|
|
2483
2485
|
if (i == null)
|
|
2484
2486
|
return Promise.resolve("No id found in delete action");
|
|
2485
|
-
const E = I.findIndex((
|
|
2487
|
+
const E = I.findIndex((L) => L.id == i);
|
|
2486
2488
|
return E >= 0 && I.splice(E, 1), Promise.resolve(void 0);
|
|
2487
2489
|
}), g(async () => {
|
|
2488
2490
|
let i;
|
|
2489
|
-
r.onCanDeleteAsync != null && (i = await r.onCanDeleteAsync(r.data)), i == null && r.onDeleteAsync != null && (i = await r.onDeleteAsync(r.data)), i == null && r.onDeleteSuccessAsync != null && await r.onDeleteSuccessAsync(r.data),
|
|
2491
|
+
r.onCanDeleteAsync != null && (i = await r.onCanDeleteAsync(r.data)), i == null && r.onDeleteAsync != null && (i = await r.onDeleteAsync(r.data)), i == null && r.onDeleteSuccessAsync != null && await r.onDeleteSuccessAsync(r.data), D(i);
|
|
2490
2492
|
}, {
|
|
2491
2493
|
completionMsg: r.completionMsg ?? (e == null ? void 0 : e.completionMsg),
|
|
2492
2494
|
confirmationMsg: r.confirmationMsg ?? (e == null ? void 0 : e.confirmationMsg),
|
|
@@ -2516,7 +2518,7 @@ function ut(e) {
|
|
|
2516
2518
|
throwError: r.throwError ?? (e == null ? void 0 : e.throwError)
|
|
2517
2519
|
});
|
|
2518
2520
|
}
|
|
2519
|
-
function
|
|
2521
|
+
function M(r) {
|
|
2520
2522
|
r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.refresh ?? (r.refresh = e == null ? void 0 : e.refresh), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), r.confirmationMsg ?? (r.confirmationMsg = r.requireConfirmation === !0 ? "Are you sure you want to get these items?" : void 0);
|
|
2521
2523
|
let y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
|
|
2522
2524
|
const I = (e == null ? void 0 : e.items) ?? [];
|
|
@@ -2537,7 +2539,7 @@ function ut(e) {
|
|
|
2537
2539
|
let y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
|
|
2538
2540
|
return y == null && r.nav != null && (y = Le({ nav: r.nav })), y != null && (r.onRestoreAsync ?? (r.onRestoreAsync = () => y().restore(r))), g(async () => {
|
|
2539
2541
|
let I, i;
|
|
2540
|
-
return r.onCanRestoreAsync != null && (I = await r.onCanRestoreAsync(r.data)), I == null && r.onRestoreAsync != null && (i = await r.onRestoreAsync(r.data)), i != null && r.onRestoreSuccessAsync != null && await r.onRestoreSuccessAsync(i),
|
|
2542
|
+
return r.onCanRestoreAsync != null && (I = await r.onCanRestoreAsync(r.data)), I == null && r.onRestoreAsync != null && (i = await r.onRestoreAsync(r.data)), i != null && r.onRestoreSuccessAsync != null && await r.onRestoreSuccessAsync(i), D(I), i;
|
|
2541
2543
|
}, {
|
|
2542
2544
|
completionMsg: r.completionMsg ?? (e == null ? void 0 : e.completionMsg),
|
|
2543
2545
|
confirmationMsg: r.confirmationMsg ?? (e == null ? void 0 : e.confirmationMsg),
|
|
@@ -2563,7 +2565,7 @@ function ut(e) {
|
|
|
2563
2565
|
return;
|
|
2564
2566
|
if (r.onCanSaveAsync != null) {
|
|
2565
2567
|
let w = await r.onCanSaveAsync(i);
|
|
2566
|
-
if (
|
|
2568
|
+
if (D(w), w != null)
|
|
2567
2569
|
return;
|
|
2568
2570
|
}
|
|
2569
2571
|
let E;
|
|
@@ -2591,10 +2593,10 @@ function ut(e) {
|
|
|
2591
2593
|
clearErrors: S,
|
|
2592
2594
|
deleteItem: P,
|
|
2593
2595
|
doAction: g,
|
|
2594
|
-
getAllItems:
|
|
2596
|
+
getAllItems: M,
|
|
2595
2597
|
getItem: _,
|
|
2596
2598
|
isLoading: s,
|
|
2597
|
-
logError:
|
|
2599
|
+
logError: D,
|
|
2598
2600
|
restoreItem: $,
|
|
2599
2601
|
saveItem: d
|
|
2600
2602
|
};
|
|
@@ -2612,177 +2614,177 @@ function Dn(e) {
|
|
|
2612
2614
|
l.value = Math.random().toString(36).substring(4, 19) + Math.random().toString(12).substring(1, 11), localStorage.setItem(Hr, l.value);
|
|
2613
2615
|
}
|
|
2614
2616
|
const s = Zt("auth-credentials", {});
|
|
2615
|
-
function g(
|
|
2616
|
-
if (
|
|
2617
|
+
function g(x) {
|
|
2618
|
+
if (x == null)
|
|
2617
2619
|
return !0;
|
|
2618
|
-
var
|
|
2619
|
-
if (
|
|
2620
|
+
var N = e.getAuthItem != null ? e.getAuthItem(x) : null;
|
|
2621
|
+
if (N == null)
|
|
2620
2622
|
return !1;
|
|
2621
|
-
if (
|
|
2623
|
+
if (N.requiresAuth === !1)
|
|
2622
2624
|
return !0;
|
|
2623
|
-
const f =
|
|
2624
|
-
if (f.isSuspended &&
|
|
2625
|
+
const f = Q(s);
|
|
2626
|
+
if (f.isSuspended && N.ignoreSuspension !== !0)
|
|
2625
2627
|
return !1;
|
|
2626
2628
|
if (f.isGlobalAdmin)
|
|
2627
2629
|
return !0;
|
|
2628
|
-
if (
|
|
2629
|
-
for (var A = 0; A <
|
|
2630
|
-
if (!
|
|
2630
|
+
if (N.permissions != null) {
|
|
2631
|
+
for (var A = 0; A < N.permissions.length; A++)
|
|
2632
|
+
if (!D(N.permissions[A]))
|
|
2631
2633
|
return !1;
|
|
2632
2634
|
}
|
|
2633
2635
|
return !0;
|
|
2634
2636
|
}
|
|
2635
|
-
function x
|
|
2636
|
-
const
|
|
2637
|
-
if (
|
|
2638
|
-
for (var f = 0; f <
|
|
2639
|
-
var A =
|
|
2640
|
-
if (
|
|
2637
|
+
function D(x) {
|
|
2638
|
+
const N = Q(s);
|
|
2639
|
+
if (N.userPermissions != null)
|
|
2640
|
+
for (var f = 0; f < N.userPermissions.length; f++) {
|
|
2641
|
+
var A = N.userPermissions[f].split(".");
|
|
2642
|
+
if (N.userPermissions[f] == "everything.edit" || x == A[0] && A.length > 1 && A[1] == "edit")
|
|
2641
2643
|
return !0;
|
|
2642
2644
|
}
|
|
2643
2645
|
return !1;
|
|
2644
2646
|
}
|
|
2645
|
-
function P(
|
|
2646
|
-
if (
|
|
2647
|
+
function P(x) {
|
|
2648
|
+
if (x == null)
|
|
2647
2649
|
return !0;
|
|
2648
|
-
var
|
|
2649
|
-
if (
|
|
2650
|
+
var N = e.getAuthItem != null ? e.getAuthItem(x) : null;
|
|
2651
|
+
if (N == null)
|
|
2650
2652
|
return !1;
|
|
2651
|
-
if (
|
|
2653
|
+
if (N.requiresAuth === !1)
|
|
2652
2654
|
return !0;
|
|
2653
|
-
const f =
|
|
2654
|
-
if (f.isSuspended &&
|
|
2655
|
+
const f = Q(s);
|
|
2656
|
+
if (f.isSuspended && N.ignoreSuspension !== !0)
|
|
2655
2657
|
return !1;
|
|
2656
2658
|
if (f.isGlobalAdmin)
|
|
2657
2659
|
return !0;
|
|
2658
|
-
if (
|
|
2659
|
-
for (var A = 0; A <
|
|
2660
|
-
if (!_(
|
|
2660
|
+
if (N.permissions != null) {
|
|
2661
|
+
for (var A = 0; A < N.permissions.length; A++)
|
|
2662
|
+
if (!_(N.permissions[A]))
|
|
2661
2663
|
return !1;
|
|
2662
2664
|
}
|
|
2663
2665
|
return !0;
|
|
2664
2666
|
}
|
|
2665
|
-
function _(
|
|
2666
|
-
const
|
|
2667
|
-
if (
|
|
2668
|
-
for (var f = 0; f <
|
|
2669
|
-
var A =
|
|
2670
|
-
if (
|
|
2667
|
+
function _(x) {
|
|
2668
|
+
const N = Q(s);
|
|
2669
|
+
if (N.userPermissions != null)
|
|
2670
|
+
for (var f = 0; f < N.userPermissions.length; f++) {
|
|
2671
|
+
var A = N.userPermissions[f].split(".");
|
|
2672
|
+
if (x == A[0] || x == "everything" || N.userPermissions[f] == "everything.view" || N.userPermissions[f] == "everything.edit")
|
|
2671
2673
|
return !0;
|
|
2672
2674
|
}
|
|
2673
2675
|
return !1;
|
|
2674
2676
|
}
|
|
2675
|
-
function
|
|
2677
|
+
function M(x, N, f) {
|
|
2676
2678
|
let A = !0;
|
|
2677
|
-
return
|
|
2678
|
-
f == "edit" ?
|
|
2679
|
-
}),
|
|
2679
|
+
return Q(s).isGlobalAdmin ? !0 : (N != null && N.length > 0 && N.forEach((X) => {
|
|
2680
|
+
f == "edit" ? D(X) || (A = !1) : _(X) || (A = !1);
|
|
2681
|
+
}), x != null && x.length > 0 && (x.some((X) => u(X)) || (A = !1)), A);
|
|
2680
2682
|
}
|
|
2681
|
-
function $(
|
|
2682
|
-
var f = e.getAuthItem != null ? e.getAuthItem(
|
|
2683
|
+
function $(x, N = !1) {
|
|
2684
|
+
var f = e.getAuthItem != null ? e.getAuthItem(x) : null;
|
|
2683
2685
|
let A = !1;
|
|
2684
2686
|
if (f == null)
|
|
2685
2687
|
return !1;
|
|
2686
|
-
let
|
|
2687
|
-
return
|
|
2688
|
-
$(
|
|
2688
|
+
let j = f.subscriptions ?? [], X = f.permissions ?? [], re = M(j, X, "view");
|
|
2689
|
+
return re || !N || !_e(f.children) ? re : ((f == null ? void 0 : f.children) != null && f.children.forEach((ue) => {
|
|
2690
|
+
$(ue, !0) && (A = !0);
|
|
2689
2691
|
}), A);
|
|
2690
2692
|
}
|
|
2691
|
-
function d(
|
|
2692
|
-
return e.getAuthorizeUrl ?? (e.getAuthorizeUrl = (
|
|
2693
|
-
const A =
|
|
2694
|
-
return
|
|
2695
|
-
}), e.getAuthorizeUrl != null ? e.getAuthorizeUrl(
|
|
2693
|
+
function d(x) {
|
|
2694
|
+
return e.getAuthorizeUrl ?? (e.getAuthorizeUrl = (N, f) => {
|
|
2695
|
+
const A = Ue(Wr(), `authorize?response_type=code&client_id=${e.oauthClientID}&redirect_uri=${window.location.origin}/authentication&state=${f}`);
|
|
2696
|
+
return N ? `${A}&redirect_path=${N}` : A;
|
|
2697
|
+
}), e.getAuthorizeUrl != null ? e.getAuthorizeUrl(x, l.value) ?? "" : "";
|
|
2696
2698
|
}
|
|
2697
|
-
function h(
|
|
2699
|
+
function h(x) {
|
|
2698
2700
|
var f;
|
|
2699
|
-
return
|
|
2701
|
+
return x == null ? 0 : ((f = (e.subscriptionOptions ?? []).find((A) => A.code == x)) == null ? void 0 : f.value) ?? 0;
|
|
2700
2702
|
}
|
|
2701
|
-
function u(
|
|
2702
|
-
const
|
|
2703
|
-
if (
|
|
2703
|
+
function u(x) {
|
|
2704
|
+
const N = Q(s);
|
|
2705
|
+
if (N.subscriptionCode == null)
|
|
2704
2706
|
return !1;
|
|
2705
|
-
if (
|
|
2707
|
+
if (N.subscriptionCode == x)
|
|
2706
2708
|
return !0;
|
|
2707
|
-
const f = h(
|
|
2709
|
+
const f = h(x), A = h(N.subscriptionCode);
|
|
2708
2710
|
return f <= A;
|
|
2709
2711
|
}
|
|
2710
|
-
function r(
|
|
2711
|
-
const f =
|
|
2712
|
-
atob(f).split("").map(function(
|
|
2713
|
-
return "%" + ("00" +
|
|
2712
|
+
function r(x) {
|
|
2713
|
+
const f = x.split(".")[1].replace(/-/g, "+").replace(/_/g, "/"), A = decodeURIComponent(
|
|
2714
|
+
atob(f).split("").map(function(j) {
|
|
2715
|
+
return "%" + ("00" + j.charCodeAt(0).toString(16)).slice(-2);
|
|
2714
2716
|
}).join("")
|
|
2715
2717
|
);
|
|
2716
2718
|
return JSON.parse(A);
|
|
2717
2719
|
}
|
|
2718
|
-
function y(
|
|
2719
|
-
s.value = void 0,
|
|
2720
|
+
function y(x, N) {
|
|
2721
|
+
s.value = void 0, L(), x != null && N != null && N.currentRoute.value.path != x && N.push({ path: x });
|
|
2720
2722
|
}
|
|
2721
|
-
function I(
|
|
2723
|
+
function I(x) {
|
|
2722
2724
|
var f;
|
|
2723
|
-
|
|
2725
|
+
Q(s).isLoggedIn || ((f = e.demo) == null || f.endDemo(), T() && (y(), window.location.href = d(x)));
|
|
2724
2726
|
}
|
|
2725
|
-
async function i(
|
|
2727
|
+
async function i(x, N) {
|
|
2726
2728
|
return e.getToken ?? (e.getToken = async () => {
|
|
2727
|
-
let f =
|
|
2729
|
+
let f = x, A = N, j = e.oauthGrantType ?? "authorization_token", X = e.oauthClientID ?? "";
|
|
2728
2730
|
if (f == null || A == null)
|
|
2729
2731
|
throw new Error("Code and State required in OAuth token process");
|
|
2730
2732
|
if (A != l.value)
|
|
2731
2733
|
throw new Error("state does not match");
|
|
2732
|
-
let
|
|
2733
|
-
e.getTokenUrl ?? (e.getTokenUrl = () =>
|
|
2734
|
-
const
|
|
2735
|
-
|
|
2736
|
-
const
|
|
2737
|
-
additionalUrl:
|
|
2738
|
-
data:
|
|
2734
|
+
let re = "";
|
|
2735
|
+
e.getTokenUrl ?? (e.getTokenUrl = () => Ue(Wr(), "token")), re = e.getTokenUrl(f, `${window.location.origin}/authentication`, j, X);
|
|
2736
|
+
const ue = {};
|
|
2737
|
+
ue.grant_type = j, ue.code = f, ue.redirect_uri = `${window.location.origin}/authentication`, ue.client_id = X;
|
|
2738
|
+
const G = await Er().post({
|
|
2739
|
+
additionalUrl: re,
|
|
2740
|
+
data: ue
|
|
2739
2741
|
});
|
|
2740
|
-
E(
|
|
2741
|
-
}), await e.getToken(
|
|
2742
|
+
E(G.access_token);
|
|
2743
|
+
}), await e.getToken(x, N);
|
|
2742
2744
|
}
|
|
2743
|
-
function E(
|
|
2744
|
-
if (
|
|
2745
|
-
const
|
|
2746
|
-
w(
|
|
2745
|
+
function E(x) {
|
|
2746
|
+
if (x != null && (e.demo == null || !e.demo.isDemoing.value)) {
|
|
2747
|
+
const N = r(x);
|
|
2748
|
+
w(N, x), e.processTokenPayload != null && e.processTokenPayload(s, N);
|
|
2747
2749
|
}
|
|
2748
2750
|
}
|
|
2749
|
-
function w(
|
|
2751
|
+
function w(x, N) {
|
|
2750
2752
|
var A;
|
|
2751
2753
|
const f = s.value;
|
|
2752
|
-
f.expiresOn =
|
|
2754
|
+
f.expiresOn = x.ExpiresOn, f.isGlobalAdmin = x.IsGlobalAdmin == "True", f.isLoggedIn = !0, f.permissions = x.Permissions, f.subscriptionCode = x.Subscription, f.timeZone ?? (f.timeZone = e.defaultTimeZone ?? hr), f.token = N, f.userID = x.UserLoginID, f.userPermissions = ((A = x.Permissions) == null ? void 0 : A.split(",")) ?? [];
|
|
2753
2755
|
}
|
|
2754
|
-
function
|
|
2755
|
-
var
|
|
2756
|
-
s.value ?? (s.value = {}), (
|
|
2756
|
+
function L() {
|
|
2757
|
+
var x;
|
|
2758
|
+
s.value ?? (s.value = {}), (x = s.value).timeZone ?? (x.timeZone = e.defaultTimeZone ?? hr);
|
|
2757
2759
|
}
|
|
2758
2760
|
function b() {
|
|
2759
|
-
const
|
|
2760
|
-
return
|
|
2761
|
+
const x = Q(s);
|
|
2762
|
+
return x.isLoggedIn && T() && (y(), window.location.href = d()), x.isLoggedIn;
|
|
2761
2763
|
}
|
|
2762
2764
|
function T() {
|
|
2763
|
-
const
|
|
2764
|
-
if (
|
|
2765
|
+
const x = Q(s);
|
|
2766
|
+
if (x == null || x.expiresOn == null)
|
|
2765
2767
|
return !0;
|
|
2766
|
-
const
|
|
2767
|
-
return
|
|
2768
|
+
const N = he.fromFormat(x.expiresOn, t), f = he.utc();
|
|
2769
|
+
return N <= f;
|
|
2768
2770
|
}
|
|
2769
|
-
return
|
|
2771
|
+
return L(), Ir = {
|
|
2770
2772
|
authState: l,
|
|
2771
2773
|
canEdit: g,
|
|
2772
|
-
canEditPermit:
|
|
2774
|
+
canEditPermit: D,
|
|
2773
2775
|
canView: P,
|
|
2774
2776
|
canViewPermit: _,
|
|
2775
2777
|
credentials: s,
|
|
2776
|
-
doShow:
|
|
2778
|
+
doShow: M,
|
|
2777
2779
|
doShowByNav: $,
|
|
2778
2780
|
getAuthorizeUrl: d,
|
|
2779
2781
|
getToken: i,
|
|
2780
|
-
isLoggedIn:
|
|
2782
|
+
isLoggedIn: ee(() => s.value.isLoggedIn === !0),
|
|
2781
2783
|
login: I,
|
|
2782
2784
|
logout: y,
|
|
2783
2785
|
resetAuthState: S,
|
|
2784
2786
|
setAuth: E,
|
|
2785
|
-
timeZone:
|
|
2787
|
+
timeZone: ee(() => s.value.timeZone ?? e.defaultTimeZone ?? hr),
|
|
2786
2788
|
tryLogin: b
|
|
2787
2789
|
}, Ir;
|
|
2788
2790
|
}
|
|
@@ -2791,62 +2793,62 @@ function xn(e, t, l = {}) {
|
|
|
2791
2793
|
preventDefault: S = !1,
|
|
2792
2794
|
stopPropagation: s = !1,
|
|
2793
2795
|
axis: g = "both"
|
|
2794
|
-
} = l,
|
|
2795
|
-
let P = { x: 0, y: 0 }, _ = { x: 0, y: 0 },
|
|
2796
|
-
function u(
|
|
2797
|
-
|
|
2796
|
+
} = l, D = { capture: l.capture ?? !0 };
|
|
2797
|
+
let P = { x: 0, y: 0 }, _ = { x: 0, y: 0 }, M = { x: 0, y: 0 }, $ = [], d = [], h = z(!1);
|
|
2798
|
+
function u(L) {
|
|
2799
|
+
Q(S) && L.preventDefault(), Q(s) && L.stopPropagation();
|
|
2798
2800
|
}
|
|
2799
|
-
function r(
|
|
2801
|
+
function r(L) {
|
|
2800
2802
|
var f;
|
|
2801
|
-
const b =
|
|
2803
|
+
const b = Q(e);
|
|
2802
2804
|
if (!b)
|
|
2803
2805
|
return;
|
|
2804
|
-
const T = b.$el,
|
|
2805
|
-
|
|
2806
|
+
const T = b.$el, N = L.type === "touchstart" && L.touches.length > 0 ? L.touches[0] : L;
|
|
2807
|
+
M = { x: N.clientX, y: N.clientY }, _ = {
|
|
2806
2808
|
x: T.offsetLeft,
|
|
2807
2809
|
y: T.offsetTop
|
|
2808
2810
|
}, P = {
|
|
2809
2811
|
x: T.offsetLeft,
|
|
2810
2812
|
y: T.offsetTop
|
|
2811
|
-
}, ((f = l.onStart) == null ? void 0 : f.call(l,
|
|
2813
|
+
}, ((f = l.onStart) == null ? void 0 : f.call(l, M, L)) !== !1 && (d.push(me("mousemove", y)), d.push(me("touchmove", y)), d.push(me("mouseup", I)), d.push(me("touchend", I)), u(L));
|
|
2812
2814
|
}
|
|
2813
|
-
function y(
|
|
2815
|
+
function y(L) {
|
|
2814
2816
|
var A;
|
|
2815
|
-
if (!
|
|
2817
|
+
if (!M || !Q(e))
|
|
2816
2818
|
return;
|
|
2817
|
-
const
|
|
2818
|
-
let
|
|
2819
|
-
(g === "x" || g === "both") && (P.x = _.x +
|
|
2819
|
+
const x = L.type === "touchmove" && L.touches.length > 0 ? L.touches[0] : L;
|
|
2820
|
+
let N = x.clientX - M.x, f = x.clientY - M.y;
|
|
2821
|
+
(g === "x" || g === "both") && (P.x = _.x + N), (g === "y" || g === "both") && (P.y = _.y + f), (A = l.onMove) == null || A.call(l, P, L), u(L), i(P);
|
|
2820
2822
|
}
|
|
2821
|
-
function I(
|
|
2823
|
+
function I(L) {
|
|
2822
2824
|
var b;
|
|
2823
2825
|
document.documentElement.style.cursor = "", d.forEach((T) => {
|
|
2824
2826
|
T();
|
|
2825
|
-
}), d.length = 0, (b = l.onEnd) == null || b.call(l, P,
|
|
2827
|
+
}), d.length = 0, (b = l.onEnd) == null || b.call(l, P, L), u(L);
|
|
2826
2828
|
}
|
|
2827
|
-
function i(
|
|
2828
|
-
const b =
|
|
2829
|
+
function i(L) {
|
|
2830
|
+
const b = Q(e);
|
|
2829
2831
|
if (!b)
|
|
2830
2832
|
return;
|
|
2831
2833
|
const T = b.$el;
|
|
2832
|
-
T.style.left = `${
|
|
2834
|
+
T.style.left = `${L.x}px`, T.style.top = `${L.y}px`;
|
|
2833
2835
|
}
|
|
2834
2836
|
function E() {
|
|
2835
|
-
if (
|
|
2837
|
+
if (Q(h))
|
|
2836
2838
|
return;
|
|
2837
|
-
const
|
|
2838
|
-
if (!
|
|
2839
|
+
const L = Q(t);
|
|
2840
|
+
if (!L)
|
|
2839
2841
|
return;
|
|
2840
|
-
const b =
|
|
2841
|
-
b.style.cursor = "move", $.push(me(b, "mousedown", r,
|
|
2842
|
+
const b = L.$el;
|
|
2843
|
+
b.style.cursor = "move", $.push(me(b, "mousedown", r, D)), $.push(me(b, "touchstart", r, D)), h.value = !0;
|
|
2842
2844
|
}
|
|
2843
2845
|
function w() {
|
|
2844
|
-
if (!
|
|
2846
|
+
if (!Q(h))
|
|
2845
2847
|
return;
|
|
2846
|
-
const
|
|
2847
|
-
if (!
|
|
2848
|
+
const L = Q(t);
|
|
2849
|
+
if (!L)
|
|
2848
2850
|
return;
|
|
2849
|
-
const b =
|
|
2851
|
+
const b = L.$el;
|
|
2850
2852
|
b.style.cursor = "", $.forEach((T) => {
|
|
2851
2853
|
T();
|
|
2852
2854
|
}), $.length = 0, h.value = !1;
|
|
@@ -2859,168 +2861,168 @@ function xn(e, t, l = {}) {
|
|
|
2859
2861
|
}
|
|
2860
2862
|
const Tn = ["t", "r", "b", "l", "tr", "br", "bl", "tl"];
|
|
2861
2863
|
function _n(e, t = {}) {
|
|
2862
|
-
let l, S = t.handleWidth ?? 12, s = t.handleZIndex ?? 100, g = t.minWidth ?? 0,
|
|
2864
|
+
let l, S = t.handleWidth ?? 12, s = t.handleZIndex ?? 100, g = t.minWidth ?? 0, D = t.maxWidth ?? Number.MAX_SAFE_INTEGER, P = t.minHeight ?? 0, _ = t.maxHeight ?? Number.MAX_SAFE_INTEGER, M = t.preventDefault ?? !1, $ = t.stopPropagation ?? !1, d, h = [];
|
|
2863
2865
|
const u = z(!1);
|
|
2864
2866
|
let r = [], y = [];
|
|
2865
2867
|
const I = z(!1), i = z({ x: 0, y: 0 });
|
|
2866
2868
|
let E = { left: 0, top: 0, height: 0, width: 0, position: "absolute" }, w = {};
|
|
2867
|
-
function
|
|
2868
|
-
|
|
2869
|
+
function L(G) {
|
|
2870
|
+
Ee(M) && G.preventDefault(), Ee($) && G.stopPropagation();
|
|
2869
2871
|
}
|
|
2870
|
-
function b(
|
|
2871
|
-
h = Y.map(
|
|
2872
|
+
function b(G, Y) {
|
|
2873
|
+
h = Y.map(x), h.forEach((H) => G.$el.appendChild(H));
|
|
2872
2874
|
}
|
|
2873
|
-
function T(
|
|
2874
|
-
h.forEach((Y) =>
|
|
2875
|
+
function T(G) {
|
|
2876
|
+
h.forEach((Y) => G.$el.removeChild(Y));
|
|
2875
2877
|
}
|
|
2876
|
-
function
|
|
2877
|
-
const Y = S + "px", H = -S / 2 + "px",
|
|
2878
|
-
return
|
|
2878
|
+
function x(G) {
|
|
2879
|
+
const Y = S + "px", H = -S / 2 + "px", ie = s + 1, Z = document.createElement("div");
|
|
2880
|
+
return Z.dataset.handle = G, Z.style.position = "absolute", Z.style.touchAction = "none", Z.style.userSelect = "none", Z.style.zIndex = (G.length === 1 ? s : ie).toString(), Z.style.cursor = j(G), G.includes("t") && (Z.style.top = H, Z.style.height = Y, G === "t" && (Z.style.left = "0", Z.style.width = "100%")), G.includes("b") && (Z.style.bottom = H, Z.style.height = Y, G === "b" && (Z.style.left = "0", Z.style.width = "100%")), G.includes("r") && (Z.style.right = H, Z.style.width = Y, G === "r" && (Z.style.top = "0", Z.style.height = "100%")), G.includes("l") && (Z.style.left = H, Z.style.width = Y, G === "l" && (Z.style.top = "0", Z.style.height = "100%")), Z;
|
|
2879
2881
|
}
|
|
2880
|
-
function
|
|
2882
|
+
function N(G) {
|
|
2881
2883
|
var ne;
|
|
2882
|
-
if (!h.some((
|
|
2884
|
+
if (!h.some((ce) => ce == G.target))
|
|
2883
2885
|
return;
|
|
2884
|
-
const Y =
|
|
2886
|
+
const Y = Ee(e);
|
|
2885
2887
|
if (!Y)
|
|
2886
2888
|
return;
|
|
2887
|
-
const H = Y.$el,
|
|
2888
|
-
if (i.value.x =
|
|
2889
|
+
const H = Y.$el, Z = G.type === "touchstart" && G.touches.length > 0 ? G.touches[0] : G;
|
|
2890
|
+
if (i.value.x = Z.clientX, i.value.y = Z.clientY, E = {
|
|
2889
2891
|
left: H.offsetLeft,
|
|
2890
2892
|
top: H.offsetTop,
|
|
2891
2893
|
height: parseInt(window.getComputedStyle(H).getPropertyValue("height")),
|
|
2892
2894
|
width: parseInt(window.getComputedStyle(H).getPropertyValue("width"))
|
|
2893
|
-
}, w =
|
|
2895
|
+
}, w = Nr(E), ((ne = t.onStart) == null ? void 0 : ne.call(t, i.value, G)) === !1)
|
|
2894
2896
|
return;
|
|
2895
|
-
let
|
|
2896
|
-
document.documentElement.style.cursor =
|
|
2897
|
+
let W = G.target;
|
|
2898
|
+
document.documentElement.style.cursor = j(W.dataset.handle), d = W.dataset.handle, y.push(me("mousemove", f)), y.push(me("mouseup", A)), y.push(me("touchmove", f)), y.push(me("touchend", A)), L(G);
|
|
2897
2899
|
}
|
|
2898
|
-
function f(
|
|
2899
|
-
const Y =
|
|
2900
|
+
function f(G) {
|
|
2901
|
+
const Y = Ee(e);
|
|
2900
2902
|
if (!Y)
|
|
2901
2903
|
return;
|
|
2902
|
-
const H = Y.$el,
|
|
2903
|
-
let
|
|
2904
|
-
const
|
|
2904
|
+
const H = Y.$el, Z = G.type === "touchmove" && G.touches.length > 0 ? G.touches[0] : G;
|
|
2905
|
+
let W = Z.clientX - i.value.x, ne = Z.clientY - i.value.y;
|
|
2906
|
+
const ce = Ee(E);
|
|
2905
2907
|
if (d.includes("t")) {
|
|
2906
|
-
const
|
|
2907
|
-
w.height =
|
|
2908
|
+
const se = Math.min(_, Math.max(P, (ce.height ?? 0) - ne));
|
|
2909
|
+
w.height = se, w.top = (ce.top ?? 0) + ne;
|
|
2908
2910
|
}
|
|
2909
2911
|
if (d.includes("b")) {
|
|
2910
|
-
const
|
|
2911
|
-
w.height =
|
|
2912
|
+
const se = Math.min(_, Math.max(P, (ce.height ?? 0) + ne));
|
|
2913
|
+
w.height = se;
|
|
2912
2914
|
}
|
|
2913
2915
|
if (d.includes("l")) {
|
|
2914
|
-
const
|
|
2915
|
-
w.width =
|
|
2916
|
+
const se = Math.min(D, Math.max(g, (ce.width ?? 0) - W));
|
|
2917
|
+
w.width = se, w.left = (ce.left ?? 0) + W;
|
|
2916
2918
|
}
|
|
2917
2919
|
if (d.includes("r")) {
|
|
2918
|
-
const
|
|
2919
|
-
w.width =
|
|
2920
|
+
const se = Math.min(D, Math.max(g, (ce.width ?? 0) + W));
|
|
2921
|
+
w.width = se;
|
|
2920
2922
|
}
|
|
2921
|
-
H.dispatchEvent(new CustomEvent("resize")),
|
|
2923
|
+
H.dispatchEvent(new CustomEvent("resize")), L(G), re(w);
|
|
2922
2924
|
}
|
|
2923
2925
|
function A() {
|
|
2924
|
-
document.documentElement.style.cursor = "", d = null, y.forEach((
|
|
2925
|
-
|
|
2926
|
+
document.documentElement.style.cursor = "", d = null, y.forEach((G) => {
|
|
2927
|
+
G();
|
|
2926
2928
|
}), y.length = 0;
|
|
2927
2929
|
}
|
|
2928
|
-
function
|
|
2930
|
+
function j(G) {
|
|
2929
2931
|
const Y = {
|
|
2930
2932
|
t: "n",
|
|
2931
2933
|
r: "e",
|
|
2932
2934
|
b: "s",
|
|
2933
2935
|
l: "w"
|
|
2934
2936
|
};
|
|
2935
|
-
return
|
|
2937
|
+
return G.split("").map((H) => Y[H]).join("") + "-resize";
|
|
2936
2938
|
}
|
|
2937
|
-
function
|
|
2938
|
-
const Y =
|
|
2939
|
+
function X(G) {
|
|
2940
|
+
const Y = Ee(e);
|
|
2939
2941
|
if (!Y)
|
|
2940
2942
|
return;
|
|
2941
2943
|
const H = Y.$el;
|
|
2942
|
-
if (console.log(l), l !== "page" &&
|
|
2943
|
-
const
|
|
2944
|
-
let
|
|
2945
|
-
if (
|
|
2946
|
-
const ne = window.getComputedStyle(
|
|
2947
|
-
|
|
2944
|
+
if (console.log(l), l !== "page" && G == "page") {
|
|
2945
|
+
const ie = Jt(H), Z = Ee(ie) ?? null;
|
|
2946
|
+
let W = 0;
|
|
2947
|
+
if (Z != null) {
|
|
2948
|
+
const ne = window.getComputedStyle(Z);
|
|
2949
|
+
W = parseInt(ne.getPropertyValue("width")) - Z.offsetLeft;
|
|
2948
2950
|
}
|
|
2949
|
-
H.style.transition = "width 0.5s, height 0.5s, top 0.5s, left 0.5s", H.offsetHeight, u.value = !0,
|
|
2951
|
+
H.style.transition = "width 0.5s, height 0.5s, top 0.5s, left 0.5s", H.offsetHeight, u.value = !0, re({
|
|
2950
2952
|
height: void 0,
|
|
2951
|
-
width:
|
|
2953
|
+
width: W,
|
|
2952
2954
|
top: 0,
|
|
2953
2955
|
left: 0,
|
|
2954
2956
|
position: void 0
|
|
2955
2957
|
}), me(H, "transitionend", () => {
|
|
2956
2958
|
H.style.width = "auto", H.style.top = "", H.style.left = "", H.style.position = "", H.style.transition = "", u.value = !1;
|
|
2957
2959
|
}, { once: !0 });
|
|
2958
|
-
} else if ((l == "page" || Y.$el.style.position !== "absolute") &&
|
|
2960
|
+
} else if ((l == "page" || Y.$el.style.position !== "absolute") && G !== "page") {
|
|
2959
2961
|
H.style.transition = "width 0.5s, height 0.5s, top 0.5s, left 0.5s", u.value = !0, E = {
|
|
2960
2962
|
height: parseInt(window.getComputedStyle(H).getPropertyValue("height")),
|
|
2961
2963
|
width: parseInt(window.getComputedStyle(H).getPropertyValue("width")),
|
|
2962
2964
|
top: H.offsetTop,
|
|
2963
2965
|
left: H.offsetLeft,
|
|
2964
2966
|
position: "absolute"
|
|
2965
|
-
},
|
|
2966
|
-
const
|
|
2967
|
-
|
|
2968
|
-
height:
|
|
2969
|
-
width: (
|
|
2970
|
-
top: (
|
|
2971
|
-
left: (
|
|
2967
|
+
}, re(E), H.offsetHeight;
|
|
2968
|
+
const ie = E;
|
|
2969
|
+
G == "freestyle" ? w = {
|
|
2970
|
+
height: ie.height,
|
|
2971
|
+
width: (ie.width ?? 100) / 2,
|
|
2972
|
+
top: (ie.top ?? 0) + 2,
|
|
2973
|
+
left: (ie.left ?? 0) + 2,
|
|
2972
2974
|
position: "absolute"
|
|
2973
|
-
} :
|
|
2974
|
-
height:
|
|
2975
|
-
width: (
|
|
2976
|
-
top: (
|
|
2977
|
-
left: (
|
|
2975
|
+
} : G == "blade" && (w = {
|
|
2976
|
+
height: ie.height,
|
|
2977
|
+
width: (ie.width ?? 100) / 2,
|
|
2978
|
+
top: (ie.top ?? 0) + 2,
|
|
2979
|
+
left: (ie.left ?? 0) + 2,
|
|
2978
2980
|
position: "absolute"
|
|
2979
|
-
}),
|
|
2981
|
+
}), re(w), me(H, "transitionend", () => {
|
|
2980
2982
|
H.style.transition = "", u.value = !1;
|
|
2981
2983
|
}, { once: !0 });
|
|
2982
2984
|
}
|
|
2983
2985
|
}
|
|
2984
|
-
function
|
|
2985
|
-
const Y =
|
|
2986
|
+
function re(G) {
|
|
2987
|
+
const Y = Ee(e);
|
|
2986
2988
|
if (!Y)
|
|
2987
2989
|
return;
|
|
2988
2990
|
const H = Y.$el;
|
|
2989
|
-
|
|
2991
|
+
G.top ? H.style.top = `${G.top}px` : H.style.top = void 0, G.left ? H.style.left = `${G.left}px` : H.style.left = void 0, G.height ? H.style.height = `${G.height}px` : H.style.height = void 0, G.width ? H.style.width = `${G.width}px` : H.style.width = void 0, G.position ? H.style.position = `${G.position}` : H.style.position = void 0, console.log(H.style.position);
|
|
2990
2992
|
}
|
|
2991
|
-
function
|
|
2993
|
+
function ue(G, Y) {
|
|
2992
2994
|
if (I.value)
|
|
2993
2995
|
return;
|
|
2994
|
-
const H =
|
|
2995
|
-
H && (b(H,
|
|
2996
|
+
const H = Ee(e);
|
|
2997
|
+
H && (b(H, G ?? Tn), X(Y), r.push(me(H.$el, "mousedown", N)), r.push(me(H.$el, "touchstart", N)), I.value = !0, l = Y);
|
|
2996
2998
|
}
|
|
2997
|
-
function
|
|
2999
|
+
function be(G) {
|
|
2998
3000
|
if (!I.value)
|
|
2999
3001
|
return;
|
|
3000
|
-
const Y =
|
|
3001
|
-
Y && (T(Y),
|
|
3002
|
+
const Y = Ee(e);
|
|
3003
|
+
Y && (T(Y), X(G), r.forEach((H) => {
|
|
3002
3004
|
H();
|
|
3003
3005
|
}), r.length = 0, I.value = !1);
|
|
3004
3006
|
}
|
|
3005
3007
|
return {
|
|
3006
3008
|
resizingIsOn: I,
|
|
3007
|
-
turnResizingOn:
|
|
3008
|
-
turnResizingOff:
|
|
3009
|
+
turnResizingOn: ue,
|
|
3010
|
+
turnResizingOff: be
|
|
3009
3011
|
};
|
|
3010
3012
|
}
|
|
3011
3013
|
function Cn(e) {
|
|
3012
|
-
const t = (e == null ? void 0 : e.blade) ?? z(null), l = (e == null ? void 0 : e.handle) ?? z(null), S = z(!1), s = (e == null ? void 0 : e.mobileBreakpoint) ?? 500, g = z((e == null ? void 0 : e.defaultVariant) ?? "page"),
|
|
3014
|
+
const t = (e == null ? void 0 : e.blade) ?? z(null), l = (e == null ? void 0 : e.handle) ?? z(null), S = z(!1), s = (e == null ? void 0 : e.mobileBreakpoint) ?? 500, g = z((e == null ? void 0 : e.defaultVariant) ?? "page"), D = z({}), { turnResizingOff: P, turnResizingOn: _ } = _n(t), { turnDraggableOff: M, turnDraggableOn: $ } = xn(t, l);
|
|
3013
3015
|
jt(t, (h) => {
|
|
3014
3016
|
const u = h[0], { width: r } = u.contentRect;
|
|
3015
3017
|
S.value = r < s;
|
|
3016
3018
|
});
|
|
3017
3019
|
function d(h) {
|
|
3018
|
-
|
|
3020
|
+
M(), h == "page" ? P(h) : h == "blade" ? _(["l", "r"], h) : h == "freestyle" ? (P(), _(void 0, h), $()) : h == "inline" && P();
|
|
3019
3021
|
}
|
|
3020
3022
|
return d(g.value), Te(g, (h) => d(h)), {
|
|
3021
3023
|
isMobile: S,
|
|
3022
3024
|
variant: g,
|
|
3023
|
-
bladeData:
|
|
3025
|
+
bladeData: D
|
|
3024
3026
|
};
|
|
3025
3027
|
}
|
|
3026
3028
|
const mr = {
|
|
@@ -3090,7 +3092,7 @@ function Pn(e) {
|
|
|
3090
3092
|
}
|
|
3091
3093
|
}));
|
|
3092
3094
|
}
|
|
3093
|
-
function
|
|
3095
|
+
function D(d) {
|
|
3094
3096
|
var h;
|
|
3095
3097
|
if (l != null) {
|
|
3096
3098
|
const u = l.themes.value.dark, r = l.themes.value.light;
|
|
@@ -3103,7 +3105,7 @@ function Pn(e) {
|
|
|
3103
3105
|
function _() {
|
|
3104
3106
|
t.value.drawerStick = !t.value.drawerStick;
|
|
3105
3107
|
}
|
|
3106
|
-
function
|
|
3108
|
+
function M() {
|
|
3107
3109
|
t.value.theme = t.value.theme == "dark" ? "light" : "dark", l != null && (l.global.name.value = t.value.theme);
|
|
3108
3110
|
}
|
|
3109
3111
|
function $() {
|
|
@@ -3118,17 +3120,17 @@ function Pn(e) {
|
|
|
3118
3120
|
}), Dr = {
|
|
3119
3121
|
state: t,
|
|
3120
3122
|
resetCosmetics: g,
|
|
3121
|
-
setTemporaryColor:
|
|
3123
|
+
setTemporaryColor: D,
|
|
3122
3124
|
toggleDrawer: P,
|
|
3123
3125
|
toggleDrawerStick: _,
|
|
3124
|
-
toggleLightDark:
|
|
3126
|
+
toggleLightDark: M,
|
|
3125
3127
|
undoTemporaryColor: $
|
|
3126
3128
|
}, Dr;
|
|
3127
3129
|
}
|
|
3128
3130
|
const wa = {
|
|
3129
3131
|
canExportCSV: !1
|
|
3130
3132
|
};
|
|
3131
|
-
function
|
|
3133
|
+
function Mn() {
|
|
3132
3134
|
function e(t) {
|
|
3133
3135
|
const {
|
|
3134
3136
|
items: l,
|
|
@@ -3138,29 +3140,29 @@ function Nn() {
|
|
|
3138
3140
|
} = t;
|
|
3139
3141
|
if (!_e(l))
|
|
3140
3142
|
return;
|
|
3141
|
-
let
|
|
3142
|
-
S != null ?
|
|
3143
|
+
let D = [];
|
|
3144
|
+
S != null ? D = S == null ? void 0 : S.filter((I) => (I.csv ?? I.csvText ?? I.csvFilter ?? I.csvArray) != null).map((I) => ({
|
|
3143
3145
|
header: I.title ?? I.value ?? "",
|
|
3144
3146
|
itemText: I.itemText,
|
|
3145
3147
|
value: I.value
|
|
3146
|
-
})) :
|
|
3148
|
+
})) : D = Object.keys(l[0]).map((I) => ({ header: tn(I) ?? "", value: I })), D = D.filter((I) => I.header.length > 0);
|
|
3147
3149
|
var P = [];
|
|
3148
3150
|
for (let I = 0; I < l.length; I++) {
|
|
3149
3151
|
const i = l[I];
|
|
3150
|
-
var _ = {},
|
|
3151
|
-
for (let E = 0; E <
|
|
3152
|
-
const w =
|
|
3152
|
+
var _ = {}, M = [];
|
|
3153
|
+
for (let E = 0; E < D.length; E++) {
|
|
3154
|
+
const w = D[E];
|
|
3153
3155
|
var $ = null;
|
|
3154
3156
|
typeof w.value == "function" ? $ = w.value(i) : typeof w.value == "string" && ($ = Sr(i, w.value)), w.itemText != null ? _[w.header] = Sr($, w.itemText) : _[w.header] = $;
|
|
3155
3157
|
}
|
|
3156
|
-
P.push(_), _e(
|
|
3158
|
+
P.push(_), _e(M) && M.forEach((E) => {
|
|
3157
3159
|
P.push(E);
|
|
3158
|
-
}),
|
|
3160
|
+
}), M = [];
|
|
3159
3161
|
}
|
|
3160
3162
|
var d = [];
|
|
3161
|
-
if (d.push(
|
|
3163
|
+
if (d.push(D.map((I) => I.header).toString()), P.forEach((I) => {
|
|
3162
3164
|
let i = [];
|
|
3163
|
-
|
|
3165
|
+
D.forEach(function(E) {
|
|
3164
3166
|
var w = I[E.header];
|
|
3165
3167
|
i.push(w ?? "");
|
|
3166
3168
|
}), d.push(i.join(","));
|
|
@@ -3185,7 +3187,7 @@ let xr;
|
|
|
3185
3187
|
function ba() {
|
|
3186
3188
|
return xr;
|
|
3187
3189
|
}
|
|
3188
|
-
function
|
|
3190
|
+
function Ln(e) {
|
|
3189
3191
|
const t = e.getUTC ?? he.utc;
|
|
3190
3192
|
function l() {
|
|
3191
3193
|
return s().startOf("day").toUTC().toString() ?? "";
|
|
@@ -3193,28 +3195,28 @@ function Mn(e) {
|
|
|
3193
3195
|
function S() {
|
|
3194
3196
|
return s().startOf("day").plus({ day: 1 }).toUTC().toString() ?? "";
|
|
3195
3197
|
}
|
|
3196
|
-
function s(_,
|
|
3197
|
-
return _ == null ? t().setZone(e.getTimeZone()) :
|
|
3198
|
+
function s(_, M) {
|
|
3199
|
+
return _ == null ? t().setZone(e.getTimeZone()) : M ? he.fromFormat(_, M, { zone: e.getTimeZone() }) : he.fromISO(_, { zone: e.getTimeZone() });
|
|
3198
3200
|
}
|
|
3199
|
-
function g(_,
|
|
3201
|
+
function g(_, M, $) {
|
|
3200
3202
|
if (_ == null) {
|
|
3201
3203
|
const h = t().setZone(e.getTimeZone());
|
|
3202
|
-
return
|
|
3204
|
+
return M ? h.toFormat(M) : h.toString();
|
|
3203
3205
|
}
|
|
3204
3206
|
if (_ == "Invalid DateTime")
|
|
3205
3207
|
return "";
|
|
3206
3208
|
const d = $ ? he.fromFormat(_, $, { zone: e.getTimeZone() }) : he.fromISO(_, { zone: e.getTimeZone() });
|
|
3207
|
-
return
|
|
3209
|
+
return M ? d.toFormat(M) : d == null ? void 0 : d.toString();
|
|
3208
3210
|
}
|
|
3209
|
-
function
|
|
3210
|
-
return _ == null ? t() :
|
|
3211
|
+
function D(_, M) {
|
|
3212
|
+
return _ == null ? t() : M ? he.fromFormat(_, M) : he.fromISO(_);
|
|
3211
3213
|
}
|
|
3212
|
-
function P(_,
|
|
3214
|
+
function P(_, M, $) {
|
|
3213
3215
|
if (_ == null)
|
|
3214
|
-
return
|
|
3216
|
+
return M ? t().toFormat(M) : t().toString();
|
|
3215
3217
|
{
|
|
3216
3218
|
const d = $ ? he.fromFormat(_, $) : he.fromISO(_);
|
|
3217
|
-
return
|
|
3219
|
+
return M ? d.toFormat(M) : d.toString();
|
|
3218
3220
|
}
|
|
3219
3221
|
}
|
|
3220
3222
|
return xr = {
|
|
@@ -3222,7 +3224,7 @@ function Mn(e) {
|
|
|
3222
3224
|
getTomorrow: S,
|
|
3223
3225
|
tzDate: s,
|
|
3224
3226
|
tzString: g,
|
|
3225
|
-
utcDate:
|
|
3227
|
+
utcDate: D,
|
|
3226
3228
|
utcString: P
|
|
3227
3229
|
}, xr;
|
|
3228
3230
|
}
|
|
@@ -3230,7 +3232,7 @@ let Tr;
|
|
|
3230
3232
|
function Sa() {
|
|
3231
3233
|
return Tr;
|
|
3232
3234
|
}
|
|
3233
|
-
function
|
|
3235
|
+
function Nn(e) {
|
|
3234
3236
|
const t = z(!1), l = (e == null ? void 0 : e.apis) ?? [];
|
|
3235
3237
|
function S() {
|
|
3236
3238
|
t.value = !0;
|
|
@@ -3246,7 +3248,7 @@ function Ln(e) {
|
|
|
3246
3248
|
}
|
|
3247
3249
|
return h == null && (h = l.find((u) => Array.isArray(u.nav) ? u.nav.some((r) => r == d.nav) : u.nav == d.nav)), h;
|
|
3248
3250
|
}
|
|
3249
|
-
function
|
|
3251
|
+
function D(d) {
|
|
3250
3252
|
var r;
|
|
3251
3253
|
if (l == null)
|
|
3252
3254
|
return Promise.resolve("no demo data available for this api");
|
|
@@ -3290,7 +3292,7 @@ function Ln(e) {
|
|
|
3290
3292
|
});
|
|
3291
3293
|
});
|
|
3292
3294
|
}
|
|
3293
|
-
function
|
|
3295
|
+
function M(d) {
|
|
3294
3296
|
var r, y;
|
|
3295
3297
|
if (l == null)
|
|
3296
3298
|
throw new Error("no demo data available for this api");
|
|
@@ -3331,10 +3333,10 @@ function Ln(e) {
|
|
|
3331
3333
|
isDemoing: t,
|
|
3332
3334
|
startDemo: S,
|
|
3333
3335
|
data: l,
|
|
3334
|
-
deleteItem:
|
|
3336
|
+
deleteItem: D,
|
|
3335
3337
|
get: P,
|
|
3336
3338
|
getAll: _,
|
|
3337
|
-
post:
|
|
3339
|
+
post: M,
|
|
3338
3340
|
patch: $
|
|
3339
3341
|
}, Tr;
|
|
3340
3342
|
}
|
|
@@ -3347,8 +3349,8 @@ function Aa(e) {
|
|
|
3347
3349
|
document.title = S.meta.title;
|
|
3348
3350
|
else {
|
|
3349
3351
|
const g = Rn.VITE_NODE_ENV;
|
|
3350
|
-
let
|
|
3351
|
-
g == "development" ?
|
|
3352
|
+
let D = "";
|
|
3353
|
+
g == "development" ? D = "BWeb Dev" : g == "staging" ? D = "BlitzIt Sandpit" : D = "BlitzIt Web | Cloud-Based Wholesale Logistics Platform", ((s = e == null ? void 0 : e.demo) == null ? void 0 : s.isDemoing.value) == !0 && (D = `Training: ${D}`), document.title = D;
|
|
3352
3354
|
}
|
|
3353
3355
|
}
|
|
3354
3356
|
return {
|
|
@@ -3360,8 +3362,8 @@ function Ea() {
|
|
|
3360
3362
|
return _r;
|
|
3361
3363
|
}
|
|
3362
3364
|
function Un(e) {
|
|
3363
|
-
function t(f, A,
|
|
3364
|
-
return f ? an(f) ?
|
|
3365
|
+
function t(f, A, j) {
|
|
3366
|
+
return f ? an(f) ? j ?? "" : e.dates.tzString(f, A) : j ?? f ?? "";
|
|
3365
3367
|
}
|
|
3366
3368
|
function l(f) {
|
|
3367
3369
|
if (!f)
|
|
@@ -3387,7 +3389,7 @@ function Un(e) {
|
|
|
3387
3389
|
function g(f, A) {
|
|
3388
3390
|
return t(f, "d LLL", A);
|
|
3389
3391
|
}
|
|
3390
|
-
function
|
|
3392
|
+
function D(f, A) {
|
|
3391
3393
|
return t(f, "ccc", A);
|
|
3392
3394
|
}
|
|
3393
3395
|
function P(f, A) {
|
|
@@ -3396,7 +3398,7 @@ function Un(e) {
|
|
|
3396
3398
|
function _(f, A) {
|
|
3397
3399
|
return t(f, "ccc dd LLL @ hh:mm a", A);
|
|
3398
3400
|
}
|
|
3399
|
-
function
|
|
3401
|
+
function M(f) {
|
|
3400
3402
|
return new Intl.NumberFormat().format(f);
|
|
3401
3403
|
}
|
|
3402
3404
|
function $(f) {
|
|
@@ -3441,7 +3443,7 @@ function Un(e) {
|
|
|
3441
3443
|
function w(f, A) {
|
|
3442
3444
|
return t(f, "dd LLL yyyy", A);
|
|
3443
3445
|
}
|
|
3444
|
-
function
|
|
3446
|
+
function L(f, A) {
|
|
3445
3447
|
return t(f, "dd LLL yyyy hh:mm a", A);
|
|
3446
3448
|
}
|
|
3447
3449
|
function b(f, A) {
|
|
@@ -3450,15 +3452,15 @@ function Un(e) {
|
|
|
3450
3452
|
function T(f) {
|
|
3451
3453
|
return f == null ? "" : typeof f == "number" ? e.dates.tzDate().startOf("day").plus({ minutes: f }).toFormat("T") : typeof f == "string" ? e.dates.tzString(f, "t") : "unknown";
|
|
3452
3454
|
}
|
|
3453
|
-
const
|
|
3455
|
+
const x = {
|
|
3454
3456
|
toCompanyNameAndLocationLine: l,
|
|
3455
3457
|
toCurrency: S,
|
|
3456
3458
|
toDayDate: s,
|
|
3457
3459
|
toDayMonth: g,
|
|
3458
|
-
toDayOfWeek:
|
|
3460
|
+
toDayOfWeek: D,
|
|
3459
3461
|
toDayShortDate: P,
|
|
3460
3462
|
toDayShortDateAndTime: _,
|
|
3461
|
-
toDisplayNumber:
|
|
3463
|
+
toDisplayNumber: M,
|
|
3462
3464
|
toDisplayNumberOver: $,
|
|
3463
3465
|
toDisplayNumberSigned: d,
|
|
3464
3466
|
toFormat: h,
|
|
@@ -3469,199 +3471,203 @@ function Un(e) {
|
|
|
3469
3471
|
toPercent: i,
|
|
3470
3472
|
toPrettyCSV: E,
|
|
3471
3473
|
toShortDate: w,
|
|
3472
|
-
toShortDateAndTime:
|
|
3474
|
+
toShortDateAndTime: L,
|
|
3473
3475
|
toTime: b,
|
|
3474
3476
|
toTimeOfDay: T
|
|
3475
3477
|
};
|
|
3476
|
-
function
|
|
3478
|
+
function N(f) {
|
|
3477
3479
|
if (f != null) {
|
|
3478
3480
|
let A = f;
|
|
3479
|
-
if (A != null &&
|
|
3480
|
-
return
|
|
3481
|
+
if (A != null && x[A] != null)
|
|
3482
|
+
return x[A];
|
|
3481
3483
|
}
|
|
3482
3484
|
return (A) => A;
|
|
3483
3485
|
}
|
|
3484
3486
|
return _r = {
|
|
3485
|
-
findFilter:
|
|
3486
|
-
...
|
|
3487
|
+
findFilter: N,
|
|
3488
|
+
...x
|
|
3487
3489
|
}, _r;
|
|
3488
3490
|
}
|
|
3489
3491
|
function Bn(e, t) {
|
|
3490
3492
|
const l = z(!1), S = Yt(e);
|
|
3491
|
-
let s = g(
|
|
3493
|
+
let s = g(Q(e));
|
|
3492
3494
|
(t == null ? void 0 : t.useTracker) !== !1 && Te(S, (P) => {
|
|
3493
3495
|
l.value = g(P) != s;
|
|
3494
3496
|
}, { deep: !0 });
|
|
3495
3497
|
function g(P) {
|
|
3496
|
-
const _ =
|
|
3497
|
-
return t != null && (t.propsToIgnore != null ? t.propsToIgnore.forEach((
|
|
3498
|
-
delete _[
|
|
3498
|
+
const _ = Nr(P);
|
|
3499
|
+
return t != null && (t.propsToIgnore != null ? t.propsToIgnore.forEach((M) => {
|
|
3500
|
+
delete _[M];
|
|
3499
3501
|
}) : t.propsToTrack != null && Object.keys(P).forEach(($) => {
|
|
3500
3502
|
t.propsToTrack.some((d) => d == $) || delete _[$];
|
|
3501
3503
|
})), JSON.stringify(_);
|
|
3502
3504
|
}
|
|
3503
|
-
function
|
|
3504
|
-
s = g(
|
|
3505
|
+
function D() {
|
|
3506
|
+
s = g(Q(S)), l.value = !1;
|
|
3505
3507
|
}
|
|
3506
3508
|
return {
|
|
3507
3509
|
asyncItem: S,
|
|
3508
3510
|
isChanged: l,
|
|
3509
|
-
restartTracker:
|
|
3511
|
+
restartTracker: D
|
|
3510
3512
|
};
|
|
3511
3513
|
}
|
|
3512
3514
|
function Ia(e, t) {
|
|
3513
|
-
var
|
|
3515
|
+
var Z;
|
|
3514
3516
|
const {
|
|
3515
3517
|
// useBladeSrc = true,
|
|
3516
3518
|
useRouteSrc: l = !0
|
|
3517
|
-
} = t ?? {}, S = e.storeMode ?? (t == null ? void 0 : t.storeMode), s = e.storageMode ?? (t == null ? void 0 : t.storageMode), g = e.nav ?? e.bladeName ?? "basic",
|
|
3518
|
-
var
|
|
3519
|
-
return
|
|
3519
|
+
} = t ?? {}, S = e.storeMode ?? (t == null ? void 0 : t.storeMode), s = e.storageMode ?? (t == null ? void 0 : t.storageMode), g = e.nav ?? e.bladeName ?? "basic", D = Lr(), P = et(), _ = Q(e.proxyQueryKey), M = ee(() => {
|
|
3520
|
+
var W;
|
|
3521
|
+
return Q(e.proxyID) ?? (_ != null ? (W = P == null ? void 0 : P.query) == null ? void 0 : W[_] : void 0);
|
|
3520
3522
|
}), $ = z(void 0), { actionErrorMsg: d, actionLoadingMsg: h, deleteItem: u, getItem: r, getAllItems: y, restoreItem: I, saveItem: i } = ut({
|
|
3521
3523
|
nav: g,
|
|
3522
3524
|
onError: e.onError ?? (t == null ? void 0 : t.onError),
|
|
3523
|
-
proxyID:
|
|
3525
|
+
proxyID: M.value,
|
|
3524
3526
|
store: Le({
|
|
3525
3527
|
storeMode: S,
|
|
3526
3528
|
storageMode: s,
|
|
3527
3529
|
nav: g
|
|
3528
3530
|
})
|
|
3529
|
-
}), E =
|
|
3531
|
+
}), E = ee(() => e.errorMsg ?? d.value), w = ee(() => e.loadingMsg ?? h.value), L = ee(() => w.value != null), b = z(e.itemID ?? (l ? (Z = P == null ? void 0 : P.params) == null ? void 0 : Z.id : void 0)), T = z(b.value == "new" ? "new" : e.startEditing ? "edit" : "view"), x = Ne(!1), N = ee(() => {
|
|
3532
|
+
let W = e.params != null ? { ...e.params } : {};
|
|
3533
|
+
return e.includeDetails != null && (W.includeDetails = e.includeDetails), W;
|
|
3534
|
+
}), f = ee(() => {
|
|
3530
3535
|
if (T.value == "new")
|
|
3531
3536
|
return !1;
|
|
3532
|
-
const
|
|
3533
|
-
return e.onCanDelete != null ? e.onCanDelete(
|
|
3534
|
-
}),
|
|
3537
|
+
const W = Q($);
|
|
3538
|
+
return e.onCanDelete != null ? e.onCanDelete(W) : (W == null ? void 0 : W.isInactive) !== !0;
|
|
3539
|
+
}), A = ee(() => {
|
|
3535
3540
|
if (T.value == "new")
|
|
3536
3541
|
return !1;
|
|
3537
|
-
const
|
|
3538
|
-
return e.onCanEdit != null ? e.onCanEdit(
|
|
3539
|
-
}),
|
|
3542
|
+
const W = Q($);
|
|
3543
|
+
return e.onCanEdit != null ? e.onCanEdit(W) : !0;
|
|
3544
|
+
}), j = ee(() => {
|
|
3540
3545
|
if (T.value == "new")
|
|
3541
3546
|
return !1;
|
|
3542
|
-
const
|
|
3543
|
-
return e.onCanRestore != null ? e.onCanRestore(
|
|
3544
|
-
}),
|
|
3545
|
-
const
|
|
3546
|
-
return e.onCanSave != null ? e.onCanSave(
|
|
3547
|
-
}), { isChanged:
|
|
3547
|
+
const W = Q($);
|
|
3548
|
+
return e.onCanRestore != null ? e.onCanRestore(W) : (W == null ? void 0 : W.isInactive) === !0;
|
|
3549
|
+
}), X = ee(() => {
|
|
3550
|
+
const W = Q($);
|
|
3551
|
+
return e.onCanSave != null ? e.onCanSave(W) : !0;
|
|
3552
|
+
}), { isChanged: re, restartTracker: ue } = Bn($, {
|
|
3548
3553
|
useTracker: e.trackChanges,
|
|
3549
3554
|
propsToIgnore: e.trackIgnoreProps,
|
|
3550
3555
|
propsToTrack: e.trackProps
|
|
3551
3556
|
});
|
|
3552
|
-
function
|
|
3557
|
+
function be(W) {
|
|
3553
3558
|
const {
|
|
3554
|
-
additionalUrl:
|
|
3555
|
-
onDeleteAsync:
|
|
3556
|
-
onDeleteSuccessAsync: se = () => (
|
|
3557
|
-
proxyID:
|
|
3559
|
+
additionalUrl: ne,
|
|
3560
|
+
onDeleteAsync: ce,
|
|
3561
|
+
onDeleteSuccessAsync: se = () => (D.back(), Promise.resolve(void 0)),
|
|
3562
|
+
proxyID: ge
|
|
3558
3563
|
} = { ...e };
|
|
3559
3564
|
u({
|
|
3560
|
-
additionalUrl:
|
|
3561
|
-
data:
|
|
3565
|
+
additionalUrl: ne,
|
|
3566
|
+
data: W,
|
|
3562
3567
|
nav: g,
|
|
3563
|
-
onDeleteAsync:
|
|
3568
|
+
onDeleteAsync: ce,
|
|
3564
3569
|
onDeleteSuccessAsync: se,
|
|
3565
|
-
proxyID:
|
|
3570
|
+
proxyID: ge
|
|
3566
3571
|
// ...params.getOptions(),
|
|
3567
3572
|
//...(useBladeSrc ? bladeData.value : {}),
|
|
3568
3573
|
//requireConfirmation: true
|
|
3569
3574
|
});
|
|
3570
3575
|
}
|
|
3571
|
-
function
|
|
3576
|
+
function G(W) {
|
|
3572
3577
|
const {
|
|
3573
|
-
additionalUrl:
|
|
3574
|
-
onRestoreAsync:
|
|
3578
|
+
additionalUrl: ne,
|
|
3579
|
+
onRestoreAsync: ce,
|
|
3575
3580
|
onRestoreSuccessAsync: se,
|
|
3576
|
-
proxyID:
|
|
3581
|
+
proxyID: ge
|
|
3577
3582
|
} = { ...e };
|
|
3578
3583
|
I({
|
|
3579
|
-
additionalUrl:
|
|
3580
|
-
data:
|
|
3584
|
+
additionalUrl: ne,
|
|
3585
|
+
data: W,
|
|
3581
3586
|
nav: g,
|
|
3582
|
-
onRestoreAsync:
|
|
3587
|
+
onRestoreAsync: ce,
|
|
3583
3588
|
onRestoreSuccessAsync: se,
|
|
3584
|
-
proxyID:
|
|
3589
|
+
proxyID: ge
|
|
3585
3590
|
// ...params.getOptions(),
|
|
3586
3591
|
// ...(useBladeSrc ? bladeData.value : {}),
|
|
3587
3592
|
});
|
|
3588
3593
|
}
|
|
3589
|
-
async function W
|
|
3590
|
-
if (
|
|
3594
|
+
async function Y(W) {
|
|
3595
|
+
if (x.value = !1, e.item != null)
|
|
3591
3596
|
$.value = e.item;
|
|
3592
3597
|
else {
|
|
3593
|
-
const
|
|
3598
|
+
const ne = {
|
|
3594
3599
|
additionalUrl: e.additionalUrl,
|
|
3595
3600
|
id: b.value,
|
|
3596
3601
|
nav: g,
|
|
3597
|
-
proxyID:
|
|
3598
|
-
params:
|
|
3602
|
+
proxyID: M.value,
|
|
3603
|
+
params: N.value,
|
|
3604
|
+
//props.params,
|
|
3599
3605
|
// ...(useBladeSrc ? bladeData.value : {}),
|
|
3600
|
-
refresh: (
|
|
3606
|
+
refresh: (W == null ? void 0 : W.deepRefresh) ?? !1,
|
|
3601
3607
|
onGetAsync: e.onGetAsync,
|
|
3602
3608
|
onGetSuccessAsync: e.onGetSuccessAsync
|
|
3603
3609
|
};
|
|
3604
3610
|
if (e.isSingle === !0)
|
|
3605
|
-
|
|
3611
|
+
ne.id === "new" ? $.value = e.onGetNew ? e.onGetNew() : {} : $.value = await r(ne);
|
|
3606
3612
|
else {
|
|
3607
|
-
const
|
|
3608
|
-
$.value =
|
|
3613
|
+
const ce = await y(ne);
|
|
3614
|
+
$.value = ce.data;
|
|
3609
3615
|
}
|
|
3610
3616
|
}
|
|
3611
|
-
|
|
3617
|
+
ue();
|
|
3612
3618
|
}
|
|
3613
|
-
function
|
|
3619
|
+
function H(W, ne) {
|
|
3614
3620
|
const {
|
|
3615
|
-
additionalUrl:
|
|
3621
|
+
additionalUrl: ce,
|
|
3616
3622
|
onCanSaveAsync: se,
|
|
3617
|
-
onGetSaveAsync:
|
|
3618
|
-
onSaveAsync:
|
|
3619
|
-
onSaveSuccessAsync: $e = (
|
|
3623
|
+
onGetSaveAsync: ge,
|
|
3624
|
+
onSaveAsync: Be,
|
|
3625
|
+
onSaveSuccessAsync: $e = (Fe) => ((ne == null ? void 0 : ne.navBack) === !0 ? D.back() : (W.rowVersion != null && Fe.rowVersion != null && (W.rowVersion = Fe.rowVersion), ue(), T.value = "view"), Promise.resolve(void 0))
|
|
3620
3626
|
} = { ...e };
|
|
3621
3627
|
i({
|
|
3622
|
-
additionalUrl:
|
|
3623
|
-
data:
|
|
3628
|
+
additionalUrl: ce,
|
|
3629
|
+
data: W,
|
|
3624
3630
|
nav: g,
|
|
3625
3631
|
onCanSaveAsync: se,
|
|
3626
|
-
onGetSaveAsync:
|
|
3627
|
-
onSaveAsync:
|
|
3632
|
+
onGetSaveAsync: ge,
|
|
3633
|
+
onSaveAsync: Be,
|
|
3628
3634
|
onSaveSuccessAsync: $e,
|
|
3629
|
-
proxyID:
|
|
3635
|
+
proxyID: M.value,
|
|
3630
3636
|
// ...params.getOptions(),
|
|
3631
3637
|
// ...(useBladeSrc ? bladeData.value : {}),
|
|
3632
3638
|
mode: T.value
|
|
3633
3639
|
});
|
|
3634
3640
|
}
|
|
3635
|
-
function
|
|
3636
|
-
const
|
|
3637
|
-
!
|
|
3641
|
+
function ie() {
|
|
3642
|
+
const W = Q(T);
|
|
3643
|
+
!W || W == "view" ? T.value = "edit" : W == "edit" && (T.value = "view");
|
|
3638
3644
|
}
|
|
3639
|
-
return Te(E, (
|
|
3640
|
-
|
|
3645
|
+
return Te(E, (W) => {
|
|
3646
|
+
x.value = W != null;
|
|
3641
3647
|
}), Te(() => e.refreshToggle, () => {
|
|
3642
|
-
|
|
3648
|
+
Y({ deepRefresh: !0 });
|
|
3643
3649
|
}), Xr(async () => {
|
|
3644
|
-
var
|
|
3645
|
-
e.eager == !0 && await
|
|
3650
|
+
var W;
|
|
3651
|
+
e.eager == !0 && await Y({ deepRefresh: ((W = P == null ? void 0 : P.params) == null ? void 0 : W.refresh) == "true" });
|
|
3646
3652
|
}), {
|
|
3647
3653
|
asyncItem: $,
|
|
3648
|
-
deleteItem:
|
|
3654
|
+
deleteItem: be,
|
|
3649
3655
|
errorMsg: E,
|
|
3650
|
-
isChanged:
|
|
3651
|
-
isDeletable:
|
|
3652
|
-
isEditing:
|
|
3653
|
-
isEditable:
|
|
3654
|
-
isLoading:
|
|
3655
|
-
isNew:
|
|
3656
|
-
isRestorable:
|
|
3657
|
-
isSaveable:
|
|
3656
|
+
isChanged: re,
|
|
3657
|
+
isDeletable: f,
|
|
3658
|
+
isEditing: ee(() => T.value == "new" || T.value == "edit"),
|
|
3659
|
+
isEditable: A,
|
|
3660
|
+
isLoading: L,
|
|
3661
|
+
isNew: ee(() => T.value == "new"),
|
|
3662
|
+
isRestorable: j,
|
|
3663
|
+
isSaveable: X,
|
|
3658
3664
|
loadingMsg: w,
|
|
3659
3665
|
mode: T,
|
|
3660
|
-
refresh:
|
|
3661
|
-
restoreItem:
|
|
3662
|
-
saveItem:
|
|
3663
|
-
showError:
|
|
3664
|
-
toggleMode:
|
|
3666
|
+
refresh: Y,
|
|
3667
|
+
restoreItem: G,
|
|
3668
|
+
saveItem: H,
|
|
3669
|
+
showError: x,
|
|
3670
|
+
toggleMode: ie
|
|
3665
3671
|
};
|
|
3666
3672
|
}
|
|
3667
3673
|
const Vr = z(!0), zr = z(!1), Yr = z(), gr = z(!1);
|
|
@@ -3693,7 +3699,7 @@ function $n(e) {
|
|
|
3693
3699
|
var u;
|
|
3694
3700
|
return (u = P(h)) == null ? void 0 : u.displayName;
|
|
3695
3701
|
}
|
|
3696
|
-
function
|
|
3702
|
+
function D(h) {
|
|
3697
3703
|
var u;
|
|
3698
3704
|
return (u = P(h)) == null ? void 0 : u.icon;
|
|
3699
3705
|
}
|
|
@@ -3708,9 +3714,9 @@ function $n(e) {
|
|
|
3708
3714
|
if (u == null)
|
|
3709
3715
|
return;
|
|
3710
3716
|
let r = gn(u.microservice ?? "default") ?? "";
|
|
3711
|
-
return u.path != null && (r =
|
|
3717
|
+
return u.path != null && (r = Ue(r, u.path)), r != null && r.endsWith("/") && (r = r.slice(0, r.length - 1)), r;
|
|
3712
3718
|
}
|
|
3713
|
-
function
|
|
3719
|
+
function M(h) {
|
|
3714
3720
|
const u = P(h);
|
|
3715
3721
|
if ((u == null ? void 0 : u.singleName) != null)
|
|
3716
3722
|
return u.singleName;
|
|
@@ -3739,70 +3745,70 @@ function $n(e) {
|
|
|
3739
3745
|
findArchiveName: S,
|
|
3740
3746
|
findCacheHours: s,
|
|
3741
3747
|
findDisplay: g,
|
|
3742
|
-
findIcon:
|
|
3748
|
+
findIcon: D,
|
|
3743
3749
|
findItem: P,
|
|
3744
3750
|
findStoreName: $,
|
|
3745
3751
|
findPath: _,
|
|
3746
|
-
findSingleDisplay:
|
|
3752
|
+
findSingleDisplay: M,
|
|
3747
3753
|
updateNavigationProperties: d
|
|
3748
3754
|
}, Cr;
|
|
3749
3755
|
}
|
|
3750
3756
|
function Da(e, t, l) {
|
|
3751
|
-
var
|
|
3752
|
-
const S =
|
|
3757
|
+
var He, Ve;
|
|
3758
|
+
const S = Mn(), s = it(), g = Lr(), D = et(), { bladeData: P } = Cn({}), _ = e.useBladeSrc ?? !0, M = e.useRouteSrc ?? !0, $ = e.nav ?? e.bladeName ?? e.itemBladeName ?? "basic", d = e.storeMode ?? ((He = s.findItem($)) == null ? void 0 : He.storeMode), h = e.storageMode ?? ((Ve = s.findItem($)) == null ? void 0 : Ve.storageMode), u = Q(e.customFilters) ?? [], r = z([]), y = ee(() => Kt([
|
|
3753
3759
|
...u.filter((U) => U.name != null).map((U) => U.name),
|
|
3754
3760
|
...e.defaultFilters ?? [],
|
|
3755
3761
|
...r.value
|
|
3756
3762
|
]).value), I = z((e.defaultFilters ?? []).map((U) => y.value.indexOf(U)));
|
|
3757
3763
|
let i = z([...I.value]);
|
|
3758
|
-
const E =
|
|
3759
|
-
function
|
|
3760
|
-
var U,
|
|
3764
|
+
const E = ee(() => Gr(i, I).value.length > 0 || Gr(I, i).value.length > 0), w = z(L());
|
|
3765
|
+
function L() {
|
|
3766
|
+
var U, K;
|
|
3761
3767
|
if (_) {
|
|
3762
3768
|
const V = (U = P.value) == null ? void 0 : U.page;
|
|
3763
3769
|
if (V != null)
|
|
3764
3770
|
return Number.parseInt(V);
|
|
3765
3771
|
}
|
|
3766
|
-
if (
|
|
3767
|
-
const V = (
|
|
3772
|
+
if (M) {
|
|
3773
|
+
const V = (K = D == null ? void 0 : D.query) == null ? void 0 : K.page;
|
|
3768
3774
|
if (V != null)
|
|
3769
3775
|
return Number.parseInt(typeof V == "string" ? V : V.toString());
|
|
3770
3776
|
}
|
|
3771
3777
|
return 1;
|
|
3772
3778
|
}
|
|
3773
|
-
const b =
|
|
3774
|
-
var U,
|
|
3779
|
+
const b = ee(() => {
|
|
3780
|
+
var U, K;
|
|
3775
3781
|
if (_) {
|
|
3776
3782
|
const V = (U = P.value) == null ? void 0 : U.proxyID;
|
|
3777
3783
|
if (V != null)
|
|
3778
3784
|
return V;
|
|
3779
3785
|
}
|
|
3780
|
-
if (
|
|
3781
|
-
const V = (
|
|
3786
|
+
if (M) {
|
|
3787
|
+
const V = (K = D == null ? void 0 : D.query) == null ? void 0 : K.query;
|
|
3782
3788
|
if (V != null)
|
|
3783
3789
|
return V;
|
|
3784
3790
|
}
|
|
3785
3791
|
return e.proxyID;
|
|
3786
|
-
}), T = z(
|
|
3787
|
-
function
|
|
3788
|
-
var U,
|
|
3792
|
+
}), T = z(x());
|
|
3793
|
+
function x() {
|
|
3794
|
+
var U, K;
|
|
3789
3795
|
if (_) {
|
|
3790
3796
|
const V = (U = P.value) == null ? void 0 : U.search;
|
|
3791
3797
|
if (V != null)
|
|
3792
3798
|
return V;
|
|
3793
3799
|
}
|
|
3794
|
-
if (
|
|
3795
|
-
const V = (
|
|
3800
|
+
if (M) {
|
|
3801
|
+
const V = (K = D == null ? void 0 : D.query) == null ? void 0 : K.search;
|
|
3796
3802
|
if (V != null)
|
|
3797
3803
|
return V;
|
|
3798
3804
|
}
|
|
3799
3805
|
}
|
|
3800
|
-
const
|
|
3806
|
+
const N = z(Q(e.startShowingInactive) ?? !1), f = ee(() => [
|
|
3801
3807
|
...e.searchProps ?? [],
|
|
3802
3808
|
...(e.headers ?? []).filter((U) => U.searchable != null && U.value != null).map((U) => U.value ?? "")
|
|
3803
|
-
]), A = z([]),
|
|
3804
|
-
let
|
|
3805
|
-
const { actionErrorMsg:
|
|
3809
|
+
]), A = z([]), j = Ne([]), X = z([]);
|
|
3810
|
+
let re;
|
|
3811
|
+
const { actionErrorMsg: ue, actionLoadingMsg: be, deleteItem: G, doAction: Y, getItem: H, getAllItems: ie, restoreItem: Z } = ut({
|
|
3806
3812
|
nav: $,
|
|
3807
3813
|
onError: e.onError ?? (l == null ? void 0 : l.onError),
|
|
3808
3814
|
proxyID: b.value,
|
|
@@ -3811,78 +3817,78 @@ function Da(e, t, l) {
|
|
|
3811
3817
|
storageMode: h,
|
|
3812
3818
|
nav: $
|
|
3813
3819
|
})
|
|
3814
|
-
}),
|
|
3815
|
-
let U,
|
|
3816
|
-
I.value.forEach((
|
|
3817
|
-
const de = y.value[
|
|
3818
|
-
|
|
3820
|
+
}), W = ee(() => e.errorMsg ?? ue.value), ne = ee(() => e.loadingMsg ?? be.value), ce = ee(() => ne.value != null), se = Ne(!1), ge = Ne(e.showSearch ?? !0), Be = z(0), $e = ee(() => {
|
|
3821
|
+
let U, K = [];
|
|
3822
|
+
I.value.forEach((O) => {
|
|
3823
|
+
const de = y.value[O], ye = u.find((De) => De.name == de);
|
|
3824
|
+
ye != null ? U = U != null ? `${U}ANDALSO${ye.filterFunction()}` : ye.filterFunction() : K.push(de);
|
|
3819
3825
|
});
|
|
3820
3826
|
const V = {};
|
|
3821
|
-
return _e(
|
|
3822
|
-
}),
|
|
3823
|
-
var
|
|
3827
|
+
return _e(K) && (V.filterBy = K.toString()), U != null && (V.query = U), V;
|
|
3828
|
+
}), Fe = ee(() => {
|
|
3829
|
+
var K;
|
|
3824
3830
|
let U = e.params != null ? { ...e.params } : {};
|
|
3825
|
-
return e.useServerPagination && e.itemsPerPage != null && (U.includeCount = !0, U.takeAmount = e.itemsPerPage, U.takeFrom = (w.value - 1) * e.itemsPerPage),
|
|
3826
|
-
}), tr =
|
|
3831
|
+
return e.useServerPagination && e.itemsPerPage != null && (U.includeCount = !0, U.takeAmount = e.itemsPerPage, U.takeFrom = (w.value - 1) * e.itemsPerPage), $e.value != null && (U = { ...U, ...$e.value }), N.value && (U.includeInactive = !0), _e(e.selectProps) && (U.properties = (K = e.selectProps) == null ? void 0 : K.toString()), T.value != null && (U.searchString = T.value), U;
|
|
3832
|
+
}), tr = ee(() => (U) => e.onCanDelete != null ? e.onCanDelete(U) : !(U != null && U.isInactive === !0)), nr = ee(() => (U) => N.value ? e.onCanRestore != null ? e.onCanRestore(U) : (U == null ? void 0 : U.isInactive) === !0 : !1), Ce = ee(() => X.value.filter((U) => !U.hide)), ar = ee(() => {
|
|
3827
3833
|
let U = new Array();
|
|
3828
|
-
return
|
|
3829
|
-
let
|
|
3830
|
-
|
|
3831
|
-
}), U.sort(
|
|
3832
|
-
}), lr =
|
|
3834
|
+
return Ce.value.filter((V) => V.sublevel != null).forEach((V) => {
|
|
3835
|
+
let O = U.find((de) => de.position == V.sublevel);
|
|
3836
|
+
O == null ? U.push({ position: V.sublevel ?? 0, values: [V] }) : O.values.push(V);
|
|
3837
|
+
}), U.sort(Re.firstBy((V) => V.position));
|
|
3838
|
+
}), lr = ee(() => {
|
|
3833
3839
|
let U = new Array();
|
|
3834
|
-
return
|
|
3835
|
-
let
|
|
3836
|
-
|
|
3837
|
-
}), U.sort(
|
|
3838
|
-
}), ur =
|
|
3839
|
-
function
|
|
3840
|
+
return Ce.value.filter((V) => V.level != null).forEach((V) => {
|
|
3841
|
+
let O = U.find((de) => de.position == V.level);
|
|
3842
|
+
O == null ? U.push({ position: V.level ?? 0, values: [V] }) : O.values.push(V);
|
|
3843
|
+
}), U.sort(Re.firstBy((V) => V.position));
|
|
3844
|
+
}), ur = ee(() => Ce.value.filter((U) => U.nav != null && U.itemText != null || U.textFilter != null || U.display != null || U.bool != null));
|
|
3845
|
+
function Se(U) {
|
|
3840
3846
|
if (e.itemBladeName != null) {
|
|
3841
|
-
let
|
|
3847
|
+
let K = {
|
|
3842
3848
|
bladeName: e.itemBladeName,
|
|
3843
3849
|
id: "new",
|
|
3844
3850
|
nav: $
|
|
3845
3851
|
};
|
|
3846
3852
|
U == "page" && g.push({
|
|
3847
|
-
name:
|
|
3853
|
+
name: K.bladeName,
|
|
3848
3854
|
params: { id: "new" }
|
|
3849
3855
|
});
|
|
3850
3856
|
}
|
|
3851
3857
|
}
|
|
3852
3858
|
function ir(U) {
|
|
3853
3859
|
const {
|
|
3854
|
-
additionalUrl:
|
|
3860
|
+
additionalUrl: K,
|
|
3855
3861
|
onDeleteAsync: V
|
|
3856
|
-
} = { ...e },
|
|
3862
|
+
} = { ...e }, O = Q(U), de = O.id, ye = (De) => {
|
|
3857
3863
|
if (De != null) {
|
|
3858
|
-
let
|
|
3859
|
-
if (
|
|
3864
|
+
let Ae = A.value.findIndex((oe) => oe.id == De);
|
|
3865
|
+
if (Ae > -1 && A.value.splice(Ae, 1), e.items != null) {
|
|
3860
3866
|
let oe = e.items.findIndex((Me) => Me.id == De);
|
|
3861
3867
|
oe > -1 && e.items.splice(oe, 1);
|
|
3862
3868
|
}
|
|
3863
3869
|
} else {
|
|
3864
|
-
let
|
|
3865
|
-
if (
|
|
3866
|
-
let oe = e.items.findIndex((Me) => Me ===
|
|
3867
|
-
oe == -1 && (oe = e.items.findIndex((Me) => Me ==
|
|
3870
|
+
let Ae = A.value.findIndex((oe) => oe === O);
|
|
3871
|
+
if (Ae == -1 && (Ae = A.value.findIndex((oe) => oe == O)), Ae > -1 && A.value.splice(Ae, 1), e.items != null) {
|
|
3872
|
+
let oe = e.items.findIndex((Me) => Me === O);
|
|
3873
|
+
oe == -1 && (oe = e.items.findIndex((Me) => Me == O)), oe > -1 && e.items.splice(oe, 1);
|
|
3868
3874
|
}
|
|
3869
3875
|
}
|
|
3870
3876
|
};
|
|
3871
|
-
e.localOnly == !0 || $ == null ?
|
|
3872
|
-
additionalUrl:
|
|
3873
|
-
data:
|
|
3877
|
+
e.localOnly == !0 || $ == null ? ye(de) : G({
|
|
3878
|
+
additionalUrl: K,
|
|
3879
|
+
data: O,
|
|
3874
3880
|
nav: $,
|
|
3875
3881
|
onCanDeleteAsync: e.onCanDeleteAsync,
|
|
3876
3882
|
onDeleteAsync: V,
|
|
3877
|
-
onDeleteSuccessAsync: async () => (
|
|
3883
|
+
onDeleteSuccessAsync: async () => (ye(de), e.onDeleteSuccessAsync != null ? e.onDeleteSuccessAsync(O) : Promise.resolve(void 0)),
|
|
3878
3884
|
proxyID: b.value,
|
|
3879
3885
|
// ...(useBladeSrc ? bladeData.value : {}),
|
|
3880
3886
|
requireConfirmation: !0
|
|
3881
3887
|
}), t && t("deleted", U);
|
|
3882
3888
|
}
|
|
3883
|
-
function
|
|
3884
|
-
|
|
3885
|
-
data:
|
|
3889
|
+
function Je(U) {
|
|
3890
|
+
Z({
|
|
3891
|
+
data: Q(U),
|
|
3886
3892
|
additionalUrl: e.additionalUrl,
|
|
3887
3893
|
nav: $,
|
|
3888
3894
|
onCanRestoreAsync: e.onCanRestoreAsync,
|
|
@@ -3892,33 +3898,33 @@ function Da(e, t, l) {
|
|
|
3892
3898
|
// ...(useBladeSrc ? bladeData.value : {})
|
|
3893
3899
|
});
|
|
3894
3900
|
}
|
|
3895
|
-
function
|
|
3901
|
+
function ke() {
|
|
3896
3902
|
Y(() => {
|
|
3897
|
-
S.exportToCSV(
|
|
3903
|
+
S.exportToCSV(Ce.value, j.value);
|
|
3898
3904
|
}, { loadingMsg: "Exporting to CSV" });
|
|
3899
3905
|
}
|
|
3900
|
-
function
|
|
3901
|
-
let U =
|
|
3906
|
+
function Pe() {
|
|
3907
|
+
let U = Q(A);
|
|
3902
3908
|
if (U = e.onFilter ? e.onFilter(U) : U, T.value != null && T.value.length > 0) {
|
|
3903
|
-
let
|
|
3904
|
-
e.itemText &&
|
|
3909
|
+
let K = [...f.value];
|
|
3910
|
+
e.itemText && K.push(e.itemText), _e(K) && (U = U.filter((V) => dn(V, T.value, K)));
|
|
3905
3911
|
}
|
|
3906
|
-
|
|
3912
|
+
j.value = U;
|
|
3907
3913
|
}
|
|
3908
|
-
function
|
|
3914
|
+
function qe() {
|
|
3909
3915
|
const U = (l == null ? void 0 : l.hideActions) ?? e.hideActions;
|
|
3910
|
-
e.headers != null && (
|
|
3916
|
+
e.headers != null && (X.value = [...e.headers], U || X.value.push({ title: "Actions", value: "itemActions", align: "end" }));
|
|
3911
3917
|
}
|
|
3912
3918
|
async function Ie(U) {
|
|
3913
|
-
if (
|
|
3919
|
+
if (se.value = !1, (U == null ? void 0 : U.resetSearch) === !0 && (ge.value = e.showSearch ?? !1, T.value = void 0), e.items != null) {
|
|
3914
3920
|
A.value = e.onGetSuccessAsync != null ? await e.onGetSuccessAsync(e.items) : e.items;
|
|
3915
3921
|
return;
|
|
3916
3922
|
}
|
|
3917
|
-
const
|
|
3923
|
+
const K = {
|
|
3918
3924
|
additionalUrl: e.additionalUrl,
|
|
3919
3925
|
id: e.itemID,
|
|
3920
3926
|
nav: $,
|
|
3921
|
-
params:
|
|
3927
|
+
params: Fe.value,
|
|
3922
3928
|
//params,
|
|
3923
3929
|
// params: params.getParamOptions(),
|
|
3924
3930
|
proxyID: b.value,
|
|
@@ -3929,125 +3935,125 @@ function Da(e, t, l) {
|
|
|
3929
3935
|
onGetSuccessAsync: e.onGetSuccessAsync
|
|
3930
3936
|
};
|
|
3931
3937
|
if (e.isSingle === !0)
|
|
3932
|
-
|
|
3938
|
+
K.id === "new" ? A.value = [] : A.value = await H(K);
|
|
3933
3939
|
else {
|
|
3934
|
-
let V = await
|
|
3935
|
-
...
|
|
3936
|
-
onGetSuccessAsync: async (
|
|
3937
|
-
let
|
|
3938
|
-
return r.value = (
|
|
3940
|
+
let V = await ie({
|
|
3941
|
+
...K,
|
|
3942
|
+
onGetSuccessAsync: async (O, de) => {
|
|
3943
|
+
let ye = O == null ? void 0 : O.data;
|
|
3944
|
+
return r.value = (O == null ? void 0 : O.filters) ?? [], e.useServerPagination === !0 && e.itemsPerPage && O.count && (Be.value = Math.ceil(O.count / e.itemsPerPage)), e.onGetSuccessAsync != null && (ye = await e.onGetSuccessAsync(ye, de)), ye;
|
|
3939
3945
|
}
|
|
3940
3946
|
});
|
|
3941
3947
|
A.value = V, i.value = [...I.value];
|
|
3942
3948
|
}
|
|
3943
|
-
|
|
3949
|
+
Pe();
|
|
3944
3950
|
}
|
|
3945
|
-
function
|
|
3946
|
-
const V =
|
|
3947
|
-
if (V != null && V ===
|
|
3951
|
+
function je(U, K) {
|
|
3952
|
+
const V = Q(U);
|
|
3953
|
+
if (V != null && V === re && e.canUnselect ? re = null : re = V, e.canSelect == !0 && (e.onCanSelectItem == null || e.onCanSelectItem(V)))
|
|
3948
3954
|
if (e.onSelectItem != null)
|
|
3949
|
-
e.onSelectItem(
|
|
3955
|
+
e.onSelectItem(re);
|
|
3950
3956
|
else {
|
|
3951
|
-
let
|
|
3957
|
+
let O = {
|
|
3952
3958
|
bladeName: e.itemBladeName,
|
|
3953
3959
|
id: V.id,
|
|
3954
3960
|
nav: $
|
|
3955
3961
|
};
|
|
3956
|
-
|
|
3957
|
-
name:
|
|
3958
|
-
params: { id:
|
|
3962
|
+
K == "page" && g.push({
|
|
3963
|
+
name: O.bladeName,
|
|
3964
|
+
params: { id: O.id }
|
|
3959
3965
|
});
|
|
3960
3966
|
}
|
|
3961
|
-
t != null && (t("select",
|
|
3967
|
+
t != null && (t("select", re), t("confirm", re));
|
|
3962
3968
|
}
|
|
3963
|
-
function
|
|
3964
|
-
|
|
3969
|
+
function Ke() {
|
|
3970
|
+
ge.value ? (ge.value = e.showSearch ?? !1, T.value = void 0, Ie()) : ge.value = e.showSearch ?? !0;
|
|
3965
3971
|
}
|
|
3966
|
-
return
|
|
3967
|
-
|
|
3968
|
-
}, { debounce: 500, maxWait: 500 }), Te([
|
|
3972
|
+
return qe(), Qt([T], () => {
|
|
3973
|
+
Pe();
|
|
3974
|
+
}, { debounce: 500, maxWait: 500 }), Te([N, w], async () => {
|
|
3969
3975
|
await Ie();
|
|
3970
|
-
}), Te([
|
|
3971
|
-
|
|
3976
|
+
}), Te([W, () => e.errorMsg], ([U, K]) => {
|
|
3977
|
+
se.value = U != null || K != null;
|
|
3972
3978
|
}), Te(() => e.refreshToggle, () => {
|
|
3973
3979
|
Ie({ deepRefresh: !0 });
|
|
3974
3980
|
}), Or([A, () => e.items], () => {
|
|
3975
|
-
|
|
3981
|
+
Pe();
|
|
3976
3982
|
}), Xr(async () => {
|
|
3977
3983
|
var U;
|
|
3978
|
-
e.eager == !0 && await Ie({ deepRefresh: ((U =
|
|
3984
|
+
e.eager == !0 && await Ie({ deepRefresh: ((U = D == null ? void 0 : D.params) == null ? void 0 : U.refresh) == "true" });
|
|
3979
3985
|
}), {
|
|
3980
|
-
add:
|
|
3986
|
+
add: Se,
|
|
3981
3987
|
asyncItems: A,
|
|
3982
3988
|
currentPage: w,
|
|
3983
3989
|
deleteItem: ir,
|
|
3984
3990
|
displayHeaders: ur,
|
|
3985
|
-
errorMsg:
|
|
3986
|
-
exportToCSV:
|
|
3987
|
-
filteredItems:
|
|
3991
|
+
errorMsg: W,
|
|
3992
|
+
exportToCSV: ke,
|
|
3993
|
+
filteredItems: j,
|
|
3988
3994
|
filters: y,
|
|
3989
3995
|
filtersChanged: E,
|
|
3990
|
-
headerOptions:
|
|
3996
|
+
headerOptions: X,
|
|
3991
3997
|
isDeletable: tr,
|
|
3992
|
-
isLoading:
|
|
3998
|
+
isLoading: ce,
|
|
3993
3999
|
isRestorable: nr,
|
|
3994
4000
|
loadingMsg: ne,
|
|
3995
4001
|
refresh: Ie,
|
|
3996
|
-
restoreItem:
|
|
4002
|
+
restoreItem: Je,
|
|
3997
4003
|
searchString: T,
|
|
3998
4004
|
selectedFilters: I,
|
|
3999
|
-
selectItem:
|
|
4005
|
+
selectItem: je,
|
|
4000
4006
|
// serverFilters,
|
|
4001
|
-
showError:
|
|
4002
|
-
showInactive:
|
|
4003
|
-
showSearch:
|
|
4007
|
+
showError: se,
|
|
4008
|
+
showInactive: N,
|
|
4009
|
+
showSearch: ge,
|
|
4004
4010
|
subtitleOptions: ar,
|
|
4005
|
-
tableHeaders:
|
|
4011
|
+
tableHeaders: Ce,
|
|
4006
4012
|
titleOptions: lr,
|
|
4007
|
-
toggleSearch:
|
|
4008
|
-
totalPages:
|
|
4013
|
+
toggleSearch: Ke,
|
|
4014
|
+
totalPages: Be
|
|
4009
4015
|
};
|
|
4010
4016
|
}
|
|
4011
|
-
let
|
|
4017
|
+
let We;
|
|
4012
4018
|
function Fn(e) {
|
|
4013
4019
|
const t = z((e == null ? void 0 : e.default) ?? "Admin"), l = z((e == null ? void 0 : e.groups) ?? []);
|
|
4014
|
-
return
|
|
4020
|
+
return We = {
|
|
4015
4021
|
currentGroup: t,
|
|
4016
4022
|
groupOptions: l,
|
|
4017
4023
|
useRoutes: e == null ? void 0 : e.useRoutes
|
|
4018
|
-
},
|
|
4024
|
+
}, We;
|
|
4019
4025
|
}
|
|
4020
4026
|
function xa() {
|
|
4021
|
-
const e =
|
|
4027
|
+
const e = Lr(), t = it(), l = In();
|
|
4022
4028
|
let S = e.getRoutes();
|
|
4023
4029
|
return {
|
|
4024
|
-
...
|
|
4025
|
-
sidebarNavItems:
|
|
4030
|
+
...We,
|
|
4031
|
+
sidebarNavItems: ee(() => {
|
|
4026
4032
|
var g;
|
|
4027
|
-
S = S.filter((
|
|
4033
|
+
S = S.filter((D) => D.meta != null && D.meta.menuGroup != null);
|
|
4028
4034
|
const s = [];
|
|
4029
|
-
return S.forEach((
|
|
4035
|
+
return S.forEach((D) => {
|
|
4030
4036
|
var d;
|
|
4031
|
-
const P =
|
|
4032
|
-
let $ = s.find((h) => h.displayName ==
|
|
4037
|
+
const P = We.groupOptions.value.find((h) => h.displayName == D.meta.menuGroup), _ = t.findItem(D.meta.nav), M = D.meta;
|
|
4038
|
+
let $ = s.find((h) => h.displayName == M.menuGroup);
|
|
4033
4039
|
$ == null && ($ = {
|
|
4034
|
-
displayName:
|
|
4035
|
-
icon: (P == null ? void 0 : P.icon) ?? (
|
|
4040
|
+
displayName: M.menuGroup,
|
|
4041
|
+
icon: (P == null ? void 0 : P.icon) ?? (M == null ? void 0 : M.icon) ?? (_ == null ? void 0 : _.icon),
|
|
4036
4042
|
isGroup: !0,
|
|
4037
4043
|
items: []
|
|
4038
4044
|
}, s.push($)), (d = $.items) == null || d.push({
|
|
4039
|
-
displayName: (
|
|
4040
|
-
icon: (
|
|
4041
|
-
permissions: (
|
|
4042
|
-
requiresAuth: (
|
|
4043
|
-
subscriptions: (
|
|
4044
|
-
subFilters: (
|
|
4045
|
-
routeName:
|
|
4045
|
+
displayName: (M == null ? void 0 : M.displayName) ?? t.findDisplay(_ ?? void 0),
|
|
4046
|
+
icon: (M == null ? void 0 : M.icon) ?? t.findIcon(_ ?? void 0),
|
|
4047
|
+
permissions: (M == null ? void 0 : M.permissions) ?? (_ == null ? void 0 : _.permissions) ?? [],
|
|
4048
|
+
requiresAuth: (M == null ? void 0 : M.requiresAuth) !== !1,
|
|
4049
|
+
subscriptions: (M == null ? void 0 : M.subscriptions) ?? (_ == null ? void 0 : _.subscriptions) ?? [],
|
|
4050
|
+
subFilters: (M == null ? void 0 : M.subFilters) ?? (_ == null ? void 0 : _.subFilters) ?? [],
|
|
4051
|
+
routeName: D.name
|
|
4046
4052
|
});
|
|
4047
|
-
}), s.forEach((
|
|
4053
|
+
}), s.forEach((D) => {
|
|
4048
4054
|
var P;
|
|
4049
|
-
|
|
4050
|
-
}),
|
|
4055
|
+
D.items = (P = D.items) == null ? void 0 : P.filter((_) => !_.requiresAuth || l.doShow(_.subscriptions, _.permissions, "view")).sort(Re.firstBy((_) => _.displayName));
|
|
4056
|
+
}), We.currentGroup.value != null ? ((g = s.find((D) => D.displayName == We.currentGroup.value)) == null ? void 0 : g.items) ?? [] : s.filter((D) => !D.requiresAuth || l.doShow(D.subscriptions, D.permissions, "view"));
|
|
4051
4057
|
})
|
|
4052
4058
|
};
|
|
4053
4059
|
}
|
|
@@ -4067,40 +4073,40 @@ function kn(e) {
|
|
|
4067
4073
|
}, Pr;
|
|
4068
4074
|
}
|
|
4069
4075
|
let Zr, Jr, jr, Kr = !1;
|
|
4070
|
-
const wr = z(!1), br = z(!1), Qr = z(),
|
|
4071
|
-
let
|
|
4076
|
+
const wr = z(!1), br = z(!1), Qr = z(), er = z();
|
|
4077
|
+
let Mr;
|
|
4072
4078
|
function _a() {
|
|
4073
|
-
return
|
|
4079
|
+
return Mr;
|
|
4074
4080
|
}
|
|
4075
4081
|
function Gn() {
|
|
4076
|
-
function e(
|
|
4077
|
-
|
|
4082
|
+
function e(D) {
|
|
4083
|
+
er.value = D.detail, br.value = !0;
|
|
4078
4084
|
}
|
|
4079
4085
|
function t() {
|
|
4080
4086
|
Kr || (Kr = !0, window.location.reload());
|
|
4081
4087
|
}
|
|
4082
4088
|
function l() {
|
|
4083
|
-
var
|
|
4084
|
-
(
|
|
4089
|
+
var D;
|
|
4090
|
+
(D = Qr.value) == null || D.prompt(), wr.value = !1;
|
|
4085
4091
|
}
|
|
4086
4092
|
function S() {
|
|
4087
4093
|
return !!window.matchMedia("(display-mode: standalone)").matches;
|
|
4088
4094
|
}
|
|
4089
|
-
function s(
|
|
4090
|
-
|
|
4095
|
+
function s(D) {
|
|
4096
|
+
D.preventDefault(), wr.value = !0, Qr.value = D;
|
|
4091
4097
|
}
|
|
4092
4098
|
function g() {
|
|
4093
|
-
br.value = !1, !(!
|
|
4099
|
+
br.value = !1, !(!er.value || !er.value.waiting) && er.value.waiting.postMessage({ type: "SKIP_WAITING" });
|
|
4094
4100
|
}
|
|
4095
4101
|
return Xt(() => {
|
|
4096
4102
|
Zr == null && (Zr = document.addEventListener("swUpdated", e, { once: !0 })), Jr == null && (Jr = navigator.serviceWorker.addEventListener("controllerchange", t)), jr == null && (jr = window.addEventListener("beforeinstallprompt", s));
|
|
4097
|
-
}),
|
|
4103
|
+
}), Mr = {
|
|
4098
4104
|
canInstallApp: wr,
|
|
4099
4105
|
canUpdateApp: br,
|
|
4100
4106
|
installApp: l,
|
|
4101
4107
|
isInstalled: S,
|
|
4102
4108
|
updateApp: g
|
|
4103
|
-
},
|
|
4109
|
+
}, Mr;
|
|
4104
4110
|
}
|
|
4105
4111
|
function Ca(e) {
|
|
4106
4112
|
const t = [];
|
|
@@ -4111,21 +4117,21 @@ function Pa(e) {
|
|
|
4111
4117
|
install(t, l) {
|
|
4112
4118
|
var _;
|
|
4113
4119
|
console.log(t), e.vuetifyInstance ?? (e.vuetifyInstance = l.vuetifyInstance), yn(e.urls), Pn(e);
|
|
4114
|
-
const S =
|
|
4120
|
+
const S = Nn(), s = $n(e);
|
|
4115
4121
|
kn(e), (_ = e.auth).demo ?? (_.demo = S), e.auth.getAuthItem = s.findItem;
|
|
4116
4122
|
const g = Dn(e.auth);
|
|
4117
4123
|
Fn(e.menu);
|
|
4118
|
-
const
|
|
4124
|
+
const D = En({
|
|
4119
4125
|
auth: g,
|
|
4120
4126
|
findPath: s.findPath,
|
|
4121
4127
|
useBearerToken: !0
|
|
4122
|
-
}), P =
|
|
4128
|
+
}), P = Ln({
|
|
4123
4129
|
getTimeZone: () => g.timeZone.value
|
|
4124
4130
|
});
|
|
4125
4131
|
Un({
|
|
4126
4132
|
dates: P
|
|
4127
4133
|
}), Gn(), wn({
|
|
4128
|
-
api:
|
|
4134
|
+
api: D,
|
|
4129
4135
|
auth: g,
|
|
4130
4136
|
navigation: s
|
|
4131
4137
|
});
|
|
@@ -4135,19 +4141,19 @@ function Pa(e) {
|
|
|
4135
4141
|
export {
|
|
4136
4142
|
sa as DataURIToBlob,
|
|
4137
4143
|
aa as addWeekday,
|
|
4138
|
-
|
|
4144
|
+
Ue as appendUrl,
|
|
4139
4145
|
nn as capitalizeWords,
|
|
4140
4146
|
On as checkImage,
|
|
4141
4147
|
fn as containsSearch,
|
|
4142
4148
|
na as containsWeekday,
|
|
4143
|
-
|
|
4149
|
+
Nr as copyDeep,
|
|
4144
4150
|
cn as copyItemByAlphabet,
|
|
4145
4151
|
En as createApi,
|
|
4146
4152
|
Dn as createAuth,
|
|
4147
4153
|
Pa as createCore,
|
|
4148
4154
|
Pn as createCosmetics,
|
|
4149
|
-
|
|
4150
|
-
|
|
4155
|
+
Ln as createDates,
|
|
4156
|
+
Nn as createDemo,
|
|
4151
4157
|
Un as createFilters,
|
|
4152
4158
|
Fn as createMenu,
|
|
4153
4159
|
$n as createNavigation,
|
|
@@ -4191,7 +4197,7 @@ export {
|
|
|
4191
4197
|
In as useAuth,
|
|
4192
4198
|
Wr as useAuthUrl,
|
|
4193
4199
|
Cn as useBlade,
|
|
4194
|
-
|
|
4200
|
+
Mn as useCSV,
|
|
4195
4201
|
ga as useCosmetics,
|
|
4196
4202
|
gn as useDataUrl,
|
|
4197
4203
|
ba as useDates,
|
|
@@ -4217,7 +4223,7 @@ export {
|
|
|
4217
4223
|
Bn as useTracker,
|
|
4218
4224
|
ha as useUrls,
|
|
4219
4225
|
hn as validEmail,
|
|
4220
|
-
|
|
4226
|
+
Ze as weekdayPairs,
|
|
4221
4227
|
ta as weekdayShortName,
|
|
4222
4228
|
ra as weekdayValue
|
|
4223
4229
|
};
|