@g1cloud/bpmn-modeler-next 5.0.0-beta.50 → 5.0.0-beta.51

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.
@@ -1388,7 +1388,7 @@ function Yb(e) {
1388
1388
  y = !0;
1389
1389
  };
1390
1390
  function $(j, G = !1) {
1391
- var X = null, te = null, J, ie = 0, se = !1, ve = !1, we = 0, U = 0, ne, q, Z, ue, xe, Pe, B, C, S, V = "", K = 0, oe;
1391
+ var X = null, te = null, J, ie = 0, se = !1, ve = !1, we = 0, U = 0, ne, q, Z, ue, xe, Pe, B, M, S, V = "", K = 0, oe;
1392
1392
  function _e(xt, en) {
1393
1393
  var _n = xt.indexOf(":");
1394
1394
  if (_n === -1)
@@ -1472,7 +1472,7 @@ function Yb(e) {
1472
1472
  return B;
1473
1473
  }),
1474
1474
  originalName: Bc(function() {
1475
- return C;
1475
+ return M;
1476
1476
  }),
1477
1477
  attrs: Bc(Qe),
1478
1478
  ns: Bc(function() {
@@ -1562,18 +1562,18 @@ function Yb(e) {
1562
1562
  ve || E.push(B);
1563
1563
  }
1564
1564
  if (m) {
1565
- J = b, se && (ve || v.push(J), oe === null && (h = ne.indexOf("xmlns", Z) !== -1) && (K = Z, V = ne, Qe(), h = !1)), C = B, te !== b && (X = b[Mm], X === void 0 && (X = b[Mm] = /* @__PURE__ */ Object.create(null)), te = b);
1565
+ J = b, se && (ve || v.push(J), oe === null && (h = ne.indexOf("xmlns", Z) !== -1) && (K = Z, V = ne, Qe(), h = !1)), M = B, te !== b && (X = b[Mm], X === void 0 && (X = b[Mm] = /* @__PURE__ */ Object.create(null)), te = b);
1566
1566
  var Ot = X[B];
1567
1567
  if (Ot !== void 0)
1568
1568
  B = Ot;
1569
1569
  else {
1570
1570
  if (ue = B.indexOf(":"), ue !== -1) {
1571
1571
  if (Pe = b[B.substring(0, ue)], !Pe)
1572
- return D("missing namespace on <" + C + ">");
1572
+ return D("missing namespace on <" + M + ">");
1573
1573
  B = B.substr(ue + 1);
1574
1574
  } else
1575
1575
  Pe = b.xmlns;
1576
- Pe && (B = Pe + ":" + B), X[C] = B;
1576
+ Pe && (B = Pe + ":" + B), X[M] = B;
1577
1577
  }
1578
1578
  }
1579
1579
  if (se && (K = Z, V = ne, i && (t ? i(S, kr, ve, p) : i(B, Qe, kr, ve, p), y)))
@@ -8874,11 +8874,11 @@ function RA(e, t) {
8874
8874
  ))
8875
8875
  g.set(x.id, { x: x.x, y: x.y });
8876
8876
  const h = Gt(e, "participant.add"), m = Gt(e, "node.add"), w = Gt(e, "sequenceFlow.add"), y = Gt(e, "messageFlow.add"), v = Gt(e, "dataStore.add"), b = Gt(e, "dataAssociation.add"), E = Gt(e, "annotation.add"), R = Gt(e, "group.add"), D = new Map(m.map((x) => [x.node.id, x])), P = bw(e, (x) => {
8877
- var _, M;
8878
- return (M = (_ = p(x)) == null ? void 0 : _.source) == null ? void 0 : M.id;
8879
- }), T = new Set([...P.values()].map((x) => x.flow.id)), $ = w.filter((x) => !T.has(x.flow.id)), j = new Set([...P.values()].map((x) => x.flow.target)), G = (x) => Gt(e, "sequenceFlow.update").filter((_) => _.target === x).length + (j.has(x) ? 1 : 0), X = (x, _, M) => {
8877
+ var _, C;
8878
+ return (C = (_ = p(x)) == null ? void 0 : _.source) == null ? void 0 : C.id;
8879
+ }), T = new Set([...P.values()].map((x) => x.flow.id)), $ = w.filter((x) => !T.has(x.flow.id)), j = new Set([...P.values()].map((x) => x.flow.target)), G = (x) => Gt(e, "sequenceFlow.update").filter((_) => _.target === x).length + (j.has(x) ? 1 : 0), X = (x, _, C) => {
8880
8880
  var I;
8881
- const O = x.businessObject, L = (((I = O.extensionElements) == null ? void 0 : I.values) ?? []).filter((N) => N.$type !== _), k = M ? [...L, i.create(_, M)] : L;
8881
+ const O = x.businessObject, L = (((I = O.extensionElements) == null ? void 0 : I.values) ?? []).filter((N) => N.$type !== _), k = C ? [...L, i.create(_, C)] : L;
8882
8882
  if (!k.length) {
8883
8883
  O.extensionElements && n.updateProperties(x, { extensionElements: void 0 });
8884
8884
  return;
@@ -8894,26 +8894,28 @@ function RA(e, t) {
8894
8894
  });
8895
8895
  for (const x of Gt(e, "element.remove")) {
8896
8896
  const _ = p(x.id);
8897
- _ && n.removeElements([_]);
8897
+ if (!_) continue;
8898
+ const C = "waypoints" in _ ? [] : [..._.incoming ?? [], ..._.outgoing ?? []];
8899
+ n.removeElements([...C, _]);
8898
8900
  }
8899
8901
  const J = (x) => r.filter(
8900
8902
  (_) => {
8901
- var M;
8902
- return _.type === "bpmn:Lane" && ((M = d(_)) == null ? void 0 : M.id) === x;
8903
+ var C;
8904
+ return _.type === "bpmn:Lane" && ((C = d(_)) == null ? void 0 : C.id) === x;
8903
8905
  }
8904
- ).sort((_, M) => _.y - M.y);
8906
+ ).sort((_, C) => _.y - C.y);
8905
8907
  for (const x of Gt(e, "participant.update")) {
8906
8908
  const _ = f(x.id);
8907
8909
  if (x.name !== void 0 && n.updateProperties(_, { name: x.name ?? void 0 }), !x.lanes) continue;
8908
- const M = J(x.id);
8909
- if (!M.length) {
8910
+ const C = J(x.id);
8911
+ if (!C.length) {
8910
8912
  n.splitLane(_, x.lanes.length), J(x.id).forEach((k, F) => {
8911
8913
  const I = x.lanes[F];
8912
8914
  I && n.updateProperties(k, { id: I.id, name: I.name });
8913
8915
  });
8914
8916
  continue;
8915
8917
  }
8916
- const O = new Set(M.map((k) => k.id)), L = x.lanes.reduce((k, F, I) => O.has(F.id) ? I : k, -1);
8918
+ const O = new Set(C.map((k) => k.id)), L = x.lanes.reduce((k, F, I) => O.has(F.id) ? I : k, -1);
8917
8919
  x.lanes.forEach((k, F) => {
8918
8920
  if (O.has(k.id)) {
8919
8921
  n.updateProperties(f(k.id), { name: k.name });
@@ -8923,8 +8925,8 @@ function RA(e, t) {
8923
8925
  n.updateProperties(N, { id: k.id, name: k.name });
8924
8926
  });
8925
8927
  }
8926
- const ie = 150, se = 130, ve = 80, we = 90, U = 180, ne = 30, q = 30, Z = 10, ue = 300, xe = 5, Pe = (x, _, M, O, L) => {
8927
- const k = M - _.width / 2, F = O - _.height / 2;
8928
+ const ie = 150, se = 130, ve = 80, we = 90, U = 180, ne = 30, q = 30, Z = 10, ue = 300, xe = 5, Pe = (x, _, C, O, L) => {
8929
+ const k = C - _.width / 2, F = O - _.height / 2;
8928
8930
  return (x.children ?? []).find(
8929
8931
  (I) => !("waypoints" in I && I.waypoints) && I.type !== "bpmn:Lane" && I.type !== "label" && !(L != null && L.has(I.id)) && typeof I.x == "number" && k < I.x + I.width + q && k + _.width + q > I.x && F < I.y + I.height && F + _.height > I.y
8930
8932
  );
@@ -8933,24 +8935,24 @@ function RA(e, t) {
8933
8935
  B.add(`pool:${x.participant.id}`);
8934
8936
  for (const _ of x.participant.lanes ?? []) B.add(_.id);
8935
8937
  }
8936
- const C = /* @__PURE__ */ new Map();
8938
+ const M = /* @__PURE__ */ new Map();
8937
8939
  for (const x of m) {
8938
8940
  const _ = x.node.lane ?? `pool:${x.node.participant ?? ""}`;
8939
- let M = C.get(_);
8940
- M || C.set(_, M = /* @__PURE__ */ new Set([0])), x.band !== void 0 && M.add(x.band);
8941
+ let C = M.get(_);
8942
+ C || M.set(_, C = /* @__PURE__ */ new Set([0])), x.band !== void 0 && C.add(x.band);
8941
8943
  }
8942
8944
  const S = /* @__PURE__ */ new Map();
8943
- for (const [x, _] of C) {
8945
+ for (const [x, _] of M) {
8944
8946
  if (!B.has(x)) continue;
8945
- const M = [..._].sort((k, F) => k - F), O = M.map((k, F) => F === 0 ? 0 : F % 2 === 1 ? Math.ceil(F / 2) : -(F / 2)), L = Math.min(...O);
8946
- S.set(x, new Map(M.map((k, F) => [k, O[F] - L])));
8947
+ const C = [..._].sort((k, F) => k - F), O = C.map((k, F) => F === 0 ? 0 : F % 2 === 1 ? Math.ceil(F / 2) : -(F / 2)), L = Math.min(...O);
8948
+ S.set(x, new Map(C.map((k, F) => [k, O[F] - L])));
8947
8949
  }
8948
8950
  {
8949
8951
  const x = /* @__PURE__ */ new Map();
8950
- for (const _ of h) (_.participant.lanes ?? []).forEach((M, O) => x.set(M.id, O));
8951
- for (const [_, M] of S) {
8952
- if (!x.has(_) || M.size < 2) continue;
8953
- const O = x.get(_), L = M.get(0) ?? 0, k = /* @__PURE__ */ new Set();
8952
+ for (const _ of h) (_.participant.lanes ?? []).forEach((C, O) => x.set(C.id, O));
8953
+ for (const [_, C] of S) {
8954
+ if (!x.has(_) || C.size < 2) continue;
8955
+ const O = x.get(_), L = C.get(0) ?? 0, k = /* @__PURE__ */ new Set();
8954
8956
  for (const re of m) {
8955
8957
  if (re.node.lane !== _ || (re.band ?? 0) !== 0 || !re.node.type.endsWith("Gateway")) continue;
8956
8958
  const ye = { in: /* @__PURE__ */ new Set(), out: /* @__PURE__ */ new Set(), cross: /* @__PURE__ */ new Set() };
@@ -8965,7 +8967,7 @@ function RA(e, t) {
8965
8967
  if (he === void 0) continue;
8966
8968
  Ee = he > O ? "down" : "up", de = !0;
8967
8969
  } else {
8968
- const he = M.get(Oe.band ?? 0) ?? L;
8970
+ const he = C.get(Oe.band ?? 0) ?? L;
8969
8971
  Ee = he > L ? "down" : he < L ? "up" : void 0;
8970
8972
  }
8971
8973
  Ee && (ye[ge ? "out" : "in"].add(Ee), de && ye.cross.add(Ee));
@@ -8973,15 +8975,15 @@ function RA(e, t) {
8973
8975
  for (const ae of ["up", "down"]) ye.in.has(ae) && ye.out.has(ae) && ye.cross.has(ae) && k.add(ae);
8974
8976
  }
8975
8977
  if (k.size !== 1) continue;
8976
- const [F] = k, I = Math.max(...M.values()), N = F === "down" ? I : 0;
8978
+ const [F] = k, I = Math.max(...C.values()), N = F === "down" ? I : 0;
8977
8979
  if (L === N) continue;
8978
- const H = [...M.entries()].filter(([re]) => re !== 0).sort((re, ye) => re[1] - ye[1]), W = [...Array(I + 1).keys()].filter((re) => re !== N), ee = /* @__PURE__ */ new Map([[0, N]]);
8980
+ const H = [...C.entries()].filter(([re]) => re !== 0).sort((re, ye) => re[1] - ye[1]), W = [...Array(I + 1).keys()].filter((re) => re !== N), ee = /* @__PURE__ */ new Map([[0, N]]);
8979
8981
  H.forEach(([re], ye) => ee.set(re, W[ye])), S.set(_, ee);
8980
8982
  }
8981
8983
  }
8982
8984
  const V = (x) => {
8983
8985
  var _;
8984
- return (((_ = C.get(x)) == null ? void 0 : _.size) ?? 0) > 1;
8986
+ return (((_ = M.get(x)) == null ? void 0 : _.size) ?? 0) > 1;
8985
8987
  }, K = (x) => x.band ?? (x.node.lane || !V(`pool:${x.node.participant ?? ""}`) ? void 0 : 0), oe = /* @__PURE__ */ new Map(), _e = (x) => oe.get(x.node.id) ?? K(x), Qe = /* @__PURE__ */ new Set(), yt = /* @__PURE__ */ new Set();
8986
8988
  {
8987
8989
  const x = /* @__PURE__ */ new Map();
@@ -8995,7 +8997,7 @@ function RA(e, t) {
8995
8997
  N.flow.source !== I || k.has(N.flow.target) || (x.get(N.flow.target) ?? 0) !== 1 || (k.add(N.flow.target), F.push(N.flow.target));
8996
8998
  }
8997
8999
  return L;
8998
- }, M = (O, L) => {
9000
+ }, C = (O, L) => {
8999
9001
  var k;
9000
9002
  return ((k = S.get(O)) == null ? void 0 : k.get(L)) ?? L;
9001
9003
  };
@@ -9004,13 +9006,13 @@ function RA(e, t) {
9004
9006
  const L = O.node.lane ?? `pool:${O.node.participant ?? ""}`, k = S.get(L);
9005
9007
  if (!k || k.size < 2) continue;
9006
9008
  const F = _e(O);
9007
- if (F === void 0 || M(L, F) !== M(L, 0)) continue;
9008
- const I = M(L, F), N = $.filter((ae) => ae.flow.source === O.node.id).map((ae) => D.get(ae.flow.target)).filter((ae) => !!ae && (ae.node.lane ?? `pool:${ae.node.participant ?? ""}`) === L), H = N.filter((ae) => {
9009
+ if (F === void 0 || C(L, F) !== C(L, 0)) continue;
9010
+ const I = C(L, F), N = $.filter((ae) => ae.flow.source === O.node.id).map((ae) => D.get(ae.flow.target)).filter((ae) => !!ae && (ae.node.lane ?? `pool:${ae.node.participant ?? ""}`) === L), H = N.filter((ae) => {
9009
9011
  const ge = _e(ae);
9010
- return ge !== void 0 && M(L, ge) === I && (x.get(ae.node.id) ?? 0) === 1;
9012
+ return ge !== void 0 && C(L, ge) === I && (x.get(ae.node.id) ?? 0) === 1;
9011
9013
  }), W = N.some((ae) => {
9012
9014
  const ge = _e(ae);
9013
- return ge !== void 0 && M(L, ge) > I;
9015
+ return ge !== void 0 && C(L, ge) > I;
9014
9016
  });
9015
9017
  if (H.length !== 1 || !W) continue;
9016
9018
  const ee = new Set(N.flatMap((ae) => _(ae.node.id)));
@@ -9023,42 +9025,42 @@ function RA(e, t) {
9023
9025
  }
9024
9026
  }
9025
9027
  const Ot = (x, _) => {
9026
- var M;
9027
- return ((M = S.get(x)) == null ? void 0 : M.get(_)) ?? _;
9028
- }, xt = (x, _, M, O) => {
9028
+ var C;
9029
+ return ((C = S.get(x)) == null ? void 0 : C.get(_)) ?? _;
9030
+ }, xt = (x, _, C, O) => {
9029
9031
  const L = x ? p(x) : _ ? p(_) : void 0;
9030
9032
  if (!L) return !1;
9031
9033
  const k = x ? L.y + Math.min(L.height / 2, we) : L.y + ve;
9032
- return Math.abs(k + Ot(x ?? `pool:${_ ?? ""}`, M) * ie - O) <= ie / 2;
9034
+ return Math.abs(k + Ot(x ?? `pool:${_ ?? ""}`, C) * ie - O) <= ie / 2;
9033
9035
  }, en = /* @__PURE__ */ new Map();
9034
- for (const [x, _] of C) {
9035
- let M = 0;
9036
- for (const O of _) M = Math.max(M, Ot(x, O));
9037
- en.set(x, M);
9036
+ for (const [x, _] of M) {
9037
+ let C = 0;
9038
+ for (const O of _) C = Math.max(C, Ot(x, O));
9039
+ en.set(x, C);
9038
9040
  }
9039
- const _n = (x) => U + ie * x, En = (x, _, M) => {
9041
+ const _n = (x) => U + ie * x, En = (x, _, C) => {
9040
9042
  const O = u().children.filter(
9041
9043
  (L) => !("waypoints" in L && L.waypoints) && L.type !== "label" && L.id !== _ && typeof L.y == "number" && L.y >= x
9042
9044
  );
9043
- O.length && n.moveElements(O, { x: 0, y: M });
9044
- }, Bt = (x, _, M) => {
9045
+ O.length && n.moveElements(O, { x: 0, y: C });
9046
+ }, Bt = (x, _, C) => {
9045
9047
  const O = x.type === "bpmn:Participant" ? x : void 0;
9046
9048
  if (!O || O.children.some((I) => I.type === "bpmn:Lane")) return;
9047
- const L = M + _.height / 2 + ne - O.y;
9049
+ const L = C + _.height / 2 + ne - O.y;
9048
9050
  if (O.height >= L) return;
9049
9051
  const k = L - O.height, F = O.y + O.height;
9050
9052
  n.resizeShape(O, { x: O.x, y: O.y, width: O.width, height: L }), En(F, O.id, k);
9051
9053
  }, fn = (x, _) => {
9052
- const M = _ - x.height;
9053
- if (M <= 0) return;
9054
+ const C = _ - x.height;
9055
+ if (C <= 0) return;
9054
9056
  const O = d(x) ?? x, L = [], k = (N) => {
9055
9057
  L.push(N);
9056
9058
  for (const H of N.children ?? []) k(H);
9057
9059
  };
9058
9060
  k(O);
9059
- const F = x.y + x.height - 10, I = l.calculateAdjustments(L, "y", M, F);
9060
- l.makeSpace(I.movingShapes, I.resizingShapes, { x: 0, y: M }, "s", F);
9061
- }, Mn = (x, _, M) => {
9061
+ const F = x.y + x.height - 10, I = l.calculateAdjustments(L, "y", C, F);
9062
+ l.makeSpace(I.movingShapes, I.resizingShapes, { x: 0, y: C }, "s", F);
9063
+ }, Mn = (x, _, C) => {
9062
9064
  if (x) {
9063
9065
  const F = f(x), I = _n(_);
9064
9066
  if (F.height >= I) return;
@@ -9066,11 +9068,11 @@ function RA(e, t) {
9066
9068
  fn(F, I), En(W, H == null ? void 0 : H.id, N);
9067
9069
  return;
9068
9070
  }
9069
- if (!M) return;
9071
+ if (!C) return;
9070
9072
  const O = ie * (_ + 1);
9071
- if (M.height >= O) return;
9072
- const L = O - M.height, k = M.y + M.height;
9073
- n.resizeShape(M, { x: M.x, y: M.y, width: M.width, height: O }), En(k, M.id, L);
9073
+ if (C.height >= O) return;
9074
+ const L = O - C.height, k = C.y + C.height;
9075
+ n.resizeShape(C, { x: C.x, y: C.y, width: C.width, height: O }), En(k, C.id, L);
9074
9076
  }, No = /* @__PURE__ */ new Map();
9075
9077
  for (const x of $) No.set(x.flow.target, (No.get(x.flow.target) ?? 0) + 1);
9076
9078
  const di = (x) => (No.get(x) ?? 0) <= 1, Ui = new Set(
@@ -9079,21 +9081,21 @@ function RA(e, t) {
9079
9081
  )
9080
9082
  ), ei = /* @__PURE__ */ new Map(), nn = (x, _) => {
9081
9083
  if (!x) return;
9082
- const M = p(x);
9083
- if (!M || M.height >= _n(_)) return;
9084
- const O = M.y + M.height - 10, L = d(M);
9084
+ const C = p(x);
9085
+ if (!C || C.height >= _n(_)) return;
9086
+ const O = C.y + C.height - 10, L = d(C);
9085
9087
  if (L)
9086
9088
  return new Set(
9087
9089
  (L.children ?? []).filter((k) => k.type !== "bpmn:Lane" && typeof k.y == "number" && k.y > O).map((k) => k.id)
9088
9090
  );
9089
- }, qi = (x, _, M) => {
9091
+ }, qi = (x, _, C) => {
9090
9092
  if (!x) return !0;
9091
9093
  const O = p(x);
9092
- return O ? M - _.height / 2 >= O.y && M + _.height / 2 <= O.y + O.height : !0;
9094
+ return O ? C - _.height / 2 >= O.y && C + _.height / 2 <= O.y + O.height : !0;
9093
9095
  }, br = h.map((x, _) => ({ op: x, declared: _ }));
9094
9096
  br.sort((x, _) => {
9095
- const M = x.op.order ?? Number.POSITIVE_INFINITY, O = _.op.order ?? Number.POSITIVE_INFINITY;
9096
- return M !== O ? M - O : x.declared - _.declared;
9097
+ const C = x.op.order ?? Number.POSITIVE_INFINITY, O = _.op.order ?? Number.POSITIVE_INFINITY;
9098
+ return C !== O ? C - O : x.declared - _.declared;
9097
9099
  });
9098
9100
  let jn = 80;
9099
9101
  for (const x of r.getAll())
@@ -9102,13 +9104,13 @@ function RA(e, t) {
9102
9104
  (x) => x.type === "bpmn:Participant" && x.parent === u()
9103
9105
  ), Mt = (() => {
9104
9106
  if (!ht.length) return;
9105
- const x = ht.filter((L) => !Ew(L)), _ = x.length ? x : ht, M = Math.min(..._.map((L) => L.x)), O = Math.max(..._.map((L) => L.x + L.width));
9106
- return O > M ? { x: M, width: O - M } : void 0;
9107
+ const x = ht.filter((L) => !Ew(L)), _ = x.length ? x : ht, C = Math.min(..._.map((L) => L.x)), O = Math.max(..._.map((L) => L.x + L.width));
9108
+ return O > C ? { x: C, width: O - C } : void 0;
9107
9109
  })();
9108
9110
  for (const { op: x } of br) {
9109
- const _ = x.participant, M = m.filter((ge) => ge.node.participant === _.id).length, O = ((em = _.lanes) == null ? void 0 : em.length) ?? 0, L = Math.max(1200, M * 160 + 300), k = (_.lanes ?? []).map((ge) => _n(en.get(ge.id) ?? 0)), F = k.reduce((ge, Oe) => ge + Oe, 0);
9111
+ const _ = x.participant, C = m.filter((ge) => ge.node.participant === _.id).length, O = ((em = _.lanes) == null ? void 0 : em.length) ?? 0, L = Math.max(1200, C * 160 + 300), k = (_.lanes ?? []).map((ge) => _n(en.get(ge.id) ?? 0)), F = k.reduce((ge, Oe) => ge + Oe, 0);
9110
9112
  O && F < 300 && (k[O - 1] += 300 - F);
9111
- const I = Math.max(300, ie * ((en.get(`pool:${_.id}`) ?? 0) + 1)), N = _.blackBox || M + O === 0 ? 120 : O ? Math.max(300, F) : I, H = _.blackBox ? Mt : void 0, W = (H == null ? void 0 : H.x) ?? 100, ee = (H == null ? void 0 : H.width) ?? L, re = o.createShape({
9113
+ const I = Math.max(300, ie * ((en.get(`pool:${_.id}`) ?? 0) + 1)), N = _.blackBox || C + O === 0 ? 120 : O ? Math.max(300, F) : I, H = _.blackBox ? Mt : void 0, W = (H == null ? void 0 : H.x) ?? 100, ee = (H == null ? void 0 : H.width) ?? L, re = o.createShape({
9112
9114
  type: "bpmn:Participant",
9113
9115
  businessObject: i.create("bpmn:Participant", {
9114
9116
  id: _.id,
@@ -9148,8 +9150,8 @@ function RA(e, t) {
9148
9150
  var O;
9149
9151
  const _ = D.get(x);
9150
9152
  if (_) return _.node.participant ?? "";
9151
- const M = p(x);
9152
- return M ? M.type === "bpmn:Participant" ? M.id : ((O = d(M)) == null ? void 0 : O.id) ?? "" : "";
9153
+ const C = p(x);
9154
+ return C ? C.type === "bpmn:Participant" ? C.id : ((O = d(C)) == null ? void 0 : O.id) ?? "" : "";
9153
9155
  }, es = /* @__PURE__ */ new Map(), Sg = (x) => {
9154
9156
  let _ = es.get(x);
9155
9157
  return _ || es.set(x, _ = { nodes: [], flows: [] }), _;
@@ -9162,7 +9164,7 @@ function RA(e, t) {
9162
9164
  // 조건 라벨은 name 채널로 하강 (실측: conditionExpression 0건 — validate.ts 헤더)
9163
9165
  i.create("bpmn:SequenceFlow", { id: x.id, name: x.name ?? ((_ = x.condition) == null ? void 0 : _.label) })
9164
9166
  );
9165
- }, xp = (x, _, M) => o.createShape({
9167
+ }, xp = (x, _, C) => o.createShape({
9166
9168
  type: Vc(x.type),
9167
9169
  // 이벤트 정의(B-87 ⓑ 부분 — timer 만) — ElementFactory 가 정의 요소를 만들어 businessObject 에 단다.
9168
9170
  // validator 가 `intermediateCatchEvent` ⇔ 정의 짝을 강제하므로 여기 오는 정의는 그 타입에만 있다.
@@ -9173,30 +9175,30 @@ function RA(e, t) {
9173
9175
  // 밴드 힌트 기록 (bwl:band 속성)
9174
9176
  ..._ !== void 0 ? { "bwl:band": _ } : {},
9175
9177
  // 열 지목 힌트 기록 (bwl:afterColumn 속성) — band 와 대칭. 선언값 그대로 남긴다.
9176
- ...M !== void 0 ? { "bwl:afterColumn": M } : {}
9178
+ ...C !== void 0 ? { "bwl:afterColumn": C } : {}
9177
9179
  })
9178
9180
  }), O1 = [
9179
9181
  ...br.map(({ op: x }) => x.participant.id).filter((x) => es.has(x)),
9180
9182
  ...[...es.keys()].filter((x) => !h.some((_) => _.participant.id === x))
9181
9183
  ], bp = (x) => x.endsWith("Gateway");
9182
9184
  for (const x of O1) {
9183
- const _ = es.get(x), M = x ? f(x) : void 0, O = M ? M.x + 150 : 250;
9184
- let L = M ? M.y + 80 : 120;
9185
+ const _ = es.get(x), C = x ? f(x) : void 0, O = C ? C.x + 150 : 250;
9186
+ let L = C ? C.y + 80 : 120;
9185
9187
  const k = (Q, le, Me) => {
9186
9188
  if (Q) {
9187
9189
  const Xe = f(Q);
9188
9190
  return Xe.y + Math.min(Xe.height / 2, we) + Ot(Q, le ?? 0) * ie;
9189
9191
  }
9190
- return le !== void 0 && M ? M.y + ve + Ot(`pool:${x}`, le) * ie : Me;
9192
+ return le !== void 0 && C ? C.y + ve + Ot(`pool:${x}`, le) * ie : Me;
9191
9193
  }, F = (Q, le, Me) => {
9192
9194
  if (Q) {
9193
9195
  const Xe = f(Q);
9194
9196
  return Xe.y + Math.min(Xe.height / 2, we) + le * ie;
9195
9197
  }
9196
- return M ? M.y + ve + le * ie : Me;
9198
+ return C ? C.y + ve + le * ie : Me;
9197
9199
  }, I = (Q) => Q.participant ? f(Q.participant) : u(), N = (Q, le, Me, Xe, St, nt, st, De) => {
9198
9200
  const be = Me !== void 0 || Xe !== void 0, Se = (tt) => {
9199
- const Ie = () => Mn(Me, tt, M);
9201
+ const Ie = () => Mn(Me, tt, C);
9200
9202
  De ? De(Ie) : Ie();
9201
9203
  }, ce = Ot(Me ?? `pool:${x}`, Xe ?? 0);
9202
9204
  if (
@@ -9295,13 +9297,13 @@ function RA(e, t) {
9295
9297
  }
9296
9298
  return Se;
9297
9299
  }, nt = (be) => {
9298
- if (!M) return;
9300
+ if (!C) return;
9299
9301
  const Se = new Set(be.map((Ze) => Ze.node.id));
9300
9302
  let ce = !1, Te = !1;
9301
9303
  for (const Ze of y) {
9302
9304
  if (!Se.has(Ze.flow.source)) continue;
9303
9305
  const tt = Xe(Ze.flow.target);
9304
- !tt || tt.id === M.id || (tt.y < M.y ? ce = !0 : Te = !0);
9306
+ !tt || tt.id === C.id || (tt.y < C.y ? ce = !0 : Te = !0);
9305
9307
  }
9306
9308
  return ce && !Te ? "up" : Te && !ce ? "down" : void 0;
9307
9309
  };
@@ -9334,13 +9336,13 @@ function RA(e, t) {
9334
9336
  });
9335
9337
  }
9336
9338
  const st = (be) => {
9337
- if (!M) return;
9339
+ if (!C) return;
9338
9340
  const Se = new Set(be.map((Ze) => Ze.node.id));
9339
9341
  let ce = !1, Te = !1;
9340
9342
  for (const Ze of y) {
9341
9343
  if (!Se.has(Ze.flow.target)) continue;
9342
9344
  const tt = Xe(Ze.flow.source);
9343
- !tt || tt.id === M.id || (tt.y < M.y ? ce = !0 : Te = !0);
9345
+ !tt || tt.id === C.id || (tt.y < C.y ? ce = !0 : Te = !0);
9344
9346
  }
9345
9347
  return ce && !Te ? "up" : Te && !ce ? "down" : void 0;
9346
9348
  };
@@ -9394,12 +9396,12 @@ function RA(e, t) {
9394
9396
  const Se = De.get(be.node.id);
9395
9397
  if (!Se || Se.length !== 1 || !Q.get(be.node.id) || !be.node.lane && K(be) === void 0 || yt.has(be.node.id)) continue;
9396
9398
  const ce = (tm = D.get(Se[0].flow.source)) == null ? void 0 : tm.node.participant, Te = ce ? p(ce) : void 0;
9397
- if (!Te || !M || Te.id === M.id) continue;
9399
+ if (!Te || !C || Te.id === C.id) continue;
9398
9400
  const Ze = be.node.lane ?? `pool:${x}`, tt = S.get(Ze);
9399
9401
  if (!tt) continue;
9400
9402
  const Ie = tt.get(0) ?? 0, rt = (tt.get(_e(be) ?? 0) ?? Ie) - Ie;
9401
9403
  if (rt === 0) continue;
9402
- const dt = Te.y < M.y;
9404
+ const dt = Te.y < C.y;
9403
9405
  if (dt && rt < 0 || !dt && rt > 0) continue;
9404
9406
  let Dt;
9405
9407
  for (const [Xn, bt] of tt) {
@@ -9458,23 +9460,23 @@ function RA(e, t) {
9458
9460
  }
9459
9461
  const Rg = /* @__PURE__ */ new Map();
9460
9462
  for (const [x, _] of P) {
9461
- const M = p(x), O = p(_.flow.target);
9462
- if (!(M != null && M.target) || !O) continue;
9463
- const L = M.label && { x: M.label.x, y: M.label.y, width: M.label.width, height: M.label.height };
9464
- Rg.set(x, { waypoints: M.waypoints.map((I) => ({ x: I.x, y: I.y })), label: L });
9465
- const k = M.target, F = (I) => ({ x: I.x + I.width / 2, y: I.y + I.height / 2 });
9466
- n.reconnect(M, O, k, [F(O), F(k)]), n.layoutConnection(M, { waypoints: [] });
9463
+ const C = p(x), O = p(_.flow.target);
9464
+ if (!(C != null && C.target) || !O) continue;
9465
+ const L = C.label && { x: C.label.x, y: C.label.y, width: C.label.width, height: C.label.height };
9466
+ Rg.set(x, { waypoints: C.waypoints.map((I) => ({ x: I.x, y: I.y })), label: L });
9467
+ const k = C.target, F = (I) => ({ x: I.x + I.width / 2, y: I.y + I.height / 2 });
9468
+ n.reconnect(C, O, k, [F(O), F(k)]), n.layoutConnection(C, { waypoints: [] });
9467
9469
  }
9468
9470
  const wr = 40, Mc = (x) => {
9469
- const _ = (W) => W.kind === "label-over-line" || W.kind === "label-over-shape" || W.kind === "label-on-shared-segment" ? W.edge === x.id : W.kind === "annotation-over-label" || W.kind === "pool-name-over-label" ? W.label === x.id : !1, M = () => new Map(
9471
+ const _ = (W) => W.kind === "label-over-line" || W.kind === "label-over-shape" || W.kind === "label-on-shared-segment" ? W.edge === x.id : W.kind === "annotation-over-label" || W.kind === "pool-name-over-label" ? W.label === x.id : !1, C = () => new Map(
9470
9472
  pt(He(r)).filter((W) => !_(W)).map((W) => [ft(W), W])
9471
- ), O = M(), L = (W) => [...W].filter(([ee]) => !O.has(ee)).map(([, ee]) => ee), k = (W) => L(W).length <= [...O.keys()].filter((ee) => !W.has(ee)).length, F = x.waypoints.map((W) => ({ x: W.x, y: W.y })), I = x.label, N = I && { x: I.x, y: I.y };
9473
+ ), O = C(), L = (W) => [...W].filter(([ee]) => !O.has(ee)).map(([, ee]) => ee), k = (W) => L(W).length <= [...O.keys()].filter((ee) => !W.has(ee)).length, F = x.waypoints.map((W) => ({ x: W.x, y: W.y })), I = x.label, N = I && { x: I.x, y: I.y };
9472
9474
  n.layoutConnection(x, { waypoints: [] });
9473
- const H = M();
9475
+ const H = C();
9474
9476
  if (!k(H)) {
9475
9477
  if (L(H).every((W) => W.kind === "edge-crosses-shape" && W.edge === x.id)) {
9476
9478
  const W = He(r), ee = W.edges.find((ge) => ge.id === x.id), re = qn(W), ye = ee ? Vt(ee, re) : [], ae = ee && ye.length && !ye.every((ge) => ge.type === "bpmn:TextAnnotation") ? Td(ee, re, Xl(x), W.edges) : null;
9477
- if (ae && (n.updateWaypoints(x, ae), k(M())))
9479
+ if (ae && (n.updateWaypoints(x, ae), k(C())))
9478
9480
  return;
9479
9481
  }
9480
9482
  n.updateWaypoints(x, F), I && N && (I.x !== N.x || I.y !== N.y) && n.moveElements([I], { x: N.x - I.x, y: N.y - I.y });
@@ -9484,8 +9486,8 @@ function RA(e, t) {
9484
9486
  ...y.map((x) => x.flow.id),
9485
9487
  ...Gt(e, "sequenceFlow.update").map((x) => x.id),
9486
9488
  ...Gt(e, "messageFlow.update").map((x) => x.id)
9487
- ].filter((x) => !!x)), D1 = (x, _, M, O, L, k) => {
9488
- const F = new Set(x.map((de) => de.id)), I = Math.min(...x.map((de) => de.x)) + _ - vi, N = Math.max(...x.map((de) => de.x + de.width)) + _ + Cg + vi, H = Math.min(...x.map((de) => de.y + Math.min(0, ...M))) - vi, W = Math.max(...x.map((de) => de.y + de.height + Math.max(0, ...M))) + vi, ee = r.getAll().filter((de) => {
9489
+ ].filter((x) => !!x)), D1 = (x, _, C, O, L, k) => {
9490
+ const F = new Set(x.map((de) => de.id)), I = Math.min(...x.map((de) => de.x)) + _ - vi, N = Math.max(...x.map((de) => de.x + de.width)) + _ + Cg + vi, H = Math.min(...x.map((de) => de.y + Math.min(0, ...C))) - vi, W = Math.max(...x.map((de) => de.y + de.height + Math.max(0, ...C))) + vi, ee = r.getAll().filter((de) => {
9489
9491
  if (de.type !== "bpmn:SequenceFlow" && de.type !== "bpmn:MessageFlow") return !1;
9490
9492
  const he = de;
9491
9493
  return ts.has(he.id) || !he.waypoints || he.waypoints.length < 2 || [he.source, he.target].some((le) => !le || F.has(le.id) || le.x >= O) ? !1 : he.waypoints.some((le, Me) => {
@@ -9497,7 +9499,7 @@ function RA(e, t) {
9497
9499
  const re = (de) => {
9498
9500
  const he = /* @__PURE__ */ new Map();
9499
9501
  for (const Q of x)
9500
- for (const le of M) {
9502
+ for (const le of C) {
9501
9503
  const Me = { id: Q.id, type: Q.type, x: Q.x + _ + de, y: Q.y + le, width: Q.width, height: Q.height };
9502
9504
  for (const Xe of ee) {
9503
9505
  let St = 1 / 0;
@@ -9528,9 +9530,9 @@ function RA(e, t) {
9528
9530
  })
9529
9531
  ) ? 0 : ae;
9530
9532
  }, _r = (x, _ = () => !0) => {
9531
- const M = p(x);
9532
- if (!M) return [];
9533
- const O = [M], L = /* @__PURE__ */ new Set([x]);
9533
+ const C = p(x);
9534
+ if (!C) return [];
9535
+ const O = [C], L = /* @__PURE__ */ new Set([x]);
9534
9536
  for (let k = 0; k < O.length; k++) {
9535
9537
  const F = O[k].id;
9536
9538
  for (const I of $) {
@@ -9543,9 +9545,9 @@ function RA(e, t) {
9543
9545
  }
9544
9546
  return O;
9545
9547
  }, L1 = (x, _ = () => !0) => {
9546
- const M = p(x);
9547
- if (!M) return [];
9548
- const O = [M], L = /* @__PURE__ */ new Set([x]);
9548
+ const C = p(x);
9549
+ if (!C) return [];
9550
+ const O = [C], L = /* @__PURE__ */ new Set([x]);
9549
9551
  for (let k = 0; k < O.length; k++) {
9550
9552
  const F = O[k].id;
9551
9553
  for (const I of $) {
@@ -9557,7 +9559,7 @@ function RA(e, t) {
9557
9559
  }
9558
9560
  }
9559
9561
  return O;
9560
- }, xi = 30, bi = (x) => !("waypoints" in x && x.waypoints) && x.type !== "bpmn:Lane" && x.type !== "label" && typeof x.x == "number", na = (x, _) => kf(n, x, _), ia = (x, _, M = !1) => {
9562
+ }, xi = 30, bi = (x) => !("waypoints" in x && x.waypoints) && x.type !== "bpmn:Lane" && x.type !== "label" && typeof x.x == "number", na = (x, _) => kf(n, x, _), ia = (x, _, C = !1) => {
9561
9563
  const O = new Set(x.flatMap((N) => N.subtree.map((H) => H.id)));
9562
9564
  for (const N of x) {
9563
9565
  const H = (N.pool.children ?? []).filter(bi).filter((ee) => !O.has(ee.id));
@@ -9567,7 +9569,7 @@ function RA(e, t) {
9567
9569
  )
9568
9570
  )) return null;
9569
9571
  }
9570
- const L = x.map((N) => N.pool.width), k = M ? r.filter((N) => Array.isArray(N.waypoints)).map((N) => ({
9572
+ const L = x.map((N) => N.pool.width), k = C ? r.filter((N) => Array.isArray(N.waypoints)).map((N) => ({
9571
9573
  c: N,
9572
9574
  wps: N.waypoints.map((H) => ({ x: H.x, y: H.y }))
9573
9575
  })) : [], F = r.filter((N) => N.type === "label").map((N) => ({
@@ -9605,25 +9607,25 @@ function RA(e, t) {
9605
9607
  };
9606
9608
  }, _p = (x) => {
9607
9609
  var L, k;
9608
- const _ = /* @__PURE__ */ new Map(), M = /* @__PURE__ */ new Map();
9610
+ const _ = /* @__PURE__ */ new Map(), C = /* @__PURE__ */ new Map();
9609
9611
  for (const F of r.getAll()) {
9610
9612
  if (F.type !== "bpmn:Participant") continue;
9611
9613
  const I = F;
9612
- (I.children ?? []).length || (_.set(I.id, I), M.set(I.id, []));
9614
+ (I.children ?? []).length || (_.set(I.id, I), C.set(I.id, []));
9613
9615
  }
9614
9616
  for (const F of r.getAll()) {
9615
9617
  if (F.type !== "bpmn:MessageFlow") continue;
9616
9618
  const I = F, N = (L = I.source) == null ? void 0 : L.id, H = (k = I.target) == null ? void 0 : k.id;
9617
- N && H && M.has(N) && M.get(N).push(H), N && H && M.has(H) && M.get(H).push(N);
9619
+ N && H && C.has(N) && C.get(N).push(H), N && H && C.has(H) && C.get(H).push(N);
9618
9620
  }
9619
9621
  const O = [];
9620
- for (const [F, I] of M)
9622
+ for (const [F, I] of C)
9621
9623
  I.length && I.every((N) => x.has(N)) && O.push(_.get(F));
9622
9624
  return O;
9623
9625
  }, Mg = (x, _) => {
9624
9626
  if (!x.length) return null;
9625
- const M = new Set(x.map((W) => W.id)), O = r.getAll().filter(
9626
- (W) => W.type === "bpmn:Participant" && !M.has(W.id)
9627
+ const C = new Set(x.map((W) => W.id)), O = r.getAll().filter(
9628
+ (W) => W.type === "bpmn:Participant" && !C.has(W.id)
9627
9629
  ), L = Math.min(
9628
9630
  ...O.filter((W) => (W.children ?? []).length > 0).map((W) => W.x)
9629
9631
  ), k = new Set(x.filter((W) => Math.abs(W.x - L) <= 2).map((W) => W.id));
@@ -9652,12 +9654,12 @@ function RA(e, t) {
9652
9654
  if (!ee) break;
9653
9655
  }
9654
9656
  };
9655
- }, Ag = (x, _, M) => {
9656
- const O = M.x + M.width / 2, L = _.y > M.y, k = L ? M.y + M.height : M.y, F = L ? _.y : _.y + _.height, I = x.source === _ ? [{ x: O, y: F }, { x: O, y: k }] : [{ x: O, y: k }, { x: O, y: F }], N = He(r), H = { ...N.edges.find((W) => W.id === x.id), waypoints: I };
9657
+ }, Ag = (x, _, C) => {
9658
+ const O = C.x + C.width / 2, L = _.y > C.y, k = L ? C.y + C.height : C.y, F = L ? _.y : _.y + _.height, I = x.source === _ ? [{ x: O, y: F }, { x: O, y: k }] : [{ x: O, y: k }, { x: O, y: F }], N = He(r), H = { ...N.edges.find((W) => W.id === x.id), waypoints: I };
9657
9659
  return Vt(H, qn(N)).length ? !1 : (n.updateWaypoints(x, I), !0);
9658
9660
  }, I1 = () => {
9659
- const x = r.filter((F) => F.type === "bpmn:Participant"), _ = Math.min(...x.filter((F) => (F.children ?? []).length > 0).map((F) => F.x)), M = (F) => h.some((I) => I.participant.id === F.id), O = (F) => !!F && F.type === "bpmn:Participant" && !(F.children ?? []).length && Math.abs(F.x - _) <= 2 && // B-130 과 같은 판별자 — 폭이 아니라 좌변 관계
9660
- !M(F), L = (F) => !!F && F.type === "bpmn:Participant" && (F.children ?? []).length > 0 && !M(F), k = /* @__PURE__ */ new Set();
9661
+ const x = r.filter((F) => F.type === "bpmn:Participant"), _ = Math.min(...x.filter((F) => (F.children ?? []).length > 0).map((F) => F.x)), C = (F) => h.some((I) => I.participant.id === F.id), O = (F) => !!F && F.type === "bpmn:Participant" && !(F.children ?? []).length && Math.abs(F.x - _) <= 2 && // B-130 과 같은 판별자 — 폭이 아니라 좌변 관계
9662
+ !C(F), L = (F) => !!F && F.type === "bpmn:Participant" && (F.children ?? []).length > 0 && !C(F), k = /* @__PURE__ */ new Set();
9661
9663
  for (const F of r.getAll()) {
9662
9664
  if (F.type !== "bpmn:MessageFlow") continue;
9663
9665
  const I = F;
@@ -9669,12 +9671,12 @@ function RA(e, t) {
9669
9671
  }
9670
9672
  return k;
9671
9673
  }, N1 = (x) => {
9672
- var M;
9674
+ var C;
9673
9675
  const _ = /* @__PURE__ */ new Map();
9674
9676
  for (const O of x) {
9675
9677
  const L = r.get(O);
9676
9678
  if (!L || (L.waypoints ?? []).length === 2) continue;
9677
- const k = ((M = L.source) == null ? void 0 : M.type) === "bpmn:Participant" ? L.source : L.target, F = k === L.source ? L.target : L.source;
9679
+ const k = ((C = L.source) == null ? void 0 : C.type) === "bpmn:Participant" ? L.source : L.target, F = k === L.source ? L.target : L.source;
9678
9680
  if (F.x + F.width / 2 <= k.x + k.width) continue;
9679
9681
  const I = _.get(k.id) ?? { pool: k, msgs: [] };
9680
9682
  I.msgs.push({ conn: L, other: F }), _.set(k.id, I);
@@ -9712,23 +9714,23 @@ function RA(e, t) {
9712
9714
  let x = 0;
9713
9715
  for (const _ of r.getAll()) {
9714
9716
  if (_.type !== "bpmn:DataInputAssociation" && _.type !== "bpmn:DataOutputAssociation") continue;
9715
- const M = _.waypoints ?? [];
9716
- for (let O = 1; O < M.length; O++) x += Math.hypot(M[O].x - M[O - 1].x, M[O].y - M[O - 1].y);
9717
+ const C = _.waypoints ?? [];
9718
+ for (let O = 1; O < C.length; O++) x += Math.hypot(C[O].x - C[O - 1].x, C[O].y - C[O - 1].y);
9717
9719
  }
9718
9720
  return x;
9719
9721
  }, Tg = () => {
9720
9722
  let x = 0;
9721
9723
  for (const _ of r.getAll()) {
9722
9724
  if (_.type !== "bpmn:Association") continue;
9723
- const M = _.waypoints ?? [];
9724
- for (let O = 1; O < M.length; O++) x += Math.hypot(M[O].x - M[O - 1].x, M[O].y - M[O - 1].y);
9725
+ const C = _.waypoints ?? [];
9726
+ for (let O = 1; O < C.length; O++) x += Math.hypot(C[O].x - C[O - 1].x, C[O].y - C[O - 1].y);
9725
9727
  }
9726
9728
  return x;
9727
9729
  }, B1 = (x) => {
9728
9730
  const _ = [];
9729
- for (const M of r.getAll()) {
9730
- if (M.type !== "bpmn:TextAnnotation") continue;
9731
- const O = M;
9731
+ for (const C of r.getAll()) {
9732
+ if (C.type !== "bpmn:TextAnnotation") continue;
9733
+ const O = C;
9732
9734
  if (x.has(O.id)) continue;
9733
9735
  const k = [...O.incoming ?? [], ...O.outgoing ?? []].filter(
9734
9736
  (N) => N.type === "bpmn:Association"
@@ -9744,18 +9746,18 @@ function RA(e, t) {
9744
9746
  return _;
9745
9747
  }, kg = () => pt(He(r)).filter((x) => x.kind === "edge-crosses-shape").length, Og = (x) => {
9746
9748
  const _ = (x.children ?? []).filter(bi);
9747
- let M = 0;
9749
+ let C = 0;
9748
9750
  for (let O = 0; O < _.length; O++)
9749
9751
  for (let L = O + 1; L < _.length; L++) {
9750
9752
  const k = _[O], F = _[L];
9751
- k.x < F.x + F.width && k.x + k.width > F.x && k.y < F.y + F.height && k.y + k.height > F.y && M++;
9753
+ k.x < F.x + F.width && k.x + k.width > F.x && k.y < F.y + F.height && k.y + k.height > F.y && C++;
9752
9754
  }
9753
- return M;
9755
+ return C;
9754
9756
  }, Bo = () => {
9755
- const x = He(r), _ = (M) => M.length >= 2 && (M.every((O) => Math.abs(O.x - M[0].x) < 0.01) || M.every((O) => Math.abs(O.y - M[0].y) < 0.01));
9757
+ const x = He(r), _ = (C) => C.length >= 2 && (C.every((O) => Math.abs(O.x - C[0].x) < 0.01) || C.every((O) => Math.abs(O.y - C[0].y) < 0.01));
9756
9758
  return {
9757
- messages: x.edges.filter((M) => M.type === "bpmn:MessageFlow" && M.waypoints.length === 2).length,
9758
- lines: x.edges.filter((M) => _(M.waypoints)).length
9759
+ messages: x.edges.filter((C) => C.type === "bpmn:MessageFlow" && C.waypoints.length === 2).length,
9760
+ lines: x.edges.filter((C) => _(C.waypoints)).length
9759
9761
  };
9760
9762
  }, Dg = (x) => {
9761
9763
  const _ = /* @__PURE__ */ new Map();
@@ -9772,15 +9774,15 @@ function RA(e, t) {
9772
9774
  const W = _.get(H.id);
9773
9775
  W ? N.x < W.minX && (W.minX = N.x) : _.set(H.id, { pool: H, minX: N.x });
9774
9776
  }
9775
- const M = [];
9777
+ const C = [];
9776
9778
  for (const { pool: O, minX: L } of _.values()) {
9777
9779
  const k = (O.children ?? []).filter(
9778
9780
  (F) => bi(F) && !x.has(F.id) && F.x >= L
9779
9781
  );
9780
- k.length && M.push({ subtree: k, pool: O });
9782
+ k.length && C.push({ subtree: k, pool: O });
9781
9783
  }
9782
- return M;
9783
- }, $1 = (x, _, M) => {
9784
+ return C;
9785
+ }, $1 = (x, _, C) => {
9784
9786
  const O = new Map(
9785
9787
  _.map((F) => [F.pool.id, { subtree: [...F.subtree], pool: F.pool }])
9786
9788
  ), L = new Set(x);
@@ -9789,7 +9791,7 @@ function RA(e, t) {
9789
9791
  for (; ; ) {
9790
9792
  let F = 0;
9791
9793
  for (const I of Dg(L)) {
9792
- if (I.pool === M) continue;
9794
+ if (I.pool === C) continue;
9793
9795
  const N = O.get(I.pool.id);
9794
9796
  N ? N.subtree.push(...I.subtree) : O.set(I.pool.id, { subtree: [...I.subtree], pool: I.pool });
9795
9797
  for (const H of I.subtree) L.add(H.id);
@@ -9800,7 +9802,7 @@ function RA(e, t) {
9800
9802
  }
9801
9803
  return k ? [...O.values()] : null;
9802
9804
  }, F1 = (x, _) => {
9803
- const M = /* @__PURE__ */ new Map();
9805
+ const C = /* @__PURE__ */ new Map();
9804
9806
  for (const L of r.getAll()) {
9805
9807
  if (L.type !== "bpmn:DataInputAssociation" && L.type !== "bpmn:DataOutputAssociation") continue;
9806
9808
  const k = L, F = k.waypoints;
@@ -9811,11 +9813,11 @@ function RA(e, t) {
9811
9813
  if (H === x.has(N.id)) continue;
9812
9814
  const W = H ? N : I, ee = d(W);
9813
9815
  if (!ee || ee === _ || ee === d(H ? I : N)) continue;
9814
- const re = M.get(ee.id);
9815
- re ? W.x < re.minX && (re.minX = W.x) : M.set(ee.id, { pool: ee, minX: W.x });
9816
+ const re = C.get(ee.id);
9817
+ re ? W.x < re.minX && (re.minX = W.x) : C.set(ee.id, { pool: ee, minX: W.x });
9816
9818
  }
9817
9819
  const O = [];
9818
- for (const { pool: L, minX: k } of M.values()) {
9820
+ for (const { pool: L, minX: k } of C.values()) {
9819
9821
  const F = (L.children ?? []).filter(
9820
9822
  (I) => bi(I) && !x.has(I.id) && I.x >= k
9821
9823
  );
@@ -9823,10 +9825,10 @@ function RA(e, t) {
9823
9825
  }
9824
9826
  return O;
9825
9827
  }, Lg = (x) => {
9826
- const _ = He(r), M = _.shapes.filter((L) => x.has(L.id)), O = /* @__PURE__ */ new Set();
9828
+ const _ = He(r), C = _.shapes.filter((L) => x.has(L.id)), O = /* @__PURE__ */ new Set();
9827
9829
  for (const L of _.edges)
9828
9830
  if (!(L.type !== "bpmn:SequenceFlow" && L.type !== "bpmn:MessageFlow"))
9829
- for (const k of Vt(L, M)) O.add(`${L.id}|${k.id}`);
9831
+ for (const k of Vt(L, C)) O.add(`${L.id}|${k.id}`);
9830
9832
  return O;
9831
9833
  }, Ep = /* @__PURE__ */ new Map(), j1 = Gt(e, "sequenceFlow.update").flatMap(
9832
9834
  (x) => {
@@ -9839,10 +9841,10 @@ function RA(e, t) {
9839
9841
  if (x.target === void 0) continue;
9840
9842
  const _ = D.get(x.target);
9841
9843
  if (!_) continue;
9842
- const M = p(x.target), O = p(x.id);
9843
- if (!M || !O) continue;
9844
+ const C = p(x.target), O = p(x.id);
9845
+ if (!C || !O) continue;
9844
9846
  const L = x.source !== void 0 ? p(x.source) : O.source, k = O.target;
9845
- if (!L || !k || k.id === M.id) continue;
9847
+ if (!L || !k || k.id === C.id) continue;
9846
9848
  const F = Rg.get(O.id) ?? { waypoints: O.waypoints, label: O.label }, I = F.waypoints && F.waypoints.length >= 3 && Math.abs(F.waypoints[0].x - F.waypoints[1].x) < 1 && Math.abs(F.waypoints[0].y - F.waypoints[1].y) > 1 ? { x: F.waypoints[0].x, y: F.waypoints[0].y } : void 0, N = I ? F.waypoints[1].y : void 0, H = I && F.label ? { x: F.label.x, y: F.label.y } : void 0, W = H && F.label && Math.abs(H.y + F.label.height / 2 - N) <= ie / 5 && H.x + F.label.width > I.x ? H.x + F.label.width + 6 : void 0, ee = (L.outgoing ?? []).filter(
9847
9849
  (ke) => ke.type === "bpmn:SequenceFlow" && ke.id !== O.id && ke.target && !ts.has(ke.id)
9848
9850
  ), re = new Set(ee.map((ke) => ke.target.id)), ye = (ke) => {
@@ -9852,7 +9854,7 @@ function RA(e, t) {
9852
9854
  );
9853
9855
  }, ae = _r(x.target), ge = new Set(ae.map((ke) => ke.id)), Oe = ei.has(x.target) ? { autoResize: !1 } : void 0, Ee = Math.min(...ae.map((ke) => ke.x)), de = Math.max(...ae.map((ke) => ke.x + ke.width)), he = L.x + L.width, Q = k.x + k.width <= L.x, le = (() => {
9854
9856
  if (!Q) return;
9855
- const ke = d(M), Tt = ((ke == null ? void 0 : ke.children) ?? []).filter(
9857
+ const ke = d(C), Tt = ((ke == null ? void 0 : ke.children) ?? []).filter(
9856
9858
  (Be) => bi(Be) && !ge.has(Be.id) && Be.type !== "bpmn:Group" && Be.type !== "bpmn:Participant"
9857
9859
  ), Rt = ["bpmn:SequenceFlow", "bpmn:MessageFlow", "bpmn:Association", "bpmn:DataInputAssociation", "bpmn:DataOutputAssociation"], on = r.getAll().filter((Be) => {
9858
9860
  if (!Rt.includes(Be.type)) return !1;
@@ -9871,11 +9873,11 @@ function RA(e, t) {
9871
9873
  }), qe = L.x + L.width / 2, wt = L.y + L.height / 2, Ke = F.waypoints ?? [], At = Ke.length >= 2 && Math.abs(Ke[0].y - Ke[1].y) < 1 && Ke[1].x < Ke[0].x;
9872
9874
  return [
9873
9875
  ...N !== void 0 ? [{ cx: qe, cy: N }] : [],
9874
- ...At ? [{ cx: L.x - wr - M.width / 2, cy: Ke[0].y }] : [],
9876
+ ...At ? [{ cx: L.x - wr - C.width / 2, cy: Ke[0].y }] : [],
9875
9877
  { cx: qe, cy: wt + ie },
9876
9878
  { cx: qe, cy: wt - ie }
9877
- ].find((Be) => Le(Be.cx - (M.x + M.width / 2), Be.cy - (M.y + M.height / 2)));
9878
- })(), Me = Q && !le ? he : k.x, Xe = M.y + M.height / 2, St = D1(
9879
+ ].find((Be) => Le(Be.cx - (C.x + C.width / 2), Be.cy - (C.y + C.height / 2)));
9880
+ })(), Me = Q && !le ? he : k.x, Xe = C.y + C.height / 2, St = D1(
9879
9881
  ae,
9880
9882
  he + wr - Ee,
9881
9883
  [0, L.y + L.height / 2 - Xe, k.y + k.height / 2 - Xe],
@@ -9884,14 +9886,14 @@ function RA(e, t) {
9884
9886
  L.y + L.height / 2
9885
9887
  ), nt = he + wr + St, st = (() => {
9886
9888
  if (W === void 0) return 0;
9887
- const ke = he + wr, Tt = L.y + L.height / 2 - M.height / 2, Rt = { x: ke, y: Tt, width: de - Ee, height: M.height }, on = d(L);
9889
+ const ke = he + wr, Tt = L.y + L.height / 2 - C.height / 2, Rt = { x: ke, y: Tt, width: de - Ee, height: C.height }, on = d(L);
9888
9890
  return ((on == null ? void 0 : on.children) ?? []).some(
9889
9891
  (qe) => bi(qe) && !ge.has(qe.id) && qe.id !== L.id && qe.id !== k.id && qe.type !== "bpmn:Group" && qe.type !== "bpmn:Participant" && qe.x < Rt.x + Rt.width && qe.x + qe.width > Rt.x && qe.y < Rt.y + Rt.height && qe.y + qe.height > Rt.y
9890
9892
  ) || ye(Rt) ? Math.max(0, W - ke) : 0;
9891
9893
  })(), De = le ? 0 : de - Ee + wr * 2 + St + st - (Q ? 0 : k.x - he);
9892
9894
  let be = [];
9893
9895
  if (De > 0) {
9894
- const ke = d(M), Tt = (ke == null ? void 0 : ke.children) ?? [], Rt = (Ke) => Ke.type === "bpmn:Lane";
9896
+ const ke = d(C), Tt = (ke == null ? void 0 : ke.children) ?? [], Rt = (Ke) => Ke.type === "bpmn:Lane";
9895
9897
  be = (() => {
9896
9898
  const Ke = /* @__PURE__ */ new Set();
9897
9899
  for (const $e of Tt)
@@ -9982,11 +9984,11 @@ function RA(e, t) {
9982
9984
  const Tt = ke.y + ke.height / 2;
9983
9985
  return Tt >= Se.y && Tt <= Se.y + Se.height;
9984
9986
  }, Te = !ce(L) && ce(k), Ze = (ke) => ke.y + ke.height / 2, tt = () => {
9985
- const ke = L.x + L.width, Tt = k.x, Rt = Ze(k) - M.height / 2, on = Ze(k) + M.height / 2;
9987
+ const ke = L.x + L.width, Tt = k.x, Rt = Ze(k) - C.height / 2, on = Ze(k) + C.height / 2;
9986
9988
  return !r.getAll().some(
9987
- (Le) => bi(Le) && Le.type !== "bpmn:Participant" && Le.type !== "bpmn:Group" && Le.type !== "bpmn:TextAnnotation" && Le.id !== L.id && Le.id !== k.id && Le.id !== M.id && Le.x < Tt && Le.x + Le.width > ke && Le.y < on && Le.y + Le.height > Rt
9989
+ (Le) => bi(Le) && Le.type !== "bpmn:Participant" && Le.type !== "bpmn:Group" && Le.type !== "bpmn:TextAnnotation" && Le.id !== L.id && Le.id !== k.id && Le.id !== C.id && Le.x < Tt && Le.x + Le.width > ke && Le.y < on && Le.y + Le.height > Rt
9988
9990
  );
9989
- }, Ie = !Te && _.band !== void 0 && ce(k) && !xt(_.node.lane, _.node.participant, _.band, Ze(L)) && xt(_.node.lane, _.node.participant, _.band, Ze(k)) && k.x >= L.x + L.width && tt(), rt = Te || Ie ? k : L, dt = rt.y + rt.height / 2, Dt = dt - (M.y + M.height / 2), Xn = _.band !== void 0, bt = Xn ? [M] : ae, Sn = (
9991
+ }, Ie = !Te && _.band !== void 0 && ce(k) && !xt(_.node.lane, _.node.participant, _.band, Ze(L)) && xt(_.node.lane, _.node.participant, _.band, Ze(k)) && k.x >= L.x + L.width && tt(), rt = Te || Ie ? k : L, dt = rt.y + rt.height / 2, Dt = dt - (C.y + C.height / 2), Xn = _.band !== void 0, bt = Xn ? [C] : ae, Sn = (
9990
9992
  // ── B-89. 삽입도 같은 축이다 — band 가 **상류 행의 슬롯**을 가리키면 승계한다 ──
9991
9993
  // 🔁 「add/update 경로 갈림」의 동형이라 `freeSpot` 과 **같은 술어**를 쓴다(한쪽만 넓히면 구멍).
9992
9994
  (_.band === void 0 || xt(_.node.lane, _.node.participant, _.band, dt)) && di(x.target) && bt.every(
@@ -9995,15 +9997,15 @@ function RA(e, t) {
9995
9997
  return qi((Tt = D.get(ke.id)) == null ? void 0 : Tt.node.lane, ke, ke.y + ke.height / 2 + Dt);
9996
9998
  }
9997
9999
  )
9998
- ), Dc = (ke) => Math.abs(ke.y + ke.height / 2 - (M.y + M.height / 2)) <= ie / 2;
10000
+ ), Dc = (ke) => Math.abs(ke.y + ke.height / 2 - (C.y + C.height / 2)) <= ie / 2;
9999
10001
  if (Sn && Xn) {
10000
- const ke = Math.abs(Dt) <= ie / 2 ? ae.filter((Le) => Le.id !== M.id && Dc(Le)) : [], Tt = M.y + M.height / 2, on = _.band !== void 0 && !xt(_.node.lane, _.node.participant, _.band, Tt) ? ae.filter(
10002
+ const ke = Math.abs(Dt) <= ie / 2 ? ae.filter((Le) => Le.id !== C.id && Dc(Le)) : [], Tt = C.y + C.height / 2, on = _.band !== void 0 && !xt(_.node.lane, _.node.participant, _.band, Tt) ? ae.filter(
10001
10003
  (Le) => {
10002
10004
  var qe, wt;
10003
- return Le.id !== M.id && !ke.includes(Le) && ((qe = D.get(Le.id)) == null ? void 0 : qe.band) === _.band && ((wt = D.get(Le.id)) == null ? void 0 : wt.node.lane) === _.node.lane && (Math.abs(Le.y + Le.height / 2 - Tt) <= ie / 2 || xt(_.node.lane, _.node.participant, _.band, Le.y + Le.height / 2));
10005
+ return Le.id !== C.id && !ke.includes(Le) && ((qe = D.get(Le.id)) == null ? void 0 : qe.band) === _.band && ((wt = D.get(Le.id)) == null ? void 0 : wt.node.lane) === _.node.lane && (Math.abs(Le.y + Le.height / 2 - Tt) <= ie / 2 || xt(_.node.lane, _.node.participant, _.band, Le.y + Le.height / 2));
10004
10006
  }
10005
10007
  ).map((Le) => ({ t: Le, dy: dt - (Le.y + Le.height / 2) })).filter(({ dy: Le }) => Le !== 0) : [];
10006
- if (n.moveElements(ae, { x: nt - Ee, y: 0 }, void 0, Oe), n.moveElements([M], { x: 0, y: Dt }, void 0, Oe), ke.length) {
10008
+ if (n.moveElements(ae, { x: nt - Ee, y: 0 }, void 0, Oe), n.moveElements([C], { x: 0, y: Dt }, void 0, Oe), ke.length) {
10007
10009
  const Le = () => new Set(pt(He(r)).map((Be) => ft(Be))), qe = Le(), wt = r.filter((Be) => Be.type === "label").map((Be) => ({
10008
10010
  label: Be,
10009
10011
  x: Be.x,
@@ -10034,22 +10036,22 @@ function RA(e, t) {
10034
10036
  void 0,
10035
10037
  Oe
10036
10038
  );
10037
- const $i = d(M);
10039
+ const $i = d(C);
10038
10040
  if (!Sn && _.node.lane === void 0 && _.band !== void 0 && $i) {
10039
- const ke = $i.y + ve + Ot(`pool:${_.node.participant ?? ""}`, _.band) * ie, Tt = ke - (M.y + M.height / 2);
10040
- Tt !== 0 && !Pe($i, M, M.x + M.width / 2, ke, ge) && n.moveElements([M], { x: 0, y: Tt }, void 0, Oe);
10041
+ const ke = $i.y + ve + Ot(`pool:${_.node.participant ?? ""}`, _.band) * ie, Tt = ke - (C.y + C.height / 2);
10042
+ Tt !== 0 && !Pe($i, C, C.x + C.width / 2, ke, ge) && n.moveElements([C], { x: 0, y: Tt }, void 0, Oe);
10041
10043
  }
10042
10044
  if (le)
10043
10045
  n.moveElements(
10044
10046
  ae,
10045
- { x: le.cx - (M.x + M.width / 2), y: le.cy - (M.y + M.height / 2) },
10047
+ { x: le.cx - (C.x + C.width / 2), y: le.cy - (C.y + C.height / 2) },
10046
10048
  void 0,
10047
10049
  Oe
10048
10050
  );
10049
10051
  else if ($i) {
10050
10052
  const ke = ($i.children ?? []).filter(
10051
10053
  (Le) => bi(Le) && !ge.has(Le.id) && Le.type !== "bpmn:Group" && Le.type !== "bpmn:Participant"
10052
- ), Tt = (Le, qe, wt, Ke, At) => Le.x + qe < At.x + At.width + Ke && Le.x + qe + Le.width + Ke > At.x && Le.y + wt < At.y + At.height + Ke && Le.y + wt + Le.height + Ke > At.y, Rt = ke.find((Le) => Tt(M, 0, 0, 0, Le)), on = Rt ? void 0 : ye(M);
10054
+ ), Tt = (Le, qe, wt, Ke, At) => Le.x + qe < At.x + At.width + Ke && Le.x + qe + Le.width + Ke > At.x && Le.y + wt < At.y + At.height + Ke && Le.y + wt + Le.height + Ke > At.y, Rt = ke.find((Le) => Tt(C, 0, 0, 0, Le)), on = Rt ? void 0 : ye(C);
10053
10055
  if (Rt || on) {
10054
10056
  const Le = ["bpmn:SequenceFlow", "bpmn:MessageFlow", "bpmn:Association", "bpmn:DataInputAssociation", "bpmn:DataOutputAssociation"], qe = r.getAll().filter((vt) => {
10055
10057
  if (!Le.includes(vt.type)) return !1;
@@ -10065,9 +10067,9 @@ function RA(e, t) {
10065
10067
  if (ca(ti.waypoints[Xi], ti.waypoints[Xi + 1], Pr) < vi) return !1;
10066
10068
  return !0;
10067
10069
  })
10068
- ), At = M.y + M.height / 2, $e = [N, k.y + k.height / 2].filter(
10070
+ ), At = C.y + C.height / 2, $e = [N, k.y + k.height / 2].filter(
10069
10071
  (vt) => vt !== void 0 && Math.abs(vt - At) >= 1
10070
- ), Be = Rt && re.has(Rt.id) ? Rt : on == null ? void 0 : on.target, $t = Be ? Be.x - M.x : 0, kt = Math.max(...ae.map((vt) => vt.x + vt.width)), _t = [...$t !== 0 ? [$t] : [], ...St !== 0 ? [-St] : [], 0], Mr = W === void 0 ? [] : _t.map((vt) => Math.max(vt, W - M.x)), Wn = (vt) => kt + vt + wr <= k.x, Ki = [.../* @__PURE__ */ new Set([...Mr, ..._t])].filter(Wn), aa = Rt && re.has(Rt.id) ? [Rt.x + Rt.width + wr - M.x] : [], Ar = W === void 0 ? [] : aa.map((vt) => Math.max(vt, W - M.x)), Tp = [.../* @__PURE__ */ new Set([...Ar, ...aa])].filter((vt) => Wn(vt) && !Ki.includes(vt));
10072
+ ), Be = Rt && re.has(Rt.id) ? Rt : on == null ? void 0 : on.target, $t = Be ? Be.x - C.x : 0, kt = Math.max(...ae.map((vt) => vt.x + vt.width)), _t = [...$t !== 0 ? [$t] : [], ...St !== 0 ? [-St] : [], 0], Mr = W === void 0 ? [] : _t.map((vt) => Math.max(vt, W - C.x)), Wn = (vt) => kt + vt + wr <= k.x, Ki = [.../* @__PURE__ */ new Set([...Mr, ..._t])].filter(Wn), aa = Rt && re.has(Rt.id) ? [Rt.x + Rt.width + wr - C.x] : [], Ar = W === void 0 ? [] : aa.map((vt) => Math.max(vt, W - C.x)), Tp = [.../* @__PURE__ */ new Set([...Ar, ...aa])].filter((vt) => Wn(vt) && !Ki.includes(vt));
10071
10073
  let Fi;
10072
10074
  for (const vt of [Ki, Tp]) {
10073
10075
  for (const xn of $e) {
@@ -10152,15 +10154,15 @@ function RA(e, t) {
10152
10154
  }
10153
10155
  }
10154
10156
  for (const [x, _] of ei) {
10155
- const M = p(x);
10156
- if (!M) continue;
10157
- const O = _.container, L = Math.abs(M.y + M.height / 2 - O.y - _.relCy) >= 0.5, k = M.label, F = Math.min(M.y, k && !k.hidden ? k.y : M.y), I = Math.max(M.y + M.height, k && !k.hidden ? k.y + k.height : 0);
10157
+ const C = p(x);
10158
+ if (!C) continue;
10159
+ const O = _.container, L = Math.abs(C.y + C.height / 2 - O.y - _.relCy) >= 0.5, k = C.label, F = Math.min(C.y, k && !k.hidden ? k.y : C.y), I = Math.max(C.y + C.height, k && !k.hidden ? k.y + k.height : 0);
10158
10160
  if (L && F >= O.y && I <= O.y + O.height) continue;
10159
- const N = M.y;
10160
- _.grow(), M.y !== N && n.moveElements([M], { x: 0, y: N - M.y }, void 0, { autoResize: !1 });
10161
+ const N = C.y;
10162
+ _.grow(), C.y !== N && n.moveElements([C], { x: 0, y: N - C.y }, void 0, { autoResize: !1 });
10161
10163
  }
10162
10164
  const Ig = (x, _) => {
10163
- const M = _.target === x, O = f(_.source), L = f(_.target), k = M ? "bpmn:DataOutputAssociation" : "bpmn:DataInputAssociation";
10165
+ const C = _.target === x, O = f(_.source), L = f(_.target), k = C ? "bpmn:DataOutputAssociation" : "bpmn:DataInputAssociation";
10164
10166
  n.connect(
10165
10167
  O,
10166
10168
  L,
@@ -10169,8 +10171,8 @@ function RA(e, t) {
10169
10171
  }, Ng = (x) => {
10170
10172
  for (const _ of h) {
10171
10173
  if (!_.participant.blackBox) continue;
10172
- const M = p(_.participant.id);
10173
- if (!M) continue;
10174
+ const C = p(_.participant.id);
10175
+ if (!C) continue;
10174
10176
  const O = [];
10175
10177
  for (const k of y) {
10176
10178
  const F = k.flow.source === _.participant.id ? k.flow.target : k.flow.target === _.participant.id ? k.flow.source : void 0, I = F ? p(F) : void 0;
@@ -10196,7 +10198,7 @@ function RA(e, t) {
10196
10198
  (H) => I ? H.y + H.height <= k.y + 5 : H.y >= k.y + k.height - 5
10197
10199
  );
10198
10200
  if (N.length) {
10199
- const H = [...N.reduce((Q, le) => Q.set(le.y, (Q.get(le.y) ?? 0) + 1), /* @__PURE__ */ new Map())].sort((Q, le) => le[1] - Q[1] || (I ? le[0] - Q[0] : Q[0] - le[0]))[0][0], W = Math.min(M.width, wA), ee = _A, re = O.map((Q) => Q.x + Q.width / 2), ye = Math.round(F(re) - W / 2), ae = Math.max(...re) + $p, ge = (Q) => ({ x: Q, width: Math.max(W, ae - Q) }), Oe = N.filter((Q) => Math.min(Q.y + Q.height, H + ee) - Math.max(Q.y, H) > 0), Ee = (Q) => {
10201
+ const H = [...N.reduce((Q, le) => Q.set(le.y, (Q.get(le.y) ?? 0) + 1), /* @__PURE__ */ new Map())].sort((Q, le) => le[1] - Q[1] || (I ? le[0] - Q[0] : Q[0] - le[0]))[0][0], W = Math.min(C.width, wA), ee = _A, re = O.map((Q) => Q.x + Q.width / 2), ye = Math.round(F(re) - W / 2), ae = Math.max(...re) + $p, ge = (Q) => ({ x: Q, width: Math.max(W, ae - Q) }), Oe = N.filter((Q) => Math.min(Q.y + Q.height, H + ee) - Math.max(Q.y, H) > 0), Ee = (Q) => {
10200
10202
  const le = ge(Q);
10201
10203
  return Oe.some((Me) => Me.x < le.x + le.width && le.x < Me.x + Me.width);
10202
10204
  }, de = (Q) => {
@@ -10207,22 +10209,22 @@ function RA(e, t) {
10207
10209
  const Q = de(ye);
10208
10210
  return Oe.flatMap((le) => [le.x + le.width + Qm, le.x - Qm - W]).map((le) => Math.round(le)).filter((le) => !Ee(le) && de(le) >= Q).sort((le, Me) => Math.abs(le - ye) - Math.abs(Me - ye))[0] ?? ye;
10209
10211
  })();
10210
- if (he !== M.x || H !== M.y || W !== M.width || ee !== M.height) {
10211
- const Q = () => new Set(pt(He(r)).map((st) => ft(st))), le = Q(), Me = { x: M.x, y: M.y, width: M.width, height: M.height };
10212
- n.resizeShape(M, { x: he, y: H, width: W, height: ee });
10212
+ if (he !== C.x || H !== C.y || W !== C.width || ee !== C.height) {
10213
+ const Q = () => new Set(pt(He(r)).map((st) => ft(st))), le = Q(), Me = { x: C.x, y: C.y, width: C.width, height: C.height };
10214
+ n.resizeShape(C, { x: he, y: H, width: W, height: ee });
10213
10215
  const Xe = Q(), St = [...Xe].filter((st) => !le.has(st)).length, nt = [...le].filter((st) => !Xe.has(st)).length;
10214
- St > nt && n.resizeShape(M, Me);
10216
+ St > nt && n.resizeShape(C, Me);
10215
10217
  }
10216
10218
  }
10217
10219
  }
10218
10220
  }
10219
10221
  const L = Math.max(...O.map((k) => k.x + k.width / 2)) + $p;
10220
- if (L > M.x + M.width && n.resizeShape(M, { x: M.x, y: M.y, width: L - M.x, height: M.height }), !!x)
10222
+ if (L > C.x + C.width && n.resizeShape(C, { x: C.x, y: C.y, width: L - C.x, height: C.height }), !!x)
10221
10223
  for (const k of y) {
10222
10224
  const F = p(k.flow.id), I = k.flow.source === _.participant.id ? k.flow.target : k.flow.target === _.participant.id ? k.flow.source : void 0, N = I ? p(I) : void 0;
10223
10225
  if (!F || !N || N.type === "bpmn:Participant") continue;
10224
10226
  const H = N.x + N.width / 2;
10225
- H < M.x + 10 || H > M.x + M.width - 10 || Ag(F, M, N);
10227
+ H < C.x + 10 || H > C.x + C.width - 10 || Ag(F, C, N);
10226
10228
  }
10227
10229
  }
10228
10230
  };
@@ -10235,7 +10237,7 @@ function RA(e, t) {
10235
10237
  });
10236
10238
  }
10237
10239
  {
10238
- const M = new Set(
10240
+ const C = new Set(
10239
10241
  [...$.map((N) => N.flow.id), ...y.map((N) => N.flow.id)].filter(
10240
10242
  (N) => !!N
10241
10243
  )
@@ -10260,7 +10262,7 @@ function RA(e, t) {
10260
10262
  return !!he && typeof he.x == "number" && he.x + he.width / 2 > W.x + W.width / 2;
10261
10263
  };
10262
10264
  if (![...H.values()].some(
10263
- (de) => de.length >= 3 && de.some((he) => he.dir === "out") && de.some((he) => he.dir === "in" && M.has(he.id) && ee(he))
10265
+ (de) => de.length >= 3 && de.some((he) => he.dir === "out") && de.some((he) => he.dir === "in" && C.has(he.id) && ee(he))
10264
10266
  )) continue;
10265
10267
  const ye = d(W);
10266
10268
  if (!ye || I.has(ye.id) || (ye.children ?? []).some((de) => de.type === "bpmn:Lane")) continue;
@@ -10293,16 +10295,16 @@ function RA(e, t) {
10293
10295
  straight: x.edges.filter((_) => _.type === "bpmn:MessageFlow" && _.waypoints.length === 2).length
10294
10296
  };
10295
10297
  }, oa = (x) => {
10296
- const _ = He(r), M = _.edges.find((O) => O.id === x);
10297
- return M ? Vt(M, qn(_)).length : 0;
10298
+ const _ = He(r), C = _.edges.find((O) => O.id === x);
10299
+ return C ? Vt(C, qn(_)).length : 0;
10298
10300
  }, Ac = (x) => oa(x) > 0, Pc = (x) => He(r).edges.filter(
10299
10301
  (_) => _.type === "bpmn:MessageFlow" && _.id !== x && _.waypoints.length === 2
10300
- ).length, $g = (x, _, M) => ia([{ subtree: x, pool: _ }], M), Fg = (x, _) => _.bad > x.bad || _.crossings > x.crossings && _.straight <= x.straight && _.bad >= x.bad, ra = (x, _) => Fg(x, _) || _.straight < x.straight, Sr = (x, _, M = () => !0, O = Fg, L = !1) => {
10302
+ ).length, $g = (x, _, C) => ia([{ subtree: x, pool: _ }], C), Fg = (x, _) => _.bad > x.bad || _.crossings > x.crossings && _.straight <= x.straight && _.bad >= x.bad, ra = (x, _) => Fg(x, _) || _.straight < x.straight, Sr = (x, _, C = () => !0, O = Fg, L = !1) => {
10301
10303
  const k = Er(), F = ia(x, _, L);
10302
10304
  if (!F) return !1;
10303
10305
  const I = Er();
10304
- return O(k, I) || !M() ? (F(), !1) : !0;
10305
- }, V1 = (x, _, M, O = () => !0) => Sr([{ subtree: x, pool: _ }], M, O), Rr = (x) => {
10306
+ return O(k, I) || !C() ? (F(), !1) : !0;
10307
+ }, V1 = (x, _, C, O = () => !0) => Sr([{ subtree: x, pool: _ }], C, O), Rr = (x) => {
10306
10308
  var _;
10307
10309
  return !!((_ = D.get(x)) != null && _.node.participant);
10308
10310
  }, ns = /* @__PURE__ */ new Map();
@@ -10314,8 +10316,8 @@ function RA(e, t) {
10314
10316
  const Tc = [...ns.keys()], Rp = new Set($.map((x) => x.flow.target)), jg = (x) => br.findIndex(({ op: _ }) => _.participant.id === x);
10315
10317
  Tc.sort((x, _) => {
10316
10318
  var L, k;
10317
- const M = Rp.has(x) ? 1 : 0, O = Rp.has(_) ? 1 : 0;
10318
- return M !== O ? M - O : jg((L = D.get(x)) == null ? void 0 : L.node.participant) - jg((k = D.get(_)) == null ? void 0 : k.node.participant);
10319
+ const C = Rp.has(x) ? 1 : 0, O = Rp.has(_) ? 1 : 0;
10320
+ return C !== O ? C - O : jg((L = D.get(x)) == null ? void 0 : L.node.participant) - jg((k = D.get(_)) == null ? void 0 : k.node.participant);
10319
10321
  });
10320
10322
  const $o = (x) => x.x + x.width / 2, W1 = (x) => {
10321
10323
  const _ = /* @__PURE__ */ new Map();
@@ -10324,17 +10326,17 @@ function RA(e, t) {
10324
10326
  if (!k.waypoints || !k.source || !k.target) continue;
10325
10327
  (_.get(k.source.id) ?? _.set(k.source.id, []).get(k.source.id)).push(k.target.id);
10326
10328
  }
10327
- const M = /* @__PURE__ */ new Set([x]), O = [x];
10329
+ const C = /* @__PURE__ */ new Set([x]), O = [x];
10328
10330
  for (let L = 0; L < O.length; L++)
10329
10331
  for (const k of _.get(O[L]) ?? [])
10330
- M.has(k) || (M.add(k), O.push(k));
10331
- return M;
10332
+ C.has(k) || (C.add(k), O.push(k));
10333
+ return C;
10332
10334
  }, U1 = (x, _) => {
10333
- const M = W1(_);
10335
+ const C = W1(_);
10334
10336
  let O;
10335
10337
  for (const L of r.getAll()) {
10336
10338
  const k = L;
10337
- if (k.type !== "bpmn:MessageFlow" || !k.source || !k.target || k.target.id !== x || M.has(k.source.id)) continue;
10339
+ if (k.type !== "bpmn:MessageFlow" || !k.source || !k.target || k.target.id !== x || C.has(k.source.id)) continue;
10338
10340
  const F = k.source;
10339
10341
  if (typeof F.x != "number" || F.type === "bpmn:Participant") continue;
10340
10342
  const I = $o(F);
@@ -10342,28 +10344,28 @@ function RA(e, t) {
10342
10344
  }
10343
10345
  return O;
10344
10346
  }, Cp = (x, _) => {
10345
- const M = p(x.flow.source);
10346
- if (M)
10347
- return M.type === "bpmn:Participant" ? U1(M.id, _) : $o(M);
10347
+ const C = p(x.flow.source);
10348
+ if (C)
10349
+ return C.type === "bpmn:Participant" ? U1(C.id, _) : $o(C);
10348
10350
  }, Hg = (x) => {
10349
10351
  let _;
10350
- for (const M of ns.get(x) ?? []) {
10351
- const O = Cp(M, x);
10352
- O !== void 0 && (!_ || O > _.cx) && (_ = { op: M, cx: O });
10352
+ for (const C of ns.get(x) ?? []) {
10353
+ const O = Cp(C, x);
10354
+ O !== void 0 && (!_ || O > _.cx) && (_ = { op: C, cx: O });
10353
10355
  }
10354
10356
  return _ == null ? void 0 : _.op;
10355
10357
  }, q1 = (x) => {
10356
- const _ = Hg(x), M = p(x), O = _ ? Cp(_, x) : void 0;
10357
- return M && O !== void 0 ? O - $o(M) : void 0;
10358
+ const _ = Hg(x), C = p(x), O = _ ? Cp(_, x) : void 0;
10359
+ return C && O !== void 0 ? O - $o(C) : void 0;
10358
10360
  }, Y1 = (x) => {
10359
10361
  const _ = q1(x);
10360
10362
  return _ !== void 0 && Math.abs(_) < Sp;
10361
- }, kc = (x, _, M, O, L) => {
10363
+ }, kc = (x, _, C, O, L) => {
10362
10364
  var k;
10363
10365
  for (let F = !0; F; ) {
10364
10366
  F = !1;
10365
10367
  for (const I of y) {
10366
- if (I.flow.id === M) continue;
10368
+ if (I.flow.id === C) continue;
10367
10369
  const N = _.has(I.flow.source), H = _.has(I.flow.target);
10368
10370
  if (N === H || O(N ? I.flow.source : I.flow.target)) continue;
10369
10371
  const W = N ? I.flow.target : I.flow.source;
@@ -10380,20 +10382,20 @@ function RA(e, t) {
10380
10382
  }
10381
10383
  }
10382
10384
  return [...x].map(([F, I]) => ({ subtree: I, pool: f(F) }));
10383
- }, zg = (x, _, M, O, L) => kc(
10385
+ }, zg = (x, _, C, O, L) => kc(
10384
10386
  /* @__PURE__ */ new Map([[_, [...x]]]),
10385
10387
  new Set(x.map((k) => k.id)),
10386
10388
  O,
10387
- (k) => k === M,
10389
+ (k) => k === C,
10388
10390
  (k) => k === L
10389
10391
  ), Mp = (x) => {
10390
10392
  const _ = Hg(x);
10391
10393
  if (!_) return null;
10392
- const M = p(x), O = p(_.flow.source), L = Cp(_, x);
10393
- if (!M || !O || L === void 0) return null;
10394
- const k = L - $o(M);
10394
+ const C = p(x), O = p(_.flow.source), L = Cp(_, x);
10395
+ if (!C || !O || L === void 0) return null;
10396
+ const k = L - $o(C);
10395
10397
  if (k >= Sp) {
10396
- const F = D.get(x).node.participant, I = _r(x, (N) => N.x >= M.x);
10398
+ const F = D.get(x).node.participant, I = _r(x, (N) => N.x >= C.x);
10397
10399
  return { groups: zg(I, F, x, _.flow.id, _.flow.source), dx: k };
10398
10400
  }
10399
10401
  if (-k >= Sp && Rr(_.flow.source)) {
@@ -10402,19 +10404,19 @@ function RA(e, t) {
10402
10404
  }
10403
10405
  return null;
10404
10406
  }, Gg = () => Tc.map((x) => ({ id: x, plan: Mp(x) })).filter((x) => !!x.plan).sort(
10405
- (x, _) => Math.min(...x.plan.groups.flatMap((M) => M.subtree.map((O) => O.x))) - Math.min(..._.plan.groups.flatMap((M) => M.subtree.map((O) => O.x)))
10407
+ (x, _) => Math.min(...x.plan.groups.flatMap((C) => C.subtree.map((O) => O.x))) - Math.min(..._.plan.groups.flatMap((C) => C.subtree.map((O) => O.x)))
10406
10408
  ).map((x) => x.id);
10407
10409
  for (let x = 0; x < 3; x++) {
10408
- const _ = Er(), M = [];
10410
+ const _ = Er(), C = [];
10409
10411
  for (const L of Gg()) {
10410
10412
  const k = Mp(L);
10411
10413
  if (!k) continue;
10412
10414
  const F = ia(k.groups, k.dx);
10413
- F && M.push(F);
10415
+ F && C.push(F);
10414
10416
  }
10415
- if (!M.length) break;
10417
+ if (!C.length) break;
10416
10418
  if (!ra(_, Er())) continue;
10417
- for (const L of M.reverse()) L();
10419
+ for (const L of C.reverse()) L();
10418
10420
  let O = !1;
10419
10421
  for (const L of Gg()) {
10420
10422
  const k = Mp(L);
@@ -10426,33 +10428,33 @@ function RA(e, t) {
10426
10428
  if (Rp.has(x)) continue;
10427
10429
  const _ = D.get(x);
10428
10430
  if (!_ || _.node.lane !== void 0) continue;
10429
- const M = K(_);
10430
- if (M === void 0) continue;
10431
+ const C = K(_);
10432
+ if (C === void 0) continue;
10431
10433
  const O = p(x), L = O ? d(O) : void 0;
10432
10434
  if (!O || !L) continue;
10433
- const k = L.y + ve + Ot(`pool:${_.node.participant ?? ""}`, M) * ie, F = k - (O.y + O.height / 2);
10435
+ const k = L.y + ve + Ot(`pool:${_.node.participant ?? ""}`, C) * ie, F = k - (O.y + O.height / 2);
10434
10436
  F !== 0 && !Pe(L, O, O.x + O.width / 2, k) && n.moveElements([O], { x: 0, y: F });
10435
10437
  }
10436
10438
  const Vg = () => {
10437
10439
  const x = r.filter((O) => O.type === "bpmn:Participant"), _ = new Map(x.map((O) => [O.id, O]));
10438
- let M = 0;
10440
+ let C = 0;
10439
10441
  for (const { pools: [O, L] } of gw(x)) {
10440
10442
  const k = _.get(O), F = _.get(L);
10441
- M += (Math.min(k.x + k.width, F.x + F.width) - Math.max(k.x, F.x)) * (Math.min(k.y + k.height, F.y + F.height) - Math.max(k.y, F.y));
10443
+ C += (Math.min(k.x + k.width, F.x + F.width) - Math.max(k.x, F.x)) * (Math.min(k.y + k.height, F.y + F.height) - Math.max(k.y, F.y));
10442
10444
  }
10443
- return M;
10445
+ return C;
10444
10446
  }, Wg = /* @__PURE__ */ new Set();
10445
10447
  for (let x = 0, _ = !0; _ && x < H1; x++) {
10446
10448
  _ = !1;
10447
- for (const M of Tc.flatMap((O) => ns.get(O) ?? [])) {
10448
- if (Wg.has(M.flow.id) || !Ac(M.flow.id)) continue;
10449
- const O = p(M.flow.target);
10449
+ for (const C of Tc.flatMap((O) => ns.get(O) ?? [])) {
10450
+ if (Wg.has(C.flow.id) || !Ac(C.flow.id)) continue;
10451
+ const O = p(C.flow.target);
10450
10452
  if (!O) continue;
10451
- const L = f(D.get(M.flow.target).node.participant), k = _r(M.flow.target, (W) => W.x >= O.x), F = O.width + se, I = oa(M.flow.id), N = Pc(M.flow.id), H = Vg();
10453
+ const L = f(D.get(C.flow.target).node.participant), k = _r(C.flow.target, (W) => W.x >= O.x), F = O.width + se, I = oa(C.flow.id), N = Pc(C.flow.id), H = Vg();
10452
10454
  for (let W = 1; W <= Bg; W++) {
10453
- const ee = () => oa(M.flow.id) < I && Pc(M.flow.id) >= N && Vg() <= H;
10455
+ const ee = () => oa(C.flow.id) < I && Pc(C.flow.id) >= N && Vg() <= H;
10454
10456
  if (V1(k, L, F * W, ee)) {
10455
- Wg.add(M.flow.id), _ = !0;
10457
+ Wg.add(C.flow.id), _ = !0;
10456
10458
  break;
10457
10459
  }
10458
10460
  }
@@ -10463,18 +10465,18 @@ function RA(e, t) {
10463
10465
  Ug.has(x.id) || !x.source || !x.target || x.source.type === "bpmn:Participant" != (x.target.type === "bpmn:Participant") && Ap.push({ id: x.id, source: x.source.id, target: x.target.id, preexisting: !0 });
10464
10466
  for (const x of Ap) {
10465
10467
  if (!Ac(x.id)) continue;
10466
- const _ = p(x.source), M = p(x.target);
10467
- if (!_ || !M) continue;
10468
+ const _ = p(x.source), C = p(x.target);
10469
+ if (!_ || !C) continue;
10468
10470
  let O, L, k;
10469
10471
  if (x.preexisting) {
10470
- const [I, N] = _.type === "bpmn:Participant" ? [M, _] : [_, M];
10472
+ const [I, N] = _.type === "bpmn:Participant" ? [C, _] : [_, C];
10471
10473
  if (O = $o(I), O < N.x || O > N.x + N.width) continue;
10472
10474
  [L, k] = I.y < N.y ? [I.y + I.height, N.y] : [N.y + N.height, I.y];
10473
10475
  } else {
10474
- if (_.type === "bpmn:Participant" || M.type === "bpmn:Participant" || (O = _.x + _.width / 2, Math.abs(O - (M.x + M.width / 2)) > 15)) continue;
10475
- [L, k] = _.y < M.y ? [_.y + _.height, M.y] : [M.y + M.height, _.y];
10476
+ if (_.type === "bpmn:Participant" || C.type === "bpmn:Participant" || (O = _.x + _.width / 2, Math.abs(O - (C.x + C.width / 2)) > 15)) continue;
10477
+ [L, k] = _.y < C.y ? [_.y + _.height, C.y] : [C.y + C.height, _.y];
10476
10478
  }
10477
- const F = [...D.values()].map((I) => p(I.node.id)).filter((I) => !!I && I.id !== _.id && I.id !== M.id).filter((I) => I.x <= O && O <= I.x + I.width && I.y + I.height > L && I.y < k).sort((I, N) => I.x - N.x);
10479
+ const F = [...D.values()].map((I) => p(I.node.id)).filter((I) => !!I && I.id !== _.id && I.id !== C.id).filter((I) => I.x <= O && O <= I.x + I.width && I.y + I.height > L && I.y < k).sort((I, N) => I.x - N.x);
10478
10480
  for (const I of F) {
10479
10481
  const N = (om = D.get(I.id)) == null ? void 0 : om.node.participant, H = N ? p(N) : void 0;
10480
10482
  if (!N || !H) continue;
@@ -10490,7 +10492,7 @@ function RA(e, t) {
10490
10492
  new Set(he.map((Q) => Q.id)),
10491
10493
  x.id,
10492
10494
  () => !1,
10493
- (Q) => Q === _.id || Q === M.id
10495
+ (Q) => Q === _.id || Q === C.id
10494
10496
  )
10495
10497
  );
10496
10498
  }
@@ -10510,16 +10512,16 @@ function RA(e, t) {
10510
10512
  const Oc = () => {
10511
10513
  var _;
10512
10514
  const x = /* @__PURE__ */ new Set();
10513
- for (const M of pt(He(r)))
10514
- M.kind !== "edge-crosses-shape" || Ug.has(M.edge) || ((_ = p(M.edge)) == null ? void 0 : _.type) === "bpmn:MessageFlow" && x.add(`${M.edge}>${M.shape}`);
10515
+ for (const C of pt(He(r)))
10516
+ C.kind !== "edge-crosses-shape" || Ug.has(C.edge) || ((_ = p(C.edge)) == null ? void 0 : _.type) === "bpmn:MessageFlow" && x.add(`${C.edge}>${C.shape}`);
10515
10517
  return x;
10516
- }, K1 = (x, _) => Er().bad >= x && [...Oc()].some((M) => !_.has(M)), qg = (x) => {
10517
- var _, M;
10518
- return oa(x) === 0 && ((M = (_ = p(x)) == null ? void 0 : _.waypoints) == null ? void 0 : M.length) === 2;
10519
- }, X1 = (x, _, M) => {
10520
- const O = new Set(x.flatMap((k) => k.subtree.map((F) => F.id))), L = [...Oc()].filter((k) => !M.has(k)).map((k) => k.split(">")[1]);
10518
+ }, K1 = (x, _) => Er().bad >= x && [...Oc()].some((C) => !_.has(C)), qg = (x) => {
10519
+ var _, C;
10520
+ return oa(x) === 0 && ((C = (_ = p(x)) == null ? void 0 : _.waypoints) == null ? void 0 : C.length) === 2;
10521
+ }, X1 = (x, _, C) => {
10522
+ const O = new Set(x.flatMap((k) => k.subtree.map((F) => F.id))), L = [...Oc()].filter((k) => !C.has(k)).map((k) => k.split(">")[1]);
10521
10523
  return [...new Set(L)].filter((k) => O.has(k) && k !== _.source && k !== _.target);
10522
- }, Z1 = (x, _, M, O, L) => {
10524
+ }, Z1 = (x, _, C, O, L) => {
10523
10525
  const k = x.map((H) => ({ ...H, subtree: H.subtree.filter((W) => !L.includes(W.id)) })).filter((H) => H.subtree.length), F = new Set(k.flatMap((H) => H.subtree.map((W) => W.id))), I = () => L.every((H) => {
10524
10526
  const W = p(H);
10525
10527
  return !!W && $.filter((ee) => ee.flow.target === H && F.has(ee.flow.source)).every((ee) => {
@@ -10527,23 +10529,23 @@ function RA(e, t) {
10527
10529
  return !!re && re.x + re.width <= W.x;
10528
10530
  });
10529
10531
  });
10530
- return Sr(k, _, () => qg(M.id) && [...Oc()].every((H) => O.has(H)) && I(), ra, !0);
10532
+ return Sr(k, _, () => qg(C.id) && [...Oc()].every((H) => O.has(H)) && I(), ra, !0);
10531
10533
  };
10532
10534
  for (const x of y) {
10533
10535
  if (!Ac(x.flow.id)) continue;
10534
10536
  const _ = p(x.flow.id);
10535
10537
  if (((rm = _ == null ? void 0 : _.waypoints) == null ? void 0 : rm.length) !== 2) continue;
10536
- const M = p(x.flow.source), O = p(x.flow.target);
10537
- if (!M || !O || M.type === "bpmn:Participant" || O.type === "bpmn:Participant" || !Rr(x.flow.source) || !Rr(x.flow.target) || Math.abs($o(M) - $o(O)) > z1) continue;
10538
- const L = $o(M), k = _.waypoints.map((ge) => ge.y), [F, I] = [Math.min(...k), Math.max(...k)], N = qn(He(r)).filter(
10539
- (ge) => ge.id !== M.id && ge.id !== O.id && ge.x < L && L < ge.x + ge.width && F < ge.y + ge.height && ge.y < I
10538
+ const C = p(x.flow.source), O = p(x.flow.target);
10539
+ if (!C || !O || C.type === "bpmn:Participant" || O.type === "bpmn:Participant" || !Rr(x.flow.source) || !Rr(x.flow.target) || Math.abs($o(C) - $o(O)) > z1) continue;
10540
+ const L = $o(C), k = _.waypoints.map((ge) => ge.y), [F, I] = [Math.min(...k), Math.max(...k)], N = qn(He(r)).filter(
10541
+ (ge) => ge.id !== C.id && ge.id !== O.id && ge.x < L && L < ge.x + ge.width && F < ge.y + ge.height && ge.y < I
10540
10542
  );
10541
10543
  if (!N.length) continue;
10542
10544
  const H = (am = D.get(x.flow.source)) == null ? void 0 : am.node.participant, W = (sm = D.get(x.flow.target)) == null ? void 0 : sm.node.participant;
10543
10545
  if (!H || !W) continue;
10544
10546
  const ee = /* @__PURE__ */ new Map();
10545
10547
  for (const [ge, Oe, Ee] of [
10546
- [x.flow.source, M, H],
10548
+ [x.flow.source, C, H],
10547
10549
  [x.flow.target, O, W]
10548
10550
  ]) {
10549
10551
  const de = ee.get(Ee) ?? [], he = _r(ge, (Q) => Q.x >= Oe.x).filter((Q) => !de.some((le) => le.id === Q.id));
@@ -10568,7 +10570,7 @@ function RA(e, t) {
10568
10570
  }
10569
10571
  }
10570
10572
  {
10571
- const x = (k) => k.y + k.height / 2, _ = /(Task|Event|Gateway|CallActivity|SubProcess)$/, M = () => {
10573
+ const x = (k) => k.y + k.height / 2, _ = /(Task|Event|Gateway|CallActivity|SubProcess)$/, C = () => {
10572
10574
  const k = He(r), F = new Set(
10573
10575
  pt(k).flatMap((H) => H.kind === "edge-crosses-shape" ? [`${H.edge}|${H.shape}`] : [])
10574
10576
  ), I = k.shapes.filter((H) => !H.container && _.test(H.type)), N = /* @__PURE__ */ new Set();
@@ -10588,7 +10590,7 @@ function RA(e, t) {
10588
10590
  }
10589
10591
  }
10590
10592
  return N;
10591
- }, O = () => ({ ...Er(), grazes: M() }), L = [];
10593
+ }, O = () => ({ ...Er(), grazes: C() }), L = [];
10592
10594
  for (const k of D.keys()) {
10593
10595
  if (!Rr(k)) continue;
10594
10596
  const F = $.filter((H) => H.flow.target === k);
@@ -10629,11 +10631,11 @@ function RA(e, t) {
10629
10631
  const J1 = 10, Q1 = 400, eS = (x) => [...x.incoming ?? [], ...x.outgoing ?? []].filter((_) => _.type === "bpmn:DataInputAssociation" || _.type === "bpmn:DataOutputAssociation").map((_) => _.source === x ? _.target : _.source).filter((_) => !!_ && typeof _.y == "number"), tS = r.filter(
10630
10632
  (x) => x.type === "bpmn:DataStoreReference" && g.has(x.id)
10631
10633
  ), nS = (x, _) => {
10632
- const M = x.x + x.width / 2, O = x.y + x.height / 2;
10634
+ const C = x.x + x.width / 2, O = x.y + x.height / 2;
10633
10635
  let L;
10634
10636
  for (const k of tS) {
10635
10637
  if ((d(k) ?? u()) !== _ || k.y < x.y + x.height) continue;
10636
- const F = Math.abs(k.x + k.width / 2 - M);
10638
+ const F = Math.abs(k.x + k.width / 2 - C);
10637
10639
  F > Q1 || F < k.width || !eS(k).some(
10638
10640
  (N) => N.height === x.height && Math.abs(N.y + N.height / 2 - O) <= J1 && k.y >= N.y + N.height
10639
10641
  ) || (!L || F < L.dx || F === L.dx && k.id < L.id) && (L = { dx: F, id: k.id, cy: k.y + k.height / 2 });
@@ -10641,9 +10643,9 @@ function RA(e, t) {
10641
10643
  return L == null ? void 0 : L.cy;
10642
10644
  };
10643
10645
  for (const x of v) {
10644
- const _ = x.associations ?? [], M = _.map((k) => k.source === x.dataStore.id ? k.target : k.source).map(p).find(Boolean), O = M ? d(M) ?? u() : u(), L = M ? {
10645
- x: M.x + M.width / 2,
10646
- y: nS(M, O) ?? M.y + M.height + 110
10646
+ const _ = x.associations ?? [], C = _.map((k) => k.source === x.dataStore.id ? k.target : k.source).map(p).find(Boolean), O = C ? d(C) ?? u() : u(), L = C ? {
10647
+ x: C.x + C.width / 2,
10648
+ y: nS(C, O) ?? C.y + C.height + 110
10647
10649
  } : { x: 200, y: jn + 60 };
10648
10650
  n.createShape(
10649
10651
  {
@@ -10659,13 +10661,13 @@ function RA(e, t) {
10659
10661
  for (const k of _) Ig(x.dataStore.id, k);
10660
10662
  }
10661
10663
  for (const x of b) {
10662
- const M = f(x.association.target).type === "bpmn:DataStoreReference" ? x.association.target : x.association.source;
10663
- Ig(M, x.association);
10664
+ const C = f(x.association.target).type === "bpmn:DataStoreReference" ? x.association.target : x.association.source;
10665
+ Ig(C, x.association);
10664
10666
  }
10665
10667
  let Yg = 0;
10666
10668
  const Cr = 10, Kg = 40, iS = (x, _) => {
10667
- const M = _.map((N) => d(N)).filter((N) => !!N);
10668
- for (const N of M) {
10669
+ const C = _.map((N) => d(N)).filter((N) => !!N);
10670
+ for (const N of C) {
10669
10671
  const H = Cr, W = N.y, ee = N.y + N.height, re = N.x, ye = N.x + N.width;
10670
10672
  if (Math.abs(x.y - W) < H) {
10671
10673
  const ae = W + H - x.y;
@@ -10677,67 +10679,67 @@ function RA(e, t) {
10677
10679
  }
10678
10680
  Math.abs(x.x + x.width - ye) < H && (x.width = ye - H - x.x);
10679
10681
  }
10680
- if (!M.length) return;
10681
- const O = Math.min(...M.map((N) => N.y)), L = Math.max(...M.map((N) => N.y + N.height)), k = O - x.y, F = x.y + x.height - L, I = Kg - Cr;
10682
+ if (!C.length) return;
10683
+ const O = Math.min(...C.map((N) => N.y)), L = Math.max(...C.map((N) => N.y + N.height)), k = O - x.y, F = x.y + x.height - L, I = Kg - Cr;
10682
10684
  if (k > 0 != F > 0)
10683
10685
  if (k > 0 && k < I) {
10684
10686
  const N = k + Cr;
10685
10687
  x.y += N, x.height -= N;
10686
10688
  } else F > 0 && F < I && (x.height -= F + Cr);
10687
10689
  }, oS = (x, _) => {
10688
- const M = Cr, O = 30, L = r.filter(
10690
+ const C = Cr, O = 30, L = r.filter(
10689
10691
  (k) => k.type === "bpmn:Group" && k.id !== _
10690
10692
  );
10691
10693
  for (const k of L) {
10692
10694
  const F = k.x, I = k.x + k.width, N = k.y, H = k.y + k.height, W = x.y < H && N < x.y + x.height, ee = x.x < I && F < x.x + x.width;
10693
10695
  if (W) {
10694
- if (Math.abs(x.x - I) < M) {
10695
- const re = Math.min(I + M - x.x, O);
10696
+ if (Math.abs(x.x - I) < C) {
10697
+ const re = Math.min(I + C - x.x, O);
10696
10698
  re > 0 && x.width - re > 0 && (x.x += re, x.width -= re);
10697
10699
  }
10698
- if (Math.abs(x.x + x.width - F) < M) {
10699
- const re = Math.min(x.x + x.width - (F - M), O);
10700
+ if (Math.abs(x.x + x.width - F) < C) {
10701
+ const re = Math.min(x.x + x.width - (F - C), O);
10700
10702
  re > 0 && x.width - re > 0 && (x.width -= re);
10701
10703
  }
10702
10704
  }
10703
10705
  if (ee) {
10704
- if (Math.abs(x.y - H) < M) {
10705
- const re = Math.min(H + M - x.y, O);
10706
+ if (Math.abs(x.y - H) < C) {
10707
+ const re = Math.min(H + C - x.y, O);
10706
10708
  re > 0 && x.height - re > 0 && (x.y += re, x.height -= re);
10707
10709
  }
10708
- if (Math.abs(x.y + x.height - N) < M) {
10709
- const re = Math.min(x.y + x.height - (N - M), O);
10710
+ if (Math.abs(x.y + x.height - N) < C) {
10711
+ const re = Math.min(x.y + x.height - (N - C), O);
10710
10712
  re > 0 && x.height - re > 0 && (x.height -= re);
10711
10713
  }
10712
10714
  }
10713
10715
  }
10714
10716
  }, Pp = (x, _) => {
10715
- const M = Kg, O = Math.min(...x.map((N) => N.x)) - M, L = Math.min(...x.map((N) => N.y)) - M, k = Math.max(...x.map((N) => N.x + N.width)) + M, F = Math.max(...x.map((N) => N.y + N.height)) + M, I = { x: O, y: L, width: k - O, height: F - L };
10717
+ const C = Kg, O = Math.min(...x.map((N) => N.x)) - C, L = Math.min(...x.map((N) => N.y)) - C, k = Math.max(...x.map((N) => N.x + N.width)) + C, F = Math.max(...x.map((N) => N.y + N.height)) + C, I = { x: O, y: L, width: k - O, height: F - L };
10716
10718
  return iS(I, x), oS(I, _), I;
10717
10719
  };
10718
10720
  for (const x of R) {
10719
10721
  const _ = (x.group.members ?? []).map(p).filter((L) => !!L);
10720
- let M;
10721
- _.length ? M = Pp(_, x.group.id) : (M = { x: 300 + Yg * 350, y: 40, width: 300, height: 200 }, Yg++);
10722
+ let C;
10723
+ _.length ? C = Pp(_, x.group.id) : (C = { x: 300 + Yg * 350, y: 40, width: 300, height: 200 }, Yg++);
10722
10724
  const O = n.createShape(
10723
10725
  {
10724
10726
  type: "bpmn:Group",
10725
10727
  businessObject: i.create("bpmn:Group", { id: x.group.id }),
10726
- width: M.width,
10727
- height: M.height
10728
+ width: C.width,
10729
+ height: C.height
10728
10730
  },
10729
- { x: M.x + M.width / 2, y: M.y + M.height / 2 },
10731
+ { x: C.x + C.width / 2, y: C.y + C.height / 2 },
10730
10732
  u()
10731
10733
  );
10732
10734
  x.group.name && n.updateLabel(O, x.group.name), (cm = x.group.members) != null && cm.length && X(O, "bwl:Members", { refs: x.group.members.join(" ") });
10733
10735
  }
10734
10736
  {
10735
- const x = r.filter((L) => !!L.waypoints), _ = /* @__PURE__ */ new Map(), M = (L, k) => {
10737
+ const x = r.filter((L) => !!L.waypoints), _ = /* @__PURE__ */ new Map(), C = (L, k) => {
10736
10738
  !L || !k || (_.has(L) || _.set(L, /* @__PURE__ */ new Set()), _.get(L).add(k));
10737
10739
  };
10738
10740
  for (const L of x) {
10739
10741
  const k = (lm = L.source) == null ? void 0 : lm.id, F = (um = L.target) == null ? void 0 : um.id;
10740
- M(k, F), ((pm = L.type) != null && pm.includes("DataOutputAssociation") || (fm = L.type) != null && fm.includes("DataInputAssociation") || L.type === "bpmn:Association") && M(F, k);
10742
+ C(k, F), ((pm = L.type) != null && pm.includes("DataOutputAssociation") || (fm = L.type) != null && fm.includes("DataInputAssociation") || L.type === "bpmn:Association") && C(F, k);
10741
10743
  }
10742
10744
  const O = r.filter((L) => L.type === "bpmn:Group");
10743
10745
  for (const L of O) {
@@ -10822,7 +10824,7 @@ function RA(e, t) {
10822
10824
  ...R.map((_) => _.group.id),
10823
10825
  ...Gt(e, "group.update").map((_) => _.id)
10824
10826
  ]);
10825
- for (const _ of r.filter((M) => M.type === "bpmn:Group")) {
10827
+ for (const _ of r.filter((C) => C.type === "bpmn:Group")) {
10826
10828
  if (x.has(_.id)) continue;
10827
10829
  const O = (((gm = _.businessObject.extensionElements) == null ? void 0 : gm.values) ?? []).find((I) => I.$type === "bwl:Members"), L = ((O == null ? void 0 : O.refs) ?? "").split(" ").filter(Boolean).map(p).filter((I) => !!I);
10828
10830
  !L.length || !L.some((I) => {
@@ -10832,10 +10834,10 @@ function RA(e, t) {
10832
10834
  }
10833
10835
  }
10834
10836
  {
10835
- const _ = new Map(jr(He(r)).map((I) => [I.owner, I.rect])), M = r.filter((I) => !!I.waypoints), O = /* @__PURE__ */ new Map(), L = (I, N) => {
10837
+ const _ = new Map(jr(He(r)).map((I) => [I.owner, I.rect])), C = r.filter((I) => !!I.waypoints), O = /* @__PURE__ */ new Map(), L = (I, N) => {
10836
10838
  !I || !N || (O.has(I) || O.set(I, /* @__PURE__ */ new Set()), O.get(I).add(N));
10837
10839
  };
10838
- for (const I of M) {
10840
+ for (const I of C) {
10839
10841
  const N = (mm = I.source) == null ? void 0 : mm.id, H = (ym = I.target) == null ? void 0 : ym.id;
10840
10842
  L(N, H), ((vm = I.type) != null && vm.includes("DataOutputAssociation") || (xm = I.type) != null && xm.includes("DataInputAssociation") || I.type === "bpmn:Association") && L(H, N);
10841
10843
  }
@@ -10894,17 +10896,17 @@ function RA(e, t) {
10894
10896
  const O = _[Math.floor((_.length - 1) / 2)];
10895
10897
  return { x: O.x, y: O.y, width: 0, height: 0 };
10896
10898
  }
10897
- const M = x;
10898
- return { x: M.x, y: M.y, width: M.width, height: M.height };
10899
+ const C = x;
10900
+ return { x: C.x, y: C.y, width: C.width, height: C.height };
10899
10901
  };
10900
10902
  let is = 0;
10901
10903
  const Zg = 12, Jg = 14, rS = 15, aS = 300, sS = (x) => {
10902
10904
  const _ = x.split(`
10903
- `), M = Math.max(..._.map((k) => Is(k, Zg))), O = Math.max(100, Math.min(aS, Math.ceil(M) + Jg)), L = _.reduce((k, F) => k + Math.max(1, Math.ceil((Is(F, Zg) + Jg) / O)), 0);
10905
+ `), C = Math.max(..._.map((k) => Is(k, Zg))), O = Math.max(100, Math.min(aS, Math.ceil(C) + Jg)), L = _.reduce((k, F) => k + Math.max(1, Math.ceil((Is(F, Zg) + Jg) / O)), 0);
10904
10906
  return { width: O, height: Math.max(30, L * rS + 10) };
10905
10907
  };
10906
10908
  for (const x of E) {
10907
- const _ = x.association, M = ((wm = x.placement) == null ? void 0 : wm.anchor) ?? (_ ? _.source === x.annotation.id ? _.target : _.source : void 0), O = M ? p(M) : void 0, L = O ? Xg(O) : void 0, k = sS(x.annotation.text ?? "");
10909
+ const _ = x.association, C = ((wm = x.placement) == null ? void 0 : wm.anchor) ?? (_ ? _.source === x.annotation.id ? _.target : _.source : void 0), O = C ? p(C) : void 0, L = O ? Xg(O) : void 0, k = sS(x.annotation.text ?? "");
10908
10910
  let F;
10909
10911
  if (L && x.placement) {
10910
10912
  const [W, ee] = Zl[x.placement.side], re = x.placement.offset ?? 50;
@@ -10955,25 +10957,25 @@ function RA(e, t) {
10955
10957
  } : { type: "bpmn:Association" }
10956
10958
  );
10957
10959
  }
10958
- const cS = (x, _, M, O) => {
10960
+ const cS = (x, _, C, O) => {
10959
10961
  const L = x.parent;
10960
10962
  if (!L) return O;
10961
10963
  const k = x.x + x.width / 2, F = /* @__PURE__ */ new Set([x.id]);
10962
10964
  if (!Pe(L, x, k, O, F)) return O;
10963
- const I = _ ? _.y + Math.min(_.height / 2, we) : M ? M.y + ve : void 0;
10965
+ const I = _ ? _.y + Math.min(_.height / 2, we) : C ? C.y + ve : void 0;
10964
10966
  if (I === void 0) return O;
10965
10967
  const N = Math.floor((O - I) / ie + 1e-6);
10966
10968
  for (let H = 1; H <= 3; H++) {
10967
10969
  const W = N + H, ee = I + W * ie, re = nn(_ == null ? void 0 : _.id, W);
10968
10970
  if (!Pe(L, x, k, ee, re ? /* @__PURE__ */ new Set([...F, ...re]) : F))
10969
- return Mn(_ == null ? void 0 : _.id, W, M), ee;
10971
+ return Mn(_ == null ? void 0 : _.id, W, C), ee;
10970
10972
  }
10971
10973
  return O;
10972
10974
  }, Qg = () => new Set(r.getAll().filter((x) => x.type !== "label").map((x) => x.id));
10973
10975
  for (const x of Gt(e, "node.update")) {
10974
10976
  let _ = f(x.id);
10975
10977
  if (x.type && Vc(x.type) !== _.type) {
10976
- const M = _.x + _.width / 2, O = _.y + _.height / 2, L = Qg();
10978
+ const C = _.x + _.width / 2, O = _.y + _.height / 2, L = Qg();
10977
10979
  _ = c.replaceElement(
10978
10980
  _,
10979
10981
  {
@@ -10990,7 +10992,7 @@ function RA(e, t) {
10990
10992
  type: x.type,
10991
10993
  dropped: F
10992
10994
  });
10993
- const I = Math.round(M - (_.x + _.width / 2)), N = Math.round(O - (_.y + _.height / 2));
10995
+ const I = Math.round(C - (_.x + _.width / 2)), N = Math.round(O - (_.y + _.height / 2));
10994
10996
  if (I !== 0 || N !== 0) {
10995
10997
  n.moveShape(_, { x: I, y: N });
10996
10998
  for (const H of [..._.incoming ?? [], ..._.outgoing ?? []]) Mc(H);
@@ -10998,21 +11000,21 @@ function RA(e, t) {
10998
11000
  }
10999
11001
  if (x.name !== void 0 && n.updateProperties(_, { name: x.name ?? void 0 }), x.lane || x.band !== void 0) {
11000
11002
  x.band !== void 0 && n.updateProperties(_, { "bwl:band": x.band });
11001
- const M = _.y + _.height / 2, O = d(_), L = x.lane ? f(x.lane) : ((O == null ? void 0 : O.children) ?? []).find(
11002
- (F) => F.type === "bpmn:Lane" && M >= F.y && M <= F.y + F.height
11003
+ const C = _.y + _.height / 2, O = d(_), L = x.lane ? f(x.lane) : ((O == null ? void 0 : O.children) ?? []).find(
11004
+ (F) => F.type === "bpmn:Lane" && C >= F.y && C <= F.y + F.height
11003
11005
  );
11004
11006
  x.band !== void 0 && Mn(L == null ? void 0 : L.id, x.band, O);
11005
11007
  const k = L ? L.y + (x.band === void 0 ? L.height / 2 : Math.min(L.height / 2, we) + Ot(L.id, x.band) * ie) : x.band !== void 0 && O ? O.y + ve + Ot(`pool:${O.id}`, x.band) * ie : void 0;
11006
11008
  if (k !== void 0) {
11007
- const F = cS(_, L, O, k), I = F === k ? k - M : F - (_.y + _.height / 2);
11009
+ const F = cS(_, L, O, k), I = F === k ? k - C : F - (_.y + _.height / 2);
11008
11010
  I !== 0 && n.moveElements([_], { x: 0, y: I });
11009
11011
  }
11010
11012
  }
11011
11013
  }
11012
11014
  for (const x of Gt(e, "sequenceFlow.update")) {
11013
- const _ = f(x.id), M = P.get(x.id);
11014
- if (M) {
11015
- const O = (H) => ({ x: H.x + H.width / 2, y: H.y + H.height / 2 }), L = f(M.flow.source), k = f(M.flow.target), F = n.connect(L, k, { type: "bpmn:SequenceFlow", businessObject: Cc(M.flow) }), I = Ep.get(x.id), N = k.y + k.height / 2;
11015
+ const _ = f(x.id), C = P.get(x.id);
11016
+ if (C) {
11017
+ const O = (H) => ({ x: H.x + H.width / 2, y: H.y + H.height / 2 }), L = f(C.flow.source), k = f(C.flow.target), F = n.connect(L, k, { type: "bpmn:SequenceFlow", businessObject: Cc(C.flow) }), I = Ep.get(x.id), N = k.y + k.height / 2;
11016
11018
  I && k.x > I.exit.x && Math.abs(N - I.exit.y) > 1 ? n.updateWaypoints(F, [I.exit, { x: I.exit.x, y: N }, { x: k.x, y: N }]) : (n.reconnect(F, L, k, [O(L), O(k)]), Math.abs(N - (L.y + L.height / 2)) > 1 && Mc(F));
11017
11019
  } else if (x.source !== void 0 || x.target !== void 0) {
11018
11020
  const O = _, L = x.source !== void 0 ? f(x.source) : O.source, k = x.target !== void 0 ? f(x.target) : O.target, F = (H) => ({ x: H.x + H.width / 2, y: H.y + H.height / 2 });
@@ -11038,7 +11040,7 @@ function RA(e, t) {
11038
11040
  if (x.text !== void 0 && n.updateProperties(_, { text: x.text }), x.placement === null)
11039
11041
  X(_, "bwl:Placement", null);
11040
11042
  else if (x.placement) {
11041
- const M = f(x.placement.anchor), O = Xg(M), L = d(M) ?? u(), k = typeof L.x == "number" && typeof L.width == "number" && L.type === "bpmn:Participant", [F, I] = Zl[x.placement.side], N = x.placement.offset ?? 50, H = {
11043
+ const C = f(x.placement.anchor), O = Xg(C), L = d(C) ?? u(), k = typeof L.x == "number" && typeof L.width == "number" && L.type === "bpmn:Participant", [F, I] = Zl[x.placement.side], N = x.placement.offset ?? 50, H = {
11042
11044
  x: O.x + O.width / 2 + F * (O.width / 2 + _.width / 2 + N),
11043
11045
  y: O.y + O.height / 2 + I * (O.height / 2 + _.height / 2 + N)
11044
11046
  }, W = k ? Ql(r, O, { width: _.width, height: _.height }, L, { placement: x.placement, selfId: x.id }) : H;
@@ -11048,8 +11050,8 @@ function RA(e, t) {
11048
11050
  for (const x of Gt(e, "group.update")) {
11049
11051
  const _ = f(x.id);
11050
11052
  if (x.name !== void 0 && n.updateLabel(_, x.name ?? ""), x.members) {
11051
- const M = x.members.map(p).filter((O) => !!O);
11052
- M.length && n.resizeShape(_, Pp(M, x.id)), X(_, "bwl:Members", { refs: x.members.join(" ") });
11053
+ const C = x.members.map(p).filter((O) => !!O);
11054
+ C.length && n.resizeShape(_, Pp(C, x.id)), X(_, "bwl:Members", { refs: x.members.join(" ") });
11053
11055
  }
11054
11056
  }
11055
11057
  }
@@ -11336,7 +11338,7 @@ function LA(e, t, n, i) {
11336
11338
  for (const Pe of g) {
11337
11339
  const B = s.edges.find((S) => S.id === Pe.edge);
11338
11340
  if (!B) continue;
11339
- const C = B.endpoints.some((S) => {
11341
+ const M = B.endpoints.some((S) => {
11340
11342
  const V = s.shapes.find((_e) => _e.id === S);
11341
11343
  if (!V || V.container) return !1;
11342
11344
  const K = V.x + V.width / 2, oe = V.y + V.height / 2;
@@ -11344,7 +11346,7 @@ function LA(e, t, n, i) {
11344
11346
  });
11345
11347
  for (const S of vn(B)) {
11346
11348
  const V = S.axis === "v" ? [P, $] : [D, T];
11347
- Math.min(S.hi, V[1]) - Math.max(S.lo, V[0]) < sw || (S.axis === "v" ? D < S.at && S.at < T : P < S.at && S.at < $) && C || (S.axis === "v" ? (Math.abs(S.at - D) <= Es && (j = Math.max(j, S.at + Wc)), Math.abs(S.at - T) <= Es && (X = Math.min(X, S.at - Wc))) : (Math.abs(S.at - P) <= Es && (G = Math.max(G, S.at + Wc)), Math.abs(S.at - $) <= Es && (te = Math.min(te, S.at - Wc))));
11349
+ Math.min(S.hi, V[1]) - Math.max(S.lo, V[0]) < sw || (S.axis === "v" ? D < S.at && S.at < T : P < S.at && S.at < $) && M || (S.axis === "v" ? (Math.abs(S.at - D) <= Es && (j = Math.max(j, S.at + Wc)), Math.abs(S.at - T) <= Es && (X = Math.min(X, S.at - Wc))) : (Math.abs(S.at - P) <= Es && (G = Math.max(G, S.at + Wc)), Math.abs(S.at - $) <= Es && (te = Math.min(te, S.at - Wc))));
11348
11350
  }
11349
11351
  }
11350
11352
  if (j > v - Uc && (j = D), G > b - Uc && (G = P), X < E + Uc && (X = T), te < R + Uc && (te = $), j === D && G === P && X === T && te === $) continue;
@@ -11357,9 +11359,9 @@ function LA(e, t, n, i) {
11357
11359
  )) {
11358
11360
  for (const Pe of ne) {
11359
11361
  if (Pe.kind !== "label-over-line") continue;
11360
- const B = U.edges.find((oe) => oe.id === Pe.edge), C = B && yw(B, U), S = (f = o.get(Pe.edge)) == null ? void 0 : f.label;
11361
- if (!C || !S) continue;
11362
- const V = C.x - S.x, K = C.y - S.y;
11362
+ const B = U.edges.find((oe) => oe.id === Pe.edge), M = B && yw(B, U), S = (f = o.get(Pe.edge)) == null ? void 0 : f.label;
11363
+ if (!M || !S) continue;
11364
+ const V = M.x - S.x, K = M.y - S.y;
11363
11365
  r.moveElements([S], { x: V, y: K }), q.push({ label: S, dx: V, dy: K });
11364
11366
  }
11365
11367
  U = He(o), ne = pt(U).filter((Pe) => !ve.has(ft(Pe)));
@@ -11577,14 +11579,14 @@ function FA(e, t = {}) {
11577
11579
  continue;
11578
11580
  }
11579
11581
  D(xe.id);
11580
- const C = Pe === "boundaryEvent" ? Hi(xe.attachedToRef) : void 0;
11582
+ const M = Pe === "boundaryEvent" ? Hi(xe.attachedToRef) : void 0;
11581
11583
  a.push({
11582
11584
  id: xe.id,
11583
11585
  type: Pe,
11584
11586
  ...xe.name ? { name: xe.name } : {},
11585
11587
  ...ne ? { participant: ne } : {},
11586
11588
  ...ue.has(xe.id) ? { lane: ue.get(xe.id) } : {},
11587
- ...C ? { attachedTo: C } : {},
11589
+ ...M ? { attachedTo: M } : {},
11588
11590
  ...B ? { eventDefinition: B } : {}
11589
11591
  }), Pe === "subProcess" && j(xe);
11590
11592
  const S = ty(xe, "bwl:band");
@@ -11615,8 +11617,8 @@ function FA(e, t = {}) {
11615
11617
  D(ne.id), v.set(ne.id, ne);
11616
11618
  const q = Hi(ne.processRef);
11617
11619
  q && U.add(q);
11618
- const Z = q ? o.get(q) : void 0, ue = ((Z == null ? void 0 : Z.laneSets) ?? []).flatMap((C) => C.lanes ?? []), xe = ue.map((C) => ({ id: C.id, ...C.name ? { name: C.name } : {} }));
11619
- for (const C of xe) D(C.id);
11620
+ const Z = q ? o.get(q) : void 0, ue = ((Z == null ? void 0 : Z.laneSets) ?? []).flatMap((M) => M.lanes ?? []), xe = ue.map((M) => ({ id: M.id, ...M.name ? { name: M.name } : {} }));
11621
+ for (const M of xe) D(M.id);
11620
11622
  const Pe = !Z || (Z.flowElements ?? []).length === 0 && ue.length === 0 && (Z.artifacts ?? []).length === 0;
11621
11623
  r.push({
11622
11624
  id: ne.id,
@@ -13450,8 +13452,8 @@ function Sy(e, t, n, i, o, r) {
13450
13452
  ];
13451
13453
  }
13452
13454
  function jw(e, t, n, i, o, r, a, s, c, l) {
13453
- var u = jo * 120 / 180, p = jo / 180 * (+o || 0), f = [], d, g = tT(function(B, C, S) {
13454
- var V = B * rn.cos(S) - C * rn.sin(S), K = B * rn.sin(S) + C * rn.cos(S);
13455
+ var u = jo * 120 / 180, p = jo / 180 * (+o || 0), f = [], d, g = tT(function(B, M, S) {
13456
+ var V = B * rn.cos(S) - M * rn.sin(S), K = B * rn.sin(S) + M * rn.cos(S);
13455
13457
  return { x: V, y: K };
13456
13458
  });
13457
13459
  if (l)
@@ -14621,11 +14623,11 @@ function $T(e) {
14621
14623
  ), Pe.bpmnElement = B, p(Pe);
14622
14624
  else
14623
14625
  throw new Error("no process or collaboration to display");
14624
- var C = c(B, Pe);
14626
+ var M = c(B, Pe);
14625
14627
  if (Zn(B, "bpmn:Process") || Zn(B, "bpmn:SubProcess"))
14626
- m(B, C);
14628
+ m(B, M);
14627
14629
  else if (Zn(B, "bpmn:Collaboration"))
14628
- U(B, C), w(Z.rootElements, C);
14630
+ U(B, M), w(Z.rootElements, M);
14629
14631
  else
14630
14632
  throw new Error(
14631
14633
  `unsupported bpmnElement for ${Hn(Pe)}: ${Hn(B)}`
@@ -15284,13 +15286,13 @@ function Xr(e, t, n, i, o, r, a) {
15284
15286
  strokeWidth: 2
15285
15287
  });
15286
15288
  }
15287
- function f(B, C) {
15289
+ function f(B, M) {
15288
15290
  var {
15289
15291
  ref: S = { x: 0, y: 0 },
15290
15292
  scale: V = 1,
15291
15293
  element: K,
15292
15294
  parentGfx: oe = o._svg
15293
- } = C, _e = Ne("marker", {
15295
+ } = M, _e = Ne("marker", {
15294
15296
  id: B,
15295
15297
  viewBox: "0 0 20 20",
15296
15298
  refX: S.x,
@@ -15303,11 +15305,11 @@ function Xr(e, t, n, i, o, r, a) {
15303
15305
  var Qe = Ct(":scope > defs", oe);
15304
15306
  Qe || (Qe = Ne("defs"), Ye(oe, Qe)), Ye(Qe, _e);
15305
15307
  }
15306
- function d(B, C, S, V) {
15308
+ function d(B, M, S, V) {
15307
15309
  var K = h2.nextPrefixed("marker-");
15308
- return g(B, K, C, S, V), "url(#" + K + ")";
15310
+ return g(B, K, M, S, V), "url(#" + K + ")";
15309
15311
  }
15310
- function g(B, C, S, V, K) {
15312
+ function g(B, M, S, V, K) {
15311
15313
  if (S === "sequenceflow-end") {
15312
15314
  var oe = Ne("path", {
15313
15315
  d: "M 1 5 L 11 10 L 1 15 Z",
@@ -15317,7 +15319,7 @@ function Xr(e, t, n, i, o, r, a) {
15317
15319
  strokeWidth: 1
15318
15320
  })
15319
15321
  });
15320
- f(C, {
15322
+ f(M, {
15321
15323
  element: oe,
15322
15324
  ref: { x: 11, y: 10 },
15323
15325
  scale: 0.5,
@@ -15338,7 +15340,7 @@ function Xr(e, t, n, i, o, r, a) {
15338
15340
  strokeDasharray: [1e4, 1]
15339
15341
  })
15340
15342
  });
15341
- f(C, {
15343
+ f(M, {
15342
15344
  element: _e,
15343
15345
  ref: { x: 6, y: 6 },
15344
15346
  parentGfx: B
@@ -15356,7 +15358,7 @@ function Xr(e, t, n, i, o, r, a) {
15356
15358
  strokeDasharray: [1e4, 1]
15357
15359
  })
15358
15360
  });
15359
- f(C, {
15361
+ f(M, {
15360
15362
  element: Qe,
15361
15363
  ref: { x: 8.5, y: 5 },
15362
15364
  parentGfx: B
@@ -15374,7 +15376,7 @@ function Xr(e, t, n, i, o, r, a) {
15374
15376
  strokeDasharray: [1e4, 1]
15375
15377
  })
15376
15378
  });
15377
- f(C, {
15379
+ f(M, {
15378
15380
  element: yt,
15379
15381
  ref: { x: 1, y: 10 },
15380
15382
  scale: 0.5,
@@ -15393,7 +15395,7 @@ function Xr(e, t, n, i, o, r, a) {
15393
15395
  strokeDasharray: [1e4, 1]
15394
15396
  })
15395
15397
  });
15396
- f(C, {
15398
+ f(M, {
15397
15399
  element: Ot,
15398
15400
  ref: { x: 11, y: 10 },
15399
15401
  scale: 0.5,
@@ -15408,7 +15410,7 @@ function Xr(e, t, n, i, o, r, a) {
15408
15410
  stroke: K
15409
15411
  })
15410
15412
  });
15411
- f(C, {
15413
+ f(M, {
15412
15414
  element: xt,
15413
15415
  ref: { x: -1, y: 10 },
15414
15416
  scale: 0.5,
@@ -15423,7 +15425,7 @@ function Xr(e, t, n, i, o, r, a) {
15423
15425
  fill: "none"
15424
15426
  })
15425
15427
  });
15426
- f(C, {
15428
+ f(M, {
15427
15429
  element: en,
15428
15430
  ref: { x: 0, y: 10 },
15429
15431
  scale: 0.5,
@@ -15431,22 +15433,22 @@ function Xr(e, t, n, i, o, r, a) {
15431
15433
  });
15432
15434
  }
15433
15435
  }
15434
- function h(B, C, S, V, K = {}) {
15436
+ function h(B, M, S, V, K = {}) {
15435
15437
  yn(V) && (K = V, V = 0), V = V || 0, K = u(K);
15436
- var oe = C / 2, _e = S / 2, Qe = Ne("circle", {
15438
+ var oe = M / 2, _e = S / 2, Qe = Ne("circle", {
15437
15439
  cx: oe,
15438
15440
  cy: _e,
15439
- r: Math.round((C + S) / 4 - V),
15441
+ r: Math.round((M + S) / 4 - V),
15440
15442
  ...K
15441
15443
  });
15442
15444
  return Ye(B, Qe), Qe;
15443
15445
  }
15444
- function m(B, C, S, V, K, oe) {
15446
+ function m(B, M, S, V, K, oe) {
15445
15447
  yn(K) && (oe = K, K = 0), K = K || 0, oe = u(oe);
15446
15448
  var _e = Ne("rect", {
15447
15449
  x: K,
15448
15450
  y: K,
15449
- width: C - K * 2,
15451
+ width: M - K * 2,
15450
15452
  height: S - K * 2,
15451
15453
  rx: V,
15452
15454
  ry: V,
@@ -15454,10 +15456,10 @@ function Xr(e, t, n, i, o, r, a) {
15454
15456
  });
15455
15457
  return Ye(B, _e), _e;
15456
15458
  }
15457
- function w(B, C, S, V) {
15458
- var K = C / 2, oe = S / 2, _e = [
15459
+ function w(B, M, S, V) {
15460
+ var K = M / 2, oe = S / 2, _e = [
15459
15461
  { x: K, y: 0 },
15460
- { x: C, y: oe },
15462
+ { x: M, y: oe },
15461
15463
  { x: K, y: S },
15462
15464
  { x: 0, y: oe }
15463
15465
  ], Qe = _e.map(function(Ot) {
@@ -15470,55 +15472,55 @@ function Xr(e, t, n, i, o, r, a) {
15470
15472
  });
15471
15473
  return Ye(B, yt), yt;
15472
15474
  }
15473
- function y(B, C, S, V) {
15475
+ function y(B, M, S, V) {
15474
15476
  S = p(S);
15475
- var K = Js(C, S, V);
15477
+ var K = Js(M, S, V);
15476
15478
  return Ye(B, K), K;
15477
15479
  }
15478
- function v(B, C, S) {
15479
- return y(B, C, S, 5);
15480
+ function v(B, M, S) {
15481
+ return y(B, M, S, 5);
15480
15482
  }
15481
- function b(B, C, S) {
15483
+ function b(B, M, S) {
15482
15484
  S = p(S);
15483
15485
  var V = Ne("path", {
15484
15486
  ...S,
15485
- d: C
15487
+ d: M
15486
15488
  });
15487
15489
  return Ye(B, V), V;
15488
15490
  }
15489
- function E(B, C, S, V) {
15490
- return b(C, S, Y({ "data-marker": B }, V));
15491
+ function E(B, M, S, V) {
15492
+ return b(M, S, Y({ "data-marker": B }, V));
15491
15493
  }
15492
15494
  function R(B) {
15493
15495
  return Pe[B];
15494
15496
  }
15495
15497
  function D(B) {
15496
- return function(C, S, V) {
15497
- return R(B)(C, S, V);
15498
+ return function(M, S, V) {
15499
+ return R(B)(M, S, V);
15498
15500
  };
15499
15501
  }
15500
15502
  var P = {
15501
- "bpmn:MessageEventDefinition": function(B, C, S = {}, V) {
15503
+ "bpmn:MessageEventDefinition": function(B, M, S = {}, V) {
15502
15504
  var K = i.getScaledPath("EVENT_MESSAGE", {
15503
15505
  xScaleFactor: 0.9,
15504
15506
  yScaleFactor: 0.9,
15505
- containerWidth: S.width || C.width,
15506
- containerHeight: S.height || C.height,
15507
+ containerWidth: S.width || M.width,
15508
+ containerHeight: S.height || M.height,
15507
15509
  position: {
15508
15510
  mx: 0.235,
15509
15511
  my: 0.315
15510
15512
  }
15511
- }), oe = V ? Ce(C, c, S.stroke) : ct(C, s, S.fill), _e = V ? ct(C, s, S.fill) : Ce(C, c, S.stroke), Qe = b(B, K, {
15513
+ }), oe = V ? Ce(M, c, S.stroke) : ct(M, s, S.fill), _e = V ? ct(M, s, S.fill) : Ce(M, c, S.stroke), Qe = b(B, K, {
15512
15514
  fill: oe,
15513
15515
  stroke: _e,
15514
15516
  strokeWidth: 1
15515
15517
  });
15516
15518
  return Qe;
15517
15519
  },
15518
- "bpmn:TimerEventDefinition": function(B, C, S = {}) {
15519
- var V = S.width || C.width, K = S.height || C.height, oe = S.width ? 1 : 2, _e = h(B, V, K, 0.2 * K, {
15520
- fill: ct(C, s, S.fill),
15521
- stroke: Ce(C, c, S.stroke),
15520
+ "bpmn:TimerEventDefinition": function(B, M, S = {}) {
15521
+ var V = S.width || M.width, K = S.height || M.height, oe = S.width ? 1 : 2, _e = h(B, V, K, 0.2 * K, {
15522
+ fill: ct(M, s, S.fill),
15523
+ stroke: Ce(M, c, S.stroke),
15522
15524
  strokeWidth: oe
15523
15525
  }), Qe = i.getScaledPath("EVENT_TIMER_WH", {
15524
15526
  xScaleFactor: 0.75,
@@ -15531,7 +15533,7 @@ function Xr(e, t, n, i, o, r, a) {
15531
15533
  }
15532
15534
  });
15533
15535
  b(B, Qe, {
15534
- stroke: Ce(C, c, S.stroke),
15536
+ stroke: Ce(M, c, S.stroke),
15535
15537
  strokeWidth: oe
15536
15538
  });
15537
15539
  for (var yt = 0; yt < 12; yt++) {
@@ -15547,181 +15549,181 @@ function Xr(e, t, n, i, o, r, a) {
15547
15549
  }), xt = V / 2, en = K / 2;
15548
15550
  b(B, Ot, {
15549
15551
  strokeWidth: 1,
15550
- stroke: Ce(C, c, S.stroke),
15552
+ stroke: Ce(M, c, S.stroke),
15551
15553
  transform: "rotate(" + yt * 30 + "," + en + "," + xt + ")"
15552
15554
  });
15553
15555
  }
15554
15556
  return _e;
15555
15557
  },
15556
- "bpmn:EscalationEventDefinition": function(B, C, S = {}, V) {
15558
+ "bpmn:EscalationEventDefinition": function(B, M, S = {}, V) {
15557
15559
  var K = i.getScaledPath("EVENT_ESCALATION", {
15558
15560
  xScaleFactor: 1,
15559
15561
  yScaleFactor: 1,
15560
- containerWidth: S.width || C.width,
15561
- containerHeight: S.height || C.height,
15562
+ containerWidth: S.width || M.width,
15563
+ containerHeight: S.height || M.height,
15562
15564
  position: {
15563
15565
  mx: 0.5,
15564
15566
  my: 0.2
15565
15567
  }
15566
- }), oe = V ? Ce(C, c, S.stroke) : ct(C, s, S.fill);
15568
+ }), oe = V ? Ce(M, c, S.stroke) : ct(M, s, S.fill);
15567
15569
  return b(B, K, {
15568
15570
  fill: oe,
15569
- stroke: Ce(C, c, S.stroke),
15571
+ stroke: Ce(M, c, S.stroke),
15570
15572
  strokeWidth: 1
15571
15573
  });
15572
15574
  },
15573
- "bpmn:ConditionalEventDefinition": function(B, C, S = {}) {
15575
+ "bpmn:ConditionalEventDefinition": function(B, M, S = {}) {
15574
15576
  var V = i.getScaledPath("EVENT_CONDITIONAL", {
15575
15577
  xScaleFactor: 1,
15576
15578
  yScaleFactor: 1,
15577
- containerWidth: S.width || C.width,
15578
- containerHeight: S.height || C.height,
15579
+ containerWidth: S.width || M.width,
15580
+ containerHeight: S.height || M.height,
15579
15581
  position: {
15580
15582
  mx: 0.5,
15581
15583
  my: 0.222
15582
15584
  }
15583
15585
  });
15584
15586
  return b(B, V, {
15585
- fill: ct(C, s, S.fill),
15586
- stroke: Ce(C, c, S.stroke),
15587
+ fill: ct(M, s, S.fill),
15588
+ stroke: Ce(M, c, S.stroke),
15587
15589
  strokeWidth: 1
15588
15590
  });
15589
15591
  },
15590
- "bpmn:LinkEventDefinition": function(B, C, S = {}, V) {
15592
+ "bpmn:LinkEventDefinition": function(B, M, S = {}, V) {
15591
15593
  var K = i.getScaledPath("EVENT_LINK", {
15592
15594
  xScaleFactor: 1,
15593
15595
  yScaleFactor: 1,
15594
- containerWidth: C.width,
15595
- containerHeight: C.height,
15596
+ containerWidth: M.width,
15597
+ containerHeight: M.height,
15596
15598
  position: {
15597
15599
  mx: 0.57,
15598
15600
  my: 0.263
15599
15601
  }
15600
- }), oe = V ? Ce(C, c, S.stroke) : ct(C, s, S.fill);
15602
+ }), oe = V ? Ce(M, c, S.stroke) : ct(M, s, S.fill);
15601
15603
  return b(B, K, {
15602
15604
  fill: oe,
15603
- stroke: Ce(C, c, S.stroke),
15605
+ stroke: Ce(M, c, S.stroke),
15604
15606
  strokeWidth: 1
15605
15607
  });
15606
15608
  },
15607
- "bpmn:ErrorEventDefinition": function(B, C, S = {}, V) {
15609
+ "bpmn:ErrorEventDefinition": function(B, M, S = {}, V) {
15608
15610
  var K = i.getScaledPath("EVENT_ERROR", {
15609
15611
  xScaleFactor: 1.1,
15610
15612
  yScaleFactor: 1.1,
15611
- containerWidth: S.width || C.width,
15612
- containerHeight: S.height || C.height,
15613
+ containerWidth: S.width || M.width,
15614
+ containerHeight: S.height || M.height,
15613
15615
  position: {
15614
15616
  mx: 0.2,
15615
15617
  my: 0.722
15616
15618
  }
15617
- }), oe = V ? Ce(C, c, S.stroke) : ct(C, s, S.fill);
15619
+ }), oe = V ? Ce(M, c, S.stroke) : ct(M, s, S.fill);
15618
15620
  return b(B, K, {
15619
15621
  fill: oe,
15620
- stroke: Ce(C, c, S.stroke),
15622
+ stroke: Ce(M, c, S.stroke),
15621
15623
  strokeWidth: 1
15622
15624
  });
15623
15625
  },
15624
- "bpmn:CancelEventDefinition": function(B, C, S = {}, V) {
15626
+ "bpmn:CancelEventDefinition": function(B, M, S = {}, V) {
15625
15627
  var K = i.getScaledPath("EVENT_CANCEL_45", {
15626
15628
  xScaleFactor: 1,
15627
15629
  yScaleFactor: 1,
15628
- containerWidth: C.width,
15629
- containerHeight: C.height,
15630
+ containerWidth: M.width,
15631
+ containerHeight: M.height,
15630
15632
  position: {
15631
15633
  mx: 0.638,
15632
15634
  my: -0.055
15633
15635
  }
15634
- }), oe = V ? Ce(C, c, S.stroke) : "none", _e = b(B, K, {
15636
+ }), oe = V ? Ce(M, c, S.stroke) : "none", _e = b(B, K, {
15635
15637
  fill: oe,
15636
- stroke: Ce(C, c, S.stroke),
15638
+ stroke: Ce(M, c, S.stroke),
15637
15639
  strokeWidth: 1
15638
15640
  });
15639
15641
  return Qw(_e, 45), _e;
15640
15642
  },
15641
- "bpmn:CompensateEventDefinition": function(B, C, S = {}, V) {
15643
+ "bpmn:CompensateEventDefinition": function(B, M, S = {}, V) {
15642
15644
  var K = i.getScaledPath("EVENT_COMPENSATION", {
15643
15645
  xScaleFactor: 1,
15644
15646
  yScaleFactor: 1,
15645
- containerWidth: S.width || C.width,
15646
- containerHeight: S.height || C.height,
15647
+ containerWidth: S.width || M.width,
15648
+ containerHeight: S.height || M.height,
15647
15649
  position: {
15648
15650
  mx: 0.22,
15649
15651
  my: 0.5
15650
15652
  }
15651
- }), oe = V ? Ce(C, c, S.stroke) : ct(C, s, S.fill);
15653
+ }), oe = V ? Ce(M, c, S.stroke) : ct(M, s, S.fill);
15652
15654
  return b(B, K, {
15653
15655
  fill: oe,
15654
- stroke: Ce(C, c, S.stroke),
15656
+ stroke: Ce(M, c, S.stroke),
15655
15657
  strokeWidth: 1
15656
15658
  });
15657
15659
  },
15658
- "bpmn:SignalEventDefinition": function(B, C, S = {}, V) {
15660
+ "bpmn:SignalEventDefinition": function(B, M, S = {}, V) {
15659
15661
  var K = i.getScaledPath("EVENT_SIGNAL", {
15660
15662
  xScaleFactor: 0.9,
15661
15663
  yScaleFactor: 0.9,
15662
- containerWidth: S.width || C.width,
15663
- containerHeight: S.height || C.height,
15664
+ containerWidth: S.width || M.width,
15665
+ containerHeight: S.height || M.height,
15664
15666
  position: {
15665
15667
  mx: 0.5,
15666
15668
  my: 0.2
15667
15669
  }
15668
- }), oe = V ? Ce(C, c, S.stroke) : ct(C, s, S.fill);
15670
+ }), oe = V ? Ce(M, c, S.stroke) : ct(M, s, S.fill);
15669
15671
  return b(B, K, {
15670
15672
  strokeWidth: 1,
15671
15673
  fill: oe,
15672
- stroke: Ce(C, c, S.stroke)
15674
+ stroke: Ce(M, c, S.stroke)
15673
15675
  });
15674
15676
  },
15675
- "bpmn:MultipleEventDefinition": function(B, C, S = {}, V) {
15677
+ "bpmn:MultipleEventDefinition": function(B, M, S = {}, V) {
15676
15678
  var K = i.getScaledPath("EVENT_MULTIPLE", {
15677
15679
  xScaleFactor: 1.1,
15678
15680
  yScaleFactor: 1.1,
15679
- containerWidth: S.width || C.width,
15680
- containerHeight: S.height || C.height,
15681
+ containerWidth: S.width || M.width,
15682
+ containerHeight: S.height || M.height,
15681
15683
  position: {
15682
15684
  mx: 0.211,
15683
15685
  my: 0.36
15684
15686
  }
15685
- }), oe = V ? Ce(C, c, S.stroke) : ct(C, s, S.fill);
15687
+ }), oe = V ? Ce(M, c, S.stroke) : ct(M, s, S.fill);
15686
15688
  return b(B, K, {
15687
15689
  fill: oe,
15688
- stroke: Ce(C, c, S.stroke),
15690
+ stroke: Ce(M, c, S.stroke),
15689
15691
  strokeWidth: 1
15690
15692
  });
15691
15693
  },
15692
- "bpmn:ParallelMultipleEventDefinition": function(B, C, S = {}) {
15694
+ "bpmn:ParallelMultipleEventDefinition": function(B, M, S = {}) {
15693
15695
  var V = i.getScaledPath("EVENT_PARALLEL_MULTIPLE", {
15694
15696
  xScaleFactor: 1.2,
15695
15697
  yScaleFactor: 1.2,
15696
- containerWidth: S.width || C.width,
15697
- containerHeight: S.height || C.height,
15698
+ containerWidth: S.width || M.width,
15699
+ containerHeight: S.height || M.height,
15698
15700
  position: {
15699
15701
  mx: 0.458,
15700
15702
  my: 0.194
15701
15703
  }
15702
15704
  });
15703
15705
  return b(B, V, {
15704
- fill: ct(C, s, S.fill),
15705
- stroke: Ce(C, c, S.stroke),
15706
+ fill: ct(M, s, S.fill),
15707
+ stroke: Ce(M, c, S.stroke),
15706
15708
  strokeWidth: 1
15707
15709
  });
15708
15710
  },
15709
- "bpmn:TerminateEventDefinition": function(B, C, S = {}) {
15710
- var V = h(B, C.width, C.height, 8, {
15711
- fill: Ce(C, c, S.stroke),
15712
- stroke: Ce(C, c, S.stroke),
15711
+ "bpmn:TerminateEventDefinition": function(B, M, S = {}) {
15712
+ var V = h(B, M.width, M.height, 8, {
15713
+ fill: Ce(M, c, S.stroke),
15714
+ stroke: Ce(M, c, S.stroke),
15713
15715
  strokeWidth: 4
15714
15716
  });
15715
15717
  return V;
15716
15718
  }
15717
15719
  };
15718
- function T(B, C, S = {}, V) {
15720
+ function T(B, M, S = {}, V) {
15719
15721
  var K = me(B), oe = u2(K), _e = V || B;
15720
- return K.get("eventDefinitions") && K.get("eventDefinitions").length > 1 ? K.get("parallelMultiple") ? P["bpmn:ParallelMultipleEventDefinition"](C, _e, S, oe) : P["bpmn:MultipleEventDefinition"](C, _e, S, oe) : Zi(K, "bpmn:MessageEventDefinition") ? P["bpmn:MessageEventDefinition"](C, _e, S, oe) : Zi(K, "bpmn:TimerEventDefinition") ? P["bpmn:TimerEventDefinition"](C, _e, S, oe) : Zi(K, "bpmn:ConditionalEventDefinition") ? P["bpmn:ConditionalEventDefinition"](C, _e, S, oe) : Zi(K, "bpmn:SignalEventDefinition") ? P["bpmn:SignalEventDefinition"](C, _e, S, oe) : Zi(K, "bpmn:EscalationEventDefinition") ? P["bpmn:EscalationEventDefinition"](C, _e, S, oe) : Zi(K, "bpmn:LinkEventDefinition") ? P["bpmn:LinkEventDefinition"](C, _e, S, oe) : Zi(K, "bpmn:ErrorEventDefinition") ? P["bpmn:ErrorEventDefinition"](C, _e, S, oe) : Zi(K, "bpmn:CancelEventDefinition") ? P["bpmn:CancelEventDefinition"](C, _e, S, oe) : Zi(K, "bpmn:CompensateEventDefinition") ? P["bpmn:CompensateEventDefinition"](C, _e, S, oe) : Zi(K, "bpmn:TerminateEventDefinition") ? P["bpmn:TerminateEventDefinition"](C, _e, S, oe) : null;
15722
+ return K.get("eventDefinitions") && K.get("eventDefinitions").length > 1 ? K.get("parallelMultiple") ? P["bpmn:ParallelMultipleEventDefinition"](M, _e, S, oe) : P["bpmn:MultipleEventDefinition"](M, _e, S, oe) : Zi(K, "bpmn:MessageEventDefinition") ? P["bpmn:MessageEventDefinition"](M, _e, S, oe) : Zi(K, "bpmn:TimerEventDefinition") ? P["bpmn:TimerEventDefinition"](M, _e, S, oe) : Zi(K, "bpmn:ConditionalEventDefinition") ? P["bpmn:ConditionalEventDefinition"](M, _e, S, oe) : Zi(K, "bpmn:SignalEventDefinition") ? P["bpmn:SignalEventDefinition"](M, _e, S, oe) : Zi(K, "bpmn:EscalationEventDefinition") ? P["bpmn:EscalationEventDefinition"](M, _e, S, oe) : Zi(K, "bpmn:LinkEventDefinition") ? P["bpmn:LinkEventDefinition"](M, _e, S, oe) : Zi(K, "bpmn:ErrorEventDefinition") ? P["bpmn:ErrorEventDefinition"](M, _e, S, oe) : Zi(K, "bpmn:CancelEventDefinition") ? P["bpmn:CancelEventDefinition"](M, _e, S, oe) : Zi(K, "bpmn:CompensateEventDefinition") ? P["bpmn:CompensateEventDefinition"](M, _e, S, oe) : Zi(K, "bpmn:TerminateEventDefinition") ? P["bpmn:TerminateEventDefinition"](M, _e, S, oe) : null;
15721
15723
  }
15722
15724
  var $ = {
15723
- ParticipantMultiplicityMarker: function(B, C, S = {}) {
15724
- var V = Ei(C, S), K = ii(C, S), oe = i.getScaledPath("MARKER_PARALLEL", {
15725
+ ParticipantMultiplicityMarker: function(B, M, S = {}) {
15726
+ var V = Ei(M, S), K = ii(M, S), oe = i.getScaledPath("MARKER_PARALLEL", {
15725
15727
  xScaleFactor: 1,
15726
15728
  yScaleFactor: 1,
15727
15729
  containerWidth: V,
@@ -15733,34 +15735,34 @@ function Xr(e, t, n, i, o, r, a) {
15733
15735
  });
15734
15736
  E("participant-multiplicity", B, oe, {
15735
15737
  strokeWidth: 2,
15736
- fill: ct(C, s, S.fill),
15737
- stroke: Ce(C, c, S.stroke)
15738
+ fill: ct(M, s, S.fill),
15739
+ stroke: Ce(M, c, S.stroke)
15738
15740
  });
15739
15741
  },
15740
- SubProcessMarker: function(B, C, S = {}) {
15742
+ SubProcessMarker: function(B, M, S = {}) {
15741
15743
  var V = m(B, 14, 14, 0, {
15742
15744
  strokeWidth: 1,
15743
- fill: ct(C, s, S.fill),
15744
- stroke: Ce(C, c, S.stroke)
15745
+ fill: ct(M, s, S.fill),
15746
+ stroke: Ce(M, c, S.stroke)
15745
15747
  });
15746
- In(V, C.width / 2 - 7.5, C.height - 20);
15748
+ In(V, M.width / 2 - 7.5, M.height - 20);
15747
15749
  var K = i.getScaledPath("MARKER_SUB_PROCESS", {
15748
15750
  xScaleFactor: 1.5,
15749
15751
  yScaleFactor: 1.5,
15750
- containerWidth: C.width,
15751
- containerHeight: C.height,
15752
+ containerWidth: M.width,
15753
+ containerHeight: M.height,
15752
15754
  position: {
15753
- mx: (C.width / 2 - 7.5) / C.width,
15754
- my: (C.height - 20) / C.height
15755
+ mx: (M.width / 2 - 7.5) / M.width,
15756
+ my: (M.height - 20) / M.height
15755
15757
  }
15756
15758
  });
15757
15759
  E("sub-process", B, K, {
15758
- fill: ct(C, s, S.fill),
15759
- stroke: Ce(C, c, S.stroke)
15760
+ fill: ct(M, s, S.fill),
15761
+ stroke: Ce(M, c, S.stroke)
15760
15762
  });
15761
15763
  },
15762
- ParallelMarker: function(B, C, S) {
15763
- var V = Ei(C, S), K = ii(C, S), oe = i.getScaledPath("MARKER_PARALLEL", {
15764
+ ParallelMarker: function(B, M, S) {
15765
+ var V = Ei(M, S), K = ii(M, S), oe = i.getScaledPath("MARKER_PARALLEL", {
15764
15766
  xScaleFactor: 1,
15765
15767
  yScaleFactor: 1,
15766
15768
  containerWidth: V,
@@ -15771,45 +15773,45 @@ function Xr(e, t, n, i, o, r, a) {
15771
15773
  }
15772
15774
  });
15773
15775
  E("parallel", B, oe, {
15774
- fill: ct(C, s, S.fill),
15775
- stroke: Ce(C, c, S.stroke)
15776
+ fill: ct(M, s, S.fill),
15777
+ stroke: Ce(M, c, S.stroke)
15776
15778
  });
15777
15779
  },
15778
- SequentialMarker: function(B, C, S) {
15780
+ SequentialMarker: function(B, M, S) {
15779
15781
  var V = i.getScaledPath("MARKER_SEQUENTIAL", {
15780
15782
  xScaleFactor: 1,
15781
15783
  yScaleFactor: 1,
15782
- containerWidth: C.width,
15783
- containerHeight: C.height,
15784
+ containerWidth: M.width,
15785
+ containerHeight: M.height,
15784
15786
  position: {
15785
- mx: (C.width / 2 + S.seq) / C.width,
15786
- my: (C.height - 19) / C.height
15787
+ mx: (M.width / 2 + S.seq) / M.width,
15788
+ my: (M.height - 19) / M.height
15787
15789
  }
15788
15790
  });
15789
15791
  E("sequential", B, V, {
15790
- fill: ct(C, s, S.fill),
15791
- stroke: Ce(C, c, S.stroke)
15792
+ fill: ct(M, s, S.fill),
15793
+ stroke: Ce(M, c, S.stroke)
15792
15794
  });
15793
15795
  },
15794
- CompensationMarker: function(B, C, S) {
15796
+ CompensationMarker: function(B, M, S) {
15795
15797
  var V = i.getScaledPath("MARKER_COMPENSATION", {
15796
15798
  xScaleFactor: 1,
15797
15799
  yScaleFactor: 1,
15798
- containerWidth: C.width,
15799
- containerHeight: C.height,
15800
+ containerWidth: M.width,
15801
+ containerHeight: M.height,
15800
15802
  position: {
15801
- mx: (C.width / 2 + S.compensation) / C.width,
15802
- my: (C.height - 13) / C.height
15803
+ mx: (M.width / 2 + S.compensation) / M.width,
15804
+ my: (M.height - 13) / M.height
15803
15805
  }
15804
15806
  });
15805
15807
  E("compensation", B, V, {
15806
15808
  strokeWidth: 1,
15807
- fill: ct(C, s, S.fill),
15808
- stroke: Ce(C, c, S.stroke)
15809
+ fill: ct(M, s, S.fill),
15810
+ stroke: Ce(M, c, S.stroke)
15809
15811
  });
15810
15812
  },
15811
- LoopMarker: function(B, C, S) {
15812
- var V = Ei(C, S), K = ii(C, S), oe = i.getScaledPath("MARKER_LOOP", {
15813
+ LoopMarker: function(B, M, S) {
15814
+ var V = Ei(M, S), K = ii(M, S), oe = i.getScaledPath("MARKER_LOOP", {
15813
15815
  xScaleFactor: 1,
15814
15816
  yScaleFactor: 1,
15815
15817
  containerWidth: V,
@@ -15822,12 +15824,12 @@ function Xr(e, t, n, i, o, r, a) {
15822
15824
  E("loop", B, oe, {
15823
15825
  strokeWidth: 1.5,
15824
15826
  fill: "none",
15825
- stroke: Ce(C, c, S.stroke),
15827
+ stroke: Ce(M, c, S.stroke),
15826
15828
  strokeMiterlimit: 0.5
15827
15829
  });
15828
15830
  },
15829
- AdhocMarker: function(B, C, S) {
15830
- var V = Ei(C, S), K = ii(C, S), oe = i.getScaledPath("MARKER_ADHOC", {
15831
+ AdhocMarker: function(B, M, S) {
15832
+ var V = Ei(M, S), K = ii(M, S), oe = i.getScaledPath("MARKER_ADHOC", {
15831
15833
  xScaleFactor: 1,
15832
15834
  yScaleFactor: 1,
15833
15835
  containerWidth: V,
@@ -15839,22 +15841,22 @@ function Xr(e, t, n, i, o, r, a) {
15839
15841
  });
15840
15842
  E("adhoc", B, oe, {
15841
15843
  strokeWidth: 1,
15842
- fill: Ce(C, c, S.stroke),
15843
- stroke: Ce(C, c, S.stroke)
15844
+ fill: Ce(M, c, S.stroke),
15845
+ stroke: Ce(M, c, S.stroke)
15844
15846
  });
15845
15847
  }
15846
15848
  };
15847
- function j(B, C, S, V) {
15848
- $[B](C, S, V);
15849
+ function j(B, M, S, V) {
15850
+ $[B](M, S, V);
15849
15851
  }
15850
- function G(B, C, S = [], V = {}) {
15852
+ function G(B, M, S = [], V = {}) {
15851
15853
  V = {
15852
15854
  fill: V.fill,
15853
15855
  stroke: V.stroke,
15854
- width: Ei(C, V),
15855
- height: ii(C, V)
15856
+ width: Ei(M, V),
15857
+ height: ii(M, V)
15856
15858
  };
15857
- var K = me(C), oe = S.includes("SubProcessMarker");
15859
+ var K = me(M), oe = S.includes("SubProcessMarker");
15858
15860
  oe ? V = {
15859
15861
  ...V,
15860
15862
  seq: -21,
@@ -15880,54 +15882,54 @@ function Xr(e, t, n, i, o, r, a) {
15880
15882
  }), Qe === void 0 && S.push("LoopMarker"), Qe === !1 && S.push("ParallelMarker"), Qe === !0 && S.push("SequentialMarker")), S.includes("CompensationMarker") && S.length === 1 && Y(V, {
15881
15883
  compensation: -8
15882
15884
  }), z(S, function(yt) {
15883
- j(yt, B, C, V);
15885
+ j(yt, B, M, V);
15884
15886
  });
15885
15887
  }
15886
- function X(B, C, S = {}) {
15888
+ function X(B, M, S = {}) {
15887
15889
  S = Y({
15888
15890
  size: {
15889
15891
  width: 100
15890
15892
  }
15891
15893
  }, S);
15892
- var V = r.createText(C || "", S);
15894
+ var V = r.createText(M || "", S);
15893
15895
  return ut(V).add("djs-label"), Ye(B, V), V;
15894
15896
  }
15895
- function te(B, C, S, V = {}) {
15896
- var K = me(C), oe = ps({
15897
- x: C.x,
15898
- y: C.y,
15899
- width: C.width,
15900
- height: C.height
15897
+ function te(B, M, S, V = {}) {
15898
+ var K = me(M), oe = ps({
15899
+ x: M.x,
15900
+ y: M.y,
15901
+ width: M.width,
15902
+ height: M.height
15901
15903
  }, V);
15902
15904
  return X(B, K.name, {
15903
15905
  align: S,
15904
15906
  box: oe,
15905
15907
  padding: 7,
15906
15908
  style: {
15907
- fill: us(C, l, c, V.stroke)
15909
+ fill: us(M, l, c, V.stroke)
15908
15910
  }
15909
15911
  });
15910
15912
  }
15911
- function J(B, C, S = {}) {
15913
+ function J(B, M, S = {}) {
15912
15914
  var V = {
15913
- width: C.width,
15914
- height: C.height,
15915
- x: C.width / 2 + C.x,
15916
- y: C.height / 2 + C.y
15915
+ width: M.width,
15916
+ height: M.height,
15917
+ x: M.width / 2 + M.x,
15918
+ y: M.height / 2 + M.y
15917
15919
  };
15918
- return X(B, hi(C), {
15920
+ return X(B, hi(M), {
15919
15921
  box: V,
15920
15922
  style: Y(
15921
15923
  {},
15922
15924
  r.getExternalStyle(),
15923
15925
  {
15924
- fill: us(C, l, c, S.stroke)
15926
+ fill: us(M, l, c, S.stroke)
15925
15927
  }
15926
15928
  )
15927
15929
  });
15928
15930
  }
15929
- function ie(B, C, S, V = {}) {
15930
- var K = wn(S), oe = X(B, C, {
15931
+ function ie(B, M, S, V = {}) {
15932
+ var K = wn(S), oe = X(B, M, {
15931
15933
  box: {
15932
15934
  height: 30,
15933
15935
  width: K ? ii(S, V) : Ei(S, V)
@@ -15942,35 +15944,35 @@ function Xr(e, t, n, i, o, r, a) {
15942
15944
  Pl(oe, 0, -_e, 270);
15943
15945
  }
15944
15946
  }
15945
- function se(B, C, S = {}) {
15947
+ function se(B, M, S = {}) {
15946
15948
  var {
15947
15949
  width: V,
15948
15950
  height: K
15949
- } = ps(C, S);
15951
+ } = ps(M, S);
15950
15952
  return m(B, V, K, kl, {
15951
15953
  ...S,
15952
- fill: ct(C, s, S.fill),
15954
+ fill: ct(M, s, S.fill),
15953
15955
  fillOpacity: pa,
15954
- stroke: Ce(C, c, S.stroke)
15956
+ stroke: Ce(M, c, S.stroke)
15955
15957
  });
15956
15958
  }
15957
- function ve(B, C, S = {}) {
15958
- var V = me(C), K = ct(C, s, S.fill), oe = Ce(C, c, S.stroke);
15959
+ function ve(B, M, S = {}) {
15960
+ var V = me(M), K = ct(M, s, S.fill), oe = Ce(M, c, S.stroke);
15959
15961
  return (V.get("associationDirection") === "One" || V.get("associationDirection") === "Both") && (S.markerEnd = d(B, "association-end", K, oe)), V.get("associationDirection") === "Both" && (S.markerStart = d(B, "association-start", K, oe)), S = gt(S, [
15960
15962
  "markerStart",
15961
15963
  "markerEnd"
15962
- ]), v(B, C.waypoints, {
15964
+ ]), v(B, M.waypoints, {
15963
15965
  ...S,
15964
15966
  stroke: oe,
15965
15967
  strokeDasharray: "0, 5"
15966
15968
  });
15967
15969
  }
15968
- function we(B, C, S = {}) {
15969
- var V = ct(C, s, S.fill), K = Ce(C, c, S.stroke), oe = i.getScaledPath("DATA_OBJECT_PATH", {
15970
+ function we(B, M, S = {}) {
15971
+ var V = ct(M, s, S.fill), K = Ce(M, c, S.stroke), oe = i.getScaledPath("DATA_OBJECT_PATH", {
15970
15972
  xScaleFactor: 1,
15971
15973
  yScaleFactor: 1,
15972
- containerWidth: C.width,
15973
- containerHeight: C.height,
15974
+ containerWidth: M.width,
15975
+ containerHeight: M.height,
15974
15976
  position: {
15975
15977
  mx: 0.474,
15976
15978
  my: 0.296
@@ -15979,16 +15981,16 @@ function Xr(e, t, n, i, o, r, a) {
15979
15981
  fill: V,
15980
15982
  fillOpacity: pa,
15981
15983
  stroke: K
15982
- }), Qe = me(C);
15984
+ }), Qe = me(M);
15983
15985
  if (p2(Qe)) {
15984
15986
  var yt = i.getScaledPath("DATA_OBJECT_COLLECTION_PATH", {
15985
15987
  xScaleFactor: 1,
15986
15988
  yScaleFactor: 1,
15987
- containerWidth: C.width,
15988
- containerHeight: C.height,
15989
+ containerWidth: M.width,
15990
+ containerHeight: M.height,
15989
15991
  position: {
15990
15992
  mx: 0.33,
15991
- my: (C.height - 18) / C.height
15993
+ my: (M.height - 18) / M.height
15992
15994
  }
15993
15995
  });
15994
15996
  b(B, yt, {
@@ -15999,67 +16001,67 @@ function Xr(e, t, n, i, o, r, a) {
15999
16001
  }
16000
16002
  return _e;
16001
16003
  }
16002
- function U(B, C, S = {}) {
16003
- return h(B, C.width, C.height, {
16004
+ function U(B, M, S = {}) {
16005
+ return h(B, M.width, M.height, {
16004
16006
  fillOpacity: pa,
16005
16007
  ...S,
16006
- fill: ct(C, s, S.fill),
16007
- stroke: Ce(C, c, S.stroke)
16008
+ fill: ct(M, s, S.fill),
16009
+ stroke: Ce(M, c, S.stroke)
16008
16010
  });
16009
16011
  }
16010
- function ne(B, C, S = {}) {
16011
- return w(B, C.width, C.height, {
16012
- fill: ct(C, s, S.fill),
16012
+ function ne(B, M, S = {}) {
16013
+ return w(B, M.width, M.height, {
16014
+ fill: ct(M, s, S.fill),
16013
16015
  fillOpacity: pa,
16014
- stroke: Ce(C, c, S.stroke)
16016
+ stroke: Ce(M, c, S.stroke)
16015
16017
  });
16016
16018
  }
16017
- function q(B, C, S = {}) {
16018
- var V = m(B, Ei(C, S), ii(C, S), 0, {
16019
- fill: ct(C, s, S.fill),
16019
+ function q(B, M, S = {}) {
16020
+ var V = m(B, Ei(M, S), ii(M, S), 0, {
16021
+ fill: ct(M, s, S.fill),
16020
16022
  fillOpacity: S.fillOpacity || pa,
16021
- stroke: Ce(C, c, S.stroke),
16023
+ stroke: Ce(M, c, S.stroke),
16022
16024
  strokeWidth: 1.5
16023
- }), K = me(C);
16025
+ }), K = me(M);
16024
16026
  if (A(K, "bpmn:Lane")) {
16025
16027
  var oe = K.get("name");
16026
- ie(B, oe, C, S);
16028
+ ie(B, oe, M, S);
16027
16029
  }
16028
16030
  return V;
16029
16031
  }
16030
- function Z(B, C, S = {}) {
16031
- var V = se(B, C, S), K = lt(C);
16032
- if (Gn(C) && (Re(V, {
16032
+ function Z(B, M, S = {}) {
16033
+ var V = se(B, M, S), K = lt(M);
16034
+ if (Gn(M) && (Re(V, {
16033
16035
  strokeDasharray: "0, 5.5",
16034
16036
  strokeWidth: 2.5
16035
16037
  }), !K)) {
16036
- var oe = me(C).flowElements || [], _e = oe.filter((Qe) => A(Qe, "bpmn:StartEvent"));
16037
- _e.length === 1 && ue(_e[0], B, S, C);
16038
+ var oe = me(M).flowElements || [], _e = oe.filter((Qe) => A(Qe, "bpmn:StartEvent"));
16039
+ _e.length === 1 && ue(_e[0], B, S, M);
16038
16040
  }
16039
- return te(B, C, K ? "center-top" : "center-middle", S), K ? G(B, C, void 0, S) : G(B, C, ["SubProcessMarker"], S), V;
16041
+ return te(B, M, K ? "center-top" : "center-middle", S), K ? G(B, M, void 0, S) : G(B, M, ["SubProcessMarker"], S), V;
16040
16042
  }
16041
- function ue(B, C, S, V) {
16043
+ function ue(B, M, S, V) {
16042
16044
  var K = 22, oe = {
16043
16045
  fill: ct(V, s, S.fill),
16044
16046
  stroke: Ce(V, c, S.stroke),
16045
16047
  width: K,
16046
16048
  height: K
16047
16049
  }, _e = me(B).isInterrupting, Qe = _e ? 0 : 3, yt = _e ? 1 : 1.2, Ot = 20, xt = (K - Ot) / 2, en = "translate(" + xt + "," + xt + ")";
16048
- h(C, Ot, Ot, {
16050
+ h(M, Ot, Ot, {
16049
16051
  fill: oe.fill,
16050
16052
  stroke: oe.stroke,
16051
16053
  strokeWidth: yt,
16052
16054
  strokeDasharray: Qe,
16053
16055
  transform: en
16054
- }), T(B, C, oe, V);
16056
+ }), T(B, M, oe, V);
16055
16057
  }
16056
- function xe(B, C, S = {}) {
16057
- var V = se(B, C, S);
16058
- return te(B, C, "center-middle", S), G(B, C, void 0, S), V;
16058
+ function xe(B, M, S = {}) {
16059
+ var V = se(B, M, S);
16060
+ return te(B, M, "center-middle", S), G(B, M, void 0, S), V;
16059
16061
  }
16060
16062
  var Pe = this.handlers = {
16061
- "bpmn:AdHocSubProcess": function(B, C, S = {}) {
16062
- return lt(C) ? S = gt(S, [
16063
+ "bpmn:AdHocSubProcess": function(B, M, S = {}) {
16064
+ return lt(M) ? S = gt(S, [
16063
16065
  "fill",
16064
16066
  "stroke",
16065
16067
  "width",
@@ -16067,47 +16069,47 @@ function Xr(e, t, n, i, o, r, a) {
16067
16069
  ]) : S = gt(S, [
16068
16070
  "fill",
16069
16071
  "stroke"
16070
- ]), Z(B, C, S);
16072
+ ]), Z(B, M, S);
16071
16073
  },
16072
- "bpmn:Association": function(B, C, S = {}) {
16074
+ "bpmn:Association": function(B, M, S = {}) {
16073
16075
  return S = gt(S, [
16074
16076
  "fill",
16075
16077
  "stroke"
16076
- ]), ve(B, C, S);
16078
+ ]), ve(B, M, S);
16077
16079
  },
16078
- "bpmn:BoundaryEvent": function(B, C, S = {}) {
16080
+ "bpmn:BoundaryEvent": function(B, M, S = {}) {
16079
16081
  var { renderIcon: V = !0 } = S;
16080
16082
  S = gt(S, [
16081
16083
  "fill",
16082
16084
  "stroke"
16083
16085
  ]);
16084
- var K = me(C), oe = K.get("cancelActivity");
16086
+ var K = me(M), oe = K.get("cancelActivity");
16085
16087
  S = {
16086
16088
  strokeWidth: 1.5,
16087
- fill: ct(C, s, S.fill),
16089
+ fill: ct(M, s, S.fill),
16088
16090
  fillOpacity: v2,
16089
- stroke: Ce(C, c, S.stroke)
16091
+ stroke: Ce(M, c, S.stroke)
16090
16092
  }, oe || (S.strokeDasharray = "6");
16091
- var _e = U(B, C, S);
16092
- return h(B, C.width, C.height, Zc, {
16093
+ var _e = U(B, M, S);
16094
+ return h(B, M.width, M.height, Zc, {
16093
16095
  ...S,
16094
16096
  fill: "none"
16095
- }), V && T(C, B, S), _e;
16097
+ }), V && T(M, B, S), _e;
16096
16098
  },
16097
- "bpmn:BusinessRuleTask": function(B, C, S = {}) {
16099
+ "bpmn:BusinessRuleTask": function(B, M, S = {}) {
16098
16100
  S = gt(S, [
16099
16101
  "fill",
16100
16102
  "stroke"
16101
16103
  ]);
16102
- var V = xe(B, C, S), K = i.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN", {
16104
+ var V = xe(B, M, S), K = i.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN", {
16103
16105
  abspos: {
16104
16106
  x: 8,
16105
16107
  y: 8
16106
16108
  }
16107
16109
  }), oe = b(B, K);
16108
16110
  Re(oe, {
16109
- fill: ct(C, s, S.fill),
16110
- stroke: Ce(C, c, S.stroke),
16111
+ fill: ct(M, s, S.fill),
16112
+ stroke: Ce(M, c, S.stroke),
16111
16113
  strokeWidth: 1
16112
16114
  });
16113
16115
  var _e = i.getScaledPath("TASK_TYPE_BUSINESS_RULE_HEADER", {
@@ -16117,91 +16119,91 @@ function Xr(e, t, n, i, o, r, a) {
16117
16119
  }
16118
16120
  }), Qe = b(B, _e);
16119
16121
  return Re(Qe, {
16120
- fill: Ce(C, c, S.stroke),
16121
- stroke: Ce(C, c, S.stroke),
16122
+ fill: Ce(M, c, S.stroke),
16123
+ stroke: Ce(M, c, S.stroke),
16122
16124
  strokeWidth: 1
16123
16125
  }), V;
16124
16126
  },
16125
- "bpmn:CallActivity": function(B, C, S = {}) {
16127
+ "bpmn:CallActivity": function(B, M, S = {}) {
16126
16128
  return S = gt(S, [
16127
16129
  "fill",
16128
16130
  "stroke"
16129
- ]), Z(B, C, {
16131
+ ]), Z(B, M, {
16130
16132
  strokeWidth: 5,
16131
16133
  ...S
16132
16134
  });
16133
16135
  },
16134
- "bpmn:ComplexGateway": function(B, C, S = {}) {
16136
+ "bpmn:ComplexGateway": function(B, M, S = {}) {
16135
16137
  S = gt(S, [
16136
16138
  "fill",
16137
16139
  "stroke"
16138
16140
  ]);
16139
- var V = ne(B, C, S), K = i.getScaledPath("GATEWAY_COMPLEX", {
16141
+ var V = ne(B, M, S), K = i.getScaledPath("GATEWAY_COMPLEX", {
16140
16142
  xScaleFactor: 0.5,
16141
16143
  yScaleFactor: 0.5,
16142
- containerWidth: C.width,
16143
- containerHeight: C.height,
16144
+ containerWidth: M.width,
16145
+ containerHeight: M.height,
16144
16146
  position: {
16145
16147
  mx: 0.46,
16146
16148
  my: 0.26
16147
16149
  }
16148
16150
  });
16149
16151
  return b(B, K, {
16150
- fill: Ce(C, c, S.stroke),
16151
- stroke: Ce(C, c, S.stroke),
16152
+ fill: Ce(M, c, S.stroke),
16153
+ stroke: Ce(M, c, S.stroke),
16152
16154
  strokeWidth: 1
16153
16155
  }), V;
16154
16156
  },
16155
- "bpmn:DataInput": function(B, C, S = {}) {
16157
+ "bpmn:DataInput": function(B, M, S = {}) {
16156
16158
  S = gt(S, [
16157
16159
  "fill",
16158
16160
  "stroke"
16159
16161
  ]);
16160
- var V = i.getRawPath("DATA_ARROW"), K = we(B, C, S);
16162
+ var V = i.getRawPath("DATA_ARROW"), K = we(B, M, S);
16161
16163
  return b(B, V, {
16162
16164
  fill: "none",
16163
- stroke: Ce(C, c, S.stroke),
16165
+ stroke: Ce(M, c, S.stroke),
16164
16166
  strokeWidth: 1
16165
16167
  }), K;
16166
16168
  },
16167
- "bpmn:DataInputAssociation": function(B, C, S = {}) {
16169
+ "bpmn:DataInputAssociation": function(B, M, S = {}) {
16168
16170
  return S = gt(S, [
16169
16171
  "fill",
16170
16172
  "stroke"
16171
- ]), ve(B, C, {
16173
+ ]), ve(B, M, {
16172
16174
  ...S,
16173
- markerEnd: d(B, "association-end", ct(C, s, S.fill), Ce(C, c, S.stroke))
16175
+ markerEnd: d(B, "association-end", ct(M, s, S.fill), Ce(M, c, S.stroke))
16174
16176
  });
16175
16177
  },
16176
- "bpmn:DataObject": function(B, C, S = {}) {
16178
+ "bpmn:DataObject": function(B, M, S = {}) {
16177
16179
  return S = gt(S, [
16178
16180
  "fill",
16179
16181
  "stroke"
16180
- ]), we(B, C, S);
16182
+ ]), we(B, M, S);
16181
16183
  },
16182
16184
  "bpmn:DataObjectReference": D("bpmn:DataObject"),
16183
- "bpmn:DataOutput": function(B, C, S = {}) {
16185
+ "bpmn:DataOutput": function(B, M, S = {}) {
16184
16186
  S = gt(S, [
16185
16187
  "fill",
16186
16188
  "stroke"
16187
16189
  ]);
16188
- var V = i.getRawPath("DATA_ARROW"), K = we(B, C, S);
16190
+ var V = i.getRawPath("DATA_ARROW"), K = we(B, M, S);
16189
16191
  return b(B, V, {
16190
16192
  strokeWidth: 1,
16191
- fill: Ce(C, c, S.stroke),
16192
- stroke: Ce(C, c, S.stroke)
16193
+ fill: Ce(M, c, S.stroke),
16194
+ stroke: Ce(M, c, S.stroke)
16193
16195
  }), K;
16194
16196
  },
16195
- "bpmn:DataOutputAssociation": function(B, C, S = {}) {
16197
+ "bpmn:DataOutputAssociation": function(B, M, S = {}) {
16196
16198
  return S = gt(S, [
16197
16199
  "fill",
16198
16200
  "stroke"
16199
- ]), ve(B, C, {
16201
+ ]), ve(B, M, {
16200
16202
  ...S,
16201
- markerEnd: d(B, "association-end", ct(C, s, S.fill), Ce(C, c, S.stroke))
16203
+ markerEnd: d(B, "association-end", ct(M, s, S.fill), Ce(M, c, S.stroke))
16202
16204
  });
16203
16205
  },
16204
- "bpmn:DataStoreReference": function(B, C, S = {}) {
16206
+ "bpmn:DataStoreReference": function(B, M, S = {}) {
16205
16207
  S = gt(S, [
16206
16208
  "fill",
16207
16209
  "stroke"
@@ -16209,41 +16211,41 @@ function Xr(e, t, n, i, o, r, a) {
16209
16211
  var V = i.getScaledPath("DATA_STORE", {
16210
16212
  xScaleFactor: 1,
16211
16213
  yScaleFactor: 1,
16212
- containerWidth: C.width,
16213
- containerHeight: C.height,
16214
+ containerWidth: M.width,
16215
+ containerHeight: M.height,
16214
16216
  position: {
16215
16217
  mx: 0,
16216
16218
  my: 0.133
16217
16219
  }
16218
16220
  });
16219
16221
  return b(B, V, {
16220
- fill: ct(C, s, S.fill),
16222
+ fill: ct(M, s, S.fill),
16221
16223
  fillOpacity: pa,
16222
- stroke: Ce(C, c, S.stroke),
16224
+ stroke: Ce(M, c, S.stroke),
16223
16225
  strokeWidth: 2
16224
16226
  });
16225
16227
  },
16226
- "bpmn:EndEvent": function(B, C, S = {}) {
16228
+ "bpmn:EndEvent": function(B, M, S = {}) {
16227
16229
  var { renderIcon: V = !0 } = S;
16228
16230
  S = gt(S, [
16229
16231
  "fill",
16230
16232
  "stroke"
16231
16233
  ]);
16232
- var K = U(B, C, {
16234
+ var K = U(B, M, {
16233
16235
  ...S,
16234
16236
  strokeWidth: 4
16235
16237
  });
16236
- return V && T(C, B, S), K;
16238
+ return V && T(M, B, S), K;
16237
16239
  },
16238
- "bpmn:EventBasedGateway": function(B, C, S = {}) {
16240
+ "bpmn:EventBasedGateway": function(B, M, S = {}) {
16239
16241
  S = gt(S, [
16240
16242
  "fill",
16241
16243
  "stroke"
16242
16244
  ]);
16243
- var V = me(C), K = ne(B, C, S);
16244
- h(B, C.width, C.height, C.height * 0.2, {
16245
- fill: ct(C, "none", S.fill),
16246
- stroke: Ce(C, c, S.stroke),
16245
+ var V = me(M), K = ne(B, M, S);
16246
+ h(B, M.width, M.height, M.height * 0.2, {
16247
+ fill: ct(M, "none", S.fill),
16248
+ stroke: Ce(M, c, S.stroke),
16247
16249
  strokeWidth: 1
16248
16250
  });
16249
16251
  var oe = V.get("eventGatewayType"), _e = !!V.get("instantiate");
@@ -16251,8 +16253,8 @@ function Xr(e, t, n, i, o, r, a) {
16251
16253
  var Ot = i.getScaledPath("GATEWAY_EVENT_BASED", {
16252
16254
  xScaleFactor: 0.18,
16253
16255
  yScaleFactor: 0.18,
16254
- containerWidth: C.width,
16255
- containerHeight: C.height,
16256
+ containerWidth: M.width,
16257
+ containerHeight: M.height,
16256
16258
  position: {
16257
16259
  mx: 0.36,
16258
16260
  my: 0.44
@@ -16260,7 +16262,7 @@ function Xr(e, t, n, i, o, r, a) {
16260
16262
  });
16261
16263
  b(B, Ot, {
16262
16264
  fill: "none",
16263
- stroke: Ce(C, c, S.stroke),
16265
+ stroke: Ce(M, c, S.stroke),
16264
16266
  strokeWidth: 2
16265
16267
  });
16266
16268
  }
@@ -16268,8 +16270,8 @@ function Xr(e, t, n, i, o, r, a) {
16268
16270
  var yt = i.getScaledPath("GATEWAY_PARALLEL", {
16269
16271
  xScaleFactor: 0.4,
16270
16272
  yScaleFactor: 0.4,
16271
- containerWidth: C.width,
16272
- containerHeight: C.height,
16273
+ containerWidth: M.width,
16274
+ containerHeight: M.height,
16273
16275
  position: {
16274
16276
  mx: 0.474,
16275
16277
  my: 0.296
@@ -16277,123 +16279,123 @@ function Xr(e, t, n, i, o, r, a) {
16277
16279
  });
16278
16280
  b(B, yt, {
16279
16281
  fill: "none",
16280
- stroke: Ce(C, c, S.stroke),
16282
+ stroke: Ce(M, c, S.stroke),
16281
16283
  strokeWidth: 1
16282
16284
  });
16283
- } else oe === "Exclusive" && (_e || h(B, C.width, C.height, C.height * 0.26, {
16285
+ } else oe === "Exclusive" && (_e || h(B, M.width, M.height, M.height * 0.26, {
16284
16286
  fill: "none",
16285
- stroke: Ce(C, c, S.stroke),
16287
+ stroke: Ce(M, c, S.stroke),
16286
16288
  strokeWidth: 1
16287
16289
  }), Qe());
16288
16290
  return K;
16289
16291
  },
16290
- "bpmn:ExclusiveGateway": function(B, C, S = {}) {
16292
+ "bpmn:ExclusiveGateway": function(B, M, S = {}) {
16291
16293
  S = gt(S, [
16292
16294
  "fill",
16293
16295
  "stroke"
16294
16296
  ]);
16295
- var V = ne(B, C, S), K = i.getScaledPath("GATEWAY_EXCLUSIVE", {
16297
+ var V = ne(B, M, S), K = i.getScaledPath("GATEWAY_EXCLUSIVE", {
16296
16298
  xScaleFactor: 0.4,
16297
16299
  yScaleFactor: 0.4,
16298
- containerWidth: C.width,
16299
- containerHeight: C.height,
16300
+ containerWidth: M.width,
16301
+ containerHeight: M.height,
16300
16302
  position: {
16301
16303
  mx: 0.32,
16302
16304
  my: 0.3
16303
16305
  }
16304
- }), oe = mt(C);
16306
+ }), oe = mt(M);
16305
16307
  return oe.get("isMarkerVisible") && b(B, K, {
16306
- fill: Ce(C, c, S.stroke),
16307
- stroke: Ce(C, c, S.stroke),
16308
+ fill: Ce(M, c, S.stroke),
16309
+ stroke: Ce(M, c, S.stroke),
16308
16310
  strokeWidth: 1
16309
16311
  }), V;
16310
16312
  },
16311
- "bpmn:Gateway": function(B, C, S = {}) {
16313
+ "bpmn:Gateway": function(B, M, S = {}) {
16312
16314
  return S = gt(S, [
16313
16315
  "fill",
16314
16316
  "stroke"
16315
- ]), ne(B, C, S);
16317
+ ]), ne(B, M, S);
16316
16318
  },
16317
- "bpmn:Group": function(B, C, S = {}) {
16319
+ "bpmn:Group": function(B, M, S = {}) {
16318
16320
  return S = gt(S, [
16319
16321
  "fill",
16320
16322
  "stroke",
16321
16323
  "width",
16322
16324
  "height"
16323
- ]), m(B, C.width, C.height, kl, {
16324
- stroke: Ce(C, c, S.stroke),
16325
+ ]), m(B, M.width, M.height, kl, {
16326
+ stroke: Ce(M, c, S.stroke),
16325
16327
  strokeWidth: 1.5,
16326
16328
  strokeDasharray: "10, 6, 0, 6",
16327
16329
  fill: "none",
16328
16330
  pointerEvents: "none",
16329
- width: Ei(C, S),
16330
- height: ii(C, S)
16331
+ width: Ei(M, S),
16332
+ height: ii(M, S)
16331
16333
  });
16332
16334
  },
16333
- "bpmn:InclusiveGateway": function(B, C, S = {}) {
16335
+ "bpmn:InclusiveGateway": function(B, M, S = {}) {
16334
16336
  S = gt(S, [
16335
16337
  "fill",
16336
16338
  "stroke"
16337
16339
  ]);
16338
- var V = ne(B, C, S);
16339
- return h(B, C.width, C.height, C.height * 0.24, {
16340
- fill: ct(C, s, S.fill),
16341
- stroke: Ce(C, c, S.stroke),
16340
+ var V = ne(B, M, S);
16341
+ return h(B, M.width, M.height, M.height * 0.24, {
16342
+ fill: ct(M, s, S.fill),
16343
+ stroke: Ce(M, c, S.stroke),
16342
16344
  strokeWidth: 2.5
16343
16345
  }), V;
16344
16346
  },
16345
- "bpmn:IntermediateEvent": function(B, C, S = {}) {
16347
+ "bpmn:IntermediateEvent": function(B, M, S = {}) {
16346
16348
  var { renderIcon: V = !0 } = S;
16347
16349
  S = gt(S, [
16348
16350
  "fill",
16349
16351
  "stroke"
16350
16352
  ]);
16351
- var K = U(B, C, {
16353
+ var K = U(B, M, {
16352
16354
  ...S,
16353
16355
  strokeWidth: 1.5
16354
16356
  });
16355
- return h(B, C.width, C.height, Zc, {
16357
+ return h(B, M.width, M.height, Zc, {
16356
16358
  fill: "none",
16357
- stroke: Ce(C, c, S.stroke),
16359
+ stroke: Ce(M, c, S.stroke),
16358
16360
  strokeWidth: 1.5
16359
- }), V && T(C, B, S), K;
16361
+ }), V && T(M, B, S), K;
16360
16362
  },
16361
16363
  "bpmn:IntermediateCatchEvent": D("bpmn:IntermediateEvent"),
16362
16364
  "bpmn:IntermediateThrowEvent": D("bpmn:IntermediateEvent"),
16363
- "bpmn:Lane": function(B, C, S = {}) {
16365
+ "bpmn:Lane": function(B, M, S = {}) {
16364
16366
  return S = gt(S, [
16365
16367
  "fill",
16366
16368
  "stroke",
16367
16369
  "width",
16368
16370
  "height"
16369
- ]), q(B, C, {
16371
+ ]), q(B, M, {
16370
16372
  ...S,
16371
16373
  fillOpacity: x2
16372
16374
  });
16373
16375
  },
16374
- "bpmn:ManualTask": function(B, C, S = {}) {
16376
+ "bpmn:ManualTask": function(B, M, S = {}) {
16375
16377
  S = gt(S, [
16376
16378
  "fill",
16377
16379
  "stroke"
16378
16380
  ]);
16379
- var V = xe(B, C, S), K = i.getScaledPath("TASK_TYPE_MANUAL", {
16381
+ var V = xe(B, M, S), K = i.getScaledPath("TASK_TYPE_MANUAL", {
16380
16382
  abspos: {
16381
16383
  x: 17,
16382
16384
  y: 15
16383
16385
  }
16384
16386
  });
16385
16387
  return b(B, K, {
16386
- fill: ct(C, s, S.fill),
16387
- stroke: Ce(C, c, S.stroke),
16388
+ fill: ct(M, s, S.fill),
16389
+ stroke: Ce(M, c, S.stroke),
16388
16390
  strokeWidth: 0.5
16389
16391
  }), V;
16390
16392
  },
16391
- "bpmn:MessageFlow": function(B, C, S = {}) {
16393
+ "bpmn:MessageFlow": function(B, M, S = {}) {
16392
16394
  S = gt(S, [
16393
16395
  "fill",
16394
16396
  "stroke"
16395
16397
  ]);
16396
- var V = me(C), K = mt(C), oe = ct(C, s, S.fill), _e = Ce(C, c, S.stroke), Qe = v(B, C.waypoints, {
16398
+ var V = me(M), K = mt(M), oe = ct(M, s, S.fill), _e = Ce(M, c, S.stroke), Qe = v(B, M.waypoints, {
16397
16399
  markerEnd: d(B, "messageflow-end", oe, _e),
16398
16400
  markerStart: d(B, "messageflow-start", oe, _e),
16399
16401
  stroke: _e,
@@ -16421,35 +16423,35 @@ function Xr(e, t, n, i, o, r, a) {
16421
16423
  }
16422
16424
  return Qe;
16423
16425
  },
16424
- "bpmn:ParallelGateway": function(B, C, S = {}) {
16426
+ "bpmn:ParallelGateway": function(B, M, S = {}) {
16425
16427
  S = gt(S, [
16426
16428
  "fill",
16427
16429
  "stroke"
16428
16430
  ]);
16429
- var V = ne(B, C, S), K = i.getScaledPath("GATEWAY_PARALLEL", {
16431
+ var V = ne(B, M, S), K = i.getScaledPath("GATEWAY_PARALLEL", {
16430
16432
  xScaleFactor: 0.6,
16431
16433
  yScaleFactor: 0.6,
16432
- containerWidth: C.width,
16433
- containerHeight: C.height,
16434
+ containerWidth: M.width,
16435
+ containerHeight: M.height,
16434
16436
  position: {
16435
16437
  mx: 0.46,
16436
16438
  my: 0.2
16437
16439
  }
16438
16440
  });
16439
16441
  return b(B, K, {
16440
- fill: Ce(C, c, S.stroke),
16441
- stroke: Ce(C, c, S.stroke),
16442
+ fill: Ce(M, c, S.stroke),
16443
+ stroke: Ce(M, c, S.stroke),
16442
16444
  strokeWidth: 1
16443
16445
  }), V;
16444
16446
  },
16445
- "bpmn:Participant": function(B, C, S = {}) {
16447
+ "bpmn:Participant": function(B, M, S = {}) {
16446
16448
  S = gt(S, [
16447
16449
  "fill",
16448
16450
  "stroke",
16449
16451
  "width",
16450
16452
  "height"
16451
16453
  ]);
16452
- var V = q(B, C, S), K = lt(C), oe = wn(C), _e = me(C), Qe = _e.get("name");
16454
+ var V = q(B, M, S), K = lt(M), oe = wn(M), _e = me(M), Qe = _e.get("name");
16453
16455
  if (K) {
16454
16456
  var yt = oe ? [
16455
16457
  {
@@ -16458,7 +16460,7 @@ function Xr(e, t, n, i, o, r, a) {
16458
16460
  },
16459
16461
  {
16460
16462
  x: 30,
16461
- y: ii(C, S)
16463
+ y: ii(M, S)
16462
16464
  }
16463
16465
  ] : [
16464
16466
  {
@@ -16466,40 +16468,40 @@ function Xr(e, t, n, i, o, r, a) {
16466
16468
  y: 30
16467
16469
  },
16468
16470
  {
16469
- x: Ei(C, S),
16471
+ x: Ei(M, S),
16470
16472
  y: 30
16471
16473
  }
16472
16474
  ];
16473
16475
  y(B, yt, {
16474
- stroke: Ce(C, c, S.stroke),
16476
+ stroke: Ce(M, c, S.stroke),
16475
16477
  strokeWidth: m2
16476
- }), ie(B, Qe, C, S);
16478
+ }), ie(B, Qe, M, S);
16477
16479
  } else {
16478
- var Ot = ps(C, S);
16479
- oe || (Ot.height = Ei(C, S), Ot.width = ii(C, S));
16480
+ var Ot = ps(M, S);
16481
+ oe || (Ot.height = Ei(M, S), Ot.width = ii(M, S));
16480
16482
  var xt = X(B, Qe, {
16481
16483
  box: Ot,
16482
16484
  align: "center-middle",
16483
16485
  style: {
16484
- fill: us(C, l, c, S.stroke)
16486
+ fill: us(M, l, c, S.stroke)
16485
16487
  }
16486
16488
  });
16487
16489
  if (!oe) {
16488
- var en = -1 * ii(C, S);
16490
+ var en = -1 * ii(M, S);
16489
16491
  Pl(xt, 0, -en, 270);
16490
16492
  }
16491
16493
  }
16492
- return _e.get("participantMultiplicity") && j("ParticipantMultiplicityMarker", B, C, S), V;
16494
+ return _e.get("participantMultiplicity") && j("ParticipantMultiplicityMarker", B, M, S), V;
16493
16495
  },
16494
- "bpmn:ReceiveTask": function(B, C, S = {}) {
16496
+ "bpmn:ReceiveTask": function(B, M, S = {}) {
16495
16497
  S = gt(S, [
16496
16498
  "fill",
16497
16499
  "stroke"
16498
16500
  ]);
16499
- var V = me(C), K = xe(B, C, S), oe;
16501
+ var V = me(M), K = xe(B, M, S), oe;
16500
16502
  return V.get("instantiate") ? (h(B, 28, 28, 20 * 0.22, {
16501
- fill: ct(C, s, S.fill),
16502
- stroke: Ce(C, c, S.stroke),
16503
+ fill: ct(M, s, S.fill),
16504
+ stroke: Ce(M, c, S.stroke),
16503
16505
  strokeWidth: 1
16504
16506
  }), oe = i.getScaledPath("TASK_TYPE_INSTANTIATING_SEND", {
16505
16507
  abspos: {
@@ -16516,34 +16518,34 @@ function Xr(e, t, n, i, o, r, a) {
16516
16518
  my: 0.4
16517
16519
  }
16518
16520
  }), b(B, oe, {
16519
- fill: ct(C, s, S.fill),
16520
- stroke: Ce(C, c, S.stroke),
16521
+ fill: ct(M, s, S.fill),
16522
+ stroke: Ce(M, c, S.stroke),
16521
16523
  strokeWidth: 1
16522
16524
  }), K;
16523
16525
  },
16524
- "bpmn:ScriptTask": function(B, C, S = {}) {
16526
+ "bpmn:ScriptTask": function(B, M, S = {}) {
16525
16527
  S = gt(S, [
16526
16528
  "fill",
16527
16529
  "stroke"
16528
16530
  ]);
16529
- var V = xe(B, C, S), K = i.getScaledPath("TASK_TYPE_SCRIPT", {
16531
+ var V = xe(B, M, S), K = i.getScaledPath("TASK_TYPE_SCRIPT", {
16530
16532
  abspos: {
16531
16533
  x: 15,
16532
16534
  y: 20
16533
16535
  }
16534
16536
  });
16535
16537
  return b(B, K, {
16536
- fill: ct(C, s, S.fill),
16537
- stroke: Ce(C, c, S.stroke),
16538
+ fill: ct(M, s, S.fill),
16539
+ stroke: Ce(M, c, S.stroke),
16538
16540
  strokeWidth: 1
16539
16541
  }), V;
16540
16542
  },
16541
- "bpmn:SendTask": function(B, C, S = {}) {
16543
+ "bpmn:SendTask": function(B, M, S = {}) {
16542
16544
  S = gt(S, [
16543
16545
  "fill",
16544
16546
  "stroke"
16545
16547
  ]);
16546
- var V = xe(B, C, S), K = i.getScaledPath("TASK_TYPE_SEND", {
16548
+ var V = xe(B, M, S), K = i.getScaledPath("TASK_TYPE_SEND", {
16547
16549
  xScaleFactor: 1,
16548
16550
  yScaleFactor: 1,
16549
16551
  containerWidth: 21,
@@ -16554,20 +16556,20 @@ function Xr(e, t, n, i, o, r, a) {
16554
16556
  }
16555
16557
  });
16556
16558
  return b(B, K, {
16557
- fill: Ce(C, c, S.stroke),
16558
- stroke: ct(C, s, S.fill),
16559
+ fill: Ce(M, c, S.stroke),
16560
+ stroke: ct(M, s, S.fill),
16559
16561
  strokeWidth: 1
16560
16562
  }), V;
16561
16563
  },
16562
- "bpmn:SequenceFlow": function(B, C, S = {}) {
16564
+ "bpmn:SequenceFlow": function(B, M, S = {}) {
16563
16565
  S = gt(S, [
16564
16566
  "fill",
16565
16567
  "stroke"
16566
16568
  ]);
16567
- var V = ct(C, s, S.fill), K = Ce(C, c, S.stroke), oe = v(B, C.waypoints, {
16569
+ var V = ct(M, s, S.fill), K = Ce(M, c, S.stroke), oe = v(B, M.waypoints, {
16568
16570
  markerEnd: d(B, "sequenceflow-end", V, K),
16569
16571
  stroke: K
16570
- }), _e = me(C), { source: Qe } = C;
16572
+ }), _e = me(M), { source: Qe } = M;
16571
16573
  if (Qe) {
16572
16574
  var yt = me(Qe);
16573
16575
  _e.get("conditionExpression") && A(yt, "bpmn:Activity") && Re(oe, {
@@ -16578,14 +16580,14 @@ function Xr(e, t, n, i, o, r, a) {
16578
16580
  }
16579
16581
  return oe;
16580
16582
  },
16581
- "bpmn:ServiceTask": function(B, C, S = {}) {
16583
+ "bpmn:ServiceTask": function(B, M, S = {}) {
16582
16584
  S = gt(S, [
16583
16585
  "fill",
16584
16586
  "stroke"
16585
16587
  ]);
16586
- var V = xe(B, C, S);
16588
+ var V = xe(B, M, S);
16587
16589
  h(B, 10, 10, {
16588
- fill: ct(C, s, S.fill),
16590
+ fill: ct(M, s, S.fill),
16589
16591
  stroke: "none",
16590
16592
  transform: "translate(6, 6)"
16591
16593
  });
@@ -16596,11 +16598,11 @@ function Xr(e, t, n, i, o, r, a) {
16596
16598
  }
16597
16599
  });
16598
16600
  b(B, K, {
16599
- fill: ct(C, s, S.fill),
16600
- stroke: Ce(C, c, S.stroke),
16601
+ fill: ct(M, s, S.fill),
16602
+ stroke: Ce(M, c, S.stroke),
16601
16603
  strokeWidth: 1
16602
16604
  }), h(B, 10, 10, {
16603
- fill: ct(C, s, S.fill),
16605
+ fill: ct(M, s, S.fill),
16604
16606
  stroke: "none",
16605
16607
  transform: "translate(11, 10)"
16606
16608
  });
@@ -16611,27 +16613,27 @@ function Xr(e, t, n, i, o, r, a) {
16611
16613
  }
16612
16614
  });
16613
16615
  return b(B, oe, {
16614
- fill: ct(C, s, S.fill),
16615
- stroke: Ce(C, c, S.stroke),
16616
+ fill: ct(M, s, S.fill),
16617
+ stroke: Ce(M, c, S.stroke),
16616
16618
  strokeWidth: 1
16617
16619
  }), V;
16618
16620
  },
16619
- "bpmn:StartEvent": function(B, C, S = {}) {
16621
+ "bpmn:StartEvent": function(B, M, S = {}) {
16620
16622
  var { renderIcon: V = !0 } = S;
16621
16623
  S = gt(S, [
16622
16624
  "fill",
16623
16625
  "stroke"
16624
16626
  ]);
16625
- var K = me(C);
16627
+ var K = me(M);
16626
16628
  K.get("isInterrupting") || (S = {
16627
16629
  ...S,
16628
16630
  strokeDasharray: "6"
16629
16631
  });
16630
- var oe = U(B, C, S);
16631
- return V && T(C, B, S), oe;
16632
+ var oe = U(B, M, S);
16633
+ return V && T(M, B, S), oe;
16632
16634
  },
16633
- "bpmn:SubProcess": function(B, C, S = {}) {
16634
- return lt(C) ? S = gt(S, [
16635
+ "bpmn:SubProcess": function(B, M, S = {}) {
16636
+ return lt(M) ? S = gt(S, [
16635
16637
  "fill",
16636
16638
  "stroke",
16637
16639
  "width",
@@ -16639,15 +16641,15 @@ function Xr(e, t, n, i, o, r, a) {
16639
16641
  ]) : S = gt(S, [
16640
16642
  "fill",
16641
16643
  "stroke"
16642
- ]), Z(B, C, S);
16644
+ ]), Z(B, M, S);
16643
16645
  },
16644
- "bpmn:Task": function(B, C, S = {}) {
16646
+ "bpmn:Task": function(B, M, S = {}) {
16645
16647
  return S = gt(S, [
16646
16648
  "fill",
16647
16649
  "stroke"
16648
- ]), xe(B, C, S);
16650
+ ]), xe(B, M, S);
16649
16651
  },
16650
- "bpmn:TextAnnotation": function(B, C, S = {}) {
16652
+ "bpmn:TextAnnotation": function(B, M, S = {}) {
16651
16653
  S = gt(S, [
16652
16654
  "fill",
16653
16655
  "stroke"
@@ -16655,7 +16657,7 @@ function Xr(e, t, n, i, o, r, a) {
16655
16657
  var {
16656
16658
  width: V,
16657
16659
  height: K
16658
- } = ps(C, S), oe = m(B, V, K, 0, 0, {
16660
+ } = ps(M, S), oe = m(B, V, K, 0, 0, {
16659
16661
  fill: "none",
16660
16662
  stroke: "none"
16661
16663
  }), _e = i.getScaledPath("TEXT_ANNOTATION", {
@@ -16669,20 +16671,20 @@ function Xr(e, t, n, i, o, r, a) {
16669
16671
  }
16670
16672
  });
16671
16673
  b(B, _e, {
16672
- stroke: Ce(C, c, S.stroke)
16674
+ stroke: Ce(M, c, S.stroke)
16673
16675
  });
16674
- var Qe = me(C), yt = Qe.get("text") || "";
16676
+ var Qe = me(M), yt = Qe.get("text") || "";
16675
16677
  return X(B, yt, {
16676
16678
  align: "left-top",
16677
- box: ps(C, S),
16679
+ box: ps(M, S),
16678
16680
  padding: wa,
16679
16681
  style: {
16680
- fill: us(C, l, c, S.stroke)
16682
+ fill: us(M, l, c, S.stroke)
16681
16683
  }
16682
16684
  }), oe;
16683
16685
  },
16684
- "bpmn:Transaction": function(B, C, S = {}) {
16685
- lt(C) ? S = gt(S, [
16686
+ "bpmn:Transaction": function(B, M, S = {}) {
16687
+ lt(M) ? S = gt(S, [
16686
16688
  "fill",
16687
16689
  "stroke",
16688
16690
  "width",
@@ -16691,36 +16693,36 @@ function Xr(e, t, n, i, o, r, a) {
16691
16693
  "fill",
16692
16694
  "stroke"
16693
16695
  ]);
16694
- var V = Z(B, C, {
16696
+ var V = Z(B, M, {
16695
16697
  strokeWidth: 1.5,
16696
16698
  ...S
16697
16699
  }), K = n.style(["no-fill", "no-events"], {
16698
- stroke: Ce(C, c, S.stroke),
16700
+ stroke: Ce(M, c, S.stroke),
16699
16701
  strokeWidth: 1.5
16700
- }), oe = lt(C);
16702
+ }), oe = lt(M);
16701
16703
  return oe || (S = {}), m(
16702
16704
  B,
16703
- Ei(C, S),
16704
- ii(C, S),
16705
+ Ei(M, S),
16706
+ ii(M, S),
16705
16707
  kl - Zc,
16706
16708
  Zc,
16707
16709
  K
16708
16710
  ), V;
16709
16711
  },
16710
- "bpmn:UserTask": function(B, C, S = {}) {
16712
+ "bpmn:UserTask": function(B, M, S = {}) {
16711
16713
  S = gt(S, [
16712
16714
  "fill",
16713
16715
  "stroke"
16714
16716
  ]);
16715
- var V = xe(B, C, S), K = 15, oe = 12, _e = i.getScaledPath("TASK_TYPE_USER_1", {
16717
+ var V = xe(B, M, S), K = 15, oe = 12, _e = i.getScaledPath("TASK_TYPE_USER_1", {
16716
16718
  abspos: {
16717
16719
  x: K,
16718
16720
  y: oe
16719
16721
  }
16720
16722
  });
16721
16723
  b(B, _e, {
16722
- fill: ct(C, s, S.fill),
16723
- stroke: Ce(C, c, S.stroke),
16724
+ fill: ct(M, s, S.fill),
16725
+ stroke: Ce(M, c, S.stroke),
16724
16726
  strokeWidth: 0.5
16725
16727
  });
16726
16728
  var Qe = i.getScaledPath("TASK_TYPE_USER_2", {
@@ -16730,8 +16732,8 @@ function Xr(e, t, n, i, o, r, a) {
16730
16732
  }
16731
16733
  });
16732
16734
  b(B, Qe, {
16733
- fill: ct(C, s, S.fill),
16734
- stroke: Ce(C, c, S.stroke),
16735
+ fill: ct(M, s, S.fill),
16736
+ stroke: Ce(M, c, S.stroke),
16735
16737
  strokeWidth: 0.5
16736
16738
  });
16737
16739
  var yt = i.getScaledPath("TASK_TYPE_USER_3", {
@@ -16741,13 +16743,13 @@ function Xr(e, t, n, i, o, r, a) {
16741
16743
  }
16742
16744
  });
16743
16745
  return b(B, yt, {
16744
- fill: Ce(C, c, S.stroke),
16745
- stroke: Ce(C, c, S.stroke),
16746
+ fill: Ce(M, c, S.stroke),
16747
+ stroke: Ce(M, c, S.stroke),
16746
16748
  strokeWidth: 0.5
16747
16749
  }), V;
16748
16750
  },
16749
- label: function(B, C, S = {}) {
16750
- return J(B, C, S);
16751
+ label: function(B, M, S = {}) {
16752
+ return J(B, M, S);
16751
16753
  }
16752
16754
  };
16753
16755
  this._drawPath = b, this._renderer = R;