@blueking/ai-blueking 2.0.0-dev.1 → 2.0.0-dev.3

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 (183) hide show
  1. package/dist/vue2/_baseFor-DAbrc8SN.js +309 -0
  2. package/dist/vue2/arc-BqlAOiZb.js +78 -0
  3. package/dist/vue2/architecture-U656AL7Q-Dtuq8BzO.js +7 -0
  4. package/dist/vue2/architectureDiagram-VXUJARFQ-BQS5Ixrn.js +4052 -0
  5. package/dist/vue2/array-TB8zN_HT.js +5 -0
  6. package/dist/vue2/blockDiagram-VD42YOAC-Bp6L6c6e.js +3013 -0
  7. package/dist/vue2/c4Diagram-YG6GDRKO-B15ZDn3Z.js +2956 -0
  8. package/dist/vue2/channel-edTl5mpN.js +3 -0
  9. package/dist/vue2/chunk-4BX2VUAB-eAYYj1bL.js +6 -0
  10. package/dist/vue2/chunk-55IACEB6-CTzuTcHv.js +6 -0
  11. package/dist/vue2/chunk-76Q3JFCE-BrJX66ha.js +19 -0
  12. package/dist/vue2/chunk-ABZYJK2D-gsx40GnJ.js +1971 -0
  13. package/dist/vue2/chunk-ATLVNIR6-CTTwtx-5.js +65 -0
  14. package/dist/vue2/chunk-B4BG7PRW-D8o7VxRH.js +3108 -0
  15. package/dist/vue2/chunk-CVBHYZKI-Cs8lCw3u.js +10 -0
  16. package/dist/vue2/chunk-DI55MBZ5-Dl59YBtR.js +1994 -0
  17. package/dist/vue2/chunk-DNh5sLlG.js +18 -0
  18. package/dist/vue2/chunk-EXTU4WIE-BPc8ye_N.js +7 -0
  19. package/dist/vue2/chunk-FMBD7UC4-PFlLPz_s.js +3 -0
  20. package/dist/vue2/chunk-FPAJGGOC-DPvjUKQ8.js +13428 -0
  21. package/dist/vue2/chunk-FWNWRKHM-BlUTFsPK.js +56 -0
  22. package/dist/vue2/chunk-HN2XXSSU-DueSY85P.js +74 -0
  23. package/dist/vue2/chunk-JA3XYJ7Z-CRet4f6a.js +1845 -0
  24. package/dist/vue2/chunk-JZLCHNYA-Df0-MseJ.js +4861 -0
  25. package/dist/vue2/chunk-LBM3YZW2-B0-w2HZs.js +19 -0
  26. package/dist/vue2/chunk-LHMN2FUI-BOH3yE2u.js +19 -0
  27. package/dist/vue2/chunk-MI3HLSF2-6-T1J0MS.js +1140 -0
  28. package/dist/vue2/chunk-N4CR4FBY-jNnt5D3v.js +39 -0
  29. package/dist/vue2/chunk-O7ZBX7Z2-BEP34BEE.js +26 -0
  30. package/dist/vue2/chunk-QN33PNHL-DsC-XeM9.js +23 -0
  31. package/dist/vue2/chunk-QXUST7PY-DxFRymyS.js +486 -0
  32. package/dist/vue2/chunk-QZHKN3VN-D9B5jQvg.js +11 -0
  33. package/dist/vue2/chunk-S3R3BYOJ-Bs_r55Kk.js +1222 -0
  34. package/dist/vue2/chunk-S6J4BHB3-XXfWHJvh.js +19 -0
  35. package/dist/vue2/chunk-T53DSG4Q-CNvqP6Iy.js +24 -0
  36. package/dist/vue2/chunk-TZMSLE5B-C5ccYWGN.js +55 -0
  37. package/dist/vue2/chunk-XAJISQIX-XsDvU4jW.js +135 -0
  38. package/dist/vue2/classDiagram-2ON5EDUG-Cgf9yVXj.js +33 -0
  39. package/dist/vue2/classDiagram-v2-WZHVMYZB-BtF1_0UK.js +33 -0
  40. package/dist/vue2/clone-Bbr3WSpg.js +7 -0
  41. package/dist/vue2/cose-bilkent-S5V4N54A-Cmf6WLkk.js +2250 -0
  42. package/dist/vue2/cytoscape.esm-nrcriBSO.js +18100 -0
  43. package/dist/vue2/dagre-6UL2VRFP-CTl_U96l.js +298 -0
  44. package/dist/vue2/dagre-DUjlMe_B.js +1496 -0
  45. package/dist/vue2/defaultLocale-BLATqOV5.js +177 -0
  46. package/dist/vue2/diagram-PSM6KHXK-Bl7brR-1.js +497 -0
  47. package/dist/vue2/diagram-QEK2KX5R-CAeywSxy.js +226 -0
  48. package/dist/vue2/diagram-S2PKOQOG-6I6J4WRC.js +144 -0
  49. package/dist/vue2/dist-xWJvauxf.js +49 -0
  50. package/dist/vue2/erDiagram-Q2GNP2WA-C8EbfuTj.js +1603 -0
  51. package/dist/vue2/flatten-CfPhNHUL.js +34 -0
  52. package/dist/vue2/flowDiagram-NV44I4VS-lFr4G2WN.js +4132 -0
  53. package/dist/vue2/ganttDiagram-JELNMOA3-Bvtip7yn.js +3010 -0
  54. package/dist/vue2/gitGraph-F6HP7TQM-OQvD95bN.js +7 -0
  55. package/dist/vue2/gitGraphDiagram-NY62KEGX-Cjvy4fHM.js +634 -0
  56. package/dist/vue2/graphlib-KDKEjVHX.js +344 -0
  57. package/dist/vue2/index.es.min.js +26703 -786
  58. package/dist/vue2/index.umd.min.js +2796 -9
  59. package/dist/vue2/info-NVLQJR56-DBsOnIKy.js +7 -0
  60. package/dist/vue2/infoDiagram-WHAUD3N6-D_isj7oC.js +31 -0
  61. package/dist/vue2/init-hAkIK9Bd.js +13 -0
  62. package/dist/vue2/isEmpty-z27q3o-D.js +32 -0
  63. package/dist/vue2/journeyDiagram-XKPGCS4Q-DlXHMS3v.js +885 -0
  64. package/dist/vue2/kanban-definition-3W4ZIXB7-CV6572lv.js +971 -0
  65. package/dist/vue2/katex-CEAw-xiA.js +22097 -0
  66. package/dist/vue2/katex-D8o5-F7C.js +2 -0
  67. package/dist/vue2/line-wvheYP7S.js +30 -0
  68. package/dist/vue2/linear-STTevhnH.js +250 -0
  69. package/dist/vue2/math-DF_v6dOl.js +8 -0
  70. package/dist/vue2/mermaid-parser.core-VAa8Vi1g.js +48 -0
  71. package/dist/vue2/mermaid.core-vqI6KB9k.js +895 -0
  72. package/dist/vue2/mindmap-definition-VGOIOE7T-gtjvHqQ-.js +960 -0
  73. package/dist/vue2/ordinal-DOM6Fa9P.js +61 -0
  74. package/dist/vue2/packet-BFZMPI3H-CG049KmZ.js +7 -0
  75. package/dist/vue2/path-CW_-_Ti7.js +79 -0
  76. package/dist/vue2/pie-7BOR55EZ-BHq0KcLP.js +7 -0
  77. package/dist/vue2/pieDiagram-ADFJNKIX-CTUoM-kp.js +172 -0
  78. package/dist/vue2/purify.es-Cm_tUMzZ.js +547 -0
  79. package/dist/vue2/quadrantDiagram-AYHSOK5B-Njl7BMW7.js +1971 -0
  80. package/dist/vue2/radar-NHE76QYJ-CUoVtrAx.js +7 -0
  81. package/dist/vue2/reduce-BFKSG9Rs.js +451 -0
  82. package/dist/vue2/requirementDiagram-UZGBJVZJ-DKjE3cDK.js +2194 -0
  83. package/dist/vue2/sankeyDiagram-TZEHDZUN-DW2ap3zY.js +885 -0
  84. package/dist/vue2/sequenceDiagram-WL72ISMW-BjMq4OjH.js +3561 -0
  85. package/dist/vue2/src-VlKYSsxJ.js +1975 -0
  86. package/dist/vue2/stateDiagram-FKZM4ZOC-CnvtGM9U.js +224 -0
  87. package/dist/vue2/stateDiagram-v2-4FDKWEC3-C15xi-04.js +32 -0
  88. package/dist/vue2/style.css +1 -1
  89. package/dist/vue2/timeline-definition-IT6M3QCI-C7q6jdLA.js +831 -0
  90. package/dist/vue2/treemap-KMMF4GRG--FdijCcy.js +7 -0
  91. package/dist/vue2/xychartDiagram-PRI3JC2R-UcfQmj72.js +2022 -0
  92. package/dist/vue3/_baseFor-DAbrc8SN.js +309 -0
  93. package/dist/vue3/arc-BqlAOiZb.js +78 -0
  94. package/dist/vue3/architecture-U656AL7Q-Dtuq8BzO.js +7 -0
  95. package/dist/vue3/architectureDiagram-VXUJARFQ-BQS5Ixrn.js +4052 -0
  96. package/dist/vue3/array-TB8zN_HT.js +5 -0
  97. package/dist/vue3/blockDiagram-VD42YOAC-Bp6L6c6e.js +3013 -0
  98. package/dist/vue3/c4Diagram-YG6GDRKO-B15ZDn3Z.js +2956 -0
  99. package/dist/vue3/channel-edTl5mpN.js +3 -0
  100. package/dist/vue3/chunk-4BX2VUAB-eAYYj1bL.js +6 -0
  101. package/dist/vue3/chunk-55IACEB6-CTzuTcHv.js +6 -0
  102. package/dist/vue3/chunk-76Q3JFCE-BrJX66ha.js +19 -0
  103. package/dist/vue3/chunk-ABZYJK2D-gsx40GnJ.js +1971 -0
  104. package/dist/vue3/chunk-ATLVNIR6-CTTwtx-5.js +65 -0
  105. package/dist/vue3/chunk-B4BG7PRW-D8o7VxRH.js +3108 -0
  106. package/dist/vue3/chunk-CVBHYZKI-Cs8lCw3u.js +10 -0
  107. package/dist/vue3/chunk-DI55MBZ5-Dl59YBtR.js +1994 -0
  108. package/dist/vue3/chunk-DNh5sLlG.js +18 -0
  109. package/dist/vue3/chunk-EXTU4WIE-BPc8ye_N.js +7 -0
  110. package/dist/vue3/chunk-FMBD7UC4-PFlLPz_s.js +3 -0
  111. package/dist/vue3/chunk-FPAJGGOC-DPvjUKQ8.js +13428 -0
  112. package/dist/vue3/chunk-FWNWRKHM-BlUTFsPK.js +56 -0
  113. package/dist/vue3/chunk-HN2XXSSU-DueSY85P.js +74 -0
  114. package/dist/vue3/chunk-JA3XYJ7Z-CRet4f6a.js +1845 -0
  115. package/dist/vue3/chunk-JZLCHNYA-Df0-MseJ.js +4861 -0
  116. package/dist/vue3/chunk-LBM3YZW2-B0-w2HZs.js +19 -0
  117. package/dist/vue3/chunk-LHMN2FUI-BOH3yE2u.js +19 -0
  118. package/dist/vue3/chunk-MI3HLSF2-6-T1J0MS.js +1140 -0
  119. package/dist/vue3/chunk-N4CR4FBY-jNnt5D3v.js +39 -0
  120. package/dist/vue3/chunk-O7ZBX7Z2-BEP34BEE.js +26 -0
  121. package/dist/vue3/chunk-QN33PNHL-DsC-XeM9.js +23 -0
  122. package/dist/vue3/chunk-QXUST7PY-DxFRymyS.js +486 -0
  123. package/dist/vue3/chunk-QZHKN3VN-D9B5jQvg.js +11 -0
  124. package/dist/vue3/chunk-S3R3BYOJ-Bs_r55Kk.js +1222 -0
  125. package/dist/vue3/chunk-S6J4BHB3-XXfWHJvh.js +19 -0
  126. package/dist/vue3/chunk-T53DSG4Q-CNvqP6Iy.js +24 -0
  127. package/dist/vue3/chunk-TZMSLE5B-C5ccYWGN.js +55 -0
  128. package/dist/vue3/chunk-XAJISQIX-XsDvU4jW.js +135 -0
  129. package/dist/vue3/classDiagram-2ON5EDUG-Cgf9yVXj.js +33 -0
  130. package/dist/vue3/classDiagram-v2-WZHVMYZB-BtF1_0UK.js +33 -0
  131. package/dist/vue3/clone-Bbr3WSpg.js +7 -0
  132. package/dist/vue3/cose-bilkent-S5V4N54A-Cmf6WLkk.js +2250 -0
  133. package/dist/vue3/cytoscape.esm-nrcriBSO.js +18100 -0
  134. package/dist/vue3/dagre-6UL2VRFP-CTl_U96l.js +298 -0
  135. package/dist/vue3/dagre-DUjlMe_B.js +1496 -0
  136. package/dist/vue3/defaultLocale-BLATqOV5.js +177 -0
  137. package/dist/vue3/diagram-PSM6KHXK-Bl7brR-1.js +497 -0
  138. package/dist/vue3/diagram-QEK2KX5R-CAeywSxy.js +226 -0
  139. package/dist/vue3/diagram-S2PKOQOG-6I6J4WRC.js +144 -0
  140. package/dist/vue3/dist-xWJvauxf.js +49 -0
  141. package/dist/vue3/erDiagram-Q2GNP2WA-C8EbfuTj.js +1603 -0
  142. package/dist/vue3/flatten-CfPhNHUL.js +34 -0
  143. package/dist/vue3/flowDiagram-NV44I4VS-lFr4G2WN.js +4132 -0
  144. package/dist/vue3/ganttDiagram-JELNMOA3-Bvtip7yn.js +3010 -0
  145. package/dist/vue3/gitGraph-F6HP7TQM-OQvD95bN.js +7 -0
  146. package/dist/vue3/gitGraphDiagram-NY62KEGX-Cjvy4fHM.js +634 -0
  147. package/dist/vue3/graphlib-KDKEjVHX.js +344 -0
  148. package/dist/vue3/index.es.min.js +26730 -813
  149. package/dist/vue3/index.umd.min.js +2796 -9
  150. package/dist/vue3/info-NVLQJR56-DBsOnIKy.js +7 -0
  151. package/dist/vue3/infoDiagram-WHAUD3N6-D_isj7oC.js +31 -0
  152. package/dist/vue3/init-hAkIK9Bd.js +13 -0
  153. package/dist/vue3/isEmpty-z27q3o-D.js +32 -0
  154. package/dist/vue3/journeyDiagram-XKPGCS4Q-DlXHMS3v.js +885 -0
  155. package/dist/vue3/kanban-definition-3W4ZIXB7-CV6572lv.js +971 -0
  156. package/dist/vue3/katex-CEAw-xiA.js +22097 -0
  157. package/dist/vue3/katex-D8o5-F7C.js +2 -0
  158. package/dist/vue3/line-wvheYP7S.js +30 -0
  159. package/dist/vue3/linear-STTevhnH.js +250 -0
  160. package/dist/vue3/math-DF_v6dOl.js +8 -0
  161. package/dist/vue3/mermaid-parser.core-VAa8Vi1g.js +48 -0
  162. package/dist/vue3/mermaid.core-vqI6KB9k.js +895 -0
  163. package/dist/vue3/mindmap-definition-VGOIOE7T-gtjvHqQ-.js +960 -0
  164. package/dist/vue3/ordinal-DOM6Fa9P.js +61 -0
  165. package/dist/vue3/packet-BFZMPI3H-CG049KmZ.js +7 -0
  166. package/dist/vue3/path-CW_-_Ti7.js +79 -0
  167. package/dist/vue3/pie-7BOR55EZ-BHq0KcLP.js +7 -0
  168. package/dist/vue3/pieDiagram-ADFJNKIX-CTUoM-kp.js +172 -0
  169. package/dist/vue3/purify.es-Cm_tUMzZ.js +547 -0
  170. package/dist/vue3/quadrantDiagram-AYHSOK5B-Njl7BMW7.js +1971 -0
  171. package/dist/vue3/radar-NHE76QYJ-CUoVtrAx.js +7 -0
  172. package/dist/vue3/reduce-BFKSG9Rs.js +451 -0
  173. package/dist/vue3/requirementDiagram-UZGBJVZJ-DKjE3cDK.js +2194 -0
  174. package/dist/vue3/sankeyDiagram-TZEHDZUN-DW2ap3zY.js +885 -0
  175. package/dist/vue3/sequenceDiagram-WL72ISMW-BjMq4OjH.js +3561 -0
  176. package/dist/vue3/src-VlKYSsxJ.js +1975 -0
  177. package/dist/vue3/stateDiagram-FKZM4ZOC-CnvtGM9U.js +224 -0
  178. package/dist/vue3/stateDiagram-v2-4FDKWEC3-C15xi-04.js +32 -0
  179. package/dist/vue3/style.css +1 -1
  180. package/dist/vue3/timeline-definition-IT6M3QCI-C7q6jdLA.js +831 -0
  181. package/dist/vue3/treemap-KMMF4GRG--FdijCcy.js +7 -0
  182. package/dist/vue3/xychartDiagram-PRI3JC2R-UcfQmj72.js +2022 -0
  183. package/package.json +3 -3
@@ -0,0 +1,885 @@
1
+ import "./purify.es-Cm_tUMzZ.js";
2
+ import { h as __name, p as select_default } from "./src-VlKYSsxJ.js";
3
+ import { B as setAccTitle, C as getDiagramTitle, U as setDiagramTitle, _ as getAccDescription, a as clear, b as getConfig2, c as configureSvgSize, v as getAccTitle, z as setAccDescription } from "./chunk-ABZYJK2D-gsx40GnJ.js";
4
+ import "./path-CW_-_Ti7.js";
5
+ import "./math-DF_v6dOl.js";
6
+ import { t as arc_default } from "./arc-BqlAOiZb.js";
7
+ import "./dist-xWJvauxf.js";
8
+ import { t as getIconStyles } from "./chunk-FMBD7UC4-PFlLPz_s.js";
9
+ import { a as drawText, i as drawRect, o as getNoteRect, t as drawBackgroundRect } from "./chunk-TZMSLE5B-C5ccYWGN.js";
10
+ var parser = (function() {
11
+ var S = /* @__PURE__ */ __name(function(e, S, C, w) {
12
+ for (C ||= {}, w = e.length; w--; C[e[w]] = S);
13
+ return C;
14
+ }, "o"), C = [
15
+ 6,
16
+ 8,
17
+ 10,
18
+ 11,
19
+ 12,
20
+ 14,
21
+ 16,
22
+ 17,
23
+ 18
24
+ ], w = [1, 9], T = [1, 10], E = [1, 11], D = [1, 12], O = [1, 13], k = [1, 14], A = {
25
+ trace: /* @__PURE__ */ __name(function() {}, "trace"),
26
+ yy: {},
27
+ symbols_: {
28
+ error: 2,
29
+ start: 3,
30
+ journey: 4,
31
+ document: 5,
32
+ EOF: 6,
33
+ line: 7,
34
+ SPACE: 8,
35
+ statement: 9,
36
+ NEWLINE: 10,
37
+ title: 11,
38
+ acc_title: 12,
39
+ acc_title_value: 13,
40
+ acc_descr: 14,
41
+ acc_descr_value: 15,
42
+ acc_descr_multiline_value: 16,
43
+ section: 17,
44
+ taskName: 18,
45
+ taskData: 19,
46
+ $accept: 0,
47
+ $end: 1
48
+ },
49
+ terminals_: {
50
+ 2: "error",
51
+ 4: "journey",
52
+ 6: "EOF",
53
+ 8: "SPACE",
54
+ 10: "NEWLINE",
55
+ 11: "title",
56
+ 12: "acc_title",
57
+ 13: "acc_title_value",
58
+ 14: "acc_descr",
59
+ 15: "acc_descr_value",
60
+ 16: "acc_descr_multiline_value",
61
+ 17: "section",
62
+ 18: "taskName",
63
+ 19: "taskData"
64
+ },
65
+ productions_: [
66
+ 0,
67
+ [3, 3],
68
+ [5, 0],
69
+ [5, 2],
70
+ [7, 2],
71
+ [7, 1],
72
+ [7, 1],
73
+ [7, 1],
74
+ [9, 1],
75
+ [9, 2],
76
+ [9, 2],
77
+ [9, 1],
78
+ [9, 1],
79
+ [9, 2]
80
+ ],
81
+ performAction: /* @__PURE__ */ __name(function(e, S, C, w, T, E, D) {
82
+ var O = E.length - 1;
83
+ switch (T) {
84
+ case 1: return E[O - 1];
85
+ case 2:
86
+ this.$ = [];
87
+ break;
88
+ case 3:
89
+ E[O - 1].push(E[O]), this.$ = E[O - 1];
90
+ break;
91
+ case 4:
92
+ case 5:
93
+ this.$ = E[O];
94
+ break;
95
+ case 6:
96
+ case 7:
97
+ this.$ = [];
98
+ break;
99
+ case 8:
100
+ w.setDiagramTitle(E[O].substr(6)), this.$ = E[O].substr(6);
101
+ break;
102
+ case 9:
103
+ this.$ = E[O].trim(), w.setAccTitle(this.$);
104
+ break;
105
+ case 10:
106
+ case 11:
107
+ this.$ = E[O].trim(), w.setAccDescription(this.$);
108
+ break;
109
+ case 12:
110
+ w.addSection(E[O].substr(8)), this.$ = E[O].substr(8);
111
+ break;
112
+ case 13:
113
+ w.addTask(E[O - 1], E[O]), this.$ = "task";
114
+ break;
115
+ }
116
+ }, "anonymous"),
117
+ table: [
118
+ {
119
+ 3: 1,
120
+ 4: [1, 2]
121
+ },
122
+ { 1: [3] },
123
+ S(C, [2, 2], { 5: 3 }),
124
+ {
125
+ 6: [1, 4],
126
+ 7: 5,
127
+ 8: [1, 6],
128
+ 9: 7,
129
+ 10: [1, 8],
130
+ 11: w,
131
+ 12: T,
132
+ 14: E,
133
+ 16: D,
134
+ 17: O,
135
+ 18: k
136
+ },
137
+ S(C, [2, 7], { 1: [2, 1] }),
138
+ S(C, [2, 3]),
139
+ {
140
+ 9: 15,
141
+ 11: w,
142
+ 12: T,
143
+ 14: E,
144
+ 16: D,
145
+ 17: O,
146
+ 18: k
147
+ },
148
+ S(C, [2, 5]),
149
+ S(C, [2, 6]),
150
+ S(C, [2, 8]),
151
+ { 13: [1, 16] },
152
+ { 15: [1, 17] },
153
+ S(C, [2, 11]),
154
+ S(C, [2, 12]),
155
+ { 19: [1, 18] },
156
+ S(C, [2, 4]),
157
+ S(C, [2, 9]),
158
+ S(C, [2, 10]),
159
+ S(C, [2, 13])
160
+ ],
161
+ defaultActions: {},
162
+ parseError: /* @__PURE__ */ __name(function(e, S) {
163
+ if (S.recoverable) this.trace(e);
164
+ else {
165
+ var C = Error(e);
166
+ throw C.hash = S, C;
167
+ }
168
+ }, "parseError"),
169
+ parse: /* @__PURE__ */ __name(function(S) {
170
+ var C = this, w = [0], T = [], E = [null], D = [], O = this.table, k = "", A = 0, j = 0, M = 0, N = 2, P = 1, F = D.slice.call(arguments, 1), I = Object.create(this.lexer), L = { yy: {} };
171
+ for (var R in this.yy) Object.prototype.hasOwnProperty.call(this.yy, R) && (L.yy[R] = this.yy[R]);
172
+ I.setInput(S, L.yy), L.yy.lexer = I, L.yy.parser = this, I.yylloc === void 0 && (I.yylloc = {});
173
+ var z = I.yylloc;
174
+ D.push(z);
175
+ var B = I.options && I.options.ranges;
176
+ typeof L.yy.parseError == "function" ? this.parseError = L.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
177
+ function V(e) {
178
+ w.length -= 2 * e, E.length -= e, D.length -= e;
179
+ }
180
+ __name(V, "popStack");
181
+ function H() {
182
+ var e = T.pop() || I.lex() || P;
183
+ return typeof e != "number" && (e instanceof Array && (T = e, e = T.pop()), e = C.symbols_[e] || e), e;
184
+ }
185
+ __name(H, "lex");
186
+ for (var U, W, G, K, q, J = {}, Y, X, Z, Q;;) {
187
+ if (G = w[w.length - 1], this.defaultActions[G] ? K = this.defaultActions[G] : (U ??= H(), K = O[G] && O[G][U]), K === void 0 || !K.length || !K[0]) {
188
+ var $ = "";
189
+ for (Y in Q = [], O[G]) this.terminals_[Y] && Y > N && Q.push("'" + this.terminals_[Y] + "'");
190
+ $ = I.showPosition ? "Parse error on line " + (A + 1) + ":\n" + I.showPosition() + "\nExpecting " + Q.join(", ") + ", got '" + (this.terminals_[U] || U) + "'" : "Parse error on line " + (A + 1) + ": Unexpected " + (U == P ? "end of input" : "'" + (this.terminals_[U] || U) + "'"), this.parseError($, {
191
+ text: I.match,
192
+ token: this.terminals_[U] || U,
193
+ line: I.yylineno,
194
+ loc: z,
195
+ expected: Q
196
+ });
197
+ }
198
+ if (K[0] instanceof Array && K.length > 1) throw Error("Parse Error: multiple actions possible at state: " + G + ", token: " + U);
199
+ switch (K[0]) {
200
+ case 1:
201
+ w.push(U), E.push(I.yytext), D.push(I.yylloc), w.push(K[1]), U = null, W ? (U = W, W = null) : (j = I.yyleng, k = I.yytext, A = I.yylineno, z = I.yylloc, M > 0 && M--);
202
+ break;
203
+ case 2:
204
+ if (X = this.productions_[K[1]][1], J.$ = E[E.length - X], J._$ = {
205
+ first_line: D[D.length - (X || 1)].first_line,
206
+ last_line: D[D.length - 1].last_line,
207
+ first_column: D[D.length - (X || 1)].first_column,
208
+ last_column: D[D.length - 1].last_column
209
+ }, B && (J._$.range = [D[D.length - (X || 1)].range[0], D[D.length - 1].range[1]]), q = this.performAction.apply(J, [
210
+ k,
211
+ j,
212
+ A,
213
+ L.yy,
214
+ K[1],
215
+ E,
216
+ D
217
+ ].concat(F)), q !== void 0) return q;
218
+ X && (w = w.slice(0, -1 * X * 2), E = E.slice(0, -1 * X), D = D.slice(0, -1 * X)), w.push(this.productions_[K[1]][0]), E.push(J.$), D.push(J._$), Z = O[w[w.length - 2]][w[w.length - 1]], w.push(Z);
219
+ break;
220
+ case 3: return !0;
221
+ }
222
+ }
223
+ return !0;
224
+ }, "parse")
225
+ };
226
+ A.lexer = /* @__PURE__ */ (function() {
227
+ return {
228
+ EOF: 1,
229
+ parseError: /* @__PURE__ */ __name(function(e, S) {
230
+ if (this.yy.parser) this.yy.parser.parseError(e, S);
231
+ else throw Error(e);
232
+ }, "parseError"),
233
+ setInput: /* @__PURE__ */ __name(function(e, S) {
234
+ return this.yy = S || this.yy || {}, this._input = e, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
235
+ first_line: 1,
236
+ first_column: 0,
237
+ last_line: 1,
238
+ last_column: 0
239
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
240
+ }, "setInput"),
241
+ input: /* @__PURE__ */ __name(function() {
242
+ var e = this._input[0];
243
+ return this.yytext += e, this.yyleng++, this.offset++, this.match += e, this.matched += e, e.match(/(?:\r\n?|\n).*/g) ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), e;
244
+ }, "input"),
245
+ unput: /* @__PURE__ */ __name(function(e) {
246
+ var S = e.length, C = e.split(/(?:\r\n?|\n)/g);
247
+ this._input = e + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - S), this.offset -= S;
248
+ var w = this.match.split(/(?:\r\n?|\n)/g);
249
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), C.length - 1 && (this.yylineno -= C.length - 1);
250
+ var T = this.yylloc.range;
251
+ return this.yylloc = {
252
+ first_line: this.yylloc.first_line,
253
+ last_line: this.yylineno + 1,
254
+ first_column: this.yylloc.first_column,
255
+ last_column: C ? (C.length === w.length ? this.yylloc.first_column : 0) + w[w.length - C.length].length - C[0].length : this.yylloc.first_column - S
256
+ }, this.options.ranges && (this.yylloc.range = [T[0], T[0] + this.yyleng - S]), this.yyleng = this.yytext.length, this;
257
+ }, "unput"),
258
+ more: /* @__PURE__ */ __name(function() {
259
+ return this._more = !0, this;
260
+ }, "more"),
261
+ reject: /* @__PURE__ */ __name(function() {
262
+ if (this.options.backtrack_lexer) this._backtrack = !0;
263
+ 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(), {
264
+ text: "",
265
+ token: null,
266
+ line: this.yylineno
267
+ });
268
+ return this;
269
+ }, "reject"),
270
+ less: /* @__PURE__ */ __name(function(e) {
271
+ this.unput(this.match.slice(e));
272
+ }, "less"),
273
+ pastInput: /* @__PURE__ */ __name(function() {
274
+ var e = this.matched.substr(0, this.matched.length - this.match.length);
275
+ return (e.length > 20 ? "..." : "") + e.substr(-20).replace(/\n/g, "");
276
+ }, "pastInput"),
277
+ upcomingInput: /* @__PURE__ */ __name(function() {
278
+ var e = this.match;
279
+ return e.length < 20 && (e += this._input.substr(0, 20 - e.length)), (e.substr(0, 20) + (e.length > 20 ? "..." : "")).replace(/\n/g, "");
280
+ }, "upcomingInput"),
281
+ showPosition: /* @__PURE__ */ __name(function() {
282
+ var e = this.pastInput(), S = Array(e.length + 1).join("-");
283
+ return e + this.upcomingInput() + "\n" + S + "^";
284
+ }, "showPosition"),
285
+ test_match: /* @__PURE__ */ __name(function(e, S) {
286
+ var C, w, T;
287
+ if (this.options.backtrack_lexer && (T = {
288
+ yylineno: this.yylineno,
289
+ yylloc: {
290
+ first_line: this.yylloc.first_line,
291
+ last_line: this.last_line,
292
+ first_column: this.yylloc.first_column,
293
+ last_column: this.yylloc.last_column
294
+ },
295
+ yytext: this.yytext,
296
+ match: this.match,
297
+ matches: this.matches,
298
+ matched: this.matched,
299
+ yyleng: this.yyleng,
300
+ offset: this.offset,
301
+ _more: this._more,
302
+ _input: this._input,
303
+ yy: this.yy,
304
+ conditionStack: this.conditionStack.slice(0),
305
+ done: this.done
306
+ }, this.options.ranges && (T.yylloc.range = this.yylloc.range.slice(0))), w = e[0].match(/(?:\r\n?|\n).*/g), w && (this.yylineno += w.length), this.yylloc = {
307
+ first_line: this.yylloc.last_line,
308
+ last_line: this.yylineno + 1,
309
+ first_column: this.yylloc.last_column,
310
+ last_column: w ? w[w.length - 1].length - w[w.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + e[0].length
311
+ }, this.yytext += e[0], this.match += e[0], this.matches = e, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(e[0].length), this.matched += e[0], C = this.performAction.call(this, this.yy, this, S, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), C) return C;
312
+ if (this._backtrack) {
313
+ for (var E in T) this[E] = T[E];
314
+ return !1;
315
+ }
316
+ return !1;
317
+ }, "test_match"),
318
+ next: /* @__PURE__ */ __name(function() {
319
+ if (this.done) return this.EOF;
320
+ this._input || (this.done = !0);
321
+ var e, S, C, w;
322
+ this._more || (this.yytext = "", this.match = "");
323
+ for (var T = this._currentRules(), E = 0; E < T.length; E++) if (C = this._input.match(this.rules[T[E]]), C && (!S || C[0].length > S[0].length)) {
324
+ if (S = C, w = E, this.options.backtrack_lexer) {
325
+ if (e = this.test_match(C, T[E]), e !== !1) return e;
326
+ if (this._backtrack) {
327
+ S = !1;
328
+ continue;
329
+ } else return !1;
330
+ } else if (!this.options.flex) break;
331
+ }
332
+ return S ? (e = this.test_match(S, T[w]), e === !1 ? !1 : e) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
333
+ text: "",
334
+ token: null,
335
+ line: this.yylineno
336
+ });
337
+ }, "next"),
338
+ lex: /* @__PURE__ */ __name(function() {
339
+ return this.next() || this.lex();
340
+ }, "lex"),
341
+ begin: /* @__PURE__ */ __name(function(e) {
342
+ this.conditionStack.push(e);
343
+ }, "begin"),
344
+ popState: /* @__PURE__ */ __name(function() {
345
+ return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
346
+ }, "popState"),
347
+ _currentRules: /* @__PURE__ */ __name(function() {
348
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
349
+ }, "_currentRules"),
350
+ topState: /* @__PURE__ */ __name(function(e) {
351
+ return e = this.conditionStack.length - 1 - Math.abs(e || 0), e >= 0 ? this.conditionStack[e] : "INITIAL";
352
+ }, "topState"),
353
+ pushState: /* @__PURE__ */ __name(function(e) {
354
+ this.begin(e);
355
+ }, "pushState"),
356
+ stateStackSize: /* @__PURE__ */ __name(function() {
357
+ return this.conditionStack.length;
358
+ }, "stateStackSize"),
359
+ options: { "case-insensitive": !0 },
360
+ performAction: /* @__PURE__ */ __name(function(e, S, C, w) {
361
+ switch (C) {
362
+ case 0: break;
363
+ case 1: break;
364
+ case 2: return 10;
365
+ case 3: break;
366
+ case 4: break;
367
+ case 5: return 4;
368
+ case 6: return 11;
369
+ case 7: return this.begin("acc_title"), 12;
370
+ case 8: return this.popState(), "acc_title_value";
371
+ case 9: return this.begin("acc_descr"), 14;
372
+ case 10: return this.popState(), "acc_descr_value";
373
+ case 11:
374
+ this.begin("acc_descr_multiline");
375
+ break;
376
+ case 12:
377
+ this.popState();
378
+ break;
379
+ case 13: return "acc_descr_multiline_value";
380
+ case 14: return 17;
381
+ case 15: return 18;
382
+ case 16: return 19;
383
+ case 17: return ":";
384
+ case 18: return 6;
385
+ case 19: return "INVALID";
386
+ }
387
+ }, "anonymous"),
388
+ rules: [
389
+ /^(?:%(?!\{)[^\n]*)/i,
390
+ /^(?:[^\}]%%[^\n]*)/i,
391
+ /^(?:[\n]+)/i,
392
+ /^(?:\s+)/i,
393
+ /^(?:#[^\n]*)/i,
394
+ /^(?:journey\b)/i,
395
+ /^(?:title\s[^#\n;]+)/i,
396
+ /^(?:accTitle\s*:\s*)/i,
397
+ /^(?:(?!\n||)*[^\n]*)/i,
398
+ /^(?:accDescr\s*:\s*)/i,
399
+ /^(?:(?!\n||)*[^\n]*)/i,
400
+ /^(?:accDescr\s*\{\s*)/i,
401
+ /^(?:[\}])/i,
402
+ /^(?:[^\}]*)/i,
403
+ /^(?:section\s[^#:\n;]+)/i,
404
+ /^(?:[^#:\n;]+)/i,
405
+ /^(?::[^#\n;]+)/i,
406
+ /^(?::)/i,
407
+ /^(?:$)/i,
408
+ /^(?:.)/i
409
+ ],
410
+ conditions: {
411
+ acc_descr_multiline: {
412
+ rules: [12, 13],
413
+ inclusive: !1
414
+ },
415
+ acc_descr: {
416
+ rules: [10],
417
+ inclusive: !1
418
+ },
419
+ acc_title: {
420
+ rules: [8],
421
+ inclusive: !1
422
+ },
423
+ INITIAL: {
424
+ rules: [
425
+ 0,
426
+ 1,
427
+ 2,
428
+ 3,
429
+ 4,
430
+ 5,
431
+ 6,
432
+ 7,
433
+ 9,
434
+ 11,
435
+ 14,
436
+ 15,
437
+ 16,
438
+ 17,
439
+ 18,
440
+ 19
441
+ ],
442
+ inclusive: !0
443
+ }
444
+ }
445
+ };
446
+ })();
447
+ function j() {
448
+ this.yy = {};
449
+ }
450
+ return __name(j, "Parser"), j.prototype = A, A.Parser = j, new j();
451
+ })();
452
+ parser.parser = parser;
453
+ var journey_default = parser, currentSection = "", sections = [], tasks = [], rawTasks = [], clear2 = /* @__PURE__ */ __name(function() {
454
+ sections.length = 0, tasks.length = 0, currentSection = "", rawTasks.length = 0, clear();
455
+ }, "clear"), addSection = /* @__PURE__ */ __name(function(e) {
456
+ currentSection = e, sections.push(e);
457
+ }, "addSection"), getSections = /* @__PURE__ */ __name(function() {
458
+ return sections;
459
+ }, "getSections"), getTasks = /* @__PURE__ */ __name(function() {
460
+ let e = compileTasks(), S = 0;
461
+ for (; !e && S < 100;) e = compileTasks(), S++;
462
+ return tasks.push(...rawTasks), tasks;
463
+ }, "getTasks"), updateActors = /* @__PURE__ */ __name(function() {
464
+ let e = [];
465
+ return tasks.forEach((S) => {
466
+ S.people && e.push(...S.people);
467
+ }), [...new Set(e)].sort();
468
+ }, "updateActors"), addTask = /* @__PURE__ */ __name(function(e, S) {
469
+ let C = S.substr(1).split(":"), w = 0, T = [];
470
+ C.length === 1 ? (w = Number(C[0]), T = []) : (w = Number(C[0]), T = C[1].split(","));
471
+ let E = T.map((e) => e.trim()), D = {
472
+ section: currentSection,
473
+ type: currentSection,
474
+ people: E,
475
+ task: e,
476
+ score: w
477
+ };
478
+ rawTasks.push(D);
479
+ }, "addTask"), addTaskOrg = /* @__PURE__ */ __name(function(e) {
480
+ let S = {
481
+ section: currentSection,
482
+ type: currentSection,
483
+ description: e,
484
+ task: e,
485
+ classes: []
486
+ };
487
+ tasks.push(S);
488
+ }, "addTaskOrg"), compileTasks = /* @__PURE__ */ __name(function() {
489
+ let S = /* @__PURE__ */ __name(function(e) {
490
+ return rawTasks[e].processed;
491
+ }, "compileTask"), C = !0;
492
+ for (let [e, w] of rawTasks.entries()) S(e), C &&= w.processed;
493
+ return C;
494
+ }, "compileTasks"), journeyDb_default = {
495
+ getConfig: /* @__PURE__ */ __name(() => getConfig2().journey, "getConfig"),
496
+ clear: clear2,
497
+ setDiagramTitle,
498
+ getDiagramTitle,
499
+ setAccTitle,
500
+ getAccTitle,
501
+ setAccDescription,
502
+ getAccDescription,
503
+ addSection,
504
+ getSections,
505
+ getTasks,
506
+ addTask,
507
+ addTaskOrg,
508
+ getActors: /* @__PURE__ */ __name(function() {
509
+ return updateActors();
510
+ }, "getActors")
511
+ }, styles_default = /* @__PURE__ */ __name((e) => `.label {
512
+ font-family: ${e.fontFamily};
513
+ color: ${e.textColor};
514
+ }
515
+ .mouth {
516
+ stroke: #666;
517
+ }
518
+
519
+ line {
520
+ stroke: ${e.textColor}
521
+ }
522
+
523
+ .legend {
524
+ fill: ${e.textColor};
525
+ font-family: ${e.fontFamily};
526
+ }
527
+
528
+ .label text {
529
+ fill: #333;
530
+ }
531
+ .label {
532
+ color: ${e.textColor}
533
+ }
534
+
535
+ .face {
536
+ ${e.faceColor ? `fill: ${e.faceColor}` : "fill: #FFF8DC"};
537
+ stroke: #999;
538
+ }
539
+
540
+ .node rect,
541
+ .node circle,
542
+ .node ellipse,
543
+ .node polygon,
544
+ .node path {
545
+ fill: ${e.mainBkg};
546
+ stroke: ${e.nodeBorder};
547
+ stroke-width: 1px;
548
+ }
549
+
550
+ .node .label {
551
+ text-align: center;
552
+ }
553
+ .node.clickable {
554
+ cursor: pointer;
555
+ }
556
+
557
+ .arrowheadPath {
558
+ fill: ${e.arrowheadColor};
559
+ }
560
+
561
+ .edgePath .path {
562
+ stroke: ${e.lineColor};
563
+ stroke-width: 1.5px;
564
+ }
565
+
566
+ .flowchart-link {
567
+ stroke: ${e.lineColor};
568
+ fill: none;
569
+ }
570
+
571
+ .edgeLabel {
572
+ background-color: ${e.edgeLabelBackground};
573
+ rect {
574
+ opacity: 0.5;
575
+ }
576
+ text-align: center;
577
+ }
578
+
579
+ .cluster rect {
580
+ }
581
+
582
+ .cluster text {
583
+ fill: ${e.titleColor};
584
+ }
585
+
586
+ div.mermaidTooltip {
587
+ position: absolute;
588
+ text-align: center;
589
+ max-width: 200px;
590
+ padding: 2px;
591
+ font-family: ${e.fontFamily};
592
+ font-size: 12px;
593
+ background: ${e.tertiaryColor};
594
+ border: 1px solid ${e.border2};
595
+ border-radius: 2px;
596
+ pointer-events: none;
597
+ z-index: 100;
598
+ }
599
+
600
+ .task-type-0, .section-type-0 {
601
+ ${e.fillType0 ? `fill: ${e.fillType0}` : ""};
602
+ }
603
+ .task-type-1, .section-type-1 {
604
+ ${e.fillType0 ? `fill: ${e.fillType1}` : ""};
605
+ }
606
+ .task-type-2, .section-type-2 {
607
+ ${e.fillType0 ? `fill: ${e.fillType2}` : ""};
608
+ }
609
+ .task-type-3, .section-type-3 {
610
+ ${e.fillType0 ? `fill: ${e.fillType3}` : ""};
611
+ }
612
+ .task-type-4, .section-type-4 {
613
+ ${e.fillType0 ? `fill: ${e.fillType4}` : ""};
614
+ }
615
+ .task-type-5, .section-type-5 {
616
+ ${e.fillType0 ? `fill: ${e.fillType5}` : ""};
617
+ }
618
+ .task-type-6, .section-type-6 {
619
+ ${e.fillType0 ? `fill: ${e.fillType6}` : ""};
620
+ }
621
+ .task-type-7, .section-type-7 {
622
+ ${e.fillType0 ? `fill: ${e.fillType7}` : ""};
623
+ }
624
+
625
+ .actor-0 {
626
+ ${e.actor0 ? `fill: ${e.actor0}` : ""};
627
+ }
628
+ .actor-1 {
629
+ ${e.actor1 ? `fill: ${e.actor1}` : ""};
630
+ }
631
+ .actor-2 {
632
+ ${e.actor2 ? `fill: ${e.actor2}` : ""};
633
+ }
634
+ .actor-3 {
635
+ ${e.actor3 ? `fill: ${e.actor3}` : ""};
636
+ }
637
+ .actor-4 {
638
+ ${e.actor4 ? `fill: ${e.actor4}` : ""};
639
+ }
640
+ .actor-5 {
641
+ ${e.actor5 ? `fill: ${e.actor5}` : ""};
642
+ }
643
+ ${getIconStyles()}
644
+ `, "getStyles"), drawRect2 = /* @__PURE__ */ __name(function(e, S) {
645
+ return drawRect(e, S);
646
+ }, "drawRect"), drawFace = /* @__PURE__ */ __name(function(S, C) {
647
+ let w = S.append("circle").attr("cx", C.cx).attr("cy", C.cy).attr("class", "face").attr("r", 15).attr("stroke-width", 2).attr("overflow", "visible"), T = S.append("g");
648
+ T.append("circle").attr("cx", C.cx - 15 / 3).attr("cy", C.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"), T.append("circle").attr("cx", C.cx + 15 / 3).attr("cy", C.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666");
649
+ function E(e) {
650
+ let S = arc_default().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(15 / 2).outerRadius(15 / 2.2);
651
+ e.append("path").attr("class", "mouth").attr("d", S).attr("transform", "translate(" + C.cx + "," + (C.cy + 2) + ")");
652
+ }
653
+ __name(E, "smile");
654
+ function D(e) {
655
+ let S = arc_default().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(15 / 2).outerRadius(15 / 2.2);
656
+ e.append("path").attr("class", "mouth").attr("d", S).attr("transform", "translate(" + C.cx + "," + (C.cy + 7) + ")");
657
+ }
658
+ __name(D, "sad");
659
+ function O(e) {
660
+ e.append("line").attr("class", "mouth").attr("stroke", 2).attr("x1", C.cx - 5).attr("y1", C.cy + 7).attr("x2", C.cx + 5).attr("y2", C.cy + 7).attr("class", "mouth").attr("stroke-width", "1px").attr("stroke", "#666");
661
+ }
662
+ return __name(O, "ambivalent"), C.score > 3 ? E(T) : C.score < 3 ? D(T) : O(T), w;
663
+ }, "drawFace"), drawCircle = /* @__PURE__ */ __name(function(e, S) {
664
+ let C = e.append("circle");
665
+ return C.attr("cx", S.cx), C.attr("cy", S.cy), C.attr("class", "actor-" + S.pos), C.attr("fill", S.fill), C.attr("stroke", S.stroke), C.attr("r", S.r), C.class !== void 0 && C.attr("class", C.class), S.title !== void 0 && C.append("title").text(S.title), C;
666
+ }, "drawCircle"), drawText2 = /* @__PURE__ */ __name(function(e, S) {
667
+ return drawText(e, S);
668
+ }, "drawText"), drawLabel = /* @__PURE__ */ __name(function(S, C) {
669
+ function w(e, S, C, w, T) {
670
+ return e + "," + S + " " + (e + C) + "," + S + " " + (e + C) + "," + (S + w - T) + " " + (e + C - T * 1.2) + "," + (S + w) + " " + e + "," + (S + w);
671
+ }
672
+ __name(w, "genPoints");
673
+ let T = S.append("polygon");
674
+ T.attr("points", w(C.x, C.y, 50, 20, 7)), T.attr("class", "labelBox"), C.y += C.labelMargin, C.x += .5 * C.labelMargin, drawText2(S, C);
675
+ }, "drawLabel"), drawSection = /* @__PURE__ */ __name(function(e, S, C) {
676
+ let w = e.append("g"), T = getNoteRect();
677
+ T.x = S.x, T.y = S.y, T.fill = S.fill, T.width = C.width * S.taskCount + C.diagramMarginX * (S.taskCount - 1), T.height = C.height, T.class = "journey-section section-type-" + S.num, T.rx = 3, T.ry = 3, drawRect2(w, T), _drawTextCandidateFunc(C)(S.text, w, T.x, T.y, T.width, T.height, { class: "journey-section section-type-" + S.num }, C, S.colour);
678
+ }, "drawSection"), taskCount = -1, drawTask = /* @__PURE__ */ __name(function(e, S, C) {
679
+ let w = S.x + C.width / 2, T = e.append("g");
680
+ taskCount++, T.append("line").attr("id", "task" + taskCount).attr("x1", w).attr("y1", S.y).attr("x2", w).attr("y2", 450).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"), drawFace(T, {
681
+ cx: w,
682
+ cy: 300 + (5 - S.score) * 30,
683
+ score: S.score
684
+ });
685
+ let E = getNoteRect();
686
+ E.x = S.x, E.y = S.y, E.fill = S.fill, E.width = C.width, E.height = C.height, E.class = "task task-type-" + S.num, E.rx = 3, E.ry = 3, drawRect2(T, E);
687
+ let D = S.x + 14;
688
+ S.people.forEach((e) => {
689
+ let C = S.actors[e].color;
690
+ drawCircle(T, {
691
+ cx: D,
692
+ cy: S.y,
693
+ r: 7,
694
+ fill: C,
695
+ stroke: "#000",
696
+ title: e,
697
+ pos: S.actors[e].position
698
+ }), D += 10;
699
+ }), _drawTextCandidateFunc(C)(S.task, T, E.x, E.y, E.width, E.height, { class: "task" }, C, S.colour);
700
+ }, "drawTask"), drawBackgroundRect2 = /* @__PURE__ */ __name(function(e, S) {
701
+ drawBackgroundRect(e, S);
702
+ }, "drawBackgroundRect"), _drawTextCandidateFunc = /* @__PURE__ */ (function() {
703
+ function S(e, S, C, w, E, D, O, k) {
704
+ T(S.append("text").attr("x", C + E / 2).attr("y", w + D / 2 + 5).style("font-color", k).style("text-anchor", "middle").text(e), O);
705
+ }
706
+ __name(S, "byText");
707
+ function C(e, S, C, w, E, D, O, k, A) {
708
+ let { taskFontSize: j, taskFontFamily: M } = k, N = e.split(/<br\s*\/?>/gi);
709
+ for (let e = 0; e < N.length; e++) {
710
+ let k = e * j - j * (N.length - 1) / 2, P = S.append("text").attr("x", C + E / 2).attr("y", w).attr("fill", A).style("text-anchor", "middle").style("font-size", j).style("font-family", M);
711
+ P.append("tspan").attr("x", C + E / 2).attr("dy", k).text(N[e]), P.attr("y", w + D / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), T(P, O);
712
+ }
713
+ }
714
+ __name(C, "byTspan");
715
+ function w(e, S, w, E, D, O, k, A) {
716
+ let j = S.append("switch"), M = j.append("foreignObject").attr("x", w).attr("y", E).attr("width", D).attr("height", O).attr("position", "fixed").append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
717
+ M.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(e), C(e, j, w, E, D, O, k, A), T(M, k);
718
+ }
719
+ __name(w, "byFo");
720
+ function T(e, S) {
721
+ for (let C in S) C in S && e.attr(C, S[C]);
722
+ }
723
+ return __name(T, "_setTextAttrs"), function(e) {
724
+ return e.textPlacement === "fo" ? w : e.textPlacement === "old" ? S : C;
725
+ };
726
+ })(), svgDraw_default = {
727
+ drawRect: drawRect2,
728
+ drawCircle,
729
+ drawSection,
730
+ drawText: drawText2,
731
+ drawLabel,
732
+ drawTask,
733
+ drawBackgroundRect: drawBackgroundRect2,
734
+ initGraphics: /* @__PURE__ */ __name(function(e) {
735
+ e.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 5).attr("refY", 2).attr("markerWidth", 6).attr("markerHeight", 4).attr("orient", "auto").append("path").attr("d", "M 0,0 V 4 L6,2 Z");
736
+ }, "initGraphics")
737
+ }, setConf = /* @__PURE__ */ __name(function(e) {
738
+ Object.keys(e).forEach(function(S) {
739
+ conf[S] = e[S];
740
+ });
741
+ }, "setConf"), actors = {}, maxWidth = 0;
742
+ function drawActorLegend(e) {
743
+ let S = getConfig2().journey, C = S.maxLabelWidth;
744
+ maxWidth = 0;
745
+ let w = 60;
746
+ Object.keys(actors).forEach((T) => {
747
+ let E = actors[T].color, D = {
748
+ cx: 20,
749
+ cy: w,
750
+ r: 7,
751
+ fill: E,
752
+ stroke: "#000",
753
+ pos: actors[T].position
754
+ };
755
+ svgDraw_default.drawCircle(e, D);
756
+ let O = e.append("text").attr("visibility", "hidden").text(T), k = O.node().getBoundingClientRect().width;
757
+ O.remove();
758
+ let A = [];
759
+ if (k <= C) A = [T];
760
+ else {
761
+ let S = T.split(" "), w = "";
762
+ O = e.append("text").attr("visibility", "hidden"), S.forEach((e) => {
763
+ let S = w ? `${w} ${e}` : e;
764
+ if (O.text(S), O.node().getBoundingClientRect().width > C) {
765
+ if (w && A.push(w), w = e, O.text(e), O.node().getBoundingClientRect().width > C) {
766
+ let S = "";
767
+ for (let w of e) S += w, O.text(S + "-"), O.node().getBoundingClientRect().width > C && (A.push(S.slice(0, -1) + "-"), S = w);
768
+ w = S;
769
+ }
770
+ } else w = S;
771
+ }), w && A.push(w), O.remove();
772
+ }
773
+ A.forEach((C, T) => {
774
+ let E = {
775
+ x: 40,
776
+ y: w + 7 + T * 20,
777
+ fill: "#666",
778
+ text: C,
779
+ textMargin: S.boxTextMargin ?? 5
780
+ }, D = svgDraw_default.drawText(e, E).node().getBoundingClientRect().width;
781
+ D > maxWidth && D > S.leftMargin - D && (maxWidth = D);
782
+ }), w += Math.max(20, A.length * 20);
783
+ });
784
+ }
785
+ __name(drawActorLegend, "drawActorLegend");
786
+ var conf = getConfig2().journey, leftMargin = 0, draw = /* @__PURE__ */ __name(function(e, C, w, T) {
787
+ let E = getConfig2(), D = E.journey.titleColor, A = E.journey.titleFontSize, j = E.journey.titleFontFamily, M = E.securityLevel, N;
788
+ M === "sandbox" && (N = select_default("#i" + C));
789
+ let P = select_default(M === "sandbox" ? N.nodes()[0].contentDocument.body : "body");
790
+ bounds.init();
791
+ let F = P.select("#" + C);
792
+ svgDraw_default.initGraphics(F);
793
+ let I = T.db.getTasks(), L = T.db.getDiagramTitle(), R = T.db.getActors();
794
+ for (let e in actors) delete actors[e];
795
+ let z = 0;
796
+ R.forEach((e) => {
797
+ actors[e] = {
798
+ color: conf.actorColours[z % conf.actorColours.length],
799
+ position: z
800
+ }, z++;
801
+ }), drawActorLegend(F), leftMargin = conf.leftMargin + maxWidth, bounds.insert(0, 0, leftMargin, Object.keys(actors).length * 50), drawTasks(F, I, 0);
802
+ let B = bounds.getBounds();
803
+ L && F.append("text").text(L).attr("x", leftMargin).attr("font-size", A).attr("font-weight", "bold").attr("y", 25).attr("fill", D).attr("font-family", j);
804
+ let V = B.stopy - B.starty + 2 * conf.diagramMarginY, H = leftMargin + B.stopx + 2 * conf.diagramMarginX;
805
+ configureSvgSize(F, V, H, conf.useMaxWidth), F.append("line").attr("x1", leftMargin).attr("y1", conf.height * 4).attr("x2", H - leftMargin - 4).attr("y2", conf.height * 4).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)");
806
+ let U = L ? 70 : 0;
807
+ F.attr("viewBox", `${B.startx} -25 ${H} ${V + U}`), F.attr("preserveAspectRatio", "xMinYMin meet"), F.attr("height", V + U + 25);
808
+ }, "draw"), bounds = {
809
+ data: {
810
+ startx: void 0,
811
+ stopx: void 0,
812
+ starty: void 0,
813
+ stopy: void 0
814
+ },
815
+ verticalPos: 0,
816
+ sequenceItems: [],
817
+ init: /* @__PURE__ */ __name(function() {
818
+ this.sequenceItems = [], this.data = {
819
+ startx: void 0,
820
+ stopx: void 0,
821
+ starty: void 0,
822
+ stopy: void 0
823
+ }, this.verticalPos = 0;
824
+ }, "init"),
825
+ updateVal: /* @__PURE__ */ __name(function(e, S, C, w) {
826
+ e[S] === void 0 ? e[S] = C : e[S] = w(C, e[S]);
827
+ }, "updateVal"),
828
+ updateBounds: /* @__PURE__ */ __name(function(S, C, w, T) {
829
+ let E = getConfig2().journey, D = this, k = 0;
830
+ function A(O) {
831
+ return /* @__PURE__ */ __name(function(e) {
832
+ k++;
833
+ let A = D.sequenceItems.length - k + 1;
834
+ D.updateVal(e, "starty", C - A * E.boxMargin, Math.min), D.updateVal(e, "stopy", T + A * E.boxMargin, Math.max), D.updateVal(bounds.data, "startx", S - A * E.boxMargin, Math.min), D.updateVal(bounds.data, "stopx", w + A * E.boxMargin, Math.max), O !== "activation" && (D.updateVal(e, "startx", S - A * E.boxMargin, Math.min), D.updateVal(e, "stopx", w + A * E.boxMargin, Math.max), D.updateVal(bounds.data, "starty", C - A * E.boxMargin, Math.min), D.updateVal(bounds.data, "stopy", T + A * E.boxMargin, Math.max));
835
+ }, "updateItemBounds");
836
+ }
837
+ __name(A, "updateFn"), this.sequenceItems.forEach(A());
838
+ }, "updateBounds"),
839
+ insert: /* @__PURE__ */ __name(function(e, S, C, w) {
840
+ let T = Math.min(e, C), E = Math.max(e, C), D = Math.min(S, w), O = Math.max(S, w);
841
+ this.updateVal(bounds.data, "startx", T, Math.min), this.updateVal(bounds.data, "starty", D, Math.min), this.updateVal(bounds.data, "stopx", E, Math.max), this.updateVal(bounds.data, "stopy", O, Math.max), this.updateBounds(T, D, E, O);
842
+ }, "insert"),
843
+ bumpVerticalPos: /* @__PURE__ */ __name(function(e) {
844
+ this.verticalPos += e, this.data.stopy = this.verticalPos;
845
+ }, "bumpVerticalPos"),
846
+ getVerticalPos: /* @__PURE__ */ __name(function() {
847
+ return this.verticalPos;
848
+ }, "getVerticalPos"),
849
+ getBounds: /* @__PURE__ */ __name(function() {
850
+ return this.data;
851
+ }, "getBounds")
852
+ }, fills = conf.sectionFills, textColours = conf.sectionColours, drawTasks = /* @__PURE__ */ __name(function(e, S, C) {
853
+ let w = getConfig2().journey, T = "", E = C + (w.height * 2 + w.diagramMarginY), D = 0, k = "#CCC", A = "black", j = 0;
854
+ for (let [C, O] of S.entries()) {
855
+ if (T !== O.section) {
856
+ k = fills[D % fills.length], j = D % fills.length, A = textColours[D % textColours.length];
857
+ let E = 0, M = O.section;
858
+ for (let e = C; e < S.length && S[e].section == M; e++) E += 1;
859
+ let N = {
860
+ x: C * w.taskMargin + C * w.width + leftMargin,
861
+ y: 50,
862
+ text: O.section,
863
+ fill: k,
864
+ num: j,
865
+ colour: A,
866
+ taskCount: E
867
+ };
868
+ svgDraw_default.drawSection(e, N, w), T = O.section, D++;
869
+ }
870
+ let M = O.people.reduce((e, S) => (actors[S] && (e[S] = actors[S]), e), {});
871
+ O.x = C * w.taskMargin + C * w.width + leftMargin, O.y = E, O.width = w.diagramMarginX, O.height = w.diagramMarginY, O.colour = A, O.fill = k, O.num = j, O.actors = M, svgDraw_default.drawTask(e, O, w), bounds.insert(O.x, O.y, O.x + O.width + w.taskMargin, 450);
872
+ }
873
+ }, "drawTasks"), journeyRenderer_default = {
874
+ setConf,
875
+ draw
876
+ }, diagram = {
877
+ parser: journey_default,
878
+ db: journeyDb_default,
879
+ renderer: journeyRenderer_default,
880
+ styles: styles_default,
881
+ init: /* @__PURE__ */ __name((e) => {
882
+ journeyRenderer_default.setConf(e.journey), journeyDb_default.clear();
883
+ }, "init")
884
+ };
885
+ export { diagram };