@webskill/sdk 0.21.0 → 0.22.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 (132) hide show
  1. package/dist/abnfDiagram-O67JEVCF-DtYFjfqO.js +109 -0
  2. package/dist/agent.d.ts +3 -3
  3. package/dist/agent.js +1012 -130
  4. package/dist/{approval-DwN2o2QG.js → approval-DWQlDPbY.js} +102 -16
  5. package/dist/arc-8U_6NQWm.js +130 -0
  6. package/dist/architecture-7GRP2DOG-RTw1wpAq.js +4 -0
  7. package/dist/architectureDiagram-NJMV4G6O-XmmXrJAK.js +7473 -0
  8. package/dist/array-DQfpQNY8.js +8 -0
  9. package/dist/blockDiagram-BEXU5L5S-D4yjnCD1.js +2582 -0
  10. package/dist/browser.d.ts +444 -48
  11. package/dist/browser.js +1771 -91
  12. package/dist/c4Diagram-YGBWAQC7-BLmA_JSd.js +3668 -0
  13. package/dist/channel-CZxxLrG7.js +9 -0
  14. package/dist/chunk-2Q5K7J3B-Ck03gkFR.js +21 -0
  15. package/dist/chunk-3FUC2YCW-tr6jmbQf.js +530 -0
  16. package/dist/chunk-5DYCD2WN-Bt97YGTd.js +58 -0
  17. package/dist/chunk-5VM5RSS4-BBxa48HL.js +21 -0
  18. package/dist/chunk-6AEJRKK7-JXK89I-O.js +14 -0
  19. package/dist/chunk-742MDFTN-CPmgCGwC.js +466 -0
  20. package/dist/chunk-7INBJB4K-C9jq9o66.js +6552 -0
  21. package/dist/chunk-7M6MHVWA-BrKCWcR1.js +4894 -0
  22. package/dist/chunk-7PRAP22T-BHED6GVs.js +95 -0
  23. package/dist/chunk-DUW6YSOI-DoZj78PO.js +19 -0
  24. package/dist/chunk-FOHPRMQF-Dkbp819z.js +27189 -0
  25. package/dist/chunk-GNY47TPC-Bpvq1T49.js +87 -0
  26. package/dist/chunk-GTNCS2PH-CLmh4I2c.js +686 -0
  27. package/dist/chunk-GWA4HPMP-B6vN3fkL.js +95 -0
  28. package/dist/chunk-J5ZVWO5B-Bi_Pcobw.js +26 -0
  29. package/dist/chunk-JWPE2WC7-D1rC79GS.js +12 -0
  30. package/dist/chunk-LNGE3PJU-D5OIoe3Z.js +2582 -0
  31. package/dist/chunk-MBY4JIJT-C34L7a4f.js +2276 -0
  32. package/dist/chunk-NETBCI7D-Cg84k8N8.js +321 -0
  33. package/dist/chunk-O7XYJQB3-B6K0KOSL.js +8846 -0
  34. package/dist/chunk-UA2S7LBM-DxHM29_K.js +612 -0
  35. package/dist/chunk-WEXAMYUT-Ba6jFWhB.js +33 -0
  36. package/dist/chunk-XXDRQBXY-DPbSy4kg.js +12 -0
  37. package/dist/chunk-Y2CYZVJY-U3QOMqrW.js +15 -0
  38. package/dist/chunk-Z7XXMR3K-oLg1h8F3.js +1038 -0
  39. package/dist/chunk-ZIGJFQKS-DqEFBuHR.js +2215 -0
  40. package/dist/classDiagram-v2-NBCMYWYE-BqnOWIUt.js +3845 -0
  41. package/dist/cose-bilkent-JH36ORCC-C0dTAHVK.js +4270 -0
  42. package/dist/cynefin-OW5HDTMX-B2QvgEQj.js +4 -0
  43. package/dist/cynefinDiagram-VND7K2PF-yAWc6Z3W.js +479 -0
  44. package/dist/cytoscape.esm-C64mRh9B.js +28325 -0
  45. package/dist/dagre-6A5THRUB-D0w2W27v.js +4816 -0
  46. package/dist/defaultLocale-B_EoOkSF.js +249 -0
  47. package/dist/diagram-22UHCM2B-DvgzhUzP.js +6115 -0
  48. package/dist/diagram-3UASUU5V-DWgUB-ef.js +795 -0
  49. package/dist/diagram-ATOU4E4O-P1olqwIs.js +553 -0
  50. package/dist/diagram-CDSNMT55-BUlZuLUe.js +402 -0
  51. package/dist/diagram-MLGK6HIB-6w5qmkGt.js +186 -0
  52. package/dist/diagram-MPIPVDR6-DEFiSo8o.js +289 -0
  53. package/dist/dist-UajCDt3n.js +92 -0
  54. package/dist/ebnfDiagram-ZINNZB2B-CI8liCfR.js +123 -0
  55. package/dist/elk-276RUBZZ-3SvW6OAK.js +90034 -0
  56. package/dist/erDiagram-OPXOYQCR-CPTbKhwP.js +2301 -0
  57. package/dist/eventmodeling-NTZA5JFV-BlyuqGp0.js +4 -0
  58. package/dist/flowDiagram-KWPJA3E3-CcUJ6HbV.js +18 -0
  59. package/dist/ganttDiagram-FUAMR5RP-31UjY0KK.js +3939 -0
  60. package/dist/{toolSource-C9oNuKmr.js → geometry-wx5ZTYzi.js} +162 -12
  61. package/dist/gitGraph-4MIJSDKK-ChdVlrk7.js +4 -0
  62. package/dist/gitGraphDiagram-X574FWY7-DKuxJymB.js +1153 -0
  63. package/dist/governance.d.ts +3 -3
  64. package/dist/graphlib-tk9gQYuN.js +4194 -0
  65. package/dist/{index-B8Tgmpwh.d.ts → index-BiO9_XRk.d.ts} +2 -2
  66. package/dist/{index-CYLt5u4L.d.ts → index-CjwdZQOS.d.ts} +700 -12
  67. package/dist/{index-DHopiH_m.d.ts → index-YPd8ZSEa.d.ts} +156 -9
  68. package/dist/index.d.ts +4 -4
  69. package/dist/index.js +6 -6
  70. package/dist/info-A6RAGUB7-CxRAt9S9.js +4 -0
  71. package/dist/infoDiagram-VRGFBTTK-pRspGfjZ.js +25 -0
  72. package/dist/init-CMOIWdg-.js +16 -0
  73. package/dist/ishikawaDiagram-OU5B5YK6-DKerAPAg.js +975 -0
  74. package/dist/journeyDiagram-ZHPQQLJL-C4MK-YO5.js +1227 -0
  75. package/dist/kanban-definition-PNTS6WVX-BqsZpMXx.js +1244 -0
  76. package/dist/katex-BcRRvyh_.js +26465 -0
  77. package/dist/{kind-DaKqLX2F.js → kind-Dc8x0HWz.js} +54 -7
  78. package/dist/line-LgV8iVMV.js +48 -0
  79. package/dist/linear-BWKR0Tqd.js +393 -0
  80. package/dist/linkedDocument-CIuh_Yp0.js +416 -0
  81. package/dist/mcp.d.ts +2 -2
  82. package/dist/{memoryArtifactStore-D6dLeY55.js → memoryArtifactStore-Bs7glPqm.js} +14 -0
  83. package/dist/mermaid-parser.core-pYR5siSx.js +754 -0
  84. package/dist/mermaid.core-DMtwGCHy.js +1756 -0
  85. package/dist/mindmap-definition-NLK3R4M7-CXbD-myG.js +1312 -0
  86. package/dist/node.d.ts +3 -3
  87. package/dist/node.js +2 -2
  88. package/dist/{openUiLibrary-b0i7F_oZ.js → openUiLibrary-B7j3rLrm.js} +1 -1
  89. package/dist/{openUiSpecLang-CLXJEeRU.js → openUiSpecLang-BSYYnjay.js} +1 -1
  90. package/dist/ordinal-CxA6GHQS.js +84 -0
  91. package/dist/packet-AYTQ26CC-BOm08cxl.js +4 -0
  92. package/dist/path-C27Z2Bjv.js +106 -0
  93. package/dist/pegDiagram-GJSIUBJH-BLGJOewQ.js +115 -0
  94. package/dist/pie-WAS4IAKB-Dvg7glpk.js +4 -0
  95. package/dist/pieDiagram-5QR66LMP-laoaV_PB.js +298 -0
  96. package/dist/quadrantDiagram-O4NWA36T-Db_wFBkT.js +2236 -0
  97. package/dist/radar-RG4KPBEZ-BZDaTu06.js +4 -0
  98. package/dist/railroad-74A4TZTK-C-UhjkOy.js +4 -0
  99. package/dist/railroad-abnf-HS5TGJTU-dUKVA4OS.js +4 -0
  100. package/dist/railroad-ebnf-LZEXJU2U-DzQumk18.js +4 -0
  101. package/dist/railroad-peg-WCYAUIDC-B3vvTWed.js +4 -0
  102. package/dist/railroadDiagram-XR7U4H2S-BY0sTM4X.js +89 -0
  103. package/dist/requirementDiagram-PLB6GJNP-3rkQfEhs.js +2474 -0
  104. package/dist/rough.cjs-AmDd_NQk.js +1395 -0
  105. package/dist/sankeyDiagram-IPEJSGJF-CGAJhyG2.js +3578 -0
  106. package/dist/sequenceDiagram-PO4LG4MO-9FJjFX06.js +5522 -0
  107. package/dist/sizeCapture-INFHLROL-D8PWxdOn.js +56 -0
  108. package/dist/{skillVersionStore-B24Jjjry-BkOk9wI_.d.ts → skillVersionStore-B24Jjjry-BY1H7Krp.d.ts} +1 -1
  109. package/dist/src-NkhI3UMl.js +2653 -0
  110. package/dist/stateDiagram-v2-GCMORJYK-B0O3wc1-.js +2715 -0
  111. package/dist/swimlanes-2SLR337P-D4EOnrpu.js +6637 -0
  112. package/dist/swimlanesDiagram-TC7HE7FX-BUx29EJ9.js +30 -0
  113. package/dist/testing.d.ts +2 -1
  114. package/dist/testing.js +1 -1
  115. package/dist/timeline-definition-EJHVYXUP-CrgiiB4C.js +1513 -0
  116. package/dist/treeView-Q6P3EWNA-C1by-Gzc.js +4 -0
  117. package/dist/treemap-WGGIJYW6-mC2NZ6ad.js +4 -0
  118. package/dist/{types-BvTV_05--BW8zDuEk.d.ts → types-CpDRZ0rA-BM5FI9oN.d.ts} +59 -8
  119. package/dist/ui-react.d.ts +3 -3
  120. package/dist/ui-react.js +3718 -77
  121. package/dist/ui-vue.d.ts +1 -1
  122. package/dist/ui.d.ts +3 -3
  123. package/dist/ui.js +2 -2
  124. package/dist/usecaseDiagram-POWQR4AR-BUt_TQOY.js +14397 -0
  125. package/dist/vennDiagram-UO4OBE2U-CwXr0wjA.js +2808 -0
  126. package/dist/wardley-WFR3VGLG-CVSYjq_S.js +4 -0
  127. package/dist/wardleyDiagram-VNRHLVJA-Cpfd47dQ.js +874 -0
  128. package/dist/{webSkillApi-Cib6G-94.js → webSkillApi-Dy-Zjv0y.js} +1 -1
  129. package/dist/{webskillLitCatalog-W06npwej.js → webskillLitCatalog-D5BCiMCU.js} +1 -1
  130. package/dist/xychartDiagram-PMCCYNJV-e1TeVoc6.js +2704 -0
  131. package/package.json +1 -1
  132. package/dist/linkedDocument-C0gj1sMq.js +0 -245
@@ -0,0 +1,1244 @@
1
+ import { n as __name } from "./chunk-Y2CYZVJY-U3QOMqrW.js";
2
+ import { m as log } from "./src-NkhI3UMl.js";
3
+ import { Y as setupGraphViewbox, f as defaultConfig_default, it as isDark, nt as lighten, tt as darken, x as getConfig2, z as sanitizeText } from "./chunk-O7XYJQB3-B6K0KOSL.js";
4
+ import "./chunk-ZIGJFQKS-DqEFBuHR.js";
5
+ import { t as selectSvgElement } from "./chunk-6AEJRKK7-JXK89I-O.js";
6
+ import "./chunk-742MDFTN-CPmgCGwC.js";
7
+ import "./chunk-MBY4JIJT-C34L7a4f.js";
8
+ import { t as getIconStyles } from "./chunk-5VM5RSS4-BBxa48HL.js";
9
+ import "./chunk-7PRAP22T-BHED6GVs.js";
10
+ import "./chunk-7INBJB4K-C9jq9o66.js";
11
+ import { i as positionNode, r as insertNode } from "./chunk-5DYCD2WN-Bt97YGTd.js";
12
+ import { r as insertCluster } from "./chunk-UA2S7LBM-DxHM29_K.js";
13
+ import { n as load, t as JSON_SCHEMA } from "./chunk-LNGE3PJU-D5OIoe3Z.js";
14
+
15
+ //#region ../../node_modules/.pnpm/mermaid@12.0.0/node_modules/mermaid/dist/chunks/mermaid.core/kanban-definition-PNTS6WVX.mjs
16
+ var parser = (function() {
17
+ var o = /* @__PURE__ */ __name(function(k, v, o2, l) {
18
+ for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v);
19
+ return o2;
20
+ }, "o"), $V0 = [1, 4], $V1 = [1, 13], $V2 = [1, 12], $V3 = [1, 15], $V4 = [1, 16], $V5 = [1, 20], $V6 = [1, 19], $V7 = [
21
+ 6,
22
+ 7,
23
+ 8
24
+ ], $V8 = [1, 26], $V9 = [1, 24], $Va = [1, 25], $Vb = [
25
+ 6,
26
+ 7,
27
+ 11
28
+ ], $Vc = [1, 31], $Vd = [
29
+ 6,
30
+ 7,
31
+ 11,
32
+ 24
33
+ ], $Ve = [
34
+ 1,
35
+ 6,
36
+ 13,
37
+ 16,
38
+ 17,
39
+ 20,
40
+ 23
41
+ ], $Vf = [1, 35], $Vg = [1, 36], $Vh = [
42
+ 1,
43
+ 6,
44
+ 7,
45
+ 11,
46
+ 13,
47
+ 16,
48
+ 17,
49
+ 20,
50
+ 23
51
+ ], $Vi = [1, 38];
52
+ var parser2 = {
53
+ trace: /* @__PURE__ */ __name(function trace() {}, "trace"),
54
+ yy: {},
55
+ symbols_: {
56
+ "error": 2,
57
+ "start": 3,
58
+ "mindMap": 4,
59
+ "spaceLines": 5,
60
+ "SPACELINE": 6,
61
+ "NL": 7,
62
+ "KANBAN": 8,
63
+ "document": 9,
64
+ "stop": 10,
65
+ "EOF": 11,
66
+ "statement": 12,
67
+ "SPACELIST": 13,
68
+ "node": 14,
69
+ "shapeData": 15,
70
+ "ICON": 16,
71
+ "CLASS": 17,
72
+ "nodeWithId": 18,
73
+ "nodeWithoutId": 19,
74
+ "NODE_DSTART": 20,
75
+ "NODE_DESCR": 21,
76
+ "NODE_DEND": 22,
77
+ "NODE_ID": 23,
78
+ "SHAPE_DATA": 24,
79
+ "$accept": 0,
80
+ "$end": 1
81
+ },
82
+ terminals_: {
83
+ 2: "error",
84
+ 6: "SPACELINE",
85
+ 7: "NL",
86
+ 8: "KANBAN",
87
+ 11: "EOF",
88
+ 13: "SPACELIST",
89
+ 16: "ICON",
90
+ 17: "CLASS",
91
+ 20: "NODE_DSTART",
92
+ 21: "NODE_DESCR",
93
+ 22: "NODE_DEND",
94
+ 23: "NODE_ID",
95
+ 24: "SHAPE_DATA"
96
+ },
97
+ productions_: [
98
+ 0,
99
+ [3, 1],
100
+ [3, 2],
101
+ [5, 1],
102
+ [5, 2],
103
+ [5, 2],
104
+ [4, 2],
105
+ [4, 3],
106
+ [10, 1],
107
+ [10, 1],
108
+ [10, 1],
109
+ [10, 2],
110
+ [10, 2],
111
+ [9, 3],
112
+ [9, 2],
113
+ [12, 3],
114
+ [12, 2],
115
+ [12, 2],
116
+ [12, 2],
117
+ [12, 1],
118
+ [12, 2],
119
+ [12, 1],
120
+ [12, 1],
121
+ [12, 1],
122
+ [12, 1],
123
+ [14, 1],
124
+ [14, 1],
125
+ [19, 3],
126
+ [18, 1],
127
+ [18, 4],
128
+ [15, 2],
129
+ [15, 1]
130
+ ],
131
+ performAction: /* @__PURE__ */ __name(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
132
+ var $0 = $$.length - 1;
133
+ switch (yystate) {
134
+ case 6:
135
+ case 7: return yy;
136
+ case 8:
137
+ yy.getLogger().trace("Stop NL ");
138
+ break;
139
+ case 9:
140
+ yy.getLogger().trace("Stop EOF ");
141
+ break;
142
+ case 11:
143
+ yy.getLogger().trace("Stop NL2 ");
144
+ break;
145
+ case 12:
146
+ yy.getLogger().trace("Stop EOF2 ");
147
+ break;
148
+ case 15:
149
+ yy.getLogger().info("Node: ", $$[$0 - 1].id);
150
+ yy.addNode($$[$0 - 2].length, $$[$0 - 1].id, $$[$0 - 1].descr, $$[$0 - 1].type, $$[$0]);
151
+ break;
152
+ case 16:
153
+ yy.getLogger().info("Node: ", $$[$0].id);
154
+ yy.addNode($$[$0 - 1].length, $$[$0].id, $$[$0].descr, $$[$0].type);
155
+ break;
156
+ case 17:
157
+ yy.getLogger().trace("Icon: ", $$[$0]);
158
+ yy.decorateNode({ icon: $$[$0] });
159
+ break;
160
+ case 18:
161
+ case 23:
162
+ yy.decorateNode({ class: $$[$0] });
163
+ break;
164
+ case 19:
165
+ yy.getLogger().trace("SPACELIST");
166
+ break;
167
+ case 20:
168
+ yy.getLogger().trace("Node: ", $$[$0 - 1].id);
169
+ yy.addNode(0, $$[$0 - 1].id, $$[$0 - 1].descr, $$[$0 - 1].type, $$[$0]);
170
+ break;
171
+ case 21:
172
+ yy.getLogger().trace("Node: ", $$[$0].id);
173
+ yy.addNode(0, $$[$0].id, $$[$0].descr, $$[$0].type);
174
+ break;
175
+ case 22:
176
+ yy.decorateNode({ icon: $$[$0] });
177
+ break;
178
+ case 27:
179
+ yy.getLogger().trace("node found ..", $$[$0 - 2]);
180
+ this.$ = {
181
+ id: $$[$0 - 1],
182
+ descr: $$[$0 - 1],
183
+ type: yy.getType($$[$0 - 2], $$[$0])
184
+ };
185
+ break;
186
+ case 28:
187
+ this.$ = {
188
+ id: $$[$0],
189
+ descr: $$[$0],
190
+ type: 0
191
+ };
192
+ break;
193
+ case 29:
194
+ yy.getLogger().trace("node found ..", $$[$0 - 3]);
195
+ this.$ = {
196
+ id: $$[$0 - 3],
197
+ descr: $$[$0 - 1],
198
+ type: yy.getType($$[$0 - 2], $$[$0])
199
+ };
200
+ break;
201
+ case 30:
202
+ this.$ = $$[$0 - 1] + $$[$0];
203
+ break;
204
+ case 31:
205
+ this.$ = $$[$0];
206
+ break;
207
+ }
208
+ }, "anonymous"),
209
+ table: [
210
+ {
211
+ 3: 1,
212
+ 4: 2,
213
+ 5: 3,
214
+ 6: [1, 5],
215
+ 8: $V0
216
+ },
217
+ { 1: [3] },
218
+ { 1: [2, 1] },
219
+ {
220
+ 4: 6,
221
+ 6: [1, 7],
222
+ 7: [1, 8],
223
+ 8: $V0
224
+ },
225
+ {
226
+ 6: $V1,
227
+ 7: [1, 10],
228
+ 9: 9,
229
+ 12: 11,
230
+ 13: $V2,
231
+ 14: 14,
232
+ 16: $V3,
233
+ 17: $V4,
234
+ 18: 17,
235
+ 19: 18,
236
+ 20: $V5,
237
+ 23: $V6
238
+ },
239
+ o($V7, [2, 3]),
240
+ { 1: [2, 2] },
241
+ o($V7, [2, 4]),
242
+ o($V7, [2, 5]),
243
+ {
244
+ 1: [2, 6],
245
+ 6: $V1,
246
+ 12: 21,
247
+ 13: $V2,
248
+ 14: 14,
249
+ 16: $V3,
250
+ 17: $V4,
251
+ 18: 17,
252
+ 19: 18,
253
+ 20: $V5,
254
+ 23: $V6
255
+ },
256
+ {
257
+ 6: $V1,
258
+ 9: 22,
259
+ 12: 11,
260
+ 13: $V2,
261
+ 14: 14,
262
+ 16: $V3,
263
+ 17: $V4,
264
+ 18: 17,
265
+ 19: 18,
266
+ 20: $V5,
267
+ 23: $V6
268
+ },
269
+ {
270
+ 6: $V8,
271
+ 7: $V9,
272
+ 10: 23,
273
+ 11: $Va
274
+ },
275
+ o($Vb, [2, 24], {
276
+ 18: 17,
277
+ 19: 18,
278
+ 14: 27,
279
+ 16: [1, 28],
280
+ 17: [1, 29],
281
+ 20: $V5,
282
+ 23: $V6
283
+ }),
284
+ o($Vb, [2, 19]),
285
+ o($Vb, [2, 21], {
286
+ 15: 30,
287
+ 24: $Vc
288
+ }),
289
+ o($Vb, [2, 22]),
290
+ o($Vb, [2, 23]),
291
+ o($Vd, [2, 25]),
292
+ o($Vd, [2, 26]),
293
+ o($Vd, [2, 28], { 20: [1, 32] }),
294
+ { 21: [1, 33] },
295
+ {
296
+ 6: $V8,
297
+ 7: $V9,
298
+ 10: 34,
299
+ 11: $Va
300
+ },
301
+ {
302
+ 1: [2, 7],
303
+ 6: $V1,
304
+ 12: 21,
305
+ 13: $V2,
306
+ 14: 14,
307
+ 16: $V3,
308
+ 17: $V4,
309
+ 18: 17,
310
+ 19: 18,
311
+ 20: $V5,
312
+ 23: $V6
313
+ },
314
+ o($Ve, [2, 14], {
315
+ 7: $Vf,
316
+ 11: $Vg
317
+ }),
318
+ o($Vh, [2, 8]),
319
+ o($Vh, [2, 9]),
320
+ o($Vh, [2, 10]),
321
+ o($Vb, [2, 16], {
322
+ 15: 37,
323
+ 24: $Vc
324
+ }),
325
+ o($Vb, [2, 17]),
326
+ o($Vb, [2, 18]),
327
+ o($Vb, [2, 20], { 24: $Vi }),
328
+ o($Vd, [2, 31]),
329
+ { 21: [1, 39] },
330
+ { 22: [1, 40] },
331
+ o($Ve, [2, 13], {
332
+ 7: $Vf,
333
+ 11: $Vg
334
+ }),
335
+ o($Vh, [2, 11]),
336
+ o($Vh, [2, 12]),
337
+ o($Vb, [2, 15], { 24: $Vi }),
338
+ o($Vd, [2, 30]),
339
+ { 22: [1, 41] },
340
+ o($Vd, [2, 27]),
341
+ o($Vd, [2, 29])
342
+ ],
343
+ defaultActions: {
344
+ 2: [2, 1],
345
+ 6: [2, 2]
346
+ },
347
+ parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
348
+ if (hash.recoverable) this.trace(str);
349
+ else {
350
+ var error = new Error(str);
351
+ error.hash = hash;
352
+ throw error;
353
+ }
354
+ }, "parseError"),
355
+ parse: /* @__PURE__ */ __name(function parse(input) {
356
+ var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
357
+ var args = lstack.slice.call(arguments, 1);
358
+ var lexer2 = Object.create(this.lexer);
359
+ var sharedState = { yy: {} };
360
+ for (var k in this.yy) if (Object.prototype.hasOwnProperty.call(this.yy, k)) sharedState.yy[k] = this.yy[k];
361
+ lexer2.setInput(input, sharedState.yy);
362
+ sharedState.yy.lexer = lexer2;
363
+ sharedState.yy.parser = this;
364
+ if (typeof lexer2.yylloc == "undefined") lexer2.yylloc = {};
365
+ var yyloc = lexer2.yylloc;
366
+ lstack.push(yyloc);
367
+ var ranges = lexer2.options && lexer2.options.ranges;
368
+ if (typeof sharedState.yy.parseError === "function") this.parseError = sharedState.yy.parseError;
369
+ else this.parseError = Object.getPrototypeOf(this).parseError;
370
+ function popStack(n) {
371
+ stack.length = stack.length - 2 * n;
372
+ vstack.length = vstack.length - n;
373
+ lstack.length = lstack.length - n;
374
+ }
375
+ __name(popStack, "popStack");
376
+ function lex() {
377
+ var token = tstack.pop() || lexer2.lex() || EOF;
378
+ if (typeof token !== "number") {
379
+ if (token instanceof Array) {
380
+ tstack = token;
381
+ token = tstack.pop();
382
+ }
383
+ token = self.symbols_[token] || token;
384
+ }
385
+ return token;
386
+ }
387
+ __name(lex, "lex");
388
+ var symbol, preErrorSymbol, state, action, r, yyval = {}, p, len, newState, expected;
389
+ while (true) {
390
+ state = stack[stack.length - 1];
391
+ if (this.defaultActions[state]) action = this.defaultActions[state];
392
+ else {
393
+ if (symbol === null || typeof symbol == "undefined") symbol = lex();
394
+ action = table[state] && table[state][symbol];
395
+ }
396
+ if (typeof action === "undefined" || !action.length || !action[0]) {
397
+ var errStr = "";
398
+ expected = [];
399
+ for (p in table[state]) if (this.terminals_[p] && p > TERROR) expected.push("'" + this.terminals_[p] + "'");
400
+ if (lexer2.showPosition) errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
401
+ else errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
402
+ this.parseError(errStr, {
403
+ text: lexer2.match,
404
+ token: this.terminals_[symbol] || symbol,
405
+ line: lexer2.yylineno,
406
+ loc: yyloc,
407
+ expected
408
+ });
409
+ }
410
+ if (action[0] instanceof Array && action.length > 1) throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
411
+ switch (action[0]) {
412
+ case 1:
413
+ stack.push(symbol);
414
+ vstack.push(lexer2.yytext);
415
+ lstack.push(lexer2.yylloc);
416
+ stack.push(action[1]);
417
+ symbol = null;
418
+ if (!preErrorSymbol) {
419
+ yyleng = lexer2.yyleng;
420
+ yytext = lexer2.yytext;
421
+ yylineno = lexer2.yylineno;
422
+ yyloc = lexer2.yylloc;
423
+ if (recovering > 0) recovering--;
424
+ } else {
425
+ symbol = preErrorSymbol;
426
+ preErrorSymbol = null;
427
+ }
428
+ break;
429
+ case 2:
430
+ len = this.productions_[action[1]][1];
431
+ yyval.$ = vstack[vstack.length - len];
432
+ yyval._$ = {
433
+ first_line: lstack[lstack.length - (len || 1)].first_line,
434
+ last_line: lstack[lstack.length - 1].last_line,
435
+ first_column: lstack[lstack.length - (len || 1)].first_column,
436
+ last_column: lstack[lstack.length - 1].last_column
437
+ };
438
+ if (ranges) yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
439
+ r = this.performAction.apply(yyval, [
440
+ yytext,
441
+ yyleng,
442
+ yylineno,
443
+ sharedState.yy,
444
+ action[1],
445
+ vstack,
446
+ lstack
447
+ ].concat(args));
448
+ if (typeof r !== "undefined") return r;
449
+ if (len) {
450
+ stack = stack.slice(0, -1 * len * 2);
451
+ vstack = vstack.slice(0, -1 * len);
452
+ lstack = lstack.slice(0, -1 * len);
453
+ }
454
+ stack.push(this.productions_[action[1]][0]);
455
+ vstack.push(yyval.$);
456
+ lstack.push(yyval._$);
457
+ newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
458
+ stack.push(newState);
459
+ break;
460
+ case 3: return true;
461
+ }
462
+ }
463
+ return true;
464
+ }, "parse")
465
+ };
466
+ parser2.lexer = /* @__PURE__ */ (function() {
467
+ return {
468
+ EOF: 1,
469
+ parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
470
+ if (this.yy.parser) this.yy.parser.parseError(str, hash);
471
+ else throw new Error(str);
472
+ }, "parseError"),
473
+ setInput: /* @__PURE__ */ __name(function(input, yy) {
474
+ this.yy = yy || this.yy || {};
475
+ this._input = input;
476
+ this._more = this._backtrack = this.done = false;
477
+ this.yylineno = this.yyleng = 0;
478
+ this.yytext = this.matched = this.match = "";
479
+ this.conditionStack = ["INITIAL"];
480
+ this.yylloc = {
481
+ first_line: 1,
482
+ first_column: 0,
483
+ last_line: 1,
484
+ last_column: 0
485
+ };
486
+ if (this.options.ranges) this.yylloc.range = [0, 0];
487
+ this.offset = 0;
488
+ return this;
489
+ }, "setInput"),
490
+ input: /* @__PURE__ */ __name(function() {
491
+ var ch = this._input[0];
492
+ this.yytext += ch;
493
+ this.yyleng++;
494
+ this.offset++;
495
+ this.match += ch;
496
+ this.matched += ch;
497
+ if (ch.match(/(?:\r\n?|\n).*/g)) {
498
+ this.yylineno++;
499
+ this.yylloc.last_line++;
500
+ } else this.yylloc.last_column++;
501
+ if (this.options.ranges) this.yylloc.range[1]++;
502
+ this._input = this._input.slice(1);
503
+ return ch;
504
+ }, "input"),
505
+ unput: /* @__PURE__ */ __name(function(ch) {
506
+ var len = ch.length;
507
+ var lines = ch.split(/(?:\r\n?|\n)/g);
508
+ this._input = ch + this._input;
509
+ this.yytext = this.yytext.substr(0, this.yytext.length - len);
510
+ this.offset -= len;
511
+ var oldLines = this.match.split(/(?:\r\n?|\n)/g);
512
+ this.match = this.match.substr(0, this.match.length - 1);
513
+ this.matched = this.matched.substr(0, this.matched.length - 1);
514
+ if (lines.length - 1) this.yylineno -= lines.length - 1;
515
+ var r = this.yylloc.range;
516
+ this.yylloc = {
517
+ first_line: this.yylloc.first_line,
518
+ last_line: this.yylineno + 1,
519
+ first_column: this.yylloc.first_column,
520
+ last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
521
+ };
522
+ if (this.options.ranges) this.yylloc.range = [r[0], r[0] + this.yyleng - len];
523
+ this.yyleng = this.yytext.length;
524
+ return this;
525
+ }, "unput"),
526
+ more: /* @__PURE__ */ __name(function() {
527
+ this._more = true;
528
+ return this;
529
+ }, "more"),
530
+ reject: /* @__PURE__ */ __name(function() {
531
+ if (this.options.backtrack_lexer) this._backtrack = true;
532
+ else return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), {
533
+ text: "",
534
+ token: null,
535
+ line: this.yylineno
536
+ });
537
+ return this;
538
+ }, "reject"),
539
+ less: /* @__PURE__ */ __name(function(n) {
540
+ this.unput(this.match.slice(n));
541
+ }, "less"),
542
+ pastInput: /* @__PURE__ */ __name(function() {
543
+ var past = this.matched.substr(0, this.matched.length - this.match.length);
544
+ return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
545
+ }, "pastInput"),
546
+ upcomingInput: /* @__PURE__ */ __name(function() {
547
+ var next = this.match;
548
+ if (next.length < 20) next += this._input.substr(0, 20 - next.length);
549
+ return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
550
+ }, "upcomingInput"),
551
+ showPosition: /* @__PURE__ */ __name(function() {
552
+ var pre = this.pastInput();
553
+ var c = new Array(pre.length + 1).join("-");
554
+ return pre + this.upcomingInput() + "\n" + c + "^";
555
+ }, "showPosition"),
556
+ test_match: /* @__PURE__ */ __name(function(match, indexed_rule) {
557
+ var token, lines, backup;
558
+ if (this.options.backtrack_lexer) {
559
+ backup = {
560
+ yylineno: this.yylineno,
561
+ yylloc: {
562
+ first_line: this.yylloc.first_line,
563
+ last_line: this.last_line,
564
+ first_column: this.yylloc.first_column,
565
+ last_column: this.yylloc.last_column
566
+ },
567
+ yytext: this.yytext,
568
+ match: this.match,
569
+ matches: this.matches,
570
+ matched: this.matched,
571
+ yyleng: this.yyleng,
572
+ offset: this.offset,
573
+ _more: this._more,
574
+ _input: this._input,
575
+ yy: this.yy,
576
+ conditionStack: this.conditionStack.slice(0),
577
+ done: this.done
578
+ };
579
+ if (this.options.ranges) backup.yylloc.range = this.yylloc.range.slice(0);
580
+ }
581
+ lines = match[0].match(/(?:\r\n?|\n).*/g);
582
+ if (lines) this.yylineno += lines.length;
583
+ this.yylloc = {
584
+ first_line: this.yylloc.last_line,
585
+ last_line: this.yylineno + 1,
586
+ first_column: this.yylloc.last_column,
587
+ last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
588
+ };
589
+ this.yytext += match[0];
590
+ this.match += match[0];
591
+ this.matches = match;
592
+ this.yyleng = this.yytext.length;
593
+ if (this.options.ranges) this.yylloc.range = [this.offset, this.offset += this.yyleng];
594
+ this._more = false;
595
+ this._backtrack = false;
596
+ this._input = this._input.slice(match[0].length);
597
+ this.matched += match[0];
598
+ token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
599
+ if (this.done && this._input) this.done = false;
600
+ if (token) return token;
601
+ else if (this._backtrack) {
602
+ for (var k in backup) this[k] = backup[k];
603
+ return false;
604
+ }
605
+ return false;
606
+ }, "test_match"),
607
+ next: /* @__PURE__ */ __name(function() {
608
+ if (this.done) return this.EOF;
609
+ if (!this._input) this.done = true;
610
+ var token, match, tempMatch, index;
611
+ if (!this._more) {
612
+ this.yytext = "";
613
+ this.match = "";
614
+ }
615
+ var rules = this._currentRules();
616
+ for (var i = 0; i < rules.length; i++) {
617
+ tempMatch = this._input.match(this.rules[rules[i]]);
618
+ if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
619
+ match = tempMatch;
620
+ index = i;
621
+ if (this.options.backtrack_lexer) {
622
+ token = this.test_match(tempMatch, rules[i]);
623
+ if (token !== false) return token;
624
+ else if (this._backtrack) {
625
+ match = false;
626
+ continue;
627
+ } else return false;
628
+ } else if (!this.options.flex) break;
629
+ }
630
+ }
631
+ if (match) {
632
+ token = this.test_match(match, rules[index]);
633
+ if (token !== false) return token;
634
+ return false;
635
+ }
636
+ if (this._input === "") return this.EOF;
637
+ else return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
638
+ text: "",
639
+ token: null,
640
+ line: this.yylineno
641
+ });
642
+ }, "next"),
643
+ lex: /* @__PURE__ */ __name(function lex() {
644
+ var r = this.next();
645
+ if (r) return r;
646
+ else return this.lex();
647
+ }, "lex"),
648
+ begin: /* @__PURE__ */ __name(function begin(condition) {
649
+ this.conditionStack.push(condition);
650
+ }, "begin"),
651
+ popState: /* @__PURE__ */ __name(function popState() {
652
+ if (this.conditionStack.length - 1 > 0) return this.conditionStack.pop();
653
+ else return this.conditionStack[0];
654
+ }, "popState"),
655
+ _currentRules: /* @__PURE__ */ __name(function _currentRules() {
656
+ if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
657
+ else return this.conditions["INITIAL"].rules;
658
+ }, "_currentRules"),
659
+ topState: /* @__PURE__ */ __name(function topState(n) {
660
+ n = this.conditionStack.length - 1 - Math.abs(n || 0);
661
+ if (n >= 0) return this.conditionStack[n];
662
+ else return "INITIAL";
663
+ }, "topState"),
664
+ pushState: /* @__PURE__ */ __name(function pushState(condition) {
665
+ this.begin(condition);
666
+ }, "pushState"),
667
+ stateStackSize: /* @__PURE__ */ __name(function stateStackSize() {
668
+ return this.conditionStack.length;
669
+ }, "stateStackSize"),
670
+ options: { "case-insensitive": true },
671
+ performAction: /* @__PURE__ */ __name(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
672
+ switch ($avoiding_name_collisions) {
673
+ case 0:
674
+ this.pushState("shapeData");
675
+ yy_.yytext = "";
676
+ return 24;
677
+ case 1:
678
+ this.pushState("shapeDataStr");
679
+ return 24;
680
+ case 2:
681
+ this.popState();
682
+ return 24;
683
+ case 3:
684
+ yy_.yytext = yy_.yytext.replace(/\n\s*/g, "<br/>");
685
+ return 24;
686
+ case 4: return 24;
687
+ case 5:
688
+ this.popState();
689
+ break;
690
+ case 6:
691
+ yy.getLogger().trace("Found comment", yy_.yytext);
692
+ return 6;
693
+ case 7: return 8;
694
+ case 8:
695
+ this.begin("CLASS");
696
+ break;
697
+ case 9:
698
+ this.popState();
699
+ return 17;
700
+ case 10:
701
+ this.popState();
702
+ break;
703
+ case 11:
704
+ yy.getLogger().trace("Begin icon");
705
+ this.begin("ICON");
706
+ break;
707
+ case 12:
708
+ yy.getLogger().trace("SPACELINE");
709
+ return 6;
710
+ case 13: return 7;
711
+ case 14: return 16;
712
+ case 15:
713
+ yy.getLogger().trace("end icon");
714
+ this.popState();
715
+ break;
716
+ case 16:
717
+ yy.getLogger().trace("Exploding node");
718
+ this.begin("NODE");
719
+ return 20;
720
+ case 17:
721
+ yy.getLogger().trace("Cloud");
722
+ this.begin("NODE");
723
+ return 20;
724
+ case 18:
725
+ yy.getLogger().trace("Explosion Bang");
726
+ this.begin("NODE");
727
+ return 20;
728
+ case 19:
729
+ yy.getLogger().trace("Cloud Bang");
730
+ this.begin("NODE");
731
+ return 20;
732
+ case 20:
733
+ this.begin("NODE");
734
+ return 20;
735
+ case 21:
736
+ this.begin("NODE");
737
+ return 20;
738
+ case 22:
739
+ this.begin("NODE");
740
+ return 20;
741
+ case 23:
742
+ this.begin("NODE");
743
+ return 20;
744
+ case 24: return 13;
745
+ case 25: return 23;
746
+ case 26: return 11;
747
+ case 27:
748
+ this.begin("NSTR2");
749
+ break;
750
+ case 28: return "NODE_DESCR";
751
+ case 29:
752
+ this.popState();
753
+ break;
754
+ case 30:
755
+ yy.getLogger().trace("Starting NSTR");
756
+ this.begin("NSTR");
757
+ break;
758
+ case 31:
759
+ yy.getLogger().trace("description:", yy_.yytext);
760
+ return "NODE_DESCR";
761
+ case 32:
762
+ this.popState();
763
+ break;
764
+ case 33:
765
+ this.popState();
766
+ yy.getLogger().trace("node end ))");
767
+ return "NODE_DEND";
768
+ case 34:
769
+ this.popState();
770
+ yy.getLogger().trace("node end )");
771
+ return "NODE_DEND";
772
+ case 35:
773
+ this.popState();
774
+ yy.getLogger().trace("node end ...", yy_.yytext);
775
+ return "NODE_DEND";
776
+ case 36:
777
+ this.popState();
778
+ yy.getLogger().trace("node end ((");
779
+ return "NODE_DEND";
780
+ case 37:
781
+ this.popState();
782
+ yy.getLogger().trace("node end (-");
783
+ return "NODE_DEND";
784
+ case 38:
785
+ this.popState();
786
+ yy.getLogger().trace("node end (-");
787
+ return "NODE_DEND";
788
+ case 39:
789
+ this.popState();
790
+ yy.getLogger().trace("node end ((");
791
+ return "NODE_DEND";
792
+ case 40:
793
+ this.popState();
794
+ yy.getLogger().trace("node end ((");
795
+ return "NODE_DEND";
796
+ case 41:
797
+ yy.getLogger().trace("Long description:", yy_.yytext);
798
+ return 21;
799
+ case 42:
800
+ yy.getLogger().trace("Long description:", yy_.yytext);
801
+ return 21;
802
+ }
803
+ }, "anonymous"),
804
+ rules: [
805
+ /^(?:@\{)/i,
806
+ /^(?:["])/i,
807
+ /^(?:["])/i,
808
+ /^(?:[^\"]+)/i,
809
+ /^(?:[^}^"]+)/i,
810
+ /^(?:\})/i,
811
+ /^(?:\s*%%.*)/i,
812
+ /^(?:kanban\b)/i,
813
+ /^(?::::)/i,
814
+ /^(?:.+)/i,
815
+ /^(?:\n)/i,
816
+ /^(?:::icon\()/i,
817
+ /^(?:[\s]+[\n])/i,
818
+ /^(?:[\n]+)/i,
819
+ /^(?:[^\)]+)/i,
820
+ /^(?:\))/i,
821
+ /^(?:-\))/i,
822
+ /^(?:\(-)/i,
823
+ /^(?:\)\))/i,
824
+ /^(?:\))/i,
825
+ /^(?:\(\()/i,
826
+ /^(?:\{\{)/i,
827
+ /^(?:\()/i,
828
+ /^(?:\[)/i,
829
+ /^(?:[\s]+)/i,
830
+ /^(?:[^\(\[\n\)\{\}@]+)/i,
831
+ /^(?:$)/i,
832
+ /^(?:["][`])/i,
833
+ /^(?:[^`"]+)/i,
834
+ /^(?:[`]["])/i,
835
+ /^(?:["])/i,
836
+ /^(?:[^"]+)/i,
837
+ /^(?:["])/i,
838
+ /^(?:[\)]\))/i,
839
+ /^(?:[\)])/i,
840
+ /^(?:[\]])/i,
841
+ /^(?:\}\})/i,
842
+ /^(?:\(-)/i,
843
+ /^(?:-\))/i,
844
+ /^(?:\(\()/i,
845
+ /^(?:\()/i,
846
+ /^(?:[^\)\]\(\}]+)/i,
847
+ /^(?:.+(?!\(\())/i
848
+ ],
849
+ conditions: {
850
+ "shapeDataEndBracket": {
851
+ "rules": [],
852
+ "inclusive": false
853
+ },
854
+ "shapeDataStr": {
855
+ "rules": [2, 3],
856
+ "inclusive": false
857
+ },
858
+ "shapeData": {
859
+ "rules": [
860
+ 1,
861
+ 4,
862
+ 5
863
+ ],
864
+ "inclusive": false
865
+ },
866
+ "CLASS": {
867
+ "rules": [9, 10],
868
+ "inclusive": false
869
+ },
870
+ "ICON": {
871
+ "rules": [14, 15],
872
+ "inclusive": false
873
+ },
874
+ "NSTR2": {
875
+ "rules": [28, 29],
876
+ "inclusive": false
877
+ },
878
+ "NSTR": {
879
+ "rules": [31, 32],
880
+ "inclusive": false
881
+ },
882
+ "NODE": {
883
+ "rules": [
884
+ 27,
885
+ 30,
886
+ 33,
887
+ 34,
888
+ 35,
889
+ 36,
890
+ 37,
891
+ 38,
892
+ 39,
893
+ 40,
894
+ 41,
895
+ 42
896
+ ],
897
+ "inclusive": false
898
+ },
899
+ "INITIAL": {
900
+ "rules": [
901
+ 0,
902
+ 6,
903
+ 7,
904
+ 8,
905
+ 11,
906
+ 12,
907
+ 13,
908
+ 16,
909
+ 17,
910
+ 18,
911
+ 19,
912
+ 20,
913
+ 21,
914
+ 22,
915
+ 23,
916
+ 24,
917
+ 25,
918
+ 26
919
+ ],
920
+ "inclusive": true
921
+ }
922
+ }
923
+ };
924
+ })();
925
+ function Parser() {
926
+ this.yy = {};
927
+ }
928
+ __name(Parser, "Parser");
929
+ Parser.prototype = parser2;
930
+ parser2.Parser = Parser;
931
+ return new Parser();
932
+ })();
933
+ parser.parser = parser;
934
+ var kanban_default = parser;
935
+ var nodes = [];
936
+ var sections = [];
937
+ var cnt = 0;
938
+ var elements = {};
939
+ var clear = /* @__PURE__ */ __name(() => {
940
+ nodes = [];
941
+ sections = [];
942
+ cnt = 0;
943
+ elements = {};
944
+ }, "clear");
945
+ var getSection = /* @__PURE__ */ __name((level) => {
946
+ if (nodes.length === 0) return null;
947
+ const sectionLevel = nodes[0].level;
948
+ let lastSection = null;
949
+ for (let i = nodes.length - 1; i >= 0; i--) {
950
+ if (nodes[i].level === sectionLevel && !lastSection) lastSection = nodes[i];
951
+ if (nodes[i].level < sectionLevel) throw new Error("Items without section detected, found section (\"" + nodes[i].label + "\")");
952
+ }
953
+ if (level === lastSection?.level) return null;
954
+ return lastSection;
955
+ }, "getSection");
956
+ var getSections = /* @__PURE__ */ __name(function() {
957
+ return sections;
958
+ }, "getSections");
959
+ var getData = /* @__PURE__ */ __name(function() {
960
+ const edges = [];
961
+ const _nodes = [];
962
+ const sections2 = getSections();
963
+ const conf = getConfig2();
964
+ for (const section of sections2) {
965
+ const node = {
966
+ id: section.id,
967
+ label: sanitizeText(section.label ?? "", conf),
968
+ labelType: "markdown",
969
+ isGroup: true,
970
+ ticket: section.ticket,
971
+ shape: "kanbanSection",
972
+ level: section.level,
973
+ look: conf.look
974
+ };
975
+ _nodes.push(node);
976
+ const children = nodes.filter((n) => n.parentId === section.id);
977
+ for (const item of children) {
978
+ const childNode = {
979
+ id: item.id,
980
+ parentId: section.id,
981
+ label: sanitizeText(item.label ?? "", conf),
982
+ labelType: "markdown",
983
+ isGroup: false,
984
+ ticket: item?.ticket,
985
+ priority: item?.priority,
986
+ assigned: item?.assigned,
987
+ icon: item?.icon,
988
+ shape: "kanbanItem",
989
+ level: item.level,
990
+ rx: 5,
991
+ ry: 5,
992
+ cssStyles: ["text-align: left"]
993
+ };
994
+ _nodes.push(childNode);
995
+ }
996
+ }
997
+ return {
998
+ nodes: _nodes,
999
+ edges,
1000
+ other: {},
1001
+ config: getConfig2()
1002
+ };
1003
+ }, "getData");
1004
+ var addNode = /* @__PURE__ */ __name((level, id, descr, type, shapeData) => {
1005
+ const conf = getConfig2();
1006
+ let padding = conf.mindmap?.padding ?? defaultConfig_default.mindmap.padding;
1007
+ switch (type) {
1008
+ case nodeType.ROUNDED_RECT:
1009
+ case nodeType.RECT:
1010
+ case nodeType.HEXAGON: padding *= 2;
1011
+ }
1012
+ const node = {
1013
+ id: sanitizeText(id, conf) || "kbn" + cnt++,
1014
+ level,
1015
+ label: sanitizeText(descr, conf),
1016
+ width: conf.mindmap?.maxNodeWidth ?? defaultConfig_default.mindmap.maxNodeWidth,
1017
+ padding,
1018
+ isGroup: false
1019
+ };
1020
+ if (shapeData !== void 0) {
1021
+ let yamlData;
1022
+ if (!shapeData.includes("\n")) yamlData = "{\n" + shapeData + "\n}";
1023
+ else yamlData = shapeData + "\n";
1024
+ const doc = load(yamlData, { schema: JSON_SCHEMA });
1025
+ if (doc.shape && (doc.shape !== doc.shape.toLowerCase() || doc.shape.includes("_"))) throw new Error(`No such shape: ${doc.shape}. Shape names should be lowercase.`);
1026
+ if (doc?.shape && doc.shape === "kanbanItem") node.shape = doc?.shape;
1027
+ if (doc?.label) node.label = doc?.label;
1028
+ if (doc?.icon) node.icon = doc?.icon.toString();
1029
+ if (doc?.assigned) node.assigned = doc?.assigned.toString();
1030
+ if (doc?.ticket) node.ticket = doc?.ticket.toString();
1031
+ if (doc?.priority) node.priority = doc?.priority;
1032
+ }
1033
+ const section = getSection(level);
1034
+ if (section) node.parentId = section.id || "kbn" + cnt++;
1035
+ else sections.push(node);
1036
+ nodes.push(node);
1037
+ }, "addNode");
1038
+ var nodeType = {
1039
+ DEFAULT: 0,
1040
+ NO_BORDER: 0,
1041
+ ROUNDED_RECT: 1,
1042
+ RECT: 2,
1043
+ CIRCLE: 3,
1044
+ CLOUD: 4,
1045
+ BANG: 5,
1046
+ HEXAGON: 6
1047
+ };
1048
+ var kanbanDb_default = {
1049
+ clear,
1050
+ addNode,
1051
+ getSections,
1052
+ getData,
1053
+ nodeType,
1054
+ getType: /* @__PURE__ */ __name((startStr, endStr) => {
1055
+ log.debug("In get type", startStr, endStr);
1056
+ switch (startStr) {
1057
+ case "[": return nodeType.RECT;
1058
+ case "(": return endStr === ")" ? nodeType.ROUNDED_RECT : nodeType.CLOUD;
1059
+ case "((": return nodeType.CIRCLE;
1060
+ case ")": return nodeType.CLOUD;
1061
+ case "))": return nodeType.BANG;
1062
+ case "{{": return nodeType.HEXAGON;
1063
+ default: return nodeType.DEFAULT;
1064
+ }
1065
+ }, "getType"),
1066
+ setElementForId: /* @__PURE__ */ __name((id, element) => {
1067
+ elements[id] = element;
1068
+ }, "setElementForId"),
1069
+ decorateNode: /* @__PURE__ */ __name((decoration) => {
1070
+ if (!decoration) return;
1071
+ const config = getConfig2();
1072
+ const node = nodes[nodes.length - 1];
1073
+ if (decoration.icon) node.icon = sanitizeText(decoration.icon, config);
1074
+ if (decoration.class) node.cssClasses = sanitizeText(decoration.class, config);
1075
+ }, "decorateNode"),
1076
+ type2Str: /* @__PURE__ */ __name((type) => {
1077
+ switch (type) {
1078
+ case nodeType.DEFAULT: return "no-border";
1079
+ case nodeType.RECT: return "rect";
1080
+ case nodeType.ROUNDED_RECT: return "rounded-rect";
1081
+ case nodeType.CIRCLE: return "circle";
1082
+ case nodeType.CLOUD: return "cloud";
1083
+ case nodeType.BANG: return "bang";
1084
+ case nodeType.HEXAGON: return "hexgon";
1085
+ default: return "no-border";
1086
+ }
1087
+ }, "type2Str"),
1088
+ getLogger: /* @__PURE__ */ __name(() => log, "getLogger"),
1089
+ getElementById: /* @__PURE__ */ __name((id) => elements[id], "getElementById")
1090
+ };
1091
+ var kanbanRenderer_default = { draw: /* @__PURE__ */ __name(async (text, id, _version, diagObj) => {
1092
+ log.debug("Rendering kanban diagram\n" + text);
1093
+ const data4Layout = diagObj.db.getData();
1094
+ const conf = getConfig2();
1095
+ conf.htmlLabels = false;
1096
+ const svg = selectSvgElement(id);
1097
+ for (const node of data4Layout.nodes) node.domId = `${id}-${node.id}`;
1098
+ const sectionsElem = svg.append("g");
1099
+ sectionsElem.attr("class", "sections");
1100
+ const nodesElem = svg.append("g");
1101
+ nodesElem.attr("class", "items");
1102
+ const sections2 = data4Layout.nodes.filter((node) => node.isGroup);
1103
+ let cnt2 = 0;
1104
+ const padding = 10;
1105
+ const sectionObjects = [];
1106
+ let maxLabelHeight = 25;
1107
+ for (const section of sections2) {
1108
+ const WIDTH = conf?.kanban?.sectionWidth || 200;
1109
+ cnt2 = cnt2 + 1;
1110
+ section.x = WIDTH * cnt2 + (cnt2 - 1) * padding / 2;
1111
+ section.width = WIDTH;
1112
+ section.y = 0;
1113
+ section.height = WIDTH * 3;
1114
+ section.rx = 5;
1115
+ section.ry = 5;
1116
+ section.cssClasses = section.cssClasses + " section-" + cnt2;
1117
+ const sectionObj = await insertCluster(sectionsElem, section);
1118
+ maxLabelHeight = Math.max(maxLabelHeight, sectionObj?.labelBBox?.height);
1119
+ sectionObjects.push(sectionObj);
1120
+ }
1121
+ let i = 0;
1122
+ for (const section of sections2) {
1123
+ const sectionObj = sectionObjects[i];
1124
+ i = i + 1;
1125
+ const WIDTH = conf?.kanban?.sectionWidth || 200;
1126
+ const top = -WIDTH * 3 / 2 + maxLabelHeight;
1127
+ let y = top;
1128
+ const sectionItems = data4Layout.nodes.filter((node) => node.parentId === section.id);
1129
+ for (const item of sectionItems) {
1130
+ if (item.isGroup) throw new Error("Groups within groups are not allowed in Kanban diagrams");
1131
+ item.x = section.x;
1132
+ item.width = WIDTH - 1.5 * padding;
1133
+ const bbox = (await insertNode(nodesElem, item, { config: conf })).node().getBBox();
1134
+ item.y = y + bbox.height / 2;
1135
+ await positionNode(item);
1136
+ y = item.y + bbox.height / 2 + padding / 2;
1137
+ }
1138
+ const rect = sectionObj.cluster.select("rect");
1139
+ const height = Math.max(y - top + 3 * padding, 50) + (maxLabelHeight - 25);
1140
+ rect.attr("height", height);
1141
+ }
1142
+ setupGraphViewbox(void 0, svg, conf.mindmap?.padding ?? defaultConfig_default.kanban.padding, conf.mindmap?.useMaxWidth ?? defaultConfig_default.kanban.useMaxWidth);
1143
+ }, "draw") };
1144
+ var genSections = /* @__PURE__ */ __name((options) => {
1145
+ let sections2 = "";
1146
+ for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {
1147
+ options["lineColor" + i] = options["lineColor" + i] || options["cScaleInv" + i];
1148
+ if (isDark(options["lineColor" + i])) options["lineColor" + i] = lighten(options["lineColor" + i], 20);
1149
+ else options["lineColor" + i] = darken(options["lineColor" + i], 20);
1150
+ }
1151
+ const adjuster = /* @__PURE__ */ __name((color, level) => options.darkMode ? darken(color, level) : lighten(color, level), "adjuster");
1152
+ for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {
1153
+ const sw = "" + (17 - 3 * i);
1154
+ sections2 += `
1155
+ .section-${i - 1} rect, .section-${i - 1} path, .section-${i - 1} circle, .section-${i - 1} polygon, .section-${i - 1} path {
1156
+ fill: ${adjuster(options["cScale" + i], 10)};
1157
+ stroke: ${adjuster(options["cScale" + i], 10)};
1158
+
1159
+ }
1160
+ .section-${i - 1} text {
1161
+ fill: ${options["cScaleLabel" + i]};
1162
+ }
1163
+ .node-icon-${i - 1} {
1164
+ font-size: 40px;
1165
+ color: ${options["cScaleLabel" + i]};
1166
+ }
1167
+ .section-edge-${i - 1}{
1168
+ stroke: ${options["cScale" + i]};
1169
+ }
1170
+ .edge-depth-${i - 1}{
1171
+ stroke-width: ${sw};
1172
+ }
1173
+ .section-${i - 1} line {
1174
+ stroke: ${options["cScaleInv" + i]} ;
1175
+ stroke-width: 3;
1176
+ }
1177
+
1178
+ .disabled, .disabled circle, .disabled text {
1179
+ fill: lightgray;
1180
+ }
1181
+ .disabled text {
1182
+ fill: #efefef;
1183
+ }
1184
+
1185
+ .node rect,
1186
+ .node circle,
1187
+ .node ellipse,
1188
+ .node polygon,
1189
+ .node path {
1190
+ fill: ${options.background};
1191
+ stroke: ${options.nodeBorder};
1192
+ stroke-width: 1px;
1193
+ }
1194
+
1195
+ .kanban-ticket-link {
1196
+ fill: ${options.background};
1197
+ stroke: ${options.nodeBorder};
1198
+ text-decoration: underline;
1199
+ }
1200
+ `;
1201
+ }
1202
+ return sections2;
1203
+ }, "genSections");
1204
+ var diagram = {
1205
+ db: kanbanDb_default,
1206
+ renderer: kanbanRenderer_default,
1207
+ parser: kanban_default,
1208
+ styles: /* @__PURE__ */ __name((options) => `
1209
+ .edge {
1210
+ stroke-width: 3;
1211
+ }
1212
+ ${genSections(options)}
1213
+ .section-root rect, .section-root path, .section-root circle, .section-root polygon {
1214
+ fill: ${options.git0};
1215
+ }
1216
+ .section-root text {
1217
+ fill: ${options.gitBranchLabel0};
1218
+ }
1219
+ .icon-container {
1220
+ height:100%;
1221
+ display: flex;
1222
+ justify-content: center;
1223
+ align-items: center;
1224
+ }
1225
+ .edge {
1226
+ fill: none;
1227
+ }
1228
+ .cluster-label, .label {
1229
+ color: ${options.textColor};
1230
+ fill: ${options.textColor};
1231
+ }
1232
+ .kanban-label {
1233
+ dy: 1em;
1234
+ alignment-baseline: middle;
1235
+ text-anchor: middle;
1236
+ dominant-baseline: middle;
1237
+ text-align: center;
1238
+ }
1239
+ ${getIconStyles()}
1240
+ `, "getStyles")
1241
+ };
1242
+
1243
+ //#endregion
1244
+ export { diagram };