@digipair/skill-web-chatbot 0.8.37 → 0.8.40

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 (129) hide show
  1. package/Tableau10-558cc280.cjs.js +9 -0
  2. package/Tableau10-558cc280.esm.js +7 -0
  3. package/arc-d1f6357e.cjs.js +88 -0
  4. package/arc-d1f6357e.esm.js +86 -0
  5. package/blockDiagram-5dc23a45.cjs.js +2921 -0
  6. package/blockDiagram-5dc23a45.esm.js +2919 -0
  7. package/{c4Diagram-1bdb45a8.cjs.js → c4Diagram-1e775db3.cjs.js} +1904 -2130
  8. package/{c4Diagram-1bdb45a8.esm.js → c4Diagram-1e775db3.esm.js} +1906 -2132
  9. package/channel-ebbc4130.cjs.js +9 -0
  10. package/channel-ebbc4130.esm.js +7 -0
  11. package/classDiagram-f52caa06.cjs.js +209 -0
  12. package/classDiagram-f52caa06.esm.js +207 -0
  13. package/{classDiagram-v2-6dc3b9c3.cjs.js → classDiagram-v2-640c694e.cjs.js} +74 -76
  14. package/{classDiagram-v2-6dc3b9c3.esm.js → classDiagram-v2-640c694e.esm.js} +75 -77
  15. package/clone-afc2f047.cjs.js +10 -0
  16. package/clone-afc2f047.esm.js +8 -0
  17. package/createText-03b82060.cjs.js +2936 -0
  18. package/createText-03b82060.esm.js +2933 -0
  19. package/edges-16357fde.cjs.js +1998 -0
  20. package/edges-16357fde.esm.js +1981 -0
  21. package/erDiagram-c7ff1bec.cjs.js +1807 -0
  22. package/erDiagram-c7ff1bec.esm.js +1805 -0
  23. package/flowDb-9a89ea33.cjs.js +5542 -0
  24. package/flowDb-9a89ea33.esm.js +5538 -0
  25. package/flowDiagram-aadb13b0.cjs.js +1351 -0
  26. package/flowDiagram-aadb13b0.esm.js +1349 -0
  27. package/flowDiagram-v2-f2119625.cjs.js +31 -0
  28. package/flowDiagram-v2-f2119625.esm.js +29 -0
  29. package/flowchart-elk-definition-cf813a97.cjs.js +50257 -0
  30. package/flowchart-elk-definition-cf813a97.esm.js +50255 -0
  31. package/ganttDiagram-3c2fde2b.cjs.js +3710 -0
  32. package/ganttDiagram-3c2fde2b.esm.js +3708 -0
  33. package/{gitGraphDiagram-c3fe571f.cjs.js → gitGraphDiagram-c3a0619c.cjs.js} +1608 -1651
  34. package/{gitGraphDiagram-c3fe571f.esm.js → gitGraphDiagram-c3a0619c.esm.js} +1609 -1652
  35. package/graph-0ee63739.cjs.js +961 -0
  36. package/graph-0ee63739.esm.js +938 -0
  37. package/index-bb6d8841.cjs.js +648 -0
  38. package/index-bb6d8841.esm.js +646 -0
  39. package/index.cjs2.js +5410 -4623
  40. package/index.esm.js +1 -1
  41. package/index.esm2.js +5291 -4527
  42. package/{infoDiagram-9c10eab1.cjs.js → infoDiagram-2f5c50c0.cjs.js} +63 -70
  43. package/{infoDiagram-9c10eab1.esm.js → infoDiagram-2f5c50c0.esm.js} +64 -71
  44. package/journeyDiagram-14fe341a.cjs.js +1061 -0
  45. package/journeyDiagram-14fe341a.esm.js +1059 -0
  46. package/katex-d90b6d29.cjs.js +25690 -0
  47. package/katex-d90b6d29.esm.js +25688 -0
  48. package/layout-fd473db2.cjs.js +1626 -0
  49. package/layout-fd473db2.esm.js +1619 -0
  50. package/libs/skill-web-chatbot/src/lib/pins/chatbot.actions.d.ts +0 -2
  51. package/line-24d93f1b.cjs.js +34 -0
  52. package/line-24d93f1b.esm.js +32 -0
  53. package/linear-9bcf74c4.cjs.js +537 -0
  54. package/linear-9bcf74c4.esm.js +531 -0
  55. package/{mindmap-definition-a9d0f378.cjs.js → mindmap-definition-9399c7e6.cjs.js} +7874 -7610
  56. package/{mindmap-definition-a9d0f378.esm.js → mindmap-definition-9399c7e6.esm.js} +7875 -7611
  57. package/package.json +1 -1
  58. package/path-428ebac9.cjs.js +317 -0
  59. package/path-428ebac9.esm.js +314 -0
  60. package/pieDiagram-828dae43.cjs.js +951 -0
  61. package/pieDiagram-828dae43.esm.js +949 -0
  62. package/{quadrantDiagram-1763608a.cjs.js → quadrantDiagram-5fa00455.cjs.js} +1117 -1340
  63. package/{quadrantDiagram-1763608a.esm.js → quadrantDiagram-5fa00455.esm.js} +1118 -1341
  64. package/{requirementDiagram-779d93b3.cjs.js → requirementDiagram-03163dc4.cjs.js} +1044 -1228
  65. package/{requirementDiagram-779d93b3.esm.js → requirementDiagram-03163dc4.esm.js} +1045 -1229
  66. package/{sankeyDiagram-86a66bae.cjs.js → sankeyDiagram-52ec8976.cjs.js} +337 -339
  67. package/{sankeyDiagram-86a66bae.esm.js → sankeyDiagram-52ec8976.esm.js} +338 -340
  68. package/sequenceDiagram-b517d154.cjs.js +5949 -0
  69. package/sequenceDiagram-b517d154.esm.js +5947 -0
  70. package/{stateDiagram-6f4bb19d.cjs.js → stateDiagram-fca82b5b.cjs.js} +62 -61
  71. package/{stateDiagram-6f4bb19d.esm.js → stateDiagram-fca82b5b.esm.js} +65 -64
  72. package/{stateDiagram-v2-d72c79bd.cjs.js → stateDiagram-v2-ed04200a.cjs.js} +96 -100
  73. package/{stateDiagram-v2-d72c79bd.esm.js → stateDiagram-v2-ed04200a.esm.js} +98 -102
  74. package/{styles-659d7242.cjs.js → styles-11e81fdd.cjs.js} +1990 -1965
  75. package/{styles-659d7242.esm.js → styles-11e81fdd.esm.js} +1989 -1964
  76. package/{styles-3fb7b9cf.cjs.js → styles-cacbff60.cjs.js} +935 -1192
  77. package/{styles-3fb7b9cf.esm.js → styles-cacbff60.esm.js} +929 -1186
  78. package/styles-e75131e4.cjs.js +671 -0
  79. package/styles-e75131e4.esm.js +661 -0
  80. package/svgDrawCommon-ecc5f780.cjs.js +68 -0
  81. package/svgDrawCommon-ecc5f780.esm.js +60 -0
  82. package/timeline-definition-4ee9bff4.cjs.js +1161 -0
  83. package/timeline-definition-4ee9bff4.esm.js +1159 -0
  84. package/xychartDiagram-e5e6b652.cjs.js +3150 -0
  85. package/xychartDiagram-e5e6b652.esm.js +3148 -0
  86. package/arc-da8fd8d8.cjs.js +0 -88
  87. package/arc-da8fd8d8.esm.js +0 -86
  88. package/classDiagram-185c1a10.cjs.js +0 -96
  89. package/classDiagram-185c1a10.esm.js +0 -94
  90. package/constant-2fe7eae5.cjs.js +0 -58
  91. package/constant-2fe7eae5.esm.js +0 -55
  92. package/createText-94e3ebbf.cjs.js +0 -2775
  93. package/createText-94e3ebbf.esm.js +0 -2773
  94. package/edges-558884ee.cjs.js +0 -1450
  95. package/edges-558884ee.esm.js +0 -1436
  96. package/erDiagram-97139f44.cjs.js +0 -1949
  97. package/erDiagram-97139f44.esm.js +0 -1947
  98. package/flowDb-a4faf166.cjs.js +0 -6918
  99. package/flowDb-a4faf166.esm.js +0 -6914
  100. package/flowDiagram-ccbbb58d.cjs.js +0 -999
  101. package/flowDiagram-ccbbb58d.esm.js +0 -997
  102. package/flowDiagram-v2-79ccd6da.cjs.js +0 -29
  103. package/flowDiagram-v2-79ccd6da.esm.js +0 -27
  104. package/flowchart-elk-definition-7863a61f.cjs.js +0 -48577
  105. package/flowchart-elk-definition-7863a61f.esm.js +0 -48575
  106. package/ganttDiagram-3eff0dd8.cjs.js +0 -3855
  107. package/ganttDiagram-3eff0dd8.esm.js +0 -3853
  108. package/index-d0b453e2.cjs.js +0 -609
  109. package/index-d0b453e2.esm.js +0 -607
  110. package/journeyDiagram-b6904cec.cjs.js +0 -1292
  111. package/journeyDiagram-b6904cec.esm.js +0 -1290
  112. package/layout-c5a37d74.cjs.js +0 -2808
  113. package/layout-c5a37d74.esm.js +0 -2795
  114. package/line-ce5d1152.cjs.js +0 -34
  115. package/line-ce5d1152.esm.js +0 -32
  116. package/linear-db016d0c.cjs.js +0 -485
  117. package/linear-db016d0c.esm.js +0 -479
  118. package/pieDiagram-fd367f1f.cjs.js +0 -1157
  119. package/pieDiagram-fd367f1f.esm.js +0 -1155
  120. package/sequenceDiagram-169f11ec.cjs.js +0 -4805
  121. package/sequenceDiagram-169f11ec.esm.js +0 -4803
  122. package/styles-3814544c.cjs.js +0 -534
  123. package/styles-3814544c.esm.js +0 -524
  124. package/svgDraw-af99a425.cjs.js +0 -144
  125. package/svgDraw-af99a425.esm.js +0 -141
  126. package/svgDrawCommon-ebe6c236.cjs.js +0 -70
  127. package/svgDrawCommon-ebe6c236.esm.js +0 -62
  128. package/timeline-definition-65183566.cjs.js +0 -1394
  129. package/timeline-definition-65183566.esm.js +0 -1392
@@ -1,1436 +0,0 @@
1
- import { i as ia, U as Ut$1, S as S$1, a as At$1, a4 as cx, J as Je, f as Oi, a5 as yf } from './index.esm2.js';
2
- import { R as Rr } from './createText-94e3ebbf.esm.js';
3
- import { M } from './svgDraw-af99a425.esm.js';
4
- import { S as S$2 } from './line-ce5d1152.esm.js';
5
-
6
- function _array_like_to_array(arr, len) {
7
- if (len == null || len > arr.length) len = arr.length;
8
- for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
9
- return arr2;
10
- }
11
- function _array_without_holes(arr) {
12
- if (Array.isArray(arr)) return _array_like_to_array(arr);
13
- }
14
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
15
- try {
16
- var info = gen[key](arg);
17
- var value = info.value;
18
- } catch (error) {
19
- reject(error);
20
- return;
21
- }
22
- if (info.done) {
23
- resolve(value);
24
- } else {
25
- Promise.resolve(value).then(_next, _throw);
26
- }
27
- }
28
- function _async_to_generator(fn) {
29
- return function() {
30
- var self = this, args = arguments;
31
- return new Promise(function(resolve, reject) {
32
- var gen = fn.apply(self, args);
33
- function _next(value) {
34
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
35
- }
36
- function _throw(err) {
37
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
38
- }
39
- _next(undefined);
40
- });
41
- };
42
- }
43
- function _iterable_to_array(iter) {
44
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
45
- }
46
- function _non_iterable_spread() {
47
- throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
48
- }
49
- function _to_consumable_array(arr) {
50
- return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
51
- }
52
- function _unsupported_iterable_to_array(o, minLen) {
53
- if (!o) return;
54
- if (typeof o === "string") return _array_like_to_array(o, minLen);
55
- var n = Object.prototype.toString.call(o).slice(8, -1);
56
- if (n === "Object" && o.constructor) n = o.constructor.name;
57
- if (n === "Map" || n === "Set") return Array.from(n);
58
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
59
- }
60
- function _ts_generator(thisArg, body) {
61
- var f, y, t, g, _ = {
62
- label: 0,
63
- sent: function() {
64
- if (t[0] & 1) throw t[1];
65
- return t[1];
66
- },
67
- trys: [],
68
- ops: []
69
- };
70
- return g = {
71
- next: verb(0),
72
- "throw": verb(1),
73
- "return": verb(2)
74
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
75
- return this;
76
- }), g;
77
- function verb(n) {
78
- return function(v) {
79
- return step([
80
- n,
81
- v
82
- ]);
83
- };
84
- }
85
- function step(op) {
86
- if (f) throw new TypeError("Generator is already executing.");
87
- while(_)try {
88
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
89
- if (y = 0, t) op = [
90
- op[0] & 2,
91
- t.value
92
- ];
93
- switch(op[0]){
94
- case 0:
95
- case 1:
96
- t = op;
97
- break;
98
- case 4:
99
- _.label++;
100
- return {
101
- value: op[1],
102
- done: false
103
- };
104
- case 5:
105
- _.label++;
106
- y = op[1];
107
- op = [
108
- 0
109
- ];
110
- continue;
111
- case 7:
112
- op = _.ops.pop();
113
- _.trys.pop();
114
- continue;
115
- default:
116
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
117
- _ = 0;
118
- continue;
119
- }
120
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
121
- _.label = op[1];
122
- break;
123
- }
124
- if (op[0] === 6 && _.label < t[1]) {
125
- _.label = t[1];
126
- t = op;
127
- break;
128
- }
129
- if (t && _.label < t[2]) {
130
- _.label = t[2];
131
- _.ops.push(op);
132
- break;
133
- }
134
- if (t[2]) _.ops.pop();
135
- _.trys.pop();
136
- continue;
137
- }
138
- op = body.call(thisArg, _);
139
- } catch (e) {
140
- op = [
141
- 6,
142
- e
143
- ];
144
- y = 0;
145
- } finally{
146
- f = t = 0;
147
- }
148
- if (op[0] & 5) throw op[1];
149
- return {
150
- value: op[0] ? op[1] : void 0,
151
- done: true
152
- };
153
- }
154
- }
155
- var st = function(r, t, e, n) {
156
- t.forEach(function(a) {
157
- yt[a](r, e, n);
158
- });
159
- }, it = function(r, t, e) {
160
- S$1.trace("Making markers for ", e), r.append("defs").append("marker").attr("id", t + "-extensionStart").attr("class", "marker extension " + t).attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"), r.append("defs").append("marker").attr("id", t + "-extensionEnd").attr("class", "marker extension " + t).attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z");
161
- }, nt = function(r, t) {
162
- r.append("defs").append("marker").attr("id", t + "-compositionStart").attr("class", "marker composition " + t).attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), r.append("defs").append("marker").attr("id", t + "-compositionEnd").attr("class", "marker composition " + t).attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
163
- }, lt = function(r, t) {
164
- r.append("defs").append("marker").attr("id", t + "-aggregationStart").attr("class", "marker aggregation " + t).attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), r.append("defs").append("marker").attr("id", t + "-aggregationEnd").attr("class", "marker aggregation " + t).attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
165
- }, ct = function(r, t) {
166
- r.append("defs").append("marker").attr("id", t + "-dependencyStart").attr("class", "marker dependency " + t).attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"), r.append("defs").append("marker").attr("id", t + "-dependencyEnd").attr("class", "marker dependency " + t).attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
167
- }, ht = function(r, t) {
168
- r.append("defs").append("marker").attr("id", t + "-lollipopStart").attr("class", "marker lollipop " + t).attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "white").attr("cx", 6).attr("cy", 7).attr("r", 6);
169
- }, ot = function(r, t) {
170
- r.append("marker").attr("id", t + "-pointEnd").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 10).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), r.append("marker").attr("id", t + "-pointStart").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 0).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 5 L 10 10 L 10 0 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
171
- }, ft = function(r, t) {
172
- r.append("marker").attr("id", t + "-circleEnd").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 11).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), r.append("marker").attr("id", t + "-circleStart").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", -1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
173
- }, dt = function(r, t) {
174
- r.append("marker").attr("id", t + "-crossEnd").attr("class", "marker cross " + t).attr("viewBox", "0 0 11 11").attr("refX", 12).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"), r.append("marker").attr("id", t + "-crossStart").attr("class", "marker cross " + t).attr("viewBox", "0 0 11 11").attr("refX", -1).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0");
175
- }, pt = function(r, t) {
176
- r.append("defs").append("marker").attr("id", t + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "strokeWidth").attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z");
177
- }, yt = {
178
- extension: it,
179
- composition: nt,
180
- aggregation: lt,
181
- dependency: ct,
182
- lollipop: ht,
183
- point: ot,
184
- circle: ft,
185
- cross: dt,
186
- barb: pt
187
- }, Kt = st;
188
- function xt(r, t) {
189
- t && r.attr("style", t);
190
- }
191
- function ut(r) {
192
- var t = At$1(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject")), e = t.append("xhtml:div"), n = r.label, a = r.isNode ? "nodeLabel" : "edgeLabel";
193
- return e.html('<span class="' + a + '" ' + (r.labelStyle ? 'style="' + r.labelStyle + '"' : "") + ">" + n + "</span>"), xt(e, r.labelStyle), e.style("display", "inline-block"), e.style("white-space", "nowrap"), e.attr("xmlns", "http://www.w3.org/1999/xhtml"), t.node();
194
- }
195
- var gt = function(r, t, e, n) {
196
- var a = r || "";
197
- if (typeof a == "object" && (a = a[0]), ia(Ut$1().flowchart.htmlLabels)) {
198
- a = a.replace(/\\n|\n/g, "<br />"), S$1.info("vertexText" + a);
199
- var s = {
200
- isNode: n,
201
- label: cx(a).replace(/fa[blrs]?:fa-[\w-]+/g, function(l) {
202
- return "<i class='".concat(l.replace(":", " "), "'></i>");
203
- }),
204
- labelStyle: t.replace("fill:", "color:")
205
- };
206
- return ut(s);
207
- } else {
208
- var s1 = document.createElementNS("http://www.w3.org/2000/svg", "text");
209
- s1.setAttribute("style", t.replace("color:", "fill:"));
210
- var i = [];
211
- typeof a == "string" ? i = a.split(/\\n|\n|<br\s*\/?>/gi) : Array.isArray(a) ? i = a : i = [];
212
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
213
- try {
214
- for(var _iterator = i[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
215
- var l = _step.value;
216
- var c = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
217
- c.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), c.setAttribute("dy", "1em"), c.setAttribute("x", "0"), e ? c.setAttribute("class", "title-row") : c.setAttribute("class", "row"), c.textContent = l.trim(), s1.appendChild(c);
218
- }
219
- } catch (err) {
220
- _didIteratorError = true;
221
- _iteratorError = err;
222
- } finally{
223
- try {
224
- if (!_iteratorNormalCompletion && _iterator.return != null) {
225
- _iterator.return();
226
- }
227
- } finally{
228
- if (_didIteratorError) {
229
- throw _iteratorError;
230
- }
231
- }
232
- }
233
- return s1;
234
- }
235
- }, R = gt, B = function() {
236
- var _ref = _async_to_generator(function(r, t, e, n) {
237
- var a, s, i, l, c, o, h, f, x, d, p, y, g;
238
- return _ts_generator(this, function(_state) {
239
- switch(_state.label){
240
- case 0:
241
- s = t.useHtmlLabels || ia(Ut$1().flowchart.htmlLabels);
242
- e ? a = e : a = "node default";
243
- i = r.insert("g").attr("class", a).attr("id", t.domId || t.id), l = i.insert("g").attr("class", "label").attr("style", t.labelStyle);
244
- t.labelText === void 0 ? c = "" : c = typeof t.labelText == "string" ? t.labelText : t.labelText[0];
245
- o = l.node();
246
- t.labelType === "markdown" ? h = Rr(l, Je(cx(c), Ut$1()), {
247
- useHtmlLabels: s,
248
- width: t.width || Ut$1().flowchart.wrappingWidth,
249
- classes: "markdown-node-label"
250
- }) : h = o.appendChild(R(Je(cx(c), Ut$1()), t.labelStyle, !1, n));
251
- f = h.getBBox();
252
- x = t.padding / 2;
253
- if (!ia(Ut$1().flowchart.htmlLabels)) return [
254
- 3,
255
- 3
256
- ];
257
- d = h.children[0], p = At$1(h), y = d.getElementsByTagName("img");
258
- if (!y) return [
259
- 3,
260
- 2
261
- ];
262
- g = c.replace(/<img[^>]*>/g, "").trim() === "";
263
- return [
264
- 4,
265
- Promise.all(_to_consumable_array(y).map(function(b) {
266
- return new Promise(function(I) {
267
- var T = function T() {
268
- if (b.style.display = "flex", b.style.flexDirection = "column", g) {
269
- var M = Ut$1().fontSize ? Ut$1().fontSize : window.getComputedStyle(document.body).fontSize, $ = 5;
270
- b.style.width = parseInt(M, 10) * $ + "px";
271
- } else b.style.width = "100%";
272
- I(b);
273
- };
274
- setTimeout(function() {
275
- b.complete && T();
276
- }), b.addEventListener("error", T), b.addEventListener("load", T);
277
- });
278
- }))
279
- ];
280
- case 1:
281
- _state.sent();
282
- _state.label = 2;
283
- case 2:
284
- f = d.getBoundingClientRect(), p.attr("width", f.width), p.attr("height", f.height);
285
- _state.label = 3;
286
- case 3:
287
- return [
288
- 2,
289
- (s ? l.attr("transform", "translate(" + -f.width / 2 + ", " + -f.height / 2 + ")") : l.attr("transform", "translate(0, " + -f.height / 2 + ")"), t.centerLabel && l.attr("transform", "translate(" + -f.width / 2 + ", " + -f.height / 2 + ")"), l.insert("rect", ":first-child"), {
290
- shapeSvg: i,
291
- bbox: f,
292
- halfPadding: x,
293
- label: l
294
- })
295
- ];
296
- }
297
- });
298
- });
299
- return function B(r, t, e, n) {
300
- return _ref.apply(this, arguments);
301
- };
302
- }(), v = function(r, t) {
303
- var e = t.node().getBBox();
304
- r.width = e.width, r.height = e.height;
305
- };
306
- function _(r, t, e, n) {
307
- return r.insert("polygon", ":first-child").attr("points", n.map(function(a) {
308
- return a.x + "," + a.y;
309
- }).join(" ")).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," + e / 2 + ")");
310
- }
311
- function bt(r, t) {
312
- return r.intersect(t);
313
- }
314
- function tt(r, t, e, n) {
315
- var a = r.x, s = r.y, i = a - n.x, l = s - n.y, c = Math.sqrt(t * t * l * l + e * e * i * i), o = Math.abs(t * e * i / c);
316
- n.x < a && (o = -o);
317
- var h = Math.abs(t * e * l / c);
318
- return n.y < s && (h = -h), {
319
- x: a + o,
320
- y: s + h
321
- };
322
- }
323
- function wt(r, t, e) {
324
- return tt(r, t, t, e);
325
- }
326
- function mt(r, t, e, n) {
327
- var a, s, i, l, c, o, h, f, x, d, p, y, g, b, I;
328
- if (a = t.y - r.y, i = r.x - t.x, c = t.x * r.y - r.x * t.y, x = a * e.x + i * e.y + c, d = a * n.x + i * n.y + c, !(x !== 0 && d !== 0 && V(x, d)) && (s = n.y - e.y, l = e.x - n.x, o = n.x * e.y - e.x * n.y, h = s * r.x + l * r.y + o, f = s * t.x + l * t.y + o, !(h !== 0 && f !== 0 && V(h, f)) && (p = a * l - s * i, p !== 0))) return y = Math.abs(p / 2), g = i * o - l * c, b = g < 0 ? (g - y) / p : (g + y) / p, g = s * c - a * o, I = g < 0 ? (g - y) / p : (g + y) / p, {
329
- x: b,
330
- y: I
331
- };
332
- }
333
- function V(r, t) {
334
- return r * t > 0;
335
- }
336
- function kt(r, t, e) {
337
- var n = r.x, a = r.y, s = [], i = Number.POSITIVE_INFINITY, l = Number.POSITIVE_INFINITY;
338
- typeof t.forEach == "function" ? t.forEach(function(p) {
339
- i = Math.min(i, p.x), l = Math.min(l, p.y);
340
- }) : (i = Math.min(i, t.x), l = Math.min(l, t.y));
341
- for(var c = n - r.width / 2 - i, o = a - r.height / 2 - l, h = 0; h < t.length; h++){
342
- var f = t[h], x = t[h < t.length - 1 ? h + 1 : 0], d = mt(r, e, {
343
- x: c + f.x,
344
- y: o + f.y
345
- }, {
346
- x: c + x.x,
347
- y: o + x.y
348
- });
349
- d && s.push(d);
350
- }
351
- return s.length ? (s.length > 1 && s.sort(function(p, y) {
352
- var g = p.x - e.x, b = p.y - e.y, I = Math.sqrt(g * g + b * b), T = y.x - e.x, M = y.y - e.y, $ = Math.sqrt(T * T + M * M);
353
- return I < $ ? -1 : I === $ ? 0 : 1;
354
- }), s[0]) : r;
355
- }
356
- var Lt = function(r, t) {
357
- var e = r.x, n = r.y, a = t.x - e, s = t.y - n, i = r.width / 2, l = r.height / 2, c, o;
358
- return Math.abs(s) * i > Math.abs(a) * l ? (s < 0 && (l = -l), c = s === 0 ? 0 : l * a / s, o = l) : (a < 0 && (i = -i), c = i, o = a === 0 ? 0 : i * s / a), {
359
- x: e + c,
360
- y: n + o
361
- };
362
- }, vt = Lt, m = {
363
- node: bt,
364
- circle: wt,
365
- ellipse: tt,
366
- polygon: kt,
367
- rect: vt
368
- }, St = function() {
369
- var _ref = _async_to_generator(function(r, t) {
370
- var _ref, n, a, s, i;
371
- return _ts_generator(this, function(_state) {
372
- switch(_state.label){
373
- case 0:
374
- t.useHtmlLabels || Ut$1().flowchart.htmlLabels || (t.centerLabel = !0);
375
- return [
376
- 4,
377
- B(r, t, "node " + t.classes, !0)
378
- ];
379
- case 1:
380
- _ref = _state.sent(), n = _ref.shapeSvg, a = _ref.bbox, s = _ref.halfPadding;
381
- S$1.info("Classes = ", t.classes);
382
- i = n.insert("rect", ":first-child");
383
- return [
384
- 2,
385
- (i.attr("rx", t.rx).attr("ry", t.ry).attr("x", -a.width / 2 - s).attr("y", -a.height / 2 - s).attr("width", a.width + t.padding).attr("height", a.height + t.padding), v(t, i), t.intersect = function(l) {
386
- return m.rect(t, l);
387
- }, n)
388
- ];
389
- }
390
- });
391
- });
392
- return function St(r, t) {
393
- return _ref.apply(this, arguments);
394
- };
395
- }(), Et = St, q = function() {
396
- var _ref = _async_to_generator(function(r, t) {
397
- var _ref, e, n, a, s, i, l, c;
398
- return _ts_generator(this, function(_state) {
399
- switch(_state.label){
400
- case 0:
401
- return [
402
- 4,
403
- B(r, t, void 0, !0)
404
- ];
405
- case 1:
406
- _ref = _state.sent(), e = _ref.shapeSvg, n = _ref.bbox, a = n.width + t.padding, s = n.height + t.padding, i = a + s, l = [
407
- {
408
- x: i / 2,
409
- y: 0
410
- },
411
- {
412
- x: i,
413
- y: -i / 2
414
- },
415
- {
416
- x: i / 2,
417
- y: -i
418
- },
419
- {
420
- x: 0,
421
- y: -i / 2
422
- }
423
- ];
424
- S$1.info("Question main (Circle)");
425
- c = _(e, i, i, l);
426
- return [
427
- 2,
428
- (c.attr("style", t.style), v(t, c), t.intersect = function(o) {
429
- return S$1.warn("Intersect called"), m.polygon(t, l, o);
430
- }, e)
431
- ];
432
- }
433
- });
434
- });
435
- return function q(r, t) {
436
- return _ref.apply(this, arguments);
437
- };
438
- }(), Bt = function(r, t) {
439
- var e = r.insert("g").attr("class", "node default").attr("id", t.domId || t.id), n = 28, a = [
440
- {
441
- x: 0,
442
- y: n / 2
443
- },
444
- {
445
- x: n / 2,
446
- y: 0
447
- },
448
- {
449
- x: 0,
450
- y: -n / 2
451
- },
452
- {
453
- x: -n / 2,
454
- y: 0
455
- }
456
- ];
457
- return e.insert("polygon", ":first-child").attr("points", a.map(function(i) {
458
- return i.x + "," + i.y;
459
- }).join(" ")).attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28), t.width = 28, t.height = 28, t.intersect = function Bt(i) {
460
- return m.circle(t, 14, i);
461
- }, e;
462
- }, Mt = function() {
463
- var _ref = _async_to_generator(function(r, t) {
464
- var _ref, e, n, a, s, i, l, c, o;
465
- return _ts_generator(this, function(_state) {
466
- switch(_state.label){
467
- case 0:
468
- return [
469
- 4,
470
- B(r, t, void 0, !0)
471
- ];
472
- case 1:
473
- _ref = _state.sent(), e = _ref.shapeSvg, n = _ref.bbox, a = 4, s = n.height + t.padding, i = s / a, l = n.width + 2 * i + t.padding, c = [
474
- {
475
- x: i,
476
- y: 0
477
- },
478
- {
479
- x: l - i,
480
- y: 0
481
- },
482
- {
483
- x: l,
484
- y: -s / 2
485
- },
486
- {
487
- x: l - i,
488
- y: -s
489
- },
490
- {
491
- x: i,
492
- y: -s
493
- },
494
- {
495
- x: 0,
496
- y: -s / 2
497
- }
498
- ], o = _(e, l, s, c);
499
- return [
500
- 2,
501
- (o.attr("style", t.style), v(t, o), t.intersect = function(h) {
502
- return m.polygon(t, c, h);
503
- }, e)
504
- ];
505
- }
506
- });
507
- });
508
- return function Mt(r, t) {
509
- return _ref.apply(this, arguments);
510
- };
511
- }(), Ct = function() {
512
- var _ref = _async_to_generator(function(r, t) {
513
- var _ref, e, n, a, s, i;
514
- return _ts_generator(this, function(_state) {
515
- switch(_state.label){
516
- case 0:
517
- return [
518
- 4,
519
- B(r, t, void 0, !0)
520
- ];
521
- case 1:
522
- _ref = _state.sent(), e = _ref.shapeSvg, n = _ref.bbox, a = n.width + t.padding, s = n.height + t.padding, i = [
523
- {
524
- x: -s / 2,
525
- y: 0
526
- },
527
- {
528
- x: a,
529
- y: 0
530
- },
531
- {
532
- x: a,
533
- y: -s
534
- },
535
- {
536
- x: -s / 2,
537
- y: -s
538
- },
539
- {
540
- x: 0,
541
- y: -s / 2
542
- }
543
- ];
544
- return [
545
- 2,
546
- (_(e, a, s, i).attr("style", t.style), t.width = a + s, t.height = s, t.intersect = function(c) {
547
- return m.polygon(t, i, c);
548
- }, e)
549
- ];
550
- }
551
- });
552
- });
553
- return function Ct(r, t) {
554
- return _ref.apply(this, arguments);
555
- };
556
- }(), Tt = function() {
557
- var _ref = _async_to_generator(function(r, t) {
558
- var _ref, e, n, a, s, i, l;
559
- return _ts_generator(this, function(_state) {
560
- switch(_state.label){
561
- case 0:
562
- return [
563
- 4,
564
- B(r, t, void 0, !0)
565
- ];
566
- case 1:
567
- _ref = _state.sent(), e = _ref.shapeSvg, n = _ref.bbox, a = n.width + t.padding, s = n.height + t.padding, i = [
568
- {
569
- x: -2 * s / 6,
570
- y: 0
571
- },
572
- {
573
- x: a - s / 6,
574
- y: 0
575
- },
576
- {
577
- x: a + 2 * s / 6,
578
- y: -s
579
- },
580
- {
581
- x: s / 6,
582
- y: -s
583
- }
584
- ], l = _(e, a, s, i);
585
- return [
586
- 2,
587
- (l.attr("style", t.style), v(t, l), t.intersect = function(c) {
588
- return m.polygon(t, i, c);
589
- }, e)
590
- ];
591
- }
592
- });
593
- });
594
- return function Tt(r, t) {
595
- return _ref.apply(this, arguments);
596
- };
597
- }(), Rt = function() {
598
- var _ref = _async_to_generator(function(r, t) {
599
- var _ref, e, n, a, s, i, l;
600
- return _ts_generator(this, function(_state) {
601
- switch(_state.label){
602
- case 0:
603
- return [
604
- 4,
605
- B(r, t, void 0, !0)
606
- ];
607
- case 1:
608
- _ref = _state.sent(), e = _ref.shapeSvg, n = _ref.bbox, a = n.width + t.padding, s = n.height + t.padding, i = [
609
- {
610
- x: 2 * s / 6,
611
- y: 0
612
- },
613
- {
614
- x: a + s / 6,
615
- y: 0
616
- },
617
- {
618
- x: a - 2 * s / 6,
619
- y: -s
620
- },
621
- {
622
- x: -s / 6,
623
- y: -s
624
- }
625
- ], l = _(e, a, s, i);
626
- return [
627
- 2,
628
- (l.attr("style", t.style), v(t, l), t.intersect = function(c) {
629
- return m.polygon(t, i, c);
630
- }, e)
631
- ];
632
- }
633
- });
634
- });
635
- return function Rt(r, t) {
636
- return _ref.apply(this, arguments);
637
- };
638
- }(), It = function() {
639
- var _ref = _async_to_generator(function(r, t) {
640
- var _ref, e, n, a, s, i, l;
641
- return _ts_generator(this, function(_state) {
642
- switch(_state.label){
643
- case 0:
644
- return [
645
- 4,
646
- B(r, t, void 0, !0)
647
- ];
648
- case 1:
649
- _ref = _state.sent(), e = _ref.shapeSvg, n = _ref.bbox, a = n.width + t.padding, s = n.height + t.padding, i = [
650
- {
651
- x: -2 * s / 6,
652
- y: 0
653
- },
654
- {
655
- x: a + 2 * s / 6,
656
- y: 0
657
- },
658
- {
659
- x: a - s / 6,
660
- y: -s
661
- },
662
- {
663
- x: s / 6,
664
- y: -s
665
- }
666
- ], l = _(e, a, s, i);
667
- return [
668
- 2,
669
- (l.attr("style", t.style), v(t, l), t.intersect = function(c) {
670
- return m.polygon(t, i, c);
671
- }, e)
672
- ];
673
- }
674
- });
675
- });
676
- return function It(r, t) {
677
- return _ref.apply(this, arguments);
678
- };
679
- }(), Ht = function() {
680
- var _ref = _async_to_generator(function(r, t) {
681
- var _ref, e, n, a, s, i, l;
682
- return _ts_generator(this, function(_state) {
683
- switch(_state.label){
684
- case 0:
685
- return [
686
- 4,
687
- B(r, t, void 0, !0)
688
- ];
689
- case 1:
690
- _ref = _state.sent(), e = _ref.shapeSvg, n = _ref.bbox, a = n.width + t.padding, s = n.height + t.padding, i = [
691
- {
692
- x: s / 6,
693
- y: 0
694
- },
695
- {
696
- x: a - s / 6,
697
- y: 0
698
- },
699
- {
700
- x: a + 2 * s / 6,
701
- y: -s
702
- },
703
- {
704
- x: -2 * s / 6,
705
- y: -s
706
- }
707
- ], l = _(e, a, s, i);
708
- return [
709
- 2,
710
- (l.attr("style", t.style), v(t, l), t.intersect = function(c) {
711
- return m.polygon(t, i, c);
712
- }, e)
713
- ];
714
- }
715
- });
716
- });
717
- return function Ht(r, t) {
718
- return _ref.apply(this, arguments);
719
- };
720
- }(), Nt = function() {
721
- var _ref = _async_to_generator(function(r, t) {
722
- var _ref, e, n, a, s, i, l;
723
- return _ts_generator(this, function(_state) {
724
- switch(_state.label){
725
- case 0:
726
- return [
727
- 4,
728
- B(r, t, void 0, !0)
729
- ];
730
- case 1:
731
- _ref = _state.sent(), e = _ref.shapeSvg, n = _ref.bbox, a = n.width + t.padding, s = n.height + t.padding, i = [
732
- {
733
- x: 0,
734
- y: 0
735
- },
736
- {
737
- x: a + s / 2,
738
- y: 0
739
- },
740
- {
741
- x: a,
742
- y: -s / 2
743
- },
744
- {
745
- x: a + s / 2,
746
- y: -s
747
- },
748
- {
749
- x: 0,
750
- y: -s
751
- }
752
- ], l = _(e, a, s, i);
753
- return [
754
- 2,
755
- (l.attr("style", t.style), v(t, l), t.intersect = function(c) {
756
- return m.polygon(t, i, c);
757
- }, e)
758
- ];
759
- }
760
- });
761
- });
762
- return function Nt(r, t) {
763
- return _ref.apply(this, arguments);
764
- };
765
- }(), _t = function() {
766
- var _ref = _async_to_generator(function(r, t) {
767
- var _ref, e, n, a, s, i, l, c, o;
768
- return _ts_generator(this, function(_state) {
769
- switch(_state.label){
770
- case 0:
771
- return [
772
- 4,
773
- B(r, t, void 0, !0)
774
- ];
775
- case 1:
776
- _ref = _state.sent(), e = _ref.shapeSvg, n = _ref.bbox, a = n.width + t.padding, s = a / 2, i = s / (2.5 + a / 50), l = n.height + i + t.padding, c = "M 0," + i + " a " + s + "," + i + " 0,0,0 " + a + " 0 a " + s + "," + i + " 0,0,0 " + -a + " 0 l 0," + l + " a " + s + "," + i + " 0,0,0 " + a + " 0 l 0," + -l, o = e.attr("label-offset-y", i).insert("path", ":first-child").attr("style", t.style).attr("d", c).attr("transform", "translate(" + -a / 2 + "," + -(l / 2 + i) + ")");
777
- return [
778
- 2,
779
- (v(t, o), t.intersect = function(h) {
780
- var f = m.rect(t, h), x = f.x - t.x;
781
- if (s != 0 && (Math.abs(x) < t.width / 2 || Math.abs(x) == t.width / 2 && Math.abs(f.y - t.y) > t.height / 2 - i)) {
782
- var d = i * i * (1 - x * x / (s * s));
783
- d != 0 && (d = Math.sqrt(d)), d = i - d, h.y - t.y > 0 && (d = -d), f.y += d;
784
- }
785
- return f;
786
- }, e)
787
- ];
788
- }
789
- });
790
- });
791
- return function _t(r, t) {
792
- return _ref.apply(this, arguments);
793
- };
794
- }(), $t = function() {
795
- var _ref = _async_to_generator(function(r, t) {
796
- var _ref, e, n, a, s, i, l, c;
797
- return _ts_generator(this, function(_state) {
798
- switch(_state.label){
799
- case 0:
800
- return [
801
- 4,
802
- B(r, t, "node " + t.classes, !0)
803
- ];
804
- case 1:
805
- _ref = _state.sent(), e = _ref.shapeSvg, n = _ref.bbox, a = _ref.halfPadding, s = e.insert("rect", ":first-child"), i = n.width + t.padding, l = n.height + t.padding;
806
- if (s.attr("class", "basic label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", -n.width / 2 - a).attr("y", -n.height / 2 - a).attr("width", i).attr("height", l), t.props) {
807
- c = new Set(Object.keys(t.props));
808
- t.props.borders && (rt(s, t.props.borders, i, l), c.delete("borders")), c.forEach(function(o) {
809
- S$1.warn("Unknown node property ".concat(o));
810
- });
811
- }
812
- return [
813
- 2,
814
- (v(t, s), t.intersect = function(c) {
815
- return m.rect(t, c);
816
- }, e)
817
- ];
818
- }
819
- });
820
- });
821
- return function $t(r, t) {
822
- return _ref.apply(this, arguments);
823
- };
824
- }(), Wt = function() {
825
- var _ref = _async_to_generator(function(r, t) {
826
- var _ref, e, n, a, s, i;
827
- return _ts_generator(this, function(_state) {
828
- switch(_state.label){
829
- case 0:
830
- return [
831
- 4,
832
- B(r, t, "label", !0)
833
- ];
834
- case 1:
835
- _ref = _state.sent(), e = _ref.shapeSvg;
836
- S$1.trace("Classes = ", t.classes);
837
- n = e.insert("rect", ":first-child"), a = 0, s = 0;
838
- if (n.attr("width", a).attr("height", s), e.attr("class", "label edgeLabel"), t.props) {
839
- i = new Set(Object.keys(t.props));
840
- t.props.borders && (rt(n, t.props.borders, a, s), i.delete("borders")), i.forEach(function(l) {
841
- S$1.warn("Unknown node property ".concat(l));
842
- });
843
- }
844
- return [
845
- 2,
846
- (v(t, n), t.intersect = function(i) {
847
- return m.rect(t, i);
848
- }, e)
849
- ];
850
- }
851
- });
852
- });
853
- return function Wt(r, t) {
854
- return _ref.apply(this, arguments);
855
- };
856
- }();
857
- function rt(r, t, e, n) {
858
- var a = [], s = function(l) {
859
- a.push(l, 0);
860
- }, i = function(l) {
861
- a.push(0, l);
862
- };
863
- t.includes("t") ? (S$1.debug("add top border"), s(e)) : i(e), t.includes("r") ? (S$1.debug("add right border"), s(n)) : i(n), t.includes("b") ? (S$1.debug("add bottom border"), s(e)) : i(e), t.includes("l") ? (S$1.debug("add left border"), s(n)) : i(n), r.attr("stroke-dasharray", a.join(" "));
864
- }
865
- var Xt = function(r, t) {
866
- var e;
867
- t.classes ? e = "node " + t.classes : e = "node default";
868
- var n = r.insert("g").attr("class", e).attr("id", t.domId || t.id), a = n.insert("rect", ":first-child"), s = n.insert("line"), i = n.insert("g").attr("class", "label"), l = t.labelText.flat ? t.labelText.flat() : t.labelText;
869
- var c = "";
870
- typeof l == "object" ? c = l[0] : c = l, S$1.info("Label text abc79", c, l, typeof l == "object");
871
- var o = i.node().appendChild(R(c, t.labelStyle, !0, !0));
872
- var h = {
873
- width: 0,
874
- height: 0
875
- };
876
- if (ia(Ut$1().flowchart.htmlLabels)) {
877
- var y = o.children[0], g = At$1(o);
878
- h = y.getBoundingClientRect(), g.attr("width", h.width), g.attr("height", h.height);
879
- }
880
- S$1.info("Text 2", l);
881
- var f = l.slice(1, l.length);
882
- var x = o.getBBox();
883
- var d = i.node().appendChild(R(f.join ? f.join("<br/>") : f, t.labelStyle, !0, !0));
884
- if (ia(Ut$1().flowchart.htmlLabels)) {
885
- var y1 = d.children[0], g1 = At$1(d);
886
- h = y1.getBoundingClientRect(), g1.attr("width", h.width), g1.attr("height", h.height);
887
- }
888
- var p = t.padding / 2;
889
- return At$1(d).attr("transform", "translate( " + // (titleBox.width - bbox.width) / 2 +
890
- (h.width > x.width ? 0 : (x.width - h.width) / 2) + ", " + (x.height + p + 5) + ")"), At$1(o).attr("transform", "translate( " + // (titleBox.width - bbox.width) / 2 +
891
- (h.width < x.width ? 0 : -(x.width - h.width) / 2) + ", 0)"), h = i.node().getBBox(), i.attr("transform", "translate(" + -h.width / 2 + ", " + (-h.height / 2 - p + 3) + ")"), a.attr("class", "outer title-state").attr("x", -h.width / 2 - p).attr("y", -h.height / 2 - p).attr("width", h.width + t.padding).attr("height", h.height + t.padding), s.attr("class", "divider").attr("x1", -h.width / 2 - p).attr("x2", h.width / 2 + p).attr("y1", -h.height / 2 - p + x.height + p).attr("y2", -h.height / 2 - p + x.height + p), v(t, a), t.intersect = function Xt(y) {
892
- return m.rect(t, y);
893
- }, n;
894
- }, Yt = function() {
895
- var _ref = _async_to_generator(function(r, t) {
896
- var _ref, e, n, a, s, i;
897
- return _ts_generator(this, function(_state) {
898
- switch(_state.label){
899
- case 0:
900
- return [
901
- 4,
902
- B(r, t, void 0, !0)
903
- ];
904
- case 1:
905
- _ref = _state.sent(), e = _ref.shapeSvg, n = _ref.bbox, a = n.height + t.padding, s = n.width + a / 4 + t.padding, i = e.insert("rect", ":first-child").attr("style", t.style).attr("rx", a / 2).attr("ry", a / 2).attr("x", -s / 2).attr("y", -a / 2).attr("width", s).attr("height", a);
906
- return [
907
- 2,
908
- (v(t, i), t.intersect = function(l) {
909
- return m.rect(t, l);
910
- }, e)
911
- ];
912
- }
913
- });
914
- });
915
- return function Yt(r, t) {
916
- return _ref.apply(this, arguments);
917
- };
918
- }(), Ut = function() {
919
- var _ref = _async_to_generator(function(r, t) {
920
- var _ref, e, n, a, s;
921
- return _ts_generator(this, function(_state) {
922
- switch(_state.label){
923
- case 0:
924
- return [
925
- 4,
926
- B(r, t, void 0, !0)
927
- ];
928
- case 1:
929
- _ref = _state.sent(), e = _ref.shapeSvg, n = _ref.bbox, a = _ref.halfPadding, s = e.insert("circle", ":first-child");
930
- return [
931
- 2,
932
- (s.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", n.width / 2 + a).attr("width", n.width + t.padding).attr("height", n.height + t.padding), S$1.info("Circle main"), v(t, s), t.intersect = function(i) {
933
- return S$1.info("Circle intersect", t, n.width / 2 + a, i), m.circle(t, n.width / 2 + a, i);
934
- }, e)
935
- ];
936
- }
937
- });
938
- });
939
- return function Ut(r, t) {
940
- return _ref.apply(this, arguments);
941
- };
942
- }(), jt = function() {
943
- var _ref = _async_to_generator(function(r, t) {
944
- var _ref, e, n, a, s, i, l, c;
945
- return _ts_generator(this, function(_state) {
946
- switch(_state.label){
947
- case 0:
948
- return [
949
- 4,
950
- B(r, t, void 0, !0)
951
- ];
952
- case 1:
953
- _ref = _state.sent(), e = _ref.shapeSvg, n = _ref.bbox, a = _ref.halfPadding, s = 5, i = e.insert("g", ":first-child"), l = i.insert("circle"), c = i.insert("circle");
954
- return [
955
- 2,
956
- (i.attr("class", t.class), l.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", n.width / 2 + a + s).attr("width", n.width + t.padding + s * 2).attr("height", n.height + t.padding + s * 2), c.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", n.width / 2 + a).attr("width", n.width + t.padding).attr("height", n.height + t.padding), S$1.info("DoubleCircle main"), v(t, l), t.intersect = function(o) {
957
- return S$1.info("DoubleCircle intersect", t, n.width / 2 + a + s, o), m.circle(t, n.width / 2 + a + s, o);
958
- }, e)
959
- ];
960
- }
961
- });
962
- });
963
- return function jt(r, t) {
964
- return _ref.apply(this, arguments);
965
- };
966
- }(), At = function() {
967
- var _ref = _async_to_generator(function(r, t) {
968
- var _ref, e, n, a, s, i, l;
969
- return _ts_generator(this, function(_state) {
970
- switch(_state.label){
971
- case 0:
972
- return [
973
- 4,
974
- B(r, t, void 0, !0)
975
- ];
976
- case 1:
977
- _ref = _state.sent(), e = _ref.shapeSvg, n = _ref.bbox, a = n.width + t.padding, s = n.height + t.padding, i = [
978
- {
979
- x: 0,
980
- y: 0
981
- },
982
- {
983
- x: a,
984
- y: 0
985
- },
986
- {
987
- x: a,
988
- y: -s
989
- },
990
- {
991
- x: 0,
992
- y: -s
993
- },
994
- {
995
- x: 0,
996
- y: 0
997
- },
998
- {
999
- x: -8,
1000
- y: 0
1001
- },
1002
- {
1003
- x: a + 8,
1004
- y: 0
1005
- },
1006
- {
1007
- x: a + 8,
1008
- y: -s
1009
- },
1010
- {
1011
- x: -8,
1012
- y: -s
1013
- },
1014
- {
1015
- x: -8,
1016
- y: 0
1017
- }
1018
- ], l = _(e, a, s, i);
1019
- return [
1020
- 2,
1021
- (l.attr("style", t.style), v(t, l), t.intersect = function(c) {
1022
- return m.polygon(t, i, c);
1023
- }, e)
1024
- ];
1025
- }
1026
- });
1027
- });
1028
- return function At(r, t) {
1029
- return _ref.apply(this, arguments);
1030
- };
1031
- }(), Dt = function(r, t) {
1032
- var e = r.insert("g").attr("class", "node default").attr("id", t.domId || t.id), n = e.insert("circle", ":first-child");
1033
- return n.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), v(t, n), t.intersect = function Dt(a) {
1034
- return m.circle(t, 7, a);
1035
- }, e;
1036
- }, J = function(r, t, e) {
1037
- var n = r.insert("g").attr("class", "node default").attr("id", t.domId || t.id);
1038
- var a = 70, s = 10;
1039
- e === "LR" && (a = 10, s = 70);
1040
- var i = n.append("rect").attr("x", -1 * a / 2).attr("y", -1 * s / 2).attr("width", a).attr("height", s).attr("class", "fork-join");
1041
- return v(t, i), t.height = t.height + t.padding / 2, t.width = t.width + t.padding / 2, t.intersect = function J(l) {
1042
- return m.rect(t, l);
1043
- }, n;
1044
- }, Ot = function(r, t) {
1045
- var e = r.insert("g").attr("class", "node default").attr("id", t.domId || t.id), n = e.insert("circle", ":first-child"), a = e.insert("circle", ":first-child");
1046
- return a.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), n.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10), v(t, a), t.intersect = function Ot(s) {
1047
- return m.circle(t, 7, s);
1048
- }, e;
1049
- }, zt = function(r, t) {
1050
- var e = t.padding / 2, n = 4, a = 8;
1051
- var s;
1052
- t.classes ? s = "node " + t.classes : s = "node default";
1053
- var i = r.insert("g").attr("class", s).attr("id", t.domId || t.id), l = i.insert("rect", ":first-child"), c = i.insert("line"), o = i.insert("line");
1054
- var h = 0, f = n;
1055
- var x = i.insert("g").attr("class", "label");
1056
- var d = 0;
1057
- var p = t.classData.annotations && t.classData.annotations[0], y = t.classData.annotations[0] ? "\xab" + t.classData.annotations[0] + "\xbb" : "", g = x.node().appendChild(R(y, t.labelStyle, !0, !0));
1058
- var b = g.getBBox();
1059
- if (ia(Ut$1().flowchart.htmlLabels)) {
1060
- var k = g.children[0], L = At$1(g);
1061
- b = k.getBoundingClientRect(), L.attr("width", b.width), L.attr("height", b.height);
1062
- }
1063
- t.classData.annotations[0] && (f += b.height + n, h += b.width);
1064
- var I = t.classData.label;
1065
- t.classData.type !== void 0 && t.classData.type !== "" && (Ut$1().flowchart.htmlLabels ? I += "&lt;" + t.classData.type + "&gt;" : I += "<" + t.classData.type + ">");
1066
- var T = x.node().appendChild(R(I, t.labelStyle, !0, !0));
1067
- At$1(T).attr("class", "classTitle");
1068
- var M$1 = T.getBBox();
1069
- if (ia(Ut$1().flowchart.htmlLabels)) {
1070
- var k1 = T.children[0], L1 = At$1(T);
1071
- M$1 = k1.getBoundingClientRect(), L1.attr("width", M$1.width), L1.attr("height", M$1.height);
1072
- }
1073
- f += M$1.height + n, M$1.width > h && (h = M$1.width);
1074
- var $ = [];
1075
- t.classData.members.forEach(function(k) {
1076
- var L = M(k);
1077
- var W = L.displayText;
1078
- Ut$1().flowchart.htmlLabels && (W = W.replace(/</g, "&lt;").replace(/>/g, "&gt;"));
1079
- var N = x.node().appendChild(R(W, L.cssStyle ? L.cssStyle : t.labelStyle, !0, !0));
1080
- var C = N.getBBox();
1081
- if (ia(Ut$1().flowchart.htmlLabels)) {
1082
- var D = N.children[0], Y = At$1(N);
1083
- C = D.getBoundingClientRect(), Y.attr("width", C.width), Y.attr("height", C.height);
1084
- }
1085
- C.width > h && (h = C.width), f += C.height + n, $.push(N);
1086
- }), f += a;
1087
- var z = [];
1088
- if (t.classData.methods.forEach(function(k) {
1089
- var L = M(k);
1090
- var W = L.displayText;
1091
- Ut$1().flowchart.htmlLabels && (W = W.replace(/</g, "&lt;").replace(/>/g, "&gt;"));
1092
- var N = x.node().appendChild(R(W, L.cssStyle ? L.cssStyle : t.labelStyle, !0, !0));
1093
- var C = N.getBBox();
1094
- if (ia(Ut$1().flowchart.htmlLabels)) {
1095
- var D = N.children[0], Y = At$1(N);
1096
- C = D.getBoundingClientRect(), Y.attr("width", C.width), Y.attr("height", C.height);
1097
- }
1098
- C.width > h && (h = C.width), f += C.height + n, z.push(N);
1099
- }), f += a, p) {
1100
- var k2 = (h - b.width) / 2;
1101
- At$1(g).attr("transform", "translate( " + (-1 * h / 2 + k2) + ", " + -1 * f / 2 + ")"), d = b.height + n;
1102
- }
1103
- var at = (h - M$1.width) / 2;
1104
- return At$1(T).attr("transform", "translate( " + (-1 * h / 2 + at) + ", " + (-1 * f / 2 + d) + ")"), d += M$1.height + n, c.attr("class", "divider").attr("x1", -h / 2 - e).attr("x2", h / 2 + e).attr("y1", -f / 2 - e + a + d).attr("y2", -f / 2 - e + a + d), d += a, $.forEach(function(k) {
1105
- At$1(k).attr("transform", "translate( " + -h / 2 + ", " + (-1 * f / 2 + d + a / 2) + ")");
1106
- var L = k == null ? void 0 : k.getBBox();
1107
- var _ref;
1108
- d += ((_ref = L == null ? void 0 : L.height) !== null && _ref !== void 0 ? _ref : 0) + n;
1109
- }), d += a, o.attr("class", "divider").attr("x1", -h / 2 - e).attr("x2", h / 2 + e).attr("y1", -f / 2 - e + a + d).attr("y2", -f / 2 - e + a + d), d += a, z.forEach(function(k) {
1110
- At$1(k).attr("transform", "translate( " + -h / 2 + ", " + (-1 * f / 2 + d) + ")");
1111
- var L = k == null ? void 0 : k.getBBox();
1112
- var _ref;
1113
- d += ((_ref = L == null ? void 0 : L.height) !== null && _ref !== void 0 ? _ref : 0) + n;
1114
- }), l.attr("class", "outer title-state").attr("x", -h / 2 - e).attr("y", -(f / 2) - e).attr("width", h + t.padding).attr("height", f + t.padding), v(t, l), t.intersect = function zt(k) {
1115
- return m.rect(t, k);
1116
- }, i;
1117
- }, K = {
1118
- rhombus: q,
1119
- question: q,
1120
- rect: $t,
1121
- labelRect: Wt,
1122
- rectWithTitle: Xt,
1123
- choice: Bt,
1124
- circle: Ut,
1125
- doublecircle: jt,
1126
- stadium: Yt,
1127
- hexagon: Mt,
1128
- rect_left_inv_arrow: Ct,
1129
- lean_right: Tt,
1130
- lean_left: Rt,
1131
- trapezoid: It,
1132
- inv_trapezoid: Ht,
1133
- rect_right_inv_arrow: Nt,
1134
- cylinder: _t,
1135
- start: Dt,
1136
- end: Ot,
1137
- note: Et,
1138
- subroutine: At,
1139
- fork: J,
1140
- join: J,
1141
- class_box: zt
1142
- };
1143
- var X = {};
1144
- var Gt = function() {
1145
- var _ref = _async_to_generator(function(r, t, e) {
1146
- var n, a, s;
1147
- return _ts_generator(this, function(_state) {
1148
- switch(_state.label){
1149
- case 0:
1150
- if (!t.link) return [
1151
- 3,
1152
- 2
1153
- ];
1154
- Ut$1().securityLevel === "sandbox" ? s = "_top" : t.linkTarget && (s = t.linkTarget || "_blank"), n = r.insert("svg:a").attr("xlink:href", t.link).attr("target", s);
1155
- return [
1156
- 4,
1157
- K[t.shape](n, t, e)
1158
- ];
1159
- case 1:
1160
- a = _state.sent();
1161
- return [
1162
- 3,
1163
- 4
1164
- ];
1165
- case 2:
1166
- return [
1167
- 4,
1168
- K[t.shape](r, t, e)
1169
- ];
1170
- case 3:
1171
- a = _state.sent(), n = a;
1172
- _state.label = 4;
1173
- case 4:
1174
- return [
1175
- 2,
1176
- (t.tooltip && a.attr("title", t.tooltip), t.class && a.attr("class", "node default " + t.class), X[t.id] = n, t.haveCallback && X[t.id].attr("class", X[t.id].attr("class") + " clickable"), n)
1177
- ];
1178
- }
1179
- });
1180
- });
1181
- return function Gt(r, t, e) {
1182
- return _ref.apply(this, arguments);
1183
- };
1184
- }(), Pt = function(r, t) {
1185
- X[t.id] = r;
1186
- }, tr = function() {
1187
- X = {};
1188
- }, rr = function(r) {
1189
- var t = X[r.id];
1190
- S$1.trace("Transforming node", r.diff, r, "translate(" + (r.x - r.width / 2 - 5) + ", " + r.width / 2 + ")");
1191
- var e = 8, n = r.diff || 0;
1192
- return r.clusterNode ? t.attr("transform", "translate(" + (r.x + n - r.width / 2) + ", " + (r.y - r.height / 2 - e) + ")") : t.attr("transform", "translate(" + r.x + ", " + r.y + ")"), n;
1193
- };
1194
- var A = {}, S = {};
1195
- var ar = function() {
1196
- A = {}, S = {};
1197
- }, er = function(r, t) {
1198
- var e = ia(Ut$1().flowchart.htmlLabels), n = t.labelType === "markdown" ? Rr(r, t.label, {
1199
- style: t.labelStyle,
1200
- useHtmlLabels: e,
1201
- addSvgBackground: !0
1202
- }) : R(t.label, t.labelStyle);
1203
- S$1.info("abc82", t, t.labelType);
1204
- var a = r.insert("g").attr("class", "edgeLabel"), s = a.insert("g").attr("class", "label");
1205
- s.node().appendChild(n);
1206
- var i = n.getBBox();
1207
- if (e) {
1208
- var c = n.children[0], o = At$1(n);
1209
- i = c.getBoundingClientRect(), o.attr("width", i.width), o.attr("height", i.height);
1210
- }
1211
- s.attr("transform", "translate(" + -i.width / 2 + ", " + -i.height / 2 + ")"), A[t.id] = a, t.width = i.width, t.height = i.height;
1212
- var l;
1213
- if (t.startLabelLeft) {
1214
- var c1 = R(t.startLabelLeft, t.labelStyle), o1 = r.insert("g").attr("class", "edgeTerminals"), h = o1.insert("g").attr("class", "inner");
1215
- l = h.node().appendChild(c1);
1216
- var f = c1.getBBox();
1217
- h.attr("transform", "translate(" + -f.width / 2 + ", " + -f.height / 2 + ")"), S[t.id] || (S[t.id] = {}), S[t.id].startLeft = o1, j(l, t.startLabelLeft);
1218
- }
1219
- if (t.startLabelRight) {
1220
- var c2 = R(t.startLabelRight, t.labelStyle), o2 = r.insert("g").attr("class", "edgeTerminals"), h1 = o2.insert("g").attr("class", "inner");
1221
- l = o2.node().appendChild(c2), h1.node().appendChild(c2);
1222
- var f1 = c2.getBBox();
1223
- h1.attr("transform", "translate(" + -f1.width / 2 + ", " + -f1.height / 2 + ")"), S[t.id] || (S[t.id] = {}), S[t.id].startRight = o2, j(l, t.startLabelRight);
1224
- }
1225
- if (t.endLabelLeft) {
1226
- var c3 = R(t.endLabelLeft, t.labelStyle), o3 = r.insert("g").attr("class", "edgeTerminals"), h2 = o3.insert("g").attr("class", "inner");
1227
- l = h2.node().appendChild(c3);
1228
- var f2 = c3.getBBox();
1229
- h2.attr("transform", "translate(" + -f2.width / 2 + ", " + -f2.height / 2 + ")"), o3.node().appendChild(c3), S[t.id] || (S[t.id] = {}), S[t.id].endLeft = o3, j(l, t.endLabelLeft);
1230
- }
1231
- if (t.endLabelRight) {
1232
- var c4 = R(t.endLabelRight, t.labelStyle), o4 = r.insert("g").attr("class", "edgeTerminals"), h3 = o4.insert("g").attr("class", "inner");
1233
- l = h3.node().appendChild(c4);
1234
- var f3 = c4.getBBox();
1235
- h3.attr("transform", "translate(" + -f3.width / 2 + ", " + -f3.height / 2 + ")"), o4.node().appendChild(c4), S[t.id] || (S[t.id] = {}), S[t.id].endRight = o4, j(l, t.endLabelRight);
1236
- }
1237
- return n;
1238
- };
1239
- function j(r, t) {
1240
- Ut$1().flowchart.htmlLabels && r && (r.style.width = t.length * 9 + "px", r.style.height = "12px");
1241
- }
1242
- var sr = function(r, t) {
1243
- S$1.info("Moving label abc78 ", r.id, r.label, A[r.id]);
1244
- var e = t.updatedPath ? t.updatedPath : t.originalPath;
1245
- if (r.label) {
1246
- var n = A[r.id];
1247
- var a = r.x, s = r.y;
1248
- if (e) {
1249
- var i = Oi.calcLabelPosition(e);
1250
- S$1.info("Moving label " + r.label + " from (", a, ",", s, ") to (", i.x, ",", i.y, ") abc78"), t.updatedPath && (a = i.x, s = i.y);
1251
- }
1252
- n.attr("transform", "translate(" + a + ", " + s + ")");
1253
- }
1254
- if (r.startLabelLeft) {
1255
- var n1 = S[r.id].startLeft;
1256
- var a1 = r.x, s1 = r.y;
1257
- if (e) {
1258
- var i1 = Oi.calcTerminalLabelPosition(r.arrowTypeStart ? 10 : 0, "start_left", e);
1259
- a1 = i1.x, s1 = i1.y;
1260
- }
1261
- n1.attr("transform", "translate(" + a1 + ", " + s1 + ")");
1262
- }
1263
- if (r.startLabelRight) {
1264
- var n2 = S[r.id].startRight;
1265
- var a2 = r.x, s2 = r.y;
1266
- if (e) {
1267
- var i2 = Oi.calcTerminalLabelPosition(r.arrowTypeStart ? 10 : 0, "start_right", e);
1268
- a2 = i2.x, s2 = i2.y;
1269
- }
1270
- n2.attr("transform", "translate(" + a2 + ", " + s2 + ")");
1271
- }
1272
- if (r.endLabelLeft) {
1273
- var n3 = S[r.id].endLeft;
1274
- var a3 = r.x, s3 = r.y;
1275
- if (e) {
1276
- var i3 = Oi.calcTerminalLabelPosition(r.arrowTypeEnd ? 10 : 0, "end_left", e);
1277
- a3 = i3.x, s3 = i3.y;
1278
- }
1279
- n3.attr("transform", "translate(" + a3 + ", " + s3 + ")");
1280
- }
1281
- if (r.endLabelRight) {
1282
- var n4 = S[r.id].endRight;
1283
- var a4 = r.x, s4 = r.y;
1284
- if (e) {
1285
- var i4 = Oi.calcTerminalLabelPosition(r.arrowTypeEnd ? 10 : 0, "end_right", e);
1286
- a4 = i4.x, s4 = i4.y;
1287
- }
1288
- n4.attr("transform", "translate(" + a4 + ", " + s4 + ")");
1289
- }
1290
- }, Zt = function(r, t) {
1291
- var e = r.x, n = r.y, a = Math.abs(t.x - e), s = Math.abs(t.y - n), i = r.width / 2, l = r.height / 2;
1292
- return a >= i || s >= l;
1293
- }, Ft = function(r, t, e) {
1294
- S$1.warn("intersection calc abc89:\n outsidePoint: ".concat(JSON.stringify(t), "\n insidePoint : ").concat(JSON.stringify(e), "\n node : x:").concat(r.x, " y:").concat(r.y, " w:").concat(r.width, " h:").concat(r.height));
1295
- var n = r.x, a = r.y, s = Math.abs(n - e.x), i = r.width / 2;
1296
- var l = e.x < t.x ? i - s : i + s;
1297
- var c = r.height / 2, o = Math.abs(t.y - e.y), h = Math.abs(t.x - e.x);
1298
- if (Math.abs(a - t.y) * i > Math.abs(n - t.x) * c) {
1299
- var f = e.y < t.y ? t.y - c - a : a - c - t.y;
1300
- l = h * f / o;
1301
- var x = {
1302
- x: e.x < t.x ? e.x + l : e.x - h + l,
1303
- y: e.y < t.y ? e.y + o - f : e.y - o + f
1304
- };
1305
- return l === 0 && (x.x = t.x, x.y = t.y), h === 0 && (x.x = t.x), o === 0 && (x.y = t.y), S$1.warn("abc89 topp/bott calc, Q ".concat(o, ", q ").concat(f, ", R ").concat(h, ", r ").concat(l), x), x;
1306
- } else {
1307
- e.x < t.x ? l = t.x - i - n : l = n - i - t.x;
1308
- var f1 = o * l / h, x1 = e.x < t.x ? e.x + h - l : e.x - h + l, d = e.y < t.y ? e.y + f1 : e.y - f1;
1309
- return S$1.warn("sides calc abc89, Q ".concat(o, ", q ").concat(f1, ", R ").concat(h, ", r ").concat(l), {
1310
- _x: x1,
1311
- _y: d
1312
- }), l === 0 && (x1 = t.x, d = t.y), h === 0 && (x1 = t.x), o === 0 && (d = t.y), {
1313
- x: x1,
1314
- y: d
1315
- };
1316
- }
1317
- }, G = function(r, t) {
1318
- S$1.warn("abc88 cutPathAtIntersect", r, t);
1319
- var e = [], n = r[0], a = !1;
1320
- return r.forEach(function(s) {
1321
- if (S$1.info("abc88 checking point", s, t), !Zt(t, s) && !a) {
1322
- var i = Ft(t, n, s);
1323
- S$1.warn("abc88 inside", s, n, i), S$1.warn("abc88 intersection", i);
1324
- var l = !1;
1325
- e.forEach(function(c) {
1326
- l = l || c.x === i.x && c.y === i.y;
1327
- }), e.some(function(c) {
1328
- return c.x === i.x && c.y === i.y;
1329
- }) ? S$1.warn("abc88 no intersect", i, e) : e.push(i), a = !0;
1330
- } else S$1.warn("abc88 outside", s, n), n = s, a || e.push(s);
1331
- }), S$1.warn("abc88 returning points", e), e;
1332
- }, ir = function ir(r, t, e, n, a, s) {
1333
- var i = e.points, l = !1;
1334
- var c = s.node(t.v);
1335
- var o = s.node(t.w);
1336
- S$1.info("abc88 InsertEdge: ", e), o.intersect && c.intersect && (i = i.slice(1, e.points.length - 1), i.unshift(c.intersect(i[0])), S$1.info("Last point", i[i.length - 1], o, o.intersect(i[i.length - 1])), i.push(o.intersect(i[i.length - 1]))), e.toCluster && (S$1.info("to cluster abc88", n[e.toCluster]), i = G(e.points, n[e.toCluster].node), l = !0), e.fromCluster && (S$1.info("from cluster abc88", n[e.fromCluster]), i = G(i.reverse(), n[e.fromCluster].node).reverse(), l = !0);
1337
- var h = i.filter(function(b) {
1338
- return !Number.isNaN(b.y);
1339
- });
1340
- var f;
1341
- a === "graph" || a === "flowchart" ? f = e.curve || yf : f = yf;
1342
- var x = S$2().x(function(b) {
1343
- return b.x;
1344
- }).y(function(b) {
1345
- return b.y;
1346
- }).curve(f);
1347
- var d;
1348
- switch(e.thickness){
1349
- case "normal":
1350
- d = "edge-thickness-normal";
1351
- break;
1352
- case "thick":
1353
- d = "edge-thickness-thick";
1354
- break;
1355
- case "invisible":
1356
- d = "edge-thickness-thick";
1357
- break;
1358
- default:
1359
- d = "";
1360
- }
1361
- switch(e.pattern){
1362
- case "solid":
1363
- d += " edge-pattern-solid";
1364
- break;
1365
- case "dotted":
1366
- d += " edge-pattern-dotted";
1367
- break;
1368
- case "dashed":
1369
- d += " edge-pattern-dashed";
1370
- break;
1371
- }
1372
- var p = r.append("path").attr("d", x(h)).attr("id", e.id).attr("class", " " + d + (e.classes ? " " + e.classes : "")).attr("style", e.style);
1373
- var y = "";
1374
- switch((Ut$1().flowchart.arrowMarkerAbsolute || Ut$1().state.arrowMarkerAbsolute) && (y = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, y = y.replace(/\(/g, "\\("), y = y.replace(/\)/g, "\\)")), S$1.info("arrowTypeStart", e.arrowTypeStart), S$1.info("arrowTypeEnd", e.arrowTypeEnd), e.arrowTypeStart){
1375
- case "arrow_cross":
1376
- p.attr("marker-start", "url(" + y + "#" + a + "-crossStart)");
1377
- break;
1378
- case "arrow_point":
1379
- p.attr("marker-start", "url(" + y + "#" + a + "-pointStart)");
1380
- break;
1381
- case "arrow_barb":
1382
- p.attr("marker-start", "url(" + y + "#" + a + "-barbStart)");
1383
- break;
1384
- case "arrow_circle":
1385
- p.attr("marker-start", "url(" + y + "#" + a + "-circleStart)");
1386
- break;
1387
- case "aggregation":
1388
- p.attr("marker-start", "url(" + y + "#" + a + "-aggregationStart)");
1389
- break;
1390
- case "extension":
1391
- p.attr("marker-start", "url(" + y + "#" + a + "-extensionStart)");
1392
- break;
1393
- case "composition":
1394
- p.attr("marker-start", "url(" + y + "#" + a + "-compositionStart)");
1395
- break;
1396
- case "dependency":
1397
- p.attr("marker-start", "url(" + y + "#" + a + "-dependencyStart)");
1398
- break;
1399
- case "lollipop":
1400
- p.attr("marker-start", "url(" + y + "#" + a + "-lollipopStart)");
1401
- break;
1402
- }
1403
- switch(e.arrowTypeEnd){
1404
- case "arrow_cross":
1405
- p.attr("marker-end", "url(" + y + "#" + a + "-crossEnd)");
1406
- break;
1407
- case "arrow_point":
1408
- p.attr("marker-end", "url(" + y + "#" + a + "-pointEnd)");
1409
- break;
1410
- case "arrow_barb":
1411
- p.attr("marker-end", "url(" + y + "#" + a + "-barbEnd)");
1412
- break;
1413
- case "arrow_circle":
1414
- p.attr("marker-end", "url(" + y + "#" + a + "-circleEnd)");
1415
- break;
1416
- case "aggregation":
1417
- p.attr("marker-end", "url(" + y + "#" + a + "-aggregationEnd)");
1418
- break;
1419
- case "extension":
1420
- p.attr("marker-end", "url(" + y + "#" + a + "-extensionEnd)");
1421
- break;
1422
- case "composition":
1423
- p.attr("marker-end", "url(" + y + "#" + a + "-compositionEnd)");
1424
- break;
1425
- case "dependency":
1426
- p.attr("marker-end", "url(" + y + "#" + a + "-dependencyEnd)");
1427
- break;
1428
- case "lollipop":
1429
- p.attr("marker-end", "url(" + y + "#" + a + "-lollipopEnd)");
1430
- break;
1431
- }
1432
- var g = {};
1433
- return l && (g.updatedPath = i), g.originalPath = e.points, g;
1434
- };
1435
-
1436
- export { B, Gt as G, Kt as K, Pt as P, R, ar as a, vt as b, er as e, ir as i, rr as r, sr as s, tr as t, v };