@dialecte/scl 0.2.23 → 0.2.24
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/{extensions-DzEZ0dCq.js → extensions-DY4WzfhV.js} +398 -324
- package/dist/v2019C1/extensions/data-model/transaction/import-types.d.ts +6 -1
- package/dist/v2019C1/extensions/data-model/transaction/import-types.d.ts.map +1 -1
- package/dist/v2019C1/extensions/data-model/transaction/import-types.types.d.ts +2 -0
- package/dist/v2019C1/extensions/data-model/transaction/import-types.types.d.ts.map +1 -1
- package/dist/v2019C1/extensions/extraction/transaction/deep.d.ts.map +1 -1
- package/dist/v2019C1/index.js +1 -1
- package/dist/v2019C1/test.js +1 -1
- package/package.json +1 -1
|
@@ -24055,8 +24055,8 @@ var o = Object.defineProperty, s = (e, t) => {
|
|
|
24055
24055
|
//#region src/v2019C1/hooks/after-created/private-wrapper.ts
|
|
24056
24056
|
async function g(e) {
|
|
24057
24057
|
let { childRecord: t, parentRecord: n, query: r } = e;
|
|
24058
|
-
if (t.namespace.prefix ===
|
|
24059
|
-
let i = n.tagName === "Private", a = n.namespace.prefix ===
|
|
24058
|
+
if (t.namespace.prefix === z.namespaces.default.prefix) return [];
|
|
24059
|
+
let i = n.tagName === "Private", a = n.namespace.prefix === z.namespaces.default.prefix;
|
|
24060
24060
|
if (!i && !a) return [];
|
|
24061
24061
|
let o = n.children.find((e) => e.tagName === "Private"), s = {
|
|
24062
24062
|
...n,
|
|
@@ -24138,7 +24138,7 @@ function y(e) {
|
|
|
24138
24138
|
let { parentRecord: t, updatedParentRecord: n, childRecord: r } = e, a = {
|
|
24139
24139
|
id: crypto.randomUUID(),
|
|
24140
24140
|
tagName: "Private",
|
|
24141
|
-
namespace:
|
|
24141
|
+
namespace: z.namespaces.default,
|
|
24142
24142
|
attributes: [{
|
|
24143
24143
|
name: "type",
|
|
24144
24144
|
value: r.namespace.prefix
|
|
@@ -24433,7 +24433,7 @@ function E(e) {
|
|
|
24433
24433
|
};
|
|
24434
24434
|
}
|
|
24435
24435
|
function se(e, t, n, r) {
|
|
24436
|
-
return !e || e ===
|
|
24436
|
+
return !e || e === O.unsupported ? null : e === O.direct ? { lookupKey: n } : e === O.iedAddress ? le(n, r) : e === O.lnode ? ce(n) : e === O.behaviorDescription ? ue(t, n, r) : null;
|
|
24437
24437
|
}
|
|
24438
24438
|
function ce(e) {
|
|
24439
24439
|
let { path: t, qualifier: n } = E(e);
|
|
@@ -24488,15 +24488,15 @@ async function me(e, t) {
|
|
|
24488
24488
|
let { reference: n, target: r } = t, a = he(n.tagName, r.tagName);
|
|
24489
24489
|
if (!a) return null;
|
|
24490
24490
|
let o = a.resolution;
|
|
24491
|
-
if (o ===
|
|
24492
|
-
if (o ===
|
|
24491
|
+
if (o === O.unsupported) return null;
|
|
24492
|
+
if (o === O.behaviorDescription) {
|
|
24493
24493
|
let t = await e.getRecord(r);
|
|
24494
24494
|
return t ? w(i(t))?.segment ?? null : null;
|
|
24495
24495
|
}
|
|
24496
24496
|
let s = await ae(e, r);
|
|
24497
24497
|
if (!s) return null;
|
|
24498
24498
|
let c = s.path;
|
|
24499
|
-
if (o ===
|
|
24499
|
+
if (o === O.lnode) {
|
|
24500
24500
|
let t = await e.getRecord(n);
|
|
24501
24501
|
if (!t) return c;
|
|
24502
24502
|
let r = t.attributes.find((e) => e.name === a.attribute.path)?.value;
|
|
@@ -24507,7 +24507,7 @@ async function me(e, t) {
|
|
|
24507
24507
|
return c;
|
|
24508
24508
|
}
|
|
24509
24509
|
function he(e, t) {
|
|
24510
|
-
let n =
|
|
24510
|
+
let n = k[e];
|
|
24511
24511
|
return n ? n.find((e) => e.target.includes(t)) ?? null : null;
|
|
24512
24512
|
}
|
|
24513
24513
|
//#endregion
|
|
@@ -24532,7 +24532,7 @@ async function ve(e, t, n) {
|
|
|
24532
24532
|
qualifier: xe(r, n, a)
|
|
24533
24533
|
};
|
|
24534
24534
|
let s;
|
|
24535
|
-
(r.resolution ===
|
|
24535
|
+
(r.resolution === O.behaviorDescription || r.resolution === O.iedAddress) && (s = (await e.findAncestors(t, { order: "top-down" })).map((e) => i(e)));
|
|
24536
24536
|
let c = se(r.resolution, n, a, s);
|
|
24537
24537
|
if (!c) return;
|
|
24538
24538
|
let l = oe(c.lookupKey);
|
|
@@ -24549,7 +24549,7 @@ async function ve(e, t, n) {
|
|
|
24549
24549
|
};
|
|
24550
24550
|
}
|
|
24551
24551
|
function ye(e, t) {
|
|
24552
|
-
let n =
|
|
24552
|
+
let n = k[e];
|
|
24553
24553
|
if (n) return n.find((e) => e.attribute.path === t);
|
|
24554
24554
|
}
|
|
24555
24555
|
async function be(e, t, n) {
|
|
@@ -24563,8 +24563,8 @@ async function be(e, t, n) {
|
|
|
24563
24563
|
}
|
|
24564
24564
|
}
|
|
24565
24565
|
function xe(e, t, n) {
|
|
24566
|
-
if (e.resolution ===
|
|
24567
|
-
if (e.resolution ===
|
|
24566
|
+
if (e.resolution === O.lnode) return E(n).qualifier;
|
|
24567
|
+
if (e.resolution === O.behaviorDescription && t === "dataName") return n;
|
|
24568
24568
|
}
|
|
24569
24569
|
var Se = new Set(h.LNode.attributes.details.lnClass.facets.enumeration), Ce = {
|
|
24570
24570
|
LNode: "lnInst",
|
|
@@ -24636,16 +24636,16 @@ async function Oe(e, t, n) {
|
|
|
24636
24636
|
}
|
|
24637
24637
|
//#endregion
|
|
24638
24638
|
//#region src/v2019C1/extensions/reference/query/resolve/resolve-element-path.ts
|
|
24639
|
-
async function
|
|
24639
|
+
async function ke(e, t) {
|
|
24640
24640
|
let n = oe(t);
|
|
24641
|
-
if (n.length !== 0) return
|
|
24641
|
+
if (n.length !== 0) return D({
|
|
24642
24642
|
query: e,
|
|
24643
24643
|
current: await e.getRoot(),
|
|
24644
24644
|
segments: n,
|
|
24645
24645
|
index: 0
|
|
24646
24646
|
});
|
|
24647
24647
|
}
|
|
24648
|
-
async function
|
|
24648
|
+
async function D(e) {
|
|
24649
24649
|
let { query: t, current: n, segments: r, index: a } = e;
|
|
24650
24650
|
if (a >= r.length) return n;
|
|
24651
24651
|
let o = n.children ?? [];
|
|
@@ -24655,7 +24655,7 @@ async function O(e) {
|
|
|
24655
24655
|
if (!e) continue;
|
|
24656
24656
|
let n = w(i(e));
|
|
24657
24657
|
if (!n) {
|
|
24658
|
-
let n = await
|
|
24658
|
+
let n = await D({
|
|
24659
24659
|
query: t,
|
|
24660
24660
|
current: e,
|
|
24661
24661
|
segments: r,
|
|
@@ -24665,7 +24665,7 @@ async function O(e) {
|
|
|
24665
24665
|
continue;
|
|
24666
24666
|
}
|
|
24667
24667
|
if (n.segment === c.segment && n.separator === c.separator) {
|
|
24668
|
-
let n = await
|
|
24668
|
+
let n = await D({
|
|
24669
24669
|
query: t,
|
|
24670
24670
|
current: e,
|
|
24671
24671
|
segments: r,
|
|
@@ -24678,14 +24678,14 @@ async function O(e) {
|
|
|
24678
24678
|
}
|
|
24679
24679
|
//#endregion
|
|
24680
24680
|
//#region src/v2019C1/extensions/reference/query/resolve/resolve-mapped-lnode.ts
|
|
24681
|
-
var
|
|
24682
|
-
async function
|
|
24683
|
-
let n = ge(
|
|
24681
|
+
var Ae = new Set(["LN", "LN0"]);
|
|
24682
|
+
async function je(e, t) {
|
|
24683
|
+
let n = ge(Me(t));
|
|
24684
24684
|
if (!n) return;
|
|
24685
|
-
let r = await
|
|
24686
|
-
if (!(!r || !
|
|
24685
|
+
let r = await ke(e, n);
|
|
24686
|
+
if (!(!r || !Ae.has(r.tagName))) return r;
|
|
24687
24687
|
}
|
|
24688
|
-
function
|
|
24688
|
+
function Me(e) {
|
|
24689
24689
|
let t = (t) => e.attributes.find((e) => e.name === t)?.value;
|
|
24690
24690
|
return {
|
|
24691
24691
|
iedName: t("iedName"),
|
|
@@ -24697,13 +24697,13 @@ function je(e) {
|
|
|
24697
24697
|
}
|
|
24698
24698
|
//#endregion
|
|
24699
24699
|
//#region src/v2019C1/extensions/reference/constants/resolution-types.ts
|
|
24700
|
-
var
|
|
24700
|
+
var O = {
|
|
24701
24701
|
direct: "direct",
|
|
24702
24702
|
lnode: "lnode",
|
|
24703
24703
|
iedAddress: "ied-address",
|
|
24704
24704
|
behaviorDescription: "behavior-description",
|
|
24705
24705
|
unsupported: "unsupported"
|
|
24706
|
-
},
|
|
24706
|
+
}, k = {
|
|
24707
24707
|
AllocationRoleRef: [{
|
|
24708
24708
|
attribute: {
|
|
24709
24709
|
path: "allocationRole",
|
|
@@ -25072,7 +25072,7 @@ var k = {
|
|
|
25072
25072
|
target: ["Variable"],
|
|
25073
25073
|
companions: []
|
|
25074
25074
|
}]
|
|
25075
|
-
},
|
|
25075
|
+
}, A = {
|
|
25076
25076
|
LN: [{
|
|
25077
25077
|
attribute: "lnType",
|
|
25078
25078
|
target: "LNodeType"
|
|
@@ -25126,7 +25126,7 @@ var k = {
|
|
|
25126
25126
|
};
|
|
25127
25127
|
//#endregion
|
|
25128
25128
|
//#region src/v2019C1/extensions/reference/constants/helpers.ts
|
|
25129
|
-
function
|
|
25129
|
+
function Ne(e) {
|
|
25130
25130
|
let t = {};
|
|
25131
25131
|
for (let [n, r] of Object.entries(e)) for (let e of r) {
|
|
25132
25132
|
let r = t[e.resolution] ??= /* @__PURE__ */ new Map();
|
|
@@ -25141,7 +25141,7 @@ function Me(e) {
|
|
|
25141
25141
|
}
|
|
25142
25142
|
return t;
|
|
25143
25143
|
}
|
|
25144
|
-
function
|
|
25144
|
+
function Pe(e) {
|
|
25145
25145
|
let t = /* @__PURE__ */ new Map();
|
|
25146
25146
|
for (let [n, r] of Object.entries(e)) t.set(n, r.map((e) => ({
|
|
25147
25147
|
uuidAttr: e.attribute.uuid,
|
|
@@ -25151,7 +25151,7 @@ function Ne(e) {
|
|
|
25151
25151
|
})));
|
|
25152
25152
|
return t;
|
|
25153
25153
|
}
|
|
25154
|
-
function
|
|
25154
|
+
function Fe(e) {
|
|
25155
25155
|
let t = /* @__PURE__ */ new Map();
|
|
25156
25156
|
for (let [n, r] of Object.entries(e)) for (let e of r) {
|
|
25157
25157
|
let r = t.get(e.target) ?? [];
|
|
@@ -25165,12 +25165,12 @@ function Pe(e) {
|
|
|
25165
25165
|
}
|
|
25166
25166
|
//#endregion
|
|
25167
25167
|
//#region src/v2019C1/extensions/reference/constants/derived.ts
|
|
25168
|
-
var
|
|
25169
|
-
|
|
25170
|
-
|
|
25171
|
-
|
|
25172
|
-
|
|
25173
|
-
],
|
|
25168
|
+
var j = Ne(k), M = [
|
|
25169
|
+
O.direct,
|
|
25170
|
+
O.lnode,
|
|
25171
|
+
O.iedAddress,
|
|
25172
|
+
O.behaviorDescription
|
|
25173
|
+
], Ie = Pe(k), Le = [...new Set(Object.values(k).flatMap((e) => e.map((e) => e.attribute.uuid)))], Re = new Map(Object.entries(A).map(([e, t]) => [e, [...new Set(t.map((e) => e.attribute))]])), N = Fe(A), ze = new Set(N.keys()), P = new Set([
|
|
25174
25174
|
"SourceRef",
|
|
25175
25175
|
"ControlRef",
|
|
25176
25176
|
"DOS",
|
|
@@ -25179,7 +25179,7 @@ var M = Me(A), N = [
|
|
|
25179
25179
|
"InputVar",
|
|
25180
25180
|
"OutputVar",
|
|
25181
25181
|
"ProcessEcho"
|
|
25182
|
-
]),
|
|
25182
|
+
]), Be = {
|
|
25183
25183
|
FunctionCatRef: ["SubCategory", "FunctionCategory"],
|
|
25184
25184
|
PowerSystemRelation: ["PowerSystemRelations"],
|
|
25185
25185
|
Resource: ["ProcessResource", "ProcessResources"],
|
|
@@ -25187,29 +25187,29 @@ var M = Me(A), N = [
|
|
|
25187
25187
|
};
|
|
25188
25188
|
//#endregion
|
|
25189
25189
|
//#region src/v2019C1/extensions/reference/guards.ts
|
|
25190
|
-
function
|
|
25191
|
-
return
|
|
25190
|
+
function Ve(e) {
|
|
25191
|
+
return ze.has(e);
|
|
25192
25192
|
}
|
|
25193
25193
|
//#endregion
|
|
25194
25194
|
//#region src/v2019C1/extensions/reference/query/find/find-refs-pointing-to.ts
|
|
25195
|
-
async function
|
|
25195
|
+
async function He(e, t) {
|
|
25196
25196
|
let { target: n, containerTagName: r } = t, i = await e.getRecord(n);
|
|
25197
|
-
return i ?
|
|
25197
|
+
return i ? Ve(i.tagName) ? We(e, i, r) : Ue(e, i, r) : [];
|
|
25198
25198
|
}
|
|
25199
|
-
async function
|
|
25199
|
+
async function Ue(e, t, r) {
|
|
25200
25200
|
let i = t.attributes.find((e) => e.name === "uuid")?.value;
|
|
25201
25201
|
if (!i) return [];
|
|
25202
|
-
let a =
|
|
25202
|
+
let a = Ke(t.tagName);
|
|
25203
25203
|
if (a.length === 0) return [];
|
|
25204
25204
|
let o = [];
|
|
25205
25205
|
for (let t of a) {
|
|
25206
|
-
if (!n(t.refTagName,
|
|
25206
|
+
if (!n(t.refTagName, z)) continue;
|
|
25207
25207
|
let a = await e.findByAttributes({
|
|
25208
25208
|
tagName: t.refTagName,
|
|
25209
25209
|
attributes: { [t.uuidAttr]: i }
|
|
25210
25210
|
});
|
|
25211
25211
|
for (let t of a) {
|
|
25212
|
-
let n = r ? await
|
|
25212
|
+
let n = r ? await qe(e, t, r) : void 0;
|
|
25213
25213
|
o.push({
|
|
25214
25214
|
ref: t,
|
|
25215
25215
|
container: n
|
|
@@ -25218,19 +25218,19 @@ async function Be(e, t, r) {
|
|
|
25218
25218
|
}
|
|
25219
25219
|
return o;
|
|
25220
25220
|
}
|
|
25221
|
-
async function
|
|
25221
|
+
async function We(e, t, r) {
|
|
25222
25222
|
let i = t.attributes.find((e) => e.name === "id")?.value;
|
|
25223
25223
|
if (!i) return [];
|
|
25224
|
-
let a =
|
|
25224
|
+
let a = N.get(t.tagName) ?? [], o = [];
|
|
25225
25225
|
for (let t of a) {
|
|
25226
|
-
if (!n(t.refTagName,
|
|
25226
|
+
if (!n(t.refTagName, z)) continue;
|
|
25227
25227
|
let a = await e.findByAttributes({
|
|
25228
25228
|
tagName: t.refTagName,
|
|
25229
25229
|
attributes: { [t.attribute]: i }
|
|
25230
25230
|
});
|
|
25231
25231
|
for (let n of a) {
|
|
25232
|
-
if (!
|
|
25233
|
-
let i = r ? await
|
|
25232
|
+
if (!Ge(n, t)) continue;
|
|
25233
|
+
let i = r ? await qe(e, n, r) : void 0;
|
|
25234
25234
|
o.push({
|
|
25235
25235
|
ref: n,
|
|
25236
25236
|
container: i
|
|
@@ -25239,37 +25239,37 @@ async function Ve(e, t, r) {
|
|
|
25239
25239
|
}
|
|
25240
25240
|
return o;
|
|
25241
25241
|
}
|
|
25242
|
-
function
|
|
25242
|
+
function Ge(e, t) {
|
|
25243
25243
|
return t.when ? e.attributes.find((e) => e.name === t.when.attribute)?.value === t.when.equals : !0;
|
|
25244
25244
|
}
|
|
25245
|
-
function
|
|
25245
|
+
function Ke(e) {
|
|
25246
25246
|
let t = [];
|
|
25247
|
-
for (let n of
|
|
25248
|
-
let r =
|
|
25247
|
+
for (let n of M) {
|
|
25248
|
+
let r = j[n].get(e);
|
|
25249
25249
|
r && t.push(...r);
|
|
25250
25250
|
}
|
|
25251
25251
|
return t;
|
|
25252
25252
|
}
|
|
25253
|
-
async function
|
|
25253
|
+
async function qe(e, t, n) {
|
|
25254
25254
|
return (await e.findAncestors(t, { stopAtTagName: n })).find((e) => e.tagName === n);
|
|
25255
25255
|
}
|
|
25256
25256
|
//#endregion
|
|
25257
25257
|
//#region src/v2019C1/extensions/reference/query/index.ts
|
|
25258
|
-
var
|
|
25258
|
+
var Je = /* @__PURE__ */ s({
|
|
25259
25259
|
buildElementPath: () => ae,
|
|
25260
25260
|
buildMappedLNodePath: () => ge,
|
|
25261
25261
|
buildReferencePath: () => me,
|
|
25262
|
-
findRefsPointingTo: () =>
|
|
25263
|
-
resolveElementPath: () =>
|
|
25264
|
-
resolveMappedLNode: () =>
|
|
25262
|
+
findRefsPointingTo: () => He,
|
|
25263
|
+
resolveElementPath: () => ke,
|
|
25264
|
+
resolveMappedLNode: () => je,
|
|
25265
25265
|
resolveReferencePath: () => ve
|
|
25266
25266
|
});
|
|
25267
25267
|
//#endregion
|
|
25268
25268
|
//#region src/v2019C1/extensions/reference/transaction/apply-type-id-remap.ts
|
|
25269
|
-
async function
|
|
25269
|
+
async function F(e, t) {
|
|
25270
25270
|
let { records: n, idRemap: r } = t;
|
|
25271
25271
|
if (r.size !== 0) for (let t of n) {
|
|
25272
|
-
let n =
|
|
25272
|
+
let n = Re.get(t.tagName);
|
|
25273
25273
|
if (!n) continue;
|
|
25274
25274
|
let i = await e.getRecord(t);
|
|
25275
25275
|
if (!i) continue;
|
|
@@ -25285,22 +25285,22 @@ async function Ke(e, t) {
|
|
|
25285
25285
|
}
|
|
25286
25286
|
//#endregion
|
|
25287
25287
|
//#region src/v2019C1/extensions/reference/index.ts
|
|
25288
|
-
var
|
|
25289
|
-
query:
|
|
25290
|
-
transaction: /* @__PURE__ */ s({ applyTypeIdRemap: () =>
|
|
25288
|
+
var I = {
|
|
25289
|
+
query: Je,
|
|
25290
|
+
transaction: /* @__PURE__ */ s({ applyTypeIdRemap: () => F })
|
|
25291
25291
|
};
|
|
25292
25292
|
//#endregion
|
|
25293
25293
|
//#region src/v2019C1/hooks/shared/ref-entry-ops.ts
|
|
25294
|
-
async function
|
|
25294
|
+
async function L(e) {
|
|
25295
25295
|
let { uuid: t, entry: r, target: a, query: o } = e;
|
|
25296
|
-
if (!n(r.refTagName,
|
|
25296
|
+
if (!n(r.refTagName, z)) return [];
|
|
25297
25297
|
let s = await o.getRecordsByTagName(r.refTagName), c = [];
|
|
25298
25298
|
for (let e of s) {
|
|
25299
25299
|
if (e.attributes.find((e) => e.name === r.uuidAttr)?.value !== t) continue;
|
|
25300
25300
|
let n = {
|
|
25301
25301
|
tagName: e.tagName,
|
|
25302
25302
|
id: e.id
|
|
25303
|
-
}, s = await
|
|
25303
|
+
}, s = await I.query.buildReferencePath(o, {
|
|
25304
25304
|
reference: n,
|
|
25305
25305
|
target: a
|
|
25306
25306
|
});
|
|
@@ -25320,32 +25320,32 @@ async function z(e) {
|
|
|
25320
25320
|
}
|
|
25321
25321
|
return c;
|
|
25322
25322
|
}
|
|
25323
|
-
function
|
|
25323
|
+
function R(e) {
|
|
25324
25324
|
let t = [];
|
|
25325
|
-
for (let n of
|
|
25326
|
-
let r =
|
|
25325
|
+
for (let n of M) {
|
|
25326
|
+
let r = j[n].get(e);
|
|
25327
25327
|
r && t.push(...r);
|
|
25328
25328
|
}
|
|
25329
25329
|
return t;
|
|
25330
25330
|
}
|
|
25331
25331
|
//#endregion
|
|
25332
25332
|
//#region src/v2019C1/hooks/after-created/ref-paths.ts
|
|
25333
|
-
async function
|
|
25334
|
-
let { childRecord: t, query: n } = e, r = await
|
|
25333
|
+
async function Ye(e) {
|
|
25334
|
+
let { childRecord: t, query: n } = e, r = await Xe({
|
|
25335
25335
|
childRecord: t,
|
|
25336
25336
|
query: n
|
|
25337
|
-
}), i = await
|
|
25337
|
+
}), i = await $e({
|
|
25338
25338
|
childRecord: t,
|
|
25339
25339
|
query: n
|
|
25340
25340
|
});
|
|
25341
25341
|
return [...r, ...i];
|
|
25342
25342
|
}
|
|
25343
|
-
async function
|
|
25344
|
-
let { childRecord: t, query: n } = e, r =
|
|
25343
|
+
async function Xe(e) {
|
|
25344
|
+
let { childRecord: t, query: n } = e, r = Ie.get(t.tagName);
|
|
25345
25345
|
if (!r?.length) return [];
|
|
25346
25346
|
let i = [];
|
|
25347
25347
|
for (let e of r) {
|
|
25348
|
-
let r = await
|
|
25348
|
+
let r = await Ze({
|
|
25349
25349
|
childRecord: t,
|
|
25350
25350
|
pair: e,
|
|
25351
25351
|
query: n
|
|
@@ -25354,10 +25354,10 @@ async function Je(e) {
|
|
|
25354
25354
|
}
|
|
25355
25355
|
return i;
|
|
25356
25356
|
}
|
|
25357
|
-
async function
|
|
25357
|
+
async function Ze(e) {
|
|
25358
25358
|
let { childRecord: t, pair: n, query: r } = e, i = t.attributes.find((e) => e.name === n.uuidAttr)?.value;
|
|
25359
25359
|
if (!i) return null;
|
|
25360
|
-
let a = await
|
|
25360
|
+
let a = await Qe({
|
|
25361
25361
|
uuidValue: i,
|
|
25362
25362
|
targetTagNames: n.targetTagNames,
|
|
25363
25363
|
query: r
|
|
@@ -25387,10 +25387,10 @@ async function Ye(e) {
|
|
|
25387
25387
|
}
|
|
25388
25388
|
};
|
|
25389
25389
|
}
|
|
25390
|
-
async function
|
|
25390
|
+
async function Qe(e) {
|
|
25391
25391
|
let { uuidValue: t, targetTagNames: r, query: i } = e;
|
|
25392
25392
|
for (let e of r) {
|
|
25393
|
-
if (!n(e,
|
|
25393
|
+
if (!n(e, z)) continue;
|
|
25394
25394
|
let r = (await i.getRecordsByTagName(e)).find((e) => e.attributes.find((e) => e.name === "uuid")?.value === t);
|
|
25395
25395
|
if (r) return {
|
|
25396
25396
|
tagName: r.tagName,
|
|
@@ -25399,17 +25399,17 @@ async function Xe(e) {
|
|
|
25399
25399
|
}
|
|
25400
25400
|
return null;
|
|
25401
25401
|
}
|
|
25402
|
-
async function
|
|
25402
|
+
async function $e(e) {
|
|
25403
25403
|
let { childRecord: t, query: n } = e, r = t.attributes.find((e) => e.name === "uuid")?.value;
|
|
25404
25404
|
if (!r) return [];
|
|
25405
|
-
let i =
|
|
25405
|
+
let i = R(t.tagName);
|
|
25406
25406
|
if (i.length === 0) return [];
|
|
25407
25407
|
let a = {
|
|
25408
25408
|
tagName: t.tagName,
|
|
25409
25409
|
id: t.id
|
|
25410
25410
|
}, o = [];
|
|
25411
25411
|
for (let e of i) {
|
|
25412
|
-
let t = await
|
|
25412
|
+
let t = await L({
|
|
25413
25413
|
uuid: r,
|
|
25414
25414
|
entry: e,
|
|
25415
25415
|
target: a,
|
|
@@ -25421,12 +25421,12 @@ async function Ze(e) {
|
|
|
25421
25421
|
}
|
|
25422
25422
|
//#endregion
|
|
25423
25423
|
//#region src/v2019C1/hooks/after-created/after-created.ts
|
|
25424
|
-
async function
|
|
25424
|
+
async function et(e) {
|
|
25425
25425
|
let { childRecord: t, parentRecord: n, query: r } = e, i = await g({
|
|
25426
25426
|
childRecord: t,
|
|
25427
25427
|
parentRecord: n,
|
|
25428
25428
|
query: r
|
|
25429
|
-
}), a = await
|
|
25429
|
+
}), a = await Ye({
|
|
25430
25430
|
childRecord: t,
|
|
25431
25431
|
query: r
|
|
25432
25432
|
});
|
|
@@ -25434,12 +25434,12 @@ async function Qe(e) {
|
|
|
25434
25434
|
}
|
|
25435
25435
|
//#endregion
|
|
25436
25436
|
//#region src/v2019C1/hooks/after-deep-clone/ref-paths.ts
|
|
25437
|
-
async function
|
|
25438
|
-
let { cumulativeCloneMappings: t, query: n } = e, { uuidMap: r, uuidToRef: i } = await
|
|
25437
|
+
async function tt(e) {
|
|
25438
|
+
let { cumulativeCloneMappings: t, query: n } = e, { uuidMap: r, uuidToRef: i } = await nt(t, n);
|
|
25439
25439
|
if (r.size === 0) return [];
|
|
25440
25440
|
let a = [];
|
|
25441
25441
|
for (let { target: e } of t) {
|
|
25442
|
-
let t = await
|
|
25442
|
+
let t = await it({
|
|
25443
25443
|
target: e,
|
|
25444
25444
|
uuidMap: r,
|
|
25445
25445
|
uuidToRef: i,
|
|
@@ -25449,9 +25449,9 @@ async function $e(e) {
|
|
|
25449
25449
|
}
|
|
25450
25450
|
return a;
|
|
25451
25451
|
}
|
|
25452
|
-
async function
|
|
25452
|
+
async function nt(e, t) {
|
|
25453
25453
|
let n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
|
|
25454
|
-
for (let { source: i, target: a } of e) await
|
|
25454
|
+
for (let { source: i, target: a } of e) await rt({
|
|
25455
25455
|
source: i,
|
|
25456
25456
|
target: a,
|
|
25457
25457
|
query: t,
|
|
@@ -25463,7 +25463,7 @@ async function et(e, t) {
|
|
|
25463
25463
|
uuidToRef: r
|
|
25464
25464
|
};
|
|
25465
25465
|
}
|
|
25466
|
-
async function
|
|
25466
|
+
async function rt(e) {
|
|
25467
25467
|
let { source: t, target: n, query: r, uuidMap: i, uuidToRef: a } = e, o = await r.getRecord(n);
|
|
25468
25468
|
if (!o) return;
|
|
25469
25469
|
let s = t.attributes.find((e) => e.name === "uuid")?.value, c = o.attributes.find((e) => e.name === "uuid")?.value;
|
|
@@ -25472,14 +25472,14 @@ async function tt(e) {
|
|
|
25472
25472
|
id: o.id
|
|
25473
25473
|
}));
|
|
25474
25474
|
}
|
|
25475
|
-
async function
|
|
25475
|
+
async function it(e) {
|
|
25476
25476
|
let { target: t, uuidMap: n, uuidToRef: r, query: a } = e, o = t.tagName;
|
|
25477
|
-
if (!(o in
|
|
25477
|
+
if (!(o in k)) return null;
|
|
25478
25478
|
let s = await a.getRecord(t);
|
|
25479
25479
|
if (!s) return null;
|
|
25480
|
-
let c =
|
|
25480
|
+
let c = k[o], l = [...s.attributes], u = !1;
|
|
25481
25481
|
for (let e of c) {
|
|
25482
|
-
let t = await
|
|
25482
|
+
let t = await at({
|
|
25483
25483
|
pair: e,
|
|
25484
25484
|
tagName: o,
|
|
25485
25485
|
refId: s.id,
|
|
@@ -25499,14 +25499,14 @@ async function nt(e) {
|
|
|
25499
25499
|
})
|
|
25500
25500
|
} : null;
|
|
25501
25501
|
}
|
|
25502
|
-
async function
|
|
25502
|
+
async function at(e) {
|
|
25503
25503
|
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;
|
|
25504
25504
|
if (!c) return null;
|
|
25505
25505
|
let l = i.get(c);
|
|
25506
25506
|
if (!l) return null;
|
|
25507
|
-
let u = !1, d =
|
|
25507
|
+
let u = !1, d = ot(s, t.attribute.uuid, c, l);
|
|
25508
25508
|
d && (s = d, u = !0);
|
|
25509
|
-
let f = await
|
|
25509
|
+
let f = await st({
|
|
25510
25510
|
attributes: s,
|
|
25511
25511
|
pathAttrName: t.attribute.path,
|
|
25512
25512
|
newUuid: l,
|
|
@@ -25517,16 +25517,16 @@ async function rt(e) {
|
|
|
25517
25517
|
});
|
|
25518
25518
|
return f && (s = f, u = !0), u ? s : null;
|
|
25519
25519
|
}
|
|
25520
|
-
function
|
|
25520
|
+
function ot(e, t, n, r) {
|
|
25521
25521
|
return r === n ? null : e.map((e) => e.name === t ? {
|
|
25522
25522
|
...e,
|
|
25523
25523
|
value: r
|
|
25524
25524
|
} : e);
|
|
25525
25525
|
}
|
|
25526
|
-
async function
|
|
25526
|
+
async function st(e) {
|
|
25527
25527
|
let { attributes: t, pathAttrName: n, newUuid: r, uuidToRef: i, tagName: a, refId: o, query: s } = e, c = i.get(r);
|
|
25528
25528
|
if (!c) return null;
|
|
25529
|
-
let l = await
|
|
25529
|
+
let l = await I.query.buildReferencePath(s, {
|
|
25530
25530
|
reference: {
|
|
25531
25531
|
tagName: a,
|
|
25532
25532
|
id: o
|
|
@@ -25543,13 +25543,13 @@ async function at(e) {
|
|
|
25543
25543
|
}
|
|
25544
25544
|
//#endregion
|
|
25545
25545
|
//#region src/v2019C1/hooks/after-deep-clone/after-deep-clone.ts
|
|
25546
|
-
async function
|
|
25547
|
-
return
|
|
25546
|
+
async function ct(e) {
|
|
25547
|
+
return tt(e);
|
|
25548
25548
|
}
|
|
25549
25549
|
//#endregion
|
|
25550
25550
|
//#region src/v2019C1/hooks/after-standardized-record/uuid-attribute.ts
|
|
25551
|
-
function
|
|
25552
|
-
let { record: t } = e, { tagName: n, attributes: r } = t, i =
|
|
25551
|
+
function lt(e) {
|
|
25552
|
+
let { record: t } = e, { tagName: n, attributes: r } = t, i = z.definition[n];
|
|
25553
25553
|
if (!("uuid" in i.attributes.details) || r.find((e) => e.name === "uuid")?.value) return t;
|
|
25554
25554
|
let a = i.attributes.details.uuid?.namespace, o = r.filter((e) => e.name !== "uuid");
|
|
25555
25555
|
return {
|
|
@@ -25563,20 +25563,20 @@ function st(e) {
|
|
|
25563
25563
|
}
|
|
25564
25564
|
//#endregion
|
|
25565
25565
|
//#region src/v2019C1/hooks/after-standardized-record/after-standardized-record.ts
|
|
25566
|
-
function
|
|
25567
|
-
return
|
|
25566
|
+
function ut(e) {
|
|
25567
|
+
return lt(e);
|
|
25568
25568
|
}
|
|
25569
25569
|
//#endregion
|
|
25570
25570
|
//#region src/v2019C1/hooks/after-updated/ref-paths.ts
|
|
25571
|
-
async function
|
|
25571
|
+
async function dt(e) {
|
|
25572
25572
|
let { oldRecord: t, newRecord: n, query: r } = e, i = [], a = n.attributes.find((e) => e.name === "uuid")?.value;
|
|
25573
25573
|
if (a) {
|
|
25574
|
-
let e =
|
|
25574
|
+
let e = R(n.tagName), t = {
|
|
25575
25575
|
tagName: n.tagName,
|
|
25576
25576
|
id: n.id
|
|
25577
25577
|
};
|
|
25578
25578
|
for (let n of e) {
|
|
25579
|
-
let e = await
|
|
25579
|
+
let e = await L({
|
|
25580
25580
|
uuid: a,
|
|
25581
25581
|
entry: n,
|
|
25582
25582
|
target: t,
|
|
@@ -25585,8 +25585,8 @@ async function lt(e) {
|
|
|
25585
25585
|
i.push(...e);
|
|
25586
25586
|
}
|
|
25587
25587
|
}
|
|
25588
|
-
if (
|
|
25589
|
-
let e = await
|
|
25588
|
+
if (ft(t, n)) {
|
|
25589
|
+
let e = await pt({
|
|
25590
25590
|
newRecord: n,
|
|
25591
25591
|
query: r
|
|
25592
25592
|
});
|
|
@@ -25594,11 +25594,11 @@ async function lt(e) {
|
|
|
25594
25594
|
}
|
|
25595
25595
|
return i;
|
|
25596
25596
|
}
|
|
25597
|
-
function
|
|
25597
|
+
function ft(e, t) {
|
|
25598
25598
|
for (let n of C) if (e.attributes.find((e) => e.name === n)?.value !== t.attributes.find((e) => e.name === n)?.value) return !0;
|
|
25599
25599
|
return !1;
|
|
25600
25600
|
}
|
|
25601
|
-
async function
|
|
25601
|
+
async function pt(e) {
|
|
25602
25602
|
let { newRecord: t, query: n } = e, r = {
|
|
25603
25603
|
tagName: t.tagName,
|
|
25604
25604
|
id: t.id
|
|
@@ -25607,14 +25607,14 @@ async function dt(e) {
|
|
|
25607
25607
|
if (r.id === t.id) continue;
|
|
25608
25608
|
let e = await n.any.getAttribute(r, { name: "uuid" });
|
|
25609
25609
|
if (!e) continue;
|
|
25610
|
-
let i =
|
|
25610
|
+
let i = R(r.tagName);
|
|
25611
25611
|
if (i.length === 0) continue;
|
|
25612
25612
|
let o = {
|
|
25613
25613
|
tagName: r.tagName,
|
|
25614
25614
|
id: r.id
|
|
25615
25615
|
};
|
|
25616
25616
|
for (let t of i) {
|
|
25617
|
-
let r = await
|
|
25617
|
+
let r = await L({
|
|
25618
25618
|
uuid: e,
|
|
25619
25619
|
entry: t,
|
|
25620
25620
|
target: o,
|
|
@@ -25627,12 +25627,12 @@ async function dt(e) {
|
|
|
25627
25627
|
}
|
|
25628
25628
|
//#endregion
|
|
25629
25629
|
//#region src/v2019C1/hooks/after-updated/after-updated.ts
|
|
25630
|
-
async function
|
|
25631
|
-
return
|
|
25630
|
+
async function mt(e) {
|
|
25631
|
+
return dt(e);
|
|
25632
25632
|
}
|
|
25633
25633
|
//#endregion
|
|
25634
25634
|
//#region src/v2019C1/hooks/before-clone/before-clone.ts
|
|
25635
|
-
function
|
|
25635
|
+
function ht(e) {
|
|
25636
25636
|
let { record: t } = e, n = !0;
|
|
25637
25637
|
t.tagName === "Private" && !t.tree.length && (n = !1);
|
|
25638
25638
|
let r = t.attributes.filter((e) => e.name !== "uuid");
|
|
@@ -25646,17 +25646,17 @@ function pt(e) {
|
|
|
25646
25646
|
}
|
|
25647
25647
|
//#endregion
|
|
25648
25648
|
//#region src/v2019C1/hooks/before-delete/orphaned-refs.ts
|
|
25649
|
-
async function
|
|
25649
|
+
async function gt(e) {
|
|
25650
25650
|
let { record: t, query: n } = e, r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set();
|
|
25651
|
-
if (await
|
|
25651
|
+
if (await St({
|
|
25652
25652
|
record: t,
|
|
25653
25653
|
query: n,
|
|
25654
25654
|
ids: r,
|
|
25655
25655
|
uuids: i
|
|
25656
25656
|
}), i.size === 0) return [];
|
|
25657
|
-
let a = [], o = Object.keys(
|
|
25657
|
+
let a = [], o = Object.keys(k);
|
|
25658
25658
|
for (let e of o) {
|
|
25659
|
-
let t = await
|
|
25659
|
+
let t = await _t({
|
|
25660
25660
|
refTagName: e,
|
|
25661
25661
|
subtreeIds: r,
|
|
25662
25662
|
subtreeUuids: i,
|
|
@@ -25666,11 +25666,11 @@ async function mt(e) {
|
|
|
25666
25666
|
}
|
|
25667
25667
|
return a;
|
|
25668
25668
|
}
|
|
25669
|
-
async function
|
|
25670
|
-
let { refTagName: t, subtreeIds: n, subtreeUuids: r, query: i } = e, a =
|
|
25669
|
+
async function _t(e) {
|
|
25670
|
+
let { refTagName: t, subtreeIds: n, subtreeUuids: r, query: i } = e, a = k[t], o = await i.getRecordsByTagName(t), s = [];
|
|
25671
25671
|
for (let e of o) {
|
|
25672
25672
|
if (n.has(e.id)) continue;
|
|
25673
|
-
let o = await
|
|
25673
|
+
let o = await vt({
|
|
25674
25674
|
refTagName: t,
|
|
25675
25675
|
refRecord: e,
|
|
25676
25676
|
refPairs: a,
|
|
@@ -25681,15 +25681,15 @@ async function ht(e) {
|
|
|
25681
25681
|
}
|
|
25682
25682
|
return s;
|
|
25683
25683
|
}
|
|
25684
|
-
async function
|
|
25685
|
-
let { refTagName: t, refRecord: n, refPairs: r, subtreeUuids: i, query: a } = e, o =
|
|
25684
|
+
async function vt(e) {
|
|
25685
|
+
let { refTagName: t, refRecord: n, refPairs: r, subtreeUuids: i, query: a } = e, o = yt({
|
|
25686
25686
|
refPairs: r,
|
|
25687
25687
|
refRecord: n,
|
|
25688
25688
|
subtreeUuids: i
|
|
25689
25689
|
});
|
|
25690
|
-
return o.size === 0 ? [] :
|
|
25690
|
+
return o.size === 0 ? [] : P.has(t) ? [bt(n, o)] : xt(n, a);
|
|
25691
25691
|
}
|
|
25692
|
-
function
|
|
25692
|
+
function yt(e) {
|
|
25693
25693
|
let { refPairs: t, refRecord: n, subtreeUuids: r } = e, i = /* @__PURE__ */ new Set();
|
|
25694
25694
|
for (let e of t) {
|
|
25695
25695
|
let t = n.attributes.find((t) => t.name === e.attribute.uuid)?.value;
|
|
@@ -25700,7 +25700,7 @@ function _t(e) {
|
|
|
25700
25700
|
}
|
|
25701
25701
|
return i;
|
|
25702
25702
|
}
|
|
25703
|
-
function
|
|
25703
|
+
function bt(e, t) {
|
|
25704
25704
|
let n = e.attributes.filter((e) => !t.has(e.name));
|
|
25705
25705
|
return {
|
|
25706
25706
|
status: "updated",
|
|
@@ -25711,7 +25711,7 @@ function vt(e, t) {
|
|
|
25711
25711
|
})
|
|
25712
25712
|
};
|
|
25713
25713
|
}
|
|
25714
|
-
async function
|
|
25714
|
+
async function xt(e, t) {
|
|
25715
25715
|
let n = [{
|
|
25716
25716
|
status: "deleted",
|
|
25717
25717
|
oldRecord: i(e),
|
|
@@ -25733,14 +25733,14 @@ async function yt(e, t) {
|
|
|
25733
25733
|
}
|
|
25734
25734
|
return n;
|
|
25735
25735
|
}
|
|
25736
|
-
async function
|
|
25736
|
+
async function St(e) {
|
|
25737
25737
|
let { record: t, query: n, ids: r, uuids: i } = e;
|
|
25738
25738
|
r.add(t.id);
|
|
25739
25739
|
let a = t.attributes.find((e) => e.name === "uuid")?.value;
|
|
25740
25740
|
a && i.add(a);
|
|
25741
25741
|
for (let e of t.children) {
|
|
25742
25742
|
let t = await n.getRecord(e);
|
|
25743
|
-
t && await
|
|
25743
|
+
t && await St({
|
|
25744
25744
|
record: t,
|
|
25745
25745
|
query: n,
|
|
25746
25746
|
ids: r,
|
|
@@ -25750,31 +25750,31 @@ async function V(e) {
|
|
|
25750
25750
|
}
|
|
25751
25751
|
//#endregion
|
|
25752
25752
|
//#region src/v2019C1/hooks/before-delete/before-delete.ts
|
|
25753
|
-
async function
|
|
25754
|
-
return
|
|
25753
|
+
async function Ct(e) {
|
|
25754
|
+
return gt(e);
|
|
25755
25755
|
}
|
|
25756
25756
|
//#endregion
|
|
25757
25757
|
//#region src/v2019C1/hooks/io/io-hooks.ts
|
|
25758
|
-
function
|
|
25758
|
+
function wt() {
|
|
25759
25759
|
let e = /* @__PURE__ */ new Map(), t = [], n = [];
|
|
25760
25760
|
return {
|
|
25761
25761
|
beforeImportRecord: (r) => {
|
|
25762
|
-
let { record: i, ancestry: a } = r, { tagName: o } = i, s =
|
|
25763
|
-
if (s &&
|
|
25762
|
+
let { record: i, ancestry: a } = r, { tagName: o } = i, s = Ot(i);
|
|
25763
|
+
if (s && Dt.has(o)) {
|
|
25764
25764
|
let t = re({
|
|
25765
25765
|
record: i,
|
|
25766
25766
|
ancestry: a
|
|
25767
25767
|
});
|
|
25768
25768
|
t && e.set(t.path, s);
|
|
25769
25769
|
}
|
|
25770
|
-
if (!
|
|
25771
|
-
let c =
|
|
25770
|
+
if (!Et.has(o)) return;
|
|
25771
|
+
let c = k[o];
|
|
25772
25772
|
for (let e of c) {
|
|
25773
25773
|
let r = i.attributes.find((t) => t.name === e.attribute.path)?.value;
|
|
25774
25774
|
if (!r || i.attributes.find((t) => t.name === e.attribute.uuid)?.value) continue;
|
|
25775
25775
|
let s = se(e.resolution, e.attribute.path, r, a);
|
|
25776
25776
|
if (!s) {
|
|
25777
|
-
e.resolution ===
|
|
25777
|
+
e.resolution === O.unsupported && n.push({
|
|
25778
25778
|
type: "unsupported-xpath-reference",
|
|
25779
25779
|
recordId: i.id,
|
|
25780
25780
|
details: {
|
|
@@ -25828,9 +25828,9 @@ function xt() {
|
|
|
25828
25828
|
}
|
|
25829
25829
|
};
|
|
25830
25830
|
}
|
|
25831
|
-
var
|
|
25832
|
-
function
|
|
25833
|
-
if (!
|
|
25831
|
+
var Tt = new Set(Object.entries(m).filter(([, e]) => "uuid" in e).map(([e]) => e)), Et = new Set(Object.keys(k)), Dt = new Set(Object.values(k).flatMap((e) => e.flatMap((e) => e.target)));
|
|
25832
|
+
function Ot(e) {
|
|
25833
|
+
if (!Tt.has(e.tagName)) return;
|
|
25834
25834
|
let t = e.attributes.find((e) => e.name === "uuid");
|
|
25835
25835
|
if (t) return t.value;
|
|
25836
25836
|
let n = crypto.randomUUID();
|
|
@@ -25841,14 +25841,14 @@ function Tt(e) {
|
|
|
25841
25841
|
}
|
|
25842
25842
|
//#endregion
|
|
25843
25843
|
//#region src/v2019C1/hooks/index.ts
|
|
25844
|
-
var
|
|
25845
|
-
beforeClone:
|
|
25846
|
-
afterStandardizedRecord:
|
|
25847
|
-
afterCreated:
|
|
25848
|
-
afterDeepClone:
|
|
25849
|
-
afterUpdated:
|
|
25850
|
-
beforeDelete:
|
|
25851
|
-
},
|
|
25844
|
+
var kt = {
|
|
25845
|
+
beforeClone: ht,
|
|
25846
|
+
afterStandardizedRecord: ut,
|
|
25847
|
+
afterCreated: et,
|
|
25848
|
+
afterDeepClone: ct,
|
|
25849
|
+
afterUpdated: mt,
|
|
25850
|
+
beforeDelete: Ct
|
|
25851
|
+
}, At = {
|
|
25852
25852
|
supportedFileExtensions: [
|
|
25853
25853
|
".fsd",
|
|
25854
25854
|
".asd",
|
|
@@ -25858,8 +25858,8 @@ var Et = {
|
|
|
25858
25858
|
".icd",
|
|
25859
25859
|
".xml"
|
|
25860
25860
|
],
|
|
25861
|
-
hooks:
|
|
25862
|
-
},
|
|
25861
|
+
hooks: wt()
|
|
25862
|
+
}, jt = {
|
|
25863
25863
|
recordSchema: {
|
|
25864
25864
|
primaryKey: "id",
|
|
25865
25865
|
indexes: [
|
|
@@ -25877,7 +25877,7 @@ var Et = {
|
|
|
25877
25877
|
},
|
|
25878
25878
|
additionalTables: { attachedFiles: { schema: "id, filename, file" } }
|
|
25879
25879
|
}
|
|
25880
|
-
},
|
|
25880
|
+
}, Mt = {
|
|
25881
25881
|
default: {
|
|
25882
25882
|
uri: "http://www.iec.ch/61850/2003/SCL",
|
|
25883
25883
|
prefix: ""
|
|
@@ -25887,24 +25887,24 @@ var Et = {
|
|
|
25887
25887
|
prefix: "eIEC61850-6-100"
|
|
25888
25888
|
},
|
|
25889
25889
|
xsi: e
|
|
25890
|
-
},
|
|
25890
|
+
}, z = {
|
|
25891
25891
|
rootElementName: "SCL",
|
|
25892
25892
|
singletonElements: p,
|
|
25893
25893
|
transparentElements: ["Private"],
|
|
25894
25894
|
elements: c,
|
|
25895
|
-
namespaces:
|
|
25895
|
+
namespaces: Mt,
|
|
25896
25896
|
attributes: m,
|
|
25897
25897
|
children: l,
|
|
25898
25898
|
parents: u,
|
|
25899
25899
|
descendants: d,
|
|
25900
25900
|
ancestors: f,
|
|
25901
|
-
database:
|
|
25902
|
-
io:
|
|
25901
|
+
database: jt,
|
|
25902
|
+
io: At,
|
|
25903
25903
|
definition: h
|
|
25904
25904
|
};
|
|
25905
25905
|
//#endregion
|
|
25906
25906
|
//#region src/v2019C1/extensions/clean-up/transaction/orphan-lnode-bindings.ts
|
|
25907
|
-
async function
|
|
25907
|
+
async function Nt(e) {
|
|
25908
25908
|
let t = await e.getRecordsByTagName("LNode");
|
|
25909
25909
|
for (let n of t) {
|
|
25910
25910
|
let t = await e.getAttribute(n, { name: "iedName" });
|
|
@@ -25913,10 +25913,10 @@ async function kt(e) {
|
|
|
25913
25913
|
tagName: "IED",
|
|
25914
25914
|
attributes: { name: t }
|
|
25915
25915
|
});
|
|
25916
|
-
r || await
|
|
25916
|
+
r || await Pt(e, n);
|
|
25917
25917
|
}
|
|
25918
25918
|
}
|
|
25919
|
-
async function
|
|
25919
|
+
async function Pt(e, t) {
|
|
25920
25920
|
let n = await e.getChild(t, "LNodeSpecNaming");
|
|
25921
25921
|
if (n) {
|
|
25922
25922
|
let r = await e.getAttribute(n, { name: "sLnClass" }), i = await e.getAttribute(n, { name: "sLnInst" }), a = await e.getAttribute(n, { name: "sPrefix" });
|
|
@@ -25944,8 +25944,8 @@ async function At(e, t) {
|
|
|
25944
25944
|
}
|
|
25945
25945
|
//#endregion
|
|
25946
25946
|
//#region src/v2019C1/extensions/clean-up/transaction/prune-empty-containers.ts
|
|
25947
|
-
async function
|
|
25948
|
-
let t = [...Object.values(
|
|
25947
|
+
async function Ft(e) {
|
|
25948
|
+
let t = [...Object.values(Be).flat(), "Private"];
|
|
25949
25949
|
for (let n of t) {
|
|
25950
25950
|
let t = await e.getRecordsByTagName(n);
|
|
25951
25951
|
for (let n of t) n.children.length === 0 && await e.delete(n);
|
|
@@ -25953,27 +25953,27 @@ async function jt(e) {
|
|
|
25953
25953
|
}
|
|
25954
25954
|
//#endregion
|
|
25955
25955
|
//#region src/v2019C1/extensions/clean-up/transaction/orphan-uuid-refs.ts
|
|
25956
|
-
async function
|
|
25957
|
-
let t = Object.keys(
|
|
25956
|
+
async function It(e) {
|
|
25957
|
+
let t = Object.keys(k);
|
|
25958
25958
|
for (let n of t) {
|
|
25959
|
-
let t =
|
|
25959
|
+
let t = k[n], r = await e.getRecordsByTagName(n);
|
|
25960
25960
|
for (let i of r) {
|
|
25961
25961
|
let r = !1, a = !1, o = {};
|
|
25962
25962
|
for (let n of t) {
|
|
25963
25963
|
let t = await e.getAttribute(i, { name: n.attribute.uuid });
|
|
25964
|
-
if (t) if (r = !0, await
|
|
25964
|
+
if (t) if (r = !0, await Lt(e, t, n.target)) a = !0;
|
|
25965
25965
|
else {
|
|
25966
25966
|
o[n.attribute.uuid] = void 0, o[n.attribute.path] = void 0;
|
|
25967
25967
|
for (let e of n.companions) o[e.name] = void 0;
|
|
25968
25968
|
}
|
|
25969
25969
|
}
|
|
25970
25970
|
Object.keys(o).length > 0 && await e.update(i, { attributes: o });
|
|
25971
|
-
let s =
|
|
25971
|
+
let s = P.has(n);
|
|
25972
25972
|
r && !a && !s && await e.delete(i);
|
|
25973
25973
|
}
|
|
25974
25974
|
}
|
|
25975
25975
|
}
|
|
25976
|
-
async function
|
|
25976
|
+
async function Lt(e, t, n) {
|
|
25977
25977
|
for (let r of n) {
|
|
25978
25978
|
let [n] = await e.findByAttributes({
|
|
25979
25979
|
tagName: r,
|
|
@@ -25985,14 +25985,14 @@ async function Nt(e, t, n) {
|
|
|
25985
25985
|
}
|
|
25986
25986
|
//#endregion
|
|
25987
25987
|
//#region src/v2019C1/extensions/clean-up/index.ts
|
|
25988
|
-
var
|
|
25989
|
-
orphanUuidRefs: () =>
|
|
25990
|
-
pruneEmptyContainers: () =>
|
|
25991
|
-
resetLNode: () =>
|
|
25988
|
+
var B = { transaction: /* @__PURE__ */ s({
|
|
25989
|
+
orphanUuidRefs: () => It,
|
|
25990
|
+
pruneEmptyContainers: () => Ft,
|
|
25991
|
+
resetLNode: () => Nt
|
|
25992
25992
|
}) };
|
|
25993
25993
|
//#endregion
|
|
25994
25994
|
//#region src/v2019C1/extensions/data-model/query/resolve.ts
|
|
25995
|
-
async function
|
|
25995
|
+
async function Rt(e, n) {
|
|
25996
25996
|
let { records: r } = n, i = {
|
|
25997
25997
|
lnodeTypes: /* @__PURE__ */ new Map(),
|
|
25998
25998
|
doTypes: /* @__PURE__ */ new Map(),
|
|
@@ -26009,7 +26009,7 @@ async function Pt(e, n) {
|
|
|
26009
26009
|
if (a(o, {
|
|
26010
26010
|
key: "ELEMENT_NOT_FOUND",
|
|
26011
26011
|
detail: `LNodeType not found for lnType="${r}"`
|
|
26012
|
-
}), !
|
|
26012
|
+
}), !V(i.lnodeTypes, r, o)) continue;
|
|
26013
26013
|
let s = o.children.filter((e) => t(e, "DO")), c = await e.getRecords(s);
|
|
26014
26014
|
for (let t of c) {
|
|
26015
26015
|
if (!t) continue;
|
|
@@ -26019,7 +26019,7 @@ async function Pt(e, n) {
|
|
|
26019
26019
|
tagName: "DOType",
|
|
26020
26020
|
attributes: { id: n }
|
|
26021
26021
|
});
|
|
26022
|
-
r &&
|
|
26022
|
+
r && V(i.doTypes, n, r) && await H({
|
|
26023
26023
|
query: e,
|
|
26024
26024
|
parent: r,
|
|
26025
26025
|
dataModelMap: i
|
|
@@ -26033,10 +26033,10 @@ async function Pt(e, n) {
|
|
|
26033
26033
|
enumTypes: Array.from(i.enumTypes.values())
|
|
26034
26034
|
};
|
|
26035
26035
|
}
|
|
26036
|
-
function
|
|
26036
|
+
function V(e, t, n) {
|
|
26037
26037
|
return e.has(t) ? !1 : (e.set(t, n), !0);
|
|
26038
26038
|
}
|
|
26039
|
-
async function
|
|
26039
|
+
async function H(e) {
|
|
26040
26040
|
let { query: n, parent: r, dataModelMap: i } = e, a = r.tagName === "DOType" ? await n.getRecords(r.children.filter((e) => t(e, "DA"))) : await n.getRecords(r.children.filter((e) => t(e, "BDA")));
|
|
26041
26041
|
for (let e of a) {
|
|
26042
26042
|
if (!e) continue;
|
|
@@ -26047,13 +26047,13 @@ async function K(e) {
|
|
|
26047
26047
|
tagName: "EnumType",
|
|
26048
26048
|
attributes: { id: r }
|
|
26049
26049
|
});
|
|
26050
|
-
e &&
|
|
26050
|
+
e && V(i.enumTypes, r, e);
|
|
26051
26051
|
} else if (t === "Struct") {
|
|
26052
26052
|
let [e] = await n.findByAttributes({
|
|
26053
26053
|
tagName: "DAType",
|
|
26054
26054
|
attributes: { id: r }
|
|
26055
26055
|
});
|
|
26056
|
-
e &&
|
|
26056
|
+
e && V(i.daTypes, r, e) && await H({
|
|
26057
26057
|
query: n,
|
|
26058
26058
|
parent: e,
|
|
26059
26059
|
dataModelMap: i
|
|
@@ -26070,7 +26070,7 @@ async function K(e) {
|
|
|
26070
26070
|
tagName: "DOType",
|
|
26071
26071
|
attributes: { id: t }
|
|
26072
26072
|
});
|
|
26073
|
-
r &&
|
|
26073
|
+
r && V(i.doTypes, t, r) && await H({
|
|
26074
26074
|
query: n,
|
|
26075
26075
|
parent: r,
|
|
26076
26076
|
dataModelMap: i
|
|
@@ -26080,73 +26080,76 @@ async function K(e) {
|
|
|
26080
26080
|
}
|
|
26081
26081
|
//#endregion
|
|
26082
26082
|
//#region src/v2019C1/extensions/data-model/query/index.ts
|
|
26083
|
-
var
|
|
26083
|
+
var zt = /* @__PURE__ */ s({ resolve: () => Rt }), Bt = ["id", "uuid"];
|
|
26084
26084
|
//#endregion
|
|
26085
26085
|
//#region src/v2019C1/extensions/signature/query/element-signature.ts
|
|
26086
|
-
async function
|
|
26086
|
+
async function U(e, t) {
|
|
26087
26087
|
let n = {
|
|
26088
26088
|
query: e,
|
|
26089
26089
|
resolveReferences: t.resolveReferences ?? !1,
|
|
26090
|
-
ignore: new Set(t.ignoreAttributes ??
|
|
26090
|
+
ignore: new Set(t.ignoreAttributes ?? Bt),
|
|
26091
26091
|
memo: /* @__PURE__ */ new Map(),
|
|
26092
26092
|
seen: /* @__PURE__ */ new Set()
|
|
26093
26093
|
};
|
|
26094
|
-
return
|
|
26094
|
+
return W(t.ref, n);
|
|
26095
26095
|
}
|
|
26096
|
-
var
|
|
26097
|
-
function
|
|
26096
|
+
var Vt = /* @__PURE__ */ new Set();
|
|
26097
|
+
function Ht(e, t) {
|
|
26098
26098
|
return h[e]?.attributes?.details?.[t]?.default;
|
|
26099
26099
|
}
|
|
26100
|
-
async function
|
|
26100
|
+
async function W(e, t) {
|
|
26101
26101
|
let n = `${e.tagName}:${e.id}`, r = t.memo.get(n);
|
|
26102
26102
|
if (r !== void 0) return r;
|
|
26103
26103
|
if (t.seen.has(n)) return `@cycle:${e.tagName}`;
|
|
26104
26104
|
t.seen.add(n);
|
|
26105
|
-
let i = await t.query.getTree(e), a = i ? await
|
|
26105
|
+
let i = await t.query.getTree(e), a = i ? await Ut(i, t) : "";
|
|
26106
26106
|
return t.seen.delete(n), t.memo.set(n, a), a;
|
|
26107
26107
|
}
|
|
26108
|
-
async function
|
|
26109
|
-
let n = t.resolveReferences ?
|
|
26108
|
+
async function Ut(e, t) {
|
|
26109
|
+
let n = t.resolveReferences ? Jt(e.tagName) : Vt, r = [];
|
|
26110
26110
|
for (let i of e.attributes) {
|
|
26111
|
-
if (t.ignore.has(i.name) || n.has(i.name) || i.value ===
|
|
26111
|
+
if (t.ignore.has(i.name) || n.has(i.name) || i.value === Ht(e.tagName, i.name)) continue;
|
|
26112
26112
|
let a = i.value;
|
|
26113
26113
|
if (t.resolveReferences) {
|
|
26114
|
-
let n = await
|
|
26114
|
+
let n = await Wt(e, i.name, i.value, t);
|
|
26115
26115
|
n !== null && (a = `@sig:${n}`);
|
|
26116
26116
|
}
|
|
26117
26117
|
r.push(`${JSON.stringify(i.name)}:${JSON.stringify(a)}`);
|
|
26118
26118
|
}
|
|
26119
26119
|
r.sort();
|
|
26120
|
-
let i =
|
|
26120
|
+
let i = [];
|
|
26121
|
+
for (let n of e.tree ?? []) i.push(await Ut(n, t));
|
|
26122
|
+
i.sort();
|
|
26123
|
+
let a = e.value?.trim(), o = a ? `,value:${JSON.stringify(a)}` : "";
|
|
26121
26124
|
return `{tag:${JSON.stringify(e.tagName)},attrs:[${r.join(",")}]${o},children:[${i.join(",")}]}`;
|
|
26122
26125
|
}
|
|
26123
|
-
async function
|
|
26124
|
-
let i =
|
|
26126
|
+
async function Wt(e, t, n, r) {
|
|
26127
|
+
let i = Gt(e, t);
|
|
26125
26128
|
if (i) {
|
|
26126
|
-
let e = await
|
|
26127
|
-
return e ?
|
|
26129
|
+
let e = await Yt(r.query, i.target, n);
|
|
26130
|
+
return e ? W(e, r) : `@missing:${n}`;
|
|
26128
26131
|
}
|
|
26129
|
-
let a =
|
|
26132
|
+
let a = qt(e.tagName, t);
|
|
26130
26133
|
if (a) {
|
|
26131
|
-
let e = await
|
|
26132
|
-
return e ?
|
|
26134
|
+
let e = await Xt(r.query, a.target, n);
|
|
26135
|
+
return e ? W(e, r) : `@missing:${n}`;
|
|
26133
26136
|
}
|
|
26134
26137
|
return null;
|
|
26135
26138
|
}
|
|
26136
|
-
function
|
|
26137
|
-
return
|
|
26139
|
+
function Gt(e, t) {
|
|
26140
|
+
return A[e.tagName]?.find((n) => n.attribute === t && Kt(e, n));
|
|
26138
26141
|
}
|
|
26139
|
-
function
|
|
26142
|
+
function Kt(e, t) {
|
|
26140
26143
|
return t.when ? e.attributes.find((e) => e.name === t.when.attribute)?.value === t.when.equals : !0;
|
|
26141
26144
|
}
|
|
26142
|
-
function
|
|
26143
|
-
return
|
|
26145
|
+
function qt(e, t) {
|
|
26146
|
+
return k[e]?.find((e) => e.attribute.uuid === t);
|
|
26144
26147
|
}
|
|
26145
|
-
function
|
|
26146
|
-
let t =
|
|
26147
|
-
return t ? new Set(t.map((e) => e.attribute.path)) :
|
|
26148
|
+
function Jt(e) {
|
|
26149
|
+
let t = k[e];
|
|
26150
|
+
return t ? new Set(t.map((e) => e.attribute.path)) : Vt;
|
|
26148
26151
|
}
|
|
26149
|
-
async function
|
|
26152
|
+
async function Yt(e, t, n) {
|
|
26150
26153
|
let [r] = await e.findByAttributes({
|
|
26151
26154
|
tagName: t,
|
|
26152
26155
|
attributes: { id: n }
|
|
@@ -26156,7 +26159,7 @@ async function Gt(e, t, n) {
|
|
|
26156
26159
|
id: r.id
|
|
26157
26160
|
} : null;
|
|
26158
26161
|
}
|
|
26159
|
-
async function
|
|
26162
|
+
async function Xt(e, t, n) {
|
|
26160
26163
|
for (let r of t) {
|
|
26161
26164
|
let [t] = await e.findByAttributes({
|
|
26162
26165
|
tagName: r,
|
|
@@ -26171,22 +26174,23 @@ async function Kt(e, t, n) {
|
|
|
26171
26174
|
}
|
|
26172
26175
|
//#endregion
|
|
26173
26176
|
//#region src/v2019C1/extensions/signature/query/index.ts
|
|
26174
|
-
var
|
|
26177
|
+
var Zt = /* @__PURE__ */ s({ elementSignature: () => U });
|
|
26175
26178
|
//#endregion
|
|
26176
26179
|
//#region src/v2019C1/extensions/data-model/transaction/import-types.ts
|
|
26177
|
-
async function
|
|
26178
|
-
let { sourceQuery: n, records: r, cloneMappings: i = [], forkPrefix: a = "" } = t, o =
|
|
26180
|
+
async function G(e, t) {
|
|
26181
|
+
let { sourceQuery: n, records: r, cloneMappings: i = [], forkPrefix: a = "" } = t, o = Qt(await Rt(n, { records: r })), s = await e.ensureChild(await e.getRoot(), {
|
|
26179
26182
|
tagName: "DataTypeTemplates",
|
|
26180
26183
|
attributes: {}
|
|
26181
|
-
}), c = await
|
|
26184
|
+
}), c = await en(e), l = /* @__PURE__ */ new Map(), u = [], d = [], f = {
|
|
26182
26185
|
reused: 0,
|
|
26183
26186
|
preserved: 0,
|
|
26184
|
-
forked: 0
|
|
26187
|
+
forked: 0,
|
|
26188
|
+
reclaimed: 0
|
|
26185
26189
|
};
|
|
26186
26190
|
for (let t of o) {
|
|
26187
26191
|
let r = await n.getAttribute(t, { name: "id" });
|
|
26188
26192
|
if (!r) continue;
|
|
26189
|
-
let i = await
|
|
26193
|
+
let i = await U(n, {
|
|
26190
26194
|
ref: {
|
|
26191
26195
|
tagName: t.tagName,
|
|
26192
26196
|
id: t.id
|
|
@@ -26194,33 +26198,43 @@ async function Jt(e, t) {
|
|
|
26194
26198
|
resolveReferences: !0
|
|
26195
26199
|
}), o = c.get(i);
|
|
26196
26200
|
if (o !== void 0) {
|
|
26197
|
-
l.set(r, o),
|
|
26201
|
+
l.set(r, o), f.reused++;
|
|
26198
26202
|
continue;
|
|
26199
26203
|
}
|
|
26200
|
-
let
|
|
26201
|
-
if (!
|
|
26202
|
-
let
|
|
26204
|
+
let p = await n.getTree(t);
|
|
26205
|
+
if (!p) continue;
|
|
26206
|
+
let [m] = await e.findByAttributes({
|
|
26203
26207
|
tagName: t.tagName,
|
|
26204
26208
|
attributes: { id: r }
|
|
26205
|
-
})
|
|
26206
|
-
|
|
26207
|
-
let
|
|
26208
|
-
l.set(r,
|
|
26209
|
+
}), h = r, g = p;
|
|
26210
|
+
m ? (h = await sn(e, t.tagName, `${a}${r}_${cn(i)}`), g = tn(p, h), f.forked++) : f.preserved++;
|
|
26211
|
+
let _ = await e.deepClone(s, g);
|
|
26212
|
+
l.set(r, h), _?.record && (u.push(K(_.record.tagName, _.record.id)), m && d.push({
|
|
26213
|
+
oldId: r,
|
|
26214
|
+
oldRef: K(m.tagName, m.id),
|
|
26215
|
+
forkRef: K(_.record.tagName, _.record.id),
|
|
26216
|
+
forkedId: h
|
|
26217
|
+
}));
|
|
26209
26218
|
}
|
|
26210
|
-
let
|
|
26219
|
+
let p = i.map((e) => e.target);
|
|
26211
26220
|
for (let t of u) {
|
|
26212
26221
|
let n = await e.getTree(t);
|
|
26213
|
-
n &&
|
|
26222
|
+
n && q(n, p);
|
|
26214
26223
|
}
|
|
26215
|
-
return await
|
|
26216
|
-
records:
|
|
26224
|
+
return await F(e, {
|
|
26225
|
+
records: p,
|
|
26217
26226
|
idRemap: l
|
|
26227
|
+
}), d.length > 0 && await nn(e, {
|
|
26228
|
+
collisions: d,
|
|
26229
|
+
idRemap: l,
|
|
26230
|
+
referrerRecords: p,
|
|
26231
|
+
stats: f
|
|
26218
26232
|
}), {
|
|
26219
26233
|
idRemap: l,
|
|
26220
|
-
stats:
|
|
26234
|
+
stats: f
|
|
26221
26235
|
};
|
|
26222
26236
|
}
|
|
26223
|
-
function
|
|
26237
|
+
function Qt(e) {
|
|
26224
26238
|
return [
|
|
26225
26239
|
...e.enumTypes,
|
|
26226
26240
|
...e.daTypes,
|
|
@@ -26228,20 +26242,20 @@ function Yt(e) {
|
|
|
26228
26242
|
...e.lnodeTypes
|
|
26229
26243
|
];
|
|
26230
26244
|
}
|
|
26231
|
-
var
|
|
26245
|
+
var $t = [
|
|
26232
26246
|
"EnumType",
|
|
26233
26247
|
"DAType",
|
|
26234
26248
|
"DOType",
|
|
26235
26249
|
"LNodeType"
|
|
26236
26250
|
];
|
|
26237
|
-
async function
|
|
26251
|
+
async function en(e) {
|
|
26238
26252
|
let t = /* @__PURE__ */ new Map();
|
|
26239
|
-
for (let n of
|
|
26253
|
+
for (let n of $t) {
|
|
26240
26254
|
let r = await e.getRecordsByTagName(n);
|
|
26241
26255
|
for (let i of r) {
|
|
26242
26256
|
let r = i.attributes.find((e) => e.name === "id")?.value;
|
|
26243
26257
|
if (!r) continue;
|
|
26244
|
-
let a = await
|
|
26258
|
+
let a = await U(e, {
|
|
26245
26259
|
ref: {
|
|
26246
26260
|
tagName: n,
|
|
26247
26261
|
id: i.id
|
|
@@ -26253,24 +26267,84 @@ async function Zt(e) {
|
|
|
26253
26267
|
}
|
|
26254
26268
|
return t;
|
|
26255
26269
|
}
|
|
26256
|
-
function
|
|
26270
|
+
function tn(e, t) {
|
|
26257
26271
|
let n = structuredClone(e), r = n.attributes, i = r.find((e) => e.name === "id");
|
|
26258
26272
|
return i ? i.value = t : r.push({
|
|
26259
26273
|
name: "id",
|
|
26260
26274
|
value: t
|
|
26261
26275
|
}), n;
|
|
26262
26276
|
}
|
|
26263
|
-
function
|
|
26277
|
+
function K(e, t) {
|
|
26264
26278
|
return {
|
|
26265
26279
|
tagName: e,
|
|
26266
26280
|
id: t
|
|
26267
26281
|
};
|
|
26268
26282
|
}
|
|
26269
|
-
function
|
|
26270
|
-
t.push(
|
|
26271
|
-
for (let n of e.tree ?? [])
|
|
26283
|
+
function q(e, t) {
|
|
26284
|
+
t.push(K(e.tagName, e.id));
|
|
26285
|
+
for (let n of e.tree ?? []) q(n, t);
|
|
26286
|
+
}
|
|
26287
|
+
var J = (e) => `${e.tagName}#${e.id}`;
|
|
26288
|
+
async function nn(e, t) {
|
|
26289
|
+
let { collisions: n, idRemap: r, referrerRecords: i, stats: a } = t, o = await rn(e, n), s = /* @__PURE__ */ new Map(), c = [];
|
|
26290
|
+
for (let t of n) if (o.has(t.oldId)) {
|
|
26291
|
+
await e.update(t.forkRef, { attributes: { id: t.oldId } }), s.set(t.forkedId, t.oldId), c.push(t.forkRef), a.reclaimed++;
|
|
26292
|
+
for (let [e, n] of r) n === t.forkedId && r.set(e, t.oldId);
|
|
26293
|
+
}
|
|
26294
|
+
if (s.size === 0) return;
|
|
26295
|
+
let l = [...i];
|
|
26296
|
+
for (let t of c) {
|
|
26297
|
+
let n = await e.getTree(t);
|
|
26298
|
+
n && q(n, l);
|
|
26299
|
+
}
|
|
26300
|
+
await F(e, {
|
|
26301
|
+
records: l,
|
|
26302
|
+
idRemap: s
|
|
26303
|
+
});
|
|
26304
|
+
}
|
|
26305
|
+
async function rn(e, t) {
|
|
26306
|
+
let n = /* @__PURE__ */ new Set(), r = new Map(t.map((e) => [J(e.oldRef), e.oldId])), i = t.map((e) => e.oldRef), a = new Set(i.map(J)), o = /* @__PURE__ */ new Set(), s = !0;
|
|
26307
|
+
for (; s;) {
|
|
26308
|
+
s = !1;
|
|
26309
|
+
for (let t of i) {
|
|
26310
|
+
let c = J(t);
|
|
26311
|
+
if (o.has(c) || (await He(e, { target: t })).length > 0) continue;
|
|
26312
|
+
let l = await e.getTree(t), u = l ? await an(e, l) : [];
|
|
26313
|
+
await e.delete(t), o.add(c), s = !0;
|
|
26314
|
+
let d = r.get(c);
|
|
26315
|
+
d !== void 0 && n.add(d);
|
|
26316
|
+
for (let e of u) {
|
|
26317
|
+
let t = J(e);
|
|
26318
|
+
a.has(t) || (i.push(e), a.add(t));
|
|
26319
|
+
}
|
|
26320
|
+
}
|
|
26321
|
+
}
|
|
26322
|
+
return n;
|
|
26323
|
+
}
|
|
26324
|
+
async function an(e, t) {
|
|
26325
|
+
let n = [], r = /* @__PURE__ */ new Set();
|
|
26326
|
+
async function i(t) {
|
|
26327
|
+
let a = A[t.tagName];
|
|
26328
|
+
for (let i of a ?? []) {
|
|
26329
|
+
if (!on(t, i)) continue;
|
|
26330
|
+
let a = t.attributes.find((e) => e.name === i.attribute)?.value;
|
|
26331
|
+
if (!a) continue;
|
|
26332
|
+
let [o] = await e.findByAttributes({
|
|
26333
|
+
tagName: i.target,
|
|
26334
|
+
attributes: { id: a }
|
|
26335
|
+
});
|
|
26336
|
+
if (!o) continue;
|
|
26337
|
+
let s = K(i.target, o.id), c = J(s);
|
|
26338
|
+
r.has(c) || (r.add(c), n.push(s));
|
|
26339
|
+
}
|
|
26340
|
+
for (let e of t.tree ?? []) await i(e);
|
|
26341
|
+
}
|
|
26342
|
+
return await i(t), n;
|
|
26343
|
+
}
|
|
26344
|
+
function on(e, t) {
|
|
26345
|
+
return t.when ? e.attributes.find((e) => e.name === t.when.attribute)?.value === t.when.equals : !0;
|
|
26272
26346
|
}
|
|
26273
|
-
async function
|
|
26347
|
+
async function sn(e, t, n) {
|
|
26274
26348
|
let r = n, i = 2;
|
|
26275
26349
|
for (; (await e.findByAttributes({
|
|
26276
26350
|
tagName: t,
|
|
@@ -26278,22 +26352,22 @@ async function tn(e, t, n) {
|
|
|
26278
26352
|
})).length > 0;) r = `${n}_${i}`, i += 1;
|
|
26279
26353
|
return r;
|
|
26280
26354
|
}
|
|
26281
|
-
function
|
|
26355
|
+
function cn(e) {
|
|
26282
26356
|
let t = 2166136261;
|
|
26283
26357
|
for (let n = 0; n < e.length; n++) t ^= e.charCodeAt(n), t = Math.imul(t, 16777619);
|
|
26284
26358
|
return (t >>> 0).toString(16).padStart(8, "0");
|
|
26285
26359
|
}
|
|
26286
26360
|
//#endregion
|
|
26287
26361
|
//#region src/v2019C1/extensions/data-model/index.ts
|
|
26288
|
-
var
|
|
26289
|
-
query:
|
|
26290
|
-
transaction: /* @__PURE__ */ s({ importTypes: () =>
|
|
26291
|
-
},
|
|
26362
|
+
var ln = {
|
|
26363
|
+
query: zt,
|
|
26364
|
+
transaction: /* @__PURE__ */ s({ importTypes: () => G })
|
|
26365
|
+
}, un = {
|
|
26292
26366
|
scope: "tree",
|
|
26293
26367
|
attributes: ["templateUuid", "originUuid"]
|
|
26294
26368
|
};
|
|
26295
26369
|
async function Y(e, t) {
|
|
26296
|
-
let { sourceQuery: n, ref: i, targetParent: a, omit: o, promoteRoot: s, strip: c =
|
|
26370
|
+
let { sourceQuery: n, ref: i, targetParent: a, omit: o, promoteRoot: s, strip: c = un } = t, l = await n.getTree(i, { omit: o });
|
|
26297
26371
|
if (!l) return;
|
|
26298
26372
|
let u = s && l.tagName === s.from ? {
|
|
26299
26373
|
...l,
|
|
@@ -26306,7 +26380,7 @@ async function Y(e, t) {
|
|
|
26306
26380
|
}
|
|
26307
26381
|
//#endregion
|
|
26308
26382
|
//#region src/v2019C1/extensions/extraction/transaction/deep.ts
|
|
26309
|
-
async function
|
|
26383
|
+
async function dn(e, t) {
|
|
26310
26384
|
let { sourceQuery: n, ref: r, targetParent: i, withTypes: a = !0, omit: o, strip: s = !1, promoteRoot: c } = t, l = await Y(e, {
|
|
26311
26385
|
sourceQuery: n,
|
|
26312
26386
|
ref: r,
|
|
@@ -26318,8 +26392,8 @@ async function on(e, t) {
|
|
|
26318
26392
|
if (!l) throw Error(`extraction.deep: source element not found: ${r.tagName}#${r.id}`);
|
|
26319
26393
|
let u = /* @__PURE__ */ new Map();
|
|
26320
26394
|
if (a) {
|
|
26321
|
-
let t = await
|
|
26322
|
-
t.length > 0 && (u = (await
|
|
26395
|
+
let t = await fn(n, r);
|
|
26396
|
+
t.length > 0 && (u = (await G(e, {
|
|
26323
26397
|
sourceQuery: n,
|
|
26324
26398
|
records: t,
|
|
26325
26399
|
cloneMappings: l.mappings
|
|
@@ -26331,7 +26405,7 @@ async function on(e, t) {
|
|
|
26331
26405
|
recordMappings: l.mappings
|
|
26332
26406
|
};
|
|
26333
26407
|
}
|
|
26334
|
-
async function
|
|
26408
|
+
async function fn(e, t) {
|
|
26335
26409
|
let { LNode: n = [] } = await e.findDescendants(t, { collect: "LNode" }), { LN: r = [] } = await e.findDescendants(t, { collect: "LN" });
|
|
26336
26410
|
return [...n, ...r];
|
|
26337
26411
|
}
|
|
@@ -26356,13 +26430,13 @@ async function X(e) {
|
|
|
26356
26430
|
}
|
|
26357
26431
|
//#endregion
|
|
26358
26432
|
//#region src/v2019C1/extensions/extraction/transaction/recipes/shared/post-extraction-cleanup.ts
|
|
26359
|
-
async function
|
|
26360
|
-
await
|
|
26433
|
+
async function pn(e) {
|
|
26434
|
+
await B.transaction.orphanUuidRefs(e), await B.transaction.resetLNode(e), await B.transaction.pruneEmptyContainers(e);
|
|
26361
26435
|
}
|
|
26362
26436
|
//#endregion
|
|
26363
26437
|
//#region src/v2019C1/extensions/extraction/transaction/primitives/clone-referenced.ts
|
|
26364
|
-
async function
|
|
26365
|
-
let { sourceQuery: n, scopeRef: r, refTagName: i, targetTagName: a, alreadyCloned: o } = t, s =
|
|
26438
|
+
async function mn(e, t) {
|
|
26439
|
+
let { sourceQuery: n, scopeRef: r, refTagName: i, targetTagName: a, alreadyCloned: o } = t, s = k[i][0].attribute.uuid, { [i]: c = [] } = await n.findDescendants(r, { collect: i }), l = /* @__PURE__ */ new Set();
|
|
26366
26440
|
for (let e of c) {
|
|
26367
26441
|
let t = e.attributes.find((e) => e.name === s)?.value;
|
|
26368
26442
|
t && l.add(t);
|
|
@@ -26385,8 +26459,8 @@ async function ln(e, t) {
|
|
|
26385
26459
|
}
|
|
26386
26460
|
return u;
|
|
26387
26461
|
}
|
|
26388
|
-
async function
|
|
26389
|
-
let { sourceQuery: n, scopeRef: r, refTagName: i, targetTagName: a, resolveTargetParent: o, alreadyCloned: s, omit: c } = t, l = await
|
|
26462
|
+
async function hn(e, t) {
|
|
26463
|
+
let { sourceQuery: n, scopeRef: r, refTagName: i, targetTagName: a, resolveTargetParent: o, alreadyCloned: s, omit: c } = t, l = await mn(e, {
|
|
26390
26464
|
sourceQuery: n,
|
|
26391
26465
|
scopeRef: r,
|
|
26392
26466
|
refTagName: i,
|
|
@@ -26400,9 +26474,9 @@ async function un(e, t) {
|
|
|
26400
26474
|
omit: c
|
|
26401
26475
|
});
|
|
26402
26476
|
}
|
|
26403
|
-
async function
|
|
26404
|
-
let { sourceQuery: n, scopeTagName: r, scopeRef: i, resolveTargetParent: a, alreadyCloned: o, skip: s = /* @__PURE__ */ new Set(), omit: c } = t, l = (d[r] ?? []).filter((e) => e in
|
|
26405
|
-
for (let t of l) for (let r of
|
|
26477
|
+
async function gn(e, t) {
|
|
26478
|
+
let { sourceQuery: n, scopeTagName: r, scopeRef: i, resolveTargetParent: a, alreadyCloned: o, skip: s = /* @__PURE__ */ new Set(), omit: c } = t, l = (d[r] ?? []).filter((e) => e in k && !s.has(e)), u = hn;
|
|
26479
|
+
for (let t of l) for (let r of k[t]) for (let s of r.target) await u(e, {
|
|
26406
26480
|
sourceQuery: n,
|
|
26407
26481
|
scopeRef: i,
|
|
26408
26482
|
refTagName: t,
|
|
@@ -26426,7 +26500,7 @@ async function Z(e, t, n) {
|
|
|
26426
26500
|
id: i.id
|
|
26427
26501
|
};
|
|
26428
26502
|
}
|
|
26429
|
-
function
|
|
26503
|
+
function _n(e) {
|
|
26430
26504
|
let { sourceQuery: t, structure: n, cloneIndex: r } = e;
|
|
26431
26505
|
return async function(e) {
|
|
26432
26506
|
let i = await t.findAncestors(e, { stopAtTagName: "Substation" });
|
|
@@ -26449,8 +26523,8 @@ function fn(e) {
|
|
|
26449
26523
|
}
|
|
26450
26524
|
//#endregion
|
|
26451
26525
|
//#region src/v2019C1/extensions/extraction/transaction/recipes/shared/clone-function.ts
|
|
26452
|
-
async function
|
|
26453
|
-
let { sourceQuery: n, functionRef: r, targetParentRef: i, omit: a, stripRootAttributes: o } = t, { recordMappings: s } = await
|
|
26526
|
+
async function vn(e, t) {
|
|
26527
|
+
let { sourceQuery: n, functionRef: r, targetParentRef: i, omit: a, stripRootAttributes: o } = t, { recordMappings: s } = await dn(e, {
|
|
26454
26528
|
sourceQuery: n,
|
|
26455
26529
|
ref: r,
|
|
26456
26530
|
targetParent: i,
|
|
@@ -26467,10 +26541,10 @@ async function pn(e, t) {
|
|
|
26467
26541
|
});
|
|
26468
26542
|
return s;
|
|
26469
26543
|
}
|
|
26470
|
-
async function
|
|
26471
|
-
let { sourceQuery: n, functionRef: r, structure: i, stripCategoriesUuid: a = !0 } = t, o = await
|
|
26544
|
+
async function yn(e, t) {
|
|
26545
|
+
let { sourceQuery: n, functionRef: r, structure: i, stripCategoriesUuid: a = !0 } = t, o = await bn(n, r);
|
|
26472
26546
|
for (let t of o) {
|
|
26473
|
-
if (await
|
|
26547
|
+
if (await Sn(e, n, t)) continue;
|
|
26474
26548
|
let r = {
|
|
26475
26549
|
tagName: "FunctionCategory",
|
|
26476
26550
|
id: t
|
|
@@ -26483,18 +26557,18 @@ async function mn(e, t) {
|
|
|
26483
26557
|
});
|
|
26484
26558
|
}
|
|
26485
26559
|
}
|
|
26486
|
-
async function
|
|
26487
|
-
let n = await
|
|
26560
|
+
async function bn(e, t) {
|
|
26561
|
+
let n = await xn(e, t), r = /* @__PURE__ */ new Set();
|
|
26488
26562
|
for (let { container: e } of n) e && r.add(e.id);
|
|
26489
26563
|
return r;
|
|
26490
26564
|
}
|
|
26491
|
-
async function
|
|
26492
|
-
let n = await
|
|
26565
|
+
async function xn(e, t) {
|
|
26566
|
+
let n = await I.query.findRefsPointingTo(e, {
|
|
26493
26567
|
target: t,
|
|
26494
26568
|
containerTagName: "FunctionCategory"
|
|
26495
26569
|
}), { SubFunction: r = [] } = await e.findDescendants(t, { collect: "SubFunction" });
|
|
26496
26570
|
for (let t of r) {
|
|
26497
|
-
let r = await
|
|
26571
|
+
let r = await I.query.findRefsPointingTo(e, {
|
|
26498
26572
|
target: {
|
|
26499
26573
|
tagName: "SubFunction",
|
|
26500
26574
|
id: t.id
|
|
@@ -26505,7 +26579,7 @@ async function gn(e, t) {
|
|
|
26505
26579
|
}
|
|
26506
26580
|
return n;
|
|
26507
26581
|
}
|
|
26508
|
-
async function
|
|
26582
|
+
async function Sn(e, t, n) {
|
|
26509
26583
|
let r = await t.getRecord({
|
|
26510
26584
|
tagName: "FunctionCategory",
|
|
26511
26585
|
id: n
|
|
@@ -26529,15 +26603,15 @@ var Q = [
|
|
|
26529
26603
|
];
|
|
26530
26604
|
//#endregion
|
|
26531
26605
|
//#region src/v2019C1/extensions/extraction/transaction/recipes/asd/clone-application.ts
|
|
26532
|
-
async function
|
|
26533
|
-
let { sourceQuery: n, applicationRef: r, structure: i } = t, a = /* @__PURE__ */ new Map(), o = await
|
|
26606
|
+
async function Cn(e, t) {
|
|
26607
|
+
let { sourceQuery: n, applicationRef: r, structure: i } = t, a = /* @__PURE__ */ new Map(), o = await mn(e, {
|
|
26534
26608
|
sourceQuery: n,
|
|
26535
26609
|
scopeRef: r,
|
|
26536
26610
|
refTagName: "FunctionRef",
|
|
26537
26611
|
targetTagName: "Function"
|
|
26538
26612
|
});
|
|
26539
26613
|
for (let t of o) {
|
|
26540
|
-
let r = await
|
|
26614
|
+
let r = await vn(e, {
|
|
26541
26615
|
sourceQuery: n,
|
|
26542
26616
|
functionRef: t,
|
|
26543
26617
|
targetParentRef: await Z(n, t, i),
|
|
@@ -26545,18 +26619,18 @@ async function vn(e, t) {
|
|
|
26545
26619
|
});
|
|
26546
26620
|
for (let e of r) e.source.id && a.set(e.source.id, e.target);
|
|
26547
26621
|
}
|
|
26548
|
-
for (let t of o) await
|
|
26622
|
+
for (let t of o) await yn(e, {
|
|
26549
26623
|
sourceQuery: n,
|
|
26550
26624
|
functionRef: t,
|
|
26551
26625
|
structure: i,
|
|
26552
26626
|
stripCategoriesUuid: !1
|
|
26553
26627
|
});
|
|
26554
26628
|
let s = new Set(["FunctionRef", "FunctionCategoryRef"]);
|
|
26555
|
-
await
|
|
26629
|
+
await gn(e, {
|
|
26556
26630
|
sourceQuery: n,
|
|
26557
26631
|
scopeTagName: "Application",
|
|
26558
26632
|
scopeRef: r,
|
|
26559
|
-
resolveTargetParent:
|
|
26633
|
+
resolveTargetParent: _n({
|
|
26560
26634
|
sourceQuery: n,
|
|
26561
26635
|
structure: i,
|
|
26562
26636
|
cloneIndex: a
|
|
@@ -26573,7 +26647,7 @@ async function vn(e, t) {
|
|
|
26573
26647
|
}
|
|
26574
26648
|
//#endregion
|
|
26575
26649
|
//#region src/v2019C1/extensions/history/query/get-sorted-hitem.ts
|
|
26576
|
-
async function
|
|
26650
|
+
async function wn(e) {
|
|
26577
26651
|
let t = await e.getRecord({ tagName: "History" });
|
|
26578
26652
|
if (!t) return [];
|
|
26579
26653
|
let { Hitem: n = [] } = await e.findDescendants(t, { collect: "Hitem" });
|
|
@@ -26587,18 +26661,18 @@ async function yn(e) {
|
|
|
26587
26661
|
}
|
|
26588
26662
|
//#endregion
|
|
26589
26663
|
//#region src/v2019C1/extensions/history/query/get-latest-hitem.ts
|
|
26590
|
-
async function
|
|
26591
|
-
return (await
|
|
26664
|
+
async function Tn(e) {
|
|
26665
|
+
return (await wn(e)).at(-1);
|
|
26592
26666
|
}
|
|
26593
26667
|
//#endregion
|
|
26594
26668
|
//#region src/v2019C1/extensions/history/query/index.ts
|
|
26595
|
-
var
|
|
26596
|
-
getLatestHitem: () =>
|
|
26597
|
-
getSortedHitems: () =>
|
|
26669
|
+
var En = /* @__PURE__ */ s({
|
|
26670
|
+
getLatestHitem: () => Tn,
|
|
26671
|
+
getSortedHitems: () => wn
|
|
26598
26672
|
});
|
|
26599
26673
|
//#endregion
|
|
26600
26674
|
//#region src/v2019C1/extensions/history/transaction/add-entry.ts
|
|
26601
|
-
async function
|
|
26675
|
+
async function Dn(e, t) {
|
|
26602
26676
|
let { filename: n, header: r, item: i } = t, { id: a, fileType: o, nameStructure: s, version: c, tool: l } = r, { who: u, what: d, why: f } = i, p = await e.getRoot(), m = await e.getRecord({ tagName: "Header" }) ?? await e.addChild(p, {
|
|
26603
26677
|
tagName: "Header",
|
|
26604
26678
|
attributes: {
|
|
@@ -26613,7 +26687,7 @@ async function Sn(e, t) {
|
|
|
26613
26687
|
}), h = await e.getRecord({ tagName: "History" }) ?? await e.addChild(m, {
|
|
26614
26688
|
tagName: "History",
|
|
26615
26689
|
attributes: {}
|
|
26616
|
-
}), g = await
|
|
26690
|
+
}), g = await Tn(e), _ = g?.attributes.find((e) => e.name === "version")?.value, v = g?.attributes.find((e) => e.name === "revision")?.value, y = c === "keep" ? _ ?? "0" : _ ? String(Number(_) + 1) : "0", b = v ? String(Number(v) + 1) : "1";
|
|
26617
26691
|
await e.update(m, { attributes: {
|
|
26618
26692
|
version: y,
|
|
26619
26693
|
revision: b
|
|
@@ -26637,12 +26711,12 @@ async function Sn(e, t) {
|
|
|
26637
26711
|
//#endregion
|
|
26638
26712
|
//#region src/v2019C1/extensions/history/index.ts
|
|
26639
26713
|
var $ = {
|
|
26640
|
-
query:
|
|
26641
|
-
transaction: /* @__PURE__ */ s({ addEntry: () =>
|
|
26714
|
+
query: En,
|
|
26715
|
+
transaction: /* @__PURE__ */ s({ addEntry: () => Dn })
|
|
26642
26716
|
};
|
|
26643
26717
|
//#endregion
|
|
26644
26718
|
//#region src/v2019C1/extensions/extraction/transaction/recipes/asd/to-asd.ts
|
|
26645
|
-
async function
|
|
26719
|
+
async function On(e, t) {
|
|
26646
26720
|
let { sourceQuery: n, applicationRef: r, tool: i, who: a, nameStructure: o } = t, s = await X(e), c = await e.getAttribute(r, { name: "name" }) || "Unnamed Application";
|
|
26647
26721
|
await $.transaction.addEntry(e, {
|
|
26648
26722
|
filename: `ASD_${c.replace(/\s+/g, "_")}`,
|
|
@@ -26657,15 +26731,15 @@ async function Cn(e, t) {
|
|
|
26657
26731
|
what: "ASD initialization",
|
|
26658
26732
|
why: "Application was extracted from a previous file"
|
|
26659
26733
|
}
|
|
26660
|
-
}), await
|
|
26734
|
+
}), await Cn(e, {
|
|
26661
26735
|
sourceQuery: n,
|
|
26662
26736
|
applicationRef: r,
|
|
26663
26737
|
structure: s
|
|
26664
|
-
}), await
|
|
26738
|
+
}), await pn(e);
|
|
26665
26739
|
}
|
|
26666
26740
|
//#endregion
|
|
26667
26741
|
//#region src/v2019C1/extensions/extraction/transaction/recipes/fsd/omit.ts
|
|
26668
|
-
var
|
|
26742
|
+
var kn = [
|
|
26669
26743
|
...Q,
|
|
26670
26744
|
"DOS",
|
|
26671
26745
|
"Labels",
|
|
@@ -26678,7 +26752,7 @@ var wn = [
|
|
|
26678
26752
|
];
|
|
26679
26753
|
//#endregion
|
|
26680
26754
|
//#region src/v2019C1/extensions/extraction/transaction/recipes/fsd/to-fsd.ts
|
|
26681
|
-
async function
|
|
26755
|
+
async function An(e, t) {
|
|
26682
26756
|
let { sourceQuery: n, functionRef: r, tool: i, who: a, nameStructure: o } = t, s = await X(e), c = {
|
|
26683
26757
|
tagName: s.Substation.tagName,
|
|
26684
26758
|
id: s.Substation.id
|
|
@@ -26696,26 +26770,26 @@ async function Tn(e, t) {
|
|
|
26696
26770
|
what: "FSD initialization",
|
|
26697
26771
|
why: "Function was extracted from a previous file"
|
|
26698
26772
|
}
|
|
26699
|
-
}), await
|
|
26773
|
+
}), await vn(e, {
|
|
26700
26774
|
sourceQuery: n,
|
|
26701
26775
|
functionRef: r,
|
|
26702
26776
|
targetParentRef: c,
|
|
26703
|
-
omit:
|
|
26777
|
+
omit: kn,
|
|
26704
26778
|
stripRootAttributes: ["templateUuid"]
|
|
26705
|
-
}), await
|
|
26779
|
+
}), await yn(e, {
|
|
26706
26780
|
sourceQuery: n,
|
|
26707
26781
|
functionRef: r,
|
|
26708
26782
|
structure: s
|
|
26709
|
-
}), await
|
|
26783
|
+
}), await pn(e);
|
|
26710
26784
|
}
|
|
26711
26785
|
//#endregion
|
|
26712
26786
|
//#region src/v2019C1/extensions/extraction/index.ts
|
|
26713
|
-
var
|
|
26714
|
-
deep: () =>
|
|
26787
|
+
var jn = { transaction: /* @__PURE__ */ s({
|
|
26788
|
+
deep: () => dn,
|
|
26715
26789
|
ensureSubstationTemplateStructure: () => X,
|
|
26716
|
-
toAsd: () =>
|
|
26717
|
-
toFsd: () =>
|
|
26718
|
-
}) },
|
|
26790
|
+
toAsd: () => On,
|
|
26791
|
+
toFsd: () => An
|
|
26792
|
+
}) }, Mn = {
|
|
26719
26793
|
LNode: {
|
|
26720
26794
|
compact: [
|
|
26721
26795
|
"prefix",
|
|
@@ -26802,13 +26876,13 @@ var En = { transaction: /* @__PURE__ */ s({
|
|
|
26802
26876
|
};
|
|
26803
26877
|
//#endregion
|
|
26804
26878
|
//#region src/v2019C1/extensions/presentation/query/extract-element-title.ts
|
|
26805
|
-
async function
|
|
26879
|
+
async function Nn(e, t, n = {}) {
|
|
26806
26880
|
let r = await e.getRecord(t);
|
|
26807
26881
|
if (!r) return n.withLabels ? {
|
|
26808
26882
|
title: "",
|
|
26809
26883
|
labels: {}
|
|
26810
26884
|
} : "";
|
|
26811
|
-
let i = r.tagName, a =
|
|
26885
|
+
let i = r.tagName, a = Pn({
|
|
26812
26886
|
tag: i,
|
|
26813
26887
|
mode: n.mode ?? "compact",
|
|
26814
26888
|
attributes: await e.any.getAttributes(r),
|
|
@@ -26816,13 +26890,13 @@ async function On(e, t, n = {}) {
|
|
|
26816
26890
|
});
|
|
26817
26891
|
return n.withLabels ? {
|
|
26818
26892
|
title: a,
|
|
26819
|
-
labels: await
|
|
26893
|
+
labels: await Fn(e, r)
|
|
26820
26894
|
} : a;
|
|
26821
26895
|
}
|
|
26822
|
-
function
|
|
26823
|
-
let { tag: t, mode: n, attributes: r, value: i } = e, a =
|
|
26896
|
+
function Pn(e) {
|
|
26897
|
+
let { tag: t, mode: n, attributes: r, value: i } = e, a = Mn[t];
|
|
26824
26898
|
if (a) {
|
|
26825
|
-
let e =
|
|
26899
|
+
let e = Rn(a, r, n);
|
|
26826
26900
|
if (e) return e;
|
|
26827
26901
|
}
|
|
26828
26902
|
let o = (i ?? "").trim();
|
|
@@ -26830,10 +26904,10 @@ function kn(e) {
|
|
|
26830
26904
|
let s = h[t]?.attributes?.identityFields, c = s?.find((e) => e === "name" || e === "id") ?? s?.[0];
|
|
26831
26905
|
return c && r[c] ? r[c] : r.name || t;
|
|
26832
26906
|
}
|
|
26833
|
-
async function
|
|
26834
|
-
return
|
|
26907
|
+
async function Fn(e, t) {
|
|
26908
|
+
return Ln(await In(e, t));
|
|
26835
26909
|
}
|
|
26836
|
-
async function
|
|
26910
|
+
async function In(e, t) {
|
|
26837
26911
|
let n = [], r = await e.any.getChildren(t, "Labels");
|
|
26838
26912
|
for (let t of r) {
|
|
26839
26913
|
let r = await e.any.getChildren(t, "Label");
|
|
@@ -26848,30 +26922,30 @@ async function jn(e, t) {
|
|
|
26848
26922
|
}
|
|
26849
26923
|
return n;
|
|
26850
26924
|
}
|
|
26851
|
-
function
|
|
26925
|
+
function Ln(e) {
|
|
26852
26926
|
let t = {};
|
|
26853
26927
|
for (let { lang: n, id: r, text: i } of e) (t[n] ??= {})[r] = i;
|
|
26854
26928
|
return t;
|
|
26855
26929
|
}
|
|
26856
|
-
function
|
|
26930
|
+
function Rn(e, t, n) {
|
|
26857
26931
|
let r = n === "full" && e.full !== void 0, i = r ? e.full : e.compact, a = r ? e.fullSeparator ?? e.separator ?? "" : e.separator ?? "";
|
|
26858
|
-
if (typeof i == "string") return
|
|
26932
|
+
if (typeof i == "string") return zn(i, t);
|
|
26859
26933
|
let o = i.map((e) => t[e]).filter(Boolean);
|
|
26860
26934
|
return o.length > 0 ? o.join(a) : "";
|
|
26861
26935
|
}
|
|
26862
|
-
function
|
|
26936
|
+
function zn(e, t) {
|
|
26863
26937
|
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("/");
|
|
26864
26938
|
}
|
|
26865
26939
|
//#endregion
|
|
26866
26940
|
//#region src/v2019C1/extensions/index.ts
|
|
26867
|
-
var
|
|
26868
|
-
cleanUp:
|
|
26869
|
-
dataModel:
|
|
26870
|
-
extraction:
|
|
26941
|
+
var Bn = {
|
|
26942
|
+
cleanUp: B,
|
|
26943
|
+
dataModel: ln,
|
|
26944
|
+
extraction: jn,
|
|
26871
26945
|
history: $,
|
|
26872
|
-
reference:
|
|
26873
|
-
signature: { query:
|
|
26874
|
-
presentation: { query: /* @__PURE__ */ s({ extractElementTitle: () =>
|
|
26946
|
+
reference: I,
|
|
26947
|
+
signature: { query: Zt },
|
|
26948
|
+
presentation: { query: /* @__PURE__ */ s({ extractElementTitle: () => Nn }) }
|
|
26875
26949
|
};
|
|
26876
26950
|
//#endregion
|
|
26877
|
-
export { S,
|
|
26951
|
+
export { S, ze as _, At as a, O as b, Ve as c, Le as d, Ie as f, Re as g, N as h, z as i, P as l, M as m, Bt as n, Mt as o, j as p, jt as r, kt as s, Bn as t, Be as u, A as v, C as x, k as y };
|