@digipair/skill-web-chatbot 0.89.0 → 0.91.0-0

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 (136) hide show
  1. package/.swcrc +28 -0
  2. package/README.md +7 -0
  3. package/eslint.config.mjs +22 -0
  4. package/package.json +22 -7
  5. package/rollup.config.cjs +28 -0
  6. package/src/digipair__engine.d.ts +2 -0
  7. package/src/handlebars.d.ts +1 -0
  8. package/src/index.html +18 -0
  9. package/src/lib/chat.element.ts +603 -0
  10. package/src/lib/common.data.ts +1 -0
  11. package/src/lib/config.ts +30 -0
  12. package/src/lib/digipair-full.data.ts +101 -0
  13. package/src/lib/digipair-full.element.ts +358 -0
  14. package/src/lib/digipair.data.ts +103 -0
  15. package/src/lib/digipair.element.ts +446 -0
  16. package/src/lib/inputs.element.ts +46 -0
  17. package/src/lib/mermaid.d.ts +1 -0
  18. package/src/lib/message.interface.ts +10 -0
  19. package/src/lib/pins/chatbot.actions.ts +32 -0
  20. package/src/lib/tools/css-selector.ts +12 -0
  21. package/tsconfig.json +13 -0
  22. package/tsconfig.lib.json +19 -0
  23. package/SAP-icons.cjs.js +0 -2489
  24. package/SAP-icons.cjs2.js +0 -2489
  25. package/SAP-icons.esm.js +0 -2482
  26. package/SAP-icons.esm2.js +0 -2482
  27. package/Tableau10-558cc280.cjs.js +0 -9
  28. package/Tableau10-558cc280.esm.js +0 -7
  29. package/arc-d1f6357e.cjs.js +0 -88
  30. package/arc-d1f6357e.esm.js +0 -86
  31. package/array-2ff2c7a6.cjs.js +0 -7
  32. package/array-2ff2c7a6.esm.js +0 -5
  33. package/blockDiagram-5dc23a45.cjs.js +0 -2921
  34. package/blockDiagram-5dc23a45.esm.js +0 -2919
  35. package/c4Diagram-1e775db3.cjs.js +0 -4387
  36. package/c4Diagram-1e775db3.esm.js +0 -4385
  37. package/channel-ebbc4130.cjs.js +0 -9
  38. package/channel-ebbc4130.esm.js +0 -7
  39. package/classDiagram-f52caa06.cjs.js +0 -209
  40. package/classDiagram-f52caa06.esm.js +0 -207
  41. package/classDiagram-v2-640c694e.cjs.js +0 -401
  42. package/classDiagram-v2-640c694e.esm.js +0 -399
  43. package/clone-afc2f047.cjs.js +0 -10
  44. package/clone-afc2f047.esm.js +0 -8
  45. package/createText-03b82060.cjs.js +0 -2936
  46. package/createText-03b82060.esm.js +0 -2933
  47. package/edges-16357fde.cjs.js +0 -1998
  48. package/edges-16357fde.esm.js +0 -1981
  49. package/erDiagram-c7ff1bec.cjs.js +0 -1807
  50. package/erDiagram-c7ff1bec.esm.js +0 -1805
  51. package/flowDb-9a89ea33.cjs.js +0 -5542
  52. package/flowDb-9a89ea33.esm.js +0 -5538
  53. package/flowDiagram-aadb13b0.cjs.js +0 -1351
  54. package/flowDiagram-aadb13b0.esm.js +0 -1349
  55. package/flowDiagram-v2-f2119625.cjs.js +0 -31
  56. package/flowDiagram-v2-f2119625.esm.js +0 -29
  57. package/flowchart-elk-definition-cf813a97.cjs.js +0 -50257
  58. package/flowchart-elk-definition-cf813a97.esm.js +0 -50255
  59. package/ganttDiagram-3c2fde2b.cjs.js +0 -3710
  60. package/ganttDiagram-3c2fde2b.esm.js +0 -3708
  61. package/gitGraphDiagram-c3a0619c.cjs.js +0 -3820
  62. package/gitGraphDiagram-c3a0619c.esm.js +0 -3818
  63. package/graph-0ee63739.cjs.js +0 -961
  64. package/graph-0ee63739.esm.js +0 -938
  65. package/index-bb6d8841.cjs.js +0 -648
  66. package/index-bb6d8841.esm.js +0 -646
  67. package/index.cjs.d.ts +0 -1
  68. package/index.cjs.js +0 -17
  69. package/index.cjs2.js +0 -60723
  70. package/index.esm.js +0 -1
  71. package/index.esm2.js +0 -60574
  72. package/infoDiagram-2f5c50c0.cjs.js +0 -460
  73. package/infoDiagram-2f5c50c0.esm.js +0 -458
  74. package/init-f9637058.cjs.js +0 -17
  75. package/init-f9637058.esm.js +0 -15
  76. package/journeyDiagram-14fe341a.cjs.js +0 -1061
  77. package/journeyDiagram-14fe341a.esm.js +0 -1059
  78. package/katex-d90b6d29.cjs.js +0 -25690
  79. package/katex-d90b6d29.esm.js +0 -25688
  80. package/layout-fd473db2.cjs.js +0 -1626
  81. package/layout-fd473db2.esm.js +0 -1619
  82. package/libs/engine/src/index.d.ts +0 -2
  83. package/libs/engine/src/lib/alias.interface.d.ts +0 -9
  84. package/libs/engine/src/lib/engine.d.ts +0 -13
  85. package/libs/engine/src/lib/pins-settings.interface.d.ts +0 -15
  86. package/libs/skill-web-chatbot/src/lib/chat.element.d.ts +0 -28
  87. package/libs/skill-web-chatbot/src/lib/common.data.d.ts +0 -1
  88. package/libs/skill-web-chatbot/src/lib/config.d.ts +0 -9
  89. package/libs/skill-web-chatbot/src/lib/digipair-full.data.d.ts +0 -1
  90. package/libs/skill-web-chatbot/src/lib/digipair-full.element.d.ts +0 -36
  91. package/libs/skill-web-chatbot/src/lib/digipair.data.d.ts +0 -1
  92. package/libs/skill-web-chatbot/src/lib/digipair.element.d.ts +0 -44
  93. package/libs/skill-web-chatbot/src/lib/inputs.element.d.ts +0 -10
  94. package/libs/skill-web-chatbot/src/lib/message.interface.d.ts +0 -10
  95. package/libs/skill-web-chatbot/src/lib/pins/chatbot.actions.d.ts +0 -1
  96. package/libs/skill-web-chatbot/src/lib/tools/css-selector.d.ts +0 -1
  97. package/line-24d93f1b.cjs.js +0 -34
  98. package/line-24d93f1b.esm.js +0 -32
  99. package/linear-9bcf74c4.cjs.js +0 -537
  100. package/linear-9bcf74c4.esm.js +0 -531
  101. package/mindmap-definition-9399c7e6.cjs.js +0 -20489
  102. package/mindmap-definition-9399c7e6.esm.js +0 -20487
  103. package/ordinal-5695958c.cjs.js +0 -331
  104. package/ordinal-5695958c.esm.js +0 -329
  105. package/path-428ebac9.cjs.js +0 -317
  106. package/path-428ebac9.esm.js +0 -314
  107. package/pieDiagram-828dae43.cjs.js +0 -951
  108. package/pieDiagram-828dae43.esm.js +0 -949
  109. package/quadrantDiagram-5fa00455.cjs.js +0 -2410
  110. package/quadrantDiagram-5fa00455.esm.js +0 -2408
  111. package/requirementDiagram-03163dc4.cjs.js +0 -2267
  112. package/requirementDiagram-03163dc4.esm.js +0 -2265
  113. package/sankeyDiagram-52ec8976.cjs.js +0 -1848
  114. package/sankeyDiagram-52ec8976.esm.js +0 -1846
  115. package/sequenceDiagram-b517d154.cjs.js +0 -5949
  116. package/sequenceDiagram-b517d154.esm.js +0 -5947
  117. package/stateDiagram-fca82b5b.cjs.js +0 -283
  118. package/stateDiagram-fca82b5b.esm.js +0 -281
  119. package/stateDiagram-v2-ed04200a.cjs.js +0 -373
  120. package/stateDiagram-v2-ed04200a.esm.js +0 -371
  121. package/styles-11e81fdd.cjs.js +0 -3944
  122. package/styles-11e81fdd.esm.js +0 -3940
  123. package/styles-cacbff60.cjs.js +0 -2120
  124. package/styles-cacbff60.esm.js +0 -2111
  125. package/styles-e75131e4.cjs.js +0 -671
  126. package/styles-e75131e4.esm.js +0 -661
  127. package/svgDrawCommon-ecc5f780.cjs.js +0 -68
  128. package/svgDrawCommon-ecc5f780.esm.js +0 -60
  129. package/timeline-definition-4ee9bff4.cjs.js +0 -1161
  130. package/timeline-definition-4ee9bff4.esm.js +0 -1159
  131. package/xychartDiagram-e5e6b652.cjs.js +0 -3150
  132. package/xychartDiagram-e5e6b652.esm.js +0 -3148
  133. /package/{index.d.ts → src/index.d.ts} +0 -0
  134. /package/{libs/skill-web-chatbot/src/index.d.ts → src/index.ts} +0 -0
  135. /package/{schema.fr.json → src/schema.fr.json} +0 -0
  136. /package/{schema.json → src/schema.json} +0 -0
@@ -1,1998 +0,0 @@
1
- 'use strict';
2
-
3
- var index = require('./index.cjs2.js');
4
- var createText03b82060 = require('./createText-03b82060.cjs.js');
5
- var line24d93f1b = require('./line-24d93f1b.cjs.js');
6
-
7
- function _array_like_to_array(arr, len) {
8
- if (len == null || len > arr.length) len = arr.length;
9
- for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
10
- return arr2;
11
- }
12
- function _array_without_holes(arr) {
13
- if (Array.isArray(arr)) return _array_like_to_array(arr);
14
- }
15
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
16
- try {
17
- var info = gen[key](arg);
18
- var value = info.value;
19
- } catch (error) {
20
- reject(error);
21
- return;
22
- }
23
- if (info.done) {
24
- resolve(value);
25
- } else {
26
- Promise.resolve(value).then(_next, _throw);
27
- }
28
- }
29
- function _async_to_generator(fn) {
30
- return function() {
31
- var self = this, args = arguments;
32
- return new Promise(function(resolve, reject) {
33
- var gen = fn.apply(self, args);
34
- function _next(value) {
35
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
36
- }
37
- function _throw(err) {
38
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
39
- }
40
- _next(undefined);
41
- });
42
- };
43
- }
44
- function _iterable_to_array(iter) {
45
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
46
- }
47
- function _non_iterable_spread() {
48
- throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
49
- }
50
- function _to_consumable_array(arr) {
51
- return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
52
- }
53
- function _unsupported_iterable_to_array(o, minLen) {
54
- if (!o) return;
55
- if (typeof o === "string") return _array_like_to_array(o, minLen);
56
- var n = Object.prototype.toString.call(o).slice(8, -1);
57
- if (n === "Object" && o.constructor) n = o.constructor.name;
58
- if (n === "Map" || n === "Set") return Array.from(n);
59
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
60
- }
61
- function _ts_generator(thisArg, body) {
62
- var f, y, t, g, _ = {
63
- label: 0,
64
- sent: function() {
65
- if (t[0] & 1) throw t[1];
66
- return t[1];
67
- },
68
- trys: [],
69
- ops: []
70
- };
71
- return g = {
72
- next: verb(0),
73
- "throw": verb(1),
74
- "return": verb(2)
75
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
76
- return this;
77
- }), g;
78
- function verb(n) {
79
- return function(v) {
80
- return step([
81
- n,
82
- v
83
- ]);
84
- };
85
- }
86
- function step(op) {
87
- if (f) throw new TypeError("Generator is already executing.");
88
- while(_)try {
89
- 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;
90
- if (y = 0, t) op = [
91
- op[0] & 2,
92
- t.value
93
- ];
94
- switch(op[0]){
95
- case 0:
96
- case 1:
97
- t = op;
98
- break;
99
- case 4:
100
- _.label++;
101
- return {
102
- value: op[1],
103
- done: false
104
- };
105
- case 5:
106
- _.label++;
107
- y = op[1];
108
- op = [
109
- 0
110
- ];
111
- continue;
112
- case 7:
113
- op = _.ops.pop();
114
- _.trys.pop();
115
- continue;
116
- default:
117
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
118
- _ = 0;
119
- continue;
120
- }
121
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
122
- _.label = op[1];
123
- break;
124
- }
125
- if (op[0] === 6 && _.label < t[1]) {
126
- _.label = t[1];
127
- t = op;
128
- break;
129
- }
130
- if (t && _.label < t[2]) {
131
- _.label = t[2];
132
- _.ops.push(op);
133
- break;
134
- }
135
- if (t[2]) _.ops.pop();
136
- _.trys.pop();
137
- continue;
138
- }
139
- op = body.call(thisArg, _);
140
- } catch (e) {
141
- op = [
142
- 6,
143
- e
144
- ];
145
- y = 0;
146
- } finally{
147
- f = t = 0;
148
- }
149
- if (op[0] & 5) throw op[1];
150
- return {
151
- value: op[0] ? op[1] : void 0,
152
- done: true
153
- };
154
- }
155
- }
156
- var ht = function(e, t, a, i) {
157
- t.forEach(function(l) {
158
- wt[l](e, a, i);
159
- });
160
- }, ot = function(e, t, a) {
161
- index.L.trace("Making markers for ", a), e.append("defs").append("marker").attr("id", a + "_" + t + "-extensionStart").attr("class", "marker extension " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"), e.append("defs").append("marker").attr("id", a + "_" + t + "-extensionEnd").attr("class", "marker extension " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z");
162
- }, yt = function(e, t, a) {
163
- e.append("defs").append("marker").attr("id", a + "_" + t + "-compositionStart").attr("class", "marker composition " + t).attr("refX", 18).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"), e.append("defs").append("marker").attr("id", a + "_" + t + "-compositionEnd").attr("class", "marker composition " + t).attr("refX", 1).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");
164
- }, ft = function(e, t, a) {
165
- e.append("defs").append("marker").attr("id", a + "_" + t + "-aggregationStart").attr("class", "marker aggregation " + t).attr("refX", 18).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"), e.append("defs").append("marker").attr("id", a + "_" + t + "-aggregationEnd").attr("class", "marker aggregation " + t).attr("refX", 1).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");
166
- }, pt = function(e, t, a) {
167
- e.append("defs").append("marker").attr("id", a + "_" + t + "-dependencyStart").attr("class", "marker dependency " + t).attr("refX", 6).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"), e.append("defs").append("marker").attr("id", a + "_" + t + "-dependencyEnd").attr("class", "marker dependency " + t).attr("refX", 13).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");
168
- }, dt = function(e, t, a) {
169
- e.append("defs").append("marker").attr("id", a + "_" + t + "-lollipopStart").attr("class", "marker lollipop " + t).attr("refX", 13).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6), e.append("defs").append("marker").attr("id", a + "_" + t + "-lollipopEnd").attr("class", "marker lollipop " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6);
170
- }, xt = function(e, t, a) {
171
- e.append("marker").attr("id", a + "_" + t + "-pointEnd").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 6).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"), e.append("marker").attr("id", a + "_" + t + "-pointStart").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 4.5).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");
172
- }, gt = function(e, t, a) {
173
- e.append("marker").attr("id", a + "_" + 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"), e.append("marker").attr("id", a + "_" + 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");
174
- }, ut = function(e, t, a) {
175
- e.append("marker").attr("id", a + "_" + 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"), e.append("marker").attr("id", a + "_" + 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");
176
- }, bt = function(e, t, a) {
177
- e.append("defs").append("marker").attr("id", a + "_" + 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");
178
- }, wt = {
179
- extension: ot,
180
- composition: yt,
181
- aggregation: ft,
182
- dependency: pt,
183
- lollipop: dt,
184
- point: xt,
185
- circle: gt,
186
- cross: ut,
187
- barb: bt
188
- }, hr = ht;
189
- function mt(e, t) {
190
- t && e.attr("style", t);
191
- }
192
- function kt(e) {
193
- var t = index.bt(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject")), a = t.append("xhtml:div"), i = e.label, l = e.isNode ? "nodeLabel" : "edgeLabel";
194
- return a.html('<span class="' + l + '" ' + (e.labelStyle ? 'style="' + e.labelStyle + '"' : "") + ">" + i + "</span>"), mt(a, e.labelStyle), a.style("display", "inline-block"), a.style("white-space", "nowrap"), a.attr("xmlns", "http://www.w3.org/1999/xhtml"), t.node();
195
- }
196
- var vt = function(e, t, a, i) {
197
- var l = e || "";
198
- if (typeof l == "object" && (l = l[0]), index.La(index.Vn().flowchart.htmlLabels)) {
199
- l = l.replace(/\\n|\n/g, "<br />"), index.L.debug("vertexText" + l);
200
- var r = {
201
- isNode: i,
202
- label: index.q0(l).replace(/fa[blrs]?:fa-[\w-]+/g, // cspell: disable-line
203
- function(n) {
204
- return "<i class='".concat(n.replace(":", " "), "'></i>");
205
- }),
206
- labelStyle: t.replace("fill:", "color:")
207
- };
208
- return kt(r);
209
- } else {
210
- var r1 = document.createElementNS("http://www.w3.org/2000/svg", "text");
211
- r1.setAttribute("style", t.replace("color:", "fill:"));
212
- var s = [];
213
- typeof l == "string" ? s = l.split(/\\n|\n|<br\s*\/?>/gi) : Array.isArray(l) ? s = l : s = [];
214
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
215
- try {
216
- for(var _iterator = s[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
217
- var n = _step.value;
218
- var c = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
219
- c.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), c.setAttribute("dy", "1em"), c.setAttribute("x", "0"), a ? c.setAttribute("class", "title-row") : c.setAttribute("class", "row"), c.textContent = n.trim(), r1.appendChild(c);
220
- }
221
- } catch (err) {
222
- _didIteratorError = true;
223
- _iteratorError = err;
224
- } finally{
225
- try {
226
- if (!_iteratorNormalCompletion && _iterator.return != null) {
227
- _iterator.return();
228
- }
229
- } finally{
230
- if (_didIteratorError) {
231
- throw _iteratorError;
232
- }
233
- }
234
- }
235
- return r1;
236
- }
237
- }, R = vt, M = function() {
238
- var _ref = _async_to_generator(function(e, t, a, i) {
239
- var l, r, s, n, c, o, h, y, p, f, x, k, d;
240
- return _ts_generator(this, function(_state) {
241
- switch(_state.label){
242
- case 0:
243
- r = t.useHtmlLabels || index.La(index.Vn().flowchart.htmlLabels);
244
- a ? l = a : l = "node default";
245
- s = e.insert("g").attr("class", l).attr("id", t.domId || t.id), n = s.insert("g").attr("class", "label").attr("style", t.labelStyle);
246
- t.labelText === void 0 ? c = "" : c = typeof t.labelText == "string" ? t.labelText : t.labelText[0];
247
- o = n.node();
248
- t.labelType === "markdown" ? h = createText03b82060.Ur(n, index.ai(index.q0(c), index.Vn()), {
249
- useHtmlLabels: r,
250
- width: t.width || index.Vn().flowchart.wrappingWidth,
251
- classes: "markdown-node-label"
252
- }) : h = o.appendChild(R(index.ai(index.q0(c), index.Vn()), t.labelStyle, !1, i));
253
- y = h.getBBox();
254
- p = t.padding / 2;
255
- if (!index.La(index.Vn().flowchart.htmlLabels)) return [
256
- 3,
257
- 3
258
- ];
259
- f = h.children[0], x = index.bt(h), k = f.getElementsByTagName("img");
260
- if (!k) return [
261
- 3,
262
- 2
263
- ];
264
- d = c.replace(/<img[^>]*>/g, "").trim() === "";
265
- return [
266
- 4,
267
- Promise.all(_to_consumable_array(k).map(function(u) {
268
- return new Promise(function(S) {
269
- var E = function E() {
270
- if (u.style.display = "flex", u.style.flexDirection = "column", d) {
271
- var C = index.Vn().fontSize ? index.Vn().fontSize : window.getComputedStyle(document.body).fontSize, W = 5, A = parseInt(C, 10) * W + "px";
272
- u.style.minWidth = A, u.style.maxWidth = A;
273
- } else u.style.width = "100%";
274
- S(u);
275
- };
276
- setTimeout(function() {
277
- u.complete && E();
278
- }), u.addEventListener("error", E), u.addEventListener("load", E);
279
- });
280
- }))
281
- ];
282
- case 1:
283
- _state.sent();
284
- _state.label = 2;
285
- case 2:
286
- y = f.getBoundingClientRect(), x.attr("width", y.width), x.attr("height", y.height);
287
- _state.label = 3;
288
- case 3:
289
- return [
290
- 2,
291
- (r ? n.attr("transform", "translate(" + -y.width / 2 + ", " + -y.height / 2 + ")") : n.attr("transform", "translate(0, " + -y.height / 2 + ")"), t.centerLabel && n.attr("transform", "translate(" + -y.width / 2 + ", " + -y.height / 2 + ")"), n.insert("rect", ":first-child"), {
292
- shapeSvg: s,
293
- bbox: y,
294
- halfPadding: p,
295
- label: n
296
- })
297
- ];
298
- }
299
- });
300
- });
301
- return function M(e, t, a, i) {
302
- return _ref.apply(this, arguments);
303
- };
304
- }(), m = function(e, t) {
305
- var a = t.node().getBBox();
306
- e.width = a.width, e.height = a.height;
307
- };
308
- function I(e, t, a, i) {
309
- return e.insert("polygon", ":first-child").attr("points", i.map(function(l) {
310
- return l.x + "," + l.y;
311
- }).join(" ")).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," + a / 2 + ")");
312
- }
313
- function Lt(e, t) {
314
- return e.intersect(t);
315
- }
316
- function it(e, t, a, i) {
317
- var l = e.x, r = e.y, s = l - i.x, n = r - i.y, c = Math.sqrt(t * t * n * n + a * a * s * s), o = Math.abs(t * a * s / c);
318
- i.x < l && (o = -o);
319
- var h = Math.abs(t * a * n / c);
320
- return i.y < r && (h = -h), {
321
- x: l + o,
322
- y: r + h
323
- };
324
- }
325
- function St(e, t, a) {
326
- return it(e, t, t, a);
327
- }
328
- function Mt(e, t, a, i) {
329
- var l, r, s, n, c, o, h, y, p, f, x, k, d, u, S;
330
- if (l = t.y - e.y, s = e.x - t.x, c = t.x * e.y - e.x * t.y, p = l * a.x + s * a.y + c, f = l * i.x + s * i.y + c, !(p !== 0 && f !== 0 && J(p, f)) && (r = i.y - a.y, n = a.x - i.x, o = i.x * a.y - a.x * i.y, h = r * e.x + n * e.y + o, y = r * t.x + n * t.y + o, !(h !== 0 && y !== 0 && J(h, y)) && (x = l * n - r * s, x !== 0))) return k = Math.abs(x / 2), d = s * o - n * c, u = d < 0 ? (d - k) / x : (d + k) / x, d = r * c - l * o, S = d < 0 ? (d - k) / x : (d + k) / x, {
331
- x: u,
332
- y: S
333
- };
334
- }
335
- function J(e, t) {
336
- return e * t > 0;
337
- }
338
- function Tt(e, t, a) {
339
- var i = e.x, l = e.y, r = [], s = Number.POSITIVE_INFINITY, n = Number.POSITIVE_INFINITY;
340
- typeof t.forEach == "function" ? t.forEach(function(x) {
341
- s = Math.min(s, x.x), n = Math.min(n, x.y);
342
- }) : (s = Math.min(s, t.x), n = Math.min(n, t.y));
343
- for(var c = i - e.width / 2 - s, o = l - e.height / 2 - n, h = 0; h < t.length; h++){
344
- var y = t[h], p = t[h < t.length - 1 ? h + 1 : 0], f = Mt(e, a, {
345
- x: c + y.x,
346
- y: o + y.y
347
- }, {
348
- x: c + p.x,
349
- y: o + p.y
350
- });
351
- f && r.push(f);
352
- }
353
- return r.length ? (r.length > 1 && r.sort(function(x, k) {
354
- var d = x.x - a.x, u = x.y - a.y, S = Math.sqrt(d * d + u * u), E = k.x - a.x, C = k.y - a.y, W = Math.sqrt(E * E + C * C);
355
- return S < W ? -1 : S === W ? 0 : 1;
356
- }), r[0]) : e;
357
- }
358
- var Et = function(e, t) {
359
- var a = e.x, i = e.y, l = t.x - a, r = t.y - i, s = e.width / 2, n = e.height / 2, c, o;
360
- return Math.abs(r) * s > Math.abs(l) * n ? (r < 0 && (n = -n), c = r === 0 ? 0 : n * l / r, o = n) : (l < 0 && (s = -s), c = s, o = l === 0 ? 0 : s * r / l), {
361
- x: a + c,
362
- y: i + o
363
- };
364
- }, Bt = Et, w = {
365
- node: Lt,
366
- circle: St,
367
- ellipse: it,
368
- polygon: Tt,
369
- rect: Bt
370
- }, Ct = function() {
371
- var _ref = _async_to_generator(function(e, t) {
372
- var _ref, i, l, r, s;
373
- return _ts_generator(this, function(_state) {
374
- switch(_state.label){
375
- case 0:
376
- t.useHtmlLabels || index.Vn().flowchart.htmlLabels || (t.centerLabel = !0);
377
- return [
378
- 4,
379
- M(e, t, "node " + t.classes, !0)
380
- ];
381
- case 1:
382
- _ref = _state.sent(), i = _ref.shapeSvg, l = _ref.bbox, r = _ref.halfPadding;
383
- index.L.info("Classes = ", t.classes);
384
- s = i.insert("rect", ":first-child");
385
- return [
386
- 2,
387
- (s.attr("rx", t.rx).attr("ry", t.ry).attr("x", -l.width / 2 - r).attr("y", -l.height / 2 - r).attr("width", l.width + t.padding).attr("height", l.height + t.padding), m(t, s), t.intersect = function(n) {
388
- return w.rect(t, n);
389
- }, i)
390
- ];
391
- }
392
- });
393
- });
394
- return function Ct(e, t) {
395
- return _ref.apply(this, arguments);
396
- };
397
- }(), $t = Ct, _t = function(e) {
398
- var t = /* @__PURE__ */ new Set();
399
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
400
- try {
401
- for(var _iterator = e[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
402
- var a = _step.value;
403
- switch(a){
404
- case "x":
405
- t.add("right"), t.add("left");
406
- break;
407
- case "y":
408
- t.add("up"), t.add("down");
409
- break;
410
- default:
411
- t.add(a);
412
- break;
413
- }
414
- }
415
- } catch (err) {
416
- _didIteratorError = true;
417
- _iteratorError = err;
418
- } finally{
419
- try {
420
- if (!_iteratorNormalCompletion && _iterator.return != null) {
421
- _iterator.return();
422
- }
423
- } finally{
424
- if (_didIteratorError) {
425
- throw _iteratorError;
426
- }
427
- }
428
- }
429
- return t;
430
- }, Rt = function(e, t, a) {
431
- var i = _t(e), l = 2, r = t.height + 2 * a.padding, s = r / l, n = t.width + 2 * s + a.padding, c = a.padding / 2;
432
- return i.has("right") && i.has("left") && i.has("up") && i.has("down") ? [
433
- // Bottom
434
- {
435
- x: 0,
436
- y: 0
437
- },
438
- {
439
- x: s,
440
- y: 0
441
- },
442
- {
443
- x: n / 2,
444
- y: 2 * c
445
- },
446
- {
447
- x: n - s,
448
- y: 0
449
- },
450
- {
451
- x: n,
452
- y: 0
453
- },
454
- // Right
455
- {
456
- x: n,
457
- y: -r / 3
458
- },
459
- {
460
- x: n + 2 * c,
461
- y: -r / 2
462
- },
463
- {
464
- x: n,
465
- y: -2 * r / 3
466
- },
467
- {
468
- x: n,
469
- y: -r
470
- },
471
- // Top
472
- {
473
- x: n - s,
474
- y: -r
475
- },
476
- {
477
- x: n / 2,
478
- y: -r - 2 * c
479
- },
480
- {
481
- x: s,
482
- y: -r
483
- },
484
- // Left
485
- {
486
- x: 0,
487
- y: -r
488
- },
489
- {
490
- x: 0,
491
- y: -2 * r / 3
492
- },
493
- {
494
- x: -2 * c,
495
- y: -r / 2
496
- },
497
- {
498
- x: 0,
499
- y: -r / 3
500
- }
501
- ] : i.has("right") && i.has("left") && i.has("up") ? [
502
- {
503
- x: s,
504
- y: 0
505
- },
506
- {
507
- x: n - s,
508
- y: 0
509
- },
510
- {
511
- x: n,
512
- y: -r / 2
513
- },
514
- {
515
- x: n - s,
516
- y: -r
517
- },
518
- {
519
- x: s,
520
- y: -r
521
- },
522
- {
523
- x: 0,
524
- y: -r / 2
525
- }
526
- ] : i.has("right") && i.has("left") && i.has("down") ? [
527
- {
528
- x: 0,
529
- y: 0
530
- },
531
- {
532
- x: s,
533
- y: -r
534
- },
535
- {
536
- x: n - s,
537
- y: -r
538
- },
539
- {
540
- x: n,
541
- y: 0
542
- }
543
- ] : i.has("right") && i.has("up") && i.has("down") ? [
544
- {
545
- x: 0,
546
- y: 0
547
- },
548
- {
549
- x: n,
550
- y: -s
551
- },
552
- {
553
- x: n,
554
- y: -r + s
555
- },
556
- {
557
- x: 0,
558
- y: -r
559
- }
560
- ] : i.has("left") && i.has("up") && i.has("down") ? [
561
- {
562
- x: n,
563
- y: 0
564
- },
565
- {
566
- x: 0,
567
- y: -s
568
- },
569
- {
570
- x: 0,
571
- y: -r + s
572
- },
573
- {
574
- x: n,
575
- y: -r
576
- }
577
- ] : i.has("right") && i.has("left") ? [
578
- {
579
- x: s,
580
- y: 0
581
- },
582
- {
583
- x: s,
584
- y: -c
585
- },
586
- {
587
- x: n - s,
588
- y: -c
589
- },
590
- {
591
- x: n - s,
592
- y: 0
593
- },
594
- {
595
- x: n,
596
- y: -r / 2
597
- },
598
- {
599
- x: n - s,
600
- y: -r
601
- },
602
- {
603
- x: n - s,
604
- y: -r + c
605
- },
606
- {
607
- x: s,
608
- y: -r + c
609
- },
610
- {
611
- x: s,
612
- y: -r
613
- },
614
- {
615
- x: 0,
616
- y: -r / 2
617
- }
618
- ] : i.has("up") && i.has("down") ? [
619
- // Bottom center
620
- {
621
- x: n / 2,
622
- y: 0
623
- },
624
- // Left pont of bottom arrow
625
- {
626
- x: 0,
627
- y: -c
628
- },
629
- {
630
- x: s,
631
- y: -c
632
- },
633
- // Left top over vertical section
634
- {
635
- x: s,
636
- y: -r + c
637
- },
638
- {
639
- x: 0,
640
- y: -r + c
641
- },
642
- // Top of arrow
643
- {
644
- x: n / 2,
645
- y: -r
646
- },
647
- {
648
- x: n,
649
- y: -r + c
650
- },
651
- // Top of right vertical bar
652
- {
653
- x: n - s,
654
- y: -r + c
655
- },
656
- {
657
- x: n - s,
658
- y: -c
659
- },
660
- {
661
- x: n,
662
- y: -c
663
- }
664
- ] : i.has("right") && i.has("up") ? [
665
- {
666
- x: 0,
667
- y: 0
668
- },
669
- {
670
- x: n,
671
- y: -s
672
- },
673
- {
674
- x: 0,
675
- y: -r
676
- }
677
- ] : i.has("right") && i.has("down") ? [
678
- {
679
- x: 0,
680
- y: 0
681
- },
682
- {
683
- x: n,
684
- y: 0
685
- },
686
- {
687
- x: 0,
688
- y: -r
689
- }
690
- ] : i.has("left") && i.has("up") ? [
691
- {
692
- x: n,
693
- y: 0
694
- },
695
- {
696
- x: 0,
697
- y: -s
698
- },
699
- {
700
- x: n,
701
- y: -r
702
- }
703
- ] : i.has("left") && i.has("down") ? [
704
- {
705
- x: n,
706
- y: 0
707
- },
708
- {
709
- x: 0,
710
- y: 0
711
- },
712
- {
713
- x: n,
714
- y: -r
715
- }
716
- ] : i.has("right") ? [
717
- {
718
- x: s,
719
- y: -c
720
- },
721
- {
722
- x: s,
723
- y: -c
724
- },
725
- {
726
- x: n - s,
727
- y: -c
728
- },
729
- {
730
- x: n - s,
731
- y: 0
732
- },
733
- {
734
- x: n,
735
- y: -r / 2
736
- },
737
- {
738
- x: n - s,
739
- y: -r
740
- },
741
- {
742
- x: n - s,
743
- y: -r + c
744
- },
745
- // top left corner of arrow
746
- {
747
- x: s,
748
- y: -r + c
749
- },
750
- {
751
- x: s,
752
- y: -r + c
753
- }
754
- ] : i.has("left") ? [
755
- {
756
- x: s,
757
- y: 0
758
- },
759
- {
760
- x: s,
761
- y: -c
762
- },
763
- // Two points, the right corners
764
- {
765
- x: n - s,
766
- y: -c
767
- },
768
- {
769
- x: n - s,
770
- y: -r + c
771
- },
772
- {
773
- x: s,
774
- y: -r + c
775
- },
776
- {
777
- x: s,
778
- y: -r
779
- },
780
- {
781
- x: 0,
782
- y: -r / 2
783
- }
784
- ] : i.has("up") ? [
785
- // Bottom center
786
- {
787
- x: s,
788
- y: -c
789
- },
790
- // Left top over vertical section
791
- {
792
- x: s,
793
- y: -r + c
794
- },
795
- {
796
- x: 0,
797
- y: -r + c
798
- },
799
- // Top of arrow
800
- {
801
- x: n / 2,
802
- y: -r
803
- },
804
- {
805
- x: n,
806
- y: -r + c
807
- },
808
- // Top of right vertical bar
809
- {
810
- x: n - s,
811
- y: -r + c
812
- },
813
- {
814
- x: n - s,
815
- y: -c
816
- }
817
- ] : i.has("down") ? [
818
- // Bottom center
819
- {
820
- x: n / 2,
821
- y: 0
822
- },
823
- // Left pont of bottom arrow
824
- {
825
- x: 0,
826
- y: -c
827
- },
828
- {
829
- x: s,
830
- y: -c
831
- },
832
- // Left top over vertical section
833
- {
834
- x: s,
835
- y: -r + c
836
- },
837
- {
838
- x: n - s,
839
- y: -r + c
840
- },
841
- {
842
- x: n - s,
843
- y: -c
844
- },
845
- {
846
- x: n,
847
- y: -c
848
- }
849
- ] : [
850
- {
851
- x: 0,
852
- y: 0
853
- }
854
- ];
855
- }, K = function(e) {
856
- return e ? " " + e : "";
857
- }, _ = function(e, t) {
858
- return "".concat(t || "node default").concat(K(e.classes), " ").concat(K(e.class));
859
- }, P = function() {
860
- var _ref = _async_to_generator(function(e, t) {
861
- var _ref, a, i, l, r, s, n, c;
862
- return _ts_generator(this, function(_state) {
863
- switch(_state.label){
864
- case 0:
865
- return [
866
- 4,
867
- M(e, t, _(t, void 0), !0)
868
- ];
869
- case 1:
870
- _ref = _state.sent(), a = _ref.shapeSvg, i = _ref.bbox, l = i.width + t.padding, r = i.height + t.padding, s = l + r, n = [
871
- {
872
- x: s / 2,
873
- y: 0
874
- },
875
- {
876
- x: s,
877
- y: -s / 2
878
- },
879
- {
880
- x: s / 2,
881
- y: -s
882
- },
883
- {
884
- x: 0,
885
- y: -s / 2
886
- }
887
- ];
888
- index.L.info("Question main (Circle)");
889
- c = I(a, s, s, n);
890
- return [
891
- 2,
892
- (c.attr("style", t.style), m(t, c), t.intersect = function(o) {
893
- return index.L.warn("Intersect called"), w.polygon(t, n, o);
894
- }, a)
895
- ];
896
- }
897
- });
898
- });
899
- return function P(e, t) {
900
- return _ref.apply(this, arguments);
901
- };
902
- }(), Ht = function(e, t) {
903
- var a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), i = 28, l = [
904
- {
905
- x: 0,
906
- y: i / 2
907
- },
908
- {
909
- x: i / 2,
910
- y: 0
911
- },
912
- {
913
- x: 0,
914
- y: -i / 2
915
- },
916
- {
917
- x: -i / 2,
918
- y: 0
919
- }
920
- ];
921
- return a.insert("polygon", ":first-child").attr("points", l.map(function(s) {
922
- return s.x + "," + s.y;
923
- }).join(" ")).attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28), t.width = 28, t.height = 28, t.intersect = function Ht(s) {
924
- return w.circle(t, 14, s);
925
- }, a;
926
- }, It = function() {
927
- var _ref = _async_to_generator(function(e, t) {
928
- var _ref, a, i, l, r, s, n, c, o;
929
- return _ts_generator(this, function(_state) {
930
- switch(_state.label){
931
- case 0:
932
- return [
933
- 4,
934
- M(e, t, _(t, void 0), !0)
935
- ];
936
- case 1:
937
- _ref = _state.sent(), a = _ref.shapeSvg, i = _ref.bbox, l = 4, r = i.height + t.padding, s = r / l, n = i.width + 2 * s + t.padding, c = [
938
- {
939
- x: s,
940
- y: 0
941
- },
942
- {
943
- x: n - s,
944
- y: 0
945
- },
946
- {
947
- x: n,
948
- y: -r / 2
949
- },
950
- {
951
- x: n - s,
952
- y: -r
953
- },
954
- {
955
- x: s,
956
- y: -r
957
- },
958
- {
959
- x: 0,
960
- y: -r / 2
961
- }
962
- ], o = I(a, n, r, c);
963
- return [
964
- 2,
965
- (o.attr("style", t.style), m(t, o), t.intersect = function(h) {
966
- return w.polygon(t, c, h);
967
- }, a)
968
- ];
969
- }
970
- });
971
- });
972
- return function It(e, t) {
973
- return _ref.apply(this, arguments);
974
- };
975
- }(), Nt = function() {
976
- var _ref = _async_to_generator(function(e, t) {
977
- var _ref, a, i, l, r, s, n, c, o;
978
- return _ts_generator(this, function(_state) {
979
- switch(_state.label){
980
- case 0:
981
- return [
982
- 4,
983
- M(e, t, void 0, !0)
984
- ];
985
- case 1:
986
- _ref = _state.sent(), a = _ref.shapeSvg, i = _ref.bbox, l = 2, r = i.height + 2 * t.padding, s = r / l, n = i.width + 2 * s + t.padding, c = Rt(t.directions, i, t), o = I(a, n, r, c);
987
- return [
988
- 2,
989
- (o.attr("style", t.style), m(t, o), t.intersect = function(h) {
990
- return w.polygon(t, c, h);
991
- }, a)
992
- ];
993
- }
994
- });
995
- });
996
- return function Nt(e, t) {
997
- return _ref.apply(this, arguments);
998
- };
999
- }(), Ot = function() {
1000
- var _ref = _async_to_generator(function(e, t) {
1001
- var _ref, a, i, l, r, s;
1002
- return _ts_generator(this, function(_state) {
1003
- switch(_state.label){
1004
- case 0:
1005
- return [
1006
- 4,
1007
- M(e, t, _(t, void 0), !0)
1008
- ];
1009
- case 1:
1010
- _ref = _state.sent(), a = _ref.shapeSvg, i = _ref.bbox, l = i.width + t.padding, r = i.height + t.padding, s = [
1011
- {
1012
- x: -r / 2,
1013
- y: 0
1014
- },
1015
- {
1016
- x: l,
1017
- y: 0
1018
- },
1019
- {
1020
- x: l,
1021
- y: -r
1022
- },
1023
- {
1024
- x: -r / 2,
1025
- y: -r
1026
- },
1027
- {
1028
- x: 0,
1029
- y: -r / 2
1030
- }
1031
- ];
1032
- return [
1033
- 2,
1034
- (I(a, l, r, s).attr("style", t.style), t.width = l + r, t.height = r, t.intersect = function(c) {
1035
- return w.polygon(t, s, c);
1036
- }, a)
1037
- ];
1038
- }
1039
- });
1040
- });
1041
- return function Ot(e, t) {
1042
- return _ref.apply(this, arguments);
1043
- };
1044
- }(), Wt = function() {
1045
- var _ref = _async_to_generator(function(e, t) {
1046
- var _ref, a, i, l, r, s, n;
1047
- return _ts_generator(this, function(_state) {
1048
- switch(_state.label){
1049
- case 0:
1050
- return [
1051
- 4,
1052
- M(e, t, _(t), !0)
1053
- ];
1054
- case 1:
1055
- _ref = _state.sent(), a = _ref.shapeSvg, i = _ref.bbox, l = i.width + t.padding, r = i.height + t.padding, s = [
1056
- {
1057
- x: -2 * r / 6,
1058
- y: 0
1059
- },
1060
- {
1061
- x: l - r / 6,
1062
- y: 0
1063
- },
1064
- {
1065
- x: l + 2 * r / 6,
1066
- y: -r
1067
- },
1068
- {
1069
- x: r / 6,
1070
- y: -r
1071
- }
1072
- ], n = I(a, l, r, s);
1073
- return [
1074
- 2,
1075
- (n.attr("style", t.style), m(t, n), t.intersect = function(c) {
1076
- return w.polygon(t, s, c);
1077
- }, a)
1078
- ];
1079
- }
1080
- });
1081
- });
1082
- return function Wt(e, t) {
1083
- return _ref.apply(this, arguments);
1084
- };
1085
- }(), Xt = function() {
1086
- var _ref = _async_to_generator(function(e, t) {
1087
- var _ref, a, i, l, r, s, n;
1088
- return _ts_generator(this, function(_state) {
1089
- switch(_state.label){
1090
- case 0:
1091
- return [
1092
- 4,
1093
- M(e, t, _(t, void 0), !0)
1094
- ];
1095
- case 1:
1096
- _ref = _state.sent(), a = _ref.shapeSvg, i = _ref.bbox, l = i.width + t.padding, r = i.height + t.padding, s = [
1097
- {
1098
- x: 2 * r / 6,
1099
- y: 0
1100
- },
1101
- {
1102
- x: l + r / 6,
1103
- y: 0
1104
- },
1105
- {
1106
- x: l - 2 * r / 6,
1107
- y: -r
1108
- },
1109
- {
1110
- x: -r / 6,
1111
- y: -r
1112
- }
1113
- ], n = I(a, l, r, s);
1114
- return [
1115
- 2,
1116
- (n.attr("style", t.style), m(t, n), t.intersect = function(c) {
1117
- return w.polygon(t, s, c);
1118
- }, a)
1119
- ];
1120
- }
1121
- });
1122
- });
1123
- return function Xt(e, t) {
1124
- return _ref.apply(this, arguments);
1125
- };
1126
- }(), Yt = function() {
1127
- var _ref = _async_to_generator(function(e, t) {
1128
- var _ref, a, i, l, r, s, n;
1129
- return _ts_generator(this, function(_state) {
1130
- switch(_state.label){
1131
- case 0:
1132
- return [
1133
- 4,
1134
- M(e, t, _(t, void 0), !0)
1135
- ];
1136
- case 1:
1137
- _ref = _state.sent(), a = _ref.shapeSvg, i = _ref.bbox, l = i.width + t.padding, r = i.height + t.padding, s = [
1138
- {
1139
- x: -2 * r / 6,
1140
- y: 0
1141
- },
1142
- {
1143
- x: l + 2 * r / 6,
1144
- y: 0
1145
- },
1146
- {
1147
- x: l - r / 6,
1148
- y: -r
1149
- },
1150
- {
1151
- x: r / 6,
1152
- y: -r
1153
- }
1154
- ], n = I(a, l, r, s);
1155
- return [
1156
- 2,
1157
- (n.attr("style", t.style), m(t, n), t.intersect = function(c) {
1158
- return w.polygon(t, s, c);
1159
- }, a)
1160
- ];
1161
- }
1162
- });
1163
- });
1164
- return function Yt(e, t) {
1165
- return _ref.apply(this, arguments);
1166
- };
1167
- }(), At = function() {
1168
- var _ref = _async_to_generator(function(e, t) {
1169
- var _ref, a, i, l, r, s, n;
1170
- return _ts_generator(this, function(_state) {
1171
- switch(_state.label){
1172
- case 0:
1173
- return [
1174
- 4,
1175
- M(e, t, _(t, void 0), !0)
1176
- ];
1177
- case 1:
1178
- _ref = _state.sent(), a = _ref.shapeSvg, i = _ref.bbox, l = i.width + t.padding, r = i.height + t.padding, s = [
1179
- {
1180
- x: r / 6,
1181
- y: 0
1182
- },
1183
- {
1184
- x: l - r / 6,
1185
- y: 0
1186
- },
1187
- {
1188
- x: l + 2 * r / 6,
1189
- y: -r
1190
- },
1191
- {
1192
- x: -2 * r / 6,
1193
- y: -r
1194
- }
1195
- ], n = I(a, l, r, s);
1196
- return [
1197
- 2,
1198
- (n.attr("style", t.style), m(t, n), t.intersect = function(c) {
1199
- return w.polygon(t, s, c);
1200
- }, a)
1201
- ];
1202
- }
1203
- });
1204
- });
1205
- return function At(e, t) {
1206
- return _ref.apply(this, arguments);
1207
- };
1208
- }(), Dt = function() {
1209
- var _ref = _async_to_generator(function(e, t) {
1210
- var _ref, a, i, l, r, s, n;
1211
- return _ts_generator(this, function(_state) {
1212
- switch(_state.label){
1213
- case 0:
1214
- return [
1215
- 4,
1216
- M(e, t, _(t, void 0), !0)
1217
- ];
1218
- case 1:
1219
- _ref = _state.sent(), a = _ref.shapeSvg, i = _ref.bbox, l = i.width + t.padding, r = i.height + t.padding, s = [
1220
- {
1221
- x: 0,
1222
- y: 0
1223
- },
1224
- {
1225
- x: l + r / 2,
1226
- y: 0
1227
- },
1228
- {
1229
- x: l,
1230
- y: -r / 2
1231
- },
1232
- {
1233
- x: l + r / 2,
1234
- y: -r
1235
- },
1236
- {
1237
- x: 0,
1238
- y: -r
1239
- }
1240
- ], n = I(a, l, r, s);
1241
- return [
1242
- 2,
1243
- (n.attr("style", t.style), m(t, n), t.intersect = function(c) {
1244
- return w.polygon(t, s, c);
1245
- }, a)
1246
- ];
1247
- }
1248
- });
1249
- });
1250
- return function Dt(e, t) {
1251
- return _ref.apply(this, arguments);
1252
- };
1253
- }(), jt = function() {
1254
- var _ref = _async_to_generator(function(e, t) {
1255
- var _ref, a, i, l, r, s, n, c, o;
1256
- return _ts_generator(this, function(_state) {
1257
- switch(_state.label){
1258
- case 0:
1259
- return [
1260
- 4,
1261
- M(e, t, _(t, void 0), !0)
1262
- ];
1263
- case 1:
1264
- _ref = _state.sent(), a = _ref.shapeSvg, i = _ref.bbox, l = i.width + t.padding, r = l / 2, s = r / (2.5 + l / 50), n = i.height + s + t.padding, c = "M 0," + s + " a " + r + "," + s + " 0,0,0 " + l + " 0 a " + r + "," + s + " 0,0,0 " + -l + " 0 l 0," + n + " a " + r + "," + s + " 0,0,0 " + l + " 0 l 0," + -n, o = a.attr("label-offset-y", s).insert("path", ":first-child").attr("style", t.style).attr("d", c).attr("transform", "translate(" + -l / 2 + "," + -(n / 2 + s) + ")");
1265
- return [
1266
- 2,
1267
- (m(t, o), t.intersect = function(h) {
1268
- var y = w.rect(t, h), p = y.x - t.x;
1269
- if (r != 0 && (Math.abs(p) < t.width / 2 || Math.abs(p) == t.width / 2 && Math.abs(y.y - t.y) > t.height / 2 - s)) {
1270
- var f = s * s * (1 - p * p / (r * r));
1271
- f != 0 && (f = Math.sqrt(f)), f = s - f, h.y - t.y > 0 && (f = -f), y.y += f;
1272
- }
1273
- return y;
1274
- }, a)
1275
- ];
1276
- }
1277
- });
1278
- });
1279
- return function jt(e, t) {
1280
- return _ref.apply(this, arguments);
1281
- };
1282
- }(), Ut = function() {
1283
- var _ref = _async_to_generator(function(e, t) {
1284
- var _ref, a, i, l, r, s, n, c, o, h;
1285
- return _ts_generator(this, function(_state) {
1286
- switch(_state.label){
1287
- case 0:
1288
- return [
1289
- 4,
1290
- M(e, t, "node " + t.classes + " " + t.class, !0)
1291
- ];
1292
- case 1:
1293
- _ref = _state.sent(), a = _ref.shapeSvg, i = _ref.bbox, l = _ref.halfPadding, r = a.insert("rect", ":first-child"), s = t.positioned ? t.width : i.width + t.padding, n = t.positioned ? t.height : i.height + t.padding, c = t.positioned ? -s / 2 : -i.width / 2 - l, o = t.positioned ? -n / 2 : -i.height / 2 - l;
1294
- if (r.attr("class", "basic label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", c).attr("y", o).attr("width", s).attr("height", n), t.props) {
1295
- h = new Set(Object.keys(t.props));
1296
- t.props.borders && (V(r, t.props.borders, s, n), h.delete("borders")), h.forEach(function(y) {
1297
- index.L.warn("Unknown node property ".concat(y));
1298
- });
1299
- }
1300
- return [
1301
- 2,
1302
- (m(t, r), t.intersect = function(h) {
1303
- return w.rect(t, h);
1304
- }, a)
1305
- ];
1306
- }
1307
- });
1308
- });
1309
- return function Ut(e, t) {
1310
- return _ref.apply(this, arguments);
1311
- };
1312
- }(), zt = function() {
1313
- var _ref = _async_to_generator(function(e, t) {
1314
- var _ref, a, i, l, r, s, n, c, o, h;
1315
- return _ts_generator(this, function(_state) {
1316
- switch(_state.label){
1317
- case 0:
1318
- return [
1319
- 4,
1320
- M(e, t, "node " + t.classes, !0)
1321
- ];
1322
- case 1:
1323
- _ref = _state.sent(), a = _ref.shapeSvg, i = _ref.bbox, l = _ref.halfPadding, r = a.insert("rect", ":first-child"), s = t.positioned ? t.width : i.width + t.padding, n = t.positioned ? t.height : i.height + t.padding, c = t.positioned ? -s / 2 : -i.width / 2 - l, o = t.positioned ? -n / 2 : -i.height / 2 - l;
1324
- if (r.attr("class", "basic cluster composite label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", c).attr("y", o).attr("width", s).attr("height", n), t.props) {
1325
- h = new Set(Object.keys(t.props));
1326
- t.props.borders && (V(r, t.props.borders, s, n), h.delete("borders")), h.forEach(function(y) {
1327
- index.L.warn("Unknown node property ".concat(y));
1328
- });
1329
- }
1330
- return [
1331
- 2,
1332
- (m(t, r), t.intersect = function(h) {
1333
- return w.rect(t, h);
1334
- }, a)
1335
- ];
1336
- }
1337
- });
1338
- });
1339
- return function zt(e, t) {
1340
- return _ref.apply(this, arguments);
1341
- };
1342
- }(), Zt = function() {
1343
- var _ref = _async_to_generator(function(e, t) {
1344
- var _ref, a, i, l, r, s;
1345
- return _ts_generator(this, function(_state) {
1346
- switch(_state.label){
1347
- case 0:
1348
- return [
1349
- 4,
1350
- M(e, t, "label", !0)
1351
- ];
1352
- case 1:
1353
- _ref = _state.sent(), a = _ref.shapeSvg;
1354
- index.L.trace("Classes = ", t.class);
1355
- i = a.insert("rect", ":first-child"), l = 0, r = 0;
1356
- if (i.attr("width", l).attr("height", r), a.attr("class", "label edgeLabel"), t.props) {
1357
- s = new Set(Object.keys(t.props));
1358
- t.props.borders && (V(i, t.props.borders, l, r), s.delete("borders")), s.forEach(function(n) {
1359
- index.L.warn("Unknown node property ".concat(n));
1360
- });
1361
- }
1362
- return [
1363
- 2,
1364
- (m(t, i), t.intersect = function(s) {
1365
- return w.rect(t, s);
1366
- }, a)
1367
- ];
1368
- }
1369
- });
1370
- });
1371
- return function Zt(e, t) {
1372
- return _ref.apply(this, arguments);
1373
- };
1374
- }();
1375
- function V(e, t, a, i) {
1376
- var l = [], r = function(n) {
1377
- l.push(n, 0);
1378
- }, s = function(n) {
1379
- l.push(0, n);
1380
- };
1381
- t.includes("t") ? (index.L.debug("add top border"), r(a)) : s(a), t.includes("r") ? (index.L.debug("add right border"), r(i)) : s(i), t.includes("b") ? (index.L.debug("add bottom border"), r(a)) : s(a), t.includes("l") ? (index.L.debug("add left border"), r(i)) : s(i), e.attr("stroke-dasharray", l.join(" "));
1382
- }
1383
- var Gt = function(e, t) {
1384
- var a;
1385
- t.classes ? a = "node " + t.classes : a = "node default";
1386
- var i = e.insert("g").attr("class", a).attr("id", t.domId || t.id), l = i.insert("rect", ":first-child"), r = i.insert("line"), s = i.insert("g").attr("class", "label"), n = t.labelText.flat ? t.labelText.flat() : t.labelText;
1387
- var c = "";
1388
- typeof n == "object" ? c = n[0] : c = n, index.L.info("Label text abc79", c, n, typeof n == "object");
1389
- var o = s.node().appendChild(R(c, t.labelStyle, !0, !0));
1390
- var h = {
1391
- width: 0,
1392
- height: 0
1393
- };
1394
- if (index.La(index.Vn().flowchart.htmlLabels)) {
1395
- var k = o.children[0], d = index.bt(o);
1396
- h = k.getBoundingClientRect(), d.attr("width", h.width), d.attr("height", h.height);
1397
- }
1398
- index.L.info("Text 2", n);
1399
- var y = n.slice(1, n.length);
1400
- var p = o.getBBox();
1401
- var f = s.node().appendChild(R(y.join ? y.join("<br/>") : y, t.labelStyle, !0, !0));
1402
- if (index.La(index.Vn().flowchart.htmlLabels)) {
1403
- var k1 = f.children[0], d1 = index.bt(f);
1404
- h = k1.getBoundingClientRect(), d1.attr("width", h.width), d1.attr("height", h.height);
1405
- }
1406
- var x = t.padding / 2;
1407
- return index.bt(f).attr("transform", "translate( " + // (titleBox.width - bbox.width) / 2 +
1408
- (h.width > p.width ? 0 : (p.width - h.width) / 2) + ", " + (p.height + x + 5) + ")"), index.bt(o).attr("transform", "translate( " + // (titleBox.width - bbox.width) / 2 +
1409
- (h.width < p.width ? 0 : -(p.width - h.width) / 2) + ", 0)"), h = s.node().getBBox(), s.attr("transform", "translate(" + -h.width / 2 + ", " + (-h.height / 2 - x + 3) + ")"), l.attr("class", "outer title-state").attr("x", -h.width / 2 - x).attr("y", -h.height / 2 - x).attr("width", h.width + t.padding).attr("height", h.height + t.padding), r.attr("class", "divider").attr("x1", -h.width / 2 - x).attr("x2", h.width / 2 + x).attr("y1", -h.height / 2 - x + p.height + x).attr("y2", -h.height / 2 - x + p.height + x), m(t, l), t.intersect = function Gt(k) {
1410
- return w.rect(t, k);
1411
- }, i;
1412
- }, Ft = function() {
1413
- var _ref = _async_to_generator(function(e, t) {
1414
- var _ref, a, i, l, r, s;
1415
- return _ts_generator(this, function(_state) {
1416
- switch(_state.label){
1417
- case 0:
1418
- return [
1419
- 4,
1420
- M(e, t, _(t, void 0), !0)
1421
- ];
1422
- case 1:
1423
- _ref = _state.sent(), a = _ref.shapeSvg, i = _ref.bbox, l = i.height + t.padding, r = i.width + l / 4 + t.padding, s = a.insert("rect", ":first-child").attr("style", t.style).attr("rx", l / 2).attr("ry", l / 2).attr("x", -r / 2).attr("y", -l / 2).attr("width", r).attr("height", l);
1424
- return [
1425
- 2,
1426
- (m(t, s), t.intersect = function(n) {
1427
- return w.rect(t, n);
1428
- }, a)
1429
- ];
1430
- }
1431
- });
1432
- });
1433
- return function Ft(e, t) {
1434
- return _ref.apply(this, arguments);
1435
- };
1436
- }(), Qt = function() {
1437
- var _ref = _async_to_generator(function(e, t) {
1438
- var _ref, a, i, l, r;
1439
- return _ts_generator(this, function(_state) {
1440
- switch(_state.label){
1441
- case 0:
1442
- return [
1443
- 4,
1444
- M(e, t, _(t, void 0), !0)
1445
- ];
1446
- case 1:
1447
- _ref = _state.sent(), a = _ref.shapeSvg, i = _ref.bbox, l = _ref.halfPadding, r = a.insert("circle", ":first-child");
1448
- return [
1449
- 2,
1450
- (r.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", i.width / 2 + l).attr("width", i.width + t.padding).attr("height", i.height + t.padding), index.L.info("Circle main"), m(t, r), t.intersect = function(s) {
1451
- return index.L.info("Circle intersect", t, i.width / 2 + l, s), w.circle(t, i.width / 2 + l, s);
1452
- }, a)
1453
- ];
1454
- }
1455
- });
1456
- });
1457
- return function Qt(e, t) {
1458
- return _ref.apply(this, arguments);
1459
- };
1460
- }(), Vt = function() {
1461
- var _ref = _async_to_generator(function(e, t) {
1462
- var _ref, a, i, l, r, s, n, c;
1463
- return _ts_generator(this, function(_state) {
1464
- switch(_state.label){
1465
- case 0:
1466
- return [
1467
- 4,
1468
- M(e, t, _(t, void 0), !0)
1469
- ];
1470
- case 1:
1471
- _ref = _state.sent(), a = _ref.shapeSvg, i = _ref.bbox, l = _ref.halfPadding, r = 5, s = a.insert("g", ":first-child"), n = s.insert("circle"), c = s.insert("circle");
1472
- return [
1473
- 2,
1474
- (s.attr("class", t.class), n.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", i.width / 2 + l + r).attr("width", i.width + t.padding + r * 2).attr("height", i.height + t.padding + r * 2), c.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", i.width / 2 + l).attr("width", i.width + t.padding).attr("height", i.height + t.padding), index.L.info("DoubleCircle main"), m(t, n), t.intersect = function(o) {
1475
- return index.L.info("DoubleCircle intersect", t, i.width / 2 + l + r, o), w.circle(t, i.width / 2 + l + r, o);
1476
- }, a)
1477
- ];
1478
- }
1479
- });
1480
- });
1481
- return function Vt(e, t) {
1482
- return _ref.apply(this, arguments);
1483
- };
1484
- }(), qt = function() {
1485
- var _ref = _async_to_generator(function(e, t) {
1486
- var _ref, a, i, l, r, s, n;
1487
- return _ts_generator(this, function(_state) {
1488
- switch(_state.label){
1489
- case 0:
1490
- return [
1491
- 4,
1492
- M(e, t, _(t, void 0), !0)
1493
- ];
1494
- case 1:
1495
- _ref = _state.sent(), a = _ref.shapeSvg, i = _ref.bbox, l = i.width + t.padding, r = i.height + t.padding, s = [
1496
- {
1497
- x: 0,
1498
- y: 0
1499
- },
1500
- {
1501
- x: l,
1502
- y: 0
1503
- },
1504
- {
1505
- x: l,
1506
- y: -r
1507
- },
1508
- {
1509
- x: 0,
1510
- y: -r
1511
- },
1512
- {
1513
- x: 0,
1514
- y: 0
1515
- },
1516
- {
1517
- x: -8,
1518
- y: 0
1519
- },
1520
- {
1521
- x: l + 8,
1522
- y: 0
1523
- },
1524
- {
1525
- x: l + 8,
1526
- y: -r
1527
- },
1528
- {
1529
- x: -8,
1530
- y: -r
1531
- },
1532
- {
1533
- x: -8,
1534
- y: 0
1535
- }
1536
- ], n = I(a, l, r, s);
1537
- return [
1538
- 2,
1539
- (n.attr("style", t.style), m(t, n), t.intersect = function(c) {
1540
- return w.polygon(t, s, c);
1541
- }, a)
1542
- ];
1543
- }
1544
- });
1545
- });
1546
- return function qt(e, t) {
1547
- return _ref.apply(this, arguments);
1548
- };
1549
- }(), Jt = function(e, t) {
1550
- var a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), i = a.insert("circle", ":first-child");
1551
- return i.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), m(t, i), t.intersect = function Jt(l) {
1552
- return w.circle(t, 7, l);
1553
- }, a;
1554
- }, tt = function(e, t, a) {
1555
- var i = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id);
1556
- var l = 70, r = 10;
1557
- a === "LR" && (l = 10, r = 70);
1558
- var s = i.append("rect").attr("x", -1 * l / 2).attr("y", -1 * r / 2).attr("width", l).attr("height", r).attr("class", "fork-join");
1559
- return m(t, s), t.height = t.height + t.padding / 2, t.width = t.width + t.padding / 2, t.intersect = function tt(n) {
1560
- return w.rect(t, n);
1561
- }, i;
1562
- }, Kt = function(e, t) {
1563
- var a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), i = a.insert("circle", ":first-child"), l = a.insert("circle", ":first-child");
1564
- return l.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), i.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10), m(t, l), t.intersect = function Kt(r) {
1565
- return w.circle(t, 7, r);
1566
- }, a;
1567
- }, Pt = function(e, t) {
1568
- var a = t.padding / 2, i = 4, l = 8;
1569
- var r;
1570
- t.classes ? r = "node " + t.classes : r = "node default";
1571
- var s = e.insert("g").attr("class", r).attr("id", t.domId || t.id), n = s.insert("rect", ":first-child"), c = s.insert("line"), o = s.insert("line");
1572
- var h = 0, y = i;
1573
- var p = s.insert("g").attr("class", "label");
1574
- var f = 0;
1575
- var x = t.classData.annotations && t.classData.annotations[0], k = t.classData.annotations[0] ? "\xab" + t.classData.annotations[0] + "\xbb" : "", d = p.node().appendChild(R(k, t.labelStyle, !0, !0));
1576
- var u = d.getBBox();
1577
- if (index.La(index.Vn().flowchart.htmlLabels)) {
1578
- var v = d.children[0], L = index.bt(d);
1579
- u = v.getBoundingClientRect(), L.attr("width", u.width), L.attr("height", u.height);
1580
- }
1581
- t.classData.annotations[0] && (y += u.height + i, h += u.width);
1582
- var S = t.classData.label;
1583
- t.classData.type !== void 0 && t.classData.type !== "" && (index.Vn().flowchart.htmlLabels ? S += "&lt;" + t.classData.type + "&gt;" : S += "<" + t.classData.type + ">");
1584
- var E = p.node().appendChild(R(S, t.labelStyle, !0, !0));
1585
- index.bt(E).attr("class", "classTitle");
1586
- var C = E.getBBox();
1587
- if (index.La(index.Vn().flowchart.htmlLabels)) {
1588
- var v1 = E.children[0], L1 = index.bt(E);
1589
- C = v1.getBoundingClientRect(), L1.attr("width", C.width), L1.attr("height", C.height);
1590
- }
1591
- y += C.height + i, C.width > h && (h = C.width);
1592
- var W = [];
1593
- t.classData.members.forEach(function(v) {
1594
- var L = v.getDisplayDetails();
1595
- var X = L.displayText;
1596
- index.Vn().flowchart.htmlLabels && (X = X.replace(/</g, "&lt;").replace(/>/g, "&gt;"));
1597
- var N = p.node().appendChild(R(X, L.cssStyle ? L.cssStyle : t.labelStyle, !0, !0));
1598
- var $ = N.getBBox();
1599
- if (index.La(index.Vn().flowchart.htmlLabels)) {
1600
- var F = N.children[0], D = index.bt(N);
1601
- $ = F.getBoundingClientRect(), D.attr("width", $.width), D.attr("height", $.height);
1602
- }
1603
- $.width > h && (h = $.width), y += $.height + i, W.push(N);
1604
- }), y += l;
1605
- var A = [];
1606
- if (t.classData.methods.forEach(function(v) {
1607
- var L = v.getDisplayDetails();
1608
- var X = L.displayText;
1609
- index.Vn().flowchart.htmlLabels && (X = X.replace(/</g, "&lt;").replace(/>/g, "&gt;"));
1610
- var N = p.node().appendChild(R(X, L.cssStyle ? L.cssStyle : t.labelStyle, !0, !0));
1611
- var $ = N.getBBox();
1612
- if (index.La(index.Vn().flowchart.htmlLabels)) {
1613
- var F = N.children[0], D = index.bt(N);
1614
- $ = F.getBoundingClientRect(), D.attr("width", $.width), D.attr("height", $.height);
1615
- }
1616
- $.width > h && (h = $.width), y += $.height + i, A.push(N);
1617
- }), y += l, x) {
1618
- var v2 = (h - u.width) / 2;
1619
- index.bt(d).attr("transform", "translate( " + (-1 * h / 2 + v2) + ", " + -1 * y / 2 + ")"), f = u.height + i;
1620
- }
1621
- var nt = (h - C.width) / 2;
1622
- return index.bt(E).attr("transform", "translate( " + (-1 * h / 2 + nt) + ", " + (-1 * y / 2 + f) + ")"), f += C.height + i, c.attr("class", "divider").attr("x1", -h / 2 - a).attr("x2", h / 2 + a).attr("y1", -y / 2 - a + l + f).attr("y2", -y / 2 - a + l + f), f += l, W.forEach(function(v) {
1623
- index.bt(v).attr("transform", "translate( " + -h / 2 + ", " + (-1 * y / 2 + f + l / 2) + ")");
1624
- var L = v == null ? void 0 : v.getBBox();
1625
- var _ref;
1626
- f += ((_ref = L == null ? void 0 : L.height) !== null && _ref !== void 0 ? _ref : 0) + i;
1627
- }), f += l, o.attr("class", "divider").attr("x1", -h / 2 - a).attr("x2", h / 2 + a).attr("y1", -y / 2 - a + l + f).attr("y2", -y / 2 - a + l + f), f += l, A.forEach(function(v) {
1628
- index.bt(v).attr("transform", "translate( " + -h / 2 + ", " + (-1 * y / 2 + f) + ")");
1629
- var L = v == null ? void 0 : v.getBBox();
1630
- var _ref;
1631
- f += ((_ref = L == null ? void 0 : L.height) !== null && _ref !== void 0 ? _ref : 0) + i;
1632
- }), n.attr("style", t.style).attr("class", "outer title-state").attr("x", -h / 2 - a).attr("y", -(y / 2) - a).attr("width", h + t.padding).attr("height", y + t.padding), m(t, n), t.intersect = function Pt(v) {
1633
- return w.rect(t, v);
1634
- }, s;
1635
- }, rt = {
1636
- rhombus: P,
1637
- composite: zt,
1638
- question: P,
1639
- rect: Ut,
1640
- labelRect: Zt,
1641
- rectWithTitle: Gt,
1642
- choice: Ht,
1643
- circle: Qt,
1644
- doublecircle: Vt,
1645
- stadium: Ft,
1646
- hexagon: It,
1647
- block_arrow: Nt,
1648
- rect_left_inv_arrow: Ot,
1649
- lean_right: Wt,
1650
- lean_left: Xt,
1651
- trapezoid: Yt,
1652
- inv_trapezoid: At,
1653
- rect_right_inv_arrow: Dt,
1654
- cylinder: jt,
1655
- start: Jt,
1656
- end: Kt,
1657
- note: $t,
1658
- subroutine: qt,
1659
- fork: tt,
1660
- join: tt,
1661
- class_box: Pt
1662
- };
1663
- var Y = {};
1664
- var or = function() {
1665
- var _ref = _async_to_generator(function(e, t, a) {
1666
- var i, l, r;
1667
- return _ts_generator(this, function(_state) {
1668
- switch(_state.label){
1669
- case 0:
1670
- if (!t.link) return [
1671
- 3,
1672
- 2
1673
- ];
1674
- index.Vn().securityLevel === "sandbox" ? r = "_top" : t.linkTarget && (r = t.linkTarget || "_blank"), i = e.insert("svg:a").attr("xlink:href", t.link).attr("target", r);
1675
- return [
1676
- 4,
1677
- rt[t.shape](i, t, a)
1678
- ];
1679
- case 1:
1680
- l = _state.sent();
1681
- return [
1682
- 3,
1683
- 4
1684
- ];
1685
- case 2:
1686
- return [
1687
- 4,
1688
- rt[t.shape](e, t, a)
1689
- ];
1690
- case 3:
1691
- l = _state.sent(), i = l;
1692
- _state.label = 4;
1693
- case 4:
1694
- return [
1695
- 2,
1696
- (t.tooltip && l.attr("title", t.tooltip), t.class && l.attr("class", "node default " + t.class), i.attr("data-node", "true"), i.attr("data-id", t.id), Y[t.id] = i, t.haveCallback && Y[t.id].attr("class", Y[t.id].attr("class") + " clickable"), i)
1697
- ];
1698
- }
1699
- });
1700
- });
1701
- return function or(e, t, a) {
1702
- return _ref.apply(this, arguments);
1703
- };
1704
- }(), yr = function(e, t) {
1705
- Y[t.id] = e;
1706
- }, fr = function() {
1707
- Y = {};
1708
- }, pr = function(e) {
1709
- var t = Y[e.id];
1710
- index.L.trace("Transforming node", e.diff, e, "translate(" + (e.x - e.width / 2 - 5) + ", " + e.width / 2 + ")");
1711
- var a = 8, i = e.diff || 0;
1712
- return e.clusterNode ? t.attr("transform", "translate(" + (e.x + i - e.width / 2) + ", " + (e.y - e.height / 2 - a) + ")") : t.attr("transform", "translate(" + e.x + ", " + e.y + ")"), i;
1713
- }, tr = function(param) {
1714
- var e = param.flowchart;
1715
- var l, r;
1716
- var _ref, _ref1;
1717
- var t = (_ref = (l = e == null ? void 0 : e.subGraphTitleMargin) == null ? void 0 : l.top) !== null && _ref !== void 0 ? _ref : 0, a = (_ref1 = (r = e == null ? void 0 : e.subGraphTitleMargin) == null ? void 0 : r.bottom) !== null && _ref1 !== void 0 ? _ref1 : 0, i = t + a;
1718
- return {
1719
- subGraphTitleTopMargin: t,
1720
- subGraphTitleBottomMargin: a,
1721
- subGraphTitleTotalMargin: i
1722
- };
1723
- }, O = {
1724
- aggregation: 18,
1725
- extension: 18,
1726
- composition: 18,
1727
- dependency: 6,
1728
- lollipop: 13.5,
1729
- arrow_point: 5.3
1730
- };
1731
- function U(e, t) {
1732
- if (e === void 0 || t === void 0) return {
1733
- angle: 0,
1734
- deltaX: 0,
1735
- deltaY: 0
1736
- };
1737
- e = Z(e), t = Z(t);
1738
- var _ref = [
1739
- e.x,
1740
- e.y
1741
- ], a = _ref[0], i = _ref[1], _ref1 = [
1742
- t.x,
1743
- t.y
1744
- ], l = _ref1[0], r = _ref1[1], s = l - a, n = r - i;
1745
- return {
1746
- angle: Math.atan(n / s),
1747
- deltaX: s,
1748
- deltaY: n
1749
- };
1750
- }
1751
- var Z = function(e) {
1752
- return Array.isArray(e) ? {
1753
- x: e[0],
1754
- y: e[1]
1755
- } : e;
1756
- }, rr = function(e) {
1757
- return {
1758
- x: function x(t, a, i) {
1759
- var l = 0;
1760
- if (a === 0 && Object.hasOwn(O, e.arrowTypeStart)) {
1761
- var _U = U(i[0], i[1]), r = _U.angle, s = _U.deltaX;
1762
- l = O[e.arrowTypeStart] * Math.cos(r) * (s >= 0 ? 1 : -1);
1763
- } else if (a === i.length - 1 && Object.hasOwn(O, e.arrowTypeEnd)) {
1764
- var _U1 = U(i[i.length - 1], i[i.length - 2]), r1 = _U1.angle, s1 = _U1.deltaX;
1765
- l = O[e.arrowTypeEnd] * Math.cos(r1) * (s1 >= 0 ? 1 : -1);
1766
- }
1767
- return Z(t).x + l;
1768
- },
1769
- y: function y(t, a, i) {
1770
- var l = 0;
1771
- if (a === 0 && Object.hasOwn(O, e.arrowTypeStart)) {
1772
- var _U = U(i[0], i[1]), r = _U.angle, s = _U.deltaY;
1773
- l = O[e.arrowTypeStart] * Math.abs(Math.sin(r)) * (s >= 0 ? 1 : -1);
1774
- } else if (a === i.length - 1 && Object.hasOwn(O, e.arrowTypeEnd)) {
1775
- var _U1 = U(i[i.length - 1], i[i.length - 2]), r1 = _U1.angle, s1 = _U1.deltaY;
1776
- l = O[e.arrowTypeEnd] * Math.abs(Math.sin(r1)) * (s1 >= 0 ? 1 : -1);
1777
- }
1778
- return Z(t).y + l;
1779
- }
1780
- };
1781
- }, ar = function(e, t, a, i, l) {
1782
- t.arrowTypeStart && at(e, "start", t.arrowTypeStart, a, i, l), t.arrowTypeEnd && at(e, "end", t.arrowTypeEnd, a, i, l);
1783
- }, er = {
1784
- arrow_cross: "cross",
1785
- arrow_point: "point",
1786
- arrow_barb: "barb",
1787
- arrow_circle: "circle",
1788
- aggregation: "aggregation",
1789
- extension: "extension",
1790
- composition: "composition",
1791
- dependency: "dependency",
1792
- lollipop: "lollipop"
1793
- }, at = function(e, t, a, i, l, r) {
1794
- var s = er[a];
1795
- if (!s) {
1796
- index.L.warn("Unknown arrow type: ".concat(a));
1797
- return;
1798
- }
1799
- var n = t === "start" ? "Start" : "End";
1800
- e.attr("marker-".concat(t), "url(".concat(i, "#").concat(l, "_").concat(r, "-").concat(s).concat(n, ")"));
1801
- };
1802
- var G = {}, T = {};
1803
- var dr = function() {
1804
- G = {}, T = {};
1805
- }, xr = function(e, t) {
1806
- var a = index.La(index.Vn().flowchart.htmlLabels), i = t.labelType === "markdown" ? createText03b82060.Ur(e, t.label, {
1807
- style: t.labelStyle,
1808
- useHtmlLabels: a,
1809
- addSvgBackground: !0
1810
- }) : R(t.label, t.labelStyle), l = e.insert("g").attr("class", "edgeLabel"), r = l.insert("g").attr("class", "label");
1811
- r.node().appendChild(i);
1812
- var s = i.getBBox();
1813
- if (a) {
1814
- var c = i.children[0], o = index.bt(i);
1815
- s = c.getBoundingClientRect(), o.attr("width", s.width), o.attr("height", s.height);
1816
- }
1817
- r.attr("transform", "translate(" + -s.width / 2 + ", " + -s.height / 2 + ")"), G[t.id] = l, t.width = s.width, t.height = s.height;
1818
- var n;
1819
- if (t.startLabelLeft) {
1820
- var c1 = R(t.startLabelLeft, t.labelStyle), o1 = e.insert("g").attr("class", "edgeTerminals"), h = o1.insert("g").attr("class", "inner");
1821
- n = h.node().appendChild(c1);
1822
- var y = c1.getBBox();
1823
- h.attr("transform", "translate(" + -y.width / 2 + ", " + -y.height / 2 + ")"), T[t.id] || (T[t.id] = {}), T[t.id].startLeft = o1, z(n, t.startLabelLeft);
1824
- }
1825
- if (t.startLabelRight) {
1826
- var c2 = R(t.startLabelRight, t.labelStyle), o2 = e.insert("g").attr("class", "edgeTerminals"), h1 = o2.insert("g").attr("class", "inner");
1827
- n = o2.node().appendChild(c2), h1.node().appendChild(c2);
1828
- var y1 = c2.getBBox();
1829
- h1.attr("transform", "translate(" + -y1.width / 2 + ", " + -y1.height / 2 + ")"), T[t.id] || (T[t.id] = {}), T[t.id].startRight = o2, z(n, t.startLabelRight);
1830
- }
1831
- if (t.endLabelLeft) {
1832
- var c3 = R(t.endLabelLeft, t.labelStyle), o3 = e.insert("g").attr("class", "edgeTerminals"), h2 = o3.insert("g").attr("class", "inner");
1833
- n = h2.node().appendChild(c3);
1834
- var y2 = c3.getBBox();
1835
- h2.attr("transform", "translate(" + -y2.width / 2 + ", " + -y2.height / 2 + ")"), o3.node().appendChild(c3), T[t.id] || (T[t.id] = {}), T[t.id].endLeft = o3, z(n, t.endLabelLeft);
1836
- }
1837
- if (t.endLabelRight) {
1838
- var c4 = R(t.endLabelRight, t.labelStyle), o4 = e.insert("g").attr("class", "edgeTerminals"), h3 = o4.insert("g").attr("class", "inner");
1839
- n = h3.node().appendChild(c4);
1840
- var y3 = c4.getBBox();
1841
- h3.attr("transform", "translate(" + -y3.width / 2 + ", " + -y3.height / 2 + ")"), o4.node().appendChild(c4), T[t.id] || (T[t.id] = {}), T[t.id].endRight = o4, z(n, t.endLabelRight);
1842
- }
1843
- return i;
1844
- };
1845
- function z(e, t) {
1846
- index.Vn().flowchart.htmlLabels && e && (e.style.width = t.length * 9 + "px", e.style.height = "12px");
1847
- }
1848
- var gr = function(e, t) {
1849
- index.L.debug("Moving label abc88 ", e.id, e.label, G[e.id], t);
1850
- var a = t.updatedPath ? t.updatedPath : t.originalPath;
1851
- var i = index.Vn(), _tr = tr(i), l = _tr.subGraphTitleTotalMargin;
1852
- if (e.label) {
1853
- var r = G[e.id];
1854
- var s = e.x, n = e.y;
1855
- if (a) {
1856
- var c = index.ei.calcLabelPosition(a);
1857
- index.L.debug("Moving label " + e.label + " from (", s, ",", n, ") to (", c.x, ",", c.y, ") abc88"), t.updatedPath && (s = c.x, n = c.y);
1858
- }
1859
- r.attr("transform", "translate(".concat(s, ", ").concat(n + l / 2, ")"));
1860
- }
1861
- if (e.startLabelLeft) {
1862
- var r1 = T[e.id].startLeft;
1863
- var s1 = e.x, n1 = e.y;
1864
- if (a) {
1865
- var c1 = index.ei.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_left", a);
1866
- s1 = c1.x, n1 = c1.y;
1867
- }
1868
- r1.attr("transform", "translate(".concat(s1, ", ").concat(n1, ")"));
1869
- }
1870
- if (e.startLabelRight) {
1871
- var r2 = T[e.id].startRight;
1872
- var s2 = e.x, n2 = e.y;
1873
- if (a) {
1874
- var c2 = index.ei.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_right", a);
1875
- s2 = c2.x, n2 = c2.y;
1876
- }
1877
- r2.attr("transform", "translate(".concat(s2, ", ").concat(n2, ")"));
1878
- }
1879
- if (e.endLabelLeft) {
1880
- var r3 = T[e.id].endLeft;
1881
- var s3 = e.x, n3 = e.y;
1882
- if (a) {
1883
- var c3 = index.ei.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_left", a);
1884
- s3 = c3.x, n3 = c3.y;
1885
- }
1886
- r3.attr("transform", "translate(".concat(s3, ", ").concat(n3, ")"));
1887
- }
1888
- if (e.endLabelRight) {
1889
- var r4 = T[e.id].endRight;
1890
- var s4 = e.x, n4 = e.y;
1891
- if (a) {
1892
- var c4 = index.ei.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_right", a);
1893
- s4 = c4.x, n4 = c4.y;
1894
- }
1895
- r4.attr("transform", "translate(".concat(s4, ", ").concat(n4, ")"));
1896
- }
1897
- }, sr = function(e, t) {
1898
- var a = e.x, i = e.y, l = Math.abs(t.x - a), r = Math.abs(t.y - i), s = e.width / 2, n = e.height / 2;
1899
- return l >= s || r >= n;
1900
- }, ir = function(e, t, a) {
1901
- index.L.debug("intersection calc abc89:\n outsidePoint: ".concat(JSON.stringify(t), "\n insidePoint : ").concat(JSON.stringify(a), "\n node : x:").concat(e.x, " y:").concat(e.y, " w:").concat(e.width, " h:").concat(e.height));
1902
- var i = e.x, l = e.y, r = Math.abs(i - a.x), s = e.width / 2;
1903
- var n = a.x < t.x ? s - r : s + r;
1904
- var c = e.height / 2, o = Math.abs(t.y - a.y), h = Math.abs(t.x - a.x);
1905
- if (Math.abs(l - t.y) * s > Math.abs(i - t.x) * c) {
1906
- var y = a.y < t.y ? t.y - c - l : l - c - t.y;
1907
- n = h * y / o;
1908
- var p = {
1909
- x: a.x < t.x ? a.x + n : a.x - h + n,
1910
- y: a.y < t.y ? a.y + o - y : a.y - o + y
1911
- };
1912
- return n === 0 && (p.x = t.x, p.y = t.y), h === 0 && (p.x = t.x), o === 0 && (p.y = t.y), index.L.debug("abc89 topp/bott calc, Q ".concat(o, ", q ").concat(y, ", R ").concat(h, ", r ").concat(n), p), p;
1913
- } else {
1914
- a.x < t.x ? n = t.x - s - i : n = i - s - t.x;
1915
- var y1 = o * n / h, p1 = a.x < t.x ? a.x + h - n : a.x - h + n, f = a.y < t.y ? a.y + y1 : a.y - y1;
1916
- return index.L.debug("sides calc abc89, Q ".concat(o, ", q ").concat(y1, ", R ").concat(h, ", r ").concat(n), {
1917
- _x: p1,
1918
- _y: f
1919
- }), n === 0 && (p1 = t.x, f = t.y), h === 0 && (p1 = t.x), o === 0 && (f = t.y), {
1920
- x: p1,
1921
- y: f
1922
- };
1923
- }
1924
- }, et = function(e, t) {
1925
- index.L.debug("abc88 cutPathAtIntersect", e, t);
1926
- var a = [], i = e[0], l = !1;
1927
- return e.forEach(function(r) {
1928
- if (!sr(t, r) && !l) {
1929
- var s = ir(t, i, r);
1930
- var n = !1;
1931
- a.forEach(function(c) {
1932
- n = n || c.x === s.x && c.y === s.y;
1933
- }), a.some(function(c) {
1934
- return c.x === s.x && c.y === s.y;
1935
- }) || a.push(s), l = !0;
1936
- } else i = r, l || a.push(r);
1937
- }), a;
1938
- }, ur = function ur(e, t, a, i, l, r, s) {
1939
- var n = a.points;
1940
- index.L.debug("abc88 InsertEdge: edge=", a, "e=", t);
1941
- var c = !1;
1942
- var o = r.node(t.v);
1943
- var h = r.node(t.w);
1944
- h != null && h.intersect && o != null && o.intersect && (n = n.slice(1, a.points.length - 1), n.unshift(o.intersect(n[0])), n.push(h.intersect(n[n.length - 1]))), a.toCluster && (index.L.debug("to cluster abc88", i[a.toCluster]), n = et(a.points, i[a.toCluster].node), c = !0), a.fromCluster && (index.L.debug("from cluster abc88", i[a.fromCluster]), n = et(n.reverse(), i[a.fromCluster].node).reverse(), c = !0);
1945
- var y = n.filter(function(C) {
1946
- return !Number.isNaN(C.y);
1947
- });
1948
- var p = index.Pf;
1949
- a.curve && (l === "graph" || l === "flowchart") && (p = a.curve);
1950
- var _rr = rr(a), f = _rr.x, x = _rr.y, k = line24d93f1b.P().x(f).y(x).curve(p);
1951
- var d;
1952
- switch(a.thickness){
1953
- case "normal":
1954
- d = "edge-thickness-normal";
1955
- break;
1956
- case "thick":
1957
- d = "edge-thickness-thick";
1958
- break;
1959
- case "invisible":
1960
- d = "edge-thickness-thick";
1961
- break;
1962
- default:
1963
- d = "";
1964
- }
1965
- switch(a.pattern){
1966
- case "solid":
1967
- d += " edge-pattern-solid";
1968
- break;
1969
- case "dotted":
1970
- d += " edge-pattern-dotted";
1971
- break;
1972
- case "dashed":
1973
- d += " edge-pattern-dashed";
1974
- break;
1975
- }
1976
- var u = e.append("path").attr("d", k(y)).attr("id", a.id).attr("class", " " + d + (a.classes ? " " + a.classes : "")).attr("style", a.style);
1977
- var S = "";
1978
- (index.Vn().flowchart.arrowMarkerAbsolute || index.Vn().state.arrowMarkerAbsolute) && (S = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, S = S.replace(/\(/g, "\\("), S = S.replace(/\)/g, "\\)")), ar(u, a, S, s, l);
1979
- var E = {};
1980
- return c && (E.updatedPath = n), E.originalPath = a.points, E;
1981
- };
1982
-
1983
- exports.Bt = Bt;
1984
- exports.M = M;
1985
- exports.R = R;
1986
- exports.ar = ar;
1987
- exports.dr = dr;
1988
- exports.fr = fr;
1989
- exports.gr = gr;
1990
- exports.hr = hr;
1991
- exports.m = m;
1992
- exports.or = or;
1993
- exports.pr = pr;
1994
- exports.rr = rr;
1995
- exports.tr = tr;
1996
- exports.ur = ur;
1997
- exports.xr = xr;
1998
- exports.yr = yr;