@nywqs/scada-engine 1.1.6 → 1.1.8
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/scada-engine.css +1 -1
- package/dist/scada-engine.es.js +177 -172
- package/dist/scada-engine.umd.js +5 -5
- package/package.json +1 -1
package/dist/scada-engine.es.js
CHANGED
|
@@ -1981,7 +1981,7 @@ const se = new mn(), bn = { class: "component-library" }, yn = { class: "library
|
|
|
1981
1981
|
f.type === "number" ? n = Number(a.value) : f.type === "boolean" ? n = a.checked : n = a.value, r("update-dynamic-prop", f.path, n);
|
|
1982
1982
|
};
|
|
1983
1983
|
return (f, u) => {
|
|
1984
|
-
var a, n, s, i, x, g, y, B, _, d, c, p, C, b, $, I,
|
|
1984
|
+
var a, n, s, i, x, g, y, B, _, d, c, p, C, b, $, I, T;
|
|
1985
1985
|
return F(), w("div", da, [
|
|
1986
1986
|
e("div", ua, [
|
|
1987
1987
|
u[13] || (u[13] = e("h4", null, "基础信息", -1)),
|
|
@@ -2100,7 +2100,7 @@ const se = new mn(), bn = { class: "component-library" }, yn = { class: "library
|
|
|
2100
2100
|
min: "0",
|
|
2101
2101
|
max: "1",
|
|
2102
2102
|
step: "0.1",
|
|
2103
|
-
value: ((
|
|
2103
|
+
value: ((T = (I = v.nodeAttrs) == null ? void 0 : I.body) == null ? void 0 : T.opacity) !== void 0 ? v.nodeAttrs.body.opacity : 1,
|
|
2104
2104
|
onInput: u[9] || (u[9] = (E) => f.$emit("update-opacity", E))
|
|
2105
2105
|
}, null, 40, Ma)
|
|
2106
2106
|
])
|
|
@@ -2605,7 +2605,7 @@ const se = new mn(), bn = { class: "component-library" }, yn = { class: "library
|
|
|
2605
2605
|
});
|
|
2606
2606
|
};
|
|
2607
2607
|
return (C, b) => {
|
|
2608
|
-
var $, I,
|
|
2608
|
+
var $, I, T, E, k, z, V, W;
|
|
2609
2609
|
return F(), w("div", pr, [
|
|
2610
2610
|
e("div", xr, [
|
|
2611
2611
|
b[10] || (b[10] = e("h4", { class: "section-title" }, "线条样式", -1)),
|
|
@@ -2635,7 +2635,7 @@ const se = new mn(), bn = { class: "component-library" }, yn = { class: "library
|
|
|
2635
2635
|
min: "1",
|
|
2636
2636
|
max: "20",
|
|
2637
2637
|
step: "1",
|
|
2638
|
-
value: ((
|
|
2638
|
+
value: ((T = t.value.line) == null ? void 0 : T.strokeWidth) || 2,
|
|
2639
2639
|
onInput: m
|
|
2640
2640
|
}, null, 40, yr),
|
|
2641
2641
|
b[1] || (b[1] = e("span", { class: "input-unit" }, "px", -1))
|
|
@@ -4479,7 +4479,7 @@ const Yl = { class: "mapping-configurator" }, Kl = { class: "config-item" }, Jl
|
|
|
4479
4479
|
}, I = (H) => {
|
|
4480
4480
|
const O = H.target.value, L = { ...o.selectedNode.data, componentName: O };
|
|
4481
4481
|
r("updateNode", { data: L });
|
|
4482
|
-
},
|
|
4482
|
+
}, T = (H, O) => {
|
|
4483
4483
|
if (!o.selectedNode) return;
|
|
4484
4484
|
const L = H.split(".");
|
|
4485
4485
|
if (L[0] === "attrs") {
|
|
@@ -4532,19 +4532,19 @@ const Yl = { class: "mapping-configurator" }, Kl = { class: "config-item" }, Jl
|
|
|
4532
4532
|
r("updateNode", { data: H });
|
|
4533
4533
|
}, le = (H) => {
|
|
4534
4534
|
m.value.has(H) ? m.value.delete(H) : m.value.add(H);
|
|
4535
|
-
}, A = (H) => m.value.has(H),
|
|
4535
|
+
}, A = (H) => m.value.has(H), P = () => {
|
|
4536
4536
|
const H = {
|
|
4537
4537
|
devicePointId: "",
|
|
4538
4538
|
targetProperty: "",
|
|
4539
4539
|
enabled: !0
|
|
4540
4540
|
};
|
|
4541
|
-
f.value.push(H),
|
|
4541
|
+
f.value.push(H), N();
|
|
4542
4542
|
}, D = (H) => {
|
|
4543
|
-
f.value.splice(H, 1),
|
|
4543
|
+
f.value.splice(H, 1), N();
|
|
4544
4544
|
}, S = (H, O, L) => {
|
|
4545
4545
|
const ee = L.target.value;
|
|
4546
|
-
f.value[H][O] = ee,
|
|
4547
|
-
},
|
|
4546
|
+
f.value[H][O] = ee, N();
|
|
4547
|
+
}, N = () => {
|
|
4548
4548
|
const H = { ...o.selectedNode.data, bindings: f.value };
|
|
4549
4549
|
r("updateNode", { data: H });
|
|
4550
4550
|
}, R = (H) => {
|
|
@@ -4653,7 +4653,7 @@ const Yl = { class: "mapping-configurator" }, Kl = { class: "config-item" }, Jl
|
|
|
4653
4653
|
onUpdateStrokeWidth: b,
|
|
4654
4654
|
onUpdateOpacity: $,
|
|
4655
4655
|
onUpdateComponentName: I,
|
|
4656
|
-
onUpdateDynamicProp:
|
|
4656
|
+
onUpdateDynamicProp: T
|
|
4657
4657
|
}, null, 8, ["selected-node", "node-position", "node-size", "node-attrs"]), [
|
|
4658
4658
|
[et, t.value === "basic"]
|
|
4659
4659
|
]),
|
|
@@ -4702,7 +4702,7 @@ const Yl = { class: "mapping-configurator" }, Kl = { class: "config-item" }, Jl
|
|
|
4702
4702
|
O[8] || (O[8] = e("h4", null, "数据绑定", -1)),
|
|
4703
4703
|
e("button", {
|
|
4704
4704
|
class: "btn-add",
|
|
4705
|
-
onClick:
|
|
4705
|
+
onClick: P
|
|
4706
4706
|
}, "+ 添加绑定")
|
|
4707
4707
|
]),
|
|
4708
4708
|
f.value.length === 0 ? (F(), w("div", mu, [...O[9] || (O[9] = [
|
|
@@ -4956,8 +4956,8 @@ function re() {
|
|
|
4956
4956
|
c[C + $ >>> 2] |= I << 24 - (C + $) % 4 * 8;
|
|
4957
4957
|
}
|
|
4958
4958
|
else
|
|
4959
|
-
for (var
|
|
4960
|
-
c[C +
|
|
4959
|
+
for (var T = 0; T < b; T += 4)
|
|
4960
|
+
c[C + T >>> 2] = p[T >>> 2];
|
|
4961
4961
|
return this.sigBytes += b, this;
|
|
4962
4962
|
},
|
|
4963
4963
|
/**
|
|
@@ -5156,9 +5156,9 @@ function re() {
|
|
|
5156
5156
|
* var processedData = bufferedBlockAlgorithm._process(!!'flush');
|
|
5157
5157
|
*/
|
|
5158
5158
|
_process: function(d) {
|
|
5159
|
-
var c, p = this._data, C = p.words, b = p.sigBytes, $ = this.blockSize, I = $ * 4,
|
|
5160
|
-
d ?
|
|
5161
|
-
var E =
|
|
5159
|
+
var c, p = this._data, C = p.words, b = p.sigBytes, $ = this.blockSize, I = $ * 4, T = b / I;
|
|
5160
|
+
d ? T = r.ceil(T) : T = r.max((T | 0) - this._minBufferSize, 0);
|
|
5161
|
+
var E = T * $, k = r.min(E * 4, b);
|
|
5162
5162
|
if (E) {
|
|
5163
5163
|
for (var z = 0; z < E; z += $)
|
|
5164
5164
|
this._doProcessBlock(C, z);
|
|
@@ -5816,8 +5816,8 @@ function Je() {
|
|
|
5816
5816
|
var d = B + _, c = y[d];
|
|
5817
5817
|
y[d] = (c << 8 | c >>> 24) & 16711935 | (c << 24 | c >>> 8) & 4278255360;
|
|
5818
5818
|
}
|
|
5819
|
-
var p = this._hash.words, C = y[B + 0], b = y[B + 1], $ = y[B + 2], I = y[B + 3],
|
|
5820
|
-
D = s(D, S,
|
|
5819
|
+
var p = this._hash.words, C = y[B + 0], b = y[B + 1], $ = y[B + 2], I = y[B + 3], T = y[B + 4], E = y[B + 5], k = y[B + 6], z = y[B + 7], V = y[B + 8], W = y[B + 9], X = y[B + 10], Q = y[B + 11], ne = y[B + 12], le = y[B + 13], A = y[B + 14], P = y[B + 15], D = p[0], S = p[1], N = p[2], R = p[3];
|
|
5820
|
+
D = s(D, S, N, R, C, 7, a[0]), R = s(R, D, S, N, b, 12, a[1]), N = s(N, R, D, S, $, 17, a[2]), S = s(S, N, R, D, I, 22, a[3]), D = s(D, S, N, R, T, 7, a[4]), R = s(R, D, S, N, E, 12, a[5]), N = s(N, R, D, S, k, 17, a[6]), S = s(S, N, R, D, z, 22, a[7]), D = s(D, S, N, R, V, 7, a[8]), R = s(R, D, S, N, W, 12, a[9]), N = s(N, R, D, S, X, 17, a[10]), S = s(S, N, R, D, Q, 22, a[11]), D = s(D, S, N, R, ne, 7, a[12]), R = s(R, D, S, N, le, 12, a[13]), N = s(N, R, D, S, A, 17, a[14]), S = s(S, N, R, D, P, 22, a[15]), D = i(D, S, N, R, b, 5, a[16]), R = i(R, D, S, N, k, 9, a[17]), N = i(N, R, D, S, Q, 14, a[18]), S = i(S, N, R, D, C, 20, a[19]), D = i(D, S, N, R, E, 5, a[20]), R = i(R, D, S, N, X, 9, a[21]), N = i(N, R, D, S, P, 14, a[22]), S = i(S, N, R, D, T, 20, a[23]), D = i(D, S, N, R, W, 5, a[24]), R = i(R, D, S, N, A, 9, a[25]), N = i(N, R, D, S, I, 14, a[26]), S = i(S, N, R, D, V, 20, a[27]), D = i(D, S, N, R, le, 5, a[28]), R = i(R, D, S, N, $, 9, a[29]), N = i(N, R, D, S, z, 14, a[30]), S = i(S, N, R, D, ne, 20, a[31]), D = x(D, S, N, R, E, 4, a[32]), R = x(R, D, S, N, V, 11, a[33]), N = x(N, R, D, S, Q, 16, a[34]), S = x(S, N, R, D, A, 23, a[35]), D = x(D, S, N, R, b, 4, a[36]), R = x(R, D, S, N, T, 11, a[37]), N = x(N, R, D, S, z, 16, a[38]), S = x(S, N, R, D, X, 23, a[39]), D = x(D, S, N, R, le, 4, a[40]), R = x(R, D, S, N, C, 11, a[41]), N = x(N, R, D, S, I, 16, a[42]), S = x(S, N, R, D, k, 23, a[43]), D = x(D, S, N, R, W, 4, a[44]), R = x(R, D, S, N, ne, 11, a[45]), N = x(N, R, D, S, P, 16, a[46]), S = x(S, N, R, D, $, 23, a[47]), D = g(D, S, N, R, C, 6, a[48]), R = g(R, D, S, N, z, 10, a[49]), N = g(N, R, D, S, A, 15, a[50]), S = g(S, N, R, D, E, 21, a[51]), D = g(D, S, N, R, ne, 6, a[52]), R = g(R, D, S, N, I, 10, a[53]), N = g(N, R, D, S, X, 15, a[54]), S = g(S, N, R, D, b, 21, a[55]), D = g(D, S, N, R, V, 6, a[56]), R = g(R, D, S, N, P, 10, a[57]), N = g(N, R, D, S, k, 15, a[58]), S = g(S, N, R, D, le, 21, a[59]), D = g(D, S, N, R, T, 6, a[60]), R = g(R, D, S, N, Q, 10, a[61]), N = g(N, R, D, S, $, 15, a[62]), S = g(S, N, R, D, W, 21, a[63]), p[0] = p[0] + D | 0, p[1] = p[1] + S | 0, p[2] = p[2] + N | 0, p[3] = p[3] + R | 0;
|
|
5821
5821
|
},
|
|
5822
5822
|
_doFinalize: function() {
|
|
5823
5823
|
var y = this._data, B = y.words, _ = this._nDataBytes * 8, d = y.sigBytes * 8;
|
|
@@ -5930,7 +5930,7 @@ function e0() {
|
|
|
5930
5930
|
if (I < 16)
|
|
5931
5931
|
s[I] = x[g + I] | 0;
|
|
5932
5932
|
else {
|
|
5933
|
-
var
|
|
5933
|
+
var T = s[I - 15], E = (T << 25 | T >>> 7) ^ (T << 14 | T >>> 18) ^ T >>> 3, k = s[I - 2], z = (k << 15 | k >>> 17) ^ (k << 13 | k >>> 19) ^ k >>> 10;
|
|
5934
5934
|
s[I] = E + s[I - 7] + z + s[I - 16];
|
|
5935
5935
|
}
|
|
5936
5936
|
var V = p & C ^ ~p & b, W = B & _ ^ B & d ^ _ & d, X = (B << 30 | B >>> 2) ^ (B << 19 | B >>> 13) ^ (B << 10 | B >>> 22), Q = (p << 26 | p >>> 6) ^ (p << 21 | p >>> 11) ^ (p << 7 | p >>> 25), ne = $ + Q + V + n[I] + s[I], le = X + W;
|
|
@@ -6093,7 +6093,7 @@ function bo() {
|
|
|
6093
6093
|
]);
|
|
6094
6094
|
},
|
|
6095
6095
|
_doProcessBlock: function(g, y) {
|
|
6096
|
-
for (var B = this._hash.words, _ = B[0], d = B[1], c = B[2], p = B[3], C = B[4], b = B[5], $ = B[6], I = B[7],
|
|
6096
|
+
for (var B = this._hash.words, _ = B[0], d = B[1], c = B[2], p = B[3], C = B[4], b = B[5], $ = B[6], I = B[7], T = _.high, E = _.low, k = d.high, z = d.low, V = c.high, W = c.low, X = p.high, Q = p.low, ne = C.high, le = C.low, A = b.high, P = b.low, D = $.high, S = $.low, N = I.high, R = I.low, Y = T, G = E, ae = k, U = z, J = V, ue = W, Ee = X, ve = Q, he = ne, Be = le, Te = A, we = P, ze = D, Me = S, Ze = N, We = R, ke = 0; ke < 80; ke++) {
|
|
6097
6097
|
var me, Se, Le = i[ke];
|
|
6098
6098
|
if (ke < 16)
|
|
6099
6099
|
Se = Le.high = g[y + ke * 2] | 0, me = Le.low = g[y + ke * 2 + 1] | 0;
|
|
@@ -6104,7 +6104,7 @@ function bo() {
|
|
|
6104
6104
|
var _o = he & Te ^ ~he & ze, s0 = Be & we ^ ~Be & Me, Do = Y & ae ^ Y & J ^ ae & J, $o = G & U ^ G & ue ^ U & ue, Fo = (Y >>> 28 | G << 4) ^ (Y << 30 | G >>> 2) ^ (Y << 25 | G >>> 7), r0 = (G >>> 28 | Y << 4) ^ (G << 30 | Y >>> 2) ^ (G << 25 | Y >>> 7), wo = (he >>> 14 | Be << 18) ^ (he >>> 18 | Be << 14) ^ (he << 23 | Be >>> 9), So = (Be >>> 14 | he << 18) ^ (Be >>> 18 | he << 14) ^ (Be << 23 | he >>> 9), l0 = s[ke], Io = l0.high, i0 = l0.low, _e = We + So, Re = Ze + wo + (_e >>> 0 < We >>> 0 ? 1 : 0), _e = _e + s0, Re = Re + _o + (_e >>> 0 < s0 >>> 0 ? 1 : 0), _e = _e + i0, Re = Re + Io + (_e >>> 0 < i0 >>> 0 ? 1 : 0), _e = _e + me, Re = Re + Se + (_e >>> 0 < me >>> 0 ? 1 : 0), d0 = r0 + $o, zo = Fo + Do + (d0 >>> 0 < r0 >>> 0 ? 1 : 0);
|
|
6105
6105
|
Ze = ze, We = Me, ze = Te, Me = we, Te = he, we = Be, Be = ve + _e | 0, he = Ee + Re + (Be >>> 0 < ve >>> 0 ? 1 : 0) | 0, Ee = J, ve = ue, J = ae, ue = U, ae = Y, U = G, G = _e + d0 | 0, Y = Re + zo + (G >>> 0 < _e >>> 0 ? 1 : 0) | 0;
|
|
6106
6106
|
}
|
|
6107
|
-
E = _.low = E + G, _.high =
|
|
6107
|
+
E = _.low = E + G, _.high = T + Y + (E >>> 0 < G >>> 0 ? 1 : 0), z = d.low = z + U, d.high = k + ae + (z >>> 0 < U >>> 0 ? 1 : 0), W = c.low = W + ue, c.high = V + J + (W >>> 0 < ue >>> 0 ? 1 : 0), Q = p.low = Q + ve, p.high = X + Ee + (Q >>> 0 < ve >>> 0 ? 1 : 0), le = C.low = le + Be, C.high = ne + he + (le >>> 0 < Be >>> 0 ? 1 : 0), P = b.low = P + we, b.high = A + Te + (P >>> 0 < we >>> 0 ? 1 : 0), S = $.low = S + Me, $.high = D + ze + (S >>> 0 < Me >>> 0 ? 1 : 0), R = I.low = R + We, I.high = N + Ze + (R >>> 0 < We >>> 0 ? 1 : 0);
|
|
6108
6108
|
},
|
|
6109
6109
|
_doFinalize: function() {
|
|
6110
6110
|
var g = this._data, y = g.words, B = this._nDataBytes * 8, _ = g.sigBytes * 8;
|
|
@@ -6171,9 +6171,9 @@ function Iu() {
|
|
|
6171
6171
|
for (var _ = 0; _ < 5; _++)
|
|
6172
6172
|
i[B + 5 * _] = _ + (2 * B + 3 * _) % 5 * 5;
|
|
6173
6173
|
for (var C = 1, b = 0; b < 24; b++) {
|
|
6174
|
-
for (var $ = 0, I = 0,
|
|
6174
|
+
for (var $ = 0, I = 0, T = 0; T < 7; T++) {
|
|
6175
6175
|
if (C & 1) {
|
|
6176
|
-
var E = (1 <<
|
|
6176
|
+
var E = (1 << T) - 1;
|
|
6177
6177
|
E < 32 ? I ^= 1 << E : $ ^= 1 << E - 32;
|
|
6178
6178
|
}
|
|
6179
6179
|
C & 128 ? C = C << 1 ^ 113 : C <<= 1;
|
|
@@ -6211,30 +6211,30 @@ function Iu() {
|
|
|
6211
6211
|
$.high ^= b, $.low ^= C;
|
|
6212
6212
|
}
|
|
6213
6213
|
for (var I = 0; I < 24; I++) {
|
|
6214
|
-
for (var
|
|
6214
|
+
for (var T = 0; T < 5; T++) {
|
|
6215
6215
|
for (var E = 0, k = 0, z = 0; z < 5; z++) {
|
|
6216
|
-
var $ = d[
|
|
6216
|
+
var $ = d[T + 5 * z];
|
|
6217
6217
|
E ^= $.high, k ^= $.low;
|
|
6218
6218
|
}
|
|
6219
|
-
var V = g[
|
|
6219
|
+
var V = g[T];
|
|
6220
6220
|
V.high = E, V.low = k;
|
|
6221
6221
|
}
|
|
6222
|
-
for (var
|
|
6223
|
-
for (var W = g[(
|
|
6224
|
-
var $ = d[
|
|
6222
|
+
for (var T = 0; T < 5; T++)
|
|
6223
|
+
for (var W = g[(T + 4) % 5], X = g[(T + 1) % 5], Q = X.high, ne = X.low, E = W.high ^ (Q << 1 | ne >>> 31), k = W.low ^ (ne << 1 | Q >>> 31), z = 0; z < 5; z++) {
|
|
6224
|
+
var $ = d[T + 5 * z];
|
|
6225
6225
|
$.high ^= E, $.low ^= k;
|
|
6226
6226
|
}
|
|
6227
6227
|
for (var le = 1; le < 25; le++) {
|
|
6228
|
-
var E, k, $ = d[le], A = $.high,
|
|
6229
|
-
D < 32 ? (E = A << D |
|
|
6228
|
+
var E, k, $ = d[le], A = $.high, P = $.low, D = s[le];
|
|
6229
|
+
D < 32 ? (E = A << D | P >>> 32 - D, k = P << D | A >>> 32 - D) : (E = P << D - 32 | A >>> 64 - D, k = A << D - 32 | P >>> 64 - D);
|
|
6230
6230
|
var S = g[i[le]];
|
|
6231
6231
|
S.high = E, S.low = k;
|
|
6232
6232
|
}
|
|
6233
|
-
var
|
|
6234
|
-
|
|
6235
|
-
for (var
|
|
6233
|
+
var N = g[0], R = d[0];
|
|
6234
|
+
N.high = R.high, N.low = R.low;
|
|
6235
|
+
for (var T = 0; T < 5; T++)
|
|
6236
6236
|
for (var z = 0; z < 5; z++) {
|
|
6237
|
-
var le =
|
|
6237
|
+
var le = T + 5 * z, $ = d[le], Y = g[le], G = g[(T + 1) % 5 + 5 * z], ae = g[(T + 2) % 5 + 5 * z];
|
|
6238
6238
|
$.high = Y.high ^ ~G.high & ae.high, $.low = Y.low ^ ~G.low & ae.low;
|
|
6239
6239
|
}
|
|
6240
6240
|
var $ = d[0], U = x[I];
|
|
@@ -6247,7 +6247,7 @@ function Iu() {
|
|
|
6247
6247
|
var d = B.sigBytes * 8, c = this.blockSize * 32;
|
|
6248
6248
|
_[d >>> 5] |= 1 << 24 - d % 32, _[(r.ceil((d + 1) / c) * c >>> 5) - 1] |= 128, B.sigBytes = _.length * 4, this._process();
|
|
6249
6249
|
for (var p = this._state, C = this.cfg.outputLength / 8, b = C / 8, $ = [], I = 0; I < b; I++) {
|
|
6250
|
-
var
|
|
6250
|
+
var T = p[I], E = T.high, k = T.low;
|
|
6251
6251
|
E = (E << 8 | E >>> 24) & 16711935 | (E << 24 | E >>> 8) & 4278255360, k = (k << 8 | k >>> 24) & 16711935 | (k << 24 | k >>> 8) & 4278255360, $.push(k), $.push(E);
|
|
6252
6252
|
}
|
|
6253
6253
|
return new m.init($, C);
|
|
@@ -6610,18 +6610,18 @@ function zu() {
|
|
|
6610
6610
|
},
|
|
6611
6611
|
_doProcessBlock: function(b, $) {
|
|
6612
6612
|
for (var I = 0; I < 16; I++) {
|
|
6613
|
-
var
|
|
6614
|
-
b[
|
|
6613
|
+
var T = $ + I, E = b[T];
|
|
6614
|
+
b[T] = (E << 8 | E >>> 24) & 16711935 | (E << 24 | E >>> 8) & 4278255360;
|
|
6615
6615
|
}
|
|
6616
|
-
var k = this._hash.words, z = x.words, V = g.words, W = a.words, X = n.words, Q = s.words, ne = i.words, le, A,
|
|
6617
|
-
|
|
6616
|
+
var k = this._hash.words, z = x.words, V = g.words, W = a.words, X = n.words, Q = s.words, ne = i.words, le, A, P, D, S, N, R, Y, G, ae;
|
|
6617
|
+
N = le = k[0], R = A = k[1], Y = P = k[2], G = D = k[3], ae = S = k[4];
|
|
6618
6618
|
for (var U, I = 0; I < 80; I += 1)
|
|
6619
|
-
U = le + b[$ + W[I]] | 0, I < 16 ? U += B(A,
|
|
6620
|
-
U = k[1] +
|
|
6619
|
+
U = le + b[$ + W[I]] | 0, I < 16 ? U += B(A, P, D) + z[0] : I < 32 ? U += _(A, P, D) + z[1] : I < 48 ? U += d(A, P, D) + z[2] : I < 64 ? U += c(A, P, D) + z[3] : U += p(A, P, D) + z[4], U = U | 0, U = C(U, Q[I]), U = U + S | 0, le = S, S = D, D = C(P, 10), P = A, A = U, U = N + b[$ + X[I]] | 0, I < 16 ? U += p(R, Y, G) + V[0] : I < 32 ? U += c(R, Y, G) + V[1] : I < 48 ? U += d(R, Y, G) + V[2] : I < 64 ? U += _(R, Y, G) + V[3] : U += B(R, Y, G) + V[4], U = U | 0, U = C(U, ne[I]), U = U + ae | 0, N = ae, ae = G, G = C(Y, 10), Y = R, R = U;
|
|
6620
|
+
U = k[1] + P + G | 0, k[1] = k[2] + D + ae | 0, k[2] = k[3] + S + N | 0, k[3] = k[4] + le + R | 0, k[4] = k[0] + A + Y | 0, k[0] = U;
|
|
6621
6621
|
},
|
|
6622
6622
|
_doFinalize: function() {
|
|
6623
|
-
var b = this._data, $ = b.words, I = this._nDataBytes * 8,
|
|
6624
|
-
$[
|
|
6623
|
+
var b = this._data, $ = b.words, I = this._nDataBytes * 8, T = b.sigBytes * 8;
|
|
6624
|
+
$[T >>> 5] |= 128 << 24 - T % 32, $[(T + 64 >>> 9 << 4) + 14] = (I << 8 | I >>> 24) & 16711935 | (I << 24 | I >>> 8) & 4278255360, b.sigBytes = ($.length + 1) * 4, this._process();
|
|
6625
6625
|
for (var E = this._hash, k = E.words, z = 0; z < 5; z++) {
|
|
6626
6626
|
var V = k[z];
|
|
6627
6627
|
k[z] = (V << 8 | V >>> 24) & 16711935 | (V << 24 | V >>> 8) & 4278255360;
|
|
@@ -6784,7 +6784,7 @@ function Pu() {
|
|
|
6784
6784
|
for (var x = this.cfg, g = a.create(x.hasher, s), y = m.create(), B = m.create([1]), _ = y.words, d = B.words, c = x.keySize, p = x.iterations; _.length < c; ) {
|
|
6785
6785
|
var C = g.update(i).finalize(B);
|
|
6786
6786
|
g.reset();
|
|
6787
|
-
for (var b = C.words, $ = b.length, I = C,
|
|
6787
|
+
for (var b = C.words, $ = b.length, I = C, T = 1; T < p; T++) {
|
|
6788
6788
|
I = g.finalize(I), g.reset();
|
|
6789
6789
|
for (var E = I.words, k = 0; k < $; k++)
|
|
6790
6790
|
b[k] ^= E[k];
|
|
@@ -6991,7 +6991,7 @@ function ge() {
|
|
|
6991
6991
|
*/
|
|
6992
6992
|
_createHelper: /* @__PURE__ */ function() {
|
|
6993
6993
|
function E(k) {
|
|
6994
|
-
return typeof k == "string" ?
|
|
6994
|
+
return typeof k == "string" ? T : b;
|
|
6995
6995
|
}
|
|
6996
6996
|
return function(k) {
|
|
6997
6997
|
return {
|
|
@@ -7340,7 +7340,7 @@ function ge() {
|
|
|
7340
7340
|
var Q = f.create(X.words.slice(k), z * 4);
|
|
7341
7341
|
return X.sigBytes = k * 4, c.create({ key: X, iv: Q, salt: V });
|
|
7342
7342
|
}
|
|
7343
|
-
},
|
|
7343
|
+
}, T = l.PasswordBasedCipher = b.extend({
|
|
7344
7344
|
/**
|
|
7345
7345
|
* Configuration options.
|
|
7346
7346
|
*
|
|
@@ -7687,9 +7687,9 @@ function Gu() {
|
|
|
7687
7687
|
for (var C = 0, b = 0, p = 0; p < 256; p++) {
|
|
7688
7688
|
var $ = b ^ b << 1 ^ b << 2 ^ b << 3 ^ b << 4;
|
|
7689
7689
|
$ = $ >>> 8 ^ $ & 255 ^ 99, f[C] = $, u[$] = C;
|
|
7690
|
-
var I = c[C],
|
|
7690
|
+
var I = c[C], T = c[I], E = c[T], k = c[$] * 257 ^ $ * 16843008;
|
|
7691
7691
|
a[C] = k << 24 | k >>> 8, n[C] = k << 16 | k >>> 16, s[C] = k << 8 | k >>> 24, i[C] = k;
|
|
7692
|
-
var k = E * 16843009 ^
|
|
7692
|
+
var k = E * 16843009 ^ T * 65537 ^ I * 257 ^ C * 16843008;
|
|
7693
7693
|
x[$] = k << 24 | k >>> 8, g[$] = k << 16 | k >>> 16, y[$] = k << 8 | k >>> 24, B[$] = k, C ? (C = I ^ c[c[c[E ^ I]]], b ^= c[c[b]]) : C = b = 1;
|
|
7694
7694
|
}
|
|
7695
7695
|
})();
|
|
@@ -7697,14 +7697,14 @@ function Gu() {
|
|
|
7697
7697
|
_doReset: function() {
|
|
7698
7698
|
var c;
|
|
7699
7699
|
if (!(this._nRounds && this._keyPriorReset === this._key)) {
|
|
7700
|
-
for (var p = this._keyPriorReset = this._key, C = p.words, b = p.sigBytes / 4, $ = this._nRounds = b + 6, I = ($ + 1) * 4,
|
|
7701
|
-
E < b ?
|
|
7700
|
+
for (var p = this._keyPriorReset = this._key, C = p.words, b = p.sigBytes / 4, $ = this._nRounds = b + 6, I = ($ + 1) * 4, T = this._keySchedule = [], E = 0; E < I; E++)
|
|
7701
|
+
E < b ? T[E] = C[E] : (c = T[E - 1], E % b ? b > 6 && E % b == 4 && (c = f[c >>> 24] << 24 | f[c >>> 16 & 255] << 16 | f[c >>> 8 & 255] << 8 | f[c & 255]) : (c = c << 8 | c >>> 24, c = f[c >>> 24] << 24 | f[c >>> 16 & 255] << 16 | f[c >>> 8 & 255] << 8 | f[c & 255], c ^= _[E / b | 0] << 24), T[E] = T[E - b] ^ c);
|
|
7702
7702
|
for (var k = this._invKeySchedule = [], z = 0; z < I; z++) {
|
|
7703
7703
|
var E = I - z;
|
|
7704
7704
|
if (z % 4)
|
|
7705
|
-
var c =
|
|
7705
|
+
var c = T[E];
|
|
7706
7706
|
else
|
|
7707
|
-
var c =
|
|
7707
|
+
var c = T[E - 4];
|
|
7708
7708
|
z < 4 || E <= 4 ? k[z] = c : k[z] = x[f[c >>> 24]] ^ g[f[c >>> 16 & 255]] ^ y[f[c >>> 8 & 255]] ^ B[f[c & 255]];
|
|
7709
7709
|
}
|
|
7710
7710
|
}
|
|
@@ -7718,13 +7718,13 @@ function Gu() {
|
|
|
7718
7718
|
var C = c[p + 1];
|
|
7719
7719
|
c[p + 1] = c[p + 3], c[p + 3] = C;
|
|
7720
7720
|
},
|
|
7721
|
-
_doCryptBlock: function(c, p, C, b, $, I,
|
|
7721
|
+
_doCryptBlock: function(c, p, C, b, $, I, T, E) {
|
|
7722
7722
|
for (var k = this._nRounds, z = c[p] ^ C[0], V = c[p + 1] ^ C[1], W = c[p + 2] ^ C[2], X = c[p + 3] ^ C[3], Q = 4, ne = 1; ne < k; ne++) {
|
|
7723
|
-
var le = b[z >>> 24] ^ $[V >>> 16 & 255] ^ I[W >>> 8 & 255] ^
|
|
7724
|
-
z = le, V = A, W =
|
|
7723
|
+
var le = b[z >>> 24] ^ $[V >>> 16 & 255] ^ I[W >>> 8 & 255] ^ T[X & 255] ^ C[Q++], A = b[V >>> 24] ^ $[W >>> 16 & 255] ^ I[X >>> 8 & 255] ^ T[z & 255] ^ C[Q++], P = b[W >>> 24] ^ $[X >>> 16 & 255] ^ I[z >>> 8 & 255] ^ T[V & 255] ^ C[Q++], D = b[X >>> 24] ^ $[z >>> 16 & 255] ^ I[V >>> 8 & 255] ^ T[W & 255] ^ C[Q++];
|
|
7724
|
+
z = le, V = A, W = P, X = D;
|
|
7725
7725
|
}
|
|
7726
|
-
var le = (E[z >>> 24] << 24 | E[V >>> 16 & 255] << 16 | E[W >>> 8 & 255] << 8 | E[X & 255]) ^ C[Q++], A = (E[V >>> 24] << 24 | E[W >>> 16 & 255] << 16 | E[X >>> 8 & 255] << 8 | E[z & 255]) ^ C[Q++],
|
|
7727
|
-
c[p] = le, c[p + 1] = A, c[p + 2] =
|
|
7726
|
+
var le = (E[z >>> 24] << 24 | E[V >>> 16 & 255] << 16 | E[W >>> 8 & 255] << 8 | E[X & 255]) ^ C[Q++], A = (E[V >>> 24] << 24 | E[W >>> 16 & 255] << 16 | E[X >>> 8 & 255] << 8 | E[z & 255]) ^ C[Q++], P = (E[W >>> 24] << 24 | E[X >>> 16 & 255] << 16 | E[z >>> 8 & 255] << 8 | E[V & 255]) ^ C[Q++], D = (E[X >>> 24] << 24 | E[z >>> 16 & 255] << 16 | E[V >>> 8 & 255] << 8 | E[W & 255]) ^ C[Q++];
|
|
7727
|
+
c[p] = le, c[p + 1] = A, c[p + 2] = P, c[p + 3] = D;
|
|
7728
7728
|
},
|
|
7729
7729
|
keySize: 256 / 32
|
|
7730
7730
|
});
|
|
@@ -8391,8 +8391,8 @@ function ju() {
|
|
|
8391
8391
|
c[p] = d[C >>> 5] >>> 31 - C % 32 & 1;
|
|
8392
8392
|
}
|
|
8393
8393
|
for (var b = this._subKeys = [], $ = 0; $ < 16; $++) {
|
|
8394
|
-
for (var I = b[$] = [],
|
|
8395
|
-
I[p / 6 | 0] |= c[(a[p] - 1 +
|
|
8394
|
+
for (var I = b[$] = [], T = n[$], p = 0; p < 24; p++)
|
|
8395
|
+
I[p / 6 | 0] |= c[(a[p] - 1 + T) % 28] << 31 - p % 6, I[4 + (p / 6 | 0)] |= c[28 + (a[p + 24] - 1 + T) % 28] << 31 - p % 6;
|
|
8396
8396
|
I[0] = I[0] << 1 | I[0] >>> 31;
|
|
8397
8397
|
for (var p = 1; p < 7; p++)
|
|
8398
8398
|
I[p] = I[p] >>> (p - 1) * 4 + 3;
|
|
@@ -8410,8 +8410,8 @@ function ju() {
|
|
|
8410
8410
|
_doCryptBlock: function(_, d, c) {
|
|
8411
8411
|
this._lBlock = _[d], this._rBlock = _[d + 1], g.call(this, 4, 252645135), g.call(this, 16, 65535), y.call(this, 2, 858993459), y.call(this, 8, 16711935), g.call(this, 1, 1431655765);
|
|
8412
8412
|
for (var p = 0; p < 16; p++) {
|
|
8413
|
-
for (var C = c[p], b = this._lBlock, $ = this._rBlock, I = 0,
|
|
8414
|
-
I |= s[
|
|
8413
|
+
for (var C = c[p], b = this._lBlock, $ = this._rBlock, I = 0, T = 0; T < 8; T++)
|
|
8414
|
+
I |= s[T][(($ ^ C[T]) & i[T]) >>> 0];
|
|
8415
8415
|
this._lBlock = $, this._rBlock = b ^ I;
|
|
8416
8416
|
}
|
|
8417
8417
|
var E = this._lBlock;
|
|
@@ -10564,8 +10564,8 @@ const V1 = { class: "property-panel" }, H1 = {
|
|
|
10564
10564
|
}
|
|
10565
10565
|
r("update:config", n);
|
|
10566
10566
|
}, a = (n) => {
|
|
10567
|
-
var
|
|
10568
|
-
if (!((
|
|
10567
|
+
var T, E;
|
|
10568
|
+
if (!((T = o.selectedCell) != null && T.cell)) return;
|
|
10569
10569
|
const s = o.selectedCell.cell, i = (E = s.model) == null ? void 0 : E.graph;
|
|
10570
10570
|
if (!i) return;
|
|
10571
10571
|
const x = [];
|
|
@@ -11039,10 +11039,10 @@ const K0 = new rp(), lp = { class: "workflow-editor" }, ip = { class: "editor-ma
|
|
|
11039
11039
|
p.preventDefault();
|
|
11040
11040
|
const $ = l.value.cell;
|
|
11041
11041
|
console.log("删除选中的节点:", l.value.label);
|
|
11042
|
-
const I = t.getIncomingEdges($),
|
|
11043
|
-
I && I.length > 0 &&
|
|
11042
|
+
const I = t.getIncomingEdges($), T = t.getOutgoingEdges($);
|
|
11043
|
+
I && I.length > 0 && T && T.length > 0 && I.forEach((E) => {
|
|
11044
11044
|
const k = E.getSourceCell(), z = E.getSourcePortId();
|
|
11045
|
-
|
|
11045
|
+
T.forEach((V) => {
|
|
11046
11046
|
const W = V.getTargetCell(), X = V.getTargetPortId();
|
|
11047
11047
|
k && W && t && (t.addEdge({
|
|
11048
11048
|
source: { cell: k, port: z },
|
|
@@ -11159,10 +11159,10 @@ const K0 = new rp(), lp = { class: "workflow-editor" }, ip = { class: "editor-ma
|
|
|
11159
11159
|
if (!t || !u) return;
|
|
11160
11160
|
const p = u.getSourceCell(), C = u.getTargetCell();
|
|
11161
11161
|
if (!p || !C) return;
|
|
11162
|
-
const b = p.position(), $ = C.position(), I = (b.x + $.x) / 2,
|
|
11162
|
+
const b = p.position(), $ = C.position(), I = (b.x + $.x) / 2, T = (b.y + $.y) / 2, E = t.addNode({
|
|
11163
11163
|
shape: c.type,
|
|
11164
11164
|
x: I,
|
|
11165
|
-
y:
|
|
11165
|
+
y: T,
|
|
11166
11166
|
label: c.name,
|
|
11167
11167
|
data: {
|
|
11168
11168
|
nodeType: c.type
|
|
@@ -11225,34 +11225,34 @@ const K0 = new rp(), lp = { class: "workflow-editor" }, ip = { class: "editor-ma
|
|
|
11225
11225
|
if (!t)
|
|
11226
11226
|
return console.log("画布不存在"), { errors: ["画布不存在"], warnings: [] };
|
|
11227
11227
|
const c = [], p = [], C = t.getNodes(), b = C.filter((I) => {
|
|
11228
|
-
var
|
|
11229
|
-
return ((
|
|
11228
|
+
var T;
|
|
11229
|
+
return ((T = I.getData()) == null ? void 0 : T.nodeType) === "start";
|
|
11230
11230
|
});
|
|
11231
11231
|
return b.length === 0 ? c.push("流程中缺少开始节点") : b.length > 1 && p.push("流程中有多个开始节点"), C.filter((I) => {
|
|
11232
|
-
var
|
|
11233
|
-
return ((
|
|
11232
|
+
var T;
|
|
11233
|
+
return ((T = I.getData()) == null ? void 0 : T.nodeType) === "end";
|
|
11234
11234
|
}).length === 0 && p.push("流程中缺少结束节点"), C.forEach((I) => {
|
|
11235
|
-
const
|
|
11235
|
+
const T = I.getData(), E = T == null ? void 0 : T.nodeType, k = (T == null ? void 0 : T.config) || {}, z = I.getAttrByPath("label/text") || "未命名节点";
|
|
11236
11236
|
(E === "getProperty" || E === "setProperty") && (k.elementId || c.push(`节点「${z}」未配置图元`), k.propertyName || c.push(`节点「${z}」未配置属性`), E === "setProperty" && !k.value && p.push(`节点「${z}」未配置属性值`)), E === "httpRequest" && (k.url || c.push(`节点「${z}」未配置请求URL`)), E === "condition" && (!k.branches || k.branches.length === 0) && c.push(`节点「${z}」未配置条件分支`), E === "timer" && (!k.interval || k.interval <= 0) && c.push(`节点「${z}」未配置有效的时间间隔`), E === "clearTimer" && (k.timerId || c.push(`节点「${z}」未选择定时器`)), E === "customCode" && (k.code || p.push(`节点「${z}」未编写代码`));
|
|
11237
11237
|
}), C.forEach((I) => {
|
|
11238
11238
|
var k;
|
|
11239
|
-
const
|
|
11240
|
-
if (
|
|
11239
|
+
const T = (k = I.getData()) == null ? void 0 : k.nodeType, E = I.getAttrByPath("label/text") || "未命名节点";
|
|
11240
|
+
if (T === "start" && t) {
|
|
11241
11241
|
const z = t.getOutgoingEdges(I);
|
|
11242
11242
|
(!z || z.length === 0) && c.push(`开始节点「${E}」没有连接到下一个节点`);
|
|
11243
11243
|
}
|
|
11244
|
-
if (
|
|
11244
|
+
if (T === "end" && t) {
|
|
11245
11245
|
const z = t.getOutgoingEdges(I);
|
|
11246
11246
|
z && z.length > 0 && p.push(`结束节点「${E}」不应该有输出连线`);
|
|
11247
11247
|
}
|
|
11248
|
-
if (
|
|
11248
|
+
if (T !== "start" && T !== "end" && t) {
|
|
11249
11249
|
const z = t.getIncomingEdges(I), V = t.getOutgoingEdges(I);
|
|
11250
|
-
(!z || z.length === 0) && p.push(`节点「${E}」没有输入连线`),
|
|
11250
|
+
(!z || z.length === 0) && p.push(`节点「${E}」没有输入连线`), T !== "clearTimer" && (!V || V.length === 0) && p.push(`节点「${E}」没有输出连线`);
|
|
11251
11251
|
}
|
|
11252
11252
|
}), t && C.forEach((I) => {
|
|
11253
11253
|
var V;
|
|
11254
|
-
const
|
|
11255
|
-
k !== "start" && (!
|
|
11254
|
+
const T = t.getIncomingEdges(I), E = t.getOutgoingEdges(I), k = (V = I.getData()) == null ? void 0 : V.nodeType, z = I.getAttrByPath("label/text") || "未命名节点";
|
|
11255
|
+
k !== "start" && (!T || T.length === 0) && (!E || E.length === 0) && p.push(`节点「${z}」是孤立节点`);
|
|
11256
11256
|
}), { errors: c, warnings: p };
|
|
11257
11257
|
}, B = () => {
|
|
11258
11258
|
const { errors: c, warnings: p } = y();
|
|
@@ -11608,11 +11608,11 @@ const Ge = new gp(), hp = {
|
|
|
11608
11608
|
}
|
|
11609
11609
|
}
|
|
11610
11610
|
}, !0);
|
|
11611
|
-
const
|
|
11611
|
+
const P = r.value.containerRef, D = A.size.width, S = A.size.height;
|
|
11612
11612
|
((U) => {
|
|
11613
|
-
|
|
11613
|
+
P.style.width = `${D}px`, P.style.height = `${S}px`, P.style.transform = `scale(${U})`, P.style.transformOrigin = "center center";
|
|
11614
11614
|
})(A.zoom.scale), a = new it({
|
|
11615
|
-
container:
|
|
11615
|
+
container: P,
|
|
11616
11616
|
// 使用配置中的画布尺寸
|
|
11617
11617
|
width: D,
|
|
11618
11618
|
height: S,
|
|
@@ -11797,8 +11797,8 @@ const Ge = new gp(), hp = {
|
|
|
11797
11797
|
repeat: A.background.repeat || "no-repeat",
|
|
11798
11798
|
position: "center"
|
|
11799
11799
|
}) : a.drawBackground({ color: A.background.color || "#1e293b" });
|
|
11800
|
-
const
|
|
11801
|
-
|
|
11800
|
+
const P = (D = r.value) == null ? void 0 : D.containerRef;
|
|
11801
|
+
P && (P.style.transform = `scale(${A.zoom.scale})`, P.style.transformOrigin = "center center", a.resize(A.size.width, A.size.height), P.style.width = `${A.size.width}px`, P.style.height = `${A.size.height}px`), A.grid.enabled ? (a.drawGrid({
|
|
11802
11802
|
type: A.grid.type || "dot",
|
|
11803
11803
|
args: {
|
|
11804
11804
|
color: A.grid.color || "#475569",
|
|
@@ -11809,53 +11809,53 @@ const Ge = new gp(), hp = {
|
|
|
11809
11809
|
},
|
|
11810
11810
|
{ deep: !0 }
|
|
11811
11811
|
);
|
|
11812
|
-
const n = j({}), s = (A,
|
|
11812
|
+
const n = j({}), s = (A, P) => (n.value[A] || (n.value[A] = 0), n.value[A]++, `${P}_${n.value[A]}`), i = (A) => {
|
|
11813
11813
|
var G, ae, U, J;
|
|
11814
11814
|
if (!a) return;
|
|
11815
|
-
const
|
|
11816
|
-
if (!
|
|
11815
|
+
const P = pt.getComponent(A);
|
|
11816
|
+
if (!P) {
|
|
11817
11817
|
console.error(`未找到组件配置: ${A}`);
|
|
11818
11818
|
return;
|
|
11819
11819
|
}
|
|
11820
|
-
const D = s(A,
|
|
11820
|
+
const D = s(A, P.metadata.name), S = {
|
|
11821
11821
|
enabled: !1,
|
|
11822
11822
|
// 默认禁用动画,用户需要手动启用
|
|
11823
11823
|
type: "none",
|
|
11824
11824
|
duration: 1e3,
|
|
11825
11825
|
loop: !0
|
|
11826
|
-
},
|
|
11827
|
-
x:
|
|
11828
|
-
y:
|
|
11829
|
-
shape:
|
|
11830
|
-
width:
|
|
11831
|
-
height:
|
|
11832
|
-
label:
|
|
11833
|
-
attrs:
|
|
11834
|
-
ports:
|
|
11826
|
+
}, N = ru(50, 50, 400, 300), R = {
|
|
11827
|
+
x: N.x,
|
|
11828
|
+
y: N.y,
|
|
11829
|
+
shape: P.shape,
|
|
11830
|
+
width: P.width,
|
|
11831
|
+
height: P.height,
|
|
11832
|
+
label: P.label,
|
|
11833
|
+
attrs: P.attrs,
|
|
11834
|
+
ports: P.ports,
|
|
11835
11835
|
// 添加接线桩配置
|
|
11836
11836
|
data: {
|
|
11837
|
-
...
|
|
11837
|
+
...P.data,
|
|
11838
11838
|
componentType: A,
|
|
11839
11839
|
componentName: D,
|
|
11840
11840
|
// 添加默认名称
|
|
11841
|
-
props:
|
|
11841
|
+
props: P.props,
|
|
11842
11842
|
animation: S,
|
|
11843
11843
|
// 添加默认动画配置
|
|
11844
11844
|
// 保存原始样式用于恢复选中效果
|
|
11845
|
-
originalStroke: ((ae = (G =
|
|
11846
|
-
originalStrokeWidth: ((J = (U =
|
|
11845
|
+
originalStroke: ((ae = (G = P.attrs) == null ? void 0 : G.body) == null ? void 0 : ae.stroke) || "#2563eb",
|
|
11846
|
+
originalStrokeWidth: ((J = (U = P.attrs) == null ? void 0 : U.body) == null ? void 0 : J.strokeWidth) || 2
|
|
11847
11847
|
}
|
|
11848
11848
|
}, Y = a.addNode(R);
|
|
11849
11849
|
a.cleanSelection(), a.select(Y);
|
|
11850
11850
|
}, x = (A) => {
|
|
11851
|
-
if (t.value && (A.attrs && Object.keys(A.attrs).forEach((
|
|
11852
|
-
const D = A.attrs[
|
|
11851
|
+
if (t.value && (A.attrs && Object.keys(A.attrs).forEach((P) => {
|
|
11852
|
+
const D = A.attrs[P];
|
|
11853
11853
|
typeof D == "object" ? Object.keys(D).forEach((S) => {
|
|
11854
|
-
t.value.attr(`${
|
|
11855
|
-
}) : t.value.attr(
|
|
11854
|
+
t.value.attr(`${P}/${S}`, D[S]);
|
|
11855
|
+
}) : t.value.attr(P, D);
|
|
11856
11856
|
}), A.position && (typeof A.position.x == "number" && typeof A.position.y == "number" ? t.value.setPosition(A.position) : console.error("position 数据格式错误:", A.position)), A.size && (typeof A.size.width == "number" && typeof A.size.height == "number" ? t.value.setSize(A.size) : console.error("size 数据格式错误:", A.size)), A.data)) {
|
|
11857
|
-
const
|
|
11858
|
-
delete
|
|
11857
|
+
const P = { ...A.data };
|
|
11858
|
+
delete P.position, delete P.size, t.value.store.set("data", P);
|
|
11859
11859
|
}
|
|
11860
11860
|
}, g = () => {
|
|
11861
11861
|
if (!t.value || !a) return;
|
|
@@ -11866,28 +11866,28 @@ const Ge = new gp(), hp = {
|
|
|
11866
11866
|
if (A.attrs) {
|
|
11867
11867
|
Object.keys(A.attrs).forEach((D) => {
|
|
11868
11868
|
const S = A.attrs[D];
|
|
11869
|
-
typeof S == "object" ? Object.keys(S).forEach((
|
|
11869
|
+
typeof S == "object" ? Object.keys(S).forEach((N) => {
|
|
11870
11870
|
var R, Y;
|
|
11871
|
-
l.value.attr(`${D}/${
|
|
11871
|
+
l.value.attr(`${D}/${N}`, S[N]), (Y = (R = l.value.data) == null ? void 0 : R.originalAttrs) != null && Y[D] && (l.value.data.originalAttrs[D][N] = S[N]);
|
|
11872
11872
|
}) : l.value.attr(D, S);
|
|
11873
11873
|
});
|
|
11874
|
-
const
|
|
11875
|
-
l.value.data = { ...l.value.data, originalAttrs:
|
|
11874
|
+
const P = l.value.getAttrs();
|
|
11875
|
+
l.value.data = { ...l.value.data, originalAttrs: P }, l.value.attr("line/stroke", "#3b82f6");
|
|
11876
11876
|
}
|
|
11877
11877
|
A.router && l.value.setRouter(A.router), A.connector && l.value.setConnector(A.connector), A.animation && _(l.value, A.animation), A.data && l.value.setData({ ...l.value.data, ...A.data });
|
|
11878
11878
|
}
|
|
11879
11879
|
}, B = () => {
|
|
11880
11880
|
!l.value || !a || (a.removeEdge(l.value.id), l.value = null);
|
|
11881
|
-
}, _ = (A,
|
|
11881
|
+
}, _ = (A, P) => {
|
|
11882
11882
|
if (!A || typeof A.attr != "function") {
|
|
11883
11883
|
console.warn("applyEdgeAnimation: edge 对象无效", A);
|
|
11884
11884
|
return;
|
|
11885
11885
|
}
|
|
11886
|
-
if (!
|
|
11886
|
+
if (!P || !P.enabled) {
|
|
11887
11887
|
A.attr("line/strokeDasharray", void 0), typeof A.removeAttr == "function" && A.removeAttr("line/class"), A.attr("circle", void 0), typeof A.stopTransition == "function" && A.stopTransition("attrs/circle/atConnectionRatio");
|
|
11888
11888
|
return;
|
|
11889
11889
|
}
|
|
11890
|
-
const D =
|
|
11890
|
+
const D = P.duration || 2e3;
|
|
11891
11891
|
A.attr("circle", {
|
|
11892
11892
|
r: 4,
|
|
11893
11893
|
atConnectionRatio: 0,
|
|
@@ -11916,12 +11916,12 @@ const Ge = new gp(), hp = {
|
|
|
11916
11916
|
a && confirm("确定要清空画布吗?") && (Ge.clearAll(), a.clearCells(), t.value = null, nu(at.SCADA_EDITOR_DATA));
|
|
11917
11917
|
}, c = () => {
|
|
11918
11918
|
if (!a) return;
|
|
11919
|
-
const A = se.getConfig().zoom.scale,
|
|
11920
|
-
se.setZoom(
|
|
11919
|
+
const A = se.getConfig().zoom.scale, P = Math.min(5, A + 0.1);
|
|
11920
|
+
se.setZoom(P);
|
|
11921
11921
|
}, p = () => {
|
|
11922
11922
|
if (!a) return;
|
|
11923
|
-
const A = se.getConfig().zoom.scale,
|
|
11924
|
-
se.setZoom(
|
|
11923
|
+
const A = se.getConfig().zoom.scale, P = Math.max(0.1, A - 0.1);
|
|
11924
|
+
se.setZoom(P);
|
|
11925
11925
|
}, C = () => {
|
|
11926
11926
|
if (!a) return;
|
|
11927
11927
|
const A = a.getSelectedCells().filter((D) => D.isNode());
|
|
@@ -11929,9 +11929,9 @@ const Ge = new gp(), hp = {
|
|
|
11929
11929
|
fe("请选择至少两个节点", "warning");
|
|
11930
11930
|
return;
|
|
11931
11931
|
}
|
|
11932
|
-
const
|
|
11932
|
+
const P = Math.min(...A.map((D) => D.getPosition().x));
|
|
11933
11933
|
A.forEach((D) => {
|
|
11934
|
-
D.setPosition({ x:
|
|
11934
|
+
D.setPosition({ x: P, y: D.getPosition().y });
|
|
11935
11935
|
});
|
|
11936
11936
|
}, b = () => {
|
|
11937
11937
|
if (!a) return;
|
|
@@ -11940,10 +11940,10 @@ const Ge = new gp(), hp = {
|
|
|
11940
11940
|
fe("请选择至少两个节点", "warning");
|
|
11941
11941
|
return;
|
|
11942
11942
|
}
|
|
11943
|
-
const
|
|
11943
|
+
const P = A.map((S) => S.getPosition().x + S.getSize().width / 2), D = P.reduce((S, N) => S + N, 0) / P.length;
|
|
11944
11944
|
A.forEach((S) => {
|
|
11945
|
-
const
|
|
11946
|
-
S.setPosition({ x:
|
|
11945
|
+
const N = D - S.getSize().width / 2;
|
|
11946
|
+
S.setPosition({ x: N, y: S.getPosition().y });
|
|
11947
11947
|
});
|
|
11948
11948
|
}, $ = () => {
|
|
11949
11949
|
if (!a) return;
|
|
@@ -11952,9 +11952,9 @@ const Ge = new gp(), hp = {
|
|
|
11952
11952
|
fe("请选择至少两个节点", "warning");
|
|
11953
11953
|
return;
|
|
11954
11954
|
}
|
|
11955
|
-
const
|
|
11955
|
+
const P = Math.max(...A.map((D) => D.getPosition().x + D.getSize().width));
|
|
11956
11956
|
A.forEach((D) => {
|
|
11957
|
-
const S =
|
|
11957
|
+
const S = P - D.getSize().width;
|
|
11958
11958
|
D.setPosition({ x: S, y: D.getPosition().y });
|
|
11959
11959
|
});
|
|
11960
11960
|
}, I = () => {
|
|
@@ -11964,21 +11964,21 @@ const Ge = new gp(), hp = {
|
|
|
11964
11964
|
fe("请选择至少两个节点", "warning");
|
|
11965
11965
|
return;
|
|
11966
11966
|
}
|
|
11967
|
-
const
|
|
11967
|
+
const P = Math.min(...A.map((D) => D.getPosition().y));
|
|
11968
11968
|
A.forEach((D) => {
|
|
11969
|
-
D.setPosition({ x: D.getPosition().x, y:
|
|
11969
|
+
D.setPosition({ x: D.getPosition().x, y: P });
|
|
11970
11970
|
});
|
|
11971
|
-
},
|
|
11971
|
+
}, T = () => {
|
|
11972
11972
|
if (!a) return;
|
|
11973
11973
|
const A = a.getSelectedCells().filter((S) => S.isNode());
|
|
11974
11974
|
if (A.length < 2) {
|
|
11975
11975
|
fe("请选择至少两个节点", "warning");
|
|
11976
11976
|
return;
|
|
11977
11977
|
}
|
|
11978
|
-
const
|
|
11978
|
+
const P = A.map((S) => S.getPosition().y + S.getSize().height / 2), D = P.reduce((S, N) => S + N, 0) / P.length;
|
|
11979
11979
|
A.forEach((S) => {
|
|
11980
|
-
const
|
|
11981
|
-
S.setPosition({ x: S.getPosition().x, y:
|
|
11980
|
+
const N = D - S.getSize().height / 2;
|
|
11981
|
+
S.setPosition({ x: S.getPosition().x, y: N });
|
|
11982
11982
|
});
|
|
11983
11983
|
}, E = () => {
|
|
11984
11984
|
if (!a) return;
|
|
@@ -11987,9 +11987,9 @@ const Ge = new gp(), hp = {
|
|
|
11987
11987
|
fe("请选择至少两个节点", "warning");
|
|
11988
11988
|
return;
|
|
11989
11989
|
}
|
|
11990
|
-
const
|
|
11990
|
+
const P = Math.max(...A.map((D) => D.getPosition().y + D.getSize().height));
|
|
11991
11991
|
A.forEach((D) => {
|
|
11992
|
-
const S =
|
|
11992
|
+
const S = P - D.getSize().height;
|
|
11993
11993
|
D.setPosition({ x: D.getPosition().x, y: S });
|
|
11994
11994
|
});
|
|
11995
11995
|
}, k = () => {
|
|
@@ -11999,9 +11999,9 @@ const Ge = new gp(), hp = {
|
|
|
11999
11999
|
fe("请选择至少三个节点", "warning");
|
|
12000
12000
|
return;
|
|
12001
12001
|
}
|
|
12002
|
-
const
|
|
12003
|
-
|
|
12004
|
-
if (G === 0 || G ===
|
|
12002
|
+
const P = A.sort((Y, G) => Y.getPosition().x - G.getPosition().x), D = P[0], R = (P[P.length - 1].getPosition().x - D.getPosition().x) / (P.length - 1);
|
|
12003
|
+
P.forEach((Y, G) => {
|
|
12004
|
+
if (G === 0 || G === P.length - 1) return;
|
|
12005
12005
|
const ae = D.getPosition().x + R * G;
|
|
12006
12006
|
Y.setPosition({ x: ae, y: Y.getPosition().y });
|
|
12007
12007
|
});
|
|
@@ -12012,9 +12012,9 @@ const Ge = new gp(), hp = {
|
|
|
12012
12012
|
fe("请选择至少三个节点", "warning");
|
|
12013
12013
|
return;
|
|
12014
12014
|
}
|
|
12015
|
-
const
|
|
12016
|
-
|
|
12017
|
-
if (G === 0 || G ===
|
|
12015
|
+
const P = A.sort((Y, G) => Y.getPosition().y - G.getPosition().y), D = P[0], R = (P[P.length - 1].getPosition().y - D.getPosition().y) / (P.length - 1);
|
|
12016
|
+
P.forEach((Y, G) => {
|
|
12017
|
+
if (G === 0 || G === P.length - 1) return;
|
|
12018
12018
|
const ae = D.getPosition().y + R * G;
|
|
12019
12019
|
Y.setPosition({ x: Y.getPosition().x, y: ae });
|
|
12020
12020
|
});
|
|
@@ -12024,10 +12024,11 @@ const Ge = new gp(), hp = {
|
|
|
12024
12024
|
return;
|
|
12025
12025
|
}
|
|
12026
12026
|
try {
|
|
12027
|
-
if (o.onSave) {
|
|
12028
|
-
await o.onSave();
|
|
12027
|
+
if (console.log("[ScadaCanvas] handleSave 被调用"), console.log("[ScadaCanvas] props.onSave:", o.onSave), o.onSave) {
|
|
12028
|
+
console.log("[ScadaCanvas] 调用自定义 onSave 回调"), await o.onSave(), console.log("[ScadaCanvas] 自定义 onSave 回调执行完成");
|
|
12029
12029
|
return;
|
|
12030
12030
|
}
|
|
12031
|
+
console.log("[ScadaCanvas] 没有自定义回调,执行默认下载");
|
|
12031
12032
|
const A = {
|
|
12032
12033
|
version: "1.0.0",
|
|
12033
12034
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -12040,16 +12041,16 @@ const Ge = new gp(), hp = {
|
|
|
12040
12041
|
zoom: se.getConfig().zoom
|
|
12041
12042
|
},
|
|
12042
12043
|
cells: a.toJSON().cells
|
|
12043
|
-
},
|
|
12044
|
-
S.href = D, S.download =
|
|
12044
|
+
}, P = new Blob([JSON.stringify(A, null, 2)], { type: "application/json" }), D = URL.createObjectURL(P), S = document.createElement("a"), N = `scada-canvas-${(/* @__PURE__ */ new Date()).getTime()}.json`;
|
|
12045
|
+
S.href = D, S.download = N, S.click(), URL.revokeObjectURL(D), fe("保存成功", "success");
|
|
12045
12046
|
} catch (A) {
|
|
12046
12047
|
console.error("保存失败", A), fe("保存失败,请查看控制台", "error");
|
|
12047
12048
|
}
|
|
12048
12049
|
}, W = () => {
|
|
12049
12050
|
f.value && f.value.click();
|
|
12050
12051
|
}, X = (A) => {
|
|
12051
|
-
var
|
|
12052
|
-
const D = (
|
|
12052
|
+
var N;
|
|
12053
|
+
const D = (N = A.target.files) == null ? void 0 : N[0];
|
|
12053
12054
|
if (!D) {
|
|
12054
12055
|
fe("请选择文件", "error");
|
|
12055
12056
|
return;
|
|
@@ -12139,20 +12140,20 @@ const Ge = new gp(), hp = {
|
|
|
12139
12140
|
})),
|
|
12140
12141
|
workflows: []
|
|
12141
12142
|
// 收集所有被引用的流程
|
|
12142
|
-
},
|
|
12143
|
+
}, P = /* @__PURE__ */ new Set();
|
|
12143
12144
|
if (a.getNodes().forEach((S) => {
|
|
12144
|
-
const
|
|
12145
|
-
|
|
12145
|
+
const N = S.getData();
|
|
12146
|
+
N != null && N.events && Array.isArray(N.events) && N.events.forEach((R) => {
|
|
12146
12147
|
var Y;
|
|
12147
|
-
R.action === "callProcess" && ((Y = R.params) != null && Y.processId) &&
|
|
12148
|
+
R.action === "callProcess" && ((Y = R.params) != null && Y.processId) && P.add(R.params.processId);
|
|
12148
12149
|
});
|
|
12149
|
-
}),
|
|
12150
|
+
}), P.size > 0)
|
|
12150
12151
|
try {
|
|
12151
12152
|
const S = localStorage.getItem("saved-workflows");
|
|
12152
12153
|
if (S) {
|
|
12153
|
-
const
|
|
12154
|
-
A.workflows =
|
|
12155
|
-
(R) =>
|
|
12154
|
+
const N = JSON.parse(S);
|
|
12155
|
+
A.workflows = N.filter(
|
|
12156
|
+
(R) => P.has(R.id)
|
|
12156
12157
|
);
|
|
12157
12158
|
}
|
|
12158
12159
|
} catch (S) {
|
|
@@ -12194,7 +12195,7 @@ const Ge = new gp(), hp = {
|
|
|
12194
12195
|
/** 顶部对齐选中节点 */
|
|
12195
12196
|
alignTop: I,
|
|
12196
12197
|
/** 垂直居中选中节点 */
|
|
12197
|
-
alignMiddle:
|
|
12198
|
+
alignMiddle: T,
|
|
12198
12199
|
/** 底部对齐选中节点 */
|
|
12199
12200
|
alignBottom: E,
|
|
12200
12201
|
/** 横向分布选中节点 */
|
|
@@ -12213,8 +12214,8 @@ const Ge = new gp(), hp = {
|
|
|
12213
12214
|
/** 选中节点 */
|
|
12214
12215
|
selectNode: (A) => {
|
|
12215
12216
|
if (!a) return !1;
|
|
12216
|
-
const
|
|
12217
|
-
return
|
|
12217
|
+
const P = a.getCellById(A);
|
|
12218
|
+
return P ? (a.select(P), !0) : !1;
|
|
12218
12219
|
},
|
|
12219
12220
|
/** 取消选中 */
|
|
12220
12221
|
clearSelection: () => {
|
|
@@ -12247,9 +12248,13 @@ const Ge = new gp(), hp = {
|
|
|
12247
12248
|
loadCanvasData: (A) => {
|
|
12248
12249
|
if (!a) return !1;
|
|
12249
12250
|
try {
|
|
12250
|
-
return a.clearCells(), a.fromJSON({ cells: A.cells }), A.config && se.updateConfig(A.config),
|
|
12251
|
-
|
|
12252
|
-
|
|
12251
|
+
return a.clearCells(), a.fromJSON({ cells: A.cells }), A.config && se.updateConfig(A.config), a.getEdges().forEach((P) => {
|
|
12252
|
+
var S;
|
|
12253
|
+
const D = P.getData();
|
|
12254
|
+
(S = D == null ? void 0 : D.animation) != null && S.enabled && _(P, D.animation);
|
|
12255
|
+
}), !0;
|
|
12256
|
+
} catch (P) {
|
|
12257
|
+
return console.error("加载画布数据失败:", P), !1;
|
|
12253
12258
|
}
|
|
12254
12259
|
},
|
|
12255
12260
|
/** 获取所有节点 */
|
|
@@ -12264,9 +12269,9 @@ const Ge = new gp(), hp = {
|
|
|
12264
12269
|
/** 根据ID获取节点 */
|
|
12265
12270
|
getNodeById: (A) => {
|
|
12266
12271
|
if (!a) return null;
|
|
12267
|
-
const
|
|
12268
|
-
if (!
|
|
12269
|
-
const D =
|
|
12272
|
+
const P = a.getCellById(A);
|
|
12273
|
+
if (!P || !P.isNode()) return null;
|
|
12274
|
+
const D = P;
|
|
12270
12275
|
return {
|
|
12271
12276
|
id: D.id,
|
|
12272
12277
|
type: D.shape,
|
|
@@ -12288,8 +12293,8 @@ const Ge = new gp(), hp = {
|
|
|
12288
12293
|
se.setZoom(A);
|
|
12289
12294
|
},
|
|
12290
12295
|
/** 设置画布大小 */
|
|
12291
|
-
setCanvasSize: (A,
|
|
12292
|
-
se.updateSize({ width: A, height:
|
|
12296
|
+
setCanvasSize: (A, P) => {
|
|
12297
|
+
se.updateSize({ width: A, height: P });
|
|
12293
12298
|
},
|
|
12294
12299
|
/** 设置背景颜色 */
|
|
12295
12300
|
setBackgroundColor: (A) => {
|
|
@@ -12298,7 +12303,7 @@ const Ge = new gp(), hp = {
|
|
|
12298
12303
|
// === 动画控制 ===
|
|
12299
12304
|
/** 获取动画引擎 */
|
|
12300
12305
|
getAnimationEngine: () => Ge
|
|
12301
|
-
}), (A,
|
|
12306
|
+
}), (A, P) => (F(), w("div", hp, [
|
|
12302
12307
|
ce(Q0, {
|
|
12303
12308
|
"selected-nodes-count": m.value,
|
|
12304
12309
|
onSave: V,
|
|
@@ -12313,7 +12318,7 @@ const Ge = new gp(), hp = {
|
|
|
12313
12318
|
onAlignCenter: b,
|
|
12314
12319
|
onAlignRight: $,
|
|
12315
12320
|
onAlignTop: I,
|
|
12316
|
-
onAlignMiddle:
|
|
12321
|
+
onAlignMiddle: T,
|
|
12317
12322
|
onAlignBottom: E,
|
|
12318
12323
|
onDistributeHorizontal: k,
|
|
12319
12324
|
onDistributeVertical: z
|
|
@@ -12348,13 +12353,13 @@ const Ge = new gp(), hp = {
|
|
|
12348
12353
|
}, null, 8, ["auth-code", "custom-footer"]),
|
|
12349
12354
|
ce(fp, {
|
|
12350
12355
|
visible: u.value,
|
|
12351
|
-
"onUpdate:visible":
|
|
12356
|
+
"onUpdate:visible": P[0] || (P[0] = (D) => u.value = D),
|
|
12352
12357
|
"scada-graph": Pe(a),
|
|
12353
|
-
onClose:
|
|
12358
|
+
onClose: P[1] || (P[1] = (D) => u.value = !1)
|
|
12354
12359
|
}, null, 8, ["visible", "scada-graph"])
|
|
12355
12360
|
]));
|
|
12356
12361
|
}
|
|
12357
|
-
}), yp = /* @__PURE__ */ ie(bp, [["__scopeId", "data-v-
|
|
12362
|
+
}), yp = /* @__PURE__ */ ie(bp, [["__scopeId", "data-v-fe635396"]]), Cp = {
|
|
12358
12363
|
ScadaCanvas: yp,
|
|
12359
12364
|
PropertyPanel: go,
|
|
12360
12365
|
Header: Q0,
|