@g1cloud/bpmn-modeler-next 5.0.0-alpha.29 → 5.0.0-alpha.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bpmn-modeler.js +92 -92
- package/dist/bpmn-modeler.umd.cjs +6 -6
- package/package.json +1 -1
package/dist/bpmn-modeler.js
CHANGED
|
@@ -1098,17 +1098,17 @@ function kg(e) {
|
|
|
1098
1098
|
};
|
|
1099
1099
|
function V(N, G = !1) {
|
|
1100
1100
|
var le = null, He = null, ct, q = 0, pe = !1, fe = !1, ce = 0, ue = 0, ee, z, F, U, Me, Et, P, _, y, D = "", I = 0, W;
|
|
1101
|
-
function se(
|
|
1102
|
-
var en =
|
|
1101
|
+
function se(tt, St) {
|
|
1102
|
+
var en = tt.indexOf(":");
|
|
1103
1103
|
if (en === -1)
|
|
1104
|
-
return
|
|
1105
|
-
var tn = x[
|
|
1106
|
-
return tn ? St === tn ?
|
|
1104
|
+
return tt;
|
|
1105
|
+
var tn = x[tt.substring(0, en)];
|
|
1106
|
+
return tn ? St === tn ? tt.substr(en + 1) : tn + tt.substr(en) : (A(Hx(tt.substring(0, en))), null);
|
|
1107
1107
|
}
|
|
1108
1108
|
function Se() {
|
|
1109
1109
|
if (W !== null)
|
|
1110
1110
|
return W;
|
|
1111
|
-
var
|
|
1111
|
+
var tt, St, en = g && x.xmlns, tn = g && m ? [] : null, it = I, Rt = D, nn = Rt.length, qr, rn, xn, wn, _t, xi = {}, No = /* @__PURE__ */ new Set(), mn, Ge, Ke;
|
|
1112
1112
|
e:
|
|
1113
1113
|
for (; it < nn; it++)
|
|
1114
1114
|
if (mn = !1, Ge = Rt.charCodeAt(it), !(Ge === 32 || Ge < 14 && Ge > 8)) {
|
|
@@ -1145,16 +1145,16 @@ function kg(e) {
|
|
|
1145
1145
|
}
|
|
1146
1146
|
if (m) {
|
|
1147
1147
|
if (rn = _t === "xmlns" ? "xmlns" : _t.charCodeAt(0) === 120 && _t.substr(0, 6) === "xmlns:" ? _t.substr(6) : null, rn !== null) {
|
|
1148
|
-
if (
|
|
1149
|
-
if (rn === "xmlns" || St in x && x[St] !==
|
|
1148
|
+
if (tt = wr(xn), St = Yu(rn), wn = M[tt], !wn) {
|
|
1149
|
+
if (rn === "xmlns" || St in x && x[St] !== tt)
|
|
1150
1150
|
do
|
|
1151
1151
|
wn = "ns" + q++;
|
|
1152
1152
|
while (typeof x[wn] < "u");
|
|
1153
1153
|
else
|
|
1154
1154
|
wn = rn;
|
|
1155
|
-
M[
|
|
1155
|
+
M[tt] = wn;
|
|
1156
1156
|
}
|
|
1157
|
-
x[rn] !== wn && (qr || (x = zx(x), qr = !0), x[rn] = wn, rn === "xmlns" && (x[Yu(wn)] =
|
|
1157
|
+
x[rn] !== wn && (qr || (x = zx(x), qr = !0), x[rn] = wn, rn === "xmlns" && (x[Yu(wn)] = tt, en = wn), x[St] = tt), xi[_t] = xn;
|
|
1158
1158
|
continue;
|
|
1159
1159
|
}
|
|
1160
1160
|
tn.push(_t, xn);
|
|
@@ -1168,7 +1168,7 @@ function kg(e) {
|
|
|
1168
1168
|
return W = xi;
|
|
1169
1169
|
}
|
|
1170
1170
|
function qe() {
|
|
1171
|
-
for (var
|
|
1171
|
+
for (var tt = /(\r\n|\r|\n)/g, St = 0, en = 0, tn = 0, it = ue, Rt, nn; ce >= tn && (Rt = tt.exec(N), !(!Rt || (it = Rt[0].length + Rt.index, it > ce))); )
|
|
1172
1172
|
St += 1, tn = it;
|
|
1173
1173
|
return ce == -1 ? (en = it, nn = N.substring(ue)) : ue === 0 ? nn = N.substring(ue, ce) : (en = ce - tn, nn = ue == -1 ? N.substring(ce) : N.substring(ce, ue + 1)), {
|
|
1174
1174
|
data: nn,
|
|
@@ -6461,7 +6461,7 @@ function Jw(e, t) {
|
|
|
6461
6461
|
const s = a.y > o.y, c = s ? o : a, u = s ? a : o, l = n.filter((G) => G.id !== o.id && G.id !== a.id && G.y >= c.y + c.height && G.y + G.height <= u.y).sort((G, le) => G.y - le.y);
|
|
6462
6462
|
if (!l.length) return null;
|
|
6463
6463
|
const p = l[0], f = l[l.length - 1], d = (c.y + c.height + p.y) / 2, h = (f.y + f.height + u.y) / 2, m = s ? d : h, g = s ? h : d, R = e.waypoints[0], w = e.waypoints[e.waypoints.length - 1], b = Qi(t), x = t.edges.filter((G) => G.id !== e.id), S = Zi(e, x), M = ni(e, b).length;
|
|
6464
|
-
if (S === 0 && M === 0) return null;
|
|
6464
|
+
if (S === 0 && M === 0 || M === 0 && e.waypoints.length === 2) return null;
|
|
6465
6465
|
const L = Math.min(...l.map((G) => G.x)), A = Math.max(...l.map((G) => G.x + G.width)), H = (R.x + w.x) / 2, V = (G) => G.filter((le, He) => He === 0 || !(Mt(le.x, G[He - 1].x) && Mt(le.y, G[He - 1].y)));
|
|
6466
6466
|
let N;
|
|
6467
6467
|
for (let G = L; G <= A; G += Qw) {
|
|
@@ -7250,9 +7250,9 @@ function bE(e, t) {
|
|
|
7250
7250
|
if ($e.node.lane !== C || ($e.band ?? 0) !== 0 || !$e.node.type.endsWith("Gateway")) continue;
|
|
7251
7251
|
const Te = { in: /* @__PURE__ */ new Set(), out: /* @__PURE__ */ new Set(), cross: /* @__PURE__ */ new Set() };
|
|
7252
7252
|
for (const ye of m) {
|
|
7253
|
-
const
|
|
7254
|
-
if (!
|
|
7255
|
-
const Ct = S.get(
|
|
7253
|
+
const Je = ye.flow.source === $e.node.id;
|
|
7254
|
+
if (!Je && ye.flow.target !== $e.node.id) continue;
|
|
7255
|
+
const Ct = S.get(Je ? ye.flow.target : ye.flow.source);
|
|
7256
7256
|
if (!Ct || Ct.node.participant !== $e.node.participant || !Ct.node.lane) continue;
|
|
7257
7257
|
let gn, Ft = !1;
|
|
7258
7258
|
if (Ct.node.lane !== C) {
|
|
@@ -7263,15 +7263,15 @@ function bE(e, t) {
|
|
|
7263
7263
|
const Pt = T.get(Ct.band ?? 0) ?? $;
|
|
7264
7264
|
gn = Pt > $ ? "down" : Pt < $ ? "up" : void 0;
|
|
7265
7265
|
}
|
|
7266
|
-
gn && (Te[
|
|
7266
|
+
gn && (Te[Je ? "out" : "in"].add(gn), Ft && Te.cross.add(gn));
|
|
7267
7267
|
}
|
|
7268
7268
|
for (const ye of ["up", "down"]) Te.in.has(ye) && Te.out.has(ye) && Te.cross.has(ye) && j.add(ye);
|
|
7269
7269
|
}
|
|
7270
7270
|
if (j.size !== 1) continue;
|
|
7271
7271
|
const [Z] = j, Q = Math.max(...T.values()), te = Z === "down" ? Q : 0;
|
|
7272
7272
|
if ($ === te) continue;
|
|
7273
|
-
const ae = [...T.entries()].filter(([$e]) => $e !== 0).sort(($e, Te) => $e[1] - Te[1]), ze = [...Array(Q + 1).keys()].filter(($e) => $e !== te),
|
|
7274
|
-
ae.forEach(([$e], Te) =>
|
|
7273
|
+
const ae = [...T.entries()].filter(([$e]) => $e !== 0).sort(($e, Te) => $e[1] - Te[1]), ze = [...Array(Q + 1).keys()].filter(($e) => $e !== te), Qe = /* @__PURE__ */ new Map([[0, te]]);
|
|
7274
|
+
ae.forEach(([$e], Te) => Qe.set($e, ze[Te])), q.set(C, Qe);
|
|
7275
7275
|
}
|
|
7276
7276
|
}
|
|
7277
7277
|
const pe = (E) => {
|
|
@@ -7301,17 +7301,17 @@ function bE(e, t) {
|
|
|
7301
7301
|
const Z = ue(B);
|
|
7302
7302
|
if (Z === void 0 || T($, Z) !== T($, 0)) continue;
|
|
7303
7303
|
const Q = T($, Z), te = m.filter((ye) => ye.flow.source === B.node.id).map((ye) => S.get(ye.flow.target)).filter((ye) => !!ye && (ye.node.lane ?? `pool:${ye.node.participant ?? ""}`) === $), ae = te.filter((ye) => {
|
|
7304
|
-
const
|
|
7305
|
-
return
|
|
7304
|
+
const Je = ue(ye);
|
|
7305
|
+
return Je !== void 0 && T($, Je) === Q && (E.get(ye.node.id) ?? 0) === 1;
|
|
7306
7306
|
}), ze = te.some((ye) => {
|
|
7307
|
-
const
|
|
7308
|
-
return
|
|
7307
|
+
const Je = ue(ye);
|
|
7308
|
+
return Je !== void 0 && T($, Je) > Q;
|
|
7309
7309
|
});
|
|
7310
7310
|
if (ae.length !== 1 || !ze) continue;
|
|
7311
|
-
const
|
|
7312
|
-
if (!m.some((ye) => ye.flow.target === B.node.id &&
|
|
7311
|
+
const Qe = new Set(te.flatMap((ye) => C(ye.node.id)));
|
|
7312
|
+
if (!m.some((ye) => ye.flow.target === B.node.id && Qe.has(ye.flow.source))) continue;
|
|
7313
7313
|
const Te = /* @__PURE__ */ new Map();
|
|
7314
|
-
for (const [ye,
|
|
7314
|
+
for (const [ye, Je] of j) Te.set(ye, Je + 1);
|
|
7315
7315
|
Te.set(-1, 0), q.set($, Te);
|
|
7316
7316
|
for (const ye of C(ae[0].node.id)) S.has(ye) && (ce.set(ye, -1), z.add(ye));
|
|
7317
7317
|
ee.add(B.node.id);
|
|
@@ -7352,8 +7352,8 @@ function bE(e, t) {
|
|
|
7352
7352
|
width: $,
|
|
7353
7353
|
height: te,
|
|
7354
7354
|
isExpanded: !0
|
|
7355
|
-
}), ze = n.createShape(ae, { x: 100 + $ / 2, y: P + te / 2 }, u()),
|
|
7356
|
-
if (
|
|
7355
|
+
}), ze = n.createShape(ae, { x: 100 + $ / 2, y: P + te / 2 }, u()), Qe = C.lanes ?? [];
|
|
7356
|
+
if (Qe.length && n.splitLane(ze, Qe.length), Qe.length) {
|
|
7357
7357
|
const $e = o.filter(
|
|
7358
7358
|
(Te) => {
|
|
7359
7359
|
var ye;
|
|
@@ -7361,12 +7361,12 @@ function bE(e, t) {
|
|
|
7361
7361
|
}
|
|
7362
7362
|
).sort((Te, ye) => Te.y - ye.y);
|
|
7363
7363
|
if ($e.forEach((Te, ye) => {
|
|
7364
|
-
const
|
|
7365
|
-
|
|
7364
|
+
const Je = Qe[ye];
|
|
7365
|
+
Je && n.updateProperties(Te, { id: Je.id, name: Je.name });
|
|
7366
7366
|
}), j.some((Te) => Te !== ze.height / B)) {
|
|
7367
7367
|
let Te = ze.y;
|
|
7368
|
-
$e.forEach((ye,
|
|
7369
|
-
const Ct = j[
|
|
7368
|
+
$e.forEach((ye, Je) => {
|
|
7369
|
+
const Ct = j[Je];
|
|
7370
7370
|
n.resizeShape(ye, { x: ye.x, y: Te, width: ye.width, height: Ct }), Te += Ct;
|
|
7371
7371
|
});
|
|
7372
7372
|
}
|
|
@@ -7436,7 +7436,7 @@ function bE(e, t) {
|
|
|
7436
7436
|
return ge.y + Math.min(ge.height / 2, G) + Oe * H;
|
|
7437
7437
|
}
|
|
7438
7438
|
return T ? T.y + N + Oe * H : ne;
|
|
7439
|
-
}, ae = (Ie) => Ie.participant ? p(Ie.participant) : u(), ze = 30,
|
|
7439
|
+
}, ae = (Ie) => Ie.participant ? p(Ie.participant) : u(), ze = 30, Qe = (Ie, Oe, ne, ge) => {
|
|
7440
7440
|
const de = ne - Oe.width / 2, Ne = ge - Oe.height / 2;
|
|
7441
7441
|
return (Ie.children ?? []).find(
|
|
7442
7442
|
(Xe) => !("waypoints" in Xe && Xe.waypoints) && Xe.type !== "bpmn:Lane" && Xe.type !== "label" && typeof Xe.x == "number" && de < Xe.x + Xe.width + ze && de + Oe.width + ze > Xe.x && Ne < Xe.y + Xe.height && Ne + Oe.height > Xe.y
|
|
@@ -7446,14 +7446,14 @@ function bE(e, t) {
|
|
|
7446
7446
|
if (Xe)
|
|
7447
7447
|
for (let Re = 0; Re < 4; Re++) {
|
|
7448
7448
|
const Ce = te(ne, Wt + Re, Ne);
|
|
7449
|
-
if (!
|
|
7449
|
+
if (!Qe(Ie, Oe, de, Ce))
|
|
7450
7450
|
return Z(ne, Wt + Re), { x: de, y: Ce };
|
|
7451
7451
|
}
|
|
7452
7452
|
const J = Q(ne, ge, Ne);
|
|
7453
7453
|
Xe && Z(ne, Wt);
|
|
7454
7454
|
let Ye = de;
|
|
7455
7455
|
for (let Re = 0; Re < 64; Re++) {
|
|
7456
|
-
const Ce =
|
|
7456
|
+
const Ce = Qe(Ie, Oe, Ye, J);
|
|
7457
7457
|
if (!Ce) break;
|
|
7458
7458
|
Ye = Ce.x + Ce.width + V + Oe.width / 2;
|
|
7459
7459
|
}
|
|
@@ -7464,7 +7464,7 @@ function bE(e, t) {
|
|
|
7464
7464
|
const Oe = W(Ie.node, Ie.band), ne = fe(Ie), ge = Ie.node.lane ? `${Ie.node.lane}|${ne ?? ""}` : ne !== void 0 ? `band:${ne}` : "", de = ae(Ie.node), Ne = $e(de, Oe, Ie.node.lane, ne, ye.get(ge) ?? B, $);
|
|
7465
7465
|
n.createShape(Oe, Ne, de), ye.set(ge, Ne.x + Oe.width + V), !Ie.node.lane && ne === void 0 && ($ += 160);
|
|
7466
7466
|
}
|
|
7467
|
-
const
|
|
7467
|
+
const Je = /* @__PURE__ */ new Set(), Ct = /* @__PURE__ */ new Map(), gn = /* @__PURE__ */ new Map(), Ft = /* @__PURE__ */ new Map();
|
|
7468
7468
|
if (E && He.has(`pool:${E}`)) {
|
|
7469
7469
|
const Ie = /* @__PURE__ */ new Map();
|
|
7470
7470
|
for (const J of C.flows) Ie.set(J.flow.target, (Ie.get(J.flow.target) ?? 0) + 1);
|
|
@@ -7504,22 +7504,22 @@ function bE(e, t) {
|
|
|
7504
7504
|
if (xe.flow.source !== J.node.id) continue;
|
|
7505
7505
|
const Ve = S.get(xe.flow.target);
|
|
7506
7506
|
if (!Ve || Ve.node.lane !== J.node.lane || (Ie.get(Ve.node.id) ?? 0) !== 1) continue;
|
|
7507
|
-
const
|
|
7508
|
-
if (
|
|
7509
|
-
const pn = Q(Ve.node.lane,
|
|
7507
|
+
const et = fe(Ve);
|
|
7508
|
+
if (et === void 0) continue;
|
|
7509
|
+
const pn = Q(Ve.node.lane, et, Number.NaN);
|
|
7510
7510
|
if (Number.isNaN(pn)) continue;
|
|
7511
7511
|
const br = de(Ve.node.id), Ut = Ne(br);
|
|
7512
|
-
Ut && Re.push({ subtree: br, band:
|
|
7512
|
+
Ut && Re.push({ subtree: br, band: et, row: pn, dir: Ut });
|
|
7513
7513
|
}
|
|
7514
7514
|
if (!Re.some((xe) => xe.dir === "up") || !Re.some((xe) => xe.dir === "down") || !Re.some((xe) => xe.dir === "up" && Re.some((Ve) => Ve.dir === "down" && Ve.row < xe.row))) continue;
|
|
7515
7515
|
const pt = [...Re].sort((xe, Ve) => xe.row - Ve.row);
|
|
7516
7516
|
[...Re.filter((xe) => xe.dir === "up"), ...Re.filter((xe) => xe.dir === "down")].sort(
|
|
7517
7517
|
(xe, Ve) => xe.dir === Ve.dir ? xe.row - Ve.row : xe.dir === "up" ? -1 : 1
|
|
7518
7518
|
).forEach((xe, Ve) => {
|
|
7519
|
-
const
|
|
7520
|
-
if (
|
|
7519
|
+
const et = pt[Ve].band;
|
|
7520
|
+
if (et !== xe.band) {
|
|
7521
7521
|
ne.add(J.node.id);
|
|
7522
|
-
for (const pn of xe.subtree) fe(pn) === xe.band && ce.set(pn.node.id,
|
|
7522
|
+
for (const pn of xe.subtree) fe(pn) === xe.band && ce.set(pn.node.id, et);
|
|
7523
7523
|
}
|
|
7524
7524
|
});
|
|
7525
7525
|
}
|
|
@@ -7552,11 +7552,11 @@ function bE(e, t) {
|
|
|
7552
7552
|
}
|
|
7553
7553
|
const Ve = xe.find((Ut) => (Re.get(Ut.band) ?? Ut.band) === Ce);
|
|
7554
7554
|
if (!Ve || Xe(Ve.subtree) === Ze || Ne(Ve.subtree) === Ze) continue;
|
|
7555
|
-
const
|
|
7556
|
-
if (!
|
|
7557
|
-
const pn = Ve.band, br =
|
|
7555
|
+
const et = xe.find((Ut) => Ut !== Ve && Xe(Ut.subtree) === Ze);
|
|
7556
|
+
if (!et) continue;
|
|
7557
|
+
const pn = Ve.band, br = et.band;
|
|
7558
7558
|
for (const Ut of Ve.subtree) ue(Ut) === pn && ce.set(Ut.node.id, br);
|
|
7559
|
-
for (const Ut of
|
|
7559
|
+
for (const Ut of et.subtree) ue(Ut) === br && ce.set(Ut.node.id, pn);
|
|
7560
7560
|
ne.add(J.node.id);
|
|
7561
7561
|
}
|
|
7562
7562
|
for (const J of C.nodes) {
|
|
@@ -7564,8 +7564,8 @@ function bE(e, t) {
|
|
|
7564
7564
|
const Ye = Oe(J);
|
|
7565
7565
|
if (Number.isNaN(Ye) || b.some(
|
|
7566
7566
|
(xe) => {
|
|
7567
|
-
var Ve,
|
|
7568
|
-
return (((Ve = xe.placement) == null ? void 0 : Ve.anchor) ?? (xe.association ? xe.association.source === xe.annotation.id ? xe.association.target : xe.association.source : void 0)) === J.node.id && ((
|
|
7567
|
+
var Ve, et;
|
|
7568
|
+
return (((Ve = xe.placement) == null ? void 0 : Ve.anchor) ?? (xe.association ? xe.association.source === xe.annotation.id ? xe.association.target : xe.association.source : void 0)) === J.node.id && ((et = xe.placement) == null ? void 0 : et.side.startsWith("bottom"));
|
|
7569
7569
|
}
|
|
7570
7570
|
)) continue;
|
|
7571
7571
|
let Ce, pt = !1, Ze;
|
|
@@ -7573,10 +7573,10 @@ function bE(e, t) {
|
|
|
7573
7573
|
if (xe.flow.source !== J.node.id) continue;
|
|
7574
7574
|
const Ve = S.get(xe.flow.target);
|
|
7575
7575
|
if (!Ve || !Ve.node.lane && fe(Ve) === void 0) continue;
|
|
7576
|
-
const
|
|
7577
|
-
Number.isNaN(
|
|
7576
|
+
const et = Oe(Ve);
|
|
7577
|
+
Number.isNaN(et) || (Math.abs(et - Ye) < 0.5 && (pt = !0), et > Ye ? !Ce || et > Ce.row ? Ce = { id: Ve.node.id, row: et, count: 1 } : et === Ce.row && Ce.count++ : et < Ye && Ve.node.lane === J.node.lane && (!Ze || et > Ze.row ? Ze = { op: Ve, row: et, count: 1 } : et === Ze.row && Ze.count++));
|
|
7578
7578
|
}
|
|
7579
|
-
Ce && Ce.count === 1 && (Ie.get(Ce.id) ?? 0) === 1 && !ne.has(J.node.id) &&
|
|
7579
|
+
Ce && Ce.count === 1 && (Ie.get(Ce.id) ?? 0) === 1 && !ne.has(J.node.id) && Je.add(Ce.id), !pt && Ze && Ze.count === 1 && (Ie.get(Ze.op.node.id) ?? 0) === 1 && !ee.has(J.node.id) && Ct.set(Ze.op.node.id, { lane: J.node.lane, band: ue(J) });
|
|
7580
7580
|
}
|
|
7581
7581
|
const Wt = /* @__PURE__ */ new Map();
|
|
7582
7582
|
for (const J of g) Wt.set(J.flow.target, [...Wt.get(J.flow.target) ?? [], J]);
|
|
@@ -7589,12 +7589,12 @@ function bE(e, t) {
|
|
|
7589
7589
|
if (!Ze) continue;
|
|
7590
7590
|
const xe = Ze.get(0) ?? 0, Ve = (Ze.get(ue(J) ?? 0) ?? xe) - xe;
|
|
7591
7591
|
if (Ve === 0) continue;
|
|
7592
|
-
const
|
|
7593
|
-
if (
|
|
7592
|
+
const et = Ce.y < T.y;
|
|
7593
|
+
if (et && Ve < 0 || !et && Ve > 0) continue;
|
|
7594
7594
|
let pn;
|
|
7595
7595
|
for (const [br, Ut] of Ze) {
|
|
7596
7596
|
const Fn = Ut - xe;
|
|
7597
|
-
(
|
|
7597
|
+
(et && Fn < 0 && (!pn || Fn < pn.row) || !et && Fn > 0 && (!pn || Fn > pn.row)) && (pn = { band: br, row: Fn });
|
|
7598
7598
|
}
|
|
7599
7599
|
pn && gn.set(J.node.id, { lane: J.node.lane, band: pn.band });
|
|
7600
7600
|
}
|
|
@@ -7618,10 +7618,10 @@ function bE(e, t) {
|
|
|
7618
7618
|
Ye,
|
|
7619
7619
|
xe ? xe.lane : J.node.lane,
|
|
7620
7620
|
xe ? xe.band : Re,
|
|
7621
|
-
|
|
7621
|
+
Je.has(Ne.target) ? pt.x + pt.width / 2 : Ze,
|
|
7622
7622
|
Number.NaN
|
|
7623
|
-
),
|
|
7624
|
-
|
|
7623
|
+
), et = n.createShape(Ye, Ve, Ce);
|
|
7624
|
+
Je.has(Ne.target) && Ft.set(Ne.target, Ze - (et.x + et.width / 2)), n.connect(Xe, et, { type: "bpmn:SequenceFlow", businessObject: I(Ne) });
|
|
7625
7625
|
} else
|
|
7626
7626
|
s.append(Xe, Ye, {
|
|
7627
7627
|
connection: { type: "bpmn:SequenceFlow", businessObject: I(Ne) }
|
|
@@ -7658,7 +7658,7 @@ function bE(e, t) {
|
|
|
7658
7658
|
}
|
|
7659
7659
|
}
|
|
7660
7660
|
return B;
|
|
7661
|
-
},
|
|
7661
|
+
}, tt = (E, C = () => !0) => {
|
|
7662
7662
|
const T = l(E);
|
|
7663
7663
|
if (!T) return [];
|
|
7664
7664
|
const B = [T], $ = /* @__PURE__ */ new Set([E]);
|
|
@@ -7682,12 +7682,12 @@ function bE(e, t) {
|
|
|
7682
7682
|
if (!T || !B) continue;
|
|
7683
7683
|
const $ = E.source !== void 0 ? l(E.source) : B.source, j = B.target;
|
|
7684
7684
|
if (!$ || !j || j.id === T.id) continue;
|
|
7685
|
-
const Z = lt(E.target), Q = new Set(Z.map((Te) => Te.id)), te = Math.min(...Z.map((Te) => Te.x)), ae = Math.max(...Z.map((Te) => Te.x + Te.width)), ze = $.x + $.width,
|
|
7686
|
-
if (
|
|
7687
|
-
const Te = f(T), ye = (Te == null ? void 0 : Te.children) ?? [],
|
|
7688
|
-
(Ft) => !("waypoints" in Ft && Ft.waypoints) && !
|
|
7689
|
-
), gn = Te ? [Te, ...ye.filter((Ft) =>
|
|
7690
|
-
Ct.length && n.createSpace(Ct, gn, { x:
|
|
7685
|
+
const Z = lt(E.target), Q = new Set(Z.map((Te) => Te.id)), te = Math.min(...Z.map((Te) => Te.x)), ae = Math.max(...Z.map((Te) => Te.x + Te.width)), ze = $.x + $.width, Qe = ae - te + qe * 2 - (j.x - ze);
|
|
7686
|
+
if (Qe > 0) {
|
|
7687
|
+
const Te = f(T), ye = (Te == null ? void 0 : Te.children) ?? [], Je = (Ft) => Ft.type === "bpmn:Lane", Ct = ye.filter(
|
|
7688
|
+
(Ft) => !("waypoints" in Ft && Ft.waypoints) && !Je(Ft) && !Q.has(Ft.id) && Ft.x >= j.x
|
|
7689
|
+
), gn = Te ? [Te, ...ye.filter((Ft) => Je(Ft))] : [];
|
|
7690
|
+
Ct.length && n.createSpace(Ct, gn, { x: Qe, y: 0 }, "e", j.x - 1);
|
|
7691
7691
|
}
|
|
7692
7692
|
const $e = C.node.lane || C.band !== void 0 ? T.y + T.height / 2 : $.y + $.height / 2;
|
|
7693
7693
|
n.moveElements(Z, {
|
|
@@ -7720,8 +7720,8 @@ function bE(e, t) {
|
|
|
7720
7720
|
if (!Z || !te || te.type === "bpmn:Participant") continue;
|
|
7721
7721
|
const ae = te.x + te.width / 2;
|
|
7722
7722
|
if (ae < T.x + 10 || ae > T.x + T.width - 10) continue;
|
|
7723
|
-
const ze = T.y > te.y,
|
|
7724
|
-
ni(
|
|
7723
|
+
const ze = T.y > te.y, Qe = ze ? te.y + te.height : te.y, $e = ze ? T.y : T.y + T.height, Te = j.flow.source === C.participant.id ? [{ x: ae, y: $e }, { x: ae, y: Qe }] : [{ x: ae, y: Qe }, { x: ae, y: $e }], ye = Ht(o), Je = { ...ye.edges.find((Ct) => Ct.id === j.flow.id), waypoints: Te };
|
|
7724
|
+
ni(Je, Qi(ye)).length || n.updateWaypoints(Z, Te);
|
|
7725
7725
|
}
|
|
7726
7726
|
}
|
|
7727
7727
|
};
|
|
@@ -7877,10 +7877,10 @@ function bE(e, t) {
|
|
|
7877
7877
|
for (const Q of Z) {
|
|
7878
7878
|
const te = (zf = S.get(Q.id)) == null ? void 0 : zf.node.participant, ae = te ? l(te) : void 0;
|
|
7879
7879
|
if (!ae) continue;
|
|
7880
|
-
const ze = [...S.values()].filter((Pt) => Pt.node.participant === te).map((Pt) => Pt.node.id),
|
|
7880
|
+
const ze = [...S.values()].filter((Pt) => Pt.node.participant === te).map((Pt) => Pt.node.id), Qe = (Pt) => Pt.map((En) => l(En)).filter((En) => !!En), Te = [tt(Q.id, (Pt) => {
|
|
7881
7881
|
var En;
|
|
7882
7882
|
return ((En = S.get(Pt.id)) == null ? void 0 : En.node.participant) === te;
|
|
7883
|
-
}),
|
|
7883
|
+
}), Qe(ze)].filter((Pt) => Pt.length), ye = Q.width + V, Je = xn(E.flow.id), Ct = _t(E.flow.id), gn = () => xn(E.flow.id) < Je && _t(E.flow.id) >= Ct;
|
|
7884
7884
|
let Ft = !1;
|
|
7885
7885
|
for (const Pt of Te) {
|
|
7886
7886
|
for (let En = 1; En <= nn; En++)
|
|
@@ -7910,8 +7910,8 @@ function bE(e, t) {
|
|
|
7910
7910
|
if (Z <= V + 1) continue;
|
|
7911
7911
|
const Q = p(B.node.participant), te = lt(T, ($e) => $e.x >= $.x), ae = rn(), ze = xi(te, Q, -(Z - V));
|
|
7912
7912
|
if (!ze) continue;
|
|
7913
|
-
const
|
|
7914
|
-
(
|
|
7913
|
+
const Qe = rn();
|
|
7914
|
+
(Qe.bad > ae.bad || Qe.crossings >= ae.crossings || Qe.straight < ae.straight) && ze();
|
|
7915
7915
|
}
|
|
7916
7916
|
}
|
|
7917
7917
|
tn(!0);
|
|
@@ -7993,33 +7993,33 @@ function bE(e, t) {
|
|
|
7993
7993
|
if (!B.selfId) return !1;
|
|
7994
7994
|
const ge = o.get(ne);
|
|
7995
7995
|
return !!ge && (((de = ge.source) == null ? void 0 : de.id) === B.selfId || ((Ne = ge.target) == null ? void 0 : Ne.id) === B.selfId);
|
|
7996
|
-
}, ae = Q.edges.filter((ne) => !te(ne.id)).flatMap(_n), ze = Ys(Q).filter((ne) => ne.owner !== B.selfId).map((ne) => ne.rect),
|
|
7996
|
+
}, ae = Q.edges.filter((ne) => !te(ne.id)).flatMap(_n), ze = Ys(Q).filter((ne) => ne.owner !== B.selfId).map((ne) => ne.rect), Qe = (ne) => ({
|
|
7997
7997
|
x0: ne.x - $.width / 2 - Yt,
|
|
7998
7998
|
x1: ne.x + $.width / 2 + Yt,
|
|
7999
7999
|
y0: ne.y - $.height / 2 - Yt,
|
|
8000
8000
|
y1: ne.y + $.height / 2 + Yt
|
|
8001
8001
|
}), $e = (ne) => {
|
|
8002
|
-
const ge =
|
|
8002
|
+
const ge = Qe(ne);
|
|
8003
8003
|
return Z.some((de) => ge.x0 < de.x + de.width && ge.x1 > de.x && ge.y0 < de.y + de.height && ge.y1 > de.y);
|
|
8004
8004
|
}, Te = (ne) => {
|
|
8005
|
-
const ge =
|
|
8005
|
+
const ge = Qe(ne);
|
|
8006
8006
|
return ae.some(
|
|
8007
8007
|
(de) => de.axis === "h" ? de.at > ge.y0 && de.at < ge.y1 && de.lo < ge.x1 && de.hi > ge.x0 : de.at > ge.x0 && de.at < ge.x1 && de.lo < ge.y1 && de.hi > ge.y0
|
|
8008
8008
|
);
|
|
8009
8009
|
}, ye = (ne) => {
|
|
8010
|
-
const ge =
|
|
8010
|
+
const ge = Qe(ne);
|
|
8011
8011
|
return ze.some((de) => ge.x0 < de.x + de.width && ge.x1 > de.x && ge.y0 < de.y + de.height && ge.y1 > de.y);
|
|
8012
|
-
},
|
|
8012
|
+
}, Je = (ne) => $e(ne) || Te(ne) || ye(ne), Ct = (ne) => ne.x - $.width / 2 >= T.x && ne.x + $.width / 2 <= T.x + T.width && ne.y - $.height / 2 >= T.y && ne.y + $.height / 2 <= T.y + T.height;
|
|
8013
8013
|
if (B.placement) {
|
|
8014
8014
|
const ne = (J) => J.startsWith("top") ? J.replace(/^top/, "bottom") : J.replace(/^bottom/, "top"), ge = (J) => J.endsWith("left") ? J.replace(/left$/, "right") : J.replace(/right$/, "left"), de = B.placement.side, Ne = [de, ne(de), ge(de), ne(ge(de)), "top", "bottom", "left", "right", "top-left", "top-right", "bottom-left", "bottom-right"], Xe = B.placement.offset ?? 50;
|
|
8015
8015
|
let Wt = j(de, Xe);
|
|
8016
|
-
if (
|
|
8016
|
+
if (Je(Wt)) {
|
|
8017
8017
|
const J = /* @__PURE__ */ new Set();
|
|
8018
8018
|
for (const Ye of Ne) {
|
|
8019
8019
|
if (J.has(Ye)) continue;
|
|
8020
8020
|
J.add(Ye);
|
|
8021
8021
|
const Re = j(Ye, Xe);
|
|
8022
|
-
if (Ct(Re) && !
|
|
8022
|
+
if (Ct(Re) && !Je(Re)) {
|
|
8023
8023
|
Wt = Re;
|
|
8024
8024
|
break;
|
|
8025
8025
|
}
|
|
@@ -8029,13 +8029,13 @@ function bE(e, t) {
|
|
|
8029
8029
|
}
|
|
8030
8030
|
const gn = B.from, Ft = T.x + Yt + $.width / 2, Pt = T.x + T.width - Yt - $.width / 2, En = T.y + Yt + $.height / 2, Ie = T.y + T.height - Yt - $.height / 2;
|
|
8031
8031
|
let Oe = { x: Math.min(Pt, Math.max(Ft, gn.x)), y: Math.min(Ie, Math.max(En, gn.y)) };
|
|
8032
|
-
if (
|
|
8032
|
+
if (Je(Oe)) {
|
|
8033
8033
|
const ne = (E.width + $.width) / 2 + Yt, de = [
|
|
8034
8034
|
{ x: Oe.x + ne, y: Oe.y },
|
|
8035
8035
|
{ x: Oe.x - ne, y: Oe.y },
|
|
8036
8036
|
{ x: Oe.x, y: Oe.y - $.height - Yt },
|
|
8037
8037
|
{ x: Oe.x, y: Oe.y + $.height + Yt }
|
|
8038
|
-
].filter(Ct).find((Ne) => !
|
|
8038
|
+
].filter(Ct).find((Ne) => !Je(Ne));
|
|
8039
8039
|
de && (Oe = de);
|
|
8040
8040
|
}
|
|
8041
8041
|
return Oe;
|
|
@@ -8050,10 +8050,10 @@ function bE(e, t) {
|
|
|
8050
8050
|
const C = E.association, T = ((Gf = E.placement) == null ? void 0 : Gf.anchor) ?? (C ? C.source === E.annotation.id ? C.target : C.source : void 0), B = T ? l(T) : void 0, $ = B ? Nf(B) : void 0, j = Qb(E.annotation.text ?? "");
|
|
8051
8051
|
let Z;
|
|
8052
8052
|
if ($ && E.placement) {
|
|
8053
|
-
const [ze,
|
|
8053
|
+
const [ze, Qe] = vu[E.placement.side], $e = E.placement.offset ?? 50;
|
|
8054
8054
|
Z = {
|
|
8055
8055
|
x: $.x + $.width / 2 + ze * ($.width / 2 + j.width / 2 + $e),
|
|
8056
|
-
y: $.y + $.height / 2 +
|
|
8056
|
+
y: $.y + $.height / 2 + Qe * ($.height / 2 + j.height / 2 + $e)
|
|
8057
8057
|
};
|
|
8058
8058
|
} else $ ? (Z = {
|
|
8059
8059
|
x: $.x + $.width / 2 + 180 + Bo % 3 * 260,
|
|
@@ -8075,7 +8075,7 @@ function bE(e, t) {
|
|
|
8075
8075
|
Q
|
|
8076
8076
|
);
|
|
8077
8077
|
if (C) {
|
|
8078
|
-
const ze = (
|
|
8078
|
+
const ze = (Qe) => Qe === E.annotation.id ? ae : p(Qe);
|
|
8079
8079
|
n.connect(
|
|
8080
8080
|
ze(C.source),
|
|
8081
8081
|
ze(C.target),
|
|
@@ -11604,7 +11604,7 @@ function zr(e, t, n, i, r, o, a) {
|
|
|
11604
11604
|
});
|
|
11605
11605
|
}
|
|
11606
11606
|
if (y === "conditional-flow-marker") {
|
|
11607
|
-
var
|
|
11607
|
+
var tt = he("path", {
|
|
11608
11608
|
d: "M 0 10 L 8 6 L 16 10 L 8 14 Z",
|
|
11609
11609
|
...l({
|
|
11610
11610
|
fill: D,
|
|
@@ -11612,7 +11612,7 @@ function zr(e, t, n, i, r, o, a) {
|
|
|
11612
11612
|
})
|
|
11613
11613
|
});
|
|
11614
11614
|
f(_, {
|
|
11615
|
-
element:
|
|
11615
|
+
element: tt,
|
|
11616
11616
|
ref: { x: -1, y: 10 },
|
|
11617
11617
|
scale: 0.5,
|
|
11618
11618
|
parentGfx: P
|
|
@@ -11747,11 +11747,11 @@ function zr(e, t, n, i, r, o, a) {
|
|
|
11747
11747
|
mx: 0.5,
|
|
11748
11748
|
my: 0.5
|
|
11749
11749
|
}
|
|
11750
|
-
}),
|
|
11750
|
+
}), tt = D / 2, St = I / 2;
|
|
11751
11751
|
x(P, lt, {
|
|
11752
11752
|
strokeWidth: 1,
|
|
11753
11753
|
stroke: ie(_, c, y.stroke),
|
|
11754
|
-
transform: "rotate(" + qe * 30 + "," + St + "," +
|
|
11754
|
+
transform: "rotate(" + qe * 30 + "," + St + "," + tt + ")"
|
|
11755
11755
|
});
|
|
11756
11756
|
}
|
|
11757
11757
|
return se;
|
|
@@ -12247,7 +12247,7 @@ function zr(e, t, n, i, r, o, a) {
|
|
|
12247
12247
|
stroke: ie(D, c, y.stroke),
|
|
12248
12248
|
width: I,
|
|
12249
12249
|
height: I
|
|
12250
|
-
}, se = X(P).isInterrupting, Se = se ? 0 : 3, qe = se ? 1 : 1.2, lt = 20,
|
|
12250
|
+
}, se = X(P).isInterrupting, Se = se ? 0 : 3, qe = se ? 1 : 1.2, lt = 20, tt = (I - lt) / 2, St = "translate(" + tt + "," + tt + ")";
|
|
12251
12251
|
m(_, lt, lt, {
|
|
12252
12252
|
fill: W.fill,
|
|
12253
12253
|
stroke: W.stroke,
|
|
@@ -12609,11 +12609,11 @@ function zr(e, t, n, i, r, o, a) {
|
|
|
12609
12609
|
x: qe.x,
|
|
12610
12610
|
y: qe.y
|
|
12611
12611
|
}
|
|
12612
|
-
}),
|
|
12612
|
+
}), tt = {
|
|
12613
12613
|
strokeWidth: 1
|
|
12614
12614
|
};
|
|
12615
|
-
I.get("messageVisibleKind") === "initiating" ? (
|
|
12616
|
-
var St = x(P, lt,
|
|
12615
|
+
I.get("messageVisibleKind") === "initiating" ? (tt.fill = W, tt.stroke = se) : (tt.fill = se, tt.stroke = W);
|
|
12616
|
+
var St = x(P, lt, tt), en = D.get("messageRef"), tn = en.get("name"), it = le(P, tn, {
|
|
12617
12617
|
align: "center-top",
|
|
12618
12618
|
fitBox: !0,
|
|
12619
12619
|
style: {
|
|
@@ -12680,7 +12680,7 @@ function zr(e, t, n, i, r, o, a) {
|
|
|
12680
12680
|
} else {
|
|
12681
12681
|
var lt = Fo(_, y);
|
|
12682
12682
|
W || (lt.height = Hn(_, y), lt.width = Rn(_, y));
|
|
12683
|
-
var
|
|
12683
|
+
var tt = le(P, Se, {
|
|
12684
12684
|
box: lt,
|
|
12685
12685
|
align: "center-middle",
|
|
12686
12686
|
style: {
|
|
@@ -12689,7 +12689,7 @@ function zr(e, t, n, i, r, o, a) {
|
|
|
12689
12689
|
});
|
|
12690
12690
|
if (!W) {
|
|
12691
12691
|
var St = -1 * Rn(_, y);
|
|
12692
|
-
ks(
|
|
12692
|
+
ks(tt, 0, -St, 270);
|
|
12693
12693
|
}
|
|
12694
12694
|
}
|
|
12695
12695
|
return se.get("participantMultiplicity") && N("ParticipantMultiplicityMarker", P, _, y), D;
|