@ea-lab/reactive-json 0.0.29 → 0.0.30
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.
|
@@ -236,12 +236,12 @@ var Di = new y("tag:yaml.org,2002:null", {
|
|
|
236
236
|
},
|
|
237
237
|
defaultStyle: "lowercase"
|
|
238
238
|
});
|
|
239
|
-
function
|
|
239
|
+
function Yi(i) {
|
|
240
240
|
if (i === null) return !1;
|
|
241
241
|
var n = i.length;
|
|
242
242
|
return n === 4 && (i === "true" || i === "True" || i === "TRUE") || n === 5 && (i === "false" || i === "False" || i === "FALSE");
|
|
243
243
|
}
|
|
244
|
-
function
|
|
244
|
+
function ji(i) {
|
|
245
245
|
return i === "true" || i === "True" || i === "TRUE";
|
|
246
246
|
}
|
|
247
247
|
function Pi(i) {
|
|
@@ -249,8 +249,8 @@ function Pi(i) {
|
|
|
249
249
|
}
|
|
250
250
|
var Bi = new y("tag:yaml.org,2002:bool", {
|
|
251
251
|
kind: "scalar",
|
|
252
|
-
resolve:
|
|
253
|
-
construct:
|
|
252
|
+
resolve: Yi,
|
|
253
|
+
construct: ji,
|
|
254
254
|
predicate: Pi,
|
|
255
255
|
represent: {
|
|
256
256
|
lowercase: function(i) {
|
|
@@ -597,7 +597,7 @@ function Dn(i) {
|
|
|
597
597
|
var ui = new Array(256), ci = new Array(256);
|
|
598
598
|
for (var F = 0; F < 256; F++)
|
|
599
599
|
ui[F] = Z(F) ? 1 : 0, ci[F] = Z(F);
|
|
600
|
-
function
|
|
600
|
+
function Yn(i, n) {
|
|
601
601
|
this.input = i, this.filename = n.filename || null, this.schema = n.schema || In, this.onWarning = n.onWarning || null, this.legacy = n.legacy || !1, this.json = n.json || !1, this.listener = n.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = i.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.firstTabInLine = -1, this.documents = [];
|
|
602
602
|
}
|
|
603
603
|
function fi(i, n) {
|
|
@@ -614,13 +614,13 @@ function fi(i, n) {
|
|
|
614
614
|
function p(i, n) {
|
|
615
615
|
throw fi(i, n);
|
|
616
616
|
}
|
|
617
|
-
function
|
|
617
|
+
function Y(i, n) {
|
|
618
618
|
i.onWarning && i.onWarning.call(null, fi(i, n));
|
|
619
619
|
}
|
|
620
620
|
var V = {
|
|
621
621
|
YAML: function(n, e, l) {
|
|
622
622
|
var r, u, o;
|
|
623
|
-
n.version !== null && p(n, "duplication of %YAML directive"), l.length !== 1 && p(n, "YAML directive accepts exactly one argument"), r = /^([0-9]+)\.([0-9]+)$/.exec(l[0]), r === null && p(n, "ill-formed argument of the YAML directive"), u = parseInt(r[1], 10), o = parseInt(r[2], 10), u !== 1 && p(n, "unacceptable YAML version of the document"), n.version = l[0], n.checkLineBreaks = o < 2, o !== 1 && o !== 2 &&
|
|
623
|
+
n.version !== null && p(n, "duplication of %YAML directive"), l.length !== 1 && p(n, "YAML directive accepts exactly one argument"), r = /^([0-9]+)\.([0-9]+)$/.exec(l[0]), r === null && p(n, "ill-formed argument of the YAML directive"), u = parseInt(r[1], 10), o = parseInt(r[2], 10), u !== 1 && p(n, "unacceptable YAML version of the document"), n.version = l[0], n.checkLineBreaks = o < 2, o !== 1 && o !== 2 && Y(n, "unsupported YAML version of the document");
|
|
624
624
|
},
|
|
625
625
|
TAG: function(n, e, l) {
|
|
626
626
|
var r, u;
|
|
@@ -686,9 +686,9 @@ function v(i, n, e) {
|
|
|
686
686
|
else
|
|
687
687
|
break;
|
|
688
688
|
}
|
|
689
|
-
return e !== -1 && l !== 0 && i.lineIndent < e &&
|
|
689
|
+
return e !== -1 && l !== 0 && i.lineIndent < e && Y(i, "deficient indentation"), l;
|
|
690
690
|
}
|
|
691
|
-
function
|
|
691
|
+
function j(i) {
|
|
692
692
|
var n = i.position, e;
|
|
693
693
|
return e = i.input.charCodeAt(n), !!((e === 45 || e === 46) && e === i.input.charCodeAt(n + 1) && e === i.input.charCodeAt(n + 2) && (n += 3, e = i.input.charCodeAt(n), e === 0 || w(e)));
|
|
694
694
|
}
|
|
@@ -696,7 +696,7 @@ function $(i, n) {
|
|
|
696
696
|
n === 1 ? i.result += " " : n > 1 && (i.result += b.repeat(`
|
|
697
697
|
`, n - 1));
|
|
698
698
|
}
|
|
699
|
-
function
|
|
699
|
+
function jn(i, n, e) {
|
|
700
700
|
var l, r, u, o, c, f, h, s, t = i.kind, g = i.result, a;
|
|
701
701
|
if (a = i.input.charCodeAt(i.position), w(a) || O(a) || a === 35 || a === 38 || a === 42 || a === 33 || a === 124 || a === 62 || a === 39 || a === 34 || a === 37 || a === 64 || a === 96 || (a === 63 || a === 45) && (r = i.input.charCodeAt(i.position + 1), w(r) || e && O(r)))
|
|
702
702
|
return !1;
|
|
@@ -708,7 +708,7 @@ function Yn(i, n, e) {
|
|
|
708
708
|
if (l = i.input.charCodeAt(i.position - 1), w(l))
|
|
709
709
|
break;
|
|
710
710
|
} else {
|
|
711
|
-
if (i.position === i.lineStart &&
|
|
711
|
+
if (i.position === i.lineStart && j(i) || e && O(a))
|
|
712
712
|
break;
|
|
713
713
|
if (_(a))
|
|
714
714
|
if (f = i.line, h = i.lineStart, s = i.lineIndent, v(i, !1, -1), i.lineIndent >= n) {
|
|
@@ -733,7 +733,7 @@ function Pn(i, n) {
|
|
|
733
733
|
l = i.position, i.position++, r = i.position;
|
|
734
734
|
else
|
|
735
735
|
return !0;
|
|
736
|
-
else _(e) ? (S(i, l, r, !0), $(i, v(i, !1, n)), l = r = i.position) : i.position === i.lineStart &&
|
|
736
|
+
else _(e) ? (S(i, l, r, !0), $(i, v(i, !1, n)), l = r = i.position) : i.position === i.lineStart && j(i) ? p(i, "unexpected end of the document within a single quoted scalar") : (i.position++, r = i.position);
|
|
737
737
|
p(i, "unexpected end of the stream within a single quoted scalar");
|
|
738
738
|
}
|
|
739
739
|
function Bn(i, n) {
|
|
@@ -755,7 +755,7 @@ function Bn(i, n) {
|
|
|
755
755
|
} else
|
|
756
756
|
p(i, "unknown escape sequence");
|
|
757
757
|
e = l = i.position;
|
|
758
|
-
} else _(c) ? (S(i, e, l, !0), $(i, v(i, !1, n)), e = l = i.position) : i.position === i.lineStart &&
|
|
758
|
+
} else _(c) ? (S(i, e, l, !0), $(i, v(i, !1, n)), e = l = i.position) : i.position === i.lineStart && j(i) ? p(i, "unexpected end of the document within a double quoted scalar") : (i.position++, l = i.position);
|
|
759
759
|
}
|
|
760
760
|
p(i, "unexpected end of the stream within a double quoted scalar");
|
|
761
761
|
}
|
|
@@ -906,7 +906,7 @@ function N(i, n, e, l, r) {
|
|
|
906
906
|
if (i.listener !== null && i.listener("open", i), i.tag = null, i.anchor = null, i.kind = null, i.result = null, u = o = c = D === e || ri === e, l && v(i, !0, -1) && (h = !0, i.lineIndent > n ? f = 1 : i.lineIndent === n ? f = 0 : i.lineIndent < n && (f = -1)), f === 1)
|
|
907
907
|
for (; Gn(i) || $n(i); )
|
|
908
908
|
v(i, !0, -1) ? (h = !0, c = u, i.lineIndent > n ? f = 1 : i.lineIndent === n ? f = 0 : i.lineIndent < n && (f = -1)) : c = !1;
|
|
909
|
-
if (c && (c = h || r), (f === 1 || D === e) && (M === e || ei === e ? A = n : A = n + 1, m = i.position - i.lineStart, f === 1 ? c && (z(i, m) || qn(i, m, A)) || Rn(i, A) ? s = !0 : (o && Un(i, A) || Pn(i, A) || Bn(i, A) ? s = !0 : Hn(i) ? (s = !0, (i.tag !== null || i.anchor !== null) && p(i, "alias node should not have any properties")) :
|
|
909
|
+
if (c && (c = h || r), (f === 1 || D === e) && (M === e || ei === e ? A = n : A = n + 1, m = i.position - i.lineStart, f === 1 ? c && (z(i, m) || qn(i, m, A)) || Rn(i, A) ? s = !0 : (o && Un(i, A) || Pn(i, A) || Bn(i, A) ? s = !0 : Hn(i) ? (s = !0, (i.tag !== null || i.anchor !== null) && p(i, "alias node should not have any properties")) : jn(i, A, M === e) && (s = !0, i.tag === null && (i.tag = "?")), i.anchor !== null && (i.anchorMap[i.anchor] = i.result)) : f === 0 && (s = c && z(i, m))), i.tag === null)
|
|
910
910
|
i.anchor !== null && (i.anchorMap[i.anchor] = i.result);
|
|
911
911
|
else if (i.tag === "?") {
|
|
912
912
|
for (i.result !== null && i.kind !== "scalar" && p(i, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + i.kind + '"'), t = 0, g = i.implicitTypes.length; t < g; t += 1)
|
|
@@ -946,9 +946,9 @@ function Kn(i) {
|
|
|
946
946
|
o = i.input.charCodeAt(++i.position);
|
|
947
947
|
r.push(i.input.slice(e, i.position));
|
|
948
948
|
}
|
|
949
|
-
o !== 0 && G(i), I.call(V, l) ? V[l](i, l, r) :
|
|
949
|
+
o !== 0 && G(i), I.call(V, l) ? V[l](i, l, r) : Y(i, 'unknown document directive "' + l + '"');
|
|
950
950
|
}
|
|
951
|
-
if (v(i, !0, -1), i.lineIndent === 0 && i.input.charCodeAt(i.position) === 45 && i.input.charCodeAt(i.position + 1) === 45 && i.input.charCodeAt(i.position + 2) === 45 ? (i.position += 3, v(i, !0, -1)) : u && p(i, "directives end mark is expected"), N(i, i.lineIndent - 1, D, !1, !0), v(i, !0, -1), i.checkLineBreaks && On.test(i.input.slice(n, i.position)) &&
|
|
951
|
+
if (v(i, !0, -1), i.lineIndent === 0 && i.input.charCodeAt(i.position) === 45 && i.input.charCodeAt(i.position + 1) === 45 && i.input.charCodeAt(i.position + 2) === 45 ? (i.position += 3, v(i, !0, -1)) : u && p(i, "directives end mark is expected"), N(i, i.lineIndent - 1, D, !1, !0), v(i, !0, -1), i.checkLineBreaks && On.test(i.input.slice(n, i.position)) && Y(i, "non-ASCII line breaks are interpreted as content"), i.documents.push(i.result), i.position === i.lineStart && j(i)) {
|
|
952
952
|
i.input.charCodeAt(i.position) === 46 && (i.position += 3, v(i, !0, -1));
|
|
953
953
|
return;
|
|
954
954
|
}
|
|
@@ -960,7 +960,7 @@ function Kn(i) {
|
|
|
960
960
|
function Wn(i, n) {
|
|
961
961
|
i = String(i), n = n || {}, i.length !== 0 && (i.charCodeAt(i.length - 1) !== 10 && i.charCodeAt(i.length - 1) !== 13 && (i += `
|
|
962
962
|
`), i.charCodeAt(0) === 65279 && (i = i.slice(1)));
|
|
963
|
-
var e = new
|
|
963
|
+
var e = new Yn(i, n), l = i.indexOf("\0");
|
|
964
964
|
for (l !== -1 && (e.position = l, p(e, "null byte is not allowed in input")), e.input += "\0"; e.input.charCodeAt(e.position) === 32; )
|
|
965
965
|
e.lineIndent += 1, e.position += 1;
|
|
966
966
|
for (; e.position < e.length - 1; )
|
|
@@ -988,6 +988,7 @@ const Qn = (i) => {
|
|
|
988
988
|
} catch {
|
|
989
989
|
}
|
|
990
990
|
}
|
|
991
|
+
return i;
|
|
991
992
|
};
|
|
992
993
|
export {
|
|
993
994
|
Qn as parseRjBuild
|