@nxgt/material 1.12.3 → 1.16.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 (151) hide show
  1. package/README.md +5 -1
  2. package/dist/abnfDiagram-O67JEVCF-mm89LXw2.js +89 -0
  3. package/dist/architecture-7GRP2DOG-DDr0RGVC.js +3 -0
  4. package/dist/architectureDiagram-NJMV4G6O-CGoA5SIv.js +4146 -0
  5. package/dist/array-CApNbSU9.js +6 -0
  6. package/dist/blockDiagram-BEXU5L5S-Dq8gitB4.js +1946 -0
  7. package/dist/c4Diagram-YGBWAQC7-DO_alqIu.js +2990 -0
  8. package/dist/channel-1fT-W0NS.js +5 -0
  9. package/dist/chunk-2Q5K7J3B-kzxEEeTu.js +15 -0
  10. package/dist/chunk-3FUC2YCW-C3yD2fMw.js +364 -0
  11. package/dist/chunk-5DYCD2WN-Dn2jrYde.js +37 -0
  12. package/dist/chunk-5VM5RSS4-Cr17nBXp.js +5 -0
  13. package/dist/chunk-6AEJRKK7-JyfUnUEu.js +10 -0
  14. package/dist/chunk-742MDFTN-BbWkrtj2.js +275 -0
  15. package/dist/chunk-7INBJB4K-C3x7JNTG.js +4487 -0
  16. package/dist/chunk-7M6MHVWA-Cc7UTu4b.js +4256 -0
  17. package/dist/chunk-7PRAP22T-C8rsGRvH.js +67 -0
  18. package/dist/chunk-DUW6YSOI-BdOla2G8.js +10 -0
  19. package/dist/chunk-FOHPRMQF-Crq0JMf2.js +21388 -0
  20. package/dist/chunk-GNY47TPC-d-Bi8r0p.js +75 -0
  21. package/dist/chunk-GTNCS2PH-CTS015lZ.js +490 -0
  22. package/dist/chunk-GWA4HPMP-B4pgM-E1.js +61 -0
  23. package/dist/chunk-J5ZVWO5B-CYzz6Pq8.js +12 -0
  24. package/dist/chunk-JWPE2WC7-Ccb0QaC8.js +8 -0
  25. package/dist/chunk-LNGE3PJU-CiGrDO_F.js +1513 -0
  26. package/dist/chunk-MBY4JIJT-Dg6AeftH.js +1847 -0
  27. package/dist/chunk-NETBCI7D-TXZM0vKz.js +236 -0
  28. package/dist/chunk-O7XYJQB3-md6vjVm4.js +3922 -0
  29. package/dist/chunk-UA2S7LBM-DQTYPe9y.js +363 -0
  30. package/dist/chunk-WEXAMYUT-DmKWJz6y.js +26 -0
  31. package/dist/chunk-XXDRQBXY-C9XIYQdM.js +9 -0
  32. package/dist/chunk-Y2CYZVJY-i11wjrBe.js +12 -0
  33. package/dist/chunk-Z7XXMR3K-BoDf6lxl.js +677 -0
  34. package/dist/chunk-ZIGJFQKS-CP5430fN.js +663 -0
  35. package/dist/classDiagram-v2-NBCMYWYE-6KoTmufe.js +3397 -0
  36. package/dist/components.js +3 -3
  37. package/dist/cose-bilkent-JH36ORCC-CejnZl_t.js +2251 -0
  38. package/dist/cynefin-OW5HDTMX-B8HVdZhp.js +3 -0
  39. package/dist/cynefinDiagram-VND7K2PF-DZnc0dlm.js +349 -0
  40. package/dist/cytoscape.esm-_jXi1N4y.js +18151 -0
  41. package/dist/dagre-6A5THRUB-cuS57NO5.js +2192 -0
  42. package/dist/diagram-22UHCM2B-zQSFmH0t.js +5084 -0
  43. package/dist/diagram-3UASUU5V-D45Fgu1j.js +724 -0
  44. package/dist/diagram-ATOU4E4O-YMtQnlqd.js +432 -0
  45. package/dist/diagram-CDSNMT55-DP7UmEW1.js +301 -0
  46. package/dist/diagram-MLGK6HIB-WvSqrTRC.js +134 -0
  47. package/dist/diagram-MPIPVDR6-C2F3__mt.js +214 -0
  48. package/dist/dist-1DdJvBEt.js +50 -0
  49. package/dist/{dist-DGsPFADz.js → dist-DppLdkXt.js} +2 -2
  50. package/dist/dnd.js +2 -2
  51. package/dist/ebnfDiagram-ZINNZB2B-BZC6cSiy.js +100 -0
  52. package/dist/elk-276RUBZZ-7DJf1MEV.js +47598 -0
  53. package/dist/erDiagram-OPXOYQCR-YKlEVEF0.js +1970 -0
  54. package/dist/eventmodeling-NTZA5JFV-C1CEo-26.js +3 -0
  55. package/dist/flowDiagram-KWPJA3E3-DyLvzIlg.js +17 -0
  56. package/dist/ganttDiagram-FUAMR5RP-KIaOrYOF.js +2928 -0
  57. package/dist/gitGraph-4MIJSDKK-BTeCS_5q.js +3 -0
  58. package/dist/gitGraphDiagram-X574FWY7-DpFW-7JE.js +729 -0
  59. package/dist/graphlib-DFaO_iIU.js +372 -0
  60. package/dist/{hooks-BjSuqEof.js → hooks-C5xy0u03.js} +1 -1
  61. package/dist/hooks.js +1 -1
  62. package/dist/{i18n-DmVqVJXj.js → i18n-Cech9IAc.js} +328 -843
  63. package/dist/i18n.js +1 -1
  64. package/dist/info-A6RAGUB7-BvtuPd9C.js +3 -0
  65. package/dist/infoDiagram-VRGFBTTK-H3F-BCnu.js +20 -0
  66. package/dist/init-Buj1GKRa.js +27 -0
  67. package/dist/isArrayLikeObject-VG1KOJ3m.js +539 -0
  68. package/dist/ishikawaDiagram-OU5B5YK6-DgQDmcF3.js +719 -0
  69. package/dist/journeyDiagram-ZHPQQLJL-CanDOlfn.js +884 -0
  70. package/dist/kanban-definition-PNTS6WVX-DmnUgxgb.js +976 -0
  71. package/dist/katex-BMQ6LGsM.js +21962 -0
  72. package/dist/lib/components/index.d.ts +4 -0
  73. package/dist/lib/components/ui/action-card.d.ts +1 -1
  74. package/dist/lib/components/ui/chat/chat-composer-mentions.d.ts +8 -0
  75. package/dist/lib/components/ui/chat/chat-composer.d.ts +5 -1
  76. package/dist/lib/components/ui/chat/chat-markdown.d.ts +2 -2
  77. package/dist/lib/components/ui/emoji/emoji-list.d.ts +5 -0
  78. package/dist/lib/components/ui/emoji/emoji-picker.d.ts +7 -0
  79. package/dist/lib/components/ui/emoji/emoji.utils.d.ts +2 -0
  80. package/dist/lib/components/ui/emoji/emoji.utils.test.d.ts +1 -0
  81. package/dist/lib/components/ui/emoji/index.d.ts +4 -0
  82. package/dist/lib/components/ui/emoji/types.d.ts +6 -0
  83. package/dist/lib/components/ui/entity-header.stories.d.ts +1 -0
  84. package/dist/lib/components/ui/kanban/kanban.stories.d.ts +1 -0
  85. package/dist/lib/components/ui/markdown/index.d.ts +3 -0
  86. package/dist/lib/components/ui/markdown/markdown.d.ts +7 -0
  87. package/dist/lib/components/ui/markdown/markdown.stories.d.ts +14 -0
  88. package/dist/lib/components/ui/markdown/markdown.test.d.ts +1 -0
  89. package/dist/lib/components/ui/markdown/markdown.utils.d.ts +1 -0
  90. package/dist/lib/components/ui/markdown/mermaid.lazy.d.ts +12 -0
  91. package/dist/lib/components/ui/markdown/partials/markdown-code.d.ts +2 -0
  92. package/dist/lib/components/ui/markdown/partials/mermaid-diagram.d.ts +4 -0
  93. package/dist/lib/components/ui/mentions/index.d.ts +3 -0
  94. package/dist/lib/components/ui/mentions/mention-list.d.ts +8 -0
  95. package/dist/lib/components/ui/mentions/mentions.utils.d.ts +7 -0
  96. package/dist/lib/components/ui/mentions/mentions.utils.test.d.ts +1 -0
  97. package/dist/lib/components/ui/mentions/types.d.ts +7 -0
  98. package/dist/lib/components/ui/rich-text-editor/extensions/mention/mention-list.d.ts +12 -1
  99. package/dist/lib/components/ui/terminal/index.d.ts +2 -0
  100. package/dist/lib/components/ui/terminal/terminal.d.ts +11 -0
  101. package/dist/lib/components/ui/terminal/terminal.stories.d.ts +14 -0
  102. package/dist/lib/components/ui/terminal/terminal.utils.d.ts +5 -0
  103. package/dist/lib/components/ui/terminal/terminal.utils.test.d.ts +1 -0
  104. package/dist/lib/i18n/resources/en/index.d.ts +13 -0
  105. package/dist/lib/i18n/resources/en/material.json.d.ts +14 -1
  106. package/dist/lib/i18n/resources/fr/index.d.ts +13 -0
  107. package/dist/lib/i18n/resources/fr/material.json.d.ts +14 -1
  108. package/dist/lib/i18n/resources/index.d.ts +26 -0
  109. package/dist/lib/i18n/translator.d.ts +1 -1
  110. package/dist/{lib-B1KXma-r.js → lib-Bbw5QPoj.js} +472 -471
  111. package/dist/lib.js +2 -2
  112. package/dist/{main-Cw-Yaqo9.js → main-BjDU9FDM.js} +58614 -29566
  113. package/dist/main.js +6 -6
  114. package/dist/material.css +1 -1
  115. package/dist/math-C5EhTgJw.js +10 -0
  116. package/dist/mermaid-parser.core-Cz-MfB4Z.js +638 -0
  117. package/dist/mermaid.core-BI1sunfX.js +1096 -0
  118. package/dist/mindmap-definition-NLK3R4M7-DW0BIU_q.js +1008 -0
  119. package/dist/ordinal-DuP05kVQ.js +65 -0
  120. package/dist/packet-AYTQ26CC-CshIswP8.js +3 -0
  121. package/dist/path-Cjou0lUh.js +85 -0
  122. package/dist/pegDiagram-GJSIUBJH-CJIx0u4M.js +94 -0
  123. package/dist/pie-WAS4IAKB-CYs22y4X.js +3 -0
  124. package/dist/pieDiagram-5QR66LMP-zAhv5fKz.js +157 -0
  125. package/dist/quadrantDiagram-O4NWA36T-CO4n_yQo.js +2001 -0
  126. package/dist/radar-RG4KPBEZ-BOJKjbGv.js +3 -0
  127. package/dist/railroad-74A4TZTK-Dt1BmUkI.js +3 -0
  128. package/dist/railroad-abnf-HS5TGJTU-Cs9GMUMY.js +3 -0
  129. package/dist/railroad-ebnf-LZEXJU2U-D4y0fXoW.js +3 -0
  130. package/dist/railroad-peg-WCYAUIDC-D2f_ZNR5.js +3 -0
  131. package/dist/railroadDiagram-XR7U4H2S-B8iV7mfe.js +76 -0
  132. package/dist/requirementDiagram-PLB6GJNP-CGoX1NrW.js +2228 -0
  133. package/dist/rough.esm-rcMoXTJj.js +1352 -0
  134. package/dist/sankeyDiagram-IPEJSGJF-DdSM2wiI.js +962 -0
  135. package/dist/sequenceDiagram-PO4LG4MO-CCRqF5XO.js +4200 -0
  136. package/dist/sizeCapture-INFHLROL-CHXIsPO_.js +46 -0
  137. package/dist/src-B4npqWNl.js +1775 -0
  138. package/dist/stateDiagram-v2-GCMORJYK-CQTX5ks8.js +2143 -0
  139. package/dist/step-B6KjpKgN.js +706 -0
  140. package/dist/string-B-ZWXCs2.js +392 -0
  141. package/dist/swimlanes-2SLR337P-C2NNOb5n.js +4763 -0
  142. package/dist/swimlanesDiagram-TC7HE7FX-CPsqPrbP.js +28 -0
  143. package/dist/timeline-definition-EJHVYXUP-DuxGHv-N.js +1073 -0
  144. package/dist/treeView-Q6P3EWNA-BrJylG9N.js +3 -0
  145. package/dist/treemap-WGGIJYW6-DpIZuqbj.js +3 -0
  146. package/dist/usecaseDiagram-POWQR4AR-cuAeIBW3.js +9932 -0
  147. package/dist/vennDiagram-UO4OBE2U-DLwBSAnC.js +1880 -0
  148. package/dist/wardley-WFR3VGLG-CbwdAAbH.js +3 -0
  149. package/dist/wardleyDiagram-VNRHLVJA-D7IZU6vu.js +645 -0
  150. package/dist/xychartDiagram-PMCCYNJV-BDOFv_xK.js +2167 -0
  151. package/package.json +7 -1
@@ -0,0 +1,962 @@
1
+ import { bl as e } from "./main-BjDU9FDM.js";
2
+ import { t } from "./src-B4npqWNl.js";
3
+ import { t as n } from "./ordinal-DuP05kVQ.js";
4
+ import { n as r } from "./chunk-Y2CYZVJY-i11wjrBe.js";
5
+ import { H as i, U as a, Y as o, a as s, d as c, q as l, s as u, v as d, w as f, x as p, y as m } from "./chunk-O7XYJQB3-md6vjVm4.js";
6
+ //#region node_modules/d3-sankey/node_modules/d3-array/src/max.js
7
+ function h(e, t) {
8
+ let n;
9
+ if (t === void 0) for (let t of e) t != null && (n < t || n === void 0 && t >= t) && (n = t);
10
+ else {
11
+ let r = -1;
12
+ for (let i of e) (i = t(i, ++r, e)) != null && (n < i || n === void 0 && i >= i) && (n = i);
13
+ }
14
+ return n;
15
+ }
16
+ //#endregion
17
+ //#region node_modules/d3-sankey/node_modules/d3-array/src/min.js
18
+ function g(e, t) {
19
+ let n;
20
+ if (t === void 0) for (let t of e) t != null && (n > t || n === void 0 && t >= t) && (n = t);
21
+ else {
22
+ let r = -1;
23
+ for (let i of e) (i = t(i, ++r, e)) != null && (n > i || n === void 0 && i >= i) && (n = i);
24
+ }
25
+ return n;
26
+ }
27
+ //#endregion
28
+ //#region node_modules/d3-sankey/node_modules/d3-array/src/sum.js
29
+ function _(e, t) {
30
+ let n = 0;
31
+ if (t === void 0) for (let t of e) (t = +t) && (n += t);
32
+ else {
33
+ let r = -1;
34
+ for (let i of e) (i = +t(i, ++r, e)) && (n += i);
35
+ }
36
+ return n;
37
+ }
38
+ //#endregion
39
+ //#region node_modules/d3-sankey/src/align.js
40
+ function v(e) {
41
+ return e.target.depth;
42
+ }
43
+ function y(e) {
44
+ return e.depth;
45
+ }
46
+ function b(e, t) {
47
+ return t - 1 - e.height;
48
+ }
49
+ function x(e, t) {
50
+ return e.sourceLinks.length ? e.depth : t - 1;
51
+ }
52
+ function S(e) {
53
+ return e.targetLinks.length ? e.depth : e.sourceLinks.length ? g(e.sourceLinks, v) - 1 : 0;
54
+ }
55
+ //#endregion
56
+ //#region node_modules/d3-sankey/src/constant.js
57
+ function C(e) {
58
+ return function() {
59
+ return e;
60
+ };
61
+ }
62
+ //#endregion
63
+ //#region node_modules/d3-sankey/src/sankey.js
64
+ function w(e, t) {
65
+ return E(e.source, t.source) || e.index - t.index;
66
+ }
67
+ function T(e, t) {
68
+ return E(e.target, t.target) || e.index - t.index;
69
+ }
70
+ function E(e, t) {
71
+ return e.y0 - t.y0;
72
+ }
73
+ function D(e) {
74
+ return e.value;
75
+ }
76
+ function O(e) {
77
+ return e.index;
78
+ }
79
+ function k(e) {
80
+ return e.nodes;
81
+ }
82
+ function A(e) {
83
+ return e.links;
84
+ }
85
+ function j(e, t) {
86
+ let n = e.get(t);
87
+ if (!n) throw Error("missing: " + t);
88
+ return n;
89
+ }
90
+ function M({ nodes: e }) {
91
+ for (let t of e) {
92
+ let e = t.y0, n = e;
93
+ for (let n of t.sourceLinks) n.y0 = e + n.width / 2, e += n.width;
94
+ for (let e of t.targetLinks) e.y1 = n + e.width / 2, n += e.width;
95
+ }
96
+ }
97
+ function N() {
98
+ let e = 0, t = 0, n = 1, r = 1, i = 24, a = 8, o, s = O, c = x, l, u, d = k, f = A, p = 6;
99
+ function m() {
100
+ let e = {
101
+ nodes: d.apply(null, arguments),
102
+ links: f.apply(null, arguments)
103
+ };
104
+ return v(e), y(e), b(e), S(e), F(e), M(e), e;
105
+ }
106
+ m.update = function(e) {
107
+ return M(e), e;
108
+ }, m.nodeId = function(e) {
109
+ return arguments.length ? (s = typeof e == "function" ? e : C(e), m) : s;
110
+ }, m.nodeAlign = function(e) {
111
+ return arguments.length ? (c = typeof e == "function" ? e : C(e), m) : c;
112
+ }, m.nodeSort = function(e) {
113
+ return arguments.length ? (l = e, m) : l;
114
+ }, m.nodeWidth = function(e) {
115
+ return arguments.length ? (i = +e, m) : i;
116
+ }, m.nodePadding = function(e) {
117
+ return arguments.length ? (a = o = +e, m) : a;
118
+ }, m.nodes = function(e) {
119
+ return arguments.length ? (d = typeof e == "function" ? e : C(e), m) : d;
120
+ }, m.links = function(e) {
121
+ return arguments.length ? (f = typeof e == "function" ? e : C(e), m) : f;
122
+ }, m.linkSort = function(e) {
123
+ return arguments.length ? (u = e, m) : u;
124
+ }, m.size = function(i) {
125
+ return arguments.length ? (e = t = 0, n = +i[0], r = +i[1], m) : [n - e, r - t];
126
+ }, m.extent = function(i) {
127
+ return arguments.length ? (e = +i[0][0], n = +i[1][0], t = +i[0][1], r = +i[1][1], m) : [[e, t], [n, r]];
128
+ }, m.iterations = function(e) {
129
+ return arguments.length ? (p = +e, m) : p;
130
+ };
131
+ function v({ nodes: e, links: t }) {
132
+ for (let [t, n] of e.entries()) n.index = t, n.sourceLinks = [], n.targetLinks = [];
133
+ let n = new Map(e.map((t, n) => [s(t, n, e), t]));
134
+ for (let [e, r] of t.entries()) {
135
+ r.index = e;
136
+ let { source: t, target: i } = r;
137
+ typeof t != "object" && (t = r.source = j(n, t)), typeof i != "object" && (i = r.target = j(n, i)), t.sourceLinks.push(r), i.targetLinks.push(r);
138
+ }
139
+ if (u != null) for (let { sourceLinks: t, targetLinks: n } of e) t.sort(u), n.sort(u);
140
+ }
141
+ function y({ nodes: e }) {
142
+ for (let t of e) t.value = t.fixedValue === void 0 ? Math.max(_(t.sourceLinks, D), _(t.targetLinks, D)) : t.fixedValue;
143
+ }
144
+ function b({ nodes: e }) {
145
+ let t = e.length, n = new Set(e), r = /* @__PURE__ */ new Set(), i = 0;
146
+ for (; n.size;) {
147
+ for (let e of n) {
148
+ e.depth = i;
149
+ for (let { target: t } of e.sourceLinks) r.add(t);
150
+ }
151
+ if (++i > t) throw Error("circular link");
152
+ n = r, r = /* @__PURE__ */ new Set();
153
+ }
154
+ }
155
+ function S({ nodes: e }) {
156
+ let t = e.length, n = new Set(e), r = /* @__PURE__ */ new Set(), i = 0;
157
+ for (; n.size;) {
158
+ for (let e of n) {
159
+ e.height = i;
160
+ for (let { source: t } of e.targetLinks) r.add(t);
161
+ }
162
+ if (++i > t) throw Error("circular link");
163
+ n = r, r = /* @__PURE__ */ new Set();
164
+ }
165
+ }
166
+ function N({ nodes: t }) {
167
+ let r = h(t, (e) => e.depth) + 1, a = (n - e - i) / (r - 1), o = Array(r);
168
+ for (let n of t) {
169
+ let t = Math.max(0, Math.min(r - 1, Math.floor(c.call(null, n, r))));
170
+ n.layer = t, n.x0 = e + t * a, n.x1 = n.x0 + i, o[t] ? o[t].push(n) : o[t] = [n];
171
+ }
172
+ if (l) for (let e of o) e.sort(l);
173
+ return o;
174
+ }
175
+ function P(e) {
176
+ let n = g(e, (e) => (r - t - (e.length - 1) * o) / _(e, D));
177
+ for (let i of e) {
178
+ let e = t;
179
+ for (let t of i) {
180
+ t.y0 = e, t.y1 = e + t.value * n, e = t.y1 + o;
181
+ for (let e of t.sourceLinks) e.width = e.value * n;
182
+ }
183
+ e = (r - e + o) / (i.length + 1);
184
+ for (let t = 0; t < i.length; ++t) {
185
+ let n = i[t];
186
+ n.y0 += e * (t + 1), n.y1 += e * (t + 1);
187
+ }
188
+ H(i);
189
+ }
190
+ }
191
+ function F(e) {
192
+ let n = N(e);
193
+ o = Math.min(a, (r - t) / (h(n, (e) => e.length) - 1)), P(n);
194
+ for (let e = 0; e < p; ++e) {
195
+ let t = .99 ** e, r = Math.max(1 - t, (e + 1) / p);
196
+ L(n, t, r), I(n, t, r);
197
+ }
198
+ }
199
+ function I(e, t, n) {
200
+ for (let r = 1, i = e.length; r < i; ++r) {
201
+ let i = e[r];
202
+ for (let e of i) {
203
+ let n = 0, r = 0;
204
+ for (let { source: t, value: i } of e.targetLinks) {
205
+ let a = i * (e.layer - t.layer);
206
+ n += U(t, e) * a, r += a;
207
+ }
208
+ if (!(r > 0)) continue;
209
+ let i = (n / r - e.y0) * t;
210
+ e.y0 += i, e.y1 += i, V(e);
211
+ }
212
+ l === void 0 && i.sort(E), R(i, n);
213
+ }
214
+ }
215
+ function L(e, t, n) {
216
+ for (let r = e.length - 2; r >= 0; --r) {
217
+ let i = e[r];
218
+ for (let e of i) {
219
+ let n = 0, r = 0;
220
+ for (let { target: t, value: i } of e.sourceLinks) {
221
+ let a = i * (t.layer - e.layer);
222
+ n += W(e, t) * a, r += a;
223
+ }
224
+ if (!(r > 0)) continue;
225
+ let i = (n / r - e.y0) * t;
226
+ e.y0 += i, e.y1 += i, V(e);
227
+ }
228
+ l === void 0 && i.sort(E), R(i, n);
229
+ }
230
+ }
231
+ function R(e, n) {
232
+ let i = e.length >> 1, a = e[i];
233
+ B(e, a.y0 - o, i - 1, n), z(e, a.y1 + o, i + 1, n), B(e, r, e.length - 1, n), z(e, t, 0, n);
234
+ }
235
+ function z(e, t, n, r) {
236
+ for (; n < e.length; ++n) {
237
+ let i = e[n], a = (t - i.y0) * r;
238
+ a > 1e-6 && (i.y0 += a, i.y1 += a), t = i.y1 + o;
239
+ }
240
+ }
241
+ function B(e, t, n, r) {
242
+ for (; n >= 0; --n) {
243
+ let i = e[n], a = (i.y1 - t) * r;
244
+ a > 1e-6 && (i.y0 -= a, i.y1 -= a), t = i.y0 - o;
245
+ }
246
+ }
247
+ function V({ sourceLinks: e, targetLinks: t }) {
248
+ if (u === void 0) {
249
+ for (let { source: { sourceLinks: e } } of t) e.sort(T);
250
+ for (let { target: { targetLinks: t } } of e) t.sort(w);
251
+ }
252
+ }
253
+ function H(e) {
254
+ if (u === void 0) for (let { sourceLinks: t, targetLinks: n } of e) t.sort(T), n.sort(w);
255
+ }
256
+ function U(e, t) {
257
+ let n = e.y0 - (e.sourceLinks.length - 1) * o / 2;
258
+ for (let { target: r, width: i } of e.sourceLinks) {
259
+ if (r === t) break;
260
+ n += i + o;
261
+ }
262
+ for (let { source: r, width: i } of t.targetLinks) {
263
+ if (r === e) break;
264
+ n -= i;
265
+ }
266
+ return n;
267
+ }
268
+ function W(e, t) {
269
+ let n = t.y0 - (t.targetLinks.length - 1) * o / 2;
270
+ for (let { source: r, width: i } of t.targetLinks) {
271
+ if (r === e) break;
272
+ n += i + o;
273
+ }
274
+ for (let { target: r, width: i } of e.sourceLinks) {
275
+ if (r === t) break;
276
+ n -= i;
277
+ }
278
+ return n;
279
+ }
280
+ return m;
281
+ }
282
+ //#endregion
283
+ //#region node_modules/d3-sankey/node_modules/d3-shape/node_modules/d3-path/src/path.js
284
+ var P = Math.PI, F = 2 * P, I = 1e-6, L = F - I;
285
+ function R() {
286
+ this._x0 = this._y0 = this._x1 = this._y1 = null, this._ = "";
287
+ }
288
+ function z() {
289
+ return new R();
290
+ }
291
+ R.prototype = z.prototype = {
292
+ constructor: R,
293
+ moveTo: function(e, t) {
294
+ this._ += "M" + (this._x0 = this._x1 = +e) + "," + (this._y0 = this._y1 = +t);
295
+ },
296
+ closePath: function() {
297
+ this._x1 !== null && (this._x1 = this._x0, this._y1 = this._y0, this._ += "Z");
298
+ },
299
+ lineTo: function(e, t) {
300
+ this._ += "L" + (this._x1 = +e) + "," + (this._y1 = +t);
301
+ },
302
+ quadraticCurveTo: function(e, t, n, r) {
303
+ this._ += "Q" + +e + "," + +t + "," + (this._x1 = +n) + "," + (this._y1 = +r);
304
+ },
305
+ bezierCurveTo: function(e, t, n, r, i, a) {
306
+ this._ += "C" + +e + "," + +t + "," + +n + "," + +r + "," + (this._x1 = +i) + "," + (this._y1 = +a);
307
+ },
308
+ arcTo: function(e, t, n, r, i) {
309
+ e = +e, t = +t, n = +n, r = +r, i = +i;
310
+ var a = this._x1, o = this._y1, s = n - e, c = r - t, l = a - e, u = o - t, d = l * l + u * u;
311
+ if (i < 0) throw Error("negative radius: " + i);
312
+ if (this._x1 === null) this._ += "M" + (this._x1 = e) + "," + (this._y1 = t);
313
+ else if (d > I) if (!(Math.abs(u * s - c * l) > I) || !i) this._ += "L" + (this._x1 = e) + "," + (this._y1 = t);
314
+ else {
315
+ var f = n - a, p = r - o, m = s * s + c * c, h = f * f + p * p, g = Math.sqrt(m), _ = Math.sqrt(d), v = i * Math.tan((P - Math.acos((m + d - h) / (2 * g * _))) / 2), y = v / _, b = v / g;
316
+ Math.abs(y - 1) > I && (this._ += "L" + (e + y * l) + "," + (t + y * u)), this._ += "A" + i + "," + i + ",0,0," + +(u * f > l * p) + "," + (this._x1 = e + b * s) + "," + (this._y1 = t + b * c);
317
+ }
318
+ },
319
+ arc: function(e, t, n, r, i, a) {
320
+ e = +e, t = +t, n = +n, a = !!a;
321
+ var o = n * Math.cos(r), s = n * Math.sin(r), c = e + o, l = t + s, u = 1 ^ a, d = a ? r - i : i - r;
322
+ if (n < 0) throw Error("negative radius: " + n);
323
+ this._x1 === null ? this._ += "M" + c + "," + l : (Math.abs(this._x1 - c) > I || Math.abs(this._y1 - l) > I) && (this._ += "L" + c + "," + l), n && (d < 0 && (d = d % F + F), d > L ? this._ += "A" + n + "," + n + ",0,1," + u + "," + (e - o) + "," + (t - s) + "A" + n + "," + n + ",0,1," + u + "," + (this._x1 = c) + "," + (this._y1 = l) : d > I && (this._ += "A" + n + "," + n + ",0," + +(d >= P) + "," + u + "," + (this._x1 = e + n * Math.cos(i)) + "," + (this._y1 = t + n * Math.sin(i))));
324
+ },
325
+ rect: function(e, t, n, r) {
326
+ this._ += "M" + (this._x0 = this._x1 = +e) + "," + (this._y0 = this._y1 = +t) + "h" + +n + "v" + +r + "h" + -n + "Z";
327
+ },
328
+ toString: function() {
329
+ return this._;
330
+ }
331
+ };
332
+ //#endregion
333
+ //#region node_modules/d3-sankey/node_modules/d3-shape/src/constant.js
334
+ function B(e) {
335
+ return function() {
336
+ return e;
337
+ };
338
+ }
339
+ //#endregion
340
+ //#region node_modules/d3-sankey/node_modules/d3-shape/src/point.js
341
+ function V(e) {
342
+ return e[0];
343
+ }
344
+ function H(e) {
345
+ return e[1];
346
+ }
347
+ //#endregion
348
+ //#region node_modules/d3-sankey/node_modules/d3-shape/src/array.js
349
+ var U = Array.prototype.slice;
350
+ //#endregion
351
+ //#region node_modules/d3-sankey/node_modules/d3-shape/src/link/index.js
352
+ function W(e) {
353
+ return e.source;
354
+ }
355
+ function G(e) {
356
+ return e.target;
357
+ }
358
+ function K(e) {
359
+ var t = W, n = G, r = V, i = H, a = null;
360
+ function o() {
361
+ var o, s = U.call(arguments), c = t.apply(this, s), l = n.apply(this, s);
362
+ if (a ||= o = z(), e(a, +r.apply(this, (s[0] = c, s)), +i.apply(this, s), +r.apply(this, (s[0] = l, s)), +i.apply(this, s)), o) return a = null, o + "" || null;
363
+ }
364
+ return o.source = function(e) {
365
+ return arguments.length ? (t = e, o) : t;
366
+ }, o.target = function(e) {
367
+ return arguments.length ? (n = e, o) : n;
368
+ }, o.x = function(e) {
369
+ return arguments.length ? (r = typeof e == "function" ? e : B(+e), o) : r;
370
+ }, o.y = function(e) {
371
+ return arguments.length ? (i = typeof e == "function" ? e : B(+e), o) : i;
372
+ }, o.context = function(e) {
373
+ return arguments.length ? (a = e ?? null, o) : a;
374
+ }, o;
375
+ }
376
+ function ee(e, t, n, r, i) {
377
+ e.moveTo(t, n), e.bezierCurveTo(t = (t + r) / 2, n, t, i, r, i);
378
+ }
379
+ function te() {
380
+ return K(ee);
381
+ }
382
+ //#endregion
383
+ //#region node_modules/d3-sankey/src/sankeyLinkHorizontal.js
384
+ function ne(e) {
385
+ return [e.source.x1, e.y0];
386
+ }
387
+ function re(e) {
388
+ return [e.target.x0, e.y1];
389
+ }
390
+ function ie() {
391
+ return te().source(ne).target(re);
392
+ }
393
+ //#endregion
394
+ //#region node_modules/mermaid/dist/chunks/mermaid.core/sankeyDiagram-IPEJSGJF.mjs
395
+ var q = (function() {
396
+ var e = /* @__PURE__ */ r(function(e, t, n, r) {
397
+ for (n ||= {}, r = e.length; r--; n[e[r]] = t);
398
+ return n;
399
+ }, "o"), t = [1, 9], n = [1, 10], i = [
400
+ 1,
401
+ 5,
402
+ 10,
403
+ 12
404
+ ], a = {
405
+ trace: /* @__PURE__ */ r(function() {}, "trace"),
406
+ yy: {},
407
+ symbols_: {
408
+ error: 2,
409
+ start: 3,
410
+ SANKEY: 4,
411
+ NEWLINE: 5,
412
+ csv: 6,
413
+ opt_eof: 7,
414
+ record: 8,
415
+ csv_tail: 9,
416
+ EOF: 10,
417
+ "field[source]": 11,
418
+ COMMA: 12,
419
+ "field[target]": 13,
420
+ "field[value]": 14,
421
+ field: 15,
422
+ escaped: 16,
423
+ non_escaped: 17,
424
+ DQUOTE: 18,
425
+ ESCAPED_TEXT: 19,
426
+ NON_ESCAPED_TEXT: 20,
427
+ $accept: 0,
428
+ $end: 1
429
+ },
430
+ terminals_: {
431
+ 2: "error",
432
+ 4: "SANKEY",
433
+ 5: "NEWLINE",
434
+ 10: "EOF",
435
+ 11: "field[source]",
436
+ 12: "COMMA",
437
+ 13: "field[target]",
438
+ 14: "field[value]",
439
+ 18: "DQUOTE",
440
+ 19: "ESCAPED_TEXT",
441
+ 20: "NON_ESCAPED_TEXT"
442
+ },
443
+ productions_: [
444
+ 0,
445
+ [3, 4],
446
+ [6, 2],
447
+ [9, 2],
448
+ [9, 0],
449
+ [7, 1],
450
+ [7, 0],
451
+ [8, 5],
452
+ [15, 1],
453
+ [15, 1],
454
+ [16, 3],
455
+ [17, 1]
456
+ ],
457
+ performAction: /* @__PURE__ */ r(function(e, t, n, r, i, a, o) {
458
+ var s = a.length - 1;
459
+ switch (i) {
460
+ case 7:
461
+ let e = r.findOrCreateNode(a[s - 4].trim().replaceAll("\"\"", "\"")), t = r.findOrCreateNode(a[s - 2].trim().replaceAll("\"\"", "\"")), n = parseFloat(a[s].trim());
462
+ r.addLink(e, t, n);
463
+ break;
464
+ case 8:
465
+ case 9:
466
+ case 11:
467
+ this.$ = a[s];
468
+ break;
469
+ case 10:
470
+ this.$ = a[s - 1];
471
+ break;
472
+ }
473
+ }, "anonymous"),
474
+ table: [
475
+ {
476
+ 3: 1,
477
+ 4: [1, 2]
478
+ },
479
+ { 1: [3] },
480
+ { 5: [1, 3] },
481
+ {
482
+ 6: 4,
483
+ 8: 5,
484
+ 15: 6,
485
+ 16: 7,
486
+ 17: 8,
487
+ 18: t,
488
+ 20: n
489
+ },
490
+ {
491
+ 1: [2, 6],
492
+ 7: 11,
493
+ 10: [1, 12]
494
+ },
495
+ e(n, [2, 4], {
496
+ 9: 13,
497
+ 5: [1, 14]
498
+ }),
499
+ { 12: [1, 15] },
500
+ e(i, [2, 8]),
501
+ e(i, [2, 9]),
502
+ { 19: [1, 16] },
503
+ e(i, [2, 11]),
504
+ { 1: [2, 1] },
505
+ { 1: [2, 5] },
506
+ e(n, [2, 2]),
507
+ {
508
+ 6: 17,
509
+ 8: 5,
510
+ 15: 6,
511
+ 16: 7,
512
+ 17: 8,
513
+ 18: t,
514
+ 20: n
515
+ },
516
+ {
517
+ 15: 18,
518
+ 16: 7,
519
+ 17: 8,
520
+ 18: t,
521
+ 20: n
522
+ },
523
+ { 18: [1, 19] },
524
+ e(n, [2, 3]),
525
+ { 12: [1, 20] },
526
+ e(i, [2, 10]),
527
+ {
528
+ 15: 21,
529
+ 16: 7,
530
+ 17: 8,
531
+ 18: t,
532
+ 20: n
533
+ },
534
+ e([
535
+ 1,
536
+ 5,
537
+ 10
538
+ ], [2, 7])
539
+ ],
540
+ defaultActions: {
541
+ 11: [2, 1],
542
+ 12: [2, 5]
543
+ },
544
+ parseError: /* @__PURE__ */ r(function(e, t) {
545
+ if (t.recoverable) this.trace(e);
546
+ else {
547
+ var n = Error(e);
548
+ throw n.hash = t, n;
549
+ }
550
+ }, "parseError"),
551
+ parse: /* @__PURE__ */ r(function(e) {
552
+ var t = this, n = [0], i = [], a = [null], o = [], s = this.table, c = "", l = 0, u = 0, d = 0, f = 2, p = 1, m = o.slice.call(arguments, 1), h = Object.create(this.lexer), g = { yy: {} };
553
+ for (var _ in this.yy) Object.prototype.hasOwnProperty.call(this.yy, _) && (g.yy[_] = this.yy[_]);
554
+ h.setInput(e, g.yy), g.yy.lexer = h, g.yy.parser = this, h.yylloc === void 0 && (h.yylloc = {});
555
+ var v = h.yylloc;
556
+ o.push(v);
557
+ var y = h.options && h.options.ranges;
558
+ typeof g.yy.parseError == "function" ? this.parseError = g.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
559
+ function b(e) {
560
+ n.length -= 2 * e, a.length -= e, o.length -= e;
561
+ }
562
+ r(b, "popStack");
563
+ function x() {
564
+ var e = i.pop() || h.lex() || p;
565
+ return typeof e != "number" && (e instanceof Array && (i = e, e = i.pop()), e = t.symbols_[e] || e), e;
566
+ }
567
+ r(x, "lex");
568
+ for (var S, C, w, T, E, D = {}, O, k, A, j;;) {
569
+ if (w = n[n.length - 1], this.defaultActions[w] ? T = this.defaultActions[w] : (S ??= x(), T = s[w] && s[w][S]), T === void 0 || !T.length || !T[0]) {
570
+ var M = "";
571
+ for (O in j = [], s[w]) this.terminals_[O] && O > f && j.push("'" + this.terminals_[O] + "'");
572
+ M = h.showPosition ? "Parse error on line " + (l + 1) + ":\n" + h.showPosition() + "\nExpecting " + j.join(", ") + ", got '" + (this.terminals_[S] || S) + "'" : "Parse error on line " + (l + 1) + ": Unexpected " + (S == p ? "end of input" : "'" + (this.terminals_[S] || S) + "'"), this.parseError(M, {
573
+ text: h.match,
574
+ token: this.terminals_[S] || S,
575
+ line: h.yylineno,
576
+ loc: v,
577
+ expected: j
578
+ });
579
+ }
580
+ if (T[0] instanceof Array && T.length > 1) throw Error("Parse Error: multiple actions possible at state: " + w + ", token: " + S);
581
+ switch (T[0]) {
582
+ case 1:
583
+ n.push(S), a.push(h.yytext), o.push(h.yylloc), n.push(T[1]), S = null, C ? (S = C, C = null) : (u = h.yyleng, c = h.yytext, l = h.yylineno, v = h.yylloc, d > 0 && d--);
584
+ break;
585
+ case 2:
586
+ if (k = this.productions_[T[1]][1], D.$ = a[a.length - k], D._$ = {
587
+ first_line: o[o.length - (k || 1)].first_line,
588
+ last_line: o[o.length - 1].last_line,
589
+ first_column: o[o.length - (k || 1)].first_column,
590
+ last_column: o[o.length - 1].last_column
591
+ }, y && (D._$.range = [o[o.length - (k || 1)].range[0], o[o.length - 1].range[1]]), E = this.performAction.apply(D, [
592
+ c,
593
+ u,
594
+ l,
595
+ g.yy,
596
+ T[1],
597
+ a,
598
+ o
599
+ ].concat(m)), E !== void 0) return E;
600
+ k && (n = n.slice(0, -1 * k * 2), a = a.slice(0, -1 * k), o = o.slice(0, -1 * k)), n.push(this.productions_[T[1]][0]), a.push(D.$), o.push(D._$), A = s[n[n.length - 2]][n[n.length - 1]], n.push(A);
601
+ break;
602
+ case 3: return !0;
603
+ }
604
+ }
605
+ return !0;
606
+ }, "parse")
607
+ };
608
+ a.lexer = /* @__PURE__ */ (function() {
609
+ return {
610
+ EOF: 1,
611
+ parseError: /* @__PURE__ */ r(function(e, t) {
612
+ if (this.yy.parser) this.yy.parser.parseError(e, t);
613
+ else throw Error(e);
614
+ }, "parseError"),
615
+ setInput: /* @__PURE__ */ r(function(e, t) {
616
+ return this.yy = t || 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 = {
617
+ first_line: 1,
618
+ first_column: 0,
619
+ last_line: 1,
620
+ last_column: 0
621
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
622
+ }, "setInput"),
623
+ input: /* @__PURE__ */ r(function() {
624
+ var e = this._input[0];
625
+ 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;
626
+ }, "input"),
627
+ unput: /* @__PURE__ */ r(function(e) {
628
+ var t = e.length, n = e.split(/(?:\r\n?|\n)/g);
629
+ this._input = e + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - t), this.offset -= t;
630
+ var r = this.match.split(/(?:\r\n?|\n)/g);
631
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), n.length - 1 && (this.yylineno -= n.length - 1);
632
+ var i = this.yylloc.range;
633
+ return this.yylloc = {
634
+ first_line: this.yylloc.first_line,
635
+ last_line: this.yylineno + 1,
636
+ first_column: this.yylloc.first_column,
637
+ last_column: n ? (n.length === r.length ? this.yylloc.first_column : 0) + r[r.length - n.length].length - n[0].length : this.yylloc.first_column - t
638
+ }, this.options.ranges && (this.yylloc.range = [i[0], i[0] + this.yyleng - t]), this.yyleng = this.yytext.length, this;
639
+ }, "unput"),
640
+ more: /* @__PURE__ */ r(function() {
641
+ return this._more = !0, this;
642
+ }, "more"),
643
+ reject: /* @__PURE__ */ r(function() {
644
+ if (this.options.backtrack_lexer) this._backtrack = !0;
645
+ 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(), {
646
+ text: "",
647
+ token: null,
648
+ line: this.yylineno
649
+ });
650
+ return this;
651
+ }, "reject"),
652
+ less: /* @__PURE__ */ r(function(e) {
653
+ this.unput(this.match.slice(e));
654
+ }, "less"),
655
+ pastInput: /* @__PURE__ */ r(function() {
656
+ var e = this.matched.substr(0, this.matched.length - this.match.length);
657
+ return (e.length > 20 ? "..." : "") + e.substr(-20).replace(/\n/g, "");
658
+ }, "pastInput"),
659
+ upcomingInput: /* @__PURE__ */ r(function() {
660
+ var e = this.match;
661
+ return e.length < 20 && (e += this._input.substr(0, 20 - e.length)), (e.substr(0, 20) + (e.length > 20 ? "..." : "")).replace(/\n/g, "");
662
+ }, "upcomingInput"),
663
+ showPosition: /* @__PURE__ */ r(function() {
664
+ var e = this.pastInput(), t = Array(e.length + 1).join("-");
665
+ return e + this.upcomingInput() + "\n" + t + "^";
666
+ }, "showPosition"),
667
+ test_match: /* @__PURE__ */ r(function(e, t) {
668
+ var n, r, i;
669
+ if (this.options.backtrack_lexer && (i = {
670
+ yylineno: this.yylineno,
671
+ yylloc: {
672
+ first_line: this.yylloc.first_line,
673
+ last_line: this.last_line,
674
+ first_column: this.yylloc.first_column,
675
+ last_column: this.yylloc.last_column
676
+ },
677
+ yytext: this.yytext,
678
+ match: this.match,
679
+ matches: this.matches,
680
+ matched: this.matched,
681
+ yyleng: this.yyleng,
682
+ offset: this.offset,
683
+ _more: this._more,
684
+ _input: this._input,
685
+ yy: this.yy,
686
+ conditionStack: this.conditionStack.slice(0),
687
+ done: this.done
688
+ }, this.options.ranges && (i.yylloc.range = this.yylloc.range.slice(0))), r = e[0].match(/(?:\r\n?|\n).*/g), r && (this.yylineno += r.length), this.yylloc = {
689
+ first_line: this.yylloc.last_line,
690
+ last_line: this.yylineno + 1,
691
+ first_column: this.yylloc.last_column,
692
+ last_column: r ? r[r.length - 1].length - r[r.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + e[0].length
693
+ }, 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], n = this.performAction.call(this, this.yy, this, t, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), n) return n;
694
+ if (this._backtrack) {
695
+ for (var a in i) this[a] = i[a];
696
+ return !1;
697
+ }
698
+ return !1;
699
+ }, "test_match"),
700
+ next: /* @__PURE__ */ r(function() {
701
+ if (this.done) return this.EOF;
702
+ this._input || (this.done = !0);
703
+ var e, t, n, r;
704
+ this._more || (this.yytext = "", this.match = "");
705
+ for (var i = this._currentRules(), a = 0; a < i.length; a++) if (n = this._input.match(this.rules[i[a]]), n && (!t || n[0].length > t[0].length)) {
706
+ if (t = n, r = a, this.options.backtrack_lexer) {
707
+ if (e = this.test_match(n, i[a]), e !== !1) return e;
708
+ if (this._backtrack) {
709
+ t = !1;
710
+ continue;
711
+ } else return !1;
712
+ } else if (!this.options.flex) break;
713
+ }
714
+ return t ? (e = this.test_match(t, i[r]), e !== !1 && e) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
715
+ text: "",
716
+ token: null,
717
+ line: this.yylineno
718
+ });
719
+ }, "next"),
720
+ lex: /* @__PURE__ */ r(function() {
721
+ return this.next() || this.lex();
722
+ }, "lex"),
723
+ begin: /* @__PURE__ */ r(function(e) {
724
+ this.conditionStack.push(e);
725
+ }, "begin"),
726
+ popState: /* @__PURE__ */ r(function() {
727
+ return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
728
+ }, "popState"),
729
+ _currentRules: /* @__PURE__ */ r(function() {
730
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
731
+ }, "_currentRules"),
732
+ topState: /* @__PURE__ */ r(function(e) {
733
+ return e = this.conditionStack.length - 1 - Math.abs(e || 0), e >= 0 ? this.conditionStack[e] : "INITIAL";
734
+ }, "topState"),
735
+ pushState: /* @__PURE__ */ r(function(e) {
736
+ this.begin(e);
737
+ }, "pushState"),
738
+ stateStackSize: /* @__PURE__ */ r(function() {
739
+ return this.conditionStack.length;
740
+ }, "stateStackSize"),
741
+ options: { "case-insensitive": !0 },
742
+ performAction: /* @__PURE__ */ r(function(e, t, n, r) {
743
+ switch (n) {
744
+ case 0: return this.pushState("csv"), 4;
745
+ case 1: return this.pushState("csv"), 4;
746
+ case 2: return 10;
747
+ case 3: return 5;
748
+ case 4: return 12;
749
+ case 5: return this.pushState("escaped_text"), 18;
750
+ case 6: return 20;
751
+ case 7: return this.popState("escaped_text"), 18;
752
+ case 8: return 19;
753
+ }
754
+ }, "anonymous"),
755
+ rules: [
756
+ /^(?:sankey-beta\b)/i,
757
+ /^(?:sankey\b)/i,
758
+ /^(?:$)/i,
759
+ /^(?:((\u000D\u000A)|(\u000A)))/i,
760
+ /^(?:(\u002C))/i,
761
+ /^(?:(\u0022))/i,
762
+ /^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,
763
+ /^(?:(\u0022)(?!(\u0022)))/i,
764
+ /^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i
765
+ ],
766
+ conditions: {
767
+ csv: {
768
+ rules: [
769
+ 2,
770
+ 3,
771
+ 4,
772
+ 5,
773
+ 6,
774
+ 7,
775
+ 8
776
+ ],
777
+ inclusive: !1
778
+ },
779
+ escaped_text: {
780
+ rules: [7, 8],
781
+ inclusive: !1
782
+ },
783
+ INITIAL: {
784
+ rules: [
785
+ 0,
786
+ 1,
787
+ 2,
788
+ 3,
789
+ 4,
790
+ 5,
791
+ 6,
792
+ 7,
793
+ 8
794
+ ],
795
+ inclusive: !0
796
+ }
797
+ }
798
+ };
799
+ })();
800
+ function o() {
801
+ this.yy = {};
802
+ }
803
+ return r(o, "Parser"), o.prototype = a, a.Parser = o, new o();
804
+ })();
805
+ q.parser = q;
806
+ var J = q, Y = [], X = [], Z = /* @__PURE__ */ new Map(), ae = /* @__PURE__ */ r(() => {
807
+ Y = [], X = [], Z = /* @__PURE__ */ new Map(), s();
808
+ }, "clear"), oe = class {
809
+ constructor(e, t, n = 0) {
810
+ this.source = e, this.target = t, this.value = n;
811
+ }
812
+ static {
813
+ r(this, "SankeyLink");
814
+ }
815
+ }, se = /* @__PURE__ */ r((e, t, n) => {
816
+ Y.push(new oe(e, t, n));
817
+ }, "addLink"), ce = class {
818
+ constructor(e) {
819
+ this.ID = e;
820
+ }
821
+ static {
822
+ r(this, "SankeyNode");
823
+ }
824
+ }, Q = {
825
+ nodesMap: Z,
826
+ getConfig: /* @__PURE__ */ r(() => p().sankey, "getConfig"),
827
+ getNodes: /* @__PURE__ */ r(() => X, "getNodes"),
828
+ getLinks: /* @__PURE__ */ r(() => Y, "getLinks"),
829
+ getGraph: /* @__PURE__ */ r(() => ({
830
+ nodes: X.map((e) => ({ id: e.ID })),
831
+ links: Y.map((e) => ({
832
+ source: e.source.ID,
833
+ target: e.target.ID,
834
+ value: e.value
835
+ }))
836
+ }), "getGraph"),
837
+ addLink: se,
838
+ findOrCreateNode: /* @__PURE__ */ r((e) => {
839
+ e = u.sanitizeText(e, p());
840
+ let t = Z.get(e);
841
+ return t === void 0 && (t = new ce(e), Z.set(e, t), X.push(t)), t;
842
+ }, "findOrCreateNode"),
843
+ getAccTitle: m,
844
+ setAccTitle: a,
845
+ getAccDescription: d,
846
+ setAccDescription: i,
847
+ getDiagramTitle: f,
848
+ setDiagramTitle: l,
849
+ clear: ae
850
+ }, $ = class e {
851
+ static {
852
+ r(this, "Uid");
853
+ }
854
+ static {
855
+ this.count = 0;
856
+ }
857
+ static next(t) {
858
+ return new e(t + ++e.count);
859
+ }
860
+ constructor(e) {
861
+ this.id = e, this.href = `#${e}`;
862
+ }
863
+ toString() {
864
+ return "url(" + this.href + ")";
865
+ }
866
+ }, le = {
867
+ left: y,
868
+ right: b,
869
+ center: S,
870
+ justify: x
871
+ }, ue = /* @__PURE__ */ r((e) => {
872
+ let t = 0, n = 0;
873
+ for (let r of e) {
874
+ let e = r.value ?? 0;
875
+ e > t && (t = e, n = r.layer ?? 0);
876
+ }
877
+ return n;
878
+ }, "findCentralNodeLayer"), de = { draw: /* @__PURE__ */ r(function(i, a, s, l) {
879
+ let { securityLevel: u, sankey: d } = p(), f = c.sankey, m;
880
+ u === "sandbox" && (m = t("#i" + a));
881
+ let h = t(u === "sandbox" ? m.nodes()[0].contentDocument.body : "body"), g = u === "sandbox" ? h.select(`[id="${a}"]`) : t(`[id="${a}"]`), _ = d?.width ?? f.width, v = d?.height ?? f.width, y = d?.useMaxWidth ?? f.useMaxWidth, b = d?.nodeAlignment ?? f.nodeAlignment, x = d?.prefix ?? f.prefix, S = d?.suffix ?? f.suffix, C = d?.showValues ?? f.showValues, w = d?.nodeWidth ?? f.nodeWidth ?? 10, T = d?.nodePadding ?? f.nodePadding ?? 12, E = d?.labelStyle ?? f.labelStyle ?? "legacy", D = d?.nodeColors ?? {}, O = l.db.getGraph(), k = le[b];
882
+ N().nodeId((e) => e.id).nodeWidth(w).nodePadding(T + (C ? 15 : 0)).nodeAlign(k).extent([[0, 0], [_, v]])(O);
883
+ let A = ue(O.nodes), j = n(e), M = /* @__PURE__ */ r((e) => D[e] ?? j(e), "getNodeColor");
884
+ g.append("g").attr("class", "nodes").selectAll(".node").data(O.nodes).join("g").attr("class", "node").attr("id", (e) => (e.uid = $.next("node-")).id).attr("transform", function(e) {
885
+ return "translate(" + e.x0 + "," + e.y0 + ")";
886
+ }).attr("x", (e) => e.x0).attr("y", (e) => e.y0).append("rect").attr("height", (e) => e.y1 - e.y0).attr("width", (e) => e.x1 - e.x0).attr("fill", (e) => M(e.id));
887
+ let P = /* @__PURE__ */ r(({ id: e, value: t }) => C ? `${e}
888
+ ${x}${Math.round(t * 100) / 100}${S}` : e, "getText"), F = /* @__PURE__ */ r((e) => E === "outlined" ? (e.layer ?? 0) < A ? {
889
+ x: e.x0 - 6,
890
+ anchor: "end"
891
+ } : {
892
+ x: e.x1 + 6,
893
+ anchor: "start"
894
+ } : e.x0 < _ / 2 ? {
895
+ x: e.x1 + 6,
896
+ anchor: "start"
897
+ } : {
898
+ x: e.x0 - 6,
899
+ anchor: "end"
900
+ }, "getLabelPosition"), I = g.append("g").attr("class", "node-labels").attr("font-size", 14), L = /* @__PURE__ */ r((e) => I.selectAll(e ? `.${e}` : "text").data(O.nodes).join("text").attr("class", e ?? null).attr("x", (e) => F(e).x).attr("y", (e) => (e.y1 + e.y0) / 2).attr("dy", `${C ? "0" : "0.35"}em`).attr("text-anchor", (e) => F(e).anchor).text(P), "appendLabel");
901
+ E === "outlined" ? (L("sankey-label-bg"), L("sankey-label-fg")) : L();
902
+ let R = g.append("g").attr("class", "links").attr("fill", "none").attr("stroke-opacity", .5).selectAll(".link").data(O.links).join("g").attr("class", "link").style("mix-blend-mode", "multiply"), z = d?.linkColor ?? "gradient";
903
+ if (z === "gradient") {
904
+ let e = R.append("linearGradient").attr("id", (e) => (e.uid = $.next("linearGradient-")).id).attr("gradientUnits", "userSpaceOnUse").attr("x1", (e) => e.source.x1).attr("x2", (e) => e.target.x0);
905
+ e.append("stop").attr("offset", "0%").attr("stop-color", (e) => M(e.source.id)), e.append("stop").attr("offset", "100%").attr("stop-color", (e) => M(e.target.id));
906
+ }
907
+ let B;
908
+ switch (z) {
909
+ case "gradient":
910
+ B = /* @__PURE__ */ r((e) => e.uid, "coloring");
911
+ break;
912
+ case "source":
913
+ B = /* @__PURE__ */ r((e) => M(e.source.id), "coloring");
914
+ break;
915
+ case "target":
916
+ B = /* @__PURE__ */ r((e) => M(e.target.id), "coloring");
917
+ break;
918
+ default: B = z;
919
+ }
920
+ R.append("path").attr("d", ie()).attr("stroke", B).attr("stroke-width", (e) => Math.max(1, e.width)), o(void 0, g, 0, y);
921
+ }, "draw") }, fe = /* @__PURE__ */ r((e) => e.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g, "").replaceAll(/([\n\r])+/g, "\n").trim(), "prepareTextForParsing"), pe = /* @__PURE__ */ r((e) => `.label {
922
+ font-family: ${e.fontFamily};
923
+ }
924
+
925
+ .node-labels {
926
+ font-family: ${e.fontFamily};
927
+ }
928
+
929
+ /* Outlined label style - background stroke for better readability */
930
+ .sankey-label-bg {
931
+ stroke: ${e.mainBkg || e.background || "#fff"};
932
+ stroke-width: 4px;
933
+ stroke-linejoin: round;
934
+ paint-order: stroke;
935
+ }
936
+
937
+ /* Foreground label text */
938
+ .sankey-label-fg {
939
+ fill: ${e.textColor};
940
+ }
941
+
942
+ /* Node styling */
943
+ .node rect {
944
+ shape-rendering: crispEdges;
945
+ }
946
+
947
+ /* Link styling */
948
+ .link {
949
+ fill: none;
950
+ stroke-opacity: 0.5;
951
+ mix-blend-mode: multiply;
952
+ }
953
+ `, "getStyles"), me = J.parse.bind(J);
954
+ J.parse = (e) => me(fe(e));
955
+ var he = {
956
+ styles: pe,
957
+ parser: J,
958
+ db: Q,
959
+ renderer: de
960
+ };
961
+ //#endregion
962
+ export { he as diagram };