mio-previewer 0.2.74 → 0.2.76
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/dist/_basePickBy-CXmXW7jd.js +166 -0
- package/dist/_basePickBy-CtuVwROD.cjs +1 -0
- package/dist/_baseUniq-CGoiOkSa.js +682 -0
- package/dist/_baseUniq-CYtOXxfV.cjs +1 -0
- package/dist/_createAssigner-DqH64jc7.cjs +1 -0
- package/dist/_createAssigner-IEX8lwxm.js +573 -0
- package/dist/arc-C78br9Yj.cjs +1 -0
- package/dist/arc-vLgDTVZZ.js +80 -0
- package/dist/architecture-O4VJ6CD3-B9qzjtV8.cjs +1 -0
- package/dist/architecture-O4VJ6CD3-wqAP4onK.js +2 -0
- package/dist/architectureDiagram-VXUJARFQ-CYbuyVAs.js +4039 -0
- package/dist/architectureDiagram-VXUJARFQ-DEGYSl1f.cjs +36 -0
- package/dist/array-CApNbSU9.js +6 -0
- package/dist/array-DZSRzHA_.cjs +1 -0
- package/dist/assets/parser.worker-Bzb1GItl.js +14 -0
- package/dist/blockDiagram-VD42YOAC-DaH3L5Ng.js +3009 -0
- package/dist/blockDiagram-VD42YOAC-DeX0dq72.cjs +122 -0
- package/dist/c4Diagram-YG6GDRKO-CIThIYo6.js +2959 -0
- package/dist/c4Diagram-YG6GDRKO-Dz6dif_9.cjs +10 -0
- package/dist/channel-BWHkpgVD.cjs +1 -0
- package/dist/channel-JT7eWw2w.js +5 -0
- package/dist/chunk-4BX2VUAB-BZTgbbzC.js +8 -0
- package/dist/chunk-4BX2VUAB-HXFjpyQg.cjs +1 -0
- package/dist/chunk-55IACEB6-DWUqxxdp.js +8 -0
- package/dist/chunk-55IACEB6-Hy_THNUs.cjs +1 -0
- package/dist/chunk-ABZYJK2D-CbIYYZa_.cjs +80 -0
- package/dist/chunk-ABZYJK2D-DDrmE3Q7.js +2518 -0
- package/dist/chunk-ATLVNIR6-DHlCNWnJ.js +67 -0
- package/dist/chunk-ATLVNIR6-shAOudT0.cjs +1 -0
- package/dist/chunk-B4BG7PRW-C67vroOS.cjs +165 -0
- package/dist/chunk-B4BG7PRW-DSYuK8dI.js +3116 -0
- package/dist/chunk-BNMv73og.cjs +1 -0
- package/dist/chunk-CVBHYZKI-CLVcv_xh.cjs +1 -0
- package/dist/chunk-CVBHYZKI-CiCGetln.js +12 -0
- package/dist/chunk-DI55MBZ5-BCvBgHrp.cjs +220 -0
- package/dist/chunk-DI55MBZ5-Clru0TyG.js +2000 -0
- package/dist/chunk-Dbv0sNQl.js +20 -0
- package/dist/chunk-FMBD7UC4-D4kohRVY.js +5 -0
- package/dist/{chunk-FMBD7UC4-DxkUZTpt.cjs → chunk-FMBD7UC4-DWMVCXKq.cjs} +2 -2
- package/dist/chunk-HN2XXSSU-BwmRMa2r.cjs +1 -0
- package/dist/chunk-HN2XXSSU-CJL8wAZ2.js +76 -0
- package/dist/chunk-JA3XYJ7Z-BaAdjYEy.cjs +70 -0
- package/dist/chunk-JA3XYJ7Z-CpKHrbOX.js +1849 -0
- package/dist/chunk-JZLCHNYA-CYo7ykJf.js +4863 -0
- package/dist/chunk-JZLCHNYA-CvPIQFXP.cjs +54 -0
- package/dist/chunk-QN33PNHL-BFbXAWI4.js +25 -0
- package/dist/chunk-QN33PNHL-Cu0FHarG.cjs +1 -0
- package/dist/chunk-QXUST7PY-CnnfdJrM.cjs +7 -0
- package/dist/chunk-QXUST7PY-CxCAwQqP.js +488 -0
- package/dist/chunk-QZHKN3VN-2e6nJr8c.cjs +1 -0
- package/dist/chunk-QZHKN3VN-Dal4kx9B.js +15 -0
- package/dist/chunk-S3R3BYOJ-B2ozcJNg.cjs +2 -0
- package/dist/chunk-S3R3BYOJ-CG6GoSCd.js +1119 -0
- package/dist/chunk-TZMSLE5B-CooeLs4Q.js +57 -0
- package/dist/chunk-TZMSLE5B-D92K1Ja5.cjs +1 -0
- package/dist/classDiagram-2ON5EDUG-Bv1XCvDZ.js +28 -0
- package/dist/classDiagram-2ON5EDUG-BzMV1CJW.cjs +1 -0
- package/dist/classDiagram-v2-WZHVMYZB-Bqxv5U7u.js +28 -0
- package/dist/classDiagram-v2-WZHVMYZB-BzMV1CJW.cjs +1 -0
- package/dist/clone-B0KDIkSS.js +8 -0
- package/dist/clone-wvtBTB6v.cjs +1 -0
- package/dist/cose-bilkent-S5V4N54A-DMHTv1aW.cjs +1 -0
- package/dist/cose-bilkent-S5V4N54A-bGPAcpg6.js +2250 -0
- package/dist/custom-Bl_fVJZ0.cjs +84 -0
- package/dist/custom-D-TzPpWT.js +5281 -0
- package/dist/cytoscape.esm-CElDUMAx.cjs +321 -0
- package/dist/cytoscape.esm-xf9dtmBj.js +18100 -0
- package/dist/dagre-6UL2VRFP-3bgUxzqG.js +294 -0
- package/dist/dagre-6UL2VRFP-B3NqmIxs.cjs +4 -0
- package/dist/dagre-BfAHSwtP.js +1472 -0
- package/dist/dagre-Buvkww-e.cjs +1 -0
- package/dist/defaultLocale-B5dSAwiC.js +201 -0
- package/dist/defaultLocale-G0HsdRIB.cjs +1 -0
- package/dist/diagram-PSM6KHXK-C4FjxUHt.cjs +24 -0
- package/dist/diagram-PSM6KHXK-CF8TkgzX.js +527 -0
- package/dist/diagram-QEK2KX5R-Dl3IHeA5.js +213 -0
- package/dist/diagram-QEK2KX5R-Z9DYjr44.cjs +43 -0
- package/dist/diagram-S2PKOQOG-Bib-zL2S.cjs +24 -0
- package/dist/diagram-S2PKOQOG-ZKvn7IEe.js +133 -0
- package/dist/dist-DC-lM4uX.cjs +1 -0
- package/dist/dist-zNcLEPGR.js +51 -0
- package/dist/erDiagram-Q2GNP2WA-DFMV9OUT.cjs +60 -0
- package/dist/erDiagram-Q2GNP2WA-DJYJEzEB.js +1600 -0
- package/dist/flowDiagram-NV44I4VS-7TxeawHS.cjs +162 -0
- package/dist/flowDiagram-NV44I4VS-CXa6ycqs.js +4128 -0
- package/dist/ganttDiagram-LVOFAZNH-DqT7pu4m.js +2869 -0
- package/dist/ganttDiagram-LVOFAZNH-iiExGpwF.cjs +267 -0
- package/dist/gitGraph-ZV4HHKMB-BjaEVcYh.cjs +1 -0
- package/dist/gitGraph-ZV4HHKMB-Cl2I6-l3.js +2 -0
- package/dist/gitGraphDiagram-NY62KEGX-Tphu_MeC.js +621 -0
- package/dist/gitGraphDiagram-NY62KEGX-k5xzXg7C.cjs +65 -0
- package/dist/graphlib-C3tPLMbC.js +225 -0
- package/dist/graphlib-Cdg0u3TT.cjs +1 -0
- package/dist/info-63CPKGFF-D2A5GDFo.js +2 -0
- package/dist/info-63CPKGFF-MRaucWlf.cjs +1 -0
- package/dist/infoDiagram-F6ZHWCRC-3Jwo4J0f.cjs +2 -0
- package/dist/infoDiagram-F6ZHWCRC-BUoruN76.js +19 -0
- package/dist/init-07zIhv_j.cjs +1 -0
- package/dist/init-Bwwdo3M6.js +15 -0
- package/dist/journeyDiagram-XKPGCS4Q-C_3oD9RV.cjs +139 -0
- package/dist/journeyDiagram-XKPGCS4Q-DB7INfrf.js +883 -0
- package/dist/kanban-definition-3W4ZIXB7-AVLIBuMF.js +968 -0
- package/dist/kanban-definition-3W4ZIXB7-txUXjKzB.cjs +89 -0
- package/dist/katex-6UpFeIdV.cjs +261 -0
- package/dist/katex-BHcJffnM.js +22112 -0
- package/dist/line-DYhVGH2B.js +34 -0
- package/dist/line-DdNAPGaw.cjs +1 -0
- package/dist/linear-n4_iirEu.js +289 -0
- package/dist/linear-rQLpRrSH.cjs +1 -0
- package/dist/loadCss-D6257oR0.js +8 -0
- package/dist/loadCss-DhrQh6-A.cjs +1 -0
- package/dist/markdown-it-Cz3KGZjR.cjs +2 -0
- package/dist/markdown-it-D-hH4G7k.js +173 -0
- package/dist/math-G8rF7UWn.cjs +1 -0
- package/dist/math-H49DsxYR.js +10 -0
- package/dist/mermaid-parser.core-B84fnaGG.js +11904 -0
- package/dist/mermaid-parser.core-C9EbhVVg.cjs +82 -0
- package/dist/mindmap-definition-VGOIOE7T-CXlyYsc6.cjs +68 -0
- package/dist/mindmap-definition-VGOIOE7T-VIt9sDN3.js +963 -0
- package/dist/mio-previewer.cjs.js +11 -21
- package/dist/mio-previewer.css +2 -9
- package/dist/mio-previewer.esm.js +4939 -0
- package/dist/ordinal-C55HfHHp.js +65 -0
- package/dist/ordinal-CUPR-p0T.cjs +1 -0
- package/dist/packet-HUATNLJX-CGNko_oS.cjs +1 -0
- package/dist/packet-HUATNLJX-CVx40lqO.js +2 -0
- package/dist/path-DNvJyUE8.js +85 -0
- package/dist/path-Kklx0M1v.cjs +1 -0
- package/dist/pie-WTHONI2E-BdPx0Cfg.cjs +1 -0
- package/dist/pie-WTHONI2E-DX5V8x0L.js +2 -0
- package/dist/pieDiagram-ADFJNKIX-BysReYfx.js +165 -0
- package/dist/pieDiagram-ADFJNKIX-CTT1YMsk.cjs +30 -0
- package/dist/plugins/custom.cjs.js +1 -1
- package/dist/plugins/custom.esm.js +2 -0
- package/dist/plugins/markdown-it.cjs.js +1 -3
- package/dist/plugins/markdown-it.esm.js +2 -0
- package/dist/quadrantDiagram-AYHSOK5B-8-V3cwsC.cjs +7 -0
- package/dist/quadrantDiagram-AYHSOK5B-DRutDK03.js +1974 -0
- package/dist/radar-NJJJXTRR-CTD6M8nl.js +2 -0
- package/dist/radar-NJJJXTRR-wJoTnQbj.cjs +1 -0
- package/dist/requirementDiagram-UZGBJVZJ-DFRpWnfW.cjs +64 -0
- package/dist/requirementDiagram-UZGBJVZJ-DNYoJyhG.js +2191 -0
- package/dist/sankeyDiagram-TZEHDZUN-B9fxDP0Q.cjs +10 -0
- package/dist/sankeyDiagram-TZEHDZUN-DD6bkI4Z.js +920 -0
- package/dist/sequenceDiagram-WL72ISMW-Bmptok1c.js +3562 -0
- package/dist/sequenceDiagram-WL72ISMW-D9sXtgAn.cjs +145 -0
- package/dist/src-BMjps4Ui.cjs +1 -0
- package/dist/src-BuisGndr.js +2149 -0
- package/dist/stateDiagram-FKZM4ZOC-Bmiw8fnW.js +217 -0
- package/dist/stateDiagram-FKZM4ZOC-DiD1WJPM.cjs +1 -0
- package/dist/stateDiagram-v2-4FDKWEC3-5ADhn1IF.js +27 -0
- package/dist/stateDiagram-v2-4FDKWEC3-BjhmCPL1.cjs +1 -0
- package/dist/timeline-definition-IT6M3QCI-C9VMls3W.js +830 -0
- package/dist/timeline-definition-IT6M3QCI-ZzbHXhNl.cjs +61 -0
- package/dist/treemap-75Q7IDZK-9TPMYr3R.cjs +1 -0
- package/dist/treemap-75Q7IDZK-u3p-cHDL.js +2 -0
- package/dist/types/plugins/custom/codeBlockPlugin.d.ts +8 -0
- package/dist/types/plugins/custom/mermaidPlugin.d.ts +4 -0
- package/dist/xychartDiagram-PRI3JC2R-BI6KuGZ2.cjs +7 -0
- package/dist/xychartDiagram-PRI3JC2R-BWabDL1u.js +2041 -0
- package/package.json +2 -2
- package/dist/_basePickBy-Be3yyf2d.js +0 -151
- package/dist/_basePickBy-Z0DtrAKQ.cjs +0 -1
- package/dist/_baseUniq-BXkA0Pgx.js +0 -614
- package/dist/_baseUniq-Dq2eV1vY.cjs +0 -1
- package/dist/arc-B-QGG8RZ.cjs +0 -1
- package/dist/arc-djW14lrn.js +0 -83
- package/dist/architecture-O4VJ6CD3-Cws_zM2K.cjs +0 -1
- package/dist/architecture-O4VJ6CD3-pdMXTCaT.js +0 -5
- package/dist/architectureDiagram-VXUJARFQ-BwchhvqL.js +0 -4661
- package/dist/architectureDiagram-VXUJARFQ-DxDLWGpO.cjs +0 -36
- package/dist/assets/parser.worker-67NQKZt5.js +0 -16
- package/dist/blockDiagram-VD42YOAC-B4Xc8gfX.cjs +0 -122
- package/dist/blockDiagram-VD42YOAC-DpPneP6J.js +0 -2261
- package/dist/c4Diagram-YG6GDRKO-695lQbrZ.cjs +0 -10
- package/dist/c4Diagram-YG6GDRKO-Cnlax2Xq.js +0 -1580
- package/dist/channel-D_ITz6Jy.cjs +0 -1
- package/dist/channel-sXy9EduO.js +0 -5
- package/dist/chunk-4BX2VUAB-Bdx3_f83.cjs +0 -1
- package/dist/chunk-4BX2VUAB-DRkGmgAZ.js +0 -8
- package/dist/chunk-55IACEB6-BB03hpRC.cjs +0 -1
- package/dist/chunk-55IACEB6-Ord5OQlh.js +0 -8
- package/dist/chunk-B4BG7PRW-Ca0fOgzA.cjs +0 -165
- package/dist/chunk-B4BG7PRW-D-cs8bDX.js +0 -1375
- package/dist/chunk-DI55MBZ5-BsRe2B2M.cjs +0 -220
- package/dist/chunk-DI55MBZ5-DSmlLD1s.js +0 -1370
- package/dist/chunk-FMBD7UC4-IYQmAMTo.js +0 -19
- package/dist/chunk-QN33PNHL-B7G6Qlf3.cjs +0 -1
- package/dist/chunk-QN33PNHL-EYMc4JVr.js +0 -19
- package/dist/chunk-QZHKN3VN-B8NJ6Ahx.cjs +0 -1
- package/dist/chunk-QZHKN3VN-C4WIG5z8.js +0 -15
- package/dist/chunk-TZMSLE5B-BoM53RHv.js +0 -64
- package/dist/chunk-TZMSLE5B-CgLDb48A.cjs +0 -1
- package/dist/classDiagram-2ON5EDUG-CxmdZvqc.js +0 -16
- package/dist/classDiagram-2ON5EDUG-DIRim8qa.cjs +0 -1
- package/dist/classDiagram-v2-WZHVMYZB-CxmdZvqc.js +0 -16
- package/dist/classDiagram-v2-WZHVMYZB-DIRim8qa.cjs +0 -1
- package/dist/clone-DOYxaT_d.js +0 -8
- package/dist/clone-DSlm33NG.cjs +0 -1
- package/dist/cose-bilkent-S5V4N54A-BD3p1OC_.cjs +0 -1
- package/dist/cose-bilkent-S5V4N54A-yLoaqH3G.js +0 -2608
- package/dist/cytoscape.esm-DHF7mANN.cjs +0 -331
- package/dist/cytoscape.esm-DfdJODL8.js +0 -18735
- package/dist/dagre-6UL2VRFP-DG1oQ4B2.cjs +0 -4
- package/dist/dagre-6UL2VRFP-VjboDBbp.js +0 -444
- package/dist/defaultLocale-D7EN2tov.js +0 -171
- package/dist/defaultLocale-DIVzfLaQ.cjs +0 -1
- package/dist/diagram-PSM6KHXK-C1p0l5TY.js +0 -531
- package/dist/diagram-PSM6KHXK-a4rni6rJ.cjs +0 -24
- package/dist/diagram-QEK2KX5R-CErKOsX1.cjs +0 -43
- package/dist/diagram-QEK2KX5R-CKmmuumX.js +0 -217
- package/dist/diagram-S2PKOQOG-B1M7qCNl.cjs +0 -24
- package/dist/diagram-S2PKOQOG-BMLCJExF.js +0 -142
- package/dist/erDiagram-Q2GNP2WA-BfuCa_Za.cjs +0 -60
- package/dist/erDiagram-Q2GNP2WA-fOTsQA-d.js +0 -841
- package/dist/flowDiagram-NV44I4VS-BEqeUuqz.cjs +0 -162
- package/dist/flowDiagram-NV44I4VS-DDwRAjVG.js +0 -1620
- package/dist/ganttDiagram-LVOFAZNH-BbuRS8g3.js +0 -2505
- package/dist/ganttDiagram-LVOFAZNH-BlVeWKRf.cjs +0 -267
- package/dist/gitGraph-ZV4HHKMB-Bmu8r_Iq.cjs +0 -1
- package/dist/gitGraph-ZV4HHKMB-DcQ2E4dF.js +0 -5
- package/dist/gitGraphDiagram-NY62KEGX-DcMEeNh7.cjs +0 -65
- package/dist/gitGraphDiagram-NY62KEGX-_sWVSKbL.js +0 -699
- package/dist/graph-DEnt0OtZ.js +0 -247
- package/dist/graph-Dgcjs2XL.cjs +0 -1
- package/dist/info-63CPKGFF-DVDDcoHy.js +0 -5
- package/dist/info-63CPKGFF-Dc3cWL0G.cjs +0 -1
- package/dist/infoDiagram-F6ZHWCRC-DoUSS0kC.js +0 -24
- package/dist/infoDiagram-F6ZHWCRC-ZeTrjgaE.cjs +0 -2
- package/dist/init-CHZsXQcr.cjs +0 -1
- package/dist/init-DjUOC4st.js +0 -16
- package/dist/journeyDiagram-XKPGCS4Q-DGe13iBu.js +0 -834
- package/dist/journeyDiagram-XKPGCS4Q-Ihl9g4mY.cjs +0 -139
- package/dist/kanban-definition-3W4ZIXB7-2qkrkVLK.cjs +0 -89
- package/dist/kanban-definition-3W4ZIXB7-BhWe5nMU.js +0 -719
- package/dist/katex-CmGeg_OO.js +0 -11692
- package/dist/katex-DEiiRhcn.cjs +0 -261
- package/dist/layout-BDNzBIaA.cjs +0 -1
- package/dist/layout-DTBfbHzy.js +0 -1324
- package/dist/linear-BRl2UYUr.cjs +0 -1
- package/dist/linear-CwbXkgvF.js +0 -259
- package/dist/loadCss-BbD6mdv-.cjs +0 -1
- package/dist/loadCss-DS0Fuaxe.js +0 -8
- package/dist/mermaid-parser.core-CJ1yJm0s.js +0 -12966
- package/dist/mermaid-parser.core-CxTcWSA2.cjs +0 -128
- package/dist/mindmap-definition-VGOIOE7T-BPUEmP7g.cjs +0 -68
- package/dist/mindmap-definition-VGOIOE7T-DSqZBgzR.js +0 -784
- package/dist/mio-previewer.es.js +0 -6171
- package/dist/ordinal-CagbB1m8.cjs +0 -1
- package/dist/ordinal-DfAQgscy.js +0 -61
- package/dist/packet-HUATNLJX-B-qfkr5X.cjs +0 -1
- package/dist/packet-HUATNLJX-Dxob_meO.js +0 -5
- package/dist/pie-WTHONI2E-BRtdTGWt.js +0 -5
- package/dist/pie-WTHONI2E-DK7f6qJw.cjs +0 -1
- package/dist/pieDiagram-ADFJNKIX-Dhq_bEzm.js +0 -161
- package/dist/pieDiagram-ADFJNKIX-V04ms3gr.cjs +0 -30
- package/dist/plugins/custom.es.js +0 -85
- package/dist/plugins/markdown-it.es.js +0 -173
- package/dist/quadrantDiagram-AYHSOK5B-C97bOmUE.js +0 -1022
- package/dist/quadrantDiagram-AYHSOK5B-DlqFPVhi.cjs +0 -7
- package/dist/radar-NJJJXTRR-B9jT3LP3.cjs +0 -1
- package/dist/radar-NJJJXTRR-D8plmle3.js +0 -5
- package/dist/requirementDiagram-UZGBJVZJ-BxVMLKfQ.js +0 -850
- package/dist/requirementDiagram-UZGBJVZJ-DENJ74Ew.cjs +0 -64
- package/dist/sankeyDiagram-TZEHDZUN-DwgW7Suq.js +0 -810
- package/dist/sankeyDiagram-TZEHDZUN-lTBLhaSq.cjs +0 -10
- package/dist/sequenceDiagram-WL72ISMW-BAOeX1dA.js +0 -2511
- package/dist/sequenceDiagram-WL72ISMW-BRVvH1X4.cjs +0 -145
- package/dist/stateDiagram-FKZM4ZOC-BrFQE7Gl.js +0 -263
- package/dist/stateDiagram-FKZM4ZOC-D8GjooGL.cjs +0 -1
- package/dist/stateDiagram-v2-4FDKWEC3-4VRIY-eH.cjs +0 -1
- package/dist/stateDiagram-v2-4FDKWEC3-DnrWD6a3.js +0 -16
- package/dist/timeline-definition-IT6M3QCI-BJMIlueb.js +0 -795
- package/dist/timeline-definition-IT6M3QCI-BQFGUuGP.cjs +0 -61
- package/dist/treemap-75Q7IDZK-BX1vBFWf.cjs +0 -1
- package/dist/treemap-75Q7IDZK-CMTkunTV.js +0 -5
- package/dist/viewer-CZUSHxhf.js +0 -19131
- package/dist/viewer-Canph5Zx.cjs +0 -305
- package/dist/xychartDiagram-PRI3JC2R-Sl8WX8wc.cjs +0 -7
- package/dist/xychartDiagram-PRI3JC2R-WnFI7Ezu.js +0 -1340
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
const e=require("./src-BMjps4Ui.cjs"),t=require("./chunk-ABZYJK2D-CbIYYZa_.cjs"),n=require("./arc-C78br9Yj.cjs");var r=(function(){var t=e.h(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,8,10,11,12,14,16,17,20,21],r=[1,9],i=[1,10],a=[1,11],o=[1,12],s=[1,13],c=[1,16],l=[1,17],u={trace:e.h(function(){},`trace`),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:`error`,4:`timeline`,6:`EOF`,8:`SPACE`,10:`NEWLINE`,11:`title`,12:`acc_title`,13:`acc_title_value`,14:`acc_descr`,15:`acc_descr_value`,16:`acc_descr_multiline_value`,17:`section`,20:`period`,21:`event`},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:e.h(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.getCommonDb().setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 9:this.$=a[s].trim(),r.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=a[s].trim(),r.getCommonDb().setAccDescription(this.$);break;case 12:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 15:r.addTask(a[s],0,``),this.$=a[s];break;case 16:r.addEvent(a[s].substr(2)),this.$=a[s];break}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},t(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:i,14:a,16:o,17:s,18:14,19:15,20:c,21:l},t(n,[2,7],{1:[2,1]}),t(n,[2,3]),{9:18,11:r,12:i,14:a,16:o,17:s,18:14,19:15,20:c,21:l},t(n,[2,5]),t(n,[2,6]),t(n,[2,8]),{13:[1,19]},{15:[1,20]},t(n,[2,11]),t(n,[2,12]),t(n,[2,13]),t(n,[2,14]),t(n,[2,15]),t(n,[2,16]),t(n,[2,4]),t(n,[2,9]),t(n,[2,10])],defaultActions:{},parseError:e.h(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e.h(function(t){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(t,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;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e.h(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}e.h(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`)};u.lexer=(function(){return{EOF:1,parseError:e.h(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e.h(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:e.h(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:e.h(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:e.h(function(){return this._more=!0,this},`more`),reject:e.h(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:e.h(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e.h(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:e.h(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:e.h(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|
5
|
+
`+t+`^`},`showPosition`),test_match:e.h(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:e.h(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}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e===!1?!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:e.h(function(){return this.next()||this.lex()},`lex`),begin:e.h(function(e){this.conditionStack.push(e)},`begin`),popState:e.h(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e.h(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:e.h(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e.h(function(e){this.begin(e)},`pushState`),stateStackSize:e.h(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e.h(function(e,t,n,r){switch(n){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin(`acc_title`),12;case 8:return this.popState(),`acc_title_value`;case 9:return this.begin(`acc_descr`),14;case 10:return this.popState(),`acc_descr_value`;case 11:this.begin(`acc_descr_multiline`);break;case 12:this.popState();break;case 13:return`acc_descr_multiline_value`;case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return`INVALID`}},`anonymous`),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}}})();function d(){this.yy={}}return e.h(d,`Parser`),d.prototype=u,u.Parser=d,new d})();r.parser=r;var i=r,a={};e.m(a,{addEvent:()=>_,addSection:()=>p,addTask:()=>g,addTaskOrg:()=>v,clear:()=>f,default:()=>b,getCommonDb:()=>d,getSections:()=>m,getTasks:()=>h});var o=``,s=0,c=[],l=[],u=[],d=e.h(()=>t.o,`getCommonDb`),f=e.h(function(){c.length=0,l.length=0,o=``,u.length=0,t.a()},`clear`),p=e.h(function(e){o=e,c.push(e)},`addSection`),m=e.h(function(){return c},`getSections`),h=e.h(function(){let e=y(),t=0;for(;!e&&t<100;)e=y(),t++;return l.push(...u),l},`getTasks`),g=e.h(function(e,t,n){let r={id:s++,section:o,type:o,task:e,score:t||0,events:n?[n]:[]};u.push(r)},`addTask`),_=e.h(function(e){u.find(e=>e.id===s-1).events.push(e)},`addEvent`),v=e.h(function(e){let t={section:o,type:o,description:e,task:e,classes:[]};l.push(t)},`addTaskOrg`),y=e.h(function(){let t=e.h(function(e){return u[e].processed},`compileTask`),n=!0;for(let[e,r]of u.entries())t(e),n&&=r.processed;return n},`compileTasks`),b={clear:f,getCommonDb:d,addSection:p,getSections:m,getTasks:h,addTask:g,addTaskOrg:v,addEvent:_},x=12,S=e.h(function(e,t){let n=e.append(`rect`);return n.attr(`x`,t.x),n.attr(`y`,t.y),n.attr(`fill`,t.fill),n.attr(`stroke`,t.stroke),n.attr(`width`,t.width),n.attr(`height`,t.height),n.attr(`rx`,t.rx),n.attr(`ry`,t.ry),t.class!==void 0&&n.attr(`class`,t.class),n},`drawRect`),C=e.h(function(t,r){let i=t.append(`circle`).attr(`cx`,r.cx).attr(`cy`,r.cy).attr(`class`,`face`).attr(`r`,15).attr(`stroke-width`,2).attr(`overflow`,`visible`),a=t.append(`g`);a.append(`circle`).attr(`cx`,r.cx-15/3).attr(`cy`,r.cy-15/3).attr(`r`,1.5).attr(`stroke-width`,2).attr(`fill`,`#666`).attr(`stroke`,`#666`),a.append(`circle`).attr(`cx`,r.cx+15/3).attr(`cy`,r.cy-15/3).attr(`r`,1.5).attr(`stroke-width`,2).attr(`fill`,`#666`).attr(`stroke`,`#666`);function o(e){let t=n.t().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(15/2).outerRadius(15/2.2);e.append(`path`).attr(`class`,`mouth`).attr(`d`,t).attr(`transform`,`translate(`+r.cx+`,`+(r.cy+2)+`)`)}e.h(o,`smile`);function s(e){let t=n.t().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(15/2).outerRadius(15/2.2);e.append(`path`).attr(`class`,`mouth`).attr(`d`,t).attr(`transform`,`translate(`+r.cx+`,`+(r.cy+7)+`)`)}e.h(s,`sad`);function c(e){e.append(`line`).attr(`class`,`mouth`).attr(`stroke`,2).attr(`x1`,r.cx-5).attr(`y1`,r.cy+7).attr(`x2`,r.cx+5).attr(`y2`,r.cy+7).attr(`class`,`mouth`).attr(`stroke-width`,`1px`).attr(`stroke`,`#666`)}return e.h(c,`ambivalent`),r.score>3?o(a):r.score<3?s(a):c(a),i},`drawFace`),w=e.h(function(e,t){let n=e.append(`circle`);return n.attr(`cx`,t.cx),n.attr(`cy`,t.cy),n.attr(`class`,`actor-`+t.pos),n.attr(`fill`,t.fill),n.attr(`stroke`,t.stroke),n.attr(`r`,t.r),n.class!==void 0&&n.attr(`class`,n.class),t.title!==void 0&&n.append(`title`).text(t.title),n},`drawCircle`),T=e.h(function(e,t){let n=t.text.replace(/<br\s*\/?>/gi,` `),r=e.append(`text`);r.attr(`x`,t.x),r.attr(`y`,t.y),r.attr(`class`,`legend`),r.style(`text-anchor`,t.anchor),t.class!==void 0&&r.attr(`class`,t.class);let i=r.append(`tspan`);return i.attr(`x`,t.x+t.textMargin*2),i.text(n),r},`drawText`),E=e.h(function(t,n){function r(e,t,n,r,i){return e+`,`+t+` `+(e+n)+`,`+t+` `+(e+n)+`,`+(t+r-i)+` `+(e+n-i*1.2)+`,`+(t+r)+` `+e+`,`+(t+r)}e.h(r,`genPoints`);let i=t.append(`polygon`);i.attr(`points`,r(n.x,n.y,50,20,7)),i.attr(`class`,`labelBox`),n.y+=n.labelMargin,n.x+=.5*n.labelMargin,T(t,n)},`drawLabel`),D=e.h(function(e,t,n){let r=e.append(`g`),i=M();i.x=t.x,i.y=t.y,i.fill=t.fill,i.width=n.width,i.height=n.height,i.class=`journey-section section-type-`+t.num,i.rx=3,i.ry=3,S(r,i),N(n)(t.text,r,i.x,i.y,i.width,i.height,{class:`journey-section section-type-`+t.num},n,t.colour)},`drawSection`),O=-1,k=e.h(function(e,t,n){let r=t.x+n.width/2,i=e.append(`g`);O++,i.append(`line`).attr(`id`,`task`+O).attr(`x1`,r).attr(`y1`,t.y).attr(`x2`,r).attr(`y2`,450).attr(`class`,`task-line`).attr(`stroke-width`,`1px`).attr(`stroke-dasharray`,`4 2`).attr(`stroke`,`#666`),C(i,{cx:r,cy:300+(5-t.score)*30,score:t.score});let a=M();a.x=t.x,a.y=t.y,a.fill=t.fill,a.width=n.width,a.height=n.height,a.class=`task task-type-`+t.num,a.rx=3,a.ry=3,S(i,a),N(n)(t.task,i,a.x,a.y,a.width,a.height,{class:`task`},n,t.colour)},`drawTask`),A=e.h(function(e,t){S(e,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:`rect`}).lower()},`drawBackgroundRect`),j=e.h(function(){return{x:0,y:0,fill:void 0,"text-anchor":`start`,width:100,height:100,textMargin:0,rx:0,ry:0}},`getTextObj`),M=e.h(function(){return{x:0,y:0,width:100,anchor:`start`,height:100,rx:0,ry:0}},`getNoteRect`),N=(function(){function t(e,t,n,r,a,o,s,c){i(t.append(`text`).attr(`x`,n+a/2).attr(`y`,r+o/2+5).style(`font-color`,c).style(`text-anchor`,`middle`).text(e),s)}e.h(t,`byText`);function n(e,t,n,r,a,o,s,c,l){let{taskFontSize:u,taskFontFamily:d}=c,f=e.split(/<br\s*\/?>/gi);for(let e=0;e<f.length;e++){let c=e*u-u*(f.length-1)/2,p=t.append(`text`).attr(`x`,n+a/2).attr(`y`,r).attr(`fill`,l).style(`text-anchor`,`middle`).style(`font-size`,u).style(`font-family`,d);p.append(`tspan`).attr(`x`,n+a/2).attr(`dy`,c).text(f[e]),p.attr(`y`,r+o/2).attr(`dominant-baseline`,`central`).attr(`alignment-baseline`,`central`),i(p,s)}}e.h(n,`byTspan`);function r(e,t,r,a,o,s,c,l){let u=t.append(`switch`),d=u.append(`foreignObject`).attr(`x`,r).attr(`y`,a).attr(`width`,o).attr(`height`,s).attr(`position`,`fixed`).append(`xhtml:div`).style(`display`,`table`).style(`height`,`100%`).style(`width`,`100%`);d.append(`div`).attr(`class`,`label`).style(`display`,`table-cell`).style(`text-align`,`center`).style(`vertical-align`,`middle`).text(e),n(e,u,r,a,o,s,c,l),i(d,c)}e.h(r,`byFo`);function i(e,t){for(let n in t)n in t&&e.attr(n,t[n])}return e.h(i,`_setTextAttrs`),function(e){return e.textPlacement===`fo`?r:e.textPlacement===`old`?t:n}})(),P=e.h(function(e){e.append(`defs`).append(`marker`).attr(`id`,`arrowhead`).attr(`refX`,5).attr(`refY`,2).attr(`markerWidth`,6).attr(`markerHeight`,4).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0,0 V 4 L6,2 Z`)},`initGraphics`);function F(t,n){t.each(function(){var t=e.p(this),r=t.text().split(/(\s+|<br>)/).reverse(),i,a=[],o=1.1,s=t.attr(`y`),c=parseFloat(t.attr(`dy`)),l=t.text(null).append(`tspan`).attr(`x`,0).attr(`y`,s).attr(`dy`,c+`em`);for(let e=0;e<r.length;e++)i=r[r.length-1-e],a.push(i),l.text(a.join(` `).trim()),(l.node().getComputedTextLength()>n||i===`<br>`)&&(a.pop(),l.text(a.join(` `).trim()),a=i===`<br>`?[``]:[i],l=t.append(`tspan`).attr(`x`,0).attr(`y`,s).attr(`dy`,o+`em`).text(i))})}e.h(F,`wrap`);var I=e.h(function(e,t,n,r){let i=n%x-1,a=e.append(`g`);t.section=i,a.attr(`class`,(t.class?t.class+` `:``)+`timeline-node `+(`section-`+i));let o=a.append(`g`),s=a.append(`g`),c=s.append(`text`).text(t.descr).attr(`dy`,`1em`).attr(`alignment-baseline`,`middle`).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).call(F,t.width).node().getBBox(),l=r.fontSize?.replace?r.fontSize.replace(`px`,``):r.fontSize;return t.height=c.height+l*1.1*.5+t.padding,t.height=Math.max(t.height,t.maxHeight),t.width+=2*t.padding,s.attr(`transform`,`translate(`+t.width/2+`, `+t.padding/2+`)`),R(o,t,i,r),t},`drawNode`),L=e.h(function(e,t,n){let r=e.append(`g`),i=r.append(`text`).text(t.descr).attr(`dy`,`1em`).attr(`alignment-baseline`,`middle`).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).call(F,t.width).node().getBBox(),a=n.fontSize?.replace?n.fontSize.replace(`px`,``):n.fontSize;return r.remove(),i.height+a*1.1*.5+t.padding},`getVirtualNodeHeight`),R=e.h(function(e,t,n){e.append(`path`).attr(`id`,`node-`+t.id).attr(`class`,`node-bkg node-`+t.type).attr(`d`,`M0 ${t.height-5} v${-t.height+10} q0,-5 5,-5 h${t.width-10} q5,0 5,5 v${t.height-5} H0 Z`),e.append(`line`).attr(`class`,`node-line-`+n).attr(`x1`,0).attr(`y1`,t.height).attr(`x2`,t.width).attr(`y2`,t.height)},`defaultBkg`),z={drawRect:S,drawCircle:w,drawSection:D,drawText:T,drawLabel:E,drawTask:k,drawBackgroundRect:A,getTextObj:j,getNoteRect:M,initGraphics:P,drawNode:I,getVirtualNodeHeight:L},B=e.h(function(n,r,i,a){let o=t.b(),s=o.timeline?.leftMargin??50;e.g.debug(`timeline`,a.db);let c=o.securityLevel,l;c===`sandbox`&&(l=e.p(`#i`+r));let u=(c===`sandbox`?e.p(l.nodes()[0].contentDocument.body):e.p(`body`)).select(`#`+r);u.append(`g`);let d=a.db.getTasks(),f=a.db.getCommonDb().getDiagramTitle();e.g.debug(`task`,d),z.initGraphics(u);let p=a.db.getSections();e.g.debug(`sections`,p);let m=0,h=0,g=0,_=0,v=50+s,y=50;_=50;let b=0,x=!0;p.forEach(function(t){let n={number:b,descr:t,section:b,width:150,padding:20,maxHeight:m},r=z.getVirtualNodeHeight(u,n,o);e.g.debug(`sectionHeight before draw`,r),m=Math.max(m,r+20)});let S=0,C=0;e.g.debug(`tasks.length`,d.length);for(let[t,n]of d.entries()){let r={number:t,descr:n,section:n.section,width:150,padding:20,maxHeight:h},i=z.getVirtualNodeHeight(u,r,o);e.g.debug(`taskHeight before draw`,i),h=Math.max(h,i+20),S=Math.max(S,n.events.length);let a=0;for(let e of n.events){let t={descr:e,section:n.section,number:n.section,width:150,padding:20,maxHeight:50};a+=z.getVirtualNodeHeight(u,t,o)}n.events.length>0&&(a+=(n.events.length-1)*10),C=Math.max(C,a)}e.g.debug(`maxSectionHeight before draw`,m),e.g.debug(`maxTaskHeight before draw`,h),p&&p.length>0?p.forEach(t=>{let n=d.filter(e=>e.section===t),r={number:b,descr:t,section:b,width:200*Math.max(n.length,1)-50,padding:20,maxHeight:m};e.g.debug(`sectionNode`,r);let i=u.append(`g`),a=z.drawNode(i,r,b,o);e.g.debug(`sectionNode output`,a),i.attr(`transform`,`translate(${v}, ${_})`),y+=m+50,n.length>0&&V(u,n,b,v,y,h,o,S,C,m,!1),v+=200*Math.max(n.length,1),y=_,b++}):(x=!1,V(u,d,b,v,y,h,o,S,C,m,!0));let w=u.node().getBBox();e.g.debug(`bounds`,w),f&&u.append(`text`).text(f).attr(`x`,w.width/2-s).attr(`font-size`,`4ex`).attr(`font-weight`,`bold`).attr(`y`,20),g=x?m+h+150:h+100,u.append(`g`).attr(`class`,`lineWrapper`).append(`line`).attr(`x1`,s).attr(`y1`,g).attr(`x2`,w.width+3*s).attr(`y2`,g).attr(`stroke-width`,4).attr(`stroke`,`black`).attr(`marker-end`,`url(#arrowhead)`),t.G(void 0,u,o.timeline?.padding??50,o.timeline?.useMaxWidth??!1)},`draw`),V=e.h(function(t,n,r,i,a,o,s,c,l,u,d){for(let c of n){let n={descr:c.task,section:r,number:r,width:150,padding:20,maxHeight:o};e.g.debug(`taskNode`,n);let u=t.append(`g`).attr(`class`,`taskWrapper`),f=z.drawNode(u,n,r,s).height;if(e.g.debug(`taskHeight after draw`,f),u.attr(`transform`,`translate(${i}, ${a})`),o=Math.max(o,f),c.events){let e=t.append(`g`).attr(`class`,`lineWrapper`),n=o;a+=100,n+=H(t,c.events,r,i,a,s),a-=100,e.append(`line`).attr(`x1`,i+190/2).attr(`y1`,a+o).attr(`x2`,i+190/2).attr(`y2`,a+o+100+l+100).attr(`stroke-width`,2).attr(`stroke`,`black`).attr(`marker-end`,`url(#arrowhead)`).attr(`stroke-dasharray`,`5,5`)}i+=200,d&&!s.timeline?.disableMulticolor&&r++}a-=10},`drawTasks`),H=e.h(function(t,n,r,i,a,o){let s=0,c=a;a+=100;for(let c of n){let n={descr:c,section:r,number:r,width:150,padding:20,maxHeight:50};e.g.debug(`eventNode`,n);let l=t.append(`g`).attr(`class`,`eventWrapper`),u=z.drawNode(l,n,r,o).height;s+=u,l.attr(`transform`,`translate(${i}, ${a})`),a=a+10+u}return a=c,s},`drawEvents`),U={setConf:e.h(()=>{},`setConf`),draw:B},W=e.h(e=>{let n=``;for(let n=0;n<e.THEME_COLOR_LIMIT;n++)e[`lineColor`+n]=e[`lineColor`+n]||e[`cScaleInv`+n],t.$(e[`lineColor`+n])?e[`lineColor`+n]=t.Q(e[`lineColor`+n],20):e[`lineColor`+n]=t.Z(e[`lineColor`+n],20);for(let t=0;t<e.THEME_COLOR_LIMIT;t++){let r=``+(17-3*t);n+=`
|
|
7
|
+
.section-${t-1} rect, .section-${t-1} path, .section-${t-1} circle, .section-${t-1} path {
|
|
8
|
+
fill: ${e[`cScale`+t]};
|
|
9
|
+
}
|
|
10
|
+
.section-${t-1} text {
|
|
11
|
+
fill: ${e[`cScaleLabel`+t]};
|
|
12
|
+
}
|
|
13
|
+
.node-icon-${t-1} {
|
|
14
|
+
font-size: 40px;
|
|
15
|
+
color: ${e[`cScaleLabel`+t]};
|
|
16
|
+
}
|
|
17
|
+
.section-edge-${t-1}{
|
|
18
|
+
stroke: ${e[`cScale`+t]};
|
|
19
|
+
}
|
|
20
|
+
.edge-depth-${t-1}{
|
|
21
|
+
stroke-width: ${r};
|
|
22
|
+
}
|
|
23
|
+
.section-${t-1} line {
|
|
24
|
+
stroke: ${e[`cScaleInv`+t]} ;
|
|
25
|
+
stroke-width: 3;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.lineWrapper line{
|
|
29
|
+
stroke: ${e[`cScaleLabel`+t]} ;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.disabled, .disabled circle, .disabled text {
|
|
33
|
+
fill: lightgray;
|
|
34
|
+
}
|
|
35
|
+
.disabled text {
|
|
36
|
+
fill: #efefef;
|
|
37
|
+
}
|
|
38
|
+
`}return n},`genSections`),G={db:a,renderer:U,parser:i,styles:e.h(e=>`
|
|
39
|
+
.edge {
|
|
40
|
+
stroke-width: 3;
|
|
41
|
+
}
|
|
42
|
+
${W(e)}
|
|
43
|
+
.section-root rect, .section-root path, .section-root circle {
|
|
44
|
+
fill: ${e.git0};
|
|
45
|
+
}
|
|
46
|
+
.section-root text {
|
|
47
|
+
fill: ${e.gitBranchLabel0};
|
|
48
|
+
}
|
|
49
|
+
.icon-container {
|
|
50
|
+
height:100%;
|
|
51
|
+
display: flex;
|
|
52
|
+
justify-content: center;
|
|
53
|
+
align-items: center;
|
|
54
|
+
}
|
|
55
|
+
.edge {
|
|
56
|
+
fill: none;
|
|
57
|
+
}
|
|
58
|
+
.eventWrapper {
|
|
59
|
+
filter: brightness(120%);
|
|
60
|
+
}
|
|
61
|
+
`,`getStyles`)};exports.diagram=G;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./mermaid-parser.core-C9EbhVVg.cjs");exports.createTreemapServices=e.r;
|
|
@@ -25,6 +25,14 @@ export interface CodeBlockPluginOptions {
|
|
|
25
25
|
onPublished?: (url: string) => void;
|
|
26
26
|
/** Optional CSS URL to load for Prism (consumers can provide local file path) */
|
|
27
27
|
cssUrl?: string;
|
|
28
|
+
/**
|
|
29
|
+
* 是否开启代码块自动折叠,默认开启 (true)
|
|
30
|
+
*/
|
|
31
|
+
enableCollapse?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* 折叠触发的最高高度(像素),默认 300
|
|
34
|
+
*/
|
|
35
|
+
collapseMaxHeight?: number;
|
|
28
36
|
}
|
|
29
37
|
/**
|
|
30
38
|
* codeBlockPlugin - 代码块渲染插件
|
|
@@ -31,6 +31,10 @@ export interface MermaidPluginOptions {
|
|
|
31
31
|
theme?: 'default' | 'dark' | 'forest' | 'neutral';
|
|
32
32
|
/** Optional CSS URL to load for Mermaid (consumers can provide local file path) */
|
|
33
33
|
cssUrl?: string;
|
|
34
|
+
/**
|
|
35
|
+
* 渲染错误发生时的回调函数
|
|
36
|
+
*/
|
|
37
|
+
onError?: (error: Error | string, code: string) => void;
|
|
34
38
|
}
|
|
35
39
|
/**
|
|
36
40
|
* Mermaid Plugin
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
const e=require("./custom-Bl_fVJZ0.cjs"),t=require("./src-BMjps4Ui.cjs"),n=require("./chunk-ABZYJK2D-CbIYYZa_.cjs"),r=require("./linear-rQLpRrSH.cjs"),i=require("./ordinal-CUPR-p0T.cjs"),a=require("./init-07zIhv_j.cjs"),o=require("./chunk-S3R3BYOJ-B2ozcJNg.cjs"),s=require("./line-DdNAPGaw.cjs"),c=require("./chunk-JA3XYJ7Z-BaAdjYEy.cjs");function l(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=Array(i);++r<i;)a[r]=e+r*n;return a}function u(){var e=i.t().unknown(void 0),t=e.domain,n=e.range,r=0,o=1,s,c,d=!1,f=0,p=0,m=.5;delete e.unknown;function h(){var e=t().length,i=o<r,a=i?o:r,u=i?r:o;s=(u-a)/Math.max(1,e-f+p*2),d&&(s=Math.floor(s)),a+=(u-a-s*(e-f))*m,c=s*(1-f),d&&(a=Math.round(a),c=Math.round(c));var h=l(e).map(function(e){return a+s*e});return n(i?h.reverse():h)}return e.domain=function(e){return arguments.length?(t(e),h()):t()},e.range=function(e){return arguments.length?([r,o]=e,r=+r,o=+o,h()):[r,o]},e.rangeRound=function(e){return[r,o]=e,r=+r,o=+o,d=!0,h()},e.bandwidth=function(){return c},e.step=function(){return s},e.round=function(e){return arguments.length?(d=!!e,h()):d},e.padding=function(e){return arguments.length?(f=Math.min(1,p=+e),h()):f},e.paddingInner=function(e){return arguments.length?(f=Math.min(1,e),h()):f},e.paddingOuter=function(e){return arguments.length?(p=+e,h()):p},e.align=function(e){return arguments.length?(m=Math.max(0,Math.min(1,e)),h()):m},e.copy=function(){return u(t(),[r,o]).round(d).paddingInner(f).paddingOuter(p).align(m)},a.t.apply(h(),arguments)}var d=(function(){var e=t.h(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,10,12,14,16,18,19,21,23],r=[2,6],i=[1,3],a=[1,5],o=[1,6],s=[1,7],c=[1,5,10,12,14,16,18,19,21,23,34,35,36],l=[1,25],u=[1,26],d=[1,28],f=[1,29],p=[1,30],m=[1,31],h=[1,32],g=[1,33],_=[1,34],v=[1,35],y=[1,36],b=[1,37],x=[1,43],S=[1,42],C=[1,47],w=[1,50],T=[1,10,12,14,16,18,19,21,23,34,35,36],E=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],D=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],O=[1,64],k={trace:t.h(function(){},`trace`),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:`error`,5:`XYCHART`,8:`CHART_ORIENTATION`,10:`title`,12:`X_AXIS`,14:`Y_AXIS`,16:`LINE`,18:`BAR`,19:`acc_title`,20:`acc_title_value`,21:`acc_descr`,22:`acc_descr_value`,23:`acc_descr_multiline_value`,24:`SQUARE_BRACES_START`,26:`SQUARE_BRACES_END`,27:`NUMBER_WITH_DECIMAL`,28:`COMMA`,31:`ARROW_DELIMITER`,34:`NEWLINE`,35:`SEMI`,36:`EOF`,38:`STR`,39:`MD_STR`,41:`AMP`,42:`NUM`,43:`ALPHA`,44:`PLUS`,45:`EQUALS`,46:`MULT`,47:`DOT`,48:`BRKT`,49:`MINUS`,50:`UNDERSCORE`},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:t.h(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 5:r.setOrientation(a[s]);break;case 9:r.setDiagramTitle(a[s].text.trim());break;case 12:r.setLineData({text:``,type:`text`},a[s]);break;case 13:r.setLineData(a[s-1],a[s]);break;case 14:r.setBarData({text:``,type:`text`},a[s]);break;case 15:r.setBarData(a[s-1],a[s]);break;case 16:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 17:case 18:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 19:this.$=a[s-1];break;case 20:this.$=[Number(a[s-2]),...a[s]];break;case 21:this.$=[Number(a[s])];break;case 22:r.setXAxisTitle(a[s]);break;case 23:r.setXAxisTitle(a[s-1]);break;case 24:r.setXAxisTitle({type:`text`,text:``});break;case 25:r.setXAxisBand(a[s]);break;case 26:r.setXAxisRangeData(Number(a[s-2]),Number(a[s]));break;case 27:this.$=a[s-1];break;case 28:this.$=[a[s-2],...a[s]];break;case 29:this.$=[a[s]];break;case 30:r.setYAxisTitle(a[s]);break;case 31:r.setYAxisTitle(a[s-1]);break;case 32:r.setYAxisTitle({type:`text`,text:``});break;case 33:r.setYAxisRangeData(Number(a[s-2]),Number(a[s]));break;case 37:this.$={text:a[s],type:`text`};break;case 38:this.$={text:a[s],type:`text`};break;case 39:this.$={text:a[s],type:`markdown`};break;case 40:this.$=a[s];break;case 41:this.$=a[s-1]+``+a[s];break}},`anonymous`),table:[e(n,r,{3:1,4:2,7:4,5:i,34:a,35:o,36:s}),{1:[3]},e(n,r,{4:2,7:4,3:8,5:i,34:a,35:o,36:s}),e(n,r,{4:2,7:4,6:9,3:10,5:i,8:[1,11],34:a,35:o,36:s}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(c,[2,34]),e(c,[2,35]),e(c,[2,36]),{1:[2,1]},e(n,r,{4:2,7:4,3:21,5:i,34:a,35:o,36:s}),{1:[2,3]},e(c,[2,5]),e(n,[2,7],{4:22,34:a,35:o,36:s}),{11:23,37:24,38:l,39:u,40:27,41:d,42:f,43:p,44:m,45:h,46:g,47:_,48:v,49:y,50:b},{11:39,13:38,24:x,27:S,29:40,30:41,37:24,38:l,39:u,40:27,41:d,42:f,43:p,44:m,45:h,46:g,47:_,48:v,49:y,50:b},{11:45,15:44,27:C,33:46,37:24,38:l,39:u,40:27,41:d,42:f,43:p,44:m,45:h,46:g,47:_,48:v,49:y,50:b},{11:49,17:48,24:w,37:24,38:l,39:u,40:27,41:d,42:f,43:p,44:m,45:h,46:g,47:_,48:v,49:y,50:b},{11:52,17:51,24:w,37:24,38:l,39:u,40:27,41:d,42:f,43:p,44:m,45:h,46:g,47:_,48:v,49:y,50:b},{20:[1,53]},{22:[1,54]},e(T,[2,18]),{1:[2,2]},e(T,[2,8]),e(T,[2,9]),e(E,[2,37],{40:55,41:d,42:f,43:p,44:m,45:h,46:g,47:_,48:v,49:y,50:b}),e(E,[2,38]),e(E,[2,39]),e(D,[2,40]),e(D,[2,42]),e(D,[2,43]),e(D,[2,44]),e(D,[2,45]),e(D,[2,46]),e(D,[2,47]),e(D,[2,48]),e(D,[2,49]),e(D,[2,50]),e(D,[2,51]),e(T,[2,10]),e(T,[2,22],{30:41,29:56,24:x,27:S}),e(T,[2,24]),e(T,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:l,39:u,40:27,41:d,42:f,43:p,44:m,45:h,46:g,47:_,48:v,49:y,50:b},e(T,[2,11]),e(T,[2,30],{33:60,27:C}),e(T,[2,32]),{31:[1,61]},e(T,[2,12]),{17:62,24:w},{25:63,27:O},e(T,[2,14]),{17:65,24:w},e(T,[2,16]),e(T,[2,17]),e(D,[2,41]),e(T,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},e(T,[2,31]),{27:[1,69]},e(T,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},e(T,[2,15]),e(T,[2,26]),e(T,[2,27]),{11:59,32:72,37:24,38:l,39:u,40:27,41:d,42:f,43:p,44:m,45:h,46:g,47:_,48:v,49:y,50:b},e(T,[2,33]),e(T,[2,19]),{25:73,27:O},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:t.h(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t.h(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;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t.h(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.h(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`)};k.lexer=(function(){return{EOF:1,parseError:t.h(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:t.h(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.h(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.h(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.h(function(){return this._more=!0,this},`more`),reject:t.h(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.h(function(e){this.unput(this.match.slice(e))},`less`),pastInput:t.h(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.h(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.h(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|
5
|
+
`+t+`^`},`showPosition`),test_match:t.h(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.h(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}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e===!1?!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.h(function(){return this.next()||this.lex()},`lex`),begin:t.h(function(e){this.conditionStack.push(e)},`begin`),popState:t.h(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:t.h(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.h(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:t.h(function(e){this.begin(e)},`pushState`),stateStackSize:t.h(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:t.h(function(e,t,n,r){switch(n){case 0:break;case 1:break;case 2:return this.popState(),34;case 3:return this.popState(),34;case 4:return 34;case 5:break;case 6:return 10;case 7:return this.pushState(`acc_title`),19;case 8:return this.popState(),`acc_title_value`;case 9:return this.pushState(`acc_descr`),21;case 10:return this.popState(),`acc_descr_value`;case 11:this.pushState(`acc_descr_multiline`);break;case 12:this.popState();break;case 13:return`acc_descr_multiline_value`;case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState(`axis_data`),`X_AXIS`;case 18:return this.pushState(`axis_data`),`Y_AXIS`;case 19:return this.pushState(`axis_band_data`),24;case 20:return 31;case 21:return this.pushState(`data`),16;case 22:return this.pushState(`data`),18;case 23:return this.pushState(`data_inner`),24;case 24:return 27;case 25:return this.popState(),26;case 26:this.popState();break;case 27:this.pushState(`string`);break;case 28:this.popState();break;case 29:return`STR`;case 30:return 24;case 31:return 26;case 32:return 43;case 33:return`COLON`;case 34:return 44;case 35:return 28;case 36:return 45;case 37:return 46;case 38:return 48;case 39:return 50;case 40:return 47;case 41:return 41;case 42:return 49;case 43:return 42;case 44:break;case 45:return 35;case 46:return 36}},`anonymous`),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\{)/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}}})();function A(){this.yy={}}return t.h(A,`Parser`),A.prototype=k,k.Parser=A,new A})();d.parser=d;var f=d;function p(e){return e.type===`bar`}t.h(p,`isBarPlot`);function m(e){return e.type===`band`}t.h(m,`isBandAxisData`);function h(e){return e.type===`linear`}t.h(h,`isLinearAxisData`);var g=class{constructor(e){this.parentGroup=e}static{t.h(this,`TextDimensionCalculatorWithFont`)}getMaxDimension(e,t){if(!this.parentGroup)return{width:e.reduce((e,t)=>Math.max(t.length,e),0)*t,height:t};let n={width:0,height:0},r=this.parentGroup.append(`g`).attr(`visibility`,`hidden`).attr(`font-size`,t);for(let i of e){let e=c.t(r,1,i),a=e?e.width:i.length*t,o=e?e.height:t;n.width=Math.max(n.width,a),n.height=Math.max(n.height,o)}return r.remove(),n}},_=.7,v=.2,y=class{constructor(e,t,n,r){this.axisConfig=e,this.title=t,this.textDimensionCalculator=n,this.axisThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition=`left`,this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition=`left`}static{t.h(this,`BaseAxis`)}setRange(e){this.range=e,this.axisPosition===`left`||this.axisPosition===`right`?this.boundingRect.height=e[1]-e[0]:this.boundingRect.width=e[1]-e[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(e){this.axisPosition=e,this.setRange(this.range)}getTickDistance(){let e=this.getRange();return Math.abs(e[0]-e[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(e=>e.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){_*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(_*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(e){let t=e.height;if(this.axisConfig.showAxisLine&&t>this.axisConfig.axisLineWidth&&(t-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let n=this.getLabelDimension(),r=v*e.width;this.outerPadding=Math.min(n.width/2,r);let i=n.height+this.axisConfig.labelPadding*2;this.labelTextHeight=n.height,i<=t&&(t-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&t>=this.axisConfig.tickLength&&(this.showTick=!0,t-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.height,n<=t&&(t-=n,this.showTitle=!0)}this.boundingRect.width=e.width,this.boundingRect.height=e.height-t}calculateSpaceIfDrawnVertical(e){let t=e.width;if(this.axisConfig.showAxisLine&&t>this.axisConfig.axisLineWidth&&(t-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let n=this.getLabelDimension(),r=v*e.height;this.outerPadding=Math.min(n.height/2,r);let i=n.width+this.axisConfig.labelPadding*2;i<=t&&(t-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&t>=this.axisConfig.tickLength&&(this.showTick=!0,t-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.height,n<=t&&(t-=n,this.showTitle=!0)}this.boundingRect.width=e.width-t,this.boundingRect.height=e.height}calculateSpace(e){return this.axisPosition===`left`||this.axisPosition===`right`?this.calculateSpaceIfDrawnVertical(e):this.calculateSpaceIfDrawnHorizontally(e),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}getDrawableElementsForLeftAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;e.push({type:`path`,groupTexts:[`left-axis`,`axisl-line`],data:[{path:`M ${t},${this.boundingRect.y} L ${t},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:`text`,groupTexts:[`left-axis`,`label`],data:this.getTickValues().map(e=>({text:e.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(e),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:`middle`,horizontalPos:`right`}))}),this.showTick){let t=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:`path`,groupTexts:[`left-axis`,`ticks`],data:this.getTickValues().map(e=>({path:`M ${t},${this.getScaleValue(e)} L ${t-this.axisConfig.tickLength},${this.getScaleValue(e)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:`text`,groupTexts:[`left-axis`,`title`],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:`top`,horizontalPos:`center`}]}),e}getDrawableElementsForBottomAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.y+this.axisConfig.axisLineWidth/2;e.push({type:`path`,groupTexts:[`bottom-axis`,`axis-line`],data:[{path:`M ${this.boundingRect.x},${t} L ${this.boundingRect.x+this.boundingRect.width},${t}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:`text`,groupTexts:[`bottom-axis`,`label`],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:`top`,horizontalPos:`center`}))}),this.showTick){let t=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:`path`,groupTexts:[`bottom-axis`,`ticks`],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${t} L ${this.getScaleValue(e)},${t+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:`text`,groupTexts:[`bottom-axis`,`title`],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:`top`,horizontalPos:`center`}]}),e}getDrawableElementsForTopAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;e.push({type:`path`,groupTexts:[`top-axis`,`axis-line`],data:[{path:`M ${this.boundingRect.x},${t} L ${this.boundingRect.x+this.boundingRect.width},${t}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:`text`,groupTexts:[`top-axis`,`label`],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:`top`,horizontalPos:`center`}))}),this.showTick){let t=this.boundingRect.y;e.push({type:`path`,groupTexts:[`top-axis`,`ticks`],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${t+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(e)},${t+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:`text`,groupTexts:[`top-axis`,`title`],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:`top`,horizontalPos:`center`}]}),e}getDrawableElements(){if(this.axisPosition===`left`)return this.getDrawableElementsForLeftAxis();if(this.axisPosition===`right`)throw Error(`Drawing of right axis is not implemented`);return this.axisPosition===`bottom`?this.getDrawableElementsForBottomAxis():this.axisPosition===`top`?this.getDrawableElementsForTopAxis():[]}},b=class extends y{static{t.h(this,`BandAxis`)}constructor(e,t,n,r,i){super(e,r,i,t),this.categories=n,this.scale=u().domain(this.categories).range(this.getRange())}setRange(e){super.setRange(e)}recalculateScale(){this.scale=u().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),t.g.trace(`BandAxis axis final categories, range: `,this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(e){return this.scale(e)??this.getRange()[0]}},x=class extends y{static{t.h(this,`LinearAxis`)}constructor(e,t,n,i,a){super(e,i,a,t),this.domain=n,this.scale=r.t().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let e=[...this.domain];this.axisPosition===`left`&&e.reverse(),this.scale=r.t().domain(e).range(this.getRange())}getScaleValue(e){return this.scale(e)}};function S(e,t,n,r){let i=new g(r);return m(e)?new b(t,n,e.categories,e.title,i):new x(t,n,[e.min,e.max],e.title,i)}t.h(S,`getAxis`);var C=class{constructor(e,t,n,r){this.textDimensionCalculator=e,this.chartConfig=t,this.chartData=n,this.chartThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{t.h(this,`ChartTitle`)}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){let t=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),n=Math.max(t.width,e.width),r=t.height+2*this.chartConfig.titlePadding;return t.width<=n&&t.height<=r&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=n,this.boundingRect.height=r,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let e=[];return this.showChartTitle&&e.push({groupTexts:[`chart-title`],type:`text`,data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:`middle`,horizontalPos:`center`,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),e}};function w(e,t,n,r){return new C(new g(r),e,t,n)}t.h(w,`getChartTitleComponent`);var T=class{constructor(e,t,n,r,i){this.plotData=e,this.xAxis=t,this.yAxis=n,this.orientation=r,this.plotIndex=i}static{t.h(this,`LinePlot`)}getDrawableElement(){let e=this.plotData.data.map(e=>[this.xAxis.getScaleValue(e[0]),this.yAxis.getScaleValue(e[1])]),t;return t=this.orientation===`horizontal`?s.t().y(e=>e[0]).x(e=>e[1])(e):s.t().x(e=>e[0]).y(e=>e[1])(e),t?[{groupTexts:[`plot`,`line-plot-${this.plotIndex}`],type:`path`,data:[{path:t,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},E=class{constructor(e,t,n,r,i,a){this.barData=e,this.boundingRect=t,this.xAxis=n,this.yAxis=r,this.orientation=i,this.plotIndex=a}static{t.h(this,`BarPlot`)}getDrawableElement(){let e=this.barData.data.map(e=>[this.xAxis.getScaleValue(e[0]),this.yAxis.getScaleValue(e[1])]),t=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*.95,n=t/2;return this.orientation===`horizontal`?[{groupTexts:[`plot`,`bar-plot-${this.plotIndex}`],type:`rect`,data:e.map(e=>({x:this.boundingRect.x,y:e[0]-n,height:t,width:e[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:[`plot`,`bar-plot-${this.plotIndex}`],type:`rect`,data:e.map(e=>({x:e[0]-n,y:e[1],width:t,height:this.boundingRect.y+this.boundingRect.height-e[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},D=class{constructor(e,t,n){this.chartConfig=e,this.chartData=t,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0}}static{t.h(this,`BasePlot`)}setAxes(e,t){this.xAxis=e,this.yAxis=t}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){return this.boundingRect.width=e.width,this.boundingRect.height=e.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error(`Axes must be passed to render Plots`);let e=[];for(let[t,n]of this.chartData.plots.entries())switch(n.type){case`line`:{let r=new T(n,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t);e.push(...r.getDrawableElement())}break;case`bar`:{let r=new E(n,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t);e.push(...r.getDrawableElement())}break}return e}};function O(e,t,n){return new D(e,t,n)}t.h(O,`getPlotComponent`);var k=class{constructor(e,t,n,r){this.chartConfig=e,this.chartData=t,this.componentStore={title:w(e,t,n,r),plot:O(e,t,n),xAxis:S(t.xAxis,e.xAxis,{titleColor:n.xAxisTitleColor,labelColor:n.xAxisLabelColor,tickColor:n.xAxisTickColor,axisLineColor:n.xAxisLineColor},r),yAxis:S(t.yAxis,e.yAxis,{titleColor:n.yAxisTitleColor,labelColor:n.yAxisLabelColor,tickColor:n.yAxisTickColor,axisLineColor:n.yAxisLineColor},r)}}static{t.h(this,`Orchestrator`)}calculateVerticalSpace(){let e=this.chartConfig.width,t=this.chartConfig.height,n=0,r=0,i=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:i,height:a});e-=o.width,t-=o.height,o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:t}),r=o.height,t-=o.height,this.componentStore.xAxis.setAxisPosition(`bottom`),o=this.componentStore.xAxis.calculateSpace({width:e,height:t}),t-=o.height,this.componentStore.yAxis.setAxisPosition(`left`),o=this.componentStore.yAxis.calculateSpace({width:e,height:t}),n=o.width,e-=o.width,e>0&&(i+=e,e=0),t>0&&(a+=t,t=0),this.componentStore.plot.calculateSpace({width:i,height:a}),this.componentStore.plot.setBoundingBoxXY({x:n,y:r}),this.componentStore.xAxis.setRange([n,n+i]),this.componentStore.xAxis.setBoundingBoxXY({x:n,y:r+a}),this.componentStore.yAxis.setRange([r,r+a]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:r}),this.chartData.plots.some(e=>p(e))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let e=this.chartConfig.width,t=this.chartConfig.height,n=0,r=0,i=0,a=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),o=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),s=this.componentStore.plot.calculateSpace({width:a,height:o});e-=s.width,t-=s.height,s=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:t}),n=s.height,t-=s.height,this.componentStore.xAxis.setAxisPosition(`left`),s=this.componentStore.xAxis.calculateSpace({width:e,height:t}),e-=s.width,r=s.width,this.componentStore.yAxis.setAxisPosition(`top`),s=this.componentStore.yAxis.calculateSpace({width:e,height:t}),t-=s.height,i=n+s.height,e>0&&(a+=e,e=0),t>0&&(o+=t,t=0),this.componentStore.plot.calculateSpace({width:a,height:o}),this.componentStore.plot.setBoundingBoxXY({x:r,y:i}),this.componentStore.yAxis.setRange([r,r+a]),this.componentStore.yAxis.setBoundingBoxXY({x:r,y:n}),this.componentStore.xAxis.setRange([i,i+o]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:i}),this.chartData.plots.some(e=>p(e))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation===`horizontal`?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let e=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let t of Object.values(this.componentStore))e.push(...t.getDrawableElements());return e}},A=class{static{t.h(this,`XYChartBuilder`)}static build(e,t,n,r){return new k(e,t,n,r).getDrawableElement()}},j=0,M,N=B(),P=z(),F=V(),I=P.plotColorPalette.split(`,`).map(e=>e.trim()),L=!1,R=!1;function z(){let e=n.T(),t=n.y();return o.r(e.xyChart,t.themeVariables.xyChart)}t.h(z,`getChartDefaultThemeConfig`);function B(){let e=n.y();return o.r(n.d.xyChart,e.xyChart)}t.h(B,`getChartDefaultConfig`);function V(){return{yAxis:{type:`linear`,title:``,min:1/0,max:-1/0},xAxis:{type:`band`,title:``,categories:[]},title:``,plots:[]}}t.h(V,`getChartDefaultData`);function H(e){let t=n.y();return n.I(e.trim(),t)}t.h(H,`textSanitizer`);function U(e){M=e}t.h(U,`setTmpSVGG`);function W(e){e===`horizontal`?N.chartOrientation=`horizontal`:N.chartOrientation=`vertical`}t.h(W,`setOrientation`);function G(e){F.xAxis.title=H(e.text)}t.h(G,`setXAxisTitle`);function K(e,t){F.xAxis={type:`linear`,title:F.xAxis.title,min:e,max:t},L=!0}t.h(K,`setXAxisRangeData`);function q(e){F.xAxis={type:`band`,title:F.xAxis.title,categories:e.map(e=>H(e.text))},L=!0}t.h(q,`setXAxisBand`);function J(e){F.yAxis.title=H(e.text)}t.h(J,`setYAxisTitle`);function Y(e,t){F.yAxis={type:`linear`,title:F.yAxis.title,min:e,max:t},R=!0}t.h(Y,`setYAxisRangeData`);function X(e){let t=Math.min(...e),n=Math.max(...e),r=h(F.yAxis)?F.yAxis.min:1/0,i=h(F.yAxis)?F.yAxis.max:-1/0;F.yAxis={type:`linear`,title:F.yAxis.title,min:Math.min(r,t),max:Math.max(i,n)}}t.h(X,`setYAxisRangeFromPlotData`);function Z(e){let t=[];if(e.length===0)return t;if(!L){let t=h(F.xAxis)?F.xAxis.min:1/0,n=h(F.xAxis)?F.xAxis.max:-1/0;K(Math.min(t,1),Math.max(n,e.length))}if(R||X(e),m(F.xAxis)&&(t=F.xAxis.categories.map((t,n)=>[t,e[n]])),h(F.xAxis)){let n=F.xAxis.min,r=F.xAxis.max,i=(r-n)/(e.length-1),a=[];for(let e=n;e<=r;e+=i)a.push(`${e}`);t=a.map((t,n)=>[t,e[n]])}return t}t.h(Z,`transformDataWithoutCategory`);function Q(e){return I[e===0?0:e%I.length]}t.h(Q,`getPlotColorFromPalette`);function $(e,t){let n=Z(t);F.plots.push({type:`line`,strokeFill:Q(j),strokeWidth:2,data:n}),j++}t.h($,`setLineData`);function ee(e,t){let n=Z(t);F.plots.push({type:`bar`,fill:Q(j),data:n}),j++}t.h(ee,`setBarData`);function te(){if(F.plots.length===0)throw Error(`No Plot to render, please provide a plot with some data`);return F.title=n.C(),A.build(N,F,P,M)}t.h(te,`getDrawableElem`);function ne(){return P}t.h(ne,`getChartThemeConfig`);function re(){return N}t.h(re,`getChartConfig`);function ie(){return F}t.h(ie,`getXYChartData`);var ae={parser:f,db:{getDrawableElem:te,clear:t.h(function(){n.a(),j=0,N=B(),F=V(),P=z(),I=P.plotColorPalette.split(`,`).map(e=>e.trim()),L=!1,R=!1},`clear`),setAccTitle:n.B,getAccTitle:n.v,setDiagramTitle:n.U,getDiagramTitle:n.C,getAccDescription:n._,setAccDescription:n.z,setOrientation:W,setXAxisTitle:G,setXAxisRangeData:K,setXAxisBand:q,setYAxisTitle:J,setYAxisRangeData:Y,setLineData:$,setBarData:ee,setTmpSVGG:U,getChartThemeConfig:ne,getChartConfig:re,getXYChartData:ie},renderer:{draw:t.h((r,i,a,o)=>{let s=o.db,c=s.getChartThemeConfig(),l=s.getChartConfig(),u=s.getXYChartData().plots[0].data.map(e=>e[1]);function d(e){return e===`top`?`text-before-edge`:`middle`}t.h(d,`getDominantBaseLine`);function f(e){return e===`left`?`start`:e===`right`?`end`:`middle`}t.h(f,`getTextAnchor`);function p(e){return`translate(${e.x}, ${e.y}) rotate(${e.rotation||0})`}t.h(p,`getTextTransformation`),t.g.debug(`Rendering xychart chart
|
|
7
|
+
`+r);let m=e.f(i),h=m.append(`g`).attr(`class`,`main`),g=h.append(`rect`).attr(`width`,l.width).attr(`height`,l.height).attr(`class`,`background`);n.c(m,l.height,l.width,!0),m.attr(`viewBox`,`0 0 ${l.width} ${l.height}`),g.attr(`fill`,c.backgroundColor),s.setTmpSVGG(m.append(`g`).attr(`class`,`mermaid-tmp-group`));let _=s.getDrawableElem(),v={};function y(e){let t=h,n=``;for(let[r]of e.entries()){let i=h;r>0&&v[n]&&(i=v[n]),n+=e[r],t=v[n],t||=v[n]=i.append(`g`).attr(`class`,e[r])}return t}t.h(y,`getGroup`);for(let e of _){if(e.data.length===0)continue;let n=y(e.groupTexts);switch(e.type){case`rect`:if(n.selectAll(`rect`).data(e.data).enter().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).attr(`stroke`,e=>e.strokeFill).attr(`stroke-width`,e=>e.strokeWidth),l.showDataLabel)if(l.chartOrientation===`horizontal`){let r=function(e,t){let{data:n,label:r}=e;return t*r.length*i<=n.width-10};t.h(r,`fitsHorizontally`);let i=.7,a=e.data.map((e,t)=>({data:e,label:u[t].toString()})).filter(e=>e.data.width>0&&e.data.height>0),o=a.map(e=>{let{data:t}=e,n=t.height*.7;for(;!r(e,n)&&n>0;)--n;return n}),s=Math.floor(Math.min(...o));n.selectAll(`text`).data(a).enter().append(`text`).attr(`x`,e=>e.data.x+e.data.width-10).attr(`y`,e=>e.data.y+e.data.height/2).attr(`text-anchor`,`end`).attr(`dominant-baseline`,`middle`).attr(`fill`,`black`).attr(`font-size`,`${s}px`).text(e=>e.label)}else{let r=function(e,t,n){let{data:r,label:i}=e,a=t*i.length*.7,o=r.x+r.width/2,s=o-a/2,c=o+a/2,l=s>=r.x&&c<=r.x+r.width,u=r.y+n+t<=r.y+r.height;return l&&u};t.h(r,`fitsInBar`);let i=e.data.map((e,t)=>({data:e,label:u[t].toString()})).filter(e=>e.data.width>0&&e.data.height>0),a=i.map(e=>{let{data:t,label:n}=e,i=t.width/(n.length*.7);for(;!r(e,i,10)&&i>0;)--i;return i}),o=Math.floor(Math.min(...a));n.selectAll(`text`).data(i).enter().append(`text`).attr(`x`,e=>e.data.x+e.data.width/2).attr(`y`,e=>e.data.y+10).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`hanging`).attr(`fill`,`black`).attr(`font-size`,`${o}px`).text(e=>e.label)}break;case`text`:n.selectAll(`text`).data(e.data).enter().append(`text`).attr(`x`,0).attr(`y`,0).attr(`fill`,e=>e.fill).attr(`font-size`,e=>e.fontSize).attr(`dominant-baseline`,e=>d(e.verticalPos)).attr(`text-anchor`,e=>f(e.horizontalPos)).attr(`transform`,e=>p(e)).text(e=>e.text);break;case`path`:n.selectAll(`path`).data(e.data).enter().append(`path`).attr(`d`,e=>e.path).attr(`fill`,e=>e.fill?e.fill:`none`).attr(`stroke`,e=>e.strokeFill).attr(`stroke-width`,e=>e.strokeWidth);break}}},`draw`)}};exports.diagram=ae;
|