@g1cloud/bpmn-modeler-next 5.0.0-beta.5 → 5.0.0-beta.6

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.
@@ -1118,9 +1118,9 @@ function ub(e) {
1118
1118
  }, this.ns = function(I) {
1119
1119
  if (typeof I > "u" && (I = {}), typeof I != "object")
1120
1120
  throw vr("required args <nsMap={}>");
1121
- var j = /* @__PURE__ */ Object.create(null), ee;
1122
- for (ee in I)
1123
- j[ee] = I[ee];
1121
+ var j = /* @__PURE__ */ Object.create(null), J;
1122
+ for (J in I)
1123
+ j[J] = I[J];
1124
1124
  return b = !0, w = j, this;
1125
1125
  };
1126
1126
  function $() {
@@ -1142,7 +1142,7 @@ function ub(e) {
1142
1142
  _ = !0;
1143
1143
  };
1144
1144
  function k(I, j = !1) {
1145
- var ee = null, fe = null, Re, De = 0, Je = !1, Q = !1, te = 0, ue = 0, ve, K, V, ie, Me, Ae, N, R, x, G = "", q = 0, J;
1145
+ var J = null, fe = null, Ce, De = 0, Je = !1, Z = !1, ee = 0, ue = 0, ve, K, V, ne, Ae, Pe, N, R, x, G = "", q = 0, Q;
1146
1146
  function Ee(bt, rn) {
1147
1147
  var gn = bt.indexOf(":");
1148
1148
  if (gn === -1)
@@ -1151,8 +1151,8 @@ function ub(e) {
1151
1151
  return mn ? rn === mn ? bt.substr(gn + 1) : mn + bt.substr(gn) : (T(UE(bt.substring(0, gn))), null);
1152
1152
  }
1153
1153
  function Ye() {
1154
- if (J !== null)
1155
- return J;
1154
+ if (Q !== null)
1155
+ return Q;
1156
1156
  var bt, rn, gn = b && y.xmlns, mn = b && g ? [] : null, xt = q, on = G, pn = on.length, Xr, Hn, ai, si, Wt, ci = {}, Mo = /* @__PURE__ */ new Set(), zn, rt, yt;
1157
1157
  e:
1158
1158
  for (; xt < pn; xt++)
@@ -1210,12 +1210,12 @@ function ub(e) {
1210
1210
  if (g)
1211
1211
  for (xt = 0, pn = mn.length; xt < pn; xt++)
1212
1212
  Wt = Ee(mn[xt++], gn), ai = mn[xt], Wt !== null && (ci[Wt] = ai);
1213
- return J = ci;
1213
+ return Q = ci;
1214
1214
  }
1215
1215
  function lt() {
1216
- for (var bt = /(\r\n|\r|\n)/g, rn = 0, gn = 0, mn = 0, xt = ue, on, pn; te >= mn && (on = bt.exec(I), !(!on || (xt = on[0].length + on.index, xt > te))); )
1216
+ for (var bt = /(\r\n|\r|\n)/g, rn = 0, gn = 0, mn = 0, xt = ue, on, pn; ee >= mn && (on = bt.exec(I), !(!on || (xt = on[0].length + on.index, xt > ee))); )
1217
1217
  rn += 1, mn = xt;
1218
- return te == -1 ? (gn = xt, pn = I.substring(ue)) : ue === 0 ? pn = I.substring(ue, te) : (gn = te - mn, pn = ue == -1 ? I.substring(te) : I.substring(te, ue + 1)), {
1218
+ return ee == -1 ? (gn = xt, pn = I.substring(ue)) : ue === 0 ? pn = I.substring(ue, ee) : (gn = ee - mn, pn = ue == -1 ? I.substring(ee) : I.substring(ee, ue + 1)), {
1219
1219
  data: pn,
1220
1220
  line: rn,
1221
1221
  column: gn
@@ -1233,7 +1233,7 @@ function ub(e) {
1233
1233
  return y;
1234
1234
  })
1235
1235
  })); ue !== -1; ) {
1236
- if (I.charCodeAt(ue) === 60 ? te = ue : te = I.indexOf("<", ue), te === -1) {
1236
+ if (I.charCodeAt(ue) === 60 ? ee = ue : ee = I.indexOf("<", ue), ee === -1) {
1237
1237
  if (j)
1238
1238
  return I.substring(ue);
1239
1239
  if (S.length)
@@ -1243,99 +1243,99 @@ function ub(e) {
1243
1243
  ue < I.length && I.substring(ue).trim() && T(ug);
1244
1244
  return;
1245
1245
  }
1246
- if (d || (d = !0), ue !== te) {
1246
+ if (d || (d = !0), ue !== ee) {
1247
1247
  if (S.length) {
1248
- if (n && (n(I.substring(ue, te), ro, p), _))
1248
+ if (n && (n(I.substring(ue, ee), ro, p), _))
1249
1249
  return;
1250
- } else if (I.substring(ue, te).trim() && (T(ug), _))
1250
+ } else if (I.substring(ue, ee).trim() && (T(ug), _))
1251
1251
  return;
1252
1252
  }
1253
- if (ie = I.charCodeAt(te + 1), ie === 33) {
1254
- if (V = I.charCodeAt(te + 2), V === 91 && I.substr(te + 3, 6) === "CDATA[") {
1255
- if (ue = I.indexOf("]]>", te), ue === -1)
1256
- return j ? I.substring(te) : P("unclosed cdata");
1257
- if (o && (o(I.substring(te + 9, ue), p), _))
1253
+ if (ne = I.charCodeAt(ee + 1), ne === 33) {
1254
+ if (V = I.charCodeAt(ee + 2), V === 91 && I.substr(ee + 3, 6) === "CDATA[") {
1255
+ if (ue = I.indexOf("]]>", ee), ue === -1)
1256
+ return j ? I.substring(ee) : P("unclosed cdata");
1257
+ if (o && (o(I.substring(ee + 9, ue), p), _))
1258
1258
  return;
1259
1259
  ue += 3;
1260
1260
  continue;
1261
1261
  }
1262
- if (V === 45 && I.charCodeAt(te + 3) === 45) {
1263
- if (ue = I.indexOf("-->", te), ue === -1)
1264
- return j ? I.substring(te) : P("unclosed comment");
1265
- if (c && (c(I.substring(te + 4, ue), ro, p), _))
1262
+ if (V === 45 && I.charCodeAt(ee + 3) === 45) {
1263
+ if (ue = I.indexOf("-->", ee), ue === -1)
1264
+ return j ? I.substring(ee) : P("unclosed comment");
1265
+ if (c && (c(I.substring(ee + 4, ue), ro, p), _))
1266
1266
  return;
1267
1267
  ue += 3;
1268
1268
  continue;
1269
1269
  }
1270
1270
  }
1271
- if (ie === 63) {
1272
- if (ue = I.indexOf("?>", te), ue === -1)
1273
- return j ? I.substring(te) : P("unclosed question");
1274
- if (l && (l(I.substring(te, ue + 2), p), _))
1271
+ if (ne === 63) {
1272
+ if (ue = I.indexOf("?>", ee), ue === -1)
1273
+ return j ? I.substring(ee) : P("unclosed question");
1274
+ if (l && (l(I.substring(ee, ue + 2), p), _))
1275
1275
  return;
1276
1276
  ue += 2;
1277
1277
  continue;
1278
1278
  }
1279
- for (ve = te + 1; ; ve++) {
1280
- if (Me = I.charCodeAt(ve), isNaN(Me))
1281
- return j ? I.substring(te) : (ue = -1, P("unclosed tag"));
1282
- if (Me === 34)
1279
+ for (ve = ee + 1; ; ve++) {
1280
+ if (Ae = I.charCodeAt(ve), isNaN(Ae))
1281
+ return j ? I.substring(ee) : (ue = -1, P("unclosed tag"));
1282
+ if (Ae === 34)
1283
1283
  V = I.indexOf('"', ve + 1), ve = V !== -1 ? V : ve;
1284
- else if (Me === 39)
1284
+ else if (Ae === 39)
1285
1285
  V = I.indexOf("'", ve + 1), ve = V !== -1 ? V : ve;
1286
- else if (Me === 62) {
1286
+ else if (Ae === 62) {
1287
1287
  ue = ve;
1288
1288
  break;
1289
1289
  }
1290
1290
  }
1291
- if (ie === 33) {
1292
- if (u && (u(I.substring(te, ue + 1), ro, p), _))
1291
+ if (ne === 33) {
1292
+ if (u && (u(I.substring(ee, ue + 1), ro, p), _))
1293
1293
  return;
1294
1294
  ue += 1;
1295
1295
  continue;
1296
1296
  }
1297
- if (J = {}, ie === 47) {
1298
- if (Je = !1, Q = !0, !S.length)
1297
+ if (Q = {}, ne === 47) {
1298
+ if (Je = !1, Z = !0, !S.length)
1299
1299
  return P("missing open tag");
1300
- if (ve = N = S.pop(), V = te + 2 + ve.length, I.substring(te + 2, V) !== ve)
1300
+ if (ve = N = S.pop(), V = ee + 2 + ve.length, I.substring(ee + 2, V) !== ve)
1301
1301
  return P("closing tag mismatch");
1302
1302
  for (; V < ue; V++)
1303
- if (ie = I.charCodeAt(V), !(ie === 32 || ie > 8 && ie < 14))
1303
+ if (ne = I.charCodeAt(V), !(ne === 32 || ne > 8 && ne < 14))
1304
1304
  return P("close tag");
1305
1305
  } else {
1306
- if (I.charCodeAt(ue - 1) === 47 ? (ve = N = I.substring(te + 1, ue - 1), Je = !0, Q = !0) : (ve = N = I.substring(te + 1, ue), Je = !0, Q = !1), !(ie > 96 && ie < 123 || ie > 64 && ie < 91 || ie === 95 || ie === 58))
1306
+ if (I.charCodeAt(ue - 1) === 47 ? (ve = N = I.substring(ee + 1, ue - 1), Je = !0, Z = !0) : (ve = N = I.substring(ee + 1, ue), Je = !0, Z = !1), !(ne > 96 && ne < 123 || ne > 64 && ne < 91 || ne === 95 || ne === 58))
1307
1307
  return P("illegal first char nodeName");
1308
1308
  for (V = 1, K = ve.length; V < K; V++)
1309
- if (ie = ve.charCodeAt(V), !(ie > 96 && ie < 123 || ie > 64 && ie < 91 || ie > 47 && ie < 59 || ie === 45 || ie === 95 || ie == 46)) {
1310
- if (ie === 32 || ie < 14 && ie > 8) {
1311
- N = ve.substring(0, V), J = null;
1309
+ if (ne = ve.charCodeAt(V), !(ne > 96 && ne < 123 || ne > 64 && ne < 91 || ne > 47 && ne < 59 || ne === 45 || ne === 95 || ne == 46)) {
1310
+ if (ne === 32 || ne < 14 && ne > 8) {
1311
+ N = ve.substring(0, V), Q = null;
1312
1312
  break;
1313
1313
  }
1314
1314
  return P("invalid nodeName");
1315
1315
  }
1316
- Q || S.push(N);
1316
+ Z || S.push(N);
1317
1317
  }
1318
1318
  if (b) {
1319
- Re = y, Je && (Q || m.push(Re), J === null && (g = ve.indexOf("xmlns", V) !== -1) && (q = V, G = ve, Ye(), g = !1)), R = N, fe !== y && (ee = y[pg], ee === void 0 && (ee = y[pg] = /* @__PURE__ */ Object.create(null)), fe = y);
1320
- var Bt = ee[N];
1319
+ Ce = y, Je && (Z || m.push(Ce), Q === null && (g = ve.indexOf("xmlns", V) !== -1) && (q = V, G = ve, Ye(), g = !1)), R = N, fe !== y && (J = y[pg], J === void 0 && (J = y[pg] = /* @__PURE__ */ Object.create(null)), fe = y);
1320
+ var Bt = J[N];
1321
1321
  if (Bt !== void 0)
1322
1322
  N = Bt;
1323
1323
  else {
1324
- if (ie = N.indexOf(":"), ie !== -1) {
1325
- if (Ae = y[N.substring(0, ie)], !Ae)
1324
+ if (ne = N.indexOf(":"), ne !== -1) {
1325
+ if (Pe = y[N.substring(0, ne)], !Pe)
1326
1326
  return P("missing namespace on <" + R + ">");
1327
- N = N.substr(ie + 1);
1327
+ N = N.substr(ne + 1);
1328
1328
  } else
1329
- Ae = y.xmlns;
1330
- Ae && (N = Ae + ":" + N), ee[R] = N;
1329
+ Pe = y.xmlns;
1330
+ Pe && (N = Pe + ":" + N), J[R] = N;
1331
1331
  }
1332
1332
  }
1333
- if (Je && (q = V, G = ve, i && (t ? i(x, ro, Q, p) : i(N, Ye, ro, Q, p), _)))
1333
+ if (Je && (q = V, G = ve, i && (t ? i(x, ro, Z, p) : i(N, Ye, ro, Z, p), _)))
1334
1334
  return;
1335
- if (Q) {
1335
+ if (Z) {
1336
1336
  if (r && (r(t ? x : N, ro, Je, p), _))
1337
1337
  return;
1338
- b && (Je ? y = Re : y = m.pop());
1338
+ b && (Je ? y = Ce : y = m.pop());
1339
1339
  }
1340
1340
  ue += 1;
1341
1341
  }
@@ -1600,8 +1600,8 @@ pf.prototype.fromXML = function(e, t, n) {
1600
1600
  property: T.property,
1601
1601
  value: T.id
1602
1602
  }), I.isMany) {
1603
- var j = $.get(I.name), ee = j.indexOf(T);
1604
- ee === -1 && (ee = j.length), k ? j[ee] = k : j.splice(ee, 1);
1603
+ var j = $.get(I.name), J = j.indexOf(T);
1604
+ J === -1 && (J = j.length), k ? j[J] = k : j.splice(J, 1);
1605
1605
  } else
1606
1606
  $.set(I.name, k);
1607
1607
  }
@@ -1642,9 +1642,9 @@ pf.prototype.fromXML = function(e, t, n) {
1642
1642
  return S[P] = w, S;
1643
1643
  }, r.config && r.config.nsMap || {}));
1644
1644
  return s.ns(y).on("openTag", function(S, w, P, T) {
1645
- var $ = S.attrs || {}, k = Object.keys($).reduce(function(j, ee) {
1646
- var fe = w($[ee]);
1647
- return j[ee] = fe, j;
1645
+ var $ = S.attrs || {}, k = Object.keys($).reduce(function(j, J) {
1646
+ var fe = w($[J]);
1647
+ return j[J] = fe, j;
1648
1648
  }, {}), I = {
1649
1649
  name: S.name,
1650
1650
  originalName: S.originalName,
@@ -6354,10 +6354,10 @@ function ht(e, t = {}) {
6354
6354
  for (const [w, P, T, $, k] of S) {
6355
6355
  const I = T === "h" ? y.x : y.y, j = T === "h" ? y.x + y.width : y.y + y.height;
6356
6356
  if (!(I < k && $ < j)) continue;
6357
- const ee = T === "h" ? y.y : y.x, fe = T === "h" ? y.y + y.height : y.x + y.width;
6358
- if (!(ee < P && P < fe)) continue;
6359
- const Re = Math.min(P - ee, fe - P);
6360
- Re < PS || n.push({ kind: "group-cuts-shape", group: m.id, shape: y.id, side: w, depth: Re });
6357
+ const J = T === "h" ? y.y : y.x, fe = T === "h" ? y.y + y.height : y.x + y.width;
6358
+ if (!(J < P && P < fe)) continue;
6359
+ const Ce = Math.min(P - J, fe - P);
6360
+ Ce < PS || n.push({ kind: "group-cuts-shape", group: m.id, shape: y.id, side: w, depth: Ce });
6361
6361
  }
6362
6362
  }
6363
6363
  const p = t.includeObservationOnly ? e.shapes.filter((m) => m.type === "bpmn:Group" && m.width > 0 && m.height > 0) : [];
@@ -6376,13 +6376,13 @@ function ht(e, t = {}) {
6376
6376
  });
6377
6377
  let k = null;
6378
6378
  for (const I of S) {
6379
- const [j, ee, fe] = I.axis === "v" ? [w.y, T, [["left", w.x], ["right", P]]] : [w.x, P, [["top", w.y], ["bottom", T]]], Re = Math.min(I.hi, ee) - Math.max(I.lo, j);
6380
- if (Re < Eb) continue;
6379
+ const [j, J, fe] = I.axis === "v" ? [w.y, T, [["left", w.x], ["right", P]]] : [w.x, P, [["top", w.y], ["bottom", T]]], Ce = Math.min(I.hi, J) - Math.max(I.lo, j);
6380
+ if (Ce < Eb) continue;
6381
6381
  const De = I.axis === "v" ? w.x < I.at && I.at < P : w.y < I.at && I.at < T;
6382
6382
  if (!(De && $))
6383
- for (const [Je, Q] of fe) {
6384
- const te = Math.abs(I.at - Q);
6385
- te <= Fa && (!k || te < k.distance) && (k = { side: Je, inside: De, distance: te, length: Re });
6383
+ for (const [Je, Z] of fe) {
6384
+ const ee = Math.abs(I.at - Z);
6385
+ ee <= Fa && (!k || ee < k.distance) && (k = { side: Je, inside: De, distance: ee, length: Ce });
6386
6386
  }
6387
6387
  }
6388
6388
  k && n.push({
@@ -6418,8 +6418,8 @@ function ht(e, t = {}) {
6418
6418
  ["y", S.y + S.height, w.y, P],
6419
6419
  ["y", w.y + w.height, S.y, P]
6420
6420
  ];
6421
- for (const [k, I, j, ee] of $)
6422
- if (ee && Math.abs(I - j) <= fg) {
6421
+ for (const [k, I, j, J] of $)
6422
+ if (J && Math.abs(I - j) <= fg) {
6423
6423
  n.push({
6424
6424
  kind: "group-on-group-boundary",
6425
6425
  groups: S.id < w.id ? [S.id, w.id] : [w.id, S.id],
@@ -6920,17 +6920,17 @@ function uR(e, t) {
6920
6920
  if (!i || !r) return null;
6921
6921
  const o = wg(i, n), a = wg(r, n);
6922
6922
  if (!o || !a || o.id === a.id) return null;
6923
- const s = a.y > o.y, c = s ? o : a, l = s ? a : o, u = n.filter((j) => j.id !== o.id && j.id !== a.id && j.y >= c.y + c.height && j.y + j.height <= l.y).sort((j, ee) => j.y - ee.y);
6923
+ const s = a.y > o.y, c = s ? o : a, l = s ? a : o, u = n.filter((j) => j.id !== o.id && j.id !== a.id && j.y >= c.y + c.height && j.y + j.height <= l.y).sort((j, J) => j.y - J.y);
6924
6924
  if (!u.length) return null;
6925
6925
  const p = u[0], f = u[u.length - 1], d = (c.y + c.height + p.y) / 2, h = (f.y + f.height + l.y) / 2, g = s ? d : h, b = s ? h : d, E = e.waypoints[0], _ = e.waypoints[e.waypoints.length - 1], m = hi(t), y = t.edges.filter((j) => j.id !== e.id), S = mi(e, y), w = kn(e, m).length;
6926
6926
  if (S === 0 && w === 0 || w === 0 && e.waypoints.length === 2) return null;
6927
- const P = Math.min(...u.map((j) => j.x)), T = Math.max(...u.map((j) => j.x + j.width)), $ = (E.x + _.x) / 2, k = (j) => j.filter((ee, fe) => fe === 0 || !(Pt(ee.x, j[fe - 1].x) && Pt(ee.y, j[fe - 1].y)));
6927
+ const P = Math.min(...u.map((j) => j.x)), T = Math.max(...u.map((j) => j.x + j.width)), $ = (E.x + _.x) / 2, k = (j) => j.filter((J, fe) => fe === 0 || !(Pt(J.x, j[fe - 1].x) && Pt(J.y, j[fe - 1].y)));
6928
6928
  let I;
6929
6929
  for (let j = P; j <= T; j += lR) {
6930
- const ee = k([E, { x: E.x, y: g }, { x: j, y: g }, { x: j, y: b }, { x: _.x, y: b }, _]), fe = { ...e, waypoints: ee };
6930
+ const J = k([E, { x: E.x, y: g }, { x: j, y: g }, { x: j, y: b }, { x: _.x, y: b }, _]), fe = { ...e, waypoints: J };
6931
6931
  if (kn(fe, m).length > 0) continue;
6932
- const Re = mi(fe, y), De = Math.abs(j - $);
6933
- (!I || Re < I.cross || Re === I.cross && De < I.detour) && (I = { pts: ee, cross: Re, detour: De });
6932
+ const Ce = mi(fe, y), De = Math.abs(j - $);
6933
+ (!I || Ce < I.cross || Ce === I.cross && De < I.detour) && (I = { pts: J, cross: Ce, detour: De });
6934
6934
  }
6935
6935
  return I && (w > 0 ? I.cross <= S : I.cross < S) ? I.pts : null;
6936
6936
  }
@@ -7077,10 +7077,10 @@ function hR(e, t) {
7077
7077
  if (k > m) continue;
7078
7078
  const I = k < m && $ === 0;
7079
7079
  if (!I && mi(T, o) > s) continue;
7080
- const j = c(w), ee = h(w);
7081
- if (!I && !(ee && !g) && j >= l) continue;
7082
- const Re = ee ? 0 : 1, De = y(w);
7083
- (!S || k < S.out || k === S.out && (Re < S.lane || Re === S.lane && ($ < S.opp || $ === S.opp && (j < S.sc || j === S.sc && (P < S.cost || P === S.cost && De < S.len))))) && (S = { pts: w, out: k, sc: j, lane: Re, opp: $, cost: P, len: De });
7080
+ const j = c(w), J = h(w);
7081
+ if (!I && !(J && !g) && j >= l) continue;
7082
+ const Ce = J ? 0 : 1, De = y(w);
7083
+ (!S || k < S.out || k === S.out && (Ce < S.lane || Ce === S.lane && ($ < S.opp || $ === S.opp && (j < S.sc || j === S.sc && (P < S.cost || P === S.cost && De < S.len))))) && (S = { pts: w, out: k, sc: j, lane: Ce, opp: $, cost: P, len: De });
7084
7084
  }
7085
7085
  return (S == null ? void 0 : S.pts) ?? null;
7086
7086
  }
@@ -7950,20 +7950,20 @@ const ol = {
7950
7950
  }, bn = 10, HR = 300, zR = 160, kg = 20, Og = 40, GR = 10;
7951
7951
  function Ep(e, t, n, i, r) {
7952
7952
  const o = n, a = (k, I) => {
7953
- const [j, ee] = ol[k];
7953
+ const [j, J] = ol[k];
7954
7954
  let fe = {
7955
7955
  x: t.x + t.width / 2 + j * (t.width / 2 + o.width / 2 + I),
7956
- y: t.y + t.height / 2 + ee * (t.height / 2 + o.height / 2 + I)
7956
+ y: t.y + t.height / 2 + J * (t.height / 2 + o.height / 2 + I)
7957
7957
  };
7958
- const Re = i.x + bn + o.width / 2, De = i.x + i.width - bn - o.width / 2, Je = i.y + bn + o.height / 2, Q = i.y + i.height - bn - o.height / 2, te = { x: Math.min(De, Math.max(Re, fe.x)), y: Math.min(Q, Math.max(Je, fe.y)) };
7959
- return (te.x !== fe.x || te.y !== fe.y) && (fe = Math.abs(te.x - (t.x + t.width / 2)) < (t.width + o.width) / 2 + bn && Math.abs(te.y - (t.y + t.height / 2)) < (t.height + o.height) / 2 + bn ? { x: t.x + t.width + bn + o.width / 2, y: te.y } : te), fe;
7958
+ const Ce = i.x + bn + o.width / 2, De = i.x + i.width - bn - o.width / 2, Je = i.y + bn + o.height / 2, Z = i.y + i.height - bn - o.height / 2, ee = { x: Math.min(De, Math.max(Ce, fe.x)), y: Math.min(Z, Math.max(Je, fe.y)) };
7959
+ return (ee.x !== fe.x || ee.y !== fe.y) && (fe = Math.abs(ee.x - (t.x + t.width / 2)) < (t.width + o.width) / 2 + bn && Math.abs(ee.y - (t.y + t.height / 2)) < (t.height + o.height) / 2 + bn ? { x: t.x + t.width + bn + o.width / 2, y: ee.y } : ee), fe;
7960
7960
  }, s = (i.children ?? []).filter(
7961
7961
  (k) => !("waypoints" in k && k.waypoints) && k.type !== "bpmn:Lane" && k.type !== "label" && typeof k.x == "number" && k.id !== r.selfId
7962
7962
  ), c = Xe(e), l = (k) => {
7963
- var j, ee;
7963
+ var j, J;
7964
7964
  if (!r.selfId) return !1;
7965
7965
  const I = e.get(k);
7966
- return !!I && (((j = I.source) == null ? void 0 : j.id) === r.selfId || ((ee = I.target) == null ? void 0 : ee.id) === r.selfId);
7966
+ return !!I && (((j = I.source) == null ? void 0 : j.id) === r.selfId || ((J = I.target) == null ? void 0 : J.id) === r.selfId);
7967
7967
  }, u = c.edges.filter((k) => !l(k.id)).flatMap(yn), p = Yo(c).filter((k) => k.owner !== r.selfId).map((k) => k.rect), f = (k) => ({
7968
7968
  x0: k.x - o.width / 2 - bn,
7969
7969
  x1: k.x + o.width / 2 + bn,
@@ -7992,21 +7992,21 @@ function Ep(e, t, n, i, r) {
7992
7992
  );
7993
7993
  }, _ = (k) => d(k) || h(k) || g(k) || E(k), m = (k) => k.x - o.width / 2 >= i.x && k.x + o.width / 2 <= i.x + i.width && k.y - o.height / 2 >= i.y && k.y + o.height / 2 <= i.y + i.height;
7994
7994
  if (r.placement) {
7995
- const k = (De) => De.startsWith("top") ? De.replace(/^top/, "bottom") : De.replace(/^bottom/, "top"), I = (De) => De.endsWith("left") ? De.replace(/left$/, "right") : De.replace(/right$/, "left"), j = r.placement.side, ee = [j, k(j), I(j), k(I(j)), "top", "bottom", "left", "right", "top-left", "top-right", "bottom-left", "bottom-right"], fe = r.placement.offset ?? 50;
7996
- let Re = a(j, fe);
7997
- if (_(Re)) {
7995
+ const k = (De) => De.startsWith("top") ? De.replace(/^top/, "bottom") : De.replace(/^bottom/, "top"), I = (De) => De.endsWith("left") ? De.replace(/left$/, "right") : De.replace(/right$/, "left"), j = r.placement.side, J = [j, k(j), I(j), k(I(j)), "top", "bottom", "left", "right", "top-left", "top-right", "bottom-left", "bottom-right"], fe = r.placement.offset ?? 50;
7996
+ let Ce = a(j, fe);
7997
+ if (_(Ce)) {
7998
7998
  const De = /* @__PURE__ */ new Set();
7999
- for (const Je of ee) {
7999
+ for (const Je of J) {
8000
8000
  if (De.has(Je)) continue;
8001
8001
  De.add(Je);
8002
- const Q = a(Je, fe);
8003
- if (m(Q) && !_(Q)) {
8004
- Re = Q;
8002
+ const Z = a(Je, fe);
8003
+ if (m(Z) && !_(Z)) {
8004
+ Ce = Z;
8005
8005
  break;
8006
8006
  }
8007
8007
  }
8008
8008
  }
8009
- return Re;
8009
+ return Ce;
8010
8010
  }
8011
8011
  const y = r.from, S = i.x + bn + o.width / 2, w = i.x + i.width - bn - o.width / 2, P = i.y + bn + o.height / 2, T = i.y + i.height - bn - o.height / 2;
8012
8012
  let $ = { x: Math.min(w, Math.max(S, y.x)), y: Math.min(T, Math.max(P, y.y)) };
@@ -8016,7 +8016,7 @@ function Ep(e, t, n, i, r) {
8016
8016
  { x: $.x - k, y: $.y },
8017
8017
  { x: $.x, y: $.y - o.height - bn },
8018
8018
  { x: $.x, y: $.y + o.height + bn }
8019
- ].filter(m).find((ee) => !_(ee));
8019
+ ].filter(m).find((J) => !_(J));
8020
8020
  j && ($ = j);
8021
8021
  }
8022
8022
  return $;
@@ -8093,15 +8093,15 @@ function VR(e, t) {
8093
8093
  n.updateProperties(H, { id: B.id, name: B.name });
8094
8094
  });
8095
8095
  }
8096
- const I = 150, j = 130, ee = 80, fe = 90, Re = 180, De = 30, Je = 30, Q = (v, C, A, O, B) => {
8096
+ const I = 150, j = 130, J = 80, fe = 90, Ce = 180, De = 30, Je = 30, Z = (v, C, A, O, B) => {
8097
8097
  const D = A - C.width / 2, H = O - C.height / 2;
8098
8098
  return (v.children ?? []).find(
8099
8099
  (F) => !("waypoints" in F && F.waypoints) && F.type !== "bpmn:Lane" && F.type !== "label" && !(B != null && B.has(F.id)) && typeof F.x == "number" && D < F.x + F.width + Je && D + C.width + Je > F.x && H < F.y + F.height && H + C.height > F.y
8100
8100
  );
8101
- }, te = /* @__PURE__ */ new Set();
8101
+ }, ee = /* @__PURE__ */ new Set();
8102
8102
  for (const v of g) {
8103
- te.add(`pool:${v.participant.id}`);
8104
- for (const C of v.participant.lanes ?? []) te.add(C.id);
8103
+ ee.add(`pool:${v.participant.id}`);
8104
+ for (const C of v.participant.lanes ?? []) ee.add(C.id);
8105
8105
  }
8106
8106
  const ue = /* @__PURE__ */ new Map();
8107
8107
  for (const v of b) {
@@ -8111,7 +8111,7 @@ function VR(e, t) {
8111
8111
  }
8112
8112
  const ve = /* @__PURE__ */ new Map();
8113
8113
  for (const [v, C] of ue) {
8114
- if (!te.has(v)) continue;
8114
+ if (!ee.has(v)) continue;
8115
8115
  const A = [...C].sort((D, H) => D - H), O = A.map((D, H) => H === 0 ? 0 : H % 2 === 1 ? Math.ceil(H / 2) : -(H / 2)), B = Math.min(...O);
8116
8116
  ve.set(v, new Map(A.map((D, H) => [D, O[H] - B])));
8117
8117
  }
@@ -8129,30 +8129,30 @@ function VR(e, t) {
8129
8129
  if (!Se && ge.flow.target !== X.node.id) continue;
8130
8130
  const st = P.get(Se ? ge.flow.target : ge.flow.source);
8131
8131
  if (!st || st.node.participant !== X.node.participant || !st.node.lane) continue;
8132
- let Te, Z = !1;
8132
+ let Re, te = !1;
8133
8133
  if (st.node.lane !== C) {
8134
- const ce = v.get(st.node.lane);
8135
- if (ce === void 0) continue;
8136
- Te = ce > O ? "down" : "up", Z = !0;
8134
+ const se = v.get(st.node.lane);
8135
+ if (se === void 0) continue;
8136
+ Re = se > O ? "down" : "up", te = !0;
8137
8137
  } else {
8138
- const ce = A.get(st.band ?? 0) ?? B;
8139
- Te = ce > B ? "down" : ce < B ? "up" : void 0;
8138
+ const se = A.get(st.band ?? 0) ?? B;
8139
+ Re = se > B ? "down" : se < B ? "up" : void 0;
8140
8140
  }
8141
- Te && (pe[Se ? "out" : "in"].add(Te), Z && pe.cross.add(Te));
8141
+ Re && (pe[Se ? "out" : "in"].add(Re), te && pe.cross.add(Re));
8142
8142
  }
8143
8143
  for (const ge of ["up", "down"]) pe.in.has(ge) && pe.out.has(ge) && pe.cross.has(ge) && D.add(ge);
8144
8144
  }
8145
8145
  if (D.size !== 1) continue;
8146
8146
  const [H] = D, F = Math.max(...A.values()), L = H === "down" ? F : 0;
8147
8147
  if (B === L) continue;
8148
- const U = [...A.entries()].filter(([X]) => X !== 0).sort((X, pe) => X[1] - pe[1]), Y = [...Array(F + 1).keys()].filter((X) => X !== L), re = /* @__PURE__ */ new Map([[0, L]]);
8149
- U.forEach(([X], pe) => re.set(X, Y[pe])), ve.set(C, re);
8148
+ const U = [...A.entries()].filter(([X]) => X !== 0).sort((X, pe) => X[1] - pe[1]), Y = [...Array(F + 1).keys()].filter((X) => X !== L), ie = /* @__PURE__ */ new Map([[0, L]]);
8149
+ U.forEach(([X], pe) => ie.set(X, Y[pe])), ve.set(C, ie);
8150
8150
  }
8151
8151
  }
8152
8152
  const K = (v) => {
8153
8153
  var C;
8154
8154
  return (((C = ue.get(v)) == null ? void 0 : C.size) ?? 0) > 1;
8155
- }, V = (v) => v.band ?? (v.node.lane || !K(`pool:${v.node.participant ?? ""}`) ? void 0 : 0), ie = /* @__PURE__ */ new Map(), Me = (v) => ie.get(v.node.id) ?? V(v), Ae = /* @__PURE__ */ new Set(), N = /* @__PURE__ */ new Set();
8155
+ }, V = (v) => v.band ?? (v.node.lane || !K(`pool:${v.node.participant ?? ""}`) ? void 0 : 0), ne = /* @__PURE__ */ new Map(), Ae = (v) => ne.get(v.node.id) ?? V(v), Pe = /* @__PURE__ */ new Set(), N = /* @__PURE__ */ new Set();
8156
8156
  {
8157
8157
  const v = /* @__PURE__ */ new Map();
8158
8158
  for (const O of E) v.set(O.flow.target, (v.get(O.flow.target) ?? 0) + 1);
@@ -8173,23 +8173,23 @@ function VR(e, t) {
8173
8173
  if (!O.node.type.endsWith("Gateway")) continue;
8174
8174
  const B = O.node.lane ?? `pool:${O.node.participant ?? ""}`, D = ve.get(B);
8175
8175
  if (!D || D.size < 2) continue;
8176
- const H = Me(O);
8176
+ const H = Ae(O);
8177
8177
  if (H === void 0 || A(B, H) !== A(B, 0)) continue;
8178
8178
  const F = A(B, H), L = E.filter((ge) => ge.flow.source === O.node.id).map((ge) => P.get(ge.flow.target)).filter((ge) => !!ge && (ge.node.lane ?? `pool:${ge.node.participant ?? ""}`) === B), U = L.filter((ge) => {
8179
- const Se = Me(ge);
8179
+ const Se = Ae(ge);
8180
8180
  return Se !== void 0 && A(B, Se) === F && (v.get(ge.node.id) ?? 0) === 1;
8181
8181
  }), Y = L.some((ge) => {
8182
- const Se = Me(ge);
8182
+ const Se = Ae(ge);
8183
8183
  return Se !== void 0 && A(B, Se) > F;
8184
8184
  });
8185
8185
  if (U.length !== 1 || !Y) continue;
8186
- const re = new Set(L.flatMap((ge) => C(ge.node.id)));
8187
- if (!E.some((ge) => ge.flow.target === O.node.id && re.has(ge.flow.source))) continue;
8186
+ const ie = new Set(L.flatMap((ge) => C(ge.node.id)));
8187
+ if (!E.some((ge) => ge.flow.target === O.node.id && ie.has(ge.flow.source))) continue;
8188
8188
  const pe = /* @__PURE__ */ new Map();
8189
8189
  for (const [ge, Se] of D) pe.set(ge, Se + 1);
8190
8190
  pe.set(-1, 0), ve.set(B, pe);
8191
- for (const ge of C(U[0].node.id)) P.has(ge) && (ie.set(ge, -1), N.add(ge));
8192
- Ae.add(O.node.id);
8191
+ for (const ge of C(U[0].node.id)) P.has(ge) && (ne.set(ge, -1), N.add(ge));
8192
+ Pe.add(O.node.id);
8193
8193
  }
8194
8194
  }
8195
8195
  const R = (v, C) => {
@@ -8198,7 +8198,7 @@ function VR(e, t) {
8198
8198
  }, x = (v, C, A, O) => {
8199
8199
  const B = v ? p(v) : C ? p(C) : void 0;
8200
8200
  if (!B) return !1;
8201
- const D = v ? B.y + Math.min(B.height / 2, fe) : B.y + ee;
8201
+ const D = v ? B.y + Math.min(B.height / 2, fe) : B.y + J;
8202
8202
  return Math.abs(D + R(v ?? `pool:${C ?? ""}`, A) * I - O) <= I / 2;
8203
8203
  }, G = /* @__PURE__ */ new Map();
8204
8204
  for (const [v, C] of ue) {
@@ -8206,9 +8206,9 @@ function VR(e, t) {
8206
8206
  for (const O of C) A = Math.max(A, R(v, O));
8207
8207
  G.set(v, A);
8208
8208
  }
8209
- const q = (v) => Re + I * v, J = (v, C, A) => {
8209
+ const q = (v) => Ce + I * v, Q = (v, C, A) => {
8210
8210
  const O = u().children.filter(
8211
- (B) => !("waypoints" in B && B.waypoints) && B.id !== C && typeof B.y == "number" && B.y >= v
8211
+ (B) => !("waypoints" in B && B.waypoints) && !(B.type === "label" && !("waypoints" in (B.labelTarget ?? {}))) && B.id !== C && typeof B.y == "number" && B.y >= v
8212
8212
  );
8213
8213
  O.length && n.moveElements(O, { x: 0, y: A });
8214
8214
  }, Ee = (v, C, A) => {
@@ -8217,7 +8217,7 @@ function VR(e, t) {
8217
8217
  const B = A + C.height / 2 + De - O.y;
8218
8218
  if (O.height >= B) return;
8219
8219
  const D = B - O.height, H = O.y + O.height;
8220
- n.resizeShape(O, { x: O.x, y: O.y, width: O.width, height: B }), J(H, O.id, D);
8220
+ n.resizeShape(O, { x: O.x, y: O.y, width: O.width, height: B }), Q(H, O.id, D);
8221
8221
  }, Ye = (v, C) => {
8222
8222
  const A = C - v.height;
8223
8223
  if (A <= 0) return;
@@ -8233,14 +8233,14 @@ function VR(e, t) {
8233
8233
  const H = f(v), F = q(C);
8234
8234
  if (H.height >= F) return;
8235
8235
  const L = F - H.height, U = d(H), Y = U ? U.y + U.height : H.y + H.height;
8236
- Ye(H, F), J(Y, U == null ? void 0 : U.id, L);
8236
+ Ye(H, F), Q(Y, U == null ? void 0 : U.id, L);
8237
8237
  return;
8238
8238
  }
8239
8239
  if (!A) return;
8240
8240
  const O = I * (C + 1);
8241
8241
  if (A.height >= O) return;
8242
8242
  const B = O - A.height, D = A.y + A.height;
8243
- n.resizeShape(A, { x: A.x, y: A.y, width: A.width, height: O }), J(D, A.id, B);
8243
+ n.resizeShape(A, { x: A.x, y: A.y, width: A.width, height: O }), Q(D, A.id, B);
8244
8244
  }, Bt = /* @__PURE__ */ new Map();
8245
8245
  for (const v of E) Bt.set(v.flow.target, (Bt.get(v.flow.target) ?? 0) + 1);
8246
8246
  const bt = (v) => (Bt.get(v) ?? 0) <= 1, rn = (v, C) => {
@@ -8282,8 +8282,8 @@ function VR(e, t) {
8282
8282
  width: B,
8283
8283
  height: L,
8284
8284
  isExpanded: !0
8285
- }), Y = n.createShape(U, { x: 100 + B / 2, y: xt + L / 2 }, u()), re = C.lanes ?? [];
8286
- if (re.length && n.splitLane(Y, re.length), re.length) {
8285
+ }), Y = n.createShape(U, { x: 100 + B / 2, y: xt + L / 2 }, u()), ie = C.lanes ?? [];
8286
+ if (ie.length && n.splitLane(Y, ie.length), ie.length) {
8287
8287
  const X = o.filter(
8288
8288
  (pe) => {
8289
8289
  var ge;
@@ -8291,7 +8291,7 @@ function VR(e, t) {
8291
8291
  }
8292
8292
  ).sort((pe, ge) => pe.y - ge.y);
8293
8293
  if (X.forEach((pe, ge) => {
8294
- const Se = re[ge];
8294
+ const Se = ie[ge];
8295
8295
  Se && n.updateProperties(pe, { id: Se.id, name: Se.name });
8296
8296
  }), D.some((pe) => pe !== Y.height / O)) {
8297
8297
  let pe = Y.y;
@@ -8341,193 +8341,193 @@ function VR(e, t) {
8341
8341
  for (const v of si) {
8342
8342
  const C = pn.get(v), A = v ? f(v) : void 0, O = A ? A.x + 150 : 250;
8343
8343
  let B = A ? A.y + 80 : 120;
8344
- const D = (Z, ce, ne) => {
8345
- if (Z) {
8346
- const he = f(Z);
8347
- return he.y + Math.min(he.height / 2, fe) + R(Z, ce ?? 0) * I;
8348
- }
8349
- return ce !== void 0 && A ? A.y + ee + R(`pool:${v}`, ce) * I : ne;
8350
- }, H = (Z, ce, ne) => {
8351
- if (Z) {
8352
- const he = f(Z);
8353
- return he.y + Math.min(he.height / 2, fe) + ce * I;
8354
- }
8355
- return A ? A.y + ee + ce * I : ne;
8356
- }, F = (Z) => Z.participant ? f(Z.participant) : u(), L = (Z, ce, ne, he, ze, Ge, wt) => {
8357
- const Dt = ne !== void 0 || he !== void 0, me = R(ne ?? `pool:${v}`, he ?? 0);
8344
+ const D = (te, se, oe) => {
8345
+ if (te) {
8346
+ const he = f(te);
8347
+ return he.y + Math.min(he.height / 2, fe) + R(te, se ?? 0) * I;
8348
+ }
8349
+ return se !== void 0 && A ? A.y + J + R(`pool:${v}`, se) * I : oe;
8350
+ }, H = (te, se, oe) => {
8351
+ if (te) {
8352
+ const he = f(te);
8353
+ return he.y + Math.min(he.height / 2, fe) + se * I;
8354
+ }
8355
+ return A ? A.y + J + se * I : oe;
8356
+ }, F = (te) => te.participant ? f(te.participant) : u(), L = (te, se, oe, he, ze, Ge, wt) => {
8357
+ const Dt = oe !== void 0 || he !== void 0, me = R(oe ?? `pool:${v}`, he ?? 0);
8358
8358
  if (
8359
8359
  // ── B-89. band 를 **줘도** 그것이 상류 행의 슬롯을 가리키면 승계한다 ──
8360
8360
  // 🔴 종전엔 `band === undefined` 만 승계했는데, 사람 문서에서는 *"상류와 같은 행"* 을
8361
8361
  // 가리키는 band 가 **아예 없다**(격자 밖 92%). ⇒ band 를 주는 것이 승계를 **끄는**
8362
8362
  // 부작용을 냈다(표본 65 = 에이전트가 band 3 을 정확히 계산했는데 그 때문에 30px 어긋났다).
8363
- (he === void 0 || x(ne, v, he, wt ?? Number.NaN)) && wt !== void 0 && gn(ne, ce, wt) && !Q(Z, ce, ze, wt)
8363
+ (he === void 0 || x(oe, v, he, wt ?? Number.NaN)) && wt !== void 0 && gn(oe, se, wt) && !Z(te, se, ze, wt)
8364
8364
  )
8365
8365
  return { x: ze, y: wt };
8366
8366
  if (Dt)
8367
8367
  for (let de = 0; de < 4; de++) {
8368
- const Oe = H(ne, me + de, Ge);
8369
- if (!Q(Z, ce, ze, Oe, rn(ne, me + de)))
8370
- return lt(ne, me + de, A), { x: ze, y: Oe };
8368
+ const Oe = H(oe, me + de, Ge);
8369
+ if (!Z(te, se, ze, Oe, rn(oe, me + de)))
8370
+ return lt(oe, me + de, A), { x: ze, y: Oe };
8371
8371
  }
8372
- const ye = D(ne, he, Ge);
8373
- Dt ? lt(ne, me, A) : Ee(Z, ce, ye);
8374
- let oe = ze;
8372
+ const ye = D(oe, he, Ge);
8373
+ Dt ? lt(oe, me, A) : Ee(te, se, ye);
8374
+ let re = ze;
8375
8375
  for (let de = 0; de < 64; de++) {
8376
- const Oe = Q(Z, ce, oe, ye);
8376
+ const Oe = Z(te, se, re, ye);
8377
8377
  if (!Oe) break;
8378
- oe = Oe.x + Oe.width + j + ce.width / 2;
8379
- }
8380
- return { x: oe, y: ye };
8381
- }, U = new Set(C.flows.map((Z) => Z.flow.target)), Y = /* @__PURE__ */ new Map(), re = (Z) => {
8382
- if (Z === void 0) return;
8383
- const ce = o.get(Z);
8384
- if (!(!ce || typeof ce.x != "number" || typeof ce.width != "number"))
8385
- return ce.x + ce.width + j;
8378
+ re = Oe.x + Oe.width + j + se.width / 2;
8379
+ }
8380
+ return { x: re, y: ye };
8381
+ }, U = new Set(C.flows.map((te) => te.flow.target)), Y = /* @__PURE__ */ new Map(), ie = (te) => {
8382
+ if (te === void 0) return;
8383
+ const se = o.get(te);
8384
+ if (!(!se || typeof se.x != "number" || typeof se.width != "number"))
8385
+ return se.x + se.width + j;
8386
8386
  };
8387
- for (const Z of C.nodes) {
8388
- if (U.has(Z.node.id)) continue;
8389
- const ce = ai(Z.node, Z.band, Z.afterColumn), ne = V(Z), he = Z.node.lane ? `${Z.node.lane}|${ne ?? ""}` : ne !== void 0 ? `band:${ne}` : "", ze = F(Z.node), Ge = Y.get(he) ?? O, wt = re(Z.afterColumn), Dt = wt === void 0 ? Ge : Math.max(Ge, wt), me = L(ze, ce, Z.node.lane, ne, Dt, B);
8390
- n.createShape(ce, me, ze), Y.set(he, me.x + ce.width + j), !Z.node.lane && ne === void 0 && (B += 160);
8387
+ for (const te of C.nodes) {
8388
+ if (U.has(te.node.id)) continue;
8389
+ const se = ai(te.node, te.band, te.afterColumn), oe = V(te), he = te.node.lane ? `${te.node.lane}|${oe ?? ""}` : oe !== void 0 ? `band:${oe}` : "", ze = F(te.node), Ge = Y.get(he) ?? O, wt = ie(te.afterColumn), Dt = wt === void 0 ? Ge : Math.max(Ge, wt), me = L(ze, se, te.node.lane, oe, Dt, B);
8390
+ n.createShape(se, me, ze), Y.set(he, me.x + se.width + j), !te.node.lane && oe === void 0 && (B += 160);
8391
8391
  }
8392
8392
  const X = /* @__PURE__ */ new Set(), pe = /* @__PURE__ */ new Map(), ge = /* @__PURE__ */ new Map(), Se = /* @__PURE__ */ new Map();
8393
- if (v && te.has(`pool:${v}`)) {
8394
- const Z = /* @__PURE__ */ new Map();
8395
- for (const me of C.flows) Z.set(me.flow.target, (Z.get(me.flow.target) ?? 0) + 1);
8396
- const ce = (me) => D(me.node.lane, Me(me), Number.NaN), ne = /* @__PURE__ */ new Set(), he = (me) => {
8393
+ if (v && ee.has(`pool:${v}`)) {
8394
+ const te = /* @__PURE__ */ new Map();
8395
+ for (const me of C.flows) te.set(me.flow.target, (te.get(me.flow.target) ?? 0) + 1);
8396
+ const se = (me) => D(me.node.lane, Ae(me), Number.NaN), oe = /* @__PURE__ */ new Set(), he = (me) => {
8397
8397
  var de;
8398
8398
  const ye = (de = P.get(me)) == null ? void 0 : de.node.participant;
8399
8399
  if (ye) return p(ye);
8400
- const oe = p(me);
8401
- if (oe)
8402
- return oe.type === "bpmn:Participant" ? oe : d(oe);
8400
+ const re = p(me);
8401
+ if (re)
8402
+ return re.type === "bpmn:Participant" ? re : d(re);
8403
8403
  }, ze = (me) => {
8404
- const ye = [], oe = /* @__PURE__ */ new Set([me]), de = [me];
8404
+ const ye = [], re = /* @__PURE__ */ new Set([me]), de = [me];
8405
8405
  for (; de.length; ) {
8406
8406
  const Oe = de.shift(), We = P.get(Oe);
8407
8407
  We && ye.push(We);
8408
- for (const Pe of C.flows)
8409
- Pe.flow.source !== Oe || oe.has(Pe.flow.target) || (Z.get(Pe.flow.target) ?? 0) !== 1 || (oe.add(Pe.flow.target), de.push(Pe.flow.target));
8408
+ for (const Te of C.flows)
8409
+ Te.flow.source !== Oe || re.has(Te.flow.target) || (te.get(Te.flow.target) ?? 0) !== 1 || (re.add(Te.flow.target), de.push(Te.flow.target));
8410
8410
  }
8411
8411
  return ye;
8412
8412
  }, Ge = (me) => {
8413
8413
  if (!A) return;
8414
8414
  const ye = new Set(me.map((Oe) => Oe.node.id));
8415
- let oe = !1, de = !1;
8415
+ let re = !1, de = !1;
8416
8416
  for (const Oe of _) {
8417
8417
  if (!ye.has(Oe.flow.source)) continue;
8418
8418
  const We = he(Oe.flow.target);
8419
- !We || We.id === A.id || (We.y < A.y ? oe = !0 : de = !0);
8419
+ !We || We.id === A.id || (We.y < A.y ? re = !0 : de = !0);
8420
8420
  }
8421
- return oe && !de ? "up" : de && !oe ? "down" : void 0;
8421
+ return re && !de ? "up" : de && !re ? "down" : void 0;
8422
8422
  };
8423
8423
  for (const me of C.nodes) {
8424
8424
  if (!Wt(me.node.type)) continue;
8425
8425
  const ye = D(me.node.lane, V(me), Number.NaN);
8426
8426
  if (Number.isNaN(ye)) continue;
8427
- const oe = [];
8428
- for (const Pe of C.flows) {
8429
- if (Pe.flow.source !== me.node.id) continue;
8430
- const je = P.get(Pe.flow.target);
8431
- if (!je || je.node.lane !== me.node.lane || (Z.get(je.node.id) ?? 0) !== 1) continue;
8427
+ const re = [];
8428
+ for (const Te of C.flows) {
8429
+ if (Te.flow.source !== me.node.id) continue;
8430
+ const je = P.get(Te.flow.target);
8431
+ if (!je || je.node.lane !== me.node.lane || (te.get(je.node.id) ?? 0) !== 1) continue;
8432
8432
  const Ke = V(je);
8433
8433
  if (Ke === void 0) continue;
8434
8434
  const xe = D(je.node.lane, Ke, Number.NaN);
8435
8435
  if (Number.isNaN(xe)) continue;
8436
- const nt = ze(je.node.id), Ce = Ge(nt);
8437
- Ce && oe.push({ subtree: nt, band: Ke, row: xe, dir: Ce });
8436
+ const nt = ze(je.node.id), Me = Ge(nt);
8437
+ Me && re.push({ subtree: nt, band: Ke, row: xe, dir: Me });
8438
8438
  }
8439
- if (!oe.some((Pe) => Pe.dir === "up") || !oe.some((Pe) => Pe.dir === "down") || !oe.some((Pe) => Pe.dir === "up" && oe.some((je) => je.dir === "down" && je.row < Pe.row))) continue;
8440
- const Oe = [...oe].sort((Pe, je) => Pe.row - je.row);
8441
- [...oe.filter((Pe) => Pe.dir === "up"), ...oe.filter((Pe) => Pe.dir === "down")].sort(
8442
- (Pe, je) => Pe.dir === je.dir ? Pe.row - je.row : Pe.dir === "up" ? -1 : 1
8443
- ).forEach((Pe, je) => {
8439
+ if (!re.some((Te) => Te.dir === "up") || !re.some((Te) => Te.dir === "down") || !re.some((Te) => Te.dir === "up" && re.some((je) => je.dir === "down" && je.row < Te.row))) continue;
8440
+ const Oe = [...re].sort((Te, je) => Te.row - je.row);
8441
+ [...re.filter((Te) => Te.dir === "up"), ...re.filter((Te) => Te.dir === "down")].sort(
8442
+ (Te, je) => Te.dir === je.dir ? Te.row - je.row : Te.dir === "up" ? -1 : 1
8443
+ ).forEach((Te, je) => {
8444
8444
  const Ke = Oe[je].band;
8445
- if (Ke !== Pe.band) {
8446
- ne.add(me.node.id);
8447
- for (const xe of Pe.subtree) V(xe) === Pe.band && ie.set(xe.node.id, Ke);
8445
+ if (Ke !== Te.band) {
8446
+ oe.add(me.node.id);
8447
+ for (const xe of Te.subtree) V(xe) === Te.band && ne.set(xe.node.id, Ke);
8448
8448
  }
8449
8449
  });
8450
8450
  }
8451
8451
  const wt = (me) => {
8452
8452
  if (!A) return;
8453
8453
  const ye = new Set(me.map((Oe) => Oe.node.id));
8454
- let oe = !1, de = !1;
8454
+ let re = !1, de = !1;
8455
8455
  for (const Oe of _) {
8456
8456
  if (!ye.has(Oe.flow.target)) continue;
8457
8457
  const We = he(Oe.flow.source);
8458
- !We || We.id === A.id || (We.y < A.y ? oe = !0 : de = !0);
8458
+ !We || We.id === A.id || (We.y < A.y ? re = !0 : de = !0);
8459
8459
  }
8460
- return oe && !de ? "up" : de && !oe ? "down" : void 0;
8460
+ return re && !de ? "up" : de && !re ? "down" : void 0;
8461
8461
  };
8462
8462
  for (const me of C.nodes) {
8463
8463
  if (!Wt(me.node.type)) continue;
8464
- const ye = me.node.lane ?? `pool:${v}`, oe = ve.get(ye);
8465
- if (!oe || oe.size < 2) continue;
8466
- const de = oe.get(0);
8464
+ const ye = me.node.lane ?? `pool:${v}`, re = ve.get(ye);
8465
+ if (!re || re.size < 2) continue;
8466
+ const de = re.get(0);
8467
8467
  if (de === void 0) continue;
8468
- const Oe = Math.max(...oe.values()), We = de === Oe && de !== 0 ? "down" : void 0;
8468
+ const Oe = Math.max(...re.values()), We = de === Oe && de !== 0 ? "down" : void 0;
8469
8469
  if (!We) continue;
8470
- const Pe = [];
8471
- for (const Ce of C.flows) {
8472
- if (Ce.flow.source !== me.node.id) continue;
8473
- const _t = P.get(Ce.flow.target);
8474
- if (!_t || _t.node.lane !== me.node.lane || (Z.get(_t.node.id) ?? 0) !== 1) continue;
8475
- const gt = Me(_t);
8476
- gt !== void 0 && Pe.push({ t: _t, subtree: ze(_t.node.id), band: gt });
8470
+ const Te = [];
8471
+ for (const Me of C.flows) {
8472
+ if (Me.flow.source !== me.node.id) continue;
8473
+ const _t = P.get(Me.flow.target);
8474
+ if (!_t || _t.node.lane !== me.node.lane || (te.get(_t.node.id) ?? 0) !== 1) continue;
8475
+ const gt = Ae(_t);
8476
+ gt !== void 0 && Te.push({ t: _t, subtree: ze(_t.node.id), band: gt });
8477
8477
  }
8478
- const je = Pe.find((Ce) => (oe.get(Ce.band) ?? Ce.band) === de);
8478
+ const je = Te.find((Me) => (re.get(Me.band) ?? Me.band) === de);
8479
8479
  if (!je || wt(je.subtree) === We || Ge(je.subtree) === We) continue;
8480
- const Ke = Pe.find((Ce) => Ce !== je && wt(Ce.subtree) === We);
8480
+ const Ke = Te.find((Me) => Me !== je && wt(Me.subtree) === We);
8481
8481
  if (!Ke) continue;
8482
8482
  const xe = je.band, nt = Ke.band;
8483
- for (const Ce of je.subtree) Me(Ce) === xe && ie.set(Ce.node.id, nt);
8484
- for (const Ce of Ke.subtree) Me(Ce) === nt && ie.set(Ce.node.id, xe);
8485
- ne.add(me.node.id);
8483
+ for (const Me of je.subtree) Ae(Me) === xe && ne.set(Me.node.id, nt);
8484
+ for (const Me of Ke.subtree) Ae(Me) === nt && ne.set(Me.node.id, xe);
8485
+ oe.add(me.node.id);
8486
8486
  }
8487
8487
  for (const me of C.nodes) {
8488
8488
  if (!Wt(me.node.type)) continue;
8489
- const ye = ce(me);
8489
+ const ye = se(me);
8490
8490
  if (Number.isNaN(ye) || S.some(
8491
- (Pe) => {
8491
+ (Te) => {
8492
8492
  var je, Ke;
8493
- return (((je = Pe.placement) == null ? void 0 : je.anchor) ?? (Pe.association ? Pe.association.source === Pe.annotation.id ? Pe.association.target : Pe.association.source : void 0)) === me.node.id && ((Ke = Pe.placement) == null ? void 0 : Ke.side.startsWith("bottom"));
8493
+ return (((je = Te.placement) == null ? void 0 : je.anchor) ?? (Te.association ? Te.association.source === Te.annotation.id ? Te.association.target : Te.association.source : void 0)) === me.node.id && ((Ke = Te.placement) == null ? void 0 : Ke.side.startsWith("bottom"));
8494
8494
  }
8495
8495
  )) continue;
8496
8496
  let de, Oe = !1, We;
8497
- for (const Pe of C.flows) {
8498
- if (Pe.flow.source !== me.node.id) continue;
8499
- const je = P.get(Pe.flow.target);
8497
+ for (const Te of C.flows) {
8498
+ if (Te.flow.source !== me.node.id) continue;
8499
+ const je = P.get(Te.flow.target);
8500
8500
  if (!je || !je.node.lane && V(je) === void 0) continue;
8501
- const Ke = ce(je);
8501
+ const Ke = se(je);
8502
8502
  Number.isNaN(Ke) || (Math.abs(Ke - ye) < 0.5 && (Oe = !0), Ke > ye ? !de || Ke > de.row ? de = { id: je.node.id, row: Ke, count: 1 } : Ke === de.row && de.count++ : Ke < ye && je.node.lane === me.node.lane && (!We || Ke > We.row ? We = { op: je, row: Ke, count: 1 } : Ke === We.row && We.count++));
8503
8503
  }
8504
- de && de.count === 1 && (Z.get(de.id) ?? 0) === 1 && !ne.has(me.node.id) && X.add(de.id), !Oe && We && We.count === 1 && (Z.get(We.op.node.id) ?? 0) === 1 && !Ae.has(me.node.id) && pe.set(We.op.node.id, { lane: me.node.lane, band: Me(me) });
8504
+ de && de.count === 1 && (te.get(de.id) ?? 0) === 1 && !oe.has(me.node.id) && X.add(de.id), !Oe && We && We.count === 1 && (te.get(We.op.node.id) ?? 0) === 1 && !Pe.has(me.node.id) && pe.set(We.op.node.id, { lane: me.node.lane, band: Ae(me) });
8505
8505
  }
8506
8506
  const Dt = /* @__PURE__ */ new Map();
8507
8507
  for (const me of _) Dt.set(me.flow.target, [...Dt.get(me.flow.target) ?? [], me]);
8508
8508
  for (const me of C.nodes) {
8509
8509
  const ye = Dt.get(me.node.id);
8510
- if (!ye || ye.length !== 1 || !Z.get(me.node.id) || !me.node.lane && V(me) === void 0 || N.has(me.node.id)) continue;
8511
- const oe = (Lh = P.get(ye[0].flow.source)) == null ? void 0 : Lh.node.participant, de = oe ? p(oe) : void 0;
8510
+ if (!ye || ye.length !== 1 || !te.get(me.node.id) || !me.node.lane && V(me) === void 0 || N.has(me.node.id)) continue;
8511
+ const re = (Lh = P.get(ye[0].flow.source)) == null ? void 0 : Lh.node.participant, de = re ? p(re) : void 0;
8512
8512
  if (!de || !A || de.id === A.id) continue;
8513
8513
  const Oe = me.node.lane ?? `pool:${v}`, We = ve.get(Oe);
8514
8514
  if (!We) continue;
8515
- const Pe = We.get(0) ?? 0, je = (We.get(Me(me) ?? 0) ?? Pe) - Pe;
8515
+ const Te = We.get(0) ?? 0, je = (We.get(Ae(me) ?? 0) ?? Te) - Te;
8516
8516
  if (je === 0) continue;
8517
8517
  const Ke = de.y < A.y;
8518
8518
  if (Ke && je < 0 || !Ke && je > 0) continue;
8519
8519
  let xe;
8520
- for (const [nt, Ce] of We) {
8521
- const _t = Ce - Pe;
8520
+ for (const [nt, Me] of We) {
8521
+ const _t = Me - Te;
8522
8522
  (Ke && _t < 0 && (!xe || _t < xe.row) || !Ke && _t > 0 && (!xe || _t > xe.row)) && (xe = { band: nt, row: _t });
8523
8523
  }
8524
8524
  xe && ge.set(me.node.id, { lane: me.node.lane, band: xe.band });
8525
8525
  }
8526
8526
  }
8527
8527
  const st = /* @__PURE__ */ new Set();
8528
- let Te = 0;
8529
- for (; Te++ < C.nodes.length + 2; ) {
8530
- for (let ne = 0; ne < C.nodes.length + C.flows.length + 2; ne++) {
8528
+ let Re = 0;
8529
+ for (; Re++ < C.nodes.length + 2; ) {
8530
+ for (let oe = 0; oe < C.nodes.length + C.flows.length + 2; oe++) {
8531
8531
  let he = !1;
8532
8532
  for (const ze of C.flows) {
8533
8533
  const Ge = ze.flow;
@@ -8536,18 +8536,18 @@ function VR(e, t) {
8536
8536
  if (!wt) continue;
8537
8537
  const Dt = p(Ge.target), me = P.get(Ge.target);
8538
8538
  if (!Dt && me) {
8539
- const ye = ai(me.node, me.band), oe = Me(me);
8540
- if (me.node.lane || oe !== void 0) {
8541
- const de = F(me.node), Oe = wt, We = Oe.x + (Se.get(Ge.source) ?? 0) + Oe.width + j, Pe = pe.get(Ge.target) ?? ge.get(Ge.target), je = L(
8539
+ const ye = ai(me.node, me.band), re = Ae(me);
8540
+ if (me.node.lane || re !== void 0) {
8541
+ const de = F(me.node), Oe = wt, We = Oe.x + (Se.get(Ge.source) ?? 0) + Oe.width + j, Te = pe.get(Ge.target) ?? ge.get(Ge.target), je = L(
8542
8542
  de,
8543
8543
  ye,
8544
- Pe ? Pe.lane : me.node.lane,
8545
- Pe ? Pe.band : oe,
8544
+ Te ? Te.lane : me.node.lane,
8545
+ Te ? Te.band : re,
8546
8546
  X.has(Ge.target) ? Oe.x + Oe.width / 2 : We,
8547
8547
  Number.NaN,
8548
8548
  // B-84 ⓐ — 승격·수신 행(B-17 ⓑ · B-18 ⓐ)은 **행을 명시한 것**이라 승계 대상이 아니고,
8549
8549
  // 합류(유입 ≥ 2)는 물려받을 행이 유일하지 않다(위 `inheritsRowFrom` 주석).
8550
- Pe || !bt(Ge.target) ? void 0 : Oe.y + Oe.height / 2
8550
+ Te || !bt(Ge.target) ? void 0 : Oe.y + Oe.height / 2
8551
8551
  ), Ke = n.createShape(ye, je, de);
8552
8552
  X.has(Ge.target) && Se.set(Ge.target, We - (Ke.x + Ke.width / 2)), n.connect(wt, Ke, { type: "bpmn:SequenceFlow", businessObject: Hn(Ge) });
8553
8553
  } else
@@ -8562,12 +8562,12 @@ function VR(e, t) {
8562
8562
  }
8563
8563
  if (!he) break;
8564
8564
  }
8565
- const Z = C.nodes.filter((ne) => !p(ne.node.id));
8566
- if (!Z.length) break;
8567
- const ce = Z[0];
8565
+ const te = C.nodes.filter((oe) => !p(oe.node.id));
8566
+ if (!te.length) break;
8567
+ const se = te[0];
8568
8568
  {
8569
- const ne = ai(ce.node, ce.band), he = F(ce.node), ze = V(ce);
8570
- n.createShape(ne, L(he, ne, ce.node.lane, ze, O, B), he), !ce.node.lane && ze === void 0 && (B += 160);
8569
+ const oe = ai(se.node, se.band), he = F(se.node), ze = V(se);
8570
+ n.createShape(oe, L(he, oe, se.node.lane, ze, O, B), he), !se.node.lane && ze === void 0 && (B += 160);
8571
8571
  }
8572
8572
  }
8573
8573
  }
@@ -8584,45 +8584,45 @@ function VR(e, t) {
8584
8584
  ...Xt(e, "sequenceFlow.update").map((v) => v.id),
8585
8585
  ...Xt(e, "messageFlow.update").map((v) => v.id)
8586
8586
  ].filter((v) => !!v)), k0 = (v, C, A, O, B, D) => {
8587
- const H = new Set(v.map((Z) => Z.id)), F = Math.min(...v.map((Z) => Z.x)) + C - rt, L = Math.max(...v.map((Z) => Z.x + Z.width)) + C + yt + rt, U = Math.min(...v.map((Z) => Z.y + Math.min(0, ...A))) - rt, Y = Math.max(...v.map((Z) => Z.y + Z.height + Math.max(0, ...A))) + rt, re = o.getAll().filter((Z) => {
8588
- if (Z.type !== "bpmn:SequenceFlow" && Z.type !== "bpmn:MessageFlow") return !1;
8589
- const ce = Z;
8590
- return js.has(ce.id) || !ce.waypoints || ce.waypoints.length < 2 || [ce.source, ce.target].some((he) => !he || H.has(he.id) || he.x >= O) ? !1 : ce.waypoints.some((he, ze) => {
8591
- const Ge = ce.waypoints[ze + 1];
8587
+ const H = new Set(v.map((te) => te.id)), F = Math.min(...v.map((te) => te.x)) + C - rt, L = Math.max(...v.map((te) => te.x + te.width)) + C + yt + rt, U = Math.min(...v.map((te) => te.y + Math.min(0, ...A))) - rt, Y = Math.max(...v.map((te) => te.y + te.height + Math.max(0, ...A))) + rt, ie = o.getAll().filter((te) => {
8588
+ if (te.type !== "bpmn:SequenceFlow" && te.type !== "bpmn:MessageFlow") return !1;
8589
+ const se = te;
8590
+ return js.has(se.id) || !se.waypoints || se.waypoints.length < 2 || [se.source, se.target].some((he) => !he || H.has(he.id) || he.x >= O) ? !1 : se.waypoints.some((he, ze) => {
8591
+ const Ge = se.waypoints[ze + 1];
8592
8592
  return !!Ge && Math.max(he.x, Ge.x) >= F && Math.min(he.x, Ge.x) <= L && Math.max(he.y, Ge.y) >= U && Math.min(he.y, Ge.y) <= Y;
8593
8593
  });
8594
8594
  });
8595
- if (!re.length) return 0;
8596
- const X = (Z) => {
8597
- const ce = /* @__PURE__ */ new Map();
8598
- for (const ne of v)
8595
+ if (!ie.length) return 0;
8596
+ const X = (te) => {
8597
+ const se = /* @__PURE__ */ new Map();
8598
+ for (const oe of v)
8599
8599
  for (const he of A) {
8600
- const ze = { id: ne.id, type: ne.type, x: ne.x + C + Z, y: ne.y + he, width: ne.width, height: ne.height };
8601
- for (const Ge of re) {
8600
+ const ze = { id: oe.id, type: oe.type, x: oe.x + C + te, y: oe.y + he, width: oe.width, height: oe.height };
8601
+ for (const Ge of ie) {
8602
8602
  let wt = 1 / 0;
8603
8603
  for (let me = 0; me + 1 < Ge.waypoints.length; me++) wt = Math.min(wt, Bu(Ge.waypoints[me], Ge.waypoints[me + 1], ze));
8604
- const Dt = `${Ge.id}|${ne.id}`;
8605
- ce.set(Dt, Math.min(ce.get(Dt) ?? 1 / 0, wt));
8604
+ const Dt = `${Ge.id}|${oe.id}`;
8605
+ se.set(Dt, Math.min(se.get(Dt) ?? 1 / 0, wt));
8606
8606
  }
8607
8607
  }
8608
- return ce;
8609
- }, pe = [...X(0)].filter(([, Z]) => Z <= zn).map(([Z]) => Z);
8608
+ return se;
8609
+ }, pe = [...X(0)].filter(([, te]) => te <= zn).map(([te]) => te);
8610
8610
  if (!pe.length) return 0;
8611
8611
  let ge = 0;
8612
- for (let Z = 1; Z <= yt; Z++) {
8613
- const ce = X(Z);
8614
- if ([...ce.values()].every((ne) => ne > zn) && pe.every((ne) => (ce.get(ne) ?? 1 / 0) >= rt)) {
8615
- ge = Z;
8612
+ for (let te = 1; te <= yt; te++) {
8613
+ const se = X(te);
8614
+ if ([...se.values()].every((oe) => oe > zn) && pe.every((oe) => (se.get(oe) ?? 1 / 0) >= rt)) {
8615
+ ge = te;
8616
8616
  break;
8617
8617
  }
8618
8618
  }
8619
8619
  if (!ge) return 0;
8620
- const Se = Math.min(...v.map((Z) => Z.x)) + C + ge, st = new Set(pe.map((Z) => Z.slice(0, Z.indexOf("|"))));
8621
- return re.some(
8622
- (Z) => Z.type === "bpmn:SequenceFlow" && st.has(Z.id) && Z.waypoints.some((ce, ne) => {
8623
- const he = Z.waypoints[ne + 1];
8624
- if (!he || Math.min(ce.y, he.y) > D || Math.max(ce.y, he.y) < D || ce.y === he.y) return !1;
8625
- const ze = ce.x + (D - ce.y) * (he.x - ce.x) / (he.y - ce.y);
8620
+ const Se = Math.min(...v.map((te) => te.x)) + C + ge, st = new Set(pe.map((te) => te.slice(0, te.indexOf("|"))));
8621
+ return ie.some(
8622
+ (te) => te.type === "bpmn:SequenceFlow" && st.has(te.id) && te.waypoints.some((se, oe) => {
8623
+ const he = te.waypoints[oe + 1];
8624
+ if (!he || Math.min(se.y, he.y) > D || Math.max(se.y, he.y) < D || se.y === he.y) return !1;
8625
+ const ze = se.x + (D - se.y) * (he.x - se.x) / (he.y - se.y);
8626
8626
  return ze > B && ze < Se;
8627
8627
  })
8628
8628
  ) ? 0 : ge;
@@ -8659,10 +8659,10 @@ function VR(e, t) {
8659
8659
  }, ki = 30, Ki = (v) => !("waypoints" in v && v.waypoints) && v.type !== "bpmn:Lane" && v.type !== "label" && typeof v.x == "number", Hs = (v, C) => Sp(n, v, C), _a = (v, C, A = !1) => {
8660
8660
  const O = new Set(v.flatMap((L) => L.subtree.map((U) => U.id)));
8661
8661
  for (const L of v) {
8662
- const U = (L.pool.children ?? []).filter(Ki).filter((re) => !O.has(re.id));
8662
+ const U = (L.pool.children ?? []).filter(Ki).filter((ie) => !O.has(ie.id));
8663
8663
  if (L.subtree.some(
8664
- (re) => U.some(
8665
- (X) => re.x + C < X.x + X.width + ki && re.x + C + re.width + ki > X.x && re.y < X.y + X.height && re.y + re.height > X.y
8664
+ (ie) => U.some(
8665
+ (X) => ie.x + C < X.x + X.width + ki && ie.x + C + ie.width + ki > X.x && ie.y < X.y + X.height && ie.y + ie.height > X.y
8666
8666
  )
8667
8667
  )) return null;
8668
8668
  }
@@ -8679,7 +8679,7 @@ function VR(e, t) {
8679
8679
  { x: C, y: 0 }
8680
8680
  );
8681
8681
  const F = v.map((L) => {
8682
- const Y = Math.max(...L.subtree.map((re) => re.x + re.width)) + Lb - (L.pool.x + L.pool.width);
8682
+ const Y = Math.max(...L.subtree.map((ie) => ie.x + ie.width)) + Lb - (L.pool.x + L.pool.width);
8683
8683
  return Y > 0 && Hs(L.pool, L.pool.width + Y), Y;
8684
8684
  });
8685
8685
  return () => {
@@ -8696,8 +8696,8 @@ function VR(e, t) {
8696
8696
  for (let L = 0; L < 3; L++) {
8697
8697
  let U = 0;
8698
8698
  for (const Y of H) {
8699
- const re = Y.x - Y.label.x, X = Y.y - Y.label.y;
8700
- Math.abs(re) <= 0.5 && Math.abs(X) <= 0.5 || (n.moveElements([Y.label], { x: re, y: X }), U++);
8699
+ const ie = Y.x - Y.label.x, X = Y.y - Y.label.y;
8700
+ Math.abs(ie) <= 0.5 && Math.abs(X) <= 0.5 || (n.moveElements([Y.label], { x: ie, y: X }), U++);
8701
8701
  }
8702
8702
  if (!U) break;
8703
8703
  }
@@ -8727,9 +8727,9 @@ function VR(e, t) {
8727
8727
  ...O.filter((Y) => (Y.children ?? []).length > 0).map((Y) => Y.x)
8728
8728
  ), D = new Set(v.filter((Y) => Math.abs(Y.x - B) <= 2).map((Y) => Y.id));
8729
8729
  if (v.some((Y) => {
8730
- const re = D.has(Y.id) ? Y.x : Y.x + C, X = D.has(Y.id) ? Y.width + C : Y.width;
8730
+ const ie = D.has(Y.id) ? Y.x : Y.x + C, X = D.has(Y.id) ? Y.width + C : Y.width;
8731
8731
  return O.some(
8732
- (pe) => re < pe.x + pe.width + ki && re + X + ki > pe.x && Y.y < pe.y + pe.height && Y.y + Y.height > pe.y
8732
+ (pe) => ie < pe.x + pe.width + ki && ie + X + ki > pe.x && Y.y < pe.y + pe.height && Y.y + Y.height > pe.y
8733
8733
  );
8734
8734
  })) return null;
8735
8735
  const F = o.filter((Y) => Y.type === "label").map((Y) => ({
@@ -8738,17 +8738,17 @@ function VR(e, t) {
8738
8738
  y: Y.y
8739
8739
  })), L = v.filter((Y) => !D.has(Y.id)), U = v.filter((Y) => D.has(Y.id)).map((Y) => ({ pool: Y, was: { x: Y.x, y: Y.y, width: Y.width, height: Y.height } }));
8740
8740
  L.length && n.moveElements(L, { x: C, y: 0 });
8741
- for (const { pool: Y, was: re } of U) n.resizeShape(Y, { ...re, width: re.width + C });
8741
+ for (const { pool: Y, was: ie } of U) n.resizeShape(Y, { ...ie, width: ie.width + C });
8742
8742
  return () => {
8743
- for (const { pool: Y, was: re } of U) n.resizeShape(Y, re);
8743
+ for (const { pool: Y, was: ie } of U) n.resizeShape(Y, ie);
8744
8744
  L.length && n.moveElements(L, { x: -C, y: 0 });
8745
8745
  for (let Y = 0; Y < 3; Y++) {
8746
- let re = 0;
8746
+ let ie = 0;
8747
8747
  for (const X of F) {
8748
8748
  const pe = X.x - X.label.x, ge = X.y - X.label.y;
8749
- Math.abs(pe) <= 0.5 && Math.abs(ge) <= 0.5 || (n.moveElements([X.label], { x: pe, y: ge }), re++);
8749
+ Math.abs(pe) <= 0.5 && Math.abs(ge) <= 0.5 || (n.moveElements([X.label], { x: pe, y: ge }), ie++);
8750
8750
  }
8751
- if (!re) break;
8751
+ if (!ie) break;
8752
8752
  }
8753
8753
  };
8754
8754
  }, ph = () => {
@@ -8780,7 +8780,7 @@ function VR(e, t) {
8780
8780
  const H = (L) => {
8781
8781
  if (!("waypoints" in L && L.waypoints)) return [L.id];
8782
8782
  const U = L, Y = [U.source, U.target];
8783
- return Y.some((re) => !re) ? [] : Y.map((re) => re.id);
8783
+ return Y.some((ie) => !ie) ? [] : Y.map((ie) => ie.id);
8784
8784
  }, F = D.flatMap((L) => H(L));
8785
8785
  F.length && F.every((L) => v.has(L)) && C.push(O);
8786
8786
  }
@@ -8853,28 +8853,28 @@ function VR(e, t) {
8853
8853
  if (!B || !D || D.id === A.id) continue;
8854
8854
  const H = O.waypoints && O.waypoints.length >= 3 && Math.abs(O.waypoints[0].x - O.waypoints[1].x) < 1 && Math.abs(O.waypoints[0].y - O.waypoints[1].y) > 1 ? { x: O.waypoints[0].x, y: O.waypoints[0].y } : void 0, F = H ? O.waypoints[1].y : void 0, L = H && O.label ? { x: O.label.x, y: O.label.y } : void 0, U = L && O.label && Math.abs(L.y + O.label.height / 2 - F) <= I / 5 && L.x + O.label.width > H.x ? L.x + O.label.width + 6 : void 0, Y = (B.outgoing ?? []).filter(
8855
8855
  (xe) => xe.type === "bpmn:SequenceFlow" && xe.id !== O.id && xe.target && !js.has(xe.id)
8856
- ), re = new Set(Y.map((xe) => xe.target.id)), X = (xe) => {
8856
+ ), ie = new Set(Y.map((xe) => xe.target.id)), X = (xe) => {
8857
8857
  const nt = { type: "bpmn:Task", x: xe.x + 2, y: xe.y + 2, width: xe.width - 4, height: xe.height - 4 };
8858
8858
  return Y.find(
8859
- (Ce) => (Ce.waypoints ?? []).some((_t, gt) => !!Ce.waypoints[gt + 1] && Bu(_t, Ce.waypoints[gt + 1], nt) === 0)
8859
+ (Me) => (Me.waypoints ?? []).some((_t, gt) => !!Me.waypoints[gt + 1] && Bu(_t, Me.waypoints[gt + 1], nt) === 0)
8860
8860
  );
8861
- }, pe = Zr(v.target), ge = new Set(pe.map((xe) => xe.id)), Se = Math.min(...pe.map((xe) => xe.x)), st = Math.max(...pe.map((xe) => xe.x + xe.width)), Te = B.x + B.width, Z = A.y + A.height / 2, ce = k0(
8861
+ }, pe = Zr(v.target), ge = new Set(pe.map((xe) => xe.id)), Se = Math.min(...pe.map((xe) => xe.x)), st = Math.max(...pe.map((xe) => xe.x + xe.width)), Re = B.x + B.width, te = A.y + A.height / 2, se = k0(
8862
8862
  pe,
8863
- Te + ci - Se,
8864
- [0, B.y + B.height / 2 - Z, D.y + D.height / 2 - Z],
8863
+ Re + ci - Se,
8864
+ [0, B.y + B.height / 2 - te, D.y + D.height / 2 - te],
8865
8865
  D.x,
8866
- Te,
8866
+ Re,
8867
8867
  B.y + B.height / 2
8868
- ), ne = Te + ci + ce, he = (() => {
8868
+ ), oe = Re + ci + se, he = (() => {
8869
8869
  if (U === void 0) return 0;
8870
- const xe = Te + ci, nt = B.y + B.height / 2 - A.height / 2, Ce = { x: xe, y: nt, width: st - Se, height: A.height }, _t = d(B);
8870
+ const xe = Re + ci, nt = B.y + B.height / 2 - A.height / 2, Me = { x: xe, y: nt, width: st - Se, height: A.height }, _t = d(B);
8871
8871
  return ((_t == null ? void 0 : _t.children) ?? []).some(
8872
- (dt) => Ki(dt) && !ge.has(dt.id) && dt.id !== B.id && dt.id !== D.id && dt.type !== "bpmn:Group" && dt.type !== "bpmn:Participant" && dt.x < Ce.x + Ce.width && dt.x + dt.width > Ce.x && dt.y < Ce.y + Ce.height && dt.y + dt.height > Ce.y
8873
- ) || X(Ce) ? Math.max(0, U - xe) : 0;
8874
- })(), ze = st - Se + ci * 2 + ce + he - (D.x - Te);
8872
+ (dt) => Ki(dt) && !ge.has(dt.id) && dt.id !== B.id && dt.id !== D.id && dt.type !== "bpmn:Group" && dt.type !== "bpmn:Participant" && dt.x < Me.x + Me.width && dt.x + dt.width > Me.x && dt.y < Me.y + Me.height && dt.y + dt.height > Me.y
8873
+ ) || X(Me) ? Math.max(0, U - xe) : 0;
8874
+ })(), ze = st - Se + ci * 2 + se + he - (D.x - Re);
8875
8875
  let Ge = [];
8876
8876
  if (ze > 0) {
8877
- const xe = d(A), nt = (xe == null ? void 0 : xe.children) ?? [], Ce = (Ie) => Ie.type === "bpmn:Lane";
8877
+ const xe = d(A), nt = (xe == null ? void 0 : xe.children) ?? [], Me = (Ie) => Ie.type === "bpmn:Lane";
8878
8878
  Ge = (() => {
8879
8879
  const Ie = /* @__PURE__ */ new Set();
8880
8880
  for (const Ne of nt)
@@ -8888,8 +8888,8 @@ function VR(e, t) {
8888
8888
  return St;
8889
8889
  })();
8890
8890
  const gt = nt.filter(
8891
- (Ie) => !("waypoints" in Ie && Ie.waypoints) && !Ce(Ie) && Ie.type !== "label" && !ge.has(Ie.id) && Ie.id !== B.id && Ie.x >= D.x
8892
- ), dt = gt.flatMap((Ie) => Ie.labels ?? []), kt = xe ? [xe, ...nt.filter((Ie) => Ce(Ie))] : [];
8891
+ (Ie) => !("waypoints" in Ie && Ie.waypoints) && !Me(Ie) && Ie.type !== "label" && !ge.has(Ie.id) && Ie.id !== B.id && Ie.x >= D.x
8892
+ ), dt = gt.flatMap((Ie) => Ie.labels ?? []), kt = xe ? [xe, ...nt.filter((Ie) => Me(Ie))] : [];
8893
8893
  if (gt.length) {
8894
8894
  const Ie = new Set(gt.map((tt) => tt.id)), St = gh(Ie), Ne = St.length ? I0(Ie, St, xe) : null, vt = (tt) => {
8895
8895
  const mt = new Set(Ie);
@@ -8956,28 +8956,28 @@ function VR(e, t) {
8956
8956
  if (!wt) return !0;
8957
8957
  const nt = xe.y + xe.height / 2;
8958
8958
  return nt >= wt.y && nt <= wt.y + wt.height;
8959
- }, me = !Dt(B) && Dt(D) ? D : B, ye = me.y + me.height / 2, oe = ye - (A.y + A.height / 2), de = C.band !== void 0, Oe = de ? [A] : pe, We = (
8959
+ }, me = !Dt(B) && Dt(D) ? D : B, ye = me.y + me.height / 2, re = ye - (A.y + A.height / 2), de = C.band !== void 0, Oe = de ? [A] : pe, We = (
8960
8960
  // ── B-89. 삽입도 같은 축이다 — band 가 **상류 행의 슬롯**을 가리키면 승계한다 ──
8961
8961
  // 🔁 「add/update 경로 갈림」의 동형이라 `freeSpot` 과 **같은 술어**를 쓴다(한쪽만 넓히면 구멍).
8962
8962
  (C.band === void 0 || x(C.node.lane, C.node.participant, C.band, ye)) && bt(v.target) && Oe.every(
8963
8963
  (xe) => {
8964
8964
  var nt;
8965
- return gn((nt = P.get(xe.id)) == null ? void 0 : nt.node.lane, xe, xe.y + xe.height / 2 + oe);
8965
+ return gn((nt = P.get(xe.id)) == null ? void 0 : nt.node.lane, xe, xe.y + xe.height / 2 + re);
8966
8966
  }
8967
8967
  )
8968
- ), Pe = (xe) => Math.abs(xe.y + xe.height / 2 - (A.y + A.height / 2)) <= I / 2;
8968
+ ), Te = (xe) => Math.abs(xe.y + xe.height / 2 - (A.y + A.height / 2)) <= I / 2;
8969
8969
  if (We && de) {
8970
- const xe = Math.abs(oe) <= I / 2 ? pe.filter((nt) => nt.id !== A.id && Pe(nt)) : [];
8971
- if (n.moveElements(pe, { x: ne - Se, y: 0 }), n.moveElements([A], { x: 0, y: oe }), xe.length) {
8972
- const nt = () => new Set(ht(Xe(o)).map((Ie) => ft(Ie))), Ce = nt(), _t = o.filter((Ie) => Ie.type === "label").map((Ie) => ({
8970
+ const xe = Math.abs(re) <= I / 2 ? pe.filter((nt) => nt.id !== A.id && Te(nt)) : [];
8971
+ if (n.moveElements(pe, { x: oe - Se, y: 0 }), n.moveElements([A], { x: 0, y: re }), xe.length) {
8972
+ const nt = () => new Set(ht(Xe(o)).map((Ie) => ft(Ie))), Me = nt(), _t = o.filter((Ie) => Ie.type === "label").map((Ie) => ({
8973
8973
  label: Ie,
8974
8974
  x: Ie.x,
8975
8975
  y: Ie.y
8976
8976
  }));
8977
- n.moveElements(xe, { x: 0, y: oe });
8978
- const gt = nt(), dt = [...gt].filter((Ie) => !Ce.has(Ie)).length, kt = [...Ce].filter((Ie) => !gt.has(Ie)).length;
8977
+ n.moveElements(xe, { x: 0, y: re });
8978
+ const gt = nt(), dt = [...gt].filter((Ie) => !Me.has(Ie)).length, kt = [...Me].filter((Ie) => !gt.has(Ie)).length;
8979
8979
  if (dt > kt) {
8980
- n.moveElements(xe, { x: 0, y: -oe });
8980
+ n.moveElements(xe, { x: 0, y: -re });
8981
8981
  for (const Ie of _t) {
8982
8982
  const St = Ie.x - Ie.label.x, Ne = Ie.y - Ie.label.y;
8983
8983
  (St !== 0 || Ne !== 0) && n.moveElements([Ie.label], { x: St, y: Ne });
@@ -8986,19 +8986,19 @@ function VR(e, t) {
8986
8986
  }
8987
8987
  } else
8988
8988
  n.moveElements(pe, {
8989
- x: ne - Se,
8990
- y: We ? oe : 0
8989
+ x: oe - Se,
8990
+ y: We ? re : 0
8991
8991
  });
8992
8992
  const je = d(A);
8993
8993
  if (!We && C.node.lane === void 0 && C.band !== void 0 && je) {
8994
- const xe = je.y + ee + R(`pool:${C.node.participant ?? ""}`, C.band) * I, nt = xe - (A.y + A.height / 2);
8995
- nt !== 0 && !Q(je, A, A.x + A.width / 2, xe, ge) && n.moveElements([A], { x: 0, y: nt });
8994
+ const xe = je.y + J + R(`pool:${C.node.participant ?? ""}`, C.band) * I, nt = xe - (A.y + A.height / 2);
8995
+ nt !== 0 && !Z(je, A, A.x + A.width / 2, xe, ge) && n.moveElements([A], { x: 0, y: nt });
8996
8996
  }
8997
8997
  if (je) {
8998
8998
  const xe = (je.children ?? []).filter(
8999
8999
  (gt) => Ki(gt) && !ge.has(gt.id) && gt.type !== "bpmn:Group" && gt.type !== "bpmn:Participant"
9000
- ), nt = (gt, dt, kt, Ie, St) => gt.x + dt < St.x + St.width + Ie && gt.x + dt + gt.width + Ie > St.x && gt.y + kt < St.y + St.height + Ie && gt.y + kt + gt.height + Ie > St.y, Ce = xe.find((gt) => nt(A, 0, 0, 0, gt)), _t = Ce ? void 0 : X(A);
9001
- if (Ce || _t) {
9000
+ ), nt = (gt, dt, kt, Ie, St) => gt.x + dt < St.x + St.width + Ie && gt.x + dt + gt.width + Ie > St.x && gt.y + kt < St.y + St.height + Ie && gt.y + kt + gt.height + Ie > St.y, Me = xe.find((gt) => nt(A, 0, 0, 0, gt)), _t = Me ? void 0 : X(A);
9001
+ if (Me || _t) {
9002
9002
  const gt = ["bpmn:SequenceFlow", "bpmn:MessageFlow", "bpmn:Association", "bpmn:DataInputAssociation", "bpmn:DataOutputAssociation"], dt = o.getAll().filter((ct) => {
9003
9003
  if (!gt.includes(ct.type)) return !1;
9004
9004
  const qt = ct;
@@ -9015,7 +9015,7 @@ function VR(e, t) {
9015
9015
  })
9016
9016
  ), St = A.y + A.height / 2, Ne = [F, D.y + D.height / 2].filter(
9017
9017
  (ct) => ct !== void 0 && Math.abs(ct - St) >= 1
9018
- ), vt = Ce && re.has(Ce.id) ? Ce : _t == null ? void 0 : _t.target, On = vt ? vt.x - A.x : 0, Bn = Math.max(...pe.map((ct) => ct.x + ct.width)), Ut = [...On !== 0 ? [On] : [], ...ce !== 0 ? [-ce] : [], 0], Us = U === void 0 ? [] : Ut.map((ct) => Math.max(ct, U - A.x)), qs = (ct) => Bn + ct + ci <= D.x, Ys = [.../* @__PURE__ */ new Set([...Us, ...Ut])].filter(qs), Sa = Ce && re.has(Ce.id) ? [Ce.x + Ce.width + ci - A.x] : [], Iu = U === void 0 ? [] : Sa.map((ct) => Math.max(ct, U - A.x)), Ks = [.../* @__PURE__ */ new Set([...Iu, ...Sa])].filter((ct) => qs(ct) && !Ys.includes(ct));
9018
+ ), vt = Me && ie.has(Me.id) ? Me : _t == null ? void 0 : _t.target, On = vt ? vt.x - A.x : 0, Bn = Math.max(...pe.map((ct) => ct.x + ct.width)), Ut = [...On !== 0 ? [On] : [], ...se !== 0 ? [-se] : [], 0], Us = U === void 0 ? [] : Ut.map((ct) => Math.max(ct, U - A.x)), qs = (ct) => Bn + ct + ci <= D.x, Ys = [.../* @__PURE__ */ new Set([...Us, ...Ut])].filter(qs), Sa = Me && ie.has(Me.id) ? [Me.x + Me.width + ci - A.x] : [], Iu = U === void 0 ? [] : Sa.map((ct) => Math.max(ct, U - A.x)), Ks = [.../* @__PURE__ */ new Set([...Iu, ...Sa])].filter((ct) => qs(ct) && !Ys.includes(ct));
9019
9019
  let Ri;
9020
9020
  for (const ct of [Ys, Ks]) {
9021
9021
  for (const qt of Ne) {
@@ -9054,8 +9054,8 @@ function VR(e, t) {
9054
9054
  }
9055
9055
  }
9056
9056
  {
9057
- const xe = new Set(pe.map((dt) => dt.id)), nt = new Set(E.map((dt) => dt.flow.id)), Ce = 20, _t = (dt) => {
9058
- const kt = dt.source, Ie = dt.target, St = Math.min(kt.x, Ie.x) - Ce, Ne = Math.max(kt.x + kt.width, Ie.x + Ie.width) + Ce, vt = Math.min(kt.y, Ie.y) - Ce, On = Math.max(kt.y + kt.height, Ie.y + Ie.height) + Ce;
9057
+ const xe = new Set(pe.map((dt) => dt.id)), nt = new Set(E.map((dt) => dt.flow.id)), Me = 20, _t = (dt) => {
9058
+ const kt = dt.source, Ie = dt.target, St = Math.min(kt.x, Ie.x) - Me, Ne = Math.max(kt.x + kt.width, Ie.x + Ie.width) + Me, vt = Math.min(kt.y, Ie.y) - Me, On = Math.max(kt.y + kt.height, Ie.y + Ie.height) + Me;
9059
9059
  return dt.waypoints.some((Bn) => Bn.x < St || Bn.x > Ne || Bn.y < vt || Bn.y > On);
9060
9060
  }, gt = /* @__PURE__ */ new Map();
9061
9061
  for (const dt of pe)
@@ -9065,7 +9065,7 @@ function VR(e, t) {
9065
9065
  }
9066
9066
  const Ke = Ge.length ? d(Ge[0]) : void 0;
9067
9067
  if (Ke) {
9068
- const xe = { assoc: ph(), overlaps: hh(Ke), crosses: dh() }, nt = Ge.map((Ne) => ({ st: Ne, x: Ne.x })), Ce = o.filter((Ne) => Ne.type === "label").map((Ne) => ({
9068
+ const xe = { assoc: ph(), overlaps: hh(Ke), crosses: dh() }, nt = Ge.map((Ne) => ({ st: Ne, x: Ne.x })), Me = o.filter((Ne) => Ne.type === "label").map((Ne) => ({
9069
9069
  label: Ne,
9070
9070
  x: Ne.x,
9071
9071
  y: Ne.y
@@ -9092,7 +9092,7 @@ function VR(e, t) {
9092
9092
  if (St.assoc >= xe.assoc || St.overlaps > xe.overlaps || St.crosses > xe.crosses) {
9093
9093
  for (const { st: Ne, x: vt } of nt) Ne.x !== vt && n.moveElements([Ne], { x: vt - Ne.x, y: 0 });
9094
9094
  Ie > 0 && Hs(Ke, Ke.width - Ie);
9095
- for (const Ne of Ce) {
9095
+ for (const Ne of Me) {
9096
9096
  const vt = Ne.x - Ne.label.x, On = Ne.y - Ne.label.y;
9097
9097
  (vt !== 0 || On !== 0) && n.moveElements([Ne.label], { x: vt, y: On });
9098
9098
  }
@@ -9130,27 +9130,27 @@ function VR(e, t) {
9130
9130
  return (F = [...H.values()].sort((L, U) => U.n - L.n)[0]) == null ? void 0 : F.shape;
9131
9131
  })();
9132
9132
  if (D) {
9133
- const H = (U) => U.reduce((Y, re) => Y + re, 0) / U.length, F = H(O.map((U) => U.y + U.height / 2)) < D.y + D.height / 2, L = o.filter(
9133
+ const H = (U) => U.reduce((Y, ie) => Y + ie, 0) / U.length, F = H(O.map((U) => U.y + U.height / 2)) < D.y + D.height / 2, L = o.filter(
9134
9134
  (U) => U.type === "bpmn:Participant" && U.id !== C.participant.id && U.id !== D.id
9135
9135
  ).filter(
9136
9136
  (U) => F ? U.y + U.height <= D.y + 5 : U.y >= D.y + D.height - 5
9137
9137
  );
9138
9138
  if (L.length) {
9139
- const U = [...L.reduce((ne, he) => ne.set(he.y, (ne.get(he.y) ?? 0) + 1), /* @__PURE__ */ new Map())].sort((ne, he) => he[1] - ne[1] || (F ? he[0] - ne[0] : ne[0] - he[0]))[0][0], Y = Math.min(A.width, HR), re = zR, X = O.map((ne) => ne.x + ne.width / 2), pe = Math.round(H(X) - Y / 2), ge = Math.max(...X) + vh, Se = (ne) => ({ x: ne, width: Math.max(Y, ge - ne) }), st = L.filter((ne) => Math.min(ne.y + ne.height, U + re) - Math.max(ne.y, U) > 0), Te = (ne) => {
9140
- const he = Se(ne);
9139
+ const U = [...L.reduce((oe, he) => oe.set(he.y, (oe.get(he.y) ?? 0) + 1), /* @__PURE__ */ new Map())].sort((oe, he) => he[1] - oe[1] || (F ? he[0] - oe[0] : oe[0] - he[0]))[0][0], Y = Math.min(A.width, HR), ie = zR, X = O.map((oe) => oe.x + oe.width / 2), pe = Math.round(H(X) - Y / 2), ge = Math.max(...X) + vh, Se = (oe) => ({ x: oe, width: Math.max(Y, ge - oe) }), st = L.filter((oe) => Math.min(oe.y + oe.height, U + ie) - Math.max(oe.y, U) > 0), Re = (oe) => {
9140
+ const he = Se(oe);
9141
9141
  return st.some((ze) => ze.x < he.x + he.width && he.x < ze.x + ze.width);
9142
- }, Z = (ne) => {
9143
- const he = Se(ne);
9142
+ }, te = (oe) => {
9143
+ const he = Se(oe);
9144
9144
  return X.filter((ze) => ze >= he.x + 10 && ze <= he.x + he.width - 10).length;
9145
- }, ce = (() => {
9146
- if (!Te(pe)) return pe;
9147
- const ne = Z(pe);
9148
- return st.flatMap((he) => [he.x + he.width + kg, he.x - kg - Y]).map((he) => Math.round(he)).filter((he) => !Te(he) && Z(he) >= ne).sort((he, ze) => Math.abs(he - pe) - Math.abs(ze - pe))[0] ?? pe;
9145
+ }, se = (() => {
9146
+ if (!Re(pe)) return pe;
9147
+ const oe = te(pe);
9148
+ return st.flatMap((he) => [he.x + he.width + kg, he.x - kg - Y]).map((he) => Math.round(he)).filter((he) => !Re(he) && te(he) >= oe).sort((he, ze) => Math.abs(he - pe) - Math.abs(ze - pe))[0] ?? pe;
9149
9149
  })();
9150
- if (ce !== A.x || U !== A.y || Y !== A.width || re !== A.height) {
9151
- const ne = () => new Set(ht(Xe(o)).map((me) => ft(me))), he = ne(), ze = { x: A.x, y: A.y, width: A.width, height: A.height };
9152
- n.resizeShape(A, { x: ce, y: U, width: Y, height: re });
9153
- const Ge = ne(), wt = [...Ge].filter((me) => !he.has(me)).length, Dt = [...he].filter((me) => !Ge.has(me)).length;
9150
+ if (se !== A.x || U !== A.y || Y !== A.width || ie !== A.height) {
9151
+ const oe = () => new Set(ht(Xe(o)).map((me) => ft(me))), he = oe(), ze = { x: A.x, y: A.y, width: A.width, height: A.height };
9152
+ n.resizeShape(A, { x: se, y: U, width: Y, height: ie });
9153
+ const Ge = oe(), wt = [...Ge].filter((me) => !he.has(me)).length, Dt = [...he].filter((me) => !Ge.has(me)).length;
9154
9154
  wt > Dt && n.resizeShape(A, ze);
9155
9155
  }
9156
9156
  }
@@ -9163,7 +9163,7 @@ function VR(e, t) {
9163
9163
  if (!H || !L || L.type === "bpmn:Participant") continue;
9164
9164
  const U = L.x + L.width / 2;
9165
9165
  if (U < A.x + 10 || U > A.x + A.width - 10) continue;
9166
- const Y = A.y > L.y, re = Y ? L.y + L.height : L.y, X = Y ? A.y : A.y + A.height, pe = D.flow.source === C.participant.id ? [{ x: U, y: X }, { x: U, y: re }] : [{ x: U, y: re }, { x: U, y: X }], ge = Xe(o), Se = { ...ge.edges.find((st) => st.id === D.flow.id), waypoints: pe };
9166
+ const Y = A.y > L.y, ie = Y ? L.y + L.height : L.y, X = Y ? A.y : A.y + A.height, pe = D.flow.source === C.participant.id ? [{ x: U, y: X }, { x: U, y: ie }] : [{ x: U, y: ie }, { x: U, y: X }], ge = Xe(o), Se = { ...ge.edges.find((st) => st.id === D.flow.id), waypoints: pe };
9167
9167
  kn(Se, hi(ge)).length || n.updateWaypoints(H, pe);
9168
9168
  }
9169
9169
  }
@@ -9183,10 +9183,10 @@ function VR(e, t) {
9183
9183
  )
9184
9184
  ), O = o.filter((L) => !!L.waypoints), B = (L, U) => Math.abs(U.x - L.x) < 2 ? "L" : Math.abs(U.x - (L.x + L.width)) < 2 ? "R" : Math.abs(U.y - L.y) < 2 ? "T" : Math.abs(U.y - (L.y + L.height)) < 2 ? "B" : void 0, D = /* @__PURE__ */ new Map(), H = (L, U, Y) => {
9185
9185
  if (!L || !U || typeof L.x != "number") return;
9186
- const re = B(L, U);
9187
- if (!re) return;
9186
+ const ie = B(L, U);
9187
+ if (!ie) return;
9188
9188
  let X = D.get(L.id);
9189
- X || D.set(L.id, X = /* @__PURE__ */ new Map()), X.set(re, [...X.get(re) ?? [], Y]);
9189
+ X || D.set(L.id, X = /* @__PURE__ */ new Map()), X.set(ie, [...X.get(ie) ?? [], Y]);
9190
9190
  };
9191
9191
  for (const L of O) {
9192
9192
  const U = L.waypoints;
@@ -9195,27 +9195,23 @@ function VR(e, t) {
9195
9195
  const F = /* @__PURE__ */ new Set();
9196
9196
  for (const [L, U] of D) {
9197
9197
  const Y = p(L);
9198
- if (!Y || typeof Y.x != "number" || ![...U.values()].some((Z) => {
9199
- const ce = Z.filter((ne) => ne.dir === "in");
9200
- return Z.length >= 3 && ce.length >= 1 && Z.some((ne) => ne.dir === "out") && ce.some((ne) => A.has(ne.id));
9198
+ if (!Y || typeof Y.x != "number" || ![...U.values()].some((Re) => {
9199
+ const te = Re.filter((se) => se.dir === "in");
9200
+ return Re.length >= 3 && te.length >= 1 && Re.some((se) => se.dir === "out") && te.some((se) => A.has(se.id));
9201
9201
  })) continue;
9202
9202
  const X = d(Y);
9203
- if (!X || F.has(X.id) || (X.children ?? []).some((Z) => Z.type === "bpmn:Lane")) continue;
9203
+ if (!X || F.has(X.id) || (X.children ?? []).some((Re) => Re.type === "bpmn:Lane")) continue;
9204
9204
  const pe = (Nh = U.get("T")) != null && Nh.length ? (Bh = U.get("B")) != null && Bh.length ? void 0 : "B" : "T";
9205
9205
  if (!pe || (pe === "T" ? Y.y - X.y : X.y + X.height - (Y.y + Y.height)) >= I) continue;
9206
9206
  const Se = (X.children ?? []).filter(
9207
- (Z) => !("waypoints" in Z && Z.waypoints) && Z.type !== "label" && typeof Z.x == "number"
9207
+ (Re) => !("waypoints" in Re && Re.waypoints) && Re.type !== "label" && typeof Re.x == "number"
9208
9208
  ), st = X.y + X.height;
9209
9209
  n.resizeShape(X, {
9210
9210
  x: X.x,
9211
9211
  y: X.y,
9212
9212
  width: X.width,
9213
9213
  height: X.height + I
9214
- });
9215
- const Te = u().children.filter(
9216
- (Z) => !("waypoints" in Z && Z.waypoints) && Z.id !== X.id && typeof Z.y == "number" && Z.y >= st
9217
- );
9218
- Te.length && n.moveElements(Te, { x: 0, y: I }), pe === "T" && Se.length && n.moveElements(Se, { x: 0, y: I }), F.add(X.id);
9214
+ }), Q(st, X.id, I), pe === "T" && Se.length && n.moveElements(Se, { x: 0, y: I }), F.add(X.id);
9219
9215
  }
9220
9216
  }
9221
9217
  const Mu = 20, xh = 4, L0 = 2, N0 = [10, 30, 80], mr = () => {
@@ -9309,8 +9305,8 @@ function VR(e, t) {
9309
9305
  if (L === U || O(L ? F.flow.source : F.flow.target)) continue;
9310
9306
  const Y = L ? F.flow.target : F.flow.source;
9311
9307
  if (B(Y) || !Jr(Y)) continue;
9312
- const re = p(F.flow.id);
9313
- if (!(re != null && re.waypoints) || re.waypoints.length !== 2) continue;
9308
+ const ie = p(F.flow.id);
9309
+ if (!(ie != null && ie.waypoints) || ie.waypoints.length !== 2) continue;
9314
9310
  const X = p(Y), pe = (D = P.get(Y)) == null ? void 0 : D.node.participant;
9315
9311
  if (!X || !pe) continue;
9316
9312
  const ge = Zr(Y, (Se) => Se.x >= X.x).filter((Se) => !C.has(Se.id));
@@ -9371,8 +9367,8 @@ function VR(e, t) {
9371
9367
  if (A === void 0) continue;
9372
9368
  const O = p(v), B = O ? d(O) : void 0;
9373
9369
  if (!O || !B) continue;
9374
- const D = B.y + ee + R(`pool:${C.node.participant ?? ""}`, A) * I, H = D - (O.y + O.height / 2);
9375
- H !== 0 && !Q(B, O, O.x + O.width / 2, D) && n.moveElements([O], { x: 0, y: H });
9370
+ const D = B.y + J + R(`pool:${C.node.participant ?? ""}`, A) * I, H = D - (O.y + O.height / 2);
9371
+ H !== 0 && !Z(B, O, O.x + O.width / 2, D) && n.moveElements([O], { x: 0, y: H });
9376
9372
  }
9377
9373
  for (const v of Vs.flatMap((C) => wa.get(C) ?? [])) {
9378
9374
  if (!zs(v.flow.id)) continue;
@@ -9404,31 +9400,31 @@ function VR(e, t) {
9404
9400
  for (const F of H) {
9405
9401
  const L = ($h = P.get(F.id)) == null ? void 0 : $h.node.participant, U = L ? p(L) : void 0;
9406
9402
  if (!L || !U) continue;
9407
- const Y = [...P.values()].filter((ce) => ce.node.participant === L).map((ce) => ce.node.id), re = (ce) => ce.map((ne) => p(ne)).filter((ne) => !!ne), pe = [O0(F.id, (ce) => {
9408
- var ne;
9409
- return ((ne = P.get(ce.id)) == null ? void 0 : ne.node.participant) === L;
9410
- }), re(Y)].filter((ce) => ce.length).map((ce) => [{ subtree: ce, pool: U }]);
9403
+ const Y = [...P.values()].filter((se) => se.node.participant === L).map((se) => se.node.id), ie = (se) => se.map((oe) => p(oe)).filter((oe) => !!oe), pe = [O0(F.id, (se) => {
9404
+ var oe;
9405
+ return ((oe = P.get(se.id)) == null ? void 0 : oe.node.participant) === L;
9406
+ }), ie(Y)].filter((se) => se.length).map((se) => [{ subtree: se, pool: U }]);
9411
9407
  if (v.preexisting) {
9412
- const ce = re(Y);
9413
- ce.length && pe.push(
9408
+ const se = ie(Y);
9409
+ se.length && pe.push(
9414
9410
  Tu(
9415
- /* @__PURE__ */ new Map([[L, [...ce]]]),
9416
- new Set(ce.map((ne) => ne.id)),
9411
+ /* @__PURE__ */ new Map([[L, [...se]]]),
9412
+ new Set(se.map((oe) => oe.id)),
9417
9413
  v.id,
9418
9414
  () => !1,
9419
- (ne) => ne === C.id || ne === A.id
9415
+ (oe) => oe === C.id || oe === A.id
9420
9416
  )
9421
9417
  );
9422
9418
  }
9423
- const ge = F.width + j, Se = Po(v.id), st = Gs(v.id), Te = () => Po(v.id) < Se && Gs(v.id) >= st;
9424
- let Z = !1;
9425
- for (const ce of pe) {
9426
- for (let ne = 1; ne <= xh; ne++)
9427
- if (Qr(ce, ge * ne, Te)) {
9428
- Z = !0;
9419
+ const ge = F.width + j, Se = Po(v.id), st = Gs(v.id), Re = () => Po(v.id) < Se && Gs(v.id) >= st;
9420
+ let te = !1;
9421
+ for (const se of pe) {
9422
+ for (let oe = 1; oe <= xh; oe++)
9423
+ if (Qr(se, ge * oe, Re)) {
9424
+ te = !0;
9429
9425
  break;
9430
9426
  }
9431
- if (Z) break;
9427
+ if (te) break;
9432
9428
  }
9433
9429
  if (!zs(v.id)) break;
9434
9430
  }
@@ -9448,8 +9444,8 @@ function VR(e, t) {
9448
9444
  }, W0 = (v, C, A, O, B) => {
9449
9445
  const D = v.map((U) => ({ ...U, subtree: U.subtree.filter((Y) => !B.includes(Y.id)) })).filter((U) => U.subtree.length), H = new Set(D.flatMap((U) => U.subtree.map((Y) => Y.id))), F = () => B.every((U) => {
9450
9446
  const Y = p(U);
9451
- return !!Y && E.filter((re) => re.flow.target === U && H.has(re.flow.source)).every((re) => {
9452
- const X = p(re.flow.source);
9447
+ return !!Y && E.filter((ie) => ie.flow.target === U && H.has(ie.flow.source)).every((ie) => {
9448
+ const X = p(ie.flow.source);
9453
9449
  return !!X && X.x + X.width <= Y.x;
9454
9450
  });
9455
9451
  });
@@ -9467,16 +9463,16 @@ function VR(e, t) {
9467
9463
  if (!L.length) continue;
9468
9464
  const U = (jh = P.get(v.flow.source)) == null ? void 0 : jh.node.participant, Y = (Hh = P.get(v.flow.target)) == null ? void 0 : Hh.node.participant;
9469
9465
  if (!U || !Y) continue;
9470
- const re = /* @__PURE__ */ new Map();
9471
- for (const [Se, st, Te] of [
9466
+ const ie = /* @__PURE__ */ new Map();
9467
+ for (const [Se, st, Re] of [
9472
9468
  [v.flow.source, A, U],
9473
9469
  [v.flow.target, O, Y]
9474
9470
  ]) {
9475
- const Z = re.get(Te) ?? [], ce = Zr(Se, (ne) => ne.x >= st.x).filter((ne) => !Z.some((he) => he.id === ne.id));
9476
- re.set(Te, [...Z, ...ce]);
9471
+ const te = ie.get(Re) ?? [], se = Zr(Se, (oe) => oe.x >= st.x).filter((oe) => !te.some((he) => he.id === oe.id));
9472
+ ie.set(Re, [...te, ...se]);
9477
9473
  }
9478
- const X = new Set([...re.values()].flat().map((Se) => Se.id)), pe = Tu(
9479
- re,
9474
+ const X = new Set([...ie.values()].flat().map((Se) => Se.id)), pe = Tu(
9475
+ ie,
9480
9476
  X,
9481
9477
  v.flow.id,
9482
9478
  (Se) => Se === v.flow.source || Se === v.flow.target,
@@ -9485,11 +9481,11 @@ function VR(e, t) {
9485
9481
  for (const Se of N0) {
9486
9482
  const st = ge + Se - B;
9487
9483
  if (st <= 0) continue;
9488
- const Te = mr().bad, Z = Ws();
9489
- let ce = [], ne = !0;
9490
- const he = () => !Mh(v.flow.id) || ne && (ce = V0(pe, v.flow, Z), ce.length) ? !1 : !G0(Te, Z);
9484
+ const Re = mr().bad, te = Ws();
9485
+ let se = [], oe = !0;
9486
+ const he = () => !Mh(v.flow.id) || oe && (se = V0(pe, v.flow, te), se.length) ? !1 : !G0(Re, te);
9491
9487
  if (Qr(pe, st, he, To)) break;
9492
- if (ce.length && (W0(pe, st, v.flow, Z, ce) || (ne = !1, Qr(pe, st, he, To))))
9488
+ if (se.length && (W0(pe, st, v.flow, te, se) || (oe = !1, Qr(pe, st, he, To))))
9493
9489
  break;
9494
9490
  }
9495
9491
  }
@@ -9510,8 +9506,8 @@ function VR(e, t) {
9510
9506
  if (H <= j + 1) continue;
9511
9507
  const F = f(O.node.participant), L = Zr(A, (X) => X.x >= B.x), U = mr(), Y = B0(L, F, -(H - j));
9512
9508
  if (!Y) continue;
9513
- const re = mr();
9514
- (re.bad > U.bad || re.crossings >= U.crossings || re.straight < U.straight) && Y();
9509
+ const ie = mr();
9510
+ (ie.bad > U.bad || ie.crossings >= U.crossings || ie.straight < U.straight) && Y();
9515
9511
  }
9516
9512
  }
9517
9513
  bh(!0);
@@ -9555,12 +9551,12 @@ function VR(e, t) {
9555
9551
  const eo = 10, Ph = 40, Z0 = (v, C) => {
9556
9552
  const A = C.map((L) => d(L)).filter((L) => !!L);
9557
9553
  for (const L of A) {
9558
- const U = eo, Y = L.y, re = L.y + L.height, X = L.x, pe = L.x + L.width;
9554
+ const U = eo, Y = L.y, ie = L.y + L.height, X = L.x, pe = L.x + L.width;
9559
9555
  if (Math.abs(v.y - Y) < U) {
9560
9556
  const ge = Y + U - v.y;
9561
9557
  v.y += ge, v.height -= ge;
9562
9558
  }
9563
- if (Math.abs(v.y + v.height - re) < U && (v.height = re - U - v.y), Math.abs(v.x - X) < U) {
9559
+ if (Math.abs(v.y + v.height - ie) < U && (v.height = ie - U - v.y), Math.abs(v.x - X) < U) {
9564
9560
  const ge = X + U - v.x;
9565
9561
  v.x += ge, v.width -= ge;
9566
9562
  }
@@ -9578,7 +9574,7 @@ function VR(e, t) {
9578
9574
  (D) => D.type === "bpmn:Group" && D.id !== C
9579
9575
  );
9580
9576
  for (const D of B) {
9581
- const H = D.x, F = D.x + D.width, L = D.y, U = D.y + D.height, Y = v.y < U && L < v.y + v.height, re = v.x < F && H < v.x + v.width;
9577
+ const H = D.x, F = D.x + D.width, L = D.y, U = D.y + D.height, Y = v.y < U && L < v.y + v.height, ie = v.x < F && H < v.x + v.width;
9582
9578
  if (Y) {
9583
9579
  if (Math.abs(v.x - F) < A) {
9584
9580
  const X = Math.min(F + A - v.x, O);
@@ -9589,7 +9585,7 @@ function VR(e, t) {
9589
9585
  X > 0 && v.width - X > 0 && (v.width -= X);
9590
9586
  }
9591
9587
  }
9592
- if (re) {
9588
+ if (ie) {
9593
9589
  if (Math.abs(v.y - U) < A) {
9594
9590
  const X = Math.min(U + A - v.y, O);
9595
9591
  X > 0 && v.height - X > 0 && (v.y += X, v.height -= X);
@@ -9630,76 +9626,76 @@ function VR(e, t) {
9630
9626
  }
9631
9627
  const O = o.filter((B) => B.type === "bpmn:Group");
9632
9628
  for (const B of O) {
9633
- const H = (((qh = B.businessObject.extensionElements) == null ? void 0 : qh.values) ?? []).find((Te) => Te.$type === "bwl:Members"), F = ((H == null ? void 0 : H.refs) ?? "").split(" ").filter(Boolean);
9629
+ const H = (((qh = B.businessObject.extensionElements) == null ? void 0 : qh.values) ?? []).find((Re) => Re.$type === "bwl:Members"), F = ((H == null ? void 0 : H.refs) ?? "").split(" ").filter(Boolean);
9634
9630
  if (!F.length) continue;
9635
9631
  const L = new Set(F), U = [...F];
9636
9632
  for (; U.length; ) {
9637
- const Te = U.shift();
9638
- for (const Z of C.get(Te) ?? []) L.has(Z) || (L.add(Z), U.push(Z));
9639
- }
9640
- const Y = B.x, re = B.x + B.width, X = B.y, pe = B.y + B.height, ge = (Te) => E.filter((Z) => Z.flow.target === Te).length, Se = (Te) => {
9641
- var ce;
9642
- const Z = ((ce = p(Te)) == null ? void 0 : ce.type) ?? "";
9643
- if (Z === "bpmn:StartEvent" && ge(Te) === 0) return !1;
9644
- if (Z.endsWith("Gateway")) {
9645
- const ne = E.filter((he) => he.flow.target === Te).map((he) => he.flow.source);
9646
- if (ne.length && ne.every((he) => {
9633
+ const Re = U.shift();
9634
+ for (const te of C.get(Re) ?? []) L.has(te) || (L.add(te), U.push(te));
9635
+ }
9636
+ const Y = B.x, ie = B.x + B.width, X = B.y, pe = B.y + B.height, ge = (Re) => E.filter((te) => te.flow.target === Re).length, Se = (Re) => {
9637
+ var se;
9638
+ const te = ((se = p(Re)) == null ? void 0 : se.type) ?? "";
9639
+ if (te === "bpmn:StartEvent" && ge(Re) === 0) return !1;
9640
+ if (te.endsWith("Gateway")) {
9641
+ const oe = E.filter((he) => he.flow.target === Re).map((he) => he.flow.source);
9642
+ if (oe.length && oe.every((he) => {
9647
9643
  var ze;
9648
9644
  return ((ze = p(he)) == null ? void 0 : ze.type) === "bpmn:StartEvent" && ge(he) === 0;
9649
9645
  }))
9650
9646
  return !1;
9651
9647
  }
9652
9648
  return !0;
9653
- }, st = o.filter((Te) => Ki(Te)).filter(
9654
- (Te) => Te.type !== "bpmn:Group" && Te.type !== "bpmn:Participant" && Te.type !== "bpmn:TextAnnotation" && !L.has(Te.id) && Jr(Te.id) && Se(Te.id) && Te.x < re && Te.x + Te.width > Y && Te.y < pe && Te.y + Te.height > X
9649
+ }, st = o.filter((Re) => Ki(Re)).filter(
9650
+ (Re) => Re.type !== "bpmn:Group" && Re.type !== "bpmn:Participant" && Re.type !== "bpmn:TextAnnotation" && !L.has(Re.id) && Jr(Re.id) && Se(Re.id) && Re.x < ie && Re.x + Re.width > Y && Re.y < pe && Re.y + Re.height > X
9655
9651
  );
9656
9652
  if (st.length)
9657
- for (const Te of [-1, 1]) {
9658
- const Z = st.filter((ye) => (ye.x + ye.width - Y <= re - ye.x ? -1 : 1) === Te);
9659
- if (!Z.length) continue;
9660
- const ce = [];
9661
- for (const ye of Z) {
9662
- const oe = ce.find((de) => de.some((Oe) => ye.y < Oe.y + Oe.height && ye.y + ye.height > Oe.y));
9663
- oe ? oe.push(ye) : ce.push([ye]);
9653
+ for (const Re of [-1, 1]) {
9654
+ const te = st.filter((ye) => (ye.x + ye.width - Y <= ie - ye.x ? -1 : 1) === Re);
9655
+ if (!te.length) continue;
9656
+ const se = [];
9657
+ for (const ye of te) {
9658
+ const re = se.find((de) => de.some((Oe) => ye.y < Oe.y + Oe.height && ye.y + ye.height > Oe.y));
9659
+ re ? re.push(ye) : se.push([ye]);
9664
9660
  }
9665
- const ne = /* @__PURE__ */ new Map();
9666
- for (const ye of ce) {
9667
- let oe = Te < 0 ? Y - eo : re + eo;
9668
- for (const de of [...ye].sort((Oe, We) => Te < 0 ? We.x - Oe.x : Oe.x - We.x)) {
9669
- const Oe = Te < 0 ? Math.min(de.x, oe - de.width) : Math.max(de.x, oe);
9670
- oe = Te < 0 ? Oe - ki : Oe + de.width + ki, Oe !== de.x && Math.sign(Oe - de.x) === Te && ne.set(de.id, Oe - de.x);
9661
+ const oe = /* @__PURE__ */ new Map();
9662
+ for (const ye of se) {
9663
+ let re = Re < 0 ? Y - eo : ie + eo;
9664
+ for (const de of [...ye].sort((Oe, We) => Re < 0 ? We.x - Oe.x : Oe.x - We.x)) {
9665
+ const Oe = Re < 0 ? Math.min(de.x, re - de.width) : Math.max(de.x, re);
9666
+ re = Re < 0 ? Oe - ki : Oe + de.width + ki, Oe !== de.x && Math.sign(Oe - de.x) === Re && oe.set(de.id, Oe - de.x);
9671
9667
  }
9672
9668
  }
9673
9669
  const he = /* @__PURE__ */ new Map(), ze = (ye) => he.get(ye) === ye || !he.get(ye) ? ye : ze(he.get(ye));
9674
- for (const ye of Z) he.set(ye.id, ye.id);
9670
+ for (const ye of te) he.set(ye.id, ye.id);
9675
9671
  for (const ye of _) {
9676
- const oe = ne.has(ye.flow.source) ? ye.flow.source : void 0, de = ne.has(ye.flow.target) ? ye.flow.target : void 0;
9677
- if (!oe || !de) continue;
9672
+ const re = oe.has(ye.flow.source) ? ye.flow.source : void 0, de = oe.has(ye.flow.target) ? ye.flow.target : void 0;
9673
+ if (!re || !de) continue;
9678
9674
  const Oe = p(ye.flow.id);
9679
- ((Yh = Oe == null ? void 0 : Oe.waypoints) == null ? void 0 : Yh.length) === 2 && he.set(ze(oe), ze(de));
9675
+ ((Yh = Oe == null ? void 0 : Oe.waypoints) == null ? void 0 : Yh.length) === 2 && he.set(ze(re), ze(de));
9680
9676
  }
9681
9677
  const Ge = /* @__PURE__ */ new Map();
9682
- for (const ye of Z) {
9683
- if (!ne.has(ye.id)) continue;
9684
- const oe = ze(ye.id);
9685
- Ge.set(oe, [...Ge.get(oe) ?? [], ye]);
9678
+ for (const ye of te) {
9679
+ if (!oe.has(ye.id)) continue;
9680
+ const re = ze(ye.id);
9681
+ Ge.set(re, [...Ge.get(re) ?? [], ye]);
9686
9682
  }
9687
9683
  const wt = [...Ge.values()].sort(
9688
- (ye, oe) => Te < 0 ? Math.min(...ye.map((de) => de.x)) - Math.min(...oe.map((de) => de.x)) : Math.max(...oe.map((de) => de.x)) - Math.max(...ye.map((de) => de.x))
9684
+ (ye, re) => Re < 0 ? Math.min(...ye.map((de) => de.x)) - Math.min(...re.map((de) => de.x)) : Math.max(...re.map((de) => de.x)) - Math.max(...ye.map((de) => de.x))
9689
9685
  ), Dt = [];
9690
9686
  let me = !0;
9691
9687
  for (const ye of wt) {
9692
- const oe = ye.map((We) => ne.get(We.id) ?? 0).reduce((We, Pe) => Math.abs(Pe) > Math.abs(We) ? Pe : We, 0), de = /* @__PURE__ */ new Map();
9688
+ const re = ye.map((We) => oe.get(We.id) ?? 0).reduce((We, Te) => Math.abs(Te) > Math.abs(We) ? Te : We, 0), de = /* @__PURE__ */ new Map();
9693
9689
  let Oe = !0;
9694
9690
  for (const We of ye) {
9695
- const Pe = d(We);
9696
- if (!Pe) {
9691
+ const Te = d(We);
9692
+ if (!Te) {
9697
9693
  Oe = !1;
9698
9694
  break;
9699
9695
  }
9700
- de.has(Pe.id) || de.set(Pe.id, { subtree: [], pool: Pe }), de.get(Pe.id).subtree.push(We);
9696
+ de.has(Te.id) || de.set(Te.id, { subtree: [], pool: Te }), de.get(Te.id).subtree.push(We);
9701
9697
  }
9702
- Oe && Qr([...de.values()], oe, () => !0, To) ? Dt.push({ shapes: ye, dx: oe }) : me = !1;
9698
+ Oe && Qr([...de.values()], re, () => !0, To) ? Dt.push({ shapes: ye, dx: re }) : me = !1;
9703
9699
  }
9704
9700
  if (!me)
9705
9701
  for (const ye of Dt.reverse()) n.moveElements(ye.shapes, { x: -ye.dx, y: 0 });
@@ -9733,40 +9729,40 @@ function VR(e, t) {
9733
9729
  const L = ((U = p(F)) == null ? void 0 : U.type) ?? "";
9734
9730
  if (L === "bpmn:StartEvent" && D(F) === 0) return !1;
9735
9731
  if (L.endsWith("Gateway")) {
9736
- const Y = E.filter((re) => re.flow.target === F).map((re) => re.flow.source);
9737
- if (Y.length && Y.every((re) => {
9732
+ const Y = E.filter((ie) => ie.flow.target === F).map((ie) => ie.flow.source);
9733
+ if (Y.length && Y.every((ie) => {
9738
9734
  var X;
9739
- return ((X = p(re)) == null ? void 0 : X.type) === "bpmn:StartEvent" && D(re) === 0;
9735
+ return ((X = p(ie)) == null ? void 0 : X.type) === "bpmn:StartEvent" && D(ie) === 0;
9740
9736
  }))
9741
9737
  return !1;
9742
9738
  }
9743
9739
  return !0;
9744
9740
  };
9745
9741
  for (const F of o.filter((L) => L.type === "bpmn:Group")) {
9746
- const U = (((eg = F.businessObject.extensionElements) == null ? void 0 : eg.values) ?? []).find((oe) => oe.$type === "bwl:Members"), Y = ((U == null ? void 0 : U.refs) ?? "").split(" ").filter(Boolean);
9742
+ const U = (((eg = F.businessObject.extensionElements) == null ? void 0 : eg.values) ?? []).find((re) => re.$type === "bwl:Members"), Y = ((U == null ? void 0 : U.refs) ?? "").split(" ").filter(Boolean);
9747
9743
  if (!Y.length) continue;
9748
- const re = Y.map(p).filter((oe) => !!oe);
9749
- if (!re.length || !(w.some((oe) => oe.group.id === F.id) || Xt(e, "group.update").some((oe) => oe.id === F.id) || re.some((oe) => {
9750
- const de = h.get(oe.id);
9751
- return !de || de.x !== oe.x || de.y !== oe.y;
9744
+ const ie = Y.map(p).filter((re) => !!re);
9745
+ if (!ie.length || !(w.some((re) => re.group.id === F.id) || Xt(e, "group.update").some((re) => re.id === F.id) || ie.some((re) => {
9746
+ const de = h.get(re.id);
9747
+ return !de || de.x !== re.x || de.y !== re.y;
9752
9748
  }))) continue;
9753
9749
  const pe = new Set(Y), ge = [...Y];
9754
9750
  for (; ge.length; ) {
9755
- const oe = ge.shift();
9756
- for (const de of O.get(oe) ?? []) pe.has(de) || (pe.add(de), ge.push(de));
9751
+ const re = ge.shift();
9752
+ for (const de of O.get(re) ?? []) pe.has(de) || (pe.add(de), ge.push(de));
9757
9753
  }
9758
- const Se = F.x, st = F.x + F.width, Te = F.y, Z = F.y + F.height, ce = (oe) => {
9759
- const de = C.get(oe.id), Oe = { x: oe.x, y: oe.y, width: oe.width, height: oe.height };
9754
+ const Se = F.x, st = F.x + F.width, Re = F.y, te = F.y + F.height, se = (re) => {
9755
+ const de = C.get(re.id), Oe = { x: re.x, y: re.y, width: re.width, height: re.height };
9760
9756
  return de ? [Oe, { x: de.x, y: de.y, width: de.width, height: de.height }] : [Oe];
9761
- }, ne = re.flatMap(ce), he = Math.min(...ne.map((oe) => oe.x)), ze = Math.max(...ne.map((oe) => oe.x + oe.width)), Ge = Math.min(...ne.map((oe) => oe.y)), wt = Math.max(...ne.map((oe) => oe.y + oe.height)), Dt = { L: he - Se, R: st - ze, T: Ge - Te, B: Z - wt }, me = o.filter((oe) => Ki(oe)).filter(
9762
- (oe) => oe.type !== "bpmn:Group" && oe.type !== "bpmn:Participant" && oe.type !== "bpmn:TextAnnotation" && !pe.has(oe.id) && H(oe.id) && oe.x < st && oe.x + oe.width > Se && oe.y < Z && oe.y + oe.height > Te
9757
+ }, oe = ie.flatMap(se), he = Math.min(...oe.map((re) => re.x)), ze = Math.max(...oe.map((re) => re.x + re.width)), Ge = Math.min(...oe.map((re) => re.y)), wt = Math.max(...oe.map((re) => re.y + re.height)), Dt = { L: he - Se, R: st - ze, T: Ge - Re, B: te - wt }, me = o.filter((re) => Ki(re)).filter(
9758
+ (re) => re.type !== "bpmn:Group" && re.type !== "bpmn:Participant" && re.type !== "bpmn:TextAnnotation" && !pe.has(re.id) && H(re.id) && re.x < st && re.x + re.width > Se && re.y < te && re.y + re.height > Re
9763
9759
  );
9764
9760
  if (!me.length) continue;
9765
9761
  const ye = { L: 0, R: 0, T: 0, B: 0 };
9766
- for (const oe of me) {
9767
- const de = ce(oe), Oe = Math.min(...de.map((Ce) => Ce.x)), We = Math.max(...de.map((Ce) => Ce.x + Ce.width)), Pe = Math.min(...de.map((Ce) => Ce.y)), je = Math.max(...de.map((Ce) => Ce.y + Ce.height)), Ke = { L: We - Se, R: st - Oe, T: je - Te, B: Z - Pe }, xe = ["L", "R", "T", "B"].filter((Ce) => Ke[Ce] <= Dt[Ce] + 1e-3);
9762
+ for (const re of me) {
9763
+ const de = se(re), Oe = Math.min(...de.map((Me) => Me.x)), We = Math.max(...de.map((Me) => Me.x + Me.width)), Te = Math.min(...de.map((Me) => Me.y)), je = Math.max(...de.map((Me) => Me.y + Me.height)), Ke = { L: We - Se, R: st - Oe, T: je - Re, B: te - Te }, xe = ["L", "R", "T", "B"].filter((Me) => Ke[Me] <= Dt[Me] + 1e-3);
9768
9764
  if (!xe.length) continue;
9769
- const nt = xe.reduce((Ce, _t) => Ke[_t] < Ke[Ce] ? _t : Ce, xe[0]);
9765
+ const nt = xe.reduce((Me, _t) => Ke[_t] < Ke[Me] ? _t : Me, xe[0]);
9770
9766
  ye[nt] = Math.max(ye[nt], Math.min(Ke[nt] + 10, Dt[nt]));
9771
9767
  }
9772
9768
  !ye.L && !ye.R && !ye.T && !ye.B || n.resizeShape(F, {
@@ -9796,10 +9792,10 @@ function VR(e, t) {
9796
9792
  const C = v.association, A = ((tg = v.placement) == null ? void 0 : tg.anchor) ?? (C ? C.source === v.annotation.id ? C.target : C.source : void 0), O = A ? p(A) : void 0, B = O ? Th(O) : void 0, D = tE(v.annotation.text ?? "");
9797
9793
  let H;
9798
9794
  if (B && v.placement) {
9799
- const [Y, re] = ol[v.placement.side], X = v.placement.offset ?? 50;
9795
+ const [Y, ie] = ol[v.placement.side], X = v.placement.offset ?? 50;
9800
9796
  H = {
9801
9797
  x: B.x + B.width / 2 + Y * (B.width / 2 + D.width / 2 + X),
9802
- y: B.y + B.height / 2 + re * (B.height / 2 + D.height / 2 + X)
9798
+ y: B.y + B.height / 2 + ie * (B.height / 2 + D.height / 2 + X)
9803
9799
  };
9804
9800
  } else B ? (H = {
9805
9801
  x: B.x + B.width / 2 + 180 + Ea % 3 * 260,
@@ -9821,7 +9817,7 @@ function VR(e, t) {
9821
9817
  F
9822
9818
  );
9823
9819
  if (C) {
9824
- const Y = (re) => re === v.annotation.id ? U : f(re);
9820
+ const Y = (ie) => ie === v.annotation.id ? U : f(ie);
9825
9821
  n.connect(
9826
9822
  Y(C.source),
9827
9823
  Y(C.target),
@@ -9877,7 +9873,7 @@ function VR(e, t) {
9877
9873
  (H) => H.type === "bpmn:Lane" && A >= H.y && A <= H.y + H.height
9878
9874
  );
9879
9875
  v.band !== void 0 && lt(B == null ? void 0 : B.id, v.band, O);
9880
- const D = B ? B.y + (v.band === void 0 ? B.height / 2 : Math.min(B.height / 2, fe) + R(B.id, v.band) * I) : v.band !== void 0 && O ? O.y + ee + R(`pool:${O.id}`, v.band) * I : void 0;
9876
+ const D = B ? B.y + (v.band === void 0 ? B.height / 2 : Math.min(B.height / 2, fe) + R(B.id, v.band) * I) : v.band !== void 0 && O ? O.y + J + R(`pool:${O.id}`, v.band) * I : void 0;
9881
9877
  if (D !== void 0) {
9882
9878
  const H = D - A;
9883
9879
  H !== 0 && n.moveElements([C], { x: 0, y: H });
@@ -9894,7 +9890,7 @@ function VR(e, t) {
9894
9890
  n.updateWaypoints(A, [H.exit, { x: H.exit.x, y: F }, { x: B.x, y: F }]);
9895
9891
  const L = A.label;
9896
9892
  if (L && H.label) {
9897
- const Y = Math.abs(H.label.y + L.height / 2 - H.channelY) <= I / 5 && H.label.x + L.width > H.exit.x, re = H.exit.x + 6, X = B.x - 6 - L.width, pe = Y ? X >= re ? { x: Math.max(re, Math.min(H.label.x, X)), y: H.label.y + (F - H.channelY) } : void 0 : H.label;
9893
+ const Y = Math.abs(H.label.y + L.height / 2 - H.channelY) <= I / 5 && H.label.x + L.width > H.exit.x, ie = H.exit.x + 6, X = B.x - 6 - L.width, pe = Y ? X >= ie ? { x: Math.max(ie, Math.min(H.label.x, X)), y: H.label.y + (F - H.channelY) } : void 0 : H.label;
9898
9894
  pe && (pe.x !== L.x || pe.y !== L.y) && n.moveElements([L], { x: pe.x - L.x, y: pe.y - L.y });
9899
9895
  }
9900
9896
  } else Math.abs(F - (O.y + O.height / 2)) > 1 && Mo(A);
@@ -9960,11 +9956,11 @@ function WR(e, t, n) {
9960
9956
  h = h.parent;
9961
9957
  }
9962
9958
  if (!g) {
9963
- const fe = d.x + d.width / 2, Re = d.y + d.height / 2;
9959
+ const fe = d.x + d.width / 2, Ce = d.y + d.height / 2;
9964
9960
  g = i.getAll().find((De) => {
9965
9961
  if (De.type !== "bpmn:Participant") return !1;
9966
9962
  const Je = De;
9967
- return typeof Je.x == "number" && typeof Je.width == "number" && fe >= Je.x && fe <= Je.x + Je.width && Re >= Je.y && Re <= Je.y + Je.height;
9963
+ return typeof Je.x == "number" && typeof Je.width == "number" && fe >= Je.x && fe <= Je.x + Je.width && Ce >= Je.y && Ce <= Je.y + Je.height;
9968
9964
  });
9969
9965
  }
9970
9966
  if (!g || typeof g.x != "number" || typeof g.width != "number") continue;
@@ -9974,24 +9970,24 @@ function WR(e, t, n) {
9974
9970
  if (!m) continue;
9975
9971
  const y = m.waypoints, S = y != null && y.length ? { x: y[Math.floor((y.length - 1) / 2)].x, y: y[Math.floor((y.length - 1) / 2)].y, width: 0, height: 0 } : { x: m.x, y: m.y, width: m.width, height: m.height }, w = { width: d.width, height: d.height }, P = { x: d.x + d.width / 2, y: d.y + d.height / 2 }, T = E == null ? void 0 : E.side, $ = [];
9976
9972
  T && T in ol && $.push(Ep(i, S, w, g, { placement: { side: T, offset: (E == null ? void 0 : E.offset) ?? null }, selfId: f }));
9977
- for (const [fe, Re] of [[-1, 0], [1, 0], [0, -1], [0, 1]])
9973
+ for (const [fe, Ce] of [[-1, 0], [1, 0], [0, -1], [0, 1]])
9978
9974
  for (let De = 1; De <= GR; De++)
9979
- $.push({ x: P.x + fe * Og * De, y: P.y + Re * Og * De });
9975
+ $.push({ x: P.x + fe * Og * De, y: P.y + Ce * Og * De });
9980
9976
  const k = { ...s, edges: s.edges.filter((fe) => fe.id !== (_ == null ? void 0 : _.id)) }, I = o(k), j = I.filter((fe) => ju(fe).includes(f)).length;
9981
9977
  if (!j) continue;
9982
- let ee;
9978
+ let J;
9983
9979
  for (const fe of $) {
9984
- const Re = fe.x - P.x, De = fe.y - P.y;
9985
- if (!Re && !De || fe.x - w.width / 2 < g.x || fe.x + w.width / 2 > g.x + g.width || fe.y - w.height / 2 < g.y || fe.y + w.height / 2 > g.y + g.height) continue;
9980
+ const Ce = fe.x - P.x, De = fe.y - P.y;
9981
+ if (!Ce && !De || fe.x - w.width / 2 < g.x || fe.x + w.width / 2 > g.x + g.width || fe.y - w.height / 2 < g.y || fe.y + w.height / 2 > g.y + g.height) continue;
9986
9982
  const Je = {
9987
9983
  ...k,
9988
- shapes: k.shapes.map((ve) => ve.id === f ? { ...ve, x: ve.x + Re, y: ve.y + De } : ve)
9989
- }, Q = o(Je), te = Q.filter((ve) => ju(ve).includes(f)).length;
9990
- if (te >= j || Q.length > I.length) continue;
9991
- const ue = Math.abs(Re) + Math.abs(De);
9992
- if ((!ee || te < ee.mine || te === ee.mine && (Q.length < ee.all || Q.length === ee.all && ue < ee.dist)) && (ee = { x: fe.x, y: fe.y, mine: te, all: Q.length, dist: ue }), ee.mine === 0 && ee.all < I.length) break;
9984
+ shapes: k.shapes.map((ve) => ve.id === f ? { ...ve, x: ve.x + Ce, y: ve.y + De } : ve)
9985
+ }, Z = o(Je), ee = Z.filter((ve) => ju(ve).includes(f)).length;
9986
+ if (ee >= j || Z.length > I.length) continue;
9987
+ const ue = Math.abs(Ce) + Math.abs(De);
9988
+ if ((!J || ee < J.mine || ee === J.mine && (Z.length < J.all || Z.length === J.all && ue < J.dist)) && (J = { x: fe.x, y: fe.y, mine: ee, all: Z.length, dist: ue }), J.mine === 0 && J.all < I.length) break;
9993
9989
  }
9994
- ee && r.moveElements([d], { x: ee.x - P.x, y: ee.y - P.y });
9990
+ J && r.moveElements([d], { x: J.x - P.x, y: J.y - P.y });
9995
9991
  }
9996
9992
  }
9997
9993
  const UR = 60;
@@ -10040,10 +10036,10 @@ function qR(e, t, n) {
10040
10036
  if (!P || !T) continue;
10041
10037
  const [$, k] = P.x <= T.x ? [P, T] : [T, P];
10042
10038
  if (y.contained) continue;
10043
- const I = s.get($.id), j = s.get(k.id), ee = I && j ? Math.max(j.x - (I.x + I.width), 0) : UR, fe = $.x + $.width + ee - k.x;
10039
+ const I = s.get($.id), j = s.get(k.id), J = I && j ? Math.max(j.x - (I.x + I.width), 0) : UR, fe = $.x + $.width + J - k.x;
10044
10040
  if (fe <= 0) continue;
10045
- const Re = l(k.id).filter((De) => i.get(De));
10046
- Re.length && (!g || fe > g.dx) && (g = { movers: Re, dx: fe });
10041
+ const Ce = l(k.id).filter((De) => i.get(De));
10042
+ Ce.length && (!g || fe > g.dx) && (g = { movers: Ce, dx: fe });
10047
10043
  }
10048
10044
  if (!g) return;
10049
10045
  const b = g.movers.map((y) => i.get(y)).filter((y) => !!y && typeof y.x == "number");
@@ -10098,14 +10094,14 @@ function YR(e, t) {
10098
10094
  ...(m.outgoing ?? []).map((k) => k.waypoints[0])
10099
10095
  ].some((k) => !k || k.x > h || Math.abs(k.x - y) < 1)) return;
10100
10096
  if (h > y) {
10101
- const k = { x: y, y: m.y, width: h - y, height: m.height }, I = /* @__PURE__ */ new Set([m.id, ...S.map((ee) => ee.id), ...w.map((ee) => ee.id), ...P.map((ee) => ee.id)]);
10102
- if (n.getAll().some((ee) => {
10097
+ const k = { x: y, y: m.y, width: h - y, height: m.height }, I = /* @__PURE__ */ new Set([m.id, ...S.map((J) => J.id), ...w.map((J) => J.id), ...P.map((J) => J.id)]);
10098
+ if (n.getAll().some((J) => {
10103
10099
  var De;
10104
- if ("waypoints" in ee && ee.waypoints || ee.type === "bpmn:Group" || !p(ee)) return !1;
10105
- const fe = ee.type === "label" ? (De = ee.labelTarget) == null ? void 0 : De.id : ee.id;
10106
- if (!fe || I.has(fe) || I.has(ee.id)) return !1;
10107
- const Re = ee;
10108
- return Re.x < k.x + k.width && Re.x + Re.width > k.x && Re.y < k.y + k.height && Re.y + Re.height > k.y;
10100
+ if ("waypoints" in J && J.waypoints || J.type === "bpmn:Group" || !p(J)) return !1;
10101
+ const fe = J.type === "label" ? (De = J.labelTarget) == null ? void 0 : De.id : J.id;
10102
+ if (!fe || I.has(fe) || I.has(J.id)) return !1;
10103
+ const Ce = J;
10104
+ return Ce.x < k.x + k.width && Ce.x + Ce.width > k.x && Ce.y < k.y + k.height && Ce.y + Ce.height > k.y;
10109
10105
  })) return;
10110
10106
  }
10111
10107
  }
@@ -10153,49 +10149,49 @@ function XR(e, t, n, i) {
10153
10149
  const l = new Map(n.shapes.map((d) => [d.id, d])), u = /* @__PURE__ */ new Map();
10154
10150
  for (const d of c) u.set(d.group, [...u.get(d.group) ?? [], d]);
10155
10151
  for (const [d, h] of u) {
10156
- const g = s.shapes.find((Ae) => Ae.id === d);
10152
+ const g = s.shapes.find((Pe) => Pe.id === d);
10157
10153
  if (!((p = g == null ? void 0 : g.members) != null && p.length)) continue;
10158
10154
  const b = l.get(d);
10159
10155
  if (!(!b || Math.abs(b.x - g.x) >= 0.5 || Math.abs(b.y - g.y) >= 0.5 || Math.abs(b.width - g.width) >= 0.5 || Math.abs(b.height - g.height) >= 0.5)) continue;
10160
- const _ = g.members.map((Ae) => r.get(Ae)).filter((Ae) => !!Ae && typeof Ae.x == "number");
10156
+ const _ = g.members.map((Pe) => r.get(Pe)).filter((Pe) => !!Pe && typeof Pe.x == "number");
10161
10157
  if (!_.length) continue;
10162
- const m = Math.min(..._.map((Ae) => Ae.x)), y = Math.min(..._.map((Ae) => Ae.y)), S = Math.max(..._.map((Ae) => Ae.x + Ae.width)), w = Math.max(..._.map((Ae) => Ae.y + Ae.height)), P = g.x, T = g.y, $ = g.x + g.width, k = g.y + g.height;
10163
- let I = P, j = T, ee = $, fe = k;
10164
- for (const Ae of h) {
10165
- const N = s.edges.find((x) => x.id === Ae.edge);
10158
+ const m = Math.min(..._.map((Pe) => Pe.x)), y = Math.min(..._.map((Pe) => Pe.y)), S = Math.max(..._.map((Pe) => Pe.x + Pe.width)), w = Math.max(..._.map((Pe) => Pe.y + Pe.height)), P = g.x, T = g.y, $ = g.x + g.width, k = g.y + g.height;
10159
+ let I = P, j = T, J = $, fe = k;
10160
+ for (const Pe of h) {
10161
+ const N = s.edges.find((x) => x.id === Pe.edge);
10166
10162
  if (!N) continue;
10167
10163
  const R = N.endpoints.some((x) => {
10168
10164
  const G = s.shapes.find((Ee) => Ee.id === x);
10169
10165
  if (!G || G.container) return !1;
10170
- const q = G.x + G.width / 2, J = G.y + G.height / 2;
10171
- return P < q && q < $ && T < J && J < k;
10166
+ const q = G.x + G.width / 2, Q = G.y + G.height / 2;
10167
+ return P < q && q < $ && T < Q && Q < k;
10172
10168
  });
10173
10169
  for (const x of yn(N)) {
10174
10170
  const G = x.axis === "v" ? [T, k] : [P, $];
10175
- Math.min(x.hi, G[1]) - Math.max(x.lo, G[0]) < Eb || (x.axis === "v" ? P < x.at && x.at < $ : T < x.at && x.at < k) && R || (x.axis === "v" ? (Math.abs(x.at - P) <= Fa && (I = Math.max(I, x.at + ac)), Math.abs(x.at - $) <= Fa && (ee = Math.min(ee, x.at - ac))) : (Math.abs(x.at - T) <= Fa && (j = Math.max(j, x.at + ac)), Math.abs(x.at - k) <= Fa && (fe = Math.min(fe, x.at - ac))));
10171
+ Math.min(x.hi, G[1]) - Math.max(x.lo, G[0]) < Eb || (x.axis === "v" ? P < x.at && x.at < $ : T < x.at && x.at < k) && R || (x.axis === "v" ? (Math.abs(x.at - P) <= Fa && (I = Math.max(I, x.at + ac)), Math.abs(x.at - $) <= Fa && (J = Math.min(J, x.at - ac))) : (Math.abs(x.at - T) <= Fa && (j = Math.max(j, x.at + ac)), Math.abs(x.at - k) <= Fa && (fe = Math.min(fe, x.at - ac))));
10176
10172
  }
10177
10173
  }
10178
- if (I > m - sc && (I = P), j > y - sc && (j = T), ee < S + sc && (ee = $), fe < w + sc && (fe = k), I === P && j === T && ee === $ && fe === k) continue;
10179
- const Re = r.get(d), De = { x: Re.x, y: Re.y, width: Re.width, height: Re.height }, Je = Xe(r), Q = new Set(ht(Je).map(ft)), te = a(Je);
10180
- o.resizeShape(Re, { x: I, y: j, width: ee - I, height: fe - j });
10181
- let ue = Xe(r), ve = ht(ue).filter((Ae) => !Q.has(ft(Ae)));
10174
+ if (I > m - sc && (I = P), j > y - sc && (j = T), J < S + sc && (J = $), fe < w + sc && (fe = k), I === P && j === T && J === $ && fe === k) continue;
10175
+ const Ce = r.get(d), De = { x: Ce.x, y: Ce.y, width: Ce.width, height: Ce.height }, Je = Xe(r), Z = new Set(ht(Je).map(ft)), ee = a(Je);
10176
+ o.resizeShape(Ce, { x: I, y: j, width: J - I, height: fe - j });
10177
+ let ue = Xe(r), ve = ht(ue).filter((Pe) => !Z.has(ft(Pe)));
10182
10178
  const K = [];
10183
10179
  if (ve.length > 0 && ve.every(
10184
- (Ae) => Ae.kind === "label-over-line" && !i.has(Ae.edge) && ue.edges.some((N) => N.id === Ae.edge)
10180
+ (Pe) => Pe.kind === "label-over-line" && !i.has(Pe.edge) && ue.edges.some((N) => N.id === Pe.edge)
10185
10181
  )) {
10186
- for (const Ae of ve) {
10187
- if (Ae.kind !== "label-over-line") continue;
10188
- const N = ue.edges.find((J) => J.id === Ae.edge), R = N && Db(N, ue), x = (f = r.get(Ae.edge)) == null ? void 0 : f.label;
10182
+ for (const Pe of ve) {
10183
+ if (Pe.kind !== "label-over-line") continue;
10184
+ const N = ue.edges.find((Q) => Q.id === Pe.edge), R = N && Db(N, ue), x = (f = r.get(Pe.edge)) == null ? void 0 : f.label;
10189
10185
  if (!R || !x) continue;
10190
10186
  const G = R.x - x.x, q = R.y - x.y;
10191
10187
  o.moveElements([x], { x: G, y: q }), K.push({ label: x, dx: G, dy: q });
10192
10188
  }
10193
- ue = Xe(r), ve = ht(ue).filter((Ae) => !Q.has(ft(Ae)));
10189
+ ue = Xe(r), ve = ht(ue).filter((Pe) => !Z.has(ft(Pe)));
10194
10190
  }
10195
- const ie = a(ue), Me = [...ie].some((Ae) => !te.has(Ae));
10196
- if (ve.length || Me || ie.size >= te.size) {
10197
- for (const Ae of K.reverse()) o.moveElements([Ae.label], { x: -Ae.dx, y: -Ae.dy });
10198
- o.resizeShape(Re, De);
10191
+ const ne = a(ue), Ae = [...ne].some((Pe) => !ee.has(Pe));
10192
+ if (ve.length || Ae || ne.size >= ee.size) {
10193
+ for (const Pe of K.reverse()) o.moveElements([Pe.label], { x: -Pe.dx, y: -Pe.dy });
10194
+ o.resizeShape(Ce, De);
10199
10195
  }
10200
10196
  }
10201
10197
  }
@@ -10281,25 +10277,25 @@ function Mi(e) {
10281
10277
  return typeof t == "string" ? t : void 0;
10282
10278
  }
10283
10279
  function eC(e) {
10284
- const t = e.rootElements ?? [], n = t.find((Q) => Q.$type === "bpmn:Collaboration"), i = new Map(
10285
- t.filter((Q) => Q.$type === "bpmn:Process").map((Q) => [Q.id, Q])
10286
- ), r = [], o = [], a = [], s = [], c = [], l = [], u = { poolOrders: {}, bands: {}, placements: {}, afterColumns: {} }, p = [], f = [], d = [], h = [], g = [], b = [], E = [], _ = /* @__PURE__ */ new Set(), m = /* @__PURE__ */ new Set(), y = (Q) => {
10287
- Q && _.add(Q);
10288
- }, S = (Q) => {
10289
- _.add(Q), m.add(Q);
10290
- }, w = (Q) => {
10291
- const te = Ig(Q, "bwl:Placement");
10292
- if (!te) return;
10293
- const ue = typeof te.anchor == "string" ? te.anchor : void 0;
10294
- if (!ue || !JR(te.side)) return;
10295
- const ve = typeof te.offset == "number" ? te.offset : void 0;
10296
- g.push({ owner: Q.id, anchor: ue, side: te.side, ...ve !== void 0 ? { offset: ve } : {} });
10297
- }, P = (Q) => {
10298
- const te = Ig(Q, "bwl:Members"), ue = typeof (te == null ? void 0 : te.refs) == "string" ? te.refs.split(/\s+/).filter(Boolean) : [];
10299
- ue.length && E.push({ owner: Q.id, refs: ue });
10300
- }, T = (Q) => {
10301
- var te;
10302
- for (const ue of Q)
10280
+ const t = e.rootElements ?? [], n = t.find((Z) => Z.$type === "bpmn:Collaboration"), i = new Map(
10281
+ t.filter((Z) => Z.$type === "bpmn:Process").map((Z) => [Z.id, Z])
10282
+ ), r = [], o = [], a = [], s = [], c = [], l = [], u = { poolOrders: {}, bands: {}, placements: {}, afterColumns: {} }, p = [], f = [], d = [], h = [], g = [], b = [], E = [], _ = /* @__PURE__ */ new Set(), m = /* @__PURE__ */ new Set(), y = (Z) => {
10283
+ Z && _.add(Z);
10284
+ }, S = (Z) => {
10285
+ _.add(Z), m.add(Z);
10286
+ }, w = (Z) => {
10287
+ const ee = Ig(Z, "bwl:Placement");
10288
+ if (!ee) return;
10289
+ const ue = typeof ee.anchor == "string" ? ee.anchor : void 0;
10290
+ if (!ue || !JR(ee.side)) return;
10291
+ const ve = typeof ee.offset == "number" ? ee.offset : void 0;
10292
+ g.push({ owner: Z.id, anchor: ue, side: ee.side, ...ve !== void 0 ? { offset: ve } : {} });
10293
+ }, P = (Z) => {
10294
+ const ee = Ig(Z, "bwl:Members"), ue = typeof (ee == null ? void 0 : ee.refs) == "string" ? ee.refs.split(/\s+/).filter(Boolean) : [];
10295
+ ue.length && E.push({ owner: Z.id, refs: ue });
10296
+ }, T = (Z) => {
10297
+ var ee;
10298
+ for (const ue of Z)
10303
10299
  switch (y(ue.id), ue.$type) {
10304
10300
  case "bpmn:TextAnnotation":
10305
10301
  S(ue.id), s.push({ id: ue.id, text: typeof ue.text == "string" ? ue.text : "" }), w(ue);
@@ -10314,25 +10310,25 @@ function eC(e) {
10314
10310
  break;
10315
10311
  case "bpmn:Group": {
10316
10312
  S(ue.id);
10317
- const ve = (te = ue.categoryValueRef) == null ? void 0 : te.value;
10313
+ const ve = (ee = ue.categoryValueRef) == null ? void 0 : ee.value;
10318
10314
  c.push({ id: ue.id, ...typeof ve == "string" && ve ? { name: ve } : {} }), P(ue);
10319
10315
  break;
10320
10316
  }
10321
10317
  default:
10322
10318
  l.push({ id: ue.id, type: ue.$type, reason: "type-outside-mvp" });
10323
10319
  }
10324
- }, $ = (Q) => {
10325
- for (const te of Q.flowElements ?? [])
10326
- y(te.id), l.push({ id: te.id, type: te.$type, reason: "inside-container" }), (te.flowElements ?? []).length && $(te);
10327
- for (const te of Q.artifacts ?? [])
10328
- y(te.id), l.push({ id: te.id, type: te.$type, reason: "inside-container" });
10329
- }, k = (Q, te) => {
10330
- const ue = Q.flowElements ?? [], ve = (Q.laneSets ?? []).flatMap((V) => V.lanes ?? []), K = /* @__PURE__ */ new Map();
10320
+ }, $ = (Z) => {
10321
+ for (const ee of Z.flowElements ?? [])
10322
+ y(ee.id), l.push({ id: ee.id, type: ee.$type, reason: "inside-container" }), (ee.flowElements ?? []).length && $(ee);
10323
+ for (const ee of Z.artifacts ?? [])
10324
+ y(ee.id), l.push({ id: ee.id, type: ee.$type, reason: "inside-container" });
10325
+ }, k = (Z, ee) => {
10326
+ const ue = Z.flowElements ?? [], ve = (Z.laneSets ?? []).flatMap((V) => V.lanes ?? []), K = /* @__PURE__ */ new Map();
10331
10327
  for (const V of ve) {
10332
10328
  y(V.id);
10333
- for (const ie of V.flowNodeRef ?? []) {
10334
- const Me = Mi(ie);
10335
- Me && K.set(Me, V.id);
10329
+ for (const ne of V.flowNodeRef ?? []) {
10330
+ const Ae = Mi(ne);
10331
+ Ae && K.set(Ae, V.id);
10336
10332
  }
10337
10333
  }
10338
10334
  for (const V of ue) {
@@ -10349,22 +10345,22 @@ function eC(e) {
10349
10345
  S(V.id), a.push({ id: V.id, ...V.name ? { name: V.name } : {} });
10350
10346
  continue;
10351
10347
  }
10352
- const ie = QR(V.$type), Me = ie === "intermediateCatchEvent" ? eb((V.eventDefinitions ?? []).map((x) => x.$type)) : void 0;
10353
- if (!lE(ie) || ie === "intermediateCatchEvent" && !Me) {
10348
+ const ne = QR(V.$type), Ae = ne === "intermediateCatchEvent" ? eb((V.eventDefinitions ?? []).map((x) => x.$type)) : void 0;
10349
+ if (!lE(ne) || ne === "intermediateCatchEvent" && !Ae) {
10354
10350
  l.push({ id: V.id, type: V.$type, reason: "type-outside-mvp" });
10355
10351
  continue;
10356
10352
  }
10357
10353
  S(V.id);
10358
- const Ae = ie === "boundaryEvent" ? Mi(V.attachedToRef) : void 0;
10354
+ const Pe = ne === "boundaryEvent" ? Mi(V.attachedToRef) : void 0;
10359
10355
  o.push({
10360
10356
  id: V.id,
10361
- type: ie,
10357
+ type: ne,
10362
10358
  ...V.name ? { name: V.name } : {},
10363
- ...te ? { participant: te } : {},
10359
+ ...ee ? { participant: ee } : {},
10364
10360
  ...K.has(V.id) ? { lane: K.get(V.id) } : {},
10365
- ...Ae ? { attachedTo: Ae } : {},
10366
- ...Me ? { eventDefinition: Me } : {}
10367
- }), ie === "subProcess" && $(V);
10361
+ ...Pe ? { attachedTo: Pe } : {},
10362
+ ...Ae ? { eventDefinition: Ae } : {}
10363
+ }), ne === "subProcess" && $(V);
10368
10364
  const N = Dg(V, "bwl:band");
10369
10365
  N !== void 0 && (u.bands[V.id] = N);
10370
10366
  const R = Nb(V, "bwl:afterColumn");
@@ -10385,76 +10381,76 @@ function eC(e) {
10385
10381
  target: V.id
10386
10382
  });
10387
10383
  }
10388
- T(Q.artifacts ?? []);
10384
+ T(Z.artifacts ?? []);
10389
10385
  };
10390
10386
  if (n) {
10391
- const Q = /* @__PURE__ */ new Set();
10392
- for (const te of n.participants ?? []) {
10393
- S(te.id);
10394
- const ue = Mi(te.processRef);
10395
- ue && Q.add(ue);
10396
- const ve = ue ? i.get(ue) : void 0, K = ((ve == null ? void 0 : ve.laneSets) ?? []).flatMap((Ae) => Ae.lanes ?? []), V = K.map((Ae) => ({ id: Ae.id, ...Ae.name ? { name: Ae.name } : {} }));
10397
- for (const Ae of V) S(Ae.id);
10398
- const ie = !ve || (ve.flowElements ?? []).length === 0 && K.length === 0 && (ve.artifacts ?? []).length === 0;
10387
+ const Z = /* @__PURE__ */ new Set();
10388
+ for (const ee of n.participants ?? []) {
10389
+ S(ee.id);
10390
+ const ue = Mi(ee.processRef);
10391
+ ue && Z.add(ue);
10392
+ const ve = ue ? i.get(ue) : void 0, K = ((ve == null ? void 0 : ve.laneSets) ?? []).flatMap((Pe) => Pe.lanes ?? []), V = K.map((Pe) => ({ id: Pe.id, ...Pe.name ? { name: Pe.name } : {} }));
10393
+ for (const Pe of V) S(Pe.id);
10394
+ const ne = !ve || (ve.flowElements ?? []).length === 0 && K.length === 0 && (ve.artifacts ?? []).length === 0;
10399
10395
  r.push({
10400
- id: te.id,
10401
- ...te.name ? { name: te.name } : {},
10402
- ...ie ? { blackBox: !0 } : {},
10396
+ id: ee.id,
10397
+ ...ee.name ? { name: ee.name } : {},
10398
+ ...ne ? { blackBox: !0 } : {},
10403
10399
  ...V.length ? { lanes: V } : {}
10404
10400
  });
10405
- const Me = Dg(te, "bwl:poolOrder");
10406
- Me !== void 0 && (u.poolOrders[te.id] = Me), ve && k(ve, te.id);
10407
- }
10408
- for (const te of n.messageFlows ?? [])
10409
- y(te.id), f.push({
10410
- id: te.id,
10411
- source: Mi(te.sourceRef),
10412
- target: Mi(te.targetRef),
10413
- ...typeof te.name == "string" && te.name ? { name: te.name } : {}
10401
+ const Ae = Dg(ee, "bwl:poolOrder");
10402
+ Ae !== void 0 && (u.poolOrders[ee.id] = Ae), ve && k(ve, ee.id);
10403
+ }
10404
+ for (const ee of n.messageFlows ?? [])
10405
+ y(ee.id), f.push({
10406
+ id: ee.id,
10407
+ source: Mi(ee.sourceRef),
10408
+ target: Mi(ee.targetRef),
10409
+ ...typeof ee.name == "string" && ee.name ? { name: ee.name } : {}
10414
10410
  });
10415
10411
  T(n.artifacts ?? []);
10416
- for (const [te, ue] of i)
10417
- !Q.has(te) && (ue.flowElements ?? []).length > 0 && l.push({ id: te, type: ue.$type, reason: "unreachable-process" });
10412
+ for (const [ee, ue] of i)
10413
+ !Z.has(ee) && (ue.flowElements ?? []).length > 0 && l.push({ id: ee, type: ue.$type, reason: "unreachable-process" });
10418
10414
  } else
10419
- for (const Q of i.values()) k(Q);
10420
- const I = [], j = [], ee = [], fe = [], Re = (Q, te) => !!Q && !!te && m.has(Q) && m.has(te);
10421
- for (const Q of p) {
10422
- if (!Re(Q.source, Q.target)) {
10423
- l.push({ id: Q.id, type: "bpmn:SequenceFlow", reason: "endpoint-outside-mvp" });
10415
+ for (const Z of i.values()) k(Z);
10416
+ const I = [], j = [], J = [], fe = [], Ce = (Z, ee) => !!Z && !!ee && m.has(Z) && m.has(ee);
10417
+ for (const Z of p) {
10418
+ if (!Ce(Z.source, Z.target)) {
10419
+ l.push({ id: Z.id, type: "bpmn:SequenceFlow", reason: "endpoint-outside-mvp" });
10424
10420
  continue;
10425
10421
  }
10426
- I.push({ id: Q.id, source: Q.source, target: Q.target, ...Q.name ? { name: Q.name } : {} }), m.add(Q.id);
10422
+ I.push({ id: Z.id, source: Z.source, target: Z.target, ...Z.name ? { name: Z.name } : {} }), m.add(Z.id);
10427
10423
  }
10428
- for (const Q of f) {
10429
- if (!Re(Q.source, Q.target)) {
10430
- l.push({ id: Q.id, type: "bpmn:MessageFlow", reason: "endpoint-outside-mvp" });
10424
+ for (const Z of f) {
10425
+ if (!Ce(Z.source, Z.target)) {
10426
+ l.push({ id: Z.id, type: "bpmn:MessageFlow", reason: "endpoint-outside-mvp" });
10431
10427
  continue;
10432
10428
  }
10433
- j.push({ id: Q.id, source: Q.source, target: Q.target, ...Q.name ? { name: Q.name } : {} }), m.add(Q.id);
10429
+ j.push({ id: Z.id, source: Z.source, target: Z.target, ...Z.name ? { name: Z.name } : {} }), m.add(Z.id);
10434
10430
  }
10435
- for (const Q of h) {
10436
- if (!Re(Q.source, Q.target)) {
10437
- l.push({ id: Q.id ?? "", type: Q.type, reason: "endpoint-outside-mvp" });
10431
+ for (const Z of h) {
10432
+ if (!Ce(Z.source, Z.target)) {
10433
+ l.push({ id: Z.id ?? "", type: Z.type, reason: "endpoint-outside-mvp" });
10438
10434
  continue;
10439
10435
  }
10440
- fe.push({ ...Q.id ? { id: Q.id } : {}, source: Q.source, target: Q.target }), Q.id && m.add(Q.id);
10436
+ fe.push({ ...Z.id ? { id: Z.id } : {}, source: Z.source, target: Z.target }), Z.id && m.add(Z.id);
10441
10437
  }
10442
- for (const Q of d) {
10443
- if (!Re(Q.source, Q.target)) {
10444
- l.push({ id: Q.id ?? "", type: Q.type, reason: "endpoint-outside-mvp" });
10438
+ for (const Z of d) {
10439
+ if (!Ce(Z.source, Z.target)) {
10440
+ l.push({ id: Z.id ?? "", type: Z.type, reason: "endpoint-outside-mvp" });
10445
10441
  continue;
10446
10442
  }
10447
- ee.push({ ...Q.id ? { id: Q.id } : {}, source: Q.source, target: Q.target });
10443
+ J.push({ ...Z.id ? { id: Z.id } : {}, source: Z.source, target: Z.target });
10448
10444
  }
10449
- const De = new Map(c.map((Q) => [Q.id, Q]));
10450
- for (const { owner: Q, refs: te } of E) {
10451
- const ue = te.filter((K) => _.has(K)), ve = De.get(Q);
10445
+ const De = new Map(c.map((Z) => [Z.id, Z]));
10446
+ for (const { owner: Z, refs: ee } of E) {
10447
+ const ue = ee.filter((K) => _.has(K)), ve = De.get(Z);
10452
10448
  ve && ue.length && (ve.members = ue);
10453
10449
  }
10454
- for (const Q of g)
10455
- _.has(Q.anchor) && (u.placements[Q.owner] = { anchor: Q.anchor, side: Q.side, ...Q.offset !== void 0 ? { offset: Q.offset } : {} });
10456
- for (const [Q, te] of b)
10457
- _.has(te) && (u.afterColumns[Q] = te);
10450
+ for (const Z of g)
10451
+ _.has(Z.anchor) && (u.placements[Z.owner] = { anchor: Z.anchor, side: Z.side, ...Z.offset !== void 0 ? { offset: Z.offset } : {} });
10452
+ for (const [Z, ee] of b)
10453
+ _.has(ee) && (u.afterColumns[Z] = ee);
10458
10454
  return { definition: {
10459
10455
  ...r.length ? { participants: r } : {},
10460
10456
  nodes: o,
@@ -10463,7 +10459,7 @@ function eC(e) {
10463
10459
  ...a.length ? { dataStores: a } : {},
10464
10460
  ...fe.length ? { dataAssociations: fe } : {},
10465
10461
  ...s.length ? { annotations: s } : {},
10466
- ...ee.length ? { associations: ee } : {},
10462
+ ...J.length ? { associations: J } : {},
10467
10463
  ...c.length ? { groups: c } : {}
10468
10464
  }, hints: u, omitted: l };
10469
10465
  }
@@ -11351,10 +11347,10 @@ function Wb(e, t) {
11351
11347
  function d(m, y) {
11352
11348
  if (y && y.length) {
11353
11349
  const S = /* @__PURE__ */ Object.create(null), w = /* @__PURE__ */ Object.create(null), P = [], T = [], $ = [];
11354
- let k, I, j, ee;
11350
+ let k, I, j, J;
11355
11351
  for (let fe in r)
11356
- k = r[fe], y.indexOf(fe) !== -1 && (k[2] === "private" ? (I = P.indexOf(k[3]), I === -1 ? (j = k[3].createChild([], y), ee = f(j), P.push(k[3]), T.push(j), $.push(ee), S[fe] = [ee, fe, "private", j]) : S[fe] = [$[I], fe, "private", T[I]]) : S[fe] = [k[2], k[1]], w[fe] = !0), (k[2] === "factory" || k[2] === "type") && k[1].$scope && y.forEach((Re) => {
11357
- k[1].$scope.indexOf(Re) !== -1 && (S[fe] = [k[2], k[1]], w[Re] = !0);
11352
+ k = r[fe], y.indexOf(fe) !== -1 && (k[2] === "private" ? (I = P.indexOf(k[3]), I === -1 ? (j = k[3].createChild([], y), J = f(j), P.push(k[3]), T.push(j), $.push(J), S[fe] = [J, fe, "private", j]) : S[fe] = [$[I], fe, "private", T[I]]) : S[fe] = [k[2], k[1]], w[fe] = !0), (k[2] === "factory" || k[2] === "type") && k[1].$scope && y.forEach((Ce) => {
11353
+ k[1].$scope.indexOf(Ce) !== -1 && (S[fe] = [k[2], k[1]], w[Ce] = !0);
11358
11354
  });
11359
11355
  y.forEach((fe) => {
11360
11356
  if (!w[fe])
@@ -11973,13 +11969,13 @@ function Kb(e, t, n, i, r, o, a, s, c, l) {
11973
11969
  T = P + u * (a && T > P ? 1 : -1), s = S + n * Zt.cos(T), c = w + i * Zt.sin(T), f = Kb(s, c, n, i, r, 0, a, I, j, [T, k, S, w]);
11974
11970
  }
11975
11971
  $ = T - P;
11976
- var ee = Zt.cos(P), fe = Zt.sin(P), Re = Zt.cos(T), De = Zt.sin(T), Je = Zt.tan($ / 4), Q = 4 / 3 * n * Je, te = 4 / 3 * i * Je, ue = [e, t], ve = [e + Q * fe, t - te * ee], K = [s + Q * De, c - te * Re], V = [s, c];
11972
+ var J = Zt.cos(P), fe = Zt.sin(P), Ce = Zt.cos(T), De = Zt.sin(T), Je = Zt.tan($ / 4), Z = 4 / 3 * n * Je, ee = 4 / 3 * i * Je, ue = [e, t], ve = [e + Z * fe, t - ee * J], K = [s + Z * De, c - ee * Ce], V = [s, c];
11977
11973
  if (ve[0] = 2 * ue[0] - ve[0], ve[1] = 2 * ue[1] - ve[1], l)
11978
11974
  return [ve, K, V].concat(f);
11979
11975
  f = [ve, K, V].concat(f).join().split(",");
11980
- for (var ie = [], Me = 0, Ae = f.length; Me < Ae; Me++)
11981
- ie[Me] = Me % 2 ? h(f[Me - 1], f[Me], p).y : h(f[Me], f[Me + 1], p).x;
11982
- return ie;
11976
+ for (var ne = [], Ae = 0, Pe = f.length; Ae < Pe; Ae++)
11977
+ ne[Ae] = Ae % 2 ? h(f[Ae - 1], f[Ae], p).y : h(f[Ae], f[Ae + 1], p).x;
11978
+ return ne;
11983
11979
  }
11984
11980
  function gM(e, t, n, i, r, o, a, s) {
11985
11981
  for (var c = [], l = [[], []], u, p, f, d, h, g, b, E, _ = 0; _ < 2; ++_) {
@@ -13054,8 +13050,8 @@ function HM(e) {
13054
13050
  function zM(e) {
13055
13051
  var t = {}, n = [], i = {};
13056
13052
  function r(K, V) {
13057
- return function(ie) {
13058
- K(ie, V);
13053
+ return function(ne) {
13054
+ K(ne, V);
13059
13055
  };
13060
13056
  }
13061
13057
  function o(K) {
@@ -13065,8 +13061,8 @@ function zM(e) {
13065
13061
  return t[K.id];
13066
13062
  }
13067
13063
  function s(K, V) {
13068
- var ie = K.gfx;
13069
- if (ie)
13064
+ var ne = K.gfx;
13065
+ if (ne)
13070
13066
  throw new Error(
13071
13067
  `already rendered ${Cn(K)}`
13072
13068
  );
@@ -13077,21 +13073,21 @@ function zM(e) {
13077
13073
  }
13078
13074
  function l(K, V) {
13079
13075
  try {
13080
- var ie = i[K.id] && s(K, V);
13081
- return o(K), ie;
13082
- } catch (Me) {
13083
- u(Me.message, { element: K, error: Me }), console.error(`failed to import ${Cn(K)}`, Me);
13076
+ var ne = i[K.id] && s(K, V);
13077
+ return o(K), ne;
13078
+ } catch (Ae) {
13079
+ u(Ae.message, { element: K, error: Ae }), console.error(`failed to import ${Cn(K)}`, Ae);
13084
13080
  }
13085
13081
  }
13086
13082
  function u(K, V) {
13087
13083
  e.error(K, V);
13088
13084
  }
13089
13085
  var p = this.registerDi = function(V) {
13090
- var ie = V.bpmnElement;
13091
- ie ? i[ie.id] ? u(
13092
- `multiple DI elements defined for ${Cn(ie)}`,
13093
- { element: ie }
13094
- ) : i[ie.id] = V : u(
13086
+ var ne = V.bpmnElement;
13087
+ ne ? i[ne.id] ? u(
13088
+ `multiple DI elements defined for ${Cn(ne)}`,
13089
+ { element: ne }
13090
+ ) : i[ne.id] = V : u(
13095
13091
  `no bpmnElement referenced in ${Cn(V)}`,
13096
13092
  { element: V }
13097
13093
  );
@@ -13105,34 +13101,34 @@ function zM(e) {
13105
13101
  function h(K) {
13106
13102
  p(K);
13107
13103
  }
13108
- this.handleDefinitions = function(V, ie) {
13109
- var Me = V.diagrams;
13110
- if (ie && Me.indexOf(ie) === -1)
13104
+ this.handleDefinitions = function(V, ne) {
13105
+ var Ae = V.diagrams;
13106
+ if (ne && Ae.indexOf(ne) === -1)
13111
13107
  throw new Error("diagram not part of <bpmn:Definitions />");
13112
- if (!ie && Me && Me.length && (ie = Me[0]), !ie)
13108
+ if (!ne && Ae && Ae.length && (ne = Ae[0]), !ne)
13113
13109
  throw new Error("no diagram to display");
13114
- i = {}, f(ie);
13115
- var Ae = ie.plane;
13116
- if (!Ae)
13110
+ i = {}, f(ne);
13111
+ var Pe = ne.plane;
13112
+ if (!Pe)
13117
13113
  throw new Error(
13118
- `no plane for ${Cn(ie)}`
13114
+ `no plane for ${Cn(ne)}`
13119
13115
  );
13120
- var N = Ae.bpmnElement;
13116
+ var N = Pe.bpmnElement;
13121
13117
  if (!N)
13122
13118
  if (N = HM(V), N)
13123
13119
  u(
13124
- `correcting missing bpmnElement on ${Cn(Ae)} to ${Cn(N)}`
13125
- ), Ae.bpmnElement = N, p(Ae);
13120
+ `correcting missing bpmnElement on ${Cn(Pe)} to ${Cn(N)}`
13121
+ ), Pe.bpmnElement = N, p(Pe);
13126
13122
  else
13127
13123
  throw new Error("no process or collaboration to display");
13128
- var R = c(N, Ae);
13124
+ var R = c(N, Pe);
13129
13125
  if ($n(N, "bpmn:Process") || $n(N, "bpmn:SubProcess"))
13130
13126
  b(N, R);
13131
13127
  else if ($n(N, "bpmn:Collaboration"))
13132
13128
  ue(N, R), E(V.rootElements, R);
13133
13129
  else
13134
13130
  throw new Error(
13135
- `unsupported bpmnElement for ${Cn(Ae)}: ${Cn(N)}`
13131
+ `unsupported bpmnElement for ${Cn(Pe)}: ${Cn(N)}`
13136
13132
  );
13137
13133
  g(n);
13138
13134
  };
@@ -13144,10 +13140,10 @@ function zM(e) {
13144
13140
  Je(K, V), $(K.ioSpecification, V), T(K.artifacts, V), o(K);
13145
13141
  }
13146
13142
  function E(K, V) {
13147
- var ie = et(K, function(Me) {
13148
- return !a(Me) && $n(Me, "bpmn:Process") && Me.laneSets;
13143
+ var ne = et(K, function(Ae) {
13144
+ return !a(Ae) && $n(Ae, "bpmn:Process") && Ae.laneSets;
13149
13145
  });
13150
- ie.forEach(r(b, V));
13146
+ ne.forEach(r(b, V));
13151
13147
  }
13152
13148
  function _(K, V) {
13153
13149
  l(K, V);
@@ -13168,73 +13164,73 @@ function zM(e) {
13168
13164
  l(K, V);
13169
13165
  }
13170
13166
  function T(K, V) {
13171
- z(K, function(ie) {
13172
- $n(ie, "bpmn:Association") ? n.push(function() {
13173
- P(ie, V);
13174
- }) : P(ie, V);
13167
+ z(K, function(ne) {
13168
+ $n(ne, "bpmn:Association") ? n.push(function() {
13169
+ P(ne, V);
13170
+ }) : P(ne, V);
13175
13171
  });
13176
13172
  }
13177
13173
  function $(K, V) {
13178
13174
  K && (z(K.dataInputs, r(S, V)), z(K.dataOutputs, r(w, V)));
13179
13175
  }
13180
- var k = this.handleSubProcess = function(V, ie) {
13181
- Je(V, ie), T(V.artifacts, ie);
13176
+ var k = this.handleSubProcess = function(V, ne) {
13177
+ Je(V, ne), T(V.artifacts, ne);
13182
13178
  };
13183
13179
  function I(K, V) {
13184
- var ie = l(K, V);
13185
- $n(K, "bpmn:SubProcess") && k(K, ie || V), $n(K, "bpmn:Activity") && $(K.ioSpecification, V), n.push(function() {
13180
+ var ne = l(K, V);
13181
+ $n(K, "bpmn:SubProcess") && k(K, ne || V), $n(K, "bpmn:Activity") && $(K.ioSpecification, V), n.push(function() {
13186
13182
  z(K.dataInputAssociations, r(y, V)), z(K.dataOutputAssociations, r(y, V));
13187
13183
  });
13188
13184
  }
13189
13185
  function j(K, V) {
13190
13186
  l(K, V);
13191
13187
  }
13192
- function ee(K, V) {
13188
+ function J(K, V) {
13193
13189
  l(K, V);
13194
13190
  }
13195
13191
  function fe(K, V) {
13196
13192
  n.push(function() {
13197
- var ie = l(K, V);
13198
- K.childLaneSet && Re(K.childLaneSet, ie || V), ve(K);
13193
+ var ne = l(K, V);
13194
+ K.childLaneSet && Ce(K.childLaneSet, ne || V), ve(K);
13199
13195
  });
13200
13196
  }
13201
- function Re(K, V) {
13197
+ function Ce(K, V) {
13202
13198
  z(K.lanes, r(fe, V));
13203
13199
  }
13204
13200
  function De(K, V) {
13205
- z(K, r(Re, V));
13201
+ z(K, r(Ce, V));
13206
13202
  }
13207
13203
  function Je(K, V) {
13208
- Q(K.flowElements, V), K.laneSets && De(K.laneSets, V);
13209
- }
13210
- function Q(K, V) {
13211
- z(K, function(ie) {
13212
- $n(ie, "bpmn:SequenceFlow") ? n.push(function() {
13213
- j(ie, V);
13214
- }) : $n(ie, "bpmn:BoundaryEvent") ? n.unshift(function() {
13215
- I(ie, V);
13216
- }) : $n(ie, "bpmn:FlowNode") ? I(ie, V) : $n(ie, "bpmn:DataObject") || ($n(ie, "bpmn:DataStoreReference") || $n(ie, "bpmn:DataObjectReference") ? ee(ie, V) : u(
13217
- `unrecognized flowElement ${Cn(ie)} in context ${Cn(V && V.businessObject)}`,
13204
+ Z(K.flowElements, V), K.laneSets && De(K.laneSets, V);
13205
+ }
13206
+ function Z(K, V) {
13207
+ z(K, function(ne) {
13208
+ $n(ne, "bpmn:SequenceFlow") ? n.push(function() {
13209
+ j(ne, V);
13210
+ }) : $n(ne, "bpmn:BoundaryEvent") ? n.unshift(function() {
13211
+ I(ne, V);
13212
+ }) : $n(ne, "bpmn:FlowNode") ? I(ne, V) : $n(ne, "bpmn:DataObject") || ($n(ne, "bpmn:DataStoreReference") || $n(ne, "bpmn:DataObjectReference") ? J(ne, V) : u(
13213
+ `unrecognized flowElement ${Cn(ne)} in context ${Cn(V && V.businessObject)}`,
13218
13214
  {
13219
- element: ie,
13215
+ element: ne,
13220
13216
  context: V
13221
13217
  }
13222
13218
  ));
13223
13219
  });
13224
13220
  }
13225
- function te(K, V) {
13226
- var ie = l(K, V), Me = K.processRef;
13227
- Me && b(Me, ie || V);
13221
+ function ee(K, V) {
13222
+ var ne = l(K, V), Ae = K.processRef;
13223
+ Ae && b(Ae, ne || V);
13228
13224
  }
13229
13225
  function ue(K, V) {
13230
- z(K.participants, r(te, V)), n.push(function() {
13226
+ z(K.participants, r(ee, V)), n.push(function() {
13231
13227
  m(K.messageFlows, V);
13232
13228
  }), T(K.artifacts, V);
13233
13229
  }
13234
13230
  function ve(K) {
13235
13231
  z(K.flowNodeRef, function(V) {
13236
- var ie = V.get("lanes");
13237
- ie && ie.push(K);
13232
+ var ne = V.get("lanes");
13233
+ ne && ne.push(K);
13238
13234
  });
13239
13235
  }
13240
13236
  }
@@ -13808,7 +13804,7 @@ function wo(e, t, n, i, r, o, a) {
13808
13804
  ref: x = { x: 0, y: 0 },
13809
13805
  scale: G = 1,
13810
13806
  element: q,
13811
- parentGfx: J = r._svg
13807
+ parentGfx: Q = r._svg
13812
13808
  } = R, Ee = ke("marker", {
13813
13809
  id: N,
13814
13810
  viewBox: "0 0 20 20",
@@ -13819,8 +13815,8 @@ function wo(e, t, n, i, r, o, a) {
13819
13815
  orient: "auto"
13820
13816
  });
13821
13817
  Ue(Ee, q);
13822
- var Ye = Et(":scope > defs", J);
13823
- Ye || (Ye = ke("defs"), Ue(J, Ye)), Ue(Ye, Ee);
13818
+ var Ye = Et(":scope > defs", Q);
13819
+ Ye || (Ye = ke("defs"), Ue(Q, Ye)), Ue(Ye, Ee);
13824
13820
  }
13825
13821
  function d(N, R, x, G) {
13826
13822
  var q = vA.nextPrefixed("marker-");
@@ -13828,7 +13824,7 @@ function wo(e, t, n, i, r, o, a) {
13828
13824
  }
13829
13825
  function h(N, R, x, G, q) {
13830
13826
  if (x === "sequenceflow-end") {
13831
- var J = ke("path", {
13827
+ var Q = ke("path", {
13832
13828
  d: "M 1 5 L 11 10 L 1 15 Z",
13833
13829
  ...u({
13834
13830
  fill: q,
@@ -13837,7 +13833,7 @@ function wo(e, t, n, i, r, o, a) {
13837
13833
  })
13838
13834
  });
13839
13835
  f(R, {
13840
- element: J,
13836
+ element: Q,
13841
13837
  ref: { x: 11, y: 10 },
13842
13838
  scale: 0.5,
13843
13839
  parentGfx: N
@@ -13952,16 +13948,16 @@ function wo(e, t, n, i, r, o, a) {
13952
13948
  }
13953
13949
  function g(N, R, x, G, q = {}) {
13954
13950
  hn(G) && (q = G, G = 0), G = G || 0, q = u(q);
13955
- var J = R / 2, Ee = x / 2, Ye = ke("circle", {
13956
- cx: J,
13951
+ var Q = R / 2, Ee = x / 2, Ye = ke("circle", {
13952
+ cx: Q,
13957
13953
  cy: Ee,
13958
13954
  r: Math.round((R + x) / 4 - G),
13959
13955
  ...q
13960
13956
  });
13961
13957
  return Ue(N, Ye), Ye;
13962
13958
  }
13963
- function b(N, R, x, G, q, J) {
13964
- hn(q) && (J = q, q = 0), q = q || 0, J = u(J);
13959
+ function b(N, R, x, G, q, Q) {
13960
+ hn(q) && (Q = q, q = 0), q = q || 0, Q = u(Q);
13965
13961
  var Ee = ke("rect", {
13966
13962
  x: q,
13967
13963
  y: q,
@@ -13969,16 +13965,16 @@ function wo(e, t, n, i, r, o, a) {
13969
13965
  height: x - q * 2,
13970
13966
  rx: G,
13971
13967
  ry: G,
13972
- ...J
13968
+ ...Q
13973
13969
  });
13974
13970
  return Ue(N, Ee), Ee;
13975
13971
  }
13976
13972
  function E(N, R, x, G) {
13977
- var q = R / 2, J = x / 2, Ee = [
13973
+ var q = R / 2, Q = x / 2, Ee = [
13978
13974
  { x: q, y: 0 },
13979
- { x: R, y: J },
13975
+ { x: R, y: Q },
13980
13976
  { x: q, y: x },
13981
- { x: 0, y: J }
13977
+ { x: 0, y: Q }
13982
13978
  ], Ye = Ee.map(function(Bt) {
13983
13979
  return Bt.x + "," + Bt.y;
13984
13980
  }).join(" ");
@@ -14009,7 +14005,7 @@ function wo(e, t, n, i, r, o, a) {
14009
14005
  return y(R, x, W({ "data-marker": N }, G));
14010
14006
  }
14011
14007
  function w(N) {
14012
- return Ae[N];
14008
+ return Pe[N];
14013
14009
  }
14014
14010
  function P(N) {
14015
14011
  return function(R, x, G) {
@@ -14027,18 +14023,18 @@ function wo(e, t, n, i, r, o, a) {
14027
14023
  mx: 0.235,
14028
14024
  my: 0.315
14029
14025
  }
14030
- }), J = G ? be(R, c, x.stroke) : it(R, s, x.fill), Ee = G ? it(R, s, x.fill) : be(R, c, x.stroke), Ye = y(N, q, {
14031
- fill: J,
14026
+ }), Q = G ? be(R, c, x.stroke) : it(R, s, x.fill), Ee = G ? it(R, s, x.fill) : be(R, c, x.stroke), Ye = y(N, q, {
14027
+ fill: Q,
14032
14028
  stroke: Ee,
14033
14029
  strokeWidth: 1
14034
14030
  });
14035
14031
  return Ye;
14036
14032
  },
14037
14033
  "bpmn:TimerEventDefinition": function(N, R, x = {}) {
14038
- var G = x.width || R.width, q = x.height || R.height, J = x.width ? 1 : 2, Ee = g(N, G, q, 0.2 * q, {
14034
+ var G = x.width || R.width, q = x.height || R.height, Q = x.width ? 1 : 2, Ee = g(N, G, q, 0.2 * q, {
14039
14035
  fill: it(R, s, x.fill),
14040
14036
  stroke: be(R, c, x.stroke),
14041
- strokeWidth: J
14037
+ strokeWidth: Q
14042
14038
  }), Ye = i.getScaledPath("EVENT_TIMER_WH", {
14043
14039
  xScaleFactor: 0.75,
14044
14040
  yScaleFactor: 0.75,
@@ -14051,7 +14047,7 @@ function wo(e, t, n, i, r, o, a) {
14051
14047
  });
14052
14048
  y(N, Ye, {
14053
14049
  stroke: be(R, c, x.stroke),
14054
- strokeWidth: J
14050
+ strokeWidth: Q
14055
14051
  });
14056
14052
  for (var lt = 0; lt < 12; lt++) {
14057
14053
  var Bt = i.getScaledPath("EVENT_TIMER_LINE", {
@@ -14082,9 +14078,9 @@ function wo(e, t, n, i, r, o, a) {
14082
14078
  mx: 0.5,
14083
14079
  my: 0.2
14084
14080
  }
14085
- }), J = G ? be(R, c, x.stroke) : it(R, s, x.fill);
14081
+ }), Q = G ? be(R, c, x.stroke) : it(R, s, x.fill);
14086
14082
  return y(N, q, {
14087
- fill: J,
14083
+ fill: Q,
14088
14084
  stroke: be(R, c, x.stroke),
14089
14085
  strokeWidth: 1
14090
14086
  });
@@ -14116,9 +14112,9 @@ function wo(e, t, n, i, r, o, a) {
14116
14112
  mx: 0.57,
14117
14113
  my: 0.263
14118
14114
  }
14119
- }), J = G ? be(R, c, x.stroke) : it(R, s, x.fill);
14115
+ }), Q = G ? be(R, c, x.stroke) : it(R, s, x.fill);
14120
14116
  return y(N, q, {
14121
- fill: J,
14117
+ fill: Q,
14122
14118
  stroke: be(R, c, x.stroke),
14123
14119
  strokeWidth: 1
14124
14120
  });
@@ -14133,9 +14129,9 @@ function wo(e, t, n, i, r, o, a) {
14133
14129
  mx: 0.2,
14134
14130
  my: 0.722
14135
14131
  }
14136
- }), J = G ? be(R, c, x.stroke) : it(R, s, x.fill);
14132
+ }), Q = G ? be(R, c, x.stroke) : it(R, s, x.fill);
14137
14133
  return y(N, q, {
14138
- fill: J,
14134
+ fill: Q,
14139
14135
  stroke: be(R, c, x.stroke),
14140
14136
  strokeWidth: 1
14141
14137
  });
@@ -14150,8 +14146,8 @@ function wo(e, t, n, i, r, o, a) {
14150
14146
  mx: 0.638,
14151
14147
  my: -0.055
14152
14148
  }
14153
- }), J = G ? be(R, c, x.stroke) : "none", Ee = y(N, q, {
14154
- fill: J,
14149
+ }), Q = G ? be(R, c, x.stroke) : "none", Ee = y(N, q, {
14150
+ fill: Q,
14155
14151
  stroke: be(R, c, x.stroke),
14156
14152
  strokeWidth: 1
14157
14153
  });
@@ -14167,9 +14163,9 @@ function wo(e, t, n, i, r, o, a) {
14167
14163
  mx: 0.22,
14168
14164
  my: 0.5
14169
14165
  }
14170
- }), J = G ? be(R, c, x.stroke) : it(R, s, x.fill);
14166
+ }), Q = G ? be(R, c, x.stroke) : it(R, s, x.fill);
14171
14167
  return y(N, q, {
14172
- fill: J,
14168
+ fill: Q,
14173
14169
  stroke: be(R, c, x.stroke),
14174
14170
  strokeWidth: 1
14175
14171
  });
@@ -14184,10 +14180,10 @@ function wo(e, t, n, i, r, o, a) {
14184
14180
  mx: 0.5,
14185
14181
  my: 0.2
14186
14182
  }
14187
- }), J = G ? be(R, c, x.stroke) : it(R, s, x.fill);
14183
+ }), Q = G ? be(R, c, x.stroke) : it(R, s, x.fill);
14188
14184
  return y(N, q, {
14189
14185
  strokeWidth: 1,
14190
- fill: J,
14186
+ fill: Q,
14191
14187
  stroke: be(R, c, x.stroke)
14192
14188
  });
14193
14189
  },
@@ -14201,9 +14197,9 @@ function wo(e, t, n, i, r, o, a) {
14201
14197
  mx: 0.211,
14202
14198
  my: 0.36
14203
14199
  }
14204
- }), J = G ? be(R, c, x.stroke) : it(R, s, x.fill);
14200
+ }), Q = G ? be(R, c, x.stroke) : it(R, s, x.fill);
14205
14201
  return y(N, q, {
14206
- fill: J,
14202
+ fill: Q,
14207
14203
  stroke: be(R, c, x.stroke),
14208
14204
  strokeWidth: 1
14209
14205
  });
@@ -14235,12 +14231,12 @@ function wo(e, t, n, i, r, o, a) {
14235
14231
  }
14236
14232
  };
14237
14233
  function $(N, R, x = {}, G) {
14238
- var q = le(N), J = hA(q), Ee = G || N;
14239
- return q.get("eventDefinitions") && q.get("eventDefinitions").length > 1 ? q.get("parallelMultiple") ? T["bpmn:ParallelMultipleEventDefinition"](R, Ee, x, J) : T["bpmn:MultipleEventDefinition"](R, Ee, x, J) : Oi(q, "bpmn:MessageEventDefinition") ? T["bpmn:MessageEventDefinition"](R, Ee, x, J) : Oi(q, "bpmn:TimerEventDefinition") ? T["bpmn:TimerEventDefinition"](R, Ee, x, J) : Oi(q, "bpmn:ConditionalEventDefinition") ? T["bpmn:ConditionalEventDefinition"](R, Ee, x, J) : Oi(q, "bpmn:SignalEventDefinition") ? T["bpmn:SignalEventDefinition"](R, Ee, x, J) : Oi(q, "bpmn:EscalationEventDefinition") ? T["bpmn:EscalationEventDefinition"](R, Ee, x, J) : Oi(q, "bpmn:LinkEventDefinition") ? T["bpmn:LinkEventDefinition"](R, Ee, x, J) : Oi(q, "bpmn:ErrorEventDefinition") ? T["bpmn:ErrorEventDefinition"](R, Ee, x, J) : Oi(q, "bpmn:CancelEventDefinition") ? T["bpmn:CancelEventDefinition"](R, Ee, x, J) : Oi(q, "bpmn:CompensateEventDefinition") ? T["bpmn:CompensateEventDefinition"](R, Ee, x, J) : Oi(q, "bpmn:TerminateEventDefinition") ? T["bpmn:TerminateEventDefinition"](R, Ee, x, J) : null;
14234
+ var q = le(N), Q = hA(q), Ee = G || N;
14235
+ return q.get("eventDefinitions") && q.get("eventDefinitions").length > 1 ? q.get("parallelMultiple") ? T["bpmn:ParallelMultipleEventDefinition"](R, Ee, x, Q) : T["bpmn:MultipleEventDefinition"](R, Ee, x, Q) : Oi(q, "bpmn:MessageEventDefinition") ? T["bpmn:MessageEventDefinition"](R, Ee, x, Q) : Oi(q, "bpmn:TimerEventDefinition") ? T["bpmn:TimerEventDefinition"](R, Ee, x, Q) : Oi(q, "bpmn:ConditionalEventDefinition") ? T["bpmn:ConditionalEventDefinition"](R, Ee, x, Q) : Oi(q, "bpmn:SignalEventDefinition") ? T["bpmn:SignalEventDefinition"](R, Ee, x, Q) : Oi(q, "bpmn:EscalationEventDefinition") ? T["bpmn:EscalationEventDefinition"](R, Ee, x, Q) : Oi(q, "bpmn:LinkEventDefinition") ? T["bpmn:LinkEventDefinition"](R, Ee, x, Q) : Oi(q, "bpmn:ErrorEventDefinition") ? T["bpmn:ErrorEventDefinition"](R, Ee, x, Q) : Oi(q, "bpmn:CancelEventDefinition") ? T["bpmn:CancelEventDefinition"](R, Ee, x, Q) : Oi(q, "bpmn:CompensateEventDefinition") ? T["bpmn:CompensateEventDefinition"](R, Ee, x, Q) : Oi(q, "bpmn:TerminateEventDefinition") ? T["bpmn:TerminateEventDefinition"](R, Ee, x, Q) : null;
14240
14236
  }
14241
14237
  var k = {
14242
14238
  ParticipantMultiplicityMarker: function(N, R, x = {}) {
14243
- var G = li(R, x), q = Un(R, x), J = i.getScaledPath("MARKER_PARALLEL", {
14239
+ var G = li(R, x), q = Un(R, x), Q = i.getScaledPath("MARKER_PARALLEL", {
14244
14240
  xScaleFactor: 1,
14245
14241
  yScaleFactor: 1,
14246
14242
  containerWidth: G,
@@ -14250,7 +14246,7 @@ function wo(e, t, n, i, r, o, a) {
14250
14246
  my: (q - 15) / q
14251
14247
  }
14252
14248
  });
14253
- S("participant-multiplicity", N, J, {
14249
+ S("participant-multiplicity", N, Q, {
14254
14250
  strokeWidth: 2,
14255
14251
  fill: it(R, s, x.fill),
14256
14252
  stroke: be(R, c, x.stroke)
@@ -14279,7 +14275,7 @@ function wo(e, t, n, i, r, o, a) {
14279
14275
  });
14280
14276
  },
14281
14277
  ParallelMarker: function(N, R, x) {
14282
- var G = li(R, x), q = Un(R, x), J = i.getScaledPath("MARKER_PARALLEL", {
14278
+ var G = li(R, x), q = Un(R, x), Q = i.getScaledPath("MARKER_PARALLEL", {
14283
14279
  xScaleFactor: 1,
14284
14280
  yScaleFactor: 1,
14285
14281
  containerWidth: G,
@@ -14289,7 +14285,7 @@ function wo(e, t, n, i, r, o, a) {
14289
14285
  my: (q - 20) / q
14290
14286
  }
14291
14287
  });
14292
- S("parallel", N, J, {
14288
+ S("parallel", N, Q, {
14293
14289
  fill: it(R, s, x.fill),
14294
14290
  stroke: be(R, c, x.stroke)
14295
14291
  });
@@ -14328,7 +14324,7 @@ function wo(e, t, n, i, r, o, a) {
14328
14324
  });
14329
14325
  },
14330
14326
  LoopMarker: function(N, R, x) {
14331
- var G = li(R, x), q = Un(R, x), J = i.getScaledPath("MARKER_LOOP", {
14327
+ var G = li(R, x), q = Un(R, x), Q = i.getScaledPath("MARKER_LOOP", {
14332
14328
  xScaleFactor: 1,
14333
14329
  yScaleFactor: 1,
14334
14330
  containerWidth: G,
@@ -14338,7 +14334,7 @@ function wo(e, t, n, i, r, o, a) {
14338
14334
  my: (q - 7) / q
14339
14335
  }
14340
14336
  });
14341
- S("loop", N, J, {
14337
+ S("loop", N, Q, {
14342
14338
  strokeWidth: 1.5,
14343
14339
  fill: "none",
14344
14340
  stroke: be(R, c, x.stroke),
@@ -14346,7 +14342,7 @@ function wo(e, t, n, i, r, o, a) {
14346
14342
  });
14347
14343
  },
14348
14344
  AdhocMarker: function(N, R, x) {
14349
- var G = li(R, x), q = Un(R, x), J = i.getScaledPath("MARKER_ADHOC", {
14345
+ var G = li(R, x), q = Un(R, x), Q = i.getScaledPath("MARKER_ADHOC", {
14350
14346
  xScaleFactor: 1,
14351
14347
  yScaleFactor: 1,
14352
14348
  containerWidth: G,
@@ -14356,7 +14352,7 @@ function wo(e, t, n, i, r, o, a) {
14356
14352
  my: (q - 15) / q
14357
14353
  }
14358
14354
  });
14359
- S("adhoc", N, J, {
14355
+ S("adhoc", N, Q, {
14360
14356
  strokeWidth: 1,
14361
14357
  fill: be(R, c, x.stroke),
14362
14358
  stroke: be(R, c, x.stroke)
@@ -14373,8 +14369,8 @@ function wo(e, t, n, i, r, o, a) {
14373
14369
  width: li(R, G),
14374
14370
  height: Un(R, G)
14375
14371
  };
14376
- var q = le(R), J = x.includes("SubProcessMarker");
14377
- J ? G = {
14372
+ var q = le(R), Q = x.includes("SubProcessMarker");
14373
+ Q ? G = {
14378
14374
  ...G,
14379
14375
  seq: -21,
14380
14376
  parallel: -22,
@@ -14388,7 +14384,7 @@ function wo(e, t, n, i, r, o, a) {
14388
14384
  compensation: -7,
14389
14385
  loop: 0,
14390
14386
  adhoc: -8
14391
- }, q.get("isForCompensation") && x.push("CompensationMarker"), M(q, "bpmn:AdHocSubProcess") && (x.push("AdhocMarker"), J || W(G, { compensation: G.compensation - 18 }));
14387
+ }, q.get("isForCompensation") && x.push("CompensationMarker"), M(q, "bpmn:AdHocSubProcess") && (x.push("AdhocMarker"), Q || W(G, { compensation: G.compensation - 18 }));
14392
14388
  var Ee = q.get("loopCharacteristics"), Ye = Ee && Ee.get("isSequential");
14393
14389
  Ee && (W(G, {
14394
14390
  compensation: G.compensation - 18
@@ -14402,7 +14398,7 @@ function wo(e, t, n, i, r, o, a) {
14402
14398
  I(lt, N, R, G);
14403
14399
  });
14404
14400
  }
14405
- function ee(N, R, x = {}) {
14401
+ function J(N, R, x = {}) {
14406
14402
  x = W({
14407
14403
  size: {
14408
14404
  width: 100
@@ -14412,29 +14408,29 @@ function wo(e, t, n, i, r, o, a) {
14412
14408
  return at(G).add("djs-label"), Ue(N, G), G;
14413
14409
  }
14414
14410
  function fe(N, R, x, G = {}) {
14415
- var q = le(R), J = Pa({
14411
+ var q = le(R), Q = Pa({
14416
14412
  x: R.x,
14417
14413
  y: R.y,
14418
14414
  width: R.width,
14419
14415
  height: R.height
14420
14416
  }, G);
14421
- return ee(N, q.name, {
14417
+ return J(N, q.name, {
14422
14418
  align: x,
14423
- box: J,
14419
+ box: Q,
14424
14420
  padding: 7,
14425
14421
  style: {
14426
14422
  fill: Aa(R, l, c, G.stroke)
14427
14423
  }
14428
14424
  });
14429
14425
  }
14430
- function Re(N, R, x = {}) {
14426
+ function Ce(N, R, x = {}) {
14431
14427
  var G = {
14432
14428
  width: R.width,
14433
14429
  height: R.height,
14434
14430
  x: R.width / 2 + R.x,
14435
14431
  y: R.height / 2 + R.y
14436
14432
  };
14437
- return ee(N, ni(R), {
14433
+ return J(N, ni(R), {
14438
14434
  box: G,
14439
14435
  style: W(
14440
14436
  {},
@@ -14446,7 +14442,7 @@ function wo(e, t, n, i, r, o, a) {
14446
14442
  });
14447
14443
  }
14448
14444
  function De(N, R, x, G = {}) {
14449
- var q = dn(x), J = ee(N, R, {
14445
+ var q = dn(x), Q = J(N, R, {
14450
14446
  box: {
14451
14447
  height: 30,
14452
14448
  width: q ? Un(x, G) : li(x, G)
@@ -14458,7 +14454,7 @@ function wo(e, t, n, i, r, o, a) {
14458
14454
  });
14459
14455
  if (q) {
14460
14456
  var Ee = -1 * Un(x, G);
14461
- jc(J, 0, -Ee, 270);
14457
+ jc(Q, 0, -Ee, 270);
14462
14458
  }
14463
14459
  }
14464
14460
  function Je(N, R, x = {}) {
@@ -14473,19 +14469,19 @@ function wo(e, t, n, i, r, o, a) {
14473
14469
  stroke: be(R, c, x.stroke)
14474
14470
  });
14475
14471
  }
14476
- function Q(N, R, x = {}) {
14477
- var G = le(R), q = it(R, s, x.fill), J = be(R, c, x.stroke);
14478
- return (G.get("associationDirection") === "One" || G.get("associationDirection") === "Both") && (x.markerEnd = d(N, "association-end", q, J)), G.get("associationDirection") === "Both" && (x.markerStart = d(N, "association-start", q, J)), x = ut(x, [
14472
+ function Z(N, R, x = {}) {
14473
+ var G = le(R), q = it(R, s, x.fill), Q = be(R, c, x.stroke);
14474
+ return (G.get("associationDirection") === "One" || G.get("associationDirection") === "Both") && (x.markerEnd = d(N, "association-end", q, Q)), G.get("associationDirection") === "Both" && (x.markerStart = d(N, "association-start", q, Q)), x = ut(x, [
14479
14475
  "markerStart",
14480
14476
  "markerEnd"
14481
14477
  ]), m(N, R.waypoints, {
14482
14478
  ...x,
14483
- stroke: J,
14479
+ stroke: Q,
14484
14480
  strokeDasharray: "0, 5"
14485
14481
  });
14486
14482
  }
14487
- function te(N, R, x = {}) {
14488
- var G = it(R, s, x.fill), q = be(R, c, x.stroke), J = i.getScaledPath("DATA_OBJECT_PATH", {
14483
+ function ee(N, R, x = {}) {
14484
+ var G = it(R, s, x.fill), q = be(R, c, x.stroke), Q = i.getScaledPath("DATA_OBJECT_PATH", {
14489
14485
  xScaleFactor: 1,
14490
14486
  yScaleFactor: 1,
14491
14487
  containerWidth: R.width,
@@ -14494,7 +14490,7 @@ function wo(e, t, n, i, r, o, a) {
14494
14490
  mx: 0.474,
14495
14491
  my: 0.296
14496
14492
  }
14497
- }), Ee = y(N, J, {
14493
+ }), Ee = y(N, Q, {
14498
14494
  fill: G,
14499
14495
  fillOpacity: Do,
14500
14496
  stroke: q
@@ -14541,8 +14537,8 @@ function wo(e, t, n, i, r, o, a) {
14541
14537
  strokeWidth: 1.5
14542
14538
  }), q = le(R);
14543
14539
  if (M(q, "bpmn:Lane")) {
14544
- var J = q.get("name");
14545
- De(N, J, R, x);
14540
+ var Q = q.get("name");
14541
+ De(N, Q, R, x);
14546
14542
  }
14547
14543
  return G;
14548
14544
  }
@@ -14552,31 +14548,31 @@ function wo(e, t, n, i, r, o, a) {
14552
14548
  strokeDasharray: "0, 5.5",
14553
14549
  strokeWidth: 2.5
14554
14550
  }), !q)) {
14555
- var J = le(R).flowElements || [], Ee = J.filter((Ye) => M(Ye, "bpmn:StartEvent"));
14556
- Ee.length === 1 && ie(Ee[0], N, x, R);
14551
+ var Q = le(R).flowElements || [], Ee = Q.filter((Ye) => M(Ye, "bpmn:StartEvent"));
14552
+ Ee.length === 1 && ne(Ee[0], N, x, R);
14557
14553
  }
14558
14554
  return fe(N, R, q ? "center-top" : "center-middle", x), q ? j(N, R, void 0, x) : j(N, R, ["SubProcessMarker"], x), G;
14559
14555
  }
14560
- function ie(N, R, x, G) {
14561
- var q = 22, J = {
14556
+ function ne(N, R, x, G) {
14557
+ var q = 22, Q = {
14562
14558
  fill: it(G, s, x.fill),
14563
14559
  stroke: be(G, c, x.stroke),
14564
14560
  width: q,
14565
14561
  height: q
14566
14562
  }, Ee = le(N).isInterrupting, Ye = Ee ? 0 : 3, lt = Ee ? 1 : 1.2, Bt = 20, bt = (q - Bt) / 2, rn = "translate(" + bt + "," + bt + ")";
14567
14563
  g(R, Bt, Bt, {
14568
- fill: J.fill,
14569
- stroke: J.stroke,
14564
+ fill: Q.fill,
14565
+ stroke: Q.stroke,
14570
14566
  strokeWidth: lt,
14571
14567
  strokeDasharray: Ye,
14572
14568
  transform: rn
14573
- }), $(N, R, J, G);
14569
+ }), $(N, R, Q, G);
14574
14570
  }
14575
- function Me(N, R, x = {}) {
14571
+ function Ae(N, R, x = {}) {
14576
14572
  var G = Je(N, R, x);
14577
14573
  return fe(N, R, "center-middle", x), j(N, R, void 0, x), G;
14578
14574
  }
14579
- var Ae = this.handlers = {
14575
+ var Pe = this.handlers = {
14580
14576
  "bpmn:AdHocSubProcess": function(N, R, x = {}) {
14581
14577
  return ot(R) ? x = ut(x, [
14582
14578
  "fill",
@@ -14592,7 +14588,7 @@ function wo(e, t, n, i, r, o, a) {
14592
14588
  return x = ut(x, [
14593
14589
  "fill",
14594
14590
  "stroke"
14595
- ]), Q(N, R, x);
14591
+ ]), Z(N, R, x);
14596
14592
  },
14597
14593
  "bpmn:BoundaryEvent": function(N, R, x = {}) {
14598
14594
  var { renderIcon: G = !0 } = x;
@@ -14600,13 +14596,13 @@ function wo(e, t, n, i, r, o, a) {
14600
14596
  "fill",
14601
14597
  "stroke"
14602
14598
  ]);
14603
- var q = le(R), J = q.get("cancelActivity");
14599
+ var q = le(R), Q = q.get("cancelActivity");
14604
14600
  x = {
14605
14601
  strokeWidth: 1.5,
14606
14602
  fill: it(R, s, x.fill),
14607
14603
  fillOpacity: wA,
14608
14604
  stroke: be(R, c, x.stroke)
14609
- }, J || (x.strokeDasharray = "6");
14605
+ }, Q || (x.strokeDasharray = "6");
14610
14606
  var Ee = ue(N, R, x);
14611
14607
  return g(N, R.width, R.height, fc, {
14612
14608
  ...x,
@@ -14618,13 +14614,13 @@ function wo(e, t, n, i, r, o, a) {
14618
14614
  "fill",
14619
14615
  "stroke"
14620
14616
  ]);
14621
- var G = Me(N, R, x), q = i.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN", {
14617
+ var G = Ae(N, R, x), q = i.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN", {
14622
14618
  abspos: {
14623
14619
  x: 8,
14624
14620
  y: 8
14625
14621
  }
14626
- }), J = y(N, q);
14627
- _e(J, {
14622
+ }), Q = y(N, q);
14623
+ _e(Q, {
14628
14624
  fill: it(R, s, x.fill),
14629
14625
  stroke: be(R, c, x.stroke),
14630
14626
  strokeWidth: 1
@@ -14676,7 +14672,7 @@ function wo(e, t, n, i, r, o, a) {
14676
14672
  "fill",
14677
14673
  "stroke"
14678
14674
  ]);
14679
- var G = i.getRawPath("DATA_ARROW"), q = te(N, R, x);
14675
+ var G = i.getRawPath("DATA_ARROW"), q = ee(N, R, x);
14680
14676
  return y(N, G, {
14681
14677
  fill: "none",
14682
14678
  stroke: be(R, c, x.stroke),
@@ -14687,7 +14683,7 @@ function wo(e, t, n, i, r, o, a) {
14687
14683
  return x = ut(x, [
14688
14684
  "fill",
14689
14685
  "stroke"
14690
- ]), Q(N, R, {
14686
+ ]), Z(N, R, {
14691
14687
  ...x,
14692
14688
  markerEnd: d(N, "association-end", it(R, s, x.fill), be(R, c, x.stroke))
14693
14689
  });
@@ -14696,7 +14692,7 @@ function wo(e, t, n, i, r, o, a) {
14696
14692
  return x = ut(x, [
14697
14693
  "fill",
14698
14694
  "stroke"
14699
- ]), te(N, R, x);
14695
+ ]), ee(N, R, x);
14700
14696
  },
14701
14697
  "bpmn:DataObjectReference": P("bpmn:DataObject"),
14702
14698
  "bpmn:DataOutput": function(N, R, x = {}) {
@@ -14704,7 +14700,7 @@ function wo(e, t, n, i, r, o, a) {
14704
14700
  "fill",
14705
14701
  "stroke"
14706
14702
  ]);
14707
- var G = i.getRawPath("DATA_ARROW"), q = te(N, R, x);
14703
+ var G = i.getRawPath("DATA_ARROW"), q = ee(N, R, x);
14708
14704
  return y(N, G, {
14709
14705
  strokeWidth: 1,
14710
14706
  fill: be(R, c, x.stroke),
@@ -14715,7 +14711,7 @@ function wo(e, t, n, i, r, o, a) {
14715
14711
  return x = ut(x, [
14716
14712
  "fill",
14717
14713
  "stroke"
14718
- ]), Q(N, R, {
14714
+ ]), Z(N, R, {
14719
14715
  ...x,
14720
14716
  markerEnd: d(N, "association-end", it(R, s, x.fill), be(R, c, x.stroke))
14721
14717
  });
@@ -14765,7 +14761,7 @@ function wo(e, t, n, i, r, o, a) {
14765
14761
  stroke: be(R, c, x.stroke),
14766
14762
  strokeWidth: 1
14767
14763
  });
14768
- var J = G.get("eventGatewayType"), Ee = !!G.get("instantiate");
14764
+ var Q = G.get("eventGatewayType"), Ee = !!G.get("instantiate");
14769
14765
  function Ye() {
14770
14766
  var Bt = i.getScaledPath("GATEWAY_EVENT_BASED", {
14771
14767
  xScaleFactor: 0.18,
@@ -14783,7 +14779,7 @@ function wo(e, t, n, i, r, o, a) {
14783
14779
  strokeWidth: 2
14784
14780
  });
14785
14781
  }
14786
- if (J === "Parallel") {
14782
+ if (Q === "Parallel") {
14787
14783
  var lt = i.getScaledPath("GATEWAY_PARALLEL", {
14788
14784
  xScaleFactor: 0.4,
14789
14785
  yScaleFactor: 0.4,
@@ -14799,7 +14795,7 @@ function wo(e, t, n, i, r, o, a) {
14799
14795
  stroke: be(R, c, x.stroke),
14800
14796
  strokeWidth: 1
14801
14797
  });
14802
- } else J === "Exclusive" && (Ee || g(N, R.width, R.height, R.height * 0.26, {
14798
+ } else Q === "Exclusive" && (Ee || g(N, R.width, R.height, R.height * 0.26, {
14803
14799
  fill: "none",
14804
14800
  stroke: be(R, c, x.stroke),
14805
14801
  strokeWidth: 1
@@ -14820,8 +14816,8 @@ function wo(e, t, n, i, r, o, a) {
14820
14816
  mx: 0.32,
14821
14817
  my: 0.3
14822
14818
  }
14823
- }), J = pt(R);
14824
- return J.get("isMarkerVisible") && y(N, q, {
14819
+ }), Q = pt(R);
14820
+ return Q.get("isMarkerVisible") && y(N, q, {
14825
14821
  fill: be(R, c, x.stroke),
14826
14822
  stroke: be(R, c, x.stroke),
14827
14823
  strokeWidth: 1
@@ -14895,7 +14891,7 @@ function wo(e, t, n, i, r, o, a) {
14895
14891
  "fill",
14896
14892
  "stroke"
14897
14893
  ]);
14898
- var G = Me(N, R, x), q = i.getScaledPath("TASK_TYPE_MANUAL", {
14894
+ var G = Ae(N, R, x), q = i.getScaledPath("TASK_TYPE_MANUAL", {
14899
14895
  abspos: {
14900
14896
  x: 17,
14901
14897
  y: 15
@@ -14912,9 +14908,9 @@ function wo(e, t, n, i, r, o, a) {
14912
14908
  "fill",
14913
14909
  "stroke"
14914
14910
  ]);
14915
- var G = le(R), q = pt(R), J = it(R, s, x.fill), Ee = be(R, c, x.stroke), Ye = m(N, R.waypoints, {
14916
- markerEnd: d(N, "messageflow-end", J, Ee),
14917
- markerStart: d(N, "messageflow-start", J, Ee),
14911
+ var G = le(R), q = pt(R), Q = it(R, s, x.fill), Ee = be(R, c, x.stroke), Ye = m(N, R.waypoints, {
14912
+ markerEnd: d(N, "messageflow-end", Q, Ee),
14913
+ markerStart: d(N, "messageflow-start", Q, Ee),
14918
14914
  stroke: Ee,
14919
14915
  strokeDasharray: "10, 11",
14920
14916
  strokeWidth: 1.5
@@ -14928,8 +14924,8 @@ function wo(e, t, n, i, r, o, a) {
14928
14924
  }), bt = {
14929
14925
  strokeWidth: 1
14930
14926
  };
14931
- q.get("messageVisibleKind") === "initiating" ? (bt.fill = J, bt.stroke = Ee) : (bt.fill = Ee, bt.stroke = J);
14932
- var rn = y(N, Bt, bt), gn = G.get("messageRef"), mn = gn.get("name"), xt = ee(N, mn, {
14927
+ q.get("messageVisibleKind") === "initiating" ? (bt.fill = Q, bt.stroke = Ee) : (bt.fill = Ee, bt.stroke = Q);
14928
+ var rn = y(N, Bt, bt), gn = G.get("messageRef"), mn = gn.get("name"), xt = J(N, mn, {
14933
14929
  align: "center-top",
14934
14930
  fitBox: !0,
14935
14931
  style: {
@@ -14968,9 +14964,9 @@ function wo(e, t, n, i, r, o, a) {
14968
14964
  "width",
14969
14965
  "height"
14970
14966
  ]);
14971
- var G = K(N, R, x), q = ot(R), J = dn(R), Ee = le(R), Ye = Ee.get("name");
14967
+ var G = K(N, R, x), q = ot(R), Q = dn(R), Ee = le(R), Ye = Ee.get("name");
14972
14968
  if (q) {
14973
- var lt = J ? [
14969
+ var lt = Q ? [
14974
14970
  {
14975
14971
  x: 30,
14976
14972
  y: 0
@@ -14995,15 +14991,15 @@ function wo(e, t, n, i, r, o, a) {
14995
14991
  }), De(N, Ye, R, x);
14996
14992
  } else {
14997
14993
  var Bt = Pa(R, x);
14998
- J || (Bt.height = li(R, x), Bt.width = Un(R, x));
14999
- var bt = ee(N, Ye, {
14994
+ Q || (Bt.height = li(R, x), Bt.width = Un(R, x));
14995
+ var bt = J(N, Ye, {
15000
14996
  box: Bt,
15001
14997
  align: "center-middle",
15002
14998
  style: {
15003
14999
  fill: Aa(R, l, c, x.stroke)
15004
15000
  }
15005
15001
  });
15006
- if (!J) {
15002
+ if (!Q) {
15007
15003
  var rn = -1 * Un(R, x);
15008
15004
  jc(bt, 0, -rn, 270);
15009
15005
  }
@@ -15015,17 +15011,17 @@ function wo(e, t, n, i, r, o, a) {
15015
15011
  "fill",
15016
15012
  "stroke"
15017
15013
  ]);
15018
- var G = le(R), q = Me(N, R, x), J;
15014
+ var G = le(R), q = Ae(N, R, x), Q;
15019
15015
  return G.get("instantiate") ? (g(N, 28, 28, 20 * 0.22, {
15020
15016
  fill: it(R, s, x.fill),
15021
15017
  stroke: be(R, c, x.stroke),
15022
15018
  strokeWidth: 1
15023
- }), J = i.getScaledPath("TASK_TYPE_INSTANTIATING_SEND", {
15019
+ }), Q = i.getScaledPath("TASK_TYPE_INSTANTIATING_SEND", {
15024
15020
  abspos: {
15025
15021
  x: 7.77,
15026
15022
  y: 9.52
15027
15023
  }
15028
- })) : J = i.getScaledPath("TASK_TYPE_SEND", {
15024
+ })) : Q = i.getScaledPath("TASK_TYPE_SEND", {
15029
15025
  xScaleFactor: 0.9,
15030
15026
  yScaleFactor: 0.9,
15031
15027
  containerWidth: 21,
@@ -15034,7 +15030,7 @@ function wo(e, t, n, i, r, o, a) {
15034
15030
  mx: 0.3,
15035
15031
  my: 0.4
15036
15032
  }
15037
- }), y(N, J, {
15033
+ }), y(N, Q, {
15038
15034
  fill: it(R, s, x.fill),
15039
15035
  stroke: be(R, c, x.stroke),
15040
15036
  strokeWidth: 1
@@ -15045,7 +15041,7 @@ function wo(e, t, n, i, r, o, a) {
15045
15041
  "fill",
15046
15042
  "stroke"
15047
15043
  ]);
15048
- var G = Me(N, R, x), q = i.getScaledPath("TASK_TYPE_SCRIPT", {
15044
+ var G = Ae(N, R, x), q = i.getScaledPath("TASK_TYPE_SCRIPT", {
15049
15045
  abspos: {
15050
15046
  x: 15,
15051
15047
  y: 20
@@ -15062,7 +15058,7 @@ function wo(e, t, n, i, r, o, a) {
15062
15058
  "fill",
15063
15059
  "stroke"
15064
15060
  ]);
15065
- var G = Me(N, R, x), q = i.getScaledPath("TASK_TYPE_SEND", {
15061
+ var G = Ae(N, R, x), q = i.getScaledPath("TASK_TYPE_SEND", {
15066
15062
  xScaleFactor: 1,
15067
15063
  yScaleFactor: 1,
15068
15064
  containerWidth: 21,
@@ -15083,26 +15079,26 @@ function wo(e, t, n, i, r, o, a) {
15083
15079
  "fill",
15084
15080
  "stroke"
15085
15081
  ]);
15086
- var G = it(R, s, x.fill), q = be(R, c, x.stroke), J = m(N, R.waypoints, {
15082
+ var G = it(R, s, x.fill), q = be(R, c, x.stroke), Q = m(N, R.waypoints, {
15087
15083
  markerEnd: d(N, "sequenceflow-end", G, q),
15088
15084
  stroke: q
15089
15085
  }), Ee = le(R), { source: Ye } = R;
15090
15086
  if (Ye) {
15091
15087
  var lt = le(Ye);
15092
- Ee.get("conditionExpression") && M(lt, "bpmn:Activity") && _e(J, {
15088
+ Ee.get("conditionExpression") && M(lt, "bpmn:Activity") && _e(Q, {
15093
15089
  markerStart: d(N, "conditional-flow-marker", G, q)
15094
- }), lt.get("default") && (M(lt, "bpmn:Gateway") || M(lt, "bpmn:Activity")) && lt.get("default") === Ee && _e(J, {
15090
+ }), lt.get("default") && (M(lt, "bpmn:Gateway") || M(lt, "bpmn:Activity")) && lt.get("default") === Ee && _e(Q, {
15095
15091
  markerStart: d(N, "conditional-default-flow-marker", G, q)
15096
15092
  });
15097
15093
  }
15098
- return J;
15094
+ return Q;
15099
15095
  },
15100
15096
  "bpmn:ServiceTask": function(N, R, x = {}) {
15101
15097
  x = ut(x, [
15102
15098
  "fill",
15103
15099
  "stroke"
15104
15100
  ]);
15105
- var G = Me(N, R, x);
15101
+ var G = Ae(N, R, x);
15106
15102
  g(N, 10, 10, {
15107
15103
  fill: it(R, s, x.fill),
15108
15104
  stroke: "none",
@@ -15123,13 +15119,13 @@ function wo(e, t, n, i, r, o, a) {
15123
15119
  stroke: "none",
15124
15120
  transform: "translate(11, 10)"
15125
15121
  });
15126
- var J = i.getScaledPath("TASK_TYPE_SERVICE", {
15122
+ var Q = i.getScaledPath("TASK_TYPE_SERVICE", {
15127
15123
  abspos: {
15128
15124
  x: 17,
15129
15125
  y: 22
15130
15126
  }
15131
15127
  });
15132
- return y(N, J, {
15128
+ return y(N, Q, {
15133
15129
  fill: it(R, s, x.fill),
15134
15130
  stroke: be(R, c, x.stroke),
15135
15131
  strokeWidth: 1
@@ -15146,8 +15142,8 @@ function wo(e, t, n, i, r, o, a) {
15146
15142
  ...x,
15147
15143
  strokeDasharray: "6"
15148
15144
  });
15149
- var J = ue(N, R, x);
15150
- return G && $(R, N, x), J;
15145
+ var Q = ue(N, R, x);
15146
+ return G && $(R, N, x), Q;
15151
15147
  },
15152
15148
  "bpmn:SubProcess": function(N, R, x = {}) {
15153
15149
  return ot(R) ? x = ut(x, [
@@ -15164,7 +15160,7 @@ function wo(e, t, n, i, r, o, a) {
15164
15160
  return x = ut(x, [
15165
15161
  "fill",
15166
15162
  "stroke"
15167
- ]), Me(N, R, x);
15163
+ ]), Ae(N, R, x);
15168
15164
  },
15169
15165
  "bpmn:TextAnnotation": function(N, R, x = {}) {
15170
15166
  x = ut(x, [
@@ -15174,7 +15170,7 @@ function wo(e, t, n, i, r, o, a) {
15174
15170
  var {
15175
15171
  width: G,
15176
15172
  height: q
15177
- } = Pa(R, x), J = b(N, G, q, 0, 0, {
15173
+ } = Pa(R, x), Q = b(N, G, q, 0, 0, {
15178
15174
  fill: "none",
15179
15175
  stroke: "none"
15180
15176
  }), Ee = i.getScaledPath("TEXT_ANNOTATION", {
@@ -15191,14 +15187,14 @@ function wo(e, t, n, i, r, o, a) {
15191
15187
  stroke: be(R, c, x.stroke)
15192
15188
  });
15193
15189
  var Ye = le(R), lt = Ye.get("text") || "";
15194
- return ee(N, lt, {
15190
+ return J(N, lt, {
15195
15191
  align: "left-top",
15196
15192
  box: Pa(R, x),
15197
15193
  padding: Go,
15198
15194
  style: {
15199
15195
  fill: Aa(R, l, c, x.stroke)
15200
15196
  }
15201
- }), J;
15197
+ }), Q;
15202
15198
  },
15203
15199
  "bpmn:Transaction": function(N, R, x = {}) {
15204
15200
  ot(R) ? x = ut(x, [
@@ -15216,8 +15212,8 @@ function wo(e, t, n, i, r, o, a) {
15216
15212
  }), q = n.style(["no-fill", "no-events"], {
15217
15213
  stroke: be(R, c, x.stroke),
15218
15214
  strokeWidth: 1.5
15219
- }), J = ot(R);
15220
- return J || (x = {}), b(
15215
+ }), Q = ot(R);
15216
+ return Q || (x = {}), b(
15221
15217
  N,
15222
15218
  li(R, x),
15223
15219
  Un(R, x),
@@ -15231,10 +15227,10 @@ function wo(e, t, n, i, r, o, a) {
15231
15227
  "fill",
15232
15228
  "stroke"
15233
15229
  ]);
15234
- var G = Me(N, R, x), q = 15, J = 12, Ee = i.getScaledPath("TASK_TYPE_USER_1", {
15230
+ var G = Ae(N, R, x), q = 15, Q = 12, Ee = i.getScaledPath("TASK_TYPE_USER_1", {
15235
15231
  abspos: {
15236
15232
  x: q,
15237
- y: J
15233
+ y: Q
15238
15234
  }
15239
15235
  });
15240
15236
  y(N, Ee, {
@@ -15245,7 +15241,7 @@ function wo(e, t, n, i, r, o, a) {
15245
15241
  var Ye = i.getScaledPath("TASK_TYPE_USER_2", {
15246
15242
  abspos: {
15247
15243
  x: q,
15248
- y: J
15244
+ y: Q
15249
15245
  }
15250
15246
  });
15251
15247
  y(N, Ye, {
@@ -15256,7 +15252,7 @@ function wo(e, t, n, i, r, o, a) {
15256
15252
  var lt = i.getScaledPath("TASK_TYPE_USER_3", {
15257
15253
  abspos: {
15258
15254
  x: q,
15259
- y: J
15255
+ y: Q
15260
15256
  }
15261
15257
  });
15262
15258
  return y(N, lt, {
@@ -15266,7 +15262,7 @@ function wo(e, t, n, i, r, o, a) {
15266
15262
  }), G;
15267
15263
  },
15268
15264
  label: function(N, R, x = {}) {
15269
- return Re(N, R, x);
15265
+ return Ce(N, R, x);
15270
15266
  }
15271
15267
  };
15272
15268
  this._drawPath = y, this._renderer = w;
@@ -15902,16 +15898,16 @@ function Op(e) {
15902
15898
  return Math.log(e) / Math.log(10);
15903
15899
  }
15904
15900
  var XA = 1e3;
15905
- function se(e) {
15901
+ function ce(e) {
15906
15902
  this._eventBus = e;
15907
15903
  }
15908
- se.$inject = ["eventBus"];
15904
+ ce.$inject = ["eventBus"];
15909
15905
  function ZA(e, t) {
15910
15906
  return function(n) {
15911
15907
  return e.call(t || null, n.context, n.command, n);
15912
15908
  };
15913
15909
  }
15914
- se.prototype.on = function(e, t, n, i, r, o) {
15910
+ ce.prototype.on = function(e, t, n, i, r, o) {
15915
15911
  if ((fn(t) || He(t)) && (o = r, r = i, i = n, n = t, t = null), fn(n) && (o = r, r = i, i = n, n = XA), hn(r) && (o = r, r = !1), !fn(i))
15916
15912
  throw new Error("handlerFn must be a function");
15917
15913
  $e(e) || (e = [e]);
@@ -15923,15 +15919,15 @@ se.prototype.on = function(e, t, n, i, r, o) {
15923
15919
  a.on(c, n, r ? ZA(i, o) : i, o);
15924
15920
  });
15925
15921
  };
15926
- se.prototype.canExecute = lr("canExecute");
15927
- se.prototype.preExecute = lr("preExecute");
15928
- se.prototype.preExecuted = lr("preExecuted");
15929
- se.prototype.execute = lr("execute");
15930
- se.prototype.executed = lr("executed");
15931
- se.prototype.postExecute = lr("postExecute");
15932
- se.prototype.postExecuted = lr("postExecuted");
15933
- se.prototype.revert = lr("revert");
15934
- se.prototype.reverted = lr("reverted");
15922
+ ce.prototype.canExecute = lr("canExecute");
15923
+ ce.prototype.preExecute = lr("preExecute");
15924
+ ce.prototype.preExecuted = lr("preExecuted");
15925
+ ce.prototype.execute = lr("execute");
15926
+ ce.prototype.executed = lr("executed");
15927
+ ce.prototype.postExecute = lr("postExecute");
15928
+ ce.prototype.postExecuted = lr("postExecuted");
15929
+ ce.prototype.revert = lr("revert");
15930
+ ce.prototype.reverted = lr("reverted");
15935
15931
  function lr(e) {
15936
15932
  return function(n, i, r, o, a) {
15937
15933
  (fn(n) || He(n)) && (a = o, o = r, r = i, i = n, n = null), this.on(n, e, i, r, o, a);
@@ -15944,7 +15940,7 @@ var kf = [
15944
15940
  "right"
15945
15941
  ], dc = 10;
15946
15942
  function Of(e, t) {
15947
- se.call(this, e), this.postExecuted([
15943
+ ce.call(this, e), this.postExecuted([
15948
15944
  "connection.create",
15949
15945
  "connection.layout",
15950
15946
  "connection.updateWaypoints"
@@ -16005,7 +16001,7 @@ function Of(e, t) {
16005
16001
  }
16006
16002
  }
16007
16003
  }
16008
- we(Of, se);
16004
+ we(Of, ce);
16009
16005
  Of.$inject = [
16010
16006
  "eventBus",
16011
16007
  "modeling"
@@ -16052,7 +16048,7 @@ function tP(e) {
16052
16048
  return kf.indexOf(e) !== -1;
16053
16049
  }
16054
16050
  function Df(e) {
16055
- se.call(this, e), this.preExecute("shape.append", function(t) {
16051
+ ce.call(this, e), this.preExecute("shape.append", function(t) {
16056
16052
  var n = t.source, i = t.shape;
16057
16053
  t.position || (M(i, "bpmn:TextAnnotation") ? t.position = {
16058
16054
  x: n.x + n.width / 2 + 75,
@@ -16063,13 +16059,13 @@ function Df(e) {
16063
16059
  });
16064
16060
  }, !0);
16065
16061
  }
16066
- we(Df, se);
16062
+ we(Df, ce);
16067
16063
  Df.$inject = [
16068
16064
  "eventBus"
16069
16065
  ];
16070
16066
  var nP = 1500;
16071
16067
  function If(e, t, n) {
16072
- e.invoke(se, this), this.preExecute("elements.delete", nP, function(r) {
16068
+ e.invoke(ce, this), this.preExecute("elements.delete", nP, function(r) {
16073
16069
  var o = r.context, a = o.elements, s = i(a);
16074
16070
  s.length && (o.elements = a.concat(s));
16075
16071
  }), t.on("shape.move.start", function(r) {
@@ -16097,14 +16093,14 @@ function If(e, t, n) {
16097
16093
  }), Array.from(c);
16098
16094
  }
16099
16095
  }
16100
- we(If, se);
16096
+ we(If, ce);
16101
16097
  If.$inject = [
16102
16098
  "injector",
16103
16099
  "eventBus",
16104
16100
  "canvas"
16105
16101
  ];
16106
16102
  function Lf(e, t) {
16107
- e.invoke(se, this), this.postExecute("shape.move", function(n) {
16103
+ e.invoke(ce, this), this.postExecute("shape.move", function(n) {
16108
16104
  var i = n.newParent, r = n.shape, o = et(r.incoming.concat(r.outgoing), function(a) {
16109
16105
  return M(a, "bpmn:Association");
16110
16106
  });
@@ -16113,7 +16109,7 @@ function Lf(e, t) {
16113
16109
  });
16114
16110
  }, !0);
16115
16111
  }
16116
- we(Lf, se);
16112
+ we(Lf, ce);
16117
16113
  Lf.$inject = [
16118
16114
  "injector",
16119
16115
  "modeling"
@@ -16146,7 +16142,7 @@ function _x(e, t) {
16146
16142
  }
16147
16143
  var am = 500;
16148
16144
  function Ll(e, t) {
16149
- t.invoke(se, this), this._bpmnReplace = e;
16145
+ t.invoke(ce, this), this._bpmnReplace = e;
16150
16146
  var n = this;
16151
16147
  this.postExecuted("elements.create", am, function(i) {
16152
16148
  var r = i.elements;
@@ -16171,7 +16167,7 @@ Ll.$inject = [
16171
16167
  "bpmnReplace",
16172
16168
  "injector"
16173
16169
  ];
16174
- we(Ll, se);
16170
+ we(Ll, ce);
16175
16171
  Ll.prototype._replaceShape = function(e, t) {
16176
16172
  var n = iP(e), i = {
16177
16173
  type: "bpmn:BoundaryEvent",
@@ -16187,7 +16183,7 @@ function sm(e, t) {
16187
16183
  return !Ze(e) && Qe(e, ["bpmn:IntermediateThrowEvent", "bpmn:IntermediateCatchEvent"]) && !!t;
16188
16184
  }
16189
16185
  function Nf(e, t) {
16190
- se.call(this, e);
16186
+ ce.call(this, e);
16191
16187
  function n(i) {
16192
16188
  return et(i.attachers, function(r) {
16193
16189
  return M(r, "bpmn:BoundaryEvent");
@@ -16208,7 +16204,7 @@ Nf.$inject = [
16208
16204
  "eventBus",
16209
16205
  "modeling"
16210
16206
  ];
16211
- we(Nf, se);
16207
+ we(Nf, ce);
16212
16208
  function wx(e) {
16213
16209
  return e.create("bpmn:Category");
16214
16210
  }
@@ -16232,7 +16228,7 @@ function sP(e) {
16232
16228
  }
16233
16229
  var cP = 500;
16234
16230
  function Bf(e, t, n) {
16235
- n.invoke(se, this);
16231
+ n.invoke(ce, this);
16236
16232
  function i(c) {
16237
16233
  return t.filter(function(l) {
16238
16234
  return M(l, "bpmn:Group") && !l.labelTarget;
@@ -16293,13 +16289,13 @@ Bf.$inject = [
16293
16289
  "elementRegistry",
16294
16290
  "injector"
16295
16291
  ];
16296
- we(Bf, se);
16292
+ we(Bf, ce);
16297
16293
  function cm(e) {
16298
16294
  var t;
16299
16295
  return ((t = e.updates) == null ? void 0 : t.groups) || [];
16300
16296
  }
16301
16297
  function $f(e, t, n) {
16302
- se.call(this, e), this.preExecute("shape.replace", s, !0), this.postExecuted("shape.replace", c, !0), this.preExecute("connection.create", r, !0), this.postExecuted("connection.delete", i, !0), this.postExecuted("connection.reconnect", o, !0), this.postExecuted("element.updateProperties", a, !0);
16298
+ ce.call(this, e), this.preExecute("shape.replace", s, !0), this.postExecuted("shape.replace", c, !0), this.preExecute("connection.create", r, !0), this.postExecuted("connection.delete", i, !0), this.postExecuted("connection.reconnect", o, !0), this.postExecuted("element.updateProperties", a, !0);
16303
16299
  function i(b) {
16304
16300
  const E = b.source, _ = b.target;
16305
16301
  Io(E) && Ta(_) && u(_);
@@ -16372,7 +16368,7 @@ function $f(e, t, n) {
16372
16368
  t.removeElements(E);
16373
16369
  }
16374
16370
  }
16375
- we($f, se);
16371
+ we($f, ce);
16376
16372
  $f.$inject = [
16377
16373
  "eventBus",
16378
16374
  "modeling",
@@ -16389,15 +16385,15 @@ function hc(e) {
16389
16385
  return e && M(e, "bpmn:Activity") && !Pn(e);
16390
16386
  }
16391
16387
  function Ff(e) {
16392
- e.invoke(se, this), this.preExecute("shape.create", 1500, function(t) {
16388
+ e.invoke(ce, this), this.preExecute("shape.create", 1500, function(t) {
16393
16389
  var n = t.context, i = n.parent, r = n.shape;
16394
16390
  M(i, "bpmn:Lane") && !M(r, "bpmn:Lane") && (n.parent = Zo(i, "bpmn:Participant"));
16395
16391
  });
16396
16392
  }
16397
16393
  Ff.$inject = ["injector"];
16398
- we(Ff, se);
16394
+ we(Ff, ce);
16399
16395
  function jf(e, t) {
16400
- se.call(this, e), this.preExecute("shape.create", function(n) {
16396
+ ce.call(this, e), this.preExecute("shape.create", function(n) {
16401
16397
  var a;
16402
16398
  var i = n.context, r = i.shape;
16403
16399
  if (M(r, "bpmn:DataObjectReference") && r.type !== "label") {
@@ -16410,10 +16406,10 @@ jf.$inject = [
16410
16406
  "eventBus",
16411
16407
  "bpmnFactory"
16412
16408
  ];
16413
- we(jf, se);
16409
+ we(jf, ce);
16414
16410
  var Dp = 20, Ip = 20, Sx = 30, gc = 2e3;
16415
16411
  function Hf(e, t, n) {
16416
- se.call(this, t), t.on([
16412
+ ce.call(this, t), t.on([
16417
16413
  "create.start",
16418
16414
  "shape.move.start"
16419
16415
  ], gc, function(r) {
@@ -16465,7 +16461,7 @@ Hf.$inject = [
16465
16461
  "eventBus",
16466
16462
  "modeling"
16467
16463
  ];
16468
- we(Hf, se);
16464
+ we(Hf, ce);
16469
16465
  function lP(e, t) {
16470
16466
  t = {
16471
16467
  width: t.width + Dp * 2 + Sx,
@@ -16494,7 +16490,7 @@ function pP(e) {
16494
16490
  }
16495
16491
  var lm = "__targetRef_placeholder";
16496
16492
  function zf(e, t) {
16497
- se.call(this, e), this.executed([
16493
+ ce.call(this, e), this.executed([
16498
16494
  "connection.create",
16499
16495
  "connection.delete",
16500
16496
  "connection.move",
@@ -16532,7 +16528,7 @@ zf.$inject = [
16532
16528
  "eventBus",
16533
16529
  "bpmnFactory"
16534
16530
  ];
16535
- we(zf, se);
16531
+ we(zf, ce);
16536
16532
  function um(e) {
16537
16533
  return function(t) {
16538
16534
  var n = t.context, i = n.connection;
@@ -16553,7 +16549,7 @@ Nl.prototype.revert = function(e) {
16553
16549
  return this._bpmnUpdater.updateSemanticParent(t, i), this._bpmnUpdater.updateDiParent(n, r), [];
16554
16550
  };
16555
16551
  function Gf(e, t, n, i) {
16556
- se.call(this, i), t.registerHandler("dataStore.updateContainment", Nl);
16552
+ ce.call(this, i), t.registerHandler("dataStore.updateContainment", Nl);
16557
16553
  function r() {
16558
16554
  return n.filter(function(s) {
16559
16555
  return M(s, "bpmn:Participant") && le(s).processRef;
@@ -16615,7 +16611,7 @@ Gf.$inject = [
16615
16611
  "elementRegistry",
16616
16612
  "eventBus"
16617
16613
  ];
16618
- we(Gf, se);
16614
+ we(Gf, ce);
16619
16615
  function fP(e, t) {
16620
16616
  for (var n = e.businessObject || e, i = t.businessObject || t; n.$parent; ) {
16621
16617
  if (n.$parent === i.processRef || i)
@@ -16747,7 +16743,7 @@ function EP(e, t) {
16747
16743
  }
16748
16744
  var SP = 500;
16749
16745
  function Vf(e, t) {
16750
- se.call(this, e);
16746
+ ce.call(this, e);
16751
16747
  function n(i, r) {
16752
16748
  var o = dn(i), a = Nr(r), s = [], c = [], l = [], u = [];
16753
16749
  if (_o(a, function(b) {
@@ -16808,10 +16804,10 @@ Vf.$inject = [
16808
16804
  "eventBus",
16809
16805
  "spaceTool"
16810
16806
  ];
16811
- we(Vf, se);
16807
+ we(Vf, ce);
16812
16808
  var pm = 500;
16813
16809
  function $l(e, t) {
16814
- t.invoke(se, this), this._bpmnReplace = e;
16810
+ t.invoke(ce, this), this._bpmnReplace = e;
16815
16811
  var n = this;
16816
16812
  this.postExecuted("elements.create", pm, function(i) {
16817
16813
  var r = i.elements;
@@ -16835,7 +16831,7 @@ $l.$inject = [
16835
16831
  "bpmnReplace",
16836
16832
  "injector"
16837
16833
  ];
16838
- we($l, se);
16834
+ we($l, ce);
16839
16835
  $l.prototype._replaceShape = function(e) {
16840
16836
  var t = RP(e), n;
16841
16837
  return t ? n = {
@@ -16908,7 +16904,7 @@ function Lp(e, t) {
16908
16904
  return TP(e, t) || kP(e, t);
16909
16905
  }
16910
16906
  function Wf(e, t, n) {
16911
- se.call(this, e);
16907
+ ce.call(this, e);
16912
16908
  function i(r, o, a) {
16913
16909
  var s = o.waypoints, c, l, u, p, f, d, h, g = r.outgoing.slice(), b = r.incoming.slice(), E;
16914
16910
  He(a.width) ? E = Be(a) : E = a;
@@ -16957,7 +16953,7 @@ function Wf(e, t, n) {
16957
16953
  a && i(o, a, s);
16958
16954
  }, !0);
16959
16955
  }
16960
- we(Wf, se);
16956
+ we(Wf, ce);
16961
16957
  Wf.$inject = [
16962
16958
  "eventBus",
16963
16959
  "bpmnRules",
@@ -16971,7 +16967,7 @@ function hm(e) {
16971
16967
  return W({}, e);
16972
16968
  }
16973
16969
  function Uf(e, t) {
16974
- se.call(this, e), this.preExecuted("connection.create", function(n) {
16970
+ ce.call(this, e), this.preExecuted("connection.create", function(n) {
16975
16971
  var i = n.context, r = i.connection, o = i.source, a = i.target, s = i.hints;
16976
16972
  if (!(s && s.createElementsBehavior === !1) && Lo(r)) {
16977
16973
  var c = [];
@@ -17004,7 +17000,7 @@ Uf.$inject = [
17004
17000
  "eventBus",
17005
17001
  "modeling"
17006
17002
  ];
17007
- we(Uf, se);
17003
+ we(Uf, ce);
17008
17004
  function Lo(e) {
17009
17005
  return M(e, "bpmn:SequenceFlow");
17010
17006
  }
@@ -17061,7 +17057,7 @@ Ax.$inject = [
17061
17057
  ];
17062
17058
  var mm = 770;
17063
17059
  function qf(e, t, n, i) {
17064
- n.invoke(se, this);
17060
+ n.invoke(ce, this);
17065
17061
  function r(s, c) {
17066
17062
  var l = le(s), u = c.categoryValue || l.categoryValueRef;
17067
17063
  u || (u = Ex(e, l));
@@ -17127,7 +17123,7 @@ qf.$inject = [
17127
17123
  "injector",
17128
17124
  "moddleCopy"
17129
17125
  ];
17130
- we(qf, se);
17126
+ we(qf, ce);
17131
17127
  function Np(e, t, n, i) {
17132
17128
  var r, o, a, s, c;
17133
17129
  return r = (i.y - n.y) * (t.x - e.x) - (i.x - n.x) * (t.y - e.y), r == 0 ? null : (o = e.y - n.y, a = e.x - n.x, c = (i.x - n.x) * o - (i.y - n.y) * a, s = c / r, {
@@ -17170,7 +17166,7 @@ function ym(e, t) {
17170
17166
  return Math.sqrt(Math.pow(e.x - t.x, 2) + Math.pow(e.y - t.y, 2));
17171
17167
  }
17172
17168
  function Yf(e) {
17173
- se.call(this, e);
17169
+ ce.call(this, e);
17174
17170
  var t = [
17175
17171
  "bpmn:Participant",
17176
17172
  "bpmn:Lane"
@@ -17184,7 +17180,7 @@ function Yf(e) {
17184
17180
  });
17185
17181
  }
17186
17182
  Yf.$inject = ["eventBus"];
17187
- we(Yf, se);
17183
+ we(Yf, ce);
17188
17184
  function Tx(e) {
17189
17185
  return Math.sqrt(Math.pow(e.x, 2) + Math.pow(e.y, 2));
17190
17186
  }
@@ -17429,7 +17425,7 @@ function UP(e, t) {
17429
17425
  }
17430
17426
  var Rm = "name", Cm = "text";
17431
17427
  function Xf(e, t, n, i) {
17432
- se.call(this, e), this.postExecute("element.updateProperties", r), this.postExecute("element.updateModdleProperties", (a) => {
17428
+ ce.call(this, e), this.postExecute("element.updateProperties", r), this.postExecute("element.updateModdleProperties", (a) => {
17433
17429
  le(a.context.element) === a.context.moddleElement && r(a);
17434
17430
  });
17435
17431
  function r(a) {
@@ -17495,7 +17491,7 @@ function Xf(e, t, n, i) {
17495
17491
  }
17496
17492
  });
17497
17493
  }
17498
- we(Xf, se);
17494
+ we(Xf, ce);
17499
17495
  Xf.$inject = [
17500
17496
  "eventBus",
17501
17497
  "modeling",
@@ -17573,7 +17569,7 @@ function ZP(e, t, n, i) {
17573
17569
  return Ix(e, t, n, i).point;
17574
17570
  }
17575
17571
  function Zf(e, t) {
17576
- se.call(this, e);
17572
+ ce.call(this, e);
17577
17573
  function n(i, r) {
17578
17574
  var o = i.context, a = o.connection, s = W({}, o.hints), c = o.newWaypoints || a.waypoints, l = o.oldWaypoints;
17579
17575
  return typeof s.startChanged > "u" && (s.startChanged = !!s.connectionStart), typeof s.endChanged > "u" && (s.endChanged = !!s.connectionEnd), ZP(r, c, l, s);
@@ -17609,7 +17605,7 @@ function Zf(e, t) {
17609
17605
  });
17610
17606
  });
17611
17607
  }
17612
- we(Zf, se);
17608
+ we(Zf, ce);
17613
17609
  Zf.$inject = [
17614
17610
  "eventBus",
17615
17611
  "modeling"
@@ -17657,7 +17653,7 @@ function JP(e) {
17657
17653
  return e.original || e;
17658
17654
  }
17659
17655
  function ed(e, t) {
17660
- se.call(this, e), this.postExecute("shape.replace", function(n) {
17656
+ ce.call(this, e), this.postExecute("shape.replace", function(n) {
17661
17657
  var i = n.oldShape, r = n.newShape;
17662
17658
  if (eT(i, r)) {
17663
17659
  var o = tT(i);
@@ -17672,7 +17668,7 @@ function ed(e, t) {
17672
17668
  }, !0);
17673
17669
  }
17674
17670
  ed.$inject = ["eventBus", "modeling"];
17675
- we(ed, se);
17671
+ we(ed, ce);
17676
17672
  function eT(e, t) {
17677
17673
  return M(e, "bpmn:Participant") && ot(e) && M(t, "bpmn:Participant") && !ot(t);
17678
17674
  }
@@ -17707,7 +17703,7 @@ function Fx(e) {
17707
17703
  return M(e, "bpmn:BoundaryEvent") ? "cancelActivity" : "isInterrupting";
17708
17704
  }
17709
17705
  function td(e, t) {
17710
- e.invoke(se, this), this.postExecuted("shape.replace", function(n) {
17706
+ e.invoke(ce, this), this.postExecuted("shape.replace", function(n) {
17711
17707
  const i = n.context.oldShape, r = n.context.newShape, o = n.context.hints;
17712
17708
  if (!$x(r))
17713
17709
  return;
@@ -17721,22 +17717,22 @@ function td(e, t) {
17721
17717
  });
17722
17718
  }
17723
17719
  td.$inject = ["injector", "modeling"];
17724
- we(td, se);
17720
+ we(td, ce);
17725
17721
  function nd(e, t) {
17726
- se.call(this, e), this.preExecute("shape.resize", function(n) {
17722
+ ce.call(this, e), this.preExecute("shape.resize", function(n) {
17727
17723
  var i = n.shape, r = pt(i), o = r && r.get("label"), a = o && o.get("bounds");
17728
17724
  a && t.updateModdleProperties(i, o, {
17729
17725
  bounds: void 0
17730
17726
  });
17731
17727
  }, !0);
17732
17728
  }
17733
- we(nd, se);
17729
+ we(nd, ce);
17734
17730
  nd.$inject = [
17735
17731
  "eventBus",
17736
17732
  "modeling"
17737
17733
  ];
17738
17734
  function id(e, t, n) {
17739
- se.call(this, e), this.preExecute("shape.delete", function(i) {
17735
+ ce.call(this, e), this.preExecute("shape.delete", function(i) {
17740
17736
  var r = i.context.shape;
17741
17737
  if (!(r.incoming.length !== 1 || r.outgoing.length !== 1)) {
17742
17738
  var o = r.incoming[0], a = r.outgoing[0];
@@ -17747,7 +17743,7 @@ function id(e, t, n) {
17747
17743
  }
17748
17744
  });
17749
17745
  }
17750
- we(id, se);
17746
+ we(id, ce);
17751
17747
  id.$inject = [
17752
17748
  "eventBus",
17753
17749
  "bpmnRules",
@@ -17773,7 +17769,7 @@ function iT(e, t) {
17773
17769
  ];
17774
17770
  }
17775
17771
  function rd(e, t) {
17776
- se.call(this, e), this.preExecute("shape.delete", function(n) {
17772
+ ce.call(this, e), this.preExecute("shape.delete", function(n) {
17777
17773
  var i = n.shape, r = i.parent;
17778
17774
  M(i, "bpmn:Participant") && (n.collaborationRoot = r);
17779
17775
  }, !0), this.postExecute("shape.delete", function(n) {
@@ -17785,9 +17781,9 @@ function rd(e, t) {
17785
17781
  }, !0);
17786
17782
  }
17787
17783
  rd.$inject = ["eventBus", "modeling"];
17788
- we(rd, se);
17784
+ we(rd, ce);
17789
17785
  function od(e, t, n, i) {
17790
- se.call(this, e);
17786
+ ce.call(this, e);
17791
17787
  var r = i.get("dragging", !1);
17792
17788
  function o(c) {
17793
17789
  var l = c.source, u = c.target, p = c.parent;
@@ -17822,7 +17818,7 @@ function od(e, t, n, i) {
17822
17818
  ), d && t.updateProperties(d, { conditionExpression: void 0 })), u.conditionExpression && f.sourceRef.default === f && t.updateProperties(p.source, { default: void 0 });
17823
17819
  });
17824
17820
  }
17825
- we(od, se);
17821
+ we(od, ce);
17826
17822
  od.$inject = [
17827
17823
  "eventBus",
17828
17824
  "modeling",
@@ -17830,7 +17826,7 @@ od.$inject = [
17830
17826
  "injector"
17831
17827
  ];
17832
17828
  function zl(e, t, n, i, r, o) {
17833
- i.invoke(se, this), this._bpmnReplace = e, this._elementRegistry = n, this._selection = o, this.postExecuted(["elements.create"], 500, function(a) {
17829
+ i.invoke(ce, this), this._bpmnReplace = e, this._elementRegistry = n, this._selection = o, this.postExecuted(["elements.create"], 500, function(a) {
17834
17830
  var s = a.context, c = s.parent, l = s.elements, u = Zn(l, function(p, f) {
17835
17831
  var d = t.canReplace([f], f.host || f.parent || c);
17836
17832
  return d ? p.concat(d.replacements) : p;
@@ -17851,7 +17847,7 @@ function zl(e, t, n, i, r, o) {
17851
17847
  r.unclaimId(c.businessObject.id, c.businessObject), r.updateProperties(l, { id: c.id });
17852
17848
  });
17853
17849
  }
17854
- we(zl, se);
17850
+ we(zl, ce);
17855
17851
  zl.prototype._replaceElements = function(e, t) {
17856
17852
  var n = this._elementRegistry, i = this._bpmnReplace, r = this._selection;
17857
17853
  z(t, function(o) {
@@ -17958,7 +17954,7 @@ Ux.$inject = [
17958
17954
  ];
17959
17955
  var fT = 500;
17960
17956
  function cd(e, t, n, i, r) {
17961
- n.invoke(se, this);
17957
+ n.invoke(ce, this);
17962
17958
  function o(u) {
17963
17959
  return Qe(u, ["bpmn:ReceiveTask", "bpmn:SendTask"]) || dT(u, [
17964
17960
  "bpmn:ErrorEventDefinition",
@@ -18034,7 +18030,7 @@ cd.$inject = [
18034
18030
  "moddleCopy",
18035
18031
  "bpmnFactory"
18036
18032
  ];
18037
- we(cd, se);
18033
+ we(cd, ce);
18038
18034
  function dT(e, t) {
18039
18035
  return $e(t) || (t = [t]), Or(t, function(n) {
18040
18036
  return ca(e, n);
@@ -18119,7 +18115,7 @@ var Tm = 400, wT = 600, km = {
18119
18115
  y: 160
18120
18116
  };
18121
18117
  function ur(e, t, n, i, r, o, a) {
18122
- se.call(this, t), this._canvas = e, this._eventBus = t, this._modeling = n, this._elementFactory = i, this._bpmnFactory = r, this._bpmnjs = o, this._elementRegistry = a;
18118
+ ce.call(this, t), this._canvas = e, this._eventBus = t, this._modeling = n, this._elementFactory = i, this._bpmnFactory = r, this._bpmnjs = o, this._elementRegistry = a;
18123
18119
  var s = this;
18124
18120
  function c(p) {
18125
18121
  return M(p, "bpmn:SubProcess") && !ot(p);
@@ -18251,7 +18247,7 @@ function ur(e, t, n, i, r, o, a) {
18251
18247
  f.parent && (c(f.parent) || f.parent.hidden) && (f.hidden = !0);
18252
18248
  });
18253
18249
  }
18254
- we(ur, se);
18250
+ we(ur, ce);
18255
18251
  ur.prototype._moveChildrenToShape = function(e, t) {
18256
18252
  var n = this._modeling;
18257
18253
  if (e.length) {
@@ -18346,7 +18342,7 @@ function ST(e) {
18346
18342
  }, []);
18347
18343
  }
18348
18344
  function ud(e, t) {
18349
- e.invoke(se, this), this.postExecuted("shape.replace", function(n) {
18345
+ e.invoke(ce, this), this.postExecuted("shape.replace", function(n) {
18350
18346
  var i = n.context.oldShape, r = n.context.newShape;
18351
18347
  if (!(!M(r, "bpmn:SubProcess") || M(r, "bpmn:AdHocSubProcess") || !(M(i, "bpmn:Task") || M(i, "bpmn:CallActivity")) || !ot(r))) {
18352
18348
  var o = RT(r);
@@ -18358,7 +18354,7 @@ ud.$inject = [
18358
18354
  "injector",
18359
18355
  "modeling"
18360
18356
  ];
18361
- we(ud, se);
18357
+ we(ud, ce);
18362
18358
  function RT(e) {
18363
18359
  return {
18364
18360
  x: e.x + e.width / 6,
@@ -18366,7 +18362,7 @@ function RT(e) {
18366
18362
  };
18367
18363
  }
18368
18364
  function pd(e, t) {
18369
- se.call(this, e), this.preExecute("connection.create", function(n) {
18365
+ ce.call(this, e), this.preExecute("connection.create", function(n) {
18370
18366
  const { target: i } = n;
18371
18367
  M(i, "bpmn:TextAnnotation") && (n.parent = i.parent);
18372
18368
  }, !0), this.preExecute(["shape.create", "shape.resize", "elements.move"], function(n) {
@@ -18385,13 +18381,13 @@ function pd(e, t) {
18385
18381
  }
18386
18382
  });
18387
18383
  }
18388
- we(pd, se);
18384
+ we(pd, ce);
18389
18385
  pd.$inject = [
18390
18386
  "eventBus",
18391
18387
  "textRenderer"
18392
18388
  ];
18393
18389
  function fd(e, t) {
18394
- se.call(this, e), this.postExecuted("shape.toggleCollapse", 1500, function(n) {
18390
+ ce.call(this, e), this.postExecuted("shape.toggleCollapse", 1500, function(n) {
18395
18391
  var i = n.shape;
18396
18392
  if (ot(i))
18397
18393
  return;
@@ -18409,14 +18405,14 @@ function fd(e, t) {
18409
18405
  }
18410
18406
  }, !0);
18411
18407
  }
18412
- we(fd, se);
18408
+ we(fd, ce);
18413
18409
  fd.$inject = [
18414
18410
  "eventBus",
18415
18411
  "modeling"
18416
18412
  ];
18417
18413
  var Ku = 500;
18418
18414
  function dd(e, t, n) {
18419
- se.call(this, e);
18415
+ ce.call(this, e);
18420
18416
  function i(a) {
18421
18417
  a.length && a.forEach(function(s) {
18422
18418
  s.type === "label" && !s.businessObject.name && (s.hidden = !0);
@@ -18447,7 +18443,7 @@ function dd(e, t, n) {
18447
18443
  });
18448
18444
  });
18449
18445
  }
18450
- we(dd, se);
18446
+ we(dd, ce);
18451
18447
  dd.$inject = [
18452
18448
  "eventBus",
18453
18449
  "elementFactory",
@@ -18459,7 +18455,7 @@ function CT(e) {
18459
18455
  });
18460
18456
  }
18461
18457
  function hd(e, t, n, i) {
18462
- t.invoke(se, this), this.preExecute("shape.delete", function(r) {
18458
+ t.invoke(ce, this), this.preExecute("shape.delete", function(r) {
18463
18459
  var o = r.context, a = o.shape, s = a.businessObject;
18464
18460
  Ze(a) || (M(a, "bpmn:Participant") && ot(a) && n.ids.unclaim(s.processRef.id), i.unclaimId(s.id, s));
18465
18461
  }), this.preExecute("connection.delete", function(r) {
@@ -18470,17 +18466,17 @@ function hd(e, t, n, i) {
18470
18466
  M(r, "bpmn:Collaboration") && n.ids.unclaim(o.id);
18471
18467
  });
18472
18468
  }
18473
- we(hd, se);
18469
+ we(hd, ce);
18474
18470
  hd.$inject = ["canvas", "injector", "moddle", "modeling"];
18475
18471
  function gd(e, t) {
18476
- se.call(this, e), this.preExecute("connection.delete", function(n) {
18472
+ ce.call(this, e), this.preExecute("connection.delete", function(n) {
18477
18473
  var i = n.context, r = i.connection, o = r.source;
18478
18474
  MT(r, o) && t.updateProperties(o, {
18479
18475
  default: null
18480
18476
  });
18481
18477
  });
18482
18478
  }
18483
- we(gd, se);
18479
+ we(gd, ce);
18484
18480
  gd.$inject = [
18485
18481
  "eventBus",
18486
18482
  "modeling"
@@ -18507,7 +18503,7 @@ var AT = 500, PT = 5e3, Zx = [
18507
18503
  "elements.move"
18508
18504
  ];
18509
18505
  function md(e, t) {
18510
- se.call(this, e);
18506
+ ce.call(this, e);
18511
18507
  var n;
18512
18508
  function i() {
18513
18509
  return n = n || new TT(), n.enter(), n;
@@ -18536,7 +18532,7 @@ md.$inject = [
18536
18532
  "eventBus",
18537
18533
  "modeling"
18538
18534
  ];
18539
- we(md, se);
18535
+ we(md, ce);
18540
18536
  function TT() {
18541
18537
  this.flowNodes = [], this.lanes = [], this.counter = 0, this.addLane = function(e) {
18542
18538
  this.lanes.push(e);
@@ -18568,7 +18564,7 @@ var kT = 500, OT = 5e3, Qx = [
18568
18564
  "spaceTool"
18569
18565
  ];
18570
18566
  function yd(e, t) {
18571
- se.call(this, e);
18567
+ ce.call(this, e);
18572
18568
  var n;
18573
18569
  function i() {
18574
18570
  return n = n || new DT(), n.enter(), n;
@@ -18603,7 +18599,7 @@ yd.$inject = [
18603
18599
  "eventBus",
18604
18600
  "modeling"
18605
18601
  ];
18606
- we(yd, se);
18602
+ we(yd, ce);
18607
18603
  function DT() {
18608
18604
  this.affectedFlowElements = /* @__PURE__ */ new Set(), this.affectedGroupEntries = /* @__PURE__ */ new Map(), this.counter = 0, this.addFlowElement = function(e) {
18609
18605
  this.affectedFlowElements.add(e);
@@ -18619,13 +18615,13 @@ function DT() {
18619
18615
  };
18620
18616
  }
18621
18617
  function vd(e, t) {
18622
- se.call(this, e), this.postExecuted("elements.create", function(n) {
18618
+ ce.call(this, e), this.postExecuted("elements.create", function(n) {
18623
18619
  const i = n.context, r = i.elements;
18624
18620
  for (const o of r)
18625
18621
  IT(o) && !NT(o) && t.updateProperties(o, { isForCompensation: void 0 });
18626
18622
  });
18627
18623
  }
18628
- we(vd, se);
18624
+ we(vd, ce);
18629
18625
  vd.$inject = [
18630
18626
  "eventBus",
18631
18627
  "modeling"
@@ -18747,10 +18743,10 @@ const Wi = {
18747
18743
  rules: ["type", bd]
18748
18744
  };
18749
18745
  function bi(e) {
18750
- se.call(this, e), this.init();
18746
+ ce.call(this, e), this.init();
18751
18747
  }
18752
18748
  bi.$inject = ["eventBus"];
18753
- we(bi, se);
18749
+ we(bi, ce);
18754
18750
  bi.prototype.addRule = function(e, t, n) {
18755
18751
  var i = this;
18756
18752
  typeof e == "string" && (e = [e]), e.forEach(function(r) {
@@ -19115,7 +19111,7 @@ const t2 = {
19115
19111
  bpmnDiOrdering: ["type", g_]
19116
19112
  };
19117
19113
  function Vl(e) {
19118
- se.call(this, e);
19114
+ ce.call(this, e);
19119
19115
  var t = this;
19120
19116
  this.preExecute(["shape.create", "connection.create"], function(n) {
19121
19117
  var i = n.context, r = i.shape || i.connection, o = i.parent, a = t.getOrdering(r, o);
@@ -19128,7 +19124,7 @@ function Vl(e) {
19128
19124
  Vl.prototype.getOrdering = function(e, t) {
19129
19125
  return null;
19130
19126
  };
19131
- we(Vl, se);
19127
+ we(Vl, ce);
19132
19128
  function wd(e, t) {
19133
19129
  Vl.call(this, e);
19134
19130
  var n = [
@@ -19312,12 +19308,12 @@ function y_(e, t, n) {
19312
19308
  var i = this;
19313
19309
  function r(T, $, k) {
19314
19310
  if (!s(T, $)) {
19315
- var I, j, ee;
19316
- k ? j = t.getGraphics(k) : (I = $.delegateTarget || $.target, I && (j = I, k = t.get(j))), !(!j || !k) && (ee = e.fire(T, {
19311
+ var I, j, J;
19312
+ k ? j = t.getGraphics(k) : (I = $.delegateTarget || $.target, I && (j = I, k = t.get(j))), !(!j || !k) && (J = e.fire(T, {
19317
19313
  element: k,
19318
19314
  gfx: j,
19319
19315
  originalEvent: $
19320
- }), ee === !1 && ($.stopPropagation(), $.preventDefault()));
19316
+ }), J === !1 && ($.stopPropagation(), $.preventDefault()));
19321
19317
  }
19322
19318
  }
19323
19319
  var o = {};
@@ -19352,8 +19348,8 @@ function y_(e, t, n) {
19352
19348
  }
19353
19349
  var p = "svg, .djs-element";
19354
19350
  function f(T, $, k, I) {
19355
- var j = o[k] = function(ee) {
19356
- r(k, ee);
19351
+ var j = o[k] = function(J) {
19352
+ r(k, J);
19357
19353
  };
19358
19354
  I && (l[k] = I), j.$delegate = Yn.bind(T, p, $, j);
19359
19355
  }
@@ -21204,7 +21200,7 @@ function Mr(e, t) {
21204
21200
  }
21205
21201
  var rk = 250, oy = 1400;
21206
21202
  function Cd(e, t, n) {
21207
- se.call(this, t);
21203
+ ce.call(this, t);
21208
21204
  var i = e.get("movePreview", !1);
21209
21205
  t.on("shape.move.start", oy, function(r) {
21210
21206
  var o = r.context, a = o.shapes, s = o.validatedShapes;
@@ -21239,7 +21235,7 @@ function Cd(e, t, n) {
21239
21235
  s && (Kt(s.labels, a, c), a.labelTarget = s);
21240
21236
  });
21241
21237
  }
21242
- we(Cd, se);
21238
+ we(Cd, ce);
21243
21239
  Cd.$inject = [
21244
21240
  "injector",
21245
21241
  "eventBus",
@@ -21257,7 +21253,7 @@ const ok = {
21257
21253
  };
21258
21254
  var ak = 251, sy = 1401, cy = "attach-ok";
21259
21255
  function Md(e, t, n, i, r) {
21260
- se.call(this, t);
21256
+ ce.call(this, t);
21261
21257
  var o = e.get("movePreview", !1);
21262
21258
  t.on("shape.move.start", sy, function(a) {
21263
21259
  var s = a.context, c = s.shapes, l = s.validatedShapes;
@@ -21344,7 +21340,7 @@ function Md(e, t, n, i, r) {
21344
21340
  }), s.host && r.updateAttachment(s, null);
21345
21341
  });
21346
21342
  }
21347
- we(Md, se);
21343
+ we(Md, ce);
21348
21344
  Md.$inject = [
21349
21345
  "injector",
21350
21346
  "eventBus",
@@ -21481,7 +21477,7 @@ wi.prototype.createDiPlane = function(e, t) {
21481
21477
  }, t));
21482
21478
  };
21483
21479
  function ei(e, t, n) {
21484
- se.call(this, e), this._bpmnFactory = t;
21480
+ ce.call(this, e), this._bpmnFactory = t;
21485
21481
  var i = this;
21486
21482
  function r(d) {
21487
21483
  var h = d.context, g = h.hints || {}, b;
@@ -21579,7 +21575,7 @@ function ei(e, t, n) {
21579
21575
  kr(h) || Uc(h) || (g && !E ? b.set("label", t.create("bpmndi:BPMNLabel")) : !g && E && b.set("label", void 0));
21580
21576
  }
21581
21577
  }
21582
- we(ei, se);
21578
+ we(ei, ce);
21583
21579
  ei.$inject = [
21584
21580
  "eventBus",
21585
21581
  "bpmnFactory",
@@ -24602,7 +24598,7 @@ const uu = {
24602
24598
  overlays: ["type", vn]
24603
24599
  };
24604
24600
  function Wd(e, t) {
24605
- t.invoke(se, this), this.executed(function(n) {
24601
+ t.invoke(ce, this), this.executed(function(n) {
24606
24602
  var i = n.context;
24607
24603
  i.rootElement ? e.setRootElement(i.rootElement) : i.rootElement = e.getRootElement();
24608
24604
  }), this.revert(function(n) {
@@ -24610,7 +24606,7 @@ function Wd(e, t) {
24610
24606
  i.rootElement && e.setRootElement(i.rootElement);
24611
24607
  });
24612
24608
  }
24613
- we(Wd, se);
24609
+ we(Wd, ce);
24614
24610
  Wd.$inject = ["canvas", "injector"];
24615
24611
  const XO = {
24616
24612
  __init__: ["rootElementsBehavior"],
@@ -24817,7 +24813,7 @@ function nD(e, t) {
24817
24813
  }
24818
24814
  var Mc = 250, iD = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M4.81801948,3.50735931 L10.4996894,9.1896894 L10.5,4 L12,4 L12,12 L4,12 L4,10.5 L9.6896894,10.4996894 L3.75735931,4.56801948 C3.46446609,4.27512627 3.46446609,3.80025253 3.75735931,3.50735931 C4.05025253,3.21446609 4.52512627,3.21446609 4.81801948,3.50735931 Z"/></svg>', rD = "bjs-drilldown-empty";
24819
24815
  function Gr(e, t, n, i, r) {
24820
- se.call(this, t), this._canvas = e, this._eventBus = t, this._elementRegistry = n, this._overlays = i, this._translate = r;
24816
+ ce.call(this, t), this._canvas = e, this._eventBus = t, this._elementRegistry = n, this._overlays = i, this._translate = r;
24821
24817
  var o = this;
24822
24818
  this.executed("shape.toggleCollapse", Mc, function(a) {
24823
24819
  var s = a.shape;
@@ -24849,7 +24845,7 @@ function Gr(e, t, n, i, r) {
24849
24845
  });
24850
24846
  });
24851
24847
  }
24852
- we(Gr, se);
24848
+ we(Gr, ce);
24853
24849
  Gr.prototype._updateDrilldownOverlay = function(e) {
24854
24850
  var t = this._canvas;
24855
24851
  if (e) {
@@ -26299,21 +26295,21 @@ function WD(e) {
26299
26295
  E,
26300
26296
  { keys: ["label", "search", "description"] }
26301
26297
  ).map(({ item: V }) => V) : K.filter(({ rank: V = 0 }) => V >= 0) : K;
26302
- }, [S, m, y, E, p, g, f]), P = Qi(() => m ? w.length ? [{ id: "default", entries: w }] : [] : KD(w), [w, m]), [T, $] = ap(w[0]), k = bl(null), I = bl(!1), j = Qi(() => VD.next(), []), ee = `${j}-results`, fe = T && Lw(j, T);
26298
+ }, [S, m, y, E, p, g, f]), P = Qi(() => m ? w.length ? [{ id: "default", entries: w }] : [] : KD(w), [w, m]), [T, $] = ap(w[0]), k = bl(null), I = bl(!1), j = Qi(() => VD.next(), []), J = `${j}-results`, fe = T && Lw(j, T);
26303
26299
  Zc(() => {
26304
26300
  const K = k.current;
26305
26301
  K && w.includes(K) ? $(K) : $(w[0]), k.current = null;
26306
26302
  }, [w]);
26307
- const Re = Ia((K) => {
26303
+ const Ce = Ia((K) => {
26308
26304
  const V = qD(P);
26309
- let Me = V.indexOf(T) + K;
26310
- Me < 0 && (Me = V.length - 1), Me >= V.length && (Me = 0), I.current = !0, $(V[Me]);
26305
+ let Ae = V.indexOf(T) + K;
26306
+ Ae < 0 && (Ae = V.length - 1), Ae >= V.length && (Ae = 0), I.current = !0, $(V[Ae]);
26311
26307
  }, [P, T]), De = Ia((K) => {
26312
26308
  K > 0 && T && T.entries && (I.current = !0, b((V) => [...V, T])), K < 0 && g.length > 0 && (I.current = !0, k.current = g[g.length + K], b((V) => V.slice(0, K)));
26313
- }, [T, g]), Je = Ia((K, V, ie) => {
26309
+ }, [T, g]), Je = Ia((K, V, ne) => {
26314
26310
  if (!(!V || V.disabled))
26315
- return V.entries ? (K.preventDefault(), De(1)) : n(K, V, ie);
26316
- }, [n, De]), Q = Ia((K) => {
26311
+ return V.entries ? (K.preventDefault(), De(1)) : n(K, V, ne);
26312
+ }, [n, De]), Z = Ia((K) => {
26317
26313
  if (K.key === "Enter" && T) {
26318
26314
  const V = K.target;
26319
26315
  return !!bo(V, "a, button", !0) || T.disabled ? void 0 : Je(K, T);
@@ -26324,14 +26320,14 @@ function WD(e) {
26324
26320
  return De(-1), K.preventDefault();
26325
26321
  }
26326
26322
  if (K.key === "ArrowUp")
26327
- return Re(-1), K.preventDefault();
26323
+ return Ce(-1), K.preventDefault();
26328
26324
  if (K.key === "ArrowDown")
26329
- return Re(1), K.preventDefault();
26325
+ return Ce(1), K.preventDefault();
26330
26326
  if (K.key === "ArrowRight")
26331
26327
  return De(1), K.preventDefault();
26332
26328
  if (K.key === "ArrowLeft")
26333
26329
  return De(-1), K.preventDefault();
26334
- }, [T, Re, De, Je]), te = Ia((K) => {
26330
+ }, [T, Ce, De, Je]), ee = Ia((K) => {
26335
26331
  Rp(K.target, "input") && _(() => K.target.value);
26336
26332
  }, [_]);
26337
26333
  Zc(() => (d(), () => {
@@ -26341,8 +26337,8 @@ function WD(e) {
26341
26337
  return Rt`
26342
26338
  <${qy}
26343
26339
  onClose=${t}
26344
- onKeyup=${te}
26345
- onKeydown=${Q}
26340
+ onKeyup=${ee}
26341
+ onKeydown=${Z}
26346
26342
  className=${i}
26347
26343
  position=${o}
26348
26344
  width=${s}
@@ -26378,7 +26374,7 @@ function WD(e) {
26378
26374
  role="combobox"
26379
26375
  aria-label="${a || "Search"}"
26380
26376
  aria-expanded="true"
26381
- aria-controls=${ee}
26377
+ aria-controls=${J}
26382
26378
  aria-activedescendant=${fe || void 0}
26383
26379
  aria-autocomplete="list"
26384
26380
  />
@@ -26398,7 +26394,7 @@ function WD(e) {
26398
26394
  keyboardSelection=${I}
26399
26395
  onAction=${Je}
26400
26396
  idPrefix=${j}
26401
- id=${ee}
26397
+ id=${J}
26402
26398
  ariaLabel=${a || "Results"}
26403
26399
  tabIndex=${S ? -1 : 0}
26404
26400
  ariaActivedescendant=${S ? void 0 : fe || void 0}
@@ -27075,7 +27071,7 @@ const aI = {
27075
27071
  bpmnAlignElements: ["type", mu]
27076
27072
  };
27077
27073
  function dr(e, t, n, i) {
27078
- se.call(this, e), this._elementRegistry = t, this._modeling = n, this._rules = i;
27074
+ ce.call(this, e), this._elementRegistry = t, this._modeling = n, this._rules = i;
27079
27075
  var r = this;
27080
27076
  this.postExecuted(["shape.create"], function(o) {
27081
27077
  var a = o.context, s = a.hints || {}, c = a.shape, l = a.parent || a.newParent;
@@ -27106,7 +27102,7 @@ dr.$inject = [
27106
27102
  "modeling",
27107
27103
  "rules"
27108
27104
  ];
27109
- we(dr, se);
27105
+ we(dr, ce);
27110
27106
  dr.prototype._getOptimalBounds = function(e, t) {
27111
27107
  var n = this.getOffset(t), i = this.getPadding(t), r = Le(en(e)), o = Le(t), a = {};
27112
27108
  return r.top - o.top < i.top && (a.top = r.top - n.top), r.left - o.left < i.left && (a.left = r.left - n.left), o.right - r.right < i.right && (a.right = r.right + n.right), o.bottom - r.bottom < i.bottom && (a.bottom = r.bottom + n.bottom), Ol(W({}, o, a));
@@ -27326,8 +27322,8 @@ function mI(e, t) {
27326
27322
  }
27327
27323
  function Vw(e, t, n, i, r) {
27328
27324
  function o(m, y, S) {
27329
- var w = m.index, P = m.point, T, $, k, I, j, ee;
27330
- return w <= 0 || m.bendpoint ? !1 : (T = y[w - 1], $ = y[w], k = Ap(T, $), I = Ji(T, $), j = Math.abs(P.x - k.x), ee = Math.abs(P.y - k.y), I && j <= S && ee <= S);
27325
+ var w = m.index, P = m.point, T, $, k, I, j, J;
27326
+ return w <= 0 || m.bendpoint ? !1 : (T = y[w - 1], $ = y[w], k = Ap(T, $), I = Ji(T, $), j = Math.abs(P.x - k.x), J = Math.abs(P.y - k.y), I && j <= S && J <= S);
27331
27327
  }
27332
27328
  function a(m, y) {
27333
27329
  var S = m.waypoints, w, P, T, $;
@@ -27393,14 +27389,14 @@ function Vw(e, t, n, i, r) {
27393
27389
  S && (_n(S, w.x, w.y), at(S).add("positioned"));
27394
27390
  }
27395
27391
  function _(m, y, S) {
27396
- var w = u(y.index, m), P = S[y.index - 1], T = S[y.index], $ = y.point, k = Ap(P, T), I = Ji(P, T), j, ee;
27397
- w && (j = yI(w), ee = {
27392
+ var w = u(y.index, m), P = S[y.index - 1], T = S[y.index], $ = y.point, k = Ap(P, T), I = Ji(P, T), j, J;
27393
+ w && (j = yI(w), J = {
27398
27394
  x: $.x - k.x,
27399
27395
  y: $.y - k.y
27400
- }, I === "v" && (ee = {
27401
- x: ee.y,
27402
- y: ee.x
27403
- }), _n(j, ee.x, ee.y));
27396
+ }, I === "v" && (J = {
27397
+ x: J.y,
27398
+ y: J.x
27399
+ }), _n(j, J.x, J.y));
27404
27400
  }
27405
27401
  e.on("connection.changed", function(m) {
27406
27402
  b(m.element);
@@ -30050,7 +30046,7 @@ function r0(e) {
30050
30046
  }
30051
30047
  r0.$inject = ["eventBus"];
30052
30048
  function Co(e, t) {
30053
- se.call(this, e), this._gridSnapping = t;
30049
+ ce.call(this, e), this._gridSnapping = t;
30054
30050
  var n = this;
30055
30051
  this.preExecute("shape.resize", function(i) {
30056
30052
  var r = i.context, o = r.hints || {}, a = o.autoResize;
@@ -30065,7 +30061,7 @@ Co.$inject = [
30065
30061
  "gridSnapping",
30066
30062
  "modeling"
30067
30063
  ];
30068
- we(Co, se);
30064
+ we(Co, ce);
30069
30065
  Co.prototype.snapSimple = function(e, t) {
30070
30066
  var n = this._gridSnapping;
30071
30067
  return t.width = n.snapValue(t.width, {
@@ -30252,7 +30248,7 @@ s0.$inject = [
30252
30248
  ];
30253
30249
  var bL = 3e3;
30254
30250
  function wu(e, t, n) {
30255
- se.call(this, e), this._gridSnapping = t;
30251
+ ce.call(this, e), this._gridSnapping = t;
30256
30252
  var i = this;
30257
30253
  this.postExecuted([
30258
30254
  "connection.create",
@@ -30267,7 +30263,7 @@ wu.$inject = [
30267
30263
  "gridSnapping",
30268
30264
  "modeling"
30269
30265
  ];
30270
- we(wu, se);
30266
+ we(wu, ce);
30271
30267
  wu.prototype.snapMiddleSegments = function(e) {
30272
30268
  var t = this._gridSnapping, n;
30273
30269
  e = e.slice();
@@ -32111,7 +32107,7 @@ const wN = {
32111
32107
  };
32112
32108
  var EN = 250;
32113
32109
  function ch(e, t, n, i, r) {
32114
- se.call(this, e);
32110
+ ce.call(this, e);
32115
32111
  function o(s) {
32116
32112
  var c = s.canExecute.replacements;
32117
32113
  z(c, function(l) {
@@ -32149,7 +32145,7 @@ ch.$inject = [
32149
32145
  "canvas",
32150
32146
  "previewSupport"
32151
32147
  ];
32152
- we(ch, se);
32148
+ we(ch, ce);
32153
32149
  const SN = {
32154
32150
  __depends__: [
32155
32151
  fa