docmedown 0.1.1 → 0.1.2
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.
- package/README.md +38 -20
- package/dist/abnfDiagram-VCTEODGH-CtQBp0Qv.mjs +89 -0
- package/dist/abnfDiagram-VCTEODGH-mccrzlD_.js +1 -0
- package/dist/arc-DgPKXEdT.mjs +82 -0
- package/dist/arc-n7TW7Bis.js +1 -0
- package/dist/architecture-7GRP2DOG-B7myQ46f.js +1 -0
- package/dist/architecture-7GRP2DOG-Cxj1ussQ.mjs +3 -0
- package/dist/architectureDiagram-5GKGNRK7-BdTCu5T3.js +36 -0
- package/dist/architectureDiagram-5GKGNRK7-CkgZa-G1.mjs +4154 -0
- package/dist/array-CApNbSU9.mjs +6 -0
- package/dist/array-DZSRzHA_.js +1 -0
- package/dist/blockDiagram-I7D4REHJ-CSYvpxQw.js +129 -0
- package/dist/blockDiagram-I7D4REHJ-CYngfPD9.mjs +1922 -0
- package/dist/c4Diagram-7LVT6UL2-B-sz5MUK.js +38 -0
- package/dist/c4Diagram-7LVT6UL2-DEzxFf2b.mjs +3010 -0
- package/dist/channel-LgHproiI.mjs +5 -0
- package/dist/channel-yqu0m4cl.js +1 -0
- package/dist/chunk-2E4U76K2-BOyeRQsI.js +1 -0
- package/dist/chunk-2E4U76K2-CoTrgtfg.mjs +348 -0
- package/dist/chunk-2Q5K7J3B-D4EgYPOq.mjs +15 -0
- package/dist/chunk-2Q5K7J3B-DhjCNjaM.js +1 -0
- package/dist/chunk-4HAMMTFA-GFyfmcSO.js +62 -0
- package/dist/chunk-4HAMMTFA-VgWPe1ng.mjs +4188 -0
- package/dist/chunk-5VM5RSS4-GINalzIv.js +15 -0
- package/dist/chunk-5VM5RSS4-TqxtqrwE.mjs +5 -0
- package/dist/chunk-75Z2AOVW-DYouz5MZ.js +2 -0
- package/dist/chunk-75Z2AOVW-Dz0Sko9Y.mjs +1330 -0
- package/dist/chunk-CLGD4ZFX-C5J-e2io.js +1 -0
- package/dist/chunk-CLGD4ZFX-DBkwyMMv.mjs +14 -0
- package/dist/chunk-DU6HZSFF-BEQZSmUu.mjs +3836 -0
- package/dist/chunk-DU6HZSFF-CWc5ewtb.js +127 -0
- package/dist/chunk-F27PBJKO-8jvY_jJK.js +1 -0
- package/dist/chunk-F27PBJKO-DFH3sRZG.mjs +61 -0
- package/dist/chunk-FOHPRMQF-LRqOLsSw.mjs +21456 -0
- package/dist/chunk-FOHPRMQF-tmTlwTeH.js +161 -0
- package/dist/chunk-GMAD6QVW-BZeZ4fdb.mjs +1863 -0
- package/dist/chunk-GMAD6QVW-DEQiTa0c.js +72 -0
- package/dist/chunk-GVQU2GXP-B1D3J05J.mjs +37 -0
- package/dist/chunk-GVQU2GXP-CdJIWN41.js +1 -0
- package/dist/chunk-IMKFNOWR-BmZb9U1f.mjs +2042 -0
- package/dist/chunk-IMKFNOWR-CPJsszGN.js +231 -0
- package/dist/chunk-JWPE2WC7-DIKiF5cm.mjs +8 -0
- package/dist/chunk-JWPE2WC7-p1fYVdYc.js +1 -0
- package/dist/chunk-L3NEJ4N5-TzDiVs78.js +1 -0
- package/dist/chunk-L3NEJ4N5-lal8wUID.mjs +245 -0
- package/dist/chunk-LNGE3PJU-BQX75wkM.js +34 -0
- package/dist/chunk-LNGE3PJU-DJ9JuXV6.mjs +1521 -0
- package/dist/chunk-OSK3NFVY-9AWK88m1.mjs +672 -0
- package/dist/chunk-OSK3NFVY-CHzvVe8m.js +10 -0
- package/dist/chunk-P2QGCYS3-6q3AXPt5.mjs +67 -0
- package/dist/chunk-P2QGCYS3-DKZzpRQW.js +1 -0
- package/dist/chunk-POPQ4Y6H-Dd7J9tx3.mjs +26 -0
- package/dist/chunk-POPQ4Y6H-T5C7wpjf.js +1 -0
- package/dist/chunk-PWAF6VOD-BYG76tEe.mjs +275 -0
- package/dist/chunk-PWAF6VOD-DxZLuCEw.js +1 -0
- package/dist/chunk-SHT3W25Y-B2Wes8jn.mjs +4183 -0
- package/dist/chunk-SHT3W25Y-BQjHSn5K.js +168 -0
- package/dist/chunk-SVP7TREG-BFMd615E.js +88 -0
- package/dist/chunk-SVP7TREG-CynckzeF.mjs +490 -0
- package/dist/chunk-TICWLB2K-BfCuoR1V.mjs +3357 -0
- package/dist/chunk-TICWLB2K-agcyBfUp.js +206 -0
- package/dist/chunk-TLUHSLCS-CUrWaKDG.mjs +59 -0
- package/dist/chunk-TLUHSLCS-Drx_a7am.js +1 -0
- package/dist/chunk-XXDRQBXY-AAk1-Cyg.js +1 -0
- package/dist/chunk-XXDRQBXY-DpR8eYzz.mjs +9 -0
- package/dist/chunk-Y2CYZVJY-CnmLqFtv.js +1 -0
- package/dist/chunk-Y2CYZVJY-i11wjrBe.mjs +12 -0
- package/dist/classDiagram-ZZMXUADV-B7IN9zcX.js +1 -0
- package/dist/classDiagram-ZZMXUADV-tcy6gxSB.mjs +30 -0
- package/dist/classDiagram-v2-VYDZK3BY-B7IN9zcX.js +1 -0
- package/dist/classDiagram-v2-VYDZK3BY-D5wM6Acp.mjs +30 -0
- package/dist/cli.js +87 -58
- package/dist/cose-bilkent-JH36ORCC-DBUPO3qJ.js +1 -0
- package/dist/cose-bilkent-JH36ORCC-Slpx4WIt.mjs +2253 -0
- package/dist/cynefin-OW5HDTMX--QVnfGi1.mjs +3 -0
- package/dist/cynefin-OW5HDTMX-lNKysi7S.js +1 -0
- package/dist/cynefinDiagram-5FMLGOSQ-CsFONYqx.js +62 -0
- package/dist/cynefinDiagram-5FMLGOSQ-DsrxYBcg.mjs +355 -0
- package/dist/cytoscape.esm-C5TvPYYm.mjs +18148 -0
- package/dist/cytoscape.esm-CBmWJr5M.js +321 -0
- package/dist/dagre-CZ6P9L_h.js +1 -0
- package/dist/dagre-GXQ25YYZ-CQszk-7P.js +4 -0
- package/dist/dagre-GXQ25YYZ-ecYByRSn.mjs +425 -0
- package/dist/dagre-J_1oH0eY.mjs +1934 -0
- package/dist/defaultLocale-N-0uLSyg.mjs +198 -0
- package/dist/defaultLocale-ybN1Vtvg.js +1 -0
- package/dist/diagram-S7CK7UJ4-CTMvxX__.js +30 -0
- package/dist/diagram-S7CK7UJ4-DxCghfa-.mjs +301 -0
- package/dist/diagram-UQ7AKVKN-1viEkqlG.js +41 -0
- package/dist/diagram-UQ7AKVKN-BA7Z_oB7.mjs +214 -0
- package/dist/diagram-VSXAHHWV-DgVT19mq.js +3 -0
- package/dist/diagram-VSXAHHWV-Dtqo03M5.mjs +432 -0
- package/dist/diagram-VX7I27RA-CNw0pOX_.js +24 -0
- package/dist/diagram-VX7I27RA-GMPRt8Zh.mjs +527 -0
- package/dist/diagram-Z3DM3KII-C6XdQK_Q.mjs +134 -0
- package/dist/diagram-Z3DM3KII-CPkBr3FT.js +24 -0
- package/dist/dist-CXWJafG_.js +1 -0
- package/dist/dist-DNdLIC8h.mjs +59 -0
- package/dist/docmedown.cjs +65 -48
- package/dist/docmedown.iife.js +3418 -77
- package/dist/docmedown.mjs +6550 -4630
- package/dist/ebnfDiagram-PWID7BFC-CseVsyL3.js +1 -0
- package/dist/ebnfDiagram-PWID7BFC-D_dBDXWC.mjs +100 -0
- package/dist/erDiagram-RLTQ6QDP-DFwfQTRS.js +99 -0
- package/dist/erDiagram-RLTQ6QDP-DP7ddGMH.mjs +1966 -0
- package/dist/eventmodeling-NTZA5JFV-CzxVg0l5.js +1 -0
- package/dist/eventmodeling-NTZA5JFV-Djsy__5n.mjs +3 -0
- package/dist/flowDiagram-HODETNUW-7hSJfI3W.js +1 -0
- package/dist/flowDiagram-HODETNUW-Dqu5Lr19.mjs +17 -0
- package/dist/ganttDiagram-EL5Y4UJY-KNL3tzTD.mjs +3072 -0
- package/dist/ganttDiagram-EL5Y4UJY-aiLqNWgi.js +292 -0
- package/dist/gitGraph-4MIJSDKK-DnElfqX7.js +1 -0
- package/dist/gitGraph-4MIJSDKK-xuKJBT2e.mjs +3 -0
- package/dist/gitGraphDiagram-WWUBYQGX-D4gSo_-e.js +106 -0
- package/dist/gitGraphDiagram-WWUBYQGX-Dooss5fG.mjs +733 -0
- package/dist/graphlib-BaETKKSa.js +1 -0
- package/dist/graphlib-XW-Jr8pF.mjs +1267 -0
- package/dist/info-A6RAGUB7-ClYskpn6.mjs +3 -0
- package/dist/info-A6RAGUB7-DDvvt-fW.js +1 -0
- package/dist/infoDiagram-27XIBGKW-B2-y2mdQ.mjs +20 -0
- package/dist/infoDiagram-27XIBGKW-DYQ9NzfL.js +2 -0
- package/dist/init-BJdqMO10.js +1 -0
- package/dist/init-CsQUQz36.mjs +13 -0
- package/dist/ishikawaDiagram-5VMMS53U-ULIhoYO5.js +70 -0
- package/dist/ishikawaDiagram-5VMMS53U-xAArNh-1.mjs +719 -0
- package/dist/journeyDiagram-3NMN7TZE-BBMYNZRL.js +139 -0
- package/dist/journeyDiagram-3NMN7TZE-BH-uKqP7.mjs +884 -0
- package/dist/kanban-definition-UXKFOSKX-Be49llXr.mjs +976 -0
- package/dist/kanban-definition-UXKFOSKX-CDL5yJkq.js +89 -0
- package/dist/line-BEwhHSLl.js +1 -0
- package/dist/line-CiXRog8O.mjs +34 -0
- package/dist/linear-75tfjrny.js +1 -0
- package/dist/linear-Ncx_RuON.mjs +288 -0
- package/dist/mermaid-parser.core-BBApyu_y.js +6 -0
- package/dist/mermaid-parser.core-BRHibdUE.mjs +638 -0
- package/dist/mindmap-definition-YA3MSWOX-Chy7XP_5.mjs +1006 -0
- package/dist/mindmap-definition-YA3MSWOX-DOda-fkL.js +96 -0
- package/dist/ordinal-B1BNQwUR.mjs +65 -0
- package/dist/ordinal-B9aFWmF9.js +1 -0
- package/dist/packet-AYTQ26CC-CorIy9Ul.js +1 -0
- package/dist/packet-AYTQ26CC-DWH8gXJK.mjs +3 -0
- package/dist/path-CnWkkRiY.mjs +84 -0
- package/dist/path-DIS6ck99.js +1 -0
- package/dist/pegDiagram-XKGWAZYB-Cdw6MeON.js +1 -0
- package/dist/pegDiagram-XKGWAZYB-uNfxRaq1.mjs +94 -0
- package/dist/pie-WAS4IAKB-Cn5eK-5P.mjs +3 -0
- package/dist/pie-WAS4IAKB-D84xrSoY.js +1 -0
- package/dist/pieDiagram-E7YTZNPT-Bd6mvpJw.js +39 -0
- package/dist/pieDiagram-E7YTZNPT-Cczo96a2.mjs +203 -0
- package/dist/quadrantDiagram-AXDQQJYC-BPfgvMsS.js +7 -0
- package/dist/quadrantDiagram-AXDQQJYC-eqRNtVRl.mjs +2001 -0
- package/dist/radar-RG4KPBEZ-DvkxGdO6.mjs +3 -0
- package/dist/radar-RG4KPBEZ-R2sQOLL9.js +1 -0
- package/dist/railroad-74A4TZTK-BOZIf6ts.js +1 -0
- package/dist/railroad-74A4TZTK-CrQzn8Nm.mjs +3 -0
- package/dist/railroad-abnf-HS5TGJTU-BZYetxLz.mjs +3 -0
- package/dist/railroad-abnf-HS5TGJTU-CXU1aC4B.js +1 -0
- package/dist/railroad-ebnf-LZEXJU2U-D29kI3YW.js +1 -0
- package/dist/railroad-ebnf-LZEXJU2U-qgzTOmN6.mjs +3 -0
- package/dist/railroad-peg-WCYAUIDC-Bjs9Ws3P.mjs +3 -0
- package/dist/railroad-peg-WCYAUIDC-CXviP0hz.js +1 -0
- package/dist/railroadDiagram-O6MQD6OU-58kvwt7H.mjs +76 -0
- package/dist/railroadDiagram-O6MQD6OU-CKY3uzTc.js +1 -0
- package/dist/requirementDiagram-BXWQKSXE-0hZ04Q6h.js +84 -0
- package/dist/requirementDiagram-BXWQKSXE-CS673B5n.mjs +2224 -0
- package/dist/rough.esm-ChRLLRha.js +1 -0
- package/dist/rough.esm-DXYGHN3m.mjs +1361 -0
- package/dist/sankeyDiagram-P5KCCOFB-D1D6HfAM.mjs +972 -0
- package/dist/sankeyDiagram-P5KCCOFB-ciJb9Zr8.js +40 -0
- package/dist/sequenceDiagram-WJ2MYXX4-BXEznuI6.js +162 -0
- package/dist/sequenceDiagram-WJ2MYXX4-CI1VT8AG.mjs +4156 -0
- package/dist/sizeCapture-INFHLROL-BihkCH-7.js +1 -0
- package/dist/sizeCapture-INFHLROL-BmxqyOLj.mjs +46 -0
- package/dist/src-B4mN2BMl.js +1 -0
- package/dist/src-D_hsMyeP.mjs +2154 -0
- package/dist/stateDiagram-D77RDMKH-BQrSs72W.mjs +220 -0
- package/dist/stateDiagram-D77RDMKH-D2PtkW2U.js +1 -0
- package/dist/stateDiagram-v2-MP3YSRHH-CCbvNfk-.mjs +30 -0
- package/dist/stateDiagram-v2-MP3YSRHH-Dq1QuPeN.js +1 -0
- package/dist/swimlanes-42K2YHIH-CA316NPm.mjs +4979 -0
- package/dist/swimlanes-42K2YHIH-DlggBCTy.js +1 -0
- package/dist/swimlanesDiagram-VR7AAH4N-BV9PEIoG.js +8 -0
- package/dist/swimlanesDiagram-VR7AAH4N-BfrOCfdf.mjs +31 -0
- package/dist/timeline-definition-24CTP7MA-Bkd8rWNJ.js +120 -0
- package/dist/timeline-definition-24CTP7MA-BvkqNYt1.mjs +1069 -0
- package/dist/treeView-Q6P3EWNA-Aof3Cp1M.mjs +3 -0
- package/dist/treeView-Q6P3EWNA-BTzvdwbb.js +1 -0
- package/dist/treemap-WGGIJYW6-BNXGg99p.mjs +3 -0
- package/dist/treemap-WGGIJYW6-DfR4P2Hh.js +1 -0
- package/dist/types/runtime/components/AppearanceMenu.d.ts +2 -0
- package/dist/types/runtime/components/DmdRegistry.d.ts +3 -1
- package/dist/types/runtime/components/MermaidDiagram.d.ts +16 -0
- package/dist/types/runtime/components/OfflineDownloadButton.d.ts +2 -0
- package/dist/types/runtime/config-schema.d.ts +42 -0
- package/dist/types/runtime/index.d.ts +1 -0
- package/dist/types/runtime/markdown/mermaid.d.ts +82 -1
- package/dist/types/runtime/offline-export.d.ts +26 -0
- package/dist/types/runtime/provider/ThemeProvider.d.ts +11 -4
- package/dist/types/runtime/types.d.ts +4 -1
- package/dist/vennDiagram-4TSXK5OY-BOUFXjso.js +34 -0
- package/dist/vennDiagram-4TSXK5OY-CeOg3-hU.mjs +1880 -0
- package/dist/wardley-WFR3VGLG-BOYcSLd1.mjs +3 -0
- package/dist/wardley-WFR3VGLG-DWDqJSgm.js +1 -0
- package/dist/wardleyDiagram-VM6X3IG4-BhWgMjFr.js +78 -0
- package/dist/wardleyDiagram-VM6X3IG4-C31KoRmF.mjs +645 -0
- package/dist/xychartDiagram-S5SC5T6Z-1yU8zz6I.js +7 -0
- package/dist/xychartDiagram-S5SC5T6Z-BK7upFom.mjs +2210 -0
- package/package.json +6 -3
- package/schemas/docs.schema.json +10 -1
- package/templates/README.md +4 -4
- package/templates/docs.json +4 -2
- package/templates/getting-started.md +1 -1
- package/templates/guides/custom-components.md +2 -0
- package/templates/index.html +2 -4
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { m as e } from "./src-D_hsMyeP.mjs";
|
|
2
|
+
import { n as t } from "./chunk-Y2CYZVJY-i11wjrBe.mjs";
|
|
3
|
+
import { H as n, K as r, U as i, a, c as o, f as s, v as c, w as l, x as u, y as d } from "./chunk-DU6HZSFF-BEQZSmUu.mjs";
|
|
4
|
+
import { t as f } from "./ordinal-B1BNQwUR.mjs";
|
|
5
|
+
import { n as p } from "./path-CnWkkRiY.mjs";
|
|
6
|
+
import { m } from "./dist-DNdLIC8h.mjs";
|
|
7
|
+
import { t as h } from "./arc-DgPKXEdT.mjs";
|
|
8
|
+
import { t as g } from "./array-CApNbSU9.mjs";
|
|
9
|
+
import { i as _, p as v } from "./chunk-75Z2AOVW-Dz0Sko9Y.mjs";
|
|
10
|
+
import { t as y } from "./chunk-CLGD4ZFX-DBkwyMMv.mjs";
|
|
11
|
+
import { n as b } from "./mermaid-parser.core-BRHibdUE.mjs";
|
|
12
|
+
import { t as x } from "./chunk-JWPE2WC7-DIKiF5cm.mjs";
|
|
13
|
+
//#region node_modules/d3-shape/src/descending.js
|
|
14
|
+
function S(e, t) {
|
|
15
|
+
return t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region node_modules/d3-shape/src/identity.js
|
|
19
|
+
function C(e) {
|
|
20
|
+
return e;
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region node_modules/d3-shape/src/pie.js
|
|
24
|
+
function w() {
|
|
25
|
+
var e = C, t = S, n = null, r = p(0), i = p(m), a = p(0);
|
|
26
|
+
function o(o) {
|
|
27
|
+
var s, c = (o = g(o)).length, l, u, d = 0, f = Array(c), p = Array(c), h = +r.apply(this, arguments), _ = Math.min(m, Math.max(-m, i.apply(this, arguments) - h)), v, y = Math.min(Math.abs(_) / c, a.apply(this, arguments)), b = y * (_ < 0 ? -1 : 1), x;
|
|
28
|
+
for (s = 0; s < c; ++s) (x = p[f[s] = s] = +e(o[s], s, o)) > 0 && (d += x);
|
|
29
|
+
for (t == null ? n != null && f.sort(function(e, t) {
|
|
30
|
+
return n(o[e], o[t]);
|
|
31
|
+
}) : f.sort(function(e, n) {
|
|
32
|
+
return t(p[e], p[n]);
|
|
33
|
+
}), s = 0, u = d ? (_ - c * b) / d : 0; s < c; ++s, h = v) l = f[s], x = p[l], v = h + (x > 0 ? x * u : 0) + b, p[l] = {
|
|
34
|
+
data: o[l],
|
|
35
|
+
index: s,
|
|
36
|
+
value: x,
|
|
37
|
+
startAngle: h,
|
|
38
|
+
endAngle: v,
|
|
39
|
+
padAngle: y
|
|
40
|
+
};
|
|
41
|
+
return p;
|
|
42
|
+
}
|
|
43
|
+
return o.value = function(t) {
|
|
44
|
+
return arguments.length ? (e = typeof t == "function" ? t : p(+t), o) : e;
|
|
45
|
+
}, o.sortValues = function(e) {
|
|
46
|
+
return arguments.length ? (t = e, n = null, o) : t;
|
|
47
|
+
}, o.sort = function(e) {
|
|
48
|
+
return arguments.length ? (n = e, t = null, o) : n;
|
|
49
|
+
}, o.startAngle = function(e) {
|
|
50
|
+
return arguments.length ? (r = typeof e == "function" ? e : p(+e), o) : r;
|
|
51
|
+
}, o.endAngle = function(e) {
|
|
52
|
+
return arguments.length ? (i = typeof e == "function" ? e : p(+e), o) : i;
|
|
53
|
+
}, o.padAngle = function(e) {
|
|
54
|
+
return arguments.length ? (a = typeof e == "function" ? e : p(+e), o) : a;
|
|
55
|
+
}, o;
|
|
56
|
+
}
|
|
57
|
+
//#endregion
|
|
58
|
+
//#region node_modules/mermaid/dist/chunks/mermaid.core/pieDiagram-E7YTZNPT.mjs
|
|
59
|
+
var T = s.pie, E = {
|
|
60
|
+
sections: /* @__PURE__ */ new Map(),
|
|
61
|
+
showData: !1,
|
|
62
|
+
config: T
|
|
63
|
+
}, D = E.sections, O = E.showData, k = structuredClone(T), A = {
|
|
64
|
+
getConfig: /* @__PURE__ */ t(() => structuredClone(k), "getConfig"),
|
|
65
|
+
clear: /* @__PURE__ */ t(() => {
|
|
66
|
+
D = /* @__PURE__ */ new Map(), O = E.showData, a();
|
|
67
|
+
}, "clear"),
|
|
68
|
+
setDiagramTitle: r,
|
|
69
|
+
getDiagramTitle: l,
|
|
70
|
+
setAccTitle: i,
|
|
71
|
+
getAccTitle: d,
|
|
72
|
+
setAccDescription: n,
|
|
73
|
+
getAccDescription: c,
|
|
74
|
+
addSection: /* @__PURE__ */ t(({ label: t, value: n }) => {
|
|
75
|
+
if (n < 0) throw Error(`"${t}" has invalid value: ${n}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);
|
|
76
|
+
D.has(t) || (D.set(t, n), e.debug(`added new section: ${t}, with value: ${n}`));
|
|
77
|
+
}, "addSection"),
|
|
78
|
+
getSections: /* @__PURE__ */ t(() => D, "getSections"),
|
|
79
|
+
setShowData: /* @__PURE__ */ t((e) => {
|
|
80
|
+
O = e;
|
|
81
|
+
}, "setShowData"),
|
|
82
|
+
getShowData: /* @__PURE__ */ t(() => O, "getShowData")
|
|
83
|
+
}, j = /* @__PURE__ */ t((e, t) => {
|
|
84
|
+
x(e, t), t.setShowData(e.showData), e.sections.map(t.addSection);
|
|
85
|
+
}, "populateDb"), M = { parse: /* @__PURE__ */ t(async (t) => {
|
|
86
|
+
let n = await b("pie", t);
|
|
87
|
+
e.debug(n), j(n, A);
|
|
88
|
+
}, "parse") }, N = /* @__PURE__ */ t((e) => `
|
|
89
|
+
.pieCircle{
|
|
90
|
+
stroke: ${e.pieStrokeColor};
|
|
91
|
+
stroke-width : ${e.pieStrokeWidth};
|
|
92
|
+
opacity : ${e.pieOpacity};
|
|
93
|
+
}
|
|
94
|
+
.pieCircle.highlighted{
|
|
95
|
+
scale: 1.05;
|
|
96
|
+
opacity: 1;
|
|
97
|
+
}
|
|
98
|
+
.pieCircle.highlightedOnHover:hover{
|
|
99
|
+
transition-duration: 250ms;
|
|
100
|
+
scale: 1.05;
|
|
101
|
+
opacity: 1;
|
|
102
|
+
}
|
|
103
|
+
.pieOuterCircle{
|
|
104
|
+
stroke: ${e.pieOuterStrokeColor};
|
|
105
|
+
stroke-width: ${e.pieOuterStrokeWidth};
|
|
106
|
+
fill: none;
|
|
107
|
+
}
|
|
108
|
+
.pieTitleText {
|
|
109
|
+
text-anchor: middle;
|
|
110
|
+
font-size: ${e.pieTitleTextSize};
|
|
111
|
+
fill: ${e.pieTitleTextColor};
|
|
112
|
+
font-family: ${e.fontFamily};
|
|
113
|
+
}
|
|
114
|
+
.slice {
|
|
115
|
+
font-family: ${e.fontFamily};
|
|
116
|
+
fill: ${e.pieSectionTextColor};
|
|
117
|
+
font-size:${e.pieSectionTextSize};
|
|
118
|
+
// fill: white;
|
|
119
|
+
}
|
|
120
|
+
.legend text {
|
|
121
|
+
fill: ${e.pieLegendTextColor};
|
|
122
|
+
font-family: ${e.fontFamily};
|
|
123
|
+
font-size: ${e.pieLegendTextSize};
|
|
124
|
+
}
|
|
125
|
+
`, "getStyles"), P = /* @__PURE__ */ t((e) => {
|
|
126
|
+
let t = [...e.values()].reduce((e, t) => e + t, 0), n = [...e.entries()].map(([e, t]) => ({
|
|
127
|
+
label: e,
|
|
128
|
+
value: t
|
|
129
|
+
})).filter((e) => e.value / t * 100 >= 1);
|
|
130
|
+
return w().value((e) => e.value).sort(null)(n);
|
|
131
|
+
}, "createPieArcs"), F = {
|
|
132
|
+
parser: M,
|
|
133
|
+
db: A,
|
|
134
|
+
renderer: { draw: /* @__PURE__ */ t((t, n, r, i) => {
|
|
135
|
+
e.debug("rendering pie chart\n" + t);
|
|
136
|
+
let a = i.db, s = u(), c = _(a.getConfig(), s.pie), l = y(n), d = l.append("g");
|
|
137
|
+
d.attr("transform", "translate(225,225)");
|
|
138
|
+
let { themeVariables: p } = s, [m] = v(p.pieOuterStrokeWidth);
|
|
139
|
+
m ??= 2;
|
|
140
|
+
let g = c.legendPosition, b = c.textPosition, x = c.donutHole > 0 && c.donutHole <= .9 ? c.donutHole : 0, S = h().innerRadius(x * 185).outerRadius(185), C = h().innerRadius(185 * b).outerRadius(185 * b), w = d.append("g");
|
|
141
|
+
w.append("circle").attr("cx", 0).attr("cy", 0).attr("r", 185 + m / 2).attr("class", "pieOuterCircle");
|
|
142
|
+
let T = a.getSections(), E = P(T), D = [
|
|
143
|
+
p.pie1,
|
|
144
|
+
p.pie2,
|
|
145
|
+
p.pie3,
|
|
146
|
+
p.pie4,
|
|
147
|
+
p.pie5,
|
|
148
|
+
p.pie6,
|
|
149
|
+
p.pie7,
|
|
150
|
+
p.pie8,
|
|
151
|
+
p.pie9,
|
|
152
|
+
p.pie10,
|
|
153
|
+
p.pie11,
|
|
154
|
+
p.pie12
|
|
155
|
+
], O = 0;
|
|
156
|
+
T.forEach((e) => {
|
|
157
|
+
O += e;
|
|
158
|
+
});
|
|
159
|
+
let k = E.filter((e) => (e.data.value / O * 100).toFixed(0) !== "0"), A = f(D).domain([...T.keys()]);
|
|
160
|
+
w.selectAll("mySlices").data(k).enter().append("path").attr("d", S).attr("fill", (e) => A(e.data.label)).attr("class", (e) => {
|
|
161
|
+
let t = "pieCircle";
|
|
162
|
+
return c.highlightSlice === "hover" ? t += " highlightedOnHover" : c.highlightSlice === e.data.label && (t += " highlighted"), t;
|
|
163
|
+
}), w.selectAll("mySlices").data(k).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");
|
|
164
|
+
let j = d.append("text").text(a.getDiagramTitle()).attr("x", 0).attr("y", -200).attr("class", "pieTitleText"), M = [...T.entries()].map(([e, t]) => ({
|
|
165
|
+
label: e,
|
|
166
|
+
value: t
|
|
167
|
+
})), N = d.selectAll(".legend").data(M).enter().append("g").attr("class", "legend");
|
|
168
|
+
N.append("rect").attr("width", 18).attr("height", 18).style("fill", (e) => A(e.label)).style("stroke", (e) => A(e.label)), N.append("text").attr("x", 22).attr("y", 14).text((e) => a.getShowData() ? `${e.label} [${e.value}]` : e.label);
|
|
169
|
+
let F = Math.max(...N.selectAll("text").nodes().map((e) => e?.getBoundingClientRect().width ?? 0)), I = 450, L = 490, R = M.length * 22;
|
|
170
|
+
switch (g) {
|
|
171
|
+
case "center":
|
|
172
|
+
N.attr("transform", (e, t) => {
|
|
173
|
+
let n = 22 * M.length / 2, r = -F / 2 - 22, i = t * 22 - n;
|
|
174
|
+
return "translate(" + r + "," + i + ")";
|
|
175
|
+
});
|
|
176
|
+
break;
|
|
177
|
+
case "top":
|
|
178
|
+
I += R, N.attr("transform", (e, t) => `translate(${-F / 2 - 22}, ${t * 22 - 185})`), w.attr("transform", () => `translate(0, ${R + 22})`);
|
|
179
|
+
break;
|
|
180
|
+
case "bottom":
|
|
181
|
+
I += R, N.attr("transform", (e, t) => {
|
|
182
|
+
let n = -F / 2 - 22, r = t * 22 - -207;
|
|
183
|
+
return "translate(" + n + "," + r + ")";
|
|
184
|
+
});
|
|
185
|
+
break;
|
|
186
|
+
case "left":
|
|
187
|
+
L += 22 + F, N.attr("transform", (e, t) => {
|
|
188
|
+
let n = 22 * M.length / 2;
|
|
189
|
+
return "translate(-207," + (t * 22 - n) + ")";
|
|
190
|
+
}), w.attr("transform", () => `translate(${F + 18 + 4}, 0)`);
|
|
191
|
+
break;
|
|
192
|
+
default: L += 22 + F, N.attr("transform", (e, t) => {
|
|
193
|
+
let n = 22 * M.length / 2;
|
|
194
|
+
return "translate(216," + (t * 22 - n) + ")";
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
let z = j.node()?.getBoundingClientRect().width ?? 0, B = 225 - z / 2, V = 225 + z / 2, H = Math.min(0, B), U = Math.max(L, V) - H;
|
|
198
|
+
l.attr("viewBox", `${H} 0 ${U} ${I}`), o(l, I, U, c.useMaxWidth);
|
|
199
|
+
}, "draw") },
|
|
200
|
+
styles: N
|
|
201
|
+
};
|
|
202
|
+
//#endregion
|
|
203
|
+
export { F as diagram };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
const e=require("./src-B4mN2BMl.js"),t=require("./chunk-Y2CYZVJY-CnmLqFtv.js"),n=require("./chunk-DU6HZSFF-CWc5ewtb.js"),r=require("./linear-75tfjrny.js");var i=(function(){var e=t.n(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,3],r=[1,4],i=[1,5],a=[1,6],o=[1,7],s=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],c=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],l=[55,56,57],u=[2,36],d=[1,37],f=[1,36],p=[1,38],m=[1,35],h=[1,43],g=[1,41],_=[1,45],v=[1,14],y=[1,23],b=[1,18],x=[1,19],S=[1,20],C=[1,21],w=[1,22],T=[1,24],E=[1,25],D=[1,26],O=[1,27],k=[1,28],A=[1,29],j=[1,32],M=[1,33],N=[1,34],P=[1,39],F=[1,40],I=[1,42],L=[1,44],R=[1,63],z=[1,62],B=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],ee=[1,66],te=[1,67],ne=[1,68],re=[1,69],ie=[1,70],ae=[1,71],oe=[1,72],se=[1,73],ce=[1,74],le=[1,75],ue=[1,76],de=[1,77],V=[4,5,6,7,8,9,10,11,12,13,14,15,18],H=[1,91],U=[1,92],W=[1,93],G=[1,100],K=[1,94],q=[1,97],J=[1,95],Y=[1,96],X=[1,98],Z=[1,99],fe=[1,103],pe=[10,55,56,57],Q=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],me={trace:t.n(function(){},`trace`),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:`error`,4:`ALPHA`,5:`NUM`,6:`NODE_STRING`,7:`DOWN`,8:`MINUS`,9:`DEFAULT`,10:`COMMA`,11:`COLON`,12:`AMP`,13:`BRKT`,14:`MULT`,15:`UNICODE_TEXT`,17:`UNIT`,18:`SPACE`,19:`STYLE`,20:`PCT`,25:`CLASSDEF`,28:`QUADRANT`,35:`title`,36:`title_value`,37:`acc_title`,38:`acc_title_value`,39:`acc_descr`,40:`acc_descr_value`,41:`acc_descr_multiline_value`,42:`section`,44:`point_start`,45:`point_x`,46:`point_y`,47:`class_name`,48:`X-AXIS`,49:`AXIS-TEXT-DELIMITER`,50:`Y-AXIS`,51:`QUADRANT_1`,52:`QUADRANT_2`,53:`QUADRANT_3`,54:`QUADRANT_4`,55:`NEWLINE`,56:`SEMI`,57:`EOF`,60:`STR`,61:`MD_STR`,63:`PUNCTUATION`,64:`PLUS`,65:`EQUALS`,66:`DOT`,67:`UNDERSCORE`},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:t.n(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 23:this.$=a[s];break;case 24:this.$=a[s-1]+``+a[s];break;case 26:this.$=a[s-1]+a[s];break;case 27:this.$=[a[s].trim()];break;case 28:a[s-2].push(a[s].trim()),this.$=a[s-2];break;case 29:this.$=a[s-4],r.addClass(a[s-2],a[s]);break;case 37:this.$=[];break;case 42:this.$=a[s].trim(),r.setDiagramTitle(this.$);break;case 43:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 44:case 45:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 46:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 47:r.addPoint(a[s-3],``,a[s-1],a[s],[]);break;case 48:r.addPoint(a[s-4],a[s-3],a[s-1],a[s],[]);break;case 49:r.addPoint(a[s-4],``,a[s-2],a[s-1],a[s]);break;case 50:r.addPoint(a[s-5],a[s-4],a[s-2],a[s-1],a[s]);break;case 51:r.setXAxisLeftText(a[s-2]),r.setXAxisRightText(a[s]);break;case 52:a[s-1].text+=` ⟶ `,r.setXAxisLeftText(a[s-1]);break;case 53:r.setXAxisLeftText(a[s]);break;case 54:r.setYAxisBottomText(a[s-2]),r.setYAxisTopText(a[s]);break;case 55:a[s-1].text+=` ⟶ `,r.setYAxisBottomText(a[s-1]);break;case 56:r.setYAxisBottomText(a[s]);break;case 57:r.setQuadrant1Text(a[s]);break;case 58:r.setQuadrant2Text(a[s]);break;case 59:r.setQuadrant3Text(a[s]);break;case 60:r.setQuadrant4Text(a[s]);break;case 64:this.$={text:a[s],type:`text`};break;case 65:this.$={text:a[s-1].text+``+a[s],type:a[s-1].type};break;case 66:this.$={text:a[s],type:`text`};break;case 67:this.$={text:a[s],type:`markdown`};break;case 68:this.$=a[s];break;case 69:this.$=a[s-1]+``+a[s]}},`anonymous`),table:[{18:n,26:1,27:2,28:r,55:i,56:a,57:o},{1:[3]},{18:n,26:8,27:2,28:r,55:i,56:a,57:o},{18:n,26:9,27:2,28:r,55:i,56:a,57:o},e(s,[2,33],{29:10}),e(c,[2,61]),e(c,[2,62]),e(c,[2,63]),{1:[2,30]},{1:[2,31]},e(l,u,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:d,5:f,10:p,12:m,13:h,14:g,15:_,18:v,25:y,35:b,37:x,39:S,41:C,42:w,48:T,50:E,51:D,52:O,53:k,54:A,60:j,61:M,63:N,64:P,65:F,66:I,67:L}),e(s,[2,34]),{27:46,55:i,56:a,57:o},e(l,[2,37]),e(l,u,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:d,5:f,10:p,12:m,13:h,14:g,15:_,18:v,25:y,35:b,37:x,39:S,41:C,42:w,48:T,50:E,51:D,52:O,53:k,54:A,60:j,61:M,63:N,64:P,65:F,66:I,67:L}),e(l,[2,39]),e(l,[2,40]),e(l,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},e(l,[2,45]),e(l,[2,46]),{18:[1,51]},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:52,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:53,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:54,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:55,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:56,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:57,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,44:[1,58],47:[1,59],58:61,59:60,63:N,64:P,65:F,66:I,67:L},e(B,[2,64]),e(B,[2,66]),e(B,[2,67]),e(B,[2,70]),e(B,[2,71]),e(B,[2,72]),e(B,[2,73]),e(B,[2,74]),e(B,[2,75]),e(B,[2,76]),e(B,[2,77]),e(B,[2,78]),e(B,[2,79]),e(B,[2,80]),e(B,[2,81]),e(s,[2,35]),e(l,[2,38]),e(l,[2,42]),e(l,[2,43]),e(l,[2,44]),{3:65,4:ee,5:te,6:ne,7:re,8:ie,9:ae,10:oe,11:se,12:ce,13:le,14:ue,15:de,21:64},e(l,[2,53],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,49:[1,78],63:N,64:P,65:F,66:I,67:L}),e(l,[2,56],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,49:[1,79],63:N,64:P,65:F,66:I,67:L}),e(l,[2,57],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),e(l,[2,58],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),e(l,[2,59],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),e(l,[2,60],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),{45:[1,80]},{44:[1,81]},e(B,[2,65]),e(B,[2,82]),e(B,[2,83]),e(B,[2,84]),{3:83,4:ee,5:te,6:ne,7:re,8:ie,9:ae,10:oe,11:se,12:ce,13:le,14:ue,15:de,18:[1,82]},e(V,[2,23]),e(V,[2,1]),e(V,[2,2]),e(V,[2,3]),e(V,[2,4]),e(V,[2,5]),e(V,[2,6]),e(V,[2,7]),e(V,[2,8]),e(V,[2,9]),e(V,[2,10]),e(V,[2,11]),e(V,[2,12]),e(l,[2,52],{58:31,43:84,4:d,5:f,10:p,12:m,13:h,14:g,15:_,60:j,61:M,63:N,64:P,65:F,66:I,67:L}),e(l,[2,55],{58:31,43:85,4:d,5:f,10:p,12:m,13:h,14:g,15:_,60:j,61:M,63:N,64:P,65:F,66:I,67:L}),{46:[1,86]},{45:[1,87]},{4:H,5:U,6:W,8:G,11:K,13:q,16:90,17:J,18:Y,19:X,20:Z,22:89,23:88},e(V,[2,24]),e(l,[2,51],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),e(l,[2,54],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),e(l,[2,47],{22:89,16:90,23:101,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z}),{46:[1,102]},e(l,[2,29],{10:fe}),e(pe,[2,27],{16:104,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z}),e(Q,[2,25]),e(Q,[2,13]),e(Q,[2,14]),e(Q,[2,15]),e(Q,[2,16]),e(Q,[2,17]),e(Q,[2,18]),e(Q,[2,19]),e(Q,[2,20]),e(Q,[2,21]),e(Q,[2,22]),e(l,[2,49],{10:fe}),e(l,[2,48],{22:89,16:90,23:105,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z}),{4:H,5:U,6:W,8:G,11:K,13:q,16:90,17:J,18:Y,19:X,20:Z,22:106},e(Q,[2,26]),e(l,[2,50],{10:fe}),e(pe,[2,28],{16:104,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z})],defaultActions:{8:[2,30],9:[2,31]},parseError:t.n(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t.n(function(e){var n=this,r=[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:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t.n(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t.n(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
2
|
+
`+h.showPosition()+`
|
|
3
|
+
Expecting `+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,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.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--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};me.lexer=(function(){return{EOF:1,parseError:t.n(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:t.n(function(e,t){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={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:t.n(function(){var e=this._input[0];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},`input`),unput:t.n(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);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);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,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},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:t.n(function(){return this._more=!0,this},`more`),reject:t.n(function(){if(this.options.backtrack_lexer)this._backtrack=!0;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).
|
|
4
|
+
`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:t.n(function(e){this.unput(this.match.slice(e))},`less`),pastInput:t.n(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:t.n(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:t.n(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|
5
|
+
`+t+`^`},`showPosition`),test_match:t.n(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},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={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},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;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:t.n(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);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)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}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.
|
|
6
|
+
`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:t.n(function(){return this.next()||this.lex()},`lex`),begin:t.n(function(e){this.conditionStack.push(e)},`begin`),popState:t.n(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:t.n(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:t.n(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:t.n(function(e){this.begin(e)},`pushState`),stateStackSize:t.n(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:t.n(function(e,t,n,r){switch(n){case 0:break;case 1:break;case 2:return 55;case 3:break;case 4:return this.begin(`title`),35;case 5:return this.popState(),`title_value`;case 6:return this.begin(`acc_title`),37;case 7:return this.popState(),`acc_title_value`;case 8:return this.begin(`acc_descr`),39;case 9:return this.popState(),`acc_descr_value`;case 10:this.begin(`acc_descr_multiline`);break;case 11:this.popState();break;case 12:return`acc_descr_multiline_value`;case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin(`md_string`);break;case 22:return`MD_STR`;case 23:this.popState();break;case 24:this.begin(`string`);break;case 25:this.popState();break;case 26:return`STR`;case 27:this.begin(`class_name`);break;case 28:return this.popState(),47;case 29:return this.begin(`point_start`),44;case 30:return this.begin(`point_x`),45;case 31:this.popState();break;case 32:this.popState(),this.begin(`point_y`);break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 15;case 37:return 11;case 38:return 64;case 39:return 10;case 40:return 65;case 41:return 65;case 42:return 14;case 43:return 13;case 44:return 67;case 45:return 66;case 46:return 12;case 47:return 8;case 48:return 5;case 49:return 18;case 50:return 56;case 51:return 63;case 52:return 57}},`anonymous`),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?:[^\x00-\x7F]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}}})();function $(){this.yy={}}return t.n($,`Parser`),$.prototype=me,me.Parser=$,new $})();i.parser=i;var a=i,o=n.D(),s=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{t.n(this,`QuadrantBuilder`)}getDefaultData(){return{titleText:``,quadrant1Text:``,quadrant2Text:``,quadrant3Text:``,quadrant4Text:``,xAxisLeftText:``,xAxisRightText:``,yAxisBottomText:``,yAxisTopText:``,points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:n.f.quadrantChart?.chartWidth||500,chartWidth:n.f.quadrantChart?.chartHeight||500,titlePadding:n.f.quadrantChart?.titlePadding||10,titleFontSize:n.f.quadrantChart?.titleFontSize||20,quadrantPadding:n.f.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:n.f.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:n.f.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:n.f.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:n.f.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:n.f.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:n.f.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:n.f.quadrantChart?.pointTextPadding||5,pointLabelFontSize:n.f.quadrantChart?.pointLabelFontSize||12,pointRadius:n.f.quadrantChart?.pointRadius||5,xAxisPosition:n.f.quadrantChart?.xAxisPosition||`top`,yAxisPosition:n.f.quadrantChart?.yAxisPosition||`left`,quadrantInternalBorderStrokeWidth:n.f.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:n.f.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:o.quadrant1Fill,quadrant2Fill:o.quadrant2Fill,quadrant3Fill:o.quadrant3Fill,quadrant4Fill:o.quadrant4Fill,quadrant1TextFill:o.quadrant1TextFill,quadrant2TextFill:o.quadrant2TextFill,quadrant3TextFill:o.quadrant3TextFill,quadrant4TextFill:o.quadrant4TextFill,quadrantPointFill:o.quadrantPointFill,quadrantPointTextFill:o.quadrantPointTextFill,quadrantXAxisTextFill:o.quadrantXAxisTextFill,quadrantYAxisTextFill:o.quadrantYAxisTextFill,quadrantTitleFill:o.quadrantTitleFill,quadrantInternalBorderStrokeFill:o.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:o.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,e.m.info(`clear called`)}setData(e){this.data={...this.data,...e}}addPoints(e){this.data.points=[...e,...this.data.points]}addClass(e,t){this.classes.set(e,t)}setConfig(t){e.m.trace(`setConfig called with: `,t),this.config={...this.config,...t}}setThemeConfig(t){e.m.trace(`setThemeConfig called with: `,t),this.themeConfig={...this.themeConfig,...t}}calculateSpace(e,t,n,r){let i=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,a={top:e===`top`&&t?i:0,bottom:e===`bottom`&&t?i:0},o=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,s={left:this.config.yAxisPosition===`left`&&n?o:0,right:this.config.yAxisPosition===`right`&&n?o:0},c=this.config.titleFontSize+this.config.titlePadding*2,l={top:r?c:0},u=this.config.quadrantPadding+s.left,d=this.config.quadrantPadding+a.top+l.top,f=this.config.chartWidth-this.config.quadrantPadding*2-s.left-s.right,p=this.config.chartHeight-this.config.quadrantPadding*2-a.top-a.bottom-l.top;return{xAxisSpace:a,yAxisSpace:s,titleSpace:l,quadrantSpace:{quadrantLeft:u,quadrantTop:d,quadrantWidth:f,quadrantHalfWidth:f/2,quadrantHeight:p,quadrantHalfHeight:p/2}}}getAxisLabels(e,t,n,r){let{quadrantSpace:i,titleSpace:a}=r,{quadrantHalfHeight:o,quadrantHeight:s,quadrantLeft:c,quadrantHalfWidth:l,quadrantTop:u,quadrantWidth:d}=i,f=!!this.data.xAxisRightText,p=!!this.data.yAxisTopText,m=[];return this.data.xAxisLeftText&&t&&m.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:c+(f?l/2:0),y:e===`top`?this.config.xAxisLabelPadding+a.top:this.config.xAxisLabelPadding+u+s+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:f?`center`:`left`,horizontalPos:`top`,rotation:0}),this.data.xAxisRightText&&t&&m.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:c+l+(f?l/2:0),y:e===`top`?this.config.xAxisLabelPadding+a.top:this.config.xAxisLabelPadding+u+s+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:f?`center`:`left`,horizontalPos:`top`,rotation:0}),this.data.yAxisBottomText&&n&&m.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition===`left`?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+c+d+this.config.quadrantPadding,y:u+s-(p?o/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:p?`center`:`left`,horizontalPos:`top`,rotation:-90}),this.data.yAxisTopText&&n&&m.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition===`left`?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+c+d+this.config.quadrantPadding,y:u+o-(p?o/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:p?`center`:`left`,horizontalPos:`top`,rotation:-90}),m}getQuadrants(e){let{quadrantSpace:t}=e,{quadrantHalfHeight:n,quadrantLeft:r,quadrantHalfWidth:i,quadrantTop:a}=t,o=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:`center`,horizontalPos:`middle`,rotation:0},x:r+i,y:a,width:i,height:n,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:`center`,horizontalPos:`middle`,rotation:0},x:r,y:a,width:i,height:n,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:`center`,horizontalPos:`middle`,rotation:0},x:r,y:a+n,width:i,height:n,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:`center`,horizontalPos:`middle`,rotation:0},x:r+i,y:a+n,width:i,height:n,fill:this.themeConfig.quadrant4Fill}];for(let e of o)e.text.x=e.x+e.width/2,this.data.points.length===0?(e.text.y=e.y+e.height/2,e.text.horizontalPos=`middle`):(e.text.y=e.y+this.config.quadrantTextTopPadding,e.text.horizontalPos=`top`);return o}getQuadrantPoints(e){let{quadrantSpace:t}=e,{quadrantHeight:n,quadrantLeft:i,quadrantTop:a,quadrantWidth:o}=t,s=r.t().domain([0,1]).range([i,o+i]),c=r.t().domain([0,1]).range([n+a,a]);return this.data.points.map(e=>{let t=this.classes.get(e.className);return t&&(e={...t,...e}),{x:s(e.x),y:c(e.y),fill:e.color??this.themeConfig.quadrantPointFill,radius:e.radius??this.config.pointRadius,text:{text:e.text,fill:this.themeConfig.quadrantPointTextFill,x:s(e.x),y:c(e.y)+this.config.pointTextPadding,verticalPos:`center`,horizontalPos:`top`,fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:e.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:e.strokeWidth??`0px`}})}getBorders(e){let t=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:n}=e,{quadrantHalfHeight:r,quadrantHeight:i,quadrantLeft:a,quadrantHalfWidth:o,quadrantTop:s,quadrantWidth:c}=n;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a-t,y1:s,x2:a+c+t,y2:s},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a+c,y1:s+t,x2:a+c,y2:s+i-t},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a-t,y1:s+i,x2:a+c+t,y2:s+i},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a,y1:s+t,x2:a,y2:s+i-t},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:a+o,y1:s+t,x2:a+o,y2:s+i-t},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:a+t,y1:s+r,x2:a+c-t,y2:s+r}]}getTitle(e){if(e)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:`top`,verticalPos:`center`,rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){let e=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),t=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),n=this.config.showTitle&&!!this.data.titleText,r=this.data.points.length>0?`bottom`:this.config.xAxisPosition,i=this.calculateSpace(r,e,t,n);return{points:this.getQuadrantPoints(i),quadrants:this.getQuadrants(i),axisLabels:this.getAxisLabels(r,e,t,i),borderLines:this.getBorders(i),title:this.getTitle(n)}}},c=class extends Error{static{t.n(this,`InvalidStyleError`)}constructor(e,t,n){super(`value for ${e} ${t} is invalid, please use a valid ${n}`),this.name=`InvalidStyleError`}};function l(e){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(e)}t.n(l,`validateHexCode`);function u(e){return!/^\d+$/.test(e)}t.n(u,`validateNumber`);function d(e){return!/^\d+px$/.test(e)}t.n(d,`validateSizeInPixels`);function f(e){return n.z(e.trim(),n.x())}t.n(f,`textSanitizer`);var p=new s;function m(e){p.setData({quadrant1Text:f(e.text)})}t.n(m,`setQuadrant1Text`);function h(e){p.setData({quadrant2Text:f(e.text)})}t.n(h,`setQuadrant2Text`);function g(e){p.setData({quadrant3Text:f(e.text)})}t.n(g,`setQuadrant3Text`);function _(e){p.setData({quadrant4Text:f(e.text)})}t.n(_,`setQuadrant4Text`);function v(e){p.setData({xAxisLeftText:f(e.text)})}t.n(v,`setXAxisLeftText`);function y(e){p.setData({xAxisRightText:f(e.text)})}t.n(y,`setXAxisRightText`);function b(e){p.setData({yAxisTopText:f(e.text)})}t.n(b,`setYAxisTopText`);function x(e){p.setData({yAxisBottomText:f(e.text)})}t.n(x,`setYAxisBottomText`);function S(e){let t={};for(let n of e){let[e,r]=n.trim().split(/\s*:\s*/);if(e===`radius`){if(u(r))throw new c(e,r,`number`);t.radius=parseInt(r)}else if(e===`color`){if(l(r))throw new c(e,r,`hex code`);t.color=r}else if(e===`stroke-color`){if(l(r))throw new c(e,r,`hex code`);t.strokeColor=r}else if(e===`stroke-width`){if(d(r))throw new c(e,r,`number of pixels (eg. 10px)`);t.strokeWidth=r}else throw Error(`style named ${e} is not supported.`)}return t}t.n(S,`parseStyles`);function C(e,t,n,r,i){let a=S(i);p.addPoints([{x:n,y:r,text:f(e.text),className:t,...a}])}t.n(C,`addPoint`);function w(e,t){p.addClass(e,S(t))}t.n(w,`addClass`);function T(e){p.setConfig({chartWidth:e})}t.n(T,`setWidth`);function E(e){p.setConfig({chartHeight:e})}t.n(E,`setHeight`);function D(){let{themeVariables:e,quadrantChart:t}=n.x();return t&&p.setConfig(t),p.setThemeConfig({quadrant1Fill:e.quadrant1Fill,quadrant2Fill:e.quadrant2Fill,quadrant3Fill:e.quadrant3Fill,quadrant4Fill:e.quadrant4Fill,quadrant1TextFill:e.quadrant1TextFill,quadrant2TextFill:e.quadrant2TextFill,quadrant3TextFill:e.quadrant3TextFill,quadrant4TextFill:e.quadrant4TextFill,quadrantPointFill:e.quadrantPointFill,quadrantPointTextFill:e.quadrantPointTextFill,quadrantXAxisTextFill:e.quadrantXAxisTextFill,quadrantYAxisTextFill:e.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:e.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:e.quadrantInternalBorderStrokeFill,quadrantTitleFill:e.quadrantTitleFill}),p.setData({titleText:n.w()}),p.build()}t.n(D,`getQuadrantData`);var O={parser:a,db:{setWidth:T,setHeight:E,setQuadrant1Text:m,setQuadrant2Text:h,setQuadrant3Text:g,setQuadrant4Text:_,setXAxisLeftText:v,setXAxisRightText:y,setYAxisTopText:b,setYAxisBottomText:x,parseStyles:S,addPoint:C,addClass:w,getQuadrantData:D,clear:t.n(function(){p.clear(),n.a()},`clear`),setAccTitle:n.U,getAccTitle:n.y,setDiagramTitle:n.K,getDiagramTitle:n.w,getAccDescription:n.v,setAccDescription:n.H},renderer:{draw:t.n((r,i,a,o)=>{function s(e){return e===`top`?`hanging`:`middle`}t.n(s,`getDominantBaseLine`);function c(e){return e===`left`?`start`:`middle`}t.n(c,`getTextAnchor`);function l(e){return`translate(${e.x}, ${e.y}) rotate(${e.rotation||0})`}t.n(l,`getTransformation`);let u=n.x();e.m.debug(`Rendering quadrant chart
|
|
7
|
+
`+r);let d=u.securityLevel,f;d===`sandbox`&&(f=e.p(`#i`+i));let p=(d===`sandbox`?e.p(f.nodes()[0].contentDocument.body):e.p(`body`)).select(`[id="${i}"]`),m=p.append(`g`).attr(`class`,`main`),h=u.quadrantChart?.chartWidth??500,g=u.quadrantChart?.chartHeight??500;n.c(p,g,h,u.quadrantChart?.useMaxWidth??!0),p.attr(`viewBox`,`0 0 `+h+` `+g),o.db.setHeight(g),o.db.setWidth(h);let _=o.db.getQuadrantData(),v=m.append(`g`).attr(`class`,`quadrants`),y=m.append(`g`).attr(`class`,`border`),b=m.append(`g`).attr(`class`,`data-points`),x=m.append(`g`).attr(`class`,`labels`),S=m.append(`g`).attr(`class`,`title`);_.title&&S.append(`text`).attr(`x`,0).attr(`y`,0).attr(`fill`,_.title.fill).attr(`font-size`,_.title.fontSize).attr(`dominant-baseline`,s(_.title.horizontalPos)).attr(`text-anchor`,c(_.title.verticalPos)).attr(`transform`,l(_.title)).text(_.title.text),_.borderLines&&y.selectAll(`line`).data(_.borderLines).enter().append(`line`).attr(`x1`,e=>e.x1).attr(`y1`,e=>e.y1).attr(`x2`,e=>e.x2).attr(`y2`,e=>e.y2).style(`stroke`,e=>e.strokeFill).style(`stroke-width`,e=>e.strokeWidth);let C=v.selectAll(`g.quadrant`).data(_.quadrants).enter().append(`g`).attr(`class`,`quadrant`);C.append(`rect`).attr(`x`,e=>e.x).attr(`y`,e=>e.y).attr(`width`,e=>e.width).attr(`height`,e=>e.height).attr(`fill`,e=>e.fill),C.append(`text`).attr(`x`,0).attr(`y`,0).attr(`fill`,e=>e.text.fill).attr(`font-size`,e=>e.text.fontSize).attr(`dominant-baseline`,e=>s(e.text.horizontalPos)).attr(`text-anchor`,e=>c(e.text.verticalPos)).attr(`transform`,e=>l(e.text)).text(e=>e.text.text),x.selectAll(`g.label`).data(_.axisLabels).enter().append(`g`).attr(`class`,`label`).append(`text`).attr(`x`,0).attr(`y`,0).text(e=>e.text).attr(`fill`,e=>e.fill).attr(`font-size`,e=>e.fontSize).attr(`dominant-baseline`,e=>s(e.horizontalPos)).attr(`text-anchor`,e=>c(e.verticalPos)).attr(`transform`,e=>l(e));let w=b.selectAll(`g.data-point`).data(_.points).enter().append(`g`).attr(`class`,`data-point`);w.append(`circle`).attr(`cx`,e=>e.x).attr(`cy`,e=>e.y).attr(`r`,e=>e.radius).attr(`fill`,e=>e.fill).attr(`stroke`,e=>e.strokeColor).attr(`stroke-width`,e=>e.strokeWidth),w.append(`text`).attr(`x`,0).attr(`y`,0).text(e=>e.text.text).attr(`fill`,e=>e.text.fill).attr(`font-size`,e=>e.text.fontSize).attr(`dominant-baseline`,e=>s(e.text.horizontalPos)).attr(`text-anchor`,e=>c(e.text.verticalPos)).attr(`transform`,e=>l(e.text))},`draw`)},styles:t.n(()=>``,`styles`)};exports.diagram=O;
|