@dcupl/bundle 2.0.0-beta.22 → 2.0.0-beta.23
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/dcupl.bundle.js +1288 -1127
- package/dist/dcupl.bundle.js.map +1 -1
- package/dist/dcupl.bundle.min.js +8 -8
- package/dist/dcupl.bundle.min.js.map +1 -1
- package/package.json +4 -4
package/dist/dcupl.bundle.js
CHANGED
|
@@ -521,7 +521,7 @@
|
|
|
521
521
|
g$1.Request = Request;
|
|
522
522
|
g$1.Response = Response;
|
|
523
523
|
}
|
|
524
|
-
var xt$1 = typeof global == "object" && global && global.Object === Object && global, ur$1 = typeof self == "object" && self && self.Object === Object && self,
|
|
524
|
+
var xt$1 = typeof global == "object" && global && global.Object === Object && global, ur$1 = typeof self == "object" && self && self.Object === Object && self, $$2 = xt$1 || ur$1 || Function("return this")(), x$2 = $$2.Symbol, St$1 = Object.prototype, cr$1 = St$1.hasOwnProperty, fr$1 = St$1.toString, L$3 = x$2 ? x$2.toStringTag : void 0;
|
|
525
525
|
function lr$1(r) {
|
|
526
526
|
var e = cr$1.call(r, L$3), t = r[L$3];
|
|
527
527
|
try {
|
|
@@ -537,29 +537,29 @@
|
|
|
537
537
|
return hr$1.call(r);
|
|
538
538
|
}
|
|
539
539
|
var gr$1 = "[object Null]", yr$1 = "[object Undefined]", Re$2 = x$2 ? x$2.toStringTag : void 0;
|
|
540
|
-
function N$
|
|
540
|
+
function N$3(r) {
|
|
541
541
|
return r == null ? r === void 0 ? yr$1 : gr$1 : Re$2 && Re$2 in Object(r) ? lr$1(r) : pr$1(r);
|
|
542
542
|
}
|
|
543
543
|
function O$2(r) {
|
|
544
544
|
return r != null && typeof r == "object";
|
|
545
545
|
}
|
|
546
546
|
var mr$1 = "[object Symbol]";
|
|
547
|
-
function F$
|
|
548
|
-
return typeof r == "symbol" || O$2(r) && N$
|
|
547
|
+
function F$1(r) {
|
|
548
|
+
return typeof r == "symbol" || O$2(r) && N$3(r) == mr$1;
|
|
549
549
|
}
|
|
550
550
|
function z$4(r, e) {
|
|
551
551
|
for (var t = -1, n = r == null ? 0 : r.length, s = Array(n); ++t < n; )
|
|
552
552
|
s[t] = e(r[t], t, r);
|
|
553
553
|
return s;
|
|
554
554
|
}
|
|
555
|
-
var v$2 = Array.isArray, Fe$2 = x$2 ? x$2.prototype : void 0,
|
|
555
|
+
var v$2 = Array.isArray, Fe$2 = x$2 ? x$2.prototype : void 0, Ge$3 = Fe$2 ? Fe$2.toString : void 0;
|
|
556
556
|
function Tt(r) {
|
|
557
557
|
if (typeof r == "string")
|
|
558
558
|
return r;
|
|
559
559
|
if (v$2(r))
|
|
560
560
|
return z$4(r, Tt) + "";
|
|
561
|
-
if (F$
|
|
562
|
-
return
|
|
561
|
+
if (F$1(r))
|
|
562
|
+
return Ge$3 ? Ge$3.call(r) : "";
|
|
563
563
|
var e = r + "";
|
|
564
564
|
return e == "0" && 1 / r == -1 / 0 ? "-0" : e;
|
|
565
565
|
}
|
|
@@ -573,33 +573,33 @@
|
|
|
573
573
|
function Ar$1(r) {
|
|
574
574
|
return r && r.slice(0, vr$1(r) + 1).replace(wr$1, "");
|
|
575
575
|
}
|
|
576
|
-
function E$
|
|
576
|
+
function E$4(r) {
|
|
577
577
|
var e = typeof r;
|
|
578
578
|
return r != null && (e == "object" || e == "function");
|
|
579
579
|
}
|
|
580
|
-
var
|
|
581
|
-
function
|
|
580
|
+
var ke$1 = NaN, xr$1 = /^[-+]0x[0-9a-f]+$/i, Sr$1 = /^0b[01]+$/i, Tr$1 = /^0o[0-7]+$/i, Or$1 = parseInt;
|
|
581
|
+
function $r$1(r) {
|
|
582
582
|
if (typeof r == "number")
|
|
583
583
|
return r;
|
|
584
|
-
if (F$
|
|
585
|
-
return
|
|
586
|
-
if (E$
|
|
584
|
+
if (F$1(r))
|
|
585
|
+
return ke$1;
|
|
586
|
+
if (E$4(r)) {
|
|
587
587
|
var e = typeof r.valueOf == "function" ? r.valueOf() : r;
|
|
588
|
-
r = E$
|
|
588
|
+
r = E$4(e) ? e + "" : e;
|
|
589
589
|
}
|
|
590
590
|
if (typeof r != "string")
|
|
591
591
|
return r === 0 ? r : +r;
|
|
592
592
|
r = Ar$1(r);
|
|
593
593
|
var t = Sr$1.test(r);
|
|
594
|
-
return t || Tr$1.test(r) ? Or$1(r.slice(2), t ? 2 : 8) : xr$1.test(r) ?
|
|
594
|
+
return t || Tr$1.test(r) ? Or$1(r.slice(2), t ? 2 : 8) : xr$1.test(r) ? ke$1 : +r;
|
|
595
595
|
}
|
|
596
|
-
var Le$2 = 1 / 0, $
|
|
596
|
+
var Le$2 = 1 / 0, Mr$1 = 17976931348623157e292;
|
|
597
597
|
function _r$1(r) {
|
|
598
598
|
if (!r)
|
|
599
599
|
return r === 0 ? r : 0;
|
|
600
|
-
if (r =
|
|
600
|
+
if (r = $r$1(r), r === Le$2 || r === -Le$2) {
|
|
601
601
|
var e = r < 0 ? -1 : 1;
|
|
602
|
-
return e * $
|
|
602
|
+
return e * Mr$1;
|
|
603
603
|
}
|
|
604
604
|
return r === r ? r : 0;
|
|
605
605
|
}
|
|
@@ -610,14 +610,14 @@
|
|
|
610
610
|
function ue$1(r) {
|
|
611
611
|
return r;
|
|
612
612
|
}
|
|
613
|
-
var
|
|
613
|
+
var Dr$1 = "[object AsyncFunction]", Ir$1 = "[object Function]", Er$1 = "[object GeneratorFunction]", Qr$1 = "[object Proxy]";
|
|
614
614
|
function Ot$1(r) {
|
|
615
|
-
if (!E$
|
|
615
|
+
if (!E$4(r))
|
|
616
616
|
return false;
|
|
617
|
-
var e = N$
|
|
618
|
-
return e ==
|
|
617
|
+
var e = N$3(r);
|
|
618
|
+
return e == Ir$1 || e == Er$1 || e == Dr$1 || e == Qr$1;
|
|
619
619
|
}
|
|
620
|
-
var he =
|
|
620
|
+
var he = $$2["__core-js_shared__"], ze$2 = (function() {
|
|
621
621
|
var r = /[^.]+$/.exec(he && he.keys && he.keys.IE_PROTO || "");
|
|
622
622
|
return r ? "Symbol(src)_1." + r : "";
|
|
623
623
|
})();
|
|
@@ -638,11 +638,11 @@
|
|
|
638
638
|
}
|
|
639
639
|
return "";
|
|
640
640
|
}
|
|
641
|
-
var Kr$1 = /[\\^$.*+?()[\]{}|]/g, Pr$1 = /^\[object .+?Constructor\]$/, Rr$1 = Function.prototype, Fr$1 = Object.prototype,
|
|
642
|
-
"^" +
|
|
641
|
+
var Kr$1 = /[\\^$.*+?()[\]{}|]/g, Pr$1 = /^\[object .+?Constructor\]$/, Rr$1 = Function.prototype, Fr$1 = Object.prototype, Gr$1 = Rr$1.toString, kr$1 = Fr$1.hasOwnProperty, Lr$1 = RegExp(
|
|
642
|
+
"^" + Gr$1.call(kr$1).replace(Kr$1, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
643
643
|
);
|
|
644
644
|
function zr$1(r) {
|
|
645
|
-
if (!E$
|
|
645
|
+
if (!E$4(r) || Nr$1(r))
|
|
646
646
|
return false;
|
|
647
647
|
var e = Ot$1(r) ? Lr$1 : Pr$1;
|
|
648
648
|
return e.test(j$2(r));
|
|
@@ -650,15 +650,15 @@
|
|
|
650
650
|
function Br$1(r, e) {
|
|
651
651
|
return r?.[e];
|
|
652
652
|
}
|
|
653
|
-
function q(r, e) {
|
|
653
|
+
function q$1(r, e) {
|
|
654
654
|
var t = Br$1(r, e);
|
|
655
655
|
return zr$1(t) ? t : void 0;
|
|
656
656
|
}
|
|
657
|
-
var ve$1 = q(
|
|
657
|
+
var ve$1 = q$1($$2, "WeakMap"), Be$1 = Object.create, Ur$1 = /* @__PURE__ */ (function() {
|
|
658
658
|
function r() {
|
|
659
659
|
}
|
|
660
660
|
return function(e) {
|
|
661
|
-
if (!E$
|
|
661
|
+
if (!E$4(e))
|
|
662
662
|
return {};
|
|
663
663
|
if (Be$1)
|
|
664
664
|
return Be$1(e);
|
|
@@ -698,14 +698,14 @@
|
|
|
698
698
|
return r;
|
|
699
699
|
};
|
|
700
700
|
}
|
|
701
|
-
var
|
|
701
|
+
var oe$1 = (function() {
|
|
702
702
|
try {
|
|
703
|
-
var r = q(Object, "defineProperty");
|
|
703
|
+
var r = q$1(Object, "defineProperty");
|
|
704
704
|
return r({}, "", {}), r;
|
|
705
705
|
} catch {
|
|
706
706
|
}
|
|
707
|
-
})(), Yr$1 =
|
|
708
|
-
return
|
|
707
|
+
})(), Yr$1 = oe$1 ? function(r, e) {
|
|
708
|
+
return oe$1(r, "toString", {
|
|
709
709
|
configurable: true,
|
|
710
710
|
enumerable: false,
|
|
711
711
|
value: Xr$1(e),
|
|
@@ -717,10 +717,10 @@
|
|
|
717
717
|
;
|
|
718
718
|
return r;
|
|
719
719
|
}
|
|
720
|
-
function
|
|
721
|
-
for (var s = r.length,
|
|
722
|
-
if (e(r[
|
|
723
|
-
return
|
|
720
|
+
function $t$1(r, e, t, n) {
|
|
721
|
+
for (var s = r.length, o = t + -1; ++o < s; )
|
|
722
|
+
if (e(r[o], o, r))
|
|
723
|
+
return o;
|
|
724
724
|
return -1;
|
|
725
725
|
}
|
|
726
726
|
function rn$1(r) {
|
|
@@ -733,19 +733,19 @@
|
|
|
733
733
|
return -1;
|
|
734
734
|
}
|
|
735
735
|
function sn$1(r, e, t) {
|
|
736
|
-
return e === e ? nn$1(r, e, t) :
|
|
736
|
+
return e === e ? nn$1(r, e, t) : $t$1(r, rn$1, t);
|
|
737
737
|
}
|
|
738
738
|
function on$1(r, e) {
|
|
739
739
|
var t = r == null ? 0 : r.length;
|
|
740
740
|
return !!t && sn$1(r, e, 0) > -1;
|
|
741
741
|
}
|
|
742
742
|
var an$1 = 9007199254740991, un$1 = /^(?:0|[1-9]\d*)$/;
|
|
743
|
-
function $
|
|
743
|
+
function Mt$1(r, e) {
|
|
744
744
|
var t = typeof r;
|
|
745
745
|
return e = e ?? an$1, !!e && (t == "number" || t != "symbol" && un$1.test(r)) && r > -1 && r % 1 == 0 && r < e;
|
|
746
746
|
}
|
|
747
747
|
function cn$1(r, e, t) {
|
|
748
|
-
e == "__proto__" &&
|
|
748
|
+
e == "__proto__" && oe$1 ? oe$1(r, e, {
|
|
749
749
|
configurable: true,
|
|
750
750
|
enumerable: true,
|
|
751
751
|
value: t,
|
|
@@ -763,23 +763,23 @@
|
|
|
763
763
|
var Ue$2 = Math.max;
|
|
764
764
|
function hn$1(r, e, t) {
|
|
765
765
|
return e = Ue$2(e === void 0 ? r.length - 1 : e, 0), function() {
|
|
766
|
-
for (var n = arguments, s = -1,
|
|
767
|
-
|
|
766
|
+
for (var n = arguments, s = -1, o = Ue$2(n.length - e, 0), i = Array(o); ++s < o; )
|
|
767
|
+
i[s] = n[e + s];
|
|
768
768
|
s = -1;
|
|
769
769
|
for (var a = Array(e + 1); ++s < e; )
|
|
770
770
|
a[s] = n[s];
|
|
771
|
-
return a[e] = t(
|
|
771
|
+
return a[e] = t(i), Hr$1(r, this, a);
|
|
772
772
|
};
|
|
773
773
|
}
|
|
774
774
|
function pn$1(r, e) {
|
|
775
775
|
return en$1(hn$1(r, e, ue$1), r + "");
|
|
776
776
|
}
|
|
777
777
|
var gn$1 = 9007199254740991;
|
|
778
|
-
function
|
|
778
|
+
function De$2(r) {
|
|
779
779
|
return typeof r == "number" && r > -1 && r % 1 == 0 && r <= gn$1;
|
|
780
780
|
}
|
|
781
|
-
function
|
|
782
|
-
return r != null &&
|
|
781
|
+
function k$1(r) {
|
|
782
|
+
return r != null && De$2(r.length) && !Ot$1(r);
|
|
783
783
|
}
|
|
784
784
|
var yn$1 = Object.prototype;
|
|
785
785
|
function _t$1(r) {
|
|
@@ -793,9 +793,9 @@
|
|
|
793
793
|
}
|
|
794
794
|
var bn$1 = "[object Arguments]";
|
|
795
795
|
function He$3(r) {
|
|
796
|
-
return O$2(r) && N$
|
|
796
|
+
return O$2(r) && N$3(r) == bn$1;
|
|
797
797
|
}
|
|
798
|
-
var Ct$1 = Object.prototype, vn$1 = Ct$1.hasOwnProperty, wn$1 = Ct$1.propertyIsEnumerable,
|
|
798
|
+
var Ct$1 = Object.prototype, vn$1 = Ct$1.hasOwnProperty, wn$1 = Ct$1.propertyIsEnumerable, Ie$2 = He$3(/* @__PURE__ */ (function() {
|
|
799
799
|
return arguments;
|
|
800
800
|
})()) ? He$3 : function(r) {
|
|
801
801
|
return O$2(r) && vn$1.call(r, "callee") && !wn$1.call(r, "callee");
|
|
@@ -803,32 +803,32 @@
|
|
|
803
803
|
function An$1() {
|
|
804
804
|
return false;
|
|
805
805
|
}
|
|
806
|
-
var
|
|
807
|
-
m[Rn$1] = m[Fn$1] = m[
|
|
808
|
-
m[Tn$1] = m[On$1] = m[Kn$1] = m[
|
|
806
|
+
var Dt$1 = typeof exports == "object" && exports && !exports.nodeType && exports, We$2 = Dt$1 && typeof module == "object" && module && !module.nodeType && module, xn$1 = We$2 && We$2.exports === Dt$1, Ve$2 = xn$1 ? $$2.Buffer : void 0, Sn$1 = Ve$2 ? Ve$2.isBuffer : void 0, ie$1 = Sn$1 || An$1, Tn$1 = "[object Arguments]", On$1 = "[object Array]", $n$1 = "[object Boolean]", Mn$1 = "[object Date]", _n$1 = "[object Error]", Cn$1 = "[object Function]", Dn$1 = "[object Map]", In$1 = "[object Number]", En$1 = "[object Object]", Qn$1 = "[object RegExp]", Nn$1 = "[object Set]", jn$1 = "[object String]", qn$1 = "[object WeakMap]", Kn$1 = "[object ArrayBuffer]", Pn$1 = "[object DataView]", Rn$1 = "[object Float32Array]", Fn$1 = "[object Float64Array]", Gn$1 = "[object Int8Array]", kn$1 = "[object Int16Array]", Ln$1 = "[object Int32Array]", zn$1 = "[object Uint8Array]", Bn$1 = "[object Uint8ClampedArray]", Un$1 = "[object Uint16Array]", Hn$1 = "[object Uint32Array]", m = {};
|
|
807
|
+
m[Rn$1] = m[Fn$1] = m[Gn$1] = m[kn$1] = m[Ln$1] = m[zn$1] = m[Bn$1] = m[Un$1] = m[Hn$1] = true;
|
|
808
|
+
m[Tn$1] = m[On$1] = m[Kn$1] = m[$n$1] = m[Pn$1] = m[Mn$1] = m[_n$1] = m[Cn$1] = m[Dn$1] = m[In$1] = m[En$1] = m[Qn$1] = m[Nn$1] = m[jn$1] = m[qn$1] = false;
|
|
809
809
|
function Wn$1(r) {
|
|
810
|
-
return O$2(r) &&
|
|
810
|
+
return O$2(r) && De$2(r.length) && !!m[N$3(r)];
|
|
811
811
|
}
|
|
812
812
|
function J$2(r) {
|
|
813
813
|
return function(e) {
|
|
814
814
|
return r(e);
|
|
815
815
|
};
|
|
816
816
|
}
|
|
817
|
-
var
|
|
817
|
+
var It$1 = typeof exports == "object" && exports && !exports.nodeType && exports, B$3 = It$1 && typeof module == "object" && module && !module.nodeType && module, Vn$1 = B$3 && B$3.exports === It$1, pe$1 = Vn$1 && xt$1.process, G$1 = (function() {
|
|
818
818
|
try {
|
|
819
819
|
var r = B$3 && B$3.require && B$3.require("util").types;
|
|
820
820
|
return r || pe$1 && pe$1.binding && pe$1.binding("util");
|
|
821
821
|
} catch {
|
|
822
822
|
}
|
|
823
|
-
})(), Ze$2 =
|
|
823
|
+
})(), Ze$2 = G$1 && G$1.isTypedArray, Et$1 = Ze$2 ? J$2(Ze$2) : Wn$1, Zn$1 = Object.prototype, Jn$1 = Zn$1.hasOwnProperty;
|
|
824
824
|
function Xn$1(r, e) {
|
|
825
|
-
var t = v$2(r), n = !t &&
|
|
825
|
+
var t = v$2(r), n = !t && Ie$2(r), s = !t && !n && ie$1(r), o = !t && !n && !s && Et$1(r), i = t || n || s || o, a = i ? mn$1(r.length, String) : [], u = a.length;
|
|
826
826
|
for (var c in r)
|
|
827
|
-
(e || Jn$1.call(r, c)) && !(
|
|
827
|
+
(e || Jn$1.call(r, c)) && !(i && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
828
828
|
(c == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
829
829
|
s && (c == "offset" || c == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
830
|
-
|
|
831
|
-
$
|
|
830
|
+
o && (c == "buffer" || c == "byteLength" || c == "byteOffset") || // Skip index properties.
|
|
831
|
+
Mt$1(c, u))) && a.push(c);
|
|
832
832
|
return a;
|
|
833
833
|
}
|
|
834
834
|
function Qt$1(r, e) {
|
|
@@ -846,29 +846,29 @@
|
|
|
846
846
|
return e;
|
|
847
847
|
}
|
|
848
848
|
function ce$1(r) {
|
|
849
|
-
return
|
|
849
|
+
return k$1(r) ? Xn$1(r) : Nt$1(r);
|
|
850
850
|
}
|
|
851
851
|
var rs$1 = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, ns$1 = /^\w*$/;
|
|
852
852
|
function Ee$2(r, e) {
|
|
853
853
|
if (v$2(r))
|
|
854
854
|
return false;
|
|
855
855
|
var t = typeof r;
|
|
856
|
-
return t == "number" || t == "symbol" || t == "boolean" || r == null || F$
|
|
856
|
+
return t == "number" || t == "symbol" || t == "boolean" || r == null || F$1(r) ? true : ns$1.test(r) || !rs$1.test(r) || e != null && r in Object(e);
|
|
857
857
|
}
|
|
858
|
-
var U$3 = q(Object, "create");
|
|
858
|
+
var U$3 = q$1(Object, "create");
|
|
859
859
|
function ss$1() {
|
|
860
860
|
this.__data__ = U$3 ? U$3(null) : {}, this.size = 0;
|
|
861
861
|
}
|
|
862
|
-
function
|
|
862
|
+
function os$1(r) {
|
|
863
863
|
var e = this.has(r) && delete this.__data__[r];
|
|
864
864
|
return this.size -= e ? 1 : 0, e;
|
|
865
865
|
}
|
|
866
|
-
var
|
|
866
|
+
var is$1 = "__lodash_hash_undefined__", as$1 = Object.prototype, us$1 = as$1.hasOwnProperty;
|
|
867
867
|
function cs$1(r) {
|
|
868
868
|
var e = this.__data__;
|
|
869
869
|
if (U$3) {
|
|
870
870
|
var t = e[r];
|
|
871
|
-
return t ===
|
|
871
|
+
return t === is$1 ? void 0 : t;
|
|
872
872
|
}
|
|
873
873
|
return us$1.call(e, r) ? e[r] : void 0;
|
|
874
874
|
}
|
|
@@ -882,18 +882,18 @@
|
|
|
882
882
|
var t = this.__data__;
|
|
883
883
|
return this.size += this.has(r) ? 0 : 1, t[r] = U$3 && e === void 0 ? hs$1 : e, this;
|
|
884
884
|
}
|
|
885
|
-
function Q$
|
|
885
|
+
function Q$3(r) {
|
|
886
886
|
var e = -1, t = r == null ? 0 : r.length;
|
|
887
887
|
for (this.clear(); ++e < t; ) {
|
|
888
888
|
var n = r[e];
|
|
889
889
|
this.set(n[0], n[1]);
|
|
890
890
|
}
|
|
891
891
|
}
|
|
892
|
-
Q$
|
|
893
|
-
Q$
|
|
894
|
-
Q$
|
|
895
|
-
Q$
|
|
896
|
-
Q$
|
|
892
|
+
Q$3.prototype.clear = ss$1;
|
|
893
|
+
Q$3.prototype.delete = os$1;
|
|
894
|
+
Q$3.prototype.get = cs$1;
|
|
895
|
+
Q$3.prototype.has = ds$1;
|
|
896
|
+
Q$3.prototype.set = ps$1;
|
|
897
897
|
function gs$1() {
|
|
898
898
|
this.__data__ = [], this.size = 0;
|
|
899
899
|
}
|
|
@@ -922,24 +922,24 @@
|
|
|
922
922
|
var t = this.__data__, n = fe$1(t, r);
|
|
923
923
|
return n < 0 ? (++this.size, t.push([r, e])) : t[n][1] = e, this;
|
|
924
924
|
}
|
|
925
|
-
function
|
|
925
|
+
function M$3(r) {
|
|
926
926
|
var e = -1, t = r == null ? 0 : r.length;
|
|
927
927
|
for (this.clear(); ++e < t; ) {
|
|
928
928
|
var n = r[e];
|
|
929
929
|
this.set(n[0], n[1]);
|
|
930
930
|
}
|
|
931
931
|
}
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
var H$1 = q(
|
|
932
|
+
M$3.prototype.clear = gs$1;
|
|
933
|
+
M$3.prototype.delete = bs$1;
|
|
934
|
+
M$3.prototype.get = vs$1;
|
|
935
|
+
M$3.prototype.has = ws$1;
|
|
936
|
+
M$3.prototype.set = As$1;
|
|
937
|
+
var H$1 = q$1($$2, "Map");
|
|
938
938
|
function xs$1() {
|
|
939
939
|
this.size = 0, this.__data__ = {
|
|
940
|
-
hash: new Q$
|
|
941
|
-
map: new (H$1 ||
|
|
942
|
-
string: new Q$
|
|
940
|
+
hash: new Q$3(),
|
|
941
|
+
map: new (H$1 || M$3)(),
|
|
942
|
+
string: new Q$3()
|
|
943
943
|
};
|
|
944
944
|
}
|
|
945
945
|
function Ss$1(r) {
|
|
@@ -957,10 +957,10 @@
|
|
|
957
957
|
function Os$1(r) {
|
|
958
958
|
return le(this, r).get(r);
|
|
959
959
|
}
|
|
960
|
-
function
|
|
960
|
+
function $s$1(r) {
|
|
961
961
|
return le(this, r).has(r);
|
|
962
962
|
}
|
|
963
|
-
function $
|
|
963
|
+
function Ms$1(r, e) {
|
|
964
964
|
var t = le(this, r), n = t.size;
|
|
965
965
|
return t.set(r, e), this.size += t.size == n ? 0 : 1, this;
|
|
966
966
|
}
|
|
@@ -974,33 +974,33 @@
|
|
|
974
974
|
_.prototype.clear = xs$1;
|
|
975
975
|
_.prototype.delete = Ts$1;
|
|
976
976
|
_.prototype.get = Os$1;
|
|
977
|
-
_.prototype.has =
|
|
978
|
-
_.prototype.set = $
|
|
977
|
+
_.prototype.has = $s$1;
|
|
978
|
+
_.prototype.set = Ms$1;
|
|
979
979
|
var _s$1 = "Expected a function";
|
|
980
980
|
function Qe$2(r, e) {
|
|
981
981
|
if (typeof r != "function" || e != null && typeof e != "function")
|
|
982
982
|
throw new TypeError(_s$1);
|
|
983
983
|
var t = function() {
|
|
984
|
-
var n = arguments, s = e ? e.apply(this, n) : n[0],
|
|
985
|
-
if (
|
|
986
|
-
return
|
|
987
|
-
var
|
|
988
|
-
return t.cache =
|
|
984
|
+
var n = arguments, s = e ? e.apply(this, n) : n[0], o = t.cache;
|
|
985
|
+
if (o.has(s))
|
|
986
|
+
return o.get(s);
|
|
987
|
+
var i = r.apply(this, n);
|
|
988
|
+
return t.cache = o.set(s, i) || o, i;
|
|
989
989
|
};
|
|
990
990
|
return t.cache = new (Qe$2.Cache || _)(), t;
|
|
991
991
|
}
|
|
992
992
|
Qe$2.Cache = _;
|
|
993
993
|
var Cs$1 = 500;
|
|
994
|
-
function
|
|
994
|
+
function Ds$1(r) {
|
|
995
995
|
var e = Qe$2(r, function(n) {
|
|
996
996
|
return t.size === Cs$1 && t.clear(), n;
|
|
997
997
|
}), t = e.cache;
|
|
998
998
|
return e;
|
|
999
999
|
}
|
|
1000
|
-
var
|
|
1000
|
+
var Is$1 = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Es$1 = /\\(\\)?/g, Qs$1 = Ds$1(function(r) {
|
|
1001
1001
|
var e = [];
|
|
1002
|
-
return r.charCodeAt(0) === 46 && e.push(""), r.replace(
|
|
1003
|
-
e.push(s ?
|
|
1002
|
+
return r.charCodeAt(0) === 46 && e.push(""), r.replace(Is$1, function(t, n, s, o) {
|
|
1003
|
+
e.push(s ? o.replace(Es$1, "$1") : n || t);
|
|
1004
1004
|
}), e;
|
|
1005
1005
|
});
|
|
1006
1006
|
function Ns$1(r) {
|
|
@@ -1010,7 +1010,7 @@
|
|
|
1010
1010
|
return v$2(r) ? r : Ee$2(r, e) ? [r] : Qs$1(Ns$1(r));
|
|
1011
1011
|
}
|
|
1012
1012
|
function de$1(r) {
|
|
1013
|
-
if (typeof r == "string" || F$
|
|
1013
|
+
if (typeof r == "string" || F$1(r))
|
|
1014
1014
|
return r;
|
|
1015
1015
|
var e = r + "";
|
|
1016
1016
|
return e == "0" && 1 / r == -1 / 0 ? "-0" : e;
|
|
@@ -1032,22 +1032,22 @@
|
|
|
1032
1032
|
}
|
|
1033
1033
|
var Je$3 = x$2 ? x$2.isConcatSpreadable : void 0;
|
|
1034
1034
|
function js$1(r) {
|
|
1035
|
-
return v$2(r) ||
|
|
1035
|
+
return v$2(r) || Ie$2(r) || !!(Je$3 && r && r[Je$3]);
|
|
1036
1036
|
}
|
|
1037
1037
|
function qs$1(r, e, t, n, s) {
|
|
1038
|
-
var
|
|
1039
|
-
for (t || (t = js$1), s || (s = []); ++
|
|
1040
|
-
var a = r[
|
|
1038
|
+
var o = -1, i = r.length;
|
|
1039
|
+
for (t || (t = js$1), s || (s = []); ++o < i; ) {
|
|
1040
|
+
var a = r[o];
|
|
1041
1041
|
t(a) && qt$1(s, a);
|
|
1042
1042
|
}
|
|
1043
1043
|
return s;
|
|
1044
1044
|
}
|
|
1045
|
-
var Ks$1 = Qt$1(Object.getPrototypeOf, Object), Ps$1 = "\\ud800-\\udfff", Rs$1 = "\\u0300-\\u036f", Fs$1 = "\\ufe20-\\ufe2f",
|
|
1045
|
+
var Ks$1 = Qt$1(Object.getPrototypeOf, Object), Ps$1 = "\\ud800-\\udfff", Rs$1 = "\\u0300-\\u036f", Fs$1 = "\\ufe20-\\ufe2f", Gs$1 = "\\u20d0-\\u20ff", ks$1 = Rs$1 + Fs$1 + Gs$1, Ls$1 = "\\ufe0e\\ufe0f", zs$1 = "\\u200d", Bs$1 = RegExp("[" + zs$1 + Ps$1 + ks$1 + Ls$1 + "]");
|
|
1046
1046
|
function Us$1(r) {
|
|
1047
1047
|
return Bs$1.test(r);
|
|
1048
1048
|
}
|
|
1049
1049
|
function Hs$1() {
|
|
1050
|
-
this.__data__ = new
|
|
1050
|
+
this.__data__ = new M$3(), this.size = 0;
|
|
1051
1051
|
}
|
|
1052
1052
|
function Ws$1(r) {
|
|
1053
1053
|
var e = this.__data__, t = e.delete(r);
|
|
@@ -1062,7 +1062,7 @@
|
|
|
1062
1062
|
var Js$1 = 200;
|
|
1063
1063
|
function Xs$1(r, e) {
|
|
1064
1064
|
var t = this.__data__;
|
|
1065
|
-
if (t instanceof
|
|
1065
|
+
if (t instanceof M$3) {
|
|
1066
1066
|
var n = t.__data__;
|
|
1067
1067
|
if (!H$1 || n.length < Js$1 - 1)
|
|
1068
1068
|
return n.push([r, e]), this.size = ++t.size, this;
|
|
@@ -1071,7 +1071,7 @@
|
|
|
1071
1071
|
return t.set(r, e), this.size = t.size, this;
|
|
1072
1072
|
}
|
|
1073
1073
|
function T$2(r) {
|
|
1074
|
-
var e = this.__data__ = new
|
|
1074
|
+
var e = this.__data__ = new M$3(r);
|
|
1075
1075
|
this.size = e.size;
|
|
1076
1076
|
}
|
|
1077
1077
|
T$2.prototype.clear = Hs$1;
|
|
@@ -1079,172 +1079,172 @@
|
|
|
1079
1079
|
T$2.prototype.get = Vs$1;
|
|
1080
1080
|
T$2.prototype.has = Zs$1;
|
|
1081
1081
|
T$2.prototype.set = Xs$1;
|
|
1082
|
-
var Kt$1 = typeof exports == "object" && exports && !exports.nodeType && exports, Xe$2 = Kt$1 && typeof module == "object" && module && !module.nodeType && module, Ys$1 = Xe$2 && Xe$2.exports === Kt$1, Ye$2 = Ys$1 ?
|
|
1083
|
-
function
|
|
1082
|
+
var Kt$1 = typeof exports == "object" && exports && !exports.nodeType && exports, Xe$2 = Kt$1 && typeof module == "object" && module && !module.nodeType && module, Ys$1 = Xe$2 && Xe$2.exports === Kt$1, Ye$2 = Ys$1 ? $$2.Buffer : void 0, et$2 = Ye$2 ? Ye$2.allocUnsafe : void 0;
|
|
1083
|
+
function eo$1(r, e) {
|
|
1084
1084
|
if (e)
|
|
1085
1085
|
return r.slice();
|
|
1086
1086
|
var t = r.length, n = et$2 ? et$2(t) : new r.constructor(t);
|
|
1087
1087
|
return r.copy(n), n;
|
|
1088
1088
|
}
|
|
1089
|
-
function
|
|
1090
|
-
for (var t = -1, n = r == null ? 0 : r.length, s = 0,
|
|
1091
|
-
var
|
|
1092
|
-
e(
|
|
1089
|
+
function to$1(r, e) {
|
|
1090
|
+
for (var t = -1, n = r == null ? 0 : r.length, s = 0, o = []; ++t < n; ) {
|
|
1091
|
+
var i = r[t];
|
|
1092
|
+
e(i, t, r) && (o[s++] = i);
|
|
1093
1093
|
}
|
|
1094
|
-
return
|
|
1094
|
+
return o;
|
|
1095
1095
|
}
|
|
1096
|
-
function
|
|
1096
|
+
function ro$1() {
|
|
1097
1097
|
return [];
|
|
1098
1098
|
}
|
|
1099
|
-
var
|
|
1100
|
-
return r == null ? [] : (r = Object(r),
|
|
1101
|
-
return
|
|
1099
|
+
var no$1 = Object.prototype, so$1 = no$1.propertyIsEnumerable, tt$2 = Object.getOwnPropertySymbols, oo$1 = tt$2 ? function(r) {
|
|
1100
|
+
return r == null ? [] : (r = Object(r), to$1(tt$2(r), function(e) {
|
|
1101
|
+
return so$1.call(r, e);
|
|
1102
1102
|
}));
|
|
1103
|
-
} :
|
|
1104
|
-
function
|
|
1103
|
+
} : ro$1;
|
|
1104
|
+
function io$1(r, e, t) {
|
|
1105
1105
|
var n = e(r);
|
|
1106
1106
|
return v$2(r) ? n : qt$1(n, t(r));
|
|
1107
1107
|
}
|
|
1108
1108
|
function we$2(r) {
|
|
1109
|
-
return
|
|
1109
|
+
return io$1(r, ce$1, oo$1);
|
|
1110
1110
|
}
|
|
1111
|
-
var Ae$2 = q(
|
|
1112
|
-
(Ae$2 && A$1(new Ae$2(new ArrayBuffer(1))) !=
|
|
1113
|
-
var e = N$
|
|
1111
|
+
var Ae$2 = q$1($$2, "DataView"), xe$2 = q$1($$2, "Promise"), Se$2 = q$1($$2, "Set"), rt$2 = "[object Map]", ao$1 = "[object Object]", nt$2 = "[object Promise]", st$2 = "[object Set]", ot$2 = "[object WeakMap]", it$2 = "[object DataView]", uo$1 = j$2(Ae$2), co$1 = j$2(H$1), fo$1 = j$2(xe$2), lo$1 = j$2(Se$2), ho$1 = j$2(ve$1), A$1 = N$3;
|
|
1112
|
+
(Ae$2 && A$1(new Ae$2(new ArrayBuffer(1))) != it$2 || H$1 && A$1(new H$1()) != rt$2 || xe$2 && A$1(xe$2.resolve()) != nt$2 || Se$2 && A$1(new Se$2()) != st$2 || ve$1 && A$1(new ve$1()) != ot$2) && (A$1 = function(r) {
|
|
1113
|
+
var e = N$3(r), t = e == ao$1 ? r.constructor : void 0, n = t ? j$2(t) : "";
|
|
1114
1114
|
if (n)
|
|
1115
1115
|
switch (n) {
|
|
1116
|
-
case
|
|
1117
|
-
return
|
|
1118
|
-
case
|
|
1116
|
+
case uo$1:
|
|
1117
|
+
return it$2;
|
|
1118
|
+
case co$1:
|
|
1119
1119
|
return rt$2;
|
|
1120
|
-
case
|
|
1120
|
+
case fo$1:
|
|
1121
1121
|
return nt$2;
|
|
1122
|
-
case
|
|
1122
|
+
case lo$1:
|
|
1123
1123
|
return st$2;
|
|
1124
|
-
case
|
|
1125
|
-
return
|
|
1124
|
+
case ho$1:
|
|
1125
|
+
return ot$2;
|
|
1126
1126
|
}
|
|
1127
1127
|
return e;
|
|
1128
1128
|
});
|
|
1129
|
-
var
|
|
1130
|
-
function
|
|
1129
|
+
var po$1 = Object.prototype, go$1 = po$1.hasOwnProperty;
|
|
1130
|
+
function yo$1(r) {
|
|
1131
1131
|
var e = r.length, t = new r.constructor(e);
|
|
1132
|
-
return e && typeof r[0] == "string" &&
|
|
1132
|
+
return e && typeof r[0] == "string" && go$1.call(r, "index") && (t.index = r.index, t.input = r.input), t;
|
|
1133
1133
|
}
|
|
1134
|
-
var ae$2 =
|
|
1134
|
+
var ae$2 = $$2.Uint8Array;
|
|
1135
1135
|
function je$2(r) {
|
|
1136
1136
|
var e = new r.constructor(r.byteLength);
|
|
1137
1137
|
return new ae$2(e).set(new ae$2(r)), e;
|
|
1138
1138
|
}
|
|
1139
|
-
function
|
|
1139
|
+
function mo$1(r, e) {
|
|
1140
1140
|
var t = je$2(r.buffer);
|
|
1141
1141
|
return new r.constructor(t, r.byteOffset, r.byteLength);
|
|
1142
1142
|
}
|
|
1143
|
-
var
|
|
1144
|
-
function
|
|
1145
|
-
var e = new r.constructor(r.source,
|
|
1143
|
+
var bo$1 = /\w*$/;
|
|
1144
|
+
function vo$1(r) {
|
|
1145
|
+
var e = new r.constructor(r.source, bo$1.exec(r));
|
|
1146
1146
|
return e.lastIndex = r.lastIndex, e;
|
|
1147
1147
|
}
|
|
1148
1148
|
var at$3 = x$2 ? x$2.prototype : void 0, ut$1 = at$3 ? at$3.valueOf : void 0;
|
|
1149
|
-
function
|
|
1149
|
+
function wo$1(r) {
|
|
1150
1150
|
return ut$1 ? Object(ut$1.call(r)) : {};
|
|
1151
1151
|
}
|
|
1152
|
-
function
|
|
1152
|
+
function Ao$1(r, e) {
|
|
1153
1153
|
var t = e ? je$2(r.buffer) : r.buffer;
|
|
1154
1154
|
return new r.constructor(t, r.byteOffset, r.length);
|
|
1155
1155
|
}
|
|
1156
|
-
var
|
|
1157
|
-
function
|
|
1156
|
+
var xo$1 = "[object Boolean]", So$1 = "[object Date]", To$1 = "[object Map]", Oo$1 = "[object Number]", $o$1 = "[object RegExp]", Mo = "[object Set]", _o$1 = "[object String]", Co$1 = "[object Symbol]", Do = "[object ArrayBuffer]", Io$1 = "[object DataView]", Eo$1 = "[object Float32Array]", Qo = "[object Float64Array]", No = "[object Int8Array]", jo$1 = "[object Int16Array]", qo = "[object Int32Array]", Ko = "[object Uint8Array]", Po$1 = "[object Uint8ClampedArray]", Ro$1 = "[object Uint16Array]", Fo$1 = "[object Uint32Array]";
|
|
1157
|
+
function Go(r, e, t) {
|
|
1158
1158
|
var n = r.constructor;
|
|
1159
1159
|
switch (e) {
|
|
1160
|
-
case
|
|
1160
|
+
case Do:
|
|
1161
1161
|
return je$2(r);
|
|
1162
|
-
case
|
|
1163
|
-
case
|
|
1162
|
+
case xo$1:
|
|
1163
|
+
case So$1:
|
|
1164
1164
|
return new n(+r);
|
|
1165
|
-
case
|
|
1166
|
-
return
|
|
1167
|
-
case
|
|
1168
|
-
case
|
|
1169
|
-
case
|
|
1170
|
-
case
|
|
1171
|
-
case
|
|
1172
|
-
case
|
|
1173
|
-
case
|
|
1174
|
-
case
|
|
1175
|
-
case
|
|
1176
|
-
return
|
|
1177
|
-
case
|
|
1165
|
+
case Io$1:
|
|
1166
|
+
return mo$1(r);
|
|
1167
|
+
case Eo$1:
|
|
1168
|
+
case Qo:
|
|
1169
|
+
case No:
|
|
1170
|
+
case jo$1:
|
|
1171
|
+
case qo:
|
|
1172
|
+
case Ko:
|
|
1173
|
+
case Po$1:
|
|
1174
|
+
case Ro$1:
|
|
1175
|
+
case Fo$1:
|
|
1176
|
+
return Ao$1(r, t);
|
|
1177
|
+
case To$1:
|
|
1178
1178
|
return new n();
|
|
1179
|
-
case
|
|
1180
|
-
case $
|
|
1179
|
+
case Oo$1:
|
|
1180
|
+
case _o$1:
|
|
1181
1181
|
return new n(r);
|
|
1182
|
-
case
|
|
1183
|
-
return
|
|
1184
|
-
case
|
|
1182
|
+
case $o$1:
|
|
1183
|
+
return vo$1(r);
|
|
1184
|
+
case Mo:
|
|
1185
1185
|
return new n();
|
|
1186
|
-
case
|
|
1187
|
-
return
|
|
1186
|
+
case Co$1:
|
|
1187
|
+
return wo$1(r);
|
|
1188
1188
|
}
|
|
1189
1189
|
}
|
|
1190
|
-
function
|
|
1190
|
+
function ko$1(r) {
|
|
1191
1191
|
return typeof r.constructor == "function" && !_t$1(r) ? Ur$1(Ks$1(r)) : {};
|
|
1192
1192
|
}
|
|
1193
|
-
var
|
|
1194
|
-
function
|
|
1195
|
-
return O$2(r) && A$1(r) ==
|
|
1193
|
+
var Lo$1 = "[object Map]";
|
|
1194
|
+
function zo(r) {
|
|
1195
|
+
return O$2(r) && A$1(r) == Lo$1;
|
|
1196
1196
|
}
|
|
1197
|
-
var ct$3 =
|
|
1198
|
-
function
|
|
1199
|
-
return O$2(r) && A$1(r) ==
|
|
1197
|
+
var ct$3 = G$1 && G$1.isMap, Bo = ct$3 ? J$2(ct$3) : zo, Uo = "[object Set]";
|
|
1198
|
+
function Ho(r) {
|
|
1199
|
+
return O$2(r) && A$1(r) == Uo;
|
|
1200
1200
|
}
|
|
1201
|
-
var ft$1 =
|
|
1202
|
-
y$1[Pt$1] = y$1[
|
|
1203
|
-
y$1[
|
|
1204
|
-
function se$1(r, e, t, n, s,
|
|
1205
|
-
var
|
|
1206
|
-
if (
|
|
1207
|
-
return
|
|
1208
|
-
if (!E$
|
|
1201
|
+
var ft$1 = G$1 && G$1.isSet, Wo = ft$1 ? J$2(ft$1) : Ho, Vo$1 = 1, Pt$1 = "[object Arguments]", Zo = "[object Array]", Jo = "[object Boolean]", Xo = "[object Date]", Yo = "[object Error]", Rt$1 = "[object Function]", ei = "[object GeneratorFunction]", ti = "[object Map]", ri = "[object Number]", Ft$1 = "[object Object]", ni = "[object RegExp]", si = "[object Set]", oi = "[object String]", ii = "[object Symbol]", ai = "[object WeakMap]", ui = "[object ArrayBuffer]", ci = "[object DataView]", fi = "[object Float32Array]", li = "[object Float64Array]", di = "[object Int8Array]", hi = "[object Int16Array]", pi = "[object Int32Array]", gi = "[object Uint8Array]", yi = "[object Uint8ClampedArray]", mi = "[object Uint16Array]", bi = "[object Uint32Array]", y$1 = {};
|
|
1202
|
+
y$1[Pt$1] = y$1[Zo] = y$1[ui] = y$1[ci] = y$1[Jo] = y$1[Xo] = y$1[fi] = y$1[li] = y$1[di] = y$1[hi] = y$1[pi] = y$1[ti] = y$1[ri] = y$1[Ft$1] = y$1[ni] = y$1[si] = y$1[oi] = y$1[ii] = y$1[gi] = y$1[yi] = y$1[mi] = y$1[bi] = true;
|
|
1203
|
+
y$1[Yo] = y$1[Rt$1] = y$1[ai] = false;
|
|
1204
|
+
function se$1(r, e, t, n, s, o) {
|
|
1205
|
+
var i, a = e & Vo$1;
|
|
1206
|
+
if (i !== void 0)
|
|
1207
|
+
return i;
|
|
1208
|
+
if (!E$4(r))
|
|
1209
1209
|
return r;
|
|
1210
1210
|
var u = v$2(r);
|
|
1211
1211
|
if (u)
|
|
1212
|
-
|
|
1212
|
+
i = yo$1(r);
|
|
1213
1213
|
else {
|
|
1214
|
-
var c = A$1(r), f = c == Rt$1 || c ==
|
|
1215
|
-
if (
|
|
1216
|
-
return
|
|
1214
|
+
var c = A$1(r), f = c == Rt$1 || c == ei;
|
|
1215
|
+
if (ie$1(r))
|
|
1216
|
+
return eo$1(r, a);
|
|
1217
1217
|
if (c == Ft$1 || c == Pt$1 || f && !s)
|
|
1218
|
-
|
|
1218
|
+
i = f ? {} : ko$1(r);
|
|
1219
1219
|
else {
|
|
1220
1220
|
if (!y$1[c])
|
|
1221
1221
|
return s ? r : {};
|
|
1222
|
-
|
|
1222
|
+
i = Go(r, c, a);
|
|
1223
1223
|
}
|
|
1224
1224
|
}
|
|
1225
|
-
|
|
1226
|
-
var l =
|
|
1225
|
+
o || (o = new T$2());
|
|
1226
|
+
var l = o.get(r);
|
|
1227
1227
|
if (l)
|
|
1228
1228
|
return l;
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
}) :
|
|
1232
|
-
|
|
1229
|
+
o.set(r, i), Wo(r) ? r.forEach(function(p2) {
|
|
1230
|
+
i.add(se$1(p2, e, t, p2, r, o));
|
|
1231
|
+
}) : Bo(r) && r.forEach(function(p2, g2) {
|
|
1232
|
+
i.set(g2, se$1(p2, e, t, g2, r, o));
|
|
1233
1233
|
});
|
|
1234
1234
|
var d = we$2, h = u ? void 0 : d(r);
|
|
1235
1235
|
return tn$1(h || r, function(p2, g2) {
|
|
1236
|
-
h && (g2 = p2, p2 = r[g2]), dn$1(
|
|
1237
|
-
}),
|
|
1236
|
+
h && (g2 = p2, p2 = r[g2]), dn$1(i, g2, se$1(p2, e, t, g2, r, o));
|
|
1237
|
+
}), i;
|
|
1238
1238
|
}
|
|
1239
|
-
var
|
|
1239
|
+
var vi = 1, wi = 4;
|
|
1240
1240
|
function C$2(r) {
|
|
1241
|
-
return se$1(r,
|
|
1241
|
+
return se$1(r, vi | wi);
|
|
1242
1242
|
}
|
|
1243
|
-
var
|
|
1244
|
-
function
|
|
1245
|
-
return this.__data__.set(r,
|
|
1243
|
+
var Ai = "__lodash_hash_undefined__";
|
|
1244
|
+
function xi(r) {
|
|
1245
|
+
return this.__data__.set(r, Ai), this;
|
|
1246
1246
|
}
|
|
1247
|
-
function
|
|
1247
|
+
function Si(r) {
|
|
1248
1248
|
return this.__data__.has(r);
|
|
1249
1249
|
}
|
|
1250
1250
|
function V$1(r) {
|
|
@@ -1252,30 +1252,30 @@
|
|
|
1252
1252
|
for (this.__data__ = new _(); ++e < t; )
|
|
1253
1253
|
this.add(r[e]);
|
|
1254
1254
|
}
|
|
1255
|
-
V$1.prototype.add = V$1.prototype.push =
|
|
1256
|
-
V$1.prototype.has =
|
|
1257
|
-
function
|
|
1255
|
+
V$1.prototype.add = V$1.prototype.push = xi;
|
|
1256
|
+
V$1.prototype.has = Si;
|
|
1257
|
+
function Ti(r, e) {
|
|
1258
1258
|
for (var t = -1, n = r == null ? 0 : r.length; ++t < n; )
|
|
1259
1259
|
if (e(r[t], t, r))
|
|
1260
1260
|
return true;
|
|
1261
1261
|
return false;
|
|
1262
1262
|
}
|
|
1263
|
-
function
|
|
1263
|
+
function Gt$1(r, e) {
|
|
1264
1264
|
return r.has(e);
|
|
1265
1265
|
}
|
|
1266
|
-
var
|
|
1267
|
-
function
|
|
1268
|
-
var
|
|
1269
|
-
if (a != u && !(
|
|
1266
|
+
var Oi = 1, $i = 2;
|
|
1267
|
+
function kt$1(r, e, t, n, s, o) {
|
|
1268
|
+
var i = t & Oi, a = r.length, u = e.length;
|
|
1269
|
+
if (a != u && !(i && u > a))
|
|
1270
1270
|
return false;
|
|
1271
|
-
var c =
|
|
1271
|
+
var c = o.get(r), f = o.get(e);
|
|
1272
1272
|
if (c && f)
|
|
1273
1273
|
return c == e && f == r;
|
|
1274
|
-
var l = -1, d = true, h = t &
|
|
1275
|
-
for (
|
|
1274
|
+
var l = -1, d = true, h = t & $i ? new V$1() : void 0;
|
|
1275
|
+
for (o.set(r, e), o.set(e, r); ++l < a; ) {
|
|
1276
1276
|
var p2 = r[l], g2 = e[l];
|
|
1277
1277
|
if (n)
|
|
1278
|
-
var w =
|
|
1278
|
+
var w = i ? n(g2, p2, l, e, r, o) : n(p2, g2, l, r, e, o);
|
|
1279
1279
|
if (w !== void 0) {
|
|
1280
1280
|
if (w)
|
|
1281
1281
|
continue;
|
|
@@ -1283,89 +1283,89 @@
|
|
|
1283
1283
|
break;
|
|
1284
1284
|
}
|
|
1285
1285
|
if (h) {
|
|
1286
|
-
if (!
|
|
1287
|
-
if (!
|
|
1288
|
-
return h.push(
|
|
1286
|
+
if (!Ti(e, function(D2, I) {
|
|
1287
|
+
if (!Gt$1(h, I) && (p2 === D2 || s(p2, D2, t, n, o)))
|
|
1288
|
+
return h.push(I);
|
|
1289
1289
|
})) {
|
|
1290
1290
|
d = false;
|
|
1291
1291
|
break;
|
|
1292
1292
|
}
|
|
1293
|
-
} else if (!(p2 === g2 || s(p2, g2, t, n,
|
|
1293
|
+
} else if (!(p2 === g2 || s(p2, g2, t, n, o))) {
|
|
1294
1294
|
d = false;
|
|
1295
1295
|
break;
|
|
1296
1296
|
}
|
|
1297
1297
|
}
|
|
1298
|
-
return
|
|
1298
|
+
return o.delete(r), o.delete(e), d;
|
|
1299
1299
|
}
|
|
1300
|
-
function
|
|
1300
|
+
function Mi(r) {
|
|
1301
1301
|
var e = -1, t = Array(r.size);
|
|
1302
1302
|
return r.forEach(function(n, s) {
|
|
1303
1303
|
t[++e] = [s, n];
|
|
1304
1304
|
}), t;
|
|
1305
1305
|
}
|
|
1306
|
-
function
|
|
1306
|
+
function _i(r) {
|
|
1307
1307
|
var e = -1, t = Array(r.size);
|
|
1308
1308
|
return r.forEach(function(n) {
|
|
1309
1309
|
t[++e] = n;
|
|
1310
1310
|
}), t;
|
|
1311
1311
|
}
|
|
1312
|
-
var
|
|
1313
|
-
function
|
|
1312
|
+
var Ci = 1, Di = 2, Ii = "[object Boolean]", Ei = "[object Date]", Qi = "[object Error]", Ni = "[object Map]", ji = "[object Number]", qi = "[object RegExp]", Ki = "[object Set]", Pi = "[object String]", Ri = "[object Symbol]", Fi = "[object ArrayBuffer]", Gi = "[object DataView]", lt$3 = x$2 ? x$2.prototype : void 0, ge = lt$3 ? lt$3.valueOf : void 0;
|
|
1313
|
+
function ki(r, e, t, n, s, o, i) {
|
|
1314
1314
|
switch (t) {
|
|
1315
|
-
case
|
|
1315
|
+
case Gi:
|
|
1316
1316
|
if (r.byteLength != e.byteLength || r.byteOffset != e.byteOffset)
|
|
1317
1317
|
return false;
|
|
1318
1318
|
r = r.buffer, e = e.buffer;
|
|
1319
|
-
case
|
|
1320
|
-
return !(r.byteLength != e.byteLength || !
|
|
1321
|
-
case
|
|
1322
|
-
case
|
|
1323
|
-
case
|
|
1319
|
+
case Fi:
|
|
1320
|
+
return !(r.byteLength != e.byteLength || !o(new ae$2(r), new ae$2(e)));
|
|
1321
|
+
case Ii:
|
|
1322
|
+
case Ei:
|
|
1323
|
+
case ji:
|
|
1324
1324
|
return Ce$2(+r, +e);
|
|
1325
|
-
case
|
|
1325
|
+
case Qi:
|
|
1326
1326
|
return r.name == e.name && r.message == e.message;
|
|
1327
|
-
case
|
|
1328
|
-
case
|
|
1327
|
+
case qi:
|
|
1328
|
+
case Pi:
|
|
1329
1329
|
return r == e + "";
|
|
1330
|
-
case
|
|
1331
|
-
var a =
|
|
1332
|
-
case
|
|
1333
|
-
var u = n &
|
|
1334
|
-
if (a || (a =
|
|
1330
|
+
case Ni:
|
|
1331
|
+
var a = Mi;
|
|
1332
|
+
case Ki:
|
|
1333
|
+
var u = n & Ci;
|
|
1334
|
+
if (a || (a = _i), r.size != e.size && !u)
|
|
1335
1335
|
return false;
|
|
1336
|
-
var c =
|
|
1336
|
+
var c = i.get(r);
|
|
1337
1337
|
if (c)
|
|
1338
1338
|
return c == e;
|
|
1339
|
-
n |=
|
|
1340
|
-
var f =
|
|
1341
|
-
return
|
|
1342
|
-
case
|
|
1339
|
+
n |= Di, i.set(r, e);
|
|
1340
|
+
var f = kt$1(a(r), a(e), n, s, o, i);
|
|
1341
|
+
return i.delete(r), f;
|
|
1342
|
+
case Ri:
|
|
1343
1343
|
if (ge)
|
|
1344
1344
|
return ge.call(r) == ge.call(e);
|
|
1345
1345
|
}
|
|
1346
1346
|
return false;
|
|
1347
1347
|
}
|
|
1348
|
-
var
|
|
1349
|
-
function
|
|
1350
|
-
var
|
|
1351
|
-
if (u != f && !
|
|
1348
|
+
var Li = 1, zi = Object.prototype, Bi = zi.hasOwnProperty;
|
|
1349
|
+
function Ui(r, e, t, n, s, o) {
|
|
1350
|
+
var i = t & Li, a = we$2(r), u = a.length, c = we$2(e), f = c.length;
|
|
1351
|
+
if (u != f && !i)
|
|
1352
1352
|
return false;
|
|
1353
1353
|
for (var l = u; l--; ) {
|
|
1354
1354
|
var d = a[l];
|
|
1355
|
-
if (!(
|
|
1355
|
+
if (!(i ? d in e : Bi.call(e, d)))
|
|
1356
1356
|
return false;
|
|
1357
1357
|
}
|
|
1358
|
-
var h =
|
|
1358
|
+
var h = o.get(r), p2 = o.get(e);
|
|
1359
1359
|
if (h && p2)
|
|
1360
1360
|
return h == e && p2 == r;
|
|
1361
1361
|
var g2 = true;
|
|
1362
|
-
|
|
1363
|
-
for (var w =
|
|
1362
|
+
o.set(r, e), o.set(e, r);
|
|
1363
|
+
for (var w = i; ++l < u; ) {
|
|
1364
1364
|
d = a[l];
|
|
1365
|
-
var
|
|
1365
|
+
var D2 = r[d], I = e[d];
|
|
1366
1366
|
if (n)
|
|
1367
|
-
var Pe2 =
|
|
1368
|
-
if (!(Pe2 === void 0 ?
|
|
1367
|
+
var Pe2 = i ? n(I, D2, d, e, r, o) : n(D2, I, d, r, e, o);
|
|
1368
|
+
if (!(Pe2 === void 0 ? D2 === I || s(D2, I, t, n, o) : Pe2)) {
|
|
1369
1369
|
g2 = false;
|
|
1370
1370
|
break;
|
|
1371
1371
|
}
|
|
@@ -1375,58 +1375,58 @@
|
|
|
1375
1375
|
var ee2 = r.constructor, te2 = e.constructor;
|
|
1376
1376
|
ee2 != te2 && "constructor" in r && "constructor" in e && !(typeof ee2 == "function" && ee2 instanceof ee2 && typeof te2 == "function" && te2 instanceof te2) && (g2 = false);
|
|
1377
1377
|
}
|
|
1378
|
-
return
|
|
1378
|
+
return o.delete(r), o.delete(e), g2;
|
|
1379
1379
|
}
|
|
1380
|
-
var
|
|
1381
|
-
function
|
|
1382
|
-
var
|
|
1380
|
+
var Hi = 1, dt$3 = "[object Arguments]", ht = "[object Array]", re$2 = "[object Object]", Wi = Object.prototype, pt$1 = Wi.hasOwnProperty;
|
|
1381
|
+
function Vi(r, e, t, n, s, o) {
|
|
1382
|
+
var i = v$2(r), a = v$2(e), u = i ? ht : A$1(r), c = a ? ht : A$1(e);
|
|
1383
1383
|
u = u == dt$3 ? re$2 : u, c = c == dt$3 ? re$2 : c;
|
|
1384
1384
|
var f = u == re$2, l = c == re$2, d = u == c;
|
|
1385
|
-
if (d &&
|
|
1386
|
-
if (!
|
|
1385
|
+
if (d && ie$1(r)) {
|
|
1386
|
+
if (!ie$1(e))
|
|
1387
1387
|
return false;
|
|
1388
|
-
|
|
1388
|
+
i = true, f = false;
|
|
1389
1389
|
}
|
|
1390
1390
|
if (d && !f)
|
|
1391
|
-
return
|
|
1392
|
-
if (!(t &
|
|
1391
|
+
return o || (o = new T$2()), i || Et$1(r) ? kt$1(r, e, t, n, s, o) : ki(r, e, u, t, n, s, o);
|
|
1392
|
+
if (!(t & Hi)) {
|
|
1393
1393
|
var h = f && pt$1.call(r, "__wrapped__"), p2 = l && pt$1.call(e, "__wrapped__");
|
|
1394
1394
|
if (h || p2) {
|
|
1395
1395
|
var g2 = h ? r.value() : r, w = p2 ? e.value() : e;
|
|
1396
|
-
return
|
|
1396
|
+
return o || (o = new T$2()), s(g2, w, t, n, o);
|
|
1397
1397
|
}
|
|
1398
1398
|
}
|
|
1399
|
-
return d ? (
|
|
1399
|
+
return d ? (o || (o = new T$2()), Ui(r, e, t, n, s, o)) : false;
|
|
1400
1400
|
}
|
|
1401
1401
|
function X$2(r, e, t, n, s) {
|
|
1402
|
-
return r === e ? true : r == null || e == null || !O$2(r) && !O$2(e) ? r !== r && e !== e :
|
|
1402
|
+
return r === e ? true : r == null || e == null || !O$2(r) && !O$2(e) ? r !== r && e !== e : Vi(r, e, t, n, X$2, s);
|
|
1403
1403
|
}
|
|
1404
|
-
var
|
|
1404
|
+
var Zi = 1, Ji = 2;
|
|
1405
1405
|
function Lt$1(r, e, t, n) {
|
|
1406
|
-
var s = t.length,
|
|
1406
|
+
var s = t.length, o = s;
|
|
1407
1407
|
if (r == null)
|
|
1408
|
-
return !
|
|
1408
|
+
return !o;
|
|
1409
1409
|
for (r = Object(r); s--; ) {
|
|
1410
|
-
var
|
|
1411
|
-
if (
|
|
1410
|
+
var i = t[s];
|
|
1411
|
+
if (i[2] ? i[1] !== r[i[0]] : !(i[0] in r))
|
|
1412
1412
|
return false;
|
|
1413
1413
|
}
|
|
1414
|
-
for (; ++s <
|
|
1415
|
-
|
|
1416
|
-
var a =
|
|
1417
|
-
if (
|
|
1414
|
+
for (; ++s < o; ) {
|
|
1415
|
+
i = t[s];
|
|
1416
|
+
var a = i[0], u = r[a], c = i[1];
|
|
1417
|
+
if (i[2]) {
|
|
1418
1418
|
if (u === void 0 && !(a in r))
|
|
1419
1419
|
return false;
|
|
1420
1420
|
} else {
|
|
1421
1421
|
var f = new T$2(), l;
|
|
1422
|
-
if (!(l === void 0 ? X$2(c, u,
|
|
1422
|
+
if (!(l === void 0 ? X$2(c, u, Zi | Ji, n, f) : l))
|
|
1423
1423
|
return false;
|
|
1424
1424
|
}
|
|
1425
1425
|
}
|
|
1426
1426
|
return true;
|
|
1427
1427
|
}
|
|
1428
1428
|
function zt$1(r) {
|
|
1429
|
-
return r === r && !E$
|
|
1429
|
+
return r === r && !E$4(r);
|
|
1430
1430
|
}
|
|
1431
1431
|
function Bt$1(r) {
|
|
1432
1432
|
for (var e = ce$1(r), t = e.length; t--; ) {
|
|
@@ -1440,27 +1440,27 @@
|
|
|
1440
1440
|
return t == null ? false : t[r] === e && (e !== void 0 || r in Object(t));
|
|
1441
1441
|
};
|
|
1442
1442
|
}
|
|
1443
|
-
function
|
|
1443
|
+
function Xi(r) {
|
|
1444
1444
|
var e = Bt$1(r);
|
|
1445
1445
|
return e.length == 1 && e[0][2] ? Ut$1(e[0][0], e[0][1]) : function(t) {
|
|
1446
1446
|
return t === r || Lt$1(t, r, e);
|
|
1447
1447
|
};
|
|
1448
1448
|
}
|
|
1449
|
-
function
|
|
1449
|
+
function Yi(r, e) {
|
|
1450
1450
|
return r != null && e in Object(r);
|
|
1451
1451
|
}
|
|
1452
1452
|
function ea(r, e, t) {
|
|
1453
1453
|
e = jt$1(e, r);
|
|
1454
|
-
for (var n = -1, s = e.length,
|
|
1455
|
-
var
|
|
1456
|
-
if (!(
|
|
1454
|
+
for (var n = -1, s = e.length, o = false; ++n < s; ) {
|
|
1455
|
+
var i = de$1(e[n]);
|
|
1456
|
+
if (!(o = r != null && t(r, i)))
|
|
1457
1457
|
break;
|
|
1458
|
-
r = r[
|
|
1458
|
+
r = r[i];
|
|
1459
1459
|
}
|
|
1460
|
-
return
|
|
1460
|
+
return o || ++n != s ? o : (s = r == null ? 0 : r.length, !!s && De$2(s) && Mt$1(i, s) && (v$2(r) || Ie$2(r)));
|
|
1461
1461
|
}
|
|
1462
1462
|
function ta(r, e) {
|
|
1463
|
-
return r != null && ea(r, e,
|
|
1463
|
+
return r != null && ea(r, e, Yi);
|
|
1464
1464
|
}
|
|
1465
1465
|
var ra = 1, na = 2;
|
|
1466
1466
|
function sa(r, e) {
|
|
@@ -1474,22 +1474,22 @@
|
|
|
1474
1474
|
return e?.[r];
|
|
1475
1475
|
};
|
|
1476
1476
|
}
|
|
1477
|
-
function
|
|
1477
|
+
function oa(r) {
|
|
1478
1478
|
return function(e) {
|
|
1479
1479
|
return Ne$2(e, r);
|
|
1480
1480
|
};
|
|
1481
1481
|
}
|
|
1482
|
-
function
|
|
1483
|
-
return Ee$2(r) ? Ht$1(de$1(r)) :
|
|
1482
|
+
function ia(r) {
|
|
1483
|
+
return Ee$2(r) ? Ht$1(de$1(r)) : oa(r);
|
|
1484
1484
|
}
|
|
1485
1485
|
function Y$3(r) {
|
|
1486
|
-
return typeof r == "function" ? r : r == null ? ue$1 : typeof r == "object" ? v$2(r) ? sa(r[0], r[1]) :
|
|
1486
|
+
return typeof r == "function" ? r : r == null ? ue$1 : typeof r == "object" ? v$2(r) ? sa(r[0], r[1]) : Xi(r) : ia(r);
|
|
1487
1487
|
}
|
|
1488
1488
|
function aa(r) {
|
|
1489
1489
|
return function(e, t, n) {
|
|
1490
|
-
for (var s = -1,
|
|
1491
|
-
var u =
|
|
1492
|
-
if (t(
|
|
1490
|
+
for (var s = -1, o = Object(e), i = n(e), a = i.length; a--; ) {
|
|
1491
|
+
var u = i[++s];
|
|
1492
|
+
if (t(o[u], u, o) === false)
|
|
1493
1493
|
break;
|
|
1494
1494
|
}
|
|
1495
1495
|
return e;
|
|
@@ -1503,32 +1503,32 @@
|
|
|
1503
1503
|
return function(t, n) {
|
|
1504
1504
|
if (t == null)
|
|
1505
1505
|
return t;
|
|
1506
|
-
if (!
|
|
1506
|
+
if (!k$1(t))
|
|
1507
1507
|
return r(t, n);
|
|
1508
|
-
for (var s = t.length,
|
|
1508
|
+
for (var s = t.length, o = -1, i = Object(t); ++o < s && n(i[o], o, i) !== false; )
|
|
1509
1509
|
;
|
|
1510
1510
|
return t;
|
|
1511
1511
|
};
|
|
1512
1512
|
}
|
|
1513
1513
|
var Wt$1 = fa(ca);
|
|
1514
1514
|
function ye(r) {
|
|
1515
|
-
return O$2(r) &&
|
|
1515
|
+
return O$2(r) && k$1(r);
|
|
1516
1516
|
}
|
|
1517
1517
|
var la = 200;
|
|
1518
1518
|
function da(r, e, t, n) {
|
|
1519
|
-
var s = -1,
|
|
1519
|
+
var s = -1, o = on$1, i = true, a = r.length, u = [], c = e.length;
|
|
1520
1520
|
if (!a)
|
|
1521
1521
|
return u;
|
|
1522
|
-
t && (e = z$4(e, J$2(t))), e.length >= la && (
|
|
1522
|
+
t && (e = z$4(e, J$2(t))), e.length >= la && (o = Gt$1, i = false, e = new V$1(e));
|
|
1523
1523
|
e:
|
|
1524
1524
|
for (; ++s < a; ) {
|
|
1525
1525
|
var f = r[s], l = t == null ? f : t(f);
|
|
1526
|
-
if (f = f !== 0 ? f : 0,
|
|
1526
|
+
if (f = f !== 0 ? f : 0, i && l === l) {
|
|
1527
1527
|
for (var d = c; d--; )
|
|
1528
1528
|
if (e[d] === l)
|
|
1529
1529
|
continue e;
|
|
1530
1530
|
u.push(f);
|
|
1531
|
-
} else
|
|
1531
|
+
} else o(e, l, n) || u.push(f);
|
|
1532
1532
|
}
|
|
1533
1533
|
return u;
|
|
1534
1534
|
}
|
|
@@ -1548,8 +1548,8 @@
|
|
|
1548
1548
|
}
|
|
1549
1549
|
function ga(r, e) {
|
|
1550
1550
|
var t = true;
|
|
1551
|
-
return Wt$1(r, function(n, s,
|
|
1552
|
-
return t = !!e(n, s,
|
|
1551
|
+
return Wt$1(r, function(n, s, o) {
|
|
1552
|
+
return t = !!e(n, s, o), t;
|
|
1553
1553
|
}), t;
|
|
1554
1554
|
}
|
|
1555
1555
|
function Vt$1(r, e, t) {
|
|
@@ -1559,14 +1559,14 @@
|
|
|
1559
1559
|
function ya(r) {
|
|
1560
1560
|
return function(e, t, n) {
|
|
1561
1561
|
var s = Object(e);
|
|
1562
|
-
if (!
|
|
1563
|
-
var
|
|
1562
|
+
if (!k$1(e)) {
|
|
1563
|
+
var o = Y$3(t);
|
|
1564
1564
|
e = ce$1(e), t = function(a) {
|
|
1565
|
-
return
|
|
1565
|
+
return o(s[a], a, s);
|
|
1566
1566
|
};
|
|
1567
1567
|
}
|
|
1568
|
-
var
|
|
1569
|
-
return
|
|
1568
|
+
var i = r(e, t, n);
|
|
1569
|
+
return i > -1 ? s[o ? e[i] : i] : void 0;
|
|
1570
1570
|
};
|
|
1571
1571
|
}
|
|
1572
1572
|
var ma = Math.max;
|
|
@@ -1575,18 +1575,18 @@
|
|
|
1575
1575
|
if (!n)
|
|
1576
1576
|
return -1;
|
|
1577
1577
|
var s = t == null ? 0 : Cr$1(t);
|
|
1578
|
-
return s < 0 && (s = ma(n + s, 0)),
|
|
1578
|
+
return s < 0 && (s = ma(n + s, 0)), $t$1(r, Y$3(e), s);
|
|
1579
1579
|
}
|
|
1580
1580
|
var ba = ya(Te$2);
|
|
1581
1581
|
function va(r, e) {
|
|
1582
|
-
var t = -1, n =
|
|
1583
|
-
return Wt$1(r, function(s,
|
|
1584
|
-
n[++t] = e(s,
|
|
1582
|
+
var t = -1, n = k$1(r) ? Array(r.length) : [];
|
|
1583
|
+
return Wt$1(r, function(s, o, i) {
|
|
1584
|
+
n[++t] = e(s, o, i);
|
|
1585
1585
|
}), n;
|
|
1586
1586
|
}
|
|
1587
1587
|
var wa = "[object String]";
|
|
1588
1588
|
function Aa(r) {
|
|
1589
|
-
return typeof r == "string" || !v$2(r) && O$2(r) && N$
|
|
1589
|
+
return typeof r == "string" || !v$2(r) && O$2(r) && N$3(r) == wa;
|
|
1590
1590
|
}
|
|
1591
1591
|
function xa(r, e) {
|
|
1592
1592
|
return X$2(r, e);
|
|
@@ -1607,17 +1607,17 @@
|
|
|
1607
1607
|
}
|
|
1608
1608
|
function Ta(r, e) {
|
|
1609
1609
|
if (r !== e) {
|
|
1610
|
-
var t = r !== void 0, n = r === null, s = r === r,
|
|
1611
|
-
if (!a && !c && !
|
|
1610
|
+
var t = r !== void 0, n = r === null, s = r === r, o = F$1(r), i = e !== void 0, a = e === null, u = e === e, c = F$1(e);
|
|
1611
|
+
if (!a && !c && !o && r > e || o && i && u && !a && !c || n && i && u || !t && u || !s)
|
|
1612
1612
|
return 1;
|
|
1613
|
-
if (!n && !
|
|
1613
|
+
if (!n && !o && !c && r < e || c && t && s && !n && !o || a && t && s || !i && s || !u)
|
|
1614
1614
|
return -1;
|
|
1615
1615
|
}
|
|
1616
1616
|
return 0;
|
|
1617
1617
|
}
|
|
1618
1618
|
function Oa(r, e, t) {
|
|
1619
|
-
for (var n = -1, s = r.criteria,
|
|
1620
|
-
var u = Ta(s[n],
|
|
1619
|
+
for (var n = -1, s = r.criteria, o = e.criteria, i = s.length, a = t.length; ++n < i; ) {
|
|
1620
|
+
var u = Ta(s[n], o[n]);
|
|
1621
1621
|
if (u) {
|
|
1622
1622
|
if (n >= a)
|
|
1623
1623
|
return u;
|
|
@@ -1627,59 +1627,59 @@
|
|
|
1627
1627
|
}
|
|
1628
1628
|
return r.index - e.index;
|
|
1629
1629
|
}
|
|
1630
|
-
function
|
|
1631
|
-
e.length ? e = z$4(e, function(
|
|
1632
|
-
return v$2(
|
|
1633
|
-
return Ne$2(
|
|
1634
|
-
} :
|
|
1630
|
+
function $a(r, e, t) {
|
|
1631
|
+
e.length ? e = z$4(e, function(o) {
|
|
1632
|
+
return v$2(o) ? function(i) {
|
|
1633
|
+
return Ne$2(i, o.length === 1 ? o[0] : o);
|
|
1634
|
+
} : o;
|
|
1635
1635
|
}) : e = [ue$1];
|
|
1636
1636
|
var n = -1;
|
|
1637
1637
|
e = z$4(e, J$2(Y$3));
|
|
1638
|
-
var s = va(r, function(
|
|
1638
|
+
var s = va(r, function(o, i, a) {
|
|
1639
1639
|
var u = z$4(e, function(c) {
|
|
1640
|
-
return c(
|
|
1640
|
+
return c(o);
|
|
1641
1641
|
});
|
|
1642
|
-
return { criteria: u, index: ++n, value:
|
|
1642
|
+
return { criteria: u, index: ++n, value: o };
|
|
1643
1643
|
});
|
|
1644
|
-
return Sa(s, function(
|
|
1645
|
-
return Oa(
|
|
1644
|
+
return Sa(s, function(o, i) {
|
|
1645
|
+
return Oa(o, i, t);
|
|
1646
1646
|
});
|
|
1647
1647
|
}
|
|
1648
1648
|
function Ou(r, e, t, n) {
|
|
1649
|
-
return r == null ? [] : (v$2(e) || (e = e == null ? [] : [e]), t = t, v$2(t) || (t = t == null ? [] : [t]),
|
|
1649
|
+
return r == null ? [] : (v$2(e) || (e = e == null ? [] : [e]), t = t, v$2(t) || (t = t == null ? [] : [t]), $a(r, e, t));
|
|
1650
1650
|
}
|
|
1651
|
-
var
|
|
1651
|
+
var Ma = Ht$1("length"), Zt$1 = "\\ud800-\\udfff", _a = "\\u0300-\\u036f", Ca = "\\ufe20-\\ufe2f", Da = "\\u20d0-\\u20ff", Ia = _a + Ca + Da, Ea = "\\ufe0e\\ufe0f", Qa = "[" + Zt$1 + "]", Oe$3 = "[" + Ia + "]", $e$2 = "\\ud83c[\\udffb-\\udfff]", Na = "(?:" + Oe$3 + "|" + $e$2 + ")", Jt$1 = "[^" + Zt$1 + "]", Xt$1 = "(?:\\ud83c[\\udde6-\\uddff]){2}", Yt$1 = "[\\ud800-\\udbff][\\udc00-\\udfff]", ja = "\\u200d", er$1 = Na + "?", tr$1 = "[" + Ea + "]?", qa = "(?:" + ja + "(?:" + [Jt$1, Xt$1, Yt$1].join("|") + ")" + tr$1 + er$1 + ")*", Ka = tr$1 + er$1 + qa, Pa = "(?:" + [Jt$1 + Oe$3 + "?", Oe$3, Xt$1, Yt$1, Qa].join("|") + ")", mt = RegExp($e$2 + "(?=" + $e$2 + ")|" + Pa + Ka, "g");
|
|
1652
1652
|
function Ra(r) {
|
|
1653
1653
|
for (var e = mt.lastIndex = 0; mt.test(r); )
|
|
1654
1654
|
++e;
|
|
1655
1655
|
return e;
|
|
1656
1656
|
}
|
|
1657
1657
|
function Fa(r) {
|
|
1658
|
-
return Us$1(r) ? Ra(r) :
|
|
1658
|
+
return Us$1(r) ? Ra(r) : Ma(r);
|
|
1659
1659
|
}
|
|
1660
|
-
var
|
|
1660
|
+
var Ga = "[object Map]", ka = "[object Set]";
|
|
1661
1661
|
function La(r) {
|
|
1662
1662
|
if (r == null)
|
|
1663
1663
|
return 0;
|
|
1664
|
-
if (
|
|
1664
|
+
if (k$1(r))
|
|
1665
1665
|
return Aa(r) ? Fa(r) : r.length;
|
|
1666
1666
|
var e = A$1(r);
|
|
1667
|
-
return e ==
|
|
1667
|
+
return e == Ga || e == ka ? r.size : Nt$1(r).length;
|
|
1668
1668
|
}
|
|
1669
|
-
function qe$
|
|
1670
|
-
const e = $
|
|
1669
|
+
function qe$2(r) {
|
|
1670
|
+
const e = Me$2(r);
|
|
1671
1671
|
return za(e);
|
|
1672
1672
|
}
|
|
1673
|
-
function $
|
|
1673
|
+
function Me$2(r) {
|
|
1674
1674
|
if (typeof r != "object" || r === null)
|
|
1675
1675
|
return String(r);
|
|
1676
1676
|
if (Array.isArray(r))
|
|
1677
|
-
return "[" + r.map($
|
|
1677
|
+
return "[" + r.map(Me$2).join(",") + "]";
|
|
1678
1678
|
const e = Object.keys(r).sort();
|
|
1679
1679
|
let t = "{";
|
|
1680
1680
|
for (let n = 0; n < e.length; n++) {
|
|
1681
1681
|
const s = e[n];
|
|
1682
|
-
t += s + ":" + $
|
|
1682
|
+
t += s + ":" + Me$2(r[s]), n < e.length - 1 && (t += ",");
|
|
1683
1683
|
}
|
|
1684
1684
|
return t += "}", t;
|
|
1685
1685
|
}
|
|
@@ -1708,7 +1708,7 @@
|
|
|
1708
1708
|
return performance.getEntriesByType(r);
|
|
1709
1709
|
}
|
|
1710
1710
|
};
|
|
1711
|
-
class
|
|
1711
|
+
class $u {
|
|
1712
1712
|
data;
|
|
1713
1713
|
enabled = false;
|
|
1714
1714
|
constructor() {
|
|
@@ -1736,9 +1736,9 @@
|
|
|
1736
1736
|
const t = this.getKey(e.name, e.context), n = this.data.get(this.getKey(e.start, e.context)), s = this.data.get(this.getKey(e.end, e.context));
|
|
1737
1737
|
if (!n || !s)
|
|
1738
1738
|
return;
|
|
1739
|
-
const
|
|
1739
|
+
const o = s.value - n.value, i = Math.round(o * 100) / 100, a = this.data.get(t);
|
|
1740
1740
|
if (a && e.sum) {
|
|
1741
|
-
const c = a.value +
|
|
1741
|
+
const c = a.value + i, f = {
|
|
1742
1742
|
...a,
|
|
1743
1743
|
value: c
|
|
1744
1744
|
};
|
|
@@ -1747,7 +1747,7 @@
|
|
|
1747
1747
|
const u = {
|
|
1748
1748
|
name: e.name,
|
|
1749
1749
|
type: "measure",
|
|
1750
|
-
value:
|
|
1750
|
+
value: i,
|
|
1751
1751
|
createdAt: Date.now()
|
|
1752
1752
|
};
|
|
1753
1753
|
return e.detail && (u.detail = e.detail), this.data.set(t, u), u;
|
|
@@ -1781,7 +1781,7 @@
|
|
|
1781
1781
|
getKey(e, t) {
|
|
1782
1782
|
if (!t)
|
|
1783
1783
|
return e;
|
|
1784
|
-
const n = qe$
|
|
1784
|
+
const n = qe$2(t);
|
|
1785
1785
|
return e + "_" + n;
|
|
1786
1786
|
}
|
|
1787
1787
|
}
|
|
@@ -1865,10 +1865,10 @@
|
|
|
1865
1865
|
if (t.has(s))
|
|
1866
1866
|
return true;
|
|
1867
1867
|
t.add(s);
|
|
1868
|
-
const
|
|
1869
|
-
if (
|
|
1870
|
-
for (let
|
|
1871
|
-
if (n(
|
|
1868
|
+
const o = this.edges.get(s);
|
|
1869
|
+
if (o) {
|
|
1870
|
+
for (let i of o)
|
|
1871
|
+
if (n(i))
|
|
1872
1872
|
return true;
|
|
1873
1873
|
}
|
|
1874
1874
|
return t.delete(s), e.add(s), false;
|
|
@@ -1884,36 +1884,36 @@
|
|
|
1884
1884
|
* @returns {hasCycle: boolean, path?: string[]} - hasCycle is true if a cycle exists, path contains the cycle nodes
|
|
1885
1885
|
*/
|
|
1886
1886
|
validateNoCycles() {
|
|
1887
|
-
const e = /* @__PURE__ */ new Set(), t = /* @__PURE__ */ new Set(), n = [], s = (
|
|
1888
|
-
if (e.has(
|
|
1887
|
+
const e = /* @__PURE__ */ new Set(), t = /* @__PURE__ */ new Set(), n = [], s = (o) => {
|
|
1888
|
+
if (e.has(o))
|
|
1889
1889
|
return null;
|
|
1890
|
-
if (t.has(
|
|
1891
|
-
const a = n.indexOf(
|
|
1892
|
-
return n.slice(a).concat([
|
|
1893
|
-
}
|
|
1894
|
-
t.add(
|
|
1895
|
-
const
|
|
1896
|
-
if (
|
|
1897
|
-
for (let a of
|
|
1890
|
+
if (t.has(o)) {
|
|
1891
|
+
const a = n.indexOf(o);
|
|
1892
|
+
return n.slice(a).concat([o]);
|
|
1893
|
+
}
|
|
1894
|
+
t.add(o), n.push(o);
|
|
1895
|
+
const i = this.edges.get(o);
|
|
1896
|
+
if (i)
|
|
1897
|
+
for (let a of i) {
|
|
1898
1898
|
const u = s(a);
|
|
1899
1899
|
if (u)
|
|
1900
1900
|
return u;
|
|
1901
1901
|
}
|
|
1902
|
-
return n.pop(), t.delete(
|
|
1902
|
+
return n.pop(), t.delete(o), e.add(o), null;
|
|
1903
1903
|
};
|
|
1904
|
-
for (let
|
|
1905
|
-
const
|
|
1906
|
-
if (
|
|
1907
|
-
return { hasCycle: true, path:
|
|
1904
|
+
for (let o of this.nodes) {
|
|
1905
|
+
const i = s(o);
|
|
1906
|
+
if (i)
|
|
1907
|
+
return { hasCycle: true, path: i };
|
|
1908
1908
|
}
|
|
1909
1909
|
return { hasCycle: false };
|
|
1910
1910
|
}
|
|
1911
1911
|
order(e) {
|
|
1912
|
-
const t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), s = [],
|
|
1912
|
+
const t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), s = [], o = e?.allowCycles ?? false, i = (a) => {
|
|
1913
1913
|
if (t.has(a))
|
|
1914
1914
|
return;
|
|
1915
1915
|
if (n.has(a)) {
|
|
1916
|
-
if (
|
|
1916
|
+
if (o)
|
|
1917
1917
|
return;
|
|
1918
1918
|
throw new Error("Graph has a cycle.");
|
|
1919
1919
|
}
|
|
@@ -1921,11 +1921,11 @@
|
|
|
1921
1921
|
const u = this.edges.get(a);
|
|
1922
1922
|
if (u)
|
|
1923
1923
|
for (let c of u)
|
|
1924
|
-
|
|
1924
|
+
i(c);
|
|
1925
1925
|
n.delete(a), t.add(a), s.push(a);
|
|
1926
1926
|
};
|
|
1927
1927
|
for (let a of this.nodes)
|
|
1928
|
-
t.has(a) ||
|
|
1928
|
+
t.has(a) || i(a);
|
|
1929
1929
|
return s;
|
|
1930
1930
|
}
|
|
1931
1931
|
clear() {
|
|
@@ -1993,30 +1993,30 @@
|
|
|
1993
1993
|
*/
|
|
1994
1994
|
plan(e) {
|
|
1995
1995
|
const t = /* @__PURE__ */ new Map();
|
|
1996
|
-
for (const
|
|
1997
|
-
for (const
|
|
1998
|
-
for (const a of
|
|
1996
|
+
for (const i of this.nodes) t.set(i, 0);
|
|
1997
|
+
for (const i of this.edges.values())
|
|
1998
|
+
for (const a of i) t.set(a, (t.get(a) || 0) + 1);
|
|
1999
1999
|
const n = [];
|
|
2000
|
-
let s = Array.from(this.nodes).filter((
|
|
2001
|
-
const
|
|
2000
|
+
let s = Array.from(this.nodes).filter((i) => (t.get(i) || 0) === 0);
|
|
2001
|
+
const o = /* @__PURE__ */ new Set();
|
|
2002
2002
|
for (; s.length > 0; ) {
|
|
2003
|
-
const
|
|
2004
|
-
n.push(
|
|
2005
|
-
for (const a of
|
|
2006
|
-
if (
|
|
2007
|
-
|
|
2003
|
+
const i = s.slice();
|
|
2004
|
+
n.push(i), s = [];
|
|
2005
|
+
for (const a of i) {
|
|
2006
|
+
if (o.has(a)) continue;
|
|
2007
|
+
o.add(a);
|
|
2008
2008
|
const u = this.edges.get(a);
|
|
2009
2009
|
if (u)
|
|
2010
2010
|
for (const c of u)
|
|
2011
2011
|
t.set(c, (t.get(c) || 0) - 1), (t.get(c) || 0) === 0 && s.push(c);
|
|
2012
2012
|
}
|
|
2013
2013
|
}
|
|
2014
|
-
if (
|
|
2014
|
+
if (o.size !== this.nodes.size)
|
|
2015
2015
|
throw new Error("Graph has a cycle.");
|
|
2016
2016
|
if (e?.filterKinds && e.filterKinds.length > 0) {
|
|
2017
|
-
const
|
|
2017
|
+
const i = new Set(e.filterKinds);
|
|
2018
2018
|
return {
|
|
2019
|
-
batches: n.map((a) => a.filter((u) =>
|
|
2019
|
+
batches: n.map((a) => a.filter((u) => i.has(this.nodeKinds.get(u))))
|
|
2020
2020
|
};
|
|
2021
2021
|
}
|
|
2022
2022
|
return { batches: n };
|
|
@@ -2029,7 +2029,7 @@
|
|
|
2029
2029
|
* - 'both': union of upstream and downstream
|
|
2030
2030
|
*/
|
|
2031
2031
|
getImpactedNodes(e, t = "downstream", n) {
|
|
2032
|
-
const s = new Set(e),
|
|
2032
|
+
const s = new Set(e), o = (c) => !n || n.length === 0 || n.includes(this.nodeKinds.get(c) ?? void 0), i = () => {
|
|
2033
2033
|
const c = /* @__PURE__ */ new Set(), f = Array.from(s);
|
|
2034
2034
|
for (; f.length; ) {
|
|
2035
2035
|
const l = f.shift();
|
|
@@ -2048,7 +2048,7 @@
|
|
|
2048
2048
|
return c;
|
|
2049
2049
|
};
|
|
2050
2050
|
let u;
|
|
2051
|
-
return t === "both" ? u = /* @__PURE__ */ new Set([...
|
|
2051
|
+
return t === "both" ? u = /* @__PURE__ */ new Set([...i(), ...a()]) : t === "upstream" ? u = a() : u = i(), Array.from(u).filter(o);
|
|
2052
2052
|
}
|
|
2053
2053
|
toJSON() {
|
|
2054
2054
|
const e = Array.from(this.nodes).map((n) => ({
|
|
@@ -2067,15 +2067,15 @@
|
|
|
2067
2067
|
return t;
|
|
2068
2068
|
}
|
|
2069
2069
|
diff(e) {
|
|
2070
|
-
const t = new Set(this.getNodes()), n = new Set(e.getNodes()), s = Array.from(n).filter((l) => !t.has(l)),
|
|
2070
|
+
const t = new Set(this.getNodes()), n = new Set(e.getNodes()), s = Array.from(n).filter((l) => !t.has(l)), o = Array.from(t).filter((l) => !n.has(l)), i = new Set(this.getAllEdges().map((l) => l.join("→"))), a = new Set(e.getAllEdges().map((l) => l.join("→"))), u = Array.from(a).filter((l) => !i.has(l)).map((l) => l.split("→")), c = Array.from(i).filter((l) => !a.has(l)).map((l) => l.split("→")), f = [];
|
|
2071
2071
|
for (const l of /* @__PURE__ */ new Set([...t, ...n])) {
|
|
2072
2072
|
const d = this.nodeKinds.get(l), h = e.nodeKinds.get(l);
|
|
2073
2073
|
d !== h && f.push({ name: l, from: d, to: h });
|
|
2074
2074
|
}
|
|
2075
|
-
return { addedNodes: s, removedNodes:
|
|
2075
|
+
return { addedNodes: s, removedNodes: o, addedEdges: u, removedEdges: c, kindChanges: f };
|
|
2076
2076
|
}
|
|
2077
2077
|
};
|
|
2078
|
-
class
|
|
2078
|
+
class Mu {
|
|
2079
2079
|
graph;
|
|
2080
2080
|
nodeIndex;
|
|
2081
2081
|
constructor() {
|
|
@@ -2121,10 +2121,10 @@
|
|
|
2121
2121
|
* @returns Array of all impacted attribute nodes (including the changed ones)
|
|
2122
2122
|
*/
|
|
2123
2123
|
getImpactedAttributes(e) {
|
|
2124
|
-
const t = e.map((
|
|
2125
|
-
return s.filter((
|
|
2126
|
-
const a = this.getNodeId(
|
|
2127
|
-
return
|
|
2124
|
+
const t = e.map((i) => this.getNodeId(i.modelKey, i.attributeKey)), n = this.graph.getImpactedNodes(t, "downstream").map((i) => this.nodeIndex.get(i)).filter((i) => i !== void 0), s = [...e, ...n], o = /* @__PURE__ */ new Set();
|
|
2125
|
+
return s.filter((i) => {
|
|
2126
|
+
const a = this.getNodeId(i.modelKey, i.attributeKey);
|
|
2127
|
+
return o.has(a) ? false : (o.add(a), true);
|
|
2128
2128
|
});
|
|
2129
2129
|
}
|
|
2130
2130
|
/**
|
|
@@ -2135,12 +2135,12 @@
|
|
|
2135
2135
|
* @returns Map<modelKey, Map<processingStep, Set<attributeKeys>>>
|
|
2136
2136
|
*/
|
|
2137
2137
|
getProcessingOrder(e) {
|
|
2138
|
-
const t = /* @__PURE__ */ new Map(), n = [...e].sort((s,
|
|
2138
|
+
const t = /* @__PURE__ */ new Map(), n = [...e].sort((s, o) => s.processingStep - o.processingStep);
|
|
2139
2139
|
for (const s of n) {
|
|
2140
|
-
const { modelKey:
|
|
2141
|
-
t.has(
|
|
2142
|
-
const u = t.get(
|
|
2143
|
-
u.has(a) || u.set(a, /* @__PURE__ */ new Set()), u.get(a).add(
|
|
2140
|
+
const { modelKey: o, attributeKey: i, processingStep: a } = s;
|
|
2141
|
+
t.has(o) || t.set(o, /* @__PURE__ */ new Map());
|
|
2142
|
+
const u = t.get(o);
|
|
2143
|
+
u.has(a) || u.set(a, /* @__PURE__ */ new Set()), u.get(a).add(i);
|
|
2144
2144
|
}
|
|
2145
2145
|
return t;
|
|
2146
2146
|
}
|
|
@@ -2195,14 +2195,14 @@
|
|
|
2195
2195
|
const t = (n, s = /* @__PURE__ */ new Set()) => {
|
|
2196
2196
|
if (s.has(n)) return 0;
|
|
2197
2197
|
s.add(n);
|
|
2198
|
-
const
|
|
2199
|
-
if (
|
|
2200
|
-
let
|
|
2201
|
-
for (const a of
|
|
2198
|
+
const o = this.graph.getDependencies(n);
|
|
2199
|
+
if (o.length === 0) return 1;
|
|
2200
|
+
let i = 0;
|
|
2201
|
+
for (const a of o) {
|
|
2202
2202
|
const u = t(a, new Set(s));
|
|
2203
|
-
|
|
2203
|
+
i = Math.max(i, u);
|
|
2204
2204
|
}
|
|
2205
|
-
return
|
|
2205
|
+
return i + 1;
|
|
2206
2206
|
};
|
|
2207
2207
|
for (const n of this.graph.getNodes()) {
|
|
2208
2208
|
const s = t(n);
|
|
@@ -2221,9 +2221,9 @@
|
|
|
2221
2221
|
validateCompleteness(e) {
|
|
2222
2222
|
const t = [];
|
|
2223
2223
|
for (const [n, s] of e)
|
|
2224
|
-
for (const
|
|
2225
|
-
const
|
|
2226
|
-
this.hasNode(
|
|
2224
|
+
for (const o of s) {
|
|
2225
|
+
const i = this.getNodeId(n, o);
|
|
2226
|
+
this.hasNode(i) || t.push({ modelKey: n, attributeKey: o });
|
|
2227
2227
|
}
|
|
2228
2228
|
return {
|
|
2229
2229
|
isComplete: t.length === 0,
|
|
@@ -2334,19 +2334,19 @@
|
|
|
2334
2334
|
}
|
|
2335
2335
|
formatMessage(e) {
|
|
2336
2336
|
if (this.config.format === "json") {
|
|
2337
|
-
const
|
|
2337
|
+
const i = {
|
|
2338
2338
|
timestamp: new Date(e.timestamp).toISOString(),
|
|
2339
2339
|
level: e.level,
|
|
2340
2340
|
message: e.message
|
|
2341
2341
|
};
|
|
2342
|
-
return e.prefix && (
|
|
2342
|
+
return e.prefix && (i.module = e.prefix), e.context && (i.context = e.context), e.error && (i.error = {
|
|
2343
2343
|
name: e.error.name,
|
|
2344
2344
|
message: e.error.message,
|
|
2345
2345
|
stack: e.error.stack
|
|
2346
|
-
}), JSON.stringify(
|
|
2346
|
+
}), JSON.stringify(i);
|
|
2347
2347
|
}
|
|
2348
|
-
const t = new Date(e.timestamp).toISOString().substring(11, 23), n = e.prefix ? `[${e.prefix}]` : "", s = this.getLevelIcon(e.level),
|
|
2349
|
-
return `${t} ${s} ${n} ${e.message}${
|
|
2348
|
+
const t = new Date(e.timestamp).toISOString().substring(11, 23), n = e.prefix ? `[${e.prefix}]` : "", s = this.getLevelIcon(e.level), o = e.context ? ` ${JSON.stringify(e.context)}` : "";
|
|
2349
|
+
return `${t} ${s} ${n} ${e.message}${o}`.trim();
|
|
2350
2350
|
}
|
|
2351
2351
|
getLevelIcon(e) {
|
|
2352
2352
|
switch (e) {
|
|
@@ -2365,7 +2365,7 @@
|
|
|
2365
2365
|
log(e, t, n, s) {
|
|
2366
2366
|
if (!this.shouldLog(e))
|
|
2367
2367
|
return;
|
|
2368
|
-
const
|
|
2368
|
+
const o = {
|
|
2369
2369
|
level: e,
|
|
2370
2370
|
message: t,
|
|
2371
2371
|
timestamp: Date.now(),
|
|
@@ -2374,31 +2374,31 @@
|
|
|
2374
2374
|
error: s
|
|
2375
2375
|
};
|
|
2376
2376
|
if (this.config.onLog) {
|
|
2377
|
-
this.config.onLog(
|
|
2377
|
+
this.config.onLog(o);
|
|
2378
2378
|
return;
|
|
2379
2379
|
}
|
|
2380
|
-
const
|
|
2380
|
+
const i = this.formatMessage(o);
|
|
2381
2381
|
if (typeof console < "u")
|
|
2382
2382
|
switch (e) {
|
|
2383
2383
|
case "error":
|
|
2384
|
-
s ? console.error(
|
|
2384
|
+
s ? console.error(i, s) : console.error(i);
|
|
2385
2385
|
break;
|
|
2386
2386
|
case "warn":
|
|
2387
|
-
console.warn(
|
|
2387
|
+
console.warn(i);
|
|
2388
2388
|
break;
|
|
2389
2389
|
case "debug":
|
|
2390
|
-
console.debug ? console.debug(
|
|
2390
|
+
console.debug ? console.debug(i) : console.log(i);
|
|
2391
2391
|
break;
|
|
2392
2392
|
default:
|
|
2393
|
-
console.log(
|
|
2393
|
+
console.log(i);
|
|
2394
2394
|
}
|
|
2395
2395
|
}
|
|
2396
2396
|
/**
|
|
2397
2397
|
* Log an error message
|
|
2398
2398
|
*/
|
|
2399
2399
|
error(e, t, n) {
|
|
2400
|
-
const s = t instanceof Error ? t : void 0,
|
|
2401
|
-
this.log("error", e,
|
|
2400
|
+
const s = t instanceof Error ? t : void 0, o = t instanceof Error ? n : t;
|
|
2401
|
+
this.log("error", e, o, s);
|
|
2402
2402
|
}
|
|
2403
2403
|
/**
|
|
2404
2404
|
* Log and track an error (integrates with QualityController)
|
|
@@ -2486,8 +2486,8 @@
|
|
|
2486
2486
|
}
|
|
2487
2487
|
set(e, t, n, s) {
|
|
2488
2488
|
if (!this.enabled) return;
|
|
2489
|
-
const
|
|
2490
|
-
this.cache.set(
|
|
2489
|
+
const o = this.getCacheName(e, t);
|
|
2490
|
+
this.cache.set(o, n), s ? this.cacheDependencies.set(o, s) : this.log.debug(
|
|
2491
2491
|
`Cache entry '${e}' stored without dependencies. This prevents granular invalidation and may cause stale data.`
|
|
2492
2492
|
);
|
|
2493
2493
|
}
|
|
@@ -2505,21 +2505,21 @@
|
|
|
2505
2505
|
if (!this.enabled) return;
|
|
2506
2506
|
const t = [];
|
|
2507
2507
|
for (const [n, s] of this.cacheDependencies) {
|
|
2508
|
-
let
|
|
2509
|
-
for (const [
|
|
2510
|
-
if (s.models.has(
|
|
2511
|
-
if (s.modelAttributes.has(
|
|
2512
|
-
const u = s.modelAttributes.get(
|
|
2508
|
+
let o = false;
|
|
2509
|
+
for (const [i, a] of e) {
|
|
2510
|
+
if (s.models.has(i))
|
|
2511
|
+
if (s.modelAttributes.has(i)) {
|
|
2512
|
+
const u = s.modelAttributes.get(i);
|
|
2513
2513
|
for (const c of a)
|
|
2514
2514
|
if (u.has(c)) {
|
|
2515
|
-
|
|
2515
|
+
o = true;
|
|
2516
2516
|
break;
|
|
2517
2517
|
}
|
|
2518
2518
|
} else
|
|
2519
|
-
|
|
2520
|
-
if (
|
|
2519
|
+
o = true;
|
|
2520
|
+
if (o) break;
|
|
2521
2521
|
}
|
|
2522
|
-
|
|
2522
|
+
o && t.push(n);
|
|
2523
2523
|
}
|
|
2524
2524
|
for (const n of t)
|
|
2525
2525
|
this.cache.delete(n), this.cacheDependencies.delete(n);
|
|
@@ -2531,9 +2531,9 @@
|
|
|
2531
2531
|
invalidateByModels(e) {
|
|
2532
2532
|
if (!this.enabled) return;
|
|
2533
2533
|
const t = new Set(e), n = [];
|
|
2534
|
-
for (const [s,
|
|
2535
|
-
for (const
|
|
2536
|
-
if (
|
|
2534
|
+
for (const [s, o] of this.cacheDependencies)
|
|
2535
|
+
for (const i of t)
|
|
2536
|
+
if (o.models.has(i)) {
|
|
2537
2537
|
n.push(s);
|
|
2538
2538
|
break;
|
|
2539
2539
|
}
|
|
@@ -2589,7 +2589,7 @@
|
|
|
2589
2589
|
}
|
|
2590
2590
|
}
|
|
2591
2591
|
getCacheName(e, t) {
|
|
2592
|
-
const n = qe$
|
|
2592
|
+
const n = qe$2(t);
|
|
2593
2593
|
return e + "_" + n;
|
|
2594
2594
|
}
|
|
2595
2595
|
/**
|
|
@@ -2653,9 +2653,9 @@
|
|
|
2653
2653
|
};
|
|
2654
2654
|
}
|
|
2655
2655
|
}
|
|
2656
|
-
const sr$1 = (r, e) => e ? typeof structuredClone < "u" ? structuredClone(r) : C$2(r) : r, vt = (r, e, t, n, s,
|
|
2656
|
+
const sr$1 = (r, e) => e ? typeof structuredClone < "u" ? structuredClone(r) : C$2(r) : r, vt = (r, e, t, n, s, o) => {
|
|
2657
2657
|
try {
|
|
2658
|
-
const
|
|
2658
|
+
const i = !!e.dcuplInitOptions.performance?.clone?.enabled && !!t.cloneResult, a = sr$1(o, i);
|
|
2659
2659
|
if (t.scope === "list" && (t.listKey = r.cdRef?.key || r.key, t.modelKey = r.model?.key || r.modelKey), t.type === "list_created" && t.args[0].listKey.startsWith("__global_list__") || t.listKey?.startsWith("__global_list__"))
|
|
2660
2660
|
return a;
|
|
2661
2661
|
const u = Z$3.now(), c = u - n, f = Math.round(c * 1e3) / 1e3;
|
|
@@ -2674,12 +2674,12 @@
|
|
|
2674
2674
|
detail: l
|
|
2675
2675
|
}), a;
|
|
2676
2676
|
} catch {
|
|
2677
|
-
return
|
|
2677
|
+
return o;
|
|
2678
2678
|
}
|
|
2679
|
-
},
|
|
2679
|
+
}, Du = (r) => (e, t, n) => {
|
|
2680
2680
|
const s = n.value;
|
|
2681
|
-
return n.value = function(...
|
|
2682
|
-
const
|
|
2681
|
+
return n.value = function(...o) {
|
|
2682
|
+
const i = Z$3.now(), a = this.cdRef, u = sr$1(r, true);
|
|
2683
2683
|
u.key || (a.increaseCounter(), u.key = a.getCounter());
|
|
2684
2684
|
const c = Ha();
|
|
2685
2685
|
a.analyticsController.mark({
|
|
@@ -2688,42 +2688,42 @@
|
|
|
2688
2688
|
});
|
|
2689
2689
|
const f = this.model?.key;
|
|
2690
2690
|
!u.originCdRefKey && a.key && (u.originCdRefKey = a.key), f && (u.modelKey = f);
|
|
2691
|
-
const l = s.apply(this,
|
|
2692
|
-
return u.method = t, u.args =
|
|
2691
|
+
const l = s.apply(this, o);
|
|
2692
|
+
return u.method = t, u.args = o, l && typeof l == "object" && "then" in l ? l.then((d) => vt(this, a, u, i, c, d)) : vt(this, a, u, i, c, l);
|
|
2693
2693
|
}, n;
|
|
2694
2694
|
};
|
|
2695
|
-
function
|
|
2695
|
+
function Iu(r, e, t, n) {
|
|
2696
2696
|
t.max || (t.max = 20);
|
|
2697
|
-
const s = [],
|
|
2698
|
-
for (const [
|
|
2699
|
-
const u = Array.from(a).some((f) => r.has(f)), c = t.transform ? n.transformValue(
|
|
2700
|
-
if (!(t.excludeUndefineds && typeof
|
|
2701
|
-
if (u && (
|
|
2697
|
+
const s = [], o = t.transform ? n.transformValue(t.value, t.transform) : t.value;
|
|
2698
|
+
for (const [i, a] of e.entries()) {
|
|
2699
|
+
const u = Array.from(a).some((f) => r.has(f)), c = t.transform ? n.transformValue(i, t.transform) : i;
|
|
2700
|
+
if (!(t.excludeUndefineds && typeof i > "u") && !(t.excludeNulls && i === null)) {
|
|
2701
|
+
if (u && (o === "" || o === "//")) {
|
|
2702
2702
|
const f = {
|
|
2703
|
-
value:
|
|
2703
|
+
value: i,
|
|
2704
2704
|
keys: t.calculateResultKeys ? Array.from(a) : []
|
|
2705
2705
|
};
|
|
2706
2706
|
s.push(f);
|
|
2707
|
-
} else if (u && nr$1(
|
|
2708
|
-
if (n.queryFind(c,
|
|
2707
|
+
} else if (u && nr$1(o)) {
|
|
2708
|
+
if (n.queryFind(c, o, "some", t.regexFlags)) {
|
|
2709
2709
|
const f = {
|
|
2710
|
-
value:
|
|
2710
|
+
value: i,
|
|
2711
2711
|
keys: t.calculateResultKeys ? Array.from(a) : []
|
|
2712
2712
|
};
|
|
2713
2713
|
s.push(f);
|
|
2714
2714
|
}
|
|
2715
|
-
} else if (u && typeof
|
|
2716
|
-
const f = String(c ?? ""), l =
|
|
2715
|
+
} else if (u && typeof o == "string") {
|
|
2716
|
+
const f = String(c ?? ""), l = o;
|
|
2717
2717
|
if (f.toLowerCase().startsWith(l.toLowerCase())) {
|
|
2718
2718
|
const d = {
|
|
2719
|
-
value:
|
|
2719
|
+
value: i,
|
|
2720
2720
|
keys: t.calculateResultKeys ? Array.from(a) : []
|
|
2721
2721
|
};
|
|
2722
2722
|
s.push(d);
|
|
2723
2723
|
}
|
|
2724
|
-
} else if (u && n.queryFind(c,
|
|
2724
|
+
} else if (u && n.queryFind(c, o, "some")) {
|
|
2725
2725
|
const f = {
|
|
2726
|
-
value:
|
|
2726
|
+
value: i,
|
|
2727
2727
|
keys: t.calculateResultKeys ? Array.from(a) : []
|
|
2728
2728
|
};
|
|
2729
2729
|
s.push(f);
|
|
@@ -2759,19 +2759,19 @@
|
|
|
2759
2759
|
let e = "^";
|
|
2760
2760
|
const t = [];
|
|
2761
2761
|
let n = r;
|
|
2762
|
-
const s = Object.entries(Za).sort((
|
|
2762
|
+
const s = Object.entries(Za).sort((o, i) => i[0].length - o[0].length);
|
|
2763
2763
|
for (; n.length > 0; ) {
|
|
2764
|
-
let
|
|
2765
|
-
for (const [
|
|
2766
|
-
if (n.startsWith(
|
|
2767
|
-
e += a.regex, t.push({ type: a.type, pattern:
|
|
2764
|
+
let o = false;
|
|
2765
|
+
for (const [i, a] of s)
|
|
2766
|
+
if (n.startsWith(i)) {
|
|
2767
|
+
e += a.regex, t.push({ type: a.type, pattern: i }), n = n.slice(i.length), o = true;
|
|
2768
2768
|
break;
|
|
2769
2769
|
}
|
|
2770
|
-
if (!
|
|
2771
|
-
const
|
|
2772
|
-
if (!
|
|
2770
|
+
if (!o) {
|
|
2771
|
+
const i = n[0];
|
|
2772
|
+
if (!i)
|
|
2773
2773
|
break;
|
|
2774
|
-
e +=
|
|
2774
|
+
e += i.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), n = n.slice(1);
|
|
2775
2775
|
}
|
|
2776
2776
|
}
|
|
2777
2777
|
return e += "$", { regex: new RegExp(e), tokenOrder: t };
|
|
@@ -2790,8 +2790,8 @@
|
|
|
2790
2790
|
const s = r[n + 1];
|
|
2791
2791
|
if (!s)
|
|
2792
2792
|
continue;
|
|
2793
|
-
const
|
|
2794
|
-
|
|
2793
|
+
const o = parseInt(s, 10), i = e[n];
|
|
2794
|
+
i && (i.type === "year" && i.pattern === "yy" ? t.year = 2e3 + o : t[i.type] = o);
|
|
2795
2795
|
}
|
|
2796
2796
|
return t;
|
|
2797
2797
|
}
|
|
@@ -2828,11 +2828,11 @@
|
|
|
2828
2828
|
const a = Number(r);
|
|
2829
2829
|
return isNaN(a) ? /* @__PURE__ */ new Date(NaN) : new Date(a);
|
|
2830
2830
|
}
|
|
2831
|
-
const { regex: n, tokenOrder: s } = Ja(e),
|
|
2832
|
-
if (!
|
|
2831
|
+
const { regex: n, tokenOrder: s } = Ja(e), o = r.match(n);
|
|
2832
|
+
if (!o)
|
|
2833
2833
|
return /* @__PURE__ */ new Date(NaN);
|
|
2834
|
-
const
|
|
2835
|
-
return Ya(
|
|
2834
|
+
const i = Xa(o, s);
|
|
2835
|
+
return Ya(i);
|
|
2836
2836
|
}
|
|
2837
2837
|
class eu {
|
|
2838
2838
|
cache;
|
|
@@ -2887,25 +2887,25 @@
|
|
|
2887
2887
|
}
|
|
2888
2888
|
hasCycle(e) {
|
|
2889
2889
|
if (e.length === 0) return false;
|
|
2890
|
-
const t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), s = (
|
|
2891
|
-
t.add(
|
|
2892
|
-
const
|
|
2893
|
-
if (
|
|
2894
|
-
for (const a of
|
|
2890
|
+
const t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), s = (o) => {
|
|
2891
|
+
t.add(o), n.add(o);
|
|
2892
|
+
const i = this.graph.get(o);
|
|
2893
|
+
if (i) {
|
|
2894
|
+
for (const a of i)
|
|
2895
2895
|
if (t.has(a)) {
|
|
2896
2896
|
if (n.has(a))
|
|
2897
2897
|
return true;
|
|
2898
2898
|
} else if (s(a))
|
|
2899
2899
|
return true;
|
|
2900
2900
|
}
|
|
2901
|
-
return n.delete(
|
|
2901
|
+
return n.delete(o), false;
|
|
2902
2902
|
};
|
|
2903
|
-
for (let
|
|
2904
|
-
const
|
|
2905
|
-
|
|
2903
|
+
for (let o = 0; o < e.length - 1; o++) {
|
|
2904
|
+
const i = e[o], a = e[o + 1];
|
|
2905
|
+
i && a && this.addDependency(i, a);
|
|
2906
2906
|
}
|
|
2907
|
-
for (const
|
|
2908
|
-
if (!t.has(
|
|
2907
|
+
for (const o of e)
|
|
2908
|
+
if (!t.has(o) && s(o))
|
|
2909
2909
|
return true;
|
|
2910
2910
|
return false;
|
|
2911
2911
|
}
|
|
@@ -2944,11 +2944,11 @@
|
|
|
2944
2944
|
return this.cacheHits++, this.parseCache.get(e);
|
|
2945
2945
|
this.cacheMisses++;
|
|
2946
2946
|
let t, n;
|
|
2947
|
-
const s = e.includes("."),
|
|
2948
|
-
if (
|
|
2947
|
+
const s = e.includes("."), o = e.includes("["), i = s || o;
|
|
2948
|
+
if (i) {
|
|
2949
2949
|
n = e.split(/[.[]/)[0];
|
|
2950
2950
|
const u = e.indexOf("."), c = e.indexOf("[");
|
|
2951
|
-
if (
|
|
2951
|
+
if (o && (u === -1 || c < u)) {
|
|
2952
2952
|
const f = e.indexOf("]");
|
|
2953
2953
|
if (f > -1) {
|
|
2954
2954
|
const l = e.indexOf(".", f + 1);
|
|
@@ -2958,7 +2958,7 @@
|
|
|
2958
2958
|
}
|
|
2959
2959
|
const a = {
|
|
2960
2960
|
attribute: e,
|
|
2961
|
-
isDeepQuery:
|
|
2961
|
+
isDeepQuery: i
|
|
2962
2962
|
};
|
|
2963
2963
|
return n && (a.reference = n), typeof t < "u" && t !== "" && (a.referenceAttribute = t), this.parseCache.set(e, a), a;
|
|
2964
2964
|
}
|
|
@@ -3011,11 +3011,11 @@
|
|
|
3011
3011
|
if (!e || e.trim().length === 0)
|
|
3012
3012
|
return n.push("Attribute path cannot be empty"), { valid: false, errors: n };
|
|
3013
3013
|
(e.startsWith(".") || e.endsWith(".")) && n.push(`Invalid path: Leading or trailing dots are not allowed: ${e}`), e.includes("..") && n.push(`Invalid path: Consecutive dots are not allowed: ${e}`);
|
|
3014
|
-
const s = (e.match(/\[/g) || []).length,
|
|
3015
|
-
s !==
|
|
3016
|
-
const
|
|
3014
|
+
const s = (e.match(/\[/g) || []).length, o = (e.match(/]/g) || []).length;
|
|
3015
|
+
s !== o && n.push(`Invalid bracket notation: Mismatched brackets in ${e}`), e.includes("[]") && n.push(`Invalid bracket notation: Empty brackets not allowed: ${e}`);
|
|
3016
|
+
const i = /\[([^\]]+)\]/g;
|
|
3017
3017
|
let a;
|
|
3018
|
-
for (; (a =
|
|
3018
|
+
for (; (a = i.exec(e)) !== null; ) {
|
|
3019
3019
|
const f = a[1];
|
|
3020
3020
|
f && f !== "*" && !/^\d+$/.test(f) && n.push(`Invalid bracket content: Must be a number or '*', got '${f}' in ${e}`);
|
|
3021
3021
|
}
|
|
@@ -3084,7 +3084,7 @@
|
|
|
3084
3084
|
const S$2 = new ru();
|
|
3085
3085
|
function K$2(r, e) {
|
|
3086
3086
|
if (e.includes("[*]")) {
|
|
3087
|
-
const
|
|
3087
|
+
const o = e.indexOf("[*]"), i = e.substring(0, o), a = e.substring(o + 3), u = i ? W$2(r, i) : r;
|
|
3088
3088
|
if (!Array.isArray(u)) return [];
|
|
3089
3089
|
const c = [];
|
|
3090
3090
|
for (const f of u)
|
|
@@ -3093,27 +3093,27 @@
|
|
|
3093
3093
|
}
|
|
3094
3094
|
const t = e.split(".");
|
|
3095
3095
|
let n = [r];
|
|
3096
|
-
for (const
|
|
3097
|
-
const
|
|
3096
|
+
for (const o of t) {
|
|
3097
|
+
const i = [];
|
|
3098
3098
|
for (const a of n)
|
|
3099
3099
|
if (a != null)
|
|
3100
3100
|
if (Array.isArray(a))
|
|
3101
3101
|
for (const u of a) {
|
|
3102
3102
|
if (u == null) continue;
|
|
3103
|
-
const c = u[
|
|
3104
|
-
c !== void 0 &&
|
|
3103
|
+
const c = u[o];
|
|
3104
|
+
c !== void 0 && i.push(c);
|
|
3105
3105
|
}
|
|
3106
3106
|
else {
|
|
3107
|
-
const u = a[
|
|
3108
|
-
u !== void 0 &&
|
|
3107
|
+
const u = a[o];
|
|
3108
|
+
u !== void 0 && i.push(u);
|
|
3109
3109
|
}
|
|
3110
|
-
if (n =
|
|
3110
|
+
if (n = i, n.length === 0) return [];
|
|
3111
3111
|
}
|
|
3112
3112
|
const s = [];
|
|
3113
|
-
for (const
|
|
3114
|
-
if (Array.isArray(
|
|
3115
|
-
for (const
|
|
3116
|
-
else
|
|
3113
|
+
for (const o of n)
|
|
3114
|
+
if (Array.isArray(o))
|
|
3115
|
+
for (const i of o) i !== void 0 && s.push(i);
|
|
3116
|
+
else o !== void 0 && s.push(o);
|
|
3117
3117
|
return s;
|
|
3118
3118
|
}
|
|
3119
3119
|
function be$1(r) {
|
|
@@ -3137,11 +3137,11 @@
|
|
|
3137
3137
|
attribute: n,
|
|
3138
3138
|
types: r.types
|
|
3139
3139
|
};
|
|
3140
|
-
let i;
|
|
3141
|
-
(s.types.includes("sum") || s.types.includes("avg")) && (i = au(n, e));
|
|
3142
3140
|
let o;
|
|
3143
|
-
|
|
3144
|
-
|
|
3141
|
+
(s.types.includes("sum") || s.types.includes("avg")) && (o = au(n, e));
|
|
3142
|
+
let i;
|
|
3143
|
+
return (s.types.includes("min") || s.types.includes("max")) && (i = ou(n, e)), r.types.forEach((a) => {
|
|
3144
|
+
a === "sum" ? s.sum = o?.sum : a === "avg" ? s.avg = o?.average : a === "count" ? s.count = su(n, e) : a === "min" ? s.min = i && i[0] : a === "max" ? s.max = i && i[1] : a === "distinct" ? s.distinct = uu(r, e, t) : a === "group" && (s.group = iu(r, e));
|
|
3145
3145
|
}), s;
|
|
3146
3146
|
}, su = (r, e) => {
|
|
3147
3147
|
const t = S$2.parse(r).isDeepQuery;
|
|
@@ -3149,35 +3149,35 @@
|
|
|
3149
3149
|
for (const s of e.values())
|
|
3150
3150
|
if (s)
|
|
3151
3151
|
if (t)
|
|
3152
|
-
n += K$2(s, r).filter((
|
|
3152
|
+
n += K$2(s, r).filter((o) => o != null).length;
|
|
3153
3153
|
else {
|
|
3154
|
-
const
|
|
3155
|
-
if (
|
|
3156
|
-
Array.isArray(
|
|
3154
|
+
const o = s[r];
|
|
3155
|
+
if (o == null) continue;
|
|
3156
|
+
Array.isArray(o) ? n += o.filter((i) => i != null).length : n++;
|
|
3157
3157
|
}
|
|
3158
3158
|
return n;
|
|
3159
|
-
},
|
|
3159
|
+
}, ou = (r, e) => {
|
|
3160
3160
|
let t, n;
|
|
3161
3161
|
const s = S$2.parse(r).isDeepQuery;
|
|
3162
|
-
for (const
|
|
3163
|
-
if (!
|
|
3164
|
-
let
|
|
3162
|
+
for (const o of e.values()) {
|
|
3163
|
+
if (!o) continue;
|
|
3164
|
+
let i;
|
|
3165
3165
|
if (s)
|
|
3166
|
-
|
|
3166
|
+
i = K$2(o, r);
|
|
3167
3167
|
else {
|
|
3168
|
-
const a =
|
|
3169
|
-
a === void 0 ?
|
|
3168
|
+
const a = o[r];
|
|
3169
|
+
a === void 0 ? i = [] : Array.isArray(a) ? i = a.filter((u) => u !== void 0) : i = [a];
|
|
3170
3170
|
}
|
|
3171
|
-
for (const a of
|
|
3171
|
+
for (const a of i)
|
|
3172
3172
|
a == null || typeof a == "object" || ((t === void 0 || a < t) && (t = a), (n === void 0 || a > n) && (n = a));
|
|
3173
3173
|
}
|
|
3174
3174
|
if (!(t === void 0 || n === void 0))
|
|
3175
3175
|
return [t, n];
|
|
3176
|
-
},
|
|
3176
|
+
}, iu = (r, e) => {
|
|
3177
3177
|
const t = [];
|
|
3178
|
-
r.groupOptions?.groups?.forEach((
|
|
3178
|
+
r.groupOptions?.groups?.forEach((o) => {
|
|
3179
3179
|
t.push({
|
|
3180
|
-
option:
|
|
3180
|
+
option: o,
|
|
3181
3181
|
count: 0,
|
|
3182
3182
|
keys: []
|
|
3183
3183
|
});
|
|
@@ -3187,29 +3187,29 @@
|
|
|
3187
3187
|
count: 0,
|
|
3188
3188
|
keys: []
|
|
3189
3189
|
}, s = S$2.parse(r.attribute).isDeepQuery;
|
|
3190
|
-
for (const
|
|
3191
|
-
let
|
|
3192
|
-
s ?
|
|
3190
|
+
for (const o of e.values()) {
|
|
3191
|
+
let i;
|
|
3192
|
+
s ? i = K$2(o, r.attribute) : i = [o[r.attribute]];
|
|
3193
3193
|
let a = false;
|
|
3194
|
-
for (const u of
|
|
3194
|
+
for (const u of i)
|
|
3195
3195
|
for (const c of t)
|
|
3196
|
-
(typeof c.option.value < "u" && c.option.value.includes(u) || typeof c.option.from < "u" && c.option.from < u && typeof c.option.to < "u" && c.option.to > u) && (c.keys.includes(
|
|
3197
|
-
!a && r?.groupOptions?.calculateNotFound && (n.count++, n.keys.push(
|
|
3196
|
+
(typeof c.option.value < "u" && c.option.value.includes(u) || typeof c.option.from < "u" && c.option.from < u && typeof c.option.to < "u" && c.option.to > u) && (c.keys.includes(o.key) || (c.count++, c.keys.push(o.key)), a = true);
|
|
3197
|
+
!a && r?.groupOptions?.calculateNotFound && (n.count++, n.keys.push(o.key));
|
|
3198
3198
|
}
|
|
3199
3199
|
return r?.groupOptions?.calculateNotFound && t.push(n), t;
|
|
3200
3200
|
}, au = (r, e) => {
|
|
3201
3201
|
let t = 0, n = 0;
|
|
3202
3202
|
const s = S$2.parse(r).isDeepQuery;
|
|
3203
|
-
for (const
|
|
3204
|
-
if (!
|
|
3205
|
-
let
|
|
3203
|
+
for (const o of e.values()) {
|
|
3204
|
+
if (!o) continue;
|
|
3205
|
+
let i;
|
|
3206
3206
|
if (s)
|
|
3207
|
-
|
|
3207
|
+
i = K$2(o, r);
|
|
3208
3208
|
else {
|
|
3209
|
-
const a =
|
|
3210
|
-
a === void 0 ?
|
|
3209
|
+
const a = o[r];
|
|
3210
|
+
a === void 0 ? i = [] : Array.isArray(a) ? i = a : i = [a];
|
|
3211
3211
|
}
|
|
3212
|
-
for (const a of
|
|
3212
|
+
for (const a of i)
|
|
3213
3213
|
if (Array.isArray(a))
|
|
3214
3214
|
for (const u of a)
|
|
3215
3215
|
typeof u == "number" && (t = wt(t, u, be$1([t, u])), n++);
|
|
@@ -3222,25 +3222,25 @@
|
|
|
3222
3222
|
};
|
|
3223
3223
|
}, uu = (r, e, t) => {
|
|
3224
3224
|
const n = [];
|
|
3225
|
-
for (const [s,
|
|
3226
|
-
if (!(r.excludeUndefineds && typeof s > "u") && Array.from(
|
|
3227
|
-
const
|
|
3225
|
+
for (const [s, o] of t)
|
|
3226
|
+
if (!(r.excludeUndefineds && typeof s > "u") && Array.from(o).find((i) => e.has(i))) {
|
|
3227
|
+
const i = {
|
|
3228
3228
|
value: s,
|
|
3229
|
-
count:
|
|
3229
|
+
count: o.size
|
|
3230
3230
|
};
|
|
3231
|
-
if (r.distinctOptions?.skipKeys || (
|
|
3231
|
+
if (r.distinctOptions?.skipKeys || (i.keys = Array.from(o)), n.push(i), r.distinctOptions?.limit && n.length >= r.distinctOptions.limit)
|
|
3232
3232
|
break;
|
|
3233
3233
|
}
|
|
3234
3234
|
return n;
|
|
3235
3235
|
};
|
|
3236
|
-
|
|
3236
|
+
class P extends Error {
|
|
3237
3237
|
query;
|
|
3238
3238
|
constructor(e, t) {
|
|
3239
3239
|
const n = `Query Error: ${e} in ${JSON.stringify(t, null, 2)}`;
|
|
3240
3240
|
super(n), this.query = t, this.name = "DcuplQueryError";
|
|
3241
3241
|
}
|
|
3242
|
-
}
|
|
3243
|
-
let
|
|
3242
|
+
}
|
|
3243
|
+
let or$1 = class or {
|
|
3244
3244
|
_defaultQueryOptions = {
|
|
3245
3245
|
modelKey: "",
|
|
3246
3246
|
groupKey: "root",
|
|
@@ -3294,6 +3294,57 @@
|
|
|
3294
3294
|
getQueryGroup(e) {
|
|
3295
3295
|
return this.currentQuery.queries.find((t) => this.isQueryGroup(t) && t.groupKey === e);
|
|
3296
3296
|
}
|
|
3297
|
+
/**
|
|
3298
|
+
* Find the group with the given `groupKey` at any nesting depth (#294).
|
|
3299
|
+
*
|
|
3300
|
+
* Unlike {@link getQueryGroup}, which only looks at the top level, this also finds a
|
|
3301
|
+
* keyed group that sits inside a keyless wrapper group — the shape
|
|
3302
|
+
* `apply({ groupType: 'and', queries: [{ groupKey: 'plan', ... }] }, { mode: 'set' })`
|
|
3303
|
+
* produces. Groups on one level are checked before their children, so a top-level
|
|
3304
|
+
* match wins over a nested one; otherwise the first match in query order wins
|
|
3305
|
+
* (groupKeys are expected to be unique).
|
|
3306
|
+
*
|
|
3307
|
+
* @param groupKey - Key of the group to find
|
|
3308
|
+
* @param relevantQuery - Query to search (defaults to the current query)
|
|
3309
|
+
* @returns The matching group, or undefined
|
|
3310
|
+
*/
|
|
3311
|
+
findQueryGroup(e, t) {
|
|
3312
|
+
const n = this.locateQueryGroup(e, (t ?? this.currentQuery).queries);
|
|
3313
|
+
return n ? this.groupAtPath(n) : void 0;
|
|
3314
|
+
}
|
|
3315
|
+
/**
|
|
3316
|
+
* Path from the root `queries` array down to a group: each step names the array that
|
|
3317
|
+
* holds a node and the node's index in it; the last step is the group itself.
|
|
3318
|
+
*/
|
|
3319
|
+
locateQueryGroup(e, t) {
|
|
3320
|
+
const n = t.findIndex((s) => this.isQueryGroup(s) && s.groupKey === e);
|
|
3321
|
+
if (n > -1)
|
|
3322
|
+
return [{ queries: t, idx: n }];
|
|
3323
|
+
for (const [s, o] of t.entries())
|
|
3324
|
+
if (this.isQueryGroup(o)) {
|
|
3325
|
+
const i = this.locateQueryGroup(e, o.queries);
|
|
3326
|
+
if (i)
|
|
3327
|
+
return [{ queries: t, idx: s }, ...i];
|
|
3328
|
+
}
|
|
3329
|
+
}
|
|
3330
|
+
groupAtPath(e) {
|
|
3331
|
+
const t = e[e.length - 1];
|
|
3332
|
+
return t.queries[t.idx];
|
|
3333
|
+
}
|
|
3334
|
+
/**
|
|
3335
|
+
* Walk a path upwards from its last group and splice every group that has no
|
|
3336
|
+
* queries left, stopping at the first non-empty one. Mirrors the existing
|
|
3337
|
+
* "remove the group when its queries are empty" behaviour for nested wrappers, so
|
|
3338
|
+
* removing the only group inside a keyless wrapper also removes the wrapper.
|
|
3339
|
+
*/
|
|
3340
|
+
pruneEmptyGroups(e) {
|
|
3341
|
+
for (let t = e.length - 1; t >= 0; t--) {
|
|
3342
|
+
const { queries: n, idx: s } = e[t];
|
|
3343
|
+
if (n[s].queries.length > 0)
|
|
3344
|
+
break;
|
|
3345
|
+
n.splice(s, 1);
|
|
3346
|
+
}
|
|
3347
|
+
}
|
|
3297
3348
|
getQuery() {
|
|
3298
3349
|
return C$2(this.currentQuery);
|
|
3299
3350
|
}
|
|
@@ -3331,8 +3382,20 @@
|
|
|
3331
3382
|
* - {@link replaceQuery} - Replace complete query
|
|
3332
3383
|
*
|
|
3333
3384
|
* @param queryToApply - Query, condition, or array to apply
|
|
3334
|
-
* @param options - Mode: 'add' (default) or 'set'
|
|
3335
|
-
*
|
|
3385
|
+
* @param options - Mode: 'add' (default) or 'set'. `set` works per group, not per query:
|
|
3386
|
+
* - Root group (`groupKey: 'root'`): replaces the whole query — all groups plus
|
|
3387
|
+
* `count`/`start`/`sort`/`projection` (the only input that does).
|
|
3388
|
+
* - Keyed group, or an array of groups: each group replaces the group with the same
|
|
3389
|
+
* `groupKey`; every other group is kept. Same as {@link setGroup}.
|
|
3390
|
+
* - Condition: replaces the conditions of the group keyed by its attribute.
|
|
3391
|
+
*
|
|
3392
|
+
* A group without `groupKey` is not the root, even if it carries a `queries` array:
|
|
3393
|
+
* `apply({ groupType: 'and', queries: [...] }, { mode: 'set' })` stores it as a keyless
|
|
3394
|
+
* wrapper group that replaces the first keyless top-level group, and the keyed groups
|
|
3395
|
+
* inside it stay nested there. {@link removeQuery} and `fn.facets` still find them by
|
|
3396
|
+
* `groupKey` at any depth (#294). To replace the whole query, pass `groupKey: 'root'`
|
|
3397
|
+
* or use {@link replaceQuery}. In 'add' mode a group without `groupKey` is always
|
|
3398
|
+
* appended as a new group, never merged into another.
|
|
3336
3399
|
* @param relevantQuery - Target query (defaults to current)
|
|
3337
3400
|
* @returns Updated query
|
|
3338
3401
|
*/
|
|
@@ -3344,11 +3407,11 @@
|
|
|
3344
3407
|
e.groupType && (n.groupType = e.groupType), t?.mode === "set" ? n.queries = e.queries : n.queries = [...n.queries, ...e.queries], this.applyOptions(e, "set");
|
|
3345
3408
|
else if (this.isQuery(e)) {
|
|
3346
3409
|
const s = n.queries.findIndex(
|
|
3347
|
-
(
|
|
3410
|
+
(o) => this.isQueryGroup(o) && o.groupKey === e.attribute
|
|
3348
3411
|
);
|
|
3349
3412
|
if (s > -1) {
|
|
3350
|
-
const
|
|
3351
|
-
t?.mode === "set" ?
|
|
3413
|
+
const o = n.queries[s];
|
|
3414
|
+
t?.mode === "set" ? o.queries = [e] : o.queries.push(e);
|
|
3352
3415
|
} else
|
|
3353
3416
|
n.queries.push({
|
|
3354
3417
|
groupKey: e.attribute,
|
|
@@ -3357,11 +3420,11 @@
|
|
|
3357
3420
|
});
|
|
3358
3421
|
} else if (this.isQueryGroup(e)) {
|
|
3359
3422
|
const s = e.groupKey === void 0 && t?.mode !== "set" ? -1 : n.queries.findIndex(
|
|
3360
|
-
(
|
|
3423
|
+
(o) => this.isQueryGroup(o) && o.groupKey === e.groupKey
|
|
3361
3424
|
);
|
|
3362
3425
|
if (s > -1) {
|
|
3363
|
-
const
|
|
3364
|
-
e.groupType && (
|
|
3426
|
+
const o = n.queries[s];
|
|
3427
|
+
e.groupType && (o.groupType = e.groupType), t?.mode === "set" ? n.queries[s] = e : o.queries = [...o.queries, ...e.queries];
|
|
3365
3428
|
} else
|
|
3366
3429
|
n.queries.push({
|
|
3367
3430
|
groupKey: e.groupKey,
|
|
@@ -3384,33 +3447,39 @@
|
|
|
3384
3447
|
/**
|
|
3385
3448
|
* Remove a specific query or query group.
|
|
3386
3449
|
*
|
|
3450
|
+
* - A condition (`attribute` set) is removed from the group keyed by its attribute.
|
|
3451
|
+
* - A group with `groupKey` but no `queries` is removed entirely.
|
|
3452
|
+
* - A group with `groupKey` and `queries` has those conditions removed from it.
|
|
3453
|
+
*
|
|
3454
|
+
* The target group is looked up by `groupKey` at any nesting depth (see
|
|
3455
|
+
* {@link findQueryGroup}), so a keyed group inside a keyless wrapper group is found
|
|
3456
|
+
* too (#294). A group left without queries is removed, and so is every wrapper
|
|
3457
|
+
* group that becomes empty as a result.
|
|
3458
|
+
*
|
|
3387
3459
|
* @param queryToRemove - Query or group to remove (partial match)
|
|
3388
3460
|
* @param relevantQuery - Target query (defaults to current)
|
|
3389
3461
|
* @returns Updated query
|
|
3390
3462
|
*/
|
|
3391
3463
|
removeQuery(e, t) {
|
|
3392
3464
|
if (t || (t = this.currentQuery), this.isQuery(e)) {
|
|
3393
|
-
const n = t.queries
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
const s = t.queries[n], i = Te$2(s.queries, e);
|
|
3398
|
-
i > -1 && s.queries.splice(i, 1), s.queries.length === 0 && t.queries.splice(n, 1);
|
|
3465
|
+
const n = this.locateQueryGroup(e.attribute, t.queries);
|
|
3466
|
+
if (n) {
|
|
3467
|
+
const s = this.groupAtPath(n), o = Te$2(s.queries, e);
|
|
3468
|
+
o > -1 && s.queries.splice(o, 1), this.pruneEmptyGroups(n);
|
|
3399
3469
|
}
|
|
3400
3470
|
} else if (this.isQueryGroup(e)) {
|
|
3401
|
-
const n = t.queries
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
const s = t.queries[n];
|
|
3409
|
-
for (const i of e.queries) {
|
|
3410
|
-
const o = Te$2(s.queries, i);
|
|
3411
|
-
o > -1 && s.queries.splice(o, 1);
|
|
3471
|
+
const n = this.locateQueryGroup(e.groupKey, t.queries);
|
|
3472
|
+
if (n)
|
|
3473
|
+
if (e.queries) {
|
|
3474
|
+
const s = this.groupAtPath(n);
|
|
3475
|
+
for (const o of e.queries) {
|
|
3476
|
+
const i = Te$2(s.queries, o);
|
|
3477
|
+
i > -1 && s.queries.splice(i, 1);
|
|
3412
3478
|
}
|
|
3413
|
-
|
|
3479
|
+
this.pruneEmptyGroups(n);
|
|
3480
|
+
} else {
|
|
3481
|
+
const s = n[n.length - 1];
|
|
3482
|
+
s.queries.splice(s.idx, 1), this.pruneEmptyGroups(n.slice(0, -1));
|
|
3414
3483
|
}
|
|
3415
3484
|
}
|
|
3416
3485
|
return t;
|
|
@@ -3418,12 +3487,12 @@
|
|
|
3418
3487
|
validateQuery(e) {
|
|
3419
3488
|
const t = [];
|
|
3420
3489
|
if (this.isQuery(e))
|
|
3421
|
-
return e.attribute || t.push(new P
|
|
3490
|
+
return e.attribute || t.push(new P("Missing attribute", e)), e.operator || t.push(new P("Missing operator", e)), typeof e.value > "u" && t.push(new P("Missing value", e)), e.operator === "find" && Array.isArray(e.value) && t.push(new P("find operator cannot have array value", e)), e.operator === "in" && typeof e.value < "u" && !Array.isArray(e.value) && t.push(new P("in operator needs an array value", e)), t.length > 0 ? { valid: false, errors: t } : { valid: true };
|
|
3422
3491
|
if (this.isQueryGroup(e)) {
|
|
3423
3492
|
const n = e.queries.map((s) => this.validateQuery(s)).filter((s) => !s.valid).map((s) => s.errors).flat();
|
|
3424
3493
|
return n.length > 0 ? { valid: false, errors: n } : { valid: true };
|
|
3425
3494
|
}
|
|
3426
|
-
return t.push(new P
|
|
3495
|
+
return t.push(new P("Invalid query definition", e)), { valid: false, errors: t };
|
|
3427
3496
|
}
|
|
3428
3497
|
/**
|
|
3429
3498
|
* Get all attribute names used in the query.
|
|
@@ -3433,9 +3502,9 @@
|
|
|
3433
3502
|
* @returns Array of attribute names
|
|
3434
3503
|
*/
|
|
3435
3504
|
getQueryAttributes(e) {
|
|
3436
|
-
const t = [], n = /* @__PURE__ */ new Set(), s = (
|
|
3437
|
-
for (const
|
|
3438
|
-
this.isQuery(
|
|
3505
|
+
const t = [], n = /* @__PURE__ */ new Set(), s = (o) => {
|
|
3506
|
+
for (const i of o)
|
|
3507
|
+
this.isQuery(i) ? i.attribute && !n.has(i.attribute) && (t.push(i.attribute), n.add(i.attribute)) : this.isQueryGroup(i) && s(i.queries);
|
|
3439
3508
|
};
|
|
3440
3509
|
return s(e?.queries || this.currentQuery.queries), t;
|
|
3441
3510
|
}
|
|
@@ -3447,14 +3516,14 @@
|
|
|
3447
3516
|
* @returns Array of QueryAttributeEntry objects
|
|
3448
3517
|
*/
|
|
3449
3518
|
extractQueryAttributes(e) {
|
|
3450
|
-
const t = [], n = /* @__PURE__ */ new Set(), s = (
|
|
3451
|
-
for (const
|
|
3452
|
-
if (this.isQuery(
|
|
3453
|
-
if (
|
|
3454
|
-
const a = this.getQueryAttributeForString(
|
|
3455
|
-
t.push(a), n.add(
|
|
3519
|
+
const t = [], n = /* @__PURE__ */ new Set(), s = (o) => {
|
|
3520
|
+
for (const i of o)
|
|
3521
|
+
if (this.isQuery(i)) {
|
|
3522
|
+
if (i.attribute && !n.has(i.attribute)) {
|
|
3523
|
+
const a = this.getQueryAttributeForString(i.attribute);
|
|
3524
|
+
t.push(a), n.add(i.attribute);
|
|
3456
3525
|
}
|
|
3457
|
-
} else this.isQueryGroup(
|
|
3526
|
+
} else this.isQueryGroup(i) && s(i.queries);
|
|
3458
3527
|
};
|
|
3459
3528
|
return s(e?.queries || this.currentQuery.queries), t;
|
|
3460
3529
|
}
|
|
@@ -3495,9 +3564,9 @@
|
|
|
3495
3564
|
t[n.reference] || (t[n.reference] = { $: true });
|
|
3496
3565
|
const s = this.deepQueryService.parse(n.referenceAttribute);
|
|
3497
3566
|
if (s.isDeepQuery && n.reference) {
|
|
3498
|
-
const
|
|
3499
|
-
Object.keys(
|
|
3500
|
-
|
|
3567
|
+
const o = this.getProjectionForAttributeEntries([s]);
|
|
3568
|
+
Object.keys(o).forEach((i) => {
|
|
3569
|
+
i !== "$" && n.reference && (t[n.reference][i] = o[i]);
|
|
3501
3570
|
});
|
|
3502
3571
|
} else n.reference && (t[n.reference][n.referenceAttribute] = true);
|
|
3503
3572
|
} else
|
|
@@ -3635,9 +3704,11 @@
|
|
|
3635
3704
|
return this.applyQuery(e, { mode: "add" });
|
|
3636
3705
|
}
|
|
3637
3706
|
/**
|
|
3638
|
-
* Replace
|
|
3707
|
+
* Replace the conditions of an attribute group with new condition(s).
|
|
3639
3708
|
* Accepts single condition or array of conditions.
|
|
3640
|
-
* Each condition replaces all existing conditions
|
|
3709
|
+
* Each condition replaces all existing conditions of the group keyed by its attribute
|
|
3710
|
+
* (created if missing); groups for other attributes and the query options are kept.
|
|
3711
|
+
* This does not replace the whole query — see {@link replaceQuery} for that.
|
|
3641
3712
|
*
|
|
3642
3713
|
* Clearer alternative to `applyQuery(condition, { mode: 'set' })`.
|
|
3643
3714
|
*
|
|
@@ -3660,8 +3731,16 @@
|
|
|
3660
3731
|
return this.applyQuery(e, { mode: "set" });
|
|
3661
3732
|
}
|
|
3662
3733
|
/**
|
|
3663
|
-
* Replace
|
|
3664
|
-
*
|
|
3734
|
+
* Replace one query group by key (per-group `set`).
|
|
3735
|
+
* The group with the same `groupKey` is replaced by the given definition; if none exists
|
|
3736
|
+
* the group is appended. All other groups and the query options (`count`, `start`,
|
|
3737
|
+
* `sort`, `projection`) are kept. An unkeyed group replaces the first unkeyed top-level
|
|
3738
|
+
* group. Only a group with `groupKey: 'root'` replaces the whole query — equivalent to
|
|
3739
|
+
* `applyQuery(rootGroup, { mode: 'set' })` / {@link replaceQuery}.
|
|
3740
|
+
*
|
|
3741
|
+
* A group without `groupKey` whose `queries` hold keyed groups is stored as a keyless
|
|
3742
|
+
* wrapper; the keyed groups inside it stay nested and are still found by `groupKey`
|
|
3743
|
+
* via {@link findQueryGroup}, {@link removeQuery} and `fn.facets` (#294).
|
|
3665
3744
|
*
|
|
3666
3745
|
* @param group - Query group to set
|
|
3667
3746
|
* @returns Updated query
|
|
@@ -3708,7 +3787,10 @@
|
|
|
3708
3787
|
}
|
|
3709
3788
|
/**
|
|
3710
3789
|
* Replace the entire current query with a new query.
|
|
3711
|
-
*
|
|
3790
|
+
* Replaces all conditions and groups, and the root `groupType` when given. The query
|
|
3791
|
+
* options (`count`, `start`, `sort`, `projection`) are kept — use {@link applyOptions}
|
|
3792
|
+
* or `applyQuery({ groupKey: 'root', ... }, { mode: 'set' })` to replace those too.
|
|
3793
|
+
* To replace a single group by key, use {@link setGroup}.
|
|
3712
3794
|
*
|
|
3713
3795
|
* @param query - Complete query to replace with
|
|
3714
3796
|
* @returns Updated query
|
|
@@ -3804,13 +3886,13 @@
|
|
|
3804
3886
|
const t = (n) => {
|
|
3805
3887
|
for (const s of n)
|
|
3806
3888
|
if (this.isQuery(s)) {
|
|
3807
|
-
let
|
|
3808
|
-
for (const
|
|
3809
|
-
if (s[
|
|
3810
|
-
|
|
3889
|
+
let o = true;
|
|
3890
|
+
for (const i in e)
|
|
3891
|
+
if (s[i] !== e[i]) {
|
|
3892
|
+
o = false;
|
|
3811
3893
|
break;
|
|
3812
3894
|
}
|
|
3813
|
-
if (
|
|
3895
|
+
if (o) return true;
|
|
3814
3896
|
} else if (this.isQueryGroup(s) && t(s.queries))
|
|
3815
3897
|
return true;
|
|
3816
3898
|
return false;
|
|
@@ -3931,9 +4013,9 @@
|
|
|
3931
4013
|
return e(this.currentQuery.queries);
|
|
3932
4014
|
}
|
|
3933
4015
|
};
|
|
3934
|
-
const _e$2 = new
|
|
3935
|
-
function Qu(r, e, t, n, s,
|
|
3936
|
-
const a = t.excludeGroup ?? s, u = _e$2.removeQuery({ groupKey: a }, C$2(n)), c =
|
|
4016
|
+
const _e$2 = new or$1();
|
|
4017
|
+
function Qu(r, e, t, n, s, o, i) {
|
|
4018
|
+
const a = t.excludeGroup ?? s, u = _e$2.removeQuery({ groupKey: a }, C$2(n)), c = i.queryData(r, u, false, o), f = e ? [...e.keys()] : [], l = new Set(f), d = o.get(s) ?? /* @__PURE__ */ new Map();
|
|
3937
4019
|
if (!t.excludeUnresolved)
|
|
3938
4020
|
for (const p2 of d.keys())
|
|
3939
4021
|
l.add(p2);
|
|
@@ -3975,7 +4057,7 @@
|
|
|
3975
4057
|
}
|
|
3976
4058
|
return h;
|
|
3977
4059
|
}
|
|
3978
|
-
function At$1(r, e, t, n, s,
|
|
4060
|
+
function At$1(r, e, t, n, s, o, i, a) {
|
|
3979
4061
|
const u = /* @__PURE__ */ new Map(), c = e.get(r) || /* @__PURE__ */ new Set();
|
|
3980
4062
|
for (const f of c) {
|
|
3981
4063
|
const l = t.get(f);
|
|
@@ -3985,7 +4067,7 @@
|
|
|
3985
4067
|
return {
|
|
3986
4068
|
key: String(r),
|
|
3987
4069
|
value: r,
|
|
3988
|
-
selected: fu(
|
|
4070
|
+
selected: fu(o, s, r, i),
|
|
3989
4071
|
enabled: u.size > 0,
|
|
3990
4072
|
size: u.size,
|
|
3991
4073
|
entry: n?.get(r),
|
|
@@ -4000,8 +4082,8 @@
|
|
|
4000
4082
|
if (t !== n) return t < n ? -1 : 1;
|
|
4001
4083
|
if (t === "number") return r - e;
|
|
4002
4084
|
if (t === "string") return r.localeCompare(e);
|
|
4003
|
-
const s = String(r),
|
|
4004
|
-
return s <
|
|
4085
|
+
const s = String(r), o = String(e);
|
|
4086
|
+
return s < o ? -1 : s > o ? 1 : 0;
|
|
4005
4087
|
}
|
|
4006
4088
|
function cu(r) {
|
|
4007
4089
|
switch (r) {
|
|
@@ -4016,8 +4098,8 @@
|
|
|
4016
4098
|
}
|
|
4017
4099
|
}
|
|
4018
4100
|
const fu = (r, e, t, n) => {
|
|
4019
|
-
const s =
|
|
4020
|
-
return s
|
|
4101
|
+
const s = _e$2.findQueryGroup(r, n);
|
|
4102
|
+
return s ? !!s.queries.find((o) => _e$2.isQuery(o) ? o.attribute !== e ? false : (o.operator === "in" && Array.isArray(o.value) ? o.value : [o.value]).some((i) => (i?.key || i) === t) : false) : false;
|
|
4021
4103
|
};
|
|
4022
4104
|
class lu {
|
|
4023
4105
|
indexMap = /* @__PURE__ */ new Map();
|
|
@@ -4042,33 +4124,33 @@
|
|
|
4042
4124
|
let n = this.dataMap.get(e);
|
|
4043
4125
|
n || (n = /* @__PURE__ */ new Map(), this.dataMap.set(e, n));
|
|
4044
4126
|
for (const s of t) {
|
|
4045
|
-
let
|
|
4127
|
+
let o;
|
|
4046
4128
|
if (typeof s == "object" && s && s.key)
|
|
4047
|
-
|
|
4129
|
+
o = s.key;
|
|
4048
4130
|
else if (Array.isArray(s)) {
|
|
4049
4131
|
for (const a of s)
|
|
4050
4132
|
this.fillDataMap(e, [a]);
|
|
4051
4133
|
return;
|
|
4052
|
-
} else s instanceof Date ?
|
|
4053
|
-
let
|
|
4054
|
-
|
|
4134
|
+
} else s instanceof Date ? o = s.toISOString() : o = s;
|
|
4135
|
+
let i = n.get(o);
|
|
4136
|
+
i || (i = { key: o }, this.dataMap.get(e)?.set(o, i));
|
|
4055
4137
|
}
|
|
4056
4138
|
}
|
|
4057
4139
|
fillInverseIndex(e, t, n) {
|
|
4058
4140
|
if (!e || !t || !n || !Array.isArray(n))
|
|
4059
4141
|
return;
|
|
4060
4142
|
const s = this.indexMap.get(e) || /* @__PURE__ */ new Map();
|
|
4061
|
-
for (const
|
|
4062
|
-
let
|
|
4063
|
-
if (typeof
|
|
4064
|
-
|
|
4065
|
-
else if (Array.isArray(
|
|
4066
|
-
for (const u of
|
|
4143
|
+
for (const o of n) {
|
|
4144
|
+
let i;
|
|
4145
|
+
if (typeof o == "object" && o && o.key)
|
|
4146
|
+
i = o.key;
|
|
4147
|
+
else if (Array.isArray(o)) {
|
|
4148
|
+
for (const u of o)
|
|
4067
4149
|
this.fillInverseIndex(e, t, [u]);
|
|
4068
4150
|
return;
|
|
4069
|
-
} else
|
|
4070
|
-
let a = s.get(
|
|
4071
|
-
a || (a = /* @__PURE__ */ new Set(), s.set(
|
|
4151
|
+
} else o instanceof Date ? i = o.toISOString() : i = o;
|
|
4152
|
+
let a = s.get(i);
|
|
4153
|
+
a || (a = /* @__PURE__ */ new Set(), s.set(i, a)), a.add(t);
|
|
4072
4154
|
}
|
|
4073
4155
|
this.indexMap.set(e, s);
|
|
4074
4156
|
}
|
|
@@ -4082,11 +4164,11 @@
|
|
|
4082
4164
|
}
|
|
4083
4165
|
getOrCreateIndex(e, t, n) {
|
|
4084
4166
|
const s = this.getIndexName(e, n);
|
|
4085
|
-
let
|
|
4086
|
-
const
|
|
4087
|
-
if (
|
|
4088
|
-
|
|
4089
|
-
else if (!
|
|
4167
|
+
let o = this.getIndex(s);
|
|
4168
|
+
const i = this.indexMetadata.get(s);
|
|
4169
|
+
if (i)
|
|
4170
|
+
i.lastAccessedAt = Date.now();
|
|
4171
|
+
else if (!o) {
|
|
4090
4172
|
const a = S$2.parse(e).isDeepQuery ?? false;
|
|
4091
4173
|
this.indexMetadata.set(s, {
|
|
4092
4174
|
createdAt: Date.now(),
|
|
@@ -4095,19 +4177,19 @@
|
|
|
4095
4177
|
type: a ? "deep" : "shallow"
|
|
4096
4178
|
});
|
|
4097
4179
|
}
|
|
4098
|
-
if (!
|
|
4180
|
+
if (!o) {
|
|
4099
4181
|
this.reset(s), this.indexMap.set(s, /* @__PURE__ */ new Map());
|
|
4100
4182
|
const a = S$2.parse(e).isDeepQuery;
|
|
4101
4183
|
for (const u of t.values()) {
|
|
4102
4184
|
let c;
|
|
4103
4185
|
a ? (c = K$2(u, e), c.length === 0 && (c = [void 0])) : c = [u[e]], this.fillInverseIndex(s, u.key, c), this.fillDataMap(s, c);
|
|
4104
4186
|
}
|
|
4105
|
-
|
|
4187
|
+
o = this.getIndex(s) || /* @__PURE__ */ new Map();
|
|
4106
4188
|
}
|
|
4107
|
-
return
|
|
4189
|
+
return o;
|
|
4108
4190
|
}
|
|
4109
4191
|
getIndexName(e, t) {
|
|
4110
|
-
return t ? e + "_" + qe$
|
|
4192
|
+
return t ? e + "_" + qe$2(t) : e;
|
|
4111
4193
|
}
|
|
4112
4194
|
// ========== PARTIAL UPDATE METHODS ==========
|
|
4113
4195
|
/**
|
|
@@ -4119,17 +4201,17 @@
|
|
|
4119
4201
|
removeFromInverseIndex(e, t, n) {
|
|
4120
4202
|
const s = this.indexMap.get(e);
|
|
4121
4203
|
if (s)
|
|
4122
|
-
for (const
|
|
4123
|
-
let
|
|
4124
|
-
if (typeof
|
|
4125
|
-
|
|
4126
|
-
else if (Array.isArray(
|
|
4127
|
-
for (const u of
|
|
4204
|
+
for (const o of n) {
|
|
4205
|
+
let i;
|
|
4206
|
+
if (typeof o == "object" && o && o.key)
|
|
4207
|
+
i = o.key;
|
|
4208
|
+
else if (Array.isArray(o)) {
|
|
4209
|
+
for (const u of o)
|
|
4128
4210
|
this.removeFromInverseIndex(e, t, [u]);
|
|
4129
4211
|
return;
|
|
4130
|
-
} else
|
|
4131
|
-
const a = s.get(
|
|
4132
|
-
a && (a.delete(t), a.size === 0 && s.delete(
|
|
4212
|
+
} else o instanceof Date ? i = o.toISOString() : i = o;
|
|
4213
|
+
const a = s.get(i);
|
|
4214
|
+
a && (a.delete(t), a.size === 0 && s.delete(i));
|
|
4133
4215
|
}
|
|
4134
4216
|
}
|
|
4135
4217
|
/**
|
|
@@ -4151,15 +4233,15 @@
|
|
|
4151
4233
|
const n = this.dataMap.get(e);
|
|
4152
4234
|
if (n)
|
|
4153
4235
|
for (const s of t) {
|
|
4154
|
-
let
|
|
4236
|
+
let o;
|
|
4155
4237
|
if (typeof s == "object" && s && s.key)
|
|
4156
|
-
|
|
4238
|
+
o = s.key;
|
|
4157
4239
|
else if (Array.isArray(s)) {
|
|
4158
|
-
for (const
|
|
4159
|
-
this.removeFromDataMap(e, [
|
|
4240
|
+
for (const i of s)
|
|
4241
|
+
this.removeFromDataMap(e, [i]);
|
|
4160
4242
|
return;
|
|
4161
|
-
} else s instanceof Date ?
|
|
4162
|
-
n.delete(
|
|
4243
|
+
} else s instanceof Date ? o = s.toISOString() : o = s;
|
|
4244
|
+
n.delete(o);
|
|
4163
4245
|
}
|
|
4164
4246
|
}
|
|
4165
4247
|
/**
|
|
@@ -4251,8 +4333,8 @@
|
|
|
4251
4333
|
cleanupStaleIndices(e = 300 * 1e3) {
|
|
4252
4334
|
const t = Date.now();
|
|
4253
4335
|
let n = 0;
|
|
4254
|
-
for (const [s,
|
|
4255
|
-
t -
|
|
4336
|
+
for (const [s, o] of this.indexMetadata)
|
|
4337
|
+
t - o.lastAccessedAt > e && (this.reset(s), n++);
|
|
4256
4338
|
return n;
|
|
4257
4339
|
}
|
|
4258
4340
|
/**
|
|
@@ -4262,37 +4344,37 @@
|
|
|
4262
4344
|
getStats() {
|
|
4263
4345
|
const e = this.getIndexCount(), t = Date.now();
|
|
4264
4346
|
let n = 0, s = 0;
|
|
4265
|
-
for (const
|
|
4266
|
-
const a = t -
|
|
4347
|
+
for (const i of this.indexMetadata.values()) {
|
|
4348
|
+
const a = t - i.createdAt;
|
|
4267
4349
|
n += a, a > s && (s = a);
|
|
4268
4350
|
}
|
|
4269
|
-
const
|
|
4351
|
+
const o = this.indexMetadata.size > 0 ? n / this.indexMetadata.size : 0;
|
|
4270
4352
|
return {
|
|
4271
4353
|
shallow: e.shallow,
|
|
4272
4354
|
deep: e.deep,
|
|
4273
4355
|
total: e.total,
|
|
4274
4356
|
oldestAge: s,
|
|
4275
|
-
avgAge:
|
|
4357
|
+
avgAge: o
|
|
4276
4358
|
};
|
|
4277
4359
|
}
|
|
4278
4360
|
}
|
|
4279
4361
|
const R$1 = "__";
|
|
4280
|
-
function
|
|
4281
|
-
const
|
|
4362
|
+
function ir$1(r, e, t = { key: "root" }, n = "root", s = new lu(), o) {
|
|
4363
|
+
const i = o || r;
|
|
4282
4364
|
for (const a of e.columns)
|
|
4283
|
-
a.attribute && (S$2.parse(a.attribute), s.getOrCreateIndex(a.attribute,
|
|
4365
|
+
a.attribute && (S$2.parse(a.attribute), s.getOrCreateIndex(a.attribute, i));
|
|
4284
4366
|
for (const a of e.rows)
|
|
4285
|
-
a.attribute && (S$2.parse(a.attribute), s.getOrCreateIndex(a.attribute,
|
|
4367
|
+
a.attribute && (S$2.parse(a.attribute), s.getOrCreateIndex(a.attribute, i));
|
|
4286
4368
|
for (const a of e.values)
|
|
4287
|
-
a.attribute && (S$2.parse(a.attribute), s.getOrCreateIndex(a.attribute,
|
|
4369
|
+
a.attribute && (S$2.parse(a.attribute), s.getOrCreateIndex(a.attribute, i));
|
|
4288
4370
|
if (e.rows && e.rows.length > 0) {
|
|
4289
4371
|
t.rows = t.rows || [];
|
|
4290
|
-
const a = du(r, e.rows[0], e, s, n,
|
|
4372
|
+
const a = du(r, e.rows[0], e, s, n, o);
|
|
4291
4373
|
t.rows.push(a);
|
|
4292
4374
|
}
|
|
4293
4375
|
if (e.columns && e.columns.length > 0) {
|
|
4294
4376
|
t.columns = t.columns || [];
|
|
4295
|
-
const a = ar$1(r, e.columns[0], e, s, n,
|
|
4377
|
+
const a = ar$1(r, e.columns[0], e, s, n, o);
|
|
4296
4378
|
t.columns.push(a);
|
|
4297
4379
|
}
|
|
4298
4380
|
if (t.key === "root")
|
|
@@ -4304,10 +4386,10 @@
|
|
|
4304
4386
|
}
|
|
4305
4387
|
return t;
|
|
4306
4388
|
}
|
|
4307
|
-
function du(r, e, t, n, s = "",
|
|
4308
|
-
const
|
|
4389
|
+
function du(r, e, t, n, s = "", o) {
|
|
4390
|
+
const i = { key: e.attribute }, a = n.getIndex(e.attribute);
|
|
4309
4391
|
if (!a)
|
|
4310
|
-
return
|
|
4392
|
+
return i;
|
|
4311
4393
|
for (const [u, c] of a.entries()) {
|
|
4312
4394
|
const f = {
|
|
4313
4395
|
key: u,
|
|
@@ -4322,15 +4404,15 @@
|
|
|
4322
4404
|
const h = Ke$2(d, l, n.getIndex(d.attribute), d.attribute);
|
|
4323
4405
|
f.values.push(h);
|
|
4324
4406
|
}
|
|
4325
|
-
if (
|
|
4407
|
+
if (i.rows = i.rows || [], i.rows.push(f), t.rows.length > 1) {
|
|
4326
4408
|
const d = { ...t, rows: t.rows.slice(1) };
|
|
4327
|
-
|
|
4409
|
+
ir$1(
|
|
4328
4410
|
l,
|
|
4329
4411
|
d,
|
|
4330
4412
|
f,
|
|
4331
4413
|
s + R$1 + e.attribute + R$1 + u,
|
|
4332
4414
|
n,
|
|
4333
|
-
|
|
4415
|
+
o
|
|
4334
4416
|
);
|
|
4335
4417
|
} else if (t.columns)
|
|
4336
4418
|
for (const d of t.columns) {
|
|
@@ -4341,18 +4423,18 @@
|
|
|
4341
4423
|
t,
|
|
4342
4424
|
n,
|
|
4343
4425
|
s + R$1 + e.attribute + R$1 + u,
|
|
4344
|
-
|
|
4426
|
+
o
|
|
4345
4427
|
);
|
|
4346
4428
|
f.columns.push(h);
|
|
4347
4429
|
}
|
|
4348
4430
|
}
|
|
4349
4431
|
}
|
|
4350
|
-
return
|
|
4432
|
+
return i;
|
|
4351
4433
|
}
|
|
4352
|
-
function ar$1(r, e, t, n, s = "",
|
|
4353
|
-
const
|
|
4434
|
+
function ar$1(r, e, t, n, s = "", o) {
|
|
4435
|
+
const i = { key: e.attribute }, a = n.getIndex(e.attribute);
|
|
4354
4436
|
if (!a)
|
|
4355
|
-
return
|
|
4437
|
+
return i;
|
|
4356
4438
|
for (const [u, c] of a.entries()) {
|
|
4357
4439
|
const f = {
|
|
4358
4440
|
key: u,
|
|
@@ -4367,32 +4449,32 @@
|
|
|
4367
4449
|
const h = Ke$2(d, l, n.getIndex(d.attribute), d.attribute);
|
|
4368
4450
|
f.values.push(h);
|
|
4369
4451
|
}
|
|
4370
|
-
if (
|
|
4452
|
+
if (i.columns = i.columns || [], i.columns.push(f), t.columns.length > 1) {
|
|
4371
4453
|
const d = { ...t, columns: t.columns.slice(1) };
|
|
4372
|
-
|
|
4454
|
+
ir$1(
|
|
4373
4455
|
l,
|
|
4374
4456
|
d,
|
|
4375
4457
|
f,
|
|
4376
4458
|
s + R$1 + e.attribute + R$1 + u,
|
|
4377
4459
|
n,
|
|
4378
|
-
|
|
4460
|
+
o
|
|
4379
4461
|
);
|
|
4380
4462
|
}
|
|
4381
4463
|
}
|
|
4382
4464
|
}
|
|
4383
|
-
return
|
|
4465
|
+
return i;
|
|
4384
4466
|
}
|
|
4385
4467
|
const hu = /^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}(:\d{2}(\.\d+)?)?(Z|[+-]\d{2}:\d{2})?)?$/, pu = /^-?\d+$/, gu = /^-?\d+\.\d+$/, yu = /^\d{1,2}([/.-])\d{1,2}\1\d{2,4}$/, mu = (r) => r === "true" || r === "false" ? "boolean" : pu.test(r) ? "int" : gu.test(r) ? "float" : hu.test(r) && !Number.isNaN(Date.parse(r)) ? "date" : "string", bu = (r) => yu.test(r), vu = (r) => r == null || r === "", wu = (r) => {
|
|
4386
4468
|
const e = [...r];
|
|
4387
4469
|
return e.length <= 1 ? { type: e[0] ?? "any", conflict: false } : e.every((t) => t === "int" || t === "float") ? { type: "float", conflict: false } : { type: "any", conflict: true };
|
|
4388
4470
|
}, Au = (r, e = {}) => {
|
|
4389
|
-
const t = e.deep ?? (e.sampleSize !== void 0 && e.sampleSize > 1) ? e.sampleSize ?? 1 / 0 : 1, n = e.coerceStrings ?? true, s = /* @__PURE__ */ new Map(),
|
|
4390
|
-
for (let c = 0; c <
|
|
4471
|
+
const t = e.deep ?? (e.sampleSize !== void 0 && e.sampleSize > 1) ? e.sampleSize ?? 1 / 0 : 1, n = e.coerceStrings ?? true, s = /* @__PURE__ */ new Map(), o = [], i = Math.min(r.length, t);
|
|
4472
|
+
for (let c = 0; c < i; c++) {
|
|
4391
4473
|
const f = r[c];
|
|
4392
4474
|
if (f)
|
|
4393
4475
|
for (const [l, d] of Object.entries(f)) {
|
|
4394
4476
|
let h = s.get(l);
|
|
4395
|
-
if (h || (h = { observed: /* @__PURE__ */ new Set(), empty: 0, scanned: 0 }, s.set(l, h),
|
|
4477
|
+
if (h || (h = { observed: /* @__PURE__ */ new Set(), empty: 0, scanned: 0 }, s.set(l, h), o.push(l)), h.scanned++, vu(d)) {
|
|
4396
4478
|
h.empty++;
|
|
4397
4479
|
continue;
|
|
4398
4480
|
}
|
|
@@ -4401,7 +4483,7 @@
|
|
|
4401
4483
|
}
|
|
4402
4484
|
}
|
|
4403
4485
|
const a = [], u = [];
|
|
4404
|
-
for (const c of
|
|
4486
|
+
for (const c of o) {
|
|
4405
4487
|
const f = s.get(c), { type: l, conflict: d } = wu(f.observed.size ? f.observed : /* @__PURE__ */ new Set(["string"]));
|
|
4406
4488
|
a.push({ key: c, type: l }), u.push({
|
|
4407
4489
|
column: c,
|
|
@@ -4435,7 +4517,7 @@
|
|
|
4435
4517
|
globalItemService;
|
|
4436
4518
|
modelParser;
|
|
4437
4519
|
registeredCustomOperator = /* @__PURE__ */ new Map();
|
|
4438
|
-
queryBuilder = new
|
|
4520
|
+
queryBuilder = new or$1();
|
|
4439
4521
|
registerCustomOperator(e, t) {
|
|
4440
4522
|
this.registeredCustomOperator.set(e, t);
|
|
4441
4523
|
}
|
|
@@ -4452,42 +4534,42 @@
|
|
|
4452
4534
|
let n = e.value;
|
|
4453
4535
|
const s = e.options?.arrayValueHandling || "some";
|
|
4454
4536
|
Array.isArray(e.options?.transform) && e.options.transform.length > 0 && (n = this.transformValue(n, e.options.transform));
|
|
4455
|
-
let
|
|
4456
|
-
if (Array.isArray(e.options?.transform) && e.options.transform.length > 0 && (
|
|
4537
|
+
let o = this.getAttributeValue(t, e.attribute);
|
|
4538
|
+
if (Array.isArray(e.options?.transform) && e.options.transform.length > 0 && (o = this.transformValue(o, e.options.transform)), (typeof o > "u" || o === null) && !["typeof", "isTruthy", "eq", "in"].includes(e.operator))
|
|
4457
4539
|
return false;
|
|
4458
|
-
let
|
|
4540
|
+
let i;
|
|
4459
4541
|
switch (e.operator) {
|
|
4460
4542
|
case "eq":
|
|
4461
|
-
|
|
4543
|
+
i = this.queryEq(o, n, s);
|
|
4462
4544
|
break;
|
|
4463
4545
|
case "in":
|
|
4464
|
-
|
|
4546
|
+
i = this.queryIn(o, n, s);
|
|
4465
4547
|
break;
|
|
4466
4548
|
case "find":
|
|
4467
|
-
|
|
4549
|
+
i = this.queryFind(o, n, s, e.options?.regexFlags);
|
|
4468
4550
|
break;
|
|
4469
4551
|
case "lt":
|
|
4470
4552
|
case "gt":
|
|
4471
4553
|
case "lte":
|
|
4472
4554
|
case "gte": {
|
|
4473
4555
|
const a = e.operator;
|
|
4474
|
-
|
|
4475
|
-
|
|
4556
|
+
i = this.matchValues(
|
|
4557
|
+
o,
|
|
4476
4558
|
s,
|
|
4477
4559
|
(u) => this.compareValue(a, u, n)
|
|
4478
4560
|
);
|
|
4479
4561
|
break;
|
|
4480
4562
|
}
|
|
4481
4563
|
case "typeof":
|
|
4482
|
-
|
|
4564
|
+
i = this.matchValues(o, s, (a) => typeof a === n);
|
|
4483
4565
|
break;
|
|
4484
4566
|
case "isTruthy": {
|
|
4485
4567
|
const a = n === true;
|
|
4486
|
-
|
|
4568
|
+
i = this.matchValues(o, s, (u) => !!u === a);
|
|
4487
4569
|
break;
|
|
4488
4570
|
}
|
|
4489
4571
|
case "size":
|
|
4490
|
-
typeof
|
|
4572
|
+
typeof o == "string" ? i = o.length === n : i = La(o) === n;
|
|
4491
4573
|
break;
|
|
4492
4574
|
default:
|
|
4493
4575
|
if (this.scriptController.hasScript(e.operator))
|
|
@@ -4499,7 +4581,7 @@
|
|
|
4499
4581
|
}
|
|
4500
4582
|
return false;
|
|
4501
4583
|
}
|
|
4502
|
-
return e.options?.invert ? !
|
|
4584
|
+
return e.options?.invert ? !i : i;
|
|
4503
4585
|
}
|
|
4504
4586
|
/** A missing value never compares — in JS `null >= 0` is true. */
|
|
4505
4587
|
compareValue(e, t, n) {
|
|
@@ -4530,13 +4612,13 @@
|
|
|
4530
4612
|
return W$2(e, t);
|
|
4531
4613
|
const n = t.split(".");
|
|
4532
4614
|
let s = e;
|
|
4533
|
-
for (let
|
|
4534
|
-
const
|
|
4615
|
+
for (let o = 0; o < n.length; o++) {
|
|
4616
|
+
const i = n[o];
|
|
4535
4617
|
if (s == null)
|
|
4536
4618
|
return;
|
|
4537
|
-
if (Array.isArray(s) &&
|
|
4538
|
-
return K$2(s, n.slice(
|
|
4539
|
-
s = s[
|
|
4619
|
+
if (Array.isArray(s) && i !== "length" && !/^\d+$/.test(i))
|
|
4620
|
+
return K$2(s, n.slice(o).join("."));
|
|
4621
|
+
s = s[i];
|
|
4540
4622
|
}
|
|
4541
4623
|
return s;
|
|
4542
4624
|
}
|
|
@@ -4563,7 +4645,7 @@
|
|
|
4563
4645
|
return !Array.isArray(t) || t.length === 0 ? false : this.matchValues(
|
|
4564
4646
|
e,
|
|
4565
4647
|
n,
|
|
4566
|
-
(s) => t.some((
|
|
4648
|
+
(s) => t.some((o) => this.equalsQueryValue(s, o))
|
|
4567
4649
|
);
|
|
4568
4650
|
}
|
|
4569
4651
|
/**
|
|
@@ -4592,21 +4674,21 @@
|
|
|
4592
4674
|
return e.options?.arrayValueHandling !== "every" && !e.options?.transform?.length;
|
|
4593
4675
|
}
|
|
4594
4676
|
evaluateEqOperator(e, t, n, s) {
|
|
4595
|
-
const
|
|
4596
|
-
if (
|
|
4677
|
+
const o = /* @__PURE__ */ new Map(), i = this.canUseIndex(t) ? s.get(t.attribute) : void 0;
|
|
4678
|
+
if (i) {
|
|
4597
4679
|
const a = this.getIndexKey(t.value);
|
|
4598
4680
|
if (typeof a < "u") {
|
|
4599
|
-
const u =
|
|
4681
|
+
const u = i.get(a);
|
|
4600
4682
|
if (u)
|
|
4601
4683
|
if (u.forEach((c) => {
|
|
4602
|
-
n.has(c) &&
|
|
4684
|
+
n.has(c) && o.set(c, n.get(c));
|
|
4603
4685
|
}), t.options?.invert) {
|
|
4604
|
-
const c = gt(Array.from(n.values()), Array.from(
|
|
4686
|
+
const c = gt(Array.from(n.values()), Array.from(o.values()), "key"), f = /* @__PURE__ */ new Map();
|
|
4605
4687
|
return c.forEach((l) => {
|
|
4606
4688
|
f.set(l.key, l);
|
|
4607
4689
|
}), f;
|
|
4608
4690
|
} else
|
|
4609
|
-
return
|
|
4691
|
+
return o;
|
|
4610
4692
|
}
|
|
4611
4693
|
}
|
|
4612
4694
|
return this.scanDataset(e, t, n);
|
|
@@ -4618,46 +4700,46 @@
|
|
|
4618
4700
|
* the result equals the scan's.
|
|
4619
4701
|
*/
|
|
4620
4702
|
evaluateInOperator(e, t, n, s) {
|
|
4621
|
-
const
|
|
4622
|
-
if (!
|
|
4703
|
+
const o = this.canUseIndex(t) ? s.get(t.attribute) : void 0;
|
|
4704
|
+
if (!o)
|
|
4623
4705
|
return this.scanDataset(e, t, n);
|
|
4624
|
-
const
|
|
4706
|
+
const i = /* @__PURE__ */ new Map(), a = [];
|
|
4625
4707
|
for (const c of t.value) {
|
|
4626
|
-
const f = this.getIndexKey(c), l = typeof f < "u" ?
|
|
4708
|
+
const f = this.getIndexKey(c), l = typeof f < "u" ? o.get(f) : void 0;
|
|
4627
4709
|
if (!l) {
|
|
4628
4710
|
a.push(c);
|
|
4629
4711
|
continue;
|
|
4630
4712
|
}
|
|
4631
4713
|
l.forEach((d) => {
|
|
4632
4714
|
const h = n.get(d);
|
|
4633
|
-
h &&
|
|
4715
|
+
h && i.set(d, h);
|
|
4634
4716
|
});
|
|
4635
4717
|
}
|
|
4636
4718
|
if (a.length > 0) {
|
|
4637
4719
|
const c = /* @__PURE__ */ new Map();
|
|
4638
4720
|
n.forEach((l, d) => {
|
|
4639
|
-
|
|
4721
|
+
i.has(d) || c.set(d, l);
|
|
4640
4722
|
});
|
|
4641
4723
|
const f = {
|
|
4642
4724
|
...t,
|
|
4643
4725
|
value: a,
|
|
4644
4726
|
options: { ...t.options, invert: false }
|
|
4645
4727
|
};
|
|
4646
|
-
this.scanDataset(e, f, c).forEach((l, d) =>
|
|
4728
|
+
this.scanDataset(e, f, c).forEach((l, d) => i.set(d, l));
|
|
4647
4729
|
}
|
|
4648
4730
|
if (!t.options?.invert)
|
|
4649
|
-
return
|
|
4731
|
+
return i;
|
|
4650
4732
|
const u = /* @__PURE__ */ new Map();
|
|
4651
4733
|
return n.forEach((c, f) => {
|
|
4652
|
-
|
|
4734
|
+
i.has(f) || u.set(f, c);
|
|
4653
4735
|
}), u;
|
|
4654
4736
|
}
|
|
4655
4737
|
/** Evaluates `query` on each item, resolving a deep path's references first. */
|
|
4656
4738
|
scanDataset(e, t, n) {
|
|
4657
|
-
const s = /* @__PURE__ */ new Map(),
|
|
4739
|
+
const s = /* @__PURE__ */ new Map(), o = this.queryBuilder.extractQueryAttributes({ queries: [t] }).filter((a) => a.isDeepQuery), i = o.length > 0 ? this.queryBuilder.getProjectionForAttributeEntries(o) : void 0;
|
|
4658
4740
|
for (let [a, u] of n)
|
|
4659
|
-
|
|
4660
|
-
|
|
4741
|
+
i && (u = this.globalItemService.getProjectedData(
|
|
4742
|
+
i,
|
|
4661
4743
|
this.modelParser.models.get(e.modelKey),
|
|
4662
4744
|
u
|
|
4663
4745
|
)), this.evaluateQuery(t, u) && s.set(a, u);
|
|
@@ -4672,12 +4754,12 @@
|
|
|
4672
4754
|
return false;
|
|
4673
4755
|
}
|
|
4674
4756
|
else return Array.isArray(e) ? !!e.find(
|
|
4675
|
-
(
|
|
4757
|
+
(o) => me$1(o, t, (i, a) => this.equalRegexFn(i, a, n))
|
|
4676
4758
|
) : typeof t == "object" ? yt(e, t) : e === t;
|
|
4677
4759
|
}
|
|
4678
4760
|
queryFind(e, t, n, s) {
|
|
4679
|
-
const
|
|
4680
|
-
return Array.isArray(e) ? typeof t == "string" || typeof t == "number" || typeof t == "boolean" ? this.matchValues(e, n, (
|
|
4761
|
+
const o = (i, a) => this.equalRegexFn(i, a, s);
|
|
4762
|
+
return Array.isArray(e) ? typeof t == "string" || typeof t == "number" || typeof t == "boolean" ? this.matchValues(e, n, (i) => me$1(i, t, o)) : t !== null && typeof t == "object" ? this.matchValues(e, n, (i) => yt(i, t)) : !!ba(e, t) : me$1(e, t, o);
|
|
4681
4763
|
}
|
|
4682
4764
|
validateQuery(e) {
|
|
4683
4765
|
if (this.queryBuilder.isQuery(e)) {
|
|
@@ -4695,9 +4777,9 @@
|
|
|
4695
4777
|
}
|
|
4696
4778
|
}
|
|
4697
4779
|
getEvaluatedQueryDataset(e, t, n, s) {
|
|
4698
|
-
const
|
|
4780
|
+
const o = /* @__PURE__ */ new Map();
|
|
4699
4781
|
if (t.attribute.includes("[*]")) {
|
|
4700
|
-
const
|
|
4782
|
+
const i = t.options?.invert === true, a = /* @__PURE__ */ new Set();
|
|
4701
4783
|
for (let u of n.values()) {
|
|
4702
4784
|
const c = this.queryBuilder.extractQueryAttributes({ queries: [t] });
|
|
4703
4785
|
if (c.some((l) => l.isDeepQuery)) {
|
|
@@ -4718,13 +4800,13 @@
|
|
|
4718
4800
|
f,
|
|
4719
4801
|
t.options?.arrayValueHandling || "some",
|
|
4720
4802
|
(l) => this.evaluateQuery(l, u)
|
|
4721
|
-
) && (a.add(u.key),
|
|
4803
|
+
) && (a.add(u.key), i || o.set(u.key, u));
|
|
4722
4804
|
}
|
|
4723
|
-
if (
|
|
4805
|
+
if (i)
|
|
4724
4806
|
for (const [u, c] of n)
|
|
4725
|
-
a.has(u) ||
|
|
4807
|
+
a.has(u) || o.set(u, c);
|
|
4726
4808
|
} else return t.operator === "eq" ? this.evaluateEqOperator(e, t, n, s) : t.operator === "in" ? this.evaluateInOperator(e, t, n, s) : this.scanDataset(e, t, n);
|
|
4727
|
-
return
|
|
4809
|
+
return o;
|
|
4728
4810
|
}
|
|
4729
4811
|
handleArrayStarQuery(e, t) {
|
|
4730
4812
|
const n = e.attribute.indexOf("[*]"), s = {
|
|
@@ -4733,9 +4815,9 @@
|
|
|
4733
4815
|
queries: []
|
|
4734
4816
|
};
|
|
4735
4817
|
if (n !== -1) {
|
|
4736
|
-
const
|
|
4737
|
-
if (Array.isArray(
|
|
4738
|
-
for (let a = 0; a <
|
|
4818
|
+
const o = e.attribute.substring(0, n), i = o.includes(".") ? W$2(t, o) : t[o];
|
|
4819
|
+
if (Array.isArray(i))
|
|
4820
|
+
for (let a = 0; a < i.length; a++) {
|
|
4739
4821
|
const u = e.attribute.replace("[*]", `[${a}]`);
|
|
4740
4822
|
s.queries.push({
|
|
4741
4823
|
attribute: u,
|
|
@@ -4747,30 +4829,31 @@
|
|
|
4747
4829
|
}
|
|
4748
4830
|
return s;
|
|
4749
4831
|
}
|
|
4750
|
-
evaluateQueryGroup(e, t, n, s,
|
|
4751
|
-
let
|
|
4832
|
+
evaluateQueryGroup(e, t, n, s, o) {
|
|
4833
|
+
let i = /* @__PURE__ */ new Map(), a = n;
|
|
4752
4834
|
if (!t.queries || t.queries?.length === 0)
|
|
4753
4835
|
return a;
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4836
|
+
const u = t.groupType === "or";
|
|
4837
|
+
for (const c of t.queries) {
|
|
4838
|
+
let f = /* @__PURE__ */ new Map();
|
|
4839
|
+
if (this.queryBuilder.isQuery(c) ? f = this.getEvaluatedQueryDataset(e, c, a, o) : f = this.evaluateQueryGroup(e, c, a, s, o), i.size === 0 && (i = f), u)
|
|
4840
|
+
f.forEach((l) => {
|
|
4841
|
+
i.set(l.key, l);
|
|
4842
|
+
}), a = n;
|
|
4760
4843
|
else {
|
|
4761
|
-
const
|
|
4762
|
-
for (const
|
|
4763
|
-
|
|
4844
|
+
const l = gt(Array.from(i.values()), Array.from(f.values()), "key");
|
|
4845
|
+
for (const d of l)
|
|
4846
|
+
i.delete(d.key);
|
|
4847
|
+
a = i;
|
|
4764
4848
|
}
|
|
4765
|
-
t.groupType === "and" ? a = o : a = n;
|
|
4766
4849
|
}
|
|
4767
|
-
return
|
|
4850
|
+
return i;
|
|
4768
4851
|
}
|
|
4769
4852
|
queryData(e, t, n, s) {
|
|
4770
4853
|
if (t.queries.length === 0)
|
|
4771
4854
|
return e;
|
|
4772
|
-
const
|
|
4773
|
-
return t.groupKey || (t.groupKey = "root"), t.groupType || (t.groupType = "and"), t.queries || (t.queries = []), this.validateQuery(t), this.evaluateQueryGroup(t, t,
|
|
4855
|
+
const o = new Map(e);
|
|
4856
|
+
return t.groupKey || (t.groupKey = "root"), t.groupType || (t.groupType = "and"), t.queries || (t.queries = []), this.validateQuery(t), this.evaluateQueryGroup(t, t, o, n, s);
|
|
4774
4857
|
}
|
|
4775
4858
|
// public getRelevantQueryData(data: any, options: DcuplGlobalQueryOptions<any>, model: DcuplModel<ListItem>) {
|
|
4776
4859
|
// // detect if any of the query attributes are a deep query.
|
|
@@ -4841,8 +4924,8 @@
|
|
|
4841
4924
|
const n = this.getScript(e);
|
|
4842
4925
|
if (!n)
|
|
4843
4926
|
throw new Error(`Script ${e} not found`);
|
|
4844
|
-
const s = this.getWrapperScript(n),
|
|
4845
|
-
return this.scriptFunctions.set(e,
|
|
4927
|
+
const s = this.getWrapperScript(n), o = new Function("script_type", ...t, s);
|
|
4928
|
+
return this.scriptFunctions.set(e, o), o;
|
|
4846
4929
|
}
|
|
4847
4930
|
getWrapperScript(e) {
|
|
4848
4931
|
return `
|
|
@@ -4854,18 +4937,18 @@
|
|
|
4854
4937
|
if (!this.getScript(e))
|
|
4855
4938
|
throw new Error(`Script ${e} not found`);
|
|
4856
4939
|
n.context || (n.context = n.options || {});
|
|
4857
|
-
const s = Object.keys(n),
|
|
4858
|
-
return this.getScriptAsFn(e, s)(t, ...
|
|
4940
|
+
const s = Object.keys(n), o = Object.values(n);
|
|
4941
|
+
return this.getScriptAsFn(e, s)(t, ...o);
|
|
4859
4942
|
}
|
|
4860
4943
|
}
|
|
4861
4944
|
const Pu = (r, e) => r ? (e || (e = {}), r.replace(/\$\{(.*?)\}/g, (t, n) => W$2(e, n.trim(), ""))) : "", Ru = (r) => {
|
|
4862
4945
|
const e = /* @__PURE__ */ new Set();
|
|
4863
4946
|
return r.replace(/\$\{(.*?)\}/g, (t, n) => (e.add(n.trim()), "")), { variables: Array.from(e).map((t) => ({ name: t })) };
|
|
4864
4947
|
};
|
|
4865
|
-
var U$2 = pn$1(function(
|
|
4866
|
-
return ye(
|
|
4948
|
+
var U$2 = pn$1(function(M2, e) {
|
|
4949
|
+
return ye(M2) ? da(M2, qs$1(e, 1, ye)) : [];
|
|
4867
4950
|
});
|
|
4868
|
-
let
|
|
4951
|
+
let $$1 = class $ {
|
|
4869
4952
|
constructor(e, t, r, i, n) {
|
|
4870
4953
|
this.modelParser = e, this.cdRef = t, this.item = r, this.indicesController = i, this.queryManager = n, this.cacheCtrl = new _u(!!this.cdRef.dcuplInitOptions.performance?.cache?.enabled);
|
|
4871
4954
|
}
|
|
@@ -4893,8 +4976,18 @@
|
|
|
4893
4976
|
* Cache for projected data keyed by projection signature
|
|
4894
4977
|
*/
|
|
4895
4978
|
projectionCache = /* @__PURE__ */ new Map();
|
|
4979
|
+
/**
|
|
4980
|
+
* The other models this list's current results were read through: every
|
|
4981
|
+
* model on a dotted path (`memberships.user.daysInactive` on `project` reads
|
|
4982
|
+
* `membership` and `user`) that a query, facet, aggregate, groupBy, pivot or
|
|
4983
|
+
* suggestion resolved since the caches were last dropped. dcupl.update()
|
|
4984
|
+
* treats the list as affected when any of them changes (#284). Cleared
|
|
4985
|
+
* together with the caches: after that nothing cached can be stale, and the
|
|
4986
|
+
* next read registers the paths it resolves again.
|
|
4987
|
+
*/
|
|
4988
|
+
dependencyModels = /* @__PURE__ */ new Set();
|
|
4896
4989
|
init(e, t) {
|
|
4897
|
-
this.model = e, this.initialData = t, this.filteredData = this.initialData, this.queryBuilder = new
|
|
4990
|
+
this.model = e, this.initialData = t, this.filteredData = this.initialData, this.queryBuilder = new or$1(), this.queryBuilder.init({ modelKey: e.key }), this.initFilterItems({ skipProcessing: true });
|
|
4898
4991
|
}
|
|
4899
4992
|
/**
|
|
4900
4993
|
* Checks if a deep query index depends on any of the changed attributes
|
|
@@ -4923,7 +5016,7 @@
|
|
|
4923
5016
|
* @param changedAttributes - Optional set of changed attributes for granular invalidation
|
|
4924
5017
|
*/
|
|
4925
5018
|
invalidateAllCaches(e) {
|
|
4926
|
-
this.cacheCtrl.clear(), this.projectionCache.clear();
|
|
5019
|
+
this.cacheCtrl.clear(), this.projectionCache.clear(), this.dependencyModels.clear();
|
|
4927
5020
|
let t = 0;
|
|
4928
5021
|
if (e && e.size > 0) {
|
|
4929
5022
|
const i = this.indicesController.getDeepIndexKeys(), n = [];
|
|
@@ -4984,7 +5077,29 @@
|
|
|
4984
5077
|
const t = this.getDeepQueryAttributes(e);
|
|
4985
5078
|
if (t.length === 0) return null;
|
|
4986
5079
|
const r = t.map((i) => S$2.parse(i));
|
|
4987
|
-
return this.
|
|
5080
|
+
return this.projectionFor(r);
|
|
5081
|
+
}
|
|
5082
|
+
/**
|
|
5083
|
+
* Builds the projection that resolves `entries` on this list's items and
|
|
5084
|
+
* records the models it reads through in {@link dependencyModels}. Every
|
|
5085
|
+
* deep-path read of this list goes through here, so the set is complete.
|
|
5086
|
+
*/
|
|
5087
|
+
projectionFor(e) {
|
|
5088
|
+
const t = this.queryBuilder.getProjectionForAttributeEntries(e);
|
|
5089
|
+
return this.item.getProjectionModels(t, this.model, this.dependencyModels), t;
|
|
5090
|
+
}
|
|
5091
|
+
/** The models a path to `attribute` reads through (not this list's own). */
|
|
5092
|
+
pathModels(e) {
|
|
5093
|
+
const t = S$2.parse(e);
|
|
5094
|
+
return t.isDeepQuery ? this.item.getProjectionModels(this.projectionFor([t]), this.model) : /* @__PURE__ */ new Set();
|
|
5095
|
+
}
|
|
5096
|
+
/**
|
|
5097
|
+
* The models other than this list's own that its cached results depend on
|
|
5098
|
+
* (see {@link dependencyModels}).
|
|
5099
|
+
* @internal
|
|
5100
|
+
*/
|
|
5101
|
+
getDependencyModels() {
|
|
5102
|
+
return this.dependencyModels;
|
|
4988
5103
|
}
|
|
4989
5104
|
/**
|
|
4990
5105
|
* Generate cache key from deep query attributes
|
|
@@ -5016,9 +5131,7 @@
|
|
|
5016
5131
|
getProjectedInitialData(e) {
|
|
5017
5132
|
const t = new Set(this.getDeepQueryAttributes(this.queryBuilder.getQuery()));
|
|
5018
5133
|
t.add(e);
|
|
5019
|
-
const r = Array.from(t).sort(), i = this.
|
|
5020
|
-
r.map((n) => S$2.parse(n))
|
|
5021
|
-
);
|
|
5134
|
+
const r = Array.from(t).sort(), i = this.projectionFor(r.map((n) => S$2.parse(n)));
|
|
5022
5135
|
return this.getProjectedData(this.initialData, i, r.join("|"));
|
|
5023
5136
|
}
|
|
5024
5137
|
initFilterItems(e) {
|
|
@@ -5049,32 +5162,32 @@
|
|
|
5049
5162
|
throw new Error("Attribute not found");
|
|
5050
5163
|
let s = /* @__PURE__ */ new Map(), a;
|
|
5051
5164
|
!i && n && (n.type === "singleValued" || n.type === "multiValued") && (a = this.modelParser.models.get(n.model));
|
|
5052
|
-
const
|
|
5053
|
-
|
|
5054
|
-
let
|
|
5165
|
+
const c = {}, l = this.getSortingProjectionForModel(e, this.model);
|
|
5166
|
+
c.sort = l;
|
|
5167
|
+
let o = this.item.getItemsAsMap(this.filteredData, this.model, c);
|
|
5055
5168
|
if (i) {
|
|
5056
|
-
const d = this.
|
|
5057
|
-
for (const [y2, C2] of
|
|
5058
|
-
const
|
|
5059
|
-
g2.set(y2,
|
|
5169
|
+
const d = this.projectionFor([r]), g2 = /* @__PURE__ */ new Map();
|
|
5170
|
+
for (const [y2, C2] of o) {
|
|
5171
|
+
const v2 = this.item.getProjectedData(d, this.model, C2);
|
|
5172
|
+
g2.set(y2, v2);
|
|
5060
5173
|
}
|
|
5061
|
-
|
|
5174
|
+
o = g2;
|
|
5062
5175
|
}
|
|
5063
|
-
const f = this.indicesController.getOrCreateIndex(`${e.attribute}`,
|
|
5176
|
+
const f = this.indicesController.getOrCreateIndex(`${e.attribute}`, o, {
|
|
5064
5177
|
childLevelSorting: l,
|
|
5065
5178
|
query: this.queryBuilder.getQuery()
|
|
5066
|
-
}),
|
|
5179
|
+
}), u = this.getAggregate(
|
|
5067
5180
|
{ attribute: e.attribute, types: ["distinct"], excludeUndefineds: true },
|
|
5068
|
-
|
|
5181
|
+
o,
|
|
5069
5182
|
f
|
|
5070
5183
|
);
|
|
5071
|
-
if (
|
|
5072
|
-
for (const d of
|
|
5184
|
+
if (u.distinct)
|
|
5185
|
+
for (const d of u.distinct) {
|
|
5073
5186
|
let g2 = { key: d.value, value: d.value };
|
|
5074
|
-
const y2 = d.keys.filter((
|
|
5187
|
+
const y2 = d.keys.filter((v2) => o.has(v2));
|
|
5075
5188
|
if (a) {
|
|
5076
|
-
const
|
|
5077
|
-
|
|
5189
|
+
const v2 = a.data.get(d.value);
|
|
5190
|
+
v2 && (g2 = v2);
|
|
5078
5191
|
}
|
|
5079
5192
|
const C2 = {
|
|
5080
5193
|
...g2,
|
|
@@ -5096,25 +5209,25 @@
|
|
|
5096
5209
|
const d = this.getSortingProjectionForModel(e, a);
|
|
5097
5210
|
h.sort = d;
|
|
5098
5211
|
}
|
|
5099
|
-
if (t._meta.currentSize = s.size, t._meta.initialSize =
|
|
5100
|
-
const g2 =
|
|
5212
|
+
if (t._meta.currentSize = s.size, t._meta.initialSize = u.distinct.length, s = this.item.getItemsAsMap(s, a, h), Array.isArray(e?.aggregates) && s.forEach((d) => {
|
|
5213
|
+
const g2 = u.distinct.find((C2) => C2.value === d.key), y2 = this.getDataByKeys(o, g2.keys);
|
|
5101
5214
|
d._aggregates = e.aggregates.map((C2) => {
|
|
5102
|
-
const
|
|
5215
|
+
const v2 = this.indicesController.getOrCreateIndex(`${C2.attribute}`, y2, {
|
|
5103
5216
|
section: d.key,
|
|
5104
5217
|
childLevelSorting: l,
|
|
5105
5218
|
query: this.queryBuilder.getQuery()
|
|
5106
5219
|
});
|
|
5107
|
-
return this.getAggregate(C2, y2,
|
|
5220
|
+
return this.getAggregate(C2, y2, v2);
|
|
5108
5221
|
});
|
|
5109
5222
|
}), e?.items) {
|
|
5110
5223
|
const d = e.items?.find((g2) => g2.key === "*");
|
|
5111
5224
|
d ? s.forEach((g2) => {
|
|
5112
|
-
const y2 =
|
|
5113
|
-
g2._items =
|
|
5225
|
+
const y2 = u.distinct.find((x2) => x2.value === g2.key), C2 = this.getDataByKeys(o, y2.keys), v2 = this.item.getItems(C2, this.model, d);
|
|
5226
|
+
g2._items = v2;
|
|
5114
5227
|
}) : s.forEach((g2) => {
|
|
5115
5228
|
const y2 = e.items?.find((C2) => C2.key === g2.key);
|
|
5116
5229
|
if (y2) {
|
|
5117
|
-
const C2 =
|
|
5230
|
+
const C2 = u.distinct.find((F2) => F2.value === g2.key), v2 = this.getDataByKeys(o, C2.keys), x2 = this.item.getItems(v2, this.model, y2);
|
|
5118
5231
|
g2._items = x2;
|
|
5119
5232
|
}
|
|
5120
5233
|
});
|
|
@@ -5157,14 +5270,14 @@
|
|
|
5157
5270
|
const a = this.model.properties.get(i);
|
|
5158
5271
|
if (a)
|
|
5159
5272
|
if (Array.isArray(a.filter)) {
|
|
5160
|
-
a.filter.forEach((
|
|
5161
|
-
const l =
|
|
5162
|
-
this.updateFilterItemProperty(
|
|
5273
|
+
a.filter.forEach((c) => {
|
|
5274
|
+
const l = c?.comparisonType || "containsIgnoreCase";
|
|
5275
|
+
this.updateFilterItemProperty(c.key, a.key, a.type, l, s);
|
|
5163
5276
|
});
|
|
5164
5277
|
return;
|
|
5165
5278
|
} else {
|
|
5166
|
-
const
|
|
5167
|
-
this.updateFilterItemProperty(a.key, a.key, a.type,
|
|
5279
|
+
const c = a.filter?.comparisonType || "containsIgnoreCase";
|
|
5280
|
+
this.updateFilterItemProperty(a.key, a.key, a.type, c, s);
|
|
5168
5281
|
return;
|
|
5169
5282
|
}
|
|
5170
5283
|
if (e === "key") {
|
|
@@ -5190,36 +5303,36 @@
|
|
|
5190
5303
|
this.filterItems.set(s.key, s);
|
|
5191
5304
|
}
|
|
5192
5305
|
updateFilterItemProperty(e, t, r, i, n) {
|
|
5193
|
-
const s = this.getFilterTypeForPropertyType(r), a = this.queryBuilder.hasQueryGroup(e),
|
|
5306
|
+
const s = this.getFilterTypeForPropertyType(r), a = this.queryBuilder.hasQueryGroup(e), c = {
|
|
5194
5307
|
key: e,
|
|
5195
5308
|
attributeKey: t,
|
|
5196
5309
|
enabled: true,
|
|
5197
5310
|
selected: !!a,
|
|
5198
5311
|
type: s
|
|
5199
5312
|
};
|
|
5200
|
-
if (
|
|
5201
|
-
const l = this.getFacets(
|
|
5202
|
-
|
|
5313
|
+
if (c.type === "text" && (c.comparisonType = i), c.type === "boolean") {
|
|
5314
|
+
const l = this.getFacets(c.attributeKey, void 0, n);
|
|
5315
|
+
c.entries = l;
|
|
5203
5316
|
}
|
|
5204
|
-
n.skipProcessing || (
|
|
5317
|
+
n.skipProcessing || (c.type === "number" && (c.range = this.getNumberRangesForFilterItem(c)), c.type === "date" && (c.range = this.getDateRangesForFilterItem(c))), this.filterItems.set(c.key, c);
|
|
5205
5318
|
}
|
|
5206
5319
|
getNumberRange(e, t = e) {
|
|
5207
5320
|
let r = 1 / 0, i = -1 / 0;
|
|
5208
|
-
for (const
|
|
5209
|
-
const l =
|
|
5321
|
+
for (const c of this.filteredData.values()) {
|
|
5322
|
+
const l = c[e];
|
|
5210
5323
|
if (!(typeof l > "u" || l === null))
|
|
5211
5324
|
if (Array.isArray(l))
|
|
5212
|
-
for (const
|
|
5213
|
-
typeof
|
|
5325
|
+
for (const o of l)
|
|
5326
|
+
typeof o == "number" && (o < r && (r = o), o > i && (i = o));
|
|
5214
5327
|
else typeof l == "number" && (l < r && (r = l), l > i && (i = l));
|
|
5215
5328
|
}
|
|
5216
5329
|
let n = 1 / 0, s = -1 / 0;
|
|
5217
|
-
for (const
|
|
5218
|
-
const l =
|
|
5330
|
+
for (const c of this.initialData.values()) {
|
|
5331
|
+
const l = c[e];
|
|
5219
5332
|
if (!(typeof l > "u" || l === null))
|
|
5220
5333
|
if (Array.isArray(l))
|
|
5221
|
-
for (const
|
|
5222
|
-
typeof
|
|
5334
|
+
for (const o of l)
|
|
5335
|
+
typeof o == "number" && (o < n && (n = o), o > s && (s = o));
|
|
5223
5336
|
else typeof l == "number" && (l < n && (n = l), l > s && (s = l));
|
|
5224
5337
|
}
|
|
5225
5338
|
return r === 1 / 0 && (r = 0), i === -1 / 0 && (i = 0), n === 1 / 0 && (n = 0), s === -1 / 0 && (s = 0), {
|
|
@@ -5243,19 +5356,19 @@
|
|
|
5243
5356
|
getDateRange(e, t = e) {
|
|
5244
5357
|
let r = null, i = null;
|
|
5245
5358
|
for (const l of this.filteredData.values()) {
|
|
5246
|
-
const
|
|
5247
|
-
if (typeof
|
|
5248
|
-
const f = Array.isArray(
|
|
5249
|
-
for (const
|
|
5250
|
-
|
|
5359
|
+
const o = l[e];
|
|
5360
|
+
if (typeof o > "u" || o === null) continue;
|
|
5361
|
+
const f = Array.isArray(o) ? o : [o];
|
|
5362
|
+
for (const u of f)
|
|
5363
|
+
u instanceof Date && ((!r || u < r) && (r = u), (!i || u > i) && (i = u));
|
|
5251
5364
|
}
|
|
5252
5365
|
let n = null, s = null;
|
|
5253
5366
|
for (const l of this.initialData.values()) {
|
|
5254
|
-
const
|
|
5255
|
-
if (typeof
|
|
5256
|
-
const f = Array.isArray(
|
|
5257
|
-
for (const
|
|
5258
|
-
|
|
5367
|
+
const o = l[e];
|
|
5368
|
+
if (typeof o > "u" || o === null) continue;
|
|
5369
|
+
const f = Array.isArray(o) ? o : [o];
|
|
5370
|
+
for (const u of f)
|
|
5371
|
+
u instanceof Date && ((!n || u < n) && (n = u), (!s || u > s) && (s = u));
|
|
5259
5372
|
}
|
|
5260
5373
|
const a = /* @__PURE__ */ new Date();
|
|
5261
5374
|
return r || (r = a), i || (i = a), n || (n = a), s || (s = a), {
|
|
@@ -5275,38 +5388,38 @@
|
|
|
5275
5388
|
const s = this.cacheCtrl.generateContext({ attributeKey: e, query: this.queryBuilder.getQuery(), options: r }), a = this.cacheCtrl.get("facets", s);
|
|
5276
5389
|
if (a)
|
|
5277
5390
|
return a;
|
|
5278
|
-
let
|
|
5279
|
-
n = this.indicesController.getIndex(e), t ?
|
|
5391
|
+
let c = /* @__PURE__ */ new Map();
|
|
5392
|
+
n = this.indicesController.getIndex(e), t ? c = t.getData() : c = this.indicesController.getData(e);
|
|
5280
5393
|
let l = i || this.initialData;
|
|
5281
5394
|
if (!i) {
|
|
5282
|
-
const
|
|
5283
|
-
if (
|
|
5284
|
-
const h = this.
|
|
5395
|
+
const u = this.queryBuilder.getQueryAttributeForString(e);
|
|
5396
|
+
if (u.isDeepQuery) {
|
|
5397
|
+
const h = this.projectionFor([u]);
|
|
5285
5398
|
l = this.item.getItemsAsMap(l, this.model, {
|
|
5286
5399
|
projection: h
|
|
5287
5400
|
});
|
|
5288
5401
|
}
|
|
5289
5402
|
}
|
|
5290
|
-
if (!n || !
|
|
5403
|
+
if (!n || !c) {
|
|
5291
5404
|
this.indicesController.reset(e);
|
|
5292
|
-
const
|
|
5405
|
+
const u = S$2.parse(e), h = u.isDeepQuery;
|
|
5293
5406
|
let d = l;
|
|
5294
5407
|
if (h) {
|
|
5295
|
-
const g2 = this.
|
|
5408
|
+
const g2 = this.projectionFor([u]);
|
|
5296
5409
|
d = /* @__PURE__ */ new Map();
|
|
5297
5410
|
for (const [y2, C2] of l) {
|
|
5298
|
-
const
|
|
5299
|
-
d.set(y2,
|
|
5411
|
+
const v2 = this.item.getProjectedData(g2, this.model, C2);
|
|
5412
|
+
d.set(y2, v2);
|
|
5300
5413
|
}
|
|
5301
5414
|
}
|
|
5302
5415
|
d.forEach((g2) => {
|
|
5303
5416
|
let y2;
|
|
5304
5417
|
h ? (y2 = K$2(g2, e), y2.length === 0 && (y2 = [void 0])) : y2 = [g2[e]], this.indicesController.fillInverseIndex(e, g2.key, y2), this.indicesController.fillDataMap(e, y2);
|
|
5305
|
-
}), n = this.indicesController.getIndex(e), t || (
|
|
5418
|
+
}), n = this.indicesController.getIndex(e), t || (c = this.indicesController.getData(e));
|
|
5306
5419
|
}
|
|
5307
5420
|
const f = Qu(
|
|
5308
5421
|
l,
|
|
5309
|
-
|
|
5422
|
+
c,
|
|
5310
5423
|
r,
|
|
5311
5424
|
this.queryBuilder.getQuery(),
|
|
5312
5425
|
e,
|
|
@@ -5314,7 +5427,7 @@
|
|
|
5314
5427
|
this.queryManager
|
|
5315
5428
|
);
|
|
5316
5429
|
return this.cacheCtrl.set("facets", s, f, {
|
|
5317
|
-
models: /* @__PURE__ */ new Set([this.model.key]),
|
|
5430
|
+
models: /* @__PURE__ */ new Set([this.model.key, ...this.pathModels(e)]),
|
|
5318
5431
|
modelAttributes: /* @__PURE__ */ new Map([[this.model.key, /* @__PURE__ */ new Set([e])]])
|
|
5319
5432
|
}), f;
|
|
5320
5433
|
}
|
|
@@ -5382,19 +5495,20 @@
|
|
|
5382
5495
|
const n = this.queryBuilder.getQuery(), s = this.getProjectionForQuery(n);
|
|
5383
5496
|
let a;
|
|
5384
5497
|
if (s) {
|
|
5385
|
-
const
|
|
5386
|
-
|
|
5498
|
+
const l = this.getProjectionCacheKey(n), o = this.getProjectedData(e, s, l), f = this.queryManager.queryData(
|
|
5499
|
+
o,
|
|
5387
5500
|
n,
|
|
5388
5501
|
t,
|
|
5389
5502
|
this.indicesController.indexMap
|
|
5390
5503
|
);
|
|
5391
5504
|
a = /* @__PURE__ */ new Map();
|
|
5392
|
-
for (const
|
|
5393
|
-
e.has(
|
|
5505
|
+
for (const u of f.keys())
|
|
5506
|
+
e.has(u) && a.set(u, e.get(u));
|
|
5394
5507
|
} else
|
|
5395
5508
|
a = this.queryManager.queryData(e, n, t, this.indicesController.indexMap);
|
|
5509
|
+
const c = s ? this.item.getProjectionModels(s, this.model) : /* @__PURE__ */ new Set();
|
|
5396
5510
|
return this.cacheCtrl.set("data", r, a, {
|
|
5397
|
-
models: /* @__PURE__ */ new Set([this.model.key]),
|
|
5511
|
+
models: /* @__PURE__ */ new Set([this.model.key, ...c]),
|
|
5398
5512
|
modelAttributes: /* @__PURE__ */ new Map()
|
|
5399
5513
|
// Query may reference many attributes, track at model level
|
|
5400
5514
|
}), a;
|
|
@@ -5413,7 +5527,7 @@
|
|
|
5413
5527
|
return this.filterItems.has(e) && (t?.skipProcessing || this.updateFilterItem(e, t)), this.filterItems.get(e);
|
|
5414
5528
|
}
|
|
5415
5529
|
};
|
|
5416
|
-
let
|
|
5530
|
+
let L$2 = class L {
|
|
5417
5531
|
constructor(e, t) {
|
|
5418
5532
|
this.modelParser = e, this.scriptController = t;
|
|
5419
5533
|
}
|
|
@@ -5426,10 +5540,10 @@
|
|
|
5426
5540
|
getManyItems(e, t, r, i) {
|
|
5427
5541
|
const n = [];
|
|
5428
5542
|
for (const s of e) {
|
|
5429
|
-
const a = i?.projection || { $: true },
|
|
5430
|
-
if (!
|
|
5543
|
+
const a = i?.projection || { $: true }, c = t.get(s);
|
|
5544
|
+
if (!c)
|
|
5431
5545
|
continue;
|
|
5432
|
-
const l = this.getProjectedData(a, r,
|
|
5546
|
+
const l = this.getProjectedData(a, r, c);
|
|
5433
5547
|
n.push(l);
|
|
5434
5548
|
}
|
|
5435
5549
|
return n;
|
|
@@ -5455,15 +5569,15 @@
|
|
|
5455
5569
|
);
|
|
5456
5570
|
}
|
|
5457
5571
|
getSortedItems(e, t, r) {
|
|
5458
|
-
const i = [...t.sort.attributes], n = Array.from(e.values()), s = (
|
|
5459
|
-
const h =
|
|
5460
|
-
return typeof h > "u" || h === null ?
|
|
5461
|
-
}, a = i.map((
|
|
5462
|
-
const h = t.sort.order.at(f), d = this.getUndefinedValueForSorting(
|
|
5463
|
-
return s(
|
|
5464
|
-
}),
|
|
5572
|
+
const i = [...t.sort.attributes], n = Array.from(e.values()), s = (o, f, u) => {
|
|
5573
|
+
const h = o[f];
|
|
5574
|
+
return typeof h > "u" || h === null ? u : typeof h == "string" ? h.toLowerCase() : typeof h == "object" && typeof h?.key == "string" ? h.key.toLowerCase() : h;
|
|
5575
|
+
}, a = i.map((o, f) => (u) => {
|
|
5576
|
+
const h = t.sort.order.at(f), d = this.getUndefinedValueForSorting(o, h, r);
|
|
5577
|
+
return s(u, o, d);
|
|
5578
|
+
}), c = [...t.sort.order].map((o) => o.toLowerCase()), l = Ou(n, [...a], c);
|
|
5465
5579
|
return new Map(
|
|
5466
|
-
l.map((
|
|
5580
|
+
l.map((o) => [o.key, o])
|
|
5467
5581
|
);
|
|
5468
5582
|
}
|
|
5469
5583
|
getUndefinedValueForSorting(e, t, r) {
|
|
@@ -5490,18 +5604,18 @@
|
|
|
5490
5604
|
const s = e.entries(), a = /* @__PURE__ */ new Map();
|
|
5491
5605
|
if (t === 0 && r === e.size && i?.$ === true && Object.keys(i).length === 1)
|
|
5492
5606
|
return e;
|
|
5493
|
-
for (let
|
|
5494
|
-
if (
|
|
5607
|
+
for (let c = 0; c < t + r; c++) {
|
|
5608
|
+
if (c < t) {
|
|
5495
5609
|
s.next();
|
|
5496
5610
|
continue;
|
|
5497
5611
|
}
|
|
5498
|
-
if (
|
|
5612
|
+
if (c > t + r)
|
|
5499
5613
|
break;
|
|
5500
5614
|
const l = s.next().value;
|
|
5501
5615
|
if (l)
|
|
5502
5616
|
if (n && i && this.isValidProjection(i)) {
|
|
5503
|
-
const
|
|
5504
|
-
a.set(l[0],
|
|
5617
|
+
const o = this.getProjectedData(i, n, l[1]);
|
|
5618
|
+
a.set(l[0], o);
|
|
5505
5619
|
} else
|
|
5506
5620
|
a.set(l[0], l[1]);
|
|
5507
5621
|
}
|
|
@@ -5529,24 +5643,24 @@
|
|
|
5529
5643
|
return;
|
|
5530
5644
|
}
|
|
5531
5645
|
if (typeof a == "object") {
|
|
5532
|
-
const
|
|
5533
|
-
if (
|
|
5534
|
-
const l = this.modelParser.models.get(
|
|
5646
|
+
const c = t.references.get(s);
|
|
5647
|
+
if (c) {
|
|
5648
|
+
const l = this.modelParser.models.get(c.model);
|
|
5535
5649
|
if (l) {
|
|
5536
|
-
if (
|
|
5537
|
-
const
|
|
5538
|
-
i[s] =
|
|
5539
|
-
const
|
|
5540
|
-
return h ? this.getProjectedData(a, l, h) : this.modelParser.initOptions.referenceMetadata?.enabled ? { key:
|
|
5650
|
+
if (c.type === "multiValued") {
|
|
5651
|
+
const o = r[s] || [];
|
|
5652
|
+
i[s] = o.map((f) => {
|
|
5653
|
+
const u = typeof f == "string" ? f : f.key, h = l.getEntry(u);
|
|
5654
|
+
return h ? this.getProjectedData(a, l, h) : this.modelParser.initOptions.referenceMetadata?.enabled ? { key: u, _dcupl_ref_: "miss" } : null;
|
|
5541
5655
|
}).filter(Boolean);
|
|
5542
|
-
} else if (
|
|
5543
|
-
const
|
|
5544
|
-
if (
|
|
5545
|
-
const f = typeof
|
|
5546
|
-
|
|
5656
|
+
} else if (c.type === "singleValued") {
|
|
5657
|
+
const o = r[s];
|
|
5658
|
+
if (o) {
|
|
5659
|
+
const f = typeof o == "string" ? o : o.key, u = l?.getEntry(f);
|
|
5660
|
+
u ? i[s] = this.getProjectedData(
|
|
5547
5661
|
a,
|
|
5548
5662
|
l,
|
|
5549
|
-
|
|
5663
|
+
u
|
|
5550
5664
|
) : this.modelParser.initOptions.referenceMetadata?.enabled ? i[s] = { key: f, _dcupl_ref_: "miss" } : delete i[s];
|
|
5551
5665
|
}
|
|
5552
5666
|
}
|
|
@@ -5555,18 +5669,42 @@
|
|
|
5555
5669
|
}
|
|
5556
5670
|
}), i;
|
|
5557
5671
|
}
|
|
5672
|
+
/**
|
|
5673
|
+
* The models a projection reads through: for every nested projection key
|
|
5674
|
+
* that is a reference of `model`, the referenced model, recursively (the
|
|
5675
|
+
* same walk {@link getProjectedData} takes). A list that projects
|
|
5676
|
+
* `{ memberships: { user: { daysInactive: true } } }` on `project` reads
|
|
5677
|
+
* `membership` and `user`, so a change on either can change its result
|
|
5678
|
+
* (#284). Keys that are no reference (properties, `$`/`$$`, array indices)
|
|
5679
|
+
* contribute nothing; the root model itself is not included.
|
|
5680
|
+
*/
|
|
5681
|
+
getProjectionModels(e, t, r = /* @__PURE__ */ new Set()) {
|
|
5682
|
+
if (!e || typeof e != "object")
|
|
5683
|
+
return r;
|
|
5684
|
+
for (const [i, n] of Object.entries(e)) {
|
|
5685
|
+
if (i === "$" || i === "$$" || typeof n != "object" || n === null)
|
|
5686
|
+
continue;
|
|
5687
|
+
const s = t.references.get(i);
|
|
5688
|
+
if (!s)
|
|
5689
|
+
continue;
|
|
5690
|
+
r.add(s.model);
|
|
5691
|
+
const a = this.modelParser.models.get(s.model);
|
|
5692
|
+
a && this.getProjectionModels(n, a, r);
|
|
5693
|
+
}
|
|
5694
|
+
return r;
|
|
5695
|
+
}
|
|
5558
5696
|
};
|
|
5559
|
-
var
|
|
5560
|
-
for (var i =
|
|
5561
|
-
(s =
|
|
5562
|
-
return i &&
|
|
5697
|
+
var z$3 = Object.defineProperty, K$1 = Object.getOwnPropertyDescriptor, D$3 = (M2, e, t, r) => {
|
|
5698
|
+
for (var i = K$1(e, t), n = M2.length - 1, s; n >= 0; n--)
|
|
5699
|
+
(s = M2[n]) && (i = s(e, t, i) || i);
|
|
5700
|
+
return i && z$3(e, t, i), i;
|
|
5563
5701
|
};
|
|
5564
5702
|
let p$2 = class p {
|
|
5565
5703
|
constructor(e, t, r) {
|
|
5566
|
-
this.dcuplApi = e, this.cdRef = t, this.indicesController = r, this.itemService = new
|
|
5704
|
+
this.dcuplApi = e, this.cdRef = t, this.indicesController = r, this.itemService = new L$2(
|
|
5567
5705
|
this.dcuplApi.modelParser,
|
|
5568
5706
|
this.dcuplApi.scriptController
|
|
5569
|
-
), this.filter = new
|
|
5707
|
+
), this.filter = new $$1(
|
|
5570
5708
|
this.dcuplApi.modelParser,
|
|
5571
5709
|
this.cdRef,
|
|
5572
5710
|
this.itemService,
|
|
@@ -5639,8 +5777,9 @@
|
|
|
5639
5777
|
*/
|
|
5640
5778
|
addCondition: (e, t) => this.applyQuery(e, { mode: "add", skipProcessing: t?.skipProcessing }),
|
|
5641
5779
|
/**
|
|
5642
|
-
* Replace
|
|
5643
|
-
* Accepts single condition or array of conditions.
|
|
5780
|
+
* Replace the conditions of an attribute group with new condition(s).
|
|
5781
|
+
* Accepts single condition or array of conditions. Each condition replaces the
|
|
5782
|
+
* conditions of the group keyed by its attribute; other groups are kept.
|
|
5644
5783
|
* Clearer alternative to `apply(condition, { mode: 'set' })`.
|
|
5645
5784
|
*
|
|
5646
5785
|
* @param condition - Single query condition or array of conditions to set
|
|
@@ -5688,7 +5827,11 @@
|
|
|
5688
5827
|
*/
|
|
5689
5828
|
addGroup: (e, t) => this.applyQuery(e, { mode: "add", skipProcessing: t?.skipProcessing }),
|
|
5690
5829
|
/**
|
|
5691
|
-
* Replace query
|
|
5830
|
+
* Replace one query group by key (per-group `set`).
|
|
5831
|
+
* The group with the same `groupKey` is replaced; other groups and the query options
|
|
5832
|
+
* are kept. Only `apply({ groupKey: 'root', ... }, { mode: 'set' })` replaces the whole
|
|
5833
|
+
* query. A keyed group passed inside a keyless wrapper group stays nested there and is
|
|
5834
|
+
* still found by `groupKey` by `removeGroup` and `fn.facets` (#294).
|
|
5692
5835
|
*
|
|
5693
5836
|
* @param group - Query group to set
|
|
5694
5837
|
* @param options - Optional processing options
|
|
@@ -5987,7 +6130,7 @@
|
|
|
5987
6130
|
else if (e.relevantData === "filtered")
|
|
5988
6131
|
s = this.filter.filteredData, a = this.filter.queryBuilder.getQuery();
|
|
5989
6132
|
else if (e.relevantData === "excludeQuery" && e.excludeQuery) {
|
|
5990
|
-
const f = new
|
|
6133
|
+
const f = new or$1();
|
|
5991
6134
|
f.init(this.filter.queryBuilder.getQuery()), f.removeQuery(e.excludeQuery), a = f.getQuery(), s = this.dcuplApi.queryManager.queryData(
|
|
5992
6135
|
this.filter.initialData,
|
|
5993
6136
|
a,
|
|
@@ -5996,19 +6139,19 @@
|
|
|
5996
6139
|
);
|
|
5997
6140
|
} else
|
|
5998
6141
|
s = this.filter.filteredData, a = this.filter.queryBuilder.getQuery();
|
|
5999
|
-
let
|
|
6142
|
+
let c = s;
|
|
6000
6143
|
if (i) {
|
|
6001
|
-
const f = S$2.parse(e.attribute),
|
|
6144
|
+
const f = S$2.parse(e.attribute), u = this.filter.projectionFor([f]), h = /* @__PURE__ */ new Map();
|
|
6002
6145
|
for (const [d, g2] of s) {
|
|
6003
|
-
const y2 = this.filter.item.getProjectedData(
|
|
6146
|
+
const y2 = this.filter.item.getProjectedData(u, this.model, g2);
|
|
6004
6147
|
h.set(d, y2);
|
|
6005
6148
|
}
|
|
6006
|
-
|
|
6149
|
+
c = h;
|
|
6007
6150
|
}
|
|
6008
|
-
const l = this.filter.indicesController.getOrCreateIndex(e.attribute,
|
|
6151
|
+
const l = this.filter.indicesController.getOrCreateIndex(e.attribute, c, {
|
|
6009
6152
|
query: a
|
|
6010
|
-
}),
|
|
6011
|
-
return this.filter.cacheCtrl.set("suggestions", t,
|
|
6153
|
+
}), o = Iu(c, l, e, this.dcuplApi.queryManager);
|
|
6154
|
+
return this.filter.cacheCtrl.set("suggestions", t, o), o;
|
|
6012
6155
|
}
|
|
6013
6156
|
_getFacets(e) {
|
|
6014
6157
|
const t = this.filter.cacheCtrl.generateContext({
|
|
@@ -6055,12 +6198,12 @@
|
|
|
6055
6198
|
const i = S$2.parse(e.attribute);
|
|
6056
6199
|
let n = this.filter.filteredData;
|
|
6057
6200
|
if (i.isDeepQuery) {
|
|
6058
|
-
const a = this.filter.
|
|
6059
|
-
for (const [l,
|
|
6060
|
-
const f = this.filter.item.getProjectedData(a, this.model,
|
|
6061
|
-
|
|
6201
|
+
const a = this.filter.projectionFor([i]), c = /* @__PURE__ */ new Map();
|
|
6202
|
+
for (const [l, o] of this.filter.filteredData) {
|
|
6203
|
+
const f = this.filter.item.getProjectedData(a, this.model, o);
|
|
6204
|
+
c.set(l, f);
|
|
6062
6205
|
}
|
|
6063
|
-
n =
|
|
6206
|
+
n = c;
|
|
6064
6207
|
}
|
|
6065
6208
|
const s = this.filter.getAggregate(
|
|
6066
6209
|
e,
|
|
@@ -6091,19 +6234,19 @@
|
|
|
6091
6234
|
].map((l) => S$2.parse(l)).filter((l) => l.isDeepQuery);
|
|
6092
6235
|
let a;
|
|
6093
6236
|
if (s.length > 0) {
|
|
6094
|
-
const l = this.filter.
|
|
6237
|
+
const l = this.filter.projectionFor(s);
|
|
6095
6238
|
a = /* @__PURE__ */ new Map();
|
|
6096
|
-
for (const [
|
|
6097
|
-
const
|
|
6098
|
-
a.set(
|
|
6239
|
+
for (const [o, f] of this.filter.filteredData) {
|
|
6240
|
+
const u = this.filter.item.getProjectedData(l, this.model, f);
|
|
6241
|
+
a.set(o, u);
|
|
6099
6242
|
}
|
|
6100
6243
|
}
|
|
6101
|
-
const
|
|
6102
|
-
return this.filter.cacheCtrl.set("pivot", t,
|
|
6244
|
+
const c = ir$1(this.filter.filteredData, e, { key: "root" }, "root", i, a);
|
|
6245
|
+
return this.filter.cacheCtrl.set("pivot", t, c), c;
|
|
6103
6246
|
}
|
|
6104
6247
|
};
|
|
6105
|
-
D$
|
|
6106
|
-
|
|
6248
|
+
D$3([
|
|
6249
|
+
Du({
|
|
6107
6250
|
scope: "list",
|
|
6108
6251
|
type: "fn_metadata",
|
|
6109
6252
|
cloneResult: true,
|
|
@@ -6111,8 +6254,8 @@
|
|
|
6111
6254
|
connectMessageResult: true
|
|
6112
6255
|
})
|
|
6113
6256
|
], p$2.prototype, "_getMetadata");
|
|
6114
|
-
D$
|
|
6115
|
-
|
|
6257
|
+
D$3([
|
|
6258
|
+
Du({
|
|
6116
6259
|
scope: "list",
|
|
6117
6260
|
type: "filter_many",
|
|
6118
6261
|
cloneResult: true,
|
|
@@ -6120,8 +6263,8 @@
|
|
|
6120
6263
|
connectMessageResult: true
|
|
6121
6264
|
})
|
|
6122
6265
|
], p$2.prototype, "_getFilters");
|
|
6123
|
-
D$
|
|
6124
|
-
|
|
6266
|
+
D$3([
|
|
6267
|
+
Du({
|
|
6125
6268
|
scope: "list",
|
|
6126
6269
|
type: "filter_one",
|
|
6127
6270
|
cloneResult: true,
|
|
@@ -6129,21 +6272,21 @@
|
|
|
6129
6272
|
connectMessageResult: true
|
|
6130
6273
|
})
|
|
6131
6274
|
], p$2.prototype, "_getFilter");
|
|
6132
|
-
D$
|
|
6133
|
-
|
|
6275
|
+
D$3([
|
|
6276
|
+
Du({
|
|
6134
6277
|
scope: "list",
|
|
6135
6278
|
type: "query_get",
|
|
6136
6279
|
cloneResult: true
|
|
6137
6280
|
})
|
|
6138
6281
|
], p$2.prototype, "getQuery");
|
|
6139
|
-
D$
|
|
6140
|
-
|
|
6282
|
+
D$3([
|
|
6283
|
+
Du({
|
|
6141
6284
|
scope: "list",
|
|
6142
6285
|
type: "query_has"
|
|
6143
6286
|
})
|
|
6144
6287
|
], p$2.prototype, "hasGroupOrQueryKey");
|
|
6145
|
-
D$
|
|
6146
|
-
|
|
6288
|
+
D$3([
|
|
6289
|
+
Du({
|
|
6147
6290
|
scope: "list",
|
|
6148
6291
|
type: "query_apply",
|
|
6149
6292
|
cloneResult: true,
|
|
@@ -6151,8 +6294,8 @@
|
|
|
6151
6294
|
connectMessageResult: true
|
|
6152
6295
|
})
|
|
6153
6296
|
], p$2.prototype, "applyQuery");
|
|
6154
|
-
D$
|
|
6155
|
-
|
|
6297
|
+
D$3([
|
|
6298
|
+
Du({
|
|
6156
6299
|
scope: "list",
|
|
6157
6300
|
type: "query_apply_options",
|
|
6158
6301
|
cloneResult: true,
|
|
@@ -6160,8 +6303,8 @@
|
|
|
6160
6303
|
connectMessageResult: true
|
|
6161
6304
|
})
|
|
6162
6305
|
], p$2.prototype, "applyOptions");
|
|
6163
|
-
D$
|
|
6164
|
-
|
|
6306
|
+
D$3([
|
|
6307
|
+
Du({
|
|
6165
6308
|
scope: "list",
|
|
6166
6309
|
type: "query_remove",
|
|
6167
6310
|
cloneResult: true,
|
|
@@ -6169,8 +6312,8 @@
|
|
|
6169
6312
|
connectMessageResult: true
|
|
6170
6313
|
})
|
|
6171
6314
|
], p$2.prototype, "removeQuery");
|
|
6172
|
-
D$
|
|
6173
|
-
|
|
6315
|
+
D$3([
|
|
6316
|
+
Du({
|
|
6174
6317
|
scope: "list",
|
|
6175
6318
|
type: "query_reset",
|
|
6176
6319
|
cloneResult: true,
|
|
@@ -6178,8 +6321,8 @@
|
|
|
6178
6321
|
connectMessageResult: true
|
|
6179
6322
|
})
|
|
6180
6323
|
], p$2.prototype, "resetQuery");
|
|
6181
|
-
D$
|
|
6182
|
-
|
|
6324
|
+
D$3([
|
|
6325
|
+
Du({
|
|
6183
6326
|
scope: "list",
|
|
6184
6327
|
type: "query_execute",
|
|
6185
6328
|
cloneResult: true,
|
|
@@ -6187,8 +6330,8 @@
|
|
|
6187
6330
|
connectMessageResult: true
|
|
6188
6331
|
})
|
|
6189
6332
|
], p$2.prototype, "executeQuery");
|
|
6190
|
-
D$
|
|
6191
|
-
|
|
6333
|
+
D$3([
|
|
6334
|
+
Du({
|
|
6192
6335
|
scope: "list",
|
|
6193
6336
|
type: "fn_groupBy",
|
|
6194
6337
|
cloneResult: true,
|
|
@@ -6196,8 +6339,8 @@
|
|
|
6196
6339
|
connectMessageResult: true
|
|
6197
6340
|
})
|
|
6198
6341
|
], p$2.prototype, "_getSections");
|
|
6199
|
-
D$
|
|
6200
|
-
|
|
6342
|
+
D$3([
|
|
6343
|
+
Du({
|
|
6201
6344
|
scope: "list",
|
|
6202
6345
|
type: "query_one",
|
|
6203
6346
|
cloneResult: true,
|
|
@@ -6205,8 +6348,8 @@
|
|
|
6205
6348
|
connectMessageResult: true
|
|
6206
6349
|
})
|
|
6207
6350
|
], p$2.prototype, "_getItem");
|
|
6208
|
-
D$
|
|
6209
|
-
|
|
6351
|
+
D$3([
|
|
6352
|
+
Du({
|
|
6210
6353
|
scope: "list",
|
|
6211
6354
|
type: "query_many",
|
|
6212
6355
|
cloneResult: true,
|
|
@@ -6214,8 +6357,8 @@
|
|
|
6214
6357
|
connectMessageResult: true
|
|
6215
6358
|
})
|
|
6216
6359
|
], p$2.prototype, "_getManyItems");
|
|
6217
|
-
D$
|
|
6218
|
-
|
|
6360
|
+
D$3([
|
|
6361
|
+
Du({
|
|
6219
6362
|
scope: "list",
|
|
6220
6363
|
type: "fn_suggest",
|
|
6221
6364
|
cloneResult: true,
|
|
@@ -6223,8 +6366,8 @@
|
|
|
6223
6366
|
connectMessageResult: true
|
|
6224
6367
|
})
|
|
6225
6368
|
], p$2.prototype, "_getSuggestions");
|
|
6226
|
-
D$
|
|
6227
|
-
|
|
6369
|
+
D$3([
|
|
6370
|
+
Du({
|
|
6228
6371
|
scope: "list",
|
|
6229
6372
|
type: "fn_facets",
|
|
6230
6373
|
cloneResult: true,
|
|
@@ -6232,8 +6375,8 @@
|
|
|
6232
6375
|
connectMessageResult: true
|
|
6233
6376
|
})
|
|
6234
6377
|
], p$2.prototype, "_getFacets");
|
|
6235
|
-
D$
|
|
6236
|
-
|
|
6378
|
+
D$3([
|
|
6379
|
+
Du({
|
|
6237
6380
|
scope: "list",
|
|
6238
6381
|
type: "fn_aggregate",
|
|
6239
6382
|
cloneResult: true,
|
|
@@ -6241,8 +6384,8 @@
|
|
|
6241
6384
|
connectMessageResult: true
|
|
6242
6385
|
})
|
|
6243
6386
|
], p$2.prototype, "getAggregate");
|
|
6244
|
-
D$
|
|
6245
|
-
|
|
6387
|
+
D$3([
|
|
6388
|
+
Du({
|
|
6246
6389
|
scope: "list",
|
|
6247
6390
|
type: "fn_pivot",
|
|
6248
6391
|
cloneResult: true,
|
|
@@ -6250,7 +6393,7 @@
|
|
|
6250
6393
|
connectMessageResult: true
|
|
6251
6394
|
})
|
|
6252
6395
|
], p$2.prototype, "_getPivot");
|
|
6253
|
-
let N$
|
|
6396
|
+
let N$2 = class N extends p$2 {
|
|
6254
6397
|
constructor(e, t, r) {
|
|
6255
6398
|
super(e, t, r), this.dcuplApi = e, this.cdRef = t, this.indicesController = r;
|
|
6256
6399
|
}
|
|
@@ -6281,12 +6424,12 @@
|
|
|
6281
6424
|
return t;
|
|
6282
6425
|
}
|
|
6283
6426
|
function Ce$1(d, e, t) {
|
|
6284
|
-
if (!E$
|
|
6427
|
+
if (!E$4(t))
|
|
6285
6428
|
return false;
|
|
6286
6429
|
var s = typeof e;
|
|
6287
|
-
return (s == "number" ?
|
|
6430
|
+
return (s == "number" ? k$1(t) && Mt$1(e, t.length) : s == "string" && e in t) ? Ce$2(t[e], d) : false;
|
|
6288
6431
|
}
|
|
6289
|
-
function
|
|
6432
|
+
function Me$1(d) {
|
|
6290
6433
|
return pn$1(function(e, t) {
|
|
6291
6434
|
var s = -1, r = t.length, i = r > 1 ? t[r - 1] : void 0, o = r > 2 ? t[2] : void 0;
|
|
6292
6435
|
for (i = d.length > 3 && typeof i == "function" ? (r--, i) : void 0, o && Ce$1(t[0], t[1], o) && (i = r < 3 ? void 0 : i, r = 1), e = Object(e); ++s < r; ) {
|
|
@@ -6296,7 +6439,7 @@
|
|
|
6296
6439
|
return e;
|
|
6297
6440
|
});
|
|
6298
6441
|
}
|
|
6299
|
-
function
|
|
6442
|
+
function Ee$1(d) {
|
|
6300
6443
|
var e = [];
|
|
6301
6444
|
if (d != null)
|
|
6302
6445
|
for (var t in Object(d))
|
|
@@ -6304,20 +6447,20 @@
|
|
|
6304
6447
|
return e;
|
|
6305
6448
|
}
|
|
6306
6449
|
var Se$1 = Object.prototype, Ie$1 = Se$1.hasOwnProperty;
|
|
6307
|
-
function Ge$
|
|
6308
|
-
if (!E$
|
|
6309
|
-
return
|
|
6450
|
+
function Ge$2(d) {
|
|
6451
|
+
if (!E$4(d))
|
|
6452
|
+
return Ee$1(d);
|
|
6310
6453
|
var e = _t$1(d), t = [];
|
|
6311
6454
|
for (var s in d)
|
|
6312
6455
|
s == "constructor" && (e || !Ie$1.call(d, s)) || t.push(s);
|
|
6313
6456
|
return t;
|
|
6314
6457
|
}
|
|
6315
|
-
function Q$
|
|
6316
|
-
return
|
|
6458
|
+
function Q$2(d) {
|
|
6459
|
+
return k$1(d) ? Xn$1(d, true) : Ge$2(d);
|
|
6317
6460
|
}
|
|
6318
6461
|
var xe$1 = "[object Object]", Te$1 = Function.prototype, Ke$1 = Object.prototype, z$2 = Te$1.toString, _e$1 = Ke$1.hasOwnProperty, we$1 = z$2.call(Object);
|
|
6319
6462
|
function $e$1(d) {
|
|
6320
|
-
if (!O$2(d) || N$
|
|
6463
|
+
if (!O$2(d) || N$3(d) != xe$1)
|
|
6321
6464
|
return false;
|
|
6322
6465
|
var e = Ks$1(d);
|
|
6323
6466
|
if (e === null)
|
|
@@ -6332,14 +6475,14 @@
|
|
|
6332
6475
|
}
|
|
6333
6476
|
return s;
|
|
6334
6477
|
}
|
|
6335
|
-
function qe$
|
|
6478
|
+
function qe$1(d, e, t, s) {
|
|
6336
6479
|
return Wt$1(d, function(r, i, o) {
|
|
6337
6480
|
e(s, r, t(r), o);
|
|
6338
6481
|
}), s;
|
|
6339
6482
|
}
|
|
6340
6483
|
function Oe$2(d, e) {
|
|
6341
6484
|
return function(t, s) {
|
|
6342
|
-
var r = v$2(t) ? Fe$1 : qe$
|
|
6485
|
+
var r = v$2(t) ? Fe$1 : qe$1, i = {};
|
|
6343
6486
|
return r(t, d, Y$3(s), i);
|
|
6344
6487
|
};
|
|
6345
6488
|
}
|
|
@@ -6351,7 +6494,7 @@
|
|
|
6351
6494
|
return d[e];
|
|
6352
6495
|
}
|
|
6353
6496
|
function Ue$1(d) {
|
|
6354
|
-
return De$1(d, Q$
|
|
6497
|
+
return De$1(d, Q$2(d));
|
|
6355
6498
|
}
|
|
6356
6499
|
function Ve$1(d, e, t, s, r, i, o) {
|
|
6357
6500
|
var n = T$1(d, t), a = T$1(e, t), l = o.get(a);
|
|
@@ -6361,28 +6504,28 @@
|
|
|
6361
6504
|
}
|
|
6362
6505
|
var c = i ? i(n, a, t + "", d, e, o) : void 0, f = c === void 0;
|
|
6363
6506
|
if (f) {
|
|
6364
|
-
var u = v$2(a), y2 = !u &&
|
|
6365
|
-
c = a, u || y2 || h ? v$2(n) ? c = n : ye(n) ? c = Ae$1(n) : y2 ? (f = false, c =
|
|
6507
|
+
var u = v$2(a), y2 = !u && ie$1(a), h = !u && !y2 && Et$1(a);
|
|
6508
|
+
c = a, u || y2 || h ? v$2(n) ? c = n : ye(n) ? c = Ae$1(n) : y2 ? (f = false, c = eo$1(a, true)) : h ? (f = false, c = Ao$1(a, true)) : c = [] : $e$1(a) || Ie$2(a) ? (c = n, Ie$2(n) ? c = Ue$1(n) : (!E$4(n) || Ot$1(n)) && (c = ko$1(a))) : f = false;
|
|
6366
6509
|
}
|
|
6367
6510
|
f && (o.set(a, c), r(c, a, s, i, o), o.delete(a)), x$1(d, t, c);
|
|
6368
6511
|
}
|
|
6369
6512
|
function L$1(d, e, t, s, r) {
|
|
6370
6513
|
d !== e && ua(e, function(i, o) {
|
|
6371
|
-
if (r || (r = new T$2()), E$
|
|
6514
|
+
if (r || (r = new T$2()), E$4(i))
|
|
6372
6515
|
Ve$1(d, e, o, t, L$1, s, r);
|
|
6373
6516
|
else {
|
|
6374
6517
|
var n = s ? s(T$1(d, o), i, o + "", d, e, r) : void 0;
|
|
6375
6518
|
n === void 0 && (n = i), x$1(d, o, n);
|
|
6376
6519
|
}
|
|
6377
|
-
}, Q$
|
|
6520
|
+
}, Q$2);
|
|
6378
6521
|
}
|
|
6379
|
-
var
|
|
6380
|
-
|
|
6522
|
+
var Ne$1 = Object.prototype, Be = Ne$1.hasOwnProperty, We$1 = Oe$2(function(d, e, t) {
|
|
6523
|
+
Be.call(d, t) ? d[t].push(e) : cn$1(d, t, [e]);
|
|
6381
6524
|
}), Qe$1 = "[object Boolean]";
|
|
6382
6525
|
function ze$1(d) {
|
|
6383
|
-
return d === true || d === false || O$2(d) && N$
|
|
6526
|
+
return d === true || d === false || O$2(d) && N$3(d) == Qe$1;
|
|
6384
6527
|
}
|
|
6385
|
-
var O$1 =
|
|
6528
|
+
var O$1 = Me$1(function(d, e, t) {
|
|
6386
6529
|
L$1(d, e, t);
|
|
6387
6530
|
});
|
|
6388
6531
|
const p$1 = (d, e, t) => ({
|
|
@@ -6584,7 +6727,7 @@
|
|
|
6584
6727
|
function j$1(d, e, t = v$1) {
|
|
6585
6728
|
return typeof e == "string" ? String(d[e]) : e.length === 1 ? String(d[e[0]]) : e.map((s) => String(d[s])).join(t);
|
|
6586
6729
|
}
|
|
6587
|
-
function
|
|
6730
|
+
function E$3(d, e = v$1) {
|
|
6588
6731
|
if (d !== void 0)
|
|
6589
6732
|
return typeof d == "string" ? d : d.join(e);
|
|
6590
6733
|
}
|
|
@@ -7088,7 +7231,7 @@
|
|
|
7088
7231
|
r && r.sourceColumns.length > 0 && this.emitUnknownColumnErrors(e, r.sourceColumns, t, s, i);
|
|
7089
7232
|
for (let o of e.data) {
|
|
7090
7233
|
if (o.key === void 0 || o.key === null) {
|
|
7091
|
-
const l = e.keyProperty ?? this.keyProperty, c = e.keyPropertySeparator ?? this.keyPropertySeparator ?? v$1, f =
|
|
7234
|
+
const l = e.keyProperty ?? this.keyProperty, c = e.keyPropertySeparator ?? this.keyPropertySeparator ?? v$1, f = E$3(l, c);
|
|
7092
7235
|
this.setError({
|
|
7093
7236
|
title: "Missing Key",
|
|
7094
7237
|
type: "model",
|
|
@@ -7106,7 +7249,7 @@
|
|
|
7106
7249
|
key: String(o.key)
|
|
7107
7250
|
};
|
|
7108
7251
|
else if (e.type === "set") {
|
|
7109
|
-
const l = e.keyProperty ?? this.keyProperty, c = e.keyPropertySeparator ?? this.keyPropertySeparator ?? v$1, f =
|
|
7252
|
+
const l = e.keyProperty ?? this.keyProperty, c = e.keyPropertySeparator ?? this.keyPropertySeparator ?? v$1, f = E$3(l, c), u = String(o.key);
|
|
7110
7253
|
this.setError({
|
|
7111
7254
|
title: "Non Unique Key",
|
|
7112
7255
|
type: "model",
|
|
@@ -7190,7 +7333,7 @@
|
|
|
7190
7333
|
const r = JSON.stringify(s.query);
|
|
7191
7334
|
for (let i of e.data) {
|
|
7192
7335
|
let o = this.data.get(String(i.key));
|
|
7193
|
-
const n = Pu(r, { ...i }), a = JSON.parse(n), l = new
|
|
7336
|
+
const n = Pu(r, { ...i }), a = JSON.parse(n), l = new or$1();
|
|
7194
7337
|
l.init({ modelKey: s.model }), l.applyQuery(a, { mode: "set" }), a.projection || l.applyOptions({ projection: { $: false } });
|
|
7195
7338
|
const c = l.getQuery();
|
|
7196
7339
|
if (c.queries.length > 0) {
|
|
@@ -7645,7 +7788,7 @@
|
|
|
7645
7788
|
const s = this.getBasicProperties().filter((o) => t.has(o.key)), r = this.getBasicReferences().filter((o) => t.has(o.key)), i = this.modelParser.qualityController.dcupl?.getContainerSourceMetadata(e)?.origin ?? "inline";
|
|
7646
7789
|
for (let o of e.data) {
|
|
7647
7790
|
if (o.key === void 0 || o.key === null) {
|
|
7648
|
-
const l = e.keyProperty ?? this.keyProperty, c = e.keyPropertySeparator ?? this.keyPropertySeparator ?? v$1, f =
|
|
7791
|
+
const l = e.keyProperty ?? this.keyProperty, c = e.keyPropertySeparator ?? this.keyPropertySeparator ?? v$1, f = E$3(l, c);
|
|
7649
7792
|
this.setError({
|
|
7650
7793
|
title: "Missing Key",
|
|
7651
7794
|
type: "model",
|
|
@@ -7738,7 +7881,7 @@
|
|
|
7738
7881
|
for (let o of e.data) {
|
|
7739
7882
|
let n = this.data.get(String(o.key));
|
|
7740
7883
|
if (!n) continue;
|
|
7741
|
-
const a = Pu(i, { ...o }), l = JSON.parse(a), c = new
|
|
7884
|
+
const a = Pu(i, { ...o }), l = JSON.parse(a), c = new or$1();
|
|
7742
7885
|
c.init({ modelKey: r.model }), c.applyQuery(l, { mode: "set" }), l.projection || c.applyOptions({ projection: { $: false } });
|
|
7743
7886
|
const f = c.getQuery();
|
|
7744
7887
|
if (f.queries.length > 0) {
|
|
@@ -8137,7 +8280,7 @@
|
|
|
8137
8280
|
(o = d[i]) && (r = o(e, t, r) || r);
|
|
8138
8281
|
return r && ct$2(e, t, r), r;
|
|
8139
8282
|
};
|
|
8140
|
-
let
|
|
8283
|
+
let M$2 = class M {
|
|
8141
8284
|
constructor(e, t, s) {
|
|
8142
8285
|
this.cdRef = e, this.qualityController = t, this.dcuplInstance = s, this.qualityController.modelParser = this;
|
|
8143
8286
|
}
|
|
@@ -8214,7 +8357,7 @@ Models cannot have circular references as this leads to unpredictable behavior d
|
|
|
8214
8357
|
* This enables partial updates by tracking which attributes depend on others.
|
|
8215
8358
|
*/
|
|
8216
8359
|
buildAttributeDependencyGraph() {
|
|
8217
|
-
this.attributeDependencyGraph = new
|
|
8360
|
+
this.attributeDependencyGraph = new Mu(), this.models.forEach((e) => {
|
|
8218
8361
|
const t = e.key;
|
|
8219
8362
|
e.properties.forEach((s, r) => {
|
|
8220
8363
|
if (s.expression)
|
|
@@ -9067,62 +9210,62 @@ These attributes will default to Step 1 processing which may be incorrect. This
|
|
|
9067
9210
|
}
|
|
9068
9211
|
};
|
|
9069
9212
|
C$1([
|
|
9070
|
-
|
|
9213
|
+
Du({
|
|
9071
9214
|
scope: "global",
|
|
9072
9215
|
type: "model_add",
|
|
9073
9216
|
connectMessage: true
|
|
9074
9217
|
})
|
|
9075
|
-
],
|
|
9218
|
+
], M$2.prototype, "addModel");
|
|
9076
9219
|
C$1([
|
|
9077
|
-
|
|
9220
|
+
Du({
|
|
9078
9221
|
scope: "global",
|
|
9079
9222
|
type: "data_change",
|
|
9080
9223
|
connectMessage: true
|
|
9081
9224
|
})
|
|
9082
|
-
],
|
|
9225
|
+
], M$2.prototype, "addData");
|
|
9083
9226
|
C$1([
|
|
9084
|
-
|
|
9227
|
+
Du({
|
|
9085
9228
|
scope: "global",
|
|
9086
9229
|
type: "view_add",
|
|
9087
9230
|
connectMessage: true
|
|
9088
9231
|
})
|
|
9089
|
-
],
|
|
9232
|
+
], M$2.prototype, "addView");
|
|
9090
9233
|
C$1([
|
|
9091
|
-
|
|
9234
|
+
Du({
|
|
9092
9235
|
scope: "global",
|
|
9093
9236
|
type: "dcupl_handle_datacontainer"
|
|
9094
9237
|
})
|
|
9095
|
-
],
|
|
9096
|
-
function z$1(
|
|
9097
|
-
return
|
|
9238
|
+
], M$2.prototype, "handleDataContainer");
|
|
9239
|
+
function z$1(l, e, t) {
|
|
9240
|
+
return l === l && (t !== void 0 && (l = l <= t ? l : t), l = l >= e ? l : e), l;
|
|
9098
9241
|
}
|
|
9099
|
-
function B$2(
|
|
9100
|
-
|
|
9101
|
-
var r =
|
|
9242
|
+
function B$2(l, e, t) {
|
|
9243
|
+
l = Ns$1(l), e = Tt(e);
|
|
9244
|
+
var r = l.length;
|
|
9102
9245
|
t = t === void 0 ? r : z$1(Cr$1(t), 0, r);
|
|
9103
9246
|
var s = t;
|
|
9104
|
-
return t -= e.length, t >= 0 &&
|
|
9247
|
+
return t -= e.length, t >= 0 && l.slice(t, s) == e;
|
|
9105
9248
|
}
|
|
9106
|
-
function W$1(
|
|
9249
|
+
function W$1(l, e) {
|
|
9107
9250
|
return z$4(e, function(t) {
|
|
9108
|
-
return
|
|
9251
|
+
return l[t];
|
|
9109
9252
|
});
|
|
9110
9253
|
}
|
|
9111
|
-
function Q$
|
|
9112
|
-
return
|
|
9254
|
+
function Q$1(l) {
|
|
9255
|
+
return l == null ? [] : W$1(l, ce$1(l));
|
|
9113
9256
|
}
|
|
9114
9257
|
var j = Math.max;
|
|
9115
|
-
function N$
|
|
9116
|
-
|
|
9117
|
-
var s =
|
|
9118
|
-
return t < 0 && (t = j(s + t, 0)), Aa(
|
|
9119
|
-
}
|
|
9120
|
-
var H = Object.defineProperty, J = Object.getOwnPropertyDescriptor, C = (
|
|
9121
|
-
for (var s = J(e, t), o =
|
|
9122
|
-
(i =
|
|
9258
|
+
function N$1(l, e, t, r) {
|
|
9259
|
+
l = k$1(l) ? l : Q$1(l), t = t ? Cr$1(t) : 0;
|
|
9260
|
+
var s = l.length;
|
|
9261
|
+
return t < 0 && (t = j(s + t, 0)), Aa(l) ? t <= s && l.indexOf(e, t) > -1 : !!s && sn$1(l, e, t) > -1;
|
|
9262
|
+
}
|
|
9263
|
+
var H = Object.defineProperty, J = Object.getOwnPropertyDescriptor, C = (l, e, t, r) => {
|
|
9264
|
+
for (var s = J(e, t), o = l.length - 1, i; o >= 0; o--)
|
|
9265
|
+
(i = l[o]) && (s = i(e, t, s) || s);
|
|
9123
9266
|
return s && H(e, t, s), s;
|
|
9124
9267
|
};
|
|
9125
|
-
let E$
|
|
9268
|
+
let E$2 = class E {
|
|
9126
9269
|
constructor(e, t) {
|
|
9127
9270
|
this.dcuplApi = e, this.cdRef = t;
|
|
9128
9271
|
}
|
|
@@ -9143,7 +9286,7 @@ These attributes will default to Step 1 processing which may be incorrect. This
|
|
|
9143
9286
|
if (!t)
|
|
9144
9287
|
throw new Error(`Model with key ${e.modelKey} not found`);
|
|
9145
9288
|
const r = this.getListItemKeys(e), s = this.getRelevantData(t, r), o = this.initIndicesController(r, t, s);
|
|
9146
|
-
this.catalog ? this.catalog.filter.update(t, s, o) : (this.catalog = new N$
|
|
9289
|
+
this.catalog ? this.catalog.filter.update(t, s, o) : (this.catalog = new N$2(this.dcuplApi, this.cdRef, o), this.catalog.init(this.modelKey, t, s));
|
|
9147
9290
|
}
|
|
9148
9291
|
initIndicesController(e, t, r) {
|
|
9149
9292
|
let s;
|
|
@@ -9210,6 +9353,15 @@ These attributes will default to Step 1 processing which may be incorrect. This
|
|
|
9210
9353
|
invalidate() {
|
|
9211
9354
|
this.catalog && (this.ownsIndicesController && this.catalog.filter.indicesController.reset(), this.catalog.filter.resetCache());
|
|
9212
9355
|
}
|
|
9356
|
+
/**
|
|
9357
|
+
* The models other than this list's own that its cached results were read
|
|
9358
|
+
* through (dotted paths in its query, facets, aggregates, …). dcupl.update()
|
|
9359
|
+
* treats the list as affected when any of them changes (#284).
|
|
9360
|
+
* @internal
|
|
9361
|
+
*/
|
|
9362
|
+
getDependencyModels() {
|
|
9363
|
+
return this.catalog ? this.catalog.filter.getDependencyModels() : /* @__PURE__ */ new Set();
|
|
9364
|
+
}
|
|
9213
9365
|
/**
|
|
9214
9366
|
* Emits `result_updated` for this list. dcupl.update() calls it once per
|
|
9215
9367
|
* affected list, after every affected list has been refreshed, so a
|
|
@@ -9237,26 +9389,26 @@ These attributes will default to Step 1 processing which may be incorrect. This
|
|
|
9237
9389
|
}
|
|
9238
9390
|
};
|
|
9239
9391
|
C([
|
|
9240
|
-
|
|
9392
|
+
Du({
|
|
9241
9393
|
scope: "list",
|
|
9242
9394
|
type: "list_destroyed",
|
|
9243
9395
|
connectMessage: true
|
|
9244
9396
|
})
|
|
9245
|
-
], E$
|
|
9397
|
+
], E$2.prototype, "_destroy");
|
|
9246
9398
|
C([
|
|
9247
|
-
|
|
9399
|
+
Du({
|
|
9248
9400
|
scope: "list",
|
|
9249
9401
|
type: "list_updated",
|
|
9250
9402
|
action: "update",
|
|
9251
9403
|
connectMessage: true
|
|
9252
9404
|
})
|
|
9253
|
-
], E$
|
|
9254
|
-
var Z$2 = Object.defineProperty, Y$2 = Object.getOwnPropertyDescriptor, X$1 = (
|
|
9255
|
-
for (var s = Y$2(e, t), o =
|
|
9256
|
-
(i =
|
|
9405
|
+
], E$2.prototype, "update");
|
|
9406
|
+
var Z$2 = Object.defineProperty, Y$2 = Object.getOwnPropertyDescriptor, X$1 = (l, e, t, r) => {
|
|
9407
|
+
for (var s = Y$2(e, t), o = l.length - 1, i; o >= 0; o--)
|
|
9408
|
+
(i = l[o]) && (s = i(e, t, s) || s);
|
|
9257
9409
|
return s && Z$2(e, t, s), s;
|
|
9258
9410
|
};
|
|
9259
|
-
class
|
|
9411
|
+
let D$2 = class D {
|
|
9260
9412
|
constructor(e, t) {
|
|
9261
9413
|
this.dcuplInstance = e, this.cdRef = t;
|
|
9262
9414
|
}
|
|
@@ -9287,17 +9439,17 @@ These attributes will default to Step 1 processing which may be incorrect. This
|
|
|
9287
9439
|
dcuplInitOptions: this.dcuplInstance.initOptions,
|
|
9288
9440
|
analyticsController: this.dcuplInstance.analyticsController
|
|
9289
9441
|
});
|
|
9290
|
-
const r = new E$
|
|
9442
|
+
const r = new E$2(this.dcuplInstance, t);
|
|
9291
9443
|
return r.init(e), this.lists.push(r), r;
|
|
9292
9444
|
}
|
|
9293
|
-
}
|
|
9445
|
+
};
|
|
9294
9446
|
X$1([
|
|
9295
|
-
|
|
9447
|
+
Du({
|
|
9296
9448
|
scope: "global",
|
|
9297
9449
|
type: "list_created",
|
|
9298
9450
|
connectMessage: true
|
|
9299
9451
|
})
|
|
9300
|
-
],
|
|
9452
|
+
], D$2.prototype, "create");
|
|
9301
9453
|
let ee$2 = class ee {
|
|
9302
9454
|
constructor(e) {
|
|
9303
9455
|
this.scriptsController = e;
|
|
@@ -9475,50 +9627,50 @@ These attributes will default to Step 1 processing which may be incorrect. This
|
|
|
9475
9627
|
if (r) {
|
|
9476
9628
|
const o = r.coercionFailureSamples ?? {};
|
|
9477
9629
|
for (const i of Object.keys(o)) {
|
|
9478
|
-
const
|
|
9479
|
-
if (!
|
|
9630
|
+
const a = o[i];
|
|
9631
|
+
if (!a || a.count <= 0)
|
|
9480
9632
|
continue;
|
|
9481
9633
|
for (const d of this.getModelErrors(s))
|
|
9482
9634
|
d.attribute === i && d.itemKey != null && (d.errorType === "UndefinedValue" || d.errorType === "WrongDataType") && this.removeError(d.key);
|
|
9483
|
-
const
|
|
9484
|
-
this.setError(this.buildColumnCoercionError(s, i,
|
|
9635
|
+
const n = e.properties.get(i)?.type ?? a.expected;
|
|
9636
|
+
this.setError(this.buildColumnCoercionError(s, i, a.rawValue, n, a.count));
|
|
9485
9637
|
}
|
|
9486
9638
|
for (const [i] of e.properties) {
|
|
9487
9639
|
if (o[i] || r.sourceColumns.includes(i))
|
|
9488
9640
|
continue;
|
|
9489
|
-
const
|
|
9490
|
-
if (
|
|
9491
|
-
for (const
|
|
9492
|
-
|
|
9641
|
+
const a = this.getGroupCount(s, i, "UndefinedValue");
|
|
9642
|
+
if (a > 0 && a === t.data.length) {
|
|
9643
|
+
for (const n of this.getModelErrors(s))
|
|
9644
|
+
n.attribute === i && n.itemKey != null && n.errorType === "UndefinedValue" && this.removeError(n.key);
|
|
9493
9645
|
this.setError(this.buildAbsentColumnError(s, i));
|
|
9494
9646
|
}
|
|
9495
9647
|
}
|
|
9496
9648
|
} else {
|
|
9497
9649
|
const o = new Set(
|
|
9498
|
-
this.getModelErrors(s).filter((
|
|
9650
|
+
this.getModelErrors(s).filter((n) => n.errorType === "UndefinedValue" && n.attribute != null).map((n) => n.attribute)
|
|
9499
9651
|
);
|
|
9500
|
-
for (const
|
|
9501
|
-
const d = this.getGroupCount(s,
|
|
9652
|
+
for (const n of o) {
|
|
9653
|
+
const d = this.getGroupCount(s, n, "UndefinedValue");
|
|
9502
9654
|
if (d > 0 && d === t.data.length) {
|
|
9503
9655
|
for (const u of this.getModelErrors(s))
|
|
9504
|
-
u.attribute ===
|
|
9505
|
-
this.setError(this.buildAbsentColumnError(s,
|
|
9656
|
+
u.attribute === n && u.itemKey != null && u.errorType === "UndefinedValue" && this.removeError(u.key);
|
|
9657
|
+
this.setError(this.buildAbsentColumnError(s, n));
|
|
9506
9658
|
}
|
|
9507
9659
|
}
|
|
9508
9660
|
const i = this.getModelErrors(s).filter(
|
|
9509
|
-
(
|
|
9510
|
-
),
|
|
9511
|
-
for (const
|
|
9512
|
-
const d =
|
|
9661
|
+
(n) => n.errorType === "WrongDataType" && n.errorGroup === "PropertyDataError" && n.title === "Wrong Data Type" && n.itemKey != null
|
|
9662
|
+
), a = We$1(i, "attribute");
|
|
9663
|
+
for (const n in a) {
|
|
9664
|
+
const d = a[n];
|
|
9513
9665
|
if (!d?.length)
|
|
9514
9666
|
continue;
|
|
9515
|
-
const u = d[0].meta, h = e.properties.get(
|
|
9667
|
+
const u = d[0].meta, h = e.properties.get(n)?.type ?? u?.expected ?? "unknown";
|
|
9516
9668
|
for (const f of d)
|
|
9517
9669
|
this.removeError(f.key);
|
|
9518
9670
|
this.setError(
|
|
9519
9671
|
this.buildColumnCoercionError(
|
|
9520
9672
|
s,
|
|
9521
|
-
|
|
9673
|
+
n,
|
|
9522
9674
|
String(u?.rawValue ?? ""),
|
|
9523
9675
|
h,
|
|
9524
9676
|
d.length
|
|
@@ -9569,8 +9721,8 @@ These attributes will default to Step 1 processing which may be incorrect. This
|
|
|
9569
9721
|
cleanUpErrorsForItems(e, t, r, s) {
|
|
9570
9722
|
let o, i;
|
|
9571
9723
|
typeof r == "string" ? i = r : r instanceof Set && (o = r, i = s);
|
|
9572
|
-
const
|
|
9573
|
-
for (const d of
|
|
9724
|
+
const a = this.getModelErrors(e.key), n = i ? a.filter((d) => d.errorType === i) : a;
|
|
9725
|
+
for (const d of n)
|
|
9574
9726
|
if (d.itemKey && t.has(d.itemKey)) {
|
|
9575
9727
|
if (o && d.attribute && !o.has(d.attribute))
|
|
9576
9728
|
continue;
|
|
@@ -9597,16 +9749,16 @@ These attributes will default to Step 1 processing which may be incorrect. This
|
|
|
9597
9749
|
if (!e)
|
|
9598
9750
|
return [];
|
|
9599
9751
|
const s = [], o = e.getData(), i = e.getAttributes();
|
|
9600
|
-
for (const
|
|
9601
|
-
if (!r.has(
|
|
9752
|
+
for (const a of i) {
|
|
9753
|
+
if (!r.has(a.key))
|
|
9602
9754
|
continue;
|
|
9603
|
-
const
|
|
9604
|
-
if (
|
|
9755
|
+
const n = a.quality?.validators;
|
|
9756
|
+
if (n)
|
|
9605
9757
|
for (const d of t) {
|
|
9606
9758
|
const u = o.get(d);
|
|
9607
9759
|
if (!u)
|
|
9608
9760
|
continue;
|
|
9609
|
-
const h = u[
|
|
9761
|
+
const h = u[a.key], f = this.validateAttribute(h, n, a.key);
|
|
9610
9762
|
for (const g2 of f)
|
|
9611
9763
|
g2.model = e.key, g2.itemKey = u.key, s.push(g2);
|
|
9612
9764
|
}
|
|
@@ -9825,10 +9977,10 @@ These attributes will default to Step 1 processing which may be incorrect. This
|
|
|
9825
9977
|
const o = this.dcupl.modelParser.models.get(s);
|
|
9826
9978
|
if (!o)
|
|
9827
9979
|
return;
|
|
9828
|
-
const i = o?.getBasicProperties() || [],
|
|
9829
|
-
t +=
|
|
9980
|
+
const i = o?.getBasicProperties() || [], a = o?.getBasicReferences() || [], n = i.length + a.length;
|
|
9981
|
+
t += n;
|
|
9830
9982
|
const u = o.data?.size || 0;
|
|
9831
|
-
e += u, r +=
|
|
9983
|
+
e += u, r += n * u;
|
|
9832
9984
|
}), this.values.counts.rows = e, this.values.counts.attributes = t, this.values.counts.dataEntries = r;
|
|
9833
9985
|
}
|
|
9834
9986
|
calculateTiming() {
|
|
@@ -9869,16 +10021,16 @@ These attributes will default to Step 1 processing which may be incorrect. This
|
|
|
9869
10021
|
calculateSizesForModels() {
|
|
9870
10022
|
const t = this.dcupl.analyticsController.getByType("resource").filter((o) => o.value?.type === "data"), r = We$1(t, (o) => o.value?.model);
|
|
9871
10023
|
return Object.keys(r).map((o) => {
|
|
9872
|
-
const i = r[o]?.reduce((
|
|
10024
|
+
const i = r[o]?.reduce((n, d) => {
|
|
9873
10025
|
const u = d.value.encodedBodySize;
|
|
9874
|
-
return
|
|
9875
|
-
}, 0),
|
|
10026
|
+
return n + u;
|
|
10027
|
+
}, 0), a = r[o]?.reduce((n, d) => {
|
|
9876
10028
|
const u = d.value.decodedBodySize;
|
|
9877
|
-
return
|
|
10029
|
+
return n + u;
|
|
9878
10030
|
}, 0);
|
|
9879
10031
|
return {
|
|
9880
10032
|
model: o,
|
|
9881
|
-
decodedBodySize:
|
|
10033
|
+
decodedBodySize: a,
|
|
9882
10034
|
encodedBodySize: i
|
|
9883
10035
|
};
|
|
9884
10036
|
});
|
|
@@ -9887,7 +10039,7 @@ These attributes will default to Step 1 processing which may be incorrect. This
|
|
|
9887
10039
|
const e = this.dcupl.models.keys();
|
|
9888
10040
|
let t = 0;
|
|
9889
10041
|
return e.forEach((r) => {
|
|
9890
|
-
const s = this.dcupl.modelParser.unprocessedData.find((
|
|
10042
|
+
const s = this.dcupl.modelParser.unprocessedData.find((a) => a.model === r)?.data || [], o = this.getUnusedAttributesFromModel(this.dcupl, r);
|
|
9891
10043
|
if (!o.length)
|
|
9892
10044
|
return;
|
|
9893
10045
|
const i = this.getDataWithAttributes(s, o);
|
|
@@ -9903,10 +10055,10 @@ These attributes will default to Step 1 processing which may be incorrect. This
|
|
|
9903
10055
|
});
|
|
9904
10056
|
}
|
|
9905
10057
|
getUnusedAttributesFromModel(e, t) {
|
|
9906
|
-
const r = e.modelParser.models.get(t), s = r?.getBasicProperties() || [], o = r?.getBasicReferences() || [], i = r?.keyProperty,
|
|
9907
|
-
typeof i == "string" ?
|
|
9908
|
-
const
|
|
9909
|
-
return this.getUnusedAttributes(
|
|
10058
|
+
const r = e.modelParser.models.get(t), s = r?.getBasicProperties() || [], o = r?.getBasicReferences() || [], i = r?.keyProperty, a = [...s, ...o].map((d) => d.key);
|
|
10059
|
+
typeof i == "string" ? a.push(i) : Array.isArray(i) ? a.push(...i) : a.push("key"), a.push("key");
|
|
10060
|
+
const n = e.modelParser.unprocessedData.find((d) => d.model === t)?.data || [];
|
|
10061
|
+
return this.getUnusedAttributes(n, a);
|
|
9910
10062
|
}
|
|
9911
10063
|
getUnusedAttributes(e, t) {
|
|
9912
10064
|
const r = /* @__PURE__ */ new Set();
|
|
@@ -9967,16 +10119,16 @@ These attributes will default to Step 1 processing which may be incorrect. This
|
|
|
9967
10119
|
for (const o of t) {
|
|
9968
10120
|
const i = o.quality?.validators;
|
|
9969
10121
|
if (i && i.unique) {
|
|
9970
|
-
const
|
|
9971
|
-
s.push(...
|
|
10122
|
+
const a = this.validateUnique(r, o.key, e);
|
|
10123
|
+
s.push(...a);
|
|
9972
10124
|
}
|
|
9973
10125
|
}
|
|
9974
10126
|
return s;
|
|
9975
10127
|
}
|
|
9976
10128
|
validateUnique(e, t, r) {
|
|
9977
|
-
const s = [], o = /* @__PURE__ */ new Set(),
|
|
9978
|
-
for (const
|
|
9979
|
-
const d =
|
|
10129
|
+
const s = [], o = /* @__PURE__ */ new Set(), a = r.attributeQualityConfigs?.get(t)?.validatorHandling !== "loose";
|
|
10130
|
+
for (const n of e) {
|
|
10131
|
+
const d = n[t];
|
|
9980
10132
|
if (o.has(d)) {
|
|
9981
10133
|
const u = {
|
|
9982
10134
|
title: "Validator Error - Unique",
|
|
@@ -9985,10 +10137,10 @@ These attributes will default to Step 1 processing which may be incorrect. This
|
|
|
9985
10137
|
model: r.key,
|
|
9986
10138
|
errorType: "InvalidValidator",
|
|
9987
10139
|
attribute: t,
|
|
9988
|
-
itemKey:
|
|
10140
|
+
itemKey: n.key,
|
|
9989
10141
|
description: `The value "${d}" is not unique`
|
|
9990
10142
|
};
|
|
9991
|
-
s.push(u),
|
|
10143
|
+
s.push(u), a && delete n[t];
|
|
9992
10144
|
} else
|
|
9993
10145
|
o.add(d);
|
|
9994
10146
|
}
|
|
@@ -10075,7 +10227,7 @@ These attributes will default to Step 1 processing which may be incorrect. This
|
|
|
10075
10227
|
};
|
|
10076
10228
|
}
|
|
10077
10229
|
validateIncludes(e, t, r) {
|
|
10078
|
-
if (e != null && !N$
|
|
10230
|
+
if (e != null && !N$1(e, t.value))
|
|
10079
10231
|
return {
|
|
10080
10232
|
title: "Validator Error - Includes",
|
|
10081
10233
|
type: "model",
|
|
@@ -10135,20 +10287,20 @@ These attributes will default to Step 1 processing which may be incorrect. This
|
|
|
10135
10287
|
}
|
|
10136
10288
|
}
|
|
10137
10289
|
};
|
|
10138
|
-
var te = Object.defineProperty, re$1 = Object.getOwnPropertyDescriptor, y = (
|
|
10139
|
-
for (var s = re$1(e, t), o =
|
|
10140
|
-
(i =
|
|
10290
|
+
var te = Object.defineProperty, re$1 = Object.getOwnPropertyDescriptor, y = (l, e, t, r) => {
|
|
10291
|
+
for (var s = re$1(e, t), o = l.length - 1, i; o >= 0; o--)
|
|
10292
|
+
(i = l[o]) && (s = i(e, t, s) || s);
|
|
10141
10293
|
return s && te(e, t, s), s;
|
|
10142
10294
|
};
|
|
10143
10295
|
class p {
|
|
10144
10296
|
cdRef = new Cu();
|
|
10145
|
-
analyticsController = new
|
|
10297
|
+
analyticsController = new $u();
|
|
10146
10298
|
containerSourceMetadata = /* @__PURE__ */ new WeakMap();
|
|
10147
10299
|
scriptController = new Ku();
|
|
10148
10300
|
qualityController = new ee$2(this.scriptController);
|
|
10149
10301
|
log = Ua.child({ prefix: "Dcupl" });
|
|
10150
|
-
modelParser = new
|
|
10151
|
-
globalItemService = new
|
|
10302
|
+
modelParser = new M$2(this.cdRef, this.qualityController, this);
|
|
10303
|
+
globalItemService = new L$2(this.modelParser, this.scriptController);
|
|
10152
10304
|
queryManager = new ju(
|
|
10153
10305
|
this.scriptController,
|
|
10154
10306
|
this.globalItemService,
|
|
@@ -10157,7 +10309,7 @@ These attributes will default to Step 1 processing which may be incorrect. This
|
|
|
10157
10309
|
// Cast needed due to dist vs src type mismatch in monorepo
|
|
10158
10310
|
);
|
|
10159
10311
|
_loaders = /* @__PURE__ */ new Map();
|
|
10160
|
-
rootQueryBuilder = new
|
|
10312
|
+
rootQueryBuilder = new or$1();
|
|
10161
10313
|
_defaultInitOptions = {
|
|
10162
10314
|
config: { projectId: void 0, apiKey: void 0, version: "draft" },
|
|
10163
10315
|
errorTracking: {
|
|
@@ -10190,7 +10342,7 @@ These attributes will default to Step 1 processing which may be incorrect. This
|
|
|
10190
10342
|
}
|
|
10191
10343
|
};
|
|
10192
10344
|
initOptions;
|
|
10193
|
-
lists = new
|
|
10345
|
+
lists = new D$2(this, this.cdRef);
|
|
10194
10346
|
busy = false;
|
|
10195
10347
|
// Set until the update queue is drained
|
|
10196
10348
|
updateQueue = [];
|
|
@@ -10395,10 +10547,10 @@ These attributes will default to Step 1 processing which may be incorrect. This
|
|
|
10395
10547
|
const o = new Set(t.get(s) ?? []);
|
|
10396
10548
|
if (o.size === 0) {
|
|
10397
10549
|
const i = this.modelParser.models.get(s);
|
|
10398
|
-
for (const
|
|
10399
|
-
o.add(
|
|
10400
|
-
for (const
|
|
10401
|
-
o.add(
|
|
10550
|
+
for (const a of i?.properties.keys() ?? [])
|
|
10551
|
+
o.add(a);
|
|
10552
|
+
for (const a of i?.references.keys() ?? [])
|
|
10553
|
+
o.add(a);
|
|
10402
10554
|
}
|
|
10403
10555
|
r.set(s, o);
|
|
10404
10556
|
}
|
|
@@ -10419,9 +10571,9 @@ These attributes will default to Step 1 processing which may be incorrect. This
|
|
|
10419
10571
|
const s = this.modelParser.attributeDependencyGraph;
|
|
10420
10572
|
if (s) {
|
|
10421
10573
|
const o = [];
|
|
10422
|
-
for (const [i,
|
|
10423
|
-
for (const
|
|
10424
|
-
o.push({ modelKey: i, attributeKey:
|
|
10574
|
+
for (const [i, a] of e)
|
|
10575
|
+
for (const n of a)
|
|
10576
|
+
o.push({ modelKey: i, attributeKey: n, type: "property", processingStep: 1 });
|
|
10425
10577
|
for (const i of s.getImpactedAttributes(o))
|
|
10426
10578
|
t.add(i.modelKey);
|
|
10427
10579
|
}
|
|
@@ -10434,42 +10586,51 @@ These attributes will default to Step 1 processing which may be incorrect. This
|
|
|
10434
10586
|
* @param autoUpdateOverride - Per-update auto-update override
|
|
10435
10587
|
*/
|
|
10436
10588
|
updateFnLists(e, t) {
|
|
10437
|
-
const r = this.initOptions.performance?.partialUpdates?.enableDetailedLogging ?? false, s = [];
|
|
10438
|
-
for (const
|
|
10439
|
-
if (
|
|
10589
|
+
const r = this.initOptions.performance?.partialUpdates?.enableDetailedLogging ?? false, s = [], o = e ? new Set(e.affectedModels) : null;
|
|
10590
|
+
for (const i of this.lists.getAll()) {
|
|
10591
|
+
if (o && !this.isListAffectedByChanges(i, o)) {
|
|
10440
10592
|
r && this.log.debug("List skipped (not affected)", {
|
|
10441
|
-
listKey:
|
|
10442
|
-
modelKey:
|
|
10593
|
+
listKey: i.key,
|
|
10594
|
+
modelKey: i.modelKey
|
|
10443
10595
|
});
|
|
10444
10596
|
continue;
|
|
10445
10597
|
}
|
|
10446
10598
|
try {
|
|
10447
|
-
this.shouldAutoUpdateList(
|
|
10448
|
-
listKey:
|
|
10449
|
-
modelKey:
|
|
10599
|
+
this.shouldAutoUpdateList(i, t) ? (r && this.log.debug("List auto-updating", {
|
|
10600
|
+
listKey: i.key,
|
|
10601
|
+
modelKey: i.modelKey,
|
|
10450
10602
|
affectedModels: e?.affectedModels ?? "all"
|
|
10451
|
-
}),
|
|
10452
|
-
listKey:
|
|
10453
|
-
modelKey:
|
|
10454
|
-
}),
|
|
10455
|
-
} catch (
|
|
10456
|
-
this.log.error(`List refresh failed for '${
|
|
10603
|
+
}), i.update()) : (r && this.log.debug("List caches invalidated (auto-update disabled)", {
|
|
10604
|
+
listKey: i.key,
|
|
10605
|
+
modelKey: i.modelKey
|
|
10606
|
+
}), i.invalidate()), s.push(i);
|
|
10607
|
+
} catch (a) {
|
|
10608
|
+
this.log.error(`List refresh failed for '${i.key}'`, a);
|
|
10457
10609
|
}
|
|
10458
10610
|
}
|
|
10459
|
-
for (const
|
|
10460
|
-
if (!
|
|
10611
|
+
for (const i of s)
|
|
10612
|
+
if (!i.key.startsWith("__global_list__"))
|
|
10461
10613
|
try {
|
|
10462
|
-
|
|
10463
|
-
} catch (
|
|
10464
|
-
this.log.error(`result_updated handler failed for list '${
|
|
10614
|
+
i.emitResultUpdated();
|
|
10615
|
+
} catch (a) {
|
|
10616
|
+
this.log.error(`result_updated handler failed for list '${i.key}'`, a);
|
|
10465
10617
|
}
|
|
10466
10618
|
}
|
|
10467
10619
|
/**
|
|
10468
|
-
* Determines if a list is affected by changes to specific models
|
|
10620
|
+
* Determines if a list is affected by changes to specific models: its own
|
|
10621
|
+
* model is affected, or one of the models its cached results were read
|
|
10622
|
+
* through is. The model graph has no edges for resolved and derived
|
|
10623
|
+
* references (they would make it cyclic), so a `project` list filtered on
|
|
10624
|
+
* `memberships.user.daysInactive` is not downstream of `user` there — the
|
|
10625
|
+
* list itself knows which models its dotted paths resolve (#284).
|
|
10469
10626
|
*/
|
|
10470
10627
|
isListAffectedByChanges(e, t) {
|
|
10471
|
-
|
|
10472
|
-
|
|
10628
|
+
if (t.has(e.modelKey))
|
|
10629
|
+
return true;
|
|
10630
|
+
for (const r of e.getDependencyModels())
|
|
10631
|
+
if (t.has(r))
|
|
10632
|
+
return true;
|
|
10633
|
+
return false;
|
|
10473
10634
|
}
|
|
10474
10635
|
/**
|
|
10475
10636
|
* Determines if auto-update should be enabled for a specific list.
|
|
@@ -10599,7 +10760,7 @@ These attributes will default to Step 1 processing which may be incorrect. This
|
|
|
10599
10760
|
}
|
|
10600
10761
|
}
|
|
10601
10762
|
y([
|
|
10602
|
-
|
|
10763
|
+
Du({
|
|
10603
10764
|
scope: "global",
|
|
10604
10765
|
type: "fn_pivot",
|
|
10605
10766
|
cloneResult: true,
|
|
@@ -10608,7 +10769,7 @@ These attributes will default to Step 1 processing which may be incorrect. This
|
|
|
10608
10769
|
})
|
|
10609
10770
|
], p.prototype, "_pivot");
|
|
10610
10771
|
y([
|
|
10611
|
-
|
|
10772
|
+
Du({
|
|
10612
10773
|
scope: "global",
|
|
10613
10774
|
type: "fn_aggregate",
|
|
10614
10775
|
cloneResult: true,
|
|
@@ -10617,7 +10778,7 @@ These attributes will default to Step 1 processing which may be incorrect. This
|
|
|
10617
10778
|
})
|
|
10618
10779
|
], p.prototype, "_aggregate");
|
|
10619
10780
|
y([
|
|
10620
|
-
|
|
10781
|
+
Du({
|
|
10621
10782
|
scope: "global",
|
|
10622
10783
|
type: "fn_suggest",
|
|
10623
10784
|
cloneResult: true,
|
|
@@ -10626,7 +10787,7 @@ These attributes will default to Step 1 processing which may be incorrect. This
|
|
|
10626
10787
|
})
|
|
10627
10788
|
], p.prototype, "_suggest");
|
|
10628
10789
|
y([
|
|
10629
|
-
|
|
10790
|
+
Du({
|
|
10630
10791
|
scope: "global",
|
|
10631
10792
|
type: "fn_groupBy",
|
|
10632
10793
|
cloneResult: true,
|
|
@@ -10635,7 +10796,7 @@ These attributes will default to Step 1 processing which may be incorrect. This
|
|
|
10635
10796
|
})
|
|
10636
10797
|
], p.prototype, "_groupBy");
|
|
10637
10798
|
y([
|
|
10638
|
-
|
|
10799
|
+
Du({
|
|
10639
10800
|
scope: "global",
|
|
10640
10801
|
type: "fn_facets",
|
|
10641
10802
|
cloneResult: true,
|
|
@@ -10644,7 +10805,7 @@ These attributes will default to Step 1 processing which may be incorrect. This
|
|
|
10644
10805
|
})
|
|
10645
10806
|
], p.prototype, "_facets");
|
|
10646
10807
|
y([
|
|
10647
|
-
|
|
10808
|
+
Du({
|
|
10648
10809
|
scope: "global",
|
|
10649
10810
|
type: "fn_metadata",
|
|
10650
10811
|
cloneResult: true,
|
|
@@ -10653,14 +10814,14 @@ These attributes will default to Step 1 processing which may be incorrect. This
|
|
|
10653
10814
|
})
|
|
10654
10815
|
], p.prototype, "_metadata");
|
|
10655
10816
|
y([
|
|
10656
|
-
|
|
10817
|
+
Du({
|
|
10657
10818
|
scope: "global",
|
|
10658
10819
|
type: "dcupl_initialized",
|
|
10659
10820
|
connectMessage: true
|
|
10660
10821
|
})
|
|
10661
10822
|
], p.prototype, "init");
|
|
10662
10823
|
y([
|
|
10663
|
-
|
|
10824
|
+
Du({
|
|
10664
10825
|
scope: "global",
|
|
10665
10826
|
type: "dcupl_updated_manually",
|
|
10666
10827
|
action: "update",
|
|
@@ -10668,14 +10829,14 @@ These attributes will default to Step 1 processing which may be incorrect. This
|
|
|
10668
10829
|
})
|
|
10669
10830
|
], p.prototype, "update");
|
|
10670
10831
|
y([
|
|
10671
|
-
|
|
10832
|
+
Du({
|
|
10672
10833
|
scope: "global",
|
|
10673
10834
|
type: "dcupl_destroyed",
|
|
10674
10835
|
connectMessage: true
|
|
10675
10836
|
})
|
|
10676
10837
|
], p.prototype, "destroy");
|
|
10677
10838
|
y([
|
|
10678
|
-
|
|
10839
|
+
Du({
|
|
10679
10840
|
scope: "global",
|
|
10680
10841
|
type: "query_one",
|
|
10681
10842
|
cloneResult: true,
|
|
@@ -10684,7 +10845,7 @@ These attributes will default to Step 1 processing which may be incorrect. This
|
|
|
10684
10845
|
})
|
|
10685
10846
|
], p.prototype, "getItem");
|
|
10686
10847
|
y([
|
|
10687
|
-
|
|
10848
|
+
Du({
|
|
10688
10849
|
scope: "global",
|
|
10689
10850
|
type: "query_many",
|
|
10690
10851
|
cloneResult: true,
|
|
@@ -10693,7 +10854,7 @@ These attributes will default to Step 1 processing which may be incorrect. This
|
|
|
10693
10854
|
})
|
|
10694
10855
|
], p.prototype, "_getManyItems");
|
|
10695
10856
|
y([
|
|
10696
|
-
|
|
10857
|
+
Du({
|
|
10697
10858
|
scope: "global",
|
|
10698
10859
|
type: "query_execute",
|
|
10699
10860
|
cloneResult: true,
|
|
@@ -10702,7 +10863,7 @@ These attributes will default to Step 1 processing which may be incorrect. This
|
|
|
10702
10863
|
})
|
|
10703
10864
|
], p.prototype, "executeQuery");
|
|
10704
10865
|
y([
|
|
10705
|
-
|
|
10866
|
+
Du({
|
|
10706
10867
|
scope: "global",
|
|
10707
10868
|
type: "loader_removed",
|
|
10708
10869
|
connectMessage: true
|
|
@@ -11504,46 +11665,46 @@ These attributes will default to Step 1 processing which may be incorrect. This
|
|
|
11504
11665
|
function cloneDeep(value) {
|
|
11505
11666
|
return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
|
|
11506
11667
|
}
|
|
11507
|
-
function D$1(
|
|
11508
|
-
const e =
|
|
11668
|
+
function D$1(i) {
|
|
11669
|
+
const e = E$1(i);
|
|
11509
11670
|
return Z$1(e);
|
|
11510
11671
|
}
|
|
11511
|
-
function
|
|
11512
|
-
if (typeof
|
|
11513
|
-
return String(
|
|
11514
|
-
if (Array.isArray(
|
|
11515
|
-
return "[" +
|
|
11516
|
-
const e = Object.keys(
|
|
11672
|
+
function E$1(i) {
|
|
11673
|
+
if (typeof i != "object" || i === null)
|
|
11674
|
+
return String(i);
|
|
11675
|
+
if (Array.isArray(i))
|
|
11676
|
+
return "[" + i.map(E$1).join(",") + "]";
|
|
11677
|
+
const e = Object.keys(i).sort();
|
|
11517
11678
|
let t = "{";
|
|
11518
11679
|
for (let r = 0; r < e.length; r++) {
|
|
11519
11680
|
const s = e[r];
|
|
11520
|
-
t += s + ":" +
|
|
11681
|
+
t += s + ":" + E$1(i[s]), r < e.length - 1 && (t += ",");
|
|
11521
11682
|
}
|
|
11522
11683
|
return t += "}", t;
|
|
11523
11684
|
}
|
|
11524
|
-
function Z$1(
|
|
11685
|
+
function Z$1(i) {
|
|
11525
11686
|
let e = 0;
|
|
11526
|
-
for (let t = 0; t <
|
|
11527
|
-
const r =
|
|
11687
|
+
for (let t = 0; t < i.length; t++) {
|
|
11688
|
+
const r = i.charCodeAt(t);
|
|
11528
11689
|
e = (e << 5) - e + r, e |= 0;
|
|
11529
11690
|
}
|
|
11530
11691
|
return e.toString(16);
|
|
11531
11692
|
}
|
|
11532
11693
|
const b = {
|
|
11533
11694
|
now: () => typeof performance < "u" && performance.now ? performance.now() : (/* @__PURE__ */ new Date()).getTime(),
|
|
11534
|
-
mark: (
|
|
11535
|
-
typeof performance < "u" && performance.mark && performance.mark(
|
|
11695
|
+
mark: (i) => {
|
|
11696
|
+
typeof performance < "u" && performance.mark && performance.mark(i);
|
|
11536
11697
|
},
|
|
11537
|
-
measure: (
|
|
11538
|
-
typeof performance < "u" && performance.measure && performance.measure(
|
|
11698
|
+
measure: (i, e, t) => {
|
|
11699
|
+
typeof performance < "u" && performance.measure && performance.measure(i, e, t);
|
|
11539
11700
|
},
|
|
11540
|
-
getEntriesByName(
|
|
11701
|
+
getEntriesByName(i) {
|
|
11541
11702
|
if (typeof performance < "u" && performance.getEntriesByName)
|
|
11542
|
-
return performance.getEntriesByName(
|
|
11703
|
+
return performance.getEntriesByName(i);
|
|
11543
11704
|
},
|
|
11544
|
-
getEntriesByType(
|
|
11705
|
+
getEntriesByType(i) {
|
|
11545
11706
|
if (typeof performance < "u" && performance.getEntriesByType)
|
|
11546
|
-
return performance.getEntriesByType(
|
|
11707
|
+
return performance.getEntriesByType(i);
|
|
11547
11708
|
}
|
|
11548
11709
|
};
|
|
11549
11710
|
const R = {
|
|
@@ -11624,8 +11785,8 @@ These attributes will default to Step 1 processing which may be incorrect. This
|
|
|
11624
11785
|
stack: e.error.stack
|
|
11625
11786
|
}), JSON.stringify(o);
|
|
11626
11787
|
}
|
|
11627
|
-
const t = new Date(e.timestamp).toISOString().substring(11, 23), r = e.prefix ? `[${e.prefix}]` : "", s = this.getLevelIcon(e.level),
|
|
11628
|
-
return `${t} ${s} ${r} ${e.message}${
|
|
11788
|
+
const t = new Date(e.timestamp).toISOString().substring(11, 23), r = e.prefix ? `[${e.prefix}]` : "", s = this.getLevelIcon(e.level), n = e.context ? ` ${JSON.stringify(e.context)}` : "";
|
|
11789
|
+
return `${t} ${s} ${r} ${e.message}${n}`.trim();
|
|
11629
11790
|
}
|
|
11630
11791
|
getLevelIcon(e) {
|
|
11631
11792
|
switch (e) {
|
|
@@ -11644,7 +11805,7 @@ These attributes will default to Step 1 processing which may be incorrect. This
|
|
|
11644
11805
|
log(e, t, r, s) {
|
|
11645
11806
|
if (!this.shouldLog(e))
|
|
11646
11807
|
return;
|
|
11647
|
-
const
|
|
11808
|
+
const n = {
|
|
11648
11809
|
level: e,
|
|
11649
11810
|
message: t,
|
|
11650
11811
|
timestamp: Date.now(),
|
|
@@ -11653,10 +11814,10 @@ These attributes will default to Step 1 processing which may be incorrect. This
|
|
|
11653
11814
|
error: s
|
|
11654
11815
|
};
|
|
11655
11816
|
if (this.config.onLog) {
|
|
11656
|
-
this.config.onLog(
|
|
11817
|
+
this.config.onLog(n);
|
|
11657
11818
|
return;
|
|
11658
11819
|
}
|
|
11659
|
-
const o = this.formatMessage(
|
|
11820
|
+
const o = this.formatMessage(n);
|
|
11660
11821
|
if (typeof console < "u")
|
|
11661
11822
|
switch (e) {
|
|
11662
11823
|
case "error":
|
|
@@ -11676,8 +11837,8 @@ These attributes will default to Step 1 processing which may be incorrect. This
|
|
|
11676
11837
|
* Log an error message
|
|
11677
11838
|
*/
|
|
11678
11839
|
error(e, t, r) {
|
|
11679
|
-
const s = t instanceof Error ? t : void 0,
|
|
11680
|
-
this.log("error", e,
|
|
11840
|
+
const s = t instanceof Error ? t : void 0, n = t instanceof Error ? r : t;
|
|
11841
|
+
this.log("error", e, n, s);
|
|
11681
11842
|
}
|
|
11682
11843
|
/**
|
|
11683
11844
|
* Log and track an error (integrates with QualityController)
|
|
@@ -11746,10 +11907,10 @@ These attributes will default to Step 1 processing which may be incorrect. This
|
|
|
11746
11907
|
}
|
|
11747
11908
|
}
|
|
11748
11909
|
const Y$1 = new g();
|
|
11749
|
-
function ee$1(
|
|
11910
|
+
function ee$1(i = 10) {
|
|
11750
11911
|
let e = "";
|
|
11751
11912
|
const t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
11752
|
-
for (let r = 0; r <
|
|
11913
|
+
for (let r = 0; r < i; r++) e += t.charAt(Math.floor(Math.random() * t.length));
|
|
11753
11914
|
return e;
|
|
11754
11915
|
}
|
|
11755
11916
|
let He$1 = class He {
|
|
@@ -11788,10 +11949,10 @@ These attributes will default to Step 1 processing which may be incorrect. This
|
|
|
11788
11949
|
};
|
|
11789
11950
|
}
|
|
11790
11951
|
};
|
|
11791
|
-
const B$1 = (
|
|
11952
|
+
const B$1 = (i, e) => e ? typeof structuredClone < "u" ? structuredClone(i) : cloneDeep(i) : i, q = (i, e, t, r, s, n) => {
|
|
11792
11953
|
try {
|
|
11793
|
-
const o = !!e.dcuplInitOptions.performance?.clone?.enabled && !!t.cloneResult, a = B$1(
|
|
11794
|
-
if (t.scope === "list" && (t.listKey =
|
|
11954
|
+
const o = !!e.dcuplInitOptions.performance?.clone?.enabled && !!t.cloneResult, a = B$1(n, o);
|
|
11955
|
+
if (t.scope === "list" && (t.listKey = i.cdRef?.key || i.key, t.modelKey = i.model?.key || i.modelKey), t.type === "list_created" && t.args[0].listKey.startsWith("__global_list__") || t.listKey?.startsWith("__global_list__"))
|
|
11795
11956
|
return a;
|
|
11796
11957
|
const c = b.now(), u = c - r, f = Math.round(u * 1e3) / 1e3;
|
|
11797
11958
|
t.duration = f, t.start = r, t.end = c;
|
|
@@ -11809,12 +11970,12 @@ These attributes will default to Step 1 processing which may be incorrect. This
|
|
|
11809
11970
|
detail: d
|
|
11810
11971
|
}), a;
|
|
11811
11972
|
} catch {
|
|
11812
|
-
return
|
|
11973
|
+
return n;
|
|
11813
11974
|
}
|
|
11814
|
-
}, Je$1 = (
|
|
11815
|
-
const
|
|
11975
|
+
}, Je$1 = (i) => (t, r, s) => {
|
|
11976
|
+
const n = s.value;
|
|
11816
11977
|
return s.value = function(...o) {
|
|
11817
|
-
const a = b.now(), c = this.cdRef, u = B$1(
|
|
11978
|
+
const a = b.now(), c = this.cdRef, u = B$1(i, true);
|
|
11818
11979
|
u.key || (c.increaseCounter(), u.key = c.getCounter());
|
|
11819
11980
|
const f = ee$1();
|
|
11820
11981
|
c.analyticsController.mark({
|
|
@@ -11823,8 +11984,8 @@ These attributes will default to Step 1 processing which may be incorrect. This
|
|
|
11823
11984
|
});
|
|
11824
11985
|
const d = this.model?.key;
|
|
11825
11986
|
!u.originCdRefKey && c.key && (u.originCdRefKey = c.key), d && (u.modelKey = d);
|
|
11826
|
-
const l =
|
|
11827
|
-
return u.method = r, u.args = o, l && typeof l == "object" && "then" in l ? l.then((h) =>
|
|
11987
|
+
const l = n.apply(this, o);
|
|
11988
|
+
return u.method = r, u.args = o, l && typeof l == "object" && "then" in l ? l.then((h) => q(this, c, u, a, f, h)) : q(this, c, u, a, f, l);
|
|
11828
11989
|
}, s;
|
|
11829
11990
|
};
|
|
11830
11991
|
const Oe$1 = /* @__PURE__ */ new Set([
|
|
@@ -11837,42 +11998,42 @@ These attributes will default to Step 1 processing which may be incorrect. This
|
|
|
11837
11998
|
"manager-key",
|
|
11838
11999
|
"sdk-key"
|
|
11839
12000
|
]);
|
|
11840
|
-
function at$1(
|
|
11841
|
-
const e =
|
|
11842
|
-
if (e < 0) return
|
|
11843
|
-
const t =
|
|
12001
|
+
function at$1(i) {
|
|
12002
|
+
const e = i.indexOf("?");
|
|
12003
|
+
if (e < 0) return i;
|
|
12004
|
+
const t = i.slice(e + 1).split("&").map((r) => {
|
|
11844
12005
|
const s = r.indexOf("=");
|
|
11845
12006
|
if (s < 0) return r;
|
|
11846
|
-
const
|
|
11847
|
-
return Oe$1.has(
|
|
12007
|
+
const n = r.slice(0, s);
|
|
12008
|
+
return Oe$1.has(n.toLowerCase()) ? `${n}=<redacted>` : r;
|
|
11848
12009
|
}).join("&");
|
|
11849
|
-
return `${
|
|
12010
|
+
return `${i.slice(0, e)}?${t}`;
|
|
11850
12011
|
}
|
|
11851
|
-
const
|
|
11852
|
-
function
|
|
11853
|
-
if (
|
|
11854
|
-
return `${
|
|
12012
|
+
const Ge$1 = "k:", Re$1 = "h:";
|
|
12013
|
+
function M$1(i, e = 0) {
|
|
12014
|
+
if (i.key)
|
|
12015
|
+
return `${Ge$1}${i.key}`;
|
|
11855
12016
|
const t = D$1({
|
|
11856
|
-
type:
|
|
11857
|
-
url:
|
|
11858
|
-
model:
|
|
12017
|
+
type: i.type,
|
|
12018
|
+
url: i.rawUrl ?? i.url,
|
|
12019
|
+
model: i.model ?? "",
|
|
11859
12020
|
occurrence: e
|
|
11860
12021
|
});
|
|
11861
12022
|
return `${Re$1}${t}`;
|
|
11862
12023
|
}
|
|
11863
|
-
function ct$1(
|
|
12024
|
+
function ct$1(i) {
|
|
11864
12025
|
const e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Set();
|
|
11865
|
-
return
|
|
12026
|
+
return i.map((r) => {
|
|
11866
12027
|
const s = `${r.key ?? ""}|${r.type}|${r.rawUrl ?? r.url}|${r.model ?? ""}`;
|
|
11867
|
-
let
|
|
12028
|
+
let n = e.get(s) ?? 0, o = M$1(r, n);
|
|
11868
12029
|
for (; t.has(o); )
|
|
11869
|
-
|
|
11870
|
-
return e.set(s,
|
|
12030
|
+
n += 1, o = r.key ? `${M$1(r)}#${n}` : M$1(r, n);
|
|
12031
|
+
return e.set(s, n + 1), t.add(o), o;
|
|
11871
12032
|
});
|
|
11872
12033
|
}
|
|
11873
|
-
const dt$1 = (
|
|
12034
|
+
const dt$1 = (i, e) => i ? (e || (e = {}), i.replace(/\$\{(.*?)\}/g, (t, r) => get(e, r.trim(), ""))) : "", lt$1 = (i) => {
|
|
11874
12035
|
const e = /* @__PURE__ */ new Set();
|
|
11875
|
-
return
|
|
12036
|
+
return i.replace(/\$\{(.*?)\}/g, (r, s) => (e.add(s.trim()), "")), { variables: Array.from(e).map((r) => ({ name: r })) };
|
|
11876
12037
|
};
|
|
11877
12038
|
let ze = class {
|
|
11878
12039
|
log = Y$1.child({ prefix: "DcuplCsvParser" });
|