@nxgt/material 1.13.0 → 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 (150) hide show
  1. package/README.md +4 -0
  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-BGGDEbJ3.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-DReKyuyc.js → hooks-C5xy0u03.js} +1 -1
  61. package/dist/hooks.js +1 -1
  62. package/dist/{i18n-DtDrodl8.js → i18n-Cech9IAc.js} +314 -841
  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/chat/chat-composer-mentions.d.ts +8 -0
  74. package/dist/lib/components/ui/chat/chat-composer.d.ts +5 -1
  75. package/dist/lib/components/ui/chat/chat-markdown.d.ts +2 -2
  76. package/dist/lib/components/ui/emoji/emoji-list.d.ts +5 -0
  77. package/dist/lib/components/ui/emoji/emoji-picker.d.ts +7 -0
  78. package/dist/lib/components/ui/emoji/emoji.utils.d.ts +2 -0
  79. package/dist/lib/components/ui/emoji/emoji.utils.test.d.ts +1 -0
  80. package/dist/lib/components/ui/emoji/index.d.ts +4 -0
  81. package/dist/lib/components/ui/emoji/types.d.ts +6 -0
  82. package/dist/lib/components/ui/entity-header.stories.d.ts +1 -0
  83. package/dist/lib/components/ui/kanban/kanban.stories.d.ts +1 -0
  84. package/dist/lib/components/ui/markdown/index.d.ts +3 -0
  85. package/dist/lib/components/ui/markdown/markdown.d.ts +7 -0
  86. package/dist/lib/components/ui/markdown/markdown.stories.d.ts +14 -0
  87. package/dist/lib/components/ui/markdown/markdown.test.d.ts +1 -0
  88. package/dist/lib/components/ui/markdown/markdown.utils.d.ts +1 -0
  89. package/dist/lib/components/ui/markdown/mermaid.lazy.d.ts +12 -0
  90. package/dist/lib/components/ui/markdown/partials/markdown-code.d.ts +2 -0
  91. package/dist/lib/components/ui/markdown/partials/mermaid-diagram.d.ts +4 -0
  92. package/dist/lib/components/ui/mentions/index.d.ts +3 -0
  93. package/dist/lib/components/ui/mentions/mention-list.d.ts +8 -0
  94. package/dist/lib/components/ui/mentions/mentions.utils.d.ts +7 -0
  95. package/dist/lib/components/ui/mentions/mentions.utils.test.d.ts +1 -0
  96. package/dist/lib/components/ui/mentions/types.d.ts +7 -0
  97. package/dist/lib/components/ui/rich-text-editor/extensions/mention/mention-list.d.ts +12 -1
  98. package/dist/lib/components/ui/terminal/index.d.ts +2 -0
  99. package/dist/lib/components/ui/terminal/terminal.d.ts +11 -0
  100. package/dist/lib/components/ui/terminal/terminal.stories.d.ts +14 -0
  101. package/dist/lib/components/ui/terminal/terminal.utils.d.ts +5 -0
  102. package/dist/lib/components/ui/terminal/terminal.utils.test.d.ts +1 -0
  103. package/dist/lib/i18n/resources/en/index.d.ts +7 -0
  104. package/dist/lib/i18n/resources/en/material.json.d.ts +7 -0
  105. package/dist/lib/i18n/resources/fr/index.d.ts +7 -0
  106. package/dist/lib/i18n/resources/fr/material.json.d.ts +7 -0
  107. package/dist/lib/i18n/resources/index.d.ts +14 -0
  108. package/dist/lib/i18n/translator.d.ts +1 -1
  109. package/dist/{lib-CD3tyuc8.js → lib-Bbw5QPoj.js} +472 -471
  110. package/dist/lib.js +2 -2
  111. package/dist/{main-r84Yresa.js → main-BjDU9FDM.js} +59393 -30376
  112. package/dist/main.js +6 -6
  113. package/dist/material.css +1 -1
  114. package/dist/math-C5EhTgJw.js +10 -0
  115. package/dist/mermaid-parser.core-Cz-MfB4Z.js +638 -0
  116. package/dist/mermaid.core-BI1sunfX.js +1096 -0
  117. package/dist/mindmap-definition-NLK3R4M7-DW0BIU_q.js +1008 -0
  118. package/dist/ordinal-DuP05kVQ.js +65 -0
  119. package/dist/packet-AYTQ26CC-CshIswP8.js +3 -0
  120. package/dist/path-Cjou0lUh.js +85 -0
  121. package/dist/pegDiagram-GJSIUBJH-CJIx0u4M.js +94 -0
  122. package/dist/pie-WAS4IAKB-CYs22y4X.js +3 -0
  123. package/dist/pieDiagram-5QR66LMP-zAhv5fKz.js +157 -0
  124. package/dist/quadrantDiagram-O4NWA36T-CO4n_yQo.js +2001 -0
  125. package/dist/radar-RG4KPBEZ-BOJKjbGv.js +3 -0
  126. package/dist/railroad-74A4TZTK-Dt1BmUkI.js +3 -0
  127. package/dist/railroad-abnf-HS5TGJTU-Cs9GMUMY.js +3 -0
  128. package/dist/railroad-ebnf-LZEXJU2U-D4y0fXoW.js +3 -0
  129. package/dist/railroad-peg-WCYAUIDC-D2f_ZNR5.js +3 -0
  130. package/dist/railroadDiagram-XR7U4H2S-B8iV7mfe.js +76 -0
  131. package/dist/requirementDiagram-PLB6GJNP-CGoX1NrW.js +2228 -0
  132. package/dist/rough.esm-rcMoXTJj.js +1352 -0
  133. package/dist/sankeyDiagram-IPEJSGJF-DdSM2wiI.js +962 -0
  134. package/dist/sequenceDiagram-PO4LG4MO-CCRqF5XO.js +4200 -0
  135. package/dist/sizeCapture-INFHLROL-CHXIsPO_.js +46 -0
  136. package/dist/src-B4npqWNl.js +1775 -0
  137. package/dist/stateDiagram-v2-GCMORJYK-CQTX5ks8.js +2143 -0
  138. package/dist/step-B6KjpKgN.js +706 -0
  139. package/dist/string-B-ZWXCs2.js +392 -0
  140. package/dist/swimlanes-2SLR337P-C2NNOb5n.js +4763 -0
  141. package/dist/swimlanesDiagram-TC7HE7FX-CPsqPrbP.js +28 -0
  142. package/dist/timeline-definition-EJHVYXUP-DuxGHv-N.js +1073 -0
  143. package/dist/treeView-Q6P3EWNA-BrJylG9N.js +3 -0
  144. package/dist/treemap-WGGIJYW6-DpIZuqbj.js +3 -0
  145. package/dist/usecaseDiagram-POWQR4AR-cuAeIBW3.js +9932 -0
  146. package/dist/vennDiagram-UO4OBE2U-DLwBSAnC.js +1880 -0
  147. package/dist/wardley-WFR3VGLG-CbwdAAbH.js +3 -0
  148. package/dist/wardleyDiagram-VNRHLVJA-D7IZU6vu.js +645 -0
  149. package/dist/xychartDiagram-PMCCYNJV-BDOFv_xK.js +2167 -0
  150. package/package.json +7 -1
@@ -0,0 +1,65 @@
1
+ import { n as e } from "./init-Buj1GKRa.js";
2
+ //#region node_modules/internmap/src/index.js
3
+ var t = class extends Map {
4
+ constructor(e, t = a) {
5
+ if (super(), Object.defineProperties(this, {
6
+ _intern: { value: /* @__PURE__ */ new Map() },
7
+ _key: { value: t }
8
+ }), e != null) for (let [t, n] of e) this.set(t, n);
9
+ }
10
+ get(e) {
11
+ return super.get(n(this, e));
12
+ }
13
+ has(e) {
14
+ return super.has(n(this, e));
15
+ }
16
+ set(e, t) {
17
+ return super.set(r(this, e), t);
18
+ }
19
+ delete(e) {
20
+ return super.delete(i(this, e));
21
+ }
22
+ };
23
+ function n({ _intern: e, _key: t }, n) {
24
+ let r = t(n);
25
+ return e.has(r) ? e.get(r) : n;
26
+ }
27
+ function r({ _intern: e, _key: t }, n) {
28
+ let r = t(n);
29
+ return e.has(r) ? e.get(r) : (e.set(r, n), n);
30
+ }
31
+ function i({ _intern: e, _key: t }, n) {
32
+ let r = t(n);
33
+ return e.has(r) && (n = e.get(r), e.delete(r)), n;
34
+ }
35
+ function a(e) {
36
+ return typeof e == "object" && e ? e.valueOf() : e;
37
+ }
38
+ //#endregion
39
+ //#region node_modules/d3-scale/src/ordinal.js
40
+ var o = Symbol("implicit");
41
+ function s() {
42
+ var n = new t(), r = [], i = [], a = o;
43
+ function c(e) {
44
+ let t = n.get(e);
45
+ if (t === void 0) {
46
+ if (a !== o) return a;
47
+ n.set(e, t = r.push(e) - 1);
48
+ }
49
+ return i[t % i.length];
50
+ }
51
+ return c.domain = function(e) {
52
+ if (!arguments.length) return r.slice();
53
+ r = [], n = new t();
54
+ for (let t of e) n.has(t) || n.set(t, r.push(t) - 1);
55
+ return c;
56
+ }, c.range = function(e) {
57
+ return arguments.length ? (i = Array.from(e), c) : i.slice();
58
+ }, c.unknown = function(e) {
59
+ return arguments.length ? (a = e, c) : a;
60
+ }, c.copy = function() {
61
+ return s(r, i).unknown(a);
62
+ }, e.apply(c, arguments), c;
63
+ }
64
+ //#endregion
65
+ export { s as t };
@@ -0,0 +1,3 @@
1
+ import "./chunk-FOHPRMQF-Crq0JMf2.js";
2
+ import { S as e } from "./mermaid-parser.core-Cz-MfB4Z.js";
3
+ export { e as createPacketServices };
@@ -0,0 +1,85 @@
1
+ //#region node_modules/d3-shape/src/constant.js
2
+ function e(e) {
3
+ return function() {
4
+ return e;
5
+ };
6
+ }
7
+ //#endregion
8
+ //#region node_modules/d3-path/src/path.js
9
+ var t = Math.PI, n = 2 * t, r = 1e-6, i = n - r;
10
+ function a(e) {
11
+ this._ += e[0];
12
+ for (let t = 1, n = e.length; t < n; ++t) this._ += arguments[t] + e[t];
13
+ }
14
+ function o(e) {
15
+ let t = Math.floor(e);
16
+ if (!(t >= 0)) throw Error(`invalid digits: ${e}`);
17
+ if (t > 15) return a;
18
+ let n = 10 ** t;
19
+ return function(e) {
20
+ this._ += e[0];
21
+ for (let t = 1, r = e.length; t < r; ++t) this._ += Math.round(arguments[t] * n) / n + e[t];
22
+ };
23
+ }
24
+ var s = class {
25
+ constructor(e) {
26
+ this._x0 = this._y0 = this._x1 = this._y1 = null, this._ = "", this._append = e == null ? a : o(e);
27
+ }
28
+ moveTo(e, t) {
29
+ this._append`M${this._x0 = this._x1 = +e},${this._y0 = this._y1 = +t}`;
30
+ }
31
+ closePath() {
32
+ this._x1 !== null && (this._x1 = this._x0, this._y1 = this._y0, this._append`Z`);
33
+ }
34
+ lineTo(e, t) {
35
+ this._append`L${this._x1 = +e},${this._y1 = +t}`;
36
+ }
37
+ quadraticCurveTo(e, t, n, r) {
38
+ this._append`Q${+e},${+t},${this._x1 = +n},${this._y1 = +r}`;
39
+ }
40
+ bezierCurveTo(e, t, n, r, i, a) {
41
+ this._append`C${+e},${+t},${+n},${+r},${this._x1 = +i},${this._y1 = +a}`;
42
+ }
43
+ arcTo(e, n, i, a, o) {
44
+ if (e = +e, n = +n, i = +i, a = +a, o = +o, o < 0) throw Error(`negative radius: ${o}`);
45
+ let s = this._x1, c = this._y1, l = i - e, u = a - n, d = s - e, f = c - n, p = d * d + f * f;
46
+ if (this._x1 === null) this._append`M${this._x1 = e},${this._y1 = n}`;
47
+ else if (p > r) if (!(Math.abs(f * l - u * d) > r) || !o) this._append`L${this._x1 = e},${this._y1 = n}`;
48
+ else {
49
+ let m = i - s, h = a - c, g = l * l + u * u, _ = m * m + h * h, v = Math.sqrt(g), y = Math.sqrt(p), b = o * Math.tan((t - Math.acos((g + p - _) / (2 * v * y))) / 2), x = b / y, S = b / v;
50
+ Math.abs(x - 1) > r && this._append`L${e + x * d},${n + x * f}`, this._append`A${o},${o},0,0,${+(f * m > d * h)},${this._x1 = e + S * l},${this._y1 = n + S * u}`;
51
+ }
52
+ }
53
+ arc(e, a, o, s, c, l) {
54
+ if (e = +e, a = +a, o = +o, l = !!l, o < 0) throw Error(`negative radius: ${o}`);
55
+ let u = o * Math.cos(s), d = o * Math.sin(s), f = e + u, p = a + d, m = 1 ^ l, h = l ? s - c : c - s;
56
+ this._x1 === null ? this._append`M${f},${p}` : (Math.abs(this._x1 - f) > r || Math.abs(this._y1 - p) > r) && this._append`L${f},${p}`, o && (h < 0 && (h = h % n + n), h > i ? this._append`A${o},${o},0,1,${m},${e - u},${a - d}A${o},${o},0,1,${m},${this._x1 = f},${this._y1 = p}` : h > r && this._append`A${o},${o},0,${+(h >= t)},${m},${this._x1 = e + o * Math.cos(c)},${this._y1 = a + o * Math.sin(c)}`);
57
+ }
58
+ rect(e, t, n, r) {
59
+ this._append`M${this._x0 = this._x1 = +e},${this._y0 = this._y1 = +t}h${n = +n}v${+r}h${-n}Z`;
60
+ }
61
+ toString() {
62
+ return this._;
63
+ }
64
+ };
65
+ function c() {
66
+ return new s();
67
+ }
68
+ c.prototype = s.prototype;
69
+ //#endregion
70
+ //#region node_modules/d3-shape/src/path.js
71
+ function l(e) {
72
+ let t = 3;
73
+ return e.digits = function(n) {
74
+ if (!arguments.length) return t;
75
+ if (n == null) t = null;
76
+ else {
77
+ let e = Math.floor(n);
78
+ if (!(e >= 0)) throw RangeError(`invalid digits: ${n}`);
79
+ t = e;
80
+ }
81
+ return e;
82
+ }, () => new s(t);
83
+ }
84
+ //#endregion
85
+ export { e as n, l as t };
@@ -0,0 +1,94 @@
1
+ import { n as e } from "./src-B4npqWNl.js";
2
+ import { t, u as n } from "./mermaid-parser.core-Cz-MfB4Z.js";
3
+ import { n as r } from "./chunk-Y2CYZVJY-i11wjrBe.js";
4
+ import "./chunk-O7XYJQB3-md6vjVm4.js";
5
+ import "./chunk-6AEJRKK7-JyfUnUEu.js";
6
+ import { n as i, r as a, t as o } from "./chunk-GTNCS2PH-CTS015lZ.js";
7
+ import { t as s } from "./chunk-JWPE2WC7-Ccb0QaC8.js";
8
+ //#region node_modules/mermaid/dist/chunks/mermaid.core/pegDiagram-GJSIUBJH.mjs
9
+ var c = n().RailroadPeg.parser.LangiumParser, l = /* @__PURE__ */ r((e) => {
10
+ let t = e.alternatives.map(u);
11
+ return t.length === 1 ? t[0] : {
12
+ type: "choice",
13
+ alternatives: t
14
+ };
15
+ }, "transformOrderedChoice"), u = /* @__PURE__ */ r((e) => {
16
+ let t = e.elements.map(d);
17
+ return t.length === 1 ? t[0] : {
18
+ type: "sequence",
19
+ elements: t
20
+ };
21
+ }, "transformSequence"), d = /* @__PURE__ */ r((e) => {
22
+ let t = p(e.suffix);
23
+ return e.operator ? {
24
+ type: "special",
25
+ text: e.operator === "&" ? `&${f(t)}` : `!${f(t)}`
26
+ } : t;
27
+ }, "transformPrefix"), f = /* @__PURE__ */ r((e) => {
28
+ switch (e.type) {
29
+ case "terminal": return `"${e.value}"`;
30
+ case "nonterminal": return e.name;
31
+ case "special": return e.text;
32
+ default: return "(...)";
33
+ }
34
+ }, "nodeToLabel"), p = /* @__PURE__ */ r((e) => {
35
+ let t = m(e.primary);
36
+ if (!e.operator) return t;
37
+ switch (e.operator) {
38
+ case "?": return {
39
+ type: "optional",
40
+ element: t
41
+ };
42
+ case "*": return {
43
+ type: "repetition",
44
+ element: t,
45
+ min: 0,
46
+ max: Infinity
47
+ };
48
+ case "+": return {
49
+ type: "repetition",
50
+ element: t,
51
+ min: 1,
52
+ max: Infinity
53
+ };
54
+ default: throw Error(`Unsupported PEG suffix operator: ${e.operator}`);
55
+ }
56
+ }, "transformSuffix"), m = /* @__PURE__ */ r((e) => {
57
+ switch (e.$type) {
58
+ case "PegLiteral": return {
59
+ type: "terminal",
60
+ value: e.value
61
+ };
62
+ case "PegIdentifier": return {
63
+ type: "nonterminal",
64
+ name: e.name
65
+ };
66
+ case "PegGroup": return l(e.element);
67
+ case "PegAny": return {
68
+ type: "special",
69
+ text: e.dot
70
+ };
71
+ default: throw Error(`Unsupported PEG primary node: ${e.$type}`);
72
+ }
73
+ }, "transformPrimary"), h = /* @__PURE__ */ r((e) => ({
74
+ name: e.name,
75
+ definition: l(e.definition)
76
+ }), "transformRule"), g = /* @__PURE__ */ r((e) => {
77
+ s(e, o), e.title && o.setTitle(e.title), e.rules.map((e) => o.addRule(h(e)));
78
+ }, "populateDb"), _ = {
79
+ parser: {
80
+ parse: /* @__PURE__ */ r((n) => {
81
+ o.clear(), e.debug("[PEG Parser] Starting Langium parse");
82
+ let r = c.parse(n);
83
+ if (r.lexerErrors.length > 0 || r.parserErrors.length > 0) throw new t(r);
84
+ let i = r.value;
85
+ e.debug("[PEG Parser] Parsed rules:", i.rules.length), g(i), e.debug("[PEG Parser] Parse complete");
86
+ }, "parse"),
87
+ parser: { yy: o }
88
+ },
89
+ db: o,
90
+ renderer: a,
91
+ styles: i
92
+ };
93
+ //#endregion
94
+ export { _ as diagram };
@@ -0,0 +1,3 @@
1
+ import "./chunk-FOHPRMQF-Crq0JMf2.js";
2
+ import { b as e } from "./mermaid-parser.core-Cz-MfB4Z.js";
3
+ export { e as createPieServices };
@@ -0,0 +1,157 @@
1
+ import { El as e, wl as t } from "./main-BjDU9FDM.js";
2
+ import { n } from "./src-B4npqWNl.js";
3
+ import { i as r, p as i } from "./chunk-ZIGJFQKS-CP5430fN.js";
4
+ import { t as a } from "./ordinal-DuP05kVQ.js";
5
+ import { n as o } from "./mermaid-parser.core-Cz-MfB4Z.js";
6
+ import { n as s } from "./chunk-Y2CYZVJY-i11wjrBe.js";
7
+ import { H as c, U as l, a as u, c as d, f, q as p, v as m, w as h, x as g, y as _ } from "./chunk-O7XYJQB3-md6vjVm4.js";
8
+ import { t as v } from "./chunk-6AEJRKK7-JyfUnUEu.js";
9
+ import { t as y } from "./chunk-JWPE2WC7-Ccb0QaC8.js";
10
+ //#region node_modules/mermaid/dist/chunks/mermaid.core/pieDiagram-5QR66LMP.mjs
11
+ var b = f.pie, x = {
12
+ sections: /* @__PURE__ */ new Map(),
13
+ showData: !1,
14
+ config: b
15
+ }, S = x.sections, C = x.showData, w = structuredClone(b), T = {
16
+ getConfig: /* @__PURE__ */ s(() => structuredClone(w), "getConfig"),
17
+ clear: /* @__PURE__ */ s(() => {
18
+ S = /* @__PURE__ */ new Map(), C = x.showData, u();
19
+ }, "clear"),
20
+ setDiagramTitle: p,
21
+ getDiagramTitle: h,
22
+ setAccTitle: l,
23
+ getAccTitle: _,
24
+ setAccDescription: c,
25
+ getAccDescription: m,
26
+ addSection: /* @__PURE__ */ s(({ label: e, value: t }) => {
27
+ if (t < 0) throw Error(`"${e}" has invalid value: ${t}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);
28
+ S.has(e) || (S.set(e, t), n.debug(`added new section: ${e}, with value: ${t}`));
29
+ }, "addSection"),
30
+ getSections: /* @__PURE__ */ s(() => S, "getSections"),
31
+ setShowData: /* @__PURE__ */ s((e) => {
32
+ C = e;
33
+ }, "setShowData"),
34
+ getShowData: /* @__PURE__ */ s(() => C, "getShowData")
35
+ }, E = /* @__PURE__ */ s((e, t) => {
36
+ y(e, t), t.setShowData(e.showData), e.sections.map(t.addSection);
37
+ }, "populateDb"), D = { parse: /* @__PURE__ */ s(async (e) => {
38
+ let t = await o("pie", e);
39
+ n.debug(t), E(t, T);
40
+ }, "parse") }, O = /* @__PURE__ */ s((e) => `
41
+ .pieCircle{
42
+ stroke: ${e.pieStrokeColor};
43
+ stroke-width : ${e.pieStrokeWidth};
44
+ opacity : ${e.pieOpacity};
45
+ }
46
+ .pieCircle.highlighted{
47
+ scale: 1.05;
48
+ opacity: 1;
49
+ }
50
+ .pieCircle.highlightedOnHover:hover{
51
+ transition-duration: 250ms;
52
+ scale: 1.05;
53
+ opacity: 1;
54
+ }
55
+ .pieOuterCircle{
56
+ stroke: ${e.pieOuterStrokeColor};
57
+ stroke-width: ${e.pieOuterStrokeWidth};
58
+ fill: none;
59
+ }
60
+ .pieTitleText {
61
+ text-anchor: middle;
62
+ font-size: ${e.pieTitleTextSize};
63
+ fill: ${e.pieTitleTextColor};
64
+ font-family: ${e.fontFamily};
65
+ }
66
+ .slice {
67
+ font-family: ${e.fontFamily};
68
+ fill: ${e.pieSectionTextColor};
69
+ font-size:${e.pieSectionTextSize};
70
+ // fill: white;
71
+ }
72
+ .legend text {
73
+ fill: ${e.pieLegendTextColor};
74
+ font-family: ${e.fontFamily};
75
+ font-size: ${e.pieLegendTextSize};
76
+ }
77
+ `, "getStyles"), k = /* @__PURE__ */ s((e) => {
78
+ let n = [...e.values()].reduce((e, t) => e + t, 0), r = [...e.entries()].map(([e, t]) => ({
79
+ label: e,
80
+ value: t
81
+ })).filter((e) => e.value / n * 100 >= 1);
82
+ return t().value((e) => e.value).sort(null)(r);
83
+ }, "createPieArcs"), A = {
84
+ parser: D,
85
+ db: T,
86
+ renderer: { draw: /* @__PURE__ */ s((t, o, s, c) => {
87
+ n.debug("rendering pie chart\n" + t);
88
+ let l = c.db, u = g(), f = r(l.getConfig(), u.pie), p = v(o), m = p.append("g");
89
+ m.attr("transform", "translate(225,225)");
90
+ let { themeVariables: h } = u, [_] = i(h.pieOuterStrokeWidth);
91
+ _ ??= 2;
92
+ let y = f.legendPosition, b = f.textPosition, x = f.donutHole > 0 && f.donutHole <= .9 ? f.donutHole : 0, S = e().innerRadius(x * 185).outerRadius(185), C = e().innerRadius(185 * b).outerRadius(185 * b), w = m.append("g");
93
+ w.append("circle").attr("cx", 0).attr("cy", 0).attr("r", 185 + _ / 2).attr("class", "pieOuterCircle");
94
+ let T = l.getSections(), E = k(T), D = [
95
+ h.pie1,
96
+ h.pie2,
97
+ h.pie3,
98
+ h.pie4,
99
+ h.pie5,
100
+ h.pie6,
101
+ h.pie7,
102
+ h.pie8,
103
+ h.pie9,
104
+ h.pie10,
105
+ h.pie11,
106
+ h.pie12
107
+ ], O = 0;
108
+ T.forEach((e) => {
109
+ O += e;
110
+ });
111
+ let A = E.filter((e) => (e.data.value / O * 100).toFixed(0) !== "0"), j = a(D).domain([...T.keys()]);
112
+ w.selectAll("mySlices").data(A).enter().append("path").attr("d", S).attr("fill", (e) => j(e.data.label)).attr("class", (e) => {
113
+ let t = "pieCircle";
114
+ return f.highlightSlice === "hover" ? t += " highlightedOnHover" : f.highlightSlice === e.data.label && (t += " highlighted"), t;
115
+ }), w.selectAll("mySlices").data(A).enter().append("text").text((e) => (e.data.value / O * 100).toFixed(0) + "%").attr("transform", (e) => "translate(" + C.centroid(e) + ")").style("text-anchor", "middle").attr("class", "slice");
116
+ let M = m.append("text").text(l.getDiagramTitle()).attr("x", 0).attr("y", -400 / 2).attr("class", "pieTitleText"), N = [...T.entries()].map(([e, t]) => ({
117
+ label: e,
118
+ value: t
119
+ })), P = m.selectAll(".legend").data(N).enter().append("g").attr("class", "legend");
120
+ P.append("rect").attr("width", 18).attr("height", 18).style("fill", (e) => j(e.label)).style("stroke", (e) => j(e.label)), P.append("text").attr("x", 22).attr("y", 14).text((e) => l.getShowData() ? `${e.label} [${e.value}]` : e.label);
121
+ let F = Math.max(...P.selectAll("text").nodes().map((e) => e?.getBoundingClientRect().width ?? 0)), I = 450, L = 490, R = N.length * 22;
122
+ switch (y) {
123
+ case "center":
124
+ P.attr("transform", (e, t) => {
125
+ let n = 22 * N.length / 2, r = -F / 2 - 22, i = t * 22 - n;
126
+ return "translate(" + r + "," + i + ")";
127
+ });
128
+ break;
129
+ case "top":
130
+ I += R, P.attr("transform", (e, t) => `translate(${-F / 2 - 22}, ${t * 22 - 185})`), w.attr("transform", () => `translate(0, ${R + 22})`);
131
+ break;
132
+ case "bottom":
133
+ I += R, P.attr("transform", (e, t) => {
134
+ let n = -F / 2 - 22, r = t * 22 - -207;
135
+ return "translate(" + n + "," + r + ")";
136
+ });
137
+ break;
138
+ case "left":
139
+ L += 22 + F, P.attr("transform", (e, t) => {
140
+ let n = 22 * N.length / 2;
141
+ return "translate(-207," + (t * 22 - n) + ")";
142
+ }), w.attr("transform", () => `translate(${F + 18 + 4}, 0)`);
143
+ break;
144
+ default:
145
+ L += 22 + F, P.attr("transform", (e, t) => {
146
+ let n = 22 * N.length / 2;
147
+ return "translate(216," + (t * 22 - n) + ")";
148
+ });
149
+ break;
150
+ }
151
+ let z = M.node()?.getBoundingClientRect().width ?? 0, B = 450 / 2 - z / 2, V = 450 / 2 + z / 2, H = Math.min(0, B), U = Math.max(L, V) - H;
152
+ p.attr("viewBox", `${H} 0 ${U} ${I}`), d(p, I, U, f.useMaxWidth);
153
+ }, "draw") },
154
+ styles: O
155
+ };
156
+ //#endregion
157
+ export { A as diagram };