@blueking/ai-blueking 2.0.0-dev.2 → 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 +1 -1
@@ -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, G as setupGraphViewbox, U as setDiagramTitle, _ as getAccDescription, a as clear, b as getConfig2, s as common_default, u as defaultConfig2, v as getAccTitle, z as setAccDescription } from "./chunk-ABZYJK2D-gsx40GnJ.js";
4
+ import { t as ordinal } from "./ordinal-DOM6Fa9P.js";
5
+ import "./init-hAkIK9Bd.js";
6
+ function colors_default(t) {
7
+ for (var l = t.length / 6 | 0, u = Array(l), d = 0; d < l;) u[d] = "#" + t.slice(d * 6, ++d * 6);
8
+ return u;
9
+ }
10
+ var Tableau10_default = colors_default("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");
11
+ function max(t, l) {
12
+ let u;
13
+ if (l === void 0) for (let l of t) l != null && (u < l || u === void 0 && l >= l) && (u = l);
14
+ else {
15
+ let d = -1;
16
+ for (let f of t) (f = l(f, ++d, t)) != null && (u < f || u === void 0 && f >= f) && (u = f);
17
+ }
18
+ return u;
19
+ }
20
+ function min(t, l) {
21
+ let u;
22
+ if (l === void 0) for (let l of t) l != null && (u > l || u === void 0 && l >= l) && (u = l);
23
+ else {
24
+ let d = -1;
25
+ for (let f of t) (f = l(f, ++d, t)) != null && (u > f || u === void 0 && f >= f) && (u = f);
26
+ }
27
+ return u;
28
+ }
29
+ function sum(t, l) {
30
+ let u = 0;
31
+ if (l === void 0) for (let l of t) (l = +l) && (u += l);
32
+ else {
33
+ let d = -1;
34
+ for (let f of t) (f = +l(f, ++d, t)) && (u += f);
35
+ }
36
+ return u;
37
+ }
38
+ function targetDepth(t) {
39
+ return t.target.depth;
40
+ }
41
+ function left(t) {
42
+ return t.depth;
43
+ }
44
+ function right(t, l) {
45
+ return l - 1 - t.height;
46
+ }
47
+ function justify(t, l) {
48
+ return t.sourceLinks.length ? t.depth : l - 1;
49
+ }
50
+ function center(t) {
51
+ return t.targetLinks.length ? t.depth : t.sourceLinks.length ? min(t.sourceLinks, targetDepth) - 1 : 0;
52
+ }
53
+ function constant(t) {
54
+ return function() {
55
+ return t;
56
+ };
57
+ }
58
+ function ascendingSourceBreadth(t, l) {
59
+ return ascendingBreadth(t.source, l.source) || t.index - l.index;
60
+ }
61
+ function ascendingTargetBreadth(t, l) {
62
+ return ascendingBreadth(t.target, l.target) || t.index - l.index;
63
+ }
64
+ function ascendingBreadth(t, l) {
65
+ return t.y0 - l.y0;
66
+ }
67
+ function value(t) {
68
+ return t.value;
69
+ }
70
+ function defaultId(t) {
71
+ return t.index;
72
+ }
73
+ function defaultNodes(t) {
74
+ return t.nodes;
75
+ }
76
+ function defaultLinks(t) {
77
+ return t.links;
78
+ }
79
+ function find(t, l) {
80
+ let u = t.get(l);
81
+ if (!u) throw Error("missing: " + l);
82
+ return u;
83
+ }
84
+ function computeLinkBreadths({ nodes: t }) {
85
+ for (let l of t) {
86
+ let t = l.y0, u = t;
87
+ for (let u of l.sourceLinks) u.y0 = t + u.width / 2, t += u.width;
88
+ for (let t of l.targetLinks) t.y1 = u + t.width / 2, u += t.width;
89
+ }
90
+ }
91
+ function Sankey() {
92
+ let t = 0, l = 0, u = 1, d = 1, f = 24, p = 8, m, h = defaultId, g = justify, _, v, b = defaultNodes, S = defaultLinks, C = 6;
93
+ function w() {
94
+ let t = {
95
+ nodes: b.apply(null, arguments),
96
+ links: S.apply(null, arguments)
97
+ };
98
+ return T(t), k(t), A(t), j(t), W(t), computeLinkBreadths(t), t;
99
+ }
100
+ w.update = function(t) {
101
+ return computeLinkBreadths(t), t;
102
+ }, w.nodeId = function(t) {
103
+ return arguments.length ? (h = typeof t == "function" ? t : constant(t), w) : h;
104
+ }, w.nodeAlign = function(t) {
105
+ return arguments.length ? (g = typeof t == "function" ? t : constant(t), w) : g;
106
+ }, w.nodeSort = function(t) {
107
+ return arguments.length ? (_ = t, w) : _;
108
+ }, w.nodeWidth = function(t) {
109
+ return arguments.length ? (f = +t, w) : f;
110
+ }, w.nodePadding = function(t) {
111
+ return arguments.length ? (p = m = +t, w) : p;
112
+ }, w.nodes = function(t) {
113
+ return arguments.length ? (b = typeof t == "function" ? t : constant(t), w) : b;
114
+ }, w.links = function(t) {
115
+ return arguments.length ? (S = typeof t == "function" ? t : constant(t), w) : S;
116
+ }, w.linkSort = function(t) {
117
+ return arguments.length ? (v = t, w) : v;
118
+ }, w.size = function(f) {
119
+ return arguments.length ? (t = l = 0, u = +f[0], d = +f[1], w) : [u - t, d - l];
120
+ }, w.extent = function(f) {
121
+ return arguments.length ? (t = +f[0][0], u = +f[1][0], l = +f[0][1], d = +f[1][1], w) : [[t, l], [u, d]];
122
+ }, w.iterations = function(t) {
123
+ return arguments.length ? (C = +t, w) : C;
124
+ };
125
+ function T({ nodes: t, links: l }) {
126
+ for (let [l, u] of t.entries()) u.index = l, u.sourceLinks = [], u.targetLinks = [];
127
+ let u = new Map(t.map((l, u) => [h(l, u, t), l]));
128
+ for (let [t, d] of l.entries()) {
129
+ d.index = t;
130
+ let { source: l, target: f } = d;
131
+ typeof l != "object" && (l = d.source = find(u, l)), typeof f != "object" && (f = d.target = find(u, f)), l.sourceLinks.push(d), f.targetLinks.push(d);
132
+ }
133
+ if (v != null) for (let { sourceLinks: l, targetLinks: u } of t) l.sort(v), u.sort(v);
134
+ }
135
+ function k({ nodes: t }) {
136
+ for (let l of t) l.value = l.fixedValue === void 0 ? Math.max(sum(l.sourceLinks, value), sum(l.targetLinks, value)) : l.fixedValue;
137
+ }
138
+ function A({ nodes: t }) {
139
+ let l = t.length, u = new Set(t), d = /* @__PURE__ */ new Set(), f = 0;
140
+ for (; u.size;) {
141
+ for (let t of u) {
142
+ t.depth = f;
143
+ for (let { target: l } of t.sourceLinks) d.add(l);
144
+ }
145
+ if (++f > l) throw Error("circular link");
146
+ u = d, d = /* @__PURE__ */ new Set();
147
+ }
148
+ }
149
+ function j({ nodes: t }) {
150
+ let l = t.length, u = new Set(t), d = /* @__PURE__ */ new Set(), f = 0;
151
+ for (; u.size;) {
152
+ for (let t of u) {
153
+ t.height = f;
154
+ for (let { source: l } of t.targetLinks) d.add(l);
155
+ }
156
+ if (++f > l) throw Error("circular link");
157
+ u = d, d = /* @__PURE__ */ new Set();
158
+ }
159
+ }
160
+ function N({ nodes: l }) {
161
+ let d = max(l, (t) => t.depth) + 1, p = (u - t - f) / (d - 1), m = Array(d);
162
+ for (let u of l) {
163
+ let l = Math.max(0, Math.min(d - 1, Math.floor(g.call(null, u, d))));
164
+ u.layer = l, u.x0 = t + l * p, u.x1 = u.x0 + f, m[l] ? m[l].push(u) : m[l] = [u];
165
+ }
166
+ if (_) for (let t of m) t.sort(_);
167
+ return m;
168
+ }
169
+ function U(t) {
170
+ let u = min(t, (t) => (d - l - (t.length - 1) * m) / sum(t, value));
171
+ for (let f of t) {
172
+ let t = l;
173
+ for (let l of f) {
174
+ l.y0 = t, l.y1 = t + l.value * u, t = l.y1 + m;
175
+ for (let t of l.sourceLinks) t.width = t.value * u;
176
+ }
177
+ t = (d - t + m) / (f.length + 1);
178
+ for (let l = 0; l < f.length; ++l) {
179
+ let u = f[l];
180
+ u.y0 += t * (l + 1), u.y1 += t * (l + 1);
181
+ }
182
+ Z(f);
183
+ }
184
+ }
185
+ function W(t) {
186
+ let u = N(t);
187
+ m = Math.min(p, (d - l) / (max(u, (t) => t.length) - 1)), U(u);
188
+ for (let t = 0; t < C; ++t) {
189
+ let l = .99 ** t, d = Math.max(1 - l, (t + 1) / C);
190
+ K(u, l, d), G(u, l, d);
191
+ }
192
+ }
193
+ function G(t, l, u) {
194
+ for (let d = 1, f = t.length; d < f; ++d) {
195
+ let f = t[d];
196
+ for (let t of f) {
197
+ let u = 0, d = 0;
198
+ for (let { source: l, value: f } of t.targetLinks) {
199
+ let p = f * (t.layer - l.layer);
200
+ u += Q(l, t) * p, d += p;
201
+ }
202
+ if (!(d > 0)) continue;
203
+ let f = (u / d - t.y0) * l;
204
+ t.y0 += f, t.y1 += f, X(t);
205
+ }
206
+ _ === void 0 && f.sort(ascendingBreadth), q(f, u);
207
+ }
208
+ }
209
+ function K(t, l, u) {
210
+ for (let d = t.length - 2; d >= 0; --d) {
211
+ let f = t[d];
212
+ for (let t of f) {
213
+ let u = 0, d = 0;
214
+ for (let { target: l, value: f } of t.sourceLinks) {
215
+ let p = f * (l.layer - t.layer);
216
+ u += $(t, l) * p, d += p;
217
+ }
218
+ if (!(d > 0)) continue;
219
+ let f = (u / d - t.y0) * l;
220
+ t.y0 += f, t.y1 += f, X(t);
221
+ }
222
+ _ === void 0 && f.sort(ascendingBreadth), q(f, u);
223
+ }
224
+ }
225
+ function q(t, u) {
226
+ let f = t.length >> 1, p = t[f];
227
+ Y(t, p.y0 - m, f - 1, u), J(t, p.y1 + m, f + 1, u), Y(t, d, t.length - 1, u), J(t, l, 0, u);
228
+ }
229
+ function J(t, l, u, d) {
230
+ for (; u < t.length; ++u) {
231
+ let f = t[u], p = (l - f.y0) * d;
232
+ p > 1e-6 && (f.y0 += p, f.y1 += p), l = f.y1 + m;
233
+ }
234
+ }
235
+ function Y(t, l, u, d) {
236
+ for (; u >= 0; --u) {
237
+ let f = t[u], p = (f.y1 - l) * d;
238
+ p > 1e-6 && (f.y0 -= p, f.y1 -= p), l = f.y0 - m;
239
+ }
240
+ }
241
+ function X({ sourceLinks: t, targetLinks: l }) {
242
+ if (v === void 0) {
243
+ for (let { source: { sourceLinks: t } } of l) t.sort(ascendingTargetBreadth);
244
+ for (let { target: { targetLinks: l } } of t) l.sort(ascendingSourceBreadth);
245
+ }
246
+ }
247
+ function Z(t) {
248
+ if (v === void 0) for (let { sourceLinks: l, targetLinks: u } of t) l.sort(ascendingTargetBreadth), u.sort(ascendingSourceBreadth);
249
+ }
250
+ function Q(t, l) {
251
+ let u = t.y0 - (t.sourceLinks.length - 1) * m / 2;
252
+ for (let { target: d, width: f } of t.sourceLinks) {
253
+ if (d === l) break;
254
+ u += f + m;
255
+ }
256
+ for (let { source: d, width: f } of l.targetLinks) {
257
+ if (d === t) break;
258
+ u -= f;
259
+ }
260
+ return u;
261
+ }
262
+ function $(t, l) {
263
+ let u = l.y0 - (l.targetLinks.length - 1) * m / 2;
264
+ for (let { source: d, width: f } of l.targetLinks) {
265
+ if (d === t) break;
266
+ u += f + m;
267
+ }
268
+ for (let { target: d, width: f } of t.sourceLinks) {
269
+ if (d === l) break;
270
+ u -= f;
271
+ }
272
+ return u;
273
+ }
274
+ return w;
275
+ }
276
+ var pi = Math.PI, tau = 2 * pi, epsilon = 1e-6, tauEpsilon = tau - epsilon;
277
+ function Path() {
278
+ this._x0 = this._y0 = this._x1 = this._y1 = null, this._ = "";
279
+ }
280
+ function path() {
281
+ return new Path();
282
+ }
283
+ Path.prototype = path.prototype = {
284
+ constructor: Path,
285
+ moveTo: function(t, l) {
286
+ this._ += "M" + (this._x0 = this._x1 = +t) + "," + (this._y0 = this._y1 = +l);
287
+ },
288
+ closePath: function() {
289
+ this._x1 !== null && (this._x1 = this._x0, this._y1 = this._y0, this._ += "Z");
290
+ },
291
+ lineTo: function(t, l) {
292
+ this._ += "L" + (this._x1 = +t) + "," + (this._y1 = +l);
293
+ },
294
+ quadraticCurveTo: function(t, l, u, d) {
295
+ this._ += "Q" + +t + "," + +l + "," + (this._x1 = +u) + "," + (this._y1 = +d);
296
+ },
297
+ bezierCurveTo: function(t, l, u, d, f, p) {
298
+ this._ += "C" + +t + "," + +l + "," + +u + "," + +d + "," + (this._x1 = +f) + "," + (this._y1 = +p);
299
+ },
300
+ arcTo: function(t, l, u, d, f) {
301
+ t = +t, l = +l, u = +u, d = +d, f = +f;
302
+ var p = this._x1, m = this._y1, h = u - t, g = d - l, _ = p - t, v = m - l, b = _ * _ + v * v;
303
+ if (f < 0) throw Error("negative radius: " + f);
304
+ if (this._x1 === null) this._ += "M" + (this._x1 = t) + "," + (this._y1 = l);
305
+ else if (b > epsilon) if (!(Math.abs(v * h - g * _) > epsilon) || !f) this._ += "L" + (this._x1 = t) + "," + (this._y1 = l);
306
+ else {
307
+ var S = u - p, C = d - m, w = h * h + g * g, T = S * S + C * C, E = Math.sqrt(w), D = Math.sqrt(b), O = f * Math.tan((pi - Math.acos((w + b - T) / (2 * E * D))) / 2), k = O / D, A = O / E;
308
+ Math.abs(k - 1) > epsilon && (this._ += "L" + (t + k * _) + "," + (l + k * v)), this._ += "A" + f + "," + f + ",0,0," + +(v * S > _ * C) + "," + (this._x1 = t + A * h) + "," + (this._y1 = l + A * g);
309
+ }
310
+ },
311
+ arc: function(t, l, u, d, f, p) {
312
+ t = +t, l = +l, u = +u, p = !!p;
313
+ var m = u * Math.cos(d), h = u * Math.sin(d), g = t + m, _ = l + h, v = 1 ^ p, b = p ? d - f : f - d;
314
+ if (u < 0) throw Error("negative radius: " + u);
315
+ this._x1 === null ? this._ += "M" + g + "," + _ : (Math.abs(this._x1 - g) > epsilon || Math.abs(this._y1 - _) > epsilon) && (this._ += "L" + g + "," + _), u && (b < 0 && (b = b % tau + tau), b > tauEpsilon ? this._ += "A" + u + "," + u + ",0,1," + v + "," + (t - m) + "," + (l - h) + "A" + u + "," + u + ",0,1," + v + "," + (this._x1 = g) + "," + (this._y1 = _) : b > epsilon && (this._ += "A" + u + "," + u + ",0," + +(b >= pi) + "," + v + "," + (this._x1 = t + u * Math.cos(f)) + "," + (this._y1 = l + u * Math.sin(f))));
316
+ },
317
+ rect: function(t, l, u, d) {
318
+ this._ += "M" + (this._x0 = this._x1 = +t) + "," + (this._y0 = this._y1 = +l) + "h" + +u + "v" + +d + "h" + -u + "Z";
319
+ },
320
+ toString: function() {
321
+ return this._;
322
+ }
323
+ };
324
+ var path_default = path;
325
+ function constant_default(t) {
326
+ return function() {
327
+ return t;
328
+ };
329
+ }
330
+ function x(t) {
331
+ return t[0];
332
+ }
333
+ function y(t) {
334
+ return t[1];
335
+ }
336
+ var slice = Array.prototype.slice;
337
+ function linkSource(t) {
338
+ return t.source;
339
+ }
340
+ function linkTarget(t) {
341
+ return t.target;
342
+ }
343
+ function link(t) {
344
+ var l = linkSource, u = linkTarget, d = x, f = y, p = null;
345
+ function m() {
346
+ var m, h = slice.call(arguments), g = l.apply(this, h), _ = u.apply(this, h);
347
+ if (p ||= m = path_default(), t(p, +d.apply(this, (h[0] = g, h)), +f.apply(this, h), +d.apply(this, (h[0] = _, h)), +f.apply(this, h)), m) return p = null, m + "" || null;
348
+ }
349
+ return m.source = function(t) {
350
+ return arguments.length ? (l = t, m) : l;
351
+ }, m.target = function(t) {
352
+ return arguments.length ? (u = t, m) : u;
353
+ }, m.x = function(t) {
354
+ return arguments.length ? (d = typeof t == "function" ? t : constant_default(+t), m) : d;
355
+ }, m.y = function(t) {
356
+ return arguments.length ? (f = typeof t == "function" ? t : constant_default(+t), m) : f;
357
+ }, m.context = function(t) {
358
+ return arguments.length ? (p = t ?? null, m) : p;
359
+ }, m;
360
+ }
361
+ function curveHorizontal(t, l, u, d, f) {
362
+ t.moveTo(l, u), t.bezierCurveTo(l = (l + d) / 2, u, l, f, d, f);
363
+ }
364
+ function linkHorizontal() {
365
+ return link(curveHorizontal);
366
+ }
367
+ function horizontalSource(t) {
368
+ return [t.source.x1, t.y0];
369
+ }
370
+ function horizontalTarget(t) {
371
+ return [t.target.x0, t.y1];
372
+ }
373
+ function sankeyLinkHorizontal_default() {
374
+ return linkHorizontal().source(horizontalSource).target(horizontalTarget);
375
+ }
376
+ var parser = (function() {
377
+ var l = /* @__PURE__ */ __name(function(t, l, u, d) {
378
+ for (u ||= {}, d = t.length; d--; u[t[d]] = l);
379
+ return u;
380
+ }, "o"), u = [1, 9], d = [1, 10], f = [
381
+ 1,
382
+ 5,
383
+ 10,
384
+ 12
385
+ ], p = {
386
+ trace: /* @__PURE__ */ __name(function() {}, "trace"),
387
+ yy: {},
388
+ symbols_: {
389
+ error: 2,
390
+ start: 3,
391
+ SANKEY: 4,
392
+ NEWLINE: 5,
393
+ csv: 6,
394
+ opt_eof: 7,
395
+ record: 8,
396
+ csv_tail: 9,
397
+ EOF: 10,
398
+ "field[source]": 11,
399
+ COMMA: 12,
400
+ "field[target]": 13,
401
+ "field[value]": 14,
402
+ field: 15,
403
+ escaped: 16,
404
+ non_escaped: 17,
405
+ DQUOTE: 18,
406
+ ESCAPED_TEXT: 19,
407
+ NON_ESCAPED_TEXT: 20,
408
+ $accept: 0,
409
+ $end: 1
410
+ },
411
+ terminals_: {
412
+ 2: "error",
413
+ 4: "SANKEY",
414
+ 5: "NEWLINE",
415
+ 10: "EOF",
416
+ 11: "field[source]",
417
+ 12: "COMMA",
418
+ 13: "field[target]",
419
+ 14: "field[value]",
420
+ 18: "DQUOTE",
421
+ 19: "ESCAPED_TEXT",
422
+ 20: "NON_ESCAPED_TEXT"
423
+ },
424
+ productions_: [
425
+ 0,
426
+ [3, 4],
427
+ [6, 2],
428
+ [9, 2],
429
+ [9, 0],
430
+ [7, 1],
431
+ [7, 0],
432
+ [8, 5],
433
+ [15, 1],
434
+ [15, 1],
435
+ [16, 3],
436
+ [17, 1]
437
+ ],
438
+ performAction: /* @__PURE__ */ __name(function(t, l, u, d, f, p, m) {
439
+ var h = p.length - 1;
440
+ switch (f) {
441
+ case 7:
442
+ let t = d.findOrCreateNode(p[h - 4].trim().replaceAll("\"\"", "\"")), l = d.findOrCreateNode(p[h - 2].trim().replaceAll("\"\"", "\"")), u = parseFloat(p[h].trim());
443
+ d.addLink(t, l, u);
444
+ break;
445
+ case 8:
446
+ case 9:
447
+ case 11:
448
+ this.$ = p[h];
449
+ break;
450
+ case 10:
451
+ this.$ = p[h - 1];
452
+ break;
453
+ }
454
+ }, "anonymous"),
455
+ table: [
456
+ {
457
+ 3: 1,
458
+ 4: [1, 2]
459
+ },
460
+ { 1: [3] },
461
+ { 5: [1, 3] },
462
+ {
463
+ 6: 4,
464
+ 8: 5,
465
+ 15: 6,
466
+ 16: 7,
467
+ 17: 8,
468
+ 18: u,
469
+ 20: d
470
+ },
471
+ {
472
+ 1: [2, 6],
473
+ 7: 11,
474
+ 10: [1, 12]
475
+ },
476
+ l(d, [2, 4], {
477
+ 9: 13,
478
+ 5: [1, 14]
479
+ }),
480
+ { 12: [1, 15] },
481
+ l(f, [2, 8]),
482
+ l(f, [2, 9]),
483
+ { 19: [1, 16] },
484
+ l(f, [2, 11]),
485
+ { 1: [2, 1] },
486
+ { 1: [2, 5] },
487
+ l(d, [2, 2]),
488
+ {
489
+ 6: 17,
490
+ 8: 5,
491
+ 15: 6,
492
+ 16: 7,
493
+ 17: 8,
494
+ 18: u,
495
+ 20: d
496
+ },
497
+ {
498
+ 15: 18,
499
+ 16: 7,
500
+ 17: 8,
501
+ 18: u,
502
+ 20: d
503
+ },
504
+ { 18: [1, 19] },
505
+ l(d, [2, 3]),
506
+ { 12: [1, 20] },
507
+ l(f, [2, 10]),
508
+ {
509
+ 15: 21,
510
+ 16: 7,
511
+ 17: 8,
512
+ 18: u,
513
+ 20: d
514
+ },
515
+ l([
516
+ 1,
517
+ 5,
518
+ 10
519
+ ], [2, 7])
520
+ ],
521
+ defaultActions: {
522
+ 11: [2, 1],
523
+ 12: [2, 5]
524
+ },
525
+ parseError: /* @__PURE__ */ __name(function(t, l) {
526
+ if (l.recoverable) this.trace(t);
527
+ else {
528
+ var u = Error(t);
529
+ throw u.hash = l, u;
530
+ }
531
+ }, "parseError"),
532
+ parse: /* @__PURE__ */ __name(function(l) {
533
+ var u = this, d = [0], f = [], p = [null], m = [], h = this.table, g = "", _ = 0, v = 0, b = 0, S = 2, C = 1, w = m.slice.call(arguments, 1), T = Object.create(this.lexer), E = { yy: {} };
534
+ for (var D in this.yy) Object.prototype.hasOwnProperty.call(this.yy, D) && (E.yy[D] = this.yy[D]);
535
+ T.setInput(l, E.yy), E.yy.lexer = T, E.yy.parser = this, T.yylloc === void 0 && (T.yylloc = {});
536
+ var O = T.yylloc;
537
+ m.push(O);
538
+ var k = T.options && T.options.ranges;
539
+ typeof E.yy.parseError == "function" ? this.parseError = E.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
540
+ function A(t) {
541
+ d.length -= 2 * t, p.length -= t, m.length -= t;
542
+ }
543
+ __name(A, "popStack");
544
+ function j() {
545
+ var t = f.pop() || T.lex() || C;
546
+ return typeof t != "number" && (t instanceof Array && (f = t, t = f.pop()), t = u.symbols_[t] || t), t;
547
+ }
548
+ __name(j, "lex");
549
+ for (var M, N, P, F, I, L = {}, R, z, B, V;;) {
550
+ if (P = d[d.length - 1], this.defaultActions[P] ? F = this.defaultActions[P] : (M ??= j(), F = h[P] && h[P][M]), F === void 0 || !F.length || !F[0]) {
551
+ var H = "";
552
+ for (R in V = [], h[P]) this.terminals_[R] && R > S && V.push("'" + this.terminals_[R] + "'");
553
+ H = T.showPosition ? "Parse error on line " + (_ + 1) + ":\n" + T.showPosition() + "\nExpecting " + V.join(", ") + ", got '" + (this.terminals_[M] || M) + "'" : "Parse error on line " + (_ + 1) + ": Unexpected " + (M == C ? "end of input" : "'" + (this.terminals_[M] || M) + "'"), this.parseError(H, {
554
+ text: T.match,
555
+ token: this.terminals_[M] || M,
556
+ line: T.yylineno,
557
+ loc: O,
558
+ expected: V
559
+ });
560
+ }
561
+ if (F[0] instanceof Array && F.length > 1) throw Error("Parse Error: multiple actions possible at state: " + P + ", token: " + M);
562
+ switch (F[0]) {
563
+ case 1:
564
+ d.push(M), p.push(T.yytext), m.push(T.yylloc), d.push(F[1]), M = null, N ? (M = N, N = null) : (v = T.yyleng, g = T.yytext, _ = T.yylineno, O = T.yylloc, b > 0 && b--);
565
+ break;
566
+ case 2:
567
+ if (z = this.productions_[F[1]][1], L.$ = p[p.length - z], L._$ = {
568
+ first_line: m[m.length - (z || 1)].first_line,
569
+ last_line: m[m.length - 1].last_line,
570
+ first_column: m[m.length - (z || 1)].first_column,
571
+ last_column: m[m.length - 1].last_column
572
+ }, k && (L._$.range = [m[m.length - (z || 1)].range[0], m[m.length - 1].range[1]]), I = this.performAction.apply(L, [
573
+ g,
574
+ v,
575
+ _,
576
+ E.yy,
577
+ F[1],
578
+ p,
579
+ m
580
+ ].concat(w)), I !== void 0) return I;
581
+ z && (d = d.slice(0, -1 * z * 2), p = p.slice(0, -1 * z), m = m.slice(0, -1 * z)), d.push(this.productions_[F[1]][0]), p.push(L.$), m.push(L._$), B = h[d[d.length - 2]][d[d.length - 1]], d.push(B);
582
+ break;
583
+ case 3: return !0;
584
+ }
585
+ }
586
+ return !0;
587
+ }, "parse")
588
+ };
589
+ p.lexer = /* @__PURE__ */ (function() {
590
+ return {
591
+ EOF: 1,
592
+ parseError: /* @__PURE__ */ __name(function(t, l) {
593
+ if (this.yy.parser) this.yy.parser.parseError(t, l);
594
+ else throw Error(t);
595
+ }, "parseError"),
596
+ setInput: /* @__PURE__ */ __name(function(t, l) {
597
+ return this.yy = l || this.yy || {}, this._input = t, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
598
+ first_line: 1,
599
+ first_column: 0,
600
+ last_line: 1,
601
+ last_column: 0
602
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
603
+ }, "setInput"),
604
+ input: /* @__PURE__ */ __name(function() {
605
+ var t = this._input[0];
606
+ return this.yytext += t, this.yyleng++, this.offset++, this.match += t, this.matched += t, t.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), t;
607
+ }, "input"),
608
+ unput: /* @__PURE__ */ __name(function(t) {
609
+ var l = t.length, u = t.split(/(?:\r\n?|\n)/g);
610
+ this._input = t + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - l), this.offset -= l;
611
+ var d = this.match.split(/(?:\r\n?|\n)/g);
612
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), u.length - 1 && (this.yylineno -= u.length - 1);
613
+ var f = this.yylloc.range;
614
+ return this.yylloc = {
615
+ first_line: this.yylloc.first_line,
616
+ last_line: this.yylineno + 1,
617
+ first_column: this.yylloc.first_column,
618
+ last_column: u ? (u.length === d.length ? this.yylloc.first_column : 0) + d[d.length - u.length].length - u[0].length : this.yylloc.first_column - l
619
+ }, this.options.ranges && (this.yylloc.range = [f[0], f[0] + this.yyleng - l]), this.yyleng = this.yytext.length, this;
620
+ }, "unput"),
621
+ more: /* @__PURE__ */ __name(function() {
622
+ return this._more = !0, this;
623
+ }, "more"),
624
+ reject: /* @__PURE__ */ __name(function() {
625
+ if (this.options.backtrack_lexer) this._backtrack = !0;
626
+ 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(), {
627
+ text: "",
628
+ token: null,
629
+ line: this.yylineno
630
+ });
631
+ return this;
632
+ }, "reject"),
633
+ less: /* @__PURE__ */ __name(function(t) {
634
+ this.unput(this.match.slice(t));
635
+ }, "less"),
636
+ pastInput: /* @__PURE__ */ __name(function() {
637
+ var t = this.matched.substr(0, this.matched.length - this.match.length);
638
+ return (t.length > 20 ? "..." : "") + t.substr(-20).replace(/\n/g, "");
639
+ }, "pastInput"),
640
+ upcomingInput: /* @__PURE__ */ __name(function() {
641
+ var t = this.match;
642
+ return t.length < 20 && (t += this._input.substr(0, 20 - t.length)), (t.substr(0, 20) + (t.length > 20 ? "..." : "")).replace(/\n/g, "");
643
+ }, "upcomingInput"),
644
+ showPosition: /* @__PURE__ */ __name(function() {
645
+ var t = this.pastInput(), l = Array(t.length + 1).join("-");
646
+ return t + this.upcomingInput() + "\n" + l + "^";
647
+ }, "showPosition"),
648
+ test_match: /* @__PURE__ */ __name(function(t, l) {
649
+ var u, d, f;
650
+ if (this.options.backtrack_lexer && (f = {
651
+ yylineno: this.yylineno,
652
+ yylloc: {
653
+ first_line: this.yylloc.first_line,
654
+ last_line: this.last_line,
655
+ first_column: this.yylloc.first_column,
656
+ last_column: this.yylloc.last_column
657
+ },
658
+ yytext: this.yytext,
659
+ match: this.match,
660
+ matches: this.matches,
661
+ matched: this.matched,
662
+ yyleng: this.yyleng,
663
+ offset: this.offset,
664
+ _more: this._more,
665
+ _input: this._input,
666
+ yy: this.yy,
667
+ conditionStack: this.conditionStack.slice(0),
668
+ done: this.done
669
+ }, this.options.ranges && (f.yylloc.range = this.yylloc.range.slice(0))), d = t[0].match(/(?:\r\n?|\n).*/g), d && (this.yylineno += d.length), this.yylloc = {
670
+ first_line: this.yylloc.last_line,
671
+ last_line: this.yylineno + 1,
672
+ first_column: this.yylloc.last_column,
673
+ last_column: d ? d[d.length - 1].length - d[d.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + t[0].length
674
+ }, this.yytext += t[0], this.match += t[0], this.matches = t, 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(t[0].length), this.matched += t[0], u = this.performAction.call(this, this.yy, this, l, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), u) return u;
675
+ if (this._backtrack) {
676
+ for (var p in f) this[p] = f[p];
677
+ return !1;
678
+ }
679
+ return !1;
680
+ }, "test_match"),
681
+ next: /* @__PURE__ */ __name(function() {
682
+ if (this.done) return this.EOF;
683
+ this._input || (this.done = !0);
684
+ var t, l, u, d;
685
+ this._more || (this.yytext = "", this.match = "");
686
+ for (var f = this._currentRules(), p = 0; p < f.length; p++) if (u = this._input.match(this.rules[f[p]]), u && (!l || u[0].length > l[0].length)) {
687
+ if (l = u, d = p, this.options.backtrack_lexer) {
688
+ if (t = this.test_match(u, f[p]), t !== !1) return t;
689
+ if (this._backtrack) {
690
+ l = !1;
691
+ continue;
692
+ } else return !1;
693
+ } else if (!this.options.flex) break;
694
+ }
695
+ return l ? (t = this.test_match(l, f[d]), t === !1 ? !1 : t) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
696
+ text: "",
697
+ token: null,
698
+ line: this.yylineno
699
+ });
700
+ }, "next"),
701
+ lex: /* @__PURE__ */ __name(function() {
702
+ return this.next() || this.lex();
703
+ }, "lex"),
704
+ begin: /* @__PURE__ */ __name(function(t) {
705
+ this.conditionStack.push(t);
706
+ }, "begin"),
707
+ popState: /* @__PURE__ */ __name(function() {
708
+ return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
709
+ }, "popState"),
710
+ _currentRules: /* @__PURE__ */ __name(function() {
711
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
712
+ }, "_currentRules"),
713
+ topState: /* @__PURE__ */ __name(function(t) {
714
+ return t = this.conditionStack.length - 1 - Math.abs(t || 0), t >= 0 ? this.conditionStack[t] : "INITIAL";
715
+ }, "topState"),
716
+ pushState: /* @__PURE__ */ __name(function(t) {
717
+ this.begin(t);
718
+ }, "pushState"),
719
+ stateStackSize: /* @__PURE__ */ __name(function() {
720
+ return this.conditionStack.length;
721
+ }, "stateStackSize"),
722
+ options: { "case-insensitive": !0 },
723
+ performAction: /* @__PURE__ */ __name(function(t, l, u, d) {
724
+ switch (u) {
725
+ case 0: return this.pushState("csv"), 4;
726
+ case 1: return this.pushState("csv"), 4;
727
+ case 2: return 10;
728
+ case 3: return 5;
729
+ case 4: return 12;
730
+ case 5: return this.pushState("escaped_text"), 18;
731
+ case 6: return 20;
732
+ case 7: return this.popState("escaped_text"), 18;
733
+ case 8: return 19;
734
+ }
735
+ }, "anonymous"),
736
+ rules: [
737
+ /^(?:sankey-beta\b)/i,
738
+ /^(?:sankey\b)/i,
739
+ /^(?:$)/i,
740
+ /^(?:((\u000D\u000A)|(\u000A)))/i,
741
+ /^(?:(\u002C))/i,
742
+ /^(?:(\u0022))/i,
743
+ /^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,
744
+ /^(?:(\u0022)(?!(\u0022)))/i,
745
+ /^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i
746
+ ],
747
+ conditions: {
748
+ csv: {
749
+ rules: [
750
+ 2,
751
+ 3,
752
+ 4,
753
+ 5,
754
+ 6,
755
+ 7,
756
+ 8
757
+ ],
758
+ inclusive: !1
759
+ },
760
+ escaped_text: {
761
+ rules: [7, 8],
762
+ inclusive: !1
763
+ },
764
+ INITIAL: {
765
+ rules: [
766
+ 0,
767
+ 1,
768
+ 2,
769
+ 3,
770
+ 4,
771
+ 5,
772
+ 6,
773
+ 7,
774
+ 8
775
+ ],
776
+ inclusive: !0
777
+ }
778
+ }
779
+ };
780
+ })();
781
+ function m() {
782
+ this.yy = {};
783
+ }
784
+ return __name(m, "Parser"), m.prototype = p, p.Parser = m, new m();
785
+ })();
786
+ parser.parser = parser;
787
+ var sankey_default = parser, links = [], nodes = [], nodesMap = /* @__PURE__ */ new Map(), clear2 = /* @__PURE__ */ __name(() => {
788
+ links = [], nodes = [], nodesMap = /* @__PURE__ */ new Map(), clear();
789
+ }, "clear"), SankeyLink = class {
790
+ constructor(t, l, u = 0) {
791
+ this.source = t, this.target = l, this.value = u;
792
+ }
793
+ static #e = __name(this, "SankeyLink");
794
+ }, addLink = /* @__PURE__ */ __name((t, l, u) => {
795
+ links.push(new SankeyLink(t, l, u));
796
+ }, "addLink"), SankeyNode = class {
797
+ constructor(t) {
798
+ this.ID = t;
799
+ }
800
+ static #e = __name(this, "SankeyNode");
801
+ }, sankeyDB_default = {
802
+ nodesMap,
803
+ getConfig: /* @__PURE__ */ __name(() => getConfig2().sankey, "getConfig"),
804
+ getNodes: /* @__PURE__ */ __name(() => nodes, "getNodes"),
805
+ getLinks: /* @__PURE__ */ __name(() => links, "getLinks"),
806
+ getGraph: /* @__PURE__ */ __name(() => ({
807
+ nodes: nodes.map((t) => ({ id: t.ID })),
808
+ links: links.map((t) => ({
809
+ source: t.source.ID,
810
+ target: t.target.ID,
811
+ value: t.value
812
+ }))
813
+ }), "getGraph"),
814
+ addLink,
815
+ findOrCreateNode: /* @__PURE__ */ __name((t) => {
816
+ t = common_default.sanitizeText(t, getConfig2());
817
+ let l = nodesMap.get(t);
818
+ return l === void 0 && (l = new SankeyNode(t), nodesMap.set(t, l), nodes.push(l)), l;
819
+ }, "findOrCreateNode"),
820
+ getAccTitle,
821
+ setAccTitle,
822
+ getAccDescription,
823
+ setAccDescription,
824
+ getDiagramTitle,
825
+ setDiagramTitle,
826
+ clear: clear2
827
+ }, Uid = class l {
828
+ static #e = __name(this, "Uid");
829
+ static #t = this.count = 0;
830
+ static next(t) {
831
+ return new l(t + ++l.count);
832
+ }
833
+ constructor(t) {
834
+ this.id = t, this.href = `#${t}`;
835
+ }
836
+ toString() {
837
+ return "url(" + this.href + ")";
838
+ }
839
+ }, alignmentsMap = {
840
+ left,
841
+ right,
842
+ center,
843
+ justify
844
+ }, sankeyRenderer_default = { draw: /* @__PURE__ */ __name(function(u, d, p, m) {
845
+ let { securityLevel: h, sankey: _ } = getConfig2(), b = defaultConfig2.sankey, S;
846
+ h === "sandbox" && (S = select_default("#i" + d));
847
+ let w = select_default(h === "sandbox" ? S.nodes()[0].contentDocument.body : "body"), E = h === "sandbox" ? w.select(`[id="${d}"]`) : select_default(`[id="${d}"]`), D = _?.width ?? b.width, O = _?.height ?? b.width, k = _?.useMaxWidth ?? b.useMaxWidth, A = _?.nodeAlignment ?? b.nodeAlignment, j = _?.prefix ?? b.prefix, M = _?.suffix ?? b.suffix, N = _?.showValues ?? b.showValues, P = m.db.getGraph(), F = alignmentsMap[A];
848
+ Sankey().nodeId((t) => t.id).nodeWidth(10).nodePadding(10 + (N ? 15 : 0)).nodeAlign(F).extent([[0, 0], [D, O]])(P);
849
+ let I = ordinal(Tableau10_default);
850
+ E.append("g").attr("class", "nodes").selectAll(".node").data(P.nodes).join("g").attr("class", "node").attr("id", (t) => (t.uid = Uid.next("node-")).id).attr("transform", function(t) {
851
+ return "translate(" + t.x0 + "," + t.y0 + ")";
852
+ }).attr("x", (t) => t.x0).attr("y", (t) => t.y0).append("rect").attr("height", (t) => t.y1 - t.y0).attr("width", (t) => t.x1 - t.x0).attr("fill", (t) => I(t.id));
853
+ let L = /* @__PURE__ */ __name(({ id: t, value: l }) => N ? `${t}
854
+ ${j}${Math.round(l * 100) / 100}${M}` : t, "getText");
855
+ E.append("g").attr("class", "node-labels").attr("font-size", 14).selectAll("text").data(P.nodes).join("text").attr("x", (t) => t.x0 < D / 2 ? t.x1 + 6 : t.x0 - 6).attr("y", (t) => (t.y1 + t.y0) / 2).attr("dy", `${N ? "0" : "0.35"}em`).attr("text-anchor", (t) => t.x0 < D / 2 ? "start" : "end").text(L);
856
+ let R = E.append("g").attr("class", "links").attr("fill", "none").attr("stroke-opacity", .5).selectAll(".link").data(P.links).join("g").attr("class", "link").style("mix-blend-mode", "multiply"), z = _?.linkColor ?? "gradient";
857
+ if (z === "gradient") {
858
+ let t = R.append("linearGradient").attr("id", (t) => (t.uid = Uid.next("linearGradient-")).id).attr("gradientUnits", "userSpaceOnUse").attr("x1", (t) => t.source.x1).attr("x2", (t) => t.target.x0);
859
+ t.append("stop").attr("offset", "0%").attr("stop-color", (t) => I(t.source.id)), t.append("stop").attr("offset", "100%").attr("stop-color", (t) => I(t.target.id));
860
+ }
861
+ let B;
862
+ switch (z) {
863
+ case "gradient":
864
+ B = /* @__PURE__ */ __name((t) => t.uid, "coloring");
865
+ break;
866
+ case "source":
867
+ B = /* @__PURE__ */ __name((t) => I(t.source.id), "coloring");
868
+ break;
869
+ case "target":
870
+ B = /* @__PURE__ */ __name((t) => I(t.target.id), "coloring");
871
+ break;
872
+ default: B = z;
873
+ }
874
+ R.append("path").attr("d", sankeyLinkHorizontal_default()).attr("stroke", B).attr("stroke-width", (t) => Math.max(1, t.width)), setupGraphViewbox(void 0, E, 0, k);
875
+ }, "draw") }, prepareTextForParsing = /* @__PURE__ */ __name((t) => t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g, "").replaceAll(/([\n\r])+/g, "\n").trim(), "prepareTextForParsing"), styles_default = /* @__PURE__ */ __name((t) => `.label {
876
+ font-family: ${t.fontFamily};
877
+ }`, "getStyles"), originalParse = sankey_default.parse.bind(sankey_default);
878
+ sankey_default.parse = (t) => originalParse(prepareTextForParsing(t));
879
+ var diagram = {
880
+ styles: styles_default,
881
+ parser: sankey_default,
882
+ db: sankeyDB_default,
883
+ renderer: sankeyRenderer_default
884
+ };
885
+ export { diagram };