bt-core-app 1.4.108 → 1.4.109
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 +847 -846
- package/package.json +1 -1
package/dist/bt-core-app.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref as z, shallowRef as Ne, computed as ee, toValue as
|
|
1
|
+
import { ref as z, shallowRef as Ne, computed as ee, toValue as J, watch as Te, toRef as Yt, onMounted as Xr } from "vue";
|
|
2
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";
|
|
@@ -32,9 +32,9 @@ function en(e) {
|
|
|
32
32
|
const u = { ...h };
|
|
33
33
|
u.completionMsg ?? (u.completionMsg = e == null ? void 0 : e.completionMsg), u.confirmationMsg ?? (u.confirmationMsg = e == null ? void 0 : e.confirmationMsg), u.errorMsg ?? (u.errorMsg = e == null ? void 0 : e.errorMsg), u.loadingMsg ?? (u.loadingMsg = (e == null ? void 0 : e.loadingMsg) ?? "Loading"), u.requireConfirmation ?? (u.requireConfirmation = e == null ? void 0 : e.requireConfirmation);
|
|
34
34
|
const r = C(u.loadingMsg);
|
|
35
|
-
let
|
|
35
|
+
let b = null;
|
|
36
36
|
try {
|
|
37
|
-
return u.requireConfirmation || u.confirmationMsg,
|
|
37
|
+
return u.requireConfirmation || u.confirmationMsg, b = await d(), u.completionMsg != null && (s.value = u.completionMsg), b;
|
|
38
38
|
} catch (D) {
|
|
39
39
|
if ((e == null ? void 0 : e.onError) != null)
|
|
40
40
|
e.onError(D);
|
|
@@ -382,8 +382,8 @@ var nt = { exports: {} };
|
|
|
382
382
|
}
|
|
383
383
|
var u = s[M] = { exports: {} };
|
|
384
384
|
A[M][0].call(u.exports, function(r) {
|
|
385
|
-
var
|
|
386
|
-
return I(
|
|
385
|
+
var b = A[M][1][r];
|
|
386
|
+
return I(b || r);
|
|
387
387
|
}, u, u.exports, l, A, s, g);
|
|
388
388
|
}
|
|
389
389
|
return s[M].exports;
|
|
@@ -418,15 +418,15 @@ var nt = { exports: {} };
|
|
|
418
418
|
var h, u = [];
|
|
419
419
|
function r() {
|
|
420
420
|
h = !0;
|
|
421
|
-
for (var D,
|
|
422
|
-
for (
|
|
423
|
-
|
|
424
|
-
|
|
421
|
+
for (var D, c, y = u.length; y; ) {
|
|
422
|
+
for (c = u, u = [], D = -1; ++D < y; )
|
|
423
|
+
c[D]();
|
|
424
|
+
y = u.length;
|
|
425
425
|
}
|
|
426
426
|
h = !1;
|
|
427
427
|
}
|
|
428
|
-
A.exports =
|
|
429
|
-
function
|
|
428
|
+
A.exports = b;
|
|
429
|
+
function b(D) {
|
|
430
430
|
u.push(D) === 1 && !h && C();
|
|
431
431
|
}
|
|
432
432
|
}).call(this, typeof Xe < "u" ? Xe : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
@@ -436,141 +436,141 @@ var nt = { exports: {} };
|
|
|
436
436
|
}
|
|
437
437
|
var C = {}, _ = ["REJECTED"], M = ["FULFILLED"], $ = ["PENDING"];
|
|
438
438
|
A.exports = d;
|
|
439
|
-
function d(
|
|
440
|
-
if (typeof
|
|
439
|
+
function d(E) {
|
|
440
|
+
if (typeof E != "function")
|
|
441
441
|
throw new TypeError("resolver must be a function");
|
|
442
|
-
this.state = $, this.queue = [], this.outcome = void 0,
|
|
442
|
+
this.state = $, this.queue = [], this.outcome = void 0, E !== I && b(this, E);
|
|
443
443
|
}
|
|
444
|
-
d.prototype.catch = function(
|
|
445
|
-
return this.then(null,
|
|
446
|
-
}, d.prototype.then = function(
|
|
447
|
-
if (typeof
|
|
444
|
+
d.prototype.catch = function(E) {
|
|
445
|
+
return this.then(null, E);
|
|
446
|
+
}, d.prototype.then = function(E, T) {
|
|
447
|
+
if (typeof E != "function" && this.state === M || typeof T != "function" && this.state === _)
|
|
448
448
|
return this;
|
|
449
449
|
var x = new this.constructor(I);
|
|
450
450
|
if (this.state !== $) {
|
|
451
|
-
var L = this.state === M ?
|
|
451
|
+
var L = this.state === M ? E : T;
|
|
452
452
|
u(x, L, this.outcome);
|
|
453
453
|
} else
|
|
454
|
-
this.queue.push(new h(x,
|
|
454
|
+
this.queue.push(new h(x, E, T));
|
|
455
455
|
return x;
|
|
456
456
|
};
|
|
457
|
-
function h(
|
|
458
|
-
this.promise =
|
|
457
|
+
function h(E, T, x) {
|
|
458
|
+
this.promise = E, typeof T == "function" && (this.onFulfilled = T, this.callFulfilled = this.otherCallFulfilled), typeof x == "function" && (this.onRejected = x, this.callRejected = this.otherCallRejected);
|
|
459
459
|
}
|
|
460
|
-
h.prototype.callFulfilled = function(
|
|
461
|
-
C.resolve(this.promise,
|
|
462
|
-
}, h.prototype.otherCallFulfilled = function(
|
|
463
|
-
u(this.promise, this.onFulfilled,
|
|
464
|
-
}, h.prototype.callRejected = function(
|
|
465
|
-
C.reject(this.promise,
|
|
466
|
-
}, h.prototype.otherCallRejected = function(
|
|
467
|
-
u(this.promise, this.onRejected,
|
|
460
|
+
h.prototype.callFulfilled = function(E) {
|
|
461
|
+
C.resolve(this.promise, E);
|
|
462
|
+
}, h.prototype.otherCallFulfilled = function(E) {
|
|
463
|
+
u(this.promise, this.onFulfilled, E);
|
|
464
|
+
}, h.prototype.callRejected = function(E) {
|
|
465
|
+
C.reject(this.promise, E);
|
|
466
|
+
}, h.prototype.otherCallRejected = function(E) {
|
|
467
|
+
u(this.promise, this.onRejected, E);
|
|
468
468
|
};
|
|
469
|
-
function u(
|
|
469
|
+
function u(E, T, x) {
|
|
470
470
|
g(function() {
|
|
471
471
|
var L;
|
|
472
472
|
try {
|
|
473
473
|
L = T(x);
|
|
474
474
|
} catch (f) {
|
|
475
|
-
return C.reject(
|
|
475
|
+
return C.reject(E, f);
|
|
476
476
|
}
|
|
477
|
-
L ===
|
|
477
|
+
L === E ? C.reject(E, new TypeError("Cannot resolve promise with itself")) : C.resolve(E, L);
|
|
478
478
|
});
|
|
479
479
|
}
|
|
480
|
-
C.resolve = function(
|
|
480
|
+
C.resolve = function(E, T) {
|
|
481
481
|
var x = D(r, T);
|
|
482
482
|
if (x.status === "error")
|
|
483
|
-
return C.reject(
|
|
483
|
+
return C.reject(E, x.value);
|
|
484
484
|
var L = x.value;
|
|
485
485
|
if (L)
|
|
486
|
-
|
|
486
|
+
b(E, L);
|
|
487
487
|
else {
|
|
488
|
-
|
|
489
|
-
for (var f = -1,
|
|
490
|
-
|
|
488
|
+
E.state = M, E.outcome = T;
|
|
489
|
+
for (var f = -1, w = E.queue.length; ++f < w; )
|
|
490
|
+
E.queue[f].callFulfilled(T);
|
|
491
491
|
}
|
|
492
|
-
return
|
|
493
|
-
}, C.reject = function(
|
|
494
|
-
|
|
495
|
-
for (var x = -1, L =
|
|
496
|
-
|
|
497
|
-
return
|
|
492
|
+
return E;
|
|
493
|
+
}, C.reject = function(E, T) {
|
|
494
|
+
E.state = _, E.outcome = T;
|
|
495
|
+
for (var x = -1, L = E.queue.length; ++x < L; )
|
|
496
|
+
E.queue[x].callRejected(T);
|
|
497
|
+
return E;
|
|
498
498
|
};
|
|
499
|
-
function r(
|
|
500
|
-
var T =
|
|
501
|
-
if (
|
|
499
|
+
function r(E) {
|
|
500
|
+
var T = E && E.then;
|
|
501
|
+
if (E && (typeof E == "object" || typeof E == "function") && typeof T == "function")
|
|
502
502
|
return function() {
|
|
503
|
-
T.apply(
|
|
503
|
+
T.apply(E, arguments);
|
|
504
504
|
};
|
|
505
505
|
}
|
|
506
|
-
function
|
|
506
|
+
function b(E, T) {
|
|
507
507
|
var x = !1;
|
|
508
508
|
function L(X) {
|
|
509
|
-
x || (x = !0, C.reject(
|
|
509
|
+
x || (x = !0, C.reject(E, X));
|
|
510
510
|
}
|
|
511
511
|
function f(X) {
|
|
512
|
-
x || (x = !0, C.resolve(
|
|
512
|
+
x || (x = !0, C.resolve(E, X));
|
|
513
513
|
}
|
|
514
|
-
function
|
|
514
|
+
function w() {
|
|
515
515
|
T(f, L);
|
|
516
516
|
}
|
|
517
|
-
var
|
|
518
|
-
|
|
517
|
+
var j = D(w);
|
|
518
|
+
j.status === "error" && L(j.value);
|
|
519
519
|
}
|
|
520
|
-
function D(
|
|
520
|
+
function D(E, T) {
|
|
521
521
|
var x = {};
|
|
522
522
|
try {
|
|
523
|
-
x.value =
|
|
523
|
+
x.value = E(T), x.status = "success";
|
|
524
524
|
} catch (L) {
|
|
525
525
|
x.status = "error", x.value = L;
|
|
526
526
|
}
|
|
527
527
|
return x;
|
|
528
528
|
}
|
|
529
|
-
d.resolve =
|
|
530
|
-
function
|
|
531
|
-
return
|
|
529
|
+
d.resolve = c;
|
|
530
|
+
function c(E) {
|
|
531
|
+
return E instanceof this ? E : C.resolve(new this(I), E);
|
|
532
532
|
}
|
|
533
|
-
d.reject =
|
|
534
|
-
function E
|
|
533
|
+
d.reject = y;
|
|
534
|
+
function y(E) {
|
|
535
535
|
var T = new this(I);
|
|
536
|
-
return C.reject(T,
|
|
536
|
+
return C.reject(T, E);
|
|
537
537
|
}
|
|
538
|
-
d.all =
|
|
539
|
-
function
|
|
538
|
+
d.all = S;
|
|
539
|
+
function S(E) {
|
|
540
540
|
var T = this;
|
|
541
|
-
if (Object.prototype.toString.call(
|
|
541
|
+
if (Object.prototype.toString.call(E) !== "[object Array]")
|
|
542
542
|
return this.reject(new TypeError("must be an array"));
|
|
543
|
-
var x =
|
|
543
|
+
var x = E.length, L = !1;
|
|
544
544
|
if (!x)
|
|
545
545
|
return this.resolve([]);
|
|
546
|
-
for (var f = new Array(x),
|
|
547
|
-
re(
|
|
546
|
+
for (var f = new Array(x), w = 0, j = -1, X = new this(I); ++j < x; )
|
|
547
|
+
re(E[j], j);
|
|
548
548
|
return X;
|
|
549
549
|
function re(ue, be) {
|
|
550
550
|
T.resolve(ue).then(G, function(Y) {
|
|
551
551
|
L || (L = !0, C.reject(X, Y));
|
|
552
552
|
});
|
|
553
553
|
function G(Y) {
|
|
554
|
-
f[be] = Y, ++
|
|
554
|
+
f[be] = Y, ++w === x && !L && (L = !0, C.resolve(X, f));
|
|
555
555
|
}
|
|
556
556
|
}
|
|
557
557
|
}
|
|
558
558
|
d.race = N;
|
|
559
|
-
function N(
|
|
559
|
+
function N(E) {
|
|
560
560
|
var T = this;
|
|
561
|
-
if (Object.prototype.toString.call(
|
|
561
|
+
if (Object.prototype.toString.call(E) !== "[object Array]")
|
|
562
562
|
return this.reject(new TypeError("must be an array"));
|
|
563
|
-
var x =
|
|
563
|
+
var x = E.length, L = !1;
|
|
564
564
|
if (!x)
|
|
565
565
|
return this.resolve([]);
|
|
566
|
-
for (var f = -1,
|
|
567
|
-
|
|
568
|
-
return
|
|
569
|
-
function
|
|
566
|
+
for (var f = -1, w = new this(I); ++f < x; )
|
|
567
|
+
j(E[f]);
|
|
568
|
+
return w;
|
|
569
|
+
function j(X) {
|
|
570
570
|
T.resolve(X).then(function(re) {
|
|
571
|
-
L || (L = !0, C.resolve(
|
|
571
|
+
L || (L = !0, C.resolve(w, re));
|
|
572
572
|
}, function(re) {
|
|
573
|
-
L || (L = !0, C.reject(
|
|
573
|
+
L || (L = !0, C.reject(w, re));
|
|
574
574
|
});
|
|
575
575
|
}
|
|
576
576
|
}
|
|
@@ -584,8 +584,8 @@ var nt = { exports: {} };
|
|
|
584
584
|
} : function(n) {
|
|
585
585
|
return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
|
|
586
586
|
};
|
|
587
|
-
function I(n,
|
|
588
|
-
if (!(n instanceof
|
|
587
|
+
function I(n, i) {
|
|
588
|
+
if (!(n instanceof i))
|
|
589
589
|
throw new TypeError("Cannot call a class as a function");
|
|
590
590
|
}
|
|
591
591
|
function C() {
|
|
@@ -609,8 +609,8 @@ var nt = { exports: {} };
|
|
|
609
609
|
try {
|
|
610
610
|
if (!_ || !_.open)
|
|
611
611
|
return !1;
|
|
612
|
-
var n = typeof openDatabase < "u" && /(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent) && !/BlackBerry/.test(navigator.platform),
|
|
613
|
-
return (!n ||
|
|
612
|
+
var n = typeof openDatabase < "u" && /(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent) && !/BlackBerry/.test(navigator.platform), i = typeof fetch == "function" && fetch.toString().indexOf("[native code") !== -1;
|
|
613
|
+
return (!n || i) && typeof indexedDB < "u" && // some outdated implementations of IDB that appear on Samsung
|
|
614
614
|
// and HTC Android devices <4.4 are missing IDBKeyRange
|
|
615
615
|
// See: https://github.com/mozilla/localForage/issues/128
|
|
616
616
|
// See: https://github.com/mozilla/localForage/issues/272
|
|
@@ -619,90 +619,90 @@ var nt = { exports: {} };
|
|
|
619
619
|
return !1;
|
|
620
620
|
}
|
|
621
621
|
}
|
|
622
|
-
function $(n,
|
|
623
|
-
n = n || [],
|
|
622
|
+
function $(n, i) {
|
|
623
|
+
n = n || [], i = i || {};
|
|
624
624
|
try {
|
|
625
|
-
return new Blob(n,
|
|
625
|
+
return new Blob(n, i);
|
|
626
626
|
} catch (o) {
|
|
627
627
|
if (o.name !== "TypeError")
|
|
628
628
|
throw o;
|
|
629
629
|
for (var a = typeof BlobBuilder < "u" ? BlobBuilder : typeof MSBlobBuilder < "u" ? MSBlobBuilder : typeof MozBlobBuilder < "u" ? MozBlobBuilder : WebKitBlobBuilder, m = new a(), v = 0; v < n.length; v += 1)
|
|
630
630
|
m.append(n[v]);
|
|
631
|
-
return m.getBlob(
|
|
631
|
+
return m.getBlob(i.type);
|
|
632
632
|
}
|
|
633
633
|
}
|
|
634
634
|
typeof Promise > "u" && l(3);
|
|
635
635
|
var d = Promise;
|
|
636
|
-
function h(n,
|
|
637
|
-
|
|
638
|
-
|
|
636
|
+
function h(n, i) {
|
|
637
|
+
i && n.then(function(a) {
|
|
638
|
+
i(null, a);
|
|
639
639
|
}, function(a) {
|
|
640
|
-
|
|
640
|
+
i(a);
|
|
641
641
|
});
|
|
642
642
|
}
|
|
643
|
-
function u(n,
|
|
644
|
-
typeof
|
|
643
|
+
function u(n, i, a) {
|
|
644
|
+
typeof i == "function" && n.then(i), typeof a == "function" && n.catch(a);
|
|
645
645
|
}
|
|
646
646
|
function r(n) {
|
|
647
647
|
return typeof n != "string" && (console.warn(n + " used as a key, but it is not a string."), n = String(n)), n;
|
|
648
648
|
}
|
|
649
|
-
function
|
|
649
|
+
function b() {
|
|
650
650
|
if (arguments.length && typeof arguments[arguments.length - 1] == "function")
|
|
651
651
|
return arguments[arguments.length - 1];
|
|
652
652
|
}
|
|
653
|
-
var D = "local-forage-detect-blob-support",
|
|
653
|
+
var D = "local-forage-detect-blob-support", c = void 0, y = {}, S = Object.prototype.toString, N = "readonly", E = "readwrite";
|
|
654
654
|
function T(n) {
|
|
655
|
-
for (var
|
|
655
|
+
for (var i = n.length, a = new ArrayBuffer(i), m = new Uint8Array(a), v = 0; v < i; v++)
|
|
656
656
|
m[v] = n.charCodeAt(v);
|
|
657
657
|
return a;
|
|
658
658
|
}
|
|
659
659
|
function x(n) {
|
|
660
|
-
return new d(function(
|
|
661
|
-
var a = n.transaction(D,
|
|
660
|
+
return new d(function(i) {
|
|
661
|
+
var a = n.transaction(D, E), m = $([""]);
|
|
662
662
|
a.objectStore(D).put(m, "key"), a.onabort = function(v) {
|
|
663
|
-
v.preventDefault(), v.stopPropagation(),
|
|
663
|
+
v.preventDefault(), v.stopPropagation(), i(!1);
|
|
664
664
|
}, a.oncomplete = function() {
|
|
665
665
|
var v = navigator.userAgent.match(/Chrome\/(\d+)/), o = navigator.userAgent.match(/Edge\//);
|
|
666
|
-
|
|
666
|
+
i(o || !v || parseInt(v[1], 10) >= 43);
|
|
667
667
|
};
|
|
668
668
|
}).catch(function() {
|
|
669
669
|
return !1;
|
|
670
670
|
});
|
|
671
671
|
}
|
|
672
672
|
function L(n) {
|
|
673
|
-
return typeof
|
|
674
|
-
return
|
|
673
|
+
return typeof c == "boolean" ? d.resolve(c) : x(n).then(function(i) {
|
|
674
|
+
return c = i, c;
|
|
675
675
|
});
|
|
676
676
|
}
|
|
677
677
|
function f(n) {
|
|
678
|
-
var
|
|
678
|
+
var i = y[n.name], a = {};
|
|
679
679
|
a.promise = new d(function(m, v) {
|
|
680
680
|
a.resolve = m, a.reject = v;
|
|
681
|
-
}),
|
|
681
|
+
}), i.deferredOperations.push(a), i.dbReady ? i.dbReady = i.dbReady.then(function() {
|
|
682
682
|
return a.promise;
|
|
683
|
-
}) :
|
|
683
|
+
}) : i.dbReady = a.promise;
|
|
684
684
|
}
|
|
685
|
-
function
|
|
686
|
-
var
|
|
685
|
+
function w(n) {
|
|
686
|
+
var i = y[n.name], a = i.deferredOperations.pop();
|
|
687
687
|
if (a)
|
|
688
688
|
return a.resolve(), a.promise;
|
|
689
689
|
}
|
|
690
|
-
function
|
|
691
|
-
var a =
|
|
690
|
+
function j(n, i) {
|
|
691
|
+
var a = y[n.name], m = a.deferredOperations.pop();
|
|
692
692
|
if (m)
|
|
693
|
-
return m.reject(
|
|
693
|
+
return m.reject(i), m.promise;
|
|
694
694
|
}
|
|
695
|
-
function X(n,
|
|
695
|
+
function X(n, i) {
|
|
696
696
|
return new d(function(a, m) {
|
|
697
|
-
if (
|
|
698
|
-
if (
|
|
697
|
+
if (y[n.name] = y[n.name] || ne(), n.db)
|
|
698
|
+
if (i)
|
|
699
699
|
f(n), n.db.close();
|
|
700
700
|
else
|
|
701
701
|
return a(n.db);
|
|
702
702
|
var v = [n.name];
|
|
703
|
-
|
|
703
|
+
i && v.push(n.version);
|
|
704
704
|
var o = _.open.apply(_, v);
|
|
705
|
-
|
|
705
|
+
i && (o.onupgradeneeded = function(P) {
|
|
706
706
|
var R = o.result;
|
|
707
707
|
try {
|
|
708
708
|
R.createObjectStore(n.storeName), P.oldVersion <= 1 && R.createObjectStore(D);
|
|
@@ -718,7 +718,7 @@ var nt = { exports: {} };
|
|
|
718
718
|
var P = o.result;
|
|
719
719
|
P.onversionchange = function(R) {
|
|
720
720
|
R.target.close();
|
|
721
|
-
}, a(P),
|
|
721
|
+
}, a(P), w(n);
|
|
722
722
|
};
|
|
723
723
|
});
|
|
724
724
|
}
|
|
@@ -728,11 +728,11 @@ var nt = { exports: {} };
|
|
|
728
728
|
function ue(n) {
|
|
729
729
|
return X(n, !0);
|
|
730
730
|
}
|
|
731
|
-
function be(n,
|
|
731
|
+
function be(n, i) {
|
|
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;
|
|
735
|
-
if (m && (n.version !==
|
|
735
|
+
if (m && (n.version !== i && console.warn('The database "' + n.name + `" can't be downgraded from version ` + n.db.version + " to version " + n.version + "."), n.version = n.db.version), v || a) {
|
|
736
736
|
if (a) {
|
|
737
737
|
var o = n.db.version + 1;
|
|
738
738
|
o > n.version && (n.version = o);
|
|
@@ -742,11 +742,11 @@ var nt = { exports: {} };
|
|
|
742
742
|
return !1;
|
|
743
743
|
}
|
|
744
744
|
function G(n) {
|
|
745
|
-
return new d(function(
|
|
745
|
+
return new d(function(i, a) {
|
|
746
746
|
var m = new FileReader();
|
|
747
747
|
m.onerror = a, m.onloadend = function(v) {
|
|
748
748
|
var o = btoa(v.target.result || "");
|
|
749
|
-
|
|
749
|
+
i({
|
|
750
750
|
__local_forage_encoded_blob: !0,
|
|
751
751
|
data: o,
|
|
752
752
|
type: n.type
|
|
@@ -755,15 +755,15 @@ var nt = { exports: {} };
|
|
|
755
755
|
});
|
|
756
756
|
}
|
|
757
757
|
function Y(n) {
|
|
758
|
-
var
|
|
759
|
-
return $([
|
|
758
|
+
var i = T(atob(n.data));
|
|
759
|
+
return $([i], { type: n.type });
|
|
760
760
|
}
|
|
761
761
|
function H(n) {
|
|
762
762
|
return n && n.__local_forage_encoded_blob;
|
|
763
763
|
}
|
|
764
764
|
function ie(n) {
|
|
765
|
-
var
|
|
766
|
-
var m =
|
|
765
|
+
var i = this, a = i._initReady().then(function() {
|
|
766
|
+
var m = y[i._dbInfo.name];
|
|
767
767
|
if (m && m.dbReady)
|
|
768
768
|
return m.dbReady;
|
|
769
769
|
});
|
|
@@ -771,24 +771,24 @@ var nt = { exports: {} };
|
|
|
771
771
|
}
|
|
772
772
|
function Z(n) {
|
|
773
773
|
f(n);
|
|
774
|
-
for (var
|
|
774
|
+
for (var i = y[n.name], a = i.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
778
|
return n.db = null, re(n).then(function(o) {
|
|
779
779
|
return n.db = o, be(n) ? ue(n) : o;
|
|
780
780
|
}).then(function(o) {
|
|
781
|
-
n.db =
|
|
781
|
+
n.db = i.db = o;
|
|
782
782
|
for (var P = 0; P < a.length; P++)
|
|
783
783
|
a[P]._dbInfo.db = o;
|
|
784
784
|
}).catch(function(o) {
|
|
785
|
-
throw
|
|
785
|
+
throw j(n, o), o;
|
|
786
786
|
});
|
|
787
787
|
}
|
|
788
|
-
function W(n,
|
|
788
|
+
function W(n, i, a, m) {
|
|
789
789
|
m === void 0 && (m = 1);
|
|
790
790
|
try {
|
|
791
|
-
var v = n.db.transaction(n.storeName,
|
|
791
|
+
var v = n.db.transaction(n.storeName, i);
|
|
792
792
|
a(null, v);
|
|
793
793
|
} catch (o) {
|
|
794
794
|
if (m > 0 && (!n.db || o.name === "InvalidStateError" || o.name === "NotFoundError"))
|
|
@@ -797,7 +797,7 @@ var nt = { exports: {} };
|
|
|
797
797
|
return n.db && (n.version = n.db.version + 1), ue(n);
|
|
798
798
|
}).then(function() {
|
|
799
799
|
return Z(n).then(function() {
|
|
800
|
-
W(n,
|
|
800
|
+
W(n, i, a, m - 1);
|
|
801
801
|
});
|
|
802
802
|
}).catch(a);
|
|
803
803
|
a(o);
|
|
@@ -816,36 +816,36 @@ var nt = { exports: {} };
|
|
|
816
816
|
};
|
|
817
817
|
}
|
|
818
818
|
function ce(n) {
|
|
819
|
-
var
|
|
819
|
+
var i = this, a = {
|
|
820
820
|
db: null
|
|
821
821
|
};
|
|
822
822
|
if (n)
|
|
823
823
|
for (var m in n)
|
|
824
824
|
a[m] = n[m];
|
|
825
|
-
var v =
|
|
826
|
-
v || (v = ne(),
|
|
825
|
+
var v = y[a.name];
|
|
826
|
+
v || (v = ne(), y[a.name] = v), v.forages.push(i), i._initReady || (i._initReady = i.ready, i.ready = ie);
|
|
827
827
|
var o = [];
|
|
828
828
|
function P() {
|
|
829
829
|
return d.resolve();
|
|
830
830
|
}
|
|
831
831
|
for (var R = 0; R < v.forages.length; R++) {
|
|
832
832
|
var B = v.forages[R];
|
|
833
|
-
B !==
|
|
833
|
+
B !== i && o.push(B._initReady().catch(P));
|
|
834
834
|
}
|
|
835
835
|
var F = v.forages.slice(0);
|
|
836
836
|
return d.all(o).then(function() {
|
|
837
837
|
return a.db = v.db, re(a);
|
|
838
838
|
}).then(function(k) {
|
|
839
|
-
return a.db = k, be(a,
|
|
839
|
+
return a.db = k, be(a, i._defaultConfig.version) ? ue(a) : k;
|
|
840
840
|
}).then(function(k) {
|
|
841
|
-
a.db = v.db = k,
|
|
841
|
+
a.db = v.db = k, i._dbInfo = a;
|
|
842
842
|
for (var q = 0; q < F.length; q++) {
|
|
843
|
-
var
|
|
844
|
-
|
|
843
|
+
var K = F[q];
|
|
844
|
+
K !== i && (K._dbInfo.db = a.db, K._dbInfo.version = a.version);
|
|
845
845
|
}
|
|
846
846
|
});
|
|
847
847
|
}
|
|
848
|
-
function se(n,
|
|
848
|
+
function se(n, i) {
|
|
849
849
|
var a = this;
|
|
850
850
|
n = r(n);
|
|
851
851
|
var m = new d(function(v, o) {
|
|
@@ -867,9 +867,9 @@ var nt = { exports: {} };
|
|
|
867
867
|
});
|
|
868
868
|
}).catch(o);
|
|
869
869
|
});
|
|
870
|
-
return h(m,
|
|
870
|
+
return h(m, i), m;
|
|
871
871
|
}
|
|
872
|
-
function ge(n,
|
|
872
|
+
function ge(n, i) {
|
|
873
873
|
var a = this, m = new d(function(v, o) {
|
|
874
874
|
a.ready().then(function() {
|
|
875
875
|
W(a._dbInfo, N, function(P, R) {
|
|
@@ -880,9 +880,9 @@ var nt = { exports: {} };
|
|
|
880
880
|
F.onsuccess = function() {
|
|
881
881
|
var q = F.result;
|
|
882
882
|
if (q) {
|
|
883
|
-
var
|
|
884
|
-
H(
|
|
885
|
-
var p = n(
|
|
883
|
+
var K = q.value;
|
|
884
|
+
H(K) && (K = Y(K));
|
|
885
|
+
var p = n(K, q.key, k++);
|
|
886
886
|
p !== void 0 ? v(p) : q.continue();
|
|
887
887
|
} else
|
|
888
888
|
v();
|
|
@@ -895,29 +895,29 @@ var nt = { exports: {} };
|
|
|
895
895
|
});
|
|
896
896
|
}).catch(o);
|
|
897
897
|
});
|
|
898
|
-
return h(m,
|
|
898
|
+
return h(m, i), m;
|
|
899
899
|
}
|
|
900
|
-
function Be(n,
|
|
900
|
+
function Be(n, i, a) {
|
|
901
901
|
var m = this;
|
|
902
902
|
n = r(n);
|
|
903
903
|
var v = new d(function(o, P) {
|
|
904
904
|
var R;
|
|
905
905
|
m.ready().then(function() {
|
|
906
|
-
return R = m._dbInfo,
|
|
907
|
-
return B ?
|
|
908
|
-
}) :
|
|
906
|
+
return R = m._dbInfo, S.call(i) === "[object Blob]" ? L(R.db).then(function(B) {
|
|
907
|
+
return B ? i : G(i);
|
|
908
|
+
}) : i;
|
|
909
909
|
}).then(function(B) {
|
|
910
|
-
W(m._dbInfo,
|
|
910
|
+
W(m._dbInfo, E, function(F, k) {
|
|
911
911
|
if (F)
|
|
912
912
|
return P(F);
|
|
913
913
|
try {
|
|
914
914
|
var q = k.objectStore(m._dbInfo.storeName);
|
|
915
915
|
B === null && (B = void 0);
|
|
916
|
-
var
|
|
916
|
+
var K = 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 p =
|
|
920
|
+
var p = K.error ? K.error : K.transaction.error;
|
|
921
921
|
P(p);
|
|
922
922
|
};
|
|
923
923
|
} catch (p) {
|
|
@@ -928,12 +928,12 @@ var nt = { exports: {} };
|
|
|
928
928
|
});
|
|
929
929
|
return h(v, a), v;
|
|
930
930
|
}
|
|
931
|
-
function $e(n,
|
|
931
|
+
function $e(n, i) {
|
|
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
|
-
W(a._dbInfo,
|
|
936
|
+
W(a._dbInfo, E, function(P, R) {
|
|
937
937
|
if (P)
|
|
938
938
|
return o(P);
|
|
939
939
|
try {
|
|
@@ -952,16 +952,16 @@ var nt = { exports: {} };
|
|
|
952
952
|
});
|
|
953
953
|
}).catch(o);
|
|
954
954
|
});
|
|
955
|
-
return h(m,
|
|
955
|
+
return h(m, i), m;
|
|
956
956
|
}
|
|
957
957
|
function Fe(n) {
|
|
958
|
-
var
|
|
959
|
-
|
|
960
|
-
W(
|
|
958
|
+
var i = this, a = new d(function(m, v) {
|
|
959
|
+
i.ready().then(function() {
|
|
960
|
+
W(i._dbInfo, E, function(o, P) {
|
|
961
961
|
if (o)
|
|
962
962
|
return v(o);
|
|
963
963
|
try {
|
|
964
|
-
var R = P.objectStore(
|
|
964
|
+
var R = P.objectStore(i._dbInfo.storeName), B = R.clear();
|
|
965
965
|
P.oncomplete = function() {
|
|
966
966
|
m();
|
|
967
967
|
}, P.onabort = P.onerror = function() {
|
|
@@ -977,13 +977,13 @@ var nt = { exports: {} };
|
|
|
977
977
|
return h(a, n), a;
|
|
978
978
|
}
|
|
979
979
|
function tr(n) {
|
|
980
|
-
var
|
|
981
|
-
|
|
982
|
-
W(
|
|
980
|
+
var i = this, a = new d(function(m, v) {
|
|
981
|
+
i.ready().then(function() {
|
|
982
|
+
W(i._dbInfo, N, function(o, P) {
|
|
983
983
|
if (o)
|
|
984
984
|
return v(o);
|
|
985
985
|
try {
|
|
986
|
-
var R = P.objectStore(
|
|
986
|
+
var R = P.objectStore(i._dbInfo.storeName), B = R.count();
|
|
987
987
|
B.onsuccess = function() {
|
|
988
988
|
m(B.result);
|
|
989
989
|
}, B.onerror = function() {
|
|
@@ -997,7 +997,7 @@ var nt = { exports: {} };
|
|
|
997
997
|
});
|
|
998
998
|
return h(a, n), a;
|
|
999
999
|
}
|
|
1000
|
-
function nr(n,
|
|
1000
|
+
function nr(n, i) {
|
|
1001
1001
|
var a = this, m = new d(function(v, o) {
|
|
1002
1002
|
if (n < 0) {
|
|
1003
1003
|
v(null);
|
|
@@ -1025,16 +1025,16 @@ var nt = { exports: {} };
|
|
|
1025
1025
|
});
|
|
1026
1026
|
}).catch(o);
|
|
1027
1027
|
});
|
|
1028
|
-
return h(m,
|
|
1028
|
+
return h(m, i), m;
|
|
1029
1029
|
}
|
|
1030
1030
|
function Ce(n) {
|
|
1031
|
-
var
|
|
1032
|
-
|
|
1033
|
-
W(
|
|
1031
|
+
var i = this, a = new d(function(m, v) {
|
|
1032
|
+
i.ready().then(function() {
|
|
1033
|
+
W(i._dbInfo, N, function(o, P) {
|
|
1034
1034
|
if (o)
|
|
1035
1035
|
return v(o);
|
|
1036
1036
|
try {
|
|
1037
|
-
var R = P.objectStore(
|
|
1037
|
+
var R = P.objectStore(i._dbInfo.storeName), B = R.openKeyCursor(), F = [];
|
|
1038
1038
|
B.onsuccess = function() {
|
|
1039
1039
|
var k = B.result;
|
|
1040
1040
|
if (!k) {
|
|
@@ -1053,8 +1053,8 @@ var nt = { exports: {} };
|
|
|
1053
1053
|
});
|
|
1054
1054
|
return h(a, n), a;
|
|
1055
1055
|
}
|
|
1056
|
-
function ar(n,
|
|
1057
|
-
|
|
1056
|
+
function ar(n, i) {
|
|
1057
|
+
i = b.apply(this, arguments);
|
|
1058
1058
|
var a = this.config();
|
|
1059
1059
|
n = typeof n != "function" && n || {}, n.name || (n.name = n.name || a.name, n.storeName = n.storeName || a.storeName);
|
|
1060
1060
|
var m = this, v;
|
|
@@ -1062,7 +1062,7 @@ var nt = { exports: {} };
|
|
|
1062
1062
|
v = d.reject("Invalid arguments");
|
|
1063
1063
|
else {
|
|
1064
1064
|
var o = n.name === a.name && m._dbInfo.db, P = o ? d.resolve(m._dbInfo.db) : re(n).then(function(R) {
|
|
1065
|
-
var B =
|
|
1065
|
+
var B = y[n.name], F = B.forages;
|
|
1066
1066
|
B.db = R;
|
|
1067
1067
|
for (var k = 0; k < F.length; k++)
|
|
1068
1068
|
F[k]._dbInfo.db = R;
|
|
@@ -1072,11 +1072,11 @@ var nt = { exports: {} };
|
|
|
1072
1072
|
if (R.objectStoreNames.contains(n.storeName)) {
|
|
1073
1073
|
var B = R.version + 1;
|
|
1074
1074
|
f(n);
|
|
1075
|
-
var F =
|
|
1075
|
+
var F = y[n.name], k = F.forages;
|
|
1076
1076
|
R.close();
|
|
1077
1077
|
for (var q = 0; q < k.length; q++) {
|
|
1078
|
-
var
|
|
1079
|
-
|
|
1078
|
+
var K = k[q];
|
|
1079
|
+
K._dbInfo.db = null, K._dbInfo.version = B;
|
|
1080
1080
|
}
|
|
1081
1081
|
var p = new d(function(te, fe) {
|
|
1082
1082
|
var ae = _.open(n.name, B);
|
|
@@ -1095,22 +1095,22 @@ var nt = { exports: {} };
|
|
|
1095
1095
|
F.db = te;
|
|
1096
1096
|
for (var fe = 0; fe < k.length; fe++) {
|
|
1097
1097
|
var ae = k[fe];
|
|
1098
|
-
ae._dbInfo.db = te,
|
|
1098
|
+
ae._dbInfo.db = te, w(ae._dbInfo);
|
|
1099
1099
|
}
|
|
1100
1100
|
}).catch(function(te) {
|
|
1101
|
-
throw (
|
|
1101
|
+
throw (j(n, te) || d.resolve()).catch(function() {
|
|
1102
1102
|
}), te;
|
|
1103
1103
|
});
|
|
1104
1104
|
}
|
|
1105
1105
|
}) : v = P.then(function(R) {
|
|
1106
1106
|
f(n);
|
|
1107
|
-
var B =
|
|
1107
|
+
var B = y[n.name], F = B.forages;
|
|
1108
1108
|
R.close();
|
|
1109
1109
|
for (var k = 0; k < F.length; k++) {
|
|
1110
1110
|
var q = F[k];
|
|
1111
1111
|
q._dbInfo.db = null;
|
|
1112
1112
|
}
|
|
1113
|
-
var
|
|
1113
|
+
var K = new d(function(p, te) {
|
|
1114
1114
|
var fe = _.deleteDatabase(n.name);
|
|
1115
1115
|
fe.onerror = function() {
|
|
1116
1116
|
var ae = fe.result;
|
|
@@ -1122,19 +1122,19 @@ var nt = { exports: {} };
|
|
|
1122
1122
|
ae && ae.close(), p(ae);
|
|
1123
1123
|
};
|
|
1124
1124
|
});
|
|
1125
|
-
return
|
|
1125
|
+
return K.then(function(p) {
|
|
1126
1126
|
B.db = p;
|
|
1127
1127
|
for (var te = 0; te < F.length; te++) {
|
|
1128
1128
|
var fe = F[te];
|
|
1129
|
-
|
|
1129
|
+
w(fe._dbInfo);
|
|
1130
1130
|
}
|
|
1131
1131
|
}).catch(function(p) {
|
|
1132
|
-
throw (
|
|
1132
|
+
throw (j(n, p) || d.resolve()).catch(function() {
|
|
1133
1133
|
}), p;
|
|
1134
1134
|
});
|
|
1135
1135
|
});
|
|
1136
1136
|
}
|
|
1137
|
-
return h(v,
|
|
1137
|
+
return h(v, i), v;
|
|
1138
1138
|
}
|
|
1139
1139
|
var lr = {
|
|
1140
1140
|
_driver: "asyncStorage",
|
|
@@ -1155,46 +1155,46 @@ var nt = { exports: {} };
|
|
|
1155
1155
|
}
|
|
1156
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", Q = "ur16", V = "ui32", O = "fl32", de = "fl64", ye = Pe + qe.length, De = Object.prototype.toString;
|
|
1157
1157
|
function Ae(n) {
|
|
1158
|
-
var
|
|
1159
|
-
n[n.length - 1] === "=" && (
|
|
1160
|
-
var F = new ArrayBuffer(
|
|
1158
|
+
var i = n.length * 0.75, a = n.length, m, v = 0, o, P, R, B;
|
|
1159
|
+
n[n.length - 1] === "=" && (i--, n[n.length - 2] === "=" && i--);
|
|
1160
|
+
var F = new ArrayBuffer(i), k = new Uint8Array(F);
|
|
1161
1161
|
for (m = 0; m < a; m += 4)
|
|
1162
1162
|
o = Se.indexOf(n[m]), P = Se.indexOf(n[m + 1]), R = Se.indexOf(n[m + 2]), B = Se.indexOf(n[m + 3]), k[v++] = o << 2 | P >> 4, k[v++] = (P & 15) << 4 | R >> 2, k[v++] = (R & 3) << 6 | B & 63;
|
|
1163
1163
|
return F;
|
|
1164
1164
|
}
|
|
1165
1165
|
function oe(n) {
|
|
1166
|
-
var
|
|
1167
|
-
for (m = 0; m <
|
|
1168
|
-
a += Se[
|
|
1169
|
-
return
|
|
1166
|
+
var i = new Uint8Array(n), a = "", m;
|
|
1167
|
+
for (m = 0; m < i.length; m += 3)
|
|
1168
|
+
a += Se[i[m] >> 2], a += Se[(i[m] & 3) << 4 | i[m + 1] >> 4], a += Se[(i[m + 1] & 15) << 2 | i[m + 2] >> 6], a += Se[i[m + 2] & 63];
|
|
1169
|
+
return i.length % 3 === 2 ? a = a.substring(0, a.length - 1) + "=" : i.length % 3 === 1 && (a = a.substring(0, a.length - 2) + "=="), a;
|
|
1170
1170
|
}
|
|
1171
|
-
function Me(n,
|
|
1171
|
+
function Me(n, i) {
|
|
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
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 += Q : a === "[object Int32Array]" ? v += U : a === "[object Uint32Array]" ? v += V : a === "[object Float32Array]" ? v += O : a === "[object Float64Array]" ? v += de :
|
|
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 += Q : a === "[object Int32Array]" ? v += U : a === "[object Uint32Array]" ? v += V : a === "[object Float32Array]" ? v += O : a === "[object Float64Array]" ? v += de : i(new Error("Failed to get type for BinaryArray"))), i(v + oe(m));
|
|
1176
1176
|
} else if (a === "[object Blob]") {
|
|
1177
1177
|
var o = new FileReader();
|
|
1178
1178
|
o.onload = function() {
|
|
1179
1179
|
var P = ir + n.type + "~" + oe(this.result);
|
|
1180
|
-
|
|
1180
|
+
i(ke + Ie + P);
|
|
1181
1181
|
}, o.readAsArrayBuffer(n);
|
|
1182
1182
|
} else
|
|
1183
1183
|
try {
|
|
1184
|
-
|
|
1184
|
+
i(JSON.stringify(n));
|
|
1185
1185
|
} catch (P) {
|
|
1186
|
-
console.error("Couldn't convert value into a JSON string: ", n),
|
|
1186
|
+
console.error("Couldn't convert value into a JSON string: ", n), i(null, P);
|
|
1187
1187
|
}
|
|
1188
1188
|
}
|
|
1189
1189
|
function ct(n) {
|
|
1190
1190
|
if (n.substring(0, Pe) !== ke)
|
|
1191
1191
|
return JSON.parse(n);
|
|
1192
|
-
var
|
|
1193
|
-
if (a === Ie && Je.test(
|
|
1194
|
-
var v =
|
|
1195
|
-
m = v[1],
|
|
1192
|
+
var i = n.substring(ye), a = n.substring(Pe, ye), m;
|
|
1193
|
+
if (a === Ie && Je.test(i)) {
|
|
1194
|
+
var v = i.match(Je);
|
|
1195
|
+
m = v[1], i = i.substring(v[0].length);
|
|
1196
1196
|
}
|
|
1197
|
-
var o = Ae(
|
|
1197
|
+
var o = Ae(i);
|
|
1198
1198
|
switch (a) {
|
|
1199
1199
|
case qe:
|
|
1200
1200
|
return o;
|
|
@@ -1228,11 +1228,11 @@ var nt = { exports: {} };
|
|
|
1228
1228
|
stringToBuffer: Ae,
|
|
1229
1229
|
bufferToString: oe
|
|
1230
1230
|
};
|
|
1231
|
-
function Rr(n,
|
|
1232
|
-
n.executeSql("CREATE TABLE IF NOT EXISTS " +
|
|
1231
|
+
function Rr(n, i, a, m) {
|
|
1232
|
+
n.executeSql("CREATE TABLE IF NOT EXISTS " + i.storeName + " (id INTEGER PRIMARY KEY, key unique, value)", [], a, m);
|
|
1233
1233
|
}
|
|
1234
1234
|
function ft(n) {
|
|
1235
|
-
var
|
|
1235
|
+
var i = this, a = {
|
|
1236
1236
|
db: null
|
|
1237
1237
|
};
|
|
1238
1238
|
if (n)
|
|
@@ -1246,7 +1246,7 @@ var nt = { exports: {} };
|
|
|
1246
1246
|
}
|
|
1247
1247
|
a.db.transaction(function(R) {
|
|
1248
1248
|
Rr(R, a, function() {
|
|
1249
|
-
|
|
1249
|
+
i._dbInfo = a, o();
|
|
1250
1250
|
}, function(B, F) {
|
|
1251
1251
|
P(F);
|
|
1252
1252
|
});
|
|
@@ -1254,16 +1254,16 @@ var nt = { exports: {} };
|
|
|
1254
1254
|
});
|
|
1255
1255
|
return a.serializer = cr, v;
|
|
1256
1256
|
}
|
|
1257
|
-
function xe(n,
|
|
1257
|
+
function xe(n, i, a, m, v, o) {
|
|
1258
1258
|
n.executeSql(a, m, v, function(P, R) {
|
|
1259
|
-
R.code === R.SYNTAX_ERR ? P.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?", [
|
|
1260
|
-
F.rows.length ? o(B, R) : Rr(B,
|
|
1259
|
+
R.code === R.SYNTAX_ERR ? P.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?", [i.storeName], function(B, F) {
|
|
1260
|
+
F.rows.length ? o(B, R) : Rr(B, i, function() {
|
|
1261
1261
|
B.executeSql(a, m, v, o);
|
|
1262
1262
|
}, o);
|
|
1263
1263
|
}, o) : o(P, R);
|
|
1264
1264
|
}, o);
|
|
1265
1265
|
}
|
|
1266
|
-
function st(n,
|
|
1266
|
+
function st(n, i) {
|
|
1267
1267
|
var a = this;
|
|
1268
1268
|
n = r(n);
|
|
1269
1269
|
var m = new d(function(v, o) {
|
|
@@ -1279,17 +1279,17 @@ var nt = { exports: {} };
|
|
|
1279
1279
|
});
|
|
1280
1280
|
}).catch(o);
|
|
1281
1281
|
});
|
|
1282
|
-
return h(m,
|
|
1282
|
+
return h(m, i), m;
|
|
1283
1283
|
}
|
|
1284
|
-
function ot(n,
|
|
1284
|
+
function ot(n, i) {
|
|
1285
1285
|
var a = this, m = new d(function(v, o) {
|
|
1286
1286
|
a.ready().then(function() {
|
|
1287
1287
|
var P = a._dbInfo;
|
|
1288
1288
|
P.db.transaction(function(R) {
|
|
1289
1289
|
xe(R, P, "SELECT * FROM " + P.storeName, [], function(B, F) {
|
|
1290
|
-
for (var k = F.rows, q = k.length,
|
|
1291
|
-
var p = k.item(
|
|
1292
|
-
if (te && (te = P.serializer.deserialize(te)), te = n(te, p.key,
|
|
1290
|
+
for (var k = F.rows, q = k.length, K = 0; K < q; K++) {
|
|
1291
|
+
var p = k.item(K), te = p.value;
|
|
1292
|
+
if (te && (te = P.serializer.deserialize(te)), te = n(te, p.key, K + 1), te !== void 0) {
|
|
1293
1293
|
v(te);
|
|
1294
1294
|
return;
|
|
1295
1295
|
}
|
|
@@ -1301,29 +1301,29 @@ var nt = { exports: {} };
|
|
|
1301
1301
|
});
|
|
1302
1302
|
}).catch(o);
|
|
1303
1303
|
});
|
|
1304
|
-
return h(m,
|
|
1304
|
+
return h(m, i), m;
|
|
1305
1305
|
}
|
|
1306
|
-
function Ur(n,
|
|
1306
|
+
function Ur(n, i, a, m) {
|
|
1307
1307
|
var v = this;
|
|
1308
1308
|
n = r(n);
|
|
1309
1309
|
var o = new d(function(P, R) {
|
|
1310
1310
|
v.ready().then(function() {
|
|
1311
|
-
|
|
1312
|
-
var B =
|
|
1313
|
-
F.serializer.serialize(
|
|
1314
|
-
q ? R(q) : F.db.transaction(function(
|
|
1315
|
-
xe(
|
|
1311
|
+
i === void 0 && (i = null);
|
|
1312
|
+
var B = i, F = v._dbInfo;
|
|
1313
|
+
F.serializer.serialize(i, function(k, q) {
|
|
1314
|
+
q ? R(q) : F.db.transaction(function(K) {
|
|
1315
|
+
xe(K, F, "INSERT OR REPLACE INTO " + F.storeName + " (key, value) VALUES (?, ?)", [n, k], function() {
|
|
1316
1316
|
P(B);
|
|
1317
1317
|
}, function(p, te) {
|
|
1318
1318
|
R(te);
|
|
1319
1319
|
});
|
|
1320
|
-
}, function(
|
|
1321
|
-
if (
|
|
1320
|
+
}, function(K) {
|
|
1321
|
+
if (K.code === K.QUOTA_ERR) {
|
|
1322
1322
|
if (m > 0) {
|
|
1323
1323
|
P(Ur.apply(v, [n, B, a, m - 1]));
|
|
1324
1324
|
return;
|
|
1325
1325
|
}
|
|
1326
|
-
R(
|
|
1326
|
+
R(K);
|
|
1327
1327
|
}
|
|
1328
1328
|
});
|
|
1329
1329
|
});
|
|
@@ -1331,10 +1331,10 @@ var nt = { exports: {} };
|
|
|
1331
1331
|
});
|
|
1332
1332
|
return h(o, a), o;
|
|
1333
1333
|
}
|
|
1334
|
-
function dt(n,
|
|
1335
|
-
return Ur.apply(this, [n,
|
|
1334
|
+
function dt(n, i, a) {
|
|
1335
|
+
return Ur.apply(this, [n, i, a, 1]);
|
|
1336
1336
|
}
|
|
1337
|
-
function ht(n,
|
|
1337
|
+
function ht(n, i) {
|
|
1338
1338
|
var a = this;
|
|
1339
1339
|
n = r(n);
|
|
1340
1340
|
var m = new d(function(v, o) {
|
|
@@ -1349,12 +1349,12 @@ var nt = { exports: {} };
|
|
|
1349
1349
|
});
|
|
1350
1350
|
}).catch(o);
|
|
1351
1351
|
});
|
|
1352
|
-
return h(m,
|
|
1352
|
+
return h(m, i), m;
|
|
1353
1353
|
}
|
|
1354
1354
|
function mt(n) {
|
|
1355
|
-
var
|
|
1356
|
-
|
|
1357
|
-
var o =
|
|
1355
|
+
var i = this, a = new d(function(m, v) {
|
|
1356
|
+
i.ready().then(function() {
|
|
1357
|
+
var o = i._dbInfo;
|
|
1358
1358
|
o.db.transaction(function(P) {
|
|
1359
1359
|
xe(P, o, "DELETE FROM " + o.storeName, [], function() {
|
|
1360
1360
|
m();
|
|
@@ -1367,9 +1367,9 @@ var nt = { exports: {} };
|
|
|
1367
1367
|
return h(a, n), a;
|
|
1368
1368
|
}
|
|
1369
1369
|
function vt(n) {
|
|
1370
|
-
var
|
|
1371
|
-
|
|
1372
|
-
var o =
|
|
1370
|
+
var i = this, a = new d(function(m, v) {
|
|
1371
|
+
i.ready().then(function() {
|
|
1372
|
+
var o = i._dbInfo;
|
|
1373
1373
|
o.db.transaction(function(P) {
|
|
1374
1374
|
xe(P, o, "SELECT COUNT(key) as c FROM " + o.storeName, [], function(R, B) {
|
|
1375
1375
|
var F = B.rows.item(0).c;
|
|
@@ -1382,7 +1382,7 @@ var nt = { exports: {} };
|
|
|
1382
1382
|
});
|
|
1383
1383
|
return h(a, n), a;
|
|
1384
1384
|
}
|
|
1385
|
-
function gt(n,
|
|
1385
|
+
function gt(n, i) {
|
|
1386
1386
|
var a = this, m = new d(function(v, o) {
|
|
1387
1387
|
a.ready().then(function() {
|
|
1388
1388
|
var P = a._dbInfo;
|
|
@@ -1396,12 +1396,12 @@ var nt = { exports: {} };
|
|
|
1396
1396
|
});
|
|
1397
1397
|
}).catch(o);
|
|
1398
1398
|
});
|
|
1399
|
-
return h(m,
|
|
1399
|
+
return h(m, i), m;
|
|
1400
1400
|
}
|
|
1401
1401
|
function yt(n) {
|
|
1402
|
-
var
|
|
1403
|
-
|
|
1404
|
-
var o =
|
|
1402
|
+
var i = this, a = new d(function(m, v) {
|
|
1403
|
+
i.ready().then(function() {
|
|
1404
|
+
var o = i._dbInfo;
|
|
1405
1405
|
o.db.transaction(function(P) {
|
|
1406
1406
|
xe(P, o, "SELECT key FROM " + o.storeName, [], function(R, B) {
|
|
1407
1407
|
for (var F = [], k = 0; k < B.rows.length; k++)
|
|
@@ -1416,12 +1416,12 @@ var nt = { exports: {} };
|
|
|
1416
1416
|
return h(a, n), a;
|
|
1417
1417
|
}
|
|
1418
1418
|
function wt(n) {
|
|
1419
|
-
return new d(function(
|
|
1419
|
+
return new d(function(i, a) {
|
|
1420
1420
|
n.transaction(function(m) {
|
|
1421
1421
|
m.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'", [], function(v, o) {
|
|
1422
1422
|
for (var P = [], R = 0; R < o.rows.length; R++)
|
|
1423
1423
|
P.push(o.rows.item(R).name);
|
|
1424
|
-
|
|
1424
|
+
i({
|
|
1425
1425
|
db: n,
|
|
1426
1426
|
storeNames: P
|
|
1427
1427
|
});
|
|
@@ -1433,8 +1433,8 @@ var nt = { exports: {} };
|
|
|
1433
1433
|
});
|
|
1434
1434
|
});
|
|
1435
1435
|
}
|
|
1436
|
-
function bt(n,
|
|
1437
|
-
|
|
1436
|
+
function bt(n, i) {
|
|
1437
|
+
i = b.apply(this, arguments);
|
|
1438
1438
|
var a = this.config();
|
|
1439
1439
|
n = typeof n != "function" && n || {}, n.name || (n.name = n.name || a.name, n.storeName = n.storeName || a.storeName);
|
|
1440
1440
|
var m = this, v;
|
|
@@ -1456,7 +1456,7 @@ var nt = { exports: {} };
|
|
|
1456
1456
|
});
|
|
1457
1457
|
});
|
|
1458
1458
|
}
|
|
1459
|
-
for (var k = [], q = 0,
|
|
1459
|
+
for (var k = [], q = 0, K = o.storeNames.length; q < K; q++)
|
|
1460
1460
|
k.push(F(o.storeNames[q]));
|
|
1461
1461
|
d.all(k).then(function() {
|
|
1462
1462
|
P();
|
|
@@ -1467,7 +1467,7 @@ var nt = { exports: {} };
|
|
|
1467
1467
|
R(B);
|
|
1468
1468
|
});
|
|
1469
1469
|
});
|
|
1470
|
-
}) : v = d.reject("Invalid arguments"), h(v,
|
|
1470
|
+
}) : v = d.reject("Invalid arguments"), h(v, i), v;
|
|
1471
1471
|
}
|
|
1472
1472
|
var St = {
|
|
1473
1473
|
_driver: "webSQLStorage",
|
|
@@ -1491,9 +1491,9 @@ var nt = { exports: {} };
|
|
|
1491
1491
|
return !1;
|
|
1492
1492
|
}
|
|
1493
1493
|
}
|
|
1494
|
-
function Br(n,
|
|
1494
|
+
function Br(n, i) {
|
|
1495
1495
|
var a = n.name + "/";
|
|
1496
|
-
return n.storeName !==
|
|
1496
|
+
return n.storeName !== i.storeName && (a += n.storeName + "/"), a;
|
|
1497
1497
|
}
|
|
1498
1498
|
function Et() {
|
|
1499
1499
|
var n = "_localforage_support_test";
|
|
@@ -1507,31 +1507,31 @@ var nt = { exports: {} };
|
|
|
1507
1507
|
return !Et() || localStorage.length > 0;
|
|
1508
1508
|
}
|
|
1509
1509
|
function Dt(n) {
|
|
1510
|
-
var
|
|
1510
|
+
var i = this, a = {};
|
|
1511
1511
|
if (n)
|
|
1512
1512
|
for (var m in n)
|
|
1513
1513
|
a[m] = n[m];
|
|
1514
|
-
return a.keyPrefix = Br(n,
|
|
1514
|
+
return a.keyPrefix = Br(n, i._defaultConfig), It() ? (i._dbInfo = a, a.serializer = cr, d.resolve()) : d.reject();
|
|
1515
1515
|
}
|
|
1516
1516
|
function xt(n) {
|
|
1517
|
-
var
|
|
1518
|
-
for (var m =
|
|
1517
|
+
var i = this, a = i.ready().then(function() {
|
|
1518
|
+
for (var m = i._dbInfo.keyPrefix, v = localStorage.length - 1; v >= 0; v--) {
|
|
1519
1519
|
var o = localStorage.key(v);
|
|
1520
1520
|
o.indexOf(m) === 0 && localStorage.removeItem(o);
|
|
1521
1521
|
}
|
|
1522
1522
|
});
|
|
1523
1523
|
return h(a, n), a;
|
|
1524
1524
|
}
|
|
1525
|
-
function Tt(n,
|
|
1525
|
+
function Tt(n, i) {
|
|
1526
1526
|
var a = this;
|
|
1527
1527
|
n = r(n);
|
|
1528
1528
|
var m = a.ready().then(function() {
|
|
1529
1529
|
var v = a._dbInfo, o = localStorage.getItem(v.keyPrefix + n);
|
|
1530
1530
|
return o && (o = v.serializer.deserialize(o)), o;
|
|
1531
1531
|
});
|
|
1532
|
-
return h(m,
|
|
1532
|
+
return h(m, i), m;
|
|
1533
1533
|
}
|
|
1534
|
-
function _t(n,
|
|
1534
|
+
function _t(n, i) {
|
|
1535
1535
|
var a = this, m = a.ready().then(function() {
|
|
1536
1536
|
for (var v = a._dbInfo, o = v.keyPrefix, P = o.length, R = localStorage.length, B = 1, F = 0; F < R; F++) {
|
|
1537
1537
|
var k = localStorage.key(F);
|
|
@@ -1542,9 +1542,9 @@ var nt = { exports: {} };
|
|
|
1542
1542
|
}
|
|
1543
1543
|
}
|
|
1544
1544
|
});
|
|
1545
|
-
return h(m,
|
|
1545
|
+
return h(m, i), m;
|
|
1546
1546
|
}
|
|
1547
|
-
function Ct(n,
|
|
1547
|
+
function Ct(n, i) {
|
|
1548
1548
|
var a = this, m = a.ready().then(function() {
|
|
1549
1549
|
var v = a._dbInfo, o;
|
|
1550
1550
|
try {
|
|
@@ -1554,11 +1554,11 @@ var nt = { exports: {} };
|
|
|
1554
1554
|
}
|
|
1555
1555
|
return o && (o = o.substring(v.keyPrefix.length)), o;
|
|
1556
1556
|
});
|
|
1557
|
-
return h(m,
|
|
1557
|
+
return h(m, i), m;
|
|
1558
1558
|
}
|
|
1559
1559
|
function Pt(n) {
|
|
1560
|
-
var
|
|
1561
|
-
for (var m =
|
|
1560
|
+
var i = this, a = i.ready().then(function() {
|
|
1561
|
+
for (var m = i._dbInfo, v = localStorage.length, o = [], P = 0; P < v; P++) {
|
|
1562
1562
|
var R = localStorage.key(P);
|
|
1563
1563
|
R.indexOf(m.keyPrefix) === 0 && o.push(R.substring(m.keyPrefix.length));
|
|
1564
1564
|
}
|
|
@@ -1567,29 +1567,29 @@ var nt = { exports: {} };
|
|
|
1567
1567
|
return h(a, n), a;
|
|
1568
1568
|
}
|
|
1569
1569
|
function Mt(n) {
|
|
1570
|
-
var
|
|
1570
|
+
var i = this, a = i.keys().then(function(m) {
|
|
1571
1571
|
return m.length;
|
|
1572
1572
|
});
|
|
1573
1573
|
return h(a, n), a;
|
|
1574
1574
|
}
|
|
1575
|
-
function Lt(n,
|
|
1575
|
+
function Lt(n, i) {
|
|
1576
1576
|
var a = this;
|
|
1577
1577
|
n = r(n);
|
|
1578
1578
|
var m = a.ready().then(function() {
|
|
1579
1579
|
var v = a._dbInfo;
|
|
1580
1580
|
localStorage.removeItem(v.keyPrefix + n);
|
|
1581
1581
|
});
|
|
1582
|
-
return h(m,
|
|
1582
|
+
return h(m, i), m;
|
|
1583
1583
|
}
|
|
1584
|
-
function Nt(n,
|
|
1584
|
+
function Nt(n, i, a) {
|
|
1585
1585
|
var m = this;
|
|
1586
1586
|
n = r(n);
|
|
1587
1587
|
var v = m.ready().then(function() {
|
|
1588
|
-
|
|
1589
|
-
var o =
|
|
1588
|
+
i === void 0 && (i = null);
|
|
1589
|
+
var o = i;
|
|
1590
1590
|
return new d(function(P, R) {
|
|
1591
1591
|
var B = m._dbInfo;
|
|
1592
|
-
B.serializer.serialize(
|
|
1592
|
+
B.serializer.serialize(i, function(F, k) {
|
|
1593
1593
|
if (k)
|
|
1594
1594
|
R(k);
|
|
1595
1595
|
else
|
|
@@ -1603,8 +1603,8 @@ var nt = { exports: {} };
|
|
|
1603
1603
|
});
|
|
1604
1604
|
return h(v, a), v;
|
|
1605
1605
|
}
|
|
1606
|
-
function Rt(n,
|
|
1607
|
-
if (
|
|
1606
|
+
function Rt(n, i) {
|
|
1607
|
+
if (i = b.apply(this, arguments), n = typeof n != "function" && n || {}, !n.name) {
|
|
1608
1608
|
var a = this.config();
|
|
1609
1609
|
n.name = n.name || a.name, n.storeName = n.storeName || a.storeName;
|
|
1610
1610
|
}
|
|
@@ -1616,7 +1616,7 @@ var nt = { exports: {} };
|
|
|
1616
1616
|
var R = localStorage.key(P);
|
|
1617
1617
|
R.indexOf(o) === 0 && localStorage.removeItem(R);
|
|
1618
1618
|
}
|
|
1619
|
-
}) : v = d.reject("Invalid arguments"), h(v,
|
|
1619
|
+
}) : v = d.reject("Invalid arguments"), h(v, i), v;
|
|
1620
1620
|
}
|
|
1621
1621
|
var Ut = {
|
|
1622
1622
|
_driver: "localStorageWrapper",
|
|
@@ -1631,11 +1631,11 @@ var nt = { exports: {} };
|
|
|
1631
1631
|
key: Ct,
|
|
1632
1632
|
keys: Pt,
|
|
1633
1633
|
dropInstance: Rt
|
|
1634
|
-
}, Bt = function(
|
|
1635
|
-
return
|
|
1636
|
-
}, $t = function(
|
|
1637
|
-
for (var m =
|
|
1638
|
-
if (Bt(
|
|
1634
|
+
}, Bt = function(i, a) {
|
|
1635
|
+
return i === a || typeof i == "number" && typeof a == "number" && isNaN(i) && isNaN(a);
|
|
1636
|
+
}, $t = function(i, a) {
|
|
1637
|
+
for (var m = i.length, v = 0; v < m; ) {
|
|
1638
|
+
if (Bt(i[v], a))
|
|
1639
1639
|
return !0;
|
|
1640
1640
|
v++;
|
|
1641
1641
|
}
|
|
@@ -1656,32 +1656,32 @@ var nt = { exports: {} };
|
|
|
1656
1656
|
storeName: "keyvaluepairs",
|
|
1657
1657
|
version: 1
|
|
1658
1658
|
};
|
|
1659
|
-
function Gt(n,
|
|
1660
|
-
n[
|
|
1659
|
+
function Gt(n, i) {
|
|
1660
|
+
n[i] = function() {
|
|
1661
1661
|
var a = arguments;
|
|
1662
1662
|
return n.ready().then(function() {
|
|
1663
|
-
return n[
|
|
1663
|
+
return n[i].apply(n, a);
|
|
1664
1664
|
});
|
|
1665
1665
|
};
|
|
1666
1666
|
}
|
|
1667
1667
|
function sr() {
|
|
1668
1668
|
for (var n = 1; n < arguments.length; n++) {
|
|
1669
|
-
var
|
|
1670
|
-
if (
|
|
1671
|
-
for (var a in
|
|
1672
|
-
|
|
1669
|
+
var i = arguments[n];
|
|
1670
|
+
if (i)
|
|
1671
|
+
for (var a in i)
|
|
1672
|
+
i.hasOwnProperty(a) && ($r(i[a]) ? arguments[0][a] = i[a].slice() : arguments[0][a] = i[a]);
|
|
1673
1673
|
}
|
|
1674
1674
|
return arguments[0];
|
|
1675
1675
|
}
|
|
1676
1676
|
var Wt = function() {
|
|
1677
|
-
function n(
|
|
1677
|
+
function n(i) {
|
|
1678
1678
|
I(this, n);
|
|
1679
1679
|
for (var a in Ge)
|
|
1680
1680
|
if (Ge.hasOwnProperty(a)) {
|
|
1681
1681
|
var m = Ge[a], v = m._driver;
|
|
1682
1682
|
this[a] = v, ze[v] || this.defineDriver(m);
|
|
1683
1683
|
}
|
|
1684
|
-
this._defaultConfig = sr({}, kt), this._config = sr({}, this._defaultConfig,
|
|
1684
|
+
this._defaultConfig = sr({}, kt), this._config = sr({}, this._defaultConfig, i), this._driverSet = null, this._initDriver = null, this._ready = !1, this._dbInfo = null, this._wrapLibraryMethodsWithReady(), this.setDriver(this._config.driver).catch(function() {
|
|
1685
1685
|
});
|
|
1686
1686
|
}
|
|
1687
1687
|
return n.prototype.config = function(a) {
|
|
@@ -1704,7 +1704,7 @@ var nt = { exports: {} };
|
|
|
1704
1704
|
R(F);
|
|
1705
1705
|
return;
|
|
1706
1706
|
}
|
|
1707
|
-
for (var k = fr.concat("_initStorage"), q = 0,
|
|
1707
|
+
for (var k = fr.concat("_initStorage"), q = 0, K = k.length; q < K; q++) {
|
|
1708
1708
|
var p = k[q], te = !$t(Qe, p);
|
|
1709
1709
|
if ((te || a[p]) && typeof a[p] != "function") {
|
|
1710
1710
|
R(F);
|
|
@@ -1757,11 +1757,11 @@ var nt = { exports: {} };
|
|
|
1757
1757
|
}
|
|
1758
1758
|
function F(q) {
|
|
1759
1759
|
return function() {
|
|
1760
|
-
var
|
|
1760
|
+
var K = 0;
|
|
1761
1761
|
function p() {
|
|
1762
|
-
for (;
|
|
1763
|
-
var te = q[
|
|
1764
|
-
return
|
|
1762
|
+
for (; K < q.length; ) {
|
|
1763
|
+
var te = q[K];
|
|
1764
|
+
return K++, o._dbInfo = null, o._ready = null, o.getDriver(te).then(B).catch(p);
|
|
1765
1765
|
}
|
|
1766
1766
|
R();
|
|
1767
1767
|
var fe = new Error("No available storage method found.");
|
|
@@ -1775,8 +1775,8 @@ var nt = { exports: {} };
|
|
|
1775
1775
|
}) : d.resolve();
|
|
1776
1776
|
return this._driverSet = k.then(function() {
|
|
1777
1777
|
var q = P[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(K) {
|
|
1779
|
+
o._driver = K._driver, R(), o._wrapLibraryMethodsWithReady(), o._initDriver = F(P);
|
|
1780
1780
|
});
|
|
1781
1781
|
}).catch(function() {
|
|
1782
1782
|
R();
|
|
@@ -1890,7 +1890,7 @@ function bn(e) {
|
|
|
1890
1890
|
return An(t);
|
|
1891
1891
|
}
|
|
1892
1892
|
const Sn = (e) => {
|
|
1893
|
-
let t =
|
|
1893
|
+
let t = J(e.url) ?? void 0;
|
|
1894
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) {
|
|
1895
1895
|
t ?? (t = "");
|
|
1896
1896
|
let l = new URLSearchParams();
|
|
@@ -1905,170 +1905,171 @@ function An(e) {
|
|
|
1905
1905
|
var u;
|
|
1906
1906
|
const t = he.utc().toSeconds() / 86400, l = z({}), A = z({}), s = e.storageMode == "local-cache", g = e.buildUrl ?? ((u = e.api) == null ? void 0 : u.buildUrl) ?? Sn;
|
|
1907
1907
|
function I(r) {
|
|
1908
|
-
var
|
|
1909
|
-
let
|
|
1908
|
+
var c, y;
|
|
1909
|
+
let b = "";
|
|
1910
1910
|
const D = r.params ?? {};
|
|
1911
|
-
return D != null && (
|
|
1911
|
+
return D != null && (b = Object.entries(D).sort(Re.firstBy((S) => S[0])).map((S) => `${S[0]}=${JSON.stringify(S[1])}`).join("&")), `${e.storeName ?? "base"}_${((c = e.auth) == null ? void 0 : c.credentials.value.userID) ?? "no-user-id"}_${r.id ?? ((y = r.data) == null ? void 0 : y.id) ?? "no-item-id"}_${b ?? "no-params"}`;
|
|
1912
1912
|
}
|
|
1913
1913
|
async function C(r) {
|
|
1914
1914
|
r.additionalUrl ?? (r.additionalUrl = "/getAll"), g(r);
|
|
1915
|
-
const
|
|
1916
|
-
if (!D && l.value[
|
|
1917
|
-
return l.value[
|
|
1915
|
+
const b = I(r), D = r.refresh;
|
|
1916
|
+
if (!D && l.value[b] !== void 0)
|
|
1917
|
+
return l.value[b];
|
|
1918
1918
|
if (!D && s == !0) {
|
|
1919
|
-
const
|
|
1920
|
-
if (
|
|
1921
|
-
return l.value[
|
|
1919
|
+
const c = await ve().getItem(b);
|
|
1920
|
+
if (c != null && (e.api == null || parseFloat(c.meta.storedOn) > t - 7))
|
|
1921
|
+
return l.value[b] = c, c;
|
|
1922
1922
|
}
|
|
1923
1923
|
if (e.api == null)
|
|
1924
|
-
return l.value[
|
|
1924
|
+
return l.value[b];
|
|
1925
1925
|
try {
|
|
1926
|
-
let
|
|
1927
|
-
|
|
1928
|
-
var
|
|
1926
|
+
let c = A.value[b];
|
|
1927
|
+
c == null && (c = new Promise(async (S, N) => {
|
|
1928
|
+
var E;
|
|
1929
1929
|
try {
|
|
1930
|
-
const T = await ((
|
|
1930
|
+
const T = await ((E = e.api) == null ? void 0 : E.getAll(r)), x = {
|
|
1931
1931
|
meta: { storedOn: t.toString() },
|
|
1932
1932
|
data: T == null ? void 0 : T.data,
|
|
1933
1933
|
count: T == null ? void 0 : T.count,
|
|
1934
1934
|
filters: (T == null ? void 0 : T.filters) ?? []
|
|
1935
1935
|
};
|
|
1936
|
-
s == !0 && await ve().setItem(
|
|
1936
|
+
s == !0 && await ve().setItem(b, x), S(x);
|
|
1937
1937
|
} catch (T) {
|
|
1938
1938
|
N(T);
|
|
1939
1939
|
} finally {
|
|
1940
|
-
delete A.value[
|
|
1940
|
+
delete A.value[b];
|
|
1941
1941
|
}
|
|
1942
|
-
}), A.value[
|
|
1943
|
-
const
|
|
1944
|
-
return l.value[
|
|
1945
|
-
data:
|
|
1946
|
-
filters:
|
|
1947
|
-
count:
|
|
1942
|
+
}), A.value[b] = c);
|
|
1943
|
+
const y = await c;
|
|
1944
|
+
return l.value[b] = y, {
|
|
1945
|
+
data: y == null ? void 0 : y.data,
|
|
1946
|
+
filters: y == null ? void 0 : y.filters,
|
|
1947
|
+
count: y == null ? void 0 : y.count
|
|
1948
1948
|
};
|
|
1949
|
-
} catch (
|
|
1950
|
-
throw
|
|
1949
|
+
} catch (c) {
|
|
1950
|
+
throw c;
|
|
1951
1951
|
}
|
|
1952
1952
|
}
|
|
1953
1953
|
async function _(r) {
|
|
1954
|
+
var c;
|
|
1954
1955
|
r.additionalUrl ?? (r.additionalUrl = "/get"), g(r);
|
|
1955
|
-
const
|
|
1956
|
-
if (!D && l.value[
|
|
1957
|
-
return l.value[
|
|
1956
|
+
const b = I(r), D = r.refresh;
|
|
1957
|
+
if (!D && l.value[b] !== void 0)
|
|
1958
|
+
return l.value[b];
|
|
1958
1959
|
if (!D && s == !0) {
|
|
1959
|
-
const
|
|
1960
|
-
if (
|
|
1961
|
-
return l.value[
|
|
1960
|
+
const y = await ve().getItem(b);
|
|
1961
|
+
if (y != null && (e.api == null || parseFloat(((c = y.meta) == null ? void 0 : c.storedOn) ?? "0") > t - 7))
|
|
1962
|
+
return l.value[b] = y, { data: y.data };
|
|
1962
1963
|
}
|
|
1963
1964
|
if (e.api == null)
|
|
1964
|
-
return l.value[
|
|
1965
|
+
return l.value[b];
|
|
1965
1966
|
try {
|
|
1966
|
-
let
|
|
1967
|
-
|
|
1968
|
-
var
|
|
1967
|
+
let y = A.value[b];
|
|
1968
|
+
y == null && (y = new Promise(async (N, E) => {
|
|
1969
|
+
var T;
|
|
1969
1970
|
try {
|
|
1970
|
-
let
|
|
1971
|
-
const
|
|
1971
|
+
let x = await ((T = e.api) == null ? void 0 : T.get(r));
|
|
1972
|
+
const L = {
|
|
1972
1973
|
meta: { storedOn: t.toString() },
|
|
1973
|
-
data:
|
|
1974
|
+
data: x == null ? void 0 : x.data
|
|
1974
1975
|
};
|
|
1975
|
-
s == !0 && await ve().setItem(
|
|
1976
|
-
} catch (
|
|
1977
|
-
|
|
1976
|
+
s == !0 && await ve().setItem(b, L), N(L);
|
|
1977
|
+
} catch (x) {
|
|
1978
|
+
E(x);
|
|
1978
1979
|
} finally {
|
|
1979
|
-
delete A.value[
|
|
1980
|
+
delete A.value[b];
|
|
1980
1981
|
}
|
|
1981
|
-
}), A.value[
|
|
1982
|
-
const
|
|
1983
|
-
return l.value[
|
|
1984
|
-
} catch (
|
|
1985
|
-
throw
|
|
1982
|
+
}), A.value[b] = y);
|
|
1983
|
+
const S = await y;
|
|
1984
|
+
return l.value[b] = S, { data: S.data };
|
|
1985
|
+
} catch (y) {
|
|
1986
|
+
throw y;
|
|
1986
1987
|
}
|
|
1987
1988
|
}
|
|
1988
1989
|
async function M(r) {
|
|
1989
|
-
var
|
|
1990
|
+
var c;
|
|
1990
1991
|
r.additionalUrl ?? (r.additionalUrl = "/patch"), g(r);
|
|
1991
|
-
const
|
|
1992
|
+
const b = I(r);
|
|
1992
1993
|
let D;
|
|
1993
1994
|
if (e.api != null)
|
|
1994
1995
|
try {
|
|
1995
|
-
let
|
|
1996
|
-
D =
|
|
1997
|
-
} catch (
|
|
1998
|
-
throw
|
|
1996
|
+
let y = await e.api.patch(r);
|
|
1997
|
+
D = y == null ? void 0 : y.data;
|
|
1998
|
+
} catch (y) {
|
|
1999
|
+
throw y;
|
|
1999
2000
|
}
|
|
2000
2001
|
else
|
|
2001
2002
|
D = r.data;
|
|
2002
2003
|
if (D != null) {
|
|
2003
|
-
let
|
|
2004
|
+
let y = {
|
|
2004
2005
|
meta: { storedOn: t.toString() },
|
|
2005
|
-
data: { ...(
|
|
2006
|
+
data: { ...(c = l.value[b]) == null ? void 0 : c.data, ...D }
|
|
2006
2007
|
};
|
|
2007
|
-
return l.value[
|
|
2008
|
-
const
|
|
2009
|
-
if (
|
|
2010
|
-
if (Array.isArray(
|
|
2011
|
-
for (let T = 0; T <
|
|
2012
|
-
|
|
2008
|
+
return l.value[b] = y, s == !0 && await ve().setItem(b, y), D.id != null && D.rowVersion != null && Object.entries(l.value).forEach((N) => {
|
|
2009
|
+
const E = N[1].data;
|
|
2010
|
+
if (E != null)
|
|
2011
|
+
if (Array.isArray(E))
|
|
2012
|
+
for (let T = 0; T < E.length; T++)
|
|
2013
|
+
E[T].id == D.id && E.splice(T, 1, y.data);
|
|
2013
2014
|
else
|
|
2014
|
-
|
|
2015
|
-
}),
|
|
2015
|
+
E.id == D.id && (l.value[N[0]] = y);
|
|
2016
|
+
}), y.data;
|
|
2016
2017
|
}
|
|
2017
2018
|
return D;
|
|
2018
2019
|
}
|
|
2019
2020
|
async function $(r) {
|
|
2020
2021
|
r.additionalUrl ?? (r.additionalUrl = "/post"), g(r);
|
|
2021
|
-
const
|
|
2022
|
+
const b = I(r);
|
|
2022
2023
|
let D;
|
|
2023
2024
|
if (e.api != null)
|
|
2024
2025
|
try {
|
|
2025
|
-
let
|
|
2026
|
-
D =
|
|
2027
|
-
} catch (
|
|
2028
|
-
throw
|
|
2026
|
+
let c = await e.api.post(r);
|
|
2027
|
+
D = c == null ? void 0 : c.data;
|
|
2028
|
+
} catch (c) {
|
|
2029
|
+
throw c;
|
|
2029
2030
|
}
|
|
2030
2031
|
else
|
|
2031
2032
|
D = r.data;
|
|
2032
2033
|
if (D != null) {
|
|
2033
|
-
let
|
|
2034
|
+
let c = {
|
|
2034
2035
|
meta: { storedOn: t.toString() },
|
|
2035
2036
|
data: D
|
|
2036
2037
|
};
|
|
2037
|
-
return s == !0 && await ve().setItem(
|
|
2038
|
+
return s == !0 && await ve().setItem(b, c), l.value[b] = c, c.data;
|
|
2038
2039
|
}
|
|
2039
2040
|
return D;
|
|
2040
2041
|
}
|
|
2041
2042
|
async function d(r) {
|
|
2042
|
-
var
|
|
2043
|
+
var c;
|
|
2043
2044
|
r.additionalUrl ?? (r.additionalUrl = "/delete"), g(r);
|
|
2044
|
-
const
|
|
2045
|
+
const b = I(r);
|
|
2045
2046
|
if (e.api != null)
|
|
2046
2047
|
try {
|
|
2047
|
-
let
|
|
2048
|
-
if (
|
|
2049
|
-
return
|
|
2050
|
-
} catch (
|
|
2051
|
-
throw
|
|
2048
|
+
let y = await e.api.deleteItem(r);
|
|
2049
|
+
if (y != null)
|
|
2050
|
+
return y;
|
|
2051
|
+
} catch (y) {
|
|
2052
|
+
throw y;
|
|
2052
2053
|
}
|
|
2053
|
-
delete l.value[
|
|
2054
|
-
const D = ((
|
|
2055
|
-
D != null && Object.entries(l.value).forEach((
|
|
2056
|
-
const N =
|
|
2054
|
+
delete l.value[b];
|
|
2055
|
+
const D = ((c = r.data) == null ? void 0 : c.id) ?? r.id;
|
|
2056
|
+
D != null && Object.entries(l.value).forEach((S) => {
|
|
2057
|
+
const N = S[1].data;
|
|
2057
2058
|
if (N != null)
|
|
2058
2059
|
if (Array.isArray(N))
|
|
2059
|
-
for (let
|
|
2060
|
-
N[
|
|
2060
|
+
for (let E = 0; E < N.length; E++)
|
|
2061
|
+
N[E].id == D && N.splice(E, 1);
|
|
2061
2062
|
else
|
|
2062
|
-
delete l.value[
|
|
2063
|
-
}), s == !0 && await ve().removeItem(
|
|
2063
|
+
delete l.value[S[0]];
|
|
2064
|
+
}), s == !0 && await ve().removeItem(b);
|
|
2064
2065
|
}
|
|
2065
2066
|
async function h(r) {
|
|
2066
2067
|
if (r.additionalUrl ?? (r.additionalUrl = `/patch/restore?id=${r.data.id}`), g(r), e.api != null)
|
|
2067
2068
|
try {
|
|
2068
|
-
let
|
|
2069
|
-
return
|
|
2070
|
-
} catch (
|
|
2071
|
-
throw
|
|
2069
|
+
let b = await e.api.patch(r);
|
|
2070
|
+
return b == null ? void 0 : b.data;
|
|
2071
|
+
} catch (b) {
|
|
2072
|
+
throw b;
|
|
2072
2073
|
}
|
|
2073
2074
|
}
|
|
2074
2075
|
return {
|
|
@@ -2088,71 +2089,71 @@ function An(e) {
|
|
|
2088
2089
|
}
|
|
2089
2090
|
function qr(e) {
|
|
2090
2091
|
return pr(e.storeName, () => {
|
|
2091
|
-
const t = z(), l = z(0), A = he.utc().toSeconds() / 3600, s = z(), g = z(), I = z({}), C = e.storageMode == "local-cache";
|
|
2092
|
+
const t = z(), l = z(0), A = he.utc().toSeconds() / 3600, s = z(), g = z({ storedOn: A.toString() }), I = z({}), C = e.storageMode == "local-cache";
|
|
2092
2093
|
function _() {
|
|
2093
|
-
var
|
|
2094
|
-
return `${e.storeName}_${((
|
|
2094
|
+
var c;
|
|
2095
|
+
return `${e.storeName}_${((c = e.auth) == null ? void 0 : c.credentials.value.userID) ?? "no-user-id"}`;
|
|
2095
2096
|
}
|
|
2096
2097
|
async function M() {
|
|
2097
2098
|
if (console.log("trying save"), C == !0) {
|
|
2098
2099
|
console.log("saving");
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
data:
|
|
2102
|
-
|
|
2100
|
+
const c = {
|
|
2101
|
+
meta: J(g),
|
|
2102
|
+
data: J(t) ?? [],
|
|
2103
|
+
count: J(l) ?? 0,
|
|
2103
2104
|
filters: []
|
|
2104
2105
|
};
|
|
2105
|
-
console.log(
|
|
2106
|
+
console.log(c);
|
|
2106
2107
|
try {
|
|
2107
|
-
await ve().setItem(_(),
|
|
2108
|
-
} catch (
|
|
2109
|
-
console.log("sav err"), console.log(
|
|
2108
|
+
await ve().setItem(_(), c);
|
|
2109
|
+
} catch (y) {
|
|
2110
|
+
console.log("sav err"), console.log(y);
|
|
2110
2111
|
} finally {
|
|
2111
2112
|
console.log("done");
|
|
2112
2113
|
}
|
|
2113
2114
|
}
|
|
2114
2115
|
}
|
|
2115
|
-
function $(
|
|
2116
|
-
const
|
|
2117
|
-
return I.value[
|
|
2118
|
-
var
|
|
2116
|
+
function $(c) {
|
|
2117
|
+
const y = _();
|
|
2118
|
+
return I.value[y] || (I.value[y] = new Promise(async (S, N) => {
|
|
2119
|
+
var E;
|
|
2119
2120
|
try {
|
|
2120
|
-
let
|
|
2121
|
+
let T = await ((E = e.api) == null ? void 0 : E.getAll({
|
|
2121
2122
|
additionalUrl: "/getAll",
|
|
2122
|
-
nav:
|
|
2123
|
+
nav: c.nav,
|
|
2123
2124
|
params: {
|
|
2124
|
-
lastUpdate:
|
|
2125
|
+
lastUpdate: g.value.lastUpdate ?? ln()
|
|
2125
2126
|
}
|
|
2126
2127
|
}));
|
|
2127
|
-
console.log("res"), console.log(
|
|
2128
|
-
var
|
|
2129
|
-
const
|
|
2130
|
-
|
|
2128
|
+
console.log("res"), console.log(T), T == null ? N(T) : (t.value ?? (t.value = []), T.data.forEach((x) => {
|
|
2129
|
+
var f, w;
|
|
2130
|
+
const L = t.value.findIndex((j) => j.id == x.id);
|
|
2131
|
+
L >= 0 ? (f = t.value) == null || f.splice(L, 1, x) : (w = t.value) == null || w.push(x);
|
|
2131
2132
|
}), l.value = t.value.length, g.value = {
|
|
2132
2133
|
lastUpdate: he.utc().toString(),
|
|
2133
2134
|
storedOn: A.toString()
|
|
2134
|
-
}, await M(),
|
|
2135
|
-
} catch (
|
|
2136
|
-
N(
|
|
2135
|
+
}, await M(), S(T));
|
|
2136
|
+
} catch (T) {
|
|
2137
|
+
N(T);
|
|
2137
2138
|
} finally {
|
|
2138
|
-
delete I.value[
|
|
2139
|
+
delete I.value[y];
|
|
2139
2140
|
}
|
|
2140
|
-
})), I.value[
|
|
2141
|
+
})), I.value[y];
|
|
2141
2142
|
}
|
|
2142
|
-
async function d(
|
|
2143
|
+
async function d(c) {
|
|
2143
2144
|
var T, x, L, f;
|
|
2144
|
-
const
|
|
2145
|
-
if (console.log("getting all from"), console.log(
|
|
2145
|
+
const y = _(), S = c.refresh;
|
|
2146
|
+
if (console.log("getting all from"), console.log(y), !S && t.value != null)
|
|
2146
2147
|
return console.log("not refresh and ditems not null"), {
|
|
2147
2148
|
count: (T = t.value) == null ? void 0 : T.length,
|
|
2148
2149
|
data: t.value,
|
|
2149
2150
|
filters: []
|
|
2150
2151
|
};
|
|
2151
|
-
if (!
|
|
2152
|
+
if (!S && C == !0) {
|
|
2152
2153
|
console.log("not refresh and caching locally");
|
|
2153
|
-
const
|
|
2154
|
-
if (console.log(
|
|
2155
|
-
return t.value =
|
|
2154
|
+
const w = await ve().getItem(y);
|
|
2155
|
+
if (console.log(w), w != null && parseFloat(w.meta.storedOn) > A - 7)
|
|
2156
|
+
return t.value = w.data, l.value = w.data.length, s.value = w.filters ?? [], g.value = w.meta, {
|
|
2156
2157
|
count: (x = t.value) == null ? void 0 : x.length,
|
|
2157
2158
|
data: t.value ?? [],
|
|
2158
2159
|
filters: []
|
|
@@ -2167,123 +2168,123 @@ function qr(e) {
|
|
|
2167
2168
|
console.log("setting dataitems"), t.value ?? (t.value = []);
|
|
2168
2169
|
try {
|
|
2169
2170
|
console.log("create refresh promise");
|
|
2170
|
-
var N = await $(
|
|
2171
|
+
var N = await $(c);
|
|
2171
2172
|
console.log(N);
|
|
2172
|
-
var
|
|
2173
|
+
var E = {
|
|
2173
2174
|
count: (f = t.value) == null ? void 0 : f.length,
|
|
2174
2175
|
data: t.value ?? [],
|
|
2175
2176
|
filters: s.value
|
|
2176
2177
|
};
|
|
2177
|
-
return console.log(
|
|
2178
|
-
} catch (
|
|
2179
|
-
let
|
|
2180
|
-
throw new Error(
|
|
2178
|
+
return console.log(E), E;
|
|
2179
|
+
} catch (w) {
|
|
2180
|
+
let j = w;
|
|
2181
|
+
throw new Error(j.message ?? "Problem");
|
|
2181
2182
|
}
|
|
2182
2183
|
}
|
|
2183
|
-
async function h(
|
|
2184
|
-
var
|
|
2185
|
-
const
|
|
2186
|
-
if (
|
|
2184
|
+
async function h(c) {
|
|
2185
|
+
var E, T, x, L;
|
|
2186
|
+
const y = _(), S = c.id ?? ((E = c.data) == null ? void 0 : E.id);
|
|
2187
|
+
if (S == null)
|
|
2187
2188
|
throw new Error("no id provided");
|
|
2188
|
-
let N =
|
|
2189
|
+
let N = c.refresh;
|
|
2189
2190
|
if (!N && t.value != null) {
|
|
2190
|
-
const f = t.value.find((
|
|
2191
|
+
const f = t.value.find((w) => w.id == S);
|
|
2191
2192
|
if (f != null)
|
|
2192
2193
|
return { data: f };
|
|
2193
2194
|
}
|
|
2194
2195
|
if (!N && C == !0) {
|
|
2195
|
-
const f = await ve().getItem(
|
|
2196
|
+
const f = await ve().getItem(y);
|
|
2196
2197
|
if (f != null && parseFloat(f.meta.storedOn) > A - 12) {
|
|
2197
2198
|
t.value = f.data, l.value = f.data.length, s.value = f.filters ?? [], g.value = f.meta;
|
|
2198
|
-
let
|
|
2199
|
-
if (
|
|
2200
|
-
return { data:
|
|
2199
|
+
let w = (T = t.value) == null ? void 0 : T.find((j) => j.id == c.id);
|
|
2200
|
+
if (w != null)
|
|
2201
|
+
return { data: w };
|
|
2201
2202
|
}
|
|
2202
2203
|
}
|
|
2203
2204
|
if (e.api == null)
|
|
2204
2205
|
return {
|
|
2205
|
-
data: (x = t.value) == null ? void 0 : x.find((f) => f.id ==
|
|
2206
|
+
data: (x = t.value) == null ? void 0 : x.find((f) => f.id == c.id)
|
|
2206
2207
|
};
|
|
2207
2208
|
t.value ?? (t.value = []);
|
|
2208
2209
|
try {
|
|
2209
|
-
return await $(
|
|
2210
|
+
return await $(c), { data: (L = t.value) == null ? void 0 : L.find((f) => f.id == c.id) };
|
|
2210
2211
|
} catch (f) {
|
|
2211
|
-
let
|
|
2212
|
-
throw new Error(
|
|
2212
|
+
let w = f;
|
|
2213
|
+
throw new Error(w.message ?? "Problem");
|
|
2213
2214
|
}
|
|
2214
2215
|
}
|
|
2215
|
-
async function u(
|
|
2216
|
-
var
|
|
2217
|
-
|
|
2218
|
-
let
|
|
2216
|
+
async function u(c) {
|
|
2217
|
+
var S, N, E;
|
|
2218
|
+
c.additionalUrl ?? (c.additionalUrl = "/patch");
|
|
2219
|
+
let y;
|
|
2219
2220
|
if (e.api != null)
|
|
2220
2221
|
try {
|
|
2221
|
-
let T = await e.api.patch(
|
|
2222
|
-
|
|
2222
|
+
let T = await e.api.patch(c);
|
|
2223
|
+
y = { ...c.data, ...T == null ? void 0 : T.data };
|
|
2223
2224
|
} catch (T) {
|
|
2224
2225
|
let x = T;
|
|
2225
2226
|
throw new Error(x.message ?? "Patch Problem");
|
|
2226
2227
|
}
|
|
2227
2228
|
else
|
|
2228
|
-
|
|
2229
|
-
if (
|
|
2230
|
-
let T = (
|
|
2231
|
-
T != null && T >= 0 && (t.value ?? (t.value = []), (N = t.value) == null || N.splice(T, 1,
|
|
2229
|
+
y = c.data;
|
|
2230
|
+
if (y != null) {
|
|
2231
|
+
let T = (S = t.value) == null ? void 0 : S.findIndex((x) => x.id == y.id);
|
|
2232
|
+
T != null && T >= 0 && (t.value ?? (t.value = []), (N = t.value) == null || N.splice(T, 1, y), await M());
|
|
2232
2233
|
}
|
|
2233
|
-
return (
|
|
2234
|
+
return (E = t.value) == null ? void 0 : E.find((T) => T.id == (c.id ?? c.data.id));
|
|
2234
2235
|
}
|
|
2235
|
-
async function r(
|
|
2236
|
-
var
|
|
2237
|
-
|
|
2238
|
-
let
|
|
2236
|
+
async function r(c) {
|
|
2237
|
+
var S, N;
|
|
2238
|
+
c.additionalUrl ?? (c.additionalUrl = "/post");
|
|
2239
|
+
let y;
|
|
2239
2240
|
if (e.api != null)
|
|
2240
2241
|
try {
|
|
2241
|
-
let
|
|
2242
|
-
|
|
2243
|
-
} catch (
|
|
2244
|
-
let T =
|
|
2242
|
+
let E = await e.api.post(c);
|
|
2243
|
+
y = E == null ? void 0 : E.data;
|
|
2244
|
+
} catch (E) {
|
|
2245
|
+
let T = E;
|
|
2245
2246
|
throw new Error(T.message ?? "Patch Problem");
|
|
2246
2247
|
}
|
|
2247
2248
|
else
|
|
2248
|
-
|
|
2249
|
-
return
|
|
2249
|
+
y = c.data;
|
|
2250
|
+
return y != null && (t.value ?? (t.value = []), (S = t.value) == null || S.unshift(y), l.value += 1, await M()), (N = t.value) == null ? void 0 : N.find((E) => E.id == (c.id ?? c.data.id));
|
|
2250
2251
|
}
|
|
2251
|
-
async function
|
|
2252
|
-
var
|
|
2253
|
-
if (
|
|
2252
|
+
async function b(c) {
|
|
2253
|
+
var S, N;
|
|
2254
|
+
if (c.additionalUrl ?? (c.additionalUrl = "/delete"), e.api != null)
|
|
2254
2255
|
try {
|
|
2255
|
-
let
|
|
2256
|
-
if (
|
|
2257
|
-
return
|
|
2258
|
-
} catch (
|
|
2259
|
-
let T =
|
|
2256
|
+
let E = await e.api.deleteItem(c);
|
|
2257
|
+
if (E != null)
|
|
2258
|
+
return E;
|
|
2259
|
+
} catch (E) {
|
|
2260
|
+
let T = E;
|
|
2260
2261
|
throw new Error(T.message ?? "Patch Problem");
|
|
2261
2262
|
}
|
|
2262
|
-
const
|
|
2263
|
-
if (
|
|
2264
|
-
let
|
|
2265
|
-
|
|
2263
|
+
const y = c.id ?? c.data.id;
|
|
2264
|
+
if (y != null) {
|
|
2265
|
+
let E = (S = t.value) == null ? void 0 : S.findIndex((T) => T.id == y);
|
|
2266
|
+
E != null && E >= 0 && (t.value ?? (t.value = []), (N = t.value) == null || N.splice(E, 1), await M());
|
|
2266
2267
|
}
|
|
2267
2268
|
}
|
|
2268
|
-
async function D(
|
|
2269
|
-
var
|
|
2270
|
-
if (
|
|
2269
|
+
async function D(c) {
|
|
2270
|
+
var y;
|
|
2271
|
+
if (c.additionalUrl ?? (c.additionalUrl = `/patch/restore?id=${c.data.id}`), e.api != null)
|
|
2271
2272
|
try {
|
|
2272
|
-
await e.api.patch(
|
|
2273
|
-
} catch (
|
|
2274
|
-
let N =
|
|
2273
|
+
await e.api.patch(c);
|
|
2274
|
+
} catch (S) {
|
|
2275
|
+
let N = S;
|
|
2275
2276
|
throw new Error(N.message ?? "Patch Problem");
|
|
2276
2277
|
}
|
|
2277
2278
|
try {
|
|
2278
|
-
|
|
2279
|
-
} catch (
|
|
2280
|
-
let N =
|
|
2279
|
+
c.additionalUrl = "/getAll", await $(c);
|
|
2280
|
+
} catch (S) {
|
|
2281
|
+
let N = S;
|
|
2281
2282
|
throw new Error(N.message ?? "Problem");
|
|
2282
2283
|
}
|
|
2283
|
-
return (
|
|
2284
|
+
return (y = t.value) == null ? void 0 : y.find((S) => S.id == (c.id ?? c.data.id));
|
|
2284
2285
|
}
|
|
2285
2286
|
return {
|
|
2286
|
-
deleteItem:
|
|
2287
|
+
deleteItem: b,
|
|
2287
2288
|
get: h,
|
|
2288
2289
|
getAll: d,
|
|
2289
2290
|
patch: u,
|
|
@@ -2308,189 +2309,189 @@ function En(e) {
|
|
|
2308
2309
|
const t = (e == null ? void 0 : e.buildHeaders) ?? C, l = (e == null ? void 0 : e.buildQuery) ?? g, A = (e == null ? void 0 : e.buildUrl) ?? I, s = e == null ? void 0 : e.demo;
|
|
2309
2310
|
function g(u) {
|
|
2310
2311
|
let r = new URLSearchParams();
|
|
2311
|
-
return Object.entries(u).forEach((
|
|
2312
|
-
|
|
2313
|
-
}), u.filterBy && r.set("filterBy", u.filterBy), u.includeCount && r.set("includeCount", u.includeCount.toString()), u.includeDetails != null && r.set("includeDetails", u.includeDetails.toString()), u.includeInactive && r.set("includeInactive", u.includeInactive.toString()), u.properties && r.set("properties", u.properties.toString()), u.query && r.set("query", u.query.toString()), u.searchString && r.set("searchString", u.searchString), u.sortOrder && r.set("sortOrder", u.sortOrder), u.sortBy && r.set("sortBy", u.sortBy), u.takeFrom && r.set("takeFrom", u.takeFrom.toString()), u.takeAmount && r.set("takeAmount", u.takeAmount.toString()), u.other && Object.entries(u.other).forEach((
|
|
2314
|
-
|
|
2312
|
+
return Object.entries(u).forEach((b) => {
|
|
2313
|
+
b[1] != null && r.append(b[0], b[1]);
|
|
2314
|
+
}), u.filterBy && r.set("filterBy", u.filterBy), u.includeCount && r.set("includeCount", u.includeCount.toString()), u.includeDetails != null && r.set("includeDetails", u.includeDetails.toString()), u.includeInactive && r.set("includeInactive", u.includeInactive.toString()), u.properties && r.set("properties", u.properties.toString()), u.query && r.set("query", u.query.toString()), u.searchString && r.set("searchString", u.searchString), u.sortOrder && r.set("sortOrder", u.sortOrder), u.sortBy && r.set("sortBy", u.sortBy), u.takeFrom && r.set("takeFrom", u.takeFrom.toString()), u.takeAmount && r.set("takeAmount", u.takeAmount.toString()), u.other && Object.entries(u.other).forEach((b) => {
|
|
2315
|
+
b[1] != null && r.append(b[0], b[1].toString());
|
|
2315
2316
|
}), r.toString();
|
|
2316
2317
|
}
|
|
2317
2318
|
function I(u) {
|
|
2318
|
-
let r =
|
|
2319
|
-
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)),
|
|
2319
|
+
let r = J(u.url) ?? void 0, b = J(u.id);
|
|
2320
|
+
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)), b != null && (r != null && r.includes("{id}") ? r = r.replaceAll("{id}", b) : r = Ue(r, b)), u.params != null && (r = `${r}?${l(u.params)}`), u.finalUrl = r, u.finalUrl ?? "";
|
|
2320
2321
|
}
|
|
2321
2322
|
function C(u) {
|
|
2322
|
-
var
|
|
2323
|
+
var b, D;
|
|
2323
2324
|
let r = { ...u.headers };
|
|
2324
|
-
return u.proxyID && (r.ManagedCompanyAccountID ?? (r.ManagedCompanyAccountID = u.proxyID)), (e == null ? void 0 : e.useBearerToken) != !1 && ((
|
|
2325
|
+
return u.proxyID && (r.ManagedCompanyAccountID ?? (r.ManagedCompanyAccountID = u.proxyID)), (e == null ? void 0 : e.useBearerToken) != !1 && ((b = e == null ? void 0 : e.auth) == null ? void 0 : b.isLoggedIn.value) == !0 && (r.authorization ?? (r.authorization = `bearer ${(D = e == null ? void 0 : e.auth) == null ? void 0 : D.credentials.value.token}`)), r["Content-Type"] ?? (r["Content-Type"] = u.contentType ?? (e == null ? void 0 : e.defaultContentType) ?? "application/json"), r;
|
|
2325
2326
|
}
|
|
2326
2327
|
async function _(u) {
|
|
2327
|
-
const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0,
|
|
2328
|
-
let
|
|
2329
|
-
if (
|
|
2330
|
-
return console.log(`DEMO: Get from ${
|
|
2331
|
-
console.log(`Get from ${
|
|
2332
|
-
let
|
|
2328
|
+
const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, b = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, D = u.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
|
|
2329
|
+
let c = u.finalUrl, y = u.headers;
|
|
2330
|
+
if (c == null && (c = A(u)), u.overrideHeaders !== !0 && (y = t(u)), s != null && s.isDemoing.value)
|
|
2331
|
+
return console.log(`DEMO: Get from ${c}`), s.get(u);
|
|
2332
|
+
console.log(`Get from ${c}`);
|
|
2333
|
+
let S;
|
|
2333
2334
|
try {
|
|
2334
|
-
if (
|
|
2335
|
+
if (S = await fetch(c, {
|
|
2335
2336
|
method: "GET",
|
|
2336
2337
|
mode: "cors",
|
|
2337
2338
|
cache: "no-cache",
|
|
2338
|
-
headers:
|
|
2339
|
-
}), !
|
|
2340
|
-
if (
|
|
2339
|
+
headers: y
|
|
2340
|
+
}), !S.ok) {
|
|
2341
|
+
if (S.status == 401)
|
|
2341
2342
|
throw {
|
|
2342
|
-
code:
|
|
2343
|
+
code: S.status,
|
|
2343
2344
|
name: "Unauthorized",
|
|
2344
|
-
message:
|
|
2345
|
+
message: S.statusText
|
|
2345
2346
|
};
|
|
2346
|
-
let N = await
|
|
2347
|
-
throw new Error(N ??
|
|
2347
|
+
let N = await S.text();
|
|
2348
|
+
throw new Error(N ?? S.statusText ?? "Get error");
|
|
2348
2349
|
}
|
|
2349
2350
|
if (D)
|
|
2350
|
-
return await
|
|
2351
|
-
if (
|
|
2352
|
-
return await
|
|
2351
|
+
return await S.text();
|
|
2352
|
+
if (b)
|
|
2353
|
+
return await S.json();
|
|
2353
2354
|
throw new Error();
|
|
2354
2355
|
} catch (N) {
|
|
2355
|
-
const
|
|
2356
|
+
const E = `${(S == null ? void 0 : S.status) ?? ""} ${(S == null ? void 0 : S.statusText) ?? ""} ${N.message}`;
|
|
2356
2357
|
if (!r)
|
|
2357
2358
|
return;
|
|
2358
|
-
throw N.code == 401 ? N : new Error(
|
|
2359
|
+
throw N.code == 401 ? N : new Error(E);
|
|
2359
2360
|
}
|
|
2360
2361
|
}
|
|
2361
2362
|
async function M(u) {
|
|
2362
|
-
const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0,
|
|
2363
|
-
let
|
|
2364
|
-
if (
|
|
2365
|
-
return console.log(`DEMO: Get all from ${
|
|
2366
|
-
console.log(`Get all from ${
|
|
2367
|
-
let
|
|
2363
|
+
const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, b = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, D = u.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
|
|
2364
|
+
let c = u.finalUrl, y = u.headers;
|
|
2365
|
+
if (c == null && (c = A(u)), u.overrideHeaders !== !0 && (y = t(u)), s != null && s.isDemoing.value)
|
|
2366
|
+
return console.log(`DEMO: Get all from ${c}`), s.getAll(u);
|
|
2367
|
+
console.log(`Get all from ${c}`);
|
|
2368
|
+
let S;
|
|
2368
2369
|
try {
|
|
2369
|
-
if (
|
|
2370
|
+
if (S = await fetch(c, {
|
|
2370
2371
|
method: "GET",
|
|
2371
2372
|
mode: "cors",
|
|
2372
2373
|
cache: "no-cache",
|
|
2373
|
-
headers:
|
|
2374
|
-
}), !
|
|
2375
|
-
if (
|
|
2374
|
+
headers: y
|
|
2375
|
+
}), !S.ok) {
|
|
2376
|
+
if (S.status == 401)
|
|
2376
2377
|
throw {
|
|
2377
|
-
code:
|
|
2378
|
+
code: S.status,
|
|
2378
2379
|
name: "Unauthorized",
|
|
2379
|
-
message:
|
|
2380
|
+
message: S.statusText
|
|
2380
2381
|
};
|
|
2381
|
-
let N = await
|
|
2382
|
-
throw new Error(N ??
|
|
2382
|
+
let N = await S.text();
|
|
2383
|
+
throw new Error(N ?? S.statusText ?? "Get all error");
|
|
2383
2384
|
}
|
|
2384
2385
|
if (D)
|
|
2385
|
-
return await
|
|
2386
|
-
if (
|
|
2387
|
-
return await
|
|
2386
|
+
return await S.text();
|
|
2387
|
+
if (b)
|
|
2388
|
+
return await S.json();
|
|
2388
2389
|
throw new Error();
|
|
2389
2390
|
} catch (N) {
|
|
2390
|
-
const
|
|
2391
|
+
const E = `${(S == null ? void 0 : S.status) ?? ""} ${(S == null ? void 0 : S.statusText) ?? ""} ${N.message}`;
|
|
2391
2392
|
if (!r)
|
|
2392
2393
|
return;
|
|
2393
|
-
throw N.code == 401 ? N : new Error(
|
|
2394
|
+
throw N.code == 401 ? N : new Error(E);
|
|
2394
2395
|
}
|
|
2395
2396
|
}
|
|
2396
2397
|
async function $(u) {
|
|
2397
|
-
const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0,
|
|
2398
|
-
let
|
|
2399
|
-
if (
|
|
2400
|
-
return console.log(`DEMO: Post to ${
|
|
2401
|
-
console.log(`Post to ${
|
|
2402
|
-
let
|
|
2398
|
+
const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, b = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, D = u.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
|
|
2399
|
+
let c = u.finalUrl, y = u.headers;
|
|
2400
|
+
if (c == null && (c = A(u)), u.overrideHeaders !== !0 && (y = t(u)), s != null && s.isDemoing.value)
|
|
2401
|
+
return console.log(`DEMO: Post to ${c}`), s.post(u);
|
|
2402
|
+
console.log(`Post to ${c}`);
|
|
2403
|
+
let S;
|
|
2403
2404
|
try {
|
|
2404
|
-
if (
|
|
2405
|
+
if (S = await fetch(c, {
|
|
2405
2406
|
method: "POST",
|
|
2406
2407
|
mode: "cors",
|
|
2407
2408
|
cache: "no-cache",
|
|
2408
|
-
headers:
|
|
2409
|
+
headers: y,
|
|
2409
2410
|
body: JSON.stringify(u.data)
|
|
2410
|
-
}), !
|
|
2411
|
-
if (
|
|
2411
|
+
}), !S.ok) {
|
|
2412
|
+
if (S.status == 401)
|
|
2412
2413
|
throw {
|
|
2413
|
-
code:
|
|
2414
|
+
code: S.status,
|
|
2414
2415
|
name: "Unauthorized",
|
|
2415
|
-
message:
|
|
2416
|
+
message: S.statusText
|
|
2416
2417
|
};
|
|
2417
|
-
let N = await
|
|
2418
|
-
throw new Error(N ??
|
|
2418
|
+
let N = await S.text();
|
|
2419
|
+
throw new Error(N ?? S.statusText ?? "Post error!");
|
|
2419
2420
|
}
|
|
2420
2421
|
if (D)
|
|
2421
|
-
return await
|
|
2422
|
-
if (
|
|
2423
|
-
return await
|
|
2422
|
+
return await S.text();
|
|
2423
|
+
if (b)
|
|
2424
|
+
return await S.json();
|
|
2424
2425
|
throw new Error();
|
|
2425
2426
|
} catch (N) {
|
|
2426
|
-
if (
|
|
2427
|
+
if (S.status == 200 || !r)
|
|
2427
2428
|
return;
|
|
2428
|
-
const
|
|
2429
|
-
throw N.code == 401 ? N : new Error(
|
|
2429
|
+
const E = `${(S == null ? void 0 : S.status) ?? ""} ${(S == null ? void 0 : S.statusText) ?? ""} ${N.message}`;
|
|
2430
|
+
throw N.code == 401 ? N : new Error(E);
|
|
2430
2431
|
}
|
|
2431
2432
|
}
|
|
2432
2433
|
async function d(u) {
|
|
2433
|
-
const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0,
|
|
2434
|
-
let
|
|
2435
|
-
if (
|
|
2436
|
-
return console.log(`DEMO: Patch to ${
|
|
2437
|
-
console.log(`Patch to ${
|
|
2438
|
-
let
|
|
2434
|
+
const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, b = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, D = u.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
|
|
2435
|
+
let c = u.finalUrl, y = u.headers;
|
|
2436
|
+
if (c == null && (c = A(u)), u.overrideHeaders !== !0 && (y = t(u)), s != null && s.isDemoing.value)
|
|
2437
|
+
return console.log(`DEMO: Patch to ${c}`), s.patch(u);
|
|
2438
|
+
console.log(`Patch to ${c}`);
|
|
2439
|
+
let S;
|
|
2439
2440
|
try {
|
|
2440
|
-
if (
|
|
2441
|
+
if (S = await fetch(c, {
|
|
2441
2442
|
method: "PATCH",
|
|
2442
2443
|
mode: "cors",
|
|
2443
2444
|
cache: "no-cache",
|
|
2444
|
-
headers:
|
|
2445
|
+
headers: y,
|
|
2445
2446
|
body: JSON.stringify(u.data)
|
|
2446
|
-
}), !
|
|
2447
|
-
if (
|
|
2447
|
+
}), !S.ok) {
|
|
2448
|
+
if (S.status == 401)
|
|
2448
2449
|
throw {
|
|
2449
|
-
code:
|
|
2450
|
+
code: S.status,
|
|
2450
2451
|
name: "Unauthorized",
|
|
2451
|
-
message:
|
|
2452
|
+
message: S.statusText
|
|
2452
2453
|
};
|
|
2453
|
-
let N = await
|
|
2454
|
-
throw new Error(N ??
|
|
2454
|
+
let N = await S.text();
|
|
2455
|
+
throw new Error(N ?? S.statusText ?? "Patch error!");
|
|
2455
2456
|
}
|
|
2456
2457
|
if (D)
|
|
2457
|
-
return await
|
|
2458
|
-
if (
|
|
2459
|
-
return await
|
|
2458
|
+
return await S.text();
|
|
2459
|
+
if (b)
|
|
2460
|
+
return await S.json();
|
|
2460
2461
|
throw new Error();
|
|
2461
2462
|
} catch (N) {
|
|
2462
|
-
if (
|
|
2463
|
+
if (S.status == 200 || !r)
|
|
2463
2464
|
return;
|
|
2464
|
-
const
|
|
2465
|
-
throw N.code == 401 ? N : new Error(
|
|
2465
|
+
const E = `${(S == null ? void 0 : S.status) ?? ""} ${(S == null ? void 0 : S.statusText) ?? ""} ${N.message}`;
|
|
2466
|
+
throw N.code == 401 ? N : new Error(E);
|
|
2466
2467
|
}
|
|
2467
2468
|
}
|
|
2468
2469
|
async function h(u) {
|
|
2469
2470
|
const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0;
|
|
2470
|
-
let
|
|
2471
|
-
if (
|
|
2472
|
-
return console.log(`DEMO: Delete ${
|
|
2473
|
-
console.log(`Delete ${
|
|
2474
|
-
let
|
|
2471
|
+
let b = u.finalUrl, D = u.headers;
|
|
2472
|
+
if (b == null && (b = A(u)), u.overrideHeaders !== !0 && (D = t(u)), s != null && s.isDemoing.value)
|
|
2473
|
+
return console.log(`DEMO: Delete ${b}`), s.deleteItem(u);
|
|
2474
|
+
console.log(`Delete ${b}`);
|
|
2475
|
+
let c;
|
|
2475
2476
|
try {
|
|
2476
|
-
if (
|
|
2477
|
+
if (c = await fetch(b, {
|
|
2477
2478
|
method: "DELETE",
|
|
2478
2479
|
mode: "cors",
|
|
2479
2480
|
cache: "no-cache",
|
|
2480
2481
|
headers: D,
|
|
2481
2482
|
body: JSON.stringify(u.data)
|
|
2482
|
-
}),
|
|
2483
|
+
}), c.status == 401)
|
|
2483
2484
|
throw {
|
|
2484
|
-
code:
|
|
2485
|
+
code: c.status,
|
|
2485
2486
|
name: "Unauthorized",
|
|
2486
|
-
message:
|
|
2487
|
+
message: c.statusText
|
|
2487
2488
|
};
|
|
2488
|
-
return
|
|
2489
|
-
} catch (
|
|
2490
|
-
const
|
|
2489
|
+
return c.status == 200 ? void 0 : c.statusText;
|
|
2490
|
+
} catch (y) {
|
|
2491
|
+
const S = `${(c == null ? void 0 : c.status) ?? ""} ${(c == null ? void 0 : c.statusText) ?? ""} ${y.message}`;
|
|
2491
2492
|
if (!r)
|
|
2492
|
-
return
|
|
2493
|
-
throw
|
|
2493
|
+
return S;
|
|
2494
|
+
throw y.code == 401 ? y : new Error(`${c.status} ${c.statusText} ${y.message}`);
|
|
2494
2495
|
}
|
|
2495
2496
|
}
|
|
2496
2497
|
return Ar = {
|
|
@@ -2508,18 +2509,18 @@ function ut(e) {
|
|
|
2508
2509
|
const { actionErrorMsg: t, actionLoadingMsg: l, clearErrors: A, isLoading: s, doAction: g, logError: I } = en(e);
|
|
2509
2510
|
function C(r) {
|
|
2510
2511
|
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);
|
|
2511
|
-
let
|
|
2512
|
+
let b = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
|
|
2512
2513
|
const D = (e == null ? void 0 : e.items) ?? [];
|
|
2513
|
-
return
|
|
2514
|
-
var
|
|
2515
|
-
const
|
|
2516
|
-
if (
|
|
2514
|
+
return b == null && r.nav != null && (b = Le({ nav: r.nav })), b != null ? r.onDeleteAsync ?? (r.onDeleteAsync = () => b().deleteItem(r)) : r.onDeleteAsync ?? (r.onDeleteAsync = () => {
|
|
2515
|
+
var S;
|
|
2516
|
+
const c = r.id ?? ((S = r.data) == null ? void 0 : S.id);
|
|
2517
|
+
if (c == null)
|
|
2517
2518
|
return Promise.resolve("No id found in delete action");
|
|
2518
|
-
const
|
|
2519
|
-
return
|
|
2519
|
+
const y = D.findIndex((N) => N.id == c);
|
|
2520
|
+
return y >= 0 && D.splice(y, 1), Promise.resolve(void 0);
|
|
2520
2521
|
}), g(async () => {
|
|
2521
|
-
let
|
|
2522
|
-
r.onCanDeleteAsync != null && (
|
|
2522
|
+
let c;
|
|
2523
|
+
r.onCanDeleteAsync != null && (c = await r.onCanDeleteAsync(r.data)), c == null && r.onDeleteAsync != null && (c = await r.onDeleteAsync(r.data)), c == null && r.onDeleteSuccessAsync != null && await r.onDeleteSuccessAsync(r.data), I(c);
|
|
2523
2524
|
}, {
|
|
2524
2525
|
completionMsg: r.completionMsg ?? (e == null ? void 0 : e.completionMsg),
|
|
2525
2526
|
confirmationMsg: r.confirmationMsg ?? (e == null ? void 0 : e.confirmationMsg),
|
|
@@ -2531,15 +2532,15 @@ function ut(e) {
|
|
|
2531
2532
|
}
|
|
2532
2533
|
function _(r) {
|
|
2533
2534
|
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 this item?" : void 0);
|
|
2534
|
-
let
|
|
2535
|
+
let b = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
|
|
2535
2536
|
const D = (e == null ? void 0 : e.items) ?? [];
|
|
2536
|
-
return
|
|
2537
|
-
var
|
|
2538
|
-
const
|
|
2539
|
-
return
|
|
2537
|
+
return b == null && r.nav != null && (b = Le({ nav: r.nav })), b != null ? r.onGetAsync ?? (r.onGetAsync = async () => (await b().get(r)).data) : r.onGetAsync ?? (r.onGetAsync = () => {
|
|
2538
|
+
var y;
|
|
2539
|
+
const c = r.id ?? ((y = r.data) == null ? void 0 : y.id);
|
|
2540
|
+
return c == null ? Promise.resolve(void 0) : Promise.resolve(D.find((S) => S.id == c));
|
|
2540
2541
|
}), g(async () => {
|
|
2541
|
-
let
|
|
2542
|
-
return r.onGetAsync != null && (
|
|
2542
|
+
let c;
|
|
2543
|
+
return r.onGetAsync != null && (c = await r.onGetAsync(r)), r.onGetSuccessAsync != null && (c = await r.onGetSuccessAsync(c, r)), c;
|
|
2543
2544
|
}, {
|
|
2544
2545
|
completionMsg: r.completionMsg ?? (e == null ? void 0 : e.completionMsg),
|
|
2545
2546
|
confirmationMsg: r.confirmationMsg ?? (e == null ? void 0 : e.confirmationMsg),
|
|
@@ -2551,11 +2552,11 @@ function ut(e) {
|
|
|
2551
2552
|
}
|
|
2552
2553
|
function M(r) {
|
|
2553
2554
|
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);
|
|
2554
|
-
let
|
|
2555
|
+
let b = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
|
|
2555
2556
|
const D = (e == null ? void 0 : e.items) ?? [];
|
|
2556
|
-
return
|
|
2557
|
-
let
|
|
2558
|
-
return r.onGetAsync != null && (
|
|
2557
|
+
return b == null && r.nav != null && (b = Le({ nav: r.nav })), b != null ? r.onGetAsync ?? (r.onGetAsync = () => b().getAll(r)) : r.onGetAsync ?? (r.onGetAsync = () => Promise.resolve(D)), g(async () => {
|
|
2558
|
+
let c;
|
|
2559
|
+
return r.onGetAsync != null && (c = await r.onGetAsync(r)), r.onGetSuccessAsync != null && (c = await r.onGetSuccessAsync(c, r)), c;
|
|
2559
2560
|
}, {
|
|
2560
2561
|
completionMsg: r.completionMsg ?? (e == null ? void 0 : e.completionMsg),
|
|
2561
2562
|
confirmationMsg: r.confirmationMsg ?? (e == null ? void 0 : e.confirmationMsg),
|
|
@@ -2567,10 +2568,10 @@ function ut(e) {
|
|
|
2567
2568
|
}
|
|
2568
2569
|
function $(r) {
|
|
2569
2570
|
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 restore this item?" : void 0);
|
|
2570
|
-
let
|
|
2571
|
-
return
|
|
2572
|
-
let D,
|
|
2573
|
-
return r.onCanRestoreAsync != null && (D = await r.onCanRestoreAsync(r.data)), D == null && r.onRestoreAsync != null && (
|
|
2571
|
+
let b = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
|
|
2572
|
+
return b == null && r.nav != null && (b = Le({ nav: r.nav })), b != null && (r.onRestoreAsync ?? (r.onRestoreAsync = () => b().restore(r))), g(async () => {
|
|
2573
|
+
let D, c;
|
|
2574
|
+
return r.onCanRestoreAsync != null && (D = await r.onCanRestoreAsync(r.data)), D == null && r.onRestoreAsync != null && (c = await r.onRestoreAsync(r.data)), c != null && r.onRestoreSuccessAsync != null && await r.onRestoreSuccessAsync(c), I(D), c;
|
|
2574
2575
|
}, {
|
|
2575
2576
|
completionMsg: r.completionMsg ?? (e == null ? void 0 : e.completionMsg),
|
|
2576
2577
|
confirmationMsg: r.confirmationMsg ?? (e == null ? void 0 : e.confirmationMsg),
|
|
@@ -2582,25 +2583,25 @@ function ut(e) {
|
|
|
2582
2583
|
}
|
|
2583
2584
|
function d(r) {
|
|
2584
2585
|
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 save this item?" : void 0);
|
|
2585
|
-
let
|
|
2586
|
+
let b = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
|
|
2586
2587
|
const D = (e == null ? void 0 : e.items) ?? [];
|
|
2587
|
-
return r.onGetSaveAsync ?? (r.onGetSaveAsync = (
|
|
2588
|
-
var
|
|
2589
|
-
return r.mode ?? (r.mode = ((
|
|
2590
|
-
}) : r.onSaveAsync ?? (r.onSaveAsync = (
|
|
2591
|
-
const
|
|
2592
|
-
return
|
|
2588
|
+
return r.onGetSaveAsync ?? (r.onGetSaveAsync = (c) => c), r.onCanSaveAsync ?? (r.onCanSaveAsync = () => Promise.resolve(void 0)), b == null && r.nav != null && (b = Le({ nav: r.nav })), b != null ? r.onSaveAsync ?? (r.onSaveAsync = async () => {
|
|
2589
|
+
var c;
|
|
2590
|
+
return r.mode ?? (r.mode = ((c = r.data) == null ? void 0 : c.id) == null ? "new" : "edit"), r.mode == "new" ? await b().post(r) : await b().patch(r);
|
|
2591
|
+
}) : r.onSaveAsync ?? (r.onSaveAsync = (c) => {
|
|
2592
|
+
const y = D.findIndex((S) => S.id == c.id);
|
|
2593
|
+
return y >= 0 ? D.splice(y, 1, c) : D.push(c), Promise.resolve(c);
|
|
2593
2594
|
}), g(async () => {
|
|
2594
|
-
let
|
|
2595
|
-
if (r.onGetSaveAsync != null && (
|
|
2595
|
+
let c;
|
|
2596
|
+
if (r.onGetSaveAsync != null && (c = await r.onGetSaveAsync(r.data)), c == null)
|
|
2596
2597
|
return;
|
|
2597
2598
|
if (r.onCanSaveAsync != null) {
|
|
2598
|
-
let
|
|
2599
|
-
if (I(
|
|
2599
|
+
let S = await r.onCanSaveAsync(c);
|
|
2600
|
+
if (I(S), S != null)
|
|
2600
2601
|
return;
|
|
2601
2602
|
}
|
|
2602
|
-
let
|
|
2603
|
-
return r.onSaveAsync != null && (
|
|
2603
|
+
let y;
|
|
2604
|
+
return r.onSaveAsync != null && (y = await r.onSaveAsync(c), y = y.data != null ? y.data : y), r.onSaveSuccessAsync != null && (y = await r.onSaveSuccessAsync(y)), y;
|
|
2604
2605
|
}, {
|
|
2605
2606
|
completionMsg: r.completionMsg ?? (e == null ? void 0 : e.completionMsg),
|
|
2606
2607
|
confirmationMsg: r.confirmationMsg ?? (e == null ? void 0 : e.confirmationMsg),
|
|
@@ -2653,24 +2654,24 @@ function Dn(e) {
|
|
|
2653
2654
|
return !1;
|
|
2654
2655
|
if (L.requiresAuth === !1)
|
|
2655
2656
|
return !0;
|
|
2656
|
-
const f =
|
|
2657
|
+
const f = J(s);
|
|
2657
2658
|
if (f.isSuspended && L.ignoreSuspension !== !0)
|
|
2658
2659
|
return !1;
|
|
2659
2660
|
if (f.isGlobalAdmin)
|
|
2660
2661
|
return !0;
|
|
2661
2662
|
if (L.permissions != null) {
|
|
2662
|
-
for (var
|
|
2663
|
-
if (!I(L.permissions[
|
|
2663
|
+
for (var w = 0; w < L.permissions.length; w++)
|
|
2664
|
+
if (!I(L.permissions[w]))
|
|
2664
2665
|
return !1;
|
|
2665
2666
|
}
|
|
2666
2667
|
return !0;
|
|
2667
2668
|
}
|
|
2668
2669
|
function I(x) {
|
|
2669
|
-
const L =
|
|
2670
|
+
const L = J(s);
|
|
2670
2671
|
if (L.userPermissions != null)
|
|
2671
2672
|
for (var f = 0; f < L.userPermissions.length; f++) {
|
|
2672
|
-
var
|
|
2673
|
-
if (L.userPermissions[f] == "everything.edit" || x ==
|
|
2673
|
+
var w = L.userPermissions[f].split(".");
|
|
2674
|
+
if (L.userPermissions[f] == "everything.edit" || x == w[0] && w.length > 1 && w[1] == "edit")
|
|
2674
2675
|
return !0;
|
|
2675
2676
|
}
|
|
2676
2677
|
return !1;
|
|
@@ -2683,117 +2684,117 @@ function Dn(e) {
|
|
|
2683
2684
|
return !1;
|
|
2684
2685
|
if (L.requiresAuth === !1)
|
|
2685
2686
|
return !0;
|
|
2686
|
-
const f =
|
|
2687
|
+
const f = J(s);
|
|
2687
2688
|
if (f.isSuspended && L.ignoreSuspension !== !0)
|
|
2688
2689
|
return !1;
|
|
2689
2690
|
if (f.isGlobalAdmin)
|
|
2690
2691
|
return !0;
|
|
2691
2692
|
if (L.permissions != null) {
|
|
2692
|
-
for (var
|
|
2693
|
-
if (!_(L.permissions[
|
|
2693
|
+
for (var w = 0; w < L.permissions.length; w++)
|
|
2694
|
+
if (!_(L.permissions[w]))
|
|
2694
2695
|
return !1;
|
|
2695
2696
|
}
|
|
2696
2697
|
return !0;
|
|
2697
2698
|
}
|
|
2698
2699
|
function _(x) {
|
|
2699
|
-
const L =
|
|
2700
|
+
const L = J(s);
|
|
2700
2701
|
if (L.userPermissions != null)
|
|
2701
2702
|
for (var f = 0; f < L.userPermissions.length; f++) {
|
|
2702
|
-
var
|
|
2703
|
-
if (x ==
|
|
2703
|
+
var w = L.userPermissions[f].split(".");
|
|
2704
|
+
if (x == w[0] || x == "everything" || L.userPermissions[f] == "everything.view" || L.userPermissions[f] == "everything.edit")
|
|
2704
2705
|
return !0;
|
|
2705
2706
|
}
|
|
2706
2707
|
return !1;
|
|
2707
2708
|
}
|
|
2708
2709
|
function M(x, L, f) {
|
|
2709
|
-
let
|
|
2710
|
-
return
|
|
2711
|
-
f == "edit" ? I(X) || (
|
|
2712
|
-
}), x != null && x.length > 0 && (x.some((X) => u(X)) || (
|
|
2710
|
+
let w = !0;
|
|
2711
|
+
return J(s).isGlobalAdmin ? !0 : (L != null && L.length > 0 && L.forEach((X) => {
|
|
2712
|
+
f == "edit" ? I(X) || (w = !1) : _(X) || (w = !1);
|
|
2713
|
+
}), x != null && x.length > 0 && (x.some((X) => u(X)) || (w = !1)), w);
|
|
2713
2714
|
}
|
|
2714
2715
|
function $(x, L = !1) {
|
|
2715
2716
|
var f = e.getAuthItem != null ? e.getAuthItem(x) : null;
|
|
2716
|
-
let
|
|
2717
|
+
let w = !1;
|
|
2717
2718
|
if (f == null)
|
|
2718
2719
|
return !1;
|
|
2719
|
-
let
|
|
2720
|
+
let j = f.subscriptions ?? [], X = f.permissions ?? [], re = M(j, X, "view");
|
|
2720
2721
|
return re || !L || !_e(f.children) ? re : ((f == null ? void 0 : f.children) != null && f.children.forEach((ue) => {
|
|
2721
|
-
$(ue, !0) && (
|
|
2722
|
-
}),
|
|
2722
|
+
$(ue, !0) && (w = !0);
|
|
2723
|
+
}), w);
|
|
2723
2724
|
}
|
|
2724
2725
|
function d(x) {
|
|
2725
2726
|
return e.getAuthorizeUrl ?? (e.getAuthorizeUrl = (L, f) => {
|
|
2726
|
-
const
|
|
2727
|
-
return L ? `${
|
|
2727
|
+
const w = Ue(Wr(), `authorize?response_type=code&client_id=${e.oauthClientID}&redirect_uri=${window.location.origin}/authentication&state=${f}`);
|
|
2728
|
+
return L ? `${w}&redirect_path=${L}` : w;
|
|
2728
2729
|
}), e.getAuthorizeUrl != null ? e.getAuthorizeUrl(x, l.value) ?? "" : "";
|
|
2729
2730
|
}
|
|
2730
2731
|
function h(x) {
|
|
2731
2732
|
var f;
|
|
2732
|
-
return x == null ? 0 : ((f = (e.subscriptionOptions ?? []).find((
|
|
2733
|
+
return x == null ? 0 : ((f = (e.subscriptionOptions ?? []).find((w) => w.code == x)) == null ? void 0 : f.value) ?? 0;
|
|
2733
2734
|
}
|
|
2734
2735
|
function u(x) {
|
|
2735
|
-
const L =
|
|
2736
|
+
const L = J(s);
|
|
2736
2737
|
if (L.subscriptionCode == null)
|
|
2737
2738
|
return !1;
|
|
2738
2739
|
if (L.subscriptionCode == x)
|
|
2739
2740
|
return !0;
|
|
2740
|
-
const f = h(x),
|
|
2741
|
-
return f <=
|
|
2741
|
+
const f = h(x), w = h(L.subscriptionCode);
|
|
2742
|
+
return f <= w;
|
|
2742
2743
|
}
|
|
2743
2744
|
function r(x) {
|
|
2744
|
-
const f = x.split(".")[1].replace(/-/g, "+").replace(/_/g, "/"),
|
|
2745
|
-
atob(f).split("").map(function(
|
|
2746
|
-
return "%" + ("00" +
|
|
2745
|
+
const f = x.split(".")[1].replace(/-/g, "+").replace(/_/g, "/"), w = decodeURIComponent(
|
|
2746
|
+
atob(f).split("").map(function(j) {
|
|
2747
|
+
return "%" + ("00" + j.charCodeAt(0).toString(16)).slice(-2);
|
|
2747
2748
|
}).join("")
|
|
2748
2749
|
);
|
|
2749
|
-
return JSON.parse(
|
|
2750
|
+
return JSON.parse(w);
|
|
2750
2751
|
}
|
|
2751
|
-
function
|
|
2752
|
+
function b(x, L) {
|
|
2752
2753
|
s.value = void 0, N(), x != null && L != null && L.currentRoute.value.path != x && L.push({ path: x });
|
|
2753
2754
|
}
|
|
2754
2755
|
function D(x) {
|
|
2755
2756
|
var f;
|
|
2756
|
-
|
|
2757
|
+
J(s).isLoggedIn || ((f = e.demo) == null || f.endDemo(), T() && (b(), window.location.href = d(x)));
|
|
2757
2758
|
}
|
|
2758
|
-
async function
|
|
2759
|
+
async function c(x, L) {
|
|
2759
2760
|
return e.getToken ?? (e.getToken = async () => {
|
|
2760
|
-
let f = x,
|
|
2761
|
-
if (f == null ||
|
|
2761
|
+
let f = x, w = L, j = e.oauthGrantType ?? "authorization_token", X = e.oauthClientID ?? "";
|
|
2762
|
+
if (f == null || w == null)
|
|
2762
2763
|
throw new Error("Code and State required in OAuth token process");
|
|
2763
|
-
if (
|
|
2764
|
+
if (w != l.value)
|
|
2764
2765
|
throw new Error("state does not match");
|
|
2765
2766
|
let re = "";
|
|
2766
|
-
e.getTokenUrl ?? (e.getTokenUrl = () => Ue(Wr(), "token")), re = e.getTokenUrl(f, `${window.location.origin}/authentication`,
|
|
2767
|
+
e.getTokenUrl ?? (e.getTokenUrl = () => Ue(Wr(), "token")), re = e.getTokenUrl(f, `${window.location.origin}/authentication`, j, X);
|
|
2767
2768
|
const ue = {};
|
|
2768
|
-
ue.grant_type =
|
|
2769
|
+
ue.grant_type = j, ue.code = f, ue.redirect_uri = `${window.location.origin}/authentication`, ue.client_id = X;
|
|
2769
2770
|
const G = await Er().post({
|
|
2770
2771
|
additionalUrl: re,
|
|
2771
2772
|
data: ue
|
|
2772
2773
|
});
|
|
2773
|
-
|
|
2774
|
+
y(G.access_token);
|
|
2774
2775
|
}), await e.getToken(x, L);
|
|
2775
2776
|
}
|
|
2776
|
-
function
|
|
2777
|
+
function y(x) {
|
|
2777
2778
|
if (x != null && (e.demo == null || !e.demo.isDemoing.value)) {
|
|
2778
2779
|
const L = r(x);
|
|
2779
|
-
|
|
2780
|
+
S(L, x), e.processTokenPayload != null && e.processTokenPayload(s, L);
|
|
2780
2781
|
}
|
|
2781
2782
|
}
|
|
2782
|
-
function
|
|
2783
|
-
var
|
|
2783
|
+
function S(x, L) {
|
|
2784
|
+
var w;
|
|
2784
2785
|
const f = s.value;
|
|
2785
|
-
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 = L, f.userID = x.UserLoginID, f.userPermissions = ((
|
|
2786
|
+
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 = L, f.userID = x.UserLoginID, f.userPermissions = ((w = x.Permissions) == null ? void 0 : w.split(",")) ?? [];
|
|
2786
2787
|
}
|
|
2787
2788
|
function N() {
|
|
2788
2789
|
var x;
|
|
2789
2790
|
s.value ?? (s.value = {}), (x = s.value).timeZone ?? (x.timeZone = e.defaultTimeZone ?? hr);
|
|
2790
2791
|
}
|
|
2791
|
-
function
|
|
2792
|
-
const x =
|
|
2793
|
-
return x.isLoggedIn && T() && (
|
|
2792
|
+
function E() {
|
|
2793
|
+
const x = J(s);
|
|
2794
|
+
return x.isLoggedIn && T() && (b(), window.location.href = d()), x.isLoggedIn;
|
|
2794
2795
|
}
|
|
2795
2796
|
function T() {
|
|
2796
|
-
const x =
|
|
2797
|
+
const x = J(s);
|
|
2797
2798
|
if (x == null || x.expiresOn == null)
|
|
2798
2799
|
return !0;
|
|
2799
2800
|
const L = he.fromFormat(x.expiresOn, t), f = he.utc();
|
|
@@ -2809,14 +2810,14 @@ function Dn(e) {
|
|
|
2809
2810
|
doShow: M,
|
|
2810
2811
|
doShowByNav: $,
|
|
2811
2812
|
getAuthorizeUrl: d,
|
|
2812
|
-
getToken:
|
|
2813
|
+
getToken: c,
|
|
2813
2814
|
isLoggedIn: ee(() => s.value.isLoggedIn === !0),
|
|
2814
2815
|
login: D,
|
|
2815
|
-
logout:
|
|
2816
|
+
logout: b,
|
|
2816
2817
|
resetAuthState: A,
|
|
2817
|
-
setAuth:
|
|
2818
|
+
setAuth: y,
|
|
2818
2819
|
timeZone: ee(() => s.value.timeZone ?? e.defaultTimeZone ?? hr),
|
|
2819
|
-
tryLogin:
|
|
2820
|
+
tryLogin: E
|
|
2820
2821
|
}, Ir;
|
|
2821
2822
|
}
|
|
2822
2823
|
function xn(e, t, l = {}) {
|
|
@@ -2827,80 +2828,80 @@ function xn(e, t, l = {}) {
|
|
|
2827
2828
|
} = l, I = { capture: l.capture ?? !0 };
|
|
2828
2829
|
let C = { x: 0, y: 0 }, _ = { x: 0, y: 0 }, M = { x: 0, y: 0 }, $ = [], d = [], h = z(!1);
|
|
2829
2830
|
function u(N) {
|
|
2830
|
-
|
|
2831
|
+
J(A) && N.preventDefault(), J(s) && N.stopPropagation();
|
|
2831
2832
|
}
|
|
2832
2833
|
function r(N) {
|
|
2833
2834
|
var f;
|
|
2834
|
-
const
|
|
2835
|
-
if (!
|
|
2835
|
+
const E = J(e);
|
|
2836
|
+
if (!E)
|
|
2836
2837
|
return;
|
|
2837
|
-
const T =
|
|
2838
|
+
const T = E.$el, L = N.type === "touchstart" && N.touches.length > 0 ? N.touches[0] : N;
|
|
2838
2839
|
M = { x: L.clientX, y: L.clientY }, _ = {
|
|
2839
2840
|
x: T.offsetLeft,
|
|
2840
2841
|
y: T.offsetTop
|
|
2841
2842
|
}, C = {
|
|
2842
2843
|
x: T.offsetLeft,
|
|
2843
2844
|
y: T.offsetTop
|
|
2844
|
-
}, ((f = l.onStart) == null ? void 0 : f.call(l, M, N)) !== !1 && (d.push(me("mousemove",
|
|
2845
|
+
}, ((f = l.onStart) == null ? void 0 : f.call(l, M, N)) !== !1 && (d.push(me("mousemove", b)), d.push(me("touchmove", b)), d.push(me("mouseup", D)), d.push(me("touchend", D)), u(N));
|
|
2845
2846
|
}
|
|
2846
|
-
function
|
|
2847
|
-
var
|
|
2848
|
-
if (!M || !
|
|
2847
|
+
function b(N) {
|
|
2848
|
+
var w;
|
|
2849
|
+
if (!M || !J(e))
|
|
2849
2850
|
return;
|
|
2850
2851
|
const x = N.type === "touchmove" && N.touches.length > 0 ? N.touches[0] : N;
|
|
2851
2852
|
let L = x.clientX - M.x, f = x.clientY - M.y;
|
|
2852
|
-
(g === "x" || g === "both") && (C.x = _.x + L), (g === "y" || g === "both") && (C.y = _.y + f), (
|
|
2853
|
+
(g === "x" || g === "both") && (C.x = _.x + L), (g === "y" || g === "both") && (C.y = _.y + f), (w = l.onMove) == null || w.call(l, C, N), u(N), c(C);
|
|
2853
2854
|
}
|
|
2854
2855
|
function D(N) {
|
|
2855
|
-
var
|
|
2856
|
+
var E;
|
|
2856
2857
|
document.documentElement.style.cursor = "", d.forEach((T) => {
|
|
2857
2858
|
T();
|
|
2858
|
-
}), d.length = 0, (
|
|
2859
|
+
}), d.length = 0, (E = l.onEnd) == null || E.call(l, C, N), u(N);
|
|
2859
2860
|
}
|
|
2860
|
-
function
|
|
2861
|
-
const
|
|
2862
|
-
if (!
|
|
2861
|
+
function c(N) {
|
|
2862
|
+
const E = J(e);
|
|
2863
|
+
if (!E)
|
|
2863
2864
|
return;
|
|
2864
|
-
const T =
|
|
2865
|
+
const T = E.$el;
|
|
2865
2866
|
T.style.left = `${N.x}px`, T.style.top = `${N.y}px`;
|
|
2866
2867
|
}
|
|
2867
|
-
function
|
|
2868
|
-
if (
|
|
2868
|
+
function y() {
|
|
2869
|
+
if (J(h))
|
|
2869
2870
|
return;
|
|
2870
|
-
const N =
|
|
2871
|
+
const N = J(t);
|
|
2871
2872
|
if (!N)
|
|
2872
2873
|
return;
|
|
2873
|
-
const
|
|
2874
|
-
|
|
2874
|
+
const E = N.$el;
|
|
2875
|
+
E.style.cursor = "move", $.push(me(E, "mousedown", r, I)), $.push(me(E, "touchstart", r, I)), h.value = !0;
|
|
2875
2876
|
}
|
|
2876
|
-
function
|
|
2877
|
-
if (!
|
|
2877
|
+
function S() {
|
|
2878
|
+
if (!J(h))
|
|
2878
2879
|
return;
|
|
2879
|
-
const N =
|
|
2880
|
+
const N = J(t);
|
|
2880
2881
|
if (!N)
|
|
2881
2882
|
return;
|
|
2882
|
-
const
|
|
2883
|
-
|
|
2883
|
+
const E = N.$el;
|
|
2884
|
+
E.style.cursor = "", $.forEach((T) => {
|
|
2884
2885
|
T();
|
|
2885
2886
|
}), $.length = 0, h.value = !1;
|
|
2886
2887
|
}
|
|
2887
2888
|
return {
|
|
2888
2889
|
draggingIsOn: h,
|
|
2889
|
-
turnDraggableOff:
|
|
2890
|
-
turnDraggableOn:
|
|
2890
|
+
turnDraggableOff: S,
|
|
2891
|
+
turnDraggableOn: y
|
|
2891
2892
|
};
|
|
2892
2893
|
}
|
|
2893
2894
|
const Tn = ["t", "r", "b", "l", "tr", "br", "bl", "tl"];
|
|
2894
2895
|
function _n(e, t = {}) {
|
|
2895
2896
|
let l, A = t.handleWidth ?? 12, s = t.handleZIndex ?? 100, g = t.minWidth ?? 0, I = t.maxWidth ?? Number.MAX_SAFE_INTEGER, C = t.minHeight ?? 0, _ = t.maxHeight ?? Number.MAX_SAFE_INTEGER, M = t.preventDefault ?? !1, $ = t.stopPropagation ?? !1, d, h = [];
|
|
2896
2897
|
const u = z(!1);
|
|
2897
|
-
let r = [],
|
|
2898
|
-
const D = z(!1),
|
|
2899
|
-
let
|
|
2898
|
+
let r = [], b = [];
|
|
2899
|
+
const D = z(!1), c = z({ x: 0, y: 0 });
|
|
2900
|
+
let y = { left: 0, top: 0, height: 0, width: 0, position: "absolute" }, S = {};
|
|
2900
2901
|
function N(G) {
|
|
2901
2902
|
Ee(M) && G.preventDefault(), Ee($) && G.stopPropagation();
|
|
2902
2903
|
}
|
|
2903
|
-
function
|
|
2904
|
+
function E(G, Y) {
|
|
2904
2905
|
h = Y.map(x), h.forEach((H) => G.$el.appendChild(H));
|
|
2905
2906
|
}
|
|
2906
2907
|
function T(G) {
|
|
@@ -2908,7 +2909,7 @@ function _n(e, t = {}) {
|
|
|
2908
2909
|
}
|
|
2909
2910
|
function x(G) {
|
|
2910
2911
|
const Y = A + "px", H = -A / 2 + "px", ie = s + 1, Z = document.createElement("div");
|
|
2911
|
-
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 =
|
|
2912
|
+
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;
|
|
2912
2913
|
}
|
|
2913
2914
|
function L(G) {
|
|
2914
2915
|
var ne;
|
|
@@ -2918,47 +2919,47 @@ function _n(e, t = {}) {
|
|
|
2918
2919
|
if (!Y)
|
|
2919
2920
|
return;
|
|
2920
2921
|
const H = Y.$el, Z = G.type === "touchstart" && G.touches.length > 0 ? G.touches[0] : G;
|
|
2921
|
-
if (
|
|
2922
|
+
if (c.value.x = Z.clientX, c.value.y = Z.clientY, y = {
|
|
2922
2923
|
left: H.offsetLeft,
|
|
2923
2924
|
top: H.offsetTop,
|
|
2924
2925
|
height: parseInt(window.getComputedStyle(H).getPropertyValue("height")),
|
|
2925
2926
|
width: parseInt(window.getComputedStyle(H).getPropertyValue("width"))
|
|
2926
|
-
},
|
|
2927
|
+
}, S = Nr(y), ((ne = t.onStart) == null ? void 0 : ne.call(t, c.value, G)) === !1)
|
|
2927
2928
|
return;
|
|
2928
2929
|
let W = G.target;
|
|
2929
|
-
document.documentElement.style.cursor =
|
|
2930
|
+
document.documentElement.style.cursor = j(W.dataset.handle), d = W.dataset.handle, b.push(me("mousemove", f)), b.push(me("mouseup", w)), b.push(me("touchmove", f)), b.push(me("touchend", w)), N(G);
|
|
2930
2931
|
}
|
|
2931
2932
|
function f(G) {
|
|
2932
2933
|
const Y = Ee(e);
|
|
2933
2934
|
if (!Y)
|
|
2934
2935
|
return;
|
|
2935
2936
|
const H = Y.$el, Z = G.type === "touchmove" && G.touches.length > 0 ? G.touches[0] : G;
|
|
2936
|
-
let W = Z.clientX -
|
|
2937
|
-
const ce = Ee(
|
|
2937
|
+
let W = Z.clientX - c.value.x, ne = Z.clientY - c.value.y;
|
|
2938
|
+
const ce = Ee(y);
|
|
2938
2939
|
if (d.includes("t")) {
|
|
2939
2940
|
const se = Math.min(_, Math.max(C, (ce.height ?? 0) - ne));
|
|
2940
|
-
|
|
2941
|
+
S.height = se, S.top = (ce.top ?? 0) + ne;
|
|
2941
2942
|
}
|
|
2942
2943
|
if (d.includes("b")) {
|
|
2943
2944
|
const se = Math.min(_, Math.max(C, (ce.height ?? 0) + ne));
|
|
2944
|
-
|
|
2945
|
+
S.height = se;
|
|
2945
2946
|
}
|
|
2946
2947
|
if (d.includes("l")) {
|
|
2947
2948
|
const se = Math.min(I, Math.max(g, (ce.width ?? 0) - W));
|
|
2948
|
-
|
|
2949
|
+
S.width = se, S.left = (ce.left ?? 0) + W;
|
|
2949
2950
|
}
|
|
2950
2951
|
if (d.includes("r")) {
|
|
2951
2952
|
const se = Math.min(I, Math.max(g, (ce.width ?? 0) + W));
|
|
2952
|
-
|
|
2953
|
+
S.width = se;
|
|
2953
2954
|
}
|
|
2954
|
-
H.dispatchEvent(new CustomEvent("resize")), N(G), re(
|
|
2955
|
+
H.dispatchEvent(new CustomEvent("resize")), N(G), re(S);
|
|
2955
2956
|
}
|
|
2956
|
-
function
|
|
2957
|
-
document.documentElement.style.cursor = "", d = null,
|
|
2957
|
+
function w() {
|
|
2958
|
+
document.documentElement.style.cursor = "", d = null, b.forEach((G) => {
|
|
2958
2959
|
G();
|
|
2959
|
-
}),
|
|
2960
|
+
}), b.length = 0;
|
|
2960
2961
|
}
|
|
2961
|
-
function
|
|
2962
|
+
function j(G) {
|
|
2962
2963
|
const Y = {
|
|
2963
2964
|
t: "n",
|
|
2964
2965
|
r: "e",
|
|
@@ -2989,27 +2990,27 @@ function _n(e, t = {}) {
|
|
|
2989
2990
|
H.style.width = "auto", H.style.top = "", H.style.left = "", H.style.position = "", H.style.transition = "", u.value = !1;
|
|
2990
2991
|
}, { once: !0 });
|
|
2991
2992
|
} else if ((l == "page" || Y.$el.style.position !== "absolute") && G !== "page") {
|
|
2992
|
-
H.style.transition = "width 0.5s, height 0.5s, top 0.5s, left 0.5s", u.value = !0,
|
|
2993
|
+
H.style.transition = "width 0.5s, height 0.5s, top 0.5s, left 0.5s", u.value = !0, y = {
|
|
2993
2994
|
height: parseInt(window.getComputedStyle(H).getPropertyValue("height")),
|
|
2994
2995
|
width: parseInt(window.getComputedStyle(H).getPropertyValue("width")),
|
|
2995
2996
|
top: H.offsetTop,
|
|
2996
2997
|
left: H.offsetLeft,
|
|
2997
2998
|
position: "absolute"
|
|
2998
|
-
}, re(
|
|
2999
|
-
const ie =
|
|
3000
|
-
G == "freestyle" ?
|
|
2999
|
+
}, re(y), H.offsetHeight;
|
|
3000
|
+
const ie = y;
|
|
3001
|
+
G == "freestyle" ? S = {
|
|
3001
3002
|
height: ie.height,
|
|
3002
3003
|
width: (ie.width ?? 100) / 2,
|
|
3003
3004
|
top: (ie.top ?? 0) + 2,
|
|
3004
3005
|
left: (ie.left ?? 0) + 2,
|
|
3005
3006
|
position: "absolute"
|
|
3006
|
-
} : G == "blade" && (
|
|
3007
|
+
} : G == "blade" && (S = {
|
|
3007
3008
|
height: ie.height,
|
|
3008
3009
|
width: (ie.width ?? 100) / 2,
|
|
3009
3010
|
top: (ie.top ?? 0) + 2,
|
|
3010
3011
|
left: (ie.left ?? 0) + 2,
|
|
3011
3012
|
position: "absolute"
|
|
3012
|
-
}), re(
|
|
3013
|
+
}), re(S), me(H, "transitionend", () => {
|
|
3013
3014
|
H.style.transition = "", u.value = !1;
|
|
3014
3015
|
}, { once: !0 });
|
|
3015
3016
|
}
|
|
@@ -3025,7 +3026,7 @@ function _n(e, t = {}) {
|
|
|
3025
3026
|
if (D.value)
|
|
3026
3027
|
return;
|
|
3027
3028
|
const H = Ee(e);
|
|
3028
|
-
H && (
|
|
3029
|
+
H && (E(H, G ?? Tn), X(Y), r.push(me(H.$el, "mousedown", L)), r.push(me(H.$el, "touchstart", L)), D.value = !0, l = Y);
|
|
3029
3030
|
}
|
|
3030
3031
|
function be(G) {
|
|
3031
3032
|
if (!D.value)
|
|
@@ -3179,24 +3180,24 @@ function Mn() {
|
|
|
3179
3180
|
})) : I = Object.keys(l[0]).map((D) => ({ header: tn(D) ?? "", value: D })), I = I.filter((D) => D.header.length > 0);
|
|
3180
3181
|
var C = [];
|
|
3181
3182
|
for (let D = 0; D < l.length; D++) {
|
|
3182
|
-
const
|
|
3183
|
+
const c = l[D];
|
|
3183
3184
|
var _ = {}, M = [];
|
|
3184
|
-
for (let
|
|
3185
|
-
const
|
|
3185
|
+
for (let y = 0; y < I.length; y++) {
|
|
3186
|
+
const S = I[y];
|
|
3186
3187
|
var $ = null;
|
|
3187
|
-
typeof
|
|
3188
|
+
typeof S.value == "function" ? $ = S.value(c) : typeof S.value == "string" && ($ = Sr(c, S.value)), S.itemText != null ? _[S.header] = Sr($, S.itemText) : _[S.header] = $;
|
|
3188
3189
|
}
|
|
3189
|
-
C.push(_), _e(M) && M.forEach((
|
|
3190
|
-
C.push(
|
|
3190
|
+
C.push(_), _e(M) && M.forEach((y) => {
|
|
3191
|
+
C.push(y);
|
|
3191
3192
|
}), M = [];
|
|
3192
3193
|
}
|
|
3193
3194
|
var d = [];
|
|
3194
3195
|
if (d.push(I.map((D) => D.header).toString()), C.forEach((D) => {
|
|
3195
|
-
let
|
|
3196
|
-
I.forEach(function(
|
|
3197
|
-
var
|
|
3198
|
-
|
|
3199
|
-
}), d.push(
|
|
3196
|
+
let c = [];
|
|
3197
|
+
I.forEach(function(y) {
|
|
3198
|
+
var S = D[y.header];
|
|
3199
|
+
c.push(S ?? "");
|
|
3200
|
+
}), d.push(c.join(","));
|
|
3200
3201
|
}), g == "array")
|
|
3201
3202
|
return d;
|
|
3202
3203
|
var h = d.join(`
|
|
@@ -3204,9 +3205,9 @@ function Mn() {
|
|
|
3204
3205
|
if (window.navigator.msSaveOrOpenBlob)
|
|
3205
3206
|
window.navigator.msSaveOrOpenBlob(u, s);
|
|
3206
3207
|
else {
|
|
3207
|
-
var r = document.createElement("a"),
|
|
3208
|
-
r.href =
|
|
3209
|
-
document.body.removeChild(r), window.URL.revokeObjectURL(
|
|
3208
|
+
var r = document.createElement("a"), b = URL.createObjectURL(u);
|
|
3209
|
+
r.href = b, r.download = s, document.body.appendChild(r), r.click(), setTimeout(function() {
|
|
3210
|
+
document.body.removeChild(r), window.URL.revokeObjectURL(b);
|
|
3210
3211
|
}, 0);
|
|
3211
3212
|
}
|
|
3212
3213
|
}
|
|
@@ -3285,24 +3286,24 @@ function Nn(e) {
|
|
|
3285
3286
|
return Promise.resolve("no demo data available for this api");
|
|
3286
3287
|
const h = d.id ?? ((r = d.data) == null ? void 0 : r.id), u = g(d);
|
|
3287
3288
|
if (h != null && (u == null ? void 0 : u.data) != null) {
|
|
3288
|
-
const
|
|
3289
|
-
|
|
3289
|
+
const b = u.data.findIndex((D) => D.id == h);
|
|
3290
|
+
b >= 0 && u.data.splice(b, 1);
|
|
3290
3291
|
}
|
|
3291
|
-
return new Promise(function(
|
|
3292
|
+
return new Promise(function(b) {
|
|
3292
3293
|
setTimeout(function() {
|
|
3293
|
-
|
|
3294
|
+
b(void 0);
|
|
3294
3295
|
}, 200);
|
|
3295
3296
|
});
|
|
3296
3297
|
}
|
|
3297
3298
|
function C(d) {
|
|
3298
|
-
var
|
|
3299
|
+
var b, D, c;
|
|
3299
3300
|
if (l == null)
|
|
3300
3301
|
throw new Error("no demo data available for this api");
|
|
3301
|
-
const h = d.id ?? ((
|
|
3302
|
+
const h = d.id ?? ((b = d.data) == null ? void 0 : b.id), u = g(d);
|
|
3302
3303
|
let r;
|
|
3303
|
-
return u != null && (u.data ?? (u.data = []), u.getAction != null ? r = u.getAction(u.data, h) : h != null ? r = (D = u.data) == null ? void 0 : D.find((
|
|
3304
|
+
return u != null && (u.data ?? (u.data = []), u.getAction != null ? r = u.getAction(u.data, h) : h != null ? r = (D = u.data) == null ? void 0 : D.find((y) => y.id == h) : u.path != null && ((c = u.data) == null ? void 0 : c.length) == 1 && (r = u.data[0])), r == null ? Promise.resolve(void 0) : new Promise((y) => {
|
|
3304
3305
|
setTimeout(() => {
|
|
3305
|
-
|
|
3306
|
+
y({
|
|
3306
3307
|
data: r
|
|
3307
3308
|
});
|
|
3308
3309
|
});
|
|
@@ -3324,12 +3325,12 @@ function Nn(e) {
|
|
|
3324
3325
|
});
|
|
3325
3326
|
}
|
|
3326
3327
|
function M(d) {
|
|
3327
|
-
var r,
|
|
3328
|
+
var r, b;
|
|
3328
3329
|
if (l == null)
|
|
3329
3330
|
throw new Error("no demo data available for this api");
|
|
3330
3331
|
const h = g(d);
|
|
3331
3332
|
let u;
|
|
3332
|
-
return h != null && (h.data ?? (h.data = []), h.postAction != null ? u = h.postAction(h.data, d.data) : d.data != null && (d.data.id == null && (d.data.id = ((((r = h.data) == null ? void 0 : r.length) ?? 0) + 1).toString()), u = d.data, (
|
|
3333
|
+
return h != null && (h.data ?? (h.data = []), h.postAction != null ? u = h.postAction(h.data, d.data) : d.data != null && (d.data.id == null && (d.data.id = ((((r = h.data) == null ? void 0 : r.length) ?? 0) + 1).toString()), u = d.data, (b = h.data) == null || b.push(u))), u == null ? Promise.resolve(void 0) : new Promise((D) => {
|
|
3333
3334
|
setTimeout(() => {
|
|
3334
3335
|
D({
|
|
3335
3336
|
data: u
|
|
@@ -3338,7 +3339,7 @@ function Nn(e) {
|
|
|
3338
3339
|
});
|
|
3339
3340
|
}
|
|
3340
3341
|
function $(d) {
|
|
3341
|
-
var r,
|
|
3342
|
+
var r, b;
|
|
3342
3343
|
if (l == null)
|
|
3343
3344
|
throw new Error("no demo data available for this api");
|
|
3344
3345
|
const h = g(d);
|
|
@@ -3347,8 +3348,8 @@ function Nn(e) {
|
|
|
3347
3348
|
if (h.data ?? (h.data = []), h.patchAction != null)
|
|
3348
3349
|
u = h.patchAction(h.data, d.data);
|
|
3349
3350
|
else if (d.data.id != null) {
|
|
3350
|
-
const D = (r = h.data) == null ? void 0 : r.findIndex((
|
|
3351
|
-
D != null && D > -1 && ((
|
|
3351
|
+
const D = (r = h.data) == null ? void 0 : r.findIndex((c) => c.id == d.data.id);
|
|
3352
|
+
D != null && D > -1 && ((b = h.data) == null || b.splice(D, 1, d.data)), u = d.data;
|
|
3352
3353
|
}
|
|
3353
3354
|
}
|
|
3354
3355
|
return u == null ? Promise.resolve(void 0) : new Promise((D) => {
|
|
@@ -3393,41 +3394,41 @@ function Ea() {
|
|
|
3393
3394
|
return _r;
|
|
3394
3395
|
}
|
|
3395
3396
|
function Un(e) {
|
|
3396
|
-
function t(f,
|
|
3397
|
-
return f ? an(f) ?
|
|
3397
|
+
function t(f, w, j) {
|
|
3398
|
+
return f ? an(f) ? j ?? "" : e.dates.tzString(f, w) : j ?? f ?? "";
|
|
3398
3399
|
}
|
|
3399
3400
|
function l(f) {
|
|
3400
3401
|
if (!f)
|
|
3401
3402
|
return "";
|
|
3402
3403
|
if (typeof f != "object")
|
|
3403
3404
|
return f;
|
|
3404
|
-
var
|
|
3405
|
-
return f.companyAccount != null && (
|
|
3405
|
+
var w = "";
|
|
3406
|
+
return f.companyAccount != null && (w = f.companyAccount.companyName + " | "), f.addressLineOne != null && (w = w + f.addressLineOne + " "), f.streetNumber != null && (w = w + f.streetNumber + " "), f.streetName != null && (w = w + f.streetName + ", "), f.suburb != null && (w = w + f.suburb + " "), f.state != null && (w = w + f.state + " "), f.postcode != null && (w = w + f.postcode), w;
|
|
3406
3407
|
}
|
|
3407
3408
|
function A(f) {
|
|
3408
3409
|
if (typeof f != "number")
|
|
3409
3410
|
return f;
|
|
3410
|
-
var
|
|
3411
|
+
var w = new Intl.NumberFormat("en-US", {
|
|
3411
3412
|
style: "currency",
|
|
3412
3413
|
currency: "AUD",
|
|
3413
3414
|
minimumFractionDigits: 2
|
|
3414
3415
|
});
|
|
3415
|
-
return
|
|
3416
|
+
return w.format(f);
|
|
3416
3417
|
}
|
|
3417
|
-
function s(f,
|
|
3418
|
-
return t(f, "ccc | d LLL",
|
|
3418
|
+
function s(f, w) {
|
|
3419
|
+
return t(f, "ccc | d LLL", w);
|
|
3419
3420
|
}
|
|
3420
|
-
function g(f,
|
|
3421
|
-
return t(f, "d LLL",
|
|
3421
|
+
function g(f, w) {
|
|
3422
|
+
return t(f, "d LLL", w);
|
|
3422
3423
|
}
|
|
3423
|
-
function I(f,
|
|
3424
|
-
return t(f, "ccc",
|
|
3424
|
+
function I(f, w) {
|
|
3425
|
+
return t(f, "ccc", w);
|
|
3425
3426
|
}
|
|
3426
|
-
function C(f,
|
|
3427
|
-
return t(f, "ccc dd LLL yyyy",
|
|
3427
|
+
function C(f, w) {
|
|
3428
|
+
return t(f, "ccc dd LLL yyyy", w);
|
|
3428
3429
|
}
|
|
3429
|
-
function _(f,
|
|
3430
|
-
return t(f, "ccc dd LLL @ hh:mm a",
|
|
3430
|
+
function _(f, w) {
|
|
3431
|
+
return t(f, "ccc dd LLL @ hh:mm a", w);
|
|
3431
3432
|
}
|
|
3432
3433
|
function M(f) {
|
|
3433
3434
|
return new Intl.NumberFormat().format(f);
|
|
@@ -3438,11 +3439,11 @@ function Un(e) {
|
|
|
3438
3439
|
function d(f) {
|
|
3439
3440
|
if (f == 0)
|
|
3440
3441
|
return "";
|
|
3441
|
-
var
|
|
3442
|
-
return f > 0 ? "+" +
|
|
3442
|
+
var w = new Intl.NumberFormat().format(f);
|
|
3443
|
+
return f > 0 ? "+" + w : w;
|
|
3443
3444
|
}
|
|
3444
|
-
function h(f,
|
|
3445
|
-
return e.dates.utcString(f,
|
|
3445
|
+
function h(f, w) {
|
|
3446
|
+
return e.dates.utcString(f, w);
|
|
3446
3447
|
}
|
|
3447
3448
|
function u(f) {
|
|
3448
3449
|
return rt(f, !1);
|
|
@@ -3452,33 +3453,33 @@ function Un(e) {
|
|
|
3452
3453
|
return "";
|
|
3453
3454
|
if (typeof f != "object")
|
|
3454
3455
|
return f;
|
|
3455
|
-
var
|
|
3456
|
-
return f.addressLineOne != null && (
|
|
3456
|
+
var w = "";
|
|
3457
|
+
return f.addressLineOne != null && (w = f.addressLineOne + " "), f.streetNumber != null && (w = w + f.streetNumber + " "), f.streetName != null && (w = w + f.streetName + " "), f.suburb != null && (w = w + f.suburb + " "), f.state != null && (w = w + f.state + " "), f.postcode != null && (w = w + f.postcode), w = w.replaceAll(",", " "), w;
|
|
3457
3458
|
}
|
|
3458
|
-
function
|
|
3459
|
-
return t(f, "ddd DD MMM YYYY",
|
|
3459
|
+
function b(f, w) {
|
|
3460
|
+
return t(f, "ddd DD MMM YYYY", w);
|
|
3460
3461
|
}
|
|
3461
|
-
function D(f,
|
|
3462
|
-
return t(f, "ccc dd LLL yyyy hh:mm a",
|
|
3462
|
+
function D(f, w) {
|
|
3463
|
+
return t(f, "ccc dd LLL yyyy hh:mm a", w);
|
|
3463
3464
|
}
|
|
3464
|
-
function
|
|
3465
|
-
var
|
|
3465
|
+
function c(f) {
|
|
3466
|
+
var w = new Intl.NumberFormat("en-US", {
|
|
3466
3467
|
style: "percent",
|
|
3467
3468
|
minimumFractionDigits: 2
|
|
3468
3469
|
});
|
|
3469
|
-
return
|
|
3470
|
+
return w.format(f);
|
|
3470
3471
|
}
|
|
3471
|
-
function
|
|
3472
|
+
function y(f) {
|
|
3472
3473
|
return f.replaceAll(",", " ");
|
|
3473
3474
|
}
|
|
3474
|
-
function
|
|
3475
|
-
return t(f, "dd LLL yyyy",
|
|
3475
|
+
function S(f, w) {
|
|
3476
|
+
return t(f, "dd LLL yyyy", w);
|
|
3476
3477
|
}
|
|
3477
|
-
function N(f,
|
|
3478
|
-
return t(f, "dd LLL yyyy hh:mm a",
|
|
3478
|
+
function N(f, w) {
|
|
3479
|
+
return t(f, "dd LLL yyyy hh:mm a", w);
|
|
3479
3480
|
}
|
|
3480
|
-
function
|
|
3481
|
-
return t(f, "hh:mm a",
|
|
3481
|
+
function E(f, w) {
|
|
3482
|
+
return t(f, "hh:mm a", w);
|
|
3482
3483
|
}
|
|
3483
3484
|
function T(f) {
|
|
3484
3485
|
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";
|
|
@@ -3497,22 +3498,22 @@ function Un(e) {
|
|
|
3497
3498
|
toFormat: h,
|
|
3498
3499
|
toLocationLine: u,
|
|
3499
3500
|
toLocationLineNoCommas: r,
|
|
3500
|
-
toLongDate:
|
|
3501
|
+
toLongDate: b,
|
|
3501
3502
|
toLongDateAndTime: D,
|
|
3502
|
-
toPercent:
|
|
3503
|
-
toPrettyCSV:
|
|
3504
|
-
toShortDate:
|
|
3503
|
+
toPercent: c,
|
|
3504
|
+
toPrettyCSV: y,
|
|
3505
|
+
toShortDate: S,
|
|
3505
3506
|
toShortDateAndTime: N,
|
|
3506
|
-
toTime:
|
|
3507
|
+
toTime: E,
|
|
3507
3508
|
toTimeOfDay: T
|
|
3508
3509
|
};
|
|
3509
3510
|
function L(f) {
|
|
3510
3511
|
if (f != null) {
|
|
3511
|
-
let
|
|
3512
|
-
if (
|
|
3513
|
-
return x[
|
|
3512
|
+
let w = f;
|
|
3513
|
+
if (w != null && x[w] != null)
|
|
3514
|
+
return x[w];
|
|
3514
3515
|
}
|
|
3515
|
-
return (
|
|
3516
|
+
return (w) => w;
|
|
3516
3517
|
}
|
|
3517
3518
|
return _r = {
|
|
3518
3519
|
findFilter: L,
|
|
@@ -3521,7 +3522,7 @@ function Un(e) {
|
|
|
3521
3522
|
}
|
|
3522
3523
|
function Bn(e, t) {
|
|
3523
3524
|
const l = z(!1), A = Yt(e);
|
|
3524
|
-
let s = g(
|
|
3525
|
+
let s = g(J(e));
|
|
3525
3526
|
(t == null ? void 0 : t.useTracker) !== !1 && Te(A, (C) => {
|
|
3526
3527
|
l.value = g(C) != s;
|
|
3527
3528
|
}, { deep: !0 });
|
|
@@ -3534,7 +3535,7 @@ function Bn(e, t) {
|
|
|
3534
3535
|
})), JSON.stringify(_);
|
|
3535
3536
|
}
|
|
3536
3537
|
function I() {
|
|
3537
|
-
s = g(
|
|
3538
|
+
s = g(J(A)), l.value = !1;
|
|
3538
3539
|
}
|
|
3539
3540
|
return {
|
|
3540
3541
|
asyncItem: A,
|
|
@@ -3547,10 +3548,10 @@ function Ia(e, t) {
|
|
|
3547
3548
|
const {
|
|
3548
3549
|
// useBladeSrc = true,
|
|
3549
3550
|
useRouteSrc: l = !0
|
|
3550
|
-
} = t ?? {}, A = e.storeMode ?? (t == null ? void 0 : t.storeMode), s = e.storageMode ?? (t == null ? void 0 : t.storageMode), g = e.nav ?? e.bladeName ?? "basic", I = Lr(), C = et(), _ =
|
|
3551
|
+
} = t ?? {}, A = e.storeMode ?? (t == null ? void 0 : t.storeMode), s = e.storageMode ?? (t == null ? void 0 : t.storageMode), g = e.nav ?? e.bladeName ?? "basic", I = Lr(), C = et(), _ = J(e.proxyQueryKey), M = ee(() => {
|
|
3551
3552
|
var W;
|
|
3552
|
-
return
|
|
3553
|
-
}), $ = z(void 0), { actionErrorMsg: d, actionLoadingMsg: h, deleteItem: u, getItem: r, getAllItems:
|
|
3553
|
+
return J(e.proxyID) ?? (_ != null ? (W = C == null ? void 0 : C.query) == null ? void 0 : W[_] : void 0);
|
|
3554
|
+
}), $ = z(void 0), { actionErrorMsg: d, actionLoadingMsg: h, deleteItem: u, getItem: r, getAllItems: b, restoreItem: D, saveItem: c } = ut({
|
|
3554
3555
|
nav: g,
|
|
3555
3556
|
onError: e.onError ?? (t == null ? void 0 : t.onError),
|
|
3556
3557
|
proxyID: M.value,
|
|
@@ -3559,26 +3560,26 @@ function Ia(e, t) {
|
|
|
3559
3560
|
storageMode: s,
|
|
3560
3561
|
nav: g
|
|
3561
3562
|
})
|
|
3562
|
-
}),
|
|
3563
|
+
}), y = ee(() => e.errorMsg ?? d.value), S = ee(() => e.loadingMsg ?? h.value), N = ee(() => S.value != null), E = z(e.itemID ?? (l ? (Z = C == null ? void 0 : C.params) == null ? void 0 : Z.id : void 0)), T = z(E.value == "new" ? "new" : e.startEditing ? "edit" : "view"), x = Ne(!1), L = ee(() => {
|
|
3563
3564
|
let W = e.params != null ? { ...e.params } : {};
|
|
3564
3565
|
return e.includeDetails != null && (W.includeDetails = e.includeDetails), W;
|
|
3565
3566
|
}), f = ee(() => {
|
|
3566
3567
|
if (T.value == "new")
|
|
3567
3568
|
return !1;
|
|
3568
|
-
const W =
|
|
3569
|
+
const W = J($);
|
|
3569
3570
|
return e.onCanDelete != null ? e.onCanDelete(W) : (W == null ? void 0 : W.isInactive) !== !0;
|
|
3570
|
-
}),
|
|
3571
|
+
}), w = ee(() => {
|
|
3571
3572
|
if (T.value == "new")
|
|
3572
3573
|
return !1;
|
|
3573
|
-
const W =
|
|
3574
|
+
const W = J($);
|
|
3574
3575
|
return e.onCanEdit != null ? e.onCanEdit(W) : !0;
|
|
3575
|
-
}),
|
|
3576
|
+
}), j = ee(() => {
|
|
3576
3577
|
if (T.value == "new")
|
|
3577
3578
|
return !1;
|
|
3578
|
-
const W =
|
|
3579
|
+
const W = J($);
|
|
3579
3580
|
return e.onCanRestore != null ? e.onCanRestore(W) : (W == null ? void 0 : W.isInactive) === !0;
|
|
3580
3581
|
}), X = ee(() => {
|
|
3581
|
-
const W =
|
|
3582
|
+
const W = J($);
|
|
3582
3583
|
return e.onCanSave != null ? e.onCanSave(W) : !0;
|
|
3583
3584
|
}), { isChanged: re, restartTracker: ue } = Bn($, {
|
|
3584
3585
|
useTracker: e.trackChanges,
|
|
@@ -3628,7 +3629,7 @@ function Ia(e, t) {
|
|
|
3628
3629
|
else {
|
|
3629
3630
|
const ne = {
|
|
3630
3631
|
additionalUrl: e.additionalUrl,
|
|
3631
|
-
id:
|
|
3632
|
+
id: E.value,
|
|
3632
3633
|
nav: g,
|
|
3633
3634
|
proxyID: M.value,
|
|
3634
3635
|
params: L.value,
|
|
@@ -3641,7 +3642,7 @@ function Ia(e, t) {
|
|
|
3641
3642
|
if (e.isSingle === !0)
|
|
3642
3643
|
ne.id === "new" ? $.value = e.onGetNew ? e.onGetNew() : {} : $.value = await r(ne);
|
|
3643
3644
|
else {
|
|
3644
|
-
const ce = await
|
|
3645
|
+
const ce = await b(ne);
|
|
3645
3646
|
$.value = ce.data;
|
|
3646
3647
|
}
|
|
3647
3648
|
}
|
|
@@ -3655,7 +3656,7 @@ function Ia(e, t) {
|
|
|
3655
3656
|
onSaveAsync: Be,
|
|
3656
3657
|
onSaveSuccessAsync: $e = (Fe) => ((ne == null ? void 0 : ne.navBack) === !0 ? I.back() : (W.rowVersion != null && Fe.rowVersion != null && (W.rowVersion = Fe.rowVersion), ue(), T.value = "view"), Promise.resolve(void 0))
|
|
3657
3658
|
} = { ...e };
|
|
3658
|
-
|
|
3659
|
+
c({
|
|
3659
3660
|
additionalUrl: ce,
|
|
3660
3661
|
data: W,
|
|
3661
3662
|
nav: g,
|
|
@@ -3670,10 +3671,10 @@ function Ia(e, t) {
|
|
|
3670
3671
|
});
|
|
3671
3672
|
}
|
|
3672
3673
|
function ie() {
|
|
3673
|
-
const W =
|
|
3674
|
+
const W = J(T);
|
|
3674
3675
|
!W || W == "view" ? T.value = "edit" : W == "edit" && (T.value = "view");
|
|
3675
3676
|
}
|
|
3676
|
-
return Te(
|
|
3677
|
+
return Te(y, (W) => {
|
|
3677
3678
|
x.value = W != null;
|
|
3678
3679
|
}), Te(() => e.refreshToggle, () => {
|
|
3679
3680
|
Y({ deepRefresh: !0 });
|
|
@@ -3683,16 +3684,16 @@ function Ia(e, t) {
|
|
|
3683
3684
|
}), {
|
|
3684
3685
|
asyncItem: $,
|
|
3685
3686
|
deleteItem: be,
|
|
3686
|
-
errorMsg:
|
|
3687
|
+
errorMsg: y,
|
|
3687
3688
|
isChanged: re,
|
|
3688
3689
|
isDeletable: f,
|
|
3689
3690
|
isEditing: ee(() => T.value == "new" || T.value == "edit"),
|
|
3690
|
-
isEditable:
|
|
3691
|
+
isEditable: w,
|
|
3691
3692
|
isLoading: N,
|
|
3692
3693
|
isNew: ee(() => T.value == "new"),
|
|
3693
|
-
isRestorable:
|
|
3694
|
+
isRestorable: j,
|
|
3694
3695
|
isSaveable: X,
|
|
3695
|
-
loadingMsg:
|
|
3696
|
+
loadingMsg: S,
|
|
3696
3697
|
mode: T,
|
|
3697
3698
|
refresh: Y,
|
|
3698
3699
|
restoreItem: G,
|
|
@@ -3736,8 +3737,8 @@ function $n(e) {
|
|
|
3736
3737
|
}
|
|
3737
3738
|
function C(h) {
|
|
3738
3739
|
return h == null ? null : typeof h != "string" ? h : tt(l, (r) => r.children).find((r) => {
|
|
3739
|
-
var
|
|
3740
|
-
return r.name == h || r.singleName == h || ((
|
|
3740
|
+
var b;
|
|
3741
|
+
return r.name == h || r.singleName == h || ((b = r.aliases) == null ? void 0 : b.some((D) => D == h));
|
|
3741
3742
|
}) ?? null;
|
|
3742
3743
|
}
|
|
3743
3744
|
function _(h) {
|
|
@@ -3786,13 +3787,13 @@ function $n(e) {
|
|
|
3786
3787
|
}
|
|
3787
3788
|
function Da(e, t, l) {
|
|
3788
3789
|
var He, Ve;
|
|
3789
|
-
const A = Mn(), s = it(), g = Lr(), I = et(), { bladeData: C } = 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 =
|
|
3790
|
+
const A = Mn(), s = it(), g = Lr(), I = et(), { bladeData: C } = 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 = J(e.customFilters) ?? [], r = z([]), b = ee(() => Kt([
|
|
3790
3791
|
...u.filter((U) => U.name != null).map((U) => U.name),
|
|
3791
3792
|
...e.defaultFilters ?? [],
|
|
3792
3793
|
...r.value
|
|
3793
|
-
]).value), D = z((e.defaultFilters ?? []).map((U) =>
|
|
3794
|
-
let
|
|
3795
|
-
const
|
|
3794
|
+
]).value), D = z((e.defaultFilters ?? []).map((U) => b.value.indexOf(U)));
|
|
3795
|
+
let c = z([...D.value]);
|
|
3796
|
+
const y = ee(() => Gr(c, D).value.length > 0 || Gr(D, c).value.length > 0), S = z(N());
|
|
3796
3797
|
function N() {
|
|
3797
3798
|
var U, Q;
|
|
3798
3799
|
if (_) {
|
|
@@ -3807,7 +3808,7 @@ function Da(e, t, l) {
|
|
|
3807
3808
|
}
|
|
3808
3809
|
return 1;
|
|
3809
3810
|
}
|
|
3810
|
-
const
|
|
3811
|
+
const E = ee(() => {
|
|
3811
3812
|
var U, Q;
|
|
3812
3813
|
if (_) {
|
|
3813
3814
|
const V = (U = C.value) == null ? void 0 : U.proxyID;
|
|
@@ -3834,15 +3835,15 @@ function Da(e, t, l) {
|
|
|
3834
3835
|
return V;
|
|
3835
3836
|
}
|
|
3836
3837
|
}
|
|
3837
|
-
const L = z(
|
|
3838
|
+
const L = z(J(e.startShowingInactive) ?? !1), f = ee(() => [
|
|
3838
3839
|
...e.searchProps ?? [],
|
|
3839
3840
|
...(e.headers ?? []).filter((U) => U.searchable != null && U.value != null).map((U) => U.value ?? "")
|
|
3840
|
-
]),
|
|
3841
|
+
]), w = z([]), j = Ne([]), X = z([]);
|
|
3841
3842
|
let re;
|
|
3842
3843
|
const { actionErrorMsg: ue, actionLoadingMsg: be, deleteItem: G, doAction: Y, getItem: H, getAllItems: ie, restoreItem: Z } = ut({
|
|
3843
3844
|
nav: $,
|
|
3844
3845
|
onError: e.onError ?? (l == null ? void 0 : l.onError),
|
|
3845
|
-
proxyID:
|
|
3846
|
+
proxyID: E.value,
|
|
3846
3847
|
store: Le({
|
|
3847
3848
|
storeMode: d,
|
|
3848
3849
|
storageMode: h,
|
|
@@ -3851,7 +3852,7 @@ function Da(e, t, l) {
|
|
|
3851
3852
|
}), 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(() => {
|
|
3852
3853
|
let U, Q = [];
|
|
3853
3854
|
D.value.forEach((O) => {
|
|
3854
|
-
const de =
|
|
3855
|
+
const de = b.value[O], ye = u.find((De) => De.name == de);
|
|
3855
3856
|
ye != null ? U = U != null ? `${U}ANDALSO${ye.filterFunction()}` : ye.filterFunction() : Q.push(de);
|
|
3856
3857
|
});
|
|
3857
3858
|
const V = {};
|
|
@@ -3859,7 +3860,7 @@ function Da(e, t, l) {
|
|
|
3859
3860
|
}), Fe = ee(() => {
|
|
3860
3861
|
var Q;
|
|
3861
3862
|
let U = e.params != null ? { ...e.params } : {};
|
|
3862
|
-
return e.useServerPagination && e.itemsPerPage != null && (U.includeCount = !0, U.takeAmount = e.itemsPerPage, U.takeFrom = (
|
|
3863
|
+
return e.useServerPagination && e.itemsPerPage != null && (U.includeCount = !0, U.takeAmount = e.itemsPerPage, U.takeFrom = (S.value - 1) * e.itemsPerPage), $e.value != null && (U = { ...U, ...$e.value }), L.value && (U.includeInactive = !0), _e(e.selectProps) && (U.properties = (Q = e.selectProps) == null ? void 0 : Q.toString()), T.value != null && (U.searchString = T.value), U;
|
|
3863
3864
|
}), tr = ee(() => (U) => e.onCanDelete != null ? e.onCanDelete(U) : !(U != null && U.isInactive === !0)), nr = ee(() => (U) => L.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(() => {
|
|
3864
3865
|
let U = new Array();
|
|
3865
3866
|
return Ce.value.filter((V) => V.sublevel != null).forEach((V) => {
|
|
@@ -3890,16 +3891,16 @@ function Da(e, t, l) {
|
|
|
3890
3891
|
const {
|
|
3891
3892
|
additionalUrl: Q,
|
|
3892
3893
|
onDeleteAsync: V
|
|
3893
|
-
} = { ...e }, O =
|
|
3894
|
+
} = { ...e }, O = J(U), de = O.id, ye = (De) => {
|
|
3894
3895
|
if (De != null) {
|
|
3895
|
-
let Ae =
|
|
3896
|
-
if (Ae > -1 &&
|
|
3896
|
+
let Ae = w.value.findIndex((oe) => oe.id == De);
|
|
3897
|
+
if (Ae > -1 && w.value.splice(Ae, 1), e.items != null) {
|
|
3897
3898
|
let oe = e.items.findIndex((Me) => Me.id == De);
|
|
3898
3899
|
oe > -1 && e.items.splice(oe, 1);
|
|
3899
3900
|
}
|
|
3900
3901
|
} else {
|
|
3901
|
-
let Ae =
|
|
3902
|
-
if (Ae == -1 && (Ae =
|
|
3902
|
+
let Ae = w.value.findIndex((oe) => oe === O);
|
|
3903
|
+
if (Ae == -1 && (Ae = w.value.findIndex((oe) => oe == O)), Ae > -1 && w.value.splice(Ae, 1), e.items != null) {
|
|
3903
3904
|
let oe = e.items.findIndex((Me) => Me === O);
|
|
3904
3905
|
oe == -1 && (oe = e.items.findIndex((Me) => Me == O)), oe > -1 && e.items.splice(oe, 1);
|
|
3905
3906
|
}
|
|
@@ -3912,35 +3913,35 @@ function Da(e, t, l) {
|
|
|
3912
3913
|
onCanDeleteAsync: e.onCanDeleteAsync,
|
|
3913
3914
|
onDeleteAsync: V,
|
|
3914
3915
|
onDeleteSuccessAsync: async () => (ye(de), e.onDeleteSuccessAsync != null ? e.onDeleteSuccessAsync(O) : Promise.resolve(void 0)),
|
|
3915
|
-
proxyID:
|
|
3916
|
+
proxyID: E.value,
|
|
3916
3917
|
// ...(useBladeSrc ? bladeData.value : {}),
|
|
3917
3918
|
requireConfirmation: !0
|
|
3918
3919
|
}), t && t("deleted", U);
|
|
3919
3920
|
}
|
|
3920
3921
|
function Je(U) {
|
|
3921
3922
|
Z({
|
|
3922
|
-
data:
|
|
3923
|
+
data: J(U),
|
|
3923
3924
|
additionalUrl: e.additionalUrl,
|
|
3924
3925
|
nav: $,
|
|
3925
3926
|
onCanRestoreAsync: e.onCanRestoreAsync,
|
|
3926
3927
|
onRestoreAsync: e.onRestoreAsync,
|
|
3927
3928
|
onRestoreSuccessAsync: e.onRestoreSuccessAsync,
|
|
3928
|
-
proxyID:
|
|
3929
|
+
proxyID: E.value
|
|
3929
3930
|
// ...(useBladeSrc ? bladeData.value : {})
|
|
3930
3931
|
});
|
|
3931
3932
|
}
|
|
3932
3933
|
function ke() {
|
|
3933
3934
|
Y(() => {
|
|
3934
|
-
A.exportToCSV(Ce.value,
|
|
3935
|
+
A.exportToCSV(Ce.value, j.value);
|
|
3935
3936
|
}, { loadingMsg: "Exporting to CSV" });
|
|
3936
3937
|
}
|
|
3937
3938
|
function Pe() {
|
|
3938
|
-
let U =
|
|
3939
|
+
let U = J(w);
|
|
3939
3940
|
if (U = e.onFilter ? e.onFilter(U) : U, T.value != null && T.value.length > 0) {
|
|
3940
3941
|
let Q = [...f.value];
|
|
3941
3942
|
e.itemText && Q.push(e.itemText), _e(Q) && (U = U.filter((V) => dn(V, T.value, Q)));
|
|
3942
3943
|
}
|
|
3943
|
-
|
|
3944
|
+
j.value = U;
|
|
3944
3945
|
}
|
|
3945
3946
|
function qe() {
|
|
3946
3947
|
const U = (l == null ? void 0 : l.hideActions) ?? e.hideActions;
|
|
@@ -3948,7 +3949,7 @@ function Da(e, t, l) {
|
|
|
3948
3949
|
}
|
|
3949
3950
|
async function Ie(U) {
|
|
3950
3951
|
if (se.value = !1, (U == null ? void 0 : U.resetSearch) === !0 && (ge.value = e.showSearch ?? !1, T.value = void 0), e.items != null) {
|
|
3951
|
-
|
|
3952
|
+
w.value = e.onGetSuccessAsync != null ? await e.onGetSuccessAsync(e.items) : e.items;
|
|
3952
3953
|
return;
|
|
3953
3954
|
}
|
|
3954
3955
|
const Q = {
|
|
@@ -3958,7 +3959,7 @@ function Da(e, t, l) {
|
|
|
3958
3959
|
params: Fe.value,
|
|
3959
3960
|
//params,
|
|
3960
3961
|
// params: params.getParamOptions(),
|
|
3961
|
-
proxyID:
|
|
3962
|
+
proxyID: E.value,
|
|
3962
3963
|
// ...(useBladeSrc ? bladeData.value : {}),
|
|
3963
3964
|
// ...(props.useInterEvents ? eventData : {}),
|
|
3964
3965
|
refresh: (U == null ? void 0 : U.deepRefresh) ?? !1,
|
|
@@ -3966,7 +3967,7 @@ function Da(e, t, l) {
|
|
|
3966
3967
|
onGetSuccessAsync: e.onGetSuccessAsync
|
|
3967
3968
|
};
|
|
3968
3969
|
if (e.isSingle === !0)
|
|
3969
|
-
Q.id === "new" ?
|
|
3970
|
+
Q.id === "new" ? w.value = [] : w.value = await H(Q);
|
|
3970
3971
|
else {
|
|
3971
3972
|
let V = await ie({
|
|
3972
3973
|
...Q,
|
|
@@ -3976,12 +3977,12 @@ function Da(e, t, l) {
|
|
|
3976
3977
|
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;
|
|
3977
3978
|
}
|
|
3978
3979
|
});
|
|
3979
|
-
console.log("list res"), console.log(V),
|
|
3980
|
+
console.log("list res"), console.log(V), w.value = V, c.value = [...D.value];
|
|
3980
3981
|
}
|
|
3981
3982
|
Pe();
|
|
3982
3983
|
}
|
|
3983
3984
|
function je(U, Q) {
|
|
3984
|
-
const V =
|
|
3985
|
+
const V = J(U);
|
|
3985
3986
|
if (V != null && V === re && e.canUnselect ? re = null : re = V, e.canSelect == !0 && (e.onCanSelectItem == null || e.onCanSelectItem(V)))
|
|
3986
3987
|
if (e.onSelectItem != null)
|
|
3987
3988
|
e.onSelectItem(re);
|
|
@@ -4003,28 +4004,28 @@ function Da(e, t, l) {
|
|
|
4003
4004
|
}
|
|
4004
4005
|
return qe(), Qt([T], () => {
|
|
4005
4006
|
Pe();
|
|
4006
|
-
}, { debounce: 500, maxWait: 500 }), Te([L,
|
|
4007
|
+
}, { debounce: 500, maxWait: 500 }), Te([L, S], async () => {
|
|
4007
4008
|
await Ie();
|
|
4008
4009
|
}), Te([W, () => e.errorMsg], ([U, Q]) => {
|
|
4009
4010
|
se.value = U != null || Q != null;
|
|
4010
4011
|
}), Te(() => e.refreshToggle, () => {
|
|
4011
4012
|
Ie({ deepRefresh: !0 });
|
|
4012
|
-
}), Or([
|
|
4013
|
+
}), Or([w, () => e.items], () => {
|
|
4013
4014
|
Pe();
|
|
4014
4015
|
}), Xr(async () => {
|
|
4015
4016
|
var U;
|
|
4016
4017
|
e.eager == !0 && await Ie({ deepRefresh: ((U = I == null ? void 0 : I.params) == null ? void 0 : U.refresh) == "true" });
|
|
4017
4018
|
}), {
|
|
4018
4019
|
add: Se,
|
|
4019
|
-
asyncItems:
|
|
4020
|
-
currentPage:
|
|
4020
|
+
asyncItems: w,
|
|
4021
|
+
currentPage: S,
|
|
4021
4022
|
deleteItem: ir,
|
|
4022
4023
|
displayHeaders: ur,
|
|
4023
4024
|
errorMsg: W,
|
|
4024
4025
|
exportToCSV: ke,
|
|
4025
|
-
filteredItems:
|
|
4026
|
-
filters:
|
|
4027
|
-
filtersChanged:
|
|
4026
|
+
filteredItems: j,
|
|
4027
|
+
filters: b,
|
|
4028
|
+
filtersChanged: y,
|
|
4028
4029
|
headerOptions: X,
|
|
4029
4030
|
isDeletable: tr,
|
|
4030
4031
|
isLoading: ce,
|