@dialecte/scl 0.3.9 → 0.3.13
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/{hooks-DO4gUiix.js → hooks-D5DJSztS.js} +1364 -1041
- package/dist/v2019C1/extensions/data-model/transaction/import-types.d.ts.map +1 -1
- package/dist/v2019C1/extensions/identity/transaction/index.d.ts +1 -0
- package/dist/v2019C1/extensions/identity/transaction/index.d.ts.map +1 -1
- package/dist/v2019C1/extensions/identity/transaction/restore-cloned-uuids.d.ts +19 -0
- package/dist/v2019C1/extensions/identity/transaction/restore-cloned-uuids.d.ts.map +1 -0
- package/dist/v2019C1/extensions/index.d.ts +1 -0
- package/dist/v2019C1/extensions/index.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/constraints/classify-attribute.types.d.ts +0 -10
- package/dist/v2019C1/extensions/lifecycle/constraints/classify-attribute.types.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/contract.types.d.ts +18 -6
- package/dist/v2019C1/extensions/lifecycle/contract.types.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/cross-cutting/clone-applied-satellites.d.ts +1 -1
- package/dist/v2019C1/extensions/lifecycle/engine/decide.d.ts +8 -1
- package/dist/v2019C1/extensions/lifecycle/engine/decide.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/engine/diff.d.ts +43 -8
- package/dist/v2019C1/extensions/lifecycle/engine/diff.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/engine/diff.types.d.ts +35 -26
- package/dist/v2019C1/extensions/lifecycle/engine/diff.types.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/engine/group.d.ts +1 -1
- package/dist/v2019C1/extensions/lifecycle/engine/group.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/engine/index.d.ts +1 -1
- package/dist/v2019C1/extensions/lifecycle/engine/index.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/engine/reconcile.d.ts +6 -0
- package/dist/v2019C1/extensions/lifecycle/engine/reconcile.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/extract/transaction/asd.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/extract/transaction/fsd.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/index.d.ts +2 -0
- package/dist/v2019C1/extensions/lifecycle/index.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/instance/find-instance.d.ts +15 -0
- package/dist/v2019C1/extensions/lifecycle/instance/find-instance.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/instantiate/transaction/asd.d.ts +2 -2
- package/dist/v2019C1/extensions/lifecycle/instantiate/transaction/asd.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/instantiate/transaction/fsd.d.ts +2 -2
- package/dist/v2019C1/extensions/lifecycle/instantiate/transaction/fsd.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/layers/application/clone-application.d.ts +2 -1
- package/dist/v2019C1/extensions/lifecycle/layers/application/clone-application.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/layers/function/clone-function.d.ts +4 -2
- package/dist/v2019C1/extensions/lifecycle/layers/function/clone-function.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/public.d.ts +2 -0
- package/dist/v2019C1/extensions/lifecycle/public.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/report/mark-placement-conflicts.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/report/query/cross-cutting-satellites.d.ts +7 -5
- package/dist/v2019C1/extensions/lifecycle/report/query/cross-cutting-satellites.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/report/query/report-asd.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/report/query/report-fsd.d.ts +3 -3
- package/dist/v2019C1/extensions/lifecycle/report/query/report-fsd.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/report/query/report-function-satellites.d.ts +5 -3
- package/dist/v2019C1/extensions/lifecycle/report/query/report-function-satellites.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/report/query/report-function.d.ts +7 -2
- package/dist/v2019C1/extensions/lifecycle/report/query/report-function.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/report/query/report-instance.d.ts +20 -0
- package/dist/v2019C1/extensions/lifecycle/report/query/report-instance.d.ts.map +1 -0
- package/dist/v2019C1/extensions/lifecycle/report/query/satellite-companions.d.ts +5 -3
- package/dist/v2019C1/extensions/lifecycle/report/query/satellite-companions.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/report/report.d.ts +4 -4
- package/dist/v2019C1/extensions/lifecycle/report/report.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/scenario.d.ts +21 -0
- package/dist/v2019C1/extensions/lifecycle/scenario.d.ts.map +1 -0
- package/dist/v2019C1/extensions/lifecycle/transplant/transaction/deep.d.ts +2 -1
- package/dist/v2019C1/extensions/lifecycle/transplant/transaction/deep.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/transplant/transaction/index.d.ts +1 -0
- package/dist/v2019C1/extensions/lifecycle/transplant/transaction/index.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/transplant/transaction/primitives/clone-referenced.d.ts +2 -2
- package/dist/v2019C1/extensions/lifecycle/transplant/transaction/primitives/clone-tree.d.ts +1 -1
- package/dist/v2019C1/extensions/lifecycle/transplant/transaction/primitives/merge-children-into.d.ts +22 -0
- package/dist/v2019C1/extensions/lifecycle/transplant/transaction/primitives/merge-children-into.d.ts.map +1 -0
- package/dist/v2019C1/extensions/lifecycle/update/transaction/asd.d.ts +3 -3
- package/dist/v2019C1/extensions/lifecycle/update/transaction/asd.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/update/transaction/fsd.d.ts +1 -1
- package/dist/v2019C1/extensions/lifecycle/update/transaction/fsd.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/update/transaction/function-satellites.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/update/transaction/satellite-reconcile.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/validate/index.d.ts +4 -0
- package/dist/v2019C1/extensions/lifecycle/validate/index.d.ts.map +1 -0
- package/dist/v2019C1/extensions/lifecycle/validate/template-uuid-check.d.ts +15 -0
- package/dist/v2019C1/extensions/lifecycle/validate/template-uuid-check.d.ts.map +1 -0
- package/dist/v2019C1/extensions/lifecycle/validate/template-uuid-check.info.d.ts +10 -0
- package/dist/v2019C1/extensions/lifecycle/validate/template-uuid-check.info.d.ts.map +1 -0
- package/dist/v2019C1/extensions/lifecycle/validate/template-uuid-check.types.d.ts +41 -0
- package/dist/v2019C1/extensions/lifecycle/validate/template-uuid-check.types.d.ts.map +1 -0
- package/dist/v2019C1/extensions/reference/transaction/apply-type-id-remap.d.ts +1 -1
- package/dist/v2019C1/extensions/reference/transaction/apply-uuid-remap.d.ts +21 -0
- package/dist/v2019C1/extensions/reference/transaction/apply-uuid-remap.d.ts.map +1 -0
- package/dist/v2019C1/extensions/reference/transaction/index.d.ts +1 -0
- package/dist/v2019C1/extensions/reference/transaction/index.d.ts.map +1 -1
- package/dist/v2019C1/extensions/signature/public.d.ts +1 -1
- package/dist/v2019C1/extensions/signature/public.d.ts.map +1 -1
- package/dist/v2019C1/extensions/signature/query/element-signature.types.d.ts +15 -1
- package/dist/v2019C1/extensions/signature/query/element-signature.types.d.ts.map +1 -1
- package/dist/v2019C1/extensions/signature/query/index.d.ts +1 -1
- package/dist/v2019C1/extensions/signature/query/index.d.ts.map +1 -1
- package/dist/v2019C1/hooks/index.d.ts.map +1 -1
- package/dist/v2019C1/index.js +22 -3
- package/dist/v2019C1/test/hydrated-test.d.ts +2 -0
- package/dist/v2019C1/test/hydrated-test.d.ts.map +1 -1
- package/dist/v2019C1/test.js +1 -1
- package/package.json +5 -5
- package/dist/v2019C1/hooks/after-deep-clone/after-deep-clone.d.ts +0 -15
- package/dist/v2019C1/hooks/after-deep-clone/after-deep-clone.d.ts.map +0 -1
- package/dist/v2019C1/hooks/after-deep-clone/index.d.ts +0 -2
- package/dist/v2019C1/hooks/after-deep-clone/index.d.ts.map +0 -1
- package/dist/v2019C1/hooks/after-deep-clone/ref-paths.d.ts +0 -12
- package/dist/v2019C1/hooks/after-deep-clone/ref-paths.d.ts.map +0 -1
|
@@ -24523,6 +24523,7 @@ var c = Object.defineProperty, l = (e, t) => {
|
|
|
24523
24523
|
".scd",
|
|
24524
24524
|
".isd",
|
|
24525
24525
|
".icd",
|
|
24526
|
+
".iid",
|
|
24526
24527
|
".xml"
|
|
24527
24528
|
] }, y = {
|
|
24528
24529
|
recordSchema: {
|
|
@@ -24658,22 +24659,22 @@ async function w(e) {
|
|
|
24658
24659
|
//#endregion
|
|
24659
24660
|
//#region src/v2019C1/extensions/data-model/query/is-lnode-locked.ts
|
|
24660
24661
|
var ee = "None";
|
|
24661
|
-
async function
|
|
24662
|
+
async function te(e, t) {
|
|
24662
24663
|
let n = await e.any.getAttribute(t, { name: "iedName" });
|
|
24663
24664
|
return !!n && n !== ee;
|
|
24664
24665
|
}
|
|
24665
24666
|
//#endregion
|
|
24666
24667
|
//#region src/v2019C1/extensions/data-model/query/index.ts
|
|
24667
|
-
var
|
|
24668
|
-
isLNodeLocked: () =>
|
|
24668
|
+
var ne = /* @__PURE__ */ l({
|
|
24669
|
+
isLNodeLocked: () => te,
|
|
24669
24670
|
resolve: () => S
|
|
24670
24671
|
});
|
|
24671
24672
|
//#endregion
|
|
24672
24673
|
//#region src/v2019C1/extensions/clean-up/transaction/orphan-lnode-bindings.ts
|
|
24673
|
-
async function
|
|
24674
|
+
async function re(e) {
|
|
24674
24675
|
let t = await e.getRecordsByTagName("LNode");
|
|
24675
24676
|
for (let n of t) {
|
|
24676
|
-
if (!await
|
|
24677
|
+
if (!await te(e, n)) {
|
|
24677
24678
|
await e.update(n, { attributes: { iedName: "None" } });
|
|
24678
24679
|
continue;
|
|
24679
24680
|
}
|
|
@@ -24681,10 +24682,10 @@ async function ne(e) {
|
|
|
24681
24682
|
tagName: "IED",
|
|
24682
24683
|
attributes: { name: t }
|
|
24683
24684
|
});
|
|
24684
|
-
r || await
|
|
24685
|
+
r || await ie(e, n);
|
|
24685
24686
|
}
|
|
24686
24687
|
}
|
|
24687
|
-
async function
|
|
24688
|
+
async function ie(e, t) {
|
|
24688
24689
|
let n = await e.getChild(t, "LNodeSpecNaming");
|
|
24689
24690
|
if (n) {
|
|
24690
24691
|
let r = await e.getAttribute(n, { name: "sLnClass" }), i = await e.getAttribute(n, { name: "sLnInst" }), a = await e.getAttribute(n, { name: "sPrefix" });
|
|
@@ -24710,7 +24711,7 @@ async function re(e, t) {
|
|
|
24710
24711
|
}
|
|
24711
24712
|
//#endregion
|
|
24712
24713
|
//#region src/v2019C1/extensions/reference/constants/path-extraction.ts
|
|
24713
|
-
var
|
|
24714
|
+
var ae = {
|
|
24714
24715
|
AccessPoint: { type: "transparent" },
|
|
24715
24716
|
Server: { type: "transparent" },
|
|
24716
24717
|
Private: { type: "transparent" },
|
|
@@ -24790,16 +24791,16 @@ var ie = {
|
|
|
24790
24791
|
PowerSystemRelation: { type: "name" },
|
|
24791
24792
|
Variable: { type: "name" },
|
|
24792
24793
|
Process: { type: "name" }
|
|
24793
|
-
},
|
|
24794
|
+
}, oe = [
|
|
24794
24795
|
"lnClass",
|
|
24795
24796
|
"prefix",
|
|
24796
24797
|
"inst",
|
|
24797
24798
|
"lnInst"
|
|
24798
|
-
],
|
|
24799
|
+
], se = new Set(Object.values(ae).flatMap((e) => {
|
|
24799
24800
|
switch (e.type) {
|
|
24800
24801
|
case "transparent": return [];
|
|
24801
24802
|
case "name": return ["name"];
|
|
24802
|
-
case "lnClass": return [...
|
|
24803
|
+
case "lnClass": return [...oe];
|
|
24803
24804
|
case "attribute": return [e.attr];
|
|
24804
24805
|
case "sourceRef": return [
|
|
24805
24806
|
"input",
|
|
@@ -24811,13 +24812,13 @@ var ie = {
|
|
|
24811
24812
|
}));
|
|
24812
24813
|
//#endregion
|
|
24813
24814
|
//#region src/v2019C1/extensions/reference/query/build/path-segment.ts
|
|
24814
|
-
function
|
|
24815
|
+
function ce(e) {
|
|
24815
24816
|
switch (e.type) {
|
|
24816
24817
|
case "transparent": return () => null;
|
|
24817
24818
|
case "name": {
|
|
24818
24819
|
let t = e.separator ?? "/";
|
|
24819
24820
|
return (e) => {
|
|
24820
|
-
let n =
|
|
24821
|
+
let n = E(e, "name");
|
|
24821
24822
|
return n ? {
|
|
24822
24823
|
segment: n,
|
|
24823
24824
|
separator: t
|
|
@@ -24825,34 +24826,34 @@ function se(e) {
|
|
|
24825
24826
|
};
|
|
24826
24827
|
}
|
|
24827
24828
|
case "lnClass": return (e) => {
|
|
24828
|
-
let t =
|
|
24829
|
+
let t = E(e, "lnClass");
|
|
24829
24830
|
return t ? {
|
|
24830
|
-
segment: `${
|
|
24831
|
+
segment: `${E(e, "prefix") ?? ""}${t}${E(e, "inst") ?? E(e, "lnInst") ?? ""}`,
|
|
24831
24832
|
separator: "/"
|
|
24832
24833
|
} : null;
|
|
24833
24834
|
};
|
|
24834
24835
|
case "attribute": return (t) => {
|
|
24835
|
-
let n =
|
|
24836
|
+
let n = E(t, e.attr);
|
|
24836
24837
|
return n ? {
|
|
24837
24838
|
segment: n,
|
|
24838
24839
|
separator: e.separator
|
|
24839
24840
|
} : null;
|
|
24840
24841
|
};
|
|
24841
24842
|
case "sourceRef": return (e) => {
|
|
24842
|
-
let t =
|
|
24843
|
+
let t = E(e, "input");
|
|
24843
24844
|
if (!t) return null;
|
|
24844
|
-
let n = t, r =
|
|
24845
|
+
let n = t, r = E(e, "inputInst");
|
|
24845
24846
|
r && r !== "1" && (n += `(${r})`);
|
|
24846
|
-
let i =
|
|
24847
|
+
let i = E(e, "pDA");
|
|
24847
24848
|
return i && (n += `.${i}`), {
|
|
24848
24849
|
segment: n,
|
|
24849
24850
|
separator: "."
|
|
24850
24851
|
};
|
|
24851
24852
|
};
|
|
24852
24853
|
case "controlRef": return (e) => {
|
|
24853
|
-
let t =
|
|
24854
|
+
let t = E(e, "output");
|
|
24854
24855
|
if (!t) return null;
|
|
24855
|
-
let n = t, r =
|
|
24856
|
+
let n = t, r = E(e, "outputInst");
|
|
24856
24857
|
return r && r !== "1" && (n += `(${r})`), {
|
|
24857
24858
|
segment: n,
|
|
24858
24859
|
separator: "."
|
|
@@ -24860,15 +24861,15 @@ function se(e) {
|
|
|
24860
24861
|
};
|
|
24861
24862
|
}
|
|
24862
24863
|
}
|
|
24863
|
-
var
|
|
24864
|
-
function
|
|
24865
|
-
let t =
|
|
24864
|
+
var le = Object.fromEntries(Object.entries(ae).map(([e, t]) => [e, ce(t)]));
|
|
24865
|
+
function T(e) {
|
|
24866
|
+
let t = le[e.tagName];
|
|
24866
24867
|
return t ? t(e) : null;
|
|
24867
24868
|
}
|
|
24868
|
-
function
|
|
24869
|
+
function ue(e) {
|
|
24869
24870
|
let { record: t, ancestry: n } = e, r = [];
|
|
24870
24871
|
for (let e of n) {
|
|
24871
|
-
let t =
|
|
24872
|
+
let t = T(e);
|
|
24872
24873
|
t && r.push({
|
|
24873
24874
|
...t,
|
|
24874
24875
|
ref: {
|
|
@@ -24877,7 +24878,7 @@ function le(e) {
|
|
|
24877
24878
|
}
|
|
24878
24879
|
});
|
|
24879
24880
|
}
|
|
24880
|
-
let i =
|
|
24881
|
+
let i = T(t);
|
|
24881
24882
|
return i && r.push({
|
|
24882
24883
|
...i,
|
|
24883
24884
|
ref: {
|
|
@@ -24885,36 +24886,36 @@ function le(e) {
|
|
|
24885
24886
|
id: t.id
|
|
24886
24887
|
}
|
|
24887
24888
|
}), r.length === 0 ? null : {
|
|
24888
|
-
path:
|
|
24889
|
+
path: de(r),
|
|
24889
24890
|
segments: r
|
|
24890
24891
|
};
|
|
24891
24892
|
}
|
|
24892
|
-
function
|
|
24893
|
+
function E(e, t) {
|
|
24893
24894
|
return e.attributes.find((e) => e.name === t)?.value;
|
|
24894
24895
|
}
|
|
24895
|
-
function
|
|
24896
|
+
function de(e) {
|
|
24896
24897
|
let t = e[0].segment;
|
|
24897
24898
|
for (let n = 1; n < e.length; n++) t += e[n].separator + e[n].segment;
|
|
24898
24899
|
return t;
|
|
24899
24900
|
}
|
|
24900
24901
|
//#endregion
|
|
24901
24902
|
//#region src/v2019C1/extensions/reference/query/build/build-element-path.ts
|
|
24902
|
-
async function
|
|
24903
|
+
async function fe(e, t) {
|
|
24903
24904
|
let n = await e.getRecord(t);
|
|
24904
24905
|
if (!n) return null;
|
|
24905
24906
|
let r = i(n);
|
|
24906
|
-
if (!
|
|
24907
|
+
if (!T(r)) {
|
|
24907
24908
|
let e = r.attributes.find((e) => e.name === "uuid")?.value;
|
|
24908
24909
|
return console.warn(`[scl] buildElementPath: no path segment for <${r.tagName}>${e ? ` (uuid ${e})` : ""} — cannot build a path to this element; leaving any existing reference path untouched`), null;
|
|
24909
24910
|
}
|
|
24910
|
-
return
|
|
24911
|
+
return ue({
|
|
24911
24912
|
record: r,
|
|
24912
24913
|
ancestry: (await e.findAncestors(t, { order: "top-down" })).map(i)
|
|
24913
24914
|
});
|
|
24914
24915
|
}
|
|
24915
24916
|
//#endregion
|
|
24916
24917
|
//#region src/v2019C1/constants/reference-pairs.ts
|
|
24917
|
-
var
|
|
24918
|
+
var D = {
|
|
24918
24919
|
AllocationRoleRef: [{
|
|
24919
24920
|
attribute: {
|
|
24920
24921
|
path: "allocationRole",
|
|
@@ -25277,7 +25278,7 @@ var O = {
|
|
|
25277
25278
|
target: ["Variable"],
|
|
25278
25279
|
companions: []
|
|
25279
25280
|
}]
|
|
25280
|
-
},
|
|
25281
|
+
}, O = new Set([
|
|
25281
25282
|
"SourceRef",
|
|
25282
25283
|
"ControlRef",
|
|
25283
25284
|
"DOS",
|
|
@@ -25286,7 +25287,7 @@ var O = {
|
|
|
25286
25287
|
"InputVar",
|
|
25287
25288
|
"OutputVar",
|
|
25288
25289
|
"ProcessEcho"
|
|
25289
|
-
]),
|
|
25290
|
+
]), k = Object.keys(D), A = new Set(k), pe = new Set(Object.values(D).flatMap((e) => e.flatMap((e) => e.target)));
|
|
25290
25291
|
//#endregion
|
|
25291
25292
|
//#region src/v2019C1/extensions/reference/query/resolve/parse-path.ts
|
|
25292
25293
|
function me(e) {
|
|
@@ -25311,7 +25312,7 @@ function he(e) {
|
|
|
25311
25312
|
};
|
|
25312
25313
|
}
|
|
25313
25314
|
function ge(e, t, n, r) {
|
|
25314
|
-
return !e || e ===
|
|
25315
|
+
return !e || e === M.unsupported ? null : e === M.direct ? { lookupKey: n } : e === M.iedAddress ? ve(n, r) : e === M.lnode ? _e(n) : e === M.behaviorDescription ? ye(t, n, r) : null;
|
|
25315
25316
|
}
|
|
25316
25317
|
function _e(e) {
|
|
25317
25318
|
let { path: t, qualifier: n } = he(e);
|
|
@@ -25347,10 +25348,10 @@ function be(e) {
|
|
|
25347
25348
|
if (t === -1) return null;
|
|
25348
25349
|
let n = [];
|
|
25349
25350
|
for (let r = 0; r < t; r++) {
|
|
25350
|
-
let t =
|
|
25351
|
+
let t = T(e[r]);
|
|
25351
25352
|
t && n.push(t);
|
|
25352
25353
|
}
|
|
25353
|
-
return n.length === 0 ? null :
|
|
25354
|
+
return n.length === 0 ? null : de(n);
|
|
25354
25355
|
}
|
|
25355
25356
|
function xe(e) {
|
|
25356
25357
|
let t = e.indexOf("("), n = e.indexOf(".");
|
|
@@ -25362,28 +25363,28 @@ function Se(e) {
|
|
|
25362
25363
|
}
|
|
25363
25364
|
//#endregion
|
|
25364
25365
|
//#region src/v2019C1/extensions/reference/query/build/build-reference-path.ts
|
|
25365
|
-
async function
|
|
25366
|
+
async function j(e, t) {
|
|
25366
25367
|
let { reference: n, target: r } = t;
|
|
25367
|
-
if (
|
|
25368
|
-
let a =
|
|
25368
|
+
if (P.has(n.tagName)) return null;
|
|
25369
|
+
let a = Te(n.tagName, r.tagName);
|
|
25369
25370
|
if (!a) return null;
|
|
25370
25371
|
let o = a.resolution;
|
|
25371
|
-
if (o ===
|
|
25372
|
+
if (o === M.behaviorDescription) {
|
|
25372
25373
|
let t = await e.getRecord(r);
|
|
25373
|
-
return t ?
|
|
25374
|
+
return t ? T(i(t))?.segment ?? null : null;
|
|
25374
25375
|
}
|
|
25375
|
-
let s = await
|
|
25376
|
+
let s = await fe(e, r);
|
|
25376
25377
|
if (!s) return null;
|
|
25377
25378
|
let c = s.path;
|
|
25378
|
-
if (o ===
|
|
25379
|
+
if (o === M.lnode) {
|
|
25379
25380
|
let t = await e.getRecord(n);
|
|
25380
25381
|
if (!t) return c;
|
|
25381
|
-
let r =
|
|
25382
|
-
return r ? `${c}.${
|
|
25382
|
+
let r = we(t, a);
|
|
25383
|
+
return r ? `${c}.${Ce(t, a) ?? r}` : c;
|
|
25383
25384
|
}
|
|
25384
25385
|
return c;
|
|
25385
25386
|
}
|
|
25386
|
-
function
|
|
25387
|
+
function Ce(e, t) {
|
|
25387
25388
|
let [n, r] = t.companions;
|
|
25388
25389
|
if (!n) return;
|
|
25389
25390
|
let i = e.attributes.find((e) => e.name === n.name)?.value;
|
|
@@ -25391,23 +25392,23 @@ function we(e, t) {
|
|
|
25391
25392
|
let a = r ? e.attributes.find((e) => e.name === r.name)?.value : void 0;
|
|
25392
25393
|
return a ? `${i}.${a}` : i;
|
|
25393
25394
|
}
|
|
25394
|
-
function
|
|
25395
|
+
function we(e, t) {
|
|
25395
25396
|
let n = e.attributes.find((e) => e.name === t.attribute.path)?.value;
|
|
25396
25397
|
if (n) return he(n).qualifier;
|
|
25397
25398
|
}
|
|
25398
|
-
function
|
|
25399
|
-
let n =
|
|
25399
|
+
function Te(e, t) {
|
|
25400
|
+
let n = D[e];
|
|
25400
25401
|
return n ? n.find((e) => e.target.includes(t)) ?? null : null;
|
|
25401
25402
|
}
|
|
25402
25403
|
//#endregion
|
|
25403
25404
|
//#region src/v2019C1/extensions/reference/constants/resolution-types.ts
|
|
25404
|
-
var
|
|
25405
|
+
var M = {
|
|
25405
25406
|
direct: "direct",
|
|
25406
25407
|
lnode: "lnode",
|
|
25407
25408
|
iedAddress: "ied-address",
|
|
25408
25409
|
behaviorDescription: "behavior-description",
|
|
25409
25410
|
unsupported: "unsupported"
|
|
25410
|
-
},
|
|
25411
|
+
}, N = {
|
|
25411
25412
|
LN: [{
|
|
25412
25413
|
attribute: "lnType",
|
|
25413
25414
|
target: "LNodeType"
|
|
@@ -25461,7 +25462,7 @@ var j = {
|
|
|
25461
25462
|
};
|
|
25462
25463
|
//#endregion
|
|
25463
25464
|
//#region src/v2019C1/extensions/reference/constants/helpers.ts
|
|
25464
|
-
function
|
|
25465
|
+
function Ee(e) {
|
|
25465
25466
|
let t = {};
|
|
25466
25467
|
for (let [n, r] of Object.entries(e)) for (let e of r) {
|
|
25467
25468
|
let r = t[e.resolution] ??= /* @__PURE__ */ new Map();
|
|
@@ -25476,7 +25477,7 @@ function De(e) {
|
|
|
25476
25477
|
}
|
|
25477
25478
|
return t;
|
|
25478
25479
|
}
|
|
25479
|
-
function
|
|
25480
|
+
function De(e) {
|
|
25480
25481
|
let t = /* @__PURE__ */ new Map();
|
|
25481
25482
|
for (let [n, r] of Object.entries(e)) t.set(n, r.map((e) => ({
|
|
25482
25483
|
uuidAttr: e.attribute.uuid,
|
|
@@ -25486,7 +25487,7 @@ function Oe(e) {
|
|
|
25486
25487
|
})));
|
|
25487
25488
|
return t;
|
|
25488
25489
|
}
|
|
25489
|
-
function
|
|
25490
|
+
function Oe(e) {
|
|
25490
25491
|
let t = /* @__PURE__ */ new Map();
|
|
25491
25492
|
for (let [n, r] of Object.entries(e)) for (let e of r) {
|
|
25492
25493
|
let r = t.get(e.target) ?? [];
|
|
@@ -25500,15 +25501,15 @@ function ke(e) {
|
|
|
25500
25501
|
}
|
|
25501
25502
|
//#endregion
|
|
25502
25503
|
//#region src/v2019C1/extensions/reference/constants/derived.ts
|
|
25503
|
-
var
|
|
25504
|
-
|
|
25505
|
-
|
|
25506
|
-
|
|
25507
|
-
|
|
25508
|
-
],
|
|
25504
|
+
var ke = Ee(D), Ae = [
|
|
25505
|
+
M.direct,
|
|
25506
|
+
M.lnode,
|
|
25507
|
+
M.iedAddress,
|
|
25508
|
+
M.behaviorDescription
|
|
25509
|
+
], je = [...Ae, M.unsupported], Me = De(D), P = new Map(Object.entries(D).flatMap(([e, t]) => t.filter((e) => e.attribute.path === "mappedDoName" || e.attribute.path === "mappedDaName").map((t) => [e, {
|
|
25509
25510
|
path: t.attribute.path,
|
|
25510
25511
|
uuid: t.attribute.uuid
|
|
25511
|
-
}]))),
|
|
25512
|
+
}]))), Ne = [...new Set(Object.values(D).flatMap((e) => e.map((e) => e.attribute.uuid)))], F = new Map(Object.entries(N).map(([e, t]) => [e, [...new Set(t.map((e) => e.attribute))]])), Pe = Oe(N), Fe = new Set(Pe.keys()), Ie = new Set([..._.LNode?.attributes?.identityFields ?? [], ...F.get("LNode") ?? []]), Le = {
|
|
25512
25513
|
FunctionCatRef: ["SubCategory", "FunctionCategory"],
|
|
25513
25514
|
PowerSystemRelation: ["PowerSystemRelations"],
|
|
25514
25515
|
Resource: ["ProcessResource", "ProcessResources"],
|
|
@@ -25516,22 +25517,22 @@ var Ae = De(O), je = [
|
|
|
25516
25517
|
};
|
|
25517
25518
|
//#endregion
|
|
25518
25519
|
//#region src/v2019C1/extensions/reference/query/build/build-mapped-name.ts
|
|
25519
|
-
async function
|
|
25520
|
-
let n =
|
|
25520
|
+
async function Re(e, t) {
|
|
25521
|
+
let n = P.get(t.tagName);
|
|
25521
25522
|
if (!n) return;
|
|
25522
25523
|
let r = t.attributes.find((e) => e.name === "name")?.value;
|
|
25523
25524
|
if (!r) return;
|
|
25524
|
-
let i = t.attributes.find((e) => e.name === n.path)?.value, a =
|
|
25525
|
+
let i = t.attributes.find((e) => e.name === n.path)?.value, a = ze(i, t.tagName === "DAS" && !await Be(e, t)) ?? r;
|
|
25525
25526
|
return a === r ? void 0 : a;
|
|
25526
25527
|
}
|
|
25527
|
-
function
|
|
25528
|
+
function ze(e, t) {
|
|
25528
25529
|
if (!e) return;
|
|
25529
25530
|
let { path: n, qualifier: r } = he(e), i = r ?? n;
|
|
25530
25531
|
if (t) return i || void 0;
|
|
25531
25532
|
let a = i.split(".");
|
|
25532
25533
|
return a[a.length - 1] || void 0;
|
|
25533
25534
|
}
|
|
25534
|
-
async function
|
|
25535
|
+
async function Be(e, t) {
|
|
25535
25536
|
let n = (await e.findAncestors(t)).find((e) => e.tagName === "DOS" || e.tagName === "SDS");
|
|
25536
25537
|
return n ? !!await e.getAttribute({
|
|
25537
25538
|
tagName: n.tagName,
|
|
@@ -25540,32 +25541,32 @@ async function Ve(e, t) {
|
|
|
25540
25541
|
}
|
|
25541
25542
|
//#endregion
|
|
25542
25543
|
//#region src/v2019C1/extensions/reference/query/build/build-mapped-lnode-path.ts
|
|
25543
|
-
function
|
|
25544
|
+
function Ve(e) {
|
|
25544
25545
|
let t = e.iedName;
|
|
25545
|
-
if (!t || t ===
|
|
25546
|
+
if (!t || t === He) return null;
|
|
25546
25547
|
let n = e.ldInst, r = e.lnClass;
|
|
25547
25548
|
return !n || !r ? null : `${t}/${n}/${`${e.prefix ?? ""}${r}${e.lnInst ?? ""}`}`;
|
|
25548
25549
|
}
|
|
25549
|
-
var
|
|
25550
|
+
var He = "None";
|
|
25550
25551
|
//#endregion
|
|
25551
25552
|
//#region src/v2019C1/extensions/reference/query/resolve/resolve-reference-path.ts
|
|
25552
|
-
async function
|
|
25553
|
-
let r =
|
|
25553
|
+
async function Ue(e, t, n) {
|
|
25554
|
+
let r = We(t.tagName, n);
|
|
25554
25555
|
if (!r) return;
|
|
25555
25556
|
let a = t.attributes.find((e) => e.name === n)?.value;
|
|
25556
25557
|
if (!a) return;
|
|
25557
|
-
let o = await
|
|
25558
|
+
let o = await Ge(e, t, r);
|
|
25558
25559
|
if (o) return {
|
|
25559
25560
|
record: o,
|
|
25560
|
-
qualifier:
|
|
25561
|
+
qualifier: Ke(r, n, a)
|
|
25561
25562
|
};
|
|
25562
25563
|
let s;
|
|
25563
|
-
(r.resolution ===
|
|
25564
|
+
(r.resolution === M.behaviorDescription || r.resolution === M.iedAddress) && (s = (await e.findAncestors(t, { order: "top-down" })).map((e) => i(e)));
|
|
25564
25565
|
let c = ge(r.resolution, n, a, s);
|
|
25565
25566
|
if (!c) return;
|
|
25566
25567
|
let l = me(c.lookupKey);
|
|
25567
25568
|
if (l.length === 0) return;
|
|
25568
|
-
let u = l[l.length - 1], d = l.slice(0, -1), f = await
|
|
25569
|
+
let u = l[l.length - 1], d = l.slice(0, -1), f = await Xe({
|
|
25569
25570
|
query: e,
|
|
25570
25571
|
targets: r.target,
|
|
25571
25572
|
segment: u,
|
|
@@ -25576,11 +25577,11 @@ async function We(e, t, n) {
|
|
|
25576
25577
|
qualifier: c.qualifier
|
|
25577
25578
|
};
|
|
25578
25579
|
}
|
|
25579
|
-
function
|
|
25580
|
-
let n =
|
|
25580
|
+
function We(e, t) {
|
|
25581
|
+
let n = D[e];
|
|
25581
25582
|
if (n) return n.find((e) => e.attribute.path === t);
|
|
25582
25583
|
}
|
|
25583
|
-
async function
|
|
25584
|
+
async function Ge(e, t, n) {
|
|
25584
25585
|
let r = n.attribute.uuid, i = t.attributes.find((e) => e.name === r)?.value;
|
|
25585
25586
|
if (i) for (let t of n.target) {
|
|
25586
25587
|
let n = await e.findByAttributes({
|
|
@@ -25590,19 +25591,19 @@ async function Ke(e, t, n) {
|
|
|
25590
25591
|
if (n.length > 0) return n[0];
|
|
25591
25592
|
}
|
|
25592
25593
|
}
|
|
25593
|
-
function
|
|
25594
|
-
if (e.resolution ===
|
|
25595
|
-
if (e.resolution ===
|
|
25594
|
+
function Ke(e, t, n) {
|
|
25595
|
+
if (e.resolution === M.lnode) return he(n).qualifier;
|
|
25596
|
+
if (e.resolution === M.behaviorDescription && t === "dataName") return n;
|
|
25596
25597
|
}
|
|
25597
|
-
var
|
|
25598
|
+
var qe = new Set(_.LNode.attributes.details.lnClass.facets.enumeration), Je = {
|
|
25598
25599
|
LNode: "lnInst",
|
|
25599
25600
|
LN: "inst",
|
|
25600
25601
|
LN0: "inst"
|
|
25601
25602
|
};
|
|
25602
|
-
function
|
|
25603
|
+
function Ye(e) {
|
|
25603
25604
|
for (let t = 0; t <= e.length - 4; t++) {
|
|
25604
25605
|
let n = e.substring(t, t + 4);
|
|
25605
|
-
if (
|
|
25606
|
+
if (qe.has(n)) return {
|
|
25606
25607
|
prefix: e.substring(0, t),
|
|
25607
25608
|
lnClass: n,
|
|
25608
25609
|
inst: e.substring(t + 4)
|
|
@@ -25610,12 +25611,12 @@ function Xe(e) {
|
|
|
25610
25611
|
}
|
|
25611
25612
|
return null;
|
|
25612
25613
|
}
|
|
25613
|
-
async function
|
|
25614
|
+
async function Xe(e) {
|
|
25614
25615
|
let { query: t, targets: n, segment: r, expectedAncestry: i } = e;
|
|
25615
25616
|
for (let e of n) {
|
|
25616
|
-
let n =
|
|
25617
|
+
let n = Je[e];
|
|
25617
25618
|
if (n) {
|
|
25618
|
-
let a = await
|
|
25619
|
+
let a = await Ze({
|
|
25619
25620
|
query: t,
|
|
25620
25621
|
tagName: e,
|
|
25621
25622
|
segment: r,
|
|
@@ -25624,7 +25625,7 @@ async function Ze(e) {
|
|
|
25624
25625
|
});
|
|
25625
25626
|
if (a) return a;
|
|
25626
25627
|
} else {
|
|
25627
|
-
let n = await
|
|
25628
|
+
let n = await Qe({
|
|
25628
25629
|
query: t,
|
|
25629
25630
|
tagName: e,
|
|
25630
25631
|
segment: r,
|
|
@@ -25634,8 +25635,8 @@ async function Ze(e) {
|
|
|
25634
25635
|
}
|
|
25635
25636
|
}
|
|
25636
25637
|
}
|
|
25637
|
-
async function
|
|
25638
|
-
let { query: t, tagName: n, segment: r, instAttr: i, expectedAncestry: a } = e, o =
|
|
25638
|
+
async function Ze(e) {
|
|
25639
|
+
let { query: t, tagName: n, segment: r, instAttr: i, expectedAncestry: a } = e, o = Ye(r.segment);
|
|
25639
25640
|
if (!o) return;
|
|
25640
25641
|
let s = await t.findByAttributes({
|
|
25641
25642
|
tagName: n,
|
|
@@ -25643,37 +25644,37 @@ async function Qe(e) {
|
|
|
25643
25644
|
});
|
|
25644
25645
|
for (let e of s) {
|
|
25645
25646
|
let n = e.attributes.find((e) => e.name === "prefix")?.value ?? "", r = e.attributes.find((e) => e.name === i)?.value ?? "";
|
|
25646
|
-
if (!(n !== o.prefix || r !== o.inst) && await
|
|
25647
|
+
if (!(n !== o.prefix || r !== o.inst) && await $e(t, e, a)) return e;
|
|
25647
25648
|
}
|
|
25648
25649
|
}
|
|
25649
|
-
async function
|
|
25650
|
+
async function Qe(e) {
|
|
25650
25651
|
let { query: t, tagName: n, segment: r, expectedAncestry: a } = e, o = await t.getRecordsByTagName(n);
|
|
25651
25652
|
for (let e of o) {
|
|
25652
|
-
let n =
|
|
25653
|
-
if (!(!n || n.segment !== r.segment) && await
|
|
25653
|
+
let n = T(i(e));
|
|
25654
|
+
if (!(!n || n.segment !== r.segment) && await $e(t, e, a)) return e;
|
|
25654
25655
|
}
|
|
25655
25656
|
}
|
|
25656
|
-
async function
|
|
25657
|
+
async function $e(e, t, n) {
|
|
25657
25658
|
if (n.length === 0) return !0;
|
|
25658
25659
|
let r = await e.findAncestors(t), a = [];
|
|
25659
25660
|
for (let e = r.length - 1; e >= 0; e--) {
|
|
25660
|
-
let t =
|
|
25661
|
+
let t = T(i(r[e]));
|
|
25661
25662
|
t && a.push(t);
|
|
25662
25663
|
}
|
|
25663
25664
|
return a.length === n.length ? a.every((e, t) => e.segment === n[t].segment) : !1;
|
|
25664
25665
|
}
|
|
25665
25666
|
//#endregion
|
|
25666
25667
|
//#region src/v2019C1/extensions/reference/query/resolve/resolve-element-path.ts
|
|
25667
|
-
async function
|
|
25668
|
+
async function et(e, t) {
|
|
25668
25669
|
let n = me(t);
|
|
25669
|
-
if (n.length !== 0) return
|
|
25670
|
+
if (n.length !== 0) return tt({
|
|
25670
25671
|
query: e,
|
|
25671
25672
|
current: await e.getRoot(),
|
|
25672
25673
|
segments: n,
|
|
25673
25674
|
index: 0
|
|
25674
25675
|
});
|
|
25675
25676
|
}
|
|
25676
|
-
async function
|
|
25677
|
+
async function tt(e) {
|
|
25677
25678
|
let { query: t, current: n, segments: r, index: a } = e;
|
|
25678
25679
|
if (a >= r.length) return n;
|
|
25679
25680
|
let o = n.children ?? [];
|
|
@@ -25681,9 +25682,9 @@ async function nt(e) {
|
|
|
25681
25682
|
let s = await t.getRecords(o), c = r[a];
|
|
25682
25683
|
for (let e of s) {
|
|
25683
25684
|
if (!e) continue;
|
|
25684
|
-
let n =
|
|
25685
|
+
let n = T(i(e));
|
|
25685
25686
|
if (!n) {
|
|
25686
|
-
let n = await
|
|
25687
|
+
let n = await tt({
|
|
25687
25688
|
query: t,
|
|
25688
25689
|
current: e,
|
|
25689
25690
|
segments: r,
|
|
@@ -25693,7 +25694,7 @@ async function nt(e) {
|
|
|
25693
25694
|
continue;
|
|
25694
25695
|
}
|
|
25695
25696
|
if (n.segment === c.segment && n.separator === c.separator) {
|
|
25696
|
-
let n = await
|
|
25697
|
+
let n = await tt({
|
|
25697
25698
|
query: t,
|
|
25698
25699
|
current: e,
|
|
25699
25700
|
segments: r,
|
|
@@ -25706,14 +25707,14 @@ async function nt(e) {
|
|
|
25706
25707
|
}
|
|
25707
25708
|
//#endregion
|
|
25708
25709
|
//#region src/v2019C1/extensions/reference/query/resolve/resolve-mapped-lnode.ts
|
|
25709
|
-
var
|
|
25710
|
-
async function
|
|
25711
|
-
let n =
|
|
25710
|
+
var nt = new Set(["LN", "LN0"]);
|
|
25711
|
+
async function rt(e, t) {
|
|
25712
|
+
let n = Ve(it(t));
|
|
25712
25713
|
if (!n) return;
|
|
25713
|
-
let r = await
|
|
25714
|
-
if (!(!r || !
|
|
25714
|
+
let r = await et(e, n);
|
|
25715
|
+
if (!(!r || !nt.has(r.tagName))) return r;
|
|
25715
25716
|
}
|
|
25716
|
-
function
|
|
25717
|
+
function it(e) {
|
|
25717
25718
|
let t = (t) => e.attributes.find((e) => e.name === t)?.value;
|
|
25718
25719
|
return {
|
|
25719
25720
|
iedName: t("iedName"),
|
|
@@ -25725,19 +25726,19 @@ function at(e) {
|
|
|
25725
25726
|
}
|
|
25726
25727
|
//#endregion
|
|
25727
25728
|
//#region src/v2019C1/extensions/reference/guards.ts
|
|
25728
|
-
function
|
|
25729
|
-
return
|
|
25729
|
+
function at(e) {
|
|
25730
|
+
return Fe.has(e);
|
|
25730
25731
|
}
|
|
25731
25732
|
//#endregion
|
|
25732
25733
|
//#region src/v2019C1/extensions/reference/query/find/find-refs-pointing-to.ts
|
|
25733
|
-
async function
|
|
25734
|
+
async function I(e, t) {
|
|
25734
25735
|
let { target: n, containerTagName: r } = t, i = await e.getRecord(n);
|
|
25735
|
-
return i ?
|
|
25736
|
+
return i ? at(i.tagName) ? st(e, i, r) : ot(e, i, r) : [];
|
|
25736
25737
|
}
|
|
25737
|
-
async function
|
|
25738
|
+
async function ot(e, t, r) {
|
|
25738
25739
|
let i = t.attributes.find((e) => e.name === "uuid")?.value;
|
|
25739
25740
|
if (!i) return [];
|
|
25740
|
-
let a =
|
|
25741
|
+
let a = lt(t.tagName);
|
|
25741
25742
|
if (a.length === 0) return [];
|
|
25742
25743
|
let o = [];
|
|
25743
25744
|
for (let t of a) {
|
|
@@ -25747,7 +25748,7 @@ async function st(e, t, r) {
|
|
|
25747
25748
|
attributes: { [t.uuidAttr]: i }
|
|
25748
25749
|
});
|
|
25749
25750
|
for (let t of a) {
|
|
25750
|
-
let n = r ? await
|
|
25751
|
+
let n = r ? await ut(e, t, r) : void 0;
|
|
25751
25752
|
o.push({
|
|
25752
25753
|
ref: t,
|
|
25753
25754
|
container: n
|
|
@@ -25756,10 +25757,10 @@ async function st(e, t, r) {
|
|
|
25756
25757
|
}
|
|
25757
25758
|
return o;
|
|
25758
25759
|
}
|
|
25759
|
-
async function
|
|
25760
|
+
async function st(e, t, r) {
|
|
25760
25761
|
let i = t.attributes.find((e) => e.name === "id")?.value;
|
|
25761
25762
|
if (!i) return [];
|
|
25762
|
-
let a =
|
|
25763
|
+
let a = Pe.get(t.tagName) ?? [], o = [];
|
|
25763
25764
|
for (let t of a) {
|
|
25764
25765
|
if (!n(t.refTagName, x)) continue;
|
|
25765
25766
|
let a = await e.findByAttributes({
|
|
@@ -25767,8 +25768,8 @@ async function ct(e, t, r) {
|
|
|
25767
25768
|
attributes: { [t.attribute]: i }
|
|
25768
25769
|
});
|
|
25769
25770
|
for (let n of a) {
|
|
25770
|
-
if (!
|
|
25771
|
-
let i = r ? await
|
|
25771
|
+
if (!ct(n, t)) continue;
|
|
25772
|
+
let i = r ? await ut(e, n, r) : void 0;
|
|
25772
25773
|
o.push({
|
|
25773
25774
|
ref: n,
|
|
25774
25775
|
container: i
|
|
@@ -25777,23 +25778,23 @@ async function ct(e, t, r) {
|
|
|
25777
25778
|
}
|
|
25778
25779
|
return o;
|
|
25779
25780
|
}
|
|
25780
|
-
function
|
|
25781
|
+
function ct(e, t) {
|
|
25781
25782
|
return t.when ? e.attributes.find((e) => e.name === t.when.attribute)?.value === t.when.equals : !0;
|
|
25782
25783
|
}
|
|
25783
|
-
function
|
|
25784
|
+
function lt(e) {
|
|
25784
25785
|
let t = [];
|
|
25785
|
-
for (let n of
|
|
25786
|
-
let r =
|
|
25786
|
+
for (let n of je) {
|
|
25787
|
+
let r = ke[n]?.get(e);
|
|
25787
25788
|
r && t.push(...r);
|
|
25788
25789
|
}
|
|
25789
25790
|
return t;
|
|
25790
25791
|
}
|
|
25791
|
-
async function
|
|
25792
|
+
async function ut(e, t, n) {
|
|
25792
25793
|
return (await e.findAncestors(t, { stopAtTagName: n })).find((e) => e.tagName === n);
|
|
25793
25794
|
}
|
|
25794
25795
|
//#endregion
|
|
25795
25796
|
//#region src/v2019C1/extensions/reference/query/provenance/get-provenance.constants.ts
|
|
25796
|
-
var
|
|
25797
|
+
var dt = {
|
|
25797
25798
|
Application: "application",
|
|
25798
25799
|
Function: "function",
|
|
25799
25800
|
SubFunction: "function",
|
|
@@ -25804,10 +25805,10 @@ var ft = {
|
|
|
25804
25805
|
};
|
|
25805
25806
|
//#endregion
|
|
25806
25807
|
//#region src/v2019C1/extensions/reference/query/provenance/get-provenance.ts
|
|
25807
|
-
async function
|
|
25808
|
+
async function ft(e) {
|
|
25808
25809
|
let t = await e.getRecordsByTagName("SclFileReference"), n = [];
|
|
25809
25810
|
for (let r of t) {
|
|
25810
|
-
let t = await
|
|
25811
|
+
let t = await pt(e, r);
|
|
25811
25812
|
if (!t) continue;
|
|
25812
25813
|
let { fileType: i, fileUuid: a, fileName: o, version: s, revision: c } = await e.getAttributes(r);
|
|
25813
25814
|
n.push({
|
|
@@ -25821,17 +25822,17 @@ async function pt(e) {
|
|
|
25821
25822
|
}
|
|
25822
25823
|
return n;
|
|
25823
25824
|
}
|
|
25824
|
-
async function
|
|
25825
|
+
async function pt(e, t) {
|
|
25825
25826
|
let n = await e.findAncestors(t);
|
|
25826
25827
|
for (let e of n) {
|
|
25827
|
-
let t =
|
|
25828
|
+
let t = dt[e.tagName];
|
|
25828
25829
|
if (t) return {
|
|
25829
25830
|
kind: t,
|
|
25830
|
-
ref:
|
|
25831
|
+
ref: mt(e.tagName, e.id)
|
|
25831
25832
|
};
|
|
25832
25833
|
}
|
|
25833
25834
|
}
|
|
25834
|
-
function
|
|
25835
|
+
function mt(e, t) {
|
|
25835
25836
|
return {
|
|
25836
25837
|
tagName: e,
|
|
25837
25838
|
id: t
|
|
@@ -25839,23 +25840,23 @@ function ht(e, t) {
|
|
|
25839
25840
|
}
|
|
25840
25841
|
//#endregion
|
|
25841
25842
|
//#region src/v2019C1/extensions/reference/query/index.ts
|
|
25842
|
-
var
|
|
25843
|
-
buildElementPath: () =>
|
|
25844
|
-
buildMappedLNodePath: () =>
|
|
25845
|
-
buildMappedName: () =>
|
|
25846
|
-
buildReferencePath: () =>
|
|
25847
|
-
findRefsPointingTo: () =>
|
|
25848
|
-
getProvenance: () =>
|
|
25849
|
-
resolveElementPath: () =>
|
|
25850
|
-
resolveMappedLNode: () =>
|
|
25851
|
-
resolveReferencePath: () =>
|
|
25843
|
+
var ht = /* @__PURE__ */ l({
|
|
25844
|
+
buildElementPath: () => fe,
|
|
25845
|
+
buildMappedLNodePath: () => Ve,
|
|
25846
|
+
buildMappedName: () => Re,
|
|
25847
|
+
buildReferencePath: () => j,
|
|
25848
|
+
findRefsPointingTo: () => I,
|
|
25849
|
+
getProvenance: () => ft,
|
|
25850
|
+
resolveElementPath: () => et,
|
|
25851
|
+
resolveMappedLNode: () => rt,
|
|
25852
|
+
resolveReferencePath: () => Ue
|
|
25852
25853
|
});
|
|
25853
25854
|
//#endregion
|
|
25854
25855
|
//#region src/v2019C1/extensions/reference/transaction/apply-type-id-remap.ts
|
|
25855
|
-
async function
|
|
25856
|
+
async function L(e, t) {
|
|
25856
25857
|
let { records: n, idRemap: r } = t;
|
|
25857
25858
|
if (r.size !== 0) for (let t of n) {
|
|
25858
|
-
let n =
|
|
25859
|
+
let n = F.get(t.tagName);
|
|
25859
25860
|
if (!n) continue;
|
|
25860
25861
|
let i = await e.getRecord(t);
|
|
25861
25862
|
if (!i) continue;
|
|
@@ -25870,13 +25871,56 @@ async function I(e, t) {
|
|
|
25870
25871
|
}
|
|
25871
25872
|
}
|
|
25872
25873
|
//#endregion
|
|
25874
|
+
//#region src/v2019C1/extensions/reference/transaction/apply-uuid-remap.ts
|
|
25875
|
+
async function R(e, t) {
|
|
25876
|
+
let { mappings: n } = t;
|
|
25877
|
+
if (n.length === 0) return;
|
|
25878
|
+
let r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
|
|
25879
|
+
for (let { source: t, target: a } of n) {
|
|
25880
|
+
let n = t.attributes.find((e) => e.name === "uuid")?.value;
|
|
25881
|
+
if (!n) continue;
|
|
25882
|
+
let o = await e.getRecord(a), s = o?.attributes.find((e) => e.name === "uuid")?.value;
|
|
25883
|
+
s && (r.set(n, s), i.set(s, {
|
|
25884
|
+
tagName: o.tagName,
|
|
25885
|
+
id: o.id
|
|
25886
|
+
}));
|
|
25887
|
+
}
|
|
25888
|
+
if (r.size !== 0) for (let { target: t } of n) {
|
|
25889
|
+
if (!(t.tagName in D)) continue;
|
|
25890
|
+
let n = await e.getRecord(t);
|
|
25891
|
+
if (!n) continue;
|
|
25892
|
+
let a = D[t.tagName], o = {};
|
|
25893
|
+
for (let s of a) {
|
|
25894
|
+
let a = n.attributes.find((e) => e.name === s.attribute.uuid)?.value;
|
|
25895
|
+
if (!a) continue;
|
|
25896
|
+
let c = r.get(a);
|
|
25897
|
+
if (!c || c === a) continue;
|
|
25898
|
+
o[s.attribute.uuid] = c;
|
|
25899
|
+
let l = i.get(c);
|
|
25900
|
+
if (!l) continue;
|
|
25901
|
+
let u = await j(e, {
|
|
25902
|
+
reference: {
|
|
25903
|
+
tagName: t.tagName,
|
|
25904
|
+
id: n.id
|
|
25905
|
+
},
|
|
25906
|
+
target: {
|
|
25907
|
+
tagName: l.tagName,
|
|
25908
|
+
id: l.id
|
|
25909
|
+
}
|
|
25910
|
+
}), d = n.attributes.find((e) => e.name === s.attribute.path)?.value;
|
|
25911
|
+
u && u !== d && (o[s.attribute.path] = u);
|
|
25912
|
+
}
|
|
25913
|
+
Object.keys(o).length > 0 && await e.update(n, { attributes: o });
|
|
25914
|
+
}
|
|
25915
|
+
}
|
|
25916
|
+
//#endregion
|
|
25873
25917
|
//#region src/v2019C1/extensions/reference/transaction/write-provenance.ts
|
|
25874
|
-
var
|
|
25918
|
+
var gt = {
|
|
25875
25919
|
FSD: "FunctionSclRef",
|
|
25876
25920
|
ASD: "ApplicationSclRef"
|
|
25877
25921
|
};
|
|
25878
|
-
async function
|
|
25879
|
-
let { sourceQuery: n, targetRoot: r, fileType: i } = t, [a] = await n.getRecordsByTagName("Header"), o = a ? await n.getAttributes(a) : void 0, s = await e.addChild(r, { tagName:
|
|
25922
|
+
async function _t(e, t) {
|
|
25923
|
+
let { sourceQuery: n, targetRoot: r, fileType: i } = t, [a] = await n.getRecordsByTagName("Header"), o = a ? await n.getAttributes(a) : void 0, s = await e.addChild(r, { tagName: gt[i] }), { name: c } = await n.getDocumentInfo();
|
|
25880
25924
|
await e.addChild(s, {
|
|
25881
25925
|
tagName: "SclFileReference",
|
|
25882
25926
|
attributes: {
|
|
@@ -25890,17 +25934,18 @@ async function vt(e, t) {
|
|
|
25890
25934
|
}
|
|
25891
25935
|
//#endregion
|
|
25892
25936
|
//#region src/v2019C1/extensions/reference/index.ts
|
|
25893
|
-
var
|
|
25894
|
-
query:
|
|
25937
|
+
var z = {
|
|
25938
|
+
query: ht,
|
|
25895
25939
|
transaction: /* @__PURE__ */ l({
|
|
25896
|
-
applyTypeIdRemap: () =>
|
|
25897
|
-
|
|
25940
|
+
applyTypeIdRemap: () => L,
|
|
25941
|
+
applyUuidRemap: () => R,
|
|
25942
|
+
writeProvenance: () => _t
|
|
25898
25943
|
})
|
|
25899
25944
|
};
|
|
25900
25945
|
//#endregion
|
|
25901
25946
|
//#region src/v2019C1/extensions/clean-up/transaction/prune-empty-containers.ts
|
|
25902
|
-
async function
|
|
25903
|
-
let t = [...Object.values(
|
|
25947
|
+
async function vt(e) {
|
|
25948
|
+
let t = [...Object.values(Le).flat(), "Private"];
|
|
25904
25949
|
for (let n of t) {
|
|
25905
25950
|
let t = await e.getRecordsByTagName(n);
|
|
25906
25951
|
for (let n of t) n.children.length === 0 && await e.delete(n);
|
|
@@ -25908,26 +25953,26 @@ async function yt(e) {
|
|
|
25908
25953
|
}
|
|
25909
25954
|
//#endregion
|
|
25910
25955
|
//#region src/v2019C1/extensions/clean-up/transaction/orphan-uuid-refs.ts
|
|
25911
|
-
async function
|
|
25912
|
-
for (let t of
|
|
25913
|
-
let n =
|
|
25956
|
+
async function yt(e) {
|
|
25957
|
+
for (let t of k) {
|
|
25958
|
+
let n = D[t], r = await e.getRecordsByTagName(t);
|
|
25914
25959
|
for (let i of r) {
|
|
25915
25960
|
let r = !1, a = !1, o = {};
|
|
25916
25961
|
for (let t of n) {
|
|
25917
25962
|
let n = await e.getAttribute(i, { name: t.attribute.uuid });
|
|
25918
|
-
if (n) if (r = !0, await
|
|
25963
|
+
if (n) if (r = !0, await bt(e, n, t.target)) a = !0;
|
|
25919
25964
|
else {
|
|
25920
25965
|
o[t.attribute.uuid] = void 0, o[t.attribute.path] = void 0;
|
|
25921
25966
|
for (let e of t.companions) o[e.name] = void 0;
|
|
25922
25967
|
}
|
|
25923
25968
|
}
|
|
25924
25969
|
Object.keys(o).length > 0 && await e.update(i, { attributes: o });
|
|
25925
|
-
let s =
|
|
25970
|
+
let s = O.has(t);
|
|
25926
25971
|
r && !a && !s && await e.delete(i);
|
|
25927
25972
|
}
|
|
25928
25973
|
}
|
|
25929
25974
|
}
|
|
25930
|
-
async function
|
|
25975
|
+
async function bt(e, t, n) {
|
|
25931
25976
|
for (let r of n) {
|
|
25932
25977
|
let [n] = await e.findByAttributes({
|
|
25933
25978
|
tagName: r,
|
|
@@ -25939,10 +25984,10 @@ async function xt(e, t, n) {
|
|
|
25939
25984
|
}
|
|
25940
25985
|
//#endregion
|
|
25941
25986
|
//#region src/v2019C1/extensions/clean-up/index.ts
|
|
25942
|
-
var
|
|
25943
|
-
orphanUuidRefs: () =>
|
|
25944
|
-
pruneEmptyContainers: () =>
|
|
25945
|
-
resetLNode: () =>
|
|
25987
|
+
var xt = { transaction: /* @__PURE__ */ l({
|
|
25988
|
+
orphanUuidRefs: () => yt,
|
|
25989
|
+
pruneEmptyContainers: () => vt,
|
|
25990
|
+
resetLNode: () => re
|
|
25946
25991
|
}) }, St = ["id", "uuid"];
|
|
25947
25992
|
//#endregion
|
|
25948
25993
|
//#region src/v2019C1/extensions/signature/query/element-signature.ts
|
|
@@ -25951,7 +25996,7 @@ async function Ct(e, t) {
|
|
|
25951
25996
|
query: e,
|
|
25952
25997
|
resolveReferences: t.resolveReferences ?? !1,
|
|
25953
25998
|
ignore: new Set(t.ignoreAttributes ?? St),
|
|
25954
|
-
|
|
25999
|
+
signatureCache: t.signatureCache ?? /* @__PURE__ */ new Map(),
|
|
25955
26000
|
seen: /* @__PURE__ */ new Set()
|
|
25956
26001
|
};
|
|
25957
26002
|
return Et(t.ref, n);
|
|
@@ -25961,12 +26006,12 @@ function Tt(e, t) {
|
|
|
25961
26006
|
return _[e]?.attributes?.details?.[t]?.default;
|
|
25962
26007
|
}
|
|
25963
26008
|
async function Et(e, t) {
|
|
25964
|
-
let n = `${e.tagName}:${e.id}`, r = t.
|
|
26009
|
+
let n = `${e.tagName}:${e.id}`, r = t.signatureCache.get(n);
|
|
25965
26010
|
if (r !== void 0) return r;
|
|
25966
26011
|
if (t.seen.has(n)) return `@cycle:${e.tagName}`;
|
|
25967
26012
|
t.seen.add(n);
|
|
25968
26013
|
let i = await t.query.getTree(e), a = i ? await Dt(i, t) : "";
|
|
25969
|
-
return t.seen.delete(n), t.
|
|
26014
|
+
return t.seen.delete(n), t.signatureCache.set(n, a), a;
|
|
25970
26015
|
}
|
|
25971
26016
|
async function Dt(e, t) {
|
|
25972
26017
|
let n = t.resolveReferences ? Mt(e.tagName) : wt, r = [];
|
|
@@ -26000,16 +26045,16 @@ async function Ot(e, t, n, r) {
|
|
|
26000
26045
|
return null;
|
|
26001
26046
|
}
|
|
26002
26047
|
function kt(e, t) {
|
|
26003
|
-
return
|
|
26048
|
+
return N[e.tagName]?.find((n) => n.attribute === t && At(e, n));
|
|
26004
26049
|
}
|
|
26005
26050
|
function At(e, t) {
|
|
26006
26051
|
return t.when ? e.attributes.find((e) => e.name === t.when.attribute)?.value === t.when.equals : !0;
|
|
26007
26052
|
}
|
|
26008
26053
|
function jt(e, t) {
|
|
26009
|
-
return
|
|
26054
|
+
return D[e]?.find((e) => e.attribute.uuid === t);
|
|
26010
26055
|
}
|
|
26011
26056
|
function Mt(e) {
|
|
26012
|
-
let t =
|
|
26057
|
+
let t = D[e];
|
|
26013
26058
|
return t ? new Set(t.map((e) => e.attribute.path)) : wt;
|
|
26014
26059
|
}
|
|
26015
26060
|
async function Nt(e, t, n) {
|
|
@@ -26049,7 +26094,7 @@ async function It(e, t) {
|
|
|
26049
26094
|
preserved: 0,
|
|
26050
26095
|
forked: 0,
|
|
26051
26096
|
reclaimed: 0
|
|
26052
|
-
};
|
|
26097
|
+
}, m = /* @__PURE__ */ new Map();
|
|
26053
26098
|
for (let t of s) {
|
|
26054
26099
|
let r = await n.getAttribute(t, { name: "id" });
|
|
26055
26100
|
if (!r) continue;
|
|
@@ -26058,7 +26103,8 @@ async function It(e, t) {
|
|
|
26058
26103
|
tagName: t.tagName,
|
|
26059
26104
|
id: t.id
|
|
26060
26105
|
},
|
|
26061
|
-
resolveReferences: !0
|
|
26106
|
+
resolveReferences: !0,
|
|
26107
|
+
signatureCache: m
|
|
26062
26108
|
}), s = l.get(i);
|
|
26063
26109
|
if (s !== void 0) {
|
|
26064
26110
|
let n = o === "source" ? await Bt(e, {
|
|
@@ -26069,34 +26115,34 @@ async function It(e, t) {
|
|
|
26069
26115
|
u.set(r, n), n !== s && l.set(i, n), p.reused++;
|
|
26070
26116
|
continue;
|
|
26071
26117
|
}
|
|
26072
|
-
let
|
|
26073
|
-
if (!
|
|
26074
|
-
let [
|
|
26118
|
+
let h = await n.getTree(t);
|
|
26119
|
+
if (!h) continue;
|
|
26120
|
+
let [g] = await e.findByAttributes({
|
|
26075
26121
|
tagName: t.tagName,
|
|
26076
26122
|
attributes: { id: r }
|
|
26077
|
-
}),
|
|
26078
|
-
|
|
26079
|
-
let
|
|
26080
|
-
u.set(r,
|
|
26123
|
+
}), _ = r, v = h;
|
|
26124
|
+
g ? (_ = await qt(e, t.tagName, `${a}${r}_${Jt(i)}`), v = Vt(h, _), p.forked++) : p.preserved++;
|
|
26125
|
+
let y = await e.deepClone(c, v);
|
|
26126
|
+
u.set(r, _), y?.record && (d.push(B(y.record.tagName, y.record.id)), g && f.push({
|
|
26081
26127
|
oldId: r,
|
|
26082
|
-
oldRef:
|
|
26083
|
-
forkRef:
|
|
26084
|
-
forkedId:
|
|
26128
|
+
oldRef: B(g.tagName, g.id),
|
|
26129
|
+
forkRef: B(y.record.tagName, y.record.id),
|
|
26130
|
+
forkedId: _
|
|
26085
26131
|
}));
|
|
26086
26132
|
}
|
|
26087
|
-
let
|
|
26088
|
-
for (let t of i) t.target.tagName === "LNode" && await
|
|
26133
|
+
let h = [];
|
|
26134
|
+
for (let t of i) t.target.tagName === "LNode" && await te(e, t.target) || h.push(t.target);
|
|
26089
26135
|
for (let t of d) {
|
|
26090
26136
|
let n = await e.getTree(t);
|
|
26091
|
-
n && Ht(n,
|
|
26137
|
+
n && Ht(n, h);
|
|
26092
26138
|
}
|
|
26093
|
-
return await
|
|
26094
|
-
records:
|
|
26139
|
+
return await L(e, {
|
|
26140
|
+
records: h,
|
|
26095
26141
|
idRemap: u
|
|
26096
26142
|
}), f.length > 0 && await Ut(e, {
|
|
26097
26143
|
collisions: f,
|
|
26098
26144
|
idRemap: u,
|
|
26099
|
-
referrerRecords:
|
|
26145
|
+
referrerRecords: h,
|
|
26100
26146
|
stats: p
|
|
26101
26147
|
}), {
|
|
26102
26148
|
idRemap: u,
|
|
@@ -26118,20 +26164,21 @@ var Rt = [
|
|
|
26118
26164
|
"LNodeType"
|
|
26119
26165
|
];
|
|
26120
26166
|
async function zt(e) {
|
|
26121
|
-
let t = /* @__PURE__ */ new Map();
|
|
26122
|
-
for (let
|
|
26123
|
-
let
|
|
26124
|
-
for (let
|
|
26125
|
-
let
|
|
26126
|
-
if (!
|
|
26127
|
-
let
|
|
26167
|
+
let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
|
|
26168
|
+
for (let r of Rt) {
|
|
26169
|
+
let i = await e.getRecordsByTagName(r);
|
|
26170
|
+
for (let a of i) {
|
|
26171
|
+
let i = a.attributes.find((e) => e.name === "id")?.value;
|
|
26172
|
+
if (!i) continue;
|
|
26173
|
+
let o = await Ct(e, {
|
|
26128
26174
|
ref: {
|
|
26129
|
-
tagName:
|
|
26130
|
-
id:
|
|
26175
|
+
tagName: r,
|
|
26176
|
+
id: a.id
|
|
26131
26177
|
},
|
|
26132
|
-
resolveReferences: !0
|
|
26178
|
+
resolveReferences: !0,
|
|
26179
|
+
signatureCache: n
|
|
26133
26180
|
});
|
|
26134
|
-
t.has(
|
|
26181
|
+
t.has(o) || t.set(o, i);
|
|
26135
26182
|
}
|
|
26136
26183
|
}
|
|
26137
26184
|
return t;
|
|
@@ -26149,9 +26196,9 @@ async function Bt(e, t) {
|
|
|
26149
26196
|
attributes: { id: i }
|
|
26150
26197
|
});
|
|
26151
26198
|
if (o && o.id !== a.id) return r;
|
|
26152
|
-
let s =
|
|
26153
|
-
return await e.update(s, { attributes: { id: i } }), await
|
|
26154
|
-
records: c.map((e) =>
|
|
26199
|
+
let s = B(a.tagName, a.id), c = await I(e, { target: s });
|
|
26200
|
+
return await e.update(s, { attributes: { id: i } }), await L(e, {
|
|
26201
|
+
records: c.map((e) => B(e.ref.tagName, e.ref.id)),
|
|
26155
26202
|
idRemap: new Map([[r, i]])
|
|
26156
26203
|
}), i;
|
|
26157
26204
|
}
|
|
@@ -26162,17 +26209,17 @@ function Vt(e, t) {
|
|
|
26162
26209
|
value: t
|
|
26163
26210
|
}), n;
|
|
26164
26211
|
}
|
|
26165
|
-
function
|
|
26212
|
+
function B(e, t) {
|
|
26166
26213
|
return {
|
|
26167
26214
|
tagName: e,
|
|
26168
26215
|
id: t
|
|
26169
26216
|
};
|
|
26170
26217
|
}
|
|
26171
26218
|
function Ht(e, t) {
|
|
26172
|
-
t.push(
|
|
26219
|
+
t.push(B(e.tagName, e.id));
|
|
26173
26220
|
for (let n of e.tree ?? []) Ht(n, t);
|
|
26174
26221
|
}
|
|
26175
|
-
var
|
|
26222
|
+
var V = (e) => `${e.tagName}#${e.id}`;
|
|
26176
26223
|
async function Ut(e, t) {
|
|
26177
26224
|
let { collisions: n, idRemap: r, referrerRecords: i, stats: a } = t, o = await Wt(e, n), s = /* @__PURE__ */ new Map(), c = [];
|
|
26178
26225
|
for (let t of n) if (o.has(t.oldId)) {
|
|
@@ -26185,24 +26232,24 @@ async function Ut(e, t) {
|
|
|
26185
26232
|
let n = await e.getTree(t);
|
|
26186
26233
|
n && Ht(n, l);
|
|
26187
26234
|
}
|
|
26188
|
-
await
|
|
26235
|
+
await L(e, {
|
|
26189
26236
|
records: l,
|
|
26190
26237
|
idRemap: s
|
|
26191
26238
|
});
|
|
26192
26239
|
}
|
|
26193
26240
|
async function Wt(e, t) {
|
|
26194
|
-
let n = /* @__PURE__ */ new Set(), r = new Map(t.map((e) => [
|
|
26241
|
+
let n = /* @__PURE__ */ new Set(), r = new Map(t.map((e) => [V(e.oldRef), e.oldId])), i = t.map((e) => e.oldRef), a = new Set(i.map(V)), o = /* @__PURE__ */ new Set(), s = !0;
|
|
26195
26242
|
for (; s;) {
|
|
26196
26243
|
s = !1;
|
|
26197
26244
|
for (let t of i) {
|
|
26198
|
-
let c =
|
|
26199
|
-
if (o.has(c) || (await
|
|
26245
|
+
let c = V(t);
|
|
26246
|
+
if (o.has(c) || (await I(e, { target: t })).length > 0) continue;
|
|
26200
26247
|
let l = await e.getTree(t), u = l ? await Gt(e, l) : [];
|
|
26201
26248
|
await e.delete(t), o.add(c), s = !0;
|
|
26202
26249
|
let d = r.get(c);
|
|
26203
26250
|
d !== void 0 && n.add(d);
|
|
26204
26251
|
for (let e of u) {
|
|
26205
|
-
let t =
|
|
26252
|
+
let t = V(e);
|
|
26206
26253
|
a.has(t) || (i.push(e), a.add(t));
|
|
26207
26254
|
}
|
|
26208
26255
|
}
|
|
@@ -26212,7 +26259,7 @@ async function Wt(e, t) {
|
|
|
26212
26259
|
async function Gt(e, t) {
|
|
26213
26260
|
let n = [], r = /* @__PURE__ */ new Set();
|
|
26214
26261
|
async function i(t) {
|
|
26215
|
-
let a =
|
|
26262
|
+
let a = N[t.tagName];
|
|
26216
26263
|
for (let i of a ?? []) {
|
|
26217
26264
|
if (!Kt(t, i)) continue;
|
|
26218
26265
|
let a = t.attributes.find((e) => e.name === i.attribute)?.value;
|
|
@@ -26222,7 +26269,7 @@ async function Gt(e, t) {
|
|
|
26222
26269
|
attributes: { id: a }
|
|
26223
26270
|
});
|
|
26224
26271
|
if (!o) continue;
|
|
26225
|
-
let s =
|
|
26272
|
+
let s = B(i.target, o.id), c = V(s);
|
|
26226
26273
|
r.has(c) || (r.add(c), n.push(s));
|
|
26227
26274
|
}
|
|
26228
26275
|
for (let e of t.tree ?? []) await i(e);
|
|
@@ -26248,7 +26295,7 @@ function Jt(e) {
|
|
|
26248
26295
|
//#endregion
|
|
26249
26296
|
//#region src/v2019C1/extensions/data-model/index.ts
|
|
26250
26297
|
var Yt = {
|
|
26251
|
-
query:
|
|
26298
|
+
query: ne,
|
|
26252
26299
|
transaction: /* @__PURE__ */ l({ importTypes: () => It })
|
|
26253
26300
|
};
|
|
26254
26301
|
//#endregion
|
|
@@ -26322,7 +26369,7 @@ var en = {
|
|
|
26322
26369
|
};
|
|
26323
26370
|
//#endregion
|
|
26324
26371
|
//#region src/v2019C1/extensions/identity/transaction/write-identity.ts
|
|
26325
|
-
async function
|
|
26372
|
+
async function H(e, t) {
|
|
26326
26373
|
let { mappings: n, mode: r } = t;
|
|
26327
26374
|
if (r !== "keep") for (let t of n) {
|
|
26328
26375
|
let n = r === "strip" ? tn() : nn(t);
|
|
@@ -26351,153 +26398,267 @@ function an(e, t) {
|
|
|
26351
26398
|
return e.find((e) => e.name === t)?.value;
|
|
26352
26399
|
}
|
|
26353
26400
|
//#endregion
|
|
26401
|
+
//#region src/v2019C1/extensions/identity/transaction/restore-cloned-uuids.ts
|
|
26402
|
+
async function on(e, t) {
|
|
26403
|
+
let { mappings: n } = t, r = /* @__PURE__ */ new Map(), i = [];
|
|
26404
|
+
for (let t of n) {
|
|
26405
|
+
let n = sn(t.source.attributes, "uuid");
|
|
26406
|
+
if (!n) continue;
|
|
26407
|
+
let a = await e.getRecord(t.target), o = a ? a.attributes.find((e) => e.name === "uuid")?.value : void 0;
|
|
26408
|
+
!o || o === n || (r.set(o, n), i.push({
|
|
26409
|
+
ref: t.target,
|
|
26410
|
+
sourceUuid: n
|
|
26411
|
+
}));
|
|
26412
|
+
}
|
|
26413
|
+
if (r.size !== 0) {
|
|
26414
|
+
for (let { ref: t, sourceUuid: n } of i) await e.update(t, { attributes: { uuid: n } });
|
|
26415
|
+
for (let t of n) {
|
|
26416
|
+
let n = D[t.target.tagName];
|
|
26417
|
+
if (!n) continue;
|
|
26418
|
+
let i = await e.getRecord(t.target);
|
|
26419
|
+
if (!i) continue;
|
|
26420
|
+
let a = {};
|
|
26421
|
+
for (let e of n) {
|
|
26422
|
+
let t = i.attributes.find((t) => t.name === e.attribute.uuid)?.value, n = t ? r.get(t) : void 0;
|
|
26423
|
+
n && (a[e.attribute.uuid] = n);
|
|
26424
|
+
}
|
|
26425
|
+
Object.keys(a).length > 0 && await e.update(t.target, { attributes: a });
|
|
26426
|
+
}
|
|
26427
|
+
}
|
|
26428
|
+
}
|
|
26429
|
+
function sn(e, t) {
|
|
26430
|
+
return e.find((e) => e.name === t)?.value;
|
|
26431
|
+
}
|
|
26432
|
+
//#endregion
|
|
26354
26433
|
//#region src/v2019C1/extensions/identity/index.ts
|
|
26355
|
-
var
|
|
26434
|
+
var cn = { transaction: /* @__PURE__ */ l({
|
|
26435
|
+
restoreClonedUuids: () => on,
|
|
26436
|
+
writeIdentity: () => H
|
|
26437
|
+
}) };
|
|
26356
26438
|
//#endregion
|
|
26357
26439
|
//#region src/v2019C1/extensions/lifecycle/engine/group.ts
|
|
26358
|
-
function
|
|
26440
|
+
function ln(e, t) {
|
|
26359
26441
|
let n = [];
|
|
26360
|
-
return
|
|
26442
|
+
return un({
|
|
26361
26443
|
node: e,
|
|
26362
|
-
|
|
26444
|
+
scopePrefix: t,
|
|
26363
26445
|
out: n
|
|
26364
26446
|
}), n;
|
|
26365
26447
|
}
|
|
26366
|
-
function
|
|
26367
|
-
let { node: t,
|
|
26448
|
+
function un(e) {
|
|
26449
|
+
let { node: t, scopePrefix: n, out: r } = e;
|
|
26368
26450
|
if (t.change === "unchanged") {
|
|
26369
|
-
for (let e of t.children)
|
|
26451
|
+
for (let e of t.children) un({
|
|
26370
26452
|
node: e,
|
|
26371
|
-
|
|
26453
|
+
scopePrefix: n,
|
|
26372
26454
|
out: r
|
|
26373
26455
|
});
|
|
26374
26456
|
return;
|
|
26375
26457
|
}
|
|
26376
26458
|
let i = [];
|
|
26377
|
-
|
|
26459
|
+
dn({
|
|
26378
26460
|
node: t,
|
|
26379
26461
|
out: i
|
|
26380
26462
|
}), r.push({
|
|
26381
|
-
id:
|
|
26463
|
+
id: fn(t, n),
|
|
26382
26464
|
change: t.change,
|
|
26383
26465
|
title: `${t.change} ${t.tagName}`,
|
|
26384
26466
|
primary: t,
|
|
26385
26467
|
companions: i,
|
|
26386
26468
|
dependsOn: [],
|
|
26387
|
-
suggestedAction: t.change === "target-only" ? "skip" : "accept"
|
|
26388
|
-
instanceScopeId: n
|
|
26469
|
+
suggestedAction: t.change === "target-only" ? "skip" : "accept"
|
|
26389
26470
|
});
|
|
26390
26471
|
}
|
|
26391
|
-
function
|
|
26472
|
+
function dn(e) {
|
|
26392
26473
|
let { node: t, out: n } = e;
|
|
26393
|
-
for (let e of t.children) e.change !== "unchanged" && n.push(e),
|
|
26474
|
+
for (let e of t.children) e.change !== "unchanged" && n.push(e), dn({
|
|
26394
26475
|
node: e,
|
|
26395
26476
|
out: n
|
|
26396
26477
|
});
|
|
26397
26478
|
}
|
|
26398
|
-
function
|
|
26479
|
+
function fn(e, t) {
|
|
26399
26480
|
let n = e.sourceRef ?? e.instanceRef, r = n ? `${n.tagName}:${n.id}` : e.tagName;
|
|
26400
26481
|
return t ? `${t}::${r}` : r;
|
|
26401
26482
|
}
|
|
26402
26483
|
//#endregion
|
|
26403
26484
|
//#region src/v2019C1/extensions/lifecycle/engine/visible-attributes.ts
|
|
26404
|
-
var
|
|
26485
|
+
var pn = new Set([
|
|
26405
26486
|
"uuid",
|
|
26406
26487
|
"templateUuid",
|
|
26407
26488
|
"originUuid"
|
|
26408
|
-
]),
|
|
26409
|
-
function
|
|
26489
|
+
]), mn = new Set(Object.values(D).flatMap((e) => e.flatMap((e) => [e.attribute.path, e.attribute.uuid])));
|
|
26490
|
+
function hn(e) {
|
|
26410
26491
|
let t = {};
|
|
26411
|
-
for (let [n, r] of Object.entries(e))
|
|
26492
|
+
for (let [n, r] of Object.entries(e)) pn.has(n) || n === "name" || mn.has(n) || (t[n] = r);
|
|
26412
26493
|
return t;
|
|
26413
26494
|
}
|
|
26414
26495
|
//#endregion
|
|
26415
26496
|
//#region src/v2019C1/extensions/lifecycle/engine/diff.ts
|
|
26416
|
-
var
|
|
26497
|
+
var gn = new Set([
|
|
26417
26498
|
"LNodeSpecNaming",
|
|
26418
26499
|
"FunctionSclRef",
|
|
26419
26500
|
"ApplicationSclRef",
|
|
26420
|
-
"SclFileReference"
|
|
26501
|
+
"SclFileReference",
|
|
26502
|
+
"FunctionRole",
|
|
26503
|
+
"FunctionRoleContent"
|
|
26421
26504
|
]);
|
|
26422
|
-
async function
|
|
26423
|
-
let { sourceQuery: t, targetQuery: n, sourceRootRef: r, instanceRootRef: i } = e,
|
|
26424
|
-
if (!
|
|
26425
|
-
let
|
|
26426
|
-
if (!
|
|
26427
|
-
let e =
|
|
26505
|
+
async function _n(e) {
|
|
26506
|
+
let { sourceQuery: t, targetQuery: n, sourceRootRef: r, instanceRootRef: i, keepLeftoverRefs: a } = e, o = e.leftoverRefPolicy, s = e.refsAlwaysAdded ?? !1, c = e.matchKey ?? "templateUuid", l = await t.any.getTree(r);
|
|
26507
|
+
if (!l) throw Error("diff: source subtree not found");
|
|
26508
|
+
let u = i ? await n.any.getTree(i) : void 0;
|
|
26509
|
+
if (!u) {
|
|
26510
|
+
let e = wn(l);
|
|
26428
26511
|
return {
|
|
26429
26512
|
root: e,
|
|
26430
|
-
|
|
26431
|
-
|
|
26432
|
-
needsDecisions: !1,
|
|
26433
|
-
summary: wn(e)
|
|
26513
|
+
groups: ln(e),
|
|
26514
|
+
summary: Fn(e)
|
|
26434
26515
|
};
|
|
26435
26516
|
}
|
|
26436
|
-
let
|
|
26437
|
-
await
|
|
26438
|
-
node:
|
|
26439
|
-
index:
|
|
26517
|
+
let d = /* @__PURE__ */ new Map();
|
|
26518
|
+
await Mn(n, {
|
|
26519
|
+
node: u,
|
|
26520
|
+
index: d,
|
|
26521
|
+
matchKey: c
|
|
26440
26522
|
});
|
|
26441
|
-
let
|
|
26442
|
-
await
|
|
26443
|
-
node:
|
|
26444
|
-
out:
|
|
26523
|
+
let f = /* @__PURE__ */ new Set();
|
|
26524
|
+
await Nn(t, {
|
|
26525
|
+
node: l,
|
|
26526
|
+
out: f
|
|
26445
26527
|
});
|
|
26446
|
-
let
|
|
26528
|
+
let p = await vn(t, {
|
|
26447
26529
|
targetQuery: n,
|
|
26448
|
-
sourceNode:
|
|
26449
|
-
instanceNode:
|
|
26450
|
-
index:
|
|
26451
|
-
sourceUuids:
|
|
26452
|
-
|
|
26530
|
+
sourceNode: l,
|
|
26531
|
+
instanceNode: u,
|
|
26532
|
+
index: d,
|
|
26533
|
+
sourceUuids: f,
|
|
26534
|
+
keepLeftoverRefs: a ?? !1,
|
|
26535
|
+
leftoverRefPolicy: o,
|
|
26536
|
+
refsAlwaysAdded: s,
|
|
26537
|
+
matchKey: c
|
|
26538
|
+
}), m = Fn(p);
|
|
26453
26539
|
return {
|
|
26454
|
-
root:
|
|
26455
|
-
|
|
26456
|
-
|
|
26457
|
-
needsDecisions: f,
|
|
26458
|
-
summary: u
|
|
26540
|
+
root: p,
|
|
26541
|
+
groups: ln(p, u.id),
|
|
26542
|
+
summary: m
|
|
26459
26543
|
};
|
|
26460
26544
|
}
|
|
26461
|
-
async function
|
|
26462
|
-
let { targetQuery: n, sourceNode: r, instanceNode: i, index: o, sourceUuids: s } = t,
|
|
26545
|
+
async function vn(e, t) {
|
|
26546
|
+
let { targetQuery: n, sourceNode: r, instanceNode: i, index: o, sourceUuids: s, keepLeftoverRefs: c, matchKey: l } = t, u = t.leftoverRefPolicy, d = t.refsAlwaysAdded ?? !1, f = await jn(e, {
|
|
26463
26547
|
targetQuery: n,
|
|
26464
26548
|
sourceNode: r,
|
|
26465
26549
|
instanceNode: i
|
|
26466
|
-
}),
|
|
26550
|
+
}), p = [], m = /* @__PURE__ */ new Set();
|
|
26467
26551
|
for (let t of r.tree) {
|
|
26468
|
-
let r = await e
|
|
26469
|
-
|
|
26552
|
+
let r = await yn(e, {
|
|
26553
|
+
targetQuery: n,
|
|
26554
|
+
sourceChild: t,
|
|
26555
|
+
instanceNode: i,
|
|
26556
|
+
index: o,
|
|
26557
|
+
matchedInstanceIds: m,
|
|
26558
|
+
refsAlwaysAdded: d
|
|
26559
|
+
});
|
|
26560
|
+
r ? (m.add(r.id), p.push(await vn(e, {
|
|
26470
26561
|
targetQuery: n,
|
|
26471
26562
|
sourceNode: t,
|
|
26472
|
-
instanceNode:
|
|
26563
|
+
instanceNode: r,
|
|
26473
26564
|
index: o,
|
|
26474
|
-
sourceUuids: s
|
|
26475
|
-
|
|
26565
|
+
sourceUuids: s,
|
|
26566
|
+
keepLeftoverRefs: c,
|
|
26567
|
+
leftoverRefPolicy: u,
|
|
26568
|
+
refsAlwaysAdded: d,
|
|
26569
|
+
matchKey: l
|
|
26570
|
+
}))) : p.push(wn(t));
|
|
26476
26571
|
}
|
|
26572
|
+
let h = await Dn(e, r);
|
|
26477
26573
|
for (let e of i.tree) {
|
|
26478
|
-
if (
|
|
26479
|
-
let t = await n.any.getAttribute(e, { name:
|
|
26574
|
+
if (m.has(e.id)) continue;
|
|
26575
|
+
let t = await n.any.getAttribute(e, { name: l });
|
|
26480
26576
|
if (t) {
|
|
26481
|
-
s.has(t) ||
|
|
26577
|
+
s.has(t) || p.push(Tn(e));
|
|
26482
26578
|
continue;
|
|
26483
26579
|
}
|
|
26484
|
-
if (
|
|
26485
|
-
|
|
26580
|
+
if (A.has(e.tagName) && !O.has(e.tagName)) {
|
|
26581
|
+
let t = c || await On(n, e, h), r = t && u ? await u(e) === "removed" : !1;
|
|
26582
|
+
t && !r ? p.push(En(e)) : p.push(Tn(e));
|
|
26486
26583
|
continue;
|
|
26487
26584
|
}
|
|
26488
|
-
|
|
26585
|
+
An(e, p);
|
|
26489
26586
|
}
|
|
26490
26587
|
return {
|
|
26491
|
-
change:
|
|
26588
|
+
change: f.length > 0 ? "modified" : "unchanged",
|
|
26492
26589
|
tagName: r.tagName,
|
|
26493
26590
|
sourceRef: a(r),
|
|
26494
26591
|
instanceRef: a(i),
|
|
26495
|
-
attributeChanges:
|
|
26496
|
-
children:
|
|
26592
|
+
attributeChanges: f.length > 0 ? f : void 0,
|
|
26593
|
+
children: p
|
|
26497
26594
|
};
|
|
26498
26595
|
}
|
|
26499
|
-
function
|
|
26500
|
-
let t = e.
|
|
26596
|
+
async function yn(e, t) {
|
|
26597
|
+
let { targetQuery: n, sourceChild: r, instanceNode: i, index: a, matchedInstanceIds: o } = t, s = await e.any.getAttribute(r, { name: "uuid" });
|
|
26598
|
+
if (s) {
|
|
26599
|
+
let e = a.get(s);
|
|
26600
|
+
return e && e.tagName === r.tagName ? e : void 0;
|
|
26601
|
+
}
|
|
26602
|
+
if (t.refsAlwaysAdded && A.has(r.tagName)) return;
|
|
26603
|
+
let c = i.tree.filter((e) => e.tagName === r.tagName && !o.has(e.id));
|
|
26604
|
+
if (c.length !== 0) {
|
|
26605
|
+
if (A.has(r.tagName)) {
|
|
26606
|
+
let t = await bn(e, r, { mapToTemplate: !1 });
|
|
26607
|
+
if (t === void 0) return c[0];
|
|
26608
|
+
for (let e of c) if (await bn(n, e, { mapToTemplate: !0 }) === t) return e;
|
|
26609
|
+
let i = await Sn(e, r);
|
|
26610
|
+
if (i === void 0) return;
|
|
26611
|
+
for (let e of c) if (await Sn(n, e) === i) return e;
|
|
26612
|
+
return;
|
|
26613
|
+
}
|
|
26614
|
+
return c[0];
|
|
26615
|
+
}
|
|
26616
|
+
}
|
|
26617
|
+
async function bn(e, t, n) {
|
|
26618
|
+
let r = D[t.tagName];
|
|
26619
|
+
if (!r) return;
|
|
26620
|
+
let i = [];
|
|
26621
|
+
for (let a of r) {
|
|
26622
|
+
let r = await e.any.getAttribute(t, { name: a.attribute.uuid });
|
|
26623
|
+
if (!r) continue;
|
|
26624
|
+
let o = n.mapToTemplate ? await xn(e, r, a.target) : r;
|
|
26625
|
+
i.push(`${a.attribute.uuid}=${o}`);
|
|
26626
|
+
}
|
|
26627
|
+
return i.length > 0 ? i.sort().join("|") : void 0;
|
|
26628
|
+
}
|
|
26629
|
+
async function xn(e, t, n) {
|
|
26630
|
+
for (let r of n) {
|
|
26631
|
+
let n = (await e.findByAttributes({
|
|
26632
|
+
tagName: r,
|
|
26633
|
+
attributes: { uuid: t }
|
|
26634
|
+
}))[0];
|
|
26635
|
+
if (n) return await e.any.getAttribute(n, { name: "templateUuid" }) || t;
|
|
26636
|
+
}
|
|
26637
|
+
return t;
|
|
26638
|
+
}
|
|
26639
|
+
async function Sn(e, t) {
|
|
26640
|
+
let n = D[t.tagName];
|
|
26641
|
+
if (!n) return;
|
|
26642
|
+
let r = [];
|
|
26643
|
+
for (let i of n) {
|
|
26644
|
+
let n = await e.any.getAttribute(t, { name: i.attribute.uuid });
|
|
26645
|
+
if (!n) continue;
|
|
26646
|
+
let a = await Cn(e, n, i.target);
|
|
26647
|
+
a !== void 0 && r.push(`${i.attribute.uuid}=${a}`);
|
|
26648
|
+
}
|
|
26649
|
+
return r.length > 0 ? r.sort().join("|") : void 0;
|
|
26650
|
+
}
|
|
26651
|
+
async function Cn(e, t, n) {
|
|
26652
|
+
for (let r of n) {
|
|
26653
|
+
let n = (await e.findByAttributes({
|
|
26654
|
+
tagName: r,
|
|
26655
|
+
attributes: { uuid: t }
|
|
26656
|
+
}))[0];
|
|
26657
|
+
if (n) return await e.any.getAttribute(n, { name: "name" }) || void 0;
|
|
26658
|
+
}
|
|
26659
|
+
}
|
|
26660
|
+
function wn(e) {
|
|
26661
|
+
let t = e.tree.map((e) => wn(e));
|
|
26501
26662
|
return {
|
|
26502
26663
|
change: "added",
|
|
26503
26664
|
tagName: e.tagName,
|
|
@@ -26505,8 +26666,8 @@ function gn(e) {
|
|
|
26505
26666
|
children: t
|
|
26506
26667
|
};
|
|
26507
26668
|
}
|
|
26508
|
-
function
|
|
26509
|
-
let t = e.tree.map((e) =>
|
|
26669
|
+
function Tn(e) {
|
|
26670
|
+
let t = e.tree.map((e) => Tn(e));
|
|
26510
26671
|
return {
|
|
26511
26672
|
change: "removed",
|
|
26512
26673
|
tagName: e.tagName,
|
|
@@ -26514,8 +26675,34 @@ function _n(e) {
|
|
|
26514
26675
|
children: t
|
|
26515
26676
|
};
|
|
26516
26677
|
}
|
|
26517
|
-
function
|
|
26518
|
-
|
|
26678
|
+
function En(e) {
|
|
26679
|
+
return {
|
|
26680
|
+
change: "unchanged",
|
|
26681
|
+
tagName: e.tagName,
|
|
26682
|
+
instanceRef: a(e),
|
|
26683
|
+
children: []
|
|
26684
|
+
};
|
|
26685
|
+
}
|
|
26686
|
+
async function Dn(e, t) {
|
|
26687
|
+
let n = /* @__PURE__ */ new Set();
|
|
26688
|
+
for (let r of t.tree) {
|
|
26689
|
+
if (!A.has(r.tagName)) continue;
|
|
26690
|
+
let t = await bn(e, r, { mapToTemplate: !1 });
|
|
26691
|
+
t && n.add(t);
|
|
26692
|
+
let i = await Sn(e, r);
|
|
26693
|
+
i && n.add(i);
|
|
26694
|
+
}
|
|
26695
|
+
return n;
|
|
26696
|
+
}
|
|
26697
|
+
async function On(e, t, n) {
|
|
26698
|
+
if (n.size === 0) return !1;
|
|
26699
|
+
let r = await bn(e, t, { mapToTemplate: !0 });
|
|
26700
|
+
if (r && n.has(r)) return !0;
|
|
26701
|
+
let i = await Sn(e, t);
|
|
26702
|
+
return !!i && n.has(i);
|
|
26703
|
+
}
|
|
26704
|
+
function kn(e) {
|
|
26705
|
+
let t = e.tree.map((e) => kn(e));
|
|
26519
26706
|
return {
|
|
26520
26707
|
change: "target-only",
|
|
26521
26708
|
tagName: e.tagName,
|
|
@@ -26523,17 +26710,17 @@ function vn(e) {
|
|
|
26523
26710
|
children: t
|
|
26524
26711
|
};
|
|
26525
26712
|
}
|
|
26526
|
-
function
|
|
26527
|
-
if (!
|
|
26713
|
+
function An(e, t) {
|
|
26714
|
+
if (!gn.has(e.tagName)) {
|
|
26528
26715
|
if (e.tagName === "Private") {
|
|
26529
|
-
for (let n of e.tree)
|
|
26716
|
+
for (let n of e.tree) An(n, t);
|
|
26530
26717
|
return;
|
|
26531
26718
|
}
|
|
26532
|
-
t.push(
|
|
26719
|
+
t.push(kn(e));
|
|
26533
26720
|
}
|
|
26534
26721
|
}
|
|
26535
|
-
async function
|
|
26536
|
-
let { targetQuery: n, sourceNode: r, instanceNode: i } = t, a =
|
|
26722
|
+
async function jn(e, t) {
|
|
26723
|
+
let { targetQuery: n, sourceNode: r, instanceNode: i } = t, a = hn(await e.any.getAttributes(r)), o = hn(await n.any.getAttributes(i)), s = [];
|
|
26537
26724
|
for (let e of new Set([...Object.keys(a), ...Object.keys(o)])) {
|
|
26538
26725
|
let t = o[e], n = a[e];
|
|
26539
26726
|
t !== n && s.push({
|
|
@@ -26544,41 +26731,46 @@ async function bn(e, t) {
|
|
|
26544
26731
|
}
|
|
26545
26732
|
return s;
|
|
26546
26733
|
}
|
|
26547
|
-
async function
|
|
26548
|
-
let { node: n, index: r } = t,
|
|
26549
|
-
|
|
26550
|
-
for (let t of n.tree) await
|
|
26734
|
+
async function Mn(e, t) {
|
|
26735
|
+
let { node: n, index: r, matchKey: i } = t, a = await e.any.getAttribute(n, { name: i });
|
|
26736
|
+
a && r.set(a, n);
|
|
26737
|
+
for (let t of n.tree) await Mn(e, {
|
|
26551
26738
|
node: t,
|
|
26552
|
-
index: r
|
|
26739
|
+
index: r,
|
|
26740
|
+
matchKey: i
|
|
26553
26741
|
});
|
|
26554
26742
|
}
|
|
26555
|
-
async function
|
|
26743
|
+
async function Nn(e, t) {
|
|
26556
26744
|
let { node: n, out: r } = t, i = await e.any.getAttribute(n, { name: "uuid" });
|
|
26557
26745
|
i && r.add(i);
|
|
26558
|
-
for (let t of n.tree) await
|
|
26746
|
+
for (let t of n.tree) await Nn(e, {
|
|
26559
26747
|
node: t,
|
|
26560
26748
|
out: r
|
|
26561
26749
|
});
|
|
26562
26750
|
}
|
|
26563
|
-
function
|
|
26564
|
-
let
|
|
26565
|
-
|
|
26566
|
-
|
|
26567
|
-
|
|
26568
|
-
|
|
26751
|
+
function Pn(e) {
|
|
26752
|
+
let t = e.reduce((e, t) => {
|
|
26753
|
+
let n = Fn(t.tree);
|
|
26754
|
+
return {
|
|
26755
|
+
added: e.added + n.added,
|
|
26756
|
+
removed: e.removed + n.removed,
|
|
26757
|
+
modified: e.modified + n.modified
|
|
26758
|
+
};
|
|
26759
|
+
}, {
|
|
26569
26760
|
added: 0,
|
|
26570
26761
|
removed: 0,
|
|
26571
26762
|
modified: 0
|
|
26572
|
-
})
|
|
26763
|
+
});
|
|
26573
26764
|
return {
|
|
26574
|
-
|
|
26575
|
-
|
|
26576
|
-
|
|
26577
|
-
needsDecisions: i,
|
|
26578
|
-
summary: r
|
|
26765
|
+
instances: e,
|
|
26766
|
+
needsDecisions: e.some((e) => e.rootRef !== void 0 && e.groups.length > 0),
|
|
26767
|
+
summary: t
|
|
26579
26768
|
};
|
|
26580
26769
|
}
|
|
26581
|
-
function
|
|
26770
|
+
function U(e) {
|
|
26771
|
+
return e.instances.flatMap((e) => e.groups);
|
|
26772
|
+
}
|
|
26773
|
+
function Fn(e) {
|
|
26582
26774
|
let t = {
|
|
26583
26775
|
added: 0,
|
|
26584
26776
|
removed: 0,
|
|
@@ -26591,58 +26783,58 @@ function wn(e) {
|
|
|
26591
26783
|
}
|
|
26592
26784
|
//#endregion
|
|
26593
26785
|
//#region src/v2019C1/extensions/lifecycle/constraints/classify-attribute.constants.ts
|
|
26594
|
-
var
|
|
26786
|
+
var In = new Set([
|
|
26595
26787
|
"uuid",
|
|
26596
26788
|
"templateUuid",
|
|
26597
26789
|
"originUuid"
|
|
26598
|
-
]),
|
|
26599
|
-
function
|
|
26600
|
-
let t =
|
|
26790
|
+
]), Ln = ["rename", "free"], Rn = /* @__PURE__ */ new Map();
|
|
26791
|
+
function zn(e) {
|
|
26792
|
+
let t = Rn.get(e);
|
|
26601
26793
|
if (t) return t;
|
|
26602
26794
|
let n = _[e]?.attributes?.identityFields ?? [], r = new Set(n);
|
|
26603
|
-
return
|
|
26795
|
+
return Rn.set(e, r), r;
|
|
26604
26796
|
}
|
|
26605
26797
|
//#endregion
|
|
26606
26798
|
//#region src/v2019C1/extensions/lifecycle/constraints/classify-attribute.ts
|
|
26607
|
-
function
|
|
26608
|
-
return
|
|
26799
|
+
function W(e, t) {
|
|
26800
|
+
return In.has(t) ? "identity" : Hn(e).has(t) || Un(e).has(t) ? "reference" : t === "name" ? "rename" : se.has(t) || zn(e).has(t) ? "identity" : "free";
|
|
26609
26801
|
}
|
|
26610
|
-
function
|
|
26611
|
-
return
|
|
26802
|
+
function Bn(e) {
|
|
26803
|
+
return Ln.includes(e);
|
|
26612
26804
|
}
|
|
26613
|
-
function
|
|
26805
|
+
function Vn(e) {
|
|
26614
26806
|
let t = Object.keys(g[e] ?? {}), n = [];
|
|
26615
26807
|
for (let r of t) {
|
|
26616
|
-
let t =
|
|
26617
|
-
|
|
26808
|
+
let t = W(e, r);
|
|
26809
|
+
Bn(t) && n.push({
|
|
26618
26810
|
attr: r,
|
|
26619
26811
|
mode: t
|
|
26620
26812
|
});
|
|
26621
26813
|
}
|
|
26622
26814
|
return n;
|
|
26623
26815
|
}
|
|
26624
|
-
function
|
|
26625
|
-
let t =
|
|
26626
|
-
if (!t) return
|
|
26816
|
+
function Hn(e) {
|
|
26817
|
+
let t = D[e];
|
|
26818
|
+
if (!t) return Wn;
|
|
26627
26819
|
let n = /* @__PURE__ */ new Set();
|
|
26628
26820
|
for (let e of t) n.add(e.attribute.path), n.add(e.attribute.uuid);
|
|
26629
26821
|
return n;
|
|
26630
26822
|
}
|
|
26631
|
-
function
|
|
26632
|
-
let t =
|
|
26633
|
-
return t ? new Set(t) :
|
|
26823
|
+
function Un(e) {
|
|
26824
|
+
let t = F.get(e);
|
|
26825
|
+
return t ? new Set(t) : Wn;
|
|
26634
26826
|
}
|
|
26635
|
-
var
|
|
26827
|
+
var Wn = /* @__PURE__ */ new Set();
|
|
26636
26828
|
//#endregion
|
|
26637
26829
|
//#region src/v2019C1/extensions/lifecycle/constraints/find-constraint-violation.ts
|
|
26638
|
-
async function
|
|
26639
|
-
let { parentRef: n, childTag: r, candidate: i, excludeId: a } = t, o =
|
|
26830
|
+
async function G(e, t) {
|
|
26831
|
+
let { parentRef: n, childTag: r, candidate: i, excludeId: a } = t, o = Kn(n.tagName).filter((e) => (e.kind === "unique" || e.kind === "key") && qn(e, r));
|
|
26640
26832
|
if (o.length === 0) return null;
|
|
26641
26833
|
let s = (await e.any.getTree(n))?.tree ?? [];
|
|
26642
26834
|
for (let e of o) {
|
|
26643
|
-
let t =
|
|
26835
|
+
let t = Jn(e);
|
|
26644
26836
|
if (!(t.length === 0 || t.some((e) => i[e] === void 0))) {
|
|
26645
|
-
for (let n of s) if (n.id !== a &&
|
|
26837
|
+
for (let n of s) if (n.id !== a && qn(e, n.tagName) && t.every((e) => Gn(n, e) === i[e])) return {
|
|
26646
26838
|
constraint: e.name,
|
|
26647
26839
|
fields: t,
|
|
26648
26840
|
offendingId: n.id
|
|
@@ -26651,41 +26843,41 @@ async function W(e, t) {
|
|
|
26651
26843
|
}
|
|
26652
26844
|
return null;
|
|
26653
26845
|
}
|
|
26654
|
-
function
|
|
26846
|
+
function Gn(e, t) {
|
|
26655
26847
|
return e.attributes.find((e) => e.name === t)?.value;
|
|
26656
26848
|
}
|
|
26657
|
-
function
|
|
26849
|
+
function Kn(e) {
|
|
26658
26850
|
return [..._[e]?.constraints ?? []];
|
|
26659
26851
|
}
|
|
26660
|
-
function
|
|
26852
|
+
function qn(e, t) {
|
|
26661
26853
|
for (let n of e.selector ?? []) {
|
|
26662
26854
|
let e = (n.steps ?? []).at(-1);
|
|
26663
26855
|
if (e && (e.kind === "wildcard" || e.kind === "name" && e.value === t)) return !0;
|
|
26664
26856
|
}
|
|
26665
26857
|
return !1;
|
|
26666
26858
|
}
|
|
26667
|
-
function
|
|
26859
|
+
function Jn(e) {
|
|
26668
26860
|
return (e.fields ?? []).map((e) => e.target?.value).filter((e) => !!e);
|
|
26669
26861
|
}
|
|
26670
26862
|
//#endregion
|
|
26671
26863
|
//#region src/v2019C1/extensions/lifecycle/constraints/resolve-unique-value.ts
|
|
26672
|
-
var
|
|
26673
|
-
async function
|
|
26864
|
+
var Yn = 1e3;
|
|
26865
|
+
async function Xn(e, t) {
|
|
26674
26866
|
let { parentRef: n, childTag: r, candidate: i, attr: a, decorate: o, excludeId: s } = t, c = i[a] ?? "";
|
|
26675
|
-
if (!await
|
|
26867
|
+
if (!await G(e, {
|
|
26676
26868
|
parentRef: n,
|
|
26677
26869
|
childTag: r,
|
|
26678
26870
|
candidate: i,
|
|
26679
26871
|
excludeId: s
|
|
26680
26872
|
})) return c;
|
|
26681
|
-
for (let t = 1; t <=
|
|
26873
|
+
for (let t = 1; t <= Yn; t++) {
|
|
26682
26874
|
let l = o ? o({
|
|
26683
26875
|
base: c,
|
|
26684
26876
|
attempt: t,
|
|
26685
26877
|
attr: a,
|
|
26686
26878
|
childTag: r
|
|
26687
26879
|
}) : `${c}_${t}`;
|
|
26688
|
-
if (!await
|
|
26880
|
+
if (!await G(e, {
|
|
26689
26881
|
parentRef: n,
|
|
26690
26882
|
childTag: r,
|
|
26691
26883
|
candidate: {
|
|
@@ -26695,22 +26887,22 @@ async function zn(e, t) {
|
|
|
26695
26887
|
excludeId: s
|
|
26696
26888
|
})) return l;
|
|
26697
26889
|
}
|
|
26698
|
-
throw Error(`could not resolve a unique ${a} for <${r}> under <${n.tagName}> after ${
|
|
26890
|
+
throw Error(`could not resolve a unique ${a} for <${r}> under <${n.tagName}> after ${Yn} attempts`);
|
|
26699
26891
|
}
|
|
26700
26892
|
//#endregion
|
|
26701
26893
|
//#region src/v2019C1/extensions/lifecycle/constraints/resolve-placement-collision.ts
|
|
26702
|
-
async function
|
|
26894
|
+
async function K(e, t) {
|
|
26703
26895
|
let { ref: n, decorate: r, overrides: i } = t, a = t.parentRef ?? (await e.getRecord(n))?.parent;
|
|
26704
26896
|
if (!a) return { status: "ok" };
|
|
26705
26897
|
let o = await e.getAttributes(n);
|
|
26706
26898
|
if (i) for (let [t, r] of Object.entries(i)) {
|
|
26707
|
-
let i =
|
|
26899
|
+
let i = W(n.tagName, t);
|
|
26708
26900
|
(i === "rename" || i === "free") && o[t] !== r && (await e.update(n, { attributes: { [t]: r } }), o = {
|
|
26709
26901
|
...o,
|
|
26710
26902
|
[t]: r
|
|
26711
26903
|
});
|
|
26712
26904
|
}
|
|
26713
|
-
let s = await
|
|
26905
|
+
let s = await G(e, {
|
|
26714
26906
|
parentRef: a,
|
|
26715
26907
|
childTag: n.tagName,
|
|
26716
26908
|
candidate: o,
|
|
@@ -26718,14 +26910,14 @@ async function G(e, t) {
|
|
|
26718
26910
|
});
|
|
26719
26911
|
if (!s) return { status: "ok" };
|
|
26720
26912
|
let c = s.fields.find((e) => {
|
|
26721
|
-
let t =
|
|
26913
|
+
let t = W(n.tagName, e);
|
|
26722
26914
|
return t === "rename" || t === "free";
|
|
26723
26915
|
});
|
|
26724
26916
|
if (!c) return {
|
|
26725
26917
|
status: "unresolvable",
|
|
26726
26918
|
violation: s
|
|
26727
26919
|
};
|
|
26728
|
-
let l = o[c] ?? "", u = await
|
|
26920
|
+
let l = o[c] ?? "", u = await Xn(e, {
|
|
26729
26921
|
parentRef: a,
|
|
26730
26922
|
childTag: n.tagName,
|
|
26731
26923
|
candidate: o,
|
|
@@ -26742,12 +26934,12 @@ async function G(e, t) {
|
|
|
26742
26934
|
}
|
|
26743
26935
|
//#endregion
|
|
26744
26936
|
//#region src/v2019C1/extensions/lifecycle/transplant/transaction/primitives/clone-tree.ts
|
|
26745
|
-
var
|
|
26937
|
+
var Zn = {
|
|
26746
26938
|
scope: "tree",
|
|
26747
26939
|
attributes: ["templateUuid", "originUuid"]
|
|
26748
26940
|
};
|
|
26749
|
-
async function
|
|
26750
|
-
let { sourceQuery: n, ref: i, targetParent: a, omit: o, retagRoot: s, strip: c =
|
|
26941
|
+
async function q(e, t) {
|
|
26942
|
+
let { sourceQuery: n, ref: i, targetParent: a, omit: o, retagRoot: s, strip: c = Zn } = t, l = await n.getTree(i, {
|
|
26751
26943
|
omit: o,
|
|
26752
26944
|
unwrap: []
|
|
26753
26945
|
});
|
|
@@ -26763,12 +26955,12 @@ async function K(e, t) {
|
|
|
26763
26955
|
}
|
|
26764
26956
|
//#endregion
|
|
26765
26957
|
//#region src/v2019C1/extensions/lifecycle/transplant/transaction/primitives/add-children-to.ts
|
|
26766
|
-
async function
|
|
26958
|
+
async function Qn(e, t) {
|
|
26767
26959
|
let { sourceQuery: n, source: r, target: i, omit: a, strip: o } = t, s = await n.any.getRecord(r);
|
|
26768
26960
|
if (!s) return [];
|
|
26769
26961
|
let c = [];
|
|
26770
26962
|
for (let t of s.children) {
|
|
26771
|
-
let r = await
|
|
26963
|
+
let r = await q(e, {
|
|
26772
26964
|
sourceQuery: n,
|
|
26773
26965
|
ref: {
|
|
26774
26966
|
tagName: t.tagName,
|
|
@@ -26785,13 +26977,13 @@ async function q(e, t) {
|
|
|
26785
26977
|
//#endregion
|
|
26786
26978
|
//#region src/v2019C1/extensions/lifecycle/transplant/transaction/deep.ts
|
|
26787
26979
|
async function J(e, t) {
|
|
26788
|
-
let { sourceQuery: n, ref: r, targetParent: i, withTypes: a = !0, omit: o, strip: s = !1, retagRoot: c } = t, l = await
|
|
26980
|
+
let { sourceQuery: n, ref: r, targetParent: i, withTypes: a = !0, omit: o, strip: s = !1, retagRoot: c } = t, l = await $n(e, {
|
|
26789
26981
|
sourceQuery: n,
|
|
26790
26982
|
ref: r,
|
|
26791
26983
|
targetParent: i
|
|
26792
26984
|
}), u, d;
|
|
26793
26985
|
if (l) {
|
|
26794
|
-
d = await
|
|
26986
|
+
d = await Qn(e, {
|
|
26795
26987
|
sourceQuery: n,
|
|
26796
26988
|
source: r,
|
|
26797
26989
|
target: l,
|
|
@@ -26802,7 +26994,7 @@ async function J(e, t) {
|
|
|
26802
26994
|
if (!t) throw Error(`transplant.deep: merge target vanished: ${l.id}`);
|
|
26803
26995
|
u = t;
|
|
26804
26996
|
} else {
|
|
26805
|
-
let t = await
|
|
26997
|
+
let t = await q(e, {
|
|
26806
26998
|
sourceQuery: n,
|
|
26807
26999
|
ref: r,
|
|
26808
27000
|
targetParent: i,
|
|
@@ -26815,7 +27007,7 @@ async function J(e, t) {
|
|
|
26815
27007
|
}
|
|
26816
27008
|
let f = /* @__PURE__ */ new Map();
|
|
26817
27009
|
if (a) {
|
|
26818
|
-
let t = await
|
|
27010
|
+
let t = await er(n, r);
|
|
26819
27011
|
if (t.length > 0) {
|
|
26820
27012
|
let r = typeof a == "object" ? a.keepNameFrom : void 0;
|
|
26821
27013
|
f = (await It(e, {
|
|
@@ -26832,7 +27024,7 @@ async function J(e, t) {
|
|
|
26832
27024
|
recordMappings: d
|
|
26833
27025
|
};
|
|
26834
27026
|
}
|
|
26835
|
-
async function
|
|
27027
|
+
async function $n(e, t) {
|
|
26836
27028
|
let { sourceQuery: n, ref: r, targetParent: i } = t;
|
|
26837
27029
|
if (r.tagName !== "Private") return;
|
|
26838
27030
|
let a = (await n.any.getAttributes(r)).type;
|
|
@@ -26843,7 +27035,7 @@ async function Vn(e, t) {
|
|
|
26843
27035
|
id: t.id
|
|
26844
27036
|
};
|
|
26845
27037
|
}
|
|
26846
|
-
async function
|
|
27038
|
+
async function er(e, t) {
|
|
26847
27039
|
let { LNode: n = [], LN: r = [], LN0: i = [] } = await e.findDescendants(t, { collect: [
|
|
26848
27040
|
"LNode",
|
|
26849
27041
|
"LN",
|
|
@@ -26857,8 +27049,8 @@ async function Hn(e, t) {
|
|
|
26857
27049
|
}
|
|
26858
27050
|
//#endregion
|
|
26859
27051
|
//#region src/v2019C1/extensions/lifecycle/transplant/transaction/primitives/clone-referenced.ts
|
|
26860
|
-
async function
|
|
26861
|
-
let { sourceQuery: n, scopeRef: r, refTagName: i, targetTagName: a, alreadyCloned: o } = t, s =
|
|
27052
|
+
async function tr(e, t) {
|
|
27053
|
+
let { sourceQuery: n, scopeRef: r, refTagName: i, targetTagName: a, alreadyCloned: o } = t, s = D[i][0].attribute.uuid, { [i]: c = [] } = await n.findDescendants(r, { collect: i }), l = /* @__PURE__ */ new Set();
|
|
26862
27054
|
for (let e of c) {
|
|
26863
27055
|
let t = e.attributes.find((e) => e.name === s)?.value;
|
|
26864
27056
|
t && l.add(t);
|
|
@@ -26881,8 +27073,8 @@ async function Un(e, t) {
|
|
|
26881
27073
|
}
|
|
26882
27074
|
return u;
|
|
26883
27075
|
}
|
|
26884
|
-
async function
|
|
26885
|
-
let { sourceQuery: n, scopeRef: r, refTagName: i, targetTagName: a, resolveTargetParent: o, alreadyCloned: s, omit: c } = t, l = await
|
|
27076
|
+
async function nr(e, t) {
|
|
27077
|
+
let { sourceQuery: n, scopeRef: r, refTagName: i, targetTagName: a, resolveTargetParent: o, alreadyCloned: s, omit: c } = t, l = await tr(e, {
|
|
26886
27078
|
sourceQuery: n,
|
|
26887
27079
|
scopeRef: r,
|
|
26888
27080
|
refTagName: i,
|
|
@@ -26890,7 +27082,7 @@ async function Wn(e, t) {
|
|
|
26890
27082
|
alreadyCloned: s
|
|
26891
27083
|
}), u = [];
|
|
26892
27084
|
for (let t of l) {
|
|
26893
|
-
let r = await
|
|
27085
|
+
let r = await q(e, {
|
|
26894
27086
|
sourceQuery: n,
|
|
26895
27087
|
ref: t,
|
|
26896
27088
|
targetParent: await o(t),
|
|
@@ -26900,9 +27092,9 @@ async function Wn(e, t) {
|
|
|
26900
27092
|
}
|
|
26901
27093
|
return u;
|
|
26902
27094
|
}
|
|
26903
|
-
async function
|
|
26904
|
-
let { sourceQuery: n, scopeTagName: r, scopeRef: i, resolveTargetParent: a, alreadyCloned: o, skip: s = /* @__PURE__ */ new Set(), omit: c } = t, l = (p[r] ?? []).filter((e) => e in
|
|
26905
|
-
for (let t of l) for (let r of
|
|
27095
|
+
async function rr(e, t) {
|
|
27096
|
+
let { sourceQuery: n, scopeTagName: r, scopeRef: i, resolveTargetParent: a, alreadyCloned: o, skip: s = /* @__PURE__ */ new Set(), omit: c } = t, l = (p[r] ?? []).filter((e) => e in D && !s.has(e)), u = nr, d = [];
|
|
27097
|
+
for (let t of l) for (let r of D[t]) for (let s of r.target) {
|
|
26906
27098
|
let r = await u(e, {
|
|
26907
27099
|
sourceQuery: n,
|
|
26908
27100
|
scopeRef: i,
|
|
@@ -26917,6 +27109,45 @@ async function Gn(e, t) {
|
|
|
26917
27109
|
return d;
|
|
26918
27110
|
}
|
|
26919
27111
|
//#endregion
|
|
27112
|
+
//#region src/v2019C1/extensions/lifecycle/transplant/transaction/primitives/merge-children-into.ts
|
|
27113
|
+
async function ir(e, t) {
|
|
27114
|
+
let { sourceQuery: n, source: r, target: i, strip: a } = t, o = await n.any.getRecord(r);
|
|
27115
|
+
if (!o) return [];
|
|
27116
|
+
let s = [];
|
|
27117
|
+
for (let t of o.children) {
|
|
27118
|
+
let r = {
|
|
27119
|
+
tagName: t.tagName,
|
|
27120
|
+
id: t.id
|
|
27121
|
+
}, o = await n.any.getAttribute(t, { name: "name" }), c = o ? await ar(e, i, t.tagName, o) : void 0;
|
|
27122
|
+
if (c) {
|
|
27123
|
+
s.push(...await ir(e, {
|
|
27124
|
+
sourceQuery: n,
|
|
27125
|
+
source: r,
|
|
27126
|
+
target: c,
|
|
27127
|
+
strip: a
|
|
27128
|
+
}));
|
|
27129
|
+
continue;
|
|
27130
|
+
}
|
|
27131
|
+
let l = await q(e, {
|
|
27132
|
+
sourceQuery: n,
|
|
27133
|
+
ref: r,
|
|
27134
|
+
targetParent: i,
|
|
27135
|
+
...a === void 0 ? {} : { strip: a }
|
|
27136
|
+
});
|
|
27137
|
+
l && s.push(...l.mappings);
|
|
27138
|
+
}
|
|
27139
|
+
return s;
|
|
27140
|
+
}
|
|
27141
|
+
async function ar(e, t, n, r) {
|
|
27142
|
+
let i = await e.any.getRecord(t);
|
|
27143
|
+
if (i) {
|
|
27144
|
+
for (let t of i.children) if (t.tagName === n && await e.any.getAttribute(t, { name: "name" }) === r) return {
|
|
27145
|
+
tagName: t.tagName,
|
|
27146
|
+
id: t.id
|
|
27147
|
+
};
|
|
27148
|
+
}
|
|
27149
|
+
}
|
|
27150
|
+
//#endregion
|
|
26920
27151
|
//#region src/v2019C1/extensions/lifecycle/transplant/transaction/resolve-structure-ref.ts
|
|
26921
27152
|
async function Y(e, t, n) {
|
|
26922
27153
|
let r = (await e.findAncestors(t, { stopAtTagName: "Substation" })).find((e) => e.tagName in n);
|
|
@@ -26933,7 +27164,7 @@ async function Y(e, t, n) {
|
|
|
26933
27164
|
id: i.id
|
|
26934
27165
|
};
|
|
26935
27166
|
}
|
|
26936
|
-
function
|
|
27167
|
+
function or(e) {
|
|
26937
27168
|
let { sourceQuery: t, structure: n, cloneIndex: r } = e;
|
|
26938
27169
|
return async function(e) {
|
|
26939
27170
|
let i = await t.findAncestors(e, { stopAtTagName: "Substation" });
|
|
@@ -26956,186 +27187,198 @@ function Kn(e) {
|
|
|
26956
27187
|
}
|
|
26957
27188
|
//#endregion
|
|
26958
27189
|
//#region src/v2019C1/extensions/lifecycle/engine/reconcile.ts
|
|
26959
|
-
async function
|
|
26960
|
-
let { sourceQuery: n, sourceRootRef: r, instanceRootRef: i, accepted: a, overrides: o, keepNameTypesFrom: s } = t,
|
|
26961
|
-
if (!
|
|
26962
|
-
let
|
|
26963
|
-
await
|
|
26964
|
-
node:
|
|
26965
|
-
index:
|
|
27190
|
+
async function sr(e, t) {
|
|
27191
|
+
let { sourceQuery: n, sourceRootRef: r, instanceRootRef: i, accepted: a, overrides: o, keepNameTypesFrom: s, matchKey: c = "templateUuid", identityMode: l = "stamp-template" } = t, u = await n.any.getTree(r), d = await e.any.getTree(i);
|
|
27192
|
+
if (!u || !d) return;
|
|
27193
|
+
let f = /* @__PURE__ */ new Map();
|
|
27194
|
+
await fr(e, {
|
|
27195
|
+
node: d,
|
|
27196
|
+
index: f,
|
|
27197
|
+
matchKey: c
|
|
26966
27198
|
});
|
|
26967
|
-
let
|
|
26968
|
-
await
|
|
26969
|
-
node:
|
|
26970
|
-
out:
|
|
26971
|
-
}), await
|
|
27199
|
+
let p = /* @__PURE__ */ new Set();
|
|
27200
|
+
await pr(n, {
|
|
27201
|
+
node: u,
|
|
27202
|
+
out: p
|
|
27203
|
+
}), await dr(e, {
|
|
26972
27204
|
sourceQuery: n,
|
|
26973
|
-
instanceRecord:
|
|
26974
|
-
sourceNode:
|
|
27205
|
+
instanceRecord: d,
|
|
27206
|
+
sourceNode: u,
|
|
26975
27207
|
accepted: a,
|
|
26976
27208
|
overrides: o
|
|
26977
|
-
}), await
|
|
27209
|
+
}), await cr(e, {
|
|
26978
27210
|
sourceQuery: n,
|
|
26979
|
-
sourceNode:
|
|
26980
|
-
instanceParent:
|
|
26981
|
-
index:
|
|
27211
|
+
sourceNode: u,
|
|
27212
|
+
instanceParent: d,
|
|
27213
|
+
index: f,
|
|
26982
27214
|
accepted: a,
|
|
26983
27215
|
overrides: o,
|
|
26984
|
-
keepNameTypesFrom: s
|
|
26985
|
-
|
|
26986
|
-
|
|
26987
|
-
|
|
26988
|
-
|
|
27216
|
+
keepNameTypesFrom: s,
|
|
27217
|
+
matchKey: c,
|
|
27218
|
+
identityMode: l
|
|
27219
|
+
}), await lr(e, {
|
|
27220
|
+
instanceNode: d,
|
|
27221
|
+
sourceUuids: p,
|
|
27222
|
+
accepted: a,
|
|
27223
|
+
matchKey: c
|
|
26989
27224
|
});
|
|
26990
27225
|
}
|
|
26991
|
-
async function
|
|
26992
|
-
let { sourceQuery: n, sourceNode: r, instanceParent: i, index: o, accepted: s, overrides: c, keepNameTypesFrom: l } = t,
|
|
27226
|
+
async function cr(e, t) {
|
|
27227
|
+
let { sourceQuery: n, sourceNode: r, instanceParent: i, index: o, accepted: s, overrides: c, keepNameTypesFrom: l, matchKey: u, identityMode: d } = t, f = /* @__PURE__ */ new Set();
|
|
26993
27228
|
for (let t of r.tree) {
|
|
26994
|
-
let r = await n.any.getAttribute(t, { name: "uuid" }),
|
|
26995
|
-
if (
|
|
26996
|
-
|
|
27229
|
+
let r = await n.any.getAttribute(t, { name: "uuid" }), p = (r ? o.get(r) : void 0) ?? (r ? void 0 : i.tree.find((e) => e.tagName === t.tagName && !f.has(e.id)));
|
|
27230
|
+
if (p) {
|
|
27231
|
+
f.add(p.id), await dr(e, {
|
|
26997
27232
|
sourceQuery: n,
|
|
26998
|
-
instanceRecord:
|
|
27233
|
+
instanceRecord: p,
|
|
26999
27234
|
sourceNode: t,
|
|
27000
27235
|
accepted: s,
|
|
27001
27236
|
overrides: c
|
|
27002
|
-
}), await
|
|
27237
|
+
}), await cr(e, {
|
|
27003
27238
|
sourceQuery: n,
|
|
27004
27239
|
sourceNode: t,
|
|
27005
|
-
instanceParent:
|
|
27240
|
+
instanceParent: p,
|
|
27006
27241
|
index: o,
|
|
27007
27242
|
accepted: s,
|
|
27008
27243
|
overrides: c,
|
|
27009
|
-
keepNameTypesFrom: l
|
|
27244
|
+
keepNameTypesFrom: l,
|
|
27245
|
+
matchKey: u,
|
|
27246
|
+
identityMode: d
|
|
27010
27247
|
});
|
|
27011
27248
|
continue;
|
|
27012
27249
|
}
|
|
27013
27250
|
if (s && !s.sourceIds.has(t.id)) continue;
|
|
27014
|
-
let { recordMappings:
|
|
27251
|
+
let { recordMappings: m } = await J(e, {
|
|
27015
27252
|
sourceQuery: n,
|
|
27016
27253
|
ref: a(t),
|
|
27017
27254
|
targetParent: a(i),
|
|
27018
27255
|
strip: !1,
|
|
27019
27256
|
withTypes: { keepNameFrom: l }
|
|
27020
27257
|
});
|
|
27021
|
-
await
|
|
27022
|
-
mappings:
|
|
27023
|
-
mode:
|
|
27024
|
-
});
|
|
27025
|
-
let
|
|
27026
|
-
|
|
27027
|
-
ref:
|
|
27258
|
+
await H(e, {
|
|
27259
|
+
mappings: m,
|
|
27260
|
+
mode: d
|
|
27261
|
+
}), d === "keep" && await on(e, { mappings: m });
|
|
27262
|
+
let h = m.find((e) => e.source.id === t.id);
|
|
27263
|
+
h && d !== "keep" && await K(e, {
|
|
27264
|
+
ref: h.target,
|
|
27028
27265
|
parentRef: a(i),
|
|
27029
27266
|
overrides: c?.get(t.id)
|
|
27030
27267
|
});
|
|
27031
27268
|
}
|
|
27032
|
-
for (let t of i.tree) if (!
|
|
27033
|
-
if (
|
|
27269
|
+
for (let t of i.tree) if (!f.has(t.id) && !await e.any.getAttribute(t, { name: "templateUuid" })) {
|
|
27270
|
+
if (A.has(t.tagName) && !O.has(t.tagName)) {
|
|
27034
27271
|
if (s && !s.instanceIds.has(t.id)) continue;
|
|
27035
27272
|
} else if (!s || !s.instanceIds.has(t.id)) continue;
|
|
27036
27273
|
await e.any.getRecord(t) && await e.any.delete(t);
|
|
27037
27274
|
}
|
|
27038
27275
|
}
|
|
27039
|
-
async function
|
|
27040
|
-
let { instanceNode: n, sourceUuids: r, accepted: i } = t,
|
|
27041
|
-
await
|
|
27276
|
+
async function lr(e, t) {
|
|
27277
|
+
let { instanceNode: n, sourceUuids: r, accepted: i, matchKey: a } = t, o = [];
|
|
27278
|
+
await ur(e, {
|
|
27042
27279
|
node: n,
|
|
27043
27280
|
sourceUuids: r,
|
|
27044
27281
|
accepted: i,
|
|
27045
|
-
|
|
27282
|
+
matchKey: a,
|
|
27283
|
+
out: o
|
|
27046
27284
|
});
|
|
27047
|
-
for (let t of
|
|
27285
|
+
for (let t of o) await e.any.getRecord(t) && await e.any.delete(t);
|
|
27048
27286
|
}
|
|
27049
|
-
async function
|
|
27050
|
-
let { node: n, sourceUuids: r, accepted: i,
|
|
27051
|
-
if (
|
|
27052
|
-
(!i || i.instanceIds.has(n.id)) &&
|
|
27287
|
+
async function ur(e, t) {
|
|
27288
|
+
let { node: n, sourceUuids: r, accepted: i, matchKey: a, out: o } = t, s = await e.any.getAttribute(n, { name: a });
|
|
27289
|
+
if (s && !r.has(s)) {
|
|
27290
|
+
(!i || i.instanceIds.has(n.id)) && o.push(n);
|
|
27053
27291
|
return;
|
|
27054
27292
|
}
|
|
27055
|
-
for (let t of n.tree) await
|
|
27293
|
+
for (let t of n.tree) await ur(e, {
|
|
27056
27294
|
node: t,
|
|
27057
27295
|
sourceUuids: r,
|
|
27058
27296
|
accepted: i,
|
|
27059
|
-
|
|
27297
|
+
matchKey: a,
|
|
27298
|
+
out: o
|
|
27060
27299
|
});
|
|
27061
27300
|
}
|
|
27062
|
-
async function
|
|
27301
|
+
async function dr(e, t) {
|
|
27063
27302
|
let { sourceQuery: n, instanceRecord: r, sourceNode: i, accepted: a, overrides: o } = t;
|
|
27064
27303
|
if (a && !a.sourceIds.has(i.id)) return;
|
|
27065
27304
|
let s = {
|
|
27066
|
-
...
|
|
27305
|
+
...hn(await n.any.getAttributes(i)),
|
|
27067
27306
|
...o?.get(i.id)
|
|
27068
|
-
}, c =
|
|
27307
|
+
}, c = hn(await e.any.getAttributes(r)), l = {};
|
|
27069
27308
|
for (let e of new Set([...Object.keys(s), ...Object.keys(c)])) {
|
|
27070
27309
|
let t = e in s ? s[e] : void 0;
|
|
27071
27310
|
c[e] !== t && (l[e] = t);
|
|
27072
27311
|
}
|
|
27073
|
-
if (r.tagName === "LNode" && Object.keys(l).some((e) =>
|
|
27312
|
+
if (r.tagName === "LNode" && Object.keys(l).some((e) => Ie.has(e)) && await te(e, r)) for (let e of Ie) delete l[e];
|
|
27074
27313
|
Object.keys(l).length > 0 && await e.any.update(r, { attributes: l });
|
|
27075
27314
|
}
|
|
27076
|
-
async function
|
|
27077
|
-
let { node: n, index: r } = t,
|
|
27078
|
-
|
|
27079
|
-
for (let t of n.tree) await
|
|
27315
|
+
async function fr(e, t) {
|
|
27316
|
+
let { node: n, index: r, matchKey: i } = t, a = await e.any.getAttribute(n, { name: i });
|
|
27317
|
+
a && r.set(a, n);
|
|
27318
|
+
for (let t of n.tree) await fr(e, {
|
|
27080
27319
|
node: t,
|
|
27081
|
-
index: r
|
|
27320
|
+
index: r,
|
|
27321
|
+
matchKey: i
|
|
27082
27322
|
});
|
|
27083
27323
|
}
|
|
27084
|
-
async function
|
|
27324
|
+
async function pr(e, t) {
|
|
27085
27325
|
let { node: n, out: r } = t, i = await e.any.getAttribute(n, { name: "uuid" });
|
|
27086
27326
|
i && r.add(i);
|
|
27087
|
-
for (let t of n.tree) await
|
|
27327
|
+
for (let t of n.tree) await pr(e, {
|
|
27088
27328
|
node: t,
|
|
27089
27329
|
out: r
|
|
27090
27330
|
});
|
|
27091
27331
|
}
|
|
27092
27332
|
//#endregion
|
|
27093
27333
|
//#region src/v2019C1/extensions/lifecycle/engine/decide.ts
|
|
27094
|
-
function
|
|
27334
|
+
function mr(e, t) {
|
|
27335
|
+
return e?.instances.find((e) => e.rootRef?.id === t)?.groups ?? [];
|
|
27336
|
+
}
|
|
27337
|
+
function hr(e) {
|
|
27095
27338
|
return e === void 0 ? "accept" : typeof e == "string" ? e : e.action;
|
|
27096
27339
|
}
|
|
27097
|
-
function
|
|
27340
|
+
function gr(e) {
|
|
27098
27341
|
return typeof e == "object" ? e.values : void 0;
|
|
27099
27342
|
}
|
|
27100
|
-
function
|
|
27343
|
+
function _r(e) {
|
|
27101
27344
|
let t = e.decisions.get(e.group.id);
|
|
27102
|
-
return t === void 0 ? e.group.suggestedAction :
|
|
27345
|
+
return t === void 0 ? e.group.suggestedAction : hr(t);
|
|
27103
27346
|
}
|
|
27104
|
-
function
|
|
27105
|
-
return
|
|
27347
|
+
function vr(e) {
|
|
27348
|
+
return _r(e) !== "skip";
|
|
27106
27349
|
}
|
|
27107
|
-
function
|
|
27350
|
+
function yr(e) {
|
|
27108
27351
|
let { groups: t, decisions: n } = e, r = /* @__PURE__ */ new Map();
|
|
27109
27352
|
for (let e of t) {
|
|
27110
27353
|
let t = n.get(e.id);
|
|
27111
|
-
if (
|
|
27354
|
+
if (_r({
|
|
27112
27355
|
group: e,
|
|
27113
27356
|
decisions: n
|
|
27114
27357
|
}) === "skip") continue;
|
|
27115
|
-
let i =
|
|
27358
|
+
let i = gr(t), a = e.primary.sourceRef?.id;
|
|
27116
27359
|
i && a && r.set(a, i);
|
|
27117
27360
|
}
|
|
27118
27361
|
return r;
|
|
27119
27362
|
}
|
|
27120
|
-
function
|
|
27363
|
+
function br(e) {
|
|
27121
27364
|
let { groups: t, decisions: n } = e;
|
|
27122
|
-
for (let e of t) if (
|
|
27365
|
+
for (let e of t) if (vr({
|
|
27123
27366
|
group: e,
|
|
27124
27367
|
decisions: n
|
|
27125
|
-
})) for (let r of e.dependsOn) s(
|
|
27126
|
-
group:
|
|
27368
|
+
})) for (let r of e.dependsOn) s(vr({
|
|
27369
|
+
group: xr(t, r) ?? e,
|
|
27127
27370
|
decisions: n
|
|
27128
27371
|
}), { detail: `decision accepts group "${e.id}" but its dependency "${r}" is skipped` });
|
|
27129
27372
|
}
|
|
27130
|
-
function
|
|
27373
|
+
function xr(e, t) {
|
|
27131
27374
|
return e.find((e) => e.id === t);
|
|
27132
27375
|
}
|
|
27133
|
-
function
|
|
27376
|
+
function Sr(e) {
|
|
27134
27377
|
let { groups: t, decisions: n } = e, r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set();
|
|
27135
|
-
for (let e of t) if (
|
|
27378
|
+
for (let e of t) if (vr({
|
|
27136
27379
|
group: e,
|
|
27137
27380
|
decisions: n
|
|
27138
|
-
})) for (let t of [e.primary, ...e.companions])
|
|
27381
|
+
})) for (let t of [e.primary, ...e.companions]) Cr({
|
|
27139
27382
|
node: t,
|
|
27140
27383
|
sourceIds: r,
|
|
27141
27384
|
instanceIds: i
|
|
@@ -27145,89 +27388,107 @@ function sr(e) {
|
|
|
27145
27388
|
instanceIds: i
|
|
27146
27389
|
};
|
|
27147
27390
|
}
|
|
27148
|
-
function
|
|
27391
|
+
function Cr(e) {
|
|
27392
|
+
let { node: t, sourceIds: n, instanceIds: r } = e;
|
|
27393
|
+
wr({
|
|
27394
|
+
node: t,
|
|
27395
|
+
sourceIds: n,
|
|
27396
|
+
instanceIds: r
|
|
27397
|
+
});
|
|
27398
|
+
for (let e of t.children) Cr({
|
|
27399
|
+
node: e,
|
|
27400
|
+
sourceIds: n,
|
|
27401
|
+
instanceIds: r
|
|
27402
|
+
});
|
|
27403
|
+
}
|
|
27404
|
+
function wr(e) {
|
|
27149
27405
|
let { node: t, sourceIds: n, instanceIds: r } = e;
|
|
27150
|
-
t.change === "removed" || t.change === "target-only" ? t.instanceRef?.id && r.add(t.instanceRef.id) : t.sourceRef?.id && n.add(t.sourceRef.id);
|
|
27406
|
+
t.change !== "unchanged" && (t.change === "removed" || t.change === "target-only" ? t.instanceRef?.id && r.add(t.instanceRef.id) : t.sourceRef?.id && n.add(t.sourceRef.id));
|
|
27151
27407
|
}
|
|
27152
27408
|
//#endregion
|
|
27153
27409
|
//#region src/v2019C1/extensions/lifecycle/instance/composed-functions.ts
|
|
27154
|
-
async function
|
|
27410
|
+
async function Tr(e, t) {
|
|
27155
27411
|
let n = /* @__PURE__ */ new Set(), r = await e.any.getTree(t);
|
|
27156
|
-
return r && await
|
|
27412
|
+
return r && await Er(e, r, n), n;
|
|
27157
27413
|
}
|
|
27158
|
-
async function
|
|
27414
|
+
async function Er(e, t, n) {
|
|
27159
27415
|
if (t.tagName === "FunctionRef") {
|
|
27160
27416
|
let r = await e.any.getAttribute(t, { name: "functionUuid" });
|
|
27161
27417
|
r && n.add(r);
|
|
27162
27418
|
}
|
|
27163
|
-
for (let r of t.tree) await
|
|
27419
|
+
for (let r of t.tree) await Er(e, r, n);
|
|
27164
27420
|
}
|
|
27165
27421
|
//#endregion
|
|
27166
27422
|
//#region src/v2019C1/extensions/lifecycle/instance/find-instance.ts
|
|
27167
|
-
async function
|
|
27168
|
-
let { targetParent: n, tagName: r, sourceUuid: i } = t;
|
|
27423
|
+
async function Dr(e, t) {
|
|
27424
|
+
let { targetParent: n, tagName: r, sourceUuid: i, matchKey: a = "templateUuid" } = t;
|
|
27169
27425
|
if (!i) return [];
|
|
27170
|
-
let
|
|
27171
|
-
if (!
|
|
27172
|
-
let
|
|
27173
|
-
return await
|
|
27174
|
-
node:
|
|
27426
|
+
let o = await e.any.getTree(n);
|
|
27427
|
+
if (!o) return [];
|
|
27428
|
+
let s = [];
|
|
27429
|
+
return await Or(e, {
|
|
27430
|
+
node: o,
|
|
27175
27431
|
tagName: r,
|
|
27176
27432
|
sourceUuid: i,
|
|
27177
|
-
|
|
27178
|
-
|
|
27433
|
+
matchKey: a,
|
|
27434
|
+
out: s
|
|
27435
|
+
}), s;
|
|
27179
27436
|
}
|
|
27180
|
-
async function
|
|
27181
|
-
let { node: n, tagName: r, sourceUuid: i,
|
|
27182
|
-
if (n.tagName === r && await e.any.getAttribute(n, { name:
|
|
27183
|
-
|
|
27437
|
+
async function Or(e, t) {
|
|
27438
|
+
let { node: n, tagName: r, sourceUuid: i, matchKey: a, out: o } = t;
|
|
27439
|
+
if (n.tagName === r && await e.any.getAttribute(n, { name: a }) === i) {
|
|
27440
|
+
o.push(n);
|
|
27184
27441
|
return;
|
|
27185
27442
|
}
|
|
27186
|
-
for (let t of n.tree) await
|
|
27443
|
+
for (let t of n.tree) await Or(e, {
|
|
27187
27444
|
node: t,
|
|
27188
27445
|
tagName: r,
|
|
27189
27446
|
sourceUuid: i,
|
|
27190
|
-
|
|
27447
|
+
matchKey: a,
|
|
27448
|
+
out: o
|
|
27191
27449
|
});
|
|
27192
27450
|
}
|
|
27193
|
-
async function
|
|
27451
|
+
async function kr(e, t) {
|
|
27194
27452
|
let [n] = await X(e, t);
|
|
27195
27453
|
return n;
|
|
27196
27454
|
}
|
|
27197
27455
|
async function X(e, t) {
|
|
27198
|
-
let { tagName: n, sourceUuid: r } = t;
|
|
27199
|
-
if (
|
|
27200
|
-
|
|
27201
|
-
|
|
27202
|
-
|
|
27456
|
+
let { tagName: n, sourceUuid: r, sourceName: i } = t, a = await e.any.getRecordsByTagName(n), o = [];
|
|
27457
|
+
if (r) for (let t of a) await e.any.getAttribute(t, { name: "templateUuid" }) === r && o.push(t);
|
|
27458
|
+
if (o.length > 0) return o;
|
|
27459
|
+
if (!i) return [];
|
|
27460
|
+
let s = [];
|
|
27461
|
+
for (let t of a) await e.any.getAttribute(t, { name: "name" }) === i && s.push(t);
|
|
27462
|
+
return s.length === 1 ? s : [];
|
|
27203
27463
|
}
|
|
27204
27464
|
//#endregion
|
|
27205
27465
|
//#region src/v2019C1/extensions/lifecycle/update/transaction/satellite-reconcile.ts
|
|
27206
|
-
async function
|
|
27466
|
+
async function Ar(e, t) {
|
|
27207
27467
|
let { sourceQuery: n, satelliteRefs: r, instanceSatelliteRefs: i, structure: a, accepted: o } = t;
|
|
27208
27468
|
for (let t of r) {
|
|
27209
|
-
let { uuid: r } = await n.any.getAttributes(t),
|
|
27469
|
+
let { uuid: r, name: i } = await n.any.getAttributes(t), s = await kr(e, {
|
|
27210
27470
|
tagName: t.tagName,
|
|
27211
|
-
sourceUuid: r
|
|
27471
|
+
sourceUuid: r,
|
|
27472
|
+
sourceName: i
|
|
27212
27473
|
});
|
|
27213
|
-
if (
|
|
27214
|
-
await
|
|
27474
|
+
if (s) {
|
|
27475
|
+
await sr(e, {
|
|
27215
27476
|
sourceQuery: n,
|
|
27216
27477
|
sourceRootRef: t,
|
|
27217
|
-
instanceRootRef:
|
|
27478
|
+
instanceRootRef: s,
|
|
27218
27479
|
accepted: o
|
|
27219
27480
|
});
|
|
27220
27481
|
continue;
|
|
27221
27482
|
}
|
|
27222
27483
|
if (o && t.id && !o.sourceIds.has(t.id)) continue;
|
|
27223
|
-
let
|
|
27484
|
+
let c = await q(e, {
|
|
27224
27485
|
sourceQuery: n,
|
|
27225
27486
|
ref: t,
|
|
27226
27487
|
targetParent: await Y(n, t, a),
|
|
27227
27488
|
strip: !1
|
|
27228
27489
|
});
|
|
27229
|
-
|
|
27230
|
-
mappings:
|
|
27490
|
+
c && await H(e, {
|
|
27491
|
+
mappings: c.mappings,
|
|
27231
27492
|
mode: "stamp-template"
|
|
27232
27493
|
});
|
|
27233
27494
|
}
|
|
@@ -27238,26 +27499,26 @@ async function mr(e, t) {
|
|
|
27238
27499
|
tagName: t.tagName,
|
|
27239
27500
|
attributes: { uuid: r }
|
|
27240
27501
|
});
|
|
27241
|
-
i || o && t.id && !o.instanceIds.has(t.id) || (await
|
|
27502
|
+
i || o && t.id && !o.instanceIds.has(t.id) || (await I(e, { target: t })).length > 0 || await e.delete(t);
|
|
27242
27503
|
}
|
|
27243
27504
|
}
|
|
27244
27505
|
//#endregion
|
|
27245
27506
|
//#region src/v2019C1/extensions/lifecycle/cross-cutting/applied-satellites.constants.ts
|
|
27246
|
-
var
|
|
27507
|
+
var jr = ["Variable", "BehaviorDescription"];
|
|
27247
27508
|
//#endregion
|
|
27248
27509
|
//#region src/v2019C1/extensions/lifecycle/cross-cutting/applied-satellites.ts
|
|
27249
27510
|
async function Z(e, t) {
|
|
27250
27511
|
let { primaryRef: n } = t, r = await e.any.getTree(n);
|
|
27251
27512
|
if (!r) return [];
|
|
27252
27513
|
let i = /* @__PURE__ */ new Set(), o = [];
|
|
27253
|
-
|
|
27514
|
+
Mr({
|
|
27254
27515
|
node: r,
|
|
27255
27516
|
subtreeIds: i,
|
|
27256
27517
|
targets: o
|
|
27257
27518
|
});
|
|
27258
27519
|
let s = /* @__PURE__ */ new Set(), c = [];
|
|
27259
|
-
for (let t of o) for (let n of
|
|
27260
|
-
let r = await
|
|
27520
|
+
for (let t of o) for (let n of jr) {
|
|
27521
|
+
let r = await z.query.findRefsPointingTo(e, {
|
|
27261
27522
|
target: a(t),
|
|
27262
27523
|
containerTagName: n
|
|
27263
27524
|
});
|
|
@@ -27265,10 +27526,10 @@ async function Z(e, t) {
|
|
|
27265
27526
|
}
|
|
27266
27527
|
return c;
|
|
27267
27528
|
}
|
|
27268
|
-
function
|
|
27529
|
+
function Mr(e) {
|
|
27269
27530
|
let { node: t, subtreeIds: n, targets: r } = e;
|
|
27270
27531
|
n.add(t.id), t.attributes.some((e) => e.name === "uuid") && r.push(t);
|
|
27271
|
-
for (let e of t.tree)
|
|
27532
|
+
for (let e of t.tree) Mr({
|
|
27272
27533
|
node: e,
|
|
27273
27534
|
subtreeIds: n,
|
|
27274
27535
|
targets: r
|
|
@@ -27276,9 +27537,9 @@ function gr(e) {
|
|
|
27276
27537
|
}
|
|
27277
27538
|
//#endregion
|
|
27278
27539
|
//#region src/v2019C1/extensions/lifecycle/update/transaction/cross-cutting-satellites.ts
|
|
27279
|
-
async function
|
|
27540
|
+
async function Nr(e, t) {
|
|
27280
27541
|
let { sourceQuery: n, primaryRef: r, instancePrimaryRef: i, structure: a, accepted: o } = t;
|
|
27281
|
-
await
|
|
27542
|
+
await Ar(e, {
|
|
27282
27543
|
sourceQuery: n,
|
|
27283
27544
|
satelliteRefs: await Z(n, { primaryRef: r }),
|
|
27284
27545
|
instanceSatelliteRefs: i ? await Z(e, { primaryRef: i }) : [],
|
|
@@ -27299,12 +27560,12 @@ async function Q(e, t) {
|
|
|
27299
27560
|
}
|
|
27300
27561
|
//#endregion
|
|
27301
27562
|
//#region src/v2019C1/extensions/lifecycle/cross-cutting/clone-applied-satellites.ts
|
|
27302
|
-
async function
|
|
27563
|
+
async function Pr(e, t) {
|
|
27303
27564
|
let { sourceQuery: n, primaryRef: r, structure: i, strip: a = !0 } = t, o = await Z(n, { primaryRef: r }), s = [];
|
|
27304
27565
|
for (let t of o) {
|
|
27305
|
-
let r = await
|
|
27566
|
+
let r = await Fr(e, n, t);
|
|
27306
27567
|
if (r) {
|
|
27307
|
-
let i = await
|
|
27568
|
+
let i = await ir(e, {
|
|
27308
27569
|
sourceQuery: n,
|
|
27309
27570
|
source: t,
|
|
27310
27571
|
target: r,
|
|
@@ -27313,7 +27574,7 @@ async function vr(e, t) {
|
|
|
27313
27574
|
s.push(...i);
|
|
27314
27575
|
continue;
|
|
27315
27576
|
}
|
|
27316
|
-
let o = await
|
|
27577
|
+
let o = await q(e, {
|
|
27317
27578
|
sourceQuery: n,
|
|
27318
27579
|
ref: t,
|
|
27319
27580
|
targetParent: await Y(n, t, i),
|
|
@@ -27323,7 +27584,7 @@ async function vr(e, t) {
|
|
|
27323
27584
|
}
|
|
27324
27585
|
return s;
|
|
27325
27586
|
}
|
|
27326
|
-
async function
|
|
27587
|
+
async function Fr(e, t, n) {
|
|
27327
27588
|
let r = await t.any.getRecord(n);
|
|
27328
27589
|
if (!r) return;
|
|
27329
27590
|
let i = await t.any.getAttribute(r, { name: "name" });
|
|
@@ -27339,7 +27600,7 @@ async function yr(e, t, n) {
|
|
|
27339
27600
|
}
|
|
27340
27601
|
//#endregion
|
|
27341
27602
|
//#region src/v2019C1/extensions/lifecycle/layers/function/clone-function.ts
|
|
27342
|
-
async function
|
|
27603
|
+
async function Ir(e, t) {
|
|
27343
27604
|
let { sourceQuery: n, functionRef: r, targetParentRef: i, omit: a, stripRootAttributes: o, keepNameTypesFrom: s } = t, { recordMappings: c } = await J(e, {
|
|
27344
27605
|
sourceQuery: n,
|
|
27345
27606
|
ref: r,
|
|
@@ -27357,15 +27618,15 @@ async function br(e, t) {
|
|
|
27357
27618
|
});
|
|
27358
27619
|
return c;
|
|
27359
27620
|
}
|
|
27360
|
-
async function
|
|
27361
|
-
let { sourceQuery: n, functionRef: r, structure: i, stripCategoriesUuid: a = !0 } = t, o = await
|
|
27621
|
+
async function Lr(e, t) {
|
|
27622
|
+
let { sourceQuery: n, functionRef: r, structure: i, stripCategoriesUuid: a = !0 } = t, o = await Rr(n, r), s = [];
|
|
27362
27623
|
for (let t of o) {
|
|
27363
27624
|
let r = {
|
|
27364
27625
|
tagName: "FunctionCategory",
|
|
27365
27626
|
id: t
|
|
27366
|
-
}, o = await
|
|
27627
|
+
}, o = await Br(e, n, t);
|
|
27367
27628
|
if (o) {
|
|
27368
|
-
let t = await
|
|
27629
|
+
let t = await ir(e, {
|
|
27369
27630
|
sourceQuery: n,
|
|
27370
27631
|
source: r,
|
|
27371
27632
|
target: o,
|
|
@@ -27374,7 +27635,7 @@ async function xr(e, t) {
|
|
|
27374
27635
|
s.push(...t);
|
|
27375
27636
|
continue;
|
|
27376
27637
|
}
|
|
27377
|
-
let c = await
|
|
27638
|
+
let c = await q(e, {
|
|
27378
27639
|
sourceQuery: n,
|
|
27379
27640
|
ref: r,
|
|
27380
27641
|
targetParent: await Y(n, r, i),
|
|
@@ -27384,18 +27645,18 @@ async function xr(e, t) {
|
|
|
27384
27645
|
}
|
|
27385
27646
|
return s;
|
|
27386
27647
|
}
|
|
27387
|
-
async function
|
|
27388
|
-
let n = await
|
|
27648
|
+
async function Rr(e, t) {
|
|
27649
|
+
let n = await zr(e, t), r = /* @__PURE__ */ new Set();
|
|
27389
27650
|
for (let { container: e } of n) e && r.add(e.id);
|
|
27390
27651
|
return r;
|
|
27391
27652
|
}
|
|
27392
|
-
async function
|
|
27393
|
-
let n = await
|
|
27653
|
+
async function zr(e, t) {
|
|
27654
|
+
let n = await z.query.findRefsPointingTo(e, {
|
|
27394
27655
|
target: t,
|
|
27395
27656
|
containerTagName: "FunctionCategory"
|
|
27396
27657
|
}), { SubFunction: r = [] } = await e.findDescendants(t, { collect: "SubFunction" });
|
|
27397
27658
|
for (let t of r) {
|
|
27398
|
-
let r = await
|
|
27659
|
+
let r = await z.query.findRefsPointingTo(e, {
|
|
27399
27660
|
target: {
|
|
27400
27661
|
tagName: "SubFunction",
|
|
27401
27662
|
id: t.id
|
|
@@ -27406,7 +27667,7 @@ async function Cr(e, t) {
|
|
|
27406
27667
|
}
|
|
27407
27668
|
return n;
|
|
27408
27669
|
}
|
|
27409
|
-
async function
|
|
27670
|
+
async function Br(e, t, n) {
|
|
27410
27671
|
let r = await t.getRecord({
|
|
27411
27672
|
tagName: "FunctionCategory",
|
|
27412
27673
|
id: n
|
|
@@ -27425,18 +27686,18 @@ async function wr(e, t, n) {
|
|
|
27425
27686
|
}
|
|
27426
27687
|
//#endregion
|
|
27427
27688
|
//#region src/v2019C1/extensions/lifecycle/layers/function/satellites.constants.ts
|
|
27428
|
-
var
|
|
27689
|
+
var Vr = ["FunctionCategory"];
|
|
27429
27690
|
//#endregion
|
|
27430
27691
|
//#region src/v2019C1/extensions/lifecycle/layers/function/satellites.ts
|
|
27431
|
-
async function
|
|
27692
|
+
async function Hr(e, t) {
|
|
27432
27693
|
let { primaryRef: n } = t, r = [n], { SubFunction: i = [] } = await e.findDescendants(n, { collect: "SubFunction" });
|
|
27433
27694
|
for (let e of i) r.push({
|
|
27434
27695
|
tagName: "SubFunction",
|
|
27435
27696
|
id: e.id
|
|
27436
27697
|
});
|
|
27437
27698
|
let o = /* @__PURE__ */ new Set(), s = [];
|
|
27438
|
-
for (let t of r) for (let n of
|
|
27439
|
-
let r = await
|
|
27699
|
+
for (let t of r) for (let n of Vr) {
|
|
27700
|
+
let r = await z.query.findRefsPointingTo(e, {
|
|
27440
27701
|
target: t,
|
|
27441
27702
|
containerTagName: n
|
|
27442
27703
|
});
|
|
@@ -27446,7 +27707,7 @@ async function Er(e, t) {
|
|
|
27446
27707
|
}
|
|
27447
27708
|
//#endregion
|
|
27448
27709
|
//#region src/v2019C1/extensions/lifecycle/instantiate/transaction/fsd.ts
|
|
27449
|
-
async function
|
|
27710
|
+
async function Ur(e, t) {
|
|
27450
27711
|
let { sourceQuery: n, functionRef: r, targetParent: i, overrides: a, keepNameTypesFrom: o } = t, { recordMappings: s } = await J(e, {
|
|
27451
27712
|
sourceQuery: n,
|
|
27452
27713
|
ref: r,
|
|
@@ -27457,52 +27718,52 @@ async function Dr(e, t) {
|
|
|
27457
27718
|
to: "SubFunction"
|
|
27458
27719
|
} : void 0,
|
|
27459
27720
|
withTypes: { keepNameFrom: o }
|
|
27460
|
-
}), c = await Q(e, i), l = await
|
|
27721
|
+
}), c = await Q(e, i), l = await Lr(e, {
|
|
27461
27722
|
sourceQuery: n,
|
|
27462
27723
|
functionRef: r,
|
|
27463
27724
|
structure: c,
|
|
27464
27725
|
stripCategoriesUuid: !1
|
|
27465
|
-
}), u = await
|
|
27726
|
+
}), u = await Pr(e, {
|
|
27466
27727
|
sourceQuery: n,
|
|
27467
27728
|
primaryRef: r,
|
|
27468
27729
|
structure: c,
|
|
27469
27730
|
strip: !1
|
|
27470
|
-
})
|
|
27471
|
-
|
|
27472
|
-
|
|
27473
|
-
|
|
27474
|
-
|
|
27475
|
-
|
|
27476
|
-
|
|
27731
|
+
}), d = [
|
|
27732
|
+
...s,
|
|
27733
|
+
...l,
|
|
27734
|
+
...u
|
|
27735
|
+
];
|
|
27736
|
+
await R(e, { mappings: d }), await H(e, {
|
|
27737
|
+
mappings: d,
|
|
27477
27738
|
mode: "stamp-template"
|
|
27478
27739
|
});
|
|
27479
|
-
let
|
|
27480
|
-
if (!
|
|
27481
|
-
let
|
|
27482
|
-
return await
|
|
27483
|
-
ref:
|
|
27740
|
+
let f = s.find((e) => e.source.id === r.id);
|
|
27741
|
+
if (!f) throw Error(`instantiate.fsd: cloned root not found for ${r.tagName}#${r.id}`);
|
|
27742
|
+
let p = f.target;
|
|
27743
|
+
return await K(e, {
|
|
27744
|
+
ref: p,
|
|
27484
27745
|
parentRef: i,
|
|
27485
27746
|
overrides: a?.get(r.id)
|
|
27486
|
-
}), await
|
|
27747
|
+
}), await _t(e, {
|
|
27487
27748
|
sourceQuery: n,
|
|
27488
|
-
targetRoot:
|
|
27749
|
+
targetRoot: p,
|
|
27489
27750
|
fileType: "FSD"
|
|
27490
27751
|
}), {
|
|
27491
|
-
functionRef:
|
|
27752
|
+
functionRef: p,
|
|
27492
27753
|
recordMappings: s
|
|
27493
27754
|
};
|
|
27494
27755
|
}
|
|
27495
27756
|
//#endregion
|
|
27496
27757
|
//#region src/v2019C1/extensions/lifecycle/layers/application/clone-application.ts
|
|
27497
|
-
async function
|
|
27498
|
-
let { sourceQuery: n, applicationRef: r, structure: i, omit: a, keepNameTypesFrom: o } = t, s = /* @__PURE__ */ new Map(), c = [], l = await
|
|
27758
|
+
async function Wr(e, t) {
|
|
27759
|
+
let { sourceQuery: n, applicationRef: r, structure: i, omit: a, keepNameTypesFrom: o } = t, s = /* @__PURE__ */ new Map(), c = [], l = await tr(e, {
|
|
27499
27760
|
sourceQuery: n,
|
|
27500
27761
|
scopeRef: r,
|
|
27501
27762
|
refTagName: "FunctionRef",
|
|
27502
27763
|
targetTagName: "Function"
|
|
27503
27764
|
});
|
|
27504
27765
|
for (let t of l) {
|
|
27505
|
-
let r = await
|
|
27766
|
+
let r = await Ir(e, {
|
|
27506
27767
|
sourceQuery: n,
|
|
27507
27768
|
functionRef: t,
|
|
27508
27769
|
targetParentRef: await Y(n, t, i),
|
|
@@ -27513,7 +27774,7 @@ async function Or(e, t) {
|
|
|
27513
27774
|
for (let e of r) e.source.id && s.set(e.source.id, e.target);
|
|
27514
27775
|
}
|
|
27515
27776
|
for (let t of l) {
|
|
27516
|
-
let r = await
|
|
27777
|
+
let r = await Lr(e, {
|
|
27517
27778
|
sourceQuery: n,
|
|
27518
27779
|
functionRef: t,
|
|
27519
27780
|
structure: i,
|
|
@@ -27521,16 +27782,16 @@ async function Or(e, t) {
|
|
|
27521
27782
|
});
|
|
27522
27783
|
c.push(...r);
|
|
27523
27784
|
}
|
|
27524
|
-
let u = await
|
|
27785
|
+
let u = await Gr(e, {
|
|
27525
27786
|
sourceQuery: n,
|
|
27526
27787
|
applicationRef: r
|
|
27527
27788
|
});
|
|
27528
27789
|
for (let e of u) s.set(e.sourceId, e.existingRef);
|
|
27529
|
-
let d = new Set(["FunctionRef", "FunctionCategoryRef"]), f = await
|
|
27790
|
+
let d = new Set(["FunctionRef", "FunctionCategoryRef"]), f = await rr(e, {
|
|
27530
27791
|
sourceQuery: n,
|
|
27531
27792
|
scopeTagName: "Application",
|
|
27532
27793
|
scopeRef: r,
|
|
27533
|
-
resolveTargetParent:
|
|
27794
|
+
resolveTargetParent: or({
|
|
27534
27795
|
sourceQuery: n,
|
|
27535
27796
|
structure: i,
|
|
27536
27797
|
cloneIndex: s
|
|
@@ -27540,7 +27801,7 @@ async function Or(e, t) {
|
|
|
27540
27801
|
omit: a
|
|
27541
27802
|
});
|
|
27542
27803
|
c.push(...f);
|
|
27543
|
-
let p = await
|
|
27804
|
+
let p = await q(e, {
|
|
27544
27805
|
sourceQuery: n,
|
|
27545
27806
|
ref: r,
|
|
27546
27807
|
targetParent: await Y(n, r, i),
|
|
@@ -27559,7 +27820,7 @@ async function Or(e, t) {
|
|
|
27559
27820
|
}
|
|
27560
27821
|
return c;
|
|
27561
27822
|
}
|
|
27562
|
-
async function
|
|
27823
|
+
async function Gr(e, t) {
|
|
27563
27824
|
let { sourceQuery: n, applicationRef: r } = t, { AllocationRoleRef: i = [] } = await n.findDescendants(r, { collect: "AllocationRoleRef" }), a = [], o = /* @__PURE__ */ new Set();
|
|
27564
27825
|
for (let t of i) {
|
|
27565
27826
|
let r = t.attributes.find((e) => e.name === "allocationRoleUuid")?.value;
|
|
@@ -27583,7 +27844,7 @@ async function kr(e, t) {
|
|
|
27583
27844
|
tagName: "AllocationRole",
|
|
27584
27845
|
id: c.id
|
|
27585
27846
|
};
|
|
27586
|
-
await
|
|
27847
|
+
await Qn(e, {
|
|
27587
27848
|
sourceQuery: n,
|
|
27588
27849
|
source: {
|
|
27589
27850
|
tagName: "AllocationRole",
|
|
@@ -27602,20 +27863,20 @@ async function kr(e, t) {
|
|
|
27602
27863
|
}
|
|
27603
27864
|
//#endregion
|
|
27604
27865
|
//#region src/v2019C1/extensions/lifecycle/layers/application/satellites.constants.ts
|
|
27605
|
-
var
|
|
27866
|
+
var Kr = [{
|
|
27606
27867
|
refTag: "AllocationRoleRef",
|
|
27607
27868
|
uuidAttr: "allocationRoleUuid",
|
|
27608
27869
|
targetTag: "AllocationRole"
|
|
27609
27870
|
}];
|
|
27610
27871
|
//#endregion
|
|
27611
27872
|
//#region src/v2019C1/extensions/lifecycle/layers/application/satellites.ts
|
|
27612
|
-
async function
|
|
27873
|
+
async function qr(e, t) {
|
|
27613
27874
|
let { applicationRef: n } = t, r = await e.any.getTree(n);
|
|
27614
27875
|
if (!r) return [];
|
|
27615
27876
|
let i = /* @__PURE__ */ new Set(), o = [];
|
|
27616
|
-
for (let t of
|
|
27877
|
+
for (let t of Kr) {
|
|
27617
27878
|
let n = /* @__PURE__ */ new Set();
|
|
27618
|
-
await
|
|
27879
|
+
await Jr(e, {
|
|
27619
27880
|
node: r,
|
|
27620
27881
|
refTag: t.refTag,
|
|
27621
27882
|
uuidAttr: t.uuidAttr,
|
|
@@ -27631,13 +27892,13 @@ async function jr(e, t) {
|
|
|
27631
27892
|
}
|
|
27632
27893
|
return o;
|
|
27633
27894
|
}
|
|
27634
|
-
async function
|
|
27895
|
+
async function Jr(e, t) {
|
|
27635
27896
|
let { node: n, refTag: r, uuidAttr: i, out: a } = t;
|
|
27636
27897
|
if (n.tagName === r) {
|
|
27637
27898
|
let t = await e.any.getAttribute(n, { name: i });
|
|
27638
27899
|
t && a.add(t);
|
|
27639
27900
|
}
|
|
27640
|
-
for (let t of n.tree) await
|
|
27901
|
+
for (let t of n.tree) await Jr(e, {
|
|
27641
27902
|
node: t,
|
|
27642
27903
|
refTag: r,
|
|
27643
27904
|
uuidAttr: i,
|
|
@@ -27646,78 +27907,79 @@ async function Mr(e, t) {
|
|
|
27646
27907
|
}
|
|
27647
27908
|
//#endregion
|
|
27648
27909
|
//#region src/v2019C1/extensions/lifecycle/instantiate/transaction/asd.ts
|
|
27649
|
-
async function
|
|
27650
|
-
let { sourceQuery: n, applicationRef: r, targetParent: i, overrides: a, keepNameTypesFrom: o } = t, s = await Q(e, i), c = await
|
|
27910
|
+
async function Yr(e, t) {
|
|
27911
|
+
let { sourceQuery: n, applicationRef: r, targetParent: i, overrides: a, keepNameTypesFrom: o } = t, s = await Q(e, i), c = await tr(e, {
|
|
27651
27912
|
sourceQuery: n,
|
|
27652
27913
|
scopeRef: r,
|
|
27653
27914
|
refTagName: "FunctionRef",
|
|
27654
27915
|
targetTagName: "Function"
|
|
27655
|
-
}), l = await
|
|
27916
|
+
}), l = await Wr(e, {
|
|
27656
27917
|
sourceQuery: n,
|
|
27657
27918
|
applicationRef: r,
|
|
27658
27919
|
structure: s,
|
|
27659
27920
|
keepNameTypesFrom: o
|
|
27660
|
-
}), u = await
|
|
27921
|
+
}), u = await Pr(e, {
|
|
27661
27922
|
sourceQuery: n,
|
|
27662
27923
|
primaryRef: r,
|
|
27663
27924
|
structure: s,
|
|
27664
27925
|
strip: !1
|
|
27665
|
-
});
|
|
27666
|
-
await
|
|
27667
|
-
mappings:
|
|
27926
|
+
}), d = [...l, ...u];
|
|
27927
|
+
await R(e, { mappings: d }), await H(e, {
|
|
27928
|
+
mappings: d,
|
|
27668
27929
|
mode: "stamp-template"
|
|
27669
27930
|
});
|
|
27670
27931
|
for (let t of c) {
|
|
27671
27932
|
let r = l.find((e) => e.source.id === t.id);
|
|
27672
27933
|
if (!r) continue;
|
|
27673
27934
|
let i = await Y(n, t, s);
|
|
27674
|
-
await
|
|
27935
|
+
await K(e, {
|
|
27675
27936
|
ref: r.target,
|
|
27676
27937
|
parentRef: i,
|
|
27677
27938
|
overrides: a?.get(t.id)
|
|
27678
27939
|
});
|
|
27679
27940
|
}
|
|
27680
|
-
let
|
|
27681
|
-
if (!
|
|
27682
|
-
let
|
|
27683
|
-
await
|
|
27684
|
-
ref:
|
|
27685
|
-
parentRef:
|
|
27941
|
+
let f = l.find((e) => e.source.id === r.id);
|
|
27942
|
+
if (!f) throw Error(`instantiate.asd: cloned Application not found for ${r.id}`);
|
|
27943
|
+
let p = await Y(n, r, s);
|
|
27944
|
+
await K(e, {
|
|
27945
|
+
ref: f.target,
|
|
27946
|
+
parentRef: p,
|
|
27686
27947
|
overrides: a?.get(r.id)
|
|
27687
|
-
}), await
|
|
27948
|
+
}), await _t(e, {
|
|
27688
27949
|
sourceQuery: n,
|
|
27689
|
-
targetRoot:
|
|
27950
|
+
targetRoot: f.target,
|
|
27690
27951
|
fileType: "ASD"
|
|
27691
27952
|
});
|
|
27692
|
-
let
|
|
27953
|
+
let m = c.map((e) => l.find((t) => t.source.id === e.id)?.target).filter((e) => !!e);
|
|
27693
27954
|
return {
|
|
27694
|
-
applicationRef:
|
|
27695
|
-
composedFunctionRefs:
|
|
27955
|
+
applicationRef: f.target,
|
|
27956
|
+
composedFunctionRefs: m,
|
|
27696
27957
|
recordMappings: l
|
|
27697
27958
|
};
|
|
27698
27959
|
}
|
|
27699
27960
|
//#endregion
|
|
27700
27961
|
//#region src/v2019C1/extensions/lifecycle/update/transaction/function-satellites.ts
|
|
27701
|
-
async function
|
|
27702
|
-
let { sourceQuery: n, functionRef: r, instanceRef: i, targetParent: a, accepted: o } = t, s = await
|
|
27962
|
+
async function Xr(e, t) {
|
|
27963
|
+
let { sourceQuery: n, functionRef: r, instanceRef: i, targetParent: a, accepted: o } = t, s = await Hr(n, { primaryRef: r }), c = !1;
|
|
27703
27964
|
for (let t of s) {
|
|
27704
|
-
let { uuid: r } = await n.any.getAttributes(t),
|
|
27965
|
+
let { uuid: r, name: i } = await n.any.getAttributes(t), a = await kr(e, {
|
|
27705
27966
|
tagName: t.tagName,
|
|
27706
|
-
sourceUuid: r
|
|
27967
|
+
sourceUuid: r,
|
|
27968
|
+
sourceName: i
|
|
27707
27969
|
});
|
|
27708
|
-
if (!
|
|
27970
|
+
if (!a) {
|
|
27709
27971
|
c = !0;
|
|
27710
27972
|
continue;
|
|
27711
27973
|
}
|
|
27712
|
-
await
|
|
27974
|
+
await sr(e, {
|
|
27713
27975
|
sourceQuery: n,
|
|
27714
27976
|
sourceRootRef: t,
|
|
27715
|
-
instanceRootRef:
|
|
27977
|
+
instanceRootRef: a,
|
|
27716
27978
|
accepted: o
|
|
27717
27979
|
});
|
|
27718
27980
|
}
|
|
27719
|
-
c && (!o || o.sourceIds.has(r.id)) && await
|
|
27720
|
-
mappings: await
|
|
27981
|
+
c && (!o || o.sourceIds.has(r.id)) && await H(e, {
|
|
27982
|
+
mappings: await Lr(e, {
|
|
27721
27983
|
sourceQuery: n,
|
|
27722
27984
|
functionRef: r,
|
|
27723
27985
|
structure: await Q(e, a),
|
|
@@ -27725,7 +27987,7 @@ async function Pr(e, t) {
|
|
|
27725
27987
|
}),
|
|
27726
27988
|
mode: "stamp-template"
|
|
27727
27989
|
});
|
|
27728
|
-
let l = await
|
|
27990
|
+
let l = await Hr(e, { primaryRef: {
|
|
27729
27991
|
tagName: "Function",
|
|
27730
27992
|
id: i.id
|
|
27731
27993
|
} });
|
|
@@ -27736,27 +27998,36 @@ async function Pr(e, t) {
|
|
|
27736
27998
|
tagName: t.tagName,
|
|
27737
27999
|
attributes: { uuid: r }
|
|
27738
28000
|
});
|
|
27739
|
-
i || o && t.id && !o.instanceIds.has(t.id) || (await
|
|
28001
|
+
i || o && t.id && !o.instanceIds.has(t.id) || (await I(e, { target: t })).length > 0 || await e.delete(t);
|
|
27740
28002
|
}
|
|
27741
28003
|
}
|
|
27742
28004
|
//#endregion
|
|
28005
|
+
//#region src/v2019C1/extensions/lifecycle/scenario.ts
|
|
28006
|
+
function Zr(e) {
|
|
28007
|
+
return e === "fork" ? "uuid" : "templateUuid";
|
|
28008
|
+
}
|
|
28009
|
+
function Qr(e) {
|
|
28010
|
+
return e === "fork" ? "keep" : "stamp-template";
|
|
28011
|
+
}
|
|
28012
|
+
//#endregion
|
|
27743
28013
|
//#region src/v2019C1/extensions/lifecycle/update/transaction/fsd.ts
|
|
27744
|
-
async function
|
|
27745
|
-
let { sourceQuery: n, functionRef: r, targetParent: i, scenario: a, report: o, decisions: s, keepNameTypesFrom: c } = t, { uuid: l } = await n.getAttributes(r), u = a === "instantiate" ? [] : await
|
|
28014
|
+
async function $r(e, t) {
|
|
28015
|
+
let { sourceQuery: n, functionRef: r, targetParent: i, scenario: a, report: o, decisions: s, keepNameTypesFrom: c } = t, { uuid: l } = await n.getAttributes(r), u = Zr(a), d = Qr(a), f = a === "instantiate" ? [] : await Dr(e, {
|
|
27746
28016
|
targetParent: i,
|
|
27747
28017
|
tagName: "Function",
|
|
27748
|
-
sourceUuid: l
|
|
27749
|
-
|
|
27750
|
-
|
|
27751
|
-
|
|
27752
|
-
|
|
28018
|
+
sourceUuid: l,
|
|
28019
|
+
matchKey: u
|
|
28020
|
+
}), p = o ? U(o) : [];
|
|
28021
|
+
if (f.length === 0) {
|
|
28022
|
+
let t = s ? Sr({
|
|
28023
|
+
groups: p,
|
|
27753
28024
|
decisions: s
|
|
27754
|
-
}) : void 0, a = s ?
|
|
27755
|
-
groups:
|
|
28025
|
+
}) : void 0, a = s ? yr({
|
|
28026
|
+
groups: p,
|
|
27756
28027
|
decisions: s
|
|
27757
28028
|
}) : void 0;
|
|
27758
28029
|
if (t && !t.sourceIds.has(r.id)) return [];
|
|
27759
|
-
let { functionRef: o } = await
|
|
28030
|
+
let { functionRef: o } = await Ur(e, {
|
|
27760
28031
|
sourceQuery: n,
|
|
27761
28032
|
functionRef: r,
|
|
27762
28033
|
targetParent: i,
|
|
@@ -27765,72 +28036,71 @@ async function Fr(e, t) {
|
|
|
27765
28036
|
});
|
|
27766
28037
|
return [o];
|
|
27767
28038
|
}
|
|
27768
|
-
let
|
|
27769
|
-
for (let t of
|
|
27770
|
-
let { instanceAccepted: a, instanceOverrides:
|
|
27771
|
-
|
|
27772
|
-
groups: d,
|
|
28039
|
+
let m = await Q(e, i);
|
|
28040
|
+
for (let t of f) {
|
|
28041
|
+
let { instanceAccepted: a, instanceOverrides: l } = ei({
|
|
28042
|
+
instanceGroups: mr(o, t.id),
|
|
27773
28043
|
decisions: s
|
|
27774
28044
|
});
|
|
27775
|
-
await
|
|
28045
|
+
await sr(e, {
|
|
27776
28046
|
sourceQuery: n,
|
|
27777
28047
|
sourceRootRef: r,
|
|
27778
28048
|
instanceRootRef: t,
|
|
27779
28049
|
accepted: a,
|
|
27780
|
-
overrides:
|
|
27781
|
-
keepNameTypesFrom: c
|
|
27782
|
-
|
|
28050
|
+
overrides: l,
|
|
28051
|
+
keepNameTypesFrom: c,
|
|
28052
|
+
matchKey: u,
|
|
28053
|
+
identityMode: d
|
|
28054
|
+
}), await Xr(e, {
|
|
27783
28055
|
sourceQuery: n,
|
|
27784
28056
|
functionRef: r,
|
|
27785
28057
|
instanceRef: t,
|
|
27786
28058
|
targetParent: i,
|
|
27787
28059
|
accepted: a
|
|
27788
|
-
}), await
|
|
28060
|
+
}), await Nr(e, {
|
|
27789
28061
|
sourceQuery: n,
|
|
27790
28062
|
primaryRef: r,
|
|
27791
28063
|
instancePrimaryRef: {
|
|
27792
28064
|
tagName: "Function",
|
|
27793
28065
|
id: t.id
|
|
27794
28066
|
},
|
|
27795
|
-
structure:
|
|
28067
|
+
structure: m,
|
|
27796
28068
|
accepted: a
|
|
27797
28069
|
});
|
|
27798
28070
|
}
|
|
27799
|
-
return
|
|
28071
|
+
return f.map((e) => ({
|
|
27800
28072
|
tagName: "Function",
|
|
27801
28073
|
id: e.id
|
|
27802
28074
|
}));
|
|
27803
28075
|
}
|
|
27804
|
-
function
|
|
27805
|
-
let {
|
|
27806
|
-
|
|
27807
|
-
instanceAccepted:
|
|
27808
|
-
|
|
27809
|
-
|
|
27810
|
-
let i = n.filter((e) => e.instanceScopeId === t);
|
|
27811
|
-
return {
|
|
27812
|
-
instanceAccepted: sr({
|
|
27813
|
-
groups: i,
|
|
27814
|
-
decisions: r
|
|
28076
|
+
function ei(e) {
|
|
28077
|
+
let { instanceGroups: t, decisions: n } = e;
|
|
28078
|
+
return n ? {
|
|
28079
|
+
instanceAccepted: Sr({
|
|
28080
|
+
groups: t,
|
|
28081
|
+
decisions: n
|
|
27815
28082
|
}),
|
|
27816
|
-
instanceOverrides:
|
|
27817
|
-
groups:
|
|
27818
|
-
decisions:
|
|
28083
|
+
instanceOverrides: yr({
|
|
28084
|
+
groups: t,
|
|
28085
|
+
decisions: n
|
|
27819
28086
|
})
|
|
28087
|
+
} : {
|
|
28088
|
+
instanceAccepted: void 0,
|
|
28089
|
+
instanceOverrides: void 0
|
|
27820
28090
|
};
|
|
27821
28091
|
}
|
|
27822
28092
|
//#endregion
|
|
27823
28093
|
//#region src/v2019C1/extensions/lifecycle/update/transaction/asd.ts
|
|
27824
|
-
async function
|
|
28094
|
+
async function ti(e, t) {
|
|
27825
28095
|
let { sourceQuery: n, applicationRef: r, targetParent: i, scenario: a, report: o, decisions: s, keepNameTypesFrom: c } = t, { uuid: l } = await n.getAttributes(r), u = a === "instantiate" ? [] : await X(e, {
|
|
27826
28096
|
tagName: "Application",
|
|
27827
28097
|
sourceUuid: l
|
|
27828
|
-
}), d = o
|
|
28098
|
+
}), d = o ? U(o) : [];
|
|
27829
28099
|
if (u.length === 0) {
|
|
27830
|
-
let t = s ?
|
|
28100
|
+
let t = s ? Sr({
|
|
27831
28101
|
groups: d,
|
|
27832
28102
|
decisions: s
|
|
27833
|
-
}) : void 0, a = s ?
|
|
28103
|
+
}) : void 0, a = s ? yr({
|
|
27834
28104
|
groups: d,
|
|
27835
28105
|
decisions: s
|
|
27836
28106
|
}) : void 0;
|
|
@@ -27838,7 +28108,7 @@ async function Lr(e, t) {
|
|
|
27838
28108
|
applications: [],
|
|
27839
28109
|
functions: []
|
|
27840
28110
|
};
|
|
27841
|
-
let { applicationRef: o, composedFunctionRefs: l } = await
|
|
28111
|
+
let { applicationRef: o, composedFunctionRefs: l } = await Yr(e, {
|
|
27842
28112
|
sourceQuery: n,
|
|
27843
28113
|
applicationRef: r,
|
|
27844
28114
|
targetParent: i,
|
|
@@ -27850,12 +28120,12 @@ async function Lr(e, t) {
|
|
|
27850
28120
|
functions: l
|
|
27851
28121
|
};
|
|
27852
28122
|
}
|
|
27853
|
-
let f = await Q(e, i), p = await
|
|
28123
|
+
let f = await Q(e, i), p = await qr(n, { applicationRef: r }), m = [];
|
|
27854
28124
|
for (let t of u) {
|
|
27855
|
-
let i =
|
|
28125
|
+
let i = mr(o, t.id), a = s ? Sr({
|
|
27856
28126
|
groups: i,
|
|
27857
28127
|
decisions: s
|
|
27858
|
-
}) : void 0,
|
|
28128
|
+
}) : void 0, l = s ? yr({
|
|
27859
28129
|
groups: i,
|
|
27860
28130
|
decisions: s
|
|
27861
28131
|
}) : void 0;
|
|
@@ -27863,24 +28133,24 @@ async function Lr(e, t) {
|
|
|
27863
28133
|
tagName: "Application",
|
|
27864
28134
|
id: t.id
|
|
27865
28135
|
});
|
|
27866
|
-
let
|
|
28136
|
+
let u = await qr(e, { applicationRef: {
|
|
27867
28137
|
tagName: "Application",
|
|
27868
28138
|
id: t.id
|
|
27869
28139
|
} });
|
|
27870
|
-
await
|
|
28140
|
+
await sr(e, {
|
|
27871
28141
|
sourceQuery: n,
|
|
27872
28142
|
sourceRootRef: r,
|
|
27873
28143
|
instanceRootRef: t,
|
|
27874
28144
|
accepted: a,
|
|
27875
|
-
overrides:
|
|
28145
|
+
overrides: l,
|
|
27876
28146
|
keepNameTypesFrom: c
|
|
27877
|
-
}), await
|
|
28147
|
+
}), await Ar(e, {
|
|
27878
28148
|
sourceQuery: n,
|
|
27879
28149
|
satelliteRefs: p,
|
|
27880
|
-
instanceSatelliteRefs:
|
|
28150
|
+
instanceSatelliteRefs: u,
|
|
27881
28151
|
structure: f,
|
|
27882
28152
|
accepted: a
|
|
27883
|
-
}), await
|
|
28153
|
+
}), await Nr(e, {
|
|
27884
28154
|
sourceQuery: n,
|
|
27885
28155
|
primaryRef: r,
|
|
27886
28156
|
instancePrimaryRef: {
|
|
@@ -27893,7 +28163,7 @@ async function Lr(e, t) {
|
|
|
27893
28163
|
}
|
|
27894
28164
|
return {
|
|
27895
28165
|
applications: m,
|
|
27896
|
-
functions: await
|
|
28166
|
+
functions: await ni(e, {
|
|
27897
28167
|
sourceQuery: n,
|
|
27898
28168
|
applicationRef: r,
|
|
27899
28169
|
targetParent: i,
|
|
@@ -27904,8 +28174,8 @@ async function Lr(e, t) {
|
|
|
27904
28174
|
})
|
|
27905
28175
|
};
|
|
27906
28176
|
}
|
|
27907
|
-
async function
|
|
27908
|
-
let { sourceQuery: n, applicationRef: r, targetParent: i, scenario: a, report: o, decisions: s, keepNameTypesFrom: c } = t, l = await
|
|
28177
|
+
async function ni(e, t) {
|
|
28178
|
+
let { sourceQuery: n, applicationRef: r, targetParent: i, scenario: a, report: o, decisions: s, keepNameTypesFrom: c } = t, l = await Tr(n, r);
|
|
27909
28179
|
if (l.size === 0) return [];
|
|
27910
28180
|
let u = await Q(e, i), d = [];
|
|
27911
28181
|
for (let t of l) {
|
|
@@ -27917,7 +28187,7 @@ async function Rr(e, t) {
|
|
|
27917
28187
|
let i = {
|
|
27918
28188
|
tagName: "Function",
|
|
27919
28189
|
id: r.id
|
|
27920
|
-
}, l = await
|
|
28190
|
+
}, l = await $r(e, {
|
|
27921
28191
|
sourceQuery: n,
|
|
27922
28192
|
functionRef: i,
|
|
27923
28193
|
targetParent: await Y(n, i, u),
|
|
@@ -27932,29 +28202,29 @@ async function Rr(e, t) {
|
|
|
27932
28202
|
}
|
|
27933
28203
|
//#endregion
|
|
27934
28204
|
//#region src/v2019C1/extensions/lifecycle/update/index.ts
|
|
27935
|
-
var
|
|
27936
|
-
asd: () =>
|
|
27937
|
-
fsd: () =>
|
|
28205
|
+
var ri = /* @__PURE__ */ l({
|
|
28206
|
+
asd: () => ti,
|
|
28207
|
+
fsd: () => $r
|
|
27938
28208
|
});
|
|
27939
28209
|
//#endregion
|
|
27940
28210
|
//#region src/v2019C1/extensions/lifecycle/apply/apply.ts
|
|
27941
|
-
async function
|
|
28211
|
+
async function ii(e, t) {
|
|
27942
28212
|
let { report: n, decisions: r } = t;
|
|
27943
|
-
return r ? (
|
|
27944
|
-
groups: n
|
|
28213
|
+
return r ? (br({
|
|
28214
|
+
groups: U(n),
|
|
27945
28215
|
decisions: r
|
|
27946
28216
|
}), {
|
|
27947
28217
|
report: n,
|
|
27948
|
-
instances: await
|
|
28218
|
+
instances: await oi(e, t, n, r)
|
|
27949
28219
|
}) : n.needsDecisions ? {
|
|
27950
28220
|
report: n,
|
|
27951
|
-
instances:
|
|
28221
|
+
instances: ai(t.verb)
|
|
27952
28222
|
} : {
|
|
27953
28223
|
report: n,
|
|
27954
|
-
instances: await
|
|
28224
|
+
instances: await oi(e, t, n, void 0)
|
|
27955
28225
|
};
|
|
27956
28226
|
}
|
|
27957
|
-
function
|
|
28227
|
+
function ai(e) {
|
|
27958
28228
|
return e === "fsd" ? {
|
|
27959
28229
|
verb: "fsd",
|
|
27960
28230
|
functions: []
|
|
@@ -27964,10 +28234,10 @@ function Vr(e) {
|
|
|
27964
28234
|
functions: []
|
|
27965
28235
|
};
|
|
27966
28236
|
}
|
|
27967
|
-
async function
|
|
28237
|
+
async function oi(e, t, n, r) {
|
|
27968
28238
|
if (t.verb === "fsd") return {
|
|
27969
28239
|
verb: "fsd",
|
|
27970
|
-
functions: await
|
|
28240
|
+
functions: await $r(e, {
|
|
27971
28241
|
sourceQuery: t.sourceQuery,
|
|
27972
28242
|
functionRef: t.ref,
|
|
27973
28243
|
targetParent: t.anchor,
|
|
@@ -27977,7 +28247,7 @@ async function Hr(e, t, n, r) {
|
|
|
27977
28247
|
keepNameTypesFrom: t.keepNameTypesFrom
|
|
27978
28248
|
})
|
|
27979
28249
|
};
|
|
27980
|
-
let { applications: i, functions: a } = await
|
|
28250
|
+
let { applications: i, functions: a } = await ti(e, {
|
|
27981
28251
|
sourceQuery: t.sourceQuery,
|
|
27982
28252
|
applicationRef: t.ref,
|
|
27983
28253
|
targetParent: t.anchor,
|
|
@@ -27994,7 +28264,7 @@ async function Hr(e, t, n, r) {
|
|
|
27994
28264
|
}
|
|
27995
28265
|
//#endregion
|
|
27996
28266
|
//#region src/v2019C1/extensions/lifecycle/extract/transaction/ensure-substation-structure.ts
|
|
27997
|
-
async function
|
|
28267
|
+
async function si(e) {
|
|
27998
28268
|
let t = await e.getRoot(), n = await e.ensureChild(t, {
|
|
27999
28269
|
tagName: "Substation",
|
|
28000
28270
|
attributes: { name: "TEMPLATE" }
|
|
@@ -28013,12 +28283,12 @@ async function Ur(e) {
|
|
|
28013
28283
|
}
|
|
28014
28284
|
//#endregion
|
|
28015
28285
|
//#region src/v2019C1/extensions/lifecycle/extract/transaction/post-extraction-cleanup.ts
|
|
28016
|
-
async function
|
|
28017
|
-
await
|
|
28286
|
+
async function ci(e) {
|
|
28287
|
+
await xt.transaction.orphanUuidRefs(e), await xt.transaction.resetLNode(e), await xt.transaction.pruneEmptyContainers(e);
|
|
28018
28288
|
}
|
|
28019
28289
|
//#endregion
|
|
28020
28290
|
//#region src/v2019C1/extensions/lifecycle/layers/omit-filters.ts
|
|
28021
|
-
var
|
|
28291
|
+
var li = [
|
|
28022
28292
|
"FunctionSclRef",
|
|
28023
28293
|
"ApplicationSclRef",
|
|
28024
28294
|
"GeneralEquipment",
|
|
@@ -28026,8 +28296,8 @@ var Gr = [
|
|
|
28026
28296
|
];
|
|
28027
28297
|
//#endregion
|
|
28028
28298
|
//#region src/v2019C1/extensions/lifecycle/extract/transaction/asd.ts
|
|
28029
|
-
async function
|
|
28030
|
-
let { sourceQuery: n, applicationRef: r, tool: i, who: a, nameStructure: o } = t, s = await
|
|
28299
|
+
async function ui(e, t) {
|
|
28300
|
+
let { sourceQuery: n, applicationRef: r, tool: i, who: a, nameStructure: o } = t, s = await si(e), c = await e.getAttribute(r, { name: "name" }) || "Unnamed Application";
|
|
28031
28301
|
await en.transaction.addEntry(e, {
|
|
28032
28302
|
filename: `ASD_${c.replace(/\s+/g, "_")}`,
|
|
28033
28303
|
header: {
|
|
@@ -28041,17 +28311,17 @@ async function Kr(e, t) {
|
|
|
28041
28311
|
what: "ASD initialization",
|
|
28042
28312
|
why: "Application was extracted from a previous file"
|
|
28043
28313
|
}
|
|
28044
|
-
}), await
|
|
28314
|
+
}), await R(e, { mappings: await Wr(e, {
|
|
28045
28315
|
sourceQuery: n,
|
|
28046
28316
|
applicationRef: r,
|
|
28047
28317
|
structure: s,
|
|
28048
|
-
omit:
|
|
28049
|
-
}), await
|
|
28318
|
+
omit: li
|
|
28319
|
+
}) }), await ci(e);
|
|
28050
28320
|
}
|
|
28051
28321
|
//#endregion
|
|
28052
28322
|
//#region src/v2019C1/extensions/lifecycle/extract/transaction/omit.ts
|
|
28053
|
-
var
|
|
28054
|
-
...
|
|
28323
|
+
var di = [
|
|
28324
|
+
...li,
|
|
28055
28325
|
"DOS",
|
|
28056
28326
|
"Labels",
|
|
28057
28327
|
"LNodeInputs",
|
|
@@ -28063,8 +28333,8 @@ var qr = [
|
|
|
28063
28333
|
];
|
|
28064
28334
|
//#endregion
|
|
28065
28335
|
//#region src/v2019C1/extensions/lifecycle/extract/transaction/fsd.ts
|
|
28066
|
-
async function
|
|
28067
|
-
let { sourceQuery: n, functionRef: r, tool: i, who: a, nameStructure: o } = t, s = await
|
|
28336
|
+
async function fi(e, t) {
|
|
28337
|
+
let { sourceQuery: n, functionRef: r, tool: i, who: a, nameStructure: o } = t, s = await si(e), c = {
|
|
28068
28338
|
tagName: s.Substation.tagName,
|
|
28069
28339
|
id: s.Substation.id
|
|
28070
28340
|
}, l = await n.getAttribute(r, { name: "name" }) || "Unnamed Function";
|
|
@@ -28081,33 +28351,35 @@ async function Jr(e, t) {
|
|
|
28081
28351
|
what: "FSD initialization",
|
|
28082
28352
|
why: "Function was extracted from a previous file"
|
|
28083
28353
|
}
|
|
28084
|
-
})
|
|
28354
|
+
});
|
|
28355
|
+
let u = await Ir(e, {
|
|
28085
28356
|
sourceQuery: n,
|
|
28086
28357
|
functionRef: r,
|
|
28087
28358
|
targetParentRef: c,
|
|
28088
|
-
omit:
|
|
28359
|
+
omit: di,
|
|
28089
28360
|
stripRootAttributes: ["templateUuid"]
|
|
28090
|
-
}), await
|
|
28361
|
+
}), d = await Lr(e, {
|
|
28091
28362
|
sourceQuery: n,
|
|
28092
28363
|
functionRef: r,
|
|
28093
28364
|
structure: s
|
|
28094
|
-
})
|
|
28365
|
+
});
|
|
28366
|
+
await R(e, { mappings: [...u, ...d] }), await ci(e);
|
|
28095
28367
|
}
|
|
28096
28368
|
//#endregion
|
|
28097
28369
|
//#region src/v2019C1/extensions/lifecycle/extract/index.ts
|
|
28098
|
-
var
|
|
28099
|
-
asd: () =>
|
|
28100
|
-
ensureSubstationTemplateStructure: () =>
|
|
28101
|
-
fsd: () =>
|
|
28102
|
-
}),
|
|
28103
|
-
asd: () =>
|
|
28104
|
-
fsd: () =>
|
|
28370
|
+
var pi = /* @__PURE__ */ l({
|
|
28371
|
+
asd: () => ui,
|
|
28372
|
+
ensureSubstationTemplateStructure: () => si,
|
|
28373
|
+
fsd: () => fi
|
|
28374
|
+
}), mi = /* @__PURE__ */ l({
|
|
28375
|
+
asd: () => Yr,
|
|
28376
|
+
fsd: () => Ur,
|
|
28105
28377
|
resolveTargetStructure: () => Q
|
|
28106
28378
|
});
|
|
28107
28379
|
//#endregion
|
|
28108
28380
|
//#region src/v2019C1/extensions/lifecycle/report/mark-placement-conflicts.ts
|
|
28109
|
-
async function
|
|
28110
|
-
if (t.scenario === "instantiate") for (let r of n
|
|
28381
|
+
async function hi(e, t, n) {
|
|
28382
|
+
if (t.scenario === "instantiate") for (let r of U(n)) {
|
|
28111
28383
|
if (r.change !== "added") continue;
|
|
28112
28384
|
let i = r.primary.sourceRef;
|
|
28113
28385
|
if (!i) continue;
|
|
@@ -28126,7 +28398,7 @@ async function Zr(e, t, n) {
|
|
|
28126
28398
|
let n = {
|
|
28127
28399
|
tagName: t.tagName,
|
|
28128
28400
|
id: t.id
|
|
28129
|
-
}, r = await
|
|
28401
|
+
}, r = await G(e, {
|
|
28130
28402
|
parentRef: n,
|
|
28131
28403
|
childTag: s,
|
|
28132
28404
|
candidate: a
|
|
@@ -28137,9 +28409,9 @@ async function Zr(e, t, n) {
|
|
|
28137
28409
|
}
|
|
28138
28410
|
}
|
|
28139
28411
|
if (!d || !u) continue;
|
|
28140
|
-
let f = d.fields.find((e) =>
|
|
28412
|
+
let f = d.fields.find((e) => Bn(W(s, e)));
|
|
28141
28413
|
if (f) {
|
|
28142
|
-
let t = await
|
|
28414
|
+
let t = await Xn(e, {
|
|
28143
28415
|
parentRef: u,
|
|
28144
28416
|
childTag: s,
|
|
28145
28417
|
candidate: a,
|
|
@@ -28154,22 +28426,23 @@ async function Zr(e, t, n) {
|
|
|
28154
28426
|
}
|
|
28155
28427
|
//#endregion
|
|
28156
28428
|
//#region src/v2019C1/extensions/lifecycle/report/query/satellite-companions.ts
|
|
28157
|
-
async function
|
|
28429
|
+
async function gi(e, t) {
|
|
28158
28430
|
let { sourceQuery: n, primaryRef: r, satelliteRefs: i, instanceSatelliteRefs: a, report: o, instanceScopeId: s } = t, c = o.groups.find((e) => e.primary.sourceRef?.id === r.id);
|
|
28159
|
-
for (let
|
|
28160
|
-
let { uuid:
|
|
28431
|
+
for (let r of i) {
|
|
28432
|
+
let { uuid: i, name: a } = await n.any.getAttributes(r), l = await _n({
|
|
28161
28433
|
sourceQuery: n,
|
|
28162
28434
|
targetQuery: e,
|
|
28163
|
-
sourceRootRef:
|
|
28164
|
-
instanceRootRef: await
|
|
28165
|
-
tagName:
|
|
28166
|
-
sourceUuid:
|
|
28167
|
-
|
|
28435
|
+
sourceRootRef: r,
|
|
28436
|
+
instanceRootRef: await kr(e, {
|
|
28437
|
+
tagName: r.tagName,
|
|
28438
|
+
sourceUuid: i,
|
|
28439
|
+
sourceName: a
|
|
28440
|
+
}),
|
|
28441
|
+
keepLeftoverRefs: !0,
|
|
28442
|
+
leftoverRefPolicy: await _i(e, n, r),
|
|
28443
|
+
refsAlwaysAdded: t.refsAlwaysAdded ?? !1
|
|
28168
28444
|
});
|
|
28169
|
-
|
|
28170
|
-
node: i.root,
|
|
28171
|
-
out: c.companions
|
|
28172
|
-
})) : (o.groups.push(...sn(i.root, s)), o.needsDecisions = !0));
|
|
28445
|
+
l.summary.added + l.summary.removed + l.summary.modified > 0 && (c ? c.companions.push(l.root) : o.groups.push(...ln(l.root, s)));
|
|
28173
28446
|
}
|
|
28174
28447
|
if (c) for (let t of a ?? []) {
|
|
28175
28448
|
let { templateUuid: r } = await e.any.getAttributes(t);
|
|
@@ -28187,62 +28460,100 @@ async function Qr(e, t) {
|
|
|
28187
28460
|
}
|
|
28188
28461
|
return o;
|
|
28189
28462
|
}
|
|
28463
|
+
async function _i(e, t, n) {
|
|
28464
|
+
let r = await t.any.getTree(n), i = /* @__PURE__ */ new Set();
|
|
28465
|
+
return r && await vi(t, r, i), async (n) => {
|
|
28466
|
+
let r = D[n.tagName];
|
|
28467
|
+
if (!r) return "keep";
|
|
28468
|
+
for (let a of r) {
|
|
28469
|
+
let r = await e.any.getAttribute(n, { name: a.attribute.uuid });
|
|
28470
|
+
if (!r) continue;
|
|
28471
|
+
let o = await yi(e, r, a.target);
|
|
28472
|
+
if (!o) continue;
|
|
28473
|
+
let s = await e.any.getAttribute(o, { name: "templateUuid" });
|
|
28474
|
+
if (s && await yi(t, s, a.target) && !i.has(s)) return "removed";
|
|
28475
|
+
}
|
|
28476
|
+
return "keep";
|
|
28477
|
+
};
|
|
28478
|
+
}
|
|
28479
|
+
async function vi(e, t, n) {
|
|
28480
|
+
let r = D[t.tagName];
|
|
28481
|
+
if (r) for (let i of r) {
|
|
28482
|
+
let r = await e.any.getAttribute(t, { name: i.attribute.uuid });
|
|
28483
|
+
r && n.add(r);
|
|
28484
|
+
}
|
|
28485
|
+
for (let r of t.tree) await vi(e, r, n);
|
|
28486
|
+
}
|
|
28487
|
+
async function yi(e, t, n) {
|
|
28488
|
+
for (let r of n) {
|
|
28489
|
+
let [n] = await e.any.findByAttributes({
|
|
28490
|
+
tagName: r,
|
|
28491
|
+
attributes: { uuid: t }
|
|
28492
|
+
});
|
|
28493
|
+
if (n) return n;
|
|
28494
|
+
}
|
|
28495
|
+
}
|
|
28190
28496
|
//#endregion
|
|
28191
28497
|
//#region src/v2019C1/extensions/lifecycle/report/query/cross-cutting-satellites.ts
|
|
28192
|
-
async function
|
|
28498
|
+
async function bi(e, t) {
|
|
28193
28499
|
let { sourceQuery: n, primaryRef: r, instancePrimaryRef: i, report: a } = t;
|
|
28194
|
-
return
|
|
28500
|
+
return gi(e, {
|
|
28195
28501
|
sourceQuery: n,
|
|
28196
28502
|
primaryRef: r,
|
|
28197
28503
|
satelliteRefs: await Z(n, { primaryRef: r }),
|
|
28198
28504
|
instanceSatelliteRefs: i ? await Z(e, { primaryRef: i }) : [],
|
|
28199
28505
|
report: a,
|
|
28200
|
-
instanceScopeId: i?.id
|
|
28506
|
+
instanceScopeId: i?.id,
|
|
28507
|
+
refsAlwaysAdded: t.refsAlwaysAdded ?? !1
|
|
28201
28508
|
});
|
|
28202
28509
|
}
|
|
28203
28510
|
//#endregion
|
|
28204
28511
|
//#region src/v2019C1/extensions/lifecycle/report/query/report-function-satellites.ts
|
|
28205
|
-
async function
|
|
28512
|
+
async function xi(e, t) {
|
|
28206
28513
|
let { sourceQuery: n, functionRef: r, instance: i, report: a } = t;
|
|
28207
|
-
return
|
|
28514
|
+
return gi(e, {
|
|
28208
28515
|
sourceQuery: n,
|
|
28209
28516
|
primaryRef: r,
|
|
28210
|
-
satelliteRefs: await
|
|
28211
|
-
instanceSatelliteRefs: i ? await
|
|
28517
|
+
satelliteRefs: await Hr(n, { primaryRef: r }),
|
|
28518
|
+
instanceSatelliteRefs: i ? await Hr(e, { primaryRef: {
|
|
28212
28519
|
tagName: "Function",
|
|
28213
28520
|
id: i.id
|
|
28214
28521
|
} }) : [],
|
|
28215
28522
|
report: a,
|
|
28216
|
-
instanceScopeId: i?.id
|
|
28523
|
+
instanceScopeId: i?.id,
|
|
28524
|
+
refsAlwaysAdded: t.refsAlwaysAdded ?? !1
|
|
28217
28525
|
});
|
|
28218
28526
|
}
|
|
28219
28527
|
//#endregion
|
|
28220
28528
|
//#region src/v2019C1/extensions/lifecycle/report/query/report-function.ts
|
|
28221
|
-
async function
|
|
28222
|
-
let { sourceQuery: n, functionRef: r, instance: i } = t, a = await
|
|
28529
|
+
async function Si(e, t) {
|
|
28530
|
+
let { sourceQuery: n, functionRef: r, instance: i } = t, a = t.refsAlwaysAdded ?? !1, o = await xi(e, {
|
|
28223
28531
|
sourceQuery: n,
|
|
28224
28532
|
functionRef: r,
|
|
28225
28533
|
instance: i,
|
|
28226
|
-
report: await
|
|
28534
|
+
report: await _n({
|
|
28227
28535
|
sourceQuery: n,
|
|
28228
28536
|
targetQuery: e,
|
|
28229
28537
|
sourceRootRef: r,
|
|
28230
|
-
instanceRootRef: i
|
|
28231
|
-
|
|
28538
|
+
instanceRootRef: i,
|
|
28539
|
+
matchKey: t.matchKey
|
|
28540
|
+
}),
|
|
28541
|
+
refsAlwaysAdded: a
|
|
28232
28542
|
});
|
|
28233
|
-
return
|
|
28543
|
+
return bi(e, {
|
|
28234
28544
|
sourceQuery: n,
|
|
28235
28545
|
primaryRef: r,
|
|
28236
28546
|
instancePrimaryRef: i ? {
|
|
28237
28547
|
tagName: "Function",
|
|
28238
28548
|
id: i.id
|
|
28239
28549
|
} : void 0,
|
|
28240
|
-
report:
|
|
28550
|
+
report: o,
|
|
28551
|
+
refsAlwaysAdded: a
|
|
28241
28552
|
});
|
|
28242
28553
|
}
|
|
28243
28554
|
//#endregion
|
|
28244
28555
|
//#region src/v2019C1/extensions/presentation/constants/title.ts
|
|
28245
|
-
var
|
|
28556
|
+
var Ci = {
|
|
28246
28557
|
LNode: {
|
|
28247
28558
|
compact: [
|
|
28248
28559
|
"prefix",
|
|
@@ -28339,29 +28650,29 @@ var ni = {
|
|
|
28339
28650
|
};
|
|
28340
28651
|
//#endregion
|
|
28341
28652
|
//#region src/v2019C1/extensions/presentation/query/extract-element-title.ts
|
|
28342
|
-
async function
|
|
28653
|
+
async function wi(e, t, n = {}) {
|
|
28343
28654
|
let r = await e.getRecord(t);
|
|
28344
28655
|
if (!r) return n.withLabels ? {
|
|
28345
28656
|
title: "",
|
|
28346
28657
|
labels: {}
|
|
28347
28658
|
} : "";
|
|
28348
|
-
let i = r.tagName, a = n.mode ?? "compact", o = await e.any.getAttributes(r), s =
|
|
28659
|
+
let i = r.tagName, a = n.mode ?? "compact", o = await e.any.getAttributes(r), s = Ci[i], c = Ti({
|
|
28349
28660
|
tag: i,
|
|
28350
28661
|
spec: s,
|
|
28351
28662
|
mode: a,
|
|
28352
28663
|
attributes: o,
|
|
28353
|
-
specAttributes: s?.attributesFrom ? await
|
|
28664
|
+
specAttributes: s?.attributesFrom ? await Ei(e, r, s.attributesFrom) : o,
|
|
28354
28665
|
value: r.value
|
|
28355
28666
|
});
|
|
28356
28667
|
return n.withLabels ? {
|
|
28357
28668
|
title: c,
|
|
28358
|
-
labels: await
|
|
28669
|
+
labels: await Di(e, r)
|
|
28359
28670
|
} : c;
|
|
28360
28671
|
}
|
|
28361
|
-
function
|
|
28672
|
+
function Ti(e) {
|
|
28362
28673
|
let { tag: t, spec: n, mode: r, attributes: i, specAttributes: a, value: o } = e;
|
|
28363
28674
|
if (n) {
|
|
28364
|
-
let e =
|
|
28675
|
+
let e = Ai(n, a, r);
|
|
28365
28676
|
if (e) return e;
|
|
28366
28677
|
}
|
|
28367
28678
|
let s = (o ?? "").trim();
|
|
@@ -28369,14 +28680,14 @@ function ii(e) {
|
|
|
28369
28680
|
let c = _[t]?.attributes?.identityFields, l = c?.find((e) => e === "name" || e === "id") ?? c?.[0];
|
|
28370
28681
|
return l && i[l] ? i[l] : i.name || t;
|
|
28371
28682
|
}
|
|
28372
|
-
async function
|
|
28683
|
+
async function Ei(e, t, n) {
|
|
28373
28684
|
let [r] = await e.any.getChildren(t, n);
|
|
28374
28685
|
return r ? e.any.getAttributes(r) : {};
|
|
28375
28686
|
}
|
|
28376
|
-
async function
|
|
28377
|
-
return
|
|
28687
|
+
async function Di(e, t) {
|
|
28688
|
+
return ki(await Oi(e, t));
|
|
28378
28689
|
}
|
|
28379
|
-
async function
|
|
28690
|
+
async function Oi(e, t) {
|
|
28380
28691
|
let n = [], r = await e.any.getChildren(t, "Labels");
|
|
28381
28692
|
for (let t of r) {
|
|
28382
28693
|
let r = await e.any.getChildren(t, "Label");
|
|
@@ -28391,18 +28702,18 @@ async function si(e, t) {
|
|
|
28391
28702
|
}
|
|
28392
28703
|
return n;
|
|
28393
28704
|
}
|
|
28394
|
-
function
|
|
28705
|
+
function ki(e) {
|
|
28395
28706
|
let t = {};
|
|
28396
28707
|
for (let { lang: n, id: r, text: i } of e) (t[n] ??= {})[r] = i;
|
|
28397
28708
|
return t;
|
|
28398
28709
|
}
|
|
28399
|
-
function
|
|
28710
|
+
function Ai(e, t, n) {
|
|
28400
28711
|
let r = n === "full" && e.full !== void 0, i = r ? e.full : e.compact, a = r ? e.fullSeparator ?? e.separator ?? "" : e.separator ?? "";
|
|
28401
|
-
if (typeof i == "string") return
|
|
28402
|
-
if (
|
|
28712
|
+
if (typeof i == "string") return Mi(i, t);
|
|
28713
|
+
if (ji(i)) {
|
|
28403
28714
|
for (let e of i) {
|
|
28404
28715
|
if (e.whenPresent && !t[e.whenPresent]) continue;
|
|
28405
|
-
let n =
|
|
28716
|
+
let n = Mi(e.template, t);
|
|
28406
28717
|
if (n) return n;
|
|
28407
28718
|
}
|
|
28408
28719
|
return "";
|
|
@@ -28410,72 +28721,109 @@ function li(e, t, n) {
|
|
|
28410
28721
|
let o = i.map((e) => t[e]).filter(Boolean);
|
|
28411
28722
|
return o.length > 0 ? o.join(a) : "";
|
|
28412
28723
|
}
|
|
28413
|
-
function
|
|
28724
|
+
function ji(e) {
|
|
28414
28725
|
return typeof e[0] == "object";
|
|
28415
28726
|
}
|
|
28416
|
-
function
|
|
28727
|
+
function Mi(e, t) {
|
|
28417
28728
|
return e.replace(/\{([a-zA-Z_][a-zA-Z0-9_]*)\}/g, (e, n) => t[n] ?? "").replace(/\[\]/g, "").replace(/\(\)/g, "").split("/").map((e) => e.split(".").filter((e) => e !== "").join(".")).filter((e) => e !== "").join("/");
|
|
28418
28729
|
}
|
|
28419
28730
|
//#endregion
|
|
28420
28731
|
//#region src/v2019C1/extensions/presentation/query/index.ts
|
|
28421
|
-
var
|
|
28732
|
+
var Ni = /* @__PURE__ */ l({ extractElementTitle: () => wi });
|
|
28733
|
+
//#endregion
|
|
28734
|
+
//#region src/v2019C1/extensions/lifecycle/report/query/report-instance.ts
|
|
28735
|
+
async function $(e, t) {
|
|
28736
|
+
let { instanceDiff: n, instance: r, sourceQuery: i, sourceRef: o } = t, s = n.groups.length === 0;
|
|
28737
|
+
if (!r) return {
|
|
28738
|
+
rootRef: void 0,
|
|
28739
|
+
title: await wi(i, o),
|
|
28740
|
+
linked: !1,
|
|
28741
|
+
upToDate: s,
|
|
28742
|
+
tree: n.root,
|
|
28743
|
+
groups: n.groups
|
|
28744
|
+
};
|
|
28745
|
+
let { templateUuid: c, originUuid: l } = await e.any.getAttributes(r), u = !!(c || l);
|
|
28746
|
+
return {
|
|
28747
|
+
rootRef: a(r),
|
|
28748
|
+
title: await wi(e, r),
|
|
28749
|
+
linked: u,
|
|
28750
|
+
upToDate: s,
|
|
28751
|
+
tree: n.root,
|
|
28752
|
+
groups: n.groups
|
|
28753
|
+
};
|
|
28754
|
+
}
|
|
28422
28755
|
//#endregion
|
|
28423
28756
|
//#region src/v2019C1/extensions/lifecycle/report/query/report-asd.ts
|
|
28424
|
-
async function
|
|
28757
|
+
async function Pi(e, t) {
|
|
28425
28758
|
let { sourceQuery: n, applicationRef: r, scenario: i } = t, { uuid: a } = await n.getAttributes(r), o = i === "instantiate" ? [] : await X(e, {
|
|
28426
28759
|
tagName: "Application",
|
|
28427
28760
|
sourceUuid: a
|
|
28428
28761
|
}), s = [];
|
|
28429
|
-
if (o.length === 0)
|
|
28430
|
-
|
|
28431
|
-
|
|
28432
|
-
|
|
28433
|
-
|
|
28434
|
-
|
|
28435
|
-
|
|
28436
|
-
|
|
28437
|
-
|
|
28438
|
-
|
|
28439
|
-
|
|
28762
|
+
if (o.length === 0) {
|
|
28763
|
+
let t = await Fi(e, {
|
|
28764
|
+
sourceQuery: n,
|
|
28765
|
+
applicationRef: r,
|
|
28766
|
+
instance: void 0,
|
|
28767
|
+
refsAlwaysAdded: i === "instantiate"
|
|
28768
|
+
});
|
|
28769
|
+
s.push(await $(e, {
|
|
28770
|
+
instanceDiff: t,
|
|
28771
|
+
instance: void 0,
|
|
28772
|
+
sourceQuery: n,
|
|
28773
|
+
sourceRef: r
|
|
28774
|
+
}));
|
|
28775
|
+
} else for (let t of o) {
|
|
28776
|
+
let a = await Fi(e, {
|
|
28777
|
+
sourceQuery: n,
|
|
28778
|
+
applicationRef: r,
|
|
28779
|
+
instance: t,
|
|
28780
|
+
refsAlwaysAdded: i === "instantiate"
|
|
28781
|
+
});
|
|
28782
|
+
s.push(await $(e, {
|
|
28783
|
+
instanceDiff: a,
|
|
28784
|
+
instance: t,
|
|
28785
|
+
sourceQuery: n,
|
|
28786
|
+
sourceRef: r
|
|
28787
|
+
}));
|
|
28788
|
+
}
|
|
28789
|
+
let c = await Ii(e, {
|
|
28440
28790
|
sourceQuery: n,
|
|
28441
28791
|
applicationRef: r,
|
|
28442
28792
|
scenario: i
|
|
28443
28793
|
});
|
|
28444
|
-
return
|
|
28794
|
+
return Pn([...s, ...c]);
|
|
28445
28795
|
}
|
|
28446
|
-
async function
|
|
28447
|
-
let { sourceQuery: n, applicationRef: r, instance: i } = t, a = await
|
|
28796
|
+
async function Fi(e, t) {
|
|
28797
|
+
let { sourceQuery: n, applicationRef: r, instance: i } = t, a = t.refsAlwaysAdded ?? !1, o = await _n({
|
|
28448
28798
|
sourceQuery: n,
|
|
28449
28799
|
targetQuery: e,
|
|
28450
28800
|
sourceRootRef: r,
|
|
28451
28801
|
instanceRootRef: i
|
|
28452
28802
|
});
|
|
28453
|
-
|
|
28803
|
+
return await gi(e, {
|
|
28454
28804
|
sourceQuery: n,
|
|
28455
28805
|
primaryRef: r,
|
|
28456
|
-
satelliteRefs: await
|
|
28457
|
-
instanceSatelliteRefs: i ? await
|
|
28806
|
+
satelliteRefs: await qr(n, { applicationRef: r }),
|
|
28807
|
+
instanceSatelliteRefs: i ? await qr(e, { applicationRef: {
|
|
28458
28808
|
tagName: "Application",
|
|
28459
28809
|
id: i.id
|
|
28460
28810
|
} }) : [],
|
|
28461
|
-
report:
|
|
28462
|
-
instanceScopeId: i?.id
|
|
28463
|
-
|
|
28811
|
+
report: o,
|
|
28812
|
+
instanceScopeId: i?.id,
|
|
28813
|
+
refsAlwaysAdded: a
|
|
28814
|
+
}), await bi(e, {
|
|
28464
28815
|
sourceQuery: n,
|
|
28465
28816
|
primaryRef: r,
|
|
28466
28817
|
instancePrimaryRef: i ? {
|
|
28467
28818
|
tagName: "Application",
|
|
28468
28819
|
id: i.id
|
|
28469
28820
|
} : void 0,
|
|
28470
|
-
report:
|
|
28471
|
-
|
|
28472
|
-
|
|
28473
|
-
for (let e of a.groups) e.instanceScopeTitle = t;
|
|
28474
|
-
}
|
|
28475
|
-
return a;
|
|
28821
|
+
report: o,
|
|
28822
|
+
refsAlwaysAdded: a
|
|
28823
|
+
}), o;
|
|
28476
28824
|
}
|
|
28477
|
-
async function
|
|
28478
|
-
let { sourceQuery: n, applicationRef: r, scenario: i } = t, a = await
|
|
28825
|
+
async function Ii(e, t) {
|
|
28826
|
+
let { sourceQuery: n, applicationRef: r, scenario: i } = t, a = await Tr(n, r), o = [];
|
|
28479
28827
|
for (let t of a) {
|
|
28480
28828
|
let [r] = await n.any.findByAttributes({
|
|
28481
28829
|
tagName: "Function",
|
|
@@ -28490,82 +28838,95 @@ async function hi(e, t) {
|
|
|
28490
28838
|
sourceUuid: t
|
|
28491
28839
|
});
|
|
28492
28840
|
if (s.length === 0) {
|
|
28493
|
-
|
|
28841
|
+
let t = await Si(e, {
|
|
28494
28842
|
sourceQuery: n,
|
|
28495
28843
|
functionRef: a,
|
|
28496
|
-
instance: void 0
|
|
28844
|
+
instance: void 0,
|
|
28845
|
+
refsAlwaysAdded: i === "instantiate"
|
|
28846
|
+
});
|
|
28847
|
+
o.push(await $(e, {
|
|
28848
|
+
instanceDiff: t,
|
|
28849
|
+
instance: void 0,
|
|
28850
|
+
sourceQuery: n,
|
|
28851
|
+
sourceRef: a
|
|
28497
28852
|
}));
|
|
28498
28853
|
continue;
|
|
28499
28854
|
}
|
|
28500
28855
|
for (let t of s) {
|
|
28501
|
-
let r = await
|
|
28856
|
+
let r = await Si(e, {
|
|
28502
28857
|
sourceQuery: n,
|
|
28503
28858
|
functionRef: a,
|
|
28504
|
-
instance: t
|
|
28505
|
-
|
|
28506
|
-
|
|
28507
|
-
o.push(
|
|
28859
|
+
instance: t,
|
|
28860
|
+
refsAlwaysAdded: i === "instantiate"
|
|
28861
|
+
});
|
|
28862
|
+
o.push(await $(e, {
|
|
28863
|
+
instanceDiff: r,
|
|
28864
|
+
instance: t,
|
|
28865
|
+
sourceQuery: n,
|
|
28866
|
+
sourceRef: a
|
|
28867
|
+
}));
|
|
28508
28868
|
}
|
|
28509
28869
|
}
|
|
28510
28870
|
return o;
|
|
28511
28871
|
}
|
|
28512
28872
|
//#endregion
|
|
28513
28873
|
//#region src/v2019C1/extensions/lifecycle/report/query/report-fsd.ts
|
|
28514
|
-
async function
|
|
28515
|
-
let { sourceQuery: n, functionRef: r, targetParent: i, scenario: a } = t, { uuid: o } = await n.getAttributes(r), s = a === "instantiate" ? [] : await
|
|
28874
|
+
async function Li(e, t) {
|
|
28875
|
+
let { sourceQuery: n, functionRef: r, targetParent: i, scenario: a } = t, { uuid: o } = await n.getAttributes(r), s = Zr(a), c = a === "instantiate" ? [] : await Dr(e, {
|
|
28516
28876
|
targetParent: i,
|
|
28517
28877
|
tagName: "Function",
|
|
28518
|
-
sourceUuid: o
|
|
28878
|
+
sourceUuid: o,
|
|
28879
|
+
matchKey: s
|
|
28519
28880
|
});
|
|
28520
|
-
if (
|
|
28881
|
+
if (c.length === 0) return Pn([await $(e, {
|
|
28882
|
+
instanceDiff: await Si(e, {
|
|
28883
|
+
sourceQuery: n,
|
|
28884
|
+
functionRef: r,
|
|
28885
|
+
instance: void 0,
|
|
28886
|
+
refsAlwaysAdded: a === "instantiate",
|
|
28887
|
+
matchKey: s
|
|
28888
|
+
}),
|
|
28889
|
+
instance: void 0,
|
|
28521
28890
|
sourceQuery: n,
|
|
28522
|
-
|
|
28523
|
-
|
|
28524
|
-
|
|
28525
|
-
let c
|
|
28526
|
-
|
|
28527
|
-
let i = await ti(e, {
|
|
28891
|
+
sourceRef: r
|
|
28892
|
+
})]);
|
|
28893
|
+
let l = [];
|
|
28894
|
+
for (let t of c) {
|
|
28895
|
+
let i = await Si(e, {
|
|
28528
28896
|
sourceQuery: n,
|
|
28529
28897
|
functionRef: r,
|
|
28530
|
-
instance: t
|
|
28531
|
-
|
|
28532
|
-
|
|
28533
|
-
|
|
28898
|
+
instance: t,
|
|
28899
|
+
refsAlwaysAdded: a === "instantiate",
|
|
28900
|
+
matchKey: s
|
|
28901
|
+
});
|
|
28902
|
+
l.push(await $(e, {
|
|
28903
|
+
instanceDiff: i,
|
|
28904
|
+
instance: t,
|
|
28905
|
+
sourceQuery: n,
|
|
28906
|
+
sourceRef: r
|
|
28907
|
+
}));
|
|
28534
28908
|
}
|
|
28535
|
-
return
|
|
28909
|
+
return Pn(l);
|
|
28536
28910
|
}
|
|
28537
28911
|
//#endregion
|
|
28538
28912
|
//#region src/v2019C1/extensions/lifecycle/report/report.ts
|
|
28539
|
-
async function
|
|
28540
|
-
let n = t.verb === "fsd" ? await
|
|
28913
|
+
async function Ri(e, t) {
|
|
28914
|
+
let n = t.verb === "fsd" ? await Li(e, {
|
|
28541
28915
|
sourceQuery: t.sourceQuery,
|
|
28542
28916
|
functionRef: t.ref,
|
|
28543
28917
|
targetParent: t.anchor,
|
|
28544
28918
|
scenario: t.scenario
|
|
28545
|
-
}) : await
|
|
28919
|
+
}) : await Pi(e, {
|
|
28546
28920
|
sourceQuery: t.sourceQuery,
|
|
28547
28921
|
applicationRef: t.ref,
|
|
28548
28922
|
scenario: t.scenario
|
|
28549
28923
|
});
|
|
28550
|
-
for (let e of n
|
|
28551
|
-
return await
|
|
28552
|
-
}
|
|
28553
|
-
function vi(e, t) {
|
|
28554
|
-
if (!t?.length) return e;
|
|
28555
|
-
let n = new Map(t.map((e) => [e.name, e]));
|
|
28556
|
-
return e.map((e) => {
|
|
28557
|
-
let t = n.get(e.attr);
|
|
28558
|
-
return t ? {
|
|
28559
|
-
...e,
|
|
28560
|
-
before: t.before,
|
|
28561
|
-
after: t.after,
|
|
28562
|
-
changed: !0
|
|
28563
|
-
} : e;
|
|
28564
|
-
}).sort((e, t) => Number(t.changed ?? !1) - Number(e.changed ?? !1));
|
|
28924
|
+
for (let e of U(n)) e.editableAttributes = Vn(e.primary.tagName);
|
|
28925
|
+
return await hi(e, t, n), n;
|
|
28565
28926
|
}
|
|
28566
28927
|
//#endregion
|
|
28567
28928
|
//#region src/v2019C1/extensions/lifecycle/report/presentation-scope.ts
|
|
28568
|
-
function
|
|
28929
|
+
function zi(e) {
|
|
28569
28930
|
switch (e.verb) {
|
|
28570
28931
|
case "fsd":
|
|
28571
28932
|
case "asd": return {
|
|
@@ -28576,29 +28937,106 @@ function yi(e) {
|
|
|
28576
28937
|
}
|
|
28577
28938
|
}
|
|
28578
28939
|
//#endregion
|
|
28940
|
+
//#region src/v2019C1/extensions/lifecycle/validate/template-uuid-check.ts
|
|
28941
|
+
async function Bi(e) {
|
|
28942
|
+
let t = await e.any.getSnapshot({ as: "tree" }), n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
|
|
28943
|
+
await Vi(e, t, n, r);
|
|
28944
|
+
let i = [], a = /* @__PURE__ */ new Set();
|
|
28945
|
+
for (let [e, { tagNames: t, refs: r }] of n) {
|
|
28946
|
+
if (t.size < 2) continue;
|
|
28947
|
+
a.add(e);
|
|
28948
|
+
let n = [...t].sort();
|
|
28949
|
+
i.push({
|
|
28950
|
+
code: "cross-type-template-uuid",
|
|
28951
|
+
level: "warning",
|
|
28952
|
+
value: e,
|
|
28953
|
+
tagNames: n,
|
|
28954
|
+
refs: r,
|
|
28955
|
+
count: r.length,
|
|
28956
|
+
message: `templateUuid "${e}" is shared by ${r.length} elements of ${n.length} different types (${n.join(", ")}); a templateUuid must identify a single template element. It is likely a placeholder and cannot be used to recognise template lineage.`
|
|
28957
|
+
});
|
|
28958
|
+
}
|
|
28959
|
+
for (let [e, t] of r) {
|
|
28960
|
+
if (t.length < 2) continue;
|
|
28961
|
+
let n = [...new Set(t.map((e) => e.tagName))].sort();
|
|
28962
|
+
i.push({
|
|
28963
|
+
code: "duplicate-instance-uuid",
|
|
28964
|
+
level: "warning",
|
|
28965
|
+
value: e,
|
|
28966
|
+
tagNames: n,
|
|
28967
|
+
refs: t.map((e) => e.ref),
|
|
28968
|
+
count: t.length,
|
|
28969
|
+
message: `uuid "${e}" is used by ${t.length} elements (${n.join(", ")}); every instance UUID in an SCL shall be unique.`
|
|
28970
|
+
});
|
|
28971
|
+
}
|
|
28972
|
+
for (let [e, { tagNames: t, refs: o }] of n) {
|
|
28973
|
+
if (a.has(e)) continue;
|
|
28974
|
+
let n = r.get(e);
|
|
28975
|
+
if (!n || n.length === 0) continue;
|
|
28976
|
+
let s = [...t][0], c = new Set(n.map((e) => e.tagName));
|
|
28977
|
+
if (c.has(s)) continue;
|
|
28978
|
+
let l = [...new Set([s, ...c])].sort();
|
|
28979
|
+
i.push({
|
|
28980
|
+
code: "template-uuid-type-mismatch",
|
|
28981
|
+
level: "warning",
|
|
28982
|
+
value: e,
|
|
28983
|
+
tagNames: l,
|
|
28984
|
+
refs: [...o, ...n.map((e) => e.ref)],
|
|
28985
|
+
count: o.length + n.length,
|
|
28986
|
+
message: `templateUuid "${e}" on ${s} resolves in-file to an element of type ${[...c].sort().join(", ")}; an instance cannot derive from a template of a different type.`
|
|
28987
|
+
});
|
|
28988
|
+
}
|
|
28989
|
+
return i;
|
|
28990
|
+
}
|
|
28991
|
+
async function Vi(e, t, n, r) {
|
|
28992
|
+
let i = {
|
|
28993
|
+
tagName: t.tagName,
|
|
28994
|
+
id: t.id
|
|
28995
|
+
}, a = await e.any.getAttribute(t, { name: "templateUuid" });
|
|
28996
|
+
if (a) {
|
|
28997
|
+
let e = n.get(a) ?? {
|
|
28998
|
+
tagNames: /* @__PURE__ */ new Set(),
|
|
28999
|
+
refs: []
|
|
29000
|
+
};
|
|
29001
|
+
e.tagNames.add(t.tagName), e.refs.push(i), n.set(a, e);
|
|
29002
|
+
}
|
|
29003
|
+
let o = await e.any.getAttribute(t, { name: "uuid" });
|
|
29004
|
+
if (o) {
|
|
29005
|
+
let e = r.get(o) ?? [];
|
|
29006
|
+
e.push({
|
|
29007
|
+
tagName: t.tagName,
|
|
29008
|
+
ref: i
|
|
29009
|
+
}), r.set(o, e);
|
|
29010
|
+
}
|
|
29011
|
+
for (let i of t.tree) await Vi(e, i, n, r);
|
|
29012
|
+
}
|
|
29013
|
+
//#endregion
|
|
28579
29014
|
//#region src/v2019C1/extensions/index.ts
|
|
28580
|
-
var
|
|
28581
|
-
cleanUp:
|
|
29015
|
+
var Hi = {
|
|
29016
|
+
cleanUp: xt,
|
|
28582
29017
|
dataModel: Yt,
|
|
28583
29018
|
history: en,
|
|
28584
|
-
identity:
|
|
29019
|
+
identity: cn,
|
|
28585
29020
|
lifecycle: {
|
|
28586
|
-
query: {
|
|
29021
|
+
query: {
|
|
29022
|
+
report: Ri,
|
|
29023
|
+
checkTemplateUuids: Bi
|
|
29024
|
+
},
|
|
28587
29025
|
transaction: {
|
|
28588
|
-
extract:
|
|
28589
|
-
instantiate:
|
|
29026
|
+
extract: pi,
|
|
29027
|
+
instantiate: mi,
|
|
28590
29028
|
transplant: { deep: J },
|
|
28591
|
-
update:
|
|
28592
|
-
apply:
|
|
29029
|
+
update: ri,
|
|
29030
|
+
apply: ii
|
|
28593
29031
|
}
|
|
28594
29032
|
},
|
|
28595
|
-
reference:
|
|
29033
|
+
reference: z,
|
|
28596
29034
|
signature: { query: Ft },
|
|
28597
|
-
presentation: { query:
|
|
29035
|
+
presentation: { query: Ni }
|
|
28598
29036
|
};
|
|
28599
29037
|
//#endregion
|
|
28600
29038
|
//#region src/v2019C1/hooks/after-created/private-wrapper.ts
|
|
28601
|
-
async function
|
|
29039
|
+
async function Ui(e) {
|
|
28602
29040
|
let { childRecord: t, parentRecord: n, query: r } = e;
|
|
28603
29041
|
if (t.namespace.prefix === x.namespaces.default.prefix) return [];
|
|
28604
29042
|
let i = n.tagName === "Private", a = n.namespace.prefix === x.namespaces.default.prefix;
|
|
@@ -28607,26 +29045,26 @@ async function xi(e) {
|
|
|
28607
29045
|
...n,
|
|
28608
29046
|
children: n.children.filter((e) => e.id !== t.id)
|
|
28609
29047
|
};
|
|
28610
|
-
return i ?
|
|
29048
|
+
return i ? Wi({
|
|
28611
29049
|
parentRecord: n,
|
|
28612
29050
|
childRecord: t,
|
|
28613
29051
|
query: r
|
|
28614
|
-
}) : o ?
|
|
29052
|
+
}) : o ? Gi({
|
|
28615
29053
|
existingPrivateRef: o,
|
|
28616
29054
|
parentRecord: n,
|
|
28617
29055
|
updatedParentRecord: s,
|
|
28618
29056
|
childRecord: t,
|
|
28619
29057
|
query: r
|
|
28620
|
-
}) : (await r.findAncestors(n)).some((e) => e.tagName === "Private" && e.attributes.some((e) => e.name === "type" && e.value === t.namespace.prefix)) ? [] :
|
|
29058
|
+
}) : (await r.findAncestors(n)).some((e) => e.tagName === "Private" && e.attributes.some((e) => e.name === "type" && e.value === t.namespace.prefix)) ? [] : Ki({
|
|
28621
29059
|
parentRecord: n,
|
|
28622
29060
|
updatedParentRecord: s,
|
|
28623
29061
|
childRecord: t
|
|
28624
29062
|
});
|
|
28625
29063
|
}
|
|
28626
|
-
async function
|
|
29064
|
+
async function Wi(e) {
|
|
28627
29065
|
let { parentRecord: t, childRecord: n, query: r } = e, a = t;
|
|
28628
29066
|
if (n.parent?.id === a.id && n.parent?.tagName === "Private") return [];
|
|
28629
|
-
let o = await
|
|
29067
|
+
let o = await qi({
|
|
28630
29068
|
privateId: a.id,
|
|
28631
29069
|
query: r
|
|
28632
29070
|
});
|
|
@@ -28634,7 +29072,7 @@ async function Si(e) {
|
|
|
28634
29072
|
detail: "Latest private record not found",
|
|
28635
29073
|
key: "ELEMENT_NOT_FOUND"
|
|
28636
29074
|
});
|
|
28637
|
-
let { childRecord: c, privateRecord: l } =
|
|
29075
|
+
let { childRecord: c, privateRecord: l } = Ji({
|
|
28638
29076
|
privateRecord: o,
|
|
28639
29077
|
childRecord: n
|
|
28640
29078
|
});
|
|
@@ -28648,8 +29086,8 @@ async function Si(e) {
|
|
|
28648
29086
|
newRecord: i(l)
|
|
28649
29087
|
}];
|
|
28650
29088
|
}
|
|
28651
|
-
async function
|
|
28652
|
-
let { existingPrivateRef: t, parentRecord: n, updatedParentRecord: r, childRecord: a, query: o } = e, c = await
|
|
29089
|
+
async function Gi(e) {
|
|
29090
|
+
let { existingPrivateRef: t, parentRecord: n, updatedParentRecord: r, childRecord: a, query: o } = e, c = await qi({
|
|
28653
29091
|
privateId: t.id,
|
|
28654
29092
|
query: o
|
|
28655
29093
|
});
|
|
@@ -28657,7 +29095,7 @@ async function Ci(e) {
|
|
|
28657
29095
|
detail: "Latest private record not found",
|
|
28658
29096
|
key: "ELEMENT_NOT_FOUND"
|
|
28659
29097
|
}), !c.attributes.some((e) => e.name === "type" && e.value === a.namespace.prefix)) return [];
|
|
28660
|
-
let { childRecord: l, privateRecord: u } =
|
|
29098
|
+
let { childRecord: l, privateRecord: u } = Ji({
|
|
28661
29099
|
privateRecord: c,
|
|
28662
29100
|
childRecord: a
|
|
28663
29101
|
});
|
|
@@ -28679,7 +29117,7 @@ async function Ci(e) {
|
|
|
28679
29117
|
}
|
|
28680
29118
|
];
|
|
28681
29119
|
}
|
|
28682
|
-
function
|
|
29120
|
+
function Ki(e) {
|
|
28683
29121
|
let { parentRecord: t, updatedParentRecord: n, childRecord: r } = e, a = {
|
|
28684
29122
|
id: crypto.randomUUID(),
|
|
28685
29123
|
tagName: "Private",
|
|
@@ -28728,14 +29166,14 @@ function wi(e) {
|
|
|
28728
29166
|
}
|
|
28729
29167
|
];
|
|
28730
29168
|
}
|
|
28731
|
-
async function
|
|
29169
|
+
async function qi(e) {
|
|
28732
29170
|
let { privateId: t, query: n } = e;
|
|
28733
29171
|
return await n.getRecord({
|
|
28734
29172
|
id: t,
|
|
28735
29173
|
tagName: "Private"
|
|
28736
29174
|
});
|
|
28737
29175
|
}
|
|
28738
|
-
function
|
|
29176
|
+
function Ji(e) {
|
|
28739
29177
|
let { privateRecord: t, childRecord: n } = e;
|
|
28740
29178
|
return {
|
|
28741
29179
|
childRecord: {
|
|
@@ -28756,7 +29194,7 @@ function Ei(e) {
|
|
|
28756
29194
|
}
|
|
28757
29195
|
//#endregion
|
|
28758
29196
|
//#region src/v2019C1/hooks/shared/ref-entry-ops.ts
|
|
28759
|
-
async function
|
|
29197
|
+
async function Yi(e) {
|
|
28760
29198
|
let { uuid: t, entry: r, target: a, query: o } = e;
|
|
28761
29199
|
if (!n(r.refTagName, x)) return [];
|
|
28762
29200
|
let s = await o.getRecordsByTagName(r.refTagName), c = [];
|
|
@@ -28765,7 +29203,7 @@ async function Di(e) {
|
|
|
28765
29203
|
let n = {
|
|
28766
29204
|
tagName: e.tagName,
|
|
28767
29205
|
id: e.id
|
|
28768
|
-
}, s = await
|
|
29206
|
+
}, s = await z.query.buildReferencePath(o, {
|
|
28769
29207
|
reference: n,
|
|
28770
29208
|
target: a
|
|
28771
29209
|
});
|
|
@@ -28785,17 +29223,17 @@ async function Di(e) {
|
|
|
28785
29223
|
}
|
|
28786
29224
|
return c;
|
|
28787
29225
|
}
|
|
28788
|
-
function
|
|
29226
|
+
function Xi(e) {
|
|
28789
29227
|
let t = [];
|
|
28790
|
-
for (let n of
|
|
28791
|
-
let r =
|
|
29228
|
+
for (let n of je) {
|
|
29229
|
+
let r = ke[n]?.get(e);
|
|
28792
29230
|
r && t.push(...r);
|
|
28793
29231
|
}
|
|
28794
29232
|
return t;
|
|
28795
29233
|
}
|
|
28796
29234
|
//#endregion
|
|
28797
29235
|
//#region src/v2019C1/hooks/shared/record-ops.ts
|
|
28798
|
-
function
|
|
29236
|
+
function Zi(e, t) {
|
|
28799
29237
|
return {
|
|
28800
29238
|
status: "updated",
|
|
28801
29239
|
oldRecord: e,
|
|
@@ -28805,7 +29243,7 @@ function ki(e, t) {
|
|
|
28805
29243
|
}
|
|
28806
29244
|
};
|
|
28807
29245
|
}
|
|
28808
|
-
function
|
|
29246
|
+
function Qi(e, t, n) {
|
|
28809
29247
|
return e.some((e) => e.name === t) ? e.map((e) => e.name === t ? {
|
|
28810
29248
|
...e,
|
|
28811
29249
|
value: n
|
|
@@ -28816,23 +29254,23 @@ function Ai(e, t, n) {
|
|
|
28816
29254
|
}
|
|
28817
29255
|
//#endregion
|
|
28818
29256
|
//#region src/v2019C1/hooks/shared/mapped-name.ts
|
|
28819
|
-
async function
|
|
28820
|
-
let n =
|
|
29257
|
+
async function $i(e, t) {
|
|
29258
|
+
let n = P.get(t.tagName);
|
|
28821
29259
|
if (!n || !t.attributes.find((e) => e.name === n.uuid)?.value) return null;
|
|
28822
|
-
let r = await
|
|
28823
|
-
return r === t.attributes.find((e) => e.name === n.path)?.value ? null :
|
|
29260
|
+
let r = await Re(e, t);
|
|
29261
|
+
return r === t.attributes.find((e) => e.name === n.path)?.value ? null : Zi(t, r === void 0 ? t.attributes.filter((e) => e.name !== n.path) : Qi(t.attributes, n.path, r));
|
|
28824
29262
|
}
|
|
28825
29263
|
//#endregion
|
|
28826
29264
|
//#region src/v2019C1/hooks/shared/ref-path-rebuild.ts
|
|
28827
|
-
async function
|
|
29265
|
+
async function ea(e) {
|
|
28828
29266
|
let { oldRecord: t, newRecord: n, query: r } = e;
|
|
28829
|
-
if (
|
|
28830
|
-
let i =
|
|
29267
|
+
if (P.has(n.tagName)) return [];
|
|
29268
|
+
let i = D[n.tagName];
|
|
28831
29269
|
if (!i) return [];
|
|
28832
29270
|
let a = [];
|
|
28833
29271
|
for (let e of i) {
|
|
28834
|
-
if (e.resolution ===
|
|
28835
|
-
let i = await
|
|
29272
|
+
if (e.resolution === M.unsupported || !ta(t, n, e)) continue;
|
|
29273
|
+
let i = await na({
|
|
28836
29274
|
newRecord: n,
|
|
28837
29275
|
pair: e,
|
|
28838
29276
|
query: r
|
|
@@ -28841,28 +29279,28 @@ async function Mi(e) {
|
|
|
28841
29279
|
}
|
|
28842
29280
|
return a;
|
|
28843
29281
|
}
|
|
28844
|
-
function
|
|
28845
|
-
return [n.attribute.uuid, ...n.companions.map((e) => e.name)].some((n) =>
|
|
29282
|
+
function ta(e, t, n) {
|
|
29283
|
+
return [n.attribute.uuid, ...n.companions.map((e) => e.name)].some((n) => ia(e, n) !== ia(t, n));
|
|
28846
29284
|
}
|
|
28847
|
-
async function
|
|
28848
|
-
let { newRecord: t, pair: n, query: r } = e, i =
|
|
29285
|
+
async function na(e) {
|
|
29286
|
+
let { newRecord: t, pair: n, query: r } = e, i = ia(t, n.attribute.uuid);
|
|
28849
29287
|
if (!i) return null;
|
|
28850
|
-
let a = await
|
|
29288
|
+
let a = await ra({
|
|
28851
29289
|
uuidValue: i,
|
|
28852
29290
|
targetTagNames: n.target,
|
|
28853
29291
|
query: r
|
|
28854
29292
|
});
|
|
28855
29293
|
if (!a) return null;
|
|
28856
|
-
let o = await
|
|
29294
|
+
let o = await j(r, {
|
|
28857
29295
|
reference: {
|
|
28858
29296
|
tagName: t.tagName,
|
|
28859
29297
|
id: t.id
|
|
28860
29298
|
},
|
|
28861
29299
|
target: a
|
|
28862
29300
|
});
|
|
28863
|
-
return !o ||
|
|
29301
|
+
return !o || ia(t, n.attribute.path) === o ? null : Zi(t, Qi(t.attributes, n.attribute.path, o));
|
|
28864
29302
|
}
|
|
28865
|
-
async function
|
|
29303
|
+
async function ra(e) {
|
|
28866
29304
|
let { uuidValue: t, targetTagNames: r, query: i } = e;
|
|
28867
29305
|
for (let e of r) {
|
|
28868
29306
|
if (!n(e, x)) continue;
|
|
@@ -28874,22 +29312,22 @@ async function Fi(e) {
|
|
|
28874
29312
|
}
|
|
28875
29313
|
return null;
|
|
28876
29314
|
}
|
|
28877
|
-
function
|
|
29315
|
+
function ia(e, t) {
|
|
28878
29316
|
return e.attributes.find((e) => e.name === t)?.value;
|
|
28879
29317
|
}
|
|
28880
29318
|
//#endregion
|
|
28881
29319
|
//#region src/v2019C1/hooks/shared/lnode-binding.ts
|
|
28882
|
-
var
|
|
28883
|
-
async function
|
|
29320
|
+
var aa = "None";
|
|
29321
|
+
async function oa(e) {
|
|
28884
29322
|
let { oldRecord: t, newRecord: n, query: r } = e;
|
|
28885
29323
|
if (n.tagName !== "LNode") return null;
|
|
28886
|
-
let i =
|
|
29324
|
+
let i = da(t, "lnUuid"), a = da(n, "lnUuid");
|
|
28887
29325
|
if (i === a) return null;
|
|
28888
|
-
let o = a ? await
|
|
28889
|
-
return o ?
|
|
29326
|
+
let o = a ? await sa(r, a) : await ca(r, n);
|
|
29327
|
+
return o ? ua(n, o) : null;
|
|
28890
29328
|
}
|
|
28891
|
-
async function
|
|
28892
|
-
let n = await
|
|
29329
|
+
async function sa(e, t) {
|
|
29330
|
+
let n = await la(e, t);
|
|
28893
29331
|
if (!n) return null;
|
|
28894
29332
|
let r = await e.getAttributes(n), i = await e.findAncestors(n), a = i.find((e) => e.tagName === "LDevice"), o = i.find((e) => e.tagName === "IED"), s = a ? await e.getAttributes({
|
|
28895
29333
|
tagName: "LDevice",
|
|
@@ -28906,9 +29344,9 @@ async function Ri(e, t) {
|
|
|
28906
29344
|
lnInst: r.inst
|
|
28907
29345
|
};
|
|
28908
29346
|
}
|
|
28909
|
-
async function
|
|
29347
|
+
async function ca(e, t) {
|
|
28910
29348
|
let n = {
|
|
28911
|
-
iedName:
|
|
29349
|
+
iedName: aa,
|
|
28912
29350
|
ldInst: void 0
|
|
28913
29351
|
}, r = await e.getChild({
|
|
28914
29352
|
tagName: "LNode",
|
|
@@ -28923,7 +29361,7 @@ async function zi(e, t) {
|
|
|
28923
29361
|
lnInst: i.sLnInst
|
|
28924
29362
|
};
|
|
28925
29363
|
}
|
|
28926
|
-
async function
|
|
29364
|
+
async function la(e, t) {
|
|
28927
29365
|
for (let r of ["LN", "LN0"]) {
|
|
28928
29366
|
if (!n(r, x)) continue;
|
|
28929
29367
|
let i = (await e.getRecordsByTagName(r)).find((e) => e.attributes.find((e) => e.name === "uuid")?.value === t);
|
|
@@ -28934,7 +29372,7 @@ async function Bi(e, t) {
|
|
|
28934
29372
|
}
|
|
28935
29373
|
return null;
|
|
28936
29374
|
}
|
|
28937
|
-
function
|
|
29375
|
+
function ua(e, t) {
|
|
28938
29376
|
let n = [...e.attributes], r = !1;
|
|
28939
29377
|
for (let [e, i] of Object.entries(t)) {
|
|
28940
29378
|
let t = n.find((t) => t.name === e)?.value;
|
|
@@ -28943,35 +29381,35 @@ function Vi(e, t) {
|
|
|
28943
29381
|
n = n.filter((t) => t.name !== e), r = !0;
|
|
28944
29382
|
continue;
|
|
28945
29383
|
}
|
|
28946
|
-
t !== i && (n =
|
|
29384
|
+
t !== i && (n = Qi(n, e, i), r = !0);
|
|
28947
29385
|
}
|
|
28948
|
-
return r ?
|
|
29386
|
+
return r ? Zi(e, n) : null;
|
|
28949
29387
|
}
|
|
28950
|
-
function
|
|
29388
|
+
function da(e, t) {
|
|
28951
29389
|
return e.attributes.find((e) => e.name === t)?.value;
|
|
28952
29390
|
}
|
|
28953
29391
|
//#endregion
|
|
28954
29392
|
//#region src/v2019C1/hooks/after-created/ref-paths.ts
|
|
28955
|
-
async function
|
|
28956
|
-
let { childRecord: t, query: n } = e, r = await
|
|
29393
|
+
async function fa(e) {
|
|
29394
|
+
let { childRecord: t, query: n } = e, r = await pa({
|
|
28957
29395
|
childRecord: t,
|
|
28958
29396
|
query: n
|
|
28959
|
-
}), i = await
|
|
29397
|
+
}), i = await ga({
|
|
28960
29398
|
childRecord: t,
|
|
28961
29399
|
query: n
|
|
28962
|
-
}), a = await
|
|
29400
|
+
}), a = await $i(n, o(t)), s = a ? [a] : [];
|
|
28963
29401
|
return [
|
|
28964
29402
|
...r,
|
|
28965
29403
|
...i,
|
|
28966
29404
|
...s
|
|
28967
29405
|
];
|
|
28968
29406
|
}
|
|
28969
|
-
async function
|
|
28970
|
-
let { childRecord: t, query: n } = e, r =
|
|
29407
|
+
async function pa(e) {
|
|
29408
|
+
let { childRecord: t, query: n } = e, r = Me.get(t.tagName);
|
|
28971
29409
|
if (!r?.length) return [];
|
|
28972
29410
|
let i = [];
|
|
28973
29411
|
for (let e of r) {
|
|
28974
|
-
let r = await
|
|
29412
|
+
let r = await ma({
|
|
28975
29413
|
childRecord: t,
|
|
28976
29414
|
pair: e,
|
|
28977
29415
|
query: n
|
|
@@ -28980,16 +29418,16 @@ async function Wi(e) {
|
|
|
28980
29418
|
}
|
|
28981
29419
|
return i;
|
|
28982
29420
|
}
|
|
28983
|
-
async function
|
|
29421
|
+
async function ma(e) {
|
|
28984
29422
|
let { childRecord: t, pair: n, query: r } = e, i = t.attributes.find((e) => e.name === n.uuidAttr)?.value;
|
|
28985
29423
|
if (!i) return null;
|
|
28986
|
-
let a = await
|
|
29424
|
+
let a = await ha({
|
|
28987
29425
|
uuidValue: i,
|
|
28988
29426
|
targetTagNames: n.targetTagNames,
|
|
28989
29427
|
query: r
|
|
28990
29428
|
});
|
|
28991
29429
|
if (!a) return null;
|
|
28992
|
-
let o = await
|
|
29430
|
+
let o = await j(r, {
|
|
28993
29431
|
reference: {
|
|
28994
29432
|
tagName: t.tagName,
|
|
28995
29433
|
id: t.id
|
|
@@ -29013,7 +29451,7 @@ async function Gi(e) {
|
|
|
29013
29451
|
}
|
|
29014
29452
|
};
|
|
29015
29453
|
}
|
|
29016
|
-
async function
|
|
29454
|
+
async function ha(e) {
|
|
29017
29455
|
let { uuidValue: t, targetTagNames: r, query: i } = e;
|
|
29018
29456
|
for (let e of r) {
|
|
29019
29457
|
if (!n(e, x)) continue;
|
|
@@ -29025,17 +29463,17 @@ async function Ki(e) {
|
|
|
29025
29463
|
}
|
|
29026
29464
|
return null;
|
|
29027
29465
|
}
|
|
29028
|
-
async function
|
|
29466
|
+
async function ga(e) {
|
|
29029
29467
|
let { childRecord: t, query: n } = e, r = t.attributes.find((e) => e.name === "uuid")?.value;
|
|
29030
29468
|
if (!r) return [];
|
|
29031
|
-
let i =
|
|
29469
|
+
let i = Xi(t.tagName);
|
|
29032
29470
|
if (i.length === 0) return [];
|
|
29033
29471
|
let a = {
|
|
29034
29472
|
tagName: t.tagName,
|
|
29035
29473
|
id: t.id
|
|
29036
29474
|
}, o = [];
|
|
29037
29475
|
for (let e of i) {
|
|
29038
|
-
let t = await
|
|
29476
|
+
let t = await Yi({
|
|
29039
29477
|
uuid: r,
|
|
29040
29478
|
entry: e,
|
|
29041
29479
|
target: a,
|
|
@@ -29047,134 +29485,20 @@ async function qi(e) {
|
|
|
29047
29485
|
}
|
|
29048
29486
|
//#endregion
|
|
29049
29487
|
//#region src/v2019C1/hooks/after-created/after-created.ts
|
|
29050
|
-
async function
|
|
29051
|
-
let { childRecord: t, parentRecord: n, query: r } = e, i = await
|
|
29488
|
+
async function _a(e) {
|
|
29489
|
+
let { childRecord: t, parentRecord: n, query: r } = e, i = await Ui({
|
|
29052
29490
|
childRecord: t,
|
|
29053
29491
|
parentRecord: n,
|
|
29054
29492
|
query: r
|
|
29055
|
-
}), a = await
|
|
29493
|
+
}), a = await fa({
|
|
29056
29494
|
childRecord: t,
|
|
29057
29495
|
query: r
|
|
29058
29496
|
});
|
|
29059
29497
|
return [...i, ...a];
|
|
29060
29498
|
}
|
|
29061
29499
|
//#endregion
|
|
29062
|
-
//#region src/v2019C1/hooks/after-deep-clone/ref-paths.ts
|
|
29063
|
-
async function Yi(e) {
|
|
29064
|
-
let { cumulativeCloneMappings: t, query: n } = e, { uuidMap: r, uuidToRef: i } = await Xi(t, n);
|
|
29065
|
-
if (r.size === 0) return [];
|
|
29066
|
-
let a = [];
|
|
29067
|
-
for (let { target: e } of t) {
|
|
29068
|
-
let t = await Qi({
|
|
29069
|
-
target: e,
|
|
29070
|
-
uuidMap: r,
|
|
29071
|
-
uuidToRef: i,
|
|
29072
|
-
query: n
|
|
29073
|
-
});
|
|
29074
|
-
t && a.push(t);
|
|
29075
|
-
}
|
|
29076
|
-
return a;
|
|
29077
|
-
}
|
|
29078
|
-
async function Xi(e, t) {
|
|
29079
|
-
let n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
|
|
29080
|
-
for (let { source: i, target: a } of e) await Zi({
|
|
29081
|
-
source: i,
|
|
29082
|
-
target: a,
|
|
29083
|
-
query: t,
|
|
29084
|
-
uuidMap: n,
|
|
29085
|
-
uuidToRef: r
|
|
29086
|
-
});
|
|
29087
|
-
return {
|
|
29088
|
-
uuidMap: n,
|
|
29089
|
-
uuidToRef: r
|
|
29090
|
-
};
|
|
29091
|
-
}
|
|
29092
|
-
async function Zi(e) {
|
|
29093
|
-
let { source: t, target: n, query: r, uuidMap: i, uuidToRef: a } = e, o = await r.getRecord(n);
|
|
29094
|
-
if (!o) return;
|
|
29095
|
-
let s = t.attributes.find((e) => e.name === "uuid")?.value, c = o.attributes.find((e) => e.name === "uuid")?.value;
|
|
29096
|
-
!s || !c || (i.set(s, c), a.set(c, {
|
|
29097
|
-
tagName: o.tagName,
|
|
29098
|
-
id: o.id
|
|
29099
|
-
}));
|
|
29100
|
-
}
|
|
29101
|
-
async function Qi(e) {
|
|
29102
|
-
let { target: t, uuidMap: n, uuidToRef: r, query: a } = e, o = t.tagName;
|
|
29103
|
-
if (!(o in O)) return null;
|
|
29104
|
-
let s = await a.getRecord(t);
|
|
29105
|
-
if (!s) return null;
|
|
29106
|
-
let c = O[o], l = [...s.attributes], u = !1;
|
|
29107
|
-
for (let e of c) {
|
|
29108
|
-
let t = await $i({
|
|
29109
|
-
pair: e,
|
|
29110
|
-
tagName: o,
|
|
29111
|
-
refId: s.id,
|
|
29112
|
-
updatedAttributes: l,
|
|
29113
|
-
uuidMap: n,
|
|
29114
|
-
uuidToRef: r,
|
|
29115
|
-
query: a
|
|
29116
|
-
});
|
|
29117
|
-
t && (l = t, u = !0);
|
|
29118
|
-
}
|
|
29119
|
-
return u ? {
|
|
29120
|
-
status: "updated",
|
|
29121
|
-
oldRecord: i(s),
|
|
29122
|
-
newRecord: i({
|
|
29123
|
-
...s,
|
|
29124
|
-
attributes: l
|
|
29125
|
-
})
|
|
29126
|
-
} : null;
|
|
29127
|
-
}
|
|
29128
|
-
async function $i(e) {
|
|
29129
|
-
let { pair: t, tagName: n, refId: r, uuidMap: i, uuidToRef: a, query: o } = e, s = [...e.updatedAttributes], c = s.find((e) => e.name === t.attribute.uuid)?.value;
|
|
29130
|
-
if (!c) return null;
|
|
29131
|
-
let l = i.get(c);
|
|
29132
|
-
if (!l) return null;
|
|
29133
|
-
let u = !1, d = ea(s, t.attribute.uuid, c, l);
|
|
29134
|
-
d && (s = d, u = !0);
|
|
29135
|
-
let f = await ta({
|
|
29136
|
-
attributes: s,
|
|
29137
|
-
pathAttrName: t.attribute.path,
|
|
29138
|
-
newUuid: l,
|
|
29139
|
-
uuidToRef: a,
|
|
29140
|
-
tagName: n,
|
|
29141
|
-
refId: r,
|
|
29142
|
-
query: o
|
|
29143
|
-
});
|
|
29144
|
-
return f && (s = f, u = !0), u ? s : null;
|
|
29145
|
-
}
|
|
29146
|
-
function ea(e, t, n, r) {
|
|
29147
|
-
return r === n ? null : e.map((e) => e.name === t ? {
|
|
29148
|
-
...e,
|
|
29149
|
-
value: r
|
|
29150
|
-
} : e);
|
|
29151
|
-
}
|
|
29152
|
-
async function ta(e) {
|
|
29153
|
-
let { attributes: t, pathAttrName: n, newUuid: r, uuidToRef: i, tagName: a, refId: o, query: s } = e, c = i.get(r);
|
|
29154
|
-
if (!c) return null;
|
|
29155
|
-
let l = await L.query.buildReferencePath(s, {
|
|
29156
|
-
reference: {
|
|
29157
|
-
tagName: a,
|
|
29158
|
-
id: o
|
|
29159
|
-
},
|
|
29160
|
-
target: {
|
|
29161
|
-
tagName: c.tagName,
|
|
29162
|
-
id: c.id
|
|
29163
|
-
}
|
|
29164
|
-
});
|
|
29165
|
-
return !l || t.find((e) => e.name === n)?.value === l ? null : t.map((e) => e.name === n ? {
|
|
29166
|
-
...e,
|
|
29167
|
-
value: l
|
|
29168
|
-
} : e);
|
|
29169
|
-
}
|
|
29170
|
-
//#endregion
|
|
29171
|
-
//#region src/v2019C1/hooks/after-deep-clone/after-deep-clone.ts
|
|
29172
|
-
async function na(e) {
|
|
29173
|
-
return Yi(e);
|
|
29174
|
-
}
|
|
29175
|
-
//#endregion
|
|
29176
29500
|
//#region src/v2019C1/hooks/after-standardized-record/uuid-attribute.ts
|
|
29177
|
-
function
|
|
29501
|
+
function va(e) {
|
|
29178
29502
|
let { record: t } = e, { tagName: n, attributes: r } = t, i = x.definition[n];
|
|
29179
29503
|
if (!("uuid" in i.attributes.details) || r.find((e) => e.name === "uuid")?.value) return t;
|
|
29180
29504
|
let a = i.attributes.details.uuid?.namespace, o = r.filter((e) => e.name !== "uuid");
|
|
@@ -29189,21 +29513,21 @@ function ra(e) {
|
|
|
29189
29513
|
}
|
|
29190
29514
|
//#endregion
|
|
29191
29515
|
//#region src/v2019C1/hooks/after-standardized-record/after-standardized-record.ts
|
|
29192
|
-
function
|
|
29193
|
-
return
|
|
29516
|
+
function ya(e) {
|
|
29517
|
+
return va(e);
|
|
29194
29518
|
}
|
|
29195
29519
|
//#endregion
|
|
29196
29520
|
//#region src/v2019C1/hooks/after-updated/ref-paths.ts
|
|
29197
|
-
async function
|
|
29198
|
-
let { oldRecord: t, newRecord: n, query: r } = e, i = [], a = o(t), s = o(n), c = await
|
|
29521
|
+
async function ba(e) {
|
|
29522
|
+
let { oldRecord: t, newRecord: n, query: r } = e, i = [], a = o(t), s = o(n), c = await $i(r, s);
|
|
29199
29523
|
c && i.push(c);
|
|
29200
|
-
let l = await
|
|
29524
|
+
let l = await oa({
|
|
29201
29525
|
oldRecord: a,
|
|
29202
29526
|
newRecord: s,
|
|
29203
29527
|
query: r
|
|
29204
29528
|
});
|
|
29205
29529
|
l && i.push(l);
|
|
29206
|
-
let u = await
|
|
29530
|
+
let u = await ea({
|
|
29207
29531
|
oldRecord: a,
|
|
29208
29532
|
newRecord: s,
|
|
29209
29533
|
query: r
|
|
@@ -29211,12 +29535,12 @@ async function aa(e) {
|
|
|
29211
29535
|
i.push(...u);
|
|
29212
29536
|
let d = n.attributes.find((e) => e.name === "uuid")?.value;
|
|
29213
29537
|
if (d) {
|
|
29214
|
-
let e =
|
|
29538
|
+
let e = Xi(n.tagName), t = {
|
|
29215
29539
|
tagName: n.tagName,
|
|
29216
29540
|
id: n.id
|
|
29217
29541
|
};
|
|
29218
29542
|
for (let n of e) {
|
|
29219
|
-
let e = await
|
|
29543
|
+
let e = await Yi({
|
|
29220
29544
|
uuid: d,
|
|
29221
29545
|
entry: n,
|
|
29222
29546
|
target: t,
|
|
@@ -29225,8 +29549,8 @@ async function aa(e) {
|
|
|
29225
29549
|
i.push(...e);
|
|
29226
29550
|
}
|
|
29227
29551
|
}
|
|
29228
|
-
if (
|
|
29229
|
-
let e = await
|
|
29552
|
+
if (xa(t, n)) {
|
|
29553
|
+
let e = await Sa({
|
|
29230
29554
|
newRecord: n,
|
|
29231
29555
|
query: r
|
|
29232
29556
|
});
|
|
@@ -29234,11 +29558,11 @@ async function aa(e) {
|
|
|
29234
29558
|
}
|
|
29235
29559
|
return i;
|
|
29236
29560
|
}
|
|
29237
|
-
function
|
|
29238
|
-
for (let n of
|
|
29561
|
+
function xa(e, t) {
|
|
29562
|
+
for (let n of se) if (e.attributes.find((e) => e.name === n)?.value !== t.attributes.find((e) => e.name === n)?.value) return !0;
|
|
29239
29563
|
return !1;
|
|
29240
29564
|
}
|
|
29241
|
-
async function
|
|
29565
|
+
async function Sa(e) {
|
|
29242
29566
|
let { newRecord: t, query: n } = e, r = {
|
|
29243
29567
|
tagName: t.tagName,
|
|
29244
29568
|
id: t.id
|
|
@@ -29247,14 +29571,14 @@ async function sa(e) {
|
|
|
29247
29571
|
if (r.id === t.id) continue;
|
|
29248
29572
|
let e = await n.any.getAttribute(r, { name: "uuid" });
|
|
29249
29573
|
if (!e) continue;
|
|
29250
|
-
let i =
|
|
29574
|
+
let i = Xi(r.tagName);
|
|
29251
29575
|
if (i.length === 0) continue;
|
|
29252
29576
|
let o = {
|
|
29253
29577
|
tagName: r.tagName,
|
|
29254
29578
|
id: r.id
|
|
29255
29579
|
};
|
|
29256
29580
|
for (let t of i) {
|
|
29257
|
-
let r = await
|
|
29581
|
+
let r = await Yi({
|
|
29258
29582
|
uuid: e,
|
|
29259
29583
|
entry: t,
|
|
29260
29584
|
target: o,
|
|
@@ -29267,18 +29591,18 @@ async function sa(e) {
|
|
|
29267
29591
|
}
|
|
29268
29592
|
//#endregion
|
|
29269
29593
|
//#region src/v2019C1/hooks/after-updated/after-updated.ts
|
|
29270
|
-
async function
|
|
29271
|
-
return
|
|
29594
|
+
async function Ca(e) {
|
|
29595
|
+
return ba(e);
|
|
29272
29596
|
}
|
|
29273
29597
|
//#endregion
|
|
29274
29598
|
//#region src/v2019C1/hooks/before-clone/before-clone.ts
|
|
29275
|
-
var
|
|
29276
|
-
function
|
|
29277
|
-
return
|
|
29599
|
+
var wa = new Set(Object.values(b).map((e) => e.uri)), Ta = new Set(Object.values(b).map((e) => e.prefix).filter(Boolean));
|
|
29600
|
+
function Ea(e) {
|
|
29601
|
+
return wa.has(e.namespace.uri) && !n(e.tagName, x);
|
|
29278
29602
|
}
|
|
29279
|
-
function
|
|
29603
|
+
function Da(e) {
|
|
29280
29604
|
let { record: t } = e, n = t, r = !0, i = !!t.value?.trim(), a = t.attributes.find((e) => e.name === "type")?.value, o = a !== void 0;
|
|
29281
|
-
t.tagName === "Private" && !t.tree.length && !i && !o && (r = !1), t.tagName === "Private" && !t.tree.length && !i && a !== void 0 &&
|
|
29605
|
+
t.tagName === "Private" && !t.tree.length && !i && !o && (r = !1), t.tagName === "Private" && !t.tree.length && !i && a !== void 0 && Ta.has(a) && (r = !1), Ea(n) && (r = !1), t.tagName === "Private" && n.tree.length > 0 && n.tree.every(Ea) && (r = !1);
|
|
29282
29606
|
let s = t.attributes.filter((e) => e.name !== "uuid");
|
|
29283
29607
|
return {
|
|
29284
29608
|
shouldBeCloned: r,
|
|
@@ -29290,17 +29614,17 @@ function fa(e) {
|
|
|
29290
29614
|
}
|
|
29291
29615
|
//#endregion
|
|
29292
29616
|
//#region src/v2019C1/hooks/before-delete/orphaned-refs.ts
|
|
29293
|
-
async function
|
|
29617
|
+
async function Oa(e) {
|
|
29294
29618
|
let { record: t, query: n } = e, r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set();
|
|
29295
|
-
if (await
|
|
29619
|
+
if (await Pa({
|
|
29296
29620
|
record: t,
|
|
29297
29621
|
query: n,
|
|
29298
29622
|
ids: r,
|
|
29299
29623
|
uuids: i
|
|
29300
29624
|
}), i.size === 0) return [];
|
|
29301
29625
|
let a = [];
|
|
29302
|
-
for (let e of
|
|
29303
|
-
let t = await
|
|
29626
|
+
for (let e of k) {
|
|
29627
|
+
let t = await ka({
|
|
29304
29628
|
refTagName: e,
|
|
29305
29629
|
subtreeIds: r,
|
|
29306
29630
|
subtreeUuids: i,
|
|
@@ -29310,11 +29634,11 @@ async function pa(e) {
|
|
|
29310
29634
|
}
|
|
29311
29635
|
return a;
|
|
29312
29636
|
}
|
|
29313
|
-
async function
|
|
29314
|
-
let { refTagName: t, subtreeIds: n, subtreeUuids: r, query: i } = e, a =
|
|
29637
|
+
async function ka(e) {
|
|
29638
|
+
let { refTagName: t, subtreeIds: n, subtreeUuids: r, query: i } = e, a = D[t], o = await i.getRecordsByTagName(t), s = [];
|
|
29315
29639
|
for (let e of o) {
|
|
29316
29640
|
if (n.has(e.id)) continue;
|
|
29317
|
-
let o = await
|
|
29641
|
+
let o = await Aa({
|
|
29318
29642
|
refTagName: t,
|
|
29319
29643
|
refRecord: e,
|
|
29320
29644
|
refPairs: a,
|
|
@@ -29325,15 +29649,15 @@ async function ma(e) {
|
|
|
29325
29649
|
}
|
|
29326
29650
|
return s;
|
|
29327
29651
|
}
|
|
29328
|
-
async function
|
|
29329
|
-
let { refTagName: t, refRecord: n, refPairs: r, subtreeUuids: i, query: a } = e, o =
|
|
29652
|
+
async function Aa(e) {
|
|
29653
|
+
let { refTagName: t, refRecord: n, refPairs: r, subtreeUuids: i, query: a } = e, o = ja({
|
|
29330
29654
|
refPairs: r,
|
|
29331
29655
|
refRecord: n,
|
|
29332
29656
|
subtreeUuids: i
|
|
29333
29657
|
});
|
|
29334
|
-
return o.size === 0 ? [] :
|
|
29658
|
+
return o.size === 0 ? [] : O.has(t) ? [Ma(n, o)] : Na(n, a);
|
|
29335
29659
|
}
|
|
29336
|
-
function
|
|
29660
|
+
function ja(e) {
|
|
29337
29661
|
let { refPairs: t, refRecord: n, subtreeUuids: r } = e, i = /* @__PURE__ */ new Set();
|
|
29338
29662
|
for (let e of t) {
|
|
29339
29663
|
let t = n.attributes.find((t) => t.name === e.attribute.uuid)?.value;
|
|
@@ -29344,7 +29668,7 @@ function ga(e) {
|
|
|
29344
29668
|
}
|
|
29345
29669
|
return i;
|
|
29346
29670
|
}
|
|
29347
|
-
function
|
|
29671
|
+
function Ma(e, t) {
|
|
29348
29672
|
let n = e.attributes.filter((e) => !t.has(e.name));
|
|
29349
29673
|
return {
|
|
29350
29674
|
status: "updated",
|
|
@@ -29355,7 +29679,7 @@ function _a(e, t) {
|
|
|
29355
29679
|
})
|
|
29356
29680
|
};
|
|
29357
29681
|
}
|
|
29358
|
-
async function
|
|
29682
|
+
async function Na(e, t) {
|
|
29359
29683
|
let n = [{
|
|
29360
29684
|
status: "deleted",
|
|
29361
29685
|
oldRecord: i(e),
|
|
@@ -29377,14 +29701,14 @@ async function va(e, t) {
|
|
|
29377
29701
|
}
|
|
29378
29702
|
return n;
|
|
29379
29703
|
}
|
|
29380
|
-
async function
|
|
29704
|
+
async function Pa(e) {
|
|
29381
29705
|
let { record: t, query: n, ids: r, uuids: i } = e;
|
|
29382
29706
|
r.add(t.id);
|
|
29383
29707
|
let a = t.attributes.find((e) => e.name === "uuid")?.value;
|
|
29384
29708
|
a && i.add(a);
|
|
29385
29709
|
for (let e of t.children) {
|
|
29386
29710
|
let t = await n.getRecord(e);
|
|
29387
|
-
t && await
|
|
29711
|
+
t && await Pa({
|
|
29388
29712
|
record: t,
|
|
29389
29713
|
query: n,
|
|
29390
29714
|
ids: r,
|
|
@@ -29394,31 +29718,31 @@ async function ya(e) {
|
|
|
29394
29718
|
}
|
|
29395
29719
|
//#endregion
|
|
29396
29720
|
//#region src/v2019C1/hooks/before-delete/before-delete.ts
|
|
29397
|
-
async function
|
|
29398
|
-
return
|
|
29721
|
+
async function Fa(e) {
|
|
29722
|
+
return Oa(e);
|
|
29399
29723
|
}
|
|
29400
29724
|
//#endregion
|
|
29401
29725
|
//#region src/v2019C1/hooks/io/io-hooks.ts
|
|
29402
|
-
function
|
|
29726
|
+
function Ia() {
|
|
29403
29727
|
let e = /* @__PURE__ */ new Map(), t = [], n = [];
|
|
29404
29728
|
return {
|
|
29405
29729
|
beforeImportRecord: (r) => {
|
|
29406
29730
|
let { record: i, ancestry: a } = r, { tagName: o } = i, s = i.attributes.find((e) => e.name === "uuid")?.value;
|
|
29407
29731
|
if (s && pe.has(o)) {
|
|
29408
|
-
let t =
|
|
29732
|
+
let t = ue({
|
|
29409
29733
|
record: i,
|
|
29410
29734
|
ancestry: a
|
|
29411
29735
|
});
|
|
29412
29736
|
t && e.set(t.path, s);
|
|
29413
29737
|
}
|
|
29414
|
-
if (!
|
|
29415
|
-
let c =
|
|
29738
|
+
if (!A.has(o)) return;
|
|
29739
|
+
let c = D[o];
|
|
29416
29740
|
for (let e of c) {
|
|
29417
29741
|
let r = i.attributes.find((t) => t.name === e.attribute.path)?.value;
|
|
29418
29742
|
if (!r || i.attributes.find((t) => t.name === e.attribute.uuid)?.value) continue;
|
|
29419
29743
|
let s = ge(e.resolution, e.attribute.path, r, a);
|
|
29420
29744
|
if (!s) {
|
|
29421
|
-
e.resolution ===
|
|
29745
|
+
e.resolution === M.unsupported && n.push({
|
|
29422
29746
|
type: "unsupported-xpath-reference",
|
|
29423
29747
|
recordId: i.id,
|
|
29424
29748
|
details: {
|
|
@@ -29474,13 +29798,12 @@ function xa() {
|
|
|
29474
29798
|
}
|
|
29475
29799
|
//#endregion
|
|
29476
29800
|
//#region src/v2019C1/hooks/index.ts
|
|
29477
|
-
var
|
|
29478
|
-
beforeClone:
|
|
29479
|
-
afterStandardizedRecord:
|
|
29480
|
-
afterCreated:
|
|
29481
|
-
|
|
29482
|
-
|
|
29483
|
-
beforeDelete: ba
|
|
29801
|
+
var La = {
|
|
29802
|
+
beforeClone: Da,
|
|
29803
|
+
afterStandardizedRecord: ya,
|
|
29804
|
+
afterCreated: _a,
|
|
29805
|
+
afterUpdated: Ca,
|
|
29806
|
+
beforeDelete: Fa
|
|
29484
29807
|
};
|
|
29485
29808
|
//#endregion
|
|
29486
|
-
export { b as A, pe as C, y as D,
|
|
29809
|
+
export { b as A, pe as C, y as D, ae as E, x as O, A as S, se as T, Fe as _, St as a, O as b, Ne as c, P as d, Me as f, F as g, Pe as h, zi as i, v as k, je as l, Ae as m, Ia as n, at as o, ke as p, Hi as r, Le as s, La as t, Ie as u, N as v, D as w, k as x, M as y };
|