@omg-dev/app 0.5.1 → 0.6.2

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.
Files changed (114) hide show
  1. package/dist-lib/{ChangelogPage-BzsTWlhq.js → ChangelogPage-CirRyMnC.js} +54 -1
  2. package/dist-lib/{File-B-qYa2zY.js → File-DQRr5F_e.js} +1761 -1826
  3. package/dist-lib/FileEditor-BrI3dfcp.js +6895 -0
  4. package/dist-lib/FileTreePane-J8P-OiHb.js +8413 -0
  5. package/dist-lib/{FileViewer-Clmf04v1.js → FileViewer-DRrfus7c.js} +1 -1
  6. package/dist-lib/{SessionFilesPanel-K4lGGdJ4.js → SessionFilesPanel-W4QKB0HL.js} +64 -64
  7. package/dist-lib/{TermView-CWr-zJmM.js → TermView-CoD-VkHs.js} +495 -520
  8. package/dist-lib/{abnfDiagram-VRR7QNED-Chn1Z_p9.js → abnfDiagram-VRR7QNED-CiXfOnAu.js} +4 -4
  9. package/dist-lib/{arc-B652oHQ-.js → arc-QOMNKQA5.js} +1 -1
  10. package/dist-lib/{architectureDiagram-ZJ3FMSHR-CMatArpz.js → architectureDiagram-ZJ3FMSHR-BcFBTmfD.js} +2059 -2064
  11. package/dist-lib/{blockDiagram-677ZJIJ3-CEOPfI9A.js → blockDiagram-677ZJIJ3-Qj8-RIV3.js} +920 -925
  12. package/dist-lib/{c4Diagram-LMCZKHZV-DcUHrESL.js → c4Diagram-LMCZKHZV-BpinEmj4.js} +598 -593
  13. package/dist-lib/{channel-B5lJFbed.js → channel-D6YHMmF7.js} +1 -1
  14. package/dist-lib/{chat-engine-P0yDhFOX.js → chat-engine-CRzDKNTH.js} +1173 -1218
  15. package/dist-lib/chunk-2Q5K7J3B-CFSi414U.js +18 -0
  16. package/dist-lib/{chunk-32BRIVSS-IYmNSvH8.js → chunk-32BRIVSS-DvywQiCk.js} +1 -1
  17. package/dist-lib/{chunk-5VM5RSS4-DO2g-xIj.js → chunk-5VM5RSS4-xd6XuI9Q.js} +1 -1
  18. package/dist-lib/{chunk-BO2N2NFS-kYiI5SD9.js → chunk-BO2N2NFS-BbJdm-59.js} +4892 -4903
  19. package/dist-lib/{chunk-EX3LRPZG-N96wfks9.js → chunk-EX3LRPZG-BLDKx-Yg.js} +507 -514
  20. package/dist-lib/chunk-JWPE2WC7-DnwG7Xzp.js +8 -0
  21. package/dist-lib/chunk-MOJQB5TN-BrENeFT5.js +670 -0
  22. package/dist-lib/chunk-RYQCIY6F-I-J4fVFd.js +313 -0
  23. package/dist-lib/{chunk-V7JOEXUC-DQwf2vkP.js → chunk-V7JOEXUC-Bkakcs1-.js} +458 -453
  24. package/dist-lib/chunk-VR4S4FIN-BDq3jZ0m.js +19 -0
  25. package/dist-lib/{chunk-XXDRQBXY-Ccv4aRcn.js → chunk-XXDRQBXY-DRKeYnrF.js} +1 -1
  26. package/dist-lib/{classDiagram-v2-EOCWNBFH-DOn-rhuL.js → classDiagram-OUVF2IWQ-DISUfvR5.js} +2 -2
  27. package/dist-lib/{classDiagram-OUVF2IWQ-DOn-rhuL.js → classDiagram-v2-EOCWNBFH-DISUfvR5.js} +2 -2
  28. package/dist-lib/{coding-agents-page-DCafIpWL.js → coding-agents-page-OER8HHRF.js} +152 -131
  29. package/dist-lib/computer-page-D9cSNLa9.js +8990 -0
  30. package/dist-lib/{cose-bilkent-JH36ORCC-C-tACTrT.js → cose-bilkent-JH36ORCC-DCfmoChv.js} +281 -281
  31. package/dist-lib/{create-BrnHvSDE.js → create-CBk9uwJH.js} +2 -2
  32. package/dist-lib/cynefin-VYW2F7L2-XAY3mHv8.js +24430 -0
  33. package/dist-lib/{cynefinDiagram-TSTJHNR4-Be7CamD2.js → cynefinDiagram-TSTJHNR4-CrgvPEr1.js} +3 -3
  34. package/dist-lib/{cytoscape.esm-B0ledd6M.js → cytoscape.esm-BB6Ga9He.js} +3 -3
  35. package/dist-lib/dagre-VKFMJZFB-CE5k06mJ.js +343 -0
  36. package/dist-lib/{diagram-FQU43EPY-Jg12ow4Z.js → diagram-FQU43EPY-gOcCiJEN.js} +136 -139
  37. package/dist-lib/diagram-G47NLZAW-BVJLfRsd.js +531 -0
  38. package/dist-lib/diagram-NH7WQ7WH-u6QnHasL.js +145 -0
  39. package/dist-lib/diagram-OA4YK3LP-D4Kcl3uM.js +350 -0
  40. package/dist-lib/{diagram-WEI45ONY-D1kKPOc_.js → diagram-WEI45ONY-6a__oIb0.js} +38 -42
  41. package/dist-lib/{ebnfDiagram-CCIWWBDH-BhQWrGMc.js → ebnfDiagram-CCIWWBDH-PXSrB6lG.js} +4 -4
  42. package/dist-lib/{embedded-CLYU5z7h.js → embedded-DqTPdMCh.js} +10561 -10581
  43. package/dist-lib/{engine-compile-BeDRSL6Y.js → engine-compile-D_stzVMa.js} +2939 -2991
  44. package/dist-lib/{erDiagram-Q63AITRT-D2q6Nmwa.js → erDiagram-Q63AITRT-BbsttUCs.js} +286 -284
  45. package/dist-lib/flowDiagram-23GEKE2U-CX5x3zVA.js +1641 -0
  46. package/dist-lib/{ganttDiagram-NO4QXBWP-C_Lj-cJB.js → ganttDiagram-NO4QXBWP-Bq0aSPs8.js} +2 -2
  47. package/dist-lib/gitGraphDiagram-IHSO6WYX-BjAezjIv.js +815 -0
  48. package/dist-lib/{graph-B68L3K2T.js → graph-DAHC4kPm.js} +2 -2
  49. package/dist-lib/{highlighted-body-OFNGDK62-C2DGVKV8.js → highlighted-body-OFNGDK62-DWhG_ijx.js} +1 -1
  50. package/dist-lib/index-B0neMIbR.js +16520 -0
  51. package/dist-lib/index-BBC0E3Qg.js +4994 -0
  52. package/dist-lib/{index-Dtkd4mEk.js → index-CE7H8LiZ.js} +2 -2
  53. package/dist-lib/{index-DWkBvb-9.js → index-FgVvPpIY.js} +2 -2
  54. package/dist-lib/index.js +1 -1
  55. package/dist-lib/{infoDiagram-FWYZ7A6U-BbUkT0KS.js → infoDiagram-FWYZ7A6U-Bo_FNR91.js} +2 -2
  56. package/dist-lib/ishikawaDiagram-FXEZZL3T-C5bGD-Eb.js +624 -0
  57. package/dist-lib/{journeyDiagram-5HDEW3XC-CgykmVSC.js → journeyDiagram-5HDEW3XC-C8qM7SxF.js} +4 -4
  58. package/dist-lib/kanban-definition-HUTT4EX6-C-EK5Puz.js +724 -0
  59. package/dist-lib/{katex-jHfnQmlp.js → katex-DoRnZ_sp.js} +1 -1
  60. package/dist-lib/keyboard-Yfa1ETse.js +21 -0
  61. package/dist-lib/{layout-BGrtsiRL.js → layout-DBbo_M5I.js} +2 -2
  62. package/dist-lib/{linear-B5ZSwawJ.js → linear-zGzX0-I0.js} +1 -1
  63. package/dist-lib/{map-hbfFlSln.js → map-DRdzG8Ho.js} +1 -1
  64. package/dist-lib/mermaid-GHXKKRXX-hOE9C3qW.js +4 -0
  65. package/dist-lib/{mindmap-definition-LN4V7U3C-CfhfeEht.js → mindmap-definition-LN4V7U3C-DlVCRx6k.js} +310 -311
  66. package/dist-lib/{pegDiagram-2B236MQR-CYDAJHPF.js → pegDiagram-2B236MQR-DrKNikeG.js} +4 -4
  67. package/dist-lib/{pieDiagram-ENE6RG2P-udKxQm4p.js → pieDiagram-ENE6RG2P-Fm_jc0HL.js} +83 -84
  68. package/dist-lib/quadrantDiagram-ABIIQ3AL-zDRY0VtB.js +1029 -0
  69. package/dist-lib/{railroadDiagram-RFXS5EU6-q0Svkmuy.js → railroadDiagram-RFXS5EU6-BQuFX39y.js} +4 -4
  70. package/dist-lib/{requirementDiagram-TGXJPOKE-tNxRI1gc.js → requirementDiagram-TGXJPOKE-BWwBQZXn.js} +269 -268
  71. package/dist-lib/{resume-session-sheet-CHwpwguS.js → resume-session-sheet-bjDJmwq6.js} +2 -3
  72. package/dist-lib/sankeyDiagram-HTMAVEWB-BjRyuB6L.js +859 -0
  73. package/dist-lib/{sequenceDiagram-DBY2YBRQ-Dvl2_CXL.js → sequenceDiagram-DBY2YBRQ-69pcw_2M.js} +892 -899
  74. package/dist-lib/{session-token-usage-BUz6b-IB.js → session-token-usage-D2zDt9P7.js} +82 -83
  75. package/dist-lib/{shadow-text-size-CBCTdbYU.js → shadow-text-size-smWA4wIU.js} +1 -2
  76. package/dist-lib/{shipped-page-CXy85bsL.js → shipped-page-Cr7dCCc2.js} +232 -235
  77. package/dist-lib/sizeCapture-X5ZJPWSS-DqkV8s1N.js +46 -0
  78. package/dist-lib/{stateDiagram-2N3HPSRC-CnWB7HvU.js → stateDiagram-2N3HPSRC-0vE3REl_.js} +4 -4
  79. package/dist-lib/{stateDiagram-v2-6OUMAXLB-DnZ0UI2p.js → stateDiagram-v2-6OUMAXLB-u_56Obsh.js} +2 -2
  80. package/dist-lib/{streamdown-response-CUB9sK6V.js → streamdown-response-Qq9_RgFv.js} +290 -297
  81. package/dist-lib/styles.css +1 -1
  82. package/dist-lib/swimlanes-5IMT3BWC-H0raIBd1.js +5332 -0
  83. package/dist-lib/{swimlanesDiagram-G3AALYLV-CKyOeqF_.js → swimlanesDiagram-G3AALYLV-By52HaDu.js} +2 -2
  84. package/dist-lib/timeline-definition-FHXFAJF6-h1LLYUQk.js +1055 -0
  85. package/dist-lib/vennDiagram-L72KCM5P-B4wDw_Kh.js +1578 -0
  86. package/dist-lib/wardleyDiagram-EHGQE667-DLMBGiwD.js +678 -0
  87. package/dist-lib/{xychartDiagram-FW5EYKEG-m3s7caPv.js → xychartDiagram-FW5EYKEG-BHvf5Noj.js} +526 -496
  88. package/package.json +4 -3
  89. package/dist-lib/FileEditor-BIz0qCyW.js +0 -6892
  90. package/dist-lib/FileTreePane-BG2k7gTc.js +0 -8422
  91. package/dist-lib/chunk-2Q5K7J3B-Ex8Ly28R.js +0 -15
  92. package/dist-lib/chunk-JWPE2WC7-DFPBClX_.js +0 -9
  93. package/dist-lib/chunk-MOJQB5TN-dusfI9ob.js +0 -664
  94. package/dist-lib/chunk-RYQCIY6F-fkeERzIG.js +0 -315
  95. package/dist-lib/chunk-VR4S4FIN-hOZG7eF3.js +0 -20
  96. package/dist-lib/cynefin-VYW2F7L2-DQXPWaog.js +0 -23853
  97. package/dist-lib/dagre-VKFMJZFB-BhCjK7XQ.js +0 -346
  98. package/dist-lib/diagram-G47NLZAW-C3_z2t6T.js +0 -530
  99. package/dist-lib/diagram-NH7WQ7WH-DUdK08IT.js +0 -143
  100. package/dist-lib/diagram-OA4YK3LP-TUUyRYY3.js +0 -353
  101. package/dist-lib/flowDiagram-23GEKE2U-DU3S3biU.js +0 -1645
  102. package/dist-lib/gitGraphDiagram-IHSO6WYX-CvGu0XAR.js +0 -828
  103. package/dist-lib/index-DcwavxA1.js +0 -5062
  104. package/dist-lib/index-JkCQXUYs.js +0 -16566
  105. package/dist-lib/ishikawaDiagram-FXEZZL3T-D_Y6Tuyb.js +0 -622
  106. package/dist-lib/kanban-definition-HUTT4EX6-CPFLTskY.js +0 -726
  107. package/dist-lib/mermaid-GHXKKRXX-Ox_2d3uB.js +0 -4
  108. package/dist-lib/quadrantDiagram-ABIIQ3AL-BmDmLczk.js +0 -1025
  109. package/dist-lib/sankeyDiagram-HTMAVEWB-B9Bl7f2P.js +0 -847
  110. package/dist-lib/sizeCapture-X5ZJPWSS-B1EeO3N9.js +0 -47
  111. package/dist-lib/swimlanes-5IMT3BWC-CvqDJcS9.js +0 -5353
  112. package/dist-lib/timeline-definition-FHXFAJF6-b15X0Oru.js +0 -1066
  113. package/dist-lib/vennDiagram-L72KCM5P-C4lh5m77.js +0 -1585
  114. package/dist-lib/wardleyDiagram-EHGQE667-Cev6fT_D.js +0 -684
@@ -1,55 +1,55 @@
1
- import { p as oe } from "./chunk-JWPE2WC7-DFPBClX_.js";
2
- import { p as se, o as de, s as le, g as ce, a as me, b as ue, _ as o, l as g, c as D, d as xe, A as fe, q as ge, B as he, z as E, D as pe, i as P, w as S, ak as be } from "./index-JkCQXUYs.js";
3
- import { p as ve, i as we } from "./cynefin-VYW2F7L2-DQXPWaog.js";
4
- var T = "position frame", N = "frame positioned", M = "position relation", C = "relation positioned", ye = /* @__PURE__ */ o(function(e) {
1
+ import { p as re } from "./chunk-JWPE2WC7-DnwG7Xzp.js";
2
+ import { p as oe, o as se, s as de, g as le, a as ce, b as me, _ as o, l as g, c as D, d as ue, A as xe, q as fe, B as ge, z as M, D as he, i as y, w as P, ak as pe } from "./index-B0neMIbR.js";
3
+ import { p as be, i as ve } from "./cynefin-VYW2F7L2-XAY3mHv8.js";
4
+ var T = "position frame", $ = "frame positioned", S = "position relation", N = "relation positioned", we = /* @__PURE__ */ o(function(e) {
5
5
  g.debug("options str", e);
6
- }, "setOptions"), Pe = /* @__PURE__ */ o(function() {
6
+ }, "setOptions"), ye = /* @__PURE__ */ o(function() {
7
7
  return {};
8
- }, "getOptions"), Se = /* @__PURE__ */ o(function() {
9
- O(), ge();
8
+ }, "getOptions"), Pe = /* @__PURE__ */ o(function() {
9
+ C(), fe();
10
10
  }, "clear");
11
- function O() {
12
- A = {};
11
+ function C() {
12
+ B = {};
13
13
  }
14
- o(O, "reset");
15
- var ke = pe.eventmodeling, Me = /* @__PURE__ */ o(() => he({
16
- ...ke,
17
- ...E().eventmodeling
18
- }), "getConfig"), A = {};
19
- function W() {
20
- let e = Be;
21
- const { ast: n } = A, t = R();
14
+ o(C, "reset");
15
+ var Se = he.eventmodeling, ke = /* @__PURE__ */ o(() => ge({
16
+ ...Se,
17
+ ...M().eventmodeling
18
+ }), "getConfig"), B = {};
19
+ function O() {
20
+ let e = Fe;
21
+ const { ast: n } = B, t = E();
22
22
  if (!n)
23
23
  throw new Error("No data for EventModel");
24
24
  return n.frames.forEach((i, a) => {
25
- const r = X(i, n.dataEntities, t);
26
- e = w(e, {
25
+ const r = G(i, n.dataEntities, t);
26
+ e = v(e, {
27
27
  $kind: T,
28
28
  index: a,
29
29
  frame: i,
30
30
  textProps: r
31
31
  });
32
32
  let d;
33
- q(i) ? (g.debug("source frame", i.sourceFrames), d = n.frames.filter((l) => i.sourceFrames.some((c) => c.$refText === l.name)), d.forEach((l) => {
34
- e = w(e, {
35
- $kind: M,
33
+ K(i) ? (g.debug("source frame", i.sourceFrames), d = n.frames.filter((l) => i.sourceFrames.some((c) => c.$refText === l.name)), d.forEach((l) => {
34
+ e = v(e, {
35
+ $kind: S,
36
36
  index: a,
37
37
  frame: i,
38
38
  sourceFrame: l
39
39
  });
40
- })) : e = w(e, {
41
- $kind: M,
40
+ })) : e = v(e, {
41
+ $kind: S,
42
42
  index: a,
43
43
  frame: i
44
44
  });
45
45
  }), e = {
46
46
  ...e,
47
- sortedSwimlanesArray: $(e.swimlanes)
47
+ sortedSwimlanesArray: A(e.swimlanes)
48
48
  }, e;
49
49
  }
50
- o(W, "getState");
50
+ o(O, "getState");
51
51
  function I(e) {
52
- A.ast = e;
52
+ B.ast = e;
53
53
  }
54
54
  o(I, "setAst");
55
55
  var s = {
@@ -75,34 +75,34 @@ var s = {
75
75
  labelEvents: "Events",
76
76
  labelEventsPrefix: "Stream: "
77
77
  };
78
- function R() {
78
+ function E() {
79
79
  return s;
80
80
  }
81
- o(R, "getDiagramProps");
82
- var Be = {
81
+ o(E, "getDiagramProps");
82
+ var Fe = {
83
83
  boxes: [],
84
84
  swimlanes: {},
85
85
  relations: [],
86
86
  maxR: 0,
87
87
  sortedSwimlanesArray: []
88
88
  };
89
- function H(e) {
89
+ function W(e) {
90
90
  const n = e.split(".");
91
91
  if (n.length === 2)
92
92
  return n[0];
93
93
  }
94
- o(H, "extractNamespace");
95
- function U(e) {
94
+ o(W, "extractNamespace");
95
+ function H(e) {
96
96
  const n = e.split(".");
97
97
  return n.length === 2 ? n[1] : e;
98
98
  }
99
- o(U, "extractName");
100
- function _(e, n) {
99
+ o(H, "extractName");
100
+ function U(e, n) {
101
101
  if (!(!n || n.length === 0))
102
102
  return Object.values(e).find((t) => t.namespace === n);
103
103
  }
104
- o(_, "findSwimlaneByNamespace");
105
- function v(e, n, t) {
104
+ o(U, "findSwimlaneByNamespace");
105
+ function b(e, n, t) {
106
106
  return Math.max(
107
107
  n,
108
108
  ...Object.keys(e).filter((i) => {
@@ -111,9 +111,9 @@ function v(e, n, t) {
111
111
  }).map((i) => Number.parseInt(i))
112
112
  ) + 1;
113
113
  }
114
- o(v, "findNextAvailableIndex");
115
- function V(e, n) {
116
- const t = H(e.entityIdentifier), i = _(n, t);
114
+ o(b, "findNextAvailableIndex");
115
+ function _(e, n) {
116
+ const t = W(e.entityIdentifier), i = U(n, t);
117
117
  switch (e.modelEntityType) {
118
118
  case "ui":
119
119
  case "pcr":
@@ -122,7 +122,7 @@ function V(e, n) {
122
122
  index: i.index,
123
123
  label: i.namespace || s.labelUiAutomation
124
124
  } : t ? {
125
- index: v(n, 0, 100),
125
+ index: b(n, 0, 100),
126
126
  label: s.labelUiAutomationPrefix + t
127
127
  } : { index: 0, label: s.labelUiAutomation };
128
128
  case "rmo":
@@ -133,7 +133,7 @@ function V(e, n) {
133
133
  index: i.index,
134
134
  label: i.namespace || s.labelCommandReadModel
135
135
  } : t ? {
136
- index: v(n, 100, 200),
136
+ index: b(n, 100, 200),
137
137
  label: s.labelCommandReadModelPrefix + t
138
138
  } : { index: 100, label: s.labelCommandReadModel };
139
139
  case "evt":
@@ -143,14 +143,14 @@ function V(e, n) {
143
143
  index: i.index,
144
144
  label: i.namespace || s.labelEvents
145
145
  } : t ? {
146
- index: v(n, 200, 300),
146
+ index: b(n, 200, 300),
147
147
  label: s.labelEventsPrefix + t
148
148
  } : { index: 200, label: s.labelEvents };
149
149
  }
150
150
  }
151
- o(V, "calculateSwimlaneProps");
151
+ o(_, "calculateSwimlaneProps");
152
152
  function L(e) {
153
- const { themeVariables: n } = E();
153
+ const { themeVariables: n } = M();
154
154
  switch (e.modelEntityType) {
155
155
  case "ui":
156
156
  return {
@@ -189,8 +189,8 @@ function L(e) {
189
189
  }
190
190
  }
191
191
  o(L, "calculateEntityVisualProps");
192
- function X(e, n, t) {
193
- const i = E(), a = P(U(e.entityIdentifier) ?? "", i);
192
+ function G(e, n, t) {
193
+ const i = M(), a = y(H(e.entityIdentifier) ?? "", i);
194
194
  let r;
195
195
  const d = {
196
196
  fontSize: 16,
@@ -198,16 +198,13 @@ function X(e, n, t) {
198
198
  fontFamily: '"trebuchet ms", verdana, arial, sans-serif',
199
199
  joinWith: "<br/>"
200
200
  };
201
- let c = `<b>${S(a, t.textMaxWidth, d)}</b>`;
202
- if (e.dataInlineValue && (r = e.dataInlineValue, r = r.substring(r.indexOf("{") + 1), r = r.substring(0, r.lastIndexOf("}") - 1), r = P(r, i), r = S(r, t.textMaxWidth, d), r = r.replaceAll(" ", "&nbsp;")), e.dataReference) {
201
+ let c = `<b>${P(a, t.textMaxWidth, d)}</b>`;
202
+ if (e.dataInlineValue && (r = e.dataInlineValue, r = r.substring(r.indexOf("{") + 1), r = r.substring(0, r.lastIndexOf("}") - 1), r = y(r, i), r = P(r, t.textMaxWidth, d), r = r.replaceAll(" ", "&nbsp;")), e.dataReference) {
203
203
  const p = n.find(
204
- (y) => {
205
- var b;
206
- return y.name === ((b = e.dataReference) == null ? void 0 : b.$refText);
207
- }
204
+ (w) => w.name === e.dataReference?.$refText
208
205
  );
209
206
  p && (r = p.dataBlockValue, r = r.substring(r.indexOf(`{
210
- `) + 2), r = r.substring(0, r.lastIndexOf("}") - 1), r = P(r, i), r = S(r, t.textMaxWidth, d), r = r.replaceAll(" ", "&nbsp;"), r += "<br/>");
207
+ `) + 2), r = r.substring(0, r.lastIndexOf("}") - 1), r = y(r, i), r = P(r, t.textMaxWidth, d), r = r.replaceAll(" ", "&nbsp;"), r += "<br/>");
211
208
  }
212
209
  const m = r !== void 0;
213
210
  m && (c += `<br/><br/><code style="text-align: left; display: block;max-width:${t.textMaxWidth}px">${r}</code>`);
@@ -215,21 +212,21 @@ function X(e, n, t) {
215
212
  fontSize: d.fontSize,
216
213
  fontWeight: d.fontWeight,
217
214
  fontFamily: d.fontFamily
218
- }, u = be(c, x), h = m ? u.width / 3 : u.width, f = {
215
+ }, u = pe(c, x), h = m ? u.width / 3 : u.width, f = {
219
216
  content: c,
220
217
  width: h,
221
218
  height: u.height
222
219
  };
223
220
  return g.debug(`[${e.name}] ${e.entityIdentifier} text`, f), f;
224
221
  }
225
- o(X, "calculateTextProps");
226
- function G(e, n) {
222
+ o(G, "calculateTextProps");
223
+ function V(e, n) {
227
224
  const t = n, i = L(t.frame), a = {
228
225
  width: t.textProps.width + 2 * s.boxTextPadding,
229
226
  height: t.textProps.height + 2 * s.boxTextPadding
230
227
  };
231
228
  return [{
232
- $kind: N,
229
+ $kind: $,
233
230
  frame: t.frame,
234
231
  index: t.index,
235
232
  visual: i,
@@ -237,22 +234,22 @@ function G(e, n) {
237
234
  textProps: t.textProps
238
235
  }];
239
236
  }
240
- o(G, "decidePositionFrame");
241
- function j(e, n, t) {
237
+ o(V, "decidePositionFrame");
238
+ function X(e, n, t) {
242
239
  return n === void 0 ? s.contentStartX : n.index === e.index && e.r ? e.r + s.boxPadding : t === void 0 ? s.contentStartX : t.r - s.boxOverlap + s.boxPadding;
243
240
  }
244
- o(j, "calculateX");
245
- function Y(e, n) {
241
+ o(X, "calculateX");
242
+ function j(e, n) {
246
243
  const t = [...e.map((i) => i.r), n];
247
244
  return Math.max(...t);
248
245
  }
249
- o(Y, "calculateMaxRight");
250
- function $(e) {
246
+ o(j, "calculateMaxRight");
247
+ function A(e) {
251
248
  return Object.values(e).sort((n, t) => n.index - t.index);
252
249
  }
253
- o($, "sortedSwimlanesArray");
254
- function z(e, n) {
255
- const t = n, i = V(t.frame, e.swimlanes);
250
+ o(A, "sortedSwimlanesArray");
251
+ function Y(e, n) {
252
+ const t = n, i = _(t.frame, e.swimlanes);
256
253
  let a;
257
254
  i.index in e.swimlanes ? a = e.swimlanes[i.index] : a = {
258
255
  index: i.index,
@@ -271,7 +268,7 @@ function z(e, n) {
271
268
  s.boxMinHeight,
272
269
  Math.min(s.boxMaxHeight, t.dimension.height)
273
270
  ) + 2 * s.boxPadding
274
- }, c = j(a, d, r), m = c + l.width + s.boxPadding, x = Y(Object.values(e.swimlanes), m);
271
+ }, c = X(a, d, r), m = c + l.width + s.boxPadding, x = j(Object.values(e.swimlanes), m);
275
272
  a.r = c + l.width, a.maxHeight = Math.max(a.maxHeight, l.height), a.height = Math.max(s.swimlaneMinHeight, a.maxHeight) + 2 * s.swimlanePadding;
276
273
  const u = {
277
274
  x: c,
@@ -295,29 +292,29 @@ function z(e, n) {
295
292
  previousSwimlaneNumber: i.index,
296
293
  previousFrame: t.frame,
297
294
  maxR: x
298
- }, f = $(h.swimlanes);
295
+ }, f = A(h.swimlanes);
299
296
  f.length > 0 && (f[0].y = 0);
300
297
  for (let p = 1; p < f.length; p++) {
301
- const y = f[p], b = f[p - 1];
302
- y.y = b.y + b.height + s.swimlaneGap;
298
+ const w = f[p], R = f[p - 1];
299
+ w.y = R.y + R.height + s.swimlaneGap;
303
300
  }
304
301
  return h;
305
302
  }
306
- o(z, "evolveFramePositioned");
307
- function K(e, n) {
303
+ o(Y, "evolveFramePositioned");
304
+ function z(e, n) {
308
305
  return e === 0 && n.sourceFrames.length === 0;
309
306
  }
310
- o(K, "isFirstFrame");
311
- function q(e) {
307
+ o(z, "isFirstFrame");
308
+ function K(e) {
312
309
  return e.sourceFrames !== void 0 && e.sourceFrames !== null && e.sourceFrames.length > 0;
313
310
  }
314
- o(q, "hasSourceFrame");
315
- function B(e, n) {
311
+ o(K, "hasSourceFrame");
312
+ function k(e, n) {
316
313
  if (n != null)
317
314
  return e.find((t) => t.frame.name === n.name);
318
315
  }
319
- o(B, "findBoxByFrame");
320
- function J(e, n, t) {
316
+ o(k, "findBoxByFrame");
317
+ function q(e, n, t) {
321
318
  if (!(t < 0))
322
319
  for (let i = t; i >= 0; i--) {
323
320
  const a = e[i];
@@ -325,25 +322,25 @@ function J(e, n, t) {
325
322
  return a;
326
323
  }
327
324
  }
328
- o(J, "findBoxByLineIndex");
329
- function Q(e, n) {
325
+ o(q, "findBoxByLineIndex");
326
+ function J(e, n) {
330
327
  const t = n;
331
- if (we(t.frame) || K(t.index, t.frame))
328
+ if (ve(t.frame) || z(t.index, t.frame))
332
329
  return [];
333
- const i = B(e.boxes, t.frame);
330
+ const i = k(e.boxes, t.frame);
334
331
  if (i === void 0)
335
332
  throw new Error(`Target box not found for frame ${t.frame.name}`);
336
333
  let a;
337
- return t.sourceFrame ? a = B(e.boxes, t.sourceFrame) : a = J(e.boxes, i.swimlane.index, t.index - 1), a === void 0 ? [] : [{
338
- $kind: C,
334
+ return t.sourceFrame ? a = k(e.boxes, t.sourceFrame) : a = q(e.boxes, i.swimlane.index, t.index - 1), a === void 0 ? [] : [{
335
+ $kind: N,
339
336
  frame: t.frame,
340
337
  index: t.index,
341
338
  sourceBox: a,
342
339
  targetBox: i
343
340
  }];
344
341
  }
345
- o(Q, "decidePositionRelation");
346
- function Z(e, n) {
342
+ o(J, "decidePositionRelation");
343
+ function Q(e, n) {
347
344
  const t = n, i = {
348
345
  visual: {
349
346
  fill: "none",
@@ -365,69 +362,69 @@ function Z(e, n) {
365
362
  relations: [...e.relations, i]
366
363
  };
367
364
  }
368
- o(Z, "evolveRelationPositioned");
369
- var Fe = {
370
- [T]: G,
371
- [M]: Q
372
- }, Ee = {
373
- [N]: z,
374
- [C]: Z
365
+ o(Q, "evolveRelationPositioned");
366
+ var Me = {
367
+ [T]: V,
368
+ [S]: J
369
+ }, Be = {
370
+ [$]: Y,
371
+ [N]: Q
375
372
  };
376
- function ee(e, n) {
377
- const t = Fe[n.$kind];
373
+ function Z(e, n) {
374
+ const t = Me[n.$kind];
378
375
  if (t == null)
379
376
  return [];
380
377
  const i = t(e, n);
381
378
  return g.debug("decided events", i), i;
382
379
  }
383
- o(ee, "decide");
384
- function te(e, n) {
380
+ o(Z, "decide");
381
+ function ee(e, n) {
385
382
  const t = n.reduce((i, a) => {
386
- const r = Ee[a.$kind];
383
+ const r = Be[a.$kind];
387
384
  return r == null ? i : r(i, a);
388
385
  }, e);
389
386
  return g.debug("evolve events", { state: e, newState: t, events: n }), t;
390
387
  }
391
- o(te, "evolve");
392
- function w(e, n) {
393
- const t = ee(e, n);
394
- return te(e, t);
388
+ o(ee, "evolve");
389
+ function v(e, n) {
390
+ const t = Z(e, n);
391
+ return ee(e, t);
395
392
  }
396
- o(w, "dispatch");
393
+ o(v, "dispatch");
397
394
  var F = {
398
- getConfig: Me,
399
- setOptions: ye,
400
- getOptions: Pe,
401
- clear: Se,
402
- setAccTitle: ue,
403
- getAccTitle: me,
404
- getAccDescription: ce,
405
- setAccDescription: le,
406
- setDiagramTitle: de,
407
- getDiagramTitle: se,
395
+ getConfig: ke,
396
+ setOptions: we,
397
+ getOptions: ye,
398
+ clear: Pe,
399
+ setAccTitle: me,
400
+ getAccTitle: ce,
401
+ getAccDescription: le,
402
+ setAccDescription: de,
403
+ setDiagramTitle: se,
404
+ getDiagramTitle: oe,
408
405
  setAst: I,
409
- getDiagramProps: R,
410
- getState: W
411
- }, Ae = {
406
+ getDiagramProps: E,
407
+ getState: O
408
+ }, Ee = {
412
409
  parse: /* @__PURE__ */ o(async (e) => {
413
- const n = await ve("eventmodeling", e);
414
- g.debug(n), F.setAst(n), oe(n, F);
410
+ const n = await be("eventmodeling", e);
411
+ g.debug(n), F.setAst(n), re(n, F);
415
412
  }, "parse")
416
- }, k = D(), Re = k == null ? void 0 : k.eventmodeling;
417
- function ne(e, n) {
413
+ }, Ae = D(), Re = Ae?.eventmodeling;
414
+ function te(e, n) {
418
415
  return (t) => {
419
416
  const i = t.swimlane.y + n.swimlanePadding, a = e.append("g").attr("class", "em-box");
420
417
  a.append("rect").attr("x", t.x).attr("y", i).attr("rx", "3").attr("width", t.dimension.width).attr("height", t.dimension.height).attr("stroke", t.visual.stroke).attr("fill", t.visual.fill), a.append("foreignObject").attr("x", t.x + n.boxPadding).attr("y", i + 10).attr("width", t.dimension.width - 2 * n.boxPadding).attr("height", t.dimension.height - 2 * n.boxPadding).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%").append("span").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").html(t.text);
421
418
  };
422
419
  }
423
- o(ne, "renderD3Box");
424
- function ie(e, n) {
420
+ o(te, "renderD3Box");
421
+ function ne(e, n) {
425
422
  return e > n;
426
423
  }
427
- o(ie, "dirUpwards");
428
- function ae(e, n, t, i) {
424
+ o(ne, "dirUpwards");
425
+ function ie(e, n, t, i) {
429
426
  return (a) => {
430
- const r = a.sourceBox.swimlane.y + n.swimlanePadding, d = a.targetBox.swimlane.y + n.swimlanePadding, l = ie(r, d), c = a.sourceBox.x + a.sourceBox.dimension.width * 2 / 3, m = a.targetBox.x + a.targetBox.dimension.width / 3;
427
+ const r = a.sourceBox.swimlane.y + n.swimlanePadding, d = a.targetBox.swimlane.y + n.swimlanePadding, l = ne(r, d), c = a.sourceBox.x + a.sourceBox.dimension.width * 2 / 3, m = a.targetBox.x + a.targetBox.dimension.width / 3;
431
428
  let x, u;
432
429
  g.debug(`rendering relation up=${l} for `, {
433
430
  sourceBox: a.sourceBox,
@@ -437,30 +434,30 @@ function ae(e, n, t, i) {
437
434
  e.append("path").attr("class", "em-relation").attr("fill", a.visual.fill).attr("stroke", h).attr("stroke-width", "1").attr("marker-end", `url(#${t})`).attr("d", `M${c} ${x} L${m} ${u}`);
438
435
  };
439
436
  }
440
- o(ae, "renderD3Relation");
441
- function re(e, n, t, i) {
437
+ o(ie, "renderD3Relation");
438
+ function ae(e, n, t, i) {
442
439
  return (a) => {
443
440
  const r = e.append("g").attr("class", "em-swimlane"), d = i.emSwimlaneBackgroundOdd ?? "rgb(250,250,250)", l = i.emSwimlaneBackgroundStroke ?? "rgb(240,240,240)";
444
441
  r.append("rect").attr("x", 0).attr("y", a.y).attr("rx", "3").attr("width", n + t.swimlanePadding).attr("height", a.height).attr("fill", d).attr("stroke", l), r.append("text").attr("font-weight", t.swimlaneTextFontWeight).attr("x", 30).attr("y", a.y + 30).text(a.label);
445
442
  };
446
443
  }
447
- o(re, "renderD3Swimlane");
448
- var $e = /* @__PURE__ */ o(function(e, n, t, i) {
444
+ o(ae, "renderD3Swimlane");
445
+ var De = /* @__PURE__ */ o(function(e, n, t, i) {
449
446
  if (g.debug("in eventmodeling renderer", e + `
450
447
  `, "id:", n, t), !Re)
451
448
  throw new Error("EventModeling config not found");
452
- const a = i.db, { themeVariables: r, eventmodeling: d } = D(), l = xe(`[id="${n}"]`), c = a.getDiagramProps(), m = a.getState(), x = `em-arrowhead-${n}`, u = r.emArrowhead ?? "#000000";
449
+ const a = i.db, { themeVariables: r, eventmodeling: d } = D(), l = ue(`[id="${n}"]`), c = a.getDiagramProps(), m = a.getState(), x = `em-arrowhead-${n}`, u = r.emArrowhead ?? "#000000";
453
450
  m.sortedSwimlanesArray.forEach(
454
- re(l, m.maxR, c, r)
455
- ), m.boxes.forEach(ne(l, c)), m.relations.forEach(ae(l, c, x, r)), l.append("defs").append("marker").attr("id", x).attr("markerWidth", "10").attr("markerHeight", "7").attr("refX", "10").attr("refY", "3.5").attr("orient", "auto").append("polygon").attr("points", "0 0, 10 3.5, 0 7").attr("fill", u), fe(void 0, l, (d == null ? void 0 : d.padding) ?? 30, d == null ? void 0 : d.useMaxWidth);
456
- }, "draw"), De = {
457
- draw: $e
458
- }, Te = /* @__PURE__ */ o((e) => "", "getStyles"), Ne = Te, Ie = {
459
- parser: Ae,
451
+ ae(l, m.maxR, c, r)
452
+ ), m.boxes.forEach(te(l, c)), m.relations.forEach(ie(l, c, x, r)), l.append("defs").append("marker").attr("id", x).attr("markerWidth", "10").attr("markerHeight", "7").attr("refX", "10").attr("refY", "3.5").attr("orient", "auto").append("polygon").attr("points", "0 0, 10 3.5, 0 7").attr("fill", u), xe(void 0, l, d?.padding ?? 30, d?.useMaxWidth);
453
+ }, "draw"), Te = {
454
+ draw: De
455
+ }, $e = /* @__PURE__ */ o((e) => "", "getStyles"), Ne = $e, We = {
456
+ parser: Ee,
460
457
  db: F,
461
- renderer: De,
458
+ renderer: Te,
462
459
  styles: Ne
463
460
  };
464
461
  export {
465
- Ie as diagram
462
+ We as diagram
466
463
  };