@primmel/primmel 1.21.19 → 1.21.20
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/src/check.d.ts.map +1 -1
- package/dist/src/check.js +0 -27
- package/dist/src/check.js.map +1 -1
- package/dist/src/export/retrieval.d.ts +1 -1
- package/dist/src/export/retrieval.d.ts.map +1 -1
- package/dist/src/export/retrieval.js +0 -79
- package/dist/src/export/retrieval.js.map +1 -1
- package/dist/src/model-diff.d.ts.map +1 -1
- package/dist/src/model-diff.js +0 -1
- package/dist/src/model-diff.js.map +1 -1
- package/dist/src/ser-des/config/index.d.ts.map +1 -1
- package/dist/src/ser-des/config/index.js +0 -1
- package/dist/src/ser-des/config/index.js.map +1 -1
- package/dist/src/ser-des/config/subject.d.ts +1 -9
- package/dist/src/ser-des/config/subject.d.ts.map +1 -1
- package/dist/src/ser-des/config/subject.js +1 -181
- package/dist/src/ser-des/config/subject.js.map +1 -1
- package/dist/src/ser-des/package.d.ts.map +1 -1
- package/dist/src/ser-des/package.js +0 -1
- package/dist/src/ser-des/package.js.map +1 -1
- package/dist/src/ser-des/parse.d.ts.map +1 -1
- package/dist/src/ser-des/parse.js +0 -1
- package/dist/src/ser-des/parse.js.map +1 -1
- package/dist/src/ser-des/types.d.ts +1 -2
- package/dist/src/ser-des/types.d.ts.map +1 -1
- package/dist/src/types/Artifact.d.ts +2 -3
- package/dist/src/types/Artifact.d.ts.map +1 -1
- package/dist/src/types/Artifact.js +2 -3
- package/dist/src/types/Artifact.js.map +1 -1
- package/dist/src/types/Standard.d.ts +1 -2
- package/dist/src/types/Standard.d.ts.map +1 -1
- package/dist/src/types/Subject.d.ts +0 -43
- package/dist/src/types/Subject.d.ts.map +1 -1
- package/dist-browser/index.mjs +644 -722
- package/dist-cli/primmel.mjs +19 -343
- package/package.json +1 -1
package/dist-browser/index.mjs
CHANGED
|
@@ -216,7 +216,6 @@ function d(e, t, n = {}) {
|
|
|
216
216
|
attributeDefinitions: {},
|
|
217
217
|
capabilities: {},
|
|
218
218
|
behaviors: {},
|
|
219
|
-
conditionSets: {},
|
|
220
219
|
subjects: {},
|
|
221
220
|
identitySlots: {},
|
|
222
221
|
aspects: {},
|
|
@@ -7612,76 +7611,8 @@ var So = function(e, t) {
|
|
|
7612
7611
|
let n = e.sourceRefs && e.sourceRefs.length > 0 ? e.sourceRefs : e.source ? [e.source] : [];
|
|
7613
7612
|
for (let e of n) t += D(e, " ", s);
|
|
7614
7613
|
return t += T(e.refs, " ", s), t += A(e.correspondences, " ", s, P), t += K("verified_by", e.verifiedBy, " "), t += "}\n", t;
|
|
7615
|
-
}, Oo = function(e, t) {
|
|
7616
|
-
let n = {
|
|
7617
|
-
id: e,
|
|
7618
|
-
role: "",
|
|
7619
|
-
entries: [],
|
|
7620
|
-
source: null,
|
|
7621
|
-
sources: [],
|
|
7622
|
-
referenceIds: []
|
|
7623
|
-
}, o = r(t), s = 0;
|
|
7624
|
-
for (; s < o.length;) {
|
|
7625
|
-
let e = o[s++];
|
|
7626
|
-
if (s >= o.length) break;
|
|
7627
|
-
if (e === "role") n.role = a(o[s++]);
|
|
7628
|
-
else if (e === "subject") n.subject = a(o[s++]);
|
|
7629
|
-
else if (e === "description") n.description = a(o[s++]);
|
|
7630
|
-
else if (e === "entries") n.entries = ko(i(o[s++]));
|
|
7631
|
-
else if (e === "source") {
|
|
7632
|
-
let e = L(i(o[s++]));
|
|
7633
|
-
n.sources.push(e), n.source ||= e;
|
|
7634
|
-
} else if (e === "ref") {
|
|
7635
|
-
let e = C(o, s, a, i);
|
|
7636
|
-
if (s = e.next, e.ref.predicate === "derives-from") {
|
|
7637
|
-
let t = pe(e.ref.target);
|
|
7638
|
-
t ? (n.sources.push(t), n.source ||= t) : (n.refs ??= []).push(e.ref);
|
|
7639
|
-
} else e.ref.predicate === "cites" ? n.referenceIds.push(e.ref.target) : (n.refs ??= []).push(e.ref);
|
|
7640
|
-
} else if (e === "corresponds") {
|
|
7641
|
-
let e = O(o, s, a);
|
|
7642
|
-
(n.correspondences ??= []).push(e.corr), s = e.next;
|
|
7643
|
-
} else e === "reference" ? n.referenceIds = q(o[s++]) : s = b(o, s, e);
|
|
7644
|
-
}
|
|
7645
|
-
return (t) => (t.conditionSets[e] = n, t);
|
|
7646
7614
|
};
|
|
7647
|
-
function
|
|
7648
|
-
let t = [], r = n(e), o = 0;
|
|
7649
|
-
for (; o < r.length;) {
|
|
7650
|
-
let e = F(r[o++]);
|
|
7651
|
-
if (!e) break;
|
|
7652
|
-
let s = {
|
|
7653
|
-
quantityKind: e,
|
|
7654
|
-
value: "",
|
|
7655
|
-
unit: "",
|
|
7656
|
-
tolerance: ""
|
|
7657
|
-
};
|
|
7658
|
-
if (o < r.length && r[o].startsWith("{")) {
|
|
7659
|
-
let e = n(i(r[o++])), t = 0;
|
|
7660
|
-
for (; t < e.length;) {
|
|
7661
|
-
let n = e[t++];
|
|
7662
|
-
if (t >= e.length) break;
|
|
7663
|
-
n === "value" ? s.value = a(e[t++]) : n === "unit" ? s.unit = a(e[t++]) : n === "tolerance" ? s.tolerance = a(e[t++]) : n === "note" ? s.note = a(e[t++]) : i(e[t++]);
|
|
7664
|
-
}
|
|
7665
|
-
}
|
|
7666
|
-
t.push(s);
|
|
7667
|
-
}
|
|
7668
|
-
return t;
|
|
7669
|
-
}
|
|
7670
|
-
var Ao = function(e) {
|
|
7671
|
-
let t = "condition_set " + e.id + " {\n";
|
|
7672
|
-
if (e.role && (t += " role " + e.role + "\n"), e.subject && (t += " subject " + e.subject + "\n"), e.description && (t += " description \"" + s(e.description) + "\"\n"), e.entries.length > 0) {
|
|
7673
|
-
t += " entries {\n";
|
|
7674
|
-
for (let n of e.entries) {
|
|
7675
|
-
let e = " " + n.quantityKind + " { value " + P(n.value);
|
|
7676
|
-
n.unit && (e += " unit \"" + s(n.unit) + "\""), n.tolerance && (e += " tolerance " + P(n.tolerance)), n.note && (e += " note \"" + s(n.note) + "\""), t += e + " }\n";
|
|
7677
|
-
}
|
|
7678
|
-
t += " }\n";
|
|
7679
|
-
}
|
|
7680
|
-
let n = e.sources && e.sources.length > 0 ? e.sources : e.source ? [e.source] : [];
|
|
7681
|
-
for (let e of n) t += D(e, " ", s);
|
|
7682
|
-
return t += K("reference", e.referenceIds, " "), t += T(e.refs, " ", s), t += A(e.correspondences, " ", s, P), t += "}\n", t;
|
|
7683
|
-
};
|
|
7684
|
-
function jo(e) {
|
|
7615
|
+
function Oo(e) {
|
|
7685
7616
|
let t = {}, r = n(e), i = 0;
|
|
7686
7617
|
for (; i < r.length;) {
|
|
7687
7618
|
let e = F(r[i++]);
|
|
@@ -7690,7 +7621,7 @@ function jo(e) {
|
|
|
7690
7621
|
}
|
|
7691
7622
|
return t;
|
|
7692
7623
|
}
|
|
7693
|
-
function
|
|
7624
|
+
function ko(e) {
|
|
7694
7625
|
let t = {}, r = n(e), i = 0;
|
|
7695
7626
|
for (; i < r.length;) {
|
|
7696
7627
|
let e = F(r[i++]);
|
|
@@ -7702,10 +7633,10 @@ function Mo(e) {
|
|
|
7702
7633
|
}
|
|
7703
7634
|
return t;
|
|
7704
7635
|
}
|
|
7705
|
-
function
|
|
7636
|
+
function Ao(e) {
|
|
7706
7637
|
return n(e).map(a).filter((e) => e.length > 0);
|
|
7707
7638
|
}
|
|
7708
|
-
function
|
|
7639
|
+
function jo(e) {
|
|
7709
7640
|
let t = {}, r = n(e), o = 0;
|
|
7710
7641
|
for (; o < r.length;) {
|
|
7711
7642
|
let e = F(r[o++]);
|
|
@@ -7717,13 +7648,13 @@ function Po(e) {
|
|
|
7717
7648
|
}
|
|
7718
7649
|
return t;
|
|
7719
7650
|
}
|
|
7720
|
-
function
|
|
7651
|
+
function Mo(e) {
|
|
7721
7652
|
let t = {}, r = n(e), o = 0;
|
|
7722
7653
|
for (; o < r.length;) {
|
|
7723
7654
|
let e = F(r[o++]);
|
|
7724
7655
|
if (!e) break;
|
|
7725
7656
|
if (o < r.length && r[o].startsWith("{")) {
|
|
7726
|
-
t[e] =
|
|
7657
|
+
t[e] = No(i(r[o++]));
|
|
7727
7658
|
continue;
|
|
7728
7659
|
}
|
|
7729
7660
|
let n = "", s = "", c = !1;
|
|
@@ -7739,7 +7670,7 @@ function Fo(e) {
|
|
|
7739
7670
|
}
|
|
7740
7671
|
return t;
|
|
7741
7672
|
}
|
|
7742
|
-
function
|
|
7673
|
+
function No(e) {
|
|
7743
7674
|
let t = {
|
|
7744
7675
|
symbol: "",
|
|
7745
7676
|
derivation: ""
|
|
@@ -7755,18 +7686,18 @@ function Io(e) {
|
|
|
7755
7686
|
}
|
|
7756
7687
|
return t;
|
|
7757
7688
|
}
|
|
7758
|
-
var
|
|
7759
|
-
function
|
|
7689
|
+
var Po = /* @__PURE__ */ new Set(["state", "behavior"]);
|
|
7690
|
+
function Fo(e, t, n) {
|
|
7760
7691
|
return e === "endpoint" ? (n < t.length && !t[n].startsWith("{") && n++, n < t.length && t[n].startsWith("{") && n++, n) : e === "serve" ? (n < t.length && n++, t[n] === "via" && (n += 2), n < t.length && t[n].startsWith("{") && n++, n) : n;
|
|
7761
7692
|
}
|
|
7762
|
-
function
|
|
7693
|
+
function Io(e, t, n, r, i) {
|
|
7763
7694
|
let a = F(n);
|
|
7764
7695
|
return e.misplacedAspects.push({
|
|
7765
7696
|
family: t,
|
|
7766
7697
|
aspect: a
|
|
7767
|
-
}), i < r.length && r[i].startsWith("{") ||
|
|
7698
|
+
}), i < r.length && r[i].startsWith("{") || Po.has(a) ? i++ : i = Fo(a, r, i), i;
|
|
7768
7699
|
}
|
|
7769
|
-
function
|
|
7700
|
+
function Lo(e, t) {
|
|
7770
7701
|
let r = e[t] ?? "";
|
|
7771
7702
|
if (r === "symbolic") return {
|
|
7772
7703
|
level: {
|
|
@@ -7795,7 +7726,7 @@ function Bo(e, t) {
|
|
|
7795
7726
|
next: t + 1
|
|
7796
7727
|
};
|
|
7797
7728
|
}
|
|
7798
|
-
function
|
|
7729
|
+
function Ro(e) {
|
|
7799
7730
|
let t = [], r = n(e), o = 0;
|
|
7800
7731
|
for (; o < r.length;) {
|
|
7801
7732
|
let e = r[o++];
|
|
@@ -7813,12 +7744,12 @@ function Vo(e) {
|
|
|
7813
7744
|
});
|
|
7814
7745
|
continue;
|
|
7815
7746
|
}
|
|
7816
|
-
t.push(
|
|
7747
|
+
t.push(Vo(F(e), i(r[o++])));
|
|
7817
7748
|
}
|
|
7818
7749
|
return t;
|
|
7819
7750
|
}
|
|
7820
|
-
var
|
|
7821
|
-
function
|
|
7751
|
+
var zo = ["mandatory", "optional"];
|
|
7752
|
+
function Bo(e, t) {
|
|
7822
7753
|
let r = {
|
|
7823
7754
|
attribute: "",
|
|
7824
7755
|
attributes: [],
|
|
@@ -7837,13 +7768,13 @@ function Uo(e, t) {
|
|
|
7837
7768
|
else if (t === "label") r.label = a(o[s++]);
|
|
7838
7769
|
else if (t === "obligation") {
|
|
7839
7770
|
let t = a(o[s++]);
|
|
7840
|
-
if (!
|
|
7771
|
+
if (!zo.includes(t)) throw Error(`Parsing error: promise. ID ${e}: Unknown certificate obligation "${t}" (valid: ${zo.join(", ")})`);
|
|
7841
7772
|
r.obligation = t;
|
|
7842
7773
|
} else i(o[s++]);
|
|
7843
7774
|
}
|
|
7844
7775
|
return r;
|
|
7845
7776
|
}
|
|
7846
|
-
function
|
|
7777
|
+
function Vo(e, t) {
|
|
7847
7778
|
let r = {
|
|
7848
7779
|
id: e,
|
|
7849
7780
|
target: "",
|
|
@@ -7859,62 +7790,62 @@ function Wo(e, t) {
|
|
|
7859
7790
|
if (s >= o.length) break;
|
|
7860
7791
|
if (e === "target") r.target = a(o[s++]);
|
|
7861
7792
|
else if (e === "level") {
|
|
7862
|
-
let e =
|
|
7793
|
+
let e = Lo(o, s);
|
|
7863
7794
|
r.level = e.level, s = e.next;
|
|
7864
7795
|
} else if (e === "conditions") {
|
|
7865
7796
|
let e = N(o, s);
|
|
7866
7797
|
r.conditions = a(e.text), s = e.next;
|
|
7867
|
-
} else e === "statement" ? r.statement = a(o[s++]) : e === "verified_by" ? r.verifiedBy = G(o[s++]) : e === "source" ? r.source = L(i(o[s++])) : e === "certificate" ? r.certificate =
|
|
7798
|
+
} else e === "statement" ? r.statement = a(o[s++]) : e === "verified_by" ? r.verifiedBy = G(o[s++]) : e === "source" ? r.source = L(i(o[s++])) : e === "certificate" ? r.certificate = Bo(r.id, i(o[s++])) : i(o[s++]);
|
|
7868
7799
|
}
|
|
7869
7800
|
return r;
|
|
7870
7801
|
}
|
|
7871
|
-
function
|
|
7802
|
+
function Ho(e) {
|
|
7872
7803
|
return e.id === "" && !e.target && !e.level && !e.conditions && e.verifiedBy.length === 0 && !e.source && !e.certificate;
|
|
7873
7804
|
}
|
|
7874
|
-
function
|
|
7805
|
+
function Uo(e, t) {
|
|
7875
7806
|
let r = n(e), a = 0;
|
|
7876
7807
|
for (; a < r.length;) {
|
|
7877
7808
|
let e = r[a++];
|
|
7878
7809
|
if (a >= r.length) break;
|
|
7879
|
-
if (e === "metadata") t.is.metadata =
|
|
7880
|
-
else if (e === "provenance") t.is.provenance =
|
|
7881
|
-
else if (e === "structure") t.is.structure =
|
|
7882
|
-
else if (e === "design_parameters") t.is.designParameters =
|
|
7883
|
-
else if (e === "designed_conditions") t.is.designedConditions =
|
|
7884
|
-
else if (e === "promises") t.is.promises =
|
|
7885
|
-
else if (e === "artifacts") t.is.artifacts =
|
|
7810
|
+
if (e === "metadata") t.is.metadata = Oo(i(r[a++]));
|
|
7811
|
+
else if (e === "provenance") t.is.provenance = Oo(i(r[a++]));
|
|
7812
|
+
else if (e === "structure") t.is.structure = Ao(i(r[a++]));
|
|
7813
|
+
else if (e === "design_parameters") t.is.designParameters = ko(i(r[a++]));
|
|
7814
|
+
else if (e === "designed_conditions") t.is.designedConditions = Oo(i(r[a++]));
|
|
7815
|
+
else if (e === "promises") t.is.promises = Ro(i(r[a++]));
|
|
7816
|
+
else if (e === "artifacts") t.is.artifacts = Ao(i(r[a++]));
|
|
7886
7817
|
else if (e === "endpoint") {
|
|
7887
7818
|
let e = F(r[a++] ?? ""), n = a < r.length ? i(r[a++]) : "";
|
|
7888
7819
|
e && t.is.endpoints.push(Qa(e, n));
|
|
7889
|
-
} else e === "composed_of" ? t.is.composedOf = oo(i(r[a++] ?? "")) : a =
|
|
7820
|
+
} else e === "composed_of" ? t.is.composedOf = oo(i(r[a++] ?? "")) : a = Io(t, "is", e, r, a);
|
|
7890
7821
|
}
|
|
7891
7822
|
}
|
|
7892
|
-
function
|
|
7823
|
+
function Wo(e, t) {
|
|
7893
7824
|
let r = n(e), o = 0;
|
|
7894
7825
|
for (; o < r.length;) {
|
|
7895
7826
|
let e = r[o++];
|
|
7896
7827
|
if (o >= r.length) break;
|
|
7897
|
-
if (e === "attributes") t.has.attributes =
|
|
7898
|
-
else if (e === "dimensions") t.has.dimensions =
|
|
7828
|
+
if (e === "attributes") t.has.attributes = ko(i(r[o++]));
|
|
7829
|
+
else if (e === "dimensions") t.has.dimensions = jo(i(r[o++]));
|
|
7899
7830
|
else if (e === "state") t.has.state = a(r[o++]);
|
|
7900
|
-
else if (e === "characteristics") t.has.characteristics =
|
|
7901
|
-
else if (e === "environmental_context") t.has.environmentalContext =
|
|
7902
|
-
else if (e === "artifact_instances") t.has.artifactInstances =
|
|
7831
|
+
else if (e === "characteristics") t.has.characteristics = Mo(i(r[o++]));
|
|
7832
|
+
else if (e === "environmental_context") t.has.environmentalContext = Ao(i(r[o++]));
|
|
7833
|
+
else if (e === "artifact_instances") t.has.artifactInstances = Ao(i(r[o++]));
|
|
7903
7834
|
else if (e === "serve") {
|
|
7904
7835
|
let e = to(r, o);
|
|
7905
7836
|
t.has.serves.push(e.binding), o = e.next;
|
|
7906
|
-
} else o =
|
|
7837
|
+
} else o = Io(t, "has", e, r, o);
|
|
7907
7838
|
}
|
|
7908
7839
|
}
|
|
7909
|
-
function
|
|
7840
|
+
function Go(e, t) {
|
|
7910
7841
|
let r = n(e), i = 0;
|
|
7911
7842
|
for (; i < r.length;) {
|
|
7912
7843
|
let e = r[i++];
|
|
7913
7844
|
if (i >= r.length) break;
|
|
7914
|
-
e === "behavior" ? t.does.behaviors.push(a(r[i++])) : i =
|
|
7845
|
+
e === "behavior" ? t.does.behaviors.push(a(r[i++])) : i = Io(t, "does", e, r, i);
|
|
7915
7846
|
}
|
|
7916
7847
|
}
|
|
7917
|
-
var
|
|
7848
|
+
var Ko = function(e, t) {
|
|
7918
7849
|
let n = {
|
|
7919
7850
|
id: e,
|
|
7920
7851
|
extends: "",
|
|
@@ -7944,11 +7875,11 @@ var Yo = function(e, t) {
|
|
|
7944
7875
|
for (; s < o.length;) {
|
|
7945
7876
|
let e = o[s++];
|
|
7946
7877
|
if (s >= o.length) break;
|
|
7947
|
-
e === "extends" ? n.extends = a(o[s++]) : e === "is" ?
|
|
7878
|
+
e === "extends" ? n.extends = a(o[s++]) : e === "is" ? Uo(i(o[s++]), n) : e === "has" ? Wo(i(o[s++]), n) : e === "does" ? Go(i(o[s++]), n) : e === "reference" ? n.referenceIds = q(o[s++]) : s = b(o, s, e);
|
|
7948
7879
|
}
|
|
7949
7880
|
return (t) => (t.subjects[e] = n, t);
|
|
7950
7881
|
};
|
|
7951
|
-
function
|
|
7882
|
+
function qo(e, t) {
|
|
7952
7883
|
return {
|
|
7953
7884
|
id: t.id,
|
|
7954
7885
|
extends: "",
|
|
@@ -7998,34 +7929,34 @@ function Xo(e, t) {
|
|
|
7998
7929
|
misplacedAspects: t.misplacedAspects
|
|
7999
7930
|
};
|
|
8000
7931
|
}
|
|
8001
|
-
function
|
|
7932
|
+
function Jo(e, t) {
|
|
8002
7933
|
let n = (t, r) => {
|
|
8003
7934
|
let i = t.extends;
|
|
8004
7935
|
if (!i || r.has(i)) return t;
|
|
8005
7936
|
let a = e.subjects[i];
|
|
8006
|
-
return a ? (r.add(i),
|
|
7937
|
+
return a ? (r.add(i), qo(n(a, r), t)) : t;
|
|
8007
7938
|
};
|
|
8008
7939
|
return n(t, /* @__PURE__ */ new Set([t.id]));
|
|
8009
7940
|
}
|
|
8010
|
-
function
|
|
7941
|
+
function Yo(e, t) {
|
|
8011
7942
|
let n = Object.keys(t);
|
|
8012
7943
|
return n.length === 0 ? "" : " " + e + " { " + n.map((e) => e + " " + P(t[e])).join(" ") + " }\n";
|
|
8013
7944
|
}
|
|
8014
|
-
function
|
|
7945
|
+
function Xo(e, t) {
|
|
8015
7946
|
let n = Object.keys(t);
|
|
8016
7947
|
return n.length === 0 ? "" : " " + e + " { " + n.map((e) => e + " :" + (t[e] ? " " + P(t[e]) : "")).join(" ") + " }\n";
|
|
8017
7948
|
}
|
|
8018
|
-
function
|
|
7949
|
+
function Zo(e, t) {
|
|
8019
7950
|
return t.length === 0 ? "" : " " + e + " { " + t.map(P).join(" ") + " }\n";
|
|
8020
7951
|
}
|
|
8021
|
-
function
|
|
7952
|
+
function Qo(e) {
|
|
8022
7953
|
let t = Object.keys(e);
|
|
8023
7954
|
return t.length === 0 ? "" : " dimensions { " + t.map((t) => t + " in { " + e[t].join(", ") + " }").join(" ") + " }\n";
|
|
8024
7955
|
}
|
|
8025
|
-
function
|
|
7956
|
+
function $o(e) {
|
|
8026
7957
|
return /^ocl\{[\s\S]*\}$/.test(e) ? e : P(e);
|
|
8027
7958
|
}
|
|
8028
|
-
function
|
|
7959
|
+
function es(e) {
|
|
8029
7960
|
if (e.kind === "symbolic") return "symbolic " + P(e.symbolic ?? "");
|
|
8030
7961
|
if (e.kind === "range") {
|
|
8031
7962
|
let t = "";
|
|
@@ -8033,113 +7964,106 @@ function rs(e) {
|
|
|
8033
7964
|
}
|
|
8034
7965
|
return Ie(e.quantity ?? { value: "" });
|
|
8035
7966
|
}
|
|
8036
|
-
function
|
|
7967
|
+
function ts(e, t) {
|
|
8037
7968
|
let n = t + " ", r = t + "certificate {\n";
|
|
8038
7969
|
return e.attribute && (r += n + "attribute " + P(e.attribute) + "\n"), e.attributes.length > 0 && (r += n + "attributes { " + e.attributes.map(P).join(" ") + " }\n"), e.dimension && (r += n + "dimension " + P(e.dimension) + "\n"), e.type && (r += n + "type " + P(e.type) + "\n"), e.label && (r += n + "label \"" + s(e.label) + "\"\n"), e.obligation && (r += n + "obligation " + P(e.obligation) + "\n"), r += t + "}\n", r;
|
|
8039
7970
|
}
|
|
8040
|
-
function
|
|
7971
|
+
function ns(e, t, n = "") {
|
|
8041
7972
|
let r = t + " ", i = t + n + P(e.id) + " {\n";
|
|
8042
|
-
return e.target && (i += r + "target " + P(e.target) + "\n"), e.level && (i += r + "level " +
|
|
7973
|
+
return e.target && (i += r + "target " + P(e.target) + "\n"), e.level && (i += r + "level " + es(e.level) + "\n"), e.conditions && (i += r + "conditions " + $o(e.conditions) + "\n"), e.statement && (i += r + "statement \"" + s(e.statement) + "\"\n"), i += K("verified_by", e.verifiedBy, r), i += lo("source", e.source ?? null, r), e.certificate && (i += ts(e.certificate, r)), i += t + "}\n", i;
|
|
8043
7974
|
}
|
|
8044
|
-
function
|
|
7975
|
+
function rs(e) {
|
|
8045
7976
|
if (e.length === 0) return "";
|
|
8046
|
-
if (e.every(
|
|
7977
|
+
if (e.every(Ho)) return " promises { " + e.map((e) => P(e.statement)).join(" ") + " }\n";
|
|
8047
7978
|
let t = " promises {\n";
|
|
8048
7979
|
for (let n of e) {
|
|
8049
|
-
if (
|
|
7980
|
+
if (Ho(n)) {
|
|
8050
7981
|
t += " " + P(n.statement) + "\n";
|
|
8051
7982
|
continue;
|
|
8052
7983
|
}
|
|
8053
|
-
t +=
|
|
7984
|
+
t += ns(n, " ");
|
|
8054
7985
|
}
|
|
8055
7986
|
return t += " }\n", t;
|
|
8056
7987
|
}
|
|
8057
|
-
function
|
|
7988
|
+
function is(e) {
|
|
8058
7989
|
let t = Object.keys(e);
|
|
8059
7990
|
if (t.length === 0) return "";
|
|
8060
7991
|
let n = " characteristics {\n";
|
|
8061
7992
|
for (let r of t) {
|
|
8062
7993
|
let t = e[r];
|
|
8063
7994
|
if (t.behavior || t.quantityKind || t.unit || t.source && (t.source.doc || t.source.clause)) {
|
|
8064
|
-
n += " " + r + " {\n", t.symbol && (n += " symbol \"" + s(t.symbol) + "\"\n"), t.derivation && (n += " derivation " +
|
|
7995
|
+
n += " " + r + " {\n", t.symbol && (n += " symbol \"" + s(t.symbol) + "\"\n"), t.derivation && (n += " derivation " + $o(t.derivation) + "\n"), t.behavior && (n += " behavior " + P(t.behavior) + "\n"), t.quantityKind && (n += " quantity_kind " + P(t.quantityKind) + "\n"), t.unit && (n += " unit \"" + s(t.unit) + "\"\n"), n += lo("source", t.source ?? null, " "), n += " }\n";
|
|
8065
7996
|
continue;
|
|
8066
7997
|
}
|
|
8067
|
-
n += " " + r + (t.symbol ? " " + t.symbol : ""), t.derivation && (n += " = " +
|
|
7998
|
+
n += " " + r + (t.symbol ? " " + t.symbol : ""), t.derivation && (n += " = " + $o(t.derivation)), n += "\n";
|
|
8068
7999
|
}
|
|
8069
8000
|
return n += " }\n", n;
|
|
8070
8001
|
}
|
|
8071
|
-
function
|
|
8002
|
+
function as(e) {
|
|
8072
8003
|
let t = "";
|
|
8073
8004
|
for (let n of e) t += eo(n, " ");
|
|
8074
8005
|
return t;
|
|
8075
8006
|
}
|
|
8076
|
-
function
|
|
8007
|
+
function os(e) {
|
|
8077
8008
|
let t = "";
|
|
8078
8009
|
for (let n of e) t += no(n, " ");
|
|
8079
8010
|
return t;
|
|
8080
8011
|
}
|
|
8081
|
-
var
|
|
8012
|
+
var ss = function(e) {
|
|
8082
8013
|
let t = "subject " + e.id + " {\n";
|
|
8083
8014
|
e.extends && (t += " extends " + e.extends + "\n");
|
|
8084
|
-
let n =
|
|
8015
|
+
let n = Yo("metadata", e.is.metadata) + Yo("provenance", e.is.provenance) + Zo("structure", e.is.structure) + Xo("design_parameters", e.is.designParameters) + Yo("designed_conditions", e.is.designedConditions) + rs(e.is.promises) + Zo("artifacts", e.is.artifacts) + as(e.is.endpoints) + (e.is.composedOf ? co(e.is.composedOf, " ") : "");
|
|
8085
8016
|
n && (t += " is {\n" + n + " }\n");
|
|
8086
|
-
let r =
|
|
8017
|
+
let r = Xo("attributes", e.has.attributes) + Qo(e.has.dimensions) + (e.has.state ? " state " + P(e.has.state) + "\n" : "") + is(e.has.characteristics) + Zo("environmental_context", e.has.environmentalContext) + Zo("artifact_instances", e.has.artifactInstances) + os(e.has.serves);
|
|
8087
8018
|
r && (t += " has {\n" + r + " }\n");
|
|
8088
8019
|
let i = "";
|
|
8089
8020
|
for (let t of e.does.behaviors) i += " behavior " + P(t) + "\n";
|
|
8090
8021
|
return i && (t += " does {\n" + i + " }\n"), t += K("reference", e.referenceIds, " "), t += "}\n", t;
|
|
8091
|
-
},
|
|
8022
|
+
}, cs = {
|
|
8092
8023
|
keyword: "instrument",
|
|
8093
8024
|
field: "instruments",
|
|
8094
8025
|
takesID: !0,
|
|
8095
8026
|
parse: uo,
|
|
8096
8027
|
dump: yo
|
|
8097
|
-
},
|
|
8028
|
+
}, ls = {
|
|
8098
8029
|
keyword: "attribute_definition",
|
|
8099
8030
|
field: "attributeDefinitions",
|
|
8100
8031
|
takesID: !0,
|
|
8101
8032
|
parse: So,
|
|
8102
8033
|
dump: Co
|
|
8103
|
-
},
|
|
8034
|
+
}, us = {
|
|
8104
8035
|
keyword: "capability",
|
|
8105
8036
|
field: "capabilities",
|
|
8106
8037
|
takesID: !0,
|
|
8107
8038
|
parse: wo,
|
|
8108
8039
|
dump: To
|
|
8109
|
-
},
|
|
8040
|
+
}, ds = {
|
|
8110
8041
|
keyword: "behavior",
|
|
8111
8042
|
field: "behaviors",
|
|
8112
8043
|
takesID: !0,
|
|
8113
8044
|
parse: Eo,
|
|
8114
8045
|
dump: Do
|
|
8115
|
-
},
|
|
8116
|
-
keyword: "condition_set",
|
|
8117
|
-
field: "conditionSets",
|
|
8118
|
-
takesID: !0,
|
|
8119
|
-
parse: Oo,
|
|
8120
|
-
dump: Ao,
|
|
8121
|
-
deprecated: "the severity/condition register is the legacy spelling — migrate to the typed table construct (typed columns, typed rows; the values that decide testing bind in limits via table:<id>.<column>); the legacy spelling keeps parsing as visible debt"
|
|
8122
|
-
}, gs = {
|
|
8046
|
+
}, fs = {
|
|
8123
8047
|
keyword: "subject",
|
|
8124
8048
|
field: "subjects",
|
|
8125
8049
|
takesID: !0,
|
|
8126
|
-
parse:
|
|
8127
|
-
resolve:
|
|
8128
|
-
dump:
|
|
8050
|
+
parse: Ko,
|
|
8051
|
+
resolve: Jo,
|
|
8052
|
+
dump: ss
|
|
8129
8053
|
};
|
|
8130
8054
|
//#endregion
|
|
8131
8055
|
//#region src/ser-des/config/instance.ts
|
|
8132
|
-
function
|
|
8056
|
+
function ps(e) {
|
|
8133
8057
|
return !e.startsWith("\"") && e.endsWith(":") && e.length > 1;
|
|
8134
8058
|
}
|
|
8135
|
-
function
|
|
8059
|
+
function ms(e) {
|
|
8136
8060
|
let t = {}, r = n(e), o = 0;
|
|
8137
8061
|
for (; o < r.length;) {
|
|
8138
8062
|
let e = F(r[o++]);
|
|
8139
8063
|
if (!e) break;
|
|
8140
8064
|
r[o] === ":" && o++;
|
|
8141
8065
|
let n = [];
|
|
8142
|
-
for (; o < r.length && r[o + 1] !== ":" && !
|
|
8066
|
+
for (; o < r.length && r[o + 1] !== ":" && !ps(r[o]);) n.push(r[o++]);
|
|
8143
8067
|
if (n.length === 0) {
|
|
8144
8068
|
t[e] = { value: "" };
|
|
8145
8069
|
continue;
|
|
@@ -8157,7 +8081,7 @@ function vs(e) {
|
|
|
8157
8081
|
}
|
|
8158
8082
|
return t;
|
|
8159
8083
|
}
|
|
8160
|
-
function
|
|
8084
|
+
function hs(e) {
|
|
8161
8085
|
let t = {}, r = n(e), i = 0;
|
|
8162
8086
|
for (; i < r.length;) {
|
|
8163
8087
|
let e = F(r[i++]);
|
|
@@ -8166,18 +8090,18 @@ function ys(e) {
|
|
|
8166
8090
|
}
|
|
8167
8091
|
return t;
|
|
8168
8092
|
}
|
|
8169
|
-
function
|
|
8093
|
+
function gs(e) {
|
|
8170
8094
|
return n(a(e)).map(a).filter((e) => e.length > 0);
|
|
8171
8095
|
}
|
|
8172
|
-
function
|
|
8096
|
+
function _s(e, t) {
|
|
8173
8097
|
let r = n(e), a = 0;
|
|
8174
8098
|
for (; a < r.length;) {
|
|
8175
8099
|
let e = r[a++];
|
|
8176
8100
|
if (a >= r.length) break;
|
|
8177
|
-
e === "attributes" ? t.has.attributes =
|
|
8101
|
+
e === "attributes" ? t.has.attributes = ms(i(r[a++])) : e === "dimensions" ? t.has.dimensions = hs(i(r[a++])) : e === "test_context" ? t.has.testContext = ms(i(r[a++])) : i(r[a++]);
|
|
8178
8102
|
}
|
|
8179
8103
|
}
|
|
8180
|
-
function
|
|
8104
|
+
function vs(e) {
|
|
8181
8105
|
if (e.length === 0) return { value: "" };
|
|
8182
8106
|
let t = a(e[0]);
|
|
8183
8107
|
return e.length === 1 ? { value: t } : {
|
|
@@ -8185,7 +8109,7 @@ function Ss(e) {
|
|
|
8185
8109
|
unit: e.slice(1).map(a).join(" ")
|
|
8186
8110
|
};
|
|
8187
8111
|
}
|
|
8188
|
-
var
|
|
8112
|
+
var ys = function(e, t) {
|
|
8189
8113
|
let n = {
|
|
8190
8114
|
id: e,
|
|
8191
8115
|
of: "",
|
|
@@ -8209,40 +8133,40 @@ var Cs = function(e, t) {
|
|
|
8209
8133
|
s++;
|
|
8210
8134
|
let t = [];
|
|
8211
8135
|
for (; s < o.length && o[s] !== "}" && !(s + 1 < o.length && o[s + 1] === "=");) t.push(o[s++]);
|
|
8212
|
-
n.has.attributes[e] =
|
|
8213
|
-
} else e === "level" ? n.level = a(o[s++]) : e === "model" ? n.model = a(o[s++]) : e === "group" ? n.group = a(o[s++]) : e === "family" ? n.family = a(o[s++]) : e === "definition_versions" ? n.definitionVersions =
|
|
8136
|
+
n.has.attributes[e] = vs(t);
|
|
8137
|
+
} else e === "level" ? n.level = a(o[s++]) : e === "model" ? n.model = a(o[s++]) : e === "group" ? n.group = a(o[s++]) : e === "family" ? n.family = a(o[s++]) : e === "definition_versions" ? n.definitionVersions = hs(i(o[s++])) : e === "has" ? _s(i(o[s++]), n) : e === "reference" ? n.referenceIds = gs(o[s++]) : i(o[s++]);
|
|
8214
8138
|
}
|
|
8215
8139
|
return (t) => (t.instances[e] = n, t);
|
|
8216
8140
|
};
|
|
8217
|
-
function
|
|
8141
|
+
function bs(e, t) {
|
|
8218
8142
|
let n = Object.keys(t);
|
|
8219
8143
|
return n.length === 0 ? "" : " " + e + " { " + n.map((e) => e + " : " + Fe(t[e])).join(" ") + " }\n";
|
|
8220
8144
|
}
|
|
8221
|
-
function
|
|
8145
|
+
function xs(e, t) {
|
|
8222
8146
|
let n = Object.keys(t);
|
|
8223
8147
|
return n.length === 0 ? "" : " " + e + " { " + n.map((e) => e + " : " + P(t[e])).join(" ") + " }\n";
|
|
8224
8148
|
}
|
|
8225
|
-
var
|
|
8149
|
+
var Ss = {
|
|
8226
8150
|
keyword: "instance",
|
|
8227
8151
|
field: "instances",
|
|
8228
8152
|
takesID: !0,
|
|
8229
|
-
parse:
|
|
8153
|
+
parse: ys,
|
|
8230
8154
|
dump: function(e) {
|
|
8231
8155
|
let t = "instance " + e.id + " {\n";
|
|
8232
8156
|
e.of && (t += " of " + e.of + "\n"), e.level && (t += " level " + e.level + "\n"), e.model && (t += " model " + e.model + "\n"), e.group && (t += " group " + e.group + "\n"), e.family && (t += " family " + e.family + "\n");
|
|
8233
8157
|
let n = Object.keys(e.definitionVersions);
|
|
8234
8158
|
n.length > 0 && (t += " definition_versions { " + n.map((t) => t + " : " + P(e.definitionVersions[t])).join(" ") + " }\n");
|
|
8235
|
-
let r =
|
|
8159
|
+
let r = bs("attributes", e.has.attributes) + xs("dimensions", e.has.dimensions) + bs("test_context", e.has.testContext);
|
|
8236
8160
|
return r && (t += " has {\n" + r + " }\n"), e.referenceIds.length > 0 && (t += " reference { " + e.referenceIds.join(" ") + " }\n"), t += "}\n", t;
|
|
8237
8161
|
}
|
|
8238
|
-
},
|
|
8162
|
+
}, Cs = [
|
|
8239
8163
|
"string",
|
|
8240
8164
|
"designation",
|
|
8241
8165
|
"serial",
|
|
8242
8166
|
"year",
|
|
8243
8167
|
"mark",
|
|
8244
8168
|
"map"
|
|
8245
|
-
],
|
|
8169
|
+
], ws = ["marked-on-instrument", "accompanying-document"], Ts = (e, t) => {
|
|
8246
8170
|
let r = {
|
|
8247
8171
|
id: e,
|
|
8248
8172
|
label: "",
|
|
@@ -8257,11 +8181,11 @@ var Es = {
|
|
|
8257
8181
|
if (t === "label") r.label = a(o());
|
|
8258
8182
|
else if (t === "type") {
|
|
8259
8183
|
let t = a(o());
|
|
8260
|
-
if (!
|
|
8184
|
+
if (!Cs.includes(t)) throw Error(`Parsing error: identity_slot. ID ${e}: Unknown identity slot type "${t}" (valid: ${Cs.join(", ")})`);
|
|
8261
8185
|
r.type = t;
|
|
8262
8186
|
} else if (t === "presentation") {
|
|
8263
8187
|
let t = n(a(o())).map(F).map(a).filter((e) => e.length > 0);
|
|
8264
|
-
for (let n of t) if (!
|
|
8188
|
+
for (let n of t) if (!ws.includes(n)) throw Error(`Parsing error: identity_slot. ID ${e}: Unknown presentation channel "${n}" (valid: ${ws.join(", ")})`);
|
|
8265
8189
|
r.presentation = t;
|
|
8266
8190
|
} else if (t === "optional") r.optional = o() === "true";
|
|
8267
8191
|
else if (t === "definition") r.definition = a(o());
|
|
@@ -8273,10 +8197,10 @@ var Es = {
|
|
|
8273
8197
|
construct: "identity_slot",
|
|
8274
8198
|
id: e
|
|
8275
8199
|
}), (t) => (t.identitySlots[e] = r, t);
|
|
8276
|
-
},
|
|
8200
|
+
}, Es = function(e) {
|
|
8277
8201
|
let t = "identity_slot " + e.id + " {\n";
|
|
8278
8202
|
return e.label && (t += " label \"" + s(e.label) + "\"\n"), e.type && (t += " type " + P(e.type) + "\n"), e.presentation.length > 0 && (t += " presentation { " + e.presentation.map(P).join(" ") + " }\n"), e.optional && (t += " optional true\n"), e.definition && (t += " definition \"" + s(e.definition) + "\"\n"), e.metamodelClass && (t += " metamodel_class " + P(e.metamodelClass) + "\n"), e.source && (e.source.doc || e.source.clause) && (t += " source {\n", e.source.doc && (t += " doc \"" + s(e.source.doc) + "\"\n"), e.source.clause && (t += " clause \"" + s(e.source.clause) + "\"\n"), t += " }\n"), t += "}\n", t;
|
|
8279
|
-
},
|
|
8203
|
+
}, Ds = [
|
|
8280
8204
|
"marking",
|
|
8281
8205
|
"inscription",
|
|
8282
8206
|
"sealing",
|
|
@@ -8288,7 +8212,7 @@ var Es = {
|
|
|
8288
8212
|
"construction",
|
|
8289
8213
|
"documentation",
|
|
8290
8214
|
"other"
|
|
8291
|
-
],
|
|
8215
|
+
], Os = (e, t) => {
|
|
8292
8216
|
let r = {
|
|
8293
8217
|
id: e,
|
|
8294
8218
|
label: "",
|
|
@@ -8305,7 +8229,7 @@ var Es = {
|
|
|
8305
8229
|
if (t === "label") r.label = a(o());
|
|
8306
8230
|
else if (t === "kind") {
|
|
8307
8231
|
let t = a(o());
|
|
8308
|
-
if (!
|
|
8232
|
+
if (!Ds.includes(t)) throw Error(`Parsing error: aspect. ID ${e}: Unknown aspect kind "${t}" (valid: ${Ds.join(", ")})`);
|
|
8309
8233
|
r.kind = t;
|
|
8310
8234
|
} else if (t === "definition") r.definition = a(o());
|
|
8311
8235
|
else if (t === "metamodel_class") r.metamodelClass = a(o());
|
|
@@ -8320,10 +8244,10 @@ var Es = {
|
|
|
8320
8244
|
construct: "aspect",
|
|
8321
8245
|
id: e
|
|
8322
8246
|
}), (t) => (t.aspects[e] = r, t);
|
|
8323
|
-
},
|
|
8247
|
+
}, ks = function(e) {
|
|
8324
8248
|
let t = "aspect " + e.id + " {\n";
|
|
8325
8249
|
return e.label && (t += " label \"" + s(e.label) + "\"\n"), e.kind && (t += " kind " + P(e.kind) + "\n"), e.definition && (t += " definition \"" + s(e.definition) + "\"\n"), e.metamodelClass && (t += " metamodel_class " + P(e.metamodelClass) + "\n"), e.termRef && (t += " term_ref " + P(e.termRef) + "\n"), e.component && (t += " component " + P(e.component) + "\n"), e.attribute && (t += " attribute " + P(e.attribute) + "\n"), e.contains.length > 0 && (t += " contains { " + e.contains.map(P).join(" ") + " }\n"), e.source && (e.source.doc || e.source.clause) && (t += " source {\n", e.source.doc && (t += " doc \"" + s(e.source.doc) + "\"\n"), e.source.clause && (t += " clause \"" + s(e.source.clause) + "\"\n"), t += " }\n"), t += "}\n", t;
|
|
8326
|
-
},
|
|
8250
|
+
}, As = (e, t) => {
|
|
8327
8251
|
let n = {
|
|
8328
8252
|
id: e,
|
|
8329
8253
|
promises: []
|
|
@@ -8331,22 +8255,22 @@ var Es = {
|
|
|
8331
8255
|
return y(t, (e, t) => {
|
|
8332
8256
|
if (e === "promise") {
|
|
8333
8257
|
let e = a(F(t()));
|
|
8334
|
-
n.promises.push(
|
|
8258
|
+
n.promises.push(Vo(e, i(t())));
|
|
8335
8259
|
} else return !1;
|
|
8336
8260
|
return !0;
|
|
8337
8261
|
}, {
|
|
8338
8262
|
construct: "promise_set",
|
|
8339
8263
|
id: e
|
|
8340
8264
|
}), (t) => (t.promiseSets[e] = n, t);
|
|
8341
|
-
},
|
|
8265
|
+
}, js = function(e) {
|
|
8342
8266
|
let t = "promise_set " + P(e.id) + " {\n";
|
|
8343
|
-
for (let n of e.promises) t +=
|
|
8267
|
+
for (let n of e.promises) t += ns(n, " ", "promise ");
|
|
8344
8268
|
return t += "}\n", t;
|
|
8345
|
-
},
|
|
8269
|
+
}, Ms = [
|
|
8346
8270
|
"shall",
|
|
8347
8271
|
"should",
|
|
8348
8272
|
"may"
|
|
8349
|
-
],
|
|
8273
|
+
], Ns = (e, t) => {
|
|
8350
8274
|
let n = {
|
|
8351
8275
|
id: e,
|
|
8352
8276
|
declarationForm: "",
|
|
@@ -8367,7 +8291,7 @@ var Es = {
|
|
|
8367
8291
|
else if (n === "description") t.description = a(r());
|
|
8368
8292
|
else if (n === "obligation") {
|
|
8369
8293
|
let n = a(r());
|
|
8370
|
-
if (!
|
|
8294
|
+
if (!Ms.includes(n)) throw Error(`Parsing error: application_declaration. ID ${e}: Unknown obligation "${n}" (valid: ${Ms.join(", ")})`);
|
|
8371
8295
|
t.obligation = n;
|
|
8372
8296
|
} else if (n === "source") t.source = L(i(r()));
|
|
8373
8297
|
else return !1;
|
|
@@ -8382,12 +8306,12 @@ var Es = {
|
|
|
8382
8306
|
construct: "application_declaration",
|
|
8383
8307
|
id: e
|
|
8384
8308
|
}), (t) => (t.applicationDeclarations[e] = n, t);
|
|
8385
|
-
},
|
|
8309
|
+
}, Ps = function(e) {
|
|
8386
8310
|
let t = "application_declaration " + P(e.id) + " {\n";
|
|
8387
8311
|
e.declarationForm && (t += " declaration_form " + P(e.declarationForm) + "\n");
|
|
8388
8312
|
for (let n of e.documents) t += " document " + P(n.id) + " {\n", n.name && (t += " name \"" + s(n.name) + "\"\n"), n.description && (t += " description \"" + s(n.description) + "\"\n"), n.obligation && (t += " obligation " + P(n.obligation) + "\n"), n.source && (n.source.doc || n.source.clause) && (t += " source {\n", n.source.doc && (t += " doc \"" + s(n.source.doc) + "\"\n"), n.source.clause && (t += " clause \"" + s(n.source.clause) + "\"\n"), t += " }\n"), t += " }\n";
|
|
8389
8313
|
return t += "}\n", t;
|
|
8390
|
-
},
|
|
8314
|
+
}, Fs = (e, t) => {
|
|
8391
8315
|
let n = {
|
|
8392
8316
|
id: e,
|
|
8393
8317
|
fields: []
|
|
@@ -8414,28 +8338,28 @@ var Es = {
|
|
|
8414
8338
|
construct: "calculation_context",
|
|
8415
8339
|
id: e
|
|
8416
8340
|
}), (t) => (t.calculationContexts[e] = n, t);
|
|
8417
|
-
},
|
|
8341
|
+
}, Is = function(e) {
|
|
8418
8342
|
let t = "calculation_context " + P(e.id) + " {\n";
|
|
8419
8343
|
for (let n of e.fields) {
|
|
8420
8344
|
let e = " field " + P(n.id) + " { source " + P(n.source);
|
|
8421
8345
|
n.expression && (e += " expression \"" + s(n.expression) + "\""), t += e + " }\n";
|
|
8422
8346
|
}
|
|
8423
8347
|
return t += "}\n", t;
|
|
8424
|
-
},
|
|
8348
|
+
}, Ls = [
|
|
8425
8349
|
"integer",
|
|
8426
8350
|
"number",
|
|
8427
8351
|
"string",
|
|
8428
8352
|
"text",
|
|
8429
8353
|
"boolean",
|
|
8430
8354
|
"date"
|
|
8431
|
-
],
|
|
8355
|
+
], Rs = [
|
|
8432
8356
|
"MUST",
|
|
8433
8357
|
"SHALL",
|
|
8434
8358
|
"RECOMMEND",
|
|
8435
8359
|
"SHOULD",
|
|
8436
8360
|
"MAY",
|
|
8437
8361
|
"OPTIONAL"
|
|
8438
|
-
],
|
|
8362
|
+
], zs = (e, t) => {
|
|
8439
8363
|
let n = {
|
|
8440
8364
|
id: e,
|
|
8441
8365
|
label: "",
|
|
@@ -8458,14 +8382,14 @@ var Es = {
|
|
|
8458
8382
|
if (n === "label") t.label = a(r());
|
|
8459
8383
|
else if (n === "type") {
|
|
8460
8384
|
let n = a(r());
|
|
8461
|
-
if (!
|
|
8385
|
+
if (!Ls.includes(n)) throw Error(`Parsing error: evaluation_dimensions. ID ${e}: Unknown field type "${n}" (valid: ${Ls.join(", ")})`);
|
|
8462
8386
|
t.type = n;
|
|
8463
8387
|
} else if (n === "enum") t.enumRef = a(r());
|
|
8464
8388
|
else if (n === "required") t.required = r() === "true";
|
|
8465
8389
|
else if (n === "editable") t.editable = r() === "true";
|
|
8466
8390
|
else if (n === "setting") {
|
|
8467
8391
|
let n = a(r());
|
|
8468
|
-
if (!
|
|
8392
|
+
if (!Rs.includes(n)) throw Error(`Parsing error: evaluation_dimensions. ID ${e}: Unknown setting "${n}" (valid: ${Rs.join(", ")})`);
|
|
8469
8393
|
t.setting = n;
|
|
8470
8394
|
} else if (n === "multiple") t.multiple = r() === "true";
|
|
8471
8395
|
else return !1;
|
|
@@ -8480,12 +8404,12 @@ var Es = {
|
|
|
8480
8404
|
construct: "evaluation_dimensions",
|
|
8481
8405
|
id: e
|
|
8482
8406
|
}), (t) => (t.evaluationDimensions[e] = n, t);
|
|
8483
|
-
},
|
|
8407
|
+
}, Bs = function(e) {
|
|
8484
8408
|
let t = "evaluation_dimensions " + P(e.id) + " {\n";
|
|
8485
8409
|
e.label && (t += " label \"" + s(e.label) + "\"\n");
|
|
8486
8410
|
for (let n of e.fields) t += " field " + P(n.id) + " {\n", n.label && (t += " label \"" + s(n.label) + "\"\n"), n.type && (t += " type " + P(n.type) + "\n"), n.enumRef && (t += " enum " + P(n.enumRef) + "\n"), t += " required " + (n.required ? "true" : "false") + "\n", t += " editable " + (n.editable ? "true" : "false") + "\n", n.setting && (t += " setting " + P(n.setting) + "\n"), n.multiple && (t += " multiple true\n"), t += " }\n";
|
|
8487
8411
|
return t += "}\n", t;
|
|
8488
|
-
},
|
|
8412
|
+
}, Vs = (e, t) => {
|
|
8489
8413
|
let r = {
|
|
8490
8414
|
id: e,
|
|
8491
8415
|
dimensions: {},
|
|
@@ -8505,13 +8429,13 @@ var Es = {
|
|
|
8505
8429
|
construct: "evaluation_profile",
|
|
8506
8430
|
id: e
|
|
8507
8431
|
}), (t) => (t.evaluationProfiles[e] = r, t);
|
|
8508
|
-
},
|
|
8432
|
+
}, Hs = function(e) {
|
|
8509
8433
|
let t = "evaluation_profile " + P(e.id) + " {\n", n = Object.keys(e.dimensions);
|
|
8510
8434
|
return n.length > 0 && (t += " dimensions { " + n.map((t) => {
|
|
8511
8435
|
let n = e.dimensions[t];
|
|
8512
8436
|
return Array.isArray(n) ? P(t) + " { " + n.map(P).join(" ") + " }" : P(t) + " " + P(n);
|
|
8513
8437
|
}).join(" ") + " }\n"), e.description && (t += " description \"" + s(e.description) + "\"\n"), t += "}\n", t;
|
|
8514
|
-
},
|
|
8438
|
+
}, Us = (e, t) => {
|
|
8515
8439
|
let n = {
|
|
8516
8440
|
id: e,
|
|
8517
8441
|
subject: "",
|
|
@@ -8577,7 +8501,7 @@ var Es = {
|
|
|
8577
8501
|
construct: "attestation",
|
|
8578
8502
|
id: e
|
|
8579
8503
|
}), (t) => (t.attestations[e] = n, t);
|
|
8580
|
-
},
|
|
8504
|
+
}, Ws = function(e) {
|
|
8581
8505
|
let t = "attestation " + P(e.id) + " {\n";
|
|
8582
8506
|
e.subject && (t += " subject " + P(e.subject) + "\n"), e.promises && (t += " promises " + P(e.promises) + "\n");
|
|
8583
8507
|
for (let n of e.basis) t += " basis " + P(n.kind) + " \"" + n.id.replace(/"/g, "\\\"") + "\"\n";
|
|
@@ -8592,11 +8516,11 @@ var Es = {
|
|
|
8592
8516
|
t += " }\n";
|
|
8593
8517
|
}
|
|
8594
8518
|
return t += "}\n", t;
|
|
8595
|
-
},
|
|
8596
|
-
function
|
|
8519
|
+
}, Gs = ["mandatory", "optional"];
|
|
8520
|
+
function Ks(e) {
|
|
8597
8521
|
return n(a(e)).map(F).map(a).filter((e) => e.length > 0);
|
|
8598
8522
|
}
|
|
8599
|
-
var
|
|
8523
|
+
var qs = (e, t) => {
|
|
8600
8524
|
let n = {
|
|
8601
8525
|
id: e,
|
|
8602
8526
|
numberFormat: "",
|
|
@@ -8635,11 +8559,11 @@ var Zs = (e, t) => {
|
|
|
8635
8559
|
if (n === "type") t.type = a(r());
|
|
8636
8560
|
else if (n === "label") t.label = a(r());
|
|
8637
8561
|
else if (n === "attribute") t.attribute = a(r());
|
|
8638
|
-
else if (n === "attributes") t.attributes =
|
|
8562
|
+
else if (n === "attributes") t.attributes = Ks(r());
|
|
8639
8563
|
else if (n === "dimension") t.dimension = a(r());
|
|
8640
8564
|
else if (n === "obligation") {
|
|
8641
8565
|
let n = a(r());
|
|
8642
|
-
if (!
|
|
8566
|
+
if (!Gs.includes(n)) throw Error(`Parsing error: certificate_template. ID ${e}: Unknown obligation "${n}" (valid: ${Gs.join(", ")})`);
|
|
8643
8567
|
t.obligation = n;
|
|
8644
8568
|
} else return !1;
|
|
8645
8569
|
return !0;
|
|
@@ -8673,7 +8597,7 @@ var Zs = (e, t) => {
|
|
|
8673
8597
|
construct: "certificate_template",
|
|
8674
8598
|
id: e
|
|
8675
8599
|
}), (t) => (t.certificateTemplates[e] = n, t);
|
|
8676
|
-
},
|
|
8600
|
+
}, Js = function(e) {
|
|
8677
8601
|
let t = "certificate_template " + P(e.id) + " {\n";
|
|
8678
8602
|
e.overlay && (t += " overlay true\n"), e.numberFormat && (t += " number_format \"" + s(e.numberFormat) + "\"\n"), e.dimensionLabels && (t += " dimension_labels {\n", t += " pattern \"" + s(e.dimensionLabels.pattern) + "\"\n", e.dimensionLabels.separator && (t += " separator \"" + s(e.dimensionLabels.separator) + "\"\n"), t += " }\n");
|
|
8679
8603
|
for (let n of e.characteristics) t += " characteristic " + P(n.id) + " {\n", n.type && (t += " type " + P(n.type) + "\n"), n.label && (t += " label \"" + s(n.label) + "\"\n"), n.attribute && (t += " attribute " + P(n.attribute) + "\n"), n.attributes.length > 0 && (t += " attributes { " + n.attributes.map(P).join(" ") + " }\n"), n.dimension && (t += " dimension " + P(n.dimension) + "\n"), n.obligation && (t += " obligation " + n.obligation + "\n"), t += " }\n";
|
|
@@ -8685,16 +8609,16 @@ var Zs = (e, t) => {
|
|
|
8685
8609
|
};
|
|
8686
8610
|
//#endregion
|
|
8687
8611
|
//#region src/ser-des/config/artifact.ts
|
|
8688
|
-
function
|
|
8612
|
+
function Ys(e) {
|
|
8689
8613
|
return n(a(e)).map(F).map(a).filter((e) => e.length > 0);
|
|
8690
8614
|
}
|
|
8691
|
-
function
|
|
8615
|
+
function Xs(e, t, n) {
|
|
8692
8616
|
return t.length === 0 ? "" : `${n}${e} { ${t.join(" ")} }\n`;
|
|
8693
8617
|
}
|
|
8694
|
-
function
|
|
8618
|
+
function Zs(e) {
|
|
8695
8619
|
return n(a(e)).map(a).filter((e) => e.length > 0);
|
|
8696
8620
|
}
|
|
8697
|
-
function
|
|
8621
|
+
function Qs(e) {
|
|
8698
8622
|
let t = [], r = n(e), i = 0;
|
|
8699
8623
|
for (; i < r.length;) {
|
|
8700
8624
|
let e = F(r[i++]);
|
|
@@ -8714,7 +8638,7 @@ function nc(e) {
|
|
|
8714
8638
|
}
|
|
8715
8639
|
return t;
|
|
8716
8640
|
}
|
|
8717
|
-
function
|
|
8641
|
+
function $s(e) {
|
|
8718
8642
|
let t = [], r = n(e), o = 0;
|
|
8719
8643
|
for (; o < r.length;) {
|
|
8720
8644
|
let e = F(r[o++]);
|
|
@@ -8729,14 +8653,14 @@ function rc(e) {
|
|
|
8729
8653
|
for (; t < e.length;) {
|
|
8730
8654
|
let n = e[t++];
|
|
8731
8655
|
if (t >= e.length) break;
|
|
8732
|
-
n === "kinds" ? s.kinds =
|
|
8656
|
+
n === "kinds" ? s.kinds = Ys(e[t++]) : n === "role" ? s.role = a(e[t++]) : i(e[t++]);
|
|
8733
8657
|
}
|
|
8734
8658
|
}
|
|
8735
8659
|
t.push(s);
|
|
8736
8660
|
}
|
|
8737
8661
|
return t;
|
|
8738
8662
|
}
|
|
8739
|
-
function
|
|
8663
|
+
function ec(e) {
|
|
8740
8664
|
let t = {
|
|
8741
8665
|
fields: [],
|
|
8742
8666
|
structure: "",
|
|
@@ -8745,11 +8669,11 @@ function ic(e) {
|
|
|
8745
8669
|
for (; o < r.length;) {
|
|
8746
8670
|
let e = r[o++];
|
|
8747
8671
|
if (o >= r.length) break;
|
|
8748
|
-
e === "fields" ? t.fields =
|
|
8672
|
+
e === "fields" ? t.fields = Qs(i(r[o++])) : e === "structure" ? t.structure = a(r[o++]) : e === "media" ? t.media = $s(i(r[o++])) : o = b(r, o, e);
|
|
8749
8673
|
}
|
|
8750
8674
|
return t;
|
|
8751
8675
|
}
|
|
8752
|
-
var
|
|
8676
|
+
var tc = function(e, t) {
|
|
8753
8677
|
let n = {
|
|
8754
8678
|
id: e,
|
|
8755
8679
|
name: "",
|
|
@@ -8769,7 +8693,7 @@ var ac = function(e, t) {
|
|
|
8769
8693
|
if (s >= o.length) break;
|
|
8770
8694
|
if (e === "name") n.name = a(o[s++]);
|
|
8771
8695
|
else if (e === "description") n.description = a(o[s++]);
|
|
8772
|
-
else if (e === "content_contract") n.contentContract =
|
|
8696
|
+
else if (e === "content_contract") n.contentContract = ec(i(o[s++]));
|
|
8773
8697
|
else if (e === "contract_from") n.contractFrom = F(a(o[s++]));
|
|
8774
8698
|
else if (e === "produced_when") {
|
|
8775
8699
|
let e = a(o[s++] ?? "");
|
|
@@ -8784,7 +8708,7 @@ var ac = function(e, t) {
|
|
|
8784
8708
|
else if (e === "source") {
|
|
8785
8709
|
let e = L(i(o[s++]));
|
|
8786
8710
|
(n.sourceRefs ??= []).push(e), n.source ||= e;
|
|
8787
|
-
} else if (e === "reference") n.referenceIds =
|
|
8711
|
+
} else if (e === "reference") n.referenceIds = Zs(o[s++]);
|
|
8788
8712
|
else if (e === "ref") {
|
|
8789
8713
|
let e = C(o, s, a, i);
|
|
8790
8714
|
E(n, e.ref) || (n.refs ??= []).push(e.ref), s = e.next;
|
|
@@ -8795,10 +8719,10 @@ var ac = function(e, t) {
|
|
|
8795
8719
|
}
|
|
8796
8720
|
return (t) => (t.artifactDefinitions[e] = n, t);
|
|
8797
8721
|
};
|
|
8798
|
-
function
|
|
8722
|
+
function nc(e) {
|
|
8799
8723
|
return e.kind === "per_interval" ? `per_interval ${P(e.interval ?? "")}` : e.kind === "on_event" ? `on_event ${P(e.event ?? "")}` : e.kind;
|
|
8800
8724
|
}
|
|
8801
|
-
var
|
|
8725
|
+
var rc = function(e) {
|
|
8802
8726
|
let t = "artifact_definition " + e.id + " {\n";
|
|
8803
8727
|
e.name && (t += " name \"" + s(e.name) + "\"\n"), e.description && (t += " description \"" + s(e.description) + "\"\n"), e.contractFrom && (t += " contract_from " + e.contractFrom + "\n");
|
|
8804
8728
|
let n = e.contentContract;
|
|
@@ -8818,11 +8742,11 @@ var sc = function(e) {
|
|
|
8818
8742
|
}
|
|
8819
8743
|
t += " }\n";
|
|
8820
8744
|
}
|
|
8821
|
-
e.producedWhen.kind && (t += " produced_when " +
|
|
8745
|
+
e.producedWhen.kind && (t += " produced_when " + nc(e.producedWhen) + "\n"), e.retention && (t += " retention \"" + s(e.retention) + "\"\n");
|
|
8822
8746
|
let r = e.sourceRefs && e.sourceRefs.length > 0 ? e.sourceRefs : e.source ? [e.source] : [];
|
|
8823
8747
|
for (let e of r) t += D(e, " ", s);
|
|
8824
|
-
return t += T(e.refs, " ", s), t += A(e.correspondences, " ", s, P), t +=
|
|
8825
|
-
},
|
|
8748
|
+
return t += T(e.refs, " ", s), t += A(e.correspondences, " ", s, P), t += Xs("reference", e.referenceIds, " "), t += "}\n", t;
|
|
8749
|
+
}, ic = function(e, t) {
|
|
8826
8750
|
let n = {
|
|
8827
8751
|
id: e,
|
|
8828
8752
|
of: "",
|
|
@@ -8835,34 +8759,34 @@ var sc = function(e) {
|
|
|
8835
8759
|
for (; s < o.length;) {
|
|
8836
8760
|
let e = o[s++];
|
|
8837
8761
|
if (s >= o.length) break;
|
|
8838
|
-
e === "of" ? n.of = a(o[s++]) : e === "produced_at" ? n.producedAt = a(o[s++]) : e === "by" ? n.by = a(o[s++]) : e === "content" ? n.content =
|
|
8762
|
+
e === "of" ? n.of = a(o[s++]) : e === "produced_at" ? n.producedAt = a(o[s++]) : e === "by" ? n.by = a(o[s++]) : e === "content" ? n.content = ms(i(o[s++])) : e === "links" ? n.links = Ys(o[s++]) : e === "reference" ? n.referenceIds = Zs(o[s++]) : s = b(o, s, e);
|
|
8839
8763
|
}
|
|
8840
8764
|
return (t) => (t.artifactInstances[e] = n, t);
|
|
8841
|
-
},
|
|
8765
|
+
}, ac = function(e) {
|
|
8842
8766
|
let t = "artifact_instance " + e.id + " {\n";
|
|
8843
8767
|
e.of && (t += " of " + e.of + "\n"), e.producedAt && (t += " produced_at " + P(e.producedAt) + "\n"), e.by && (t += " by " + P(e.by) + "\n");
|
|
8844
8768
|
let n = Object.keys(e.content);
|
|
8845
|
-
return n.length > 0 && (t += " content { " + n.map((t) => t + " : " + Fe(e.content[t])).join(" ") + " }\n"), t +=
|
|
8846
|
-
},
|
|
8769
|
+
return n.length > 0 && (t += " content { " + n.map((t) => t + " : " + Fe(e.content[t])).join(" ") + " }\n"), t += Xs("links", e.links, " "), t += Xs("reference", e.referenceIds, " "), t += "}\n", t;
|
|
8770
|
+
}, oc = {
|
|
8847
8771
|
keyword: "artifact_definition",
|
|
8848
8772
|
field: "artifactDefinitions",
|
|
8849
8773
|
takesID: !0,
|
|
8850
|
-
parse:
|
|
8851
|
-
dump:
|
|
8852
|
-
},
|
|
8774
|
+
parse: tc,
|
|
8775
|
+
dump: rc
|
|
8776
|
+
}, sc = {
|
|
8853
8777
|
keyword: "artifact_instance",
|
|
8854
8778
|
field: "artifactInstances",
|
|
8855
8779
|
takesID: !0,
|
|
8856
|
-
parse:
|
|
8857
|
-
dump:
|
|
8858
|
-
},
|
|
8859
|
-
function
|
|
8780
|
+
parse: ic,
|
|
8781
|
+
dump: ac
|
|
8782
|
+
}, cc = I;
|
|
8783
|
+
function lc(e, t) {
|
|
8860
8784
|
let n = e[t] ?? "";
|
|
8861
8785
|
if (n.startsWith("{")) return {
|
|
8862
8786
|
selector: {
|
|
8863
8787
|
kind: "refs",
|
|
8864
8788
|
expression: "",
|
|
8865
|
-
refs:
|
|
8789
|
+
refs: cc(n)
|
|
8866
8790
|
},
|
|
8867
8791
|
next: t + 1
|
|
8868
8792
|
};
|
|
@@ -8887,7 +8811,7 @@ function pc(e, t) {
|
|
|
8887
8811
|
next: t + 1
|
|
8888
8812
|
};
|
|
8889
8813
|
}
|
|
8890
|
-
function
|
|
8814
|
+
function uc(e) {
|
|
8891
8815
|
let t = [], n = be(e), r = 0;
|
|
8892
8816
|
for (; r < n.length;) {
|
|
8893
8817
|
let e = n[r++];
|
|
@@ -8919,7 +8843,7 @@ function mc(e) {
|
|
|
8919
8843
|
}
|
|
8920
8844
|
return t;
|
|
8921
8845
|
}
|
|
8922
|
-
function
|
|
8846
|
+
function dc(e) {
|
|
8923
8847
|
let t = {
|
|
8924
8848
|
requirements: {
|
|
8925
8849
|
kind: "",
|
|
@@ -8935,13 +8859,13 @@ function hc(e) {
|
|
|
8935
8859
|
for (; r < n.length;) {
|
|
8936
8860
|
let e = n[r++];
|
|
8937
8861
|
if (e === "requirements" || e === "promises") {
|
|
8938
|
-
let i =
|
|
8862
|
+
let i = lc(n, r);
|
|
8939
8863
|
t[e] = i.selector, r = i.next;
|
|
8940
8864
|
}
|
|
8941
8865
|
}
|
|
8942
8866
|
return t;
|
|
8943
8867
|
}
|
|
8944
|
-
function
|
|
8868
|
+
function fc(e) {
|
|
8945
8869
|
let t = [], n = be(e), r = 0;
|
|
8946
8870
|
for (; r < n.length;) {
|
|
8947
8871
|
let e = n[r++];
|
|
@@ -8955,7 +8879,7 @@ function gc(e) {
|
|
|
8955
8879
|
}
|
|
8956
8880
|
return t;
|
|
8957
8881
|
}
|
|
8958
|
-
function
|
|
8882
|
+
function pc(e) {
|
|
8959
8883
|
let t = [], n = be(e), r = 0;
|
|
8960
8884
|
for (; r < n.length;) {
|
|
8961
8885
|
let e = n[r++];
|
|
@@ -8969,7 +8893,7 @@ function _c(e) {
|
|
|
8969
8893
|
}
|
|
8970
8894
|
return t;
|
|
8971
8895
|
}
|
|
8972
|
-
function
|
|
8896
|
+
function mc(e) {
|
|
8973
8897
|
let t = [], n = r(e), o = 0;
|
|
8974
8898
|
for (; o < n.length;) {
|
|
8975
8899
|
if (n[o++] !== "on") continue;
|
|
@@ -8977,7 +8901,7 @@ function vc(e) {
|
|
|
8977
8901
|
if (o < n.length && n[o].startsWith("{")) {
|
|
8978
8902
|
t.push({
|
|
8979
8903
|
outcome: e,
|
|
8980
|
-
actions:
|
|
8904
|
+
actions: pc(i(n[o++]))
|
|
8981
8905
|
});
|
|
8982
8906
|
continue;
|
|
8983
8907
|
}
|
|
@@ -8999,7 +8923,7 @@ function vc(e) {
|
|
|
8999
8923
|
}
|
|
9000
8924
|
return t;
|
|
9001
8925
|
}
|
|
9002
|
-
var
|
|
8926
|
+
var hc = function(e, t) {
|
|
9003
8927
|
let n = {
|
|
9004
8928
|
id: e,
|
|
9005
8929
|
over: [],
|
|
@@ -9021,12 +8945,12 @@ var yc = function(e, t) {
|
|
|
9021
8945
|
referenceIds: []
|
|
9022
8946
|
};
|
|
9023
8947
|
return y(t, (e, t) => {
|
|
9024
|
-
if (e === "over") n.over =
|
|
9025
|
-
else if (e === "triggers") n.triggers =
|
|
9026
|
-
else if (e === "evaluate") n.evaluate =
|
|
9027
|
-
else if (e === "emit") n.emit =
|
|
9028
|
-
else if (e === "escalate") n.escalate =
|
|
9029
|
-
else if (e === "reference") n.referenceIds =
|
|
8948
|
+
if (e === "over") n.over = cc(t());
|
|
8949
|
+
else if (e === "triggers") n.triggers = uc(i(t()));
|
|
8950
|
+
else if (e === "evaluate") n.evaluate = dc(i(t()));
|
|
8951
|
+
else if (e === "emit") n.emit = fc(i(t()));
|
|
8952
|
+
else if (e === "escalate") n.escalate = mc(i(t()));
|
|
8953
|
+
else if (e === "reference") n.referenceIds = cc(t());
|
|
9030
8954
|
else return !1;
|
|
9031
8955
|
return !0;
|
|
9032
8956
|
}, {
|
|
@@ -9034,46 +8958,46 @@ var yc = function(e, t) {
|
|
|
9034
8958
|
id: e
|
|
9035
8959
|
}), (t) => (t.monitors[e] = n, t);
|
|
9036
8960
|
};
|
|
9037
|
-
function
|
|
8961
|
+
function gc(e) {
|
|
9038
8962
|
return e.kind === "timer" ? "every " + P(e.every) : e.kind === "signal" ? "on signal " + P(e.signal) : e.kind === "change" ? "on change " + P(e.aspect) : "on " + P(e.kind);
|
|
9039
8963
|
}
|
|
9040
|
-
function
|
|
8964
|
+
function _c(e) {
|
|
9041
8965
|
return e.kind === "applicable_to" ? "applicable_to(" + e.expression + ")" : e.kind === "refs" ? "{ " + e.refs.map(P).join(" ") + " }" : P(e.kind);
|
|
9042
8966
|
}
|
|
9043
|
-
function
|
|
8967
|
+
function vc(e) {
|
|
9044
8968
|
let t = e.actions.map((e) => e.action === "notify" ? "notify " + P(e.role) : P(e.action)).join(" ");
|
|
9045
8969
|
return "on " + P(e.outcome) + " { " + t + " }";
|
|
9046
8970
|
}
|
|
9047
|
-
var
|
|
8971
|
+
var yc = {
|
|
9048
8972
|
keyword: "monitor",
|
|
9049
8973
|
field: "monitors",
|
|
9050
8974
|
takesID: !0,
|
|
9051
|
-
parse:
|
|
8975
|
+
parse: hc,
|
|
9052
8976
|
dump: function(e) {
|
|
9053
8977
|
let t = "monitor " + e.id + " {\n";
|
|
9054
|
-
e.over.length > 0 && (t += " over { " + e.over.map(P).join(" ") + " }\n"), e.triggers.length > 0 && (t += " triggers { " + e.triggers.map(
|
|
8978
|
+
e.over.length > 0 && (t += " over { " + e.over.map(P).join(" ") + " }\n"), e.triggers.length > 0 && (t += " triggers { " + e.triggers.map(gc).join(" ") + " }\n");
|
|
9055
8979
|
let n = e.evaluate.requirements, r = e.evaluate.promises;
|
|
9056
|
-
return (n.kind || r.kind) && (t += " evaluate {", n.kind && (t += " requirements " +
|
|
8980
|
+
return (n.kind || r.kind) && (t += " evaluate {", n.kind && (t += " requirements " + _c(n)), r.kind && (t += " promises " + _c(r)), t += " }\n"), e.emit.length > 0 && (t += " emit { " + e.emit.map((e) => e.stream + " -> " + P(e.target)).join(" ") + " }\n"), e.escalate.length > 0 && (t += " escalate { " + e.escalate.map(vc).join(" ") + " }\n"), e.referenceIds.length > 0 && (t += " reference { " + e.referenceIds.map(P).join(" ") + " }\n"), t += "}\n", t;
|
|
9057
8981
|
}
|
|
9058
|
-
},
|
|
8982
|
+
}, bc = [
|
|
9059
8983
|
"identity",
|
|
9060
8984
|
"composition",
|
|
9061
8985
|
"promises_as_verified",
|
|
9062
8986
|
"live_compliance_status",
|
|
9063
8987
|
"artifacts",
|
|
9064
8988
|
"sustainability"
|
|
9065
|
-
],
|
|
8989
|
+
], xc = [
|
|
9066
8990
|
"public",
|
|
9067
8991
|
"restricted",
|
|
9068
8992
|
"authority"
|
|
9069
|
-
],
|
|
8993
|
+
], Sc = [
|
|
9070
8994
|
"model",
|
|
9071
8995
|
"batch",
|
|
9072
8996
|
"item"
|
|
9073
8997
|
];
|
|
9074
8998
|
//#endregion
|
|
9075
8999
|
//#region src/ser-des/config/passport.ts
|
|
9076
|
-
function
|
|
9000
|
+
function Cc(e, t) {
|
|
9077
9001
|
return I(t).map((t) => {
|
|
9078
9002
|
let n = t.indexOf(".");
|
|
9079
9003
|
return n === -1 ? {
|
|
@@ -9087,7 +9011,7 @@ function Dc(e, t) {
|
|
|
9087
9011
|
};
|
|
9088
9012
|
});
|
|
9089
9013
|
}
|
|
9090
|
-
var
|
|
9014
|
+
var wc = function(e, t) {
|
|
9091
9015
|
let n = {
|
|
9092
9016
|
id: e,
|
|
9093
9017
|
upi: {
|
|
@@ -9126,8 +9050,8 @@ var Oc = function(e, t) {
|
|
|
9126
9050
|
} else if (t === "reference") n.referenceIds = I(r());
|
|
9127
9051
|
else {
|
|
9128
9052
|
let i = r();
|
|
9129
|
-
if (
|
|
9130
|
-
else if (i.startsWith("{")) throw Error(`Parsing error: passport. ID ${e}: unknown access class "${t}" — access classes are ${
|
|
9053
|
+
if (xc.includes(t)) n.entries.push(...Cc(t, i));
|
|
9054
|
+
else if (i.startsWith("{")) throw Error(`Parsing error: passport. ID ${e}: unknown access class "${t}" — access classes are ${xc.join(" | ")} (fail-closed: an unknown access class is never served)`);
|
|
9131
9055
|
}
|
|
9132
9056
|
return !0;
|
|
9133
9057
|
}, {
|
|
@@ -9135,26 +9059,26 @@ var Oc = function(e, t) {
|
|
|
9135
9059
|
id: e
|
|
9136
9060
|
}), (t) => (t.passports[e] = n, t);
|
|
9137
9061
|
};
|
|
9138
|
-
function
|
|
9062
|
+
function Tc(e) {
|
|
9139
9063
|
return P(e.ref === "" ? e.contentClass : e.contentClass + "." + e.ref);
|
|
9140
9064
|
}
|
|
9141
|
-
var
|
|
9065
|
+
var Ec = {
|
|
9142
9066
|
keyword: "passport",
|
|
9143
9067
|
field: "passports",
|
|
9144
9068
|
takesID: !0,
|
|
9145
|
-
parse:
|
|
9069
|
+
parse: wc,
|
|
9146
9070
|
dump: function(e) {
|
|
9147
9071
|
let t = "passport " + e.id + " {\n";
|
|
9148
9072
|
(e.upi.pattern !== "" || e.upi.level !== "") && (t += " upi {", e.upi.pattern !== "" && (t += " pattern " + P(e.upi.pattern)), e.upi.level !== "" && (t += " level " + P(e.upi.level)), t += " }\n");
|
|
9149
9073
|
for (let n of e.carriers) t += " carrier { kind " + P(n.kind) + " payload " + P(n.payload) + " }\n";
|
|
9150
|
-
let n = [...
|
|
9074
|
+
let n = [...xc, ...[...new Set(e.entries.map((e) => e.access))].filter((e) => !xc.includes(e))];
|
|
9151
9075
|
for (let r of n) {
|
|
9152
9076
|
let n = e.entries.filter((e) => e.access === r);
|
|
9153
|
-
n.length > 0 && (t += " " + r + " { " + n.map(
|
|
9077
|
+
n.length > 0 && (t += " " + r + " { " + n.map(Tc).join(" ") + " }\n");
|
|
9154
9078
|
}
|
|
9155
9079
|
return e.referenceIds.length > 0 && (t += " reference { " + e.referenceIds.map(P).join(" ") + " }\n"), t += "}\n", t;
|
|
9156
9080
|
}
|
|
9157
|
-
},
|
|
9081
|
+
}, Dc = {
|
|
9158
9082
|
keyword: "invariant",
|
|
9159
9083
|
field: "invariants",
|
|
9160
9084
|
takesID: !0,
|
|
@@ -9194,7 +9118,7 @@ var Ac = {
|
|
|
9194
9118
|
};
|
|
9195
9119
|
//#endregion
|
|
9196
9120
|
//#region src/ser-des/config/testSequence.ts
|
|
9197
|
-
function
|
|
9121
|
+
function Oc(e, t, n) {
|
|
9198
9122
|
y(e, (e, n) => {
|
|
9199
9123
|
if (e === "test") t.test = a(n());
|
|
9200
9124
|
else if (e === "phase") t.phase = a(n());
|
|
@@ -9207,7 +9131,7 @@ function Mc(e, t, n) {
|
|
|
9207
9131
|
id: n
|
|
9208
9132
|
});
|
|
9209
9133
|
}
|
|
9210
|
-
var
|
|
9134
|
+
var kc = {
|
|
9211
9135
|
keyword: "test_sequence",
|
|
9212
9136
|
field: "testSequences",
|
|
9213
9137
|
takesID: !0,
|
|
@@ -9241,7 +9165,7 @@ var Nc = {
|
|
|
9241
9165
|
role: "",
|
|
9242
9166
|
dependsOn: null
|
|
9243
9167
|
}, r = o[s++];
|
|
9244
|
-
r.startsWith("{") || (t.order = Number(a(r)), r = s < o.length && o[s].startsWith("{") ? o[s++] : ""), r.startsWith("{") &&
|
|
9168
|
+
r.startsWith("{") || (t.order = Number(a(r)), r = s < o.length && o[s].startsWith("{") ? o[s++] : ""), r.startsWith("{") && Oc(i(r), t, e), n.steps.push(t);
|
|
9245
9169
|
} else s++;
|
|
9246
9170
|
}
|
|
9247
9171
|
return (t) => (t.testSequences[e] = n, t);
|
|
@@ -9255,7 +9179,7 @@ var Nc = {
|
|
|
9255
9179
|
for (let n of e.sourceRefs) t += D(n, " ", s);
|
|
9256
9180
|
return t += A(e.correspondences, " ", s, P), t += "}\n", t;
|
|
9257
9181
|
}
|
|
9258
|
-
},
|
|
9182
|
+
}, Ac = {
|
|
9259
9183
|
keyword: "formulas_used",
|
|
9260
9184
|
field: "formulasUsed",
|
|
9261
9185
|
takesID: !0,
|
|
@@ -9290,7 +9214,7 @@ var Nc = {
|
|
|
9290
9214
|
for (let n of e.sourceRefs) t += D(n, " ", s);
|
|
9291
9215
|
return t += A(e.correspondences, " ", s, P), t += "}\n", t;
|
|
9292
9216
|
}
|
|
9293
|
-
},
|
|
9217
|
+
}, jc = function(e, t) {
|
|
9294
9218
|
let n = {
|
|
9295
9219
|
id: e,
|
|
9296
9220
|
entries: []
|
|
@@ -9319,14 +9243,14 @@ var Nc = {
|
|
|
9319
9243
|
let r = t.texts[e];
|
|
9320
9244
|
return r ? r.entries.push(...n.entries) : t.texts[e] = n, t;
|
|
9321
9245
|
};
|
|
9322
|
-
},
|
|
9246
|
+
}, Mc = function(e) {
|
|
9323
9247
|
let t = "text " + e.id + " {\n";
|
|
9324
9248
|
for (let n of e.entries) t += " spell " + n.spelling + (n.via ? " via " + n.via : "") + " \"" + s(n.value) + "\"\n";
|
|
9325
9249
|
return t += "}\n", t;
|
|
9326
9250
|
};
|
|
9327
9251
|
//#endregion
|
|
9328
9252
|
//#region src/ser-des/config/quantityRegister.ts
|
|
9329
|
-
function
|
|
9253
|
+
function Nc(e) {
|
|
9330
9254
|
let t = {}, r = n(e);
|
|
9331
9255
|
for (let e = 0; e + 1 < r.length; e += 2) {
|
|
9332
9256
|
let n = F(r[e]), i = Number(r[e + 1]);
|
|
@@ -9334,11 +9258,11 @@ function Lc(e) {
|
|
|
9334
9258
|
}
|
|
9335
9259
|
return t;
|
|
9336
9260
|
}
|
|
9337
|
-
function
|
|
9261
|
+
function Pc(e, t) {
|
|
9338
9262
|
let n = Number(a(e));
|
|
9339
9263
|
return Number.isNaN(n) ? t : n;
|
|
9340
9264
|
}
|
|
9341
|
-
function
|
|
9265
|
+
function Fc(e, t) {
|
|
9342
9266
|
let r = {
|
|
9343
9267
|
id: e,
|
|
9344
9268
|
dimensions: {},
|
|
@@ -9348,7 +9272,7 @@ function zc(e, t) {
|
|
|
9348
9272
|
for (; s < o.length;) {
|
|
9349
9273
|
let e = o[s++];
|
|
9350
9274
|
if (s >= o.length) break;
|
|
9351
|
-
if (e === "dimensions") r.dimensions =
|
|
9275
|
+
if (e === "dimensions") r.dimensions = Nc(i(o[s++]));
|
|
9352
9276
|
else if (e === "si_unit") r.siUnit = a(o[s++]);
|
|
9353
9277
|
else if (e === "description") r.description = a(o[s++]);
|
|
9354
9278
|
else if (e === "corresponds") {
|
|
@@ -9358,7 +9282,7 @@ function zc(e, t) {
|
|
|
9358
9282
|
}
|
|
9359
9283
|
return r;
|
|
9360
9284
|
}
|
|
9361
|
-
function
|
|
9285
|
+
function Ic(e, t) {
|
|
9362
9286
|
let r = {
|
|
9363
9287
|
id: e,
|
|
9364
9288
|
symbol: "",
|
|
@@ -9374,8 +9298,8 @@ function Bc(e, t) {
|
|
|
9374
9298
|
if (e === "symbol") r.symbol = a(o[s++]);
|
|
9375
9299
|
else if (e === "label") r.label = a(o[s++]);
|
|
9376
9300
|
else if (e === "kind") r.kind = a(o[s++]);
|
|
9377
|
-
else if (e === "factor") r.factorToSI =
|
|
9378
|
-
else if (e === "offset") r.offsetToSI =
|
|
9301
|
+
else if (e === "factor") r.factorToSI = Pc(o[s++], 1);
|
|
9302
|
+
else if (e === "offset") r.offsetToSI = Pc(o[s++], 0);
|
|
9379
9303
|
else if (e === "definition") r.definition = a(o[s++]);
|
|
9380
9304
|
else if (e === "corresponds") {
|
|
9381
9305
|
let { corr: e, next: t } = O(o, s, a);
|
|
@@ -9384,7 +9308,7 @@ function Bc(e, t) {
|
|
|
9384
9308
|
}
|
|
9385
9309
|
return r;
|
|
9386
9310
|
}
|
|
9387
|
-
var
|
|
9311
|
+
var Lc = function(e, t) {
|
|
9388
9312
|
let o = {
|
|
9389
9313
|
id: e,
|
|
9390
9314
|
kinds: [],
|
|
@@ -9394,11 +9318,11 @@ var Vc = function(e, t) {
|
|
|
9394
9318
|
for (; c < s.length;) {
|
|
9395
9319
|
let e = s[c++];
|
|
9396
9320
|
if (c >= s.length) break;
|
|
9397
|
-
e === "kind" ? o.kinds.push(
|
|
9321
|
+
e === "kind" ? o.kinds.push(Fc(F(s[c++]), i(s[c++]))) : e === "unit" ? o.units.push(Ic(F(s[c++]), i(s[c++]))) : e === "reference" ? o.referenceIds = n(a(s[c++])).map(a).filter((e) => e.length > 0) : i(s[c++]);
|
|
9398
9322
|
}
|
|
9399
9323
|
return (t) => (t.quantityRegisters[e] = o, t);
|
|
9400
9324
|
};
|
|
9401
|
-
function
|
|
9325
|
+
function Rc(e) {
|
|
9402
9326
|
let t = "";
|
|
9403
9327
|
for (let n of e ?? []) if (t += " corresponds " + P(n.scheme) + " \"" + s(n.concept) + "\"", n.projections.length > 0) {
|
|
9404
9328
|
t += " {";
|
|
@@ -9411,28 +9335,28 @@ function Hc(e) {
|
|
|
9411
9335
|
}
|
|
9412
9336
|
return t;
|
|
9413
9337
|
}
|
|
9414
|
-
function
|
|
9338
|
+
function zc(e) {
|
|
9415
9339
|
let t = Object.keys(e);
|
|
9416
9340
|
return t.length === 0 ? "" : " dimensions { " + t.map((t) => t + " " + e[t]).join(" ") + " }";
|
|
9417
9341
|
}
|
|
9418
|
-
var
|
|
9342
|
+
var Bc = {
|
|
9419
9343
|
keyword: "quantity_register",
|
|
9420
9344
|
field: "quantityRegisters",
|
|
9421
9345
|
takesID: !0,
|
|
9422
|
-
parse:
|
|
9346
|
+
parse: Lc,
|
|
9423
9347
|
dump: function(e) {
|
|
9424
9348
|
let t = "quantity_register " + e.id + " {\n";
|
|
9425
9349
|
for (let n of e.kinds) {
|
|
9426
|
-
let e = " kind " + n.id + " {" +
|
|
9427
|
-
n.siUnit && (e += " si_unit \"" + s(n.siUnit) + "\""), n.description && (e += " description \"" + s(n.description) + "\""), e +=
|
|
9350
|
+
let e = " kind " + n.id + " {" + zc(n.dimensions);
|
|
9351
|
+
n.siUnit && (e += " si_unit \"" + s(n.siUnit) + "\""), n.description && (e += " description \"" + s(n.description) + "\""), e += Rc(n.correspondences), t += e + " }\n";
|
|
9428
9352
|
}
|
|
9429
9353
|
for (let n of e.units) {
|
|
9430
9354
|
let e = " unit " + P(n.id) + " {";
|
|
9431
|
-
n.symbol && (e += " symbol \"" + s(n.symbol) + "\""), n.label && (e += " label \"" + s(n.label) + "\""), n.kind && (e += " kind " + n.kind), n.factorToSI !== 1 && (e += " factor " + n.factorToSI), n.offsetToSI !== 0 && (e += " offset " + n.offsetToSI), n.definition && (e += " definition \"" + s(n.definition) + "\""), e +=
|
|
9355
|
+
n.symbol && (e += " symbol \"" + s(n.symbol) + "\""), n.label && (e += " label \"" + s(n.label) + "\""), n.kind && (e += " kind " + n.kind), n.factorToSI !== 1 && (e += " factor " + n.factorToSI), n.offsetToSI !== 0 && (e += " offset " + n.offsetToSI), n.definition && (e += " definition \"" + s(n.definition) + "\""), e += Rc(n.correspondences), t += e + " }\n";
|
|
9432
9356
|
}
|
|
9433
9357
|
return e.referenceIds.length > 0 && (t += " reference { " + e.referenceIds.join(" ") + " }\n"), t += "}\n", t;
|
|
9434
9358
|
}
|
|
9435
|
-
},
|
|
9359
|
+
}, Vc = {
|
|
9436
9360
|
keyword: "dual",
|
|
9437
9361
|
field: "duals",
|
|
9438
9362
|
takesID: !0,
|
|
@@ -9456,18 +9380,18 @@ var Wc = {
|
|
|
9456
9380
|
};
|
|
9457
9381
|
//#endregion
|
|
9458
9382
|
//#region src/ser-des/config/trustRef.ts
|
|
9459
|
-
function
|
|
9383
|
+
function Hc(e, t, n) {
|
|
9460
9384
|
let r = {
|
|
9461
9385
|
org: n(e()),
|
|
9462
9386
|
kid: ""
|
|
9463
9387
|
};
|
|
9464
9388
|
return t() === "key" && (e(), r.kid = n(e())), r;
|
|
9465
9389
|
}
|
|
9466
|
-
function
|
|
9390
|
+
function Uc(e, t, n) {
|
|
9467
9391
|
let r = `${t}trust_ref ${n(e.org)}`;
|
|
9468
9392
|
return e.kid !== "" && (r += ` key ${n(e.kid)}`), r + "\n";
|
|
9469
9393
|
}
|
|
9470
|
-
var
|
|
9394
|
+
var Wc = {
|
|
9471
9395
|
keyword: "dataspace",
|
|
9472
9396
|
field: "dataspaces",
|
|
9473
9397
|
takesID: !0,
|
|
@@ -9532,7 +9456,7 @@ var Jc = {
|
|
|
9532
9456
|
description: ""
|
|
9533
9457
|
}, o = r();
|
|
9534
9458
|
o && o.startsWith("{") && y(i(t()), (t, n, r) => {
|
|
9535
|
-
if (t === "trust_ref") e.trustRef =
|
|
9459
|
+
if (t === "trust_ref") e.trustRef = Hc(n, r, a);
|
|
9536
9460
|
else if (t === "role") e.role = a(n());
|
|
9537
9461
|
else if (t === "description") e.description = x(n);
|
|
9538
9462
|
else return !1;
|
|
@@ -9562,17 +9486,17 @@ var Jc = {
|
|
|
9562
9486
|
for (let n of e.participantClasses) t += " participant_class " + P(n.id) + " {\n", n.label && (t += " label \"" + s(n.label) + "\"\n"), n.description && (t += " description \"" + s(n.description) + "\"\n"), t += " }\n";
|
|
9563
9487
|
for (let n of e.artifactClasses) t += " artifact_class " + P(n.id) + " {\n", n.label && (t += " label \"" + s(n.label) + "\"\n"), n.description && (t += " description \"" + s(n.description) + "\"\n"), n.element && (t += " element " + P(n.element) + "\n"), n.policy && (t += " policy " + P(n.policy) + "\n"), t += " }\n";
|
|
9564
9488
|
e.policies.length > 0 && (t += " policies { " + e.policies.map(P).join(" ") + " }\n"), e.defaultPolicy && (t += " default_policy " + P(e.defaultPolicy) + "\n");
|
|
9565
|
-
for (let n of e.trustAnchors) t += " trust_anchor " + P(n.id) + " {\n", n.trustRef && (t +=
|
|
9489
|
+
for (let n of e.trustAnchors) t += " trust_anchor " + P(n.id) + " {\n", n.trustRef && (t += Uc(n.trustRef, " ", P)), n.role && (t += " role " + P(n.role) + "\n"), n.description && (t += " description \"" + s(n.description) + "\"\n"), t += " }\n";
|
|
9566
9490
|
e.compatibleWith.length > 0 && (t += " compatible_with { " + e.compatibleWith.map(P).join(" ") + " }\n");
|
|
9567
9491
|
let n = e.sourceRefs && e.sourceRefs.length > 0 ? e.sourceRefs : e.source ? [e.source] : [];
|
|
9568
9492
|
for (let e of n) t += D(e, " ", s);
|
|
9569
9493
|
return t += T(e.refs, " ", s), t += A(e.correspondences, " ", s, P), t += "}\n", t;
|
|
9570
9494
|
}
|
|
9571
|
-
},
|
|
9495
|
+
}, Gc = [
|
|
9572
9496
|
"permission",
|
|
9573
9497
|
"obligation",
|
|
9574
9498
|
"prohibition"
|
|
9575
|
-
],
|
|
9499
|
+
], Kc = {
|
|
9576
9500
|
keyword: "policy",
|
|
9577
9501
|
field: "policies",
|
|
9578
9502
|
takesID: !0,
|
|
@@ -9606,7 +9530,7 @@ var Jc = {
|
|
|
9606
9530
|
t && t.startsWith("{") && y(i(r()), (t, n) => {
|
|
9607
9531
|
if (t === "kind") {
|
|
9608
9532
|
let t = a(n());
|
|
9609
|
-
if (!
|
|
9533
|
+
if (!Gc.includes(t)) throw Error(`Parsing error: policy.rule. ID ${e.id}: unknown rule kind "${t}" — rule kinds are ${Gc.join(" | ")} (fail-closed: a misspelt kind never parses into a rule that says nothing)`);
|
|
9610
9534
|
e.kind = t;
|
|
9611
9535
|
} else if (t === "action") e.action = a(n());
|
|
9612
9536
|
else if (t === "artifact") e.artifact = a(n());
|
|
@@ -9643,7 +9567,7 @@ var Jc = {
|
|
|
9643
9567
|
for (let e of n) t += D(e, " ", s);
|
|
9644
9568
|
return t += T(e.refs, " ", s), t += A(e.correspondences, " ", s, P), t += "}\n", t;
|
|
9645
9569
|
}
|
|
9646
|
-
},
|
|
9570
|
+
}, qc = {
|
|
9647
9571
|
keyword: "dimension",
|
|
9648
9572
|
field: "dimensions",
|
|
9649
9573
|
takesID: !0,
|
|
@@ -9654,7 +9578,7 @@ var Jc = {
|
|
|
9654
9578
|
dump: function(e) {
|
|
9655
9579
|
return _o(e, "");
|
|
9656
9580
|
}
|
|
9657
|
-
},
|
|
9581
|
+
}, Jc = (e, t) => {
|
|
9658
9582
|
let n = {
|
|
9659
9583
|
id: e,
|
|
9660
9584
|
label: "",
|
|
@@ -9673,13 +9597,13 @@ var Jc = {
|
|
|
9673
9597
|
construct: "activity_archetype",
|
|
9674
9598
|
id: e
|
|
9675
9599
|
}), (t) => (t.activityArchetypes[e] = n, t);
|
|
9676
|
-
},
|
|
9600
|
+
}, Yc = function(e) {
|
|
9677
9601
|
let t = "activity_archetype " + e.id + " {\n";
|
|
9678
9602
|
return e.label && (t += " label \"" + s(e.label) + "\"\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.definition && (t += " definition \"" + s(e.definition) + "\"\n"), e.parent && (t += " parent " + P(e.parent) + "\n"), t += "}\n", t;
|
|
9679
9603
|
};
|
|
9680
9604
|
//#endregion
|
|
9681
9605
|
//#region src/ser-des/config/participantKind.ts
|
|
9682
|
-
function
|
|
9606
|
+
function Xc(e) {
|
|
9683
9607
|
let t = {
|
|
9684
9608
|
delegates_to: "",
|
|
9685
9609
|
clause: "",
|
|
@@ -9696,7 +9620,7 @@ function el(e) {
|
|
|
9696
9620
|
id: ""
|
|
9697
9621
|
}), t;
|
|
9698
9622
|
}
|
|
9699
|
-
function
|
|
9623
|
+
function Zc(e) {
|
|
9700
9624
|
let t = {
|
|
9701
9625
|
decided_by: "",
|
|
9702
9626
|
on_recommendation_of: "",
|
|
@@ -9715,7 +9639,7 @@ function tl(e) {
|
|
|
9715
9639
|
id: ""
|
|
9716
9640
|
}), t;
|
|
9717
9641
|
}
|
|
9718
|
-
function
|
|
9642
|
+
function Qc(e, t) {
|
|
9719
9643
|
let n = {
|
|
9720
9644
|
id: e,
|
|
9721
9645
|
label: "",
|
|
@@ -9739,7 +9663,7 @@ function nl(e, t) {
|
|
|
9739
9663
|
id: e
|
|
9740
9664
|
}), n;
|
|
9741
9665
|
}
|
|
9742
|
-
var
|
|
9666
|
+
var $c = (e, t) => {
|
|
9743
9667
|
let n = {
|
|
9744
9668
|
id: e,
|
|
9745
9669
|
label: "",
|
|
@@ -9767,8 +9691,8 @@ var rl = (e, t) => {
|
|
|
9767
9691
|
else if (t === "clause") n.clause = a(r());
|
|
9768
9692
|
else if (t === "definition") n.definition = a(r());
|
|
9769
9693
|
else if (t === "member") n.member = a(r());
|
|
9770
|
-
else if (t === "competence") n.competence =
|
|
9771
|
-
else if (t === "approval") n.approval =
|
|
9694
|
+
else if (t === "competence") n.competence = Xc(i(r()));
|
|
9695
|
+
else if (t === "approval") n.approval = Zc(i(r()));
|
|
9772
9696
|
else if (t === "approved_by") n.approved_by = a(r());
|
|
9773
9697
|
else if (t === "designated_by") n.designated_by = a(r());
|
|
9774
9698
|
else if (t === "declaration") n.declaration = a(r());
|
|
@@ -9778,7 +9702,7 @@ var rl = (e, t) => {
|
|
|
9778
9702
|
else if (t === "subkind") {
|
|
9779
9703
|
let t = a(r()), s = o();
|
|
9780
9704
|
if (s === void 0 || !s.startsWith("{")) throw Error(`Parsing error: participant_kind. ID ${e}: subkind ${t} is missing its block`);
|
|
9781
|
-
n.subkinds.push(
|
|
9705
|
+
n.subkinds.push(Qc(t, i(r())));
|
|
9782
9706
|
} else if (t === "source") n.source = L(i(r()));
|
|
9783
9707
|
else return !1;
|
|
9784
9708
|
return !0;
|
|
@@ -9787,24 +9711,24 @@ var rl = (e, t) => {
|
|
|
9787
9711
|
id: e
|
|
9788
9712
|
}), (t) => (t.participantKinds[e] = n, t);
|
|
9789
9713
|
};
|
|
9790
|
-
function
|
|
9714
|
+
function el(e) {
|
|
9791
9715
|
let t = " competence {\n";
|
|
9792
9716
|
return e.delegates_to && (t += " delegates_to " + P(e.delegates_to) + "\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.note && (t += " note \"" + s(e.note) + "\"\n"), t += " }\n", t;
|
|
9793
9717
|
}
|
|
9794
|
-
function
|
|
9718
|
+
function tl(e) {
|
|
9795
9719
|
let t = " approval {\n";
|
|
9796
9720
|
return e.decided_by && (t += " decided_by " + P(e.decided_by) + "\n"), e.on_recommendation_of && (t += " on_recommendation_of " + P(e.on_recommendation_of) + "\n"), e.procedure && (t += " procedure \"" + s(e.procedure) + "\"\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), t += " }\n", t;
|
|
9797
9721
|
}
|
|
9798
|
-
function
|
|
9722
|
+
function nl(e) {
|
|
9799
9723
|
let t = " subkind " + P(e.id) + " {\n";
|
|
9800
9724
|
return e.label && (t += " label \"" + s(e.label) + "\"\n"), e.term && (t += " term \"" + s(e.term) + "\"\n"), e.definition && (t += " definition \"" + s(e.definition) + "\"\n"), e.data_flag && (t += " data_flag \"" + s(e.data_flag) + "\"\n"), e.acceptance && (t += " acceptance " + P(e.acceptance) + "\n"), e.acceptance_note && (t += " acceptance_note \"" + s(e.acceptance_note) + "\"\n"), t += " }\n", t;
|
|
9801
9725
|
}
|
|
9802
|
-
var
|
|
9726
|
+
var rl = function(e) {
|
|
9803
9727
|
let t = "participant_kind " + e.id + " {\n";
|
|
9804
|
-
e.label && (t += " label \"" + s(e.label) + "\"\n"), e.term && (t += " term \"" + s(e.term) + "\"\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.definition && (t += " definition \"" + s(e.definition) + "\"\n"), e.member && (t += " member " + P(e.member) + "\n"), e.competence && (t +=
|
|
9805
|
-
for (let n of e.subkinds) t +=
|
|
9728
|
+
e.label && (t += " label \"" + s(e.label) + "\"\n"), e.term && (t += " term \"" + s(e.term) + "\"\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.definition && (t += " definition \"" + s(e.definition) + "\"\n"), e.member && (t += " member " + P(e.member) + "\n"), e.competence && (t += el(e.competence)), e.approval && (t += tl(e.approval)), e.approved_by && (t += " approved_by " + P(e.approved_by) + "\n"), e.designated_by && (t += " designated_by " + P(e.designated_by) + "\n"), e.declaration && (t += " declaration " + P(e.declaration) + "\n"), e.admission && (t += " admission \"" + s(e.admission) + "\"\n"), e.becomes && (t += " becomes " + P(e.becomes) + "\n"), e.procedure && (t += " procedure \"" + s(e.procedure) + "\"\n");
|
|
9729
|
+
for (let n of e.subkinds) t += nl(n);
|
|
9806
9730
|
return (e.source.doc || e.source.clause) && (t += " source {\n", e.source.doc && (t += " doc \"" + s(e.source.doc) + "\"\n"), e.source.clause && (t += " clause \"" + s(e.source.clause) + "\"\n"), t += " }\n"), t += "}\n", t;
|
|
9807
|
-
},
|
|
9731
|
+
}, il = (e, t) => {
|
|
9808
9732
|
let n = {
|
|
9809
9733
|
id: e,
|
|
9810
9734
|
label: "",
|
|
@@ -9832,13 +9756,13 @@ var sl = function(e) {
|
|
|
9832
9756
|
construct: "governance_organ",
|
|
9833
9757
|
id: e
|
|
9834
9758
|
}), (t) => (t.governanceOrgans[e] = n, t);
|
|
9835
|
-
},
|
|
9759
|
+
}, al = function(e) {
|
|
9836
9760
|
let t = "governance_organ " + e.id + " {\n";
|
|
9837
9761
|
return e.label && (t += " label \"" + s(e.label) + "\"\n"), e.term && (t += " term \"" + s(e.term) + "\"\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.mandate && (t += " mandate \"" + s(e.mandate) + "\"\n"), e.sub_committee_of && (t += " sub_committee_of " + P(e.sub_committee_of) + "\n"), e.independent_of && (t += " independent_of " + P(e.independent_of) + "\n"), (e.source.doc || e.source.clause) && (t += " source {\n", e.source.doc && (t += " doc \"" + s(e.source.doc) + "\"\n"), e.source.clause && (t += " clause \"" + s(e.source.clause) + "\"\n"), t += " }\n"), t += "}\n", t;
|
|
9838
9762
|
};
|
|
9839
9763
|
//#endregion
|
|
9840
9764
|
//#region src/ser-des/config/declaration.ts
|
|
9841
|
-
function
|
|
9765
|
+
function ol(e, t) {
|
|
9842
9766
|
let n = {
|
|
9843
9767
|
id: e,
|
|
9844
9768
|
clause: "",
|
|
@@ -9854,7 +9778,7 @@ function ul(e, t) {
|
|
|
9854
9778
|
id: e
|
|
9855
9779
|
}), n;
|
|
9856
9780
|
}
|
|
9857
|
-
var
|
|
9781
|
+
var sl = (e, t) => {
|
|
9858
9782
|
let n = {
|
|
9859
9783
|
id: e,
|
|
9860
9784
|
label: "",
|
|
@@ -9881,7 +9805,7 @@ var dl = (e, t) => {
|
|
|
9881
9805
|
else if (t === "content") {
|
|
9882
9806
|
let t = a(r()), s = o();
|
|
9883
9807
|
if (s === void 0 || !s.startsWith("{")) throw Error(`Parsing error: declaration_kind. ID ${e}: content ${t} is missing its block`);
|
|
9884
|
-
n.content.push(
|
|
9808
|
+
n.content.push(ol(t, i(r())));
|
|
9885
9809
|
} else if (t === "source") n.source = L(i(r()));
|
|
9886
9810
|
else return !1;
|
|
9887
9811
|
return !0;
|
|
@@ -9890,20 +9814,20 @@ var dl = (e, t) => {
|
|
|
9890
9814
|
id: e
|
|
9891
9815
|
}), (t) => (t.declarationKinds[e] = n, t);
|
|
9892
9816
|
};
|
|
9893
|
-
function
|
|
9817
|
+
function cl(e) {
|
|
9894
9818
|
let t = " content " + P(e.id) + " {\n";
|
|
9895
9819
|
return e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.description && (t += " description \"" + s(e.description) + "\"\n"), t += " }\n", t;
|
|
9896
9820
|
}
|
|
9897
|
-
function
|
|
9821
|
+
function ll(e) {
|
|
9898
9822
|
let t = " source {\n";
|
|
9899
9823
|
return e.doc && (t += " doc \"" + s(e.doc) + "\"\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), t += " }\n", t;
|
|
9900
9824
|
}
|
|
9901
|
-
var
|
|
9825
|
+
var ul = function(e) {
|
|
9902
9826
|
let t = "declaration_kind " + e.id + " {\n";
|
|
9903
9827
|
e.label && (t += " label \"" + s(e.label) + "\"\n"), e.holder && (t += " holder " + P(e.holder) + "\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.procedure && (t += " procedure \"" + s(e.procedure) + "\"\n"), e.definition && (t += " definition \"" + s(e.definition) + "\"\n"), e.scope_model && (t += " scope_model " + P(e.scope_model) + "\n"), e.scheme_a_obligation && (t += " scheme_a_obligation \"" + s(e.scheme_a_obligation) + "\"\n");
|
|
9904
|
-
for (let n of e.content) t +=
|
|
9905
|
-
return (e.source.doc || e.source.clause) && (t +=
|
|
9906
|
-
},
|
|
9828
|
+
for (let n of e.content) t += cl(n);
|
|
9829
|
+
return (e.source.doc || e.source.clause) && (t += ll(e.source)), t += "}\n", t;
|
|
9830
|
+
}, dl = (e, t) => {
|
|
9907
9831
|
let n = {
|
|
9908
9832
|
id: e,
|
|
9909
9833
|
description: ""
|
|
@@ -9916,10 +9840,10 @@ var ml = function(e) {
|
|
|
9916
9840
|
construct: "declaration_status",
|
|
9917
9841
|
id: e
|
|
9918
9842
|
}), (t) => (t.declarationStatuses[e] = n, t);
|
|
9919
|
-
},
|
|
9843
|
+
}, fl = function(e) {
|
|
9920
9844
|
let t = "declaration_status " + e.id + " {\n";
|
|
9921
9845
|
return e.description && (t += " description \"" + s(e.description) + "\"\n"), t += "}\n", t;
|
|
9922
|
-
},
|
|
9846
|
+
}, pl = (e, t) => {
|
|
9923
9847
|
let n = {
|
|
9924
9848
|
id: e,
|
|
9925
9849
|
clause: "",
|
|
@@ -9949,13 +9873,13 @@ var ml = function(e) {
|
|
|
9949
9873
|
construct: "declaration_gate",
|
|
9950
9874
|
id: e
|
|
9951
9875
|
}), (t) => (t.declarationGates[e] = n, t);
|
|
9952
|
-
},
|
|
9876
|
+
}, ml = function(e) {
|
|
9953
9877
|
let t = "declaration_gate " + e.id + " {\n";
|
|
9954
|
-
return e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.statement && (t += " statement \"" + s(e.statement) + "\"\n"), e.holder && (t += " holder " + P(e.holder) + "\n"), e.declaration && (t += " declaration " + P(e.declaration) + "\n"), e.blocks.length > 0 && (t += " blocks { " + e.blocks.map(P).join(" ") + " }\n"), e.blocks_note && (t += " blocks_note \"" + s(e.blocks_note) + "\"\n"), e.scope_checked.length > 0 && (t += " scope_checked { " + e.scope_checked.map(P).join(" ") + " }\n"), (e.source.doc || e.source.clause) && (t +=
|
|
9878
|
+
return e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.statement && (t += " statement \"" + s(e.statement) + "\"\n"), e.holder && (t += " holder " + P(e.holder) + "\n"), e.declaration && (t += " declaration " + P(e.declaration) + "\n"), e.blocks.length > 0 && (t += " blocks { " + e.blocks.map(P).join(" ") + " }\n"), e.blocks_note && (t += " blocks_note \"" + s(e.blocks_note) + "\"\n"), e.scope_checked.length > 0 && (t += " scope_checked { " + e.scope_checked.map(P).join(" ") + " }\n"), (e.source.doc || e.source.clause) && (t += ll(e.source)), t += "}\n", t;
|
|
9955
9879
|
};
|
|
9956
9880
|
//#endregion
|
|
9957
9881
|
//#region src/ser-des/config/scheme.ts
|
|
9958
|
-
function
|
|
9882
|
+
function hl(e) {
|
|
9959
9883
|
let t = {
|
|
9960
9884
|
method: "",
|
|
9961
9885
|
clause: "",
|
|
@@ -9974,7 +9898,7 @@ function yl(e) {
|
|
|
9974
9898
|
id: ""
|
|
9975
9899
|
}), t;
|
|
9976
9900
|
}
|
|
9977
|
-
var
|
|
9901
|
+
var gl = (e, t) => {
|
|
9978
9902
|
let n = {
|
|
9979
9903
|
id: e,
|
|
9980
9904
|
label: "",
|
|
@@ -9992,7 +9916,7 @@ var bl = (e, t) => {
|
|
|
9992
9916
|
else if (e === "term") n.term = a(t());
|
|
9993
9917
|
else if (e === "clause") n.clause = a(t());
|
|
9994
9918
|
else if (e === "definition") n.definition = a(t());
|
|
9995
|
-
else if (e === "demonstration") n.demonstration =
|
|
9919
|
+
else if (e === "demonstration") n.demonstration = hl(i(t()));
|
|
9996
9920
|
else if (e === "source") n.source = L(i(t()));
|
|
9997
9921
|
else return !1;
|
|
9998
9922
|
return !0;
|
|
@@ -10001,19 +9925,19 @@ var bl = (e, t) => {
|
|
|
10001
9925
|
id: e
|
|
10002
9926
|
}), (t) => (t.schemeDefinitions[e] = n, t);
|
|
10003
9927
|
};
|
|
10004
|
-
function
|
|
9928
|
+
function _l(e) {
|
|
10005
9929
|
let t = " source {\n";
|
|
10006
9930
|
return e.doc && (t += " doc \"" + s(e.doc) + "\"\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), t += " }\n", t;
|
|
10007
9931
|
}
|
|
10008
|
-
var
|
|
9932
|
+
var vl = function(e) {
|
|
10009
9933
|
let t = "scheme_definition " + e.id + " {\n";
|
|
10010
9934
|
if (e.label && (t += " label \"" + s(e.label) + "\"\n"), e.term && (t += " term \"" + s(e.term) + "\"\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.definition && (t += " definition \"" + s(e.definition) + "\"\n"), e.demonstration) {
|
|
10011
9935
|
let n = e.demonstration;
|
|
10012
9936
|
t += " demonstration {\n", n.method && (t += " method " + P(n.method) + "\n"), n.clause && (t += " clause \"" + s(n.clause) + "\"\n"), n.basis.length > 0 && (t += " basis { " + n.basis.map(P).join(" ") + " }\n"), n.note && (t += " note \"" + s(n.note) + "\"\n"), t += " }\n";
|
|
10013
9937
|
}
|
|
10014
|
-
return (e.source.doc || e.source.clause) && (t +=
|
|
9938
|
+
return (e.source.doc || e.source.clause) && (t += _l(e.source)), t += "}\n", t;
|
|
10015
9939
|
};
|
|
10016
|
-
function
|
|
9940
|
+
function yl(e) {
|
|
10017
9941
|
let t = {
|
|
10018
9942
|
action: "",
|
|
10019
9943
|
automatic: !1,
|
|
@@ -10034,7 +9958,7 @@ function Cl(e) {
|
|
|
10034
9958
|
id: ""
|
|
10035
9959
|
}), t;
|
|
10036
9960
|
}
|
|
10037
|
-
function
|
|
9961
|
+
function bl(e) {
|
|
10038
9962
|
let t = {
|
|
10039
9963
|
clause: "",
|
|
10040
9964
|
decided_by: "",
|
|
@@ -10053,7 +9977,7 @@ function wl(e) {
|
|
|
10053
9977
|
id: ""
|
|
10054
9978
|
}), t;
|
|
10055
9979
|
}
|
|
10056
|
-
function
|
|
9980
|
+
function xl(e, t) {
|
|
10057
9981
|
let n = {
|
|
10058
9982
|
id: e,
|
|
10059
9983
|
kind: "",
|
|
@@ -10082,7 +10006,7 @@ function Tl(e, t) {
|
|
|
10082
10006
|
id: e
|
|
10083
10007
|
}), n;
|
|
10084
10008
|
}
|
|
10085
|
-
var
|
|
10009
|
+
var Sl = (e, t) => {
|
|
10086
10010
|
let n = {
|
|
10087
10011
|
id: e,
|
|
10088
10012
|
applies_to: "",
|
|
@@ -10098,7 +10022,7 @@ var El = (e, t) => {
|
|
|
10098
10022
|
return y(t, (t, r, o) => {
|
|
10099
10023
|
if (t === "applies_to") n.applies_to = a(r());
|
|
10100
10024
|
else if (t === "initial") n.initial = a(r());
|
|
10101
|
-
else if (t === "entry") n.entry =
|
|
10025
|
+
else if (t === "entry") n.entry = yl(i(r()));
|
|
10102
10026
|
else if (t === "transition") {
|
|
10103
10027
|
let t = a(r()), s = o();
|
|
10104
10028
|
if (s === void 0 || s !== "->" && s !== "→") throw Error(`Parsing error: scheme_lifecycle. ID ${e}: transition ${t} is missing its '->'`);
|
|
@@ -10107,7 +10031,7 @@ var El = (e, t) => {
|
|
|
10107
10031
|
o() === "action" && (r(), l = a(r()));
|
|
10108
10032
|
let u = o();
|
|
10109
10033
|
if (u === void 0 || !u.startsWith("{")) throw Error(`Parsing error: scheme_lifecycle. ID ${e}: transition ${t} -> ${c} is missing its block`);
|
|
10110
|
-
let d =
|
|
10034
|
+
let d = bl(i(r()));
|
|
10111
10035
|
n.transitions.push({
|
|
10112
10036
|
from: t,
|
|
10113
10037
|
to: c,
|
|
@@ -10117,7 +10041,7 @@ var El = (e, t) => {
|
|
|
10117
10041
|
} else if (t === "trigger") {
|
|
10118
10042
|
let t = a(r()), s = o();
|
|
10119
10043
|
if (s === void 0 || !s.startsWith("{")) throw Error(`Parsing error: scheme_lifecycle. ID ${e}: trigger ${t} is missing its block`);
|
|
10120
|
-
n.triggers.push(
|
|
10044
|
+
n.triggers.push(xl(t, i(r())));
|
|
10121
10045
|
} else if (t === "source") n.source = L(i(r()));
|
|
10122
10046
|
else return !1;
|
|
10123
10047
|
return !0;
|
|
@@ -10125,7 +10049,7 @@ var El = (e, t) => {
|
|
|
10125
10049
|
construct: "scheme_lifecycle",
|
|
10126
10050
|
id: e
|
|
10127
10051
|
}), (t) => (t.schemeLifecycles[e] = n, t);
|
|
10128
|
-
},
|
|
10052
|
+
}, Cl = function(e) {
|
|
10129
10053
|
let t = "scheme_lifecycle " + e.id + " {\n";
|
|
10130
10054
|
if (e.applies_to && (t += " applies_to " + P(e.applies_to) + "\n"), e.initial && (t += " initial " + P(e.initial) + "\n"), e.entry) {
|
|
10131
10055
|
let n = e.entry;
|
|
@@ -10139,15 +10063,15 @@ var El = (e, t) => {
|
|
|
10139
10063
|
}
|
|
10140
10064
|
n.clause && (t += " clause \"" + s(n.clause) + "\"\n"), n.deferrable && (t += " deferrable true\n"), n.deferral_note && (t += " deferral_note \"" + s(n.deferral_note) + "\"\n"), n.description && (t += " description \"" + s(n.description) + "\"\n"), t += " }\n";
|
|
10141
10065
|
}
|
|
10142
|
-
return (e.source.doc || e.source.clause) && (t +=
|
|
10066
|
+
return (e.source.doc || e.source.clause) && (t += _l(e.source)), t += "}\n", t;
|
|
10143
10067
|
};
|
|
10144
10068
|
//#endregion
|
|
10145
10069
|
//#region src/ser-des/config/frameworkDocument.ts
|
|
10146
|
-
function
|
|
10070
|
+
function wl(e) {
|
|
10147
10071
|
let t = " source {\n";
|
|
10148
10072
|
return e.doc && (t += " doc \"" + s(e.doc) + "\"\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), t += " }\n", t;
|
|
10149
10073
|
}
|
|
10150
|
-
var
|
|
10074
|
+
var Tl = (e, t) => {
|
|
10151
10075
|
let n = {
|
|
10152
10076
|
id: e,
|
|
10153
10077
|
rank: 0,
|
|
@@ -10175,10 +10099,10 @@ var kl = (e, t) => {
|
|
|
10175
10099
|
construct: "framework_document",
|
|
10176
10100
|
id: e
|
|
10177
10101
|
}), (t) => (t.frameworkDocuments[e] = n, t);
|
|
10178
|
-
},
|
|
10102
|
+
}, El = function(e) {
|
|
10179
10103
|
let t = "framework_document " + e.id + " {\n";
|
|
10180
|
-
return e.rank > 0 && (t += " rank " + e.rank + "\n"), e.doc && (t += " doc \"" + s(e.doc) + "\"\n"), e.title && (t += " title \"" + s(e.title) + "\"\n"), e.approved_by && (t += " approved_by " + P(e.approved_by) + "\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.note && (t += " note \"" + s(e.note) + "\"\n"), (e.source.doc || e.source.clause) && (t +=
|
|
10181
|
-
},
|
|
10104
|
+
return e.rank > 0 && (t += " rank " + e.rank + "\n"), e.doc && (t += " doc \"" + s(e.doc) + "\"\n"), e.title && (t += " title \"" + s(e.title) + "\"\n"), e.approved_by && (t += " approved_by " + P(e.approved_by) + "\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.note && (t += " note \"" + s(e.note) + "\"\n"), (e.source.doc || e.source.clause) && (t += wl(e.source)), t += "}\n", t;
|
|
10105
|
+
}, Dl = (e, t) => {
|
|
10182
10106
|
let n = {
|
|
10183
10107
|
id: e,
|
|
10184
10108
|
clause: "",
|
|
@@ -10198,11 +10122,11 @@ var kl = (e, t) => {
|
|
|
10198
10122
|
construct: "document_precedence",
|
|
10199
10123
|
id: e
|
|
10200
10124
|
}), (t) => (t.documentPrecedences[e] = n, t);
|
|
10201
|
-
},
|
|
10125
|
+
}, Ol = function(e) {
|
|
10202
10126
|
let t = "document_precedence " + e.id + " {\n";
|
|
10203
|
-
return e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.statement && (t += " statement \"" + s(e.statement) + "\"\n"), (e.source.doc || e.source.clause) && (t +=
|
|
10127
|
+
return e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.statement && (t += " statement \"" + s(e.statement) + "\"\n"), (e.source.doc || e.source.clause) && (t += wl(e.source)), t += "}\n", t;
|
|
10204
10128
|
};
|
|
10205
|
-
function
|
|
10129
|
+
function kl(e, t) {
|
|
10206
10130
|
let n = {
|
|
10207
10131
|
id: e,
|
|
10208
10132
|
clause: "",
|
|
@@ -10218,7 +10142,7 @@ function Nl(e, t) {
|
|
|
10218
10142
|
id: e
|
|
10219
10143
|
}), n;
|
|
10220
10144
|
}
|
|
10221
|
-
var
|
|
10145
|
+
var Al = (e, t) => {
|
|
10222
10146
|
let n = {
|
|
10223
10147
|
id: e,
|
|
10224
10148
|
clause: "",
|
|
@@ -10236,7 +10160,7 @@ var Pl = (e, t) => {
|
|
|
10236
10160
|
else if (t === "condition") {
|
|
10237
10161
|
let t = a(r()), s = o();
|
|
10238
10162
|
if (s === void 0 || !s.startsWith("{")) throw Error(`Parsing error: auto_inclusion. ID ${e}: condition ${t} is missing its block`);
|
|
10239
|
-
n.conditions.push(
|
|
10163
|
+
n.conditions.push(kl(t, i(r())));
|
|
10240
10164
|
} else if (t === "note") n.note = a(r());
|
|
10241
10165
|
else if (t === "source") n.source = L(i(r()));
|
|
10242
10166
|
else return !1;
|
|
@@ -10245,15 +10169,15 @@ var Pl = (e, t) => {
|
|
|
10245
10169
|
construct: "auto_inclusion",
|
|
10246
10170
|
id: e
|
|
10247
10171
|
}), (t) => (t.autoInclusions[e] = n, t);
|
|
10248
|
-
},
|
|
10172
|
+
}, jl = function(e) {
|
|
10249
10173
|
let t = "auto_inclusion " + e.id + " {\n";
|
|
10250
10174
|
e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.statement && (t += " statement \"" + s(e.statement) + "\"\n");
|
|
10251
10175
|
for (let n of e.conditions) t += " condition " + P(n.id) + " {\n", n.clause && (t += " clause \"" + s(n.clause) + "\"\n"), n.description && (t += " description \"" + s(n.description) + "\"\n"), t += " }\n";
|
|
10252
|
-
return e.note && (t += " note \"" + s(e.note) + "\"\n"), (e.source.doc || e.source.clause) && (t +=
|
|
10176
|
+
return e.note && (t += " note \"" + s(e.note) + "\"\n"), (e.source.doc || e.source.clause) && (t += wl(e.source)), t += "}\n", t;
|
|
10253
10177
|
};
|
|
10254
10178
|
//#endregion
|
|
10255
10179
|
//#region src/ser-des/config/decisionRule.ts
|
|
10256
|
-
function
|
|
10180
|
+
function Ml(e) {
|
|
10257
10181
|
let t = {
|
|
10258
10182
|
threshold: 0,
|
|
10259
10183
|
base: "",
|
|
@@ -10272,7 +10196,7 @@ function Il(e) {
|
|
|
10272
10196
|
id: ""
|
|
10273
10197
|
}), t;
|
|
10274
10198
|
}
|
|
10275
|
-
function
|
|
10199
|
+
function Nl(e) {
|
|
10276
10200
|
let t = {
|
|
10277
10201
|
in_meeting: 0,
|
|
10278
10202
|
by_correspondence: "",
|
|
@@ -10289,7 +10213,7 @@ function Ll(e) {
|
|
|
10289
10213
|
id: ""
|
|
10290
10214
|
}), t;
|
|
10291
10215
|
}
|
|
10292
|
-
function
|
|
10216
|
+
function Pl(e) {
|
|
10293
10217
|
let t = {
|
|
10294
10218
|
in_meeting: null,
|
|
10295
10219
|
by_correspondence: null,
|
|
@@ -10299,9 +10223,9 @@ function Rl(e) {
|
|
|
10299
10223
|
reason_on_against_or_abstain: !1
|
|
10300
10224
|
};
|
|
10301
10225
|
return y(e, (e, n) => {
|
|
10302
|
-
if (e === "in_meeting") t.in_meeting =
|
|
10303
|
-
else if (e === "by_correspondence") t.by_correspondence =
|
|
10304
|
-
else if (e === "other_proposals") t.other_proposals =
|
|
10226
|
+
if (e === "in_meeting") t.in_meeting = Ml(i(n()));
|
|
10227
|
+
else if (e === "by_correspondence") t.by_correspondence = Ml(i(n()));
|
|
10228
|
+
else if (e === "other_proposals") t.other_proposals = Nl(i(n()));
|
|
10305
10229
|
else if (e === "proxies_max") t.proxies_max = parseInt(a(n()), 10) || 0;
|
|
10306
10230
|
else if (e === "abstentions") t.abstentions = a(n());
|
|
10307
10231
|
else if (e === "reason_on_against_or_abstain") t.reason_on_against_or_abstain = n() === "true";
|
|
@@ -10312,7 +10236,7 @@ function Rl(e) {
|
|
|
10312
10236
|
id: ""
|
|
10313
10237
|
}), t;
|
|
10314
10238
|
}
|
|
10315
|
-
function
|
|
10239
|
+
function Fl(e, t) {
|
|
10316
10240
|
let n = {
|
|
10317
10241
|
id: e,
|
|
10318
10242
|
clause: "",
|
|
@@ -10328,10 +10252,10 @@ function zl(e, t) {
|
|
|
10328
10252
|
id: e
|
|
10329
10253
|
}), n;
|
|
10330
10254
|
}
|
|
10331
|
-
function
|
|
10255
|
+
function Il(e) {
|
|
10332
10256
|
return r(i(e)).filter((e) => e.length > 0);
|
|
10333
10257
|
}
|
|
10334
|
-
var
|
|
10258
|
+
var Ll = (e, t) => {
|
|
10335
10259
|
let n = {
|
|
10336
10260
|
id: e,
|
|
10337
10261
|
organ: "",
|
|
@@ -10360,17 +10284,17 @@ var Vl = (e, t) => {
|
|
|
10360
10284
|
else if (t === "description") n.description = a(r());
|
|
10361
10285
|
else if (t === "on_recommendation_of") n.on_recommendation_of = a(r());
|
|
10362
10286
|
else if (t === "independent_of") n.independent_of = a(r());
|
|
10363
|
-
else if (t === "decides") n.decides =
|
|
10364
|
-
else if (t === "voting") n.voting =
|
|
10365
|
-
else if (t === "tasks") n.tasks =
|
|
10366
|
-
else if (t === "scope") n.scope =
|
|
10287
|
+
else if (t === "decides") n.decides = Il(r());
|
|
10288
|
+
else if (t === "voting") n.voting = Pl(i(r()));
|
|
10289
|
+
else if (t === "tasks") n.tasks = Il(r());
|
|
10290
|
+
else if (t === "scope") n.scope = Il(r());
|
|
10367
10291
|
else if (t === "principle") n.principle = a(r());
|
|
10368
10292
|
else if (t === "legacy_kind") {
|
|
10369
10293
|
let t = a(r()), s = o();
|
|
10370
10294
|
if (s === void 0 || !s.startsWith("{")) throw Error(`Parsing error: decision_rule. ID ${e}: legacy_kind ${t} is missing its block`);
|
|
10371
|
-
n.legacy_kinds.push(
|
|
10295
|
+
n.legacy_kinds.push(Fl(t, i(r())));
|
|
10372
10296
|
} else if (t === "income") n.income = a(r());
|
|
10373
|
-
else if (t === "no_entrance_fees_for") n.no_entrance_fees_for =
|
|
10297
|
+
else if (t === "no_entrance_fees_for") n.no_entrance_fees_for = Il(r());
|
|
10374
10298
|
else if (t === "source") n.source = L(i(r()));
|
|
10375
10299
|
else return !1;
|
|
10376
10300
|
return !0;
|
|
@@ -10379,33 +10303,33 @@ var Vl = (e, t) => {
|
|
|
10379
10303
|
id: e
|
|
10380
10304
|
}), (t) => (t.decisionRules[e] = n, t);
|
|
10381
10305
|
};
|
|
10382
|
-
function
|
|
10306
|
+
function Rl(e, t) {
|
|
10383
10307
|
let n = " " + e + " {\n";
|
|
10384
10308
|
return t.threshold > 0 && (n += " threshold " + t.threshold + "\n"), t.base && (n += " base " + P(t.base) + "\n"), t.clause && (n += " clause \"" + s(t.clause) + "\"\n"), t.description && (n += " description \"" + s(t.description) + "\"\n"), n += " }\n", n;
|
|
10385
10309
|
}
|
|
10386
|
-
function
|
|
10310
|
+
function zl(e) {
|
|
10387
10311
|
let t = " voting {\n";
|
|
10388
|
-
if (e.in_meeting && (t +=
|
|
10312
|
+
if (e.in_meeting && (t += Rl("in_meeting", e.in_meeting)), e.by_correspondence && (t += Rl("by_correspondence", e.by_correspondence)), e.other_proposals) {
|
|
10389
10313
|
let n = e.other_proposals;
|
|
10390
10314
|
t += " other_proposals {\n", n.in_meeting > 0 && (t += " in_meeting " + n.in_meeting + "\n"), n.by_correspondence && (t += " by_correspondence " + P(n.by_correspondence) + "\n"), n.description && (t += " description \"" + s(n.description) + "\"\n"), t += " }\n";
|
|
10391
10315
|
}
|
|
10392
10316
|
return e.proxies_max > 0 && (t += " proxies_max " + e.proxies_max + "\n"), e.abstentions && (t += " abstentions " + P(e.abstentions) + "\n"), e.reason_on_against_or_abstain && (t += " reason_on_against_or_abstain true\n"), t += " }\n", t;
|
|
10393
10317
|
}
|
|
10394
|
-
function
|
|
10318
|
+
function Bl(e, t, n) {
|
|
10395
10319
|
return n + e + " { " + t.map(P).join(" ") + " }\n";
|
|
10396
10320
|
}
|
|
10397
|
-
var
|
|
10321
|
+
var Vl = function(e) {
|
|
10398
10322
|
let t = "decision_rule " + e.id + " {\n";
|
|
10399
|
-
e.organ && (t += " organ " + P(e.organ) + "\n"), e.kind && (t += " kind " + P(e.kind) + "\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.description && (t += " description \"" + s(e.description) + "\"\n"), e.on_recommendation_of && (t += " on_recommendation_of " + P(e.on_recommendation_of) + "\n"), e.independent_of && (t += " independent_of " + P(e.independent_of) + "\n"), e.decides.length > 0 && (t +=
|
|
10323
|
+
e.organ && (t += " organ " + P(e.organ) + "\n"), e.kind && (t += " kind " + P(e.kind) + "\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.description && (t += " description \"" + s(e.description) + "\"\n"), e.on_recommendation_of && (t += " on_recommendation_of " + P(e.on_recommendation_of) + "\n"), e.independent_of && (t += " independent_of " + P(e.independent_of) + "\n"), e.decides.length > 0 && (t += Bl("decides", e.decides, " ")), e.voting && (t += zl(e.voting)), e.tasks.length > 0 && (t += Bl("tasks", e.tasks, " ")), e.scope.length > 0 && (t += Bl("scope", e.scope, " ")), e.principle && (t += " principle " + P(e.principle) + "\n");
|
|
10400
10324
|
for (let n of e.legacy_kinds) t += " legacy_kind " + P(n.id) + " {\n", n.clause && (t += " clause \"" + s(n.clause) + "\"\n"), n.description && (t += " description \"" + s(n.description) + "\"\n"), t += " }\n";
|
|
10401
|
-
return e.income && (t += " income " + P(e.income) + "\n"), e.no_entrance_fees_for.length > 0 && (t +=
|
|
10325
|
+
return e.income && (t += " income " + P(e.income) + "\n"), e.no_entrance_fees_for.length > 0 && (t += Bl("no_entrance_fees_for", e.no_entrance_fees_for, " ")), (e.source.doc || e.source.clause) && (t += " source {\n", e.source.doc && (t += " doc \"" + s(e.source.doc) + "\"\n"), e.source.clause && (t += " clause \"" + s(e.source.clause) + "\"\n"), t += " }\n"), t += "}\n", t;
|
|
10402
10326
|
};
|
|
10403
10327
|
//#endregion
|
|
10404
10328
|
//#region src/ser-des/config/processSequence.ts
|
|
10405
|
-
function
|
|
10329
|
+
function Hl(e) {
|
|
10406
10330
|
return r(e).map(F).map(a).filter((e) => e.length > 0);
|
|
10407
10331
|
}
|
|
10408
|
-
function
|
|
10332
|
+
function Ul(e, t) {
|
|
10409
10333
|
let n = {
|
|
10410
10334
|
id: e,
|
|
10411
10335
|
label: "",
|
|
@@ -10427,16 +10351,16 @@ function ql(e, t) {
|
|
|
10427
10351
|
id: e
|
|
10428
10352
|
}), n;
|
|
10429
10353
|
}
|
|
10430
|
-
function
|
|
10354
|
+
function Wl(e) {
|
|
10431
10355
|
return e.length === 0 ? "" : "sequence { " + e.map(P).join(" ") + " }";
|
|
10432
10356
|
}
|
|
10433
|
-
function
|
|
10357
|
+
function Gl(e, t) {
|
|
10434
10358
|
let n = t + "register " + P(e.id) + " {\n";
|
|
10435
10359
|
return e.label && (n += t + " label \"" + s(e.label) + "\"\n"), e.clause && (n += t + " clause \"" + s(e.clause) + "\"\n"), e.maintainer && (n += t + " maintainer " + P(e.maintainer) + "\n"), e.published && (n += t + " published \"" + s(e.published) + "\"\n"), e.entries && (n += t + " entries \"" + s(e.entries) + "\"\n"), n += t + "}\n", n;
|
|
10436
10360
|
}
|
|
10437
10361
|
//#endregion
|
|
10438
10362
|
//#region src/ser-des/config/documentModule.ts
|
|
10439
|
-
var
|
|
10363
|
+
var Kl = (e, t) => {
|
|
10440
10364
|
let n = {
|
|
10441
10365
|
id: e,
|
|
10442
10366
|
document: "",
|
|
@@ -10457,11 +10381,11 @@ var Xl = (e, t) => {
|
|
|
10457
10381
|
else if (t === "edition") n.edition = a(r());
|
|
10458
10382
|
else if (t === "year") n.year = parseInt(a(r()), 10) || 0;
|
|
10459
10383
|
else if (t === "namespace") n.namespace = a(r());
|
|
10460
|
-
else if (t === "sequence") n.sequence =
|
|
10384
|
+
else if (t === "sequence") n.sequence = Hl(i(r()));
|
|
10461
10385
|
else if (t === "register") {
|
|
10462
10386
|
let t = a(r()), s = o();
|
|
10463
10387
|
if (s === void 0 || !s.startsWith("{")) throw Error(`Parsing error: document_module. ID ${e}: register ${t} is missing its block`);
|
|
10464
|
-
n.registers.push(
|
|
10388
|
+
n.registers.push(Ul(t, i(r())));
|
|
10465
10389
|
} else if (t === "source") n.source = L(i(r()));
|
|
10466
10390
|
else return !1;
|
|
10467
10391
|
return !0;
|
|
@@ -10469,15 +10393,15 @@ var Xl = (e, t) => {
|
|
|
10469
10393
|
construct: "document_module",
|
|
10470
10394
|
id: e
|
|
10471
10395
|
}), (t) => (t.documentModules[e] = n, t);
|
|
10472
|
-
},
|
|
10396
|
+
}, ql = function(e) {
|
|
10473
10397
|
let t = "document_module " + e.id + " {\n";
|
|
10474
10398
|
e.document && (t += " document \"" + s(e.document) + "\"\n"), e.title && (t += " title \"" + s(e.title) + "\"\n"), e.edition && (t += " edition \"" + s(e.edition) + "\"\n"), e.year && (t += " year " + e.year + "\n"), e.namespace && (t += " namespace " + P(e.namespace) + "\n");
|
|
10475
|
-
let n =
|
|
10399
|
+
let n = Wl(e.sequence);
|
|
10476
10400
|
n && (t += " " + n + "\n");
|
|
10477
|
-
for (let n of e.registers) t +=
|
|
10401
|
+
for (let n of e.registers) t += Gl(n, " ");
|
|
10478
10402
|
return (e.source.doc || e.source.clause) && (t += " source {\n", e.source.doc && (t += " doc \"" + s(e.source.doc) + "\"\n"), e.source.clause && (t += " clause \"" + s(e.source.clause) + "\"\n"), t += " }\n"), t += "}\n", t;
|
|
10479
|
-
},
|
|
10480
|
-
function
|
|
10403
|
+
}, Jl = ["informative"];
|
|
10404
|
+
function Yl(e, t) {
|
|
10481
10405
|
let n = {
|
|
10482
10406
|
id: "",
|
|
10483
10407
|
title: "",
|
|
@@ -10493,7 +10417,7 @@ function $l(e, t) {
|
|
|
10493
10417
|
else if (e === "year") n.year = parseInt(a(r()), 10) || 0;
|
|
10494
10418
|
else if (e === "role") {
|
|
10495
10419
|
let e = a(r());
|
|
10496
|
-
if (!
|
|
10420
|
+
if (!Jl.includes(e)) throw Error(`Parsing error: informative_annex. ID ${t}: Unknown document role "${e}" (valid: ${Jl.join(", ")})`);
|
|
10497
10421
|
n.role = e;
|
|
10498
10422
|
} else if (e === "source") n.source = a(r());
|
|
10499
10423
|
else return !1;
|
|
@@ -10503,7 +10427,7 @@ function $l(e, t) {
|
|
|
10503
10427
|
id: t
|
|
10504
10428
|
}), n;
|
|
10505
10429
|
}
|
|
10506
|
-
function
|
|
10430
|
+
function Xl(e, t) {
|
|
10507
10431
|
let n = {
|
|
10508
10432
|
id: e,
|
|
10509
10433
|
clause: "",
|
|
@@ -10523,7 +10447,7 @@ function eu(e, t) {
|
|
|
10523
10447
|
id: e
|
|
10524
10448
|
}), n;
|
|
10525
10449
|
}
|
|
10526
|
-
var
|
|
10450
|
+
var Zl = (e, t) => {
|
|
10527
10451
|
let n = {
|
|
10528
10452
|
id: e,
|
|
10529
10453
|
document: {
|
|
@@ -10541,7 +10465,7 @@ var tu = (e, t) => {
|
|
|
10541
10465
|
highlights: []
|
|
10542
10466
|
};
|
|
10543
10467
|
return y(t, (t, r, o) => {
|
|
10544
|
-
if (t === "document") n.document =
|
|
10468
|
+
if (t === "document") n.document = Yl(i(r()), e);
|
|
10545
10469
|
else if (t === "applies_to") n.appliesTo = a(r());
|
|
10546
10470
|
else if (t === "applied_by") n.appliedBy = a(r());
|
|
10547
10471
|
else if (t === "scope") n.scope = a(r());
|
|
@@ -10549,19 +10473,19 @@ var tu = (e, t) => {
|
|
|
10549
10473
|
else if (t === "highlight") {
|
|
10550
10474
|
let t = a(r()), s = o();
|
|
10551
10475
|
if (s === void 0 || !s.startsWith("{")) throw Error(`Parsing error: informative_annex. ID ${e}: highlight ${t} is missing its block`);
|
|
10552
|
-
n.highlights.push(
|
|
10476
|
+
n.highlights.push(Xl(t, i(r())));
|
|
10553
10477
|
} else return !1;
|
|
10554
10478
|
return !0;
|
|
10555
10479
|
}, {
|
|
10556
10480
|
construct: "informative_annex",
|
|
10557
10481
|
id: e
|
|
10558
10482
|
}), (t) => (t.informativeAnnexes[e] = n, t);
|
|
10559
|
-
},
|
|
10483
|
+
}, Ql = function(e) {
|
|
10560
10484
|
let t = "informative_annex " + e.id + " {\n";
|
|
10561
10485
|
t += " document {\n", e.document.id && (t += " id \"" + s(e.document.id) + "\"\n"), e.document.title && (t += " title \"" + s(e.document.title) + "\"\n"), e.document.edition && (t += " edition " + e.document.edition + "\n"), e.document.year && (t += " year " + e.document.year + "\n"), e.document.role && (t += " role " + P(e.document.role) + "\n"), e.document.source && (t += " source \"" + s(e.document.source) + "\"\n"), t += " }\n", e.appliesTo && (t += " applies_to " + P(e.appliesTo) + "\n"), e.appliedBy && (t += " applied_by \"" + s(e.appliedBy) + "\"\n"), e.scope && (t += " scope \"" + s(e.scope) + "\"\n"), e.numberingCaution && (t += " numbering_caution \"" + s(e.numberingCaution) + "\"\n");
|
|
10562
10486
|
for (let n of e.highlights) t += " highlight " + P(n.id) + " {\n", n.clause && (t += " clause \"" + s(n.clause) + "\"\n"), n.title && (t += " title \"" + s(n.title) + "\"\n"), n.statement && (t += " statement \"" + s(n.statement) + "\"\n"), n.dischargedBy && (t += " discharged_by \"" + s(n.dischargedBy) + "\"\n"), t += " }\n";
|
|
10563
10487
|
return t += "}\n", t;
|
|
10564
|
-
},
|
|
10488
|
+
}, $l = ["normative", "informative"], eu = (e, t) => {
|
|
10565
10489
|
let n = {
|
|
10566
10490
|
id: e,
|
|
10567
10491
|
letter: "",
|
|
@@ -10579,7 +10503,7 @@ var tu = (e, t) => {
|
|
|
10579
10503
|
else if (t === "title") n.title = a(r());
|
|
10580
10504
|
else if (t === "obligation") {
|
|
10581
10505
|
let t = a(r());
|
|
10582
|
-
if (
|
|
10506
|
+
if (!$l.includes(t)) throw Error(`Parsing error: part_annex. ID ${e}: Unknown obligation "${t}" (valid: ${$l.join(", ")})`);
|
|
10583
10507
|
n.obligation = t;
|
|
10584
10508
|
} else if (t === "summary") n.summary = a(r());
|
|
10585
10509
|
else if (t === "realization") n.realization = a(r());
|
|
@@ -10590,25 +10514,25 @@ var tu = (e, t) => {
|
|
|
10590
10514
|
construct: "part_annex",
|
|
10591
10515
|
id: e
|
|
10592
10516
|
}), (t) => (t.partAnnexes[e] = n, t);
|
|
10593
|
-
},
|
|
10517
|
+
}, tu = function(e) {
|
|
10594
10518
|
let t = "part_annex " + e.id + " {\n";
|
|
10595
10519
|
return e.letter && (t += " letter \"" + s(e.letter) + "\"\n"), e.title && (t += " title \"" + s(e.title) + "\"\n"), e.obligation && (t += " obligation " + P(e.obligation) + "\n"), e.summary && (t += " summary \"" + s(e.summary) + "\"\n"), e.realization && (t += " realization \"" + s(e.realization) + "\"\n"), (e.source.doc || e.source.clause) && (t += " source {\n", e.source.doc && (t += " doc \"" + s(e.source.doc) + "\"\n"), e.source.clause && (t += " clause \"" + s(e.source.clause) + "\"\n"), t += " }\n"), t += "}\n", t;
|
|
10596
|
-
},
|
|
10520
|
+
}, nu = [
|
|
10597
10521
|
"asciimath",
|
|
10598
10522
|
"latex",
|
|
10599
10523
|
"unicodemath",
|
|
10600
10524
|
"mathml",
|
|
10601
10525
|
"omml"
|
|
10602
10526
|
];
|
|
10603
|
-
function
|
|
10527
|
+
function ru(e) {
|
|
10604
10528
|
let t = e.indexOf(":");
|
|
10605
10529
|
return {
|
|
10606
10530
|
format: t === -1 ? "xml" : e.slice(0, t),
|
|
10607
10531
|
target: t === -1 ? e : e.slice(t + 1)
|
|
10608
10532
|
};
|
|
10609
10533
|
}
|
|
10610
|
-
var
|
|
10611
|
-
let { format: n, target: r } =
|
|
10534
|
+
var iu = function(e, t) {
|
|
10535
|
+
let { format: n, target: r } = ru(e), i = {
|
|
10612
10536
|
id: e,
|
|
10613
10537
|
format: n,
|
|
10614
10538
|
target: r,
|
|
@@ -10648,7 +10572,7 @@ var cu = function(e, t) {
|
|
|
10648
10572
|
construct: "mapping",
|
|
10649
10573
|
id: e
|
|
10650
10574
|
}), (t) => (t.wireMappings[e] = i, t);
|
|
10651
|
-
},
|
|
10575
|
+
}, au = function(e) {
|
|
10652
10576
|
let t = [`mapping ${e.format} ${e.target} {`];
|
|
10653
10577
|
e.element && t.push(` element "${s(e.element)}"`), e.namespaceRef && t.push(` namespace ${e.namespaceRef}`);
|
|
10654
10578
|
for (let n of e.entries) if (n.kind === "map" && n.modifier) t.push(` ${n.wire} ${n.modifier} ${n.name}`);
|
|
@@ -10657,7 +10581,7 @@ var cu = function(e, t) {
|
|
|
10657
10581
|
t.push(` ${e} "${s(n.wire)}" ${n.name}`);
|
|
10658
10582
|
}
|
|
10659
10583
|
return e.content && t.push(` map_content ${e.content}`), e.mixed && t.push(" mixed_content"), e.renderNil !== null && t.push(` render_nil ${e.renderNil}`), t.push("}"), t.join("\n");
|
|
10660
|
-
},
|
|
10584
|
+
}, ou = function(e, t) {
|
|
10661
10585
|
if (!e.startsWith(":")) throw Error(`Parsing error: string_format. ID ${e}: the registered format name carries the colon sigil (string_format :${e})`);
|
|
10662
10586
|
let n = e.slice(1), r = {
|
|
10663
10587
|
id: n,
|
|
@@ -10674,14 +10598,14 @@ var cu = function(e, t) {
|
|
|
10674
10598
|
construct: "string_format",
|
|
10675
10599
|
id: n
|
|
10676
10600
|
}), (e) => (e.stringFormats[n] = r, e);
|
|
10677
|
-
},
|
|
10601
|
+
}, su = function(e) {
|
|
10678
10602
|
return [
|
|
10679
10603
|
`string_format :${e.id} {`,
|
|
10680
10604
|
` artifact "${s(e.artifact)}"`,
|
|
10681
10605
|
` root "${s(e.root)}"`,
|
|
10682
10606
|
"}"
|
|
10683
10607
|
].join("\n");
|
|
10684
|
-
},
|
|
10608
|
+
}, cu = function(e, t) {
|
|
10685
10609
|
let n = {
|
|
10686
10610
|
id: e,
|
|
10687
10611
|
uri: "",
|
|
@@ -10699,10 +10623,10 @@ var cu = function(e, t) {
|
|
|
10699
10623
|
construct: "namespace",
|
|
10700
10624
|
id: e
|
|
10701
10625
|
}), (t) => (t.namespaces[e] = n, t);
|
|
10702
|
-
},
|
|
10626
|
+
}, lu = function(e) {
|
|
10703
10627
|
let t = [`namespace ${e.id} {`, ` uri "${s(e.uri)}"`];
|
|
10704
10628
|
return e.prefix && t.push(` prefix "${s(e.prefix)}"`), e.isDefault && t.push(" default"), t.push("}"), t.join("\n");
|
|
10705
|
-
},
|
|
10629
|
+
}, uu = function(e, t) {
|
|
10706
10630
|
let n = t.replace(/^\s*:\s*\S+\s*/, ""), r = {
|
|
10707
10631
|
id: e,
|
|
10708
10632
|
type: "",
|
|
@@ -10718,7 +10642,7 @@ var cu = function(e, t) {
|
|
|
10718
10642
|
return y(n, (e, t, n) => {
|
|
10719
10643
|
if (e === "render") {
|
|
10720
10644
|
let e = a(t()), i = n() === void 0 ? "" : a(t());
|
|
10721
|
-
|
|
10645
|
+
nu.includes(e) && r.renders.push({
|
|
10722
10646
|
notation: e,
|
|
10723
10647
|
text: i
|
|
10724
10648
|
});
|
|
@@ -10743,12 +10667,12 @@ var cu = function(e, t) {
|
|
|
10743
10667
|
construct: "datum",
|
|
10744
10668
|
id: e
|
|
10745
10669
|
}), (t) => (t.datums[e] = r, t);
|
|
10746
|
-
},
|
|
10670
|
+
}, du = function(e) {
|
|
10747
10671
|
let t = [`datum ${e.id}${e.type ? ` : ${e.type}` : ""} {`];
|
|
10748
10672
|
e.quantityKind && t.push(` quantity_kind ${e.quantityKind}`), e.unit && t.push(` unit ${e.unit}`), e.origin !== "declared" && t.push(` origin ${e.origin}`), e.scope && t.push(` scope ${e.scope}`);
|
|
10749
10673
|
for (let n of e.renders) t.push(` render ${n.notation} "${s(n.text)}"`);
|
|
10750
10674
|
return e.label && t.push(` label "${s(e.label)}"`), e.description && t.push(` description { ${e.description} }`), t.push("}"), t.join("\n");
|
|
10751
|
-
},
|
|
10675
|
+
}, fu = function(e, t) {
|
|
10752
10676
|
let n = {
|
|
10753
10677
|
id: e,
|
|
10754
10678
|
inputs: [],
|
|
@@ -10772,7 +10696,7 @@ var cu = function(e, t) {
|
|
|
10772
10696
|
construct: "check",
|
|
10773
10697
|
id: e
|
|
10774
10698
|
}), (t) => (t.checks[e] = n, t);
|
|
10775
|
-
},
|
|
10699
|
+
}, pu = function(e) {
|
|
10776
10700
|
let t = [`check ${e.id} {`];
|
|
10777
10701
|
return e.inputs.length && t.push(` inputs { ${e.inputs.join(" ")} }`), e.expression && t.push(` expression "${s(e.expression)}"`), e.operator && t.push(` operator ${e.operator}`), e.threshold && t.push(` threshold ${e.threshold}`), t.push("}"), t.join("\n");
|
|
10778
10702
|
};
|
|
@@ -10781,7 +10705,7 @@ var cu = function(e, t) {
|
|
|
10781
10705
|
function J(e) {
|
|
10782
10706
|
return e;
|
|
10783
10707
|
}
|
|
10784
|
-
var
|
|
10708
|
+
var mu = [
|
|
10785
10709
|
J({
|
|
10786
10710
|
keyword: "role",
|
|
10787
10711
|
field: "roles",
|
|
@@ -10975,15 +10899,15 @@ var vu = [
|
|
|
10975
10899
|
keyword: "attestation",
|
|
10976
10900
|
field: "attestations",
|
|
10977
10901
|
takesID: !0,
|
|
10978
|
-
parse:
|
|
10979
|
-
dump:
|
|
10902
|
+
parse: Us,
|
|
10903
|
+
dump: Ws
|
|
10980
10904
|
}),
|
|
10981
10905
|
J({
|
|
10982
10906
|
keyword: "certificate_template",
|
|
10983
10907
|
field: "certificateTemplates",
|
|
10984
10908
|
takesID: !0,
|
|
10985
|
-
parse:
|
|
10986
|
-
dump:
|
|
10909
|
+
parse: qs,
|
|
10910
|
+
dump: Js
|
|
10987
10911
|
}),
|
|
10988
10912
|
J({
|
|
10989
10913
|
keyword: "subform",
|
|
@@ -11033,22 +10957,22 @@ var vu = [
|
|
|
11033
10957
|
keyword: "calculation_context",
|
|
11034
10958
|
field: "calculationContexts",
|
|
11035
10959
|
takesID: !0,
|
|
11036
|
-
parse:
|
|
11037
|
-
dump:
|
|
10960
|
+
parse: Fs,
|
|
10961
|
+
dump: Is
|
|
11038
10962
|
}),
|
|
11039
10963
|
J({
|
|
11040
10964
|
keyword: "evaluation_dimensions",
|
|
11041
10965
|
field: "evaluationDimensions",
|
|
11042
10966
|
takesID: !0,
|
|
11043
|
-
parse:
|
|
11044
|
-
dump:
|
|
10967
|
+
parse: zs,
|
|
10968
|
+
dump: Bs
|
|
11045
10969
|
}),
|
|
11046
10970
|
J({
|
|
11047
10971
|
keyword: "evaluation_profile",
|
|
11048
10972
|
field: "evaluationProfiles",
|
|
11049
10973
|
takesID: !0,
|
|
11050
|
-
parse:
|
|
11051
|
-
dump:
|
|
10974
|
+
parse: Vs,
|
|
10975
|
+
dump: Hs
|
|
11052
10976
|
}),
|
|
11053
10977
|
J({
|
|
11054
10978
|
keyword: "verdict",
|
|
@@ -11136,11 +11060,10 @@ var vu = [
|
|
|
11136
11060
|
}),
|
|
11137
11061
|
Ra,
|
|
11138
11062
|
za,
|
|
11063
|
+
cs,
|
|
11064
|
+
ls,
|
|
11065
|
+
us,
|
|
11139
11066
|
ds,
|
|
11140
|
-
fs,
|
|
11141
|
-
ps,
|
|
11142
|
-
ms,
|
|
11143
|
-
hs,
|
|
11144
11067
|
Ga,
|
|
11145
11068
|
J({
|
|
11146
11069
|
keyword: "conformance_test",
|
|
@@ -11177,200 +11100,200 @@ var vu = [
|
|
|
11177
11100
|
parse: rn,
|
|
11178
11101
|
dump: an
|
|
11179
11102
|
}),
|
|
11180
|
-
|
|
11103
|
+
fs,
|
|
11181
11104
|
J({
|
|
11182
11105
|
keyword: "identity_slot",
|
|
11183
11106
|
field: "identitySlots",
|
|
11184
11107
|
takesID: !0,
|
|
11185
|
-
parse:
|
|
11186
|
-
dump:
|
|
11108
|
+
parse: Ts,
|
|
11109
|
+
dump: Es
|
|
11187
11110
|
}),
|
|
11188
11111
|
J({
|
|
11189
11112
|
keyword: "aspect",
|
|
11190
11113
|
field: "aspects",
|
|
11191
11114
|
takesID: !0,
|
|
11192
|
-
parse:
|
|
11193
|
-
dump:
|
|
11115
|
+
parse: Os,
|
|
11116
|
+
dump: ks
|
|
11194
11117
|
}),
|
|
11195
11118
|
J({
|
|
11196
11119
|
keyword: "promise_set",
|
|
11197
11120
|
field: "promiseSets",
|
|
11198
11121
|
takesID: !0,
|
|
11199
|
-
parse:
|
|
11200
|
-
dump:
|
|
11122
|
+
parse: As,
|
|
11123
|
+
dump: js
|
|
11201
11124
|
}),
|
|
11202
11125
|
J({
|
|
11203
11126
|
keyword: "application_declaration",
|
|
11204
11127
|
field: "applicationDeclarations",
|
|
11205
11128
|
takesID: !0,
|
|
11206
|
-
parse:
|
|
11207
|
-
dump:
|
|
11129
|
+
parse: Ns,
|
|
11130
|
+
dump: Ps
|
|
11208
11131
|
}),
|
|
11209
|
-
|
|
11210
|
-
|
|
11211
|
-
|
|
11212
|
-
|
|
11213
|
-
|
|
11132
|
+
Ss,
|
|
11133
|
+
oc,
|
|
11134
|
+
sc,
|
|
11135
|
+
Bc,
|
|
11136
|
+
Vc,
|
|
11214
11137
|
J({
|
|
11215
11138
|
keyword: "activity_archetype",
|
|
11216
11139
|
field: "activityArchetypes",
|
|
11217
11140
|
takesID: !0,
|
|
11218
|
-
parse:
|
|
11219
|
-
dump:
|
|
11141
|
+
parse: Jc,
|
|
11142
|
+
dump: Yc
|
|
11220
11143
|
}),
|
|
11221
11144
|
J({
|
|
11222
11145
|
keyword: "participant_kind",
|
|
11223
11146
|
field: "participantKinds",
|
|
11224
11147
|
takesID: !0,
|
|
11225
|
-
parse:
|
|
11226
|
-
dump:
|
|
11148
|
+
parse: $c,
|
|
11149
|
+
dump: rl
|
|
11227
11150
|
}),
|
|
11228
11151
|
J({
|
|
11229
11152
|
keyword: "governance_organ",
|
|
11230
11153
|
field: "governanceOrgans",
|
|
11231
11154
|
takesID: !0,
|
|
11232
|
-
parse:
|
|
11233
|
-
dump:
|
|
11155
|
+
parse: il,
|
|
11156
|
+
dump: al
|
|
11234
11157
|
}),
|
|
11235
11158
|
J({
|
|
11236
11159
|
keyword: "declaration_kind",
|
|
11237
11160
|
field: "declarationKinds",
|
|
11238
11161
|
takesID: !0,
|
|
11239
|
-
parse:
|
|
11240
|
-
dump:
|
|
11162
|
+
parse: sl,
|
|
11163
|
+
dump: ul
|
|
11241
11164
|
}),
|
|
11242
11165
|
J({
|
|
11243
11166
|
keyword: "declaration_status",
|
|
11244
11167
|
field: "declarationStatuses",
|
|
11245
11168
|
takesID: !0,
|
|
11246
|
-
parse:
|
|
11247
|
-
dump:
|
|
11169
|
+
parse: dl,
|
|
11170
|
+
dump: fl
|
|
11248
11171
|
}),
|
|
11249
11172
|
J({
|
|
11250
11173
|
keyword: "declaration_gate",
|
|
11251
11174
|
field: "declarationGates",
|
|
11252
11175
|
takesID: !0,
|
|
11253
|
-
parse:
|
|
11254
|
-
dump:
|
|
11176
|
+
parse: pl,
|
|
11177
|
+
dump: ml
|
|
11255
11178
|
}),
|
|
11256
11179
|
J({
|
|
11257
11180
|
keyword: "scheme_definition",
|
|
11258
11181
|
field: "schemeDefinitions",
|
|
11259
11182
|
takesID: !0,
|
|
11260
|
-
parse:
|
|
11261
|
-
dump:
|
|
11183
|
+
parse: gl,
|
|
11184
|
+
dump: vl
|
|
11262
11185
|
}),
|
|
11263
11186
|
J({
|
|
11264
11187
|
keyword: "scheme_lifecycle",
|
|
11265
11188
|
field: "schemeLifecycles",
|
|
11266
11189
|
takesID: !0,
|
|
11267
|
-
parse:
|
|
11268
|
-
dump:
|
|
11190
|
+
parse: Sl,
|
|
11191
|
+
dump: Cl
|
|
11269
11192
|
}),
|
|
11270
11193
|
J({
|
|
11271
11194
|
keyword: "framework_document",
|
|
11272
11195
|
field: "frameworkDocuments",
|
|
11273
11196
|
takesID: !0,
|
|
11274
|
-
parse:
|
|
11275
|
-
dump:
|
|
11197
|
+
parse: Tl,
|
|
11198
|
+
dump: El
|
|
11276
11199
|
}),
|
|
11277
11200
|
J({
|
|
11278
11201
|
keyword: "document_precedence",
|
|
11279
11202
|
field: "documentPrecedences",
|
|
11280
11203
|
takesID: !0,
|
|
11281
|
-
parse:
|
|
11282
|
-
dump:
|
|
11204
|
+
parse: Dl,
|
|
11205
|
+
dump: Ol
|
|
11283
11206
|
}),
|
|
11284
11207
|
J({
|
|
11285
11208
|
keyword: "auto_inclusion",
|
|
11286
11209
|
field: "autoInclusions",
|
|
11287
11210
|
takesID: !0,
|
|
11288
|
-
parse:
|
|
11289
|
-
dump:
|
|
11211
|
+
parse: Al,
|
|
11212
|
+
dump: jl
|
|
11290
11213
|
}),
|
|
11291
11214
|
J({
|
|
11292
11215
|
keyword: "decision_rule",
|
|
11293
11216
|
field: "decisionRules",
|
|
11294
11217
|
takesID: !0,
|
|
11295
|
-
parse:
|
|
11296
|
-
dump:
|
|
11218
|
+
parse: Ll,
|
|
11219
|
+
dump: Vl
|
|
11297
11220
|
}),
|
|
11298
11221
|
J({
|
|
11299
11222
|
keyword: "document_module",
|
|
11300
11223
|
field: "documentModules",
|
|
11301
11224
|
takesID: !0,
|
|
11302
|
-
parse:
|
|
11303
|
-
dump:
|
|
11225
|
+
parse: Kl,
|
|
11226
|
+
dump: ql
|
|
11304
11227
|
}),
|
|
11305
11228
|
J({
|
|
11306
11229
|
keyword: "informative_annex",
|
|
11307
11230
|
field: "informativeAnnexes",
|
|
11308
11231
|
takesID: !0,
|
|
11309
|
-
parse:
|
|
11310
|
-
dump:
|
|
11232
|
+
parse: Zl,
|
|
11233
|
+
dump: Ql
|
|
11311
11234
|
}),
|
|
11312
11235
|
J({
|
|
11313
11236
|
keyword: "part_annex",
|
|
11314
11237
|
field: "partAnnexes",
|
|
11315
11238
|
takesID: !0,
|
|
11316
|
-
parse:
|
|
11317
|
-
dump:
|
|
11239
|
+
parse: eu,
|
|
11240
|
+
dump: tu
|
|
11318
11241
|
}),
|
|
11319
11242
|
ro,
|
|
11320
|
-
|
|
11243
|
+
yc,
|
|
11244
|
+
Ec,
|
|
11245
|
+
Dc,
|
|
11246
|
+
kc,
|
|
11321
11247
|
Ac,
|
|
11322
|
-
jc,
|
|
11323
|
-
Nc,
|
|
11324
|
-
Pc,
|
|
11325
11248
|
J({
|
|
11326
11249
|
keyword: "text",
|
|
11327
11250
|
field: "texts",
|
|
11328
11251
|
takesID: !0,
|
|
11329
|
-
parse:
|
|
11330
|
-
dump:
|
|
11252
|
+
parse: jc,
|
|
11253
|
+
dump: Mc
|
|
11331
11254
|
}),
|
|
11332
|
-
|
|
11333
|
-
|
|
11334
|
-
|
|
11255
|
+
Wc,
|
|
11256
|
+
Kc,
|
|
11257
|
+
qc,
|
|
11335
11258
|
J({
|
|
11336
11259
|
keyword: "mapping",
|
|
11337
11260
|
field: "wireMappings",
|
|
11338
11261
|
takesID: !0,
|
|
11339
11262
|
takesFormat: !0,
|
|
11340
|
-
parse:
|
|
11341
|
-
dump:
|
|
11263
|
+
parse: iu,
|
|
11264
|
+
dump: au
|
|
11342
11265
|
}),
|
|
11343
11266
|
J({
|
|
11344
11267
|
keyword: "string_format",
|
|
11345
11268
|
field: "stringFormats",
|
|
11346
11269
|
takesID: !0,
|
|
11347
|
-
parse:
|
|
11348
|
-
dump:
|
|
11270
|
+
parse: ou,
|
|
11271
|
+
dump: su
|
|
11349
11272
|
}),
|
|
11350
11273
|
J({
|
|
11351
11274
|
keyword: "namespace",
|
|
11352
11275
|
field: "namespaces",
|
|
11353
11276
|
takesID: !0,
|
|
11354
|
-
parse:
|
|
11355
|
-
dump:
|
|
11277
|
+
parse: cu,
|
|
11278
|
+
dump: lu
|
|
11356
11279
|
}),
|
|
11357
11280
|
J({
|
|
11358
11281
|
keyword: "datum",
|
|
11359
11282
|
field: "datums",
|
|
11360
11283
|
takesID: !0,
|
|
11361
11284
|
optionalTypedId: !0,
|
|
11362
|
-
parse:
|
|
11363
|
-
dump:
|
|
11285
|
+
parse: uu,
|
|
11286
|
+
dump: du
|
|
11364
11287
|
}),
|
|
11365
11288
|
J({
|
|
11366
11289
|
keyword: "check",
|
|
11367
11290
|
field: "checks",
|
|
11368
11291
|
takesID: !0,
|
|
11369
|
-
parse:
|
|
11370
|
-
dump:
|
|
11292
|
+
parse: fu,
|
|
11293
|
+
dump: pu
|
|
11371
11294
|
})
|
|
11372
11295
|
];
|
|
11373
|
-
function
|
|
11296
|
+
function hu(e) {
|
|
11374
11297
|
let t = {};
|
|
11375
11298
|
for (let n of e) {
|
|
11376
11299
|
if (!n.field) continue;
|
|
@@ -11387,61 +11310,61 @@ function yu(e) {
|
|
|
11387
11310
|
}
|
|
11388
11311
|
return t;
|
|
11389
11312
|
}
|
|
11390
|
-
function
|
|
11313
|
+
function gu(e) {
|
|
11391
11314
|
let t = {};
|
|
11392
11315
|
for (let n of e) n.field && (t[n.field] = { resolve: n.resolve ?? ((e, t) => t) });
|
|
11393
11316
|
return t;
|
|
11394
11317
|
}
|
|
11395
|
-
function
|
|
11318
|
+
function _u(e) {
|
|
11396
11319
|
let t = {};
|
|
11397
11320
|
for (let n of e) n.field && (t[n.field] = n.dump);
|
|
11398
11321
|
return t;
|
|
11399
11322
|
}
|
|
11400
|
-
var
|
|
11323
|
+
var vu = {
|
|
11401
11324
|
package: { parse: Ua },
|
|
11402
11325
|
root: { parse: (e) => (t) => (t.root = e.trim(), t) },
|
|
11403
11326
|
metadata: { parse: h },
|
|
11404
11327
|
version: { parse: () => (e) => e },
|
|
11405
|
-
...
|
|
11406
|
-
},
|
|
11328
|
+
...hu(mu)
|
|
11329
|
+
}, yu = gu(mu), bu = _u(mu), Y = (/* @__PURE__ */ e(((e, t) => {
|
|
11407
11330
|
t.exports = {};
|
|
11408
|
-
})))(),
|
|
11409
|
-
function
|
|
11331
|
+
})))(), xu = /^include\s+"([^"]+)"/gm, Su = /^[ \t]*(#|\/\/)/;
|
|
11332
|
+
function Cu(e, t = /* @__PURE__ */ new Set()) {
|
|
11410
11333
|
let n = (0, Y.resolve)(e);
|
|
11411
11334
|
if (t.has(n)) throw Error(`Include cycle detected: ${n} (chain: ${[...t, n].map((e) => e.split("/").pop()).join(" → ")})`);
|
|
11412
11335
|
if (t.add(n), !(0, Y.existsSync)(n)) throw Error(`Include file not found: ${n}`);
|
|
11413
11336
|
let r = (0, Y.readFileSync)(n, "utf8"), i = (0, Y.dirname)(n);
|
|
11414
|
-
return r.replace(
|
|
11337
|
+
return r.replace(xu, (e, n, a) => {
|
|
11415
11338
|
let o = r.lastIndexOf("\n", a) + 1, s = r.slice(o, a);
|
|
11416
|
-
if (
|
|
11339
|
+
if (Su.test(s)) return e;
|
|
11417
11340
|
let c = (0, Y.isAbsolute)(n) ? n : (0, Y.resolve)(i, n);
|
|
11418
|
-
return
|
|
11341
|
+
return Cu(c.endsWith(".prl") || c.endsWith(".mmel") ? c : (0, Y.existsSync)(`${c}.prl`) ? `${c}.prl` : `${c}.mmel`, new Set(t));
|
|
11419
11342
|
});
|
|
11420
11343
|
}
|
|
11421
11344
|
//#endregion
|
|
11422
11345
|
//#region src/validate.ts
|
|
11423
|
-
function
|
|
11346
|
+
function wu(e) {
|
|
11424
11347
|
let t = [];
|
|
11425
|
-
for (let n of
|
|
11348
|
+
for (let n of Tu) t.push(...n.check(e));
|
|
11426
11349
|
return t;
|
|
11427
11350
|
}
|
|
11428
|
-
var
|
|
11351
|
+
var Tu = [
|
|
11429
11352
|
{
|
|
11430
11353
|
name: "empty-ids",
|
|
11431
|
-
check:
|
|
11354
|
+
check: Eu
|
|
11432
11355
|
},
|
|
11433
11356
|
{
|
|
11434
11357
|
name: "form-references",
|
|
11435
|
-
check:
|
|
11358
|
+
check: Du
|
|
11436
11359
|
},
|
|
11437
11360
|
{
|
|
11438
11361
|
name: "state-machine-cascades",
|
|
11439
|
-
check:
|
|
11362
|
+
check: Ou
|
|
11440
11363
|
}
|
|
11441
11364
|
];
|
|
11442
|
-
function
|
|
11365
|
+
function Eu(e) {
|
|
11443
11366
|
let t = [];
|
|
11444
|
-
for (let [n, r] of
|
|
11367
|
+
for (let [n, r] of ku(e)) for (let e of r) (!e.id || e.id.trim() === "") && t.push({
|
|
11445
11368
|
severity: "error",
|
|
11446
11369
|
code: "empty-id",
|
|
11447
11370
|
construct: n,
|
|
@@ -11449,7 +11372,7 @@ function Au(e) {
|
|
|
11449
11372
|
});
|
|
11450
11373
|
return t;
|
|
11451
11374
|
}
|
|
11452
|
-
function
|
|
11375
|
+
function Du(e) {
|
|
11453
11376
|
let t = [], n = new Set(e.calculations.map((e) => e.id)), r = new Set(e.processes.map((e) => e.id));
|
|
11454
11377
|
for (let t of e.conformanceTests ?? []) r.add(t.id);
|
|
11455
11378
|
let i = new Set(e.subforms.map((e) => e.id));
|
|
@@ -11461,7 +11384,7 @@ function ju(e) {
|
|
|
11461
11384
|
message: `Form "${a.id}" references conformance process "${a.conformanceProcessId}" which does not exist`,
|
|
11462
11385
|
id: a.id
|
|
11463
11386
|
});
|
|
11464
|
-
for (let e of
|
|
11387
|
+
for (let e of Au(a)) {
|
|
11465
11388
|
let r = e.calculationId;
|
|
11466
11389
|
r && !r.startsWith("ocl{") && !n.has(r) && t.push({
|
|
11467
11390
|
severity: "error",
|
|
@@ -11480,7 +11403,7 @@ function ju(e) {
|
|
|
11480
11403
|
}
|
|
11481
11404
|
return t;
|
|
11482
11405
|
}
|
|
11483
|
-
function
|
|
11406
|
+
function Ou(e) {
|
|
11484
11407
|
let t = [];
|
|
11485
11408
|
for (let n of e.stateMachines) {
|
|
11486
11409
|
let e = new Set(n.states.map((e) => e.name));
|
|
@@ -11501,10 +11424,10 @@ function Mu(e) {
|
|
|
11501
11424
|
}
|
|
11502
11425
|
return t;
|
|
11503
11426
|
}
|
|
11504
|
-
function*
|
|
11427
|
+
function* ku(e) {
|
|
11505
11428
|
for (let [t, n] of Object.entries(e)) Array.isArray(n) && n.length > 0 && typeof n[0]?.id == "string" && (yield [t, n]);
|
|
11506
11429
|
}
|
|
11507
|
-
function*
|
|
11430
|
+
function* Au(e) {
|
|
11508
11431
|
let t = [...e.fields];
|
|
11509
11432
|
for (; t.length > 0;) {
|
|
11510
11433
|
let e = t.pop();
|
|
@@ -11513,7 +11436,7 @@ function* Pu(e) {
|
|
|
11513
11436
|
}
|
|
11514
11437
|
//#endregion
|
|
11515
11438
|
//#region src/ser-des/package.ts
|
|
11516
|
-
var
|
|
11439
|
+
var ju = [
|
|
11517
11440
|
"model",
|
|
11518
11441
|
"entities",
|
|
11519
11442
|
"specification",
|
|
@@ -11521,23 +11444,23 @@ var Fu = [
|
|
|
11521
11444
|
"evaluation",
|
|
11522
11445
|
"framework"
|
|
11523
11446
|
];
|
|
11524
|
-
function
|
|
11447
|
+
function Mu(e) {
|
|
11525
11448
|
let t = [];
|
|
11526
11449
|
if (!(0, Y.existsSync)(e)) return t;
|
|
11527
11450
|
for (let n of (0, Y.readdirSync)(e).sort()) {
|
|
11528
11451
|
let r = (0, Y.join)(e, n);
|
|
11529
|
-
(0, Y.statSync)(r).isDirectory() ? t.push(...
|
|
11452
|
+
(0, Y.statSync)(r).isDirectory() ? t.push(...Mu(r)) : (n.endsWith(".prl") || n.endsWith(".mmel")) && t.push(r);
|
|
11530
11453
|
}
|
|
11531
11454
|
return t;
|
|
11532
11455
|
}
|
|
11533
|
-
function
|
|
11456
|
+
function Nu(e) {
|
|
11534
11457
|
let t = (0, Y.resolve)(e), n = [], r = (0, Y.join)(t, "package.primmel");
|
|
11535
11458
|
(0, Y.existsSync)(r) && n.push({
|
|
11536
11459
|
path: r,
|
|
11537
11460
|
role: "manifest"
|
|
11538
11461
|
});
|
|
11539
11462
|
let i = [];
|
|
11540
|
-
for (let e of
|
|
11463
|
+
for (let e of ju) i.push(...Mu((0, Y.join)(t, e)));
|
|
11541
11464
|
for (let e of (0, Y.readdirSync)(t).sort()) {
|
|
11542
11465
|
let n = (0, Y.join)(t, e);
|
|
11543
11466
|
(0, Y.statSync)(n).isFile() && (e.endsWith(".prl") || e.endsWith(".mmel")) && e !== "package.primmel" && e !== ".primmel-allowlist.prl" && i.push(n);
|
|
@@ -11549,10 +11472,10 @@ function Lu(e) {
|
|
|
11549
11472
|
});
|
|
11550
11473
|
return n;
|
|
11551
11474
|
}
|
|
11552
|
-
function
|
|
11553
|
-
return
|
|
11475
|
+
function Pu(e, t = {}) {
|
|
11476
|
+
return Hu(e, t).standard;
|
|
11554
11477
|
}
|
|
11555
|
-
function
|
|
11478
|
+
function Fu(e, t) {
|
|
11556
11479
|
let n = /* @__PURE__ */ new Map(), r = [];
|
|
11557
11480
|
for (let i of t) {
|
|
11558
11481
|
let t = e.constructs[i.field]?.[i.id];
|
|
@@ -11568,37 +11491,37 @@ function zu(e, t) {
|
|
|
11568
11491
|
unassigned: r
|
|
11569
11492
|
};
|
|
11570
11493
|
}
|
|
11571
|
-
function
|
|
11572
|
-
let n =
|
|
11494
|
+
function Iu(e, t = {}) {
|
|
11495
|
+
let n = Hu(e, t, !0);
|
|
11573
11496
|
if (!n.provenance) throw Error("loadPackageWithProvenance: provenance not collected");
|
|
11574
11497
|
return {
|
|
11575
11498
|
...n,
|
|
11576
11499
|
provenance: n.provenance
|
|
11577
11500
|
};
|
|
11578
11501
|
}
|
|
11579
|
-
function
|
|
11502
|
+
function Lu(e) {
|
|
11580
11503
|
let t = 0;
|
|
11581
11504
|
for (let n = 0; n < e.length; n++) e.charAt(n) === "\n" && t++;
|
|
11582
11505
|
return t;
|
|
11583
11506
|
}
|
|
11584
|
-
function
|
|
11507
|
+
function Ru(e) {
|
|
11585
11508
|
let t = [], n = 0, r = 1;
|
|
11586
11509
|
for (let i of e) {
|
|
11587
11510
|
if (i.role !== "content") continue;
|
|
11588
|
-
let e =
|
|
11511
|
+
let e = Cu(i.path);
|
|
11589
11512
|
t.push({
|
|
11590
11513
|
path: i.path,
|
|
11591
11514
|
text: e,
|
|
11592
11515
|
start: n,
|
|
11593
11516
|
lineStart: r
|
|
11594
|
-
}), n += e.length + 2, r +=
|
|
11517
|
+
}), n += e.length + 2, r += Lu(e) + 2;
|
|
11595
11518
|
}
|
|
11596
11519
|
return t;
|
|
11597
11520
|
}
|
|
11598
|
-
function
|
|
11521
|
+
function zu(e) {
|
|
11599
11522
|
return e.map((e) => e.text).join("\n\n");
|
|
11600
11523
|
}
|
|
11601
|
-
function
|
|
11524
|
+
function Bu(e, t, n) {
|
|
11602
11525
|
let r = {}, i = 0;
|
|
11603
11526
|
for (let a of e) {
|
|
11604
11527
|
for (; i + 1 < t.length && a.start.offset >= t[i + 1].start;) i++;
|
|
@@ -11618,7 +11541,7 @@ function Wu(e, t, n) {
|
|
|
11618
11541
|
}
|
|
11619
11542
|
return r;
|
|
11620
11543
|
}
|
|
11621
|
-
function
|
|
11544
|
+
function Vu(e) {
|
|
11622
11545
|
let t = (0, Y.join)((0, Y.resolve)(e), "package.primmel");
|
|
11623
11546
|
if (!(0, Y.existsSync)(t)) throw Error(`loadPackage: no package.primmel found in ${(0, Y.resolve)(e)}`);
|
|
11624
11547
|
let n = (0, Y.readFileSync)(t, "utf8"), r = { packageManifest: null };
|
|
@@ -11627,39 +11550,39 @@ function Gu(e) {
|
|
|
11627
11550
|
if (!i || !i.id) throw Error(`loadPackage: ${t} is not a valid package manifest`);
|
|
11628
11551
|
return i;
|
|
11629
11552
|
}
|
|
11630
|
-
function
|
|
11631
|
-
let r =
|
|
11553
|
+
function Hu(e, t = {}, n = !1) {
|
|
11554
|
+
let r = Nu(e);
|
|
11632
11555
|
if (r.length === 0) throw Error(`loadPackage: no package files found in ${(0, Y.resolve)(e)}`);
|
|
11633
11556
|
let i = null;
|
|
11634
|
-
r.some((e) => e.role === "manifest") && (i =
|
|
11635
|
-
let a =
|
|
11636
|
-
if (i && t.resolvePackage &&
|
|
11557
|
+
r.some((e) => e.role === "manifest") && (i = Vu(e));
|
|
11558
|
+
let a = Ru(r);
|
|
11559
|
+
if (i && t.resolvePackage && Wu(i).length > 0) return Zu(e, t, i, n);
|
|
11637
11560
|
let o = n ? {
|
|
11638
11561
|
...t,
|
|
11639
11562
|
withProvenance: !0
|
|
11640
11563
|
} : t;
|
|
11641
11564
|
i?.language && (o.strict = !0);
|
|
11642
|
-
let s = u(
|
|
11565
|
+
let s = u(zu(a), vu, o);
|
|
11643
11566
|
if (i) {
|
|
11644
11567
|
s.packageManifest = i;
|
|
11645
|
-
let e =
|
|
11568
|
+
let e = Gu(i);
|
|
11646
11569
|
e && s.issues.push(e);
|
|
11647
11570
|
}
|
|
11648
11571
|
let c = {
|
|
11649
|
-
standard: m(s,
|
|
11572
|
+
standard: m(s, yu),
|
|
11650
11573
|
issues: s.issues
|
|
11651
11574
|
};
|
|
11652
11575
|
if (n) {
|
|
11653
11576
|
let e = r.find((e) => e.role === "manifest")?.path;
|
|
11654
11577
|
c.provenance = {
|
|
11655
11578
|
...e === void 0 ? {} : { manifest: e },
|
|
11656
|
-
constructs:
|
|
11579
|
+
constructs: Bu(s.constructs ?? [], a, i?.id)
|
|
11657
11580
|
};
|
|
11658
11581
|
}
|
|
11659
11582
|
return c;
|
|
11660
11583
|
}
|
|
11661
|
-
function
|
|
11662
|
-
return
|
|
11584
|
+
function Uu(e, t = {}) {
|
|
11585
|
+
return Hu(e, t);
|
|
11663
11586
|
}
|
|
11664
11587
|
var X = class extends Error {
|
|
11665
11588
|
rule;
|
|
@@ -11667,12 +11590,12 @@ var X = class extends Error {
|
|
|
11667
11590
|
super(t), this.rule = e, this.name = "CompositionError";
|
|
11668
11591
|
}
|
|
11669
11592
|
};
|
|
11670
|
-
function
|
|
11593
|
+
function Wu(e) {
|
|
11671
11594
|
let t = [];
|
|
11672
11595
|
for (let n of [...e.uses ?? [], ...e.extends ? [e.extends] : []]) t.includes(n) || t.push(n);
|
|
11673
11596
|
return t;
|
|
11674
11597
|
}
|
|
11675
|
-
function
|
|
11598
|
+
function Gu(e) {
|
|
11676
11599
|
return e.extends ? {
|
|
11677
11600
|
severity: "warning",
|
|
11678
11601
|
code: "extends-deprecated",
|
|
@@ -11681,51 +11604,51 @@ function Yu(e) {
|
|
|
11681
11604
|
message: `package "${e.id}": 'extends ${e.extends}' is deprecated — declare 'uses { ${e.extends} }' instead (extends is treated as a single-entry uses)`
|
|
11682
11605
|
} : null;
|
|
11683
11606
|
}
|
|
11684
|
-
var
|
|
11607
|
+
var Ku = /* @__PURE__ */ "approvals.roles.processes.pages.gateways.regs.references.provisions.dataclasses.events.enums.variables.notes.tables.figures.links.mapProfiles.viewProfiles.terms.forms.subforms.symbols.formulaNotes.calculations.verdicts.referenceMaterials.wireMappings.stringFormats.namespaces.datums.checks.testPointSets.commonTestConditions.competenceKinds.schemeActivityKinds.schemeTypes.constraints.uncertaintyBudgets.discrepancyRecords.stateMachines.conformanceTests.conformanceClasses.requirements.requirementClasses.instruments.attributeDefinitions.capabilities.behaviors.subjects.identitySlots.aspects.promiseSets.attestations.applicationDeclarations.calculationContexts.evaluationDimensions.evaluationProfiles.certificateTemplates.verificationPathways.labSelectionCriteria.sampleSelectionRules.specimenGovernanceRules.testReportSkeletons.testReportChecklists.instances.quantityRegisters.duals.invariants.testSequences.formulasUsed.texts.participantKinds.governanceOrgans.declarationKinds.declarationStatuses.declarationGates.schemeDefinitions.schemeLifecycles.frameworkDocuments.documentPrecedences.autoInclusions.decisionRules.documentModules.informativeAnnexes.partAnnexes.comments.predicates.artifactDefinitions.artifactInstances.activityArchetypes.connectorProfiles.monitors.passports.dataspaces.policies.dimensions".split("."), qu = /* @__PURE__ */ new Set([
|
|
11685
11608
|
"testReportChecklists",
|
|
11686
11609
|
"dataclasses",
|
|
11687
11610
|
"quantityRegisters"
|
|
11688
11611
|
]);
|
|
11689
|
-
function
|
|
11612
|
+
function Ju(e) {
|
|
11690
11613
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
11691
11614
|
}
|
|
11692
|
-
function
|
|
11615
|
+
function Yu(e, t) {
|
|
11693
11616
|
if (Array.isArray(e) && Array.isArray(t)) {
|
|
11694
|
-
let n = (e) =>
|
|
11617
|
+
let n = (e) => Ju(e) && typeof e.id == "string", r = [...e, ...t];
|
|
11695
11618
|
if (r.length > 0 && r.every(n)) {
|
|
11696
11619
|
let e = [], t = /* @__PURE__ */ new Map();
|
|
11697
|
-
for (let n of r) t.has(n.id) ? t.set(n.id,
|
|
11620
|
+
for (let n of r) t.has(n.id) ? t.set(n.id, Yu(t.get(n.id), n)) : (e.push(n.id), t.set(n.id, n));
|
|
11698
11621
|
return e.map((e) => t.get(e));
|
|
11699
11622
|
}
|
|
11700
11623
|
let i = [...e];
|
|
11701
11624
|
for (let e of t) i.includes(e) || i.push(e);
|
|
11702
11625
|
return i;
|
|
11703
11626
|
}
|
|
11704
|
-
if (
|
|
11627
|
+
if (Ju(e) && Ju(t)) {
|
|
11705
11628
|
let n = { ...e };
|
|
11706
|
-
for (let [e, r] of Object.entries(t)) e !== "overlay" && r != null && (n[e] = e in n ?
|
|
11629
|
+
for (let [e, r] of Object.entries(t)) e !== "overlay" && r != null && (n[e] = e in n ? Yu(n[e], r) : r);
|
|
11707
11630
|
return n;
|
|
11708
11631
|
}
|
|
11709
11632
|
return t;
|
|
11710
11633
|
}
|
|
11711
|
-
function
|
|
11712
|
-
let n =
|
|
11634
|
+
function Xu(e, t) {
|
|
11635
|
+
let n = Ru(Nu(e));
|
|
11713
11636
|
return {
|
|
11714
|
-
ctx: u(
|
|
11637
|
+
ctx: u(zu(n), vu, t),
|
|
11715
11638
|
chunks: n
|
|
11716
11639
|
};
|
|
11717
11640
|
}
|
|
11718
|
-
function
|
|
11641
|
+
function Zu(e, t, n, r = !1) {
|
|
11719
11642
|
let i = t.resolvePackage, a = n.id, o = /* @__PURE__ */ new Map([[a, (0, Y.resolve)(e)]]), s = /* @__PURE__ */ new Map([[a, n]]), c = [], l = /* @__PURE__ */ new Map(), u = [], d = (e) => {
|
|
11720
11643
|
l.set(e, 1), u.push(e);
|
|
11721
|
-
for (let t of
|
|
11644
|
+
for (let t of Wu(s.get(e))) {
|
|
11722
11645
|
let n = l.get(t) ?? 0;
|
|
11723
11646
|
if (n === 1) throw new X("uses-cycle", `uses cycle: ${[...u.slice(u.indexOf(t)), t].join(" → ")} — package composition must be acyclic (uses-cycle)`);
|
|
11724
11647
|
if (n !== 2) {
|
|
11725
11648
|
if (!o.has(t)) {
|
|
11726
11649
|
let n = i(t);
|
|
11727
11650
|
if (!n) throw new X("uses-resolves", `package "${e}" uses "${t}", which the package locator cannot resolve (uses-resolves)`);
|
|
11728
|
-
let r =
|
|
11651
|
+
let r = Vu(n);
|
|
11729
11652
|
if (r.id !== t) throw new X("uses-resolves", `package "${e}" uses "${t}", but the located package (${(0, Y.resolve)(n)}) declares id "${r.id}" (uses-resolves)`);
|
|
11730
11653
|
if (o.set(t, n), s.set(t, r), r.kind === "product_reference") {
|
|
11731
11654
|
l.set(t, 2);
|
|
@@ -11745,13 +11668,13 @@ function td(e, t, n, r = !1) {
|
|
|
11745
11668
|
for (let e of c) {
|
|
11746
11669
|
let t = { ...f };
|
|
11747
11670
|
s.get(e)?.language && (t.strict = !0);
|
|
11748
|
-
let n =
|
|
11671
|
+
let n = Xu(o.get(e), t);
|
|
11749
11672
|
p.set(e, n.ctx), h.set(e, n.chunks);
|
|
11750
11673
|
}
|
|
11751
11674
|
let g = /* @__PURE__ */ new Map();
|
|
11752
|
-
for (let e of
|
|
11675
|
+
for (let e of Ku) g.set(e, /* @__PURE__ */ new Map());
|
|
11753
11676
|
let _ = p.get(c[0]);
|
|
11754
|
-
for (let e of
|
|
11677
|
+
for (let e of Ku) for (let t of Object.keys(_[e])) g.get(e).set(t, c[0]);
|
|
11755
11678
|
let v = /* @__PURE__ */ new Map(), y = (e, t) => {
|
|
11756
11679
|
for (let n of Object.values(t.documentModules)) n.namespace !== "" && !v.has(n.namespace) && v.set(n.namespace, e);
|
|
11757
11680
|
for (let n of Object.keys(t.requirementClasses)) v.has(n) || v.set(n, e);
|
|
@@ -11765,13 +11688,13 @@ function td(e, t, n, r = !1) {
|
|
|
11765
11688
|
for (let e of c.slice(1)) {
|
|
11766
11689
|
let t = p.get(e);
|
|
11767
11690
|
b(e, t);
|
|
11768
|
-
for (let n of
|
|
11691
|
+
for (let n of Ku) {
|
|
11769
11692
|
let r = _[n], i = g.get(n);
|
|
11770
11693
|
for (let [a, o] of Object.entries(t[n])) {
|
|
11771
11694
|
let t = i.get(a);
|
|
11772
11695
|
if (t !== void 0) {
|
|
11773
|
-
if (!(typeof o == "object" && o && o.overlay === !0 && (n === "terms" || n === "processes" || n === "attributeDefinitions" || n === "certificateTemplates" ||
|
|
11774
|
-
if (
|
|
11696
|
+
if (!(typeof o == "object" && o && o.overlay === !0 && (n === "terms" || n === "processes" || n === "attributeDefinitions" || n === "certificateTemplates" || qu.has(n)))) throw new X("uses-no-redefine", `package "${e}" redefines ${String(n)} id "${a}" already declared by package "${t}" — an overlay may reference upstream ids, never redefine them (uses-no-redefine)`);
|
|
11697
|
+
if (qu.has(n)) {
|
|
11775
11698
|
if (n === "testReportChecklists") {
|
|
11776
11699
|
let t = new Set((r[a].entries ?? []).map((e) => e.id));
|
|
11777
11700
|
for (let n of o.entries ?? []) t.has(n.id) || _.issues.push({
|
|
@@ -11782,7 +11705,7 @@ function td(e, t, n, r = !1) {
|
|
|
11782
11705
|
message: `package "${e}" overlay test_report_checklist "${a}" declares entry "${n.id}", which no upstream package's checklist carries — an overlay adds rec-bound strings to an upstream entry, never a fresh entry (orphan-overlay-entry)`
|
|
11783
11706
|
});
|
|
11784
11707
|
}
|
|
11785
|
-
r[a] =
|
|
11708
|
+
r[a] = Yu(r[a], o), i.set(a, e);
|
|
11786
11709
|
continue;
|
|
11787
11710
|
}
|
|
11788
11711
|
}
|
|
@@ -11801,7 +11724,7 @@ function td(e, t, n, r = !1) {
|
|
|
11801
11724
|
if (r && !c.includes(r.pkg)) try {
|
|
11802
11725
|
let e = i(r.pkg);
|
|
11803
11726
|
if (e) {
|
|
11804
|
-
let t =
|
|
11727
|
+
let t = Vu(e);
|
|
11805
11728
|
a = t.provides ?? [], s.set(r.pkg, t);
|
|
11806
11729
|
}
|
|
11807
11730
|
} catch {}
|
|
@@ -11824,12 +11747,12 @@ function td(e, t, n, r = !1) {
|
|
|
11824
11747
|
}
|
|
11825
11748
|
});
|
|
11826
11749
|
for (let e of s.values()) {
|
|
11827
|
-
let t =
|
|
11750
|
+
let t = Gu(e);
|
|
11828
11751
|
t && ee.push(t);
|
|
11829
11752
|
}
|
|
11830
11753
|
_.packageManifest = n;
|
|
11831
11754
|
let x = {
|
|
11832
|
-
standard: m(_,
|
|
11755
|
+
standard: m(_, yu),
|
|
11833
11756
|
issues: [..._.issues, ...ee],
|
|
11834
11757
|
composition: {
|
|
11835
11758
|
root: a,
|
|
@@ -11843,7 +11766,7 @@ function td(e, t, n, r = !1) {
|
|
|
11843
11766
|
if (r) {
|
|
11844
11767
|
let t = {};
|
|
11845
11768
|
for (let e of c) {
|
|
11846
|
-
let n =
|
|
11769
|
+
let n = Bu(p.get(e).constructs ?? [], h.get(e), e);
|
|
11847
11770
|
for (let [e, r] of Object.entries(n)) {
|
|
11848
11771
|
let n = t[e] ??= {};
|
|
11849
11772
|
for (let [e, t] of Object.entries(r)) n[e] = t;
|
|
@@ -11858,7 +11781,7 @@ function td(e, t, n, r = !1) {
|
|
|
11858
11781
|
}
|
|
11859
11782
|
//#endregion
|
|
11860
11783
|
//#region src/ser-des/prm.ts
|
|
11861
|
-
var
|
|
11784
|
+
var Qu = /* @__PURE__ */ new Set(["MMEL_MAP", "Primmel_MAP"]), $u = /* @__PURE__ */ new Set([
|
|
11862
11785
|
"full",
|
|
11863
11786
|
"minimal",
|
|
11864
11787
|
"partial",
|
|
@@ -11867,7 +11790,7 @@ var nd = /* @__PURE__ */ new Set(["MMEL_MAP", "Primmel_MAP"]), rd = /* @__PURE__
|
|
|
11867
11790
|
function Z(e) {
|
|
11868
11791
|
throw Error(`.prm parse error: ${e}`);
|
|
11869
11792
|
}
|
|
11870
|
-
function
|
|
11793
|
+
function ed(e, t) {
|
|
11871
11794
|
let n = {
|
|
11872
11795
|
description: "",
|
|
11873
11796
|
justification: "",
|
|
@@ -11876,9 +11799,9 @@ function id(e, t) {
|
|
|
11876
11799
|
if (e == null) return n;
|
|
11877
11800
|
(typeof e != "object" || Array.isArray(e)) && Z(`${t}: pair metadata must be an object`);
|
|
11878
11801
|
let r = e;
|
|
11879
|
-
return r.description !== void 0 && (typeof r.description != "string" && Z(`${t}: "description" must be a string`), n.description = r.description), r.justification !== void 0 && (typeof r.justification != "string" && Z(`${t}: "justification" must be a string`), n.justification = r.justification), r.coverage !== void 0 && ((typeof r.coverage != "string" ||
|
|
11802
|
+
return r.description !== void 0 && (typeof r.description != "string" && Z(`${t}: "description" must be a string`), n.description = r.description), r.justification !== void 0 && (typeof r.justification != "string" && Z(`${t}: "justification" must be a string`), n.justification = r.justification), r.coverage !== void 0 && ((typeof r.coverage != "string" || !$u.has(r.coverage)) && Z(`${t}: "coverage" must be one of full | minimal | partial | none`), n.coverage = r.coverage), n;
|
|
11880
11803
|
}
|
|
11881
|
-
function
|
|
11804
|
+
function td(e) {
|
|
11882
11805
|
let t;
|
|
11883
11806
|
try {
|
|
11884
11807
|
t = JSON.parse(e);
|
|
@@ -11887,7 +11810,7 @@ function ad(e) {
|
|
|
11887
11810
|
}
|
|
11888
11811
|
(typeof t != "object" || !t || Array.isArray(t)) && Z("top level must be an object");
|
|
11889
11812
|
let n = t, r = typeof n["@type"] == "string" ? n["@type"] : "";
|
|
11890
|
-
|
|
11813
|
+
Qu.has(r) || Z(`"@type" must be MMEL_MAP or Primmel_MAP (got "${r}")`);
|
|
11891
11814
|
let i = {
|
|
11892
11815
|
context: typeof n["@context"] == "string" ? n["@context"] : "",
|
|
11893
11816
|
type: r,
|
|
@@ -11903,20 +11826,20 @@ function ad(e) {
|
|
|
11903
11826
|
coverage: {}
|
|
11904
11827
|
}, a = n.coverage ?? {};
|
|
11905
11828
|
(typeof a != "object" || !a || Array.isArray(a)) && Z(`mapSet."${e}".coverage: must be an object`);
|
|
11906
|
-
for (let [t, n] of Object.entries(a)) (typeof n != "string" ||
|
|
11829
|
+
for (let [t, n] of Object.entries(a)) (typeof n != "string" || !$u.has(n)) && Z(`mapSet."${e}".coverage."${t}": must be one of full | minimal | partial | none`), r.coverage[t] = n;
|
|
11907
11830
|
let o = n.mappings ?? {};
|
|
11908
11831
|
(typeof o != "object" || !o || Array.isArray(o)) && Z(`mapSet."${e}".mappings: must be an object`);
|
|
11909
11832
|
for (let [t, n] of Object.entries(o)) {
|
|
11910
11833
|
(typeof n != "object" || !n || Array.isArray(n)) && Z(`mapSet."${e}".mappings."${t}": must be an object`);
|
|
11911
11834
|
let i = {};
|
|
11912
|
-
for (let [r, a] of Object.entries(n)) i[r] =
|
|
11835
|
+
for (let [r, a] of Object.entries(n)) i[r] = ed(a, `mapSet."${e}".mappings."${t}"."${r}"`);
|
|
11913
11836
|
r.mappings[t] = i;
|
|
11914
11837
|
}
|
|
11915
11838
|
i.mapSet[e] = r;
|
|
11916
11839
|
}
|
|
11917
11840
|
return i;
|
|
11918
11841
|
}
|
|
11919
|
-
function
|
|
11842
|
+
function nd(e) {
|
|
11920
11843
|
let t = {};
|
|
11921
11844
|
e.context && (t["@context"] = e.context), t["@type"] = e.type || "Primmel_MAP", t.id = e.id;
|
|
11922
11845
|
let n = {};
|
|
@@ -11941,7 +11864,7 @@ function od(e) {
|
|
|
11941
11864
|
}
|
|
11942
11865
|
return t.mapSet = n, JSON.stringify(t, null, 2) + "\n";
|
|
11943
11866
|
}
|
|
11944
|
-
function
|
|
11867
|
+
function rd(e) {
|
|
11945
11868
|
let t = [];
|
|
11946
11869
|
for (let [n, r] of Object.entries(e.mapSet)) {
|
|
11947
11870
|
let e = {};
|
|
@@ -11960,7 +11883,7 @@ function sd(e) {
|
|
|
11960
11883
|
}
|
|
11961
11884
|
return t;
|
|
11962
11885
|
}
|
|
11963
|
-
function
|
|
11886
|
+
function id(e, t) {
|
|
11964
11887
|
let n = {
|
|
11965
11888
|
context: "",
|
|
11966
11889
|
type: "Primmel_MAP",
|
|
@@ -11988,7 +11911,7 @@ function cd(e, t) {
|
|
|
11988
11911
|
}
|
|
11989
11912
|
//#endregion
|
|
11990
11913
|
//#region src/type-expr.ts
|
|
11991
|
-
var
|
|
11914
|
+
var ad = [
|
|
11992
11915
|
"integer",
|
|
11993
11916
|
"float",
|
|
11994
11917
|
"double",
|
|
@@ -12003,8 +11926,8 @@ var ld = [
|
|
|
12003
11926
|
"reference",
|
|
12004
11927
|
"object",
|
|
12005
11928
|
"any"
|
|
12006
|
-
],
|
|
12007
|
-
function
|
|
11929
|
+
], od = /^[A-Za-z_][A-Za-z0-9_-]*$/;
|
|
11930
|
+
function sd(e) {
|
|
12008
11931
|
let t = 0;
|
|
12009
11932
|
for (let n = 0; n < e.length; n++) {
|
|
12010
11933
|
let r = e[n];
|
|
@@ -12014,33 +11937,33 @@ function dd(e) {
|
|
|
12014
11937
|
}
|
|
12015
11938
|
return null;
|
|
12016
11939
|
}
|
|
12017
|
-
function
|
|
11940
|
+
function cd(e) {
|
|
12018
11941
|
let t = e.trim();
|
|
12019
11942
|
if (t === "QuantityValue") return { kind: "quantity" };
|
|
12020
|
-
if (
|
|
11943
|
+
if (ad.includes(t)) return {
|
|
12021
11944
|
kind: "primitive",
|
|
12022
11945
|
name: t
|
|
12023
11946
|
};
|
|
12024
11947
|
let n = /^reference\(([^)]+)\)$/.exec(t);
|
|
12025
11948
|
if (n) {
|
|
12026
11949
|
let e = n[1].trim();
|
|
12027
|
-
return
|
|
11950
|
+
return od.test(e) ? {
|
|
12028
11951
|
kind: "reference",
|
|
12029
11952
|
target: e
|
|
12030
11953
|
} : null;
|
|
12031
11954
|
}
|
|
12032
11955
|
if (t.startsWith("map<") && t.endsWith(">")) {
|
|
12033
|
-
let e =
|
|
11956
|
+
let e = sd(t.slice(4, -1));
|
|
12034
11957
|
if (!e) return null;
|
|
12035
11958
|
let n = e[0].trim(), r = null;
|
|
12036
11959
|
n === "string" ? r = {
|
|
12037
11960
|
kind: "primitive",
|
|
12038
11961
|
name: "string"
|
|
12039
|
-
} :
|
|
11962
|
+
} : od.test(n) && (r = {
|
|
12040
11963
|
kind: "reference",
|
|
12041
11964
|
target: n
|
|
12042
11965
|
});
|
|
12043
|
-
let i =
|
|
11966
|
+
let i = cd(e[1]);
|
|
12044
11967
|
return !r || !i ? null : {
|
|
12045
11968
|
kind: "map",
|
|
12046
11969
|
key: r,
|
|
@@ -12049,13 +11972,13 @@ function fd(e) {
|
|
|
12049
11972
|
}
|
|
12050
11973
|
return null;
|
|
12051
11974
|
}
|
|
12052
|
-
function
|
|
12053
|
-
let t =
|
|
11975
|
+
function ld(e) {
|
|
11976
|
+
let t = cd(e);
|
|
12054
11977
|
return t !== null && t.kind === "map";
|
|
12055
11978
|
}
|
|
12056
11979
|
//#endregion
|
|
12057
11980
|
//#region src/mapping-coverage.ts
|
|
12058
|
-
function
|
|
11981
|
+
function ud(e, t) {
|
|
12059
11982
|
let n = e.indexOf("#");
|
|
12060
11983
|
if (n >= 0) {
|
|
12061
11984
|
let t = e.slice(0, n), r = e.slice(n + 1);
|
|
@@ -12071,12 +11994,12 @@ function md(e, t) {
|
|
|
12071
11994
|
qualified: t + "#" + e
|
|
12072
11995
|
};
|
|
12073
11996
|
}
|
|
12074
|
-
function
|
|
11997
|
+
function dd(e, t) {
|
|
12075
11998
|
let n = [];
|
|
12076
11999
|
for (let [r, i] of Object.entries(e.mappings)) for (let a of i) n.push({
|
|
12077
12000
|
source: r,
|
|
12078
12001
|
sourceModel: t,
|
|
12079
|
-
target:
|
|
12002
|
+
target: ud(a.target, e.namespace).qualified,
|
|
12080
12003
|
targetModel: e.namespace,
|
|
12081
12004
|
description: a.description,
|
|
12082
12005
|
justification: a.justification,
|
|
@@ -12084,12 +12007,12 @@ function hd(e, t) {
|
|
|
12084
12007
|
});
|
|
12085
12008
|
return n;
|
|
12086
12009
|
}
|
|
12087
|
-
function
|
|
12010
|
+
function fd(e, t = {}) {
|
|
12088
12011
|
let n = t.modelId ?? e.packageManifest?.id ?? e.meta?.namespace ?? "", r = [...e.mapProfiles ?? []], i = t.prm ? Array.isArray(t.prm) ? t.prm : [t.prm] : [];
|
|
12089
|
-
for (let e of i) r.push(...
|
|
12090
|
-
return r.flatMap((e) =>
|
|
12012
|
+
for (let e of i) r.push(...rd(e));
|
|
12013
|
+
return r.flatMap((e) => dd(e, n));
|
|
12091
12014
|
}
|
|
12092
|
-
function
|
|
12015
|
+
function pd(e, t = {}) {
|
|
12093
12016
|
let n = t.idPrefix ?? "", r = (e.processes ?? []).filter((e) => !n || e.id.startsWith(n)), i = new Set(r.map((e) => e.id)), a = /* @__PURE__ */ new Map();
|
|
12094
12017
|
for (let e of r) a.set(e.id, {
|
|
12095
12018
|
id: e.id.slice(n.length),
|
|
@@ -12103,18 +12026,18 @@ function _d(e, t = {}) {
|
|
|
12103
12026
|
}
|
|
12104
12027
|
return o;
|
|
12105
12028
|
}
|
|
12106
|
-
function
|
|
12029
|
+
function md(e, t) {
|
|
12107
12030
|
return t.length === 0 ? "none" : t.every((e) => e === "full") ? "full" : e === "gateway" && t.some((e) => e === "full" || e === "minimal") ? "minimal" : t.some((e) => e !== "none") ? "partial" : "none";
|
|
12108
12031
|
}
|
|
12109
|
-
function
|
|
12110
|
-
let a = Array.isArray(t) ? t :
|
|
12032
|
+
function hd(e, t, n, r, i = {}) {
|
|
12033
|
+
let a = Array.isArray(t) ? t : pd(t), o = n.filter((e) => e.targetModel === r), s = /* @__PURE__ */ new Map();
|
|
12111
12034
|
for (let e of o) {
|
|
12112
|
-
let t =
|
|
12035
|
+
let t = ud(e.target, r).id;
|
|
12113
12036
|
(s.get(t) ?? s.set(t, []).get(t)).push(e.source);
|
|
12114
12037
|
}
|
|
12115
12038
|
let c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), u = (e, t) => {
|
|
12116
12039
|
let n = s.has(e.id), r = n ? e.id : t, i = e.children.map((e) => u(e, r)), a;
|
|
12117
|
-
return r === null ? a = e.children.length === 0 ? "none" :
|
|
12040
|
+
return r === null ? a = e.children.length === 0 ? "none" : md(e.composition, i) : (a = "full", !n && t !== null && l.set(e.id, t)), c.set(e.id, a), a;
|
|
12118
12041
|
};
|
|
12119
12042
|
for (let e of a) u(e, null);
|
|
12120
12043
|
let d = [], f = /* @__PURE__ */ new Map(), p = (e) => {
|
|
@@ -12136,7 +12059,7 @@ function yd(e, t, n, r, i = {}) {
|
|
|
12136
12059
|
for (let e of d) m[e.coverage]++;
|
|
12137
12060
|
let h = [], g = /* @__PURE__ */ new Set();
|
|
12138
12061
|
for (let e of o) {
|
|
12139
|
-
let t =
|
|
12062
|
+
let t = ud(e.target, r).id;
|
|
12140
12063
|
f.has(t) ? g.add(e.source) : h.push({
|
|
12141
12064
|
source: e.source,
|
|
12142
12065
|
target: e.target
|
|
@@ -12147,7 +12070,7 @@ function yd(e, t, n, r, i = {}) {
|
|
|
12147
12070
|
y.has(t) || (y.add(t), v.push(e));
|
|
12148
12071
|
};
|
|
12149
12072
|
for (let e of o) {
|
|
12150
|
-
let t =
|
|
12073
|
+
let t = ud(e.target, r).id, n = f.get(t);
|
|
12151
12074
|
if (!n) continue;
|
|
12152
12075
|
let i = (e, t) => {
|
|
12153
12076
|
for (let n of e.children) t.push(n), i(n, t);
|
|
@@ -12194,7 +12117,7 @@ function yd(e, t, n, r, i = {}) {
|
|
|
12194
12117
|
summary: m
|
|
12195
12118
|
};
|
|
12196
12119
|
}
|
|
12197
|
-
function
|
|
12120
|
+
function gd(e) {
|
|
12198
12121
|
let t = [], n = /* @__PURE__ */ new Set();
|
|
12199
12122
|
for (let r of e) for (let i of r.mappings) for (let r of e) if (r.modelId === i.targetModel) for (let e of r.mappings) {
|
|
12200
12123
|
if (i.target !== `${r.modelId}#${e.source}`) continue;
|
|
@@ -12212,7 +12135,7 @@ function bd(e) {
|
|
|
12212
12135
|
}
|
|
12213
12136
|
return t;
|
|
12214
12137
|
}
|
|
12215
|
-
function
|
|
12138
|
+
function _d(e) {
|
|
12216
12139
|
let t = /* @__PURE__ */ new Map();
|
|
12217
12140
|
for (let n of e) for (let e of n.mappings) {
|
|
12218
12141
|
let r = `${n.modelId}→${e.targetModel}`, i = t.get(r) ?? {
|
|
@@ -12224,14 +12147,14 @@ function xd(e) {
|
|
|
12224
12147
|
}
|
|
12225
12148
|
return [...t.values()];
|
|
12226
12149
|
}
|
|
12227
|
-
function
|
|
12150
|
+
function vd(e) {
|
|
12228
12151
|
if (e && typeof e == "object") {
|
|
12229
|
-
for (let t of Object.values(e))
|
|
12152
|
+
for (let t of Object.values(e)) vd(t);
|
|
12230
12153
|
Object.freeze(e);
|
|
12231
12154
|
}
|
|
12232
12155
|
return e;
|
|
12233
12156
|
}
|
|
12234
|
-
function
|
|
12157
|
+
function yd(e, t, n = null) {
|
|
12235
12158
|
let r = new Set(t.visibleElements ?? []), i = r.size > 0, a = i ? [...r] : (e.processes ?? []).map((e) => e.id), o = null;
|
|
12236
12159
|
if (n) {
|
|
12237
12160
|
let e = n.components.filter((e) => !i || r.has(e.id) || e.mappedBy.some((e) => r.has(e))), t = {
|
|
@@ -12249,14 +12172,14 @@ function Cd(e, t, n = null) {
|
|
|
12249
12172
|
summary: t
|
|
12250
12173
|
};
|
|
12251
12174
|
}
|
|
12252
|
-
return
|
|
12175
|
+
return vd({
|
|
12253
12176
|
id: t.id,
|
|
12254
12177
|
against: t.against ?? "",
|
|
12255
12178
|
elements: a,
|
|
12256
12179
|
coverage: o
|
|
12257
12180
|
});
|
|
12258
12181
|
}
|
|
12259
|
-
function
|
|
12182
|
+
function bd(e) {
|
|
12260
12183
|
let t = /* @__PURE__ */ new Set(), n = (e) => {
|
|
12261
12184
|
for (let n of e ?? []) t.add(n.id);
|
|
12262
12185
|
};
|
|
@@ -12273,13 +12196,13 @@ function wd(e) {
|
|
|
12273
12196
|
}
|
|
12274
12197
|
//#endregion
|
|
12275
12198
|
//#region src/model-diff.ts
|
|
12276
|
-
var
|
|
12199
|
+
var xd = [
|
|
12277
12200
|
"foundations",
|
|
12278
12201
|
"primary",
|
|
12279
12202
|
"secondary",
|
|
12280
12203
|
"tertiary",
|
|
12281
12204
|
"cross-cutting"
|
|
12282
|
-
],
|
|
12205
|
+
], Sd = {
|
|
12283
12206
|
terms: "foundations",
|
|
12284
12207
|
references: "foundations",
|
|
12285
12208
|
roles: "foundations",
|
|
@@ -12310,7 +12233,6 @@ var Td = [
|
|
|
12310
12233
|
attributeDefinitions: "primary",
|
|
12311
12234
|
capabilities: "primary",
|
|
12312
12235
|
behaviors: "primary",
|
|
12313
|
-
conditionSets: "primary",
|
|
12314
12236
|
instances: "primary",
|
|
12315
12237
|
duals: "primary",
|
|
12316
12238
|
artifactDefinitions: "primary",
|
|
@@ -12363,9 +12285,9 @@ function Q(e) {
|
|
|
12363
12285
|
};
|
|
12364
12286
|
return n(e);
|
|
12365
12287
|
}
|
|
12366
|
-
var
|
|
12367
|
-
function
|
|
12368
|
-
let r = e ?? "", i = n ?? "", a =
|
|
12288
|
+
var Cd = /#([^#]*)$/;
|
|
12289
|
+
function wd(e, t, n = "") {
|
|
12290
|
+
let r = e ?? "", i = n ?? "", a = Cd.exec(r);
|
|
12369
12291
|
a && (r = r.slice(0, a.index), i ||= a[1]);
|
|
12370
12292
|
let o = r.lastIndexOf(":"), s = r, c = "";
|
|
12371
12293
|
if (o >= 0) {
|
|
@@ -12379,11 +12301,11 @@ function Od(e, t, n = "") {
|
|
|
12379
12301
|
fragment: i
|
|
12380
12302
|
};
|
|
12381
12303
|
}
|
|
12382
|
-
var
|
|
12304
|
+
var Td = [
|
|
12383
12305
|
"source",
|
|
12384
12306
|
"sourceRef",
|
|
12385
12307
|
"sourceRefs"
|
|
12386
|
-
],
|
|
12308
|
+
], Ed = {
|
|
12387
12309
|
requirements: {
|
|
12388
12310
|
statement: [
|
|
12389
12311
|
"name",
|
|
@@ -12432,7 +12354,7 @@ var kd = [
|
|
|
12432
12354
|
"profile"
|
|
12433
12355
|
]
|
|
12434
12356
|
}
|
|
12435
|
-
},
|
|
12357
|
+
}, Dd = [
|
|
12436
12358
|
"name",
|
|
12437
12359
|
"label",
|
|
12438
12360
|
"title",
|
|
@@ -12441,16 +12363,16 @@ var kd = [
|
|
|
12441
12363
|
"statement",
|
|
12442
12364
|
"purpose",
|
|
12443
12365
|
"text"
|
|
12444
|
-
],
|
|
12366
|
+
], Od = [
|
|
12445
12367
|
"parent",
|
|
12446
12368
|
"bindsTo",
|
|
12447
12369
|
"targets",
|
|
12448
12370
|
"conformanceProcessId",
|
|
12449
12371
|
"conformanceProcessIds"
|
|
12450
12372
|
];
|
|
12451
|
-
function
|
|
12373
|
+
function kd(e) {
|
|
12452
12374
|
let t = {}, n = (e, n) => {
|
|
12453
|
-
n && typeof n == "object" && (n.doc || n.clause) && (t[e] ??= []).push(
|
|
12375
|
+
n && typeof n == "object" && (n.doc || n.clause) && (t[e] ??= []).push(wd(n.doc ?? "", n.clause ?? "", n.fragment));
|
|
12454
12376
|
};
|
|
12455
12377
|
n("source", e.source), n("sourceRef", e.sourceRef);
|
|
12456
12378
|
for (let t of e.sourceRefs ?? []) n("sourceRefs", t);
|
|
@@ -12462,7 +12384,7 @@ function Nd(e) {
|
|
|
12462
12384
|
let i = (e) => {
|
|
12463
12385
|
let t = /* @__PURE__ */ new Set();
|
|
12464
12386
|
return e.filter((e) => {
|
|
12465
|
-
let n =
|
|
12387
|
+
let n = Ad(e);
|
|
12466
12388
|
return !t.has(n) && (t.add(n), !0);
|
|
12467
12389
|
});
|
|
12468
12390
|
};
|
|
@@ -12472,17 +12394,17 @@ function Nd(e) {
|
|
|
12472
12394
|
channels: t
|
|
12473
12395
|
};
|
|
12474
12396
|
}
|
|
12475
|
-
function
|
|
12397
|
+
function Ad(e) {
|
|
12476
12398
|
return Q({
|
|
12477
12399
|
basis: e.basis,
|
|
12478
12400
|
clause: e.clause,
|
|
12479
12401
|
fragment: e.fragment
|
|
12480
12402
|
});
|
|
12481
12403
|
}
|
|
12482
|
-
function
|
|
12483
|
-
let n = String(t.id ?? t.entityName ?? ""), r =
|
|
12404
|
+
function jd(e, t) {
|
|
12405
|
+
let n = String(t.id ?? t.entityName ?? ""), r = Sd[e] ?? "cross-cutting", { edges: i, channels: a } = kd(t), o = new Set(Td);
|
|
12484
12406
|
typeof t.reference == "string" && t.reference.startsWith("urn:") && o.add("reference");
|
|
12485
|
-
let s = {}, c = {}, l =
|
|
12407
|
+
let s = {}, c = {}, l = Ed[e], u = (e) => {
|
|
12486
12408
|
let n = {};
|
|
12487
12409
|
for (let r of e) t[r] !== void 0 && (n[r] = t[r], o.add(r), s[r] = t[r]);
|
|
12488
12410
|
return n;
|
|
@@ -12502,9 +12424,9 @@ function Fd(e, t) {
|
|
|
12502
12424
|
c[`spelling:${t.spelling}`] = Q(e), s[`spelling:${t.spelling}`] = e;
|
|
12503
12425
|
}
|
|
12504
12426
|
} else {
|
|
12505
|
-
let e = u(
|
|
12427
|
+
let e = u(Dd);
|
|
12506
12428
|
Object.keys(e).length > 0 && (c.statement = Q(e));
|
|
12507
|
-
let t = u(
|
|
12429
|
+
let t = u(Od);
|
|
12508
12430
|
Object.keys(t).length > 0 && (c.anchor = Q(t));
|
|
12509
12431
|
}
|
|
12510
12432
|
if (i.length > 0) {
|
|
@@ -12531,31 +12453,31 @@ function Fd(e, t) {
|
|
|
12531
12453
|
provenance: i
|
|
12532
12454
|
};
|
|
12533
12455
|
}
|
|
12534
|
-
function
|
|
12456
|
+
function Md(e, t) {
|
|
12535
12457
|
let n = /* @__PURE__ */ new Map();
|
|
12536
|
-
for (let r of Object.keys(
|
|
12458
|
+
for (let r of Object.keys(Sd)) {
|
|
12537
12459
|
let i = e[r];
|
|
12538
12460
|
if (Array.isArray(i)) {
|
|
12539
12461
|
for (let e of i) if (e && typeof e == "object" && ("id" in e || "entityName" in e)) {
|
|
12540
|
-
let i =
|
|
12462
|
+
let i = jd(r, e);
|
|
12541
12463
|
n.has(i.key) && t?.push(i.key), n.set(i.key, i);
|
|
12542
12464
|
}
|
|
12543
12465
|
}
|
|
12544
12466
|
}
|
|
12545
12467
|
return n;
|
|
12546
12468
|
}
|
|
12547
|
-
function
|
|
12469
|
+
function Nd(e, t) {
|
|
12548
12470
|
return `${e}#${t}`;
|
|
12549
12471
|
}
|
|
12550
|
-
function
|
|
12472
|
+
function Pd(e) {
|
|
12551
12473
|
return e?.version ?? "";
|
|
12552
12474
|
}
|
|
12553
|
-
function
|
|
12475
|
+
function Fd(e) {
|
|
12554
12476
|
let t = [...new Set(e)].sort();
|
|
12555
12477
|
return t.filter((e) => !t.some((t) => t !== e && e.startsWith(t + ".")));
|
|
12556
12478
|
}
|
|
12557
|
-
function
|
|
12558
|
-
let r = n.mappingsA ??
|
|
12479
|
+
function Id(e, t, n) {
|
|
12480
|
+
let r = n.mappingsA ?? fd(e), i = n.mappingsB ?? fd(t), a = (e) => `${e.sourceModel}#${e.source}⇒${e.target}`, o = new Map(r.map((e) => [a(e), e])), s = new Map(i.map((e) => [a(e), e])), c = [], l = [], u = [];
|
|
12559
12481
|
for (let [e, t] of s) o.has(e) || c.push(t);
|
|
12560
12482
|
for (let [e, t] of o) {
|
|
12561
12483
|
let n = s.get(e);
|
|
@@ -12576,7 +12498,7 @@ function Bd(e, t, n) {
|
|
|
12576
12498
|
let o = (e) => {
|
|
12577
12499
|
let t = n.references?.[a];
|
|
12578
12500
|
if (t) return t;
|
|
12579
|
-
let r =
|
|
12501
|
+
let r = pd(e, { idPrefix: `${a}#` });
|
|
12580
12502
|
return r.length > 0 ? r : null;
|
|
12581
12503
|
}, s = o(e), c = o(t);
|
|
12582
12504
|
if (!s && !c) {
|
|
@@ -12585,11 +12507,11 @@ function Bd(e, t, n) {
|
|
|
12585
12507
|
}
|
|
12586
12508
|
let l = /* @__PURE__ */ new Map();
|
|
12587
12509
|
if (s) {
|
|
12588
|
-
let t =
|
|
12510
|
+
let t = hd(e, s, r, a);
|
|
12589
12511
|
for (let e of t.components) l.set(e.id, { from: e.coverage });
|
|
12590
12512
|
}
|
|
12591
12513
|
if (c) {
|
|
12592
|
-
let e =
|
|
12514
|
+
let e = hd(t, c, i, a);
|
|
12593
12515
|
for (let t of e.components) {
|
|
12594
12516
|
let e = l.get(t.id) ?? {};
|
|
12595
12517
|
e.to = t.coverage, l.set(t.id, e);
|
|
@@ -12613,12 +12535,12 @@ function Bd(e, t, n) {
|
|
|
12613
12535
|
namespacesSkipped: p
|
|
12614
12536
|
};
|
|
12615
12537
|
}
|
|
12616
|
-
function
|
|
12538
|
+
function Ld(e, t) {
|
|
12617
12539
|
let n = [];
|
|
12618
12540
|
for (let [t, r] of e) {
|
|
12619
12541
|
let e = /* @__PURE__ */ new Set([...t.provenance.map((e) => e.basis), ...r.provenance.map((e) => e.basis)]);
|
|
12620
12542
|
for (let i of [...e].sort()) {
|
|
12621
|
-
let e = (e) =>
|
|
12543
|
+
let e = (e) => Fd(e.provenance.filter((e) => e.basis === i).map((e) => e.clause)).filter((e) => e.length > 0), a = e(t), o = e(r), s = a.filter((e) => !o.includes(e)), c = o.filter((e) => !a.includes(e));
|
|
12622
12544
|
if (s.length === 0 && c.length === 0) continue;
|
|
12623
12545
|
let l = {
|
|
12624
12546
|
key: t.key,
|
|
@@ -12668,7 +12590,7 @@ function Vd(e, t) {
|
|
|
12668
12590
|
}
|
|
12669
12591
|
let r = (e) => {
|
|
12670
12592
|
if (e.kind !== "renumbered" || !t.sentencesA || !t.sentencesB) return "unavailable";
|
|
12671
|
-
let n = t.sentencesA.get(
|
|
12593
|
+
let n = t.sentencesA.get(Nd(e.doc, e.from)), r = t.sentencesB.get(Nd(e.doc, e.to));
|
|
12672
12594
|
return n === void 0 || r === void 0 ? "unavailable" : n.replace(/\s+/g, " ").trim() === r.replace(/\s+/g, " ").trim() ? "same" : "differed";
|
|
12673
12595
|
}, i = /* @__PURE__ */ new Map();
|
|
12674
12596
|
for (let e of n) {
|
|
@@ -12684,21 +12606,21 @@ function Vd(e, t) {
|
|
|
12684
12606
|
}
|
|
12685
12607
|
return [...i.values()].sort((e, t) => `${e.doc} ${e.from} ${e.to}`.localeCompare(`${t.doc} ${t.from} ${t.to}`));
|
|
12686
12608
|
}
|
|
12687
|
-
function
|
|
12609
|
+
function Rd(e, t, n) {
|
|
12688
12610
|
return e.kind !== "texts" || !n.startsWith("spelling:") ? n : n in e.aspects ? n in t.aspects ? `${n} (changed)` : `${n} (removed)` : `${n} (added)`;
|
|
12689
12611
|
}
|
|
12690
|
-
var
|
|
12691
|
-
function
|
|
12692
|
-
if (
|
|
12612
|
+
var zd = (e) => typeof e == "object" && !!e && !Array.isArray(e);
|
|
12613
|
+
function Bd(e, t, n, r) {
|
|
12614
|
+
if (zd(t) && zd(n)) {
|
|
12693
12615
|
let i = [.../* @__PURE__ */ new Set([...Object.keys(t), ...Object.keys(n)])].sort();
|
|
12694
|
-
for (let a of i)
|
|
12616
|
+
for (let a of i) Bd(`${e}.${a}`, t[a], n[a], r);
|
|
12695
12617
|
return;
|
|
12696
12618
|
}
|
|
12697
12619
|
Q(t) !== Q(n) && r.push(e);
|
|
12698
12620
|
}
|
|
12699
|
-
function
|
|
12621
|
+
function Vd(e, t) {
|
|
12700
12622
|
let n = [.../* @__PURE__ */ new Set([...Object.keys(e.fields), ...Object.keys(t.fields)])].sort(), r = [];
|
|
12701
|
-
for (let i of n)
|
|
12623
|
+
for (let i of n) Bd(i, e.fields[i], t.fields[i], r);
|
|
12702
12624
|
let i = [
|
|
12703
12625
|
"source",
|
|
12704
12626
|
"sourceRef",
|
|
@@ -12711,8 +12633,8 @@ function Gd(e, t) {
|
|
|
12711
12633
|
return !a.has(r) && (a.add(r), !0);
|
|
12712
12634
|
});
|
|
12713
12635
|
}
|
|
12714
|
-
function
|
|
12715
|
-
let r = [], i = [], a =
|
|
12636
|
+
function Hd(e, t, n = {}) {
|
|
12637
|
+
let r = [], i = [], a = Md(e, r), o = Md(t, i), s = [], c = [], l = [], u = [], d = [], f = 0, p = Object.fromEntries(xd.map((e) => [e, {
|
|
12716
12638
|
added: 0,
|
|
12717
12639
|
removed: 0,
|
|
12718
12640
|
changed: 0,
|
|
@@ -12750,17 +12672,17 @@ function Kd(e, t, n = {}) {
|
|
|
12750
12672
|
id: t.id,
|
|
12751
12673
|
kind: t.kind,
|
|
12752
12674
|
tier: t.tier,
|
|
12753
|
-
aspects: r.map((e) =>
|
|
12754
|
-
fields:
|
|
12675
|
+
aspects: r.map((e) => Rd(t, n, e)).sort(),
|
|
12676
|
+
fields: Vd(t, n)
|
|
12755
12677
|
}), p[t.tier].changed++);
|
|
12756
12678
|
}
|
|
12757
|
-
let m =
|
|
12679
|
+
let m = Id(e, t, n), h = Ld(d, n), g = s.length === 0 && c.length === 0 && l.length === 0 && u.length === 0 && m.added.length === 0 && m.removed.length === 0 && m.changed.length === 0 && m.coverageDelta.length === 0 && h.length === 0, _ = e.packageManifest, v = t.packageManifest, y = n.aLabel ?? (_?.id ? `${_.id}@${Pd(_) || "?"}` : "a"), b = n.bLabel ?? (v?.id ? `${v.id}@${Pd(v) || "?"}` : "b"), ee = !!_?.id && _.id === v?.id && Pd(_) !== Pd(v), x = (e, t) => `${e}: duplicate element ${t} — the last declaration wins (a data error the duplicate-id linter owns); this side under-reports`, te = [...r.map((e) => x(y, e)), ...i.map((e) => x(b, e))];
|
|
12758
12680
|
return {
|
|
12759
12681
|
aLabel: y,
|
|
12760
12682
|
bLabel: b,
|
|
12761
12683
|
editionComparison: ee,
|
|
12762
|
-
aVersion:
|
|
12763
|
-
bVersion:
|
|
12684
|
+
aVersion: Pd(_),
|
|
12685
|
+
bVersion: Pd(v),
|
|
12764
12686
|
added: s.sort((e, t) => e.key.localeCompare(t.key)),
|
|
12765
12687
|
removed: c.sort((e, t) => e.key.localeCompare(t.key)),
|
|
12766
12688
|
changed: l.sort((e, t) => e.key.localeCompare(t.key)),
|
|
@@ -12773,40 +12695,40 @@ function Kd(e, t, n = {}) {
|
|
|
12773
12695
|
empty: g
|
|
12774
12696
|
};
|
|
12775
12697
|
}
|
|
12776
|
-
function
|
|
12698
|
+
function Ud(e) {
|
|
12777
12699
|
return `[${e.tier}/${e.kind}] ${e.id}`;
|
|
12778
12700
|
}
|
|
12779
|
-
function
|
|
12701
|
+
function Wd(e, t) {
|
|
12780
12702
|
try {
|
|
12781
12703
|
let n = e ? JSON.parse(e) : {}, r = t ? JSON.parse(t) : {}, i = [.../* @__PURE__ */ new Set([...Object.keys(n), ...Object.keys(r)])].sort().filter((e) => Q(n[e]) !== Q(r[e])).map((e) => `${e}: ${Q(n[e])} → ${Q(r[e])}`);
|
|
12782
12704
|
if (i.length > 0) return i;
|
|
12783
12705
|
} catch {}
|
|
12784
12706
|
return [`from ${e}`, `to ${t}`];
|
|
12785
12707
|
}
|
|
12786
|
-
function
|
|
12708
|
+
function Gd(e) {
|
|
12787
12709
|
let t = [], n = e.editionComparison ? `edition comparison — ${e.aLabel} → ${e.bLabel}` : `model diff — ${e.aLabel} → ${e.bLabel}`;
|
|
12788
12710
|
t.push(`primmel diff: ${n}`), t.push(""), t.push(`elements: +${e.added.length} -${e.removed.length} ~${e.changed.length} >${e.moved.length} (${e.unchanged} unchanged)`), t.push(""), t.push("by tier: added removed changed moved unchanged");
|
|
12789
|
-
for (let n of
|
|
12711
|
+
for (let n of xd) {
|
|
12790
12712
|
let r = e.byTier[n];
|
|
12791
12713
|
t.push(` ${n.padEnd(13)} ${String(r.added).padStart(5)} ${String(r.removed).padStart(8)} ${String(r.changed).padStart(8)} ${String(r.moved).padStart(6)} ${String(r.unchanged).padStart(9)}`);
|
|
12792
12714
|
}
|
|
12793
12715
|
if (e.added.length > 0) {
|
|
12794
12716
|
t.push("", "added:");
|
|
12795
|
-
for (let n of e.added) t.push(` + ${
|
|
12717
|
+
for (let n of e.added) t.push(` + ${Ud(n)}`);
|
|
12796
12718
|
}
|
|
12797
12719
|
if (e.removed.length > 0) {
|
|
12798
12720
|
t.push("", "removed:");
|
|
12799
|
-
for (let n of e.removed) t.push(` - ${
|
|
12721
|
+
for (let n of e.removed) t.push(` - ${Ud(n)}`);
|
|
12800
12722
|
}
|
|
12801
12723
|
if (e.changed.length > 0) {
|
|
12802
12724
|
t.push("", "changed:");
|
|
12803
|
-
for (let n of e.changed) t.push(` ~ ${
|
|
12725
|
+
for (let n of e.changed) t.push(` ~ ${Ud(n)} — ${n.aspects.join(", ")} (fields: ${n.fields.join(", ")})`);
|
|
12804
12726
|
}
|
|
12805
12727
|
if (e.moved.length > 0) {
|
|
12806
12728
|
t.push("", "moved (re-anchored):");
|
|
12807
12729
|
for (let n of e.moved) {
|
|
12808
|
-
t.push(` > ${
|
|
12809
|
-
for (let e of
|
|
12730
|
+
t.push(` > ${Ud(n)}`);
|
|
12731
|
+
for (let e of Wd(n.from, n.to)) t.push(` ${e}`);
|
|
12810
12732
|
}
|
|
12811
12733
|
}
|
|
12812
12734
|
if (e.warnings.length > 0) {
|
|
@@ -12831,12 +12753,12 @@ function Yd(e) {
|
|
|
12831
12753
|
}
|
|
12832
12754
|
//#endregion
|
|
12833
12755
|
//#region src/operational-state.ts
|
|
12834
|
-
var
|
|
12756
|
+
var Kd = class extends Error {
|
|
12835
12757
|
constructor(e) {
|
|
12836
12758
|
super(e), this.name = "StateTrajectoryError";
|
|
12837
12759
|
}
|
|
12838
12760
|
};
|
|
12839
|
-
function
|
|
12761
|
+
function qd(e, t, n) {
|
|
12840
12762
|
let r = t.state ?? e.initialState, i = [{
|
|
12841
12763
|
state: r,
|
|
12842
12764
|
at: t.at,
|
|
@@ -12845,9 +12767,9 @@ function Zd(e, t, n) {
|
|
|
12845
12767
|
for (let t of n) {
|
|
12846
12768
|
if (!t.fires) continue;
|
|
12847
12769
|
let n = e.transitions.filter((e) => e.actionName === t.fires);
|
|
12848
|
-
if (n.length === 0) throw new
|
|
12770
|
+
if (n.length === 0) throw new Kd(`step "${t.id}" fires "${t.fires}", which state machine "${e.entityName}" does not declare as a transition action`);
|
|
12849
12771
|
let a = n.find((e) => e.from === r || e.from === "*");
|
|
12850
|
-
if (!a) throw new
|
|
12772
|
+
if (!a) throw new Kd(`step "${t.id}" fires "${t.fires}", but state machine "${e.entityName}" is in state "${r}" — no such transition is enabled (from: ${n.map((e) => e.from).join(", ")})`);
|
|
12851
12773
|
r = a.to, i.push({
|
|
12852
12774
|
state: r,
|
|
12853
12775
|
at: t.at,
|
|
@@ -12858,7 +12780,7 @@ function Zd(e, t, n) {
|
|
|
12858
12780
|
}
|
|
12859
12781
|
//#endregion
|
|
12860
12782
|
//#region src/runtime.ts
|
|
12861
|
-
function
|
|
12783
|
+
function Jd(e) {
|
|
12862
12784
|
let t = [], n = 0, r = e;
|
|
12863
12785
|
for (; n < r.length;) {
|
|
12864
12786
|
let e = r[n];
|
|
@@ -12902,7 +12824,7 @@ function Qd(e) {
|
|
|
12902
12824
|
}
|
|
12903
12825
|
return t;
|
|
12904
12826
|
}
|
|
12905
|
-
var
|
|
12827
|
+
var Yd = class {
|
|
12906
12828
|
toks;
|
|
12907
12829
|
constructor(e) {
|
|
12908
12830
|
this.toks = e;
|
|
@@ -12924,24 +12846,24 @@ var $d = class {
|
|
|
12924
12846
|
if (t.t !== "op" || t.v !== e) throw Error(`runtime: the derivation expected "${e}"`);
|
|
12925
12847
|
}
|
|
12926
12848
|
};
|
|
12927
|
-
function
|
|
12928
|
-
return
|
|
12849
|
+
function Xd(e, t) {
|
|
12850
|
+
return Zd(e, t);
|
|
12929
12851
|
}
|
|
12930
|
-
function
|
|
12852
|
+
function Zd(e, t) {
|
|
12931
12853
|
let n = e.peek();
|
|
12932
12854
|
if (n && n.t === "id" && n.v === "if") {
|
|
12933
12855
|
e.next();
|
|
12934
|
-
let n =
|
|
12856
|
+
let n = Qd(e, t), r = e.next();
|
|
12935
12857
|
if (r.t !== "id" || r.v !== "then") throw Error("runtime: the derivation expected \"then\"");
|
|
12936
|
-
let i =
|
|
12858
|
+
let i = Zd(e, t), a = e.next();
|
|
12937
12859
|
if (a.t !== "id" || a.v !== "else") throw Error("runtime: the derivation expected \"else\"");
|
|
12938
|
-
let o =
|
|
12860
|
+
let o = Zd(e, t);
|
|
12939
12861
|
return n ? i : o;
|
|
12940
12862
|
}
|
|
12941
|
-
return
|
|
12863
|
+
return Qd(e, t);
|
|
12942
12864
|
}
|
|
12943
|
-
function
|
|
12944
|
-
let n =
|
|
12865
|
+
function Qd(e, t) {
|
|
12866
|
+
let n = $d(e, t), r = e.peek();
|
|
12945
12867
|
if (r && r.t === "op" && [
|
|
12946
12868
|
"<=",
|
|
12947
12869
|
">=",
|
|
@@ -12951,7 +12873,7 @@ function nf(e, t) {
|
|
|
12951
12873
|
"!="
|
|
12952
12874
|
].includes(r.v)) {
|
|
12953
12875
|
e.next();
|
|
12954
|
-
let i =
|
|
12876
|
+
let i = $d(e, t);
|
|
12955
12877
|
switch (r.v) {
|
|
12956
12878
|
case "<=": return +(n <= i);
|
|
12957
12879
|
case ">=": return +(n >= i);
|
|
@@ -12963,43 +12885,43 @@ function nf(e, t) {
|
|
|
12963
12885
|
}
|
|
12964
12886
|
return n;
|
|
12965
12887
|
}
|
|
12966
|
-
function
|
|
12967
|
-
let n =
|
|
12888
|
+
function $d(e, t) {
|
|
12889
|
+
let n = ef(e, t);
|
|
12968
12890
|
for (;;) {
|
|
12969
12891
|
let r = e.peek();
|
|
12970
12892
|
if (r && r.t === "op" && (r.v === "+" || r.v === "-")) {
|
|
12971
12893
|
e.next();
|
|
12972
|
-
let i =
|
|
12894
|
+
let i = ef(e, t);
|
|
12973
12895
|
n = r.v === "+" ? n + i : n - i;
|
|
12974
12896
|
continue;
|
|
12975
12897
|
}
|
|
12976
12898
|
return n;
|
|
12977
12899
|
}
|
|
12978
12900
|
}
|
|
12979
|
-
function
|
|
12980
|
-
let n =
|
|
12901
|
+
function ef(e, t) {
|
|
12902
|
+
let n = tf(e, t);
|
|
12981
12903
|
for (;;) {
|
|
12982
12904
|
let r = e.peek();
|
|
12983
12905
|
if (r && r.t === "op" && (r.v === "*" || r.v === "/")) {
|
|
12984
12906
|
e.next();
|
|
12985
|
-
let i =
|
|
12907
|
+
let i = tf(e, t);
|
|
12986
12908
|
n = r.v === "*" ? n * i : n / i;
|
|
12987
12909
|
continue;
|
|
12988
12910
|
}
|
|
12989
12911
|
return n;
|
|
12990
12912
|
}
|
|
12991
12913
|
}
|
|
12992
|
-
function
|
|
12914
|
+
function tf(e, t) {
|
|
12993
12915
|
let n = e.peek();
|
|
12994
12916
|
if (n && n.t === "op" && (n.v === "-" || n.v === "+")) {
|
|
12995
12917
|
e.next();
|
|
12996
|
-
let r =
|
|
12918
|
+
let r = tf(e, t);
|
|
12997
12919
|
return n.v === "-" ? -r : r;
|
|
12998
12920
|
}
|
|
12999
|
-
return
|
|
12921
|
+
return nf(e, t);
|
|
13000
12922
|
}
|
|
13001
|
-
function
|
|
13002
|
-
let n =
|
|
12923
|
+
function nf(e, t) {
|
|
12924
|
+
let n = af(e, t);
|
|
13003
12925
|
for (;;) {
|
|
13004
12926
|
let t = e.peek();
|
|
13005
12927
|
if (t && t.t === "op" && t.v === ".") {
|
|
@@ -13015,15 +12937,15 @@ function sf(e, t) {
|
|
|
13015
12937
|
return n;
|
|
13016
12938
|
}
|
|
13017
12939
|
}
|
|
13018
|
-
function
|
|
12940
|
+
function rf(e, t) {
|
|
13019
12941
|
let n = e.peek(), r = e.peekAt(1), i = e.peekAt(2);
|
|
13020
12942
|
return n?.t === "op" && n.v === "(" && r?.t === "id" && i?.t === "op" && i.v === ")" && Array.isArray(t[r.v]);
|
|
13021
12943
|
}
|
|
13022
|
-
function
|
|
12944
|
+
function af(e, t) {
|
|
13023
12945
|
let n = e.next();
|
|
13024
12946
|
if (n.t === "num") return n.v;
|
|
13025
12947
|
if (n.t === "id") {
|
|
13026
|
-
if (n.v === "sum" || n.v === "count" || n.v === "average" || (n.v === "min" || n.v === "max") &&
|
|
12948
|
+
if (n.v === "sum" || n.v === "count" || n.v === "average" || (n.v === "min" || n.v === "max") && rf(e, t)) {
|
|
13027
12949
|
e.expectOp("(");
|
|
13028
12950
|
let r = e.next();
|
|
13029
12951
|
e.expectOp(")");
|
|
@@ -13036,14 +12958,14 @@ function lf(e, t) {
|
|
|
13036
12958
|
}
|
|
13037
12959
|
if (n.v === "abs" || n.v === "min" || n.v === "max") {
|
|
13038
12960
|
e.expectOp("(");
|
|
13039
|
-
let r =
|
|
13040
|
-
if (a && a.t === "op" && a.v === "," && (e.next(), i =
|
|
12961
|
+
let r = Xd(e, t), i = null, a = e.peek();
|
|
12962
|
+
if (a && a.t === "op" && a.v === "," && (e.next(), i = Xd(e, t)), e.expectOp(")"), n.v === "abs") return Math.abs(r);
|
|
13041
12963
|
if (i === null) throw Error(`runtime: ${n.v} needs two arguments`);
|
|
13042
12964
|
return n.v === "min" ? Math.min(r, i) : Math.max(r, i);
|
|
13043
12965
|
}
|
|
13044
12966
|
if (n.v === "ocl") {
|
|
13045
12967
|
e.expectOp("(");
|
|
13046
|
-
let n =
|
|
12968
|
+
let n = Xd(e, t);
|
|
13047
12969
|
return e.expectOp(")"), n;
|
|
13048
12970
|
}
|
|
13049
12971
|
if (n.v === "true") return 1;
|
|
@@ -13053,20 +12975,20 @@ function lf(e, t) {
|
|
|
13053
12975
|
return typeof r == "object" ? r : typeof r == "string" ? Number(r) : r;
|
|
13054
12976
|
}
|
|
13055
12977
|
if (n.t === "op" && n.v === "(") {
|
|
13056
|
-
let n =
|
|
12978
|
+
let n = Xd(e, t);
|
|
13057
12979
|
return e.expectOp(")"), n;
|
|
13058
12980
|
}
|
|
13059
12981
|
throw Error("runtime: the derivation has an unexpected token");
|
|
13060
12982
|
}
|
|
13061
|
-
function
|
|
12983
|
+
function of(e) {
|
|
13062
12984
|
return e.type === "TABLE_OPTIONS" || e.type === "TABLE_REFERENCE";
|
|
13063
12985
|
}
|
|
13064
|
-
function
|
|
13065
|
-
if (!
|
|
12986
|
+
function sf(e, t, n) {
|
|
12987
|
+
if (!of(e)) throw Error(`runtime: ${e.id} declares type ${e.type} — the table evaluation takes the TABLE variable family (TABLE_OPTIONS / TABLE_REFERENCE)`);
|
|
13066
12988
|
if (e.definition === "") throw Error(`runtime: the table variable ${e.id} carries no definition`);
|
|
13067
|
-
return
|
|
12989
|
+
return cf(t, e.definition, n);
|
|
13068
12990
|
}
|
|
13069
|
-
function
|
|
12991
|
+
function cf(e, t, n) {
|
|
13070
12992
|
let r = t.split(",");
|
|
13071
12993
|
if (r.length < 3) throw Error(`runtime: the table lookup definition needs tableId,targetCol,matchCol,var — got "${t}"`);
|
|
13072
12994
|
let i = e.find((e) => e.id === r[0].trim()), a = Number(r[1].trim());
|
|
@@ -13081,15 +13003,15 @@ function ff(e, t, n) {
|
|
|
13081
13003
|
return s !== "" && !Number.isNaN(c) ? c : s;
|
|
13082
13004
|
}
|
|
13083
13005
|
function $(e, t) {
|
|
13084
|
-
let n = new
|
|
13006
|
+
let n = new Yd(Jd(e.replace(/^ocl\{/, "").replace(/\}$/, "").trim())), r = Xd(n, t);
|
|
13085
13007
|
if (n.peek() !== void 0) throw Error("runtime: the derivation has trailing tokens");
|
|
13086
13008
|
return r;
|
|
13087
13009
|
}
|
|
13088
|
-
function
|
|
13010
|
+
function lf(e, t) {
|
|
13089
13011
|
let n = e.has?.attributes?.[t];
|
|
13090
13012
|
return typeof n == "object" && n && "value" in n ? n : n === void 0 ? void 0 : { value: n };
|
|
13091
13013
|
}
|
|
13092
|
-
function
|
|
13014
|
+
function uf(e, t) {
|
|
13093
13015
|
let n = e.instruments[0]?.dimensions.find((e) => e.id === "accuracy_class"), r = t, i = n?.values.find((e) => e.id === r), a = {}, o = i?.payload ?? {};
|
|
13094
13016
|
for (let [e, t] of Object.entries(o)) {
|
|
13095
13017
|
let n = Number(t);
|
|
@@ -13097,15 +13019,15 @@ function mf(e, t) {
|
|
|
13097
13019
|
}
|
|
13098
13020
|
return a;
|
|
13099
13021
|
}
|
|
13100
|
-
function
|
|
13022
|
+
function df(e, t) {
|
|
13101
13023
|
let n = e.instances.find((e) => e.id === t.instance);
|
|
13102
13024
|
if (!n) throw Error(`runtime: no instance "${t.instance}" is declared`);
|
|
13103
|
-
let r = n.has?.dimensions?.accuracy_class, i =
|
|
13025
|
+
let r = n.has?.dimensions?.accuracy_class, i = uf(e, r), a = {
|
|
13104
13026
|
...i,
|
|
13105
13027
|
accuracy_class: i
|
|
13106
13028
|
};
|
|
13107
13029
|
for (let [e] of Object.entries(n.has?.attributes ?? {})) {
|
|
13108
|
-
let t =
|
|
13030
|
+
let t = lf(n, e);
|
|
13109
13031
|
if (t === void 0) continue;
|
|
13110
13032
|
let r = Number(typeof t.value == "object" ? t.value.value : t.value);
|
|
13111
13033
|
Number.isNaN(r) || (a[e] = r);
|
|
@@ -13261,7 +13183,7 @@ function hf(e, t) {
|
|
|
13261
13183
|
});
|
|
13262
13184
|
}
|
|
13263
13185
|
if (e.length > 0) try {
|
|
13264
|
-
f =
|
|
13186
|
+
f = qd(m, {
|
|
13265
13187
|
state: m.initialState,
|
|
13266
13188
|
at: "0"
|
|
13267
13189
|
}, e);
|
|
@@ -13298,27 +13220,27 @@ function hf(e, t) {
|
|
|
13298
13220
|
}
|
|
13299
13221
|
//#endregion
|
|
13300
13222
|
//#region src/ser-des/index.ts
|
|
13301
|
-
function
|
|
13302
|
-
return m(u(e,
|
|
13223
|
+
function ff(e, t = {}) {
|
|
13224
|
+
return m(u(e, vu, t), yu);
|
|
13303
13225
|
}
|
|
13304
|
-
function
|
|
13305
|
-
let n = u(e,
|
|
13226
|
+
function pf(e, t = {}) {
|
|
13227
|
+
let n = u(e, vu, t);
|
|
13306
13228
|
return {
|
|
13307
|
-
standard: m(n,
|
|
13229
|
+
standard: m(n, yu),
|
|
13308
13230
|
issues: n.issues
|
|
13309
13231
|
};
|
|
13310
13232
|
}
|
|
13311
|
-
function
|
|
13312
|
-
return
|
|
13233
|
+
function mf(e, t = {}) {
|
|
13234
|
+
return ff(Cu(e), t);
|
|
13313
13235
|
}
|
|
13314
|
-
function
|
|
13315
|
-
return
|
|
13236
|
+
function hf(e, t = {}) {
|
|
13237
|
+
return pf(Cu(e), t);
|
|
13316
13238
|
}
|
|
13317
|
-
function
|
|
13318
|
-
return ct(e,
|
|
13239
|
+
function gf(e) {
|
|
13240
|
+
return ct(e, bu);
|
|
13319
13241
|
}
|
|
13320
|
-
function
|
|
13321
|
-
return
|
|
13242
|
+
function _f(e) {
|
|
13243
|
+
return wu(e);
|
|
13322
13244
|
}
|
|
13323
13245
|
//#endregion
|
|
13324
|
-
export { X as CompositionError, qa as ENDPOINT_ACCESS_SCOPES, Ka as ENDPOINT_OPERATION_KINDS,
|
|
13246
|
+
export { X as CompositionError, qa as ENDPOINT_ACCESS_SCOPES, Ka as ENDPOINT_OPERATION_KINDS, xc as PASSPORT_ACCESS_CLASSES, bc as PASSPORT_CONTENT_CLASSES, Sc as PASSPORT_UPI_LEVELS, ad as PRIMITIVE_TYPES, Sd as TIER_BY_FIELD, xd as TIER_ORDER, yd as applyView, pd as buildProcessTree, Q as canonical, Nd as clauseTextKey, fd as collectMappings, bd as componentIds, hd as computeCoverage, Hd as diffStandards, gd as discoverTransitive, gf as dump, Wa as dumpPackage, nd as dumpPrm, Wu as effectiveUses, Md as elementIndex, $ as evaluateExpression, sf as evaluateTableVariable, df as executeRun, Gd as formatDiffReport, Fu as groupBySourceFile, of as isTableVariable, ld as isWellFormedMapType, ff as load, mf as loadFile, hf as loadFileWithIssues, Pu as loadPackage, Uu as loadPackageWithIssues, Iu as loadPackageWithProvenance, td as loadPrm, pf as loadWithIssues, cf as lookupTable, id as mapProfilesToPrm, dd as mappingsFromProfile, wd as normalizeSourceRef, Nu as packageFiles, d as parseDeclarations, ud as parseTargetRef, cd as parseTypeExpression, rd as prmToMapProfiles, Vu as readPackageManifest, _d as repoMap, _f as validate };
|