@aiquants/markdown 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +51 -0
- package/dist/_basePickBy-7UHjqDkf.cjs +2 -0
- package/dist/_basePickBy-7UHjqDkf.cjs.map +1 -0
- package/dist/_basePickBy-D9tTZiUl.js +152 -0
- package/dist/_basePickBy-D9tTZiUl.js.map +1 -0
- package/dist/_baseUniq-2o5t0XZs.js +615 -0
- package/dist/_baseUniq-2o5t0XZs.js.map +1 -0
- package/dist/_baseUniq-eNrMicw1.cjs +2 -0
- package/dist/_baseUniq-eNrMicw1.cjs.map +1 -0
- package/dist/arc-DWgeb9Dh.js +84 -0
- package/dist/arc-DWgeb9Dh.js.map +1 -0
- package/dist/arc-DklCGftp.cjs +2 -0
- package/dist/arc-DklCGftp.cjs.map +1 -0
- package/dist/architecture-U656AL7Q-Dn1VasbJ.cjs +2 -0
- package/dist/architecture-U656AL7Q-Dn1VasbJ.cjs.map +1 -0
- package/dist/architecture-U656AL7Q-ItIkYjCw.js +6 -0
- package/dist/architecture-U656AL7Q-ItIkYjCw.js.map +1 -0
- package/dist/architectureDiagram-VXUJARFQ-CCg9tI-v.js +4662 -0
- package/dist/architectureDiagram-VXUJARFQ-CCg9tI-v.js.map +1 -0
- package/dist/architectureDiagram-VXUJARFQ-swg0hzdO.cjs +37 -0
- package/dist/architectureDiagram-VXUJARFQ-swg0hzdO.cjs.map +1 -0
- package/dist/blockDiagram-VD42YOAC-5A-soCII.js +2262 -0
- package/dist/blockDiagram-VD42YOAC-5A-soCII.js.map +1 -0
- package/dist/blockDiagram-VD42YOAC-OVvG-qvh.cjs +123 -0
- package/dist/blockDiagram-VD42YOAC-OVvG-qvh.cjs.map +1 -0
- package/dist/c4Diagram-YG6GDRKO-4d8l1okc.js +1581 -0
- package/dist/c4Diagram-YG6GDRKO-4d8l1okc.js.map +1 -0
- package/dist/c4Diagram-YG6GDRKO-ChHo1WBS.cjs +11 -0
- package/dist/c4Diagram-YG6GDRKO-ChHo1WBS.cjs.map +1 -0
- package/dist/channel-B664_FfD.cjs +2 -0
- package/dist/channel-B664_FfD.cjs.map +1 -0
- package/dist/channel-brI2zNXV.js +6 -0
- package/dist/channel-brI2zNXV.js.map +1 -0
- package/dist/chunk-4BX2VUAB-CctGCeAK.cjs +2 -0
- package/dist/chunk-4BX2VUAB-CctGCeAK.cjs.map +1 -0
- package/dist/chunk-4BX2VUAB-D7T15wZG.js +9 -0
- package/dist/chunk-4BX2VUAB-D7T15wZG.js.map +1 -0
- package/dist/chunk-55IACEB6-B-pzTJuD.cjs +2 -0
- package/dist/chunk-55IACEB6-B-pzTJuD.cjs.map +1 -0
- package/dist/chunk-55IACEB6-DwdHDzpK.js +9 -0
- package/dist/chunk-55IACEB6-DwdHDzpK.js.map +1 -0
- package/dist/chunk-B4BG7PRW-BoaM-X4_.cjs +166 -0
- package/dist/chunk-B4BG7PRW-BoaM-X4_.cjs.map +1 -0
- package/dist/chunk-B4BG7PRW-DIhQLt8l.js +1376 -0
- package/dist/chunk-B4BG7PRW-DIhQLt8l.js.map +1 -0
- package/dist/chunk-DI55MBZ5-BbA8Sn8U.cjs +221 -0
- package/dist/chunk-DI55MBZ5-BbA8Sn8U.cjs.map +1 -0
- package/dist/chunk-DI55MBZ5-BjEvsSVW.js +1371 -0
- package/dist/chunk-DI55MBZ5-BjEvsSVW.js.map +1 -0
- package/dist/chunk-FMBD7UC4-CE6saCeU.js +20 -0
- package/dist/chunk-FMBD7UC4-CE6saCeU.js.map +1 -0
- package/dist/chunk-FMBD7UC4-CFF7znzy.cjs +16 -0
- package/dist/chunk-FMBD7UC4-CFF7znzy.cjs.map +1 -0
- package/dist/chunk-QN33PNHL-7NdtJrqu.cjs +2 -0
- package/dist/chunk-QN33PNHL-7NdtJrqu.cjs.map +1 -0
- package/dist/chunk-QN33PNHL-Bj3YaA4h.js +20 -0
- package/dist/chunk-QN33PNHL-Bj3YaA4h.js.map +1 -0
- package/dist/chunk-QZHKN3VN-BN18QEr3.js +16 -0
- package/dist/chunk-QZHKN3VN-BN18QEr3.js.map +1 -0
- package/dist/chunk-QZHKN3VN-D_QIb2Uv.cjs +2 -0
- package/dist/chunk-QZHKN3VN-D_QIb2Uv.cjs.map +1 -0
- package/dist/chunk-TZMSLE5B-BPOcqqfY.cjs +2 -0
- package/dist/chunk-TZMSLE5B-BPOcqqfY.cjs.map +1 -0
- package/dist/chunk-TZMSLE5B-vH-tpVb0.js +65 -0
- package/dist/chunk-TZMSLE5B-vH-tpVb0.js.map +1 -0
- package/dist/classDiagram-2ON5EDUG-CsprUVVW.cjs +2 -0
- package/dist/classDiagram-2ON5EDUG-CsprUVVW.cjs.map +1 -0
- package/dist/classDiagram-2ON5EDUG-QWrDlWBz.js +17 -0
- package/dist/classDiagram-2ON5EDUG-QWrDlWBz.js.map +1 -0
- package/dist/classDiagram-v2-WZHVMYZB-CsprUVVW.cjs +2 -0
- package/dist/classDiagram-v2-WZHVMYZB-CsprUVVW.cjs.map +1 -0
- package/dist/classDiagram-v2-WZHVMYZB-QWrDlWBz.js +17 -0
- package/dist/classDiagram-v2-WZHVMYZB-QWrDlWBz.js.map +1 -0
- package/dist/cli.js +19 -0
- package/dist/clone-CM-P04XS.cjs +2 -0
- package/dist/clone-CM-P04XS.cjs.map +1 -0
- package/dist/clone-baeou7da.js +9 -0
- package/dist/clone-baeou7da.js.map +1 -0
- package/dist/cose-bilkent-S5V4N54A-DSWO1JhV.cjs +2 -0
- package/dist/cose-bilkent-S5V4N54A-DSWO1JhV.cjs.map +1 -0
- package/dist/cose-bilkent-S5V4N54A-oRFA2Dyl.js +2609 -0
- package/dist/cose-bilkent-S5V4N54A-oRFA2Dyl.js.map +1 -0
- package/dist/css/details.css +74 -0
- package/dist/css/github-markdown.css +1224 -0
- package/dist/css/katex.min.css +1128 -0
- package/dist/css/message.css +81 -0
- package/dist/css/zenn-content.css +599 -0
- package/dist/cytoscape.esm-DHF7mANN.cjs +332 -0
- package/dist/cytoscape.esm-DHF7mANN.cjs.map +1 -0
- package/dist/cytoscape.esm-DfdJODL8.js +18736 -0
- package/dist/cytoscape.esm-DfdJODL8.js.map +1 -0
- package/dist/dagre-6UL2VRFP-71wtgZah.js +445 -0
- package/dist/dagre-6UL2VRFP-71wtgZah.js.map +1 -0
- package/dist/dagre-6UL2VRFP-ZQ5YAEnU.cjs +5 -0
- package/dist/dagre-6UL2VRFP-ZQ5YAEnU.cjs.map +1 -0
- package/dist/defaultLocale-D7EN2tov.js +172 -0
- package/dist/defaultLocale-D7EN2tov.js.map +1 -0
- package/dist/defaultLocale-DIVzfLaQ.cjs +2 -0
- package/dist/defaultLocale-DIVzfLaQ.cjs.map +1 -0
- package/dist/diagram-PSM6KHXK-BF08GA3k.js +532 -0
- package/dist/diagram-PSM6KHXK-BF08GA3k.js.map +1 -0
- package/dist/diagram-PSM6KHXK-r4cFRZZM.cjs +25 -0
- package/dist/diagram-PSM6KHXK-r4cFRZZM.cjs.map +1 -0
- package/dist/diagram-QEK2KX5R-DOjY0eaD.cjs +44 -0
- package/dist/diagram-QEK2KX5R-DOjY0eaD.cjs.map +1 -0
- package/dist/diagram-QEK2KX5R-sGyw0sAY.js +218 -0
- package/dist/diagram-QEK2KX5R-sGyw0sAY.js.map +1 -0
- package/dist/diagram-S2PKOQOG-BMza4-jI.cjs +25 -0
- package/dist/diagram-S2PKOQOG-BMza4-jI.cjs.map +1 -0
- package/dist/diagram-S2PKOQOG-qkomRR5F.js +143 -0
- package/dist/diagram-S2PKOQOG-qkomRR5F.js.map +1 -0
- package/dist/erDiagram-Q2GNP2WA-DzOuVHYr.js +842 -0
- package/dist/erDiagram-Q2GNP2WA-DzOuVHYr.js.map +1 -0
- package/dist/erDiagram-Q2GNP2WA-JaYIUcKI.cjs +61 -0
- package/dist/erDiagram-Q2GNP2WA-JaYIUcKI.cjs.map +1 -0
- package/dist/flowDiagram-NV44I4VS-DBaSAM68.cjs +163 -0
- package/dist/flowDiagram-NV44I4VS-DBaSAM68.cjs.map +1 -0
- package/dist/flowDiagram-NV44I4VS-vIsyuo_o.js +1621 -0
- package/dist/flowDiagram-NV44I4VS-vIsyuo_o.js.map +1 -0
- package/dist/ganttDiagram-LVOFAZNH-BAvkWnqP.js +2506 -0
- package/dist/ganttDiagram-LVOFAZNH-BAvkWnqP.js.map +1 -0
- package/dist/ganttDiagram-LVOFAZNH-CkuTaxdW.cjs +268 -0
- package/dist/ganttDiagram-LVOFAZNH-CkuTaxdW.cjs.map +1 -0
- package/dist/gitGraph-F6HP7TQM-Cz-S_OCA.js +6 -0
- package/dist/gitGraph-F6HP7TQM-Cz-S_OCA.js.map +1 -0
- package/dist/gitGraph-F6HP7TQM-DNVvEHNy.cjs +2 -0
- package/dist/gitGraph-F6HP7TQM-DNVvEHNy.cjs.map +1 -0
- package/dist/gitGraphDiagram-NY62KEGX-BGJ_8EO8.js +700 -0
- package/dist/gitGraphDiagram-NY62KEGX-BGJ_8EO8.js.map +1 -0
- package/dist/gitGraphDiagram-NY62KEGX-CRq5jUCx.cjs +66 -0
- package/dist/gitGraphDiagram-NY62KEGX-CRq5jUCx.cjs.map +1 -0
- package/dist/graph-BkoiE3Db.cjs +2 -0
- package/dist/graph-BkoiE3Db.cjs.map +1 -0
- package/dist/graph-DcafR7xD.js +248 -0
- package/dist/graph-DcafR7xD.js.map +1 -0
- package/dist/index-DSNpXrO0.cjs +311 -0
- package/dist/index-DSNpXrO0.cjs.map +1 -0
- package/dist/index-Dj001XV9.js +16626 -0
- package/dist/index-Dj001XV9.js.map +1 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +53 -0
- package/dist/index.js.map +1 -0
- package/dist/info-NVLQJR56-CqCsse8-.js +6 -0
- package/dist/info-NVLQJR56-CqCsse8-.js.map +1 -0
- package/dist/info-NVLQJR56-xIcqFWo7.cjs +2 -0
- package/dist/info-NVLQJR56-xIcqFWo7.cjs.map +1 -0
- package/dist/infoDiagram-ER5ION4S-CvRdqD6y.cjs +3 -0
- package/dist/infoDiagram-ER5ION4S-CvRdqD6y.cjs.map +1 -0
- package/dist/infoDiagram-ER5ION4S-DASvR-6D.js +25 -0
- package/dist/infoDiagram-ER5ION4S-DASvR-6D.js.map +1 -0
- package/dist/init-CHZsXQcr.cjs +2 -0
- package/dist/init-CHZsXQcr.cjs.map +1 -0
- package/dist/init-DjUOC4st.js +17 -0
- package/dist/init-DjUOC4st.js.map +1 -0
- package/dist/journeyDiagram-XKPGCS4Q-DB_aUAfY.js +835 -0
- package/dist/journeyDiagram-XKPGCS4Q-DB_aUAfY.js.map +1 -0
- package/dist/journeyDiagram-XKPGCS4Q-fyS7IwGo.cjs +140 -0
- package/dist/journeyDiagram-XKPGCS4Q-fyS7IwGo.cjs.map +1 -0
- package/dist/kanban-definition-3W4ZIXB7-BNNO8Pch.cjs +90 -0
- package/dist/kanban-definition-3W4ZIXB7-BNNO8Pch.cjs.map +1 -0
- package/dist/kanban-definition-3W4ZIXB7-DJYhSvmN.js +720 -0
- package/dist/kanban-definition-3W4ZIXB7-DJYhSvmN.js.map +1 -0
- package/dist/layout-B75sjsUX.js +1336 -0
- package/dist/layout-B75sjsUX.js.map +1 -0
- package/dist/layout-DwKLFlab.cjs +2 -0
- package/dist/layout-DwKLFlab.cjs.map +1 -0
- package/dist/linear-BpY3cr2i.cjs +2 -0
- package/dist/linear-BpY3cr2i.cjs.map +1 -0
- package/dist/linear-Cqb3b3Fn.js +260 -0
- package/dist/linear-Cqb3b3Fn.js.map +1 -0
- package/dist/markdown.css +1 -0
- package/dist/mermaid-parser.core-BahfL7OK.cjs +129 -0
- package/dist/mermaid-parser.core-BahfL7OK.cjs.map +1 -0
- package/dist/mermaid-parser.core-ulCpZE-m.js +12967 -0
- package/dist/mermaid-parser.core-ulCpZE-m.js.map +1 -0
- package/dist/mindmap-definition-VGOIOE7T-Cv1hrDNE.cjs +69 -0
- package/dist/mindmap-definition-VGOIOE7T-Cv1hrDNE.cjs.map +1 -0
- package/dist/mindmap-definition-VGOIOE7T-DcDtRcYa.js +785 -0
- package/dist/mindmap-definition-VGOIOE7T-DcDtRcYa.js.map +1 -0
- package/dist/ordinal-CagbB1m8.cjs +2 -0
- package/dist/ordinal-CagbB1m8.cjs.map +1 -0
- package/dist/ordinal-DfAQgscy.js +62 -0
- package/dist/ordinal-DfAQgscy.js.map +1 -0
- package/dist/packet-BFZMPI3H-B6lHYCMG.js +6 -0
- package/dist/packet-BFZMPI3H-B6lHYCMG.js.map +1 -0
- package/dist/packet-BFZMPI3H-BCPUMWA1.cjs +2 -0
- package/dist/packet-BFZMPI3H-BCPUMWA1.cjs.map +1 -0
- package/dist/pie-7BOR55EZ-BWeHQQLO.cjs +2 -0
- package/dist/pie-7BOR55EZ-BWeHQQLO.cjs.map +1 -0
- package/dist/pie-7BOR55EZ-CbTmAddS.js +6 -0
- package/dist/pie-7BOR55EZ-CbTmAddS.js.map +1 -0
- package/dist/pieDiagram-ADFJNKIX-BV8Jg7ri.js +162 -0
- package/dist/pieDiagram-ADFJNKIX-BV8Jg7ri.js.map +1 -0
- package/dist/pieDiagram-ADFJNKIX-D5N3jTfS.cjs +31 -0
- package/dist/pieDiagram-ADFJNKIX-D5N3jTfS.cjs.map +1 -0
- package/dist/quadrantDiagram-AYHSOK5B-CtJwyADb.cjs +8 -0
- package/dist/quadrantDiagram-AYHSOK5B-CtJwyADb.cjs.map +1 -0
- package/dist/quadrantDiagram-AYHSOK5B-VCCp32AW.js +1023 -0
- package/dist/quadrantDiagram-AYHSOK5B-VCCp32AW.js.map +1 -0
- package/dist/radar-NHE76QYJ-C9E2fdKT.js +6 -0
- package/dist/radar-NHE76QYJ-C9E2fdKT.js.map +1 -0
- package/dist/radar-NHE76QYJ-mSNklV3m.cjs +2 -0
- package/dist/radar-NHE76QYJ-mSNklV3m.cjs.map +1 -0
- package/dist/requirementDiagram-UZGBJVZJ-BqvtxY8r.cjs +65 -0
- package/dist/requirementDiagram-UZGBJVZJ-BqvtxY8r.cjs.map +1 -0
- package/dist/requirementDiagram-UZGBJVZJ-CcxUr7Uy.js +851 -0
- package/dist/requirementDiagram-UZGBJVZJ-CcxUr7Uy.js.map +1 -0
- package/dist/sankeyDiagram-TZEHDZUN-BB20snd1.js +811 -0
- package/dist/sankeyDiagram-TZEHDZUN-BB20snd1.js.map +1 -0
- package/dist/sankeyDiagram-TZEHDZUN-DQXz814t.cjs +11 -0
- package/dist/sankeyDiagram-TZEHDZUN-DQXz814t.cjs.map +1 -0
- package/dist/sequenceDiagram-WL72ISMW-DXGlw8C8.cjs +146 -0
- package/dist/sequenceDiagram-WL72ISMW-DXGlw8C8.cjs.map +1 -0
- package/dist/sequenceDiagram-WL72ISMW-wpLndHjn.js +2512 -0
- package/dist/sequenceDiagram-WL72ISMW-wpLndHjn.js.map +1 -0
- package/dist/src/cli.d.ts +3 -0
- package/dist/src/cli.d.ts.map +1 -0
- package/dist/src/components/MarkdownRenderer.d.ts +18 -0
- package/dist/src/components/MarkdownRenderer.d.ts.map +1 -0
- package/dist/src/components/MermaidDiagram.d.ts +6 -0
- package/dist/src/components/MermaidDiagram.d.ts.map +1 -0
- package/dist/src/components/NodesRenderer.d.ts +7 -0
- package/dist/src/components/NodesRenderer.d.ts.map +1 -0
- package/dist/src/components/mdastNodes/BlockLinkNode.d.ts +6 -0
- package/dist/src/components/mdastNodes/BlockLinkNode.d.ts.map +1 -0
- package/dist/src/components/mdastNodes/BlockquoteNode.d.ts +5 -0
- package/dist/src/components/mdastNodes/BlockquoteNode.d.ts.map +1 -0
- package/dist/src/components/mdastNodes/CodeNode.d.ts +20 -0
- package/dist/src/components/mdastNodes/CodeNode.d.ts.map +1 -0
- package/dist/src/components/mdastNodes/DeleteNode.d.ts +5 -0
- package/dist/src/components/mdastNodes/DeleteNode.d.ts.map +1 -0
- package/dist/src/components/mdastNodes/EmphasisNode.d.ts +5 -0
- package/dist/src/components/mdastNodes/EmphasisNode.d.ts.map +1 -0
- package/dist/src/components/mdastNodes/FootnoteBackLinkNode.d.ts +12 -0
- package/dist/src/components/mdastNodes/FootnoteBackLinkNode.d.ts.map +1 -0
- package/dist/src/components/mdastNodes/HTMLNode.d.ts +30 -0
- package/dist/src/components/mdastNodes/HTMLNode.d.ts.map +1 -0
- package/dist/src/components/mdastNodes/HeadingNode.d.ts +37 -0
- package/dist/src/components/mdastNodes/HeadingNode.d.ts.map +1 -0
- package/dist/src/components/mdastNodes/ImageNode.d.ts +11 -0
- package/dist/src/components/mdastNodes/ImageNode.d.ts.map +1 -0
- package/dist/src/components/mdastNodes/InlineCodeNode.d.ts +5 -0
- package/dist/src/components/mdastNodes/InlineCodeNode.d.ts.map +1 -0
- package/dist/src/components/mdastNodes/InlineMathNode.d.ts +5 -0
- package/dist/src/components/mdastNodes/InlineMathNode.d.ts.map +1 -0
- package/dist/src/components/mdastNodes/LinkNode.d.ts +5 -0
- package/dist/src/components/mdastNodes/LinkNode.d.ts.map +1 -0
- package/dist/src/components/mdastNodes/ListItemNode.d.ts +5 -0
- package/dist/src/components/mdastNodes/ListItemNode.d.ts.map +1 -0
- package/dist/src/components/mdastNodes/ListNode.d.ts +5 -0
- package/dist/src/components/mdastNodes/ListNode.d.ts.map +1 -0
- package/dist/src/components/mdastNodes/MathNode.d.ts +5 -0
- package/dist/src/components/mdastNodes/MathNode.d.ts.map +1 -0
- package/dist/src/components/mdastNodes/ParagraphNode.d.ts +5 -0
- package/dist/src/components/mdastNodes/ParagraphNode.d.ts.map +1 -0
- package/dist/src/components/mdastNodes/RichLinkCard.d.ts +13 -0
- package/dist/src/components/mdastNodes/RichLinkCard.d.ts.map +1 -0
- package/dist/src/components/mdastNodes/StrongNode.d.ts +5 -0
- package/dist/src/components/mdastNodes/StrongNode.d.ts.map +1 -0
- package/dist/src/components/mdastNodes/TableNode.d.ts +5 -0
- package/dist/src/components/mdastNodes/TableNode.d.ts.map +1 -0
- package/dist/src/components/mdastNodes/TextNode.d.ts +5 -0
- package/dist/src/components/mdastNodes/TextNode.d.ts.map +1 -0
- package/dist/src/components/mdastNodes/ThematicBreakNode.d.ts +2 -0
- package/dist/src/components/mdastNodes/ThematicBreakNode.d.ts.map +1 -0
- package/dist/src/components/mdastNodes/TwitterEmbedNode.d.ts +33 -0
- package/dist/src/components/mdastNodes/TwitterEmbedNode.d.ts.map +1 -0
- package/dist/src/components/mdastNodes/YouTubeEmbedNode.d.ts +5 -0
- package/dist/src/components/mdastNodes/YouTubeEmbedNode.d.ts.map +1 -0
- package/dist/src/components/mdastNodes/ZennDetailsNode.d.ts +8 -0
- package/dist/src/components/mdastNodes/ZennDetailsNode.d.ts.map +1 -0
- package/dist/src/components/mdastNodes/ZennMessageNode.d.ts +8 -0
- package/dist/src/components/mdastNodes/ZennMessageNode.d.ts.map +1 -0
- package/dist/src/components/plugins/DifyIFramePlugin.d.ts +31 -0
- package/dist/src/components/plugins/DifyIFramePlugin.d.ts.map +1 -0
- package/dist/src/components/plugins/IFramePluginRegistry.d.ts +68 -0
- package/dist/src/components/plugins/IFramePluginRegistry.d.ts.map +1 -0
- package/dist/src/components/plugins/index.d.ts +12 -0
- package/dist/src/components/plugins/index.d.ts.map +1 -0
- package/dist/src/index.d.ts +49 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/plugins/createIntentTweetLink.d.ts +11 -0
- package/dist/src/plugins/createIntentTweetLink.d.ts.map +1 -0
- package/dist/src/plugins/extractYouTubeVideoId.d.ts +6 -0
- package/dist/src/plugins/extractYouTubeVideoId.d.ts.map +1 -0
- package/dist/src/plugins/fetchSiteMetadata.d.ts +28 -0
- package/dist/src/plugins/fetchSiteMetadata.d.ts.map +1 -0
- package/dist/src/plugins/remark-block-link-metadata.d.ts +40 -0
- package/dist/src/plugins/remark-block-link-metadata.d.ts.map +1 -0
- package/dist/src/plugins/remark-block-link.d.ts +12 -0
- package/dist/src/plugins/remark-block-link.d.ts.map +1 -0
- package/dist/src/plugins/remark-custom-heading-id.d.ts +17 -0
- package/dist/src/plugins/remark-custom-heading-id.d.ts.map +1 -0
- package/dist/src/plugins/remark-footnote-back-link.d.ts +15 -0
- package/dist/src/plugins/remark-footnote-back-link.d.ts.map +1 -0
- package/dist/src/plugins/remark-html-anchor-to-link.d.ts +8 -0
- package/dist/src/plugins/remark-html-anchor-to-link.d.ts.map +1 -0
- package/dist/src/plugins/remark-html-in-html.d.ts +10 -0
- package/dist/src/plugins/remark-html-in-html.d.ts.map +1 -0
- package/dist/src/plugins/remark-image-size.d.ts +18 -0
- package/dist/src/plugins/remark-image-size.d.ts.map +1 -0
- package/dist/src/plugins/remark-import-directive.async.d.ts +16 -0
- package/dist/src/plugins/remark-import-directive.async.d.ts.map +1 -0
- package/dist/src/plugins/remark-parent-node.d.ts +7 -0
- package/dist/src/plugins/remark-parent-node.d.ts.map +1 -0
- package/dist/src/plugins/remark-resolve-uri.async.d.ts +13 -0
- package/dist/src/plugins/remark-resolve-uri.async.d.ts.map +1 -0
- package/dist/src/plugins/remark-twitter-embed.d.ts +21 -0
- package/dist/src/plugins/remark-twitter-embed.d.ts.map +1 -0
- package/dist/src/plugins/remark-youtube-embed.d.ts +14 -0
- package/dist/src/plugins/remark-youtube-embed.d.ts.map +1 -0
- package/dist/src/plugins/remark-zenn-message.d.ts +43 -0
- package/dist/src/plugins/remark-zenn-message.d.ts.map +1 -0
- package/dist/src/plugins/transformUri.async.server.d.ts +13 -0
- package/dist/src/plugins/transformUri.async.server.d.ts.map +1 -0
- package/dist/src/remarkProcessor.server.d.ts +3 -0
- package/dist/src/remarkProcessor.server.d.ts.map +1 -0
- package/dist/src/test-setup.d.ts +1 -0
- package/dist/src/test-setup.d.ts.map +1 -0
- package/dist/src/utils/getFaviconUrl.d.ts +6 -0
- package/dist/src/utils/getFaviconUrl.d.ts.map +1 -0
- package/dist/stateDiagram-FKZM4ZOC-BQw1uDDs.js +264 -0
- package/dist/stateDiagram-FKZM4ZOC-BQw1uDDs.js.map +1 -0
- package/dist/stateDiagram-FKZM4ZOC-CRko_wcM.cjs +2 -0
- package/dist/stateDiagram-FKZM4ZOC-CRko_wcM.cjs.map +1 -0
- package/dist/stateDiagram-v2-4FDKWEC3-8B4m8DVq.cjs +2 -0
- package/dist/stateDiagram-v2-4FDKWEC3-8B4m8DVq.cjs.map +1 -0
- package/dist/stateDiagram-v2-4FDKWEC3-BLlp0Kuw.js +17 -0
- package/dist/stateDiagram-v2-4FDKWEC3-BLlp0Kuw.js.map +1 -0
- package/dist/timeline-definition-IT6M3QCI-BQZbrwM1.js +796 -0
- package/dist/timeline-definition-IT6M3QCI-BQZbrwM1.js.map +1 -0
- package/dist/timeline-definition-IT6M3QCI-C1bBEjWc.cjs +62 -0
- package/dist/timeline-definition-IT6M3QCI-C1bBEjWc.cjs.map +1 -0
- package/dist/treemap-KMMF4GRG-DnFZAuyg.js +6 -0
- package/dist/treemap-KMMF4GRG-DnFZAuyg.js.map +1 -0
- package/dist/treemap-KMMF4GRG-EW_av3X4.cjs +2 -0
- package/dist/treemap-KMMF4GRG-EW_av3X4.cjs.map +1 -0
- package/dist/vite.config.d.ts +3 -0
- package/dist/vite.config.d.ts.map +1 -0
- package/dist/xychartDiagram-PRI3JC2R-BC__kA61.cjs +8 -0
- package/dist/xychartDiagram-PRI3JC2R-BC__kA61.cjs.map +1 -0
- package/dist/xychartDiagram-PRI3JC2R-BQNe0MpQ.js +1341 -0
- package/dist/xychartDiagram-PRI3JC2R-BQNe0MpQ.js.map +1 -0
- package/package.json +129 -0
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
"use strict";var j0=Object.create;var ul=Object.defineProperty;var W0=Object.getOwnPropertyDescriptor;var H0=Object.getOwnPropertyNames;var Y0=Object.getPrototypeOf,U0=Object.prototype.hasOwnProperty;var G0=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of H0(t))!U0.call(e,n)&&n!==r&&ul(e,n,{get:()=>t[n],enumerable:!(i=W0(t,n))||i.enumerable});return e};var X0=(e,t,r)=>(r=e!=null?j0(Y0(e)):{},G0(t||!e||!e.__esModule?ul(r,"default",{value:e,enumerable:!0}):r,e));const J=require("react"),La=require("html-react-parser"),V0=require("shiki"),Ge=require("dompurify"),Z0=require("github-slugger"),Ic=require("katex"),K0=require("cheerio"),St=require("unist-util-visit"),zc=require("node:fs/promises"),ur=require("node:path"),Q0=require("url-join"),J0=require("remark"),ty=require("remark-breaks"),ey=require("remark-frontmatter"),ry=require("remark-gfm"),iy=require("remark-math");function qc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ni={exports:{}},Wr={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var dl;function ny(){if(dl)return Wr;dl=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(i,n,a){var o=null;if(a!==void 0&&(o=""+a),n.key!==void 0&&(o=""+n.key),"key"in n){a={};for(var s in n)s!=="key"&&(a[s]=n[s])}else a=n;return n=a.ref,{$$typeof:e,type:i,key:o,ref:n!==void 0?n:null,props:a}}return Wr.Fragment=t,Wr.jsx=r,Wr.jsxs=r,Wr}var Hr={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.development.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var fl;function ay(){return fl||(fl=1,process.env.NODE_ENV!=="production"&&(function(){function e(k){if(k==null)return null;if(typeof k=="function")return k.$$typeof===O?null:k.displayName||k.name||null;if(typeof k=="string")return k;switch(k){case y:return"Fragment";case b:return"Profiler";case x:return"StrictMode";case L:return"Suspense";case T:return"SuspenseList";case q:return"Activity"}if(typeof k=="object")switch(typeof k.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),k.$$typeof){case m:return"Portal";case C:return k.displayName||"Context";case w:return(k._context.displayName||"Context")+".Consumer";case v:var R=k.render;return k=k.displayName,k||(k=R.displayName||R.name||"",k=k!==""?"ForwardRef("+k+")":"ForwardRef"),k;case D:return R=k.displayName||null,R!==null?R:e(k.type)||"Memo";case z:R=k._payload,k=k._init;try{return e(k(R))}catch{}}return null}function t(k){return""+k}function r(k){try{t(k);var R=!1}catch{R=!0}if(R){R=console;var F=R.error,H=typeof Symbol=="function"&&Symbol.toStringTag&&k[Symbol.toStringTag]||k.constructor.name||"Object";return F.call(R,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",H),t(k)}}function i(k){if(k===y)return"<>";if(typeof k=="object"&&k!==null&&k.$$typeof===z)return"<...>";try{var R=e(k);return R?"<"+R+">":"<...>"}catch{return"<...>"}}function n(){var k=W.A;return k===null?null:k.getOwner()}function a(){return Error("react-stack-top-frame")}function o(k){if(j.call(k,"key")){var R=Object.getOwnPropertyDescriptor(k,"key").get;if(R&&R.isReactWarning)return!1}return k.key!==void 0}function s(k,R){function F(){B||(B=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",R))}F.isReactWarning=!0,Object.defineProperty(k,"key",{get:F,configurable:!0})}function l(){var k=e(this.type);return P[k]||(P[k]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),k=this.props.ref,k!==void 0?k:null}function c(k,R,F,H,U,ct){var st=F.ref;return k={$$typeof:g,type:k,key:R,props:F,_owner:H},(st!==void 0?st:null)!==null?Object.defineProperty(k,"ref",{enumerable:!1,get:l}):Object.defineProperty(k,"ref",{enumerable:!1,value:null}),k._store={},Object.defineProperty(k._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(k,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(k,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:U}),Object.defineProperty(k,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ct}),Object.freeze&&(Object.freeze(k.props),Object.freeze(k)),k}function h(k,R,F,H,U,ct){var st=R.children;if(st!==void 0)if(H)if($(st)){for(H=0;H<st.length;H++)u(st[H]);Object.freeze&&Object.freeze(st)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else u(st);if(j.call(R,"key")){st=e(k);var mt=Object.keys(R).filter(function(ft){return ft!=="key"});H=0<mt.length?"{key: someKey, "+mt.join(": ..., ")+": ...}":"{key: someKey}",I[st+H]||(mt=0<mt.length?"{"+mt.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
|
+
let props = %s;
|
|
19
|
+
<%s {...props} />
|
|
20
|
+
React keys must be passed directly to JSX without using spread:
|
|
21
|
+
let props = %s;
|
|
22
|
+
<%s key={someKey} {...props} />`,H,st,mt,st),I[st+H]=!0)}if(st=null,F!==void 0&&(r(F),st=""+F),o(R)&&(r(R.key),st=""+R.key),"key"in R){F={};for(var _t in R)_t!=="key"&&(F[_t]=R[_t])}else F=R;return st&&s(F,typeof k=="function"?k.displayName||k.name||"Unknown":k),c(k,st,F,n(),U,ct)}function u(k){d(k)?k._store&&(k._store.validated=1):typeof k=="object"&&k!==null&&k.$$typeof===z&&(k._payload.status==="fulfilled"?d(k._payload.value)&&k._payload.value._store&&(k._payload.value._store.validated=1):k._store&&(k._store.validated=1))}function d(k){return typeof k=="object"&&k!==null&&k.$$typeof===g}var f=J,g=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),w=Symbol.for("react.consumer"),C=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),q=Symbol.for("react.activity"),O=Symbol.for("react.client.reference"),W=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,j=Object.prototype.hasOwnProperty,$=Array.isArray,M=console.createTask?console.createTask:function(){return null};f={react_stack_bottom_frame:function(k){return k()}};var B,P={},E=f.react_stack_bottom_frame.bind(f,a)(),A=M(i(a)),I={};Hr.Fragment=y,Hr.jsx=function(k,R,F){var H=1e4>W.recentlyCreatedOwnerStacks++;return h(k,R,F,!1,H?Error("react-stack-top-frame"):E,H?M(i(k)):A)},Hr.jsxs=function(k,R,F){var H=1e4>W.recentlyCreatedOwnerStacks++;return h(k,R,F,!0,H?Error("react-stack-top-frame"):E,H?M(i(k)):A)}})()),Hr}var pl;function sy(){return pl||(pl=1,process.env.NODE_ENV==="production"?Ni.exports=ny():Ni.exports=ay()),Ni.exports}var S=sy();const jc=(e,t=64)=>`https://www.google.com/s2/favicons?domain=${encodeURIComponent(e)}&size=${t}`,Wc=({href:e,isExternal:t,metadata:r})=>{const i=J.useMemo(()=>Promise.resolve(r||null),[r]);return S.jsx(J.Suspense,{fallback:S.jsx(ly,{}),children:S.jsx(oy,{metadataPromise:i,href:e,isExternal:t})})},oy=({metadataPromise:e,href:t})=>{const r=J.use(e);if(r===null)return S.jsx(gl,{href:t});const i=new URL(t);return r===null?S.jsx(gl,{href:t}):S.jsxs("a",{className:"flex h-36 w-full gap-2 overflow-hidden rounded-lg border border-gray-300 bg-transparent transition-colors duration-200 hover:border-gray-600 hover:bg-gray-50 dark:border-neutral-600 dark:hover:border-neutral-200 dark:hover:bg-neutral-950",href:r.url||t,target:"_blank",rel:"noreferrer",children:[S.jsxs("div",{className:"flex flex-1 flex-col p-2 px-4",children:[S.jsx("div",{className:"break-words font-medium text-gray-900 dark:text-gray-100",children:r.title||r.site_name||t}),S.jsx("div",{className:"mt-2 flex-1",children:S.jsx("div",{className:"break-words text-gray-600 text-sm dark:text-gray-400",children:r.description})}),S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("img",{src:jc(t,16),alt:"",width:16,height:16}),S.jsx("span",{className:"line-clamp-1 text-gray-600 text-sm dark:text-gray-400",children:r.site_name||i.hostname})]})]}),S.jsx("div",{className:"h-36 max-w-[40%]",children:r.image?S.jsx("img",{className:"h-full w-full object-cover",src:r.image,alt:""}):S.jsx("div",{className:"h-full w-full bg-gray-200 object-cover dark:bg-neutral-800"})})]})},gl=({href:e})=>S.jsx("a",{className:"flex gap-2 rounded-lg border border-gray-200 bg-transparent p-4 text-gray-900 transition-colors duration-200 hover:border-gray-300 hover:bg-gray-100 dark:border-neutral-800 dark:text-gray-100 dark:hover:border-neutral-700",href:e,target:"_blank",rel:"noreferrer",children:S.jsx("div",{className:"text-gray-600 text-sm dark:text-gray-400",children:e})}),ly=()=>S.jsxs("div",{className:"flex h-36 w-full gap-2 overflow-hidden rounded-lg border border-gray-200 dark:border-neutral-800",children:[S.jsxs("div",{className:"flex flex-1 flex-col p-2 px-4",children:[S.jsxs("div",{className:"flex flex-col gap-2",children:[S.jsx("div",{className:"h-4 w-full animate-pulse rounded bg-gray-300 dark:bg-neutral-700"}),S.jsx("div",{className:"h-4 w-4/5 animate-pulse rounded bg-gray-300 dark:bg-neutral-700"})]}),S.jsxs("div",{className:"mt-6 flex flex-1 flex-col gap-2",children:[S.jsx("div",{className:"h-4 w-full animate-pulse rounded bg-gray-300 dark:bg-neutral-700"}),S.jsx("div",{className:"h-4 w-4/5 animate-pulse rounded bg-gray-300 dark:bg-neutral-700"})]}),S.jsx("div",{className:"mt-auto h-4 w-4 animate-pulse rounded-sm bg-gray-300 dark:bg-neutral-700"})]}),S.jsx("div",{className:"h-full w-64 max-w-[40%] animate-pulse bg-gray-300 dark:bg-neutral-700"})]}),Hc=({node:e})=>{const r=e.data?.siteMetadata;return S.jsx("div",{className:"mt-6 mb-6",children:S.jsx(Wc,{href:e.url,isExternal:!0,metadata:r})})},Yc=({node:e})=>S.jsx("blockquote",{className:"my-4 border-gray-300 border-l-4 bg-gray-50 p-4 italic dark:border-gray-500 dark:bg-gray-800 dark:text-gray-300",children:S.jsx(Lt,{nodes:e.children})});var kt=function(){return kt=Object.assign||function(t){for(var r,i=1,n=arguments.length;i<n;i++){r=arguments[i];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},kt.apply(this,arguments)};typeof window<"u"&&(window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),typeof window.CustomEvent!="function"&&(window.CustomEvent=function(t,r){r=r||{bubbles:!1,cancelable:!1,detail:null};var i=document.createEvent("CustomEvent");return i.initCustomEvent(t,r.bubbles,r.cancelable,r.detail),i}));var cy=typeof document<"u"&&!!document.documentMode,Ma;function hy(){return Ma||(Ma=document.createElement("div").style)}var ml=["webkit","moz","ms"],Ii={};function eo(e){if(Ii[e])return Ii[e];var t=hy();if(e in t)return Ii[e]=e;for(var r=e[0].toUpperCase()+e.slice(1),i=ml.length;i--;){var n="".concat(ml[i]).concat(r);if(n in t)return Ii[e]=n}}function zi(e,t){return parseFloat(t[eo(e)])||0}function qi(e,t,r){r===void 0&&(r=window.getComputedStyle(e));var i=t==="border"?"Width":"";return{left:zi("".concat(t,"Left").concat(i),r),right:zi("".concat(t,"Right").concat(i),r),top:zi("".concat(t,"Top").concat(i),r),bottom:zi("".concat(t,"Bottom").concat(i),r)}}function dr(e,t,r){e.style[eo(t)]=r}function uy(e,t){var r=eo("transform");dr(e,"transition","".concat(r," ").concat(t.duration,"ms ").concat(t.easing))}function dy(e,t,r){var i=t.x,n=t.y,a=t.scale,o=t.isSVG;if(dr(e,"transform","scale(".concat(a,") translate(").concat(i,"px, ").concat(n,"px)")),o&&cy){var s=window.getComputedStyle(e).getPropertyValue("transform");e.setAttribute("transform",s)}}function Aa(e){var t=e.parentNode,r=window.getComputedStyle(e),i=window.getComputedStyle(t),n=e.getBoundingClientRect(),a=t.getBoundingClientRect();return{elem:{style:r,width:n.width,height:n.height,top:n.top,bottom:n.bottom,left:n.left,right:n.right,margin:qi(e,"margin",r),border:qi(e,"border",r)},parent:{style:i,width:a.width,height:a.height,top:a.top,bottom:a.bottom,left:a.left,right:a.right,padding:qi(t,"padding",i),border:qi(t,"border",i)}}}var pi={down:"mousedown",move:"mousemove",up:"mouseup mouseleave"};typeof window<"u"&&(typeof window.PointerEvent=="function"?pi={down:"pointerdown",move:"pointermove",up:"pointerup pointerleave pointercancel"}:typeof window.TouchEvent=="function"&&(pi={down:"touchstart",move:"touchmove",up:"touchend touchcancel"}));function Ea(e,t,r,i){pi[e].split(" ").forEach(function(n){t.addEventListener(n,r,i)})}function Fa(e,t,r){pi[e].split(" ").forEach(function(i){t.removeEventListener(i,r)})}function Uc(e,t){for(var r=e.length;r--;)if(e[r].pointerId===t.pointerId)return r;return-1}function Za(e,t){var r;if(t.touches){r=0;for(var i=0,n=t.touches;i<n.length;i++){var a=n[i];a.pointerId=r++,Za(e,a)}return}r=Uc(e,t),r>-1&&e.splice(r,1),e.push(t)}function fy(e,t){if(t.touches){for(;e.length;)e.pop();return}var r=Uc(e,t);r>-1&&e.splice(r,1)}function yl(e){e=e.slice(0);for(var t=e.pop(),r;r=e.pop();)t={clientX:(r.clientX-t.clientX)/2+t.clientX,clientY:(r.clientY-t.clientY)/2+t.clientY};return t}function Pa(e){if(e.length<2)return 0;var t=e[0],r=e[1];return Math.sqrt(Math.pow(Math.abs(r.clientX-t.clientX),2)+Math.pow(Math.abs(r.clientY-t.clientY),2))}function py(e){for(var t=e;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1}function gy(e){return(e.getAttribute("class")||"").trim()}function my(e,t){return e.nodeType===1&&" ".concat(gy(e)," ").indexOf(" ".concat(t," "))>-1}function yy(e,t){for(var r=e;r!=null;r=r.parentNode)if(my(r,t.excludeClass)||t.exclude.indexOf(r)>-1)return!0;return!1}var xy=/^http:[\w\.\/]+svg$/;function by(e){return xy.test(e.namespaceURI)&&e.nodeName.toLowerCase()!=="svg"}function wy(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}var Gc={animate:!1,canvas:!1,cursor:"move",disablePan:!1,disableZoom:!1,disableXAxis:!1,disableYAxis:!1,duration:200,easing:"ease-in-out",exclude:[],excludeClass:"panzoom-exclude",handleStartEvent:function(e){e.preventDefault(),e.stopPropagation()},maxScale:4,minScale:.125,overflow:"hidden",panOnlyWhenZoomed:!1,pinchAndPan:!1,relative:!1,setTransform:dy,startX:0,startY:0,startScale:1,step:.3,touchAction:"none"};function Xc(e,t){if(!e)throw new Error("Panzoom requires an element as an argument");if(e.nodeType!==1)throw new Error("Panzoom requires an element with a nodeType of 1");if(!py(e))throw new Error("Panzoom should be called on elements that have been attached to the DOM");t=kt(kt({},Gc),t);var r=by(e),i=e.parentNode;i.style.overflow=t.overflow,i.style.userSelect="none",i.style.touchAction=t.touchAction,(t.canvas?i:e).style.cursor=t.cursor,e.style.userSelect="none",e.style.touchAction=t.touchAction,dr(e,"transformOrigin",typeof t.origin=="string"?t.origin:r?"0 0":"50% 50%");function n(){i.style.overflow="",i.style.userSelect="",i.style.touchAction="",i.style.cursor="",e.style.cursor="",e.style.userSelect="",e.style.touchAction="",dr(e,"transformOrigin","")}function a(A){A===void 0&&(A={});for(var I in A)A.hasOwnProperty(I)&&(t[I]=A[I]);(A.hasOwnProperty("cursor")||A.hasOwnProperty("canvas"))&&(i.style.cursor=e.style.cursor="",(t.canvas?i:e).style.cursor=t.cursor),A.hasOwnProperty("overflow")&&(i.style.overflow=A.overflow),A.hasOwnProperty("touchAction")&&(i.style.touchAction=A.touchAction,e.style.touchAction=A.touchAction)}var o=0,s=0,l=1,c=!1;m(t.startScale,{animate:!1,force:!0}),setTimeout(function(){g(t.startX,t.startY,{animate:!1,force:!0})});function h(A,I,k){if(!k.silent){var R=new CustomEvent(A,{detail:I});e.dispatchEvent(R)}}function u(A,I,k){var R={x:o,y:s,scale:l,isSVG:r,originalEvent:k};return requestAnimationFrame(function(){typeof I.animate=="boolean"&&(I.animate?uy(e,I):dr(e,"transition","none")),I.setTransform(e,R,I),h(A,R,I),h("panzoomchange",R,I)}),R}function d(A,I,k,R){var F=kt(kt({},t),R),H={x:o,y:s,opts:F};if(!F.force&&(F.disablePan||F.panOnlyWhenZoomed&&l===F.startScale))return H;if(A=parseFloat(A),I=parseFloat(I),F.disableXAxis||(H.x=(F.relative?o:0)+A),F.disableYAxis||(H.y=(F.relative?s:0)+I),F.contain){var U=Aa(e),ct=U.elem.width/l,st=U.elem.height/l,mt=ct*k,_t=st*k,ft=(mt-ct)/2,Mt=(_t-st)/2;if(F.contain==="inside"){var ue=(-U.elem.margin.left-U.parent.padding.left+ft)/k,_e=(U.parent.width-mt-U.parent.padding.left-U.elem.margin.left-U.parent.border.left-U.parent.border.right+ft)/k;H.x=Math.max(Math.min(H.x,_e),ue);var Ba=(-U.elem.margin.top-U.parent.padding.top+Mt)/k,$a=(U.parent.height-_t-U.parent.padding.top-U.elem.margin.top-U.parent.border.top-U.parent.border.bottom+Mt)/k;H.y=Math.max(Math.min(H.y,$a),Ba)}else if(F.contain==="outside"){var ue=(-(mt-U.parent.width)-U.parent.padding.left-U.parent.border.left-U.parent.border.right+ft)/k,_e=(ft-U.parent.padding.left)/k;H.x=Math.max(Math.min(H.x,_e),ue);var Ba=(-(_t-U.parent.height)-U.parent.padding.top-U.parent.border.top-U.parent.border.bottom+Mt)/k,$a=(Mt-U.parent.padding.top)/k;H.y=Math.max(Math.min(H.y,$a),Ba)}}return F.roundPixels&&(H.x=Math.round(H.x),H.y=Math.round(H.y)),H}function f(A,I){var k=kt(kt({},t),I),R={scale:l,opts:k};if(!k.force&&k.disableZoom)return R;var F=t.minScale,H=t.maxScale;if(k.contain){var U=Aa(e),ct=U.elem.width/l,st=U.elem.height/l;if(ct>1&&st>1){var mt=U.parent.width-U.parent.border.left-U.parent.border.right,_t=U.parent.height-U.parent.border.top-U.parent.border.bottom,ft=mt/ct,Mt=_t/st;t.contain==="inside"?H=Math.min(H,ft,Mt):t.contain==="outside"&&(F=Math.max(F,ft,Mt))}}return R.scale=Math.min(Math.max(A,F),H),R}function g(A,I,k,R){var F=d(A,I,l,k);return o!==F.x||s!==F.y?(o=F.x,s=F.y,u("panzoompan",F.opts,R)):{x:o,y:s,scale:l,isSVG:r,originalEvent:R}}function m(A,I,k){var R=f(A,I),F=R.opts;if(!(!F.force&&F.disableZoom)){A=R.scale;var H=o,U=s;if(F.focal){var ct=F.focal;H=(ct.x/A-ct.x/l+o*A)/A,U=(ct.y/A-ct.y/l+s*A)/A}var st=d(H,U,A,{relative:!1,force:!0});return o=st.x,s=st.y,l=A,u("panzoomzoom",F,k)}}function y(A,I){var k=kt(kt(kt({},t),{animate:!0}),I);return m(l*Math.exp((A?1:-1)*k.step),k)}function x(A){return y(!0,A)}function b(A){return y(!1,A)}function w(A,I,k,R){var F=Aa(e),H={width:F.parent.width-F.parent.padding.left-F.parent.padding.right-F.parent.border.left-F.parent.border.right,height:F.parent.height-F.parent.padding.top-F.parent.padding.bottom-F.parent.border.top-F.parent.border.bottom},U=I.clientX-F.parent.left-F.parent.padding.left-F.parent.border.left-F.elem.margin.left,ct=I.clientY-F.parent.top-F.parent.padding.top-F.parent.border.top-F.elem.margin.top;r||(U-=F.elem.width/l/2,ct-=F.elem.height/l/2);var st={x:U/H.width*(H.width*A),y:ct/H.height*(H.height*A)};return m(A,kt(kt({},k),{animate:!1,focal:st}),R)}function C(A,I){A.preventDefault();var k=kt(kt(kt({},t),I),{animate:!1}),R=A.deltaY===0&&A.deltaX?A.deltaX:A.deltaY,F=R<0?1:-1,H=f(l*Math.exp(F*k.step/3),k).scale;return w(H,A,k,A)}function v(A){var I=kt(kt(kt({},t),{animate:!0,force:!0}),A);l=f(I.startScale,I).scale;var k=d(I.startX,I.startY,l,I);return o=k.x,s=k.y,u("panzoomreset",I)}var L,T,D,z,q,O,W=[];function j(A){if(!yy(A.target,t)){Za(W,A),c=!0,t.handleStartEvent(A),L=o,T=s,h("panzoomstart",{x:o,y:s,scale:l,isSVG:r,originalEvent:A},t);var I=yl(W);D=I.clientX,z=I.clientY,q=l,O=Pa(W)}}function $(A){if(!(!c||L===void 0||T===void 0||D===void 0||z===void 0)){Za(W,A);var I=yl(W),k=W.length>1,R=l;if(k){O===0&&(O=Pa(W));var F=Pa(W)-O;R=f(F*t.step/80+q).scale,w(R,I,{animate:!1},A)}(!k||t.pinchAndPan)&&g(L+(I.clientX-D)/R,T+(I.clientY-z)/R,{animate:!1},A)}}function M(A){W.length===1&&h("panzoomend",{x:o,y:s,scale:l,isSVG:r,originalEvent:A},t),fy(W,A),c&&(c=!1,L=T=D=z=void 0)}var B=!1;function P(){B||(B=!0,Ea("down",t.canvas?i:e,j),Ea("move",document,$,{passive:!0}),Ea("up",document,M,{passive:!0}))}function E(){B=!1,Fa("down",t.canvas?i:e,j),Fa("move",document,$),Fa("up",document,M)}return t.noBind||P(),{bind:P,destroy:E,eventNames:pi,getPan:function(){return{x:o,y:s}},getScale:function(){return l},getOptions:function(){return wy(t)},handleDown:j,handleMove:$,handleUp:M,pan:g,reset:v,resetStyle:n,setOptions:a,setStyle:function(A,I){return dr(e,A,I)},zoom:m,zoomIn:x,zoomOut:b,zoomToPoint:w,zoomWithWheel:C}}Xc.defaultOptions=Gc;/**
|
|
23
|
+
* @license lucide-react v0.473.0 - ISC
|
|
24
|
+
*
|
|
25
|
+
* This source code is licensed under the ISC license.
|
|
26
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
27
|
+
*/const vy=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Vc=(...e)=>e.filter((t,r,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===r).join(" ").trim();/**
|
|
28
|
+
* @license lucide-react v0.473.0 - ISC
|
|
29
|
+
*
|
|
30
|
+
* This source code is licensed under the ISC license.
|
|
31
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
32
|
+
*/var ky={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
33
|
+
* @license lucide-react v0.473.0 - ISC
|
|
34
|
+
*
|
|
35
|
+
* This source code is licensed under the ISC license.
|
|
36
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
37
|
+
*/const Cy=J.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:i,className:n="",children:a,iconNode:o,...s},l)=>J.createElement("svg",{ref:l,...ky,width:t,height:t,stroke:e,strokeWidth:i?Number(r)*24/Number(t):r,className:Vc("lucide",n),...s},[...o.map(([c,h])=>J.createElement(c,h)),...Array.isArray(a)?a:[a]]));/**
|
|
38
|
+
* @license lucide-react v0.473.0 - ISC
|
|
39
|
+
*
|
|
40
|
+
* This source code is licensed under the ISC license.
|
|
41
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
42
|
+
*/const ro=(e,t)=>{const r=J.forwardRef(({className:i,...n},a)=>J.createElement(Cy,{ref:a,iconNode:t,className:Vc(`lucide-${vy(e)}`,i),...n}));return r.displayName=`${e}`,r};/**
|
|
43
|
+
* @license lucide-react v0.473.0 - ISC
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the ISC license.
|
|
46
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
47
|
+
*/const _y=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Sy=ro("RefreshCw",_y);/**
|
|
48
|
+
* @license lucide-react v0.473.0 - ISC
|
|
49
|
+
*
|
|
50
|
+
* This source code is licensed under the ISC license.
|
|
51
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
52
|
+
*/const Ty=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],By=ro("ZoomIn",Ty);/**
|
|
53
|
+
* @license lucide-react v0.473.0 - ISC
|
|
54
|
+
*
|
|
55
|
+
* This source code is licensed under the ISC license.
|
|
56
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
57
|
+
*/const $y=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],Ly=ro("ZoomOut",$y);var Ka={name:"mermaid",version:"11.12.1",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.1.1","@iconify/utils":"^3.0.1","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.13",dayjs:"^1.11.18",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^16.2.1",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.5","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",canvas:"^3.1.2",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.1.0",jison:"^0.4.18","js-base64":"^3.7.8",jsdom:"^26.1.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.3",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.13","type-fest":"^4.35.0",typedoc:"^0.28.12","typedoc-plugin-markdown":"^4.8.1",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.6.4","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}},Ji={exports:{}},My=Ji.exports,xl;function Ay(){return xl||(xl=1,(function(e,t){(function(r,i){e.exports=i()})(My,(function(){var r=1e3,i=6e4,n=36e5,a="millisecond",o="second",s="minute",l="hour",c="day",h="week",u="month",d="quarter",f="year",g="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function($){var M=["th","st","nd","rd"],B=$%100;return"["+$+(M[(B-20)%10]||M[B]||M[0])+"]"}},w=function($,M,B){var P=String($);return!P||P.length>=M?$:""+Array(M+1-P.length).join(B)+$},C={s:w,z:function($){var M=-$.utcOffset(),B=Math.abs(M),P=Math.floor(B/60),E=B%60;return(M<=0?"+":"-")+w(P,2,"0")+":"+w(E,2,"0")},m:function $(M,B){if(M.date()<B.date())return-$(B,M);var P=12*(B.year()-M.year())+(B.month()-M.month()),E=M.clone().add(P,u),A=B-E<0,I=M.clone().add(P+(A?-1:1),u);return+(-(P+(B-E)/(A?E-I:I-E))||0)},a:function($){return $<0?Math.ceil($)||0:Math.floor($)},p:function($){return{M:u,y:f,w:h,d:c,D:g,h:l,m:s,s:o,ms:a,Q:d}[$]||String($||"").toLowerCase().replace(/s$/,"")},u:function($){return $===void 0}},v="en",L={};L[v]=b;var T="$isDayjsObject",D=function($){return $ instanceof W||!(!$||!$[T])},z=function $(M,B,P){var E;if(!M)return v;if(typeof M=="string"){var A=M.toLowerCase();L[A]&&(E=A),B&&(L[A]=B,E=A);var I=M.split("-");if(!E&&I.length>1)return $(I[0])}else{var k=M.name;L[k]=M,E=k}return!P&&E&&(v=E),E||!P&&v},q=function($,M){if(D($))return $.clone();var B=typeof M=="object"?M:{};return B.date=$,B.args=arguments,new W(B)},O=C;O.l=z,O.i=D,O.w=function($,M){return q($,{locale:M.$L,utc:M.$u,x:M.$x,$offset:M.$offset})};var W=(function(){function $(B){this.$L=z(B.locale,null,!0),this.parse(B),this.$x=this.$x||B.x||{},this[T]=!0}var M=$.prototype;return M.parse=function(B){this.$d=(function(P){var E=P.date,A=P.utc;if(E===null)return new Date(NaN);if(O.u(E))return new Date;if(E instanceof Date)return new Date(E);if(typeof E=="string"&&!/Z$/i.test(E)){var I=E.match(y);if(I){var k=I[2]-1||0,R=(I[7]||"0").substring(0,3);return A?new Date(Date.UTC(I[1],k,I[3]||1,I[4]||0,I[5]||0,I[6]||0,R)):new Date(I[1],k,I[3]||1,I[4]||0,I[5]||0,I[6]||0,R)}}return new Date(E)})(B),this.init()},M.init=function(){var B=this.$d;this.$y=B.getFullYear(),this.$M=B.getMonth(),this.$D=B.getDate(),this.$W=B.getDay(),this.$H=B.getHours(),this.$m=B.getMinutes(),this.$s=B.getSeconds(),this.$ms=B.getMilliseconds()},M.$utils=function(){return O},M.isValid=function(){return this.$d.toString()!==m},M.isSame=function(B,P){var E=q(B);return this.startOf(P)<=E&&E<=this.endOf(P)},M.isAfter=function(B,P){return q(B)<this.startOf(P)},M.isBefore=function(B,P){return this.endOf(P)<q(B)},M.$g=function(B,P,E){return O.u(B)?this[P]:this.set(E,B)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(B,P){var E=this,A=!!O.u(P)||P,I=O.p(B),k=function(_t,ft){var Mt=O.w(E.$u?Date.UTC(E.$y,ft,_t):new Date(E.$y,ft,_t),E);return A?Mt:Mt.endOf(c)},R=function(_t,ft){return O.w(E.toDate()[_t].apply(E.toDate("s"),(A?[0,0,0,0]:[23,59,59,999]).slice(ft)),E)},F=this.$W,H=this.$M,U=this.$D,ct="set"+(this.$u?"UTC":"");switch(I){case f:return A?k(1,0):k(31,11);case u:return A?k(1,H):k(0,H+1);case h:var st=this.$locale().weekStart||0,mt=(F<st?F+7:F)-st;return k(A?U-mt:U+(6-mt),H);case c:case g:return R(ct+"Hours",0);case l:return R(ct+"Minutes",1);case s:return R(ct+"Seconds",2);case o:return R(ct+"Milliseconds",3);default:return this.clone()}},M.endOf=function(B){return this.startOf(B,!1)},M.$set=function(B,P){var E,A=O.p(B),I="set"+(this.$u?"UTC":""),k=(E={},E[c]=I+"Date",E[g]=I+"Date",E[u]=I+"Month",E[f]=I+"FullYear",E[l]=I+"Hours",E[s]=I+"Minutes",E[o]=I+"Seconds",E[a]=I+"Milliseconds",E)[A],R=A===c?this.$D+(P-this.$W):P;if(A===u||A===f){var F=this.clone().set(g,1);F.$d[k](R),F.init(),this.$d=F.set(g,Math.min(this.$D,F.daysInMonth())).$d}else k&&this.$d[k](R);return this.init(),this},M.set=function(B,P){return this.clone().$set(B,P)},M.get=function(B){return this[O.p(B)]()},M.add=function(B,P){var E,A=this;B=Number(B);var I=O.p(P),k=function(H){var U=q(A);return O.w(U.date(U.date()+Math.round(H*B)),A)};if(I===u)return this.set(u,this.$M+B);if(I===f)return this.set(f,this.$y+B);if(I===c)return k(1);if(I===h)return k(7);var R=(E={},E[s]=i,E[l]=n,E[o]=r,E)[I]||1,F=this.$d.getTime()+B*R;return O.w(F,this)},M.subtract=function(B,P){return this.add(-1*B,P)},M.format=function(B){var P=this,E=this.$locale();if(!this.isValid())return E.invalidDate||m;var A=B||"YYYY-MM-DDTHH:mm:ssZ",I=O.z(this),k=this.$H,R=this.$m,F=this.$M,H=E.weekdays,U=E.months,ct=E.meridiem,st=function(ft,Mt,ue,_e){return ft&&(ft[Mt]||ft(P,A))||ue[Mt].slice(0,_e)},mt=function(ft){return O.s(k%12||12,ft,"0")},_t=ct||function(ft,Mt,ue){var _e=ft<12?"AM":"PM";return ue?_e.toLowerCase():_e};return A.replace(x,(function(ft,Mt){return Mt||(function(ue){switch(ue){case"YY":return String(P.$y).slice(-2);case"YYYY":return O.s(P.$y,4,"0");case"M":return F+1;case"MM":return O.s(F+1,2,"0");case"MMM":return st(E.monthsShort,F,U,3);case"MMMM":return st(U,F);case"D":return P.$D;case"DD":return O.s(P.$D,2,"0");case"d":return String(P.$W);case"dd":return st(E.weekdaysMin,P.$W,H,2);case"ddd":return st(E.weekdaysShort,P.$W,H,3);case"dddd":return H[P.$W];case"H":return String(k);case"HH":return O.s(k,2,"0");case"h":return mt(1);case"hh":return mt(2);case"a":return _t(k,R,!0);case"A":return _t(k,R,!1);case"m":return String(R);case"mm":return O.s(R,2,"0");case"s":return String(P.$s);case"ss":return O.s(P.$s,2,"0");case"SSS":return O.s(P.$ms,3,"0");case"Z":return I}return null})(ft)||I.replace(":","")}))},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(B,P,E){var A,I=this,k=O.p(P),R=q(B),F=(R.utcOffset()-this.utcOffset())*i,H=this-R,U=function(){return O.m(I,R)};switch(k){case f:A=U()/12;break;case u:A=U();break;case d:A=U()/3;break;case h:A=(H-F)/6048e5;break;case c:A=(H-F)/864e5;break;case l:A=H/n;break;case s:A=H/i;break;case o:A=H/r;break;default:A=H}return E?A:O.a(A)},M.daysInMonth=function(){return this.endOf(u).$D},M.$locale=function(){return L[this.$L]},M.locale=function(B,P){if(!B)return this.$L;var E=this.clone(),A=z(B,P,!0);return A&&(E.$L=A),E},M.clone=function(){return O.w(this.$d,this)},M.toDate=function(){return new Date(this.valueOf())},M.toJSON=function(){return this.isValid()?this.toISOString():null},M.toISOString=function(){return this.$d.toISOString()},M.toString=function(){return this.$d.toUTCString()},$})(),j=W.prototype;return q.prototype=j,[["$ms",a],["$s",o],["$m",s],["$H",l],["$W",c],["$M",u],["$y",f],["$D",g]].forEach((function($){j[$[1]]=function(M){return this.$g(M,$[0],$[1])}})),q.extend=function($,M){return $.$i||($(M,W,q),$.$i=!0),q},q.locale=z,q.isDayjs=D,q.unix=function($){return q(1e3*$)},q.en=L[v],q.Ls=L,q.p={},q}))})(Ji)),Ji.exports}var Ey=Ay();const Zc=qc(Ey);var Kc=Object.defineProperty,p=(e,t)=>Kc(e,"name",{value:t,configurable:!0}),Qc=(e,t)=>{for(var r in t)Kc(e,r,{get:t[r],enumerable:!0})},de={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},N={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},io=p(function(e="fatal"){let t=de.fatal;typeof e=="string"?e.toLowerCase()in de&&(t=de[e]):typeof e=="number"&&(t=e),N.trace=()=>{},N.debug=()=>{},N.info=()=>{},N.warn=()=>{},N.error=()=>{},N.fatal=()=>{},t<=de.fatal&&(N.fatal=console.error?console.error.bind(console,Ut("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Ut("FATAL"))),t<=de.error&&(N.error=console.error?console.error.bind(console,Ut("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Ut("ERROR"))),t<=de.warn&&(N.warn=console.warn?console.warn.bind(console,Ut("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Ut("WARN"))),t<=de.info&&(N.info=console.info?console.info.bind(console,Ut("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Ut("INFO"))),t<=de.debug&&(N.debug=console.debug?console.debug.bind(console,Ut("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Ut("DEBUG"))),t<=de.trace&&(N.trace=console.debug?console.debug.bind(console,Ut("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Ut("TRACE")))},"setLogLevel"),Ut=p(e=>`%c${Zc().format("ss.SSS")} : ${e} : `,"format");const tn={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const n=r<.5?r*(1+t):r+t-r*t,a=2*r-n;switch(i){case"r":return tn.hue2rgb(a,n,e+1/3)*255;case"g":return tn.hue2rgb(a,n,e)*255;case"b":return tn.hue2rgb(a,n,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const n=Math.max(e,t,r),a=Math.min(e,t,r),o=(n+a)/2;if(i==="l")return o*100;if(n===a)return 0;const s=n-a,l=o>.5?s/(2-n-a):s/(n+a);if(i==="s")return l*100;switch(n){case e:return((t-r)/s+(t<r?6:0))*60;case t:return((r-e)/s+2)*60;case r:return((e-t)/s+4)*60;default:return-1}}},Fy={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},Py={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},at={channel:tn,lang:Fy,unit:Py},Se={};for(let e=0;e<=255;e++)Se[e]=at.unit.dec2hex(e);const At={ALL:0,RGB:1,HSL:2};class Ry{constructor(){this.type=At.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=At.ALL}is(t){return this.type===t}}class Oy{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Ry}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=At.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:n}=t;r===void 0&&(t.h=at.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=at.channel.rgb2hsl(t,"s")),n===void 0&&(t.l=at.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:n}=t;r===void 0&&(t.r=at.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=at.channel.hsl2rgb(t,"g")),n===void 0&&(t.b=at.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(At.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(At.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(At.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(At.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(At.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(At.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(At.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(At.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(At.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(At.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(At.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(At.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Xn=new Oy({r:0,g:0,b:0,a:0},"transparent"),pr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(pr.re);if(!t)return;const r=t[1],i=parseInt(r,16),n=r.length,a=n%4===0,o=n>4,s=o?1:17,l=o?8:4,c=a?0:-1,h=o?255:15;return Xn.set({r:(i>>l*(c+3)&h)*s,g:(i>>l*(c+2)&h)*s,b:(i>>l*(c+1)&h)*s,a:a?(i&h)*s/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`#${Se[Math.round(t)]}${Se[Math.round(r)]}${Se[Math.round(i)]}${Se[Math.round(n*255)]}`:`#${Se[Math.round(t)]}${Se[Math.round(r)]}${Se[Math.round(i)]}`}},ze={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(ze.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return at.channel.clamp.h(parseFloat(r)*.9);case"rad":return at.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return at.channel.clamp.h(parseFloat(r)*360)}}return at.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(ze.re);if(!r)return;const[,i,n,a,o,s]=r;return Xn.set({h:ze._hue2deg(i),s:at.channel.clamp.s(parseFloat(n)),l:at.channel.clamp.l(parseFloat(a)),a:o?at.channel.clamp.a(s?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:n}=e;return n<1?`hsla(${at.lang.round(t)}, ${at.lang.round(r)}%, ${at.lang.round(i)}%, ${n})`:`hsl(${at.lang.round(t)}, ${at.lang.round(r)}%, ${at.lang.round(i)}%)`}},li={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=li.colors[e];if(t)return pr.parse(t)},stringify:e=>{const t=pr.stringify(e);for(const r in li.colors)if(li.colors[r]===t)return r}},Jr={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(Jr.re);if(!r)return;const[,i,n,a,o,s,l,c,h]=r;return Xn.set({r:at.channel.clamp.r(n?parseFloat(i)*2.55:parseFloat(i)),g:at.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:at.channel.clamp.b(l?parseFloat(s)*2.55:parseFloat(s)),a:c?at.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`rgba(${at.lang.round(t)}, ${at.lang.round(r)}, ${at.lang.round(i)}, ${at.lang.round(n)})`:`rgb(${at.lang.round(t)}, ${at.lang.round(r)}, ${at.lang.round(i)})`}},te={format:{keyword:li,hex:pr,rgb:Jr,rgba:Jr,hsl:ze,hsla:ze},parse:e=>{if(typeof e!="string")return e;const t=pr.parse(e)||Jr.parse(e)||ze.parse(e)||li.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(At.HSL)||e.data.r===void 0?ze.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Jr.stringify(e):pr.stringify(e)},Jc=(e,t)=>{const r=te.parse(e);for(const i in t)r[i]=at.channel.clamp[i](t[i]);return te.stringify(r)},gr=(e,t,r=0,i=1)=>{if(typeof e!="number")return Jc(e,{a:t});const n=Xn.set({r:at.channel.clamp.r(e),g:at.channel.clamp.g(t),b:at.channel.clamp.b(r),a:at.channel.clamp.a(i)});return te.stringify(n)},Dy=e=>{const{r:t,g:r,b:i}=te.parse(e),n=.2126*at.channel.toLinear(t)+.7152*at.channel.toLinear(r)+.0722*at.channel.toLinear(i);return at.lang.round(n)},Ny=e=>Dy(e)>=.5,Pr=e=>!Ny(e),th=(e,t,r)=>{const i=te.parse(e),n=i[t],a=at.channel.clamp[t](n+r);return n!==a&&(i[t]=a),te.stringify(i)},X=(e,t)=>th(e,"l",t),et=(e,t)=>th(e,"l",-t),_=(e,t)=>{const r=te.parse(e),i={};for(const n in t)t[n]&&(i[n]=r[n]+t[n]);return Jc(e,i)},Iy=(e,t,r=50)=>{const{r:i,g:n,b:a,a:o}=te.parse(e),{r:s,g:l,b:c,a:h}=te.parse(t),u=r/100,d=u*2-1,f=o-h,m=((d*f===-1?d:(d+f)/(1+d*f))+1)/2,y=1-m,x=i*m+s*y,b=n*m+l*y,w=a*m+c*y,C=o*u+h*(1-u);return gr(x,b,w,C)},Y=(e,t=100)=>{const r=te.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Iy(r,e,t)};var eh=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,ci=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,zy=/\s*%%.*\n/gm,xr,rh=(xr=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},p(xr,"UnknownDiagramError"),xr),Xe={},no=p(function(e,t){e=e.replace(eh,"").replace(ci,"").replace(zy,`
|
|
58
|
+
`);for(const[r,{detector:i}]of Object.entries(Xe))if(i(e,t))return r;throw new rh(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Qa=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)ih(t,r,i)},"registerLazyLoadedDiagrams"),ih=p((e,t,r)=>{Xe[e]&&N.warn(`Detector with key ${e} already exists. Overwriting.`),Xe[e]={detector:t,loader:r},N.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),qy=p(e=>Xe[e].loader,"getDiagramLoader"),Ja=p((e,t,{depth:r=2,clobber:i=!1}={})=>{const n={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(a=>Ja(e,a,n)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(a=>{e.includes(a)||e.push(a)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(a=>{typeof t[a]=="object"&&(e[a]===void 0||typeof e[a]=="object")?(e[a]===void 0&&(e[a]=Array.isArray(t[a])?[]:{}),e[a]=Ja(e[a],t[a],{depth:r-1,clobber:i})):(i||typeof e[a]!="object"&&typeof t[a]!="object")&&(e[a]=t[a])}),e)},"assignWithDepth"),bt=Ja,Vn="#ffffff",Zn="#f2f2f2",Ot=p((e,t)=>t?_(e,{s:-40,l:10}):_(e,{s:-40,l:-10}),"mkBorder"),br,jy=(br=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||_(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||_(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Y(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Y(this.tertiaryColor),this.lineColor=this.lineColor||Y(this.background),this.arrowheadColor=this.arrowheadColor||Y(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?et(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||et(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Y(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||X(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||et(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||et(this.mainBkg,10)):(this.rowOdd=this.rowOdd||X(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||X(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||_(this.primaryColor,{h:30}),this.cScale4=this.cScale4||_(this.primaryColor,{h:60}),this.cScale5=this.cScale5||_(this.primaryColor,{h:90}),this.cScale6=this.cScale6||_(this.primaryColor,{h:120}),this.cScale7=this.cScale7||_(this.primaryColor,{h:150}),this.cScale8=this.cScale8||_(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||_(this.primaryColor,{h:270}),this.cScale10=this.cScale10||_(this.primaryColor,{h:300}),this.cScale11=this.cScale11||_(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=et(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=et(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||Y(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||X(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||et(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||_(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||_(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||_(this.primaryColor,{h:64}),this.fillType3=this.fillType3||_(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||_(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||_(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||_(this.primaryColor,{h:128}),this.fillType7=this.fillType7||_(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||_(this.primaryColor,{l:-10}),this.pie5=this.pie5||_(this.secondaryColor,{l:-10}),this.pie6=this.pie6||_(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||_(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||_(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||_(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||_(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||_(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||_(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||_(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||_(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||_(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||_(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||_(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||_(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Pr(this.quadrant1Fill)?X(this.quadrant1Fill):et(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?et(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||_(this.primaryColor,{h:-30}),this.git4=this.git4||_(this.primaryColor,{h:-60}),this.git5=this.git5||_(this.primaryColor,{h:-90}),this.git6=this.git6||_(this.primaryColor,{h:60}),this.git7=this.git7||_(this.primaryColor,{h:120}),this.darkMode?(this.git0=X(this.git0,25),this.git1=X(this.git1,25),this.git2=X(this.git2,25),this.git3=X(this.git3,25),this.git4=X(this.git4,25),this.git5=X(this.git5,25),this.git6=X(this.git6,25),this.git7=X(this.git7,25)):(this.git0=et(this.git0,25),this.git1=et(this.git1,25),this.git2=et(this.git2,25),this.git3=et(this.git3,25),this.git4=et(this.git4,25),this.git5=et(this.git5,25),this.git6=et(this.git6,25),this.git7=et(this.git7,25)),this.gitInv0=this.gitInv0||Y(this.git0),this.gitInv1=this.gitInv1||Y(this.git1),this.gitInv2=this.gitInv2||Y(this.git2),this.gitInv3=this.gitInv3||Y(this.git3),this.gitInv4=this.gitInv4||Y(this.git4),this.gitInv5=this.gitInv5||Y(this.git5),this.gitInv6=this.gitInv6||Y(this.git6),this.gitInv7=this.gitInv7||Y(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Vn,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Zn}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(br,"Theme"),br),Wy=p(e=>{const t=new jy;return t.calculate(e),t},"getThemeVariables"),wr,Hy=(wr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=X(this.primaryColor,16),this.tertiaryColor=_(this.primaryColor,{h:-160}),this.primaryBorderColor=Y(this.background),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=Y(this.primaryColor),this.secondaryTextColor=Y(this.secondaryColor),this.tertiaryTextColor=Y(this.tertiaryColor),this.lineColor=Y(this.background),this.textColor=Y(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=X(Y("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=gr(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=et("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=et(this.sectionBkgColor,10),this.taskBorderColor=gr(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=gr(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||X(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||et(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=X(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=X(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=X(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=_(this.primaryColor,{h:64}),this.fillType3=_(this.secondaryColor,{h:64}),this.fillType4=_(this.primaryColor,{h:-64}),this.fillType5=_(this.secondaryColor,{h:-64}),this.fillType6=_(this.primaryColor,{h:128}),this.fillType7=_(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||_(this.primaryColor,{h:30}),this.cScale4=this.cScale4||_(this.primaryColor,{h:60}),this.cScale5=this.cScale5||_(this.primaryColor,{h:90}),this.cScale6=this.cScale6||_(this.primaryColor,{h:120}),this.cScale7=this.cScale7||_(this.primaryColor,{h:150}),this.cScale8=this.cScale8||_(this.primaryColor,{h:210}),this.cScale9=this.cScale9||_(this.primaryColor,{h:270}),this.cScale10=this.cScale10||_(this.primaryColor,{h:300}),this.cScale11=this.cScale11||_(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||Y(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||X(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||_(this.mainBkg,{h:30,s:-30,l:-(-10+t*4)}),this["surfacePeer"+t]=this["surfacePeer"+t]||_(this.mainBkg,{h:30,s:-30,l:-(-7+t*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||_(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||_(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||_(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||_(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||_(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||_(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Pr(this.quadrant1Fill)?X(this.quadrant1Fill):et(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?et(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=X(this.secondaryColor,20),this.git1=X(this.pie2||this.secondaryColor,20),this.git2=X(this.pie3||this.tertiaryColor,20),this.git3=X(this.pie4||_(this.primaryColor,{h:-30}),20),this.git4=X(this.pie5||_(this.primaryColor,{h:-60}),20),this.git5=X(this.pie6||_(this.primaryColor,{h:-90}),10),this.git6=X(this.pie7||_(this.primaryColor,{h:60}),10),this.git7=X(this.pie8||_(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||Y(this.git0),this.gitInv1=this.gitInv1||Y(this.git1),this.gitInv2=this.gitInv2||Y(this.git2),this.gitInv3=this.gitInv3||Y(this.git3),this.gitInv4=this.gitInv4||Y(this.git4),this.gitInv5=this.gitInv5||Y(this.git5),this.gitInv6=this.gitInv6||Y(this.git6),this.gitInv7=this.gitInv7||Y(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Y(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Y(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||X(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||X(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(wr,"Theme"),wr),Yy=p(e=>{const t=new Hy;return t.calculate(e),t},"getThemeVariables"),vr,Uy=(vr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=_(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=_(this.primaryColor,{h:-160}),this.primaryBorderColor=Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=Y(this.primaryColor),this.secondaryTextColor=Y(this.secondaryColor),this.tertiaryTextColor=Y(this.tertiaryColor),this.lineColor=Y(this.background),this.textColor=Y(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=gr(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||_(this.primaryColor,{h:30}),this.cScale4=this.cScale4||_(this.primaryColor,{h:60}),this.cScale5=this.cScale5||_(this.primaryColor,{h:90}),this.cScale6=this.cScale6||_(this.primaryColor,{h:120}),this.cScale7=this.cScale7||_(this.primaryColor,{h:150}),this.cScale8=this.cScale8||_(this.primaryColor,{h:210}),this.cScale9=this.cScale9||_(this.primaryColor,{h:270}),this.cScale10=this.cScale10||_(this.primaryColor,{h:300}),this.cScale11=this.cScale11||_(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||et(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||et(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=et(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||et(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||_(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||_(this.mainBkg,{h:30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||_(this.mainBkg,{h:30,l:-(7+t*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||Y(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||Y(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=X(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||X(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||X(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=_(this.primaryColor,{h:64}),this.fillType3=_(this.secondaryColor,{h:64}),this.fillType4=_(this.primaryColor,{h:-64}),this.fillType5=_(this.secondaryColor,{h:-64}),this.fillType6=_(this.primaryColor,{h:128}),this.fillType7=_(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||_(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||_(this.primaryColor,{l:-10}),this.pie5=this.pie5||_(this.secondaryColor,{l:-30}),this.pie6=this.pie6||_(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||_(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||_(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||_(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||_(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||_(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||_(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||_(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||_(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||_(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||_(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||_(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||_(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Pr(this.quadrant1Fill)?X(this.quadrant1Fill):et(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||_(this.primaryColor,{h:-30}),this.git4=this.git4||_(this.primaryColor,{h:-60}),this.git5=this.git5||_(this.primaryColor,{h:-90}),this.git6=this.git6||_(this.primaryColor,{h:60}),this.git7=this.git7||_(this.primaryColor,{h:120}),this.darkMode?(this.git0=X(this.git0,25),this.git1=X(this.git1,25),this.git2=X(this.git2,25),this.git3=X(this.git3,25),this.git4=X(this.git4,25),this.git5=X(this.git5,25),this.git6=X(this.git6,25),this.git7=X(this.git7,25)):(this.git0=et(this.git0,25),this.git1=et(this.git1,25),this.git2=et(this.git2,25),this.git3=et(this.git3,25),this.git4=et(this.git4,25),this.git5=et(this.git5,25),this.git6=et(this.git6,25),this.git7=et(this.git7,25)),this.gitInv0=this.gitInv0||et(Y(this.git0),25),this.gitInv1=this.gitInv1||Y(this.git1),this.gitInv2=this.gitInv2||Y(this.git2),this.gitInv3=this.gitInv3||Y(this.git3),this.gitInv4=this.gitInv4||Y(this.git4),this.gitInv5=this.gitInv5||Y(this.git5),this.gitInv6=this.gitInv6||Y(this.git6),this.gitInv7=this.gitInv7||Y(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Y(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Y(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Vn,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Zn}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(vr,"Theme"),vr),nh=p(e=>{const t=new Uy;return t.calculate(e),t},"getThemeVariables"),kr,Gy=(kr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=X("#cde498",10),this.primaryBorderColor=Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=Y(this.primaryColor),this.secondaryTextColor=Y(this.secondaryColor),this.tertiaryTextColor=Y(this.primaryColor),this.lineColor=Y(this.background),this.textColor=Y(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=et(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||_(this.primaryColor,{h:30}),this.cScale4=this.cScale4||_(this.primaryColor,{h:60}),this.cScale5=this.cScale5||_(this.primaryColor,{h:90}),this.cScale6=this.cScale6||_(this.primaryColor,{h:120}),this.cScale7=this.cScale7||_(this.primaryColor,{h:150}),this.cScale8=this.cScale8||_(this.primaryColor,{h:210}),this.cScale9=this.cScale9||_(this.primaryColor,{h:270}),this.cScale10=this.cScale10||_(this.primaryColor,{h:300}),this.cScale11=this.cScale11||_(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||et(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||et(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=et(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||et(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||_(this["cScale"+t],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||_(this.mainBkg,{h:30,s:-30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||_(this.mainBkg,{h:30,s:-30,l:-(8+t*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||X(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||X(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=_(this.primaryColor,{h:64}),this.fillType3=_(this.secondaryColor,{h:64}),this.fillType4=_(this.primaryColor,{h:-64}),this.fillType5=_(this.secondaryColor,{h:-64}),this.fillType6=_(this.primaryColor,{h:128}),this.fillType7=_(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||_(this.primaryColor,{l:-30}),this.pie5=this.pie5||_(this.secondaryColor,{l:-30}),this.pie6=this.pie6||_(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||_(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||_(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||_(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||_(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||_(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||_(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||_(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||_(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||_(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||_(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||_(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||_(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Pr(this.quadrant1Fill)?X(this.quadrant1Fill):et(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||_(this.primaryColor,{h:-30}),this.git4=this.git4||_(this.primaryColor,{h:-60}),this.git5=this.git5||_(this.primaryColor,{h:-90}),this.git6=this.git6||_(this.primaryColor,{h:60}),this.git7=this.git7||_(this.primaryColor,{h:120}),this.darkMode?(this.git0=X(this.git0,25),this.git1=X(this.git1,25),this.git2=X(this.git2,25),this.git3=X(this.git3,25),this.git4=X(this.git4,25),this.git5=X(this.git5,25),this.git6=X(this.git6,25),this.git7=X(this.git7,25)):(this.git0=et(this.git0,25),this.git1=et(this.git1,25),this.git2=et(this.git2,25),this.git3=et(this.git3,25),this.git4=et(this.git4,25),this.git5=et(this.git5,25),this.git6=et(this.git6,25),this.git7=et(this.git7,25)),this.gitInv0=this.gitInv0||Y(this.git0),this.gitInv1=this.gitInv1||Y(this.git1),this.gitInv2=this.gitInv2||Y(this.git2),this.gitInv3=this.gitInv3||Y(this.git3),this.gitInv4=this.gitInv4||Y(this.git4),this.gitInv5=this.gitInv5||Y(this.git5),this.gitInv6=this.gitInv6||Y(this.git6),this.gitInv7=this.gitInv7||Y(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Y(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Y(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Vn,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Zn}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(kr,"Theme"),kr),Xy=p(e=>{const t=new Gy;return t.calculate(e),t},"getThemeVariables"),Cr,Vy=(Cr=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=X(this.contrast,55),this.background="#ffffff",this.tertiaryColor=_(this.primaryColor,{h:-160}),this.primaryBorderColor=Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=Y(this.primaryColor),this.secondaryTextColor=Y(this.secondaryColor),this.tertiaryTextColor=Y(this.tertiaryColor),this.lineColor=Y(this.background),this.textColor=Y(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||X(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=X(this.contrast,55),this.border2=this.contrast,this.actorBorder=X(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||Y(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||X(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||et(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||_(this.mainBkg,{l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||_(this.mainBkg,{l:-(8+t*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=X(this.contrast,30),this.sectionBkgColor2=X(this.contrast,30),this.taskBorderColor=et(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=X(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=et(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=_(this.primaryColor,{h:64}),this.fillType3=_(this.secondaryColor,{h:64}),this.fillType4=_(this.primaryColor,{h:-64}),this.fillType5=_(this.secondaryColor,{h:-64}),this.fillType6=_(this.primaryColor,{h:128}),this.fillType7=_(this.secondaryColor,{h:128});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||_(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||_(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||_(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||_(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||_(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||_(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Pr(this.quadrant1Fill)?X(this.quadrant1Fill):et(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=et(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||_(this.primaryColor,{h:-30}),this.git4=this.pie5||_(this.primaryColor,{h:-60}),this.git5=this.pie6||_(this.primaryColor,{h:-90}),this.git6=this.pie7||_(this.primaryColor,{h:60}),this.git7=this.pie8||_(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||Y(this.git0),this.gitInv1=this.gitInv1||Y(this.git1),this.gitInv2=this.gitInv2||Y(this.git2),this.gitInv3=this.gitInv3||Y(this.git3),this.gitInv4=this.gitInv4||Y(this.git4),this.gitInv5=this.gitInv5||Y(this.git5),this.gitInv6=this.gitInv6||Y(this.git6),this.gitInv7=this.gitInv7||Y(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Vn,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Zn}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Cr,"Theme"),Cr),Zy=p(e=>{const t=new Vy;return t.calculate(e),t},"getThemeVariables"),ye={base:{getThemeVariables:Wy},dark:{getThemeVariables:Yy},default:{getThemeVariables:nh},forest:{getThemeVariables:Xy},neutral:{getThemeVariables:Zy}},re={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},ah={...re,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:ye.default.getThemeVariables(),sequence:{...re.sequence,messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:p(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:p(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...re.gantt,tickInterval:void 0,useWidth:void 0},c4:{...re.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...re.flowchart,inheritDir:!1},external_personFont:p(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:p(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:p(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:p(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:p(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:p(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:p(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:p(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:p(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:p(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:p(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:p(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:p(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:p(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:p(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:p(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:p(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:p(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:p(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:p(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...re.pie,useWidth:984},xyChart:{...re.xyChart,useWidth:void 0},requirement:{...re.requirement,useWidth:void 0},packet:{...re.packet},radar:{...re.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},sh=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...sh(e[i],"")]:[...r,t+i],[]),"keyify"),Ky=new Set(sh(ah,"")),ao=ah,pn=p(e=>{if(N.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>pn(t));return}for(const t of Object.keys(e)){if(N.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!Ky.has(t)||e[t]==null){N.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){N.debug("sanitizing object",t),pn(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(N.debug("sanitizing css option",t),e[t]=Qy(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}N.debug("After sanitization",e)}},"sanitizeDirective"),Qy=p(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),Tr=Object.freeze(ao),qt=bt({},Tr),gn,Ve=[],hi=bt({},Tr),Kn=p((e,t)=>{let r=bt({},e),i={};for(const n of t)ch(n),i=bt(i,n);if(r=bt(r,i),i.theme&&i.theme in ye){const n=bt({},gn),a=bt(n.themeVariables||{},i.themeVariables);r.theme&&r.theme in ye&&(r.themeVariables=ye[r.theme].getThemeVariables(a))}return hi=r,hh(hi),hi},"updateCurrentConfig"),Jy=p(e=>(qt=bt({},Tr),qt=bt(qt,e),e.theme&&ye[e.theme]&&(qt.themeVariables=ye[e.theme].getThemeVariables(e.themeVariables)),Kn(qt,Ve),qt),"setSiteConfig"),tx=p(e=>{gn=bt({},e)},"saveConfigFromInitialize"),ex=p(e=>(qt=bt(qt,e),Kn(qt,Ve),qt),"updateSiteConfig"),oh=p(()=>bt({},qt),"getSiteConfig"),lh=p(e=>(hh(e),bt(hi,e),$t()),"setConfig"),$t=p(()=>bt({},hi),"getConfig"),ch=p(e=>{e&&(["secure",...qt.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(N.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&ch(e[t])}))},"sanitize"),rx=p(e=>{pn(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Ve.push(e),Kn(qt,Ve)},"addDirective"),mn=p((e=qt)=>{Ve=[],Kn(e,Ve)},"reset"),ix={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},bl={},nx=p(e=>{bl[e]||(N.warn(ix[e]),bl[e]=!0)},"issueWarning"),hh=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&nx("LAZY_LOAD_DEPRECATED")},"checkConfig"),ax=p(()=>{let e={};gn&&(e=bt(e,gn));for(const t of Ve)e=bt(e,t);return e},"getUserDefinedConfig"),Rr=/<br\s*\/?>/gi,sx=p(e=>e?fh(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),ox=(()=>{let e=!1;return()=>{e||(uh(),e=!0)}})();function uh(){const e="data-temp-href-target";Ge.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Ge.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}p(uh,"setupDompurifyHooks");var dh=p(e=>(ox(),Ge.sanitize(e)),"removeScript"),wl=p((e,t)=>{if(t.flowchart?.htmlLabels!==!1){const r=t.securityLevel;r==="antiscript"||r==="strict"?e=dh(e):r!=="loose"&&(e=fh(e),e=e.replace(/</g,"<").replace(/>/g,">"),e=e.replace(/=/g,"="),e=ux(e))}return e},"sanitizeMore"),Ht=p((e,t)=>e&&(t.dompurifyConfig?e=Ge.sanitize(wl(e,t),t.dompurifyConfig).toString():e=Ge.sanitize(wl(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),lx=p((e,t)=>typeof e=="string"?Ht(e,t):e.flat().map(r=>Ht(r,t)),"sanitizeTextOrArray"),cx=p(e=>Rr.test(e),"hasBreaks"),hx=p(e=>e.split(Rr),"splitBreaks"),ux=p(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),fh=p(e=>e.replace(Rr,"#br#"),"breakToPlaceholder"),ph=p(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),wt=p(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),dx=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),fx=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),ts=p(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let n=t[i];if(n===","&&i>0&&i+1<t.length){const a=t[i-1],o=t[i+1];px(a,o)&&(n=a+","+o,i++,r.pop())}r.push(gx(n))}return r.join("")},"parseGenericTypes"),es=p((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),px=p((e,t)=>{const r=es(e,"~"),i=es(t,"~");return r===1&&i===1},"shouldCombineSets"),gx=p(e=>{const t=es(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let n=i.indexOf("~"),a=i.lastIndexOf("~");for(;n!==-1&&a!==-1&&n!==a;)i[n]="<",i[a]=">",n=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),vl=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),rs=/\$\$(.*)\$\$/g,Ze=p(e=>(e.match(rs)?.length??0)>0,"hasKatex"),mx=p(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Qn(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);const n={width:r.clientWidth,height:r.clientHeight};return r.remove(),n},"calculateMathMLDimensions"),yx=p(async(e,t)=>{if(!Ze(e))return e;if(!(vl()||t.legacyMathML||t.forceLegacyMathML))return e.replace(rs,"MathML is unsupported in this environment.");{const{default:r}=await import("katex"),i=t.forceLegacyMathML||!vl()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Rr).map(n=>Ze(n)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${n}</div>`:`<div>${n}</div>`).join("").replace(rs,(n,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Qn=p(async(e,t)=>Ht(await yx(e,t),t),"renderKatexSanitized"),rr={getRows:sx,sanitizeText:Ht,sanitizeTextOrArray:lx,hasBreaks:cx,splitBreaks:hx,lineBreakRegex:Rr,removeScript:dh,getUrl:ph,evaluate:wt,getMax:dx,getMin:fx},xx=p(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),bx=p(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),so=p(function(e,t,r,i){const n=bx(t,r,i);xx(e,n)},"configureSvgSize"),gh=p(function(e,t,r,i){const n=t.node().getBBox(),a=n.width,o=n.height;N.info(`SVG bounds: ${a}x${o}`,n);let s=0,l=0;N.info(`Graph bounds: ${s}x${l}`,e),s=a+r*2,l=o+r*2,N.info(`Calculated bounds: ${s}x${l}`),so(t,l,s,i);const c=`${n.x-r} ${n.y-r} ${n.width+2*r} ${n.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),en={},wx=p((e,t,r)=>{let i="";return e in en&&en[e]?i=en[e](r):N.warn(`No theme found for ${e}`),` & {
|
|
59
|
+
font-family: ${r.fontFamily};
|
|
60
|
+
font-size: ${r.fontSize};
|
|
61
|
+
fill: ${r.textColor}
|
|
62
|
+
}
|
|
63
|
+
@keyframes edge-animation-frame {
|
|
64
|
+
from {
|
|
65
|
+
stroke-dashoffset: 0;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
@keyframes dash {
|
|
69
|
+
to {
|
|
70
|
+
stroke-dashoffset: 0;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
& .edge-animation-slow {
|
|
74
|
+
stroke-dasharray: 9,5 !important;
|
|
75
|
+
stroke-dashoffset: 900;
|
|
76
|
+
animation: dash 50s linear infinite;
|
|
77
|
+
stroke-linecap: round;
|
|
78
|
+
}
|
|
79
|
+
& .edge-animation-fast {
|
|
80
|
+
stroke-dasharray: 9,5 !important;
|
|
81
|
+
stroke-dashoffset: 900;
|
|
82
|
+
animation: dash 20s linear infinite;
|
|
83
|
+
stroke-linecap: round;
|
|
84
|
+
}
|
|
85
|
+
/* Classes common for multiple diagrams */
|
|
86
|
+
|
|
87
|
+
& .error-icon {
|
|
88
|
+
fill: ${r.errorBkgColor};
|
|
89
|
+
}
|
|
90
|
+
& .error-text {
|
|
91
|
+
fill: ${r.errorTextColor};
|
|
92
|
+
stroke: ${r.errorTextColor};
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
& .edge-thickness-normal {
|
|
96
|
+
stroke-width: 1px;
|
|
97
|
+
}
|
|
98
|
+
& .edge-thickness-thick {
|
|
99
|
+
stroke-width: 3.5px
|
|
100
|
+
}
|
|
101
|
+
& .edge-pattern-solid {
|
|
102
|
+
stroke-dasharray: 0;
|
|
103
|
+
}
|
|
104
|
+
& .edge-thickness-invisible {
|
|
105
|
+
stroke-width: 0;
|
|
106
|
+
fill: none;
|
|
107
|
+
}
|
|
108
|
+
& .edge-pattern-dashed{
|
|
109
|
+
stroke-dasharray: 3;
|
|
110
|
+
}
|
|
111
|
+
.edge-pattern-dotted {
|
|
112
|
+
stroke-dasharray: 2;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
& .marker {
|
|
116
|
+
fill: ${r.lineColor};
|
|
117
|
+
stroke: ${r.lineColor};
|
|
118
|
+
}
|
|
119
|
+
& .marker.cross {
|
|
120
|
+
stroke: ${r.lineColor};
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
& svg {
|
|
124
|
+
font-family: ${r.fontFamily};
|
|
125
|
+
font-size: ${r.fontSize};
|
|
126
|
+
}
|
|
127
|
+
& p {
|
|
128
|
+
margin: 0
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
${i}
|
|
132
|
+
|
|
133
|
+
${t}
|
|
134
|
+
`},"getStyles"),vx=p((e,t)=>{t!==void 0&&(en[e]=t)},"addStylesForDiagram"),kx=wx,oo={};Qc(oo,{clear:()=>mh,getAccDescription:()=>wh,getAccTitle:()=>xh,getDiagramTitle:()=>kh,setAccDescription:()=>bh,setAccTitle:()=>yh,setDiagramTitle:()=>vh});var lo="",co="",ho="",uo=p(e=>Ht(e,$t()),"sanitizeText"),mh=p(()=>{lo="",ho="",co=""},"clear"),yh=p(e=>{lo=uo(e).replace(/^\s+/g,"")},"setAccTitle"),xh=p(()=>lo,"getAccTitle"),bh=p(e=>{ho=uo(e).replace(/\n\s+/g,`
|
|
135
|
+
`)},"setAccDescription"),wh=p(()=>ho,"getAccDescription"),vh=p(e=>{co=uo(e)},"setDiagramTitle"),kh=p(()=>co,"getDiagramTitle"),kl=N,Cx=io,ut=$t,_x=lh,Sx=Tr,fo=p(e=>Ht(e,ut()),"sanitizeText"),Ch=gh,Tx=p(()=>oo,"getCommonDb"),yn={},xn=p((e,t,r)=>{yn[e]&&kl.warn(`Diagram with id ${e} already registered. Overwriting.`),yn[e]=t,r&&ih(e,r),vx(e,t.styles),t.injectUtils?.(kl,Cx,ut,fo,Ch,Tx(),()=>{})},"registerDiagram"),is=p(e=>{if(e in yn)return yn[e];throw new Bx(e)},"getDiagram"),_r,Bx=(_r=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},p(_r,"DiagramNotFoundError"),_r),$x={value:()=>{}};function _h(){for(var e=0,t=arguments.length,r={},i;e<t;++e){if(!(i=arguments[e]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new rn(r)}function rn(e){this._=e}function Lx(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",n=r.indexOf(".");if(n>=0&&(i=r.slice(n+1),r=r.slice(0,n)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}rn.prototype=_h.prototype={constructor:rn,on:function(e,t){var r=this._,i=Lx(e+"",r),n,a=-1,o=i.length;if(arguments.length<2){for(;++a<o;)if((n=(e=i[a]).type)&&(n=Mx(r[n],e.name)))return n;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<o;)if(n=(e=i[a]).type)r[n]=Cl(r[n],e.name,t);else if(t==null)for(n in r)r[n]=Cl(r[n],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new rn(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var r=new Array(n),i=0,n,a;i<n;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],i=0,n=a.length;i<n;++i)a[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],n=0,a=i.length;n<a;++n)i[n].value.apply(t,r)}};function Mx(e,t){for(var r=0,i=e.length,n;r<i;++r)if((n=e[r]).name===t)return n.value}function Cl(e,t,r){for(var i=0,n=e.length;i<n;++i)if(e[i].name===t){e[i]=$x,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var ns="http://www.w3.org/1999/xhtml";const _l={svg:"http://www.w3.org/2000/svg",xhtml:ns,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Jn(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),_l.hasOwnProperty(t)?{space:_l[t],local:e}:e}function Ax(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===ns&&t.documentElement.namespaceURI===ns?t.createElement(e):t.createElementNS(r,e)}}function Ex(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Sh(e){var t=Jn(e);return(t.local?Ex:Ax)(t)}function Fx(){}function po(e){return e==null?Fx:function(){return this.querySelector(e)}}function Px(e){typeof e!="function"&&(e=po(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a=t[n],o=a.length,s=i[n]=new Array(o),l,c,h=0;h<o;++h)(l=a[h])&&(c=e.call(l,l.__data__,h,a))&&("__data__"in l&&(c.__data__=l.__data__),s[h]=c);return new Yt(i,this._parents)}function Rx(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Ox(){return[]}function Th(e){return e==null?Ox:function(){return this.querySelectorAll(e)}}function Dx(e){return function(){return Rx(e.apply(this,arguments))}}function Nx(e){typeof e=="function"?e=Dx(e):e=Th(e);for(var t=this._groups,r=t.length,i=[],n=[],a=0;a<r;++a)for(var o=t[a],s=o.length,l,c=0;c<s;++c)(l=o[c])&&(i.push(e.call(l,l.__data__,c,o)),n.push(l));return new Yt(i,n)}function Bh(e){return function(){return this.matches(e)}}function $h(e){return function(t){return t.matches(e)}}var Ix=Array.prototype.find;function zx(e){return function(){return Ix.call(this.children,e)}}function qx(){return this.firstElementChild}function jx(e){return this.select(e==null?qx:zx(typeof e=="function"?e:$h(e)))}var Wx=Array.prototype.filter;function Hx(){return Array.from(this.children)}function Yx(e){return function(){return Wx.call(this.children,e)}}function Ux(e){return this.selectAll(e==null?Hx:Yx(typeof e=="function"?e:$h(e)))}function Gx(e){typeof e!="function"&&(e=Bh(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a=t[n],o=a.length,s=i[n]=[],l,c=0;c<o;++c)(l=a[c])&&e.call(l,l.__data__,c,a)&&s.push(l);return new Yt(i,this._parents)}function Lh(e){return new Array(e.length)}function Xx(){return new Yt(this._enter||this._groups.map(Lh),this._parents)}function bn(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}bn.prototype={constructor:bn,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Vx(e){return function(){return e}}function Zx(e,t,r,i,n,a){for(var o=0,s,l=t.length,c=a.length;o<c;++o)(s=t[o])?(s.__data__=a[o],i[o]=s):r[o]=new bn(e,a[o]);for(;o<l;++o)(s=t[o])&&(n[o]=s)}function Kx(e,t,r,i,n,a,o){var s,l,c=new Map,h=t.length,u=a.length,d=new Array(h),f;for(s=0;s<h;++s)(l=t[s])&&(d[s]=f=o.call(l,l.__data__,s,t)+"",c.has(f)?n[s]=l:c.set(f,l));for(s=0;s<u;++s)f=o.call(e,a[s],s,a)+"",(l=c.get(f))?(i[s]=l,l.__data__=a[s],c.delete(f)):r[s]=new bn(e,a[s]);for(s=0;s<h;++s)(l=t[s])&&c.get(d[s])===l&&(n[s]=l)}function Qx(e){return e.__data__}function Jx(e,t){if(!arguments.length)return Array.from(this,Qx);var r=t?Kx:Zx,i=this._parents,n=this._groups;typeof e!="function"&&(e=Vx(e));for(var a=n.length,o=new Array(a),s=new Array(a),l=new Array(a),c=0;c<a;++c){var h=i[c],u=n[c],d=u.length,f=tb(e.call(h,h&&h.__data__,c,i)),g=f.length,m=s[c]=new Array(g),y=o[c]=new Array(g),x=l[c]=new Array(d);r(h,u,m,y,x,f,t);for(var b=0,w=0,C,v;b<g;++b)if(C=m[b]){for(b>=w&&(w=b+1);!(v=y[w])&&++w<g;);C._next=v||null}}return o=new Yt(o,i),o._enter=s,o._exit=l,o}function tb(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function eb(){return new Yt(this._exit||this._groups.map(Lh),this._parents)}function rb(e,t,r){var i=this.enter(),n=this,a=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(n=t(n),n&&(n=n.selection())),r==null?a.remove():r(a),i&&n?i.merge(n).order():n}function ib(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,n=r.length,a=i.length,o=Math.min(n,a),s=new Array(n),l=0;l<o;++l)for(var c=r[l],h=i[l],u=c.length,d=s[l]=new Array(u),f,g=0;g<u;++g)(f=c[g]||h[g])&&(d[g]=f);for(;l<n;++l)s[l]=r[l];return new Yt(s,this._parents)}function nb(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],n=i.length-1,a=i[n],o;--n>=0;)(o=i[n])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function ab(e){e||(e=sb);function t(u,d){return u&&d?e(u.__data__,d.__data__):!u-!d}for(var r=this._groups,i=r.length,n=new Array(i),a=0;a<i;++a){for(var o=r[a],s=o.length,l=n[a]=new Array(s),c,h=0;h<s;++h)(c=o[h])&&(l[h]=c);l.sort(t)}return new Yt(n,this._parents).order()}function sb(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function ob(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function lb(){return Array.from(this)}function cb(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],n=0,a=i.length;n<a;++n){var o=i[n];if(o)return o}return null}function hb(){let e=0;for(const t of this)++e;return e}function ub(){return!this.node()}function db(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var n=t[r],a=0,o=n.length,s;a<o;++a)(s=n[a])&&e.call(s,s.__data__,a,n);return this}function fb(e){return function(){this.removeAttribute(e)}}function pb(e){return function(){this.removeAttributeNS(e.space,e.local)}}function gb(e,t){return function(){this.setAttribute(e,t)}}function mb(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function yb(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function xb(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function bb(e,t){var r=Jn(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((t==null?r.local?pb:fb:typeof t=="function"?r.local?xb:yb:r.local?mb:gb)(r,t))}function Mh(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function wb(e){return function(){this.style.removeProperty(e)}}function vb(e,t,r){return function(){this.style.setProperty(e,t,r)}}function kb(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function Cb(e,t,r){return arguments.length>1?this.each((t==null?wb:typeof t=="function"?kb:vb)(e,t,r??"")):Br(this.node(),e)}function Br(e,t){return e.style.getPropertyValue(t)||Mh(e).getComputedStyle(e,null).getPropertyValue(t)}function _b(e){return function(){delete this[e]}}function Sb(e,t){return function(){this[e]=t}}function Tb(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function Bb(e,t){return arguments.length>1?this.each((t==null?_b:typeof t=="function"?Tb:Sb)(e,t)):this.node()[e]}function Ah(e){return e.trim().split(/^|\s+/)}function go(e){return e.classList||new Eh(e)}function Eh(e){this._node=e,this._names=Ah(e.getAttribute("class")||"")}Eh.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Fh(e,t){for(var r=go(e),i=-1,n=t.length;++i<n;)r.add(t[i])}function Ph(e,t){for(var r=go(e),i=-1,n=t.length;++i<n;)r.remove(t[i])}function $b(e){return function(){Fh(this,e)}}function Lb(e){return function(){Ph(this,e)}}function Mb(e,t){return function(){(t.apply(this,arguments)?Fh:Ph)(this,e)}}function Ab(e,t){var r=Ah(e+"");if(arguments.length<2){for(var i=go(this.node()),n=-1,a=r.length;++n<a;)if(!i.contains(r[n]))return!1;return!0}return this.each((typeof t=="function"?Mb:t?$b:Lb)(r,t))}function Eb(){this.textContent=""}function Fb(e){return function(){this.textContent=e}}function Pb(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Rb(e){return arguments.length?this.each(e==null?Eb:(typeof e=="function"?Pb:Fb)(e)):this.node().textContent}function Ob(){this.innerHTML=""}function Db(e){return function(){this.innerHTML=e}}function Nb(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Ib(e){return arguments.length?this.each(e==null?Ob:(typeof e=="function"?Nb:Db)(e)):this.node().innerHTML}function zb(){this.nextSibling&&this.parentNode.appendChild(this)}function qb(){return this.each(zb)}function jb(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Wb(){return this.each(jb)}function Hb(e){var t=typeof e=="function"?e:Sh(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Yb(){return null}function Ub(e,t){var r=typeof e=="function"?e:Sh(e),i=t==null?Yb:typeof t=="function"?t:po(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function Gb(){var e=this.parentNode;e&&e.removeChild(this)}function Xb(){return this.each(Gb)}function Vb(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Zb(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Kb(e){return this.select(e?Zb:Vb)}function Qb(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Jb(e){return function(t){e.call(this,t,this.__data__)}}function t1(e){return e.trim().split(/^|\s+/).map(function(t){var r="",i=t.indexOf(".");return i>=0&&(r=t.slice(i+1),t=t.slice(0,i)),{type:t,name:r}})}function e1(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,n=t.length,a;r<n;++r)a=t[r],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++i]=a;++i?t.length=i:delete this.__on}}}function r1(e,t,r){return function(){var i=this.__on,n,a=Jb(t);if(i){for(var o=0,s=i.length;o<s;++o)if((n=i[o]).type===e.type&&n.name===e.name){this.removeEventListener(n.type,n.listener,n.options),this.addEventListener(n.type,n.listener=a,n.options=r),n.value=t;return}}this.addEventListener(e.type,a,r),n={type:e.type,name:e.name,value:t,listener:a,options:r},i?i.push(n):this.__on=[n]}}function i1(e,t,r){var i=t1(e+""),n,a=i.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,c=s.length,h;l<c;++l)for(n=0,h=s[l];n<a;++n)if((o=i[n]).type===h.type&&o.name===h.name)return h.value}return}for(s=t?r1:e1,n=0;n<a;++n)this.each(s(i[n],t,r));return this}function Rh(e,t,r){var i=Mh(e),n=i.CustomEvent;typeof n=="function"?n=new n(t,r):(n=i.document.createEvent("Event"),r?(n.initEvent(t,r.bubbles,r.cancelable),n.detail=r.detail):n.initEvent(t,!1,!1)),e.dispatchEvent(n)}function n1(e,t){return function(){return Rh(this,e,t)}}function a1(e,t){return function(){return Rh(this,e,t.apply(this,arguments))}}function s1(e,t){return this.each((typeof t=="function"?a1:n1)(e,t))}function*o1(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],n=0,a=i.length,o;n<a;++n)(o=i[n])&&(yield o)}var Oh=[null];function Yt(e,t){this._groups=e,this._parents=t}function Mi(){return new Yt([[document.documentElement]],Oh)}function l1(){return this}Yt.prototype=Mi.prototype={constructor:Yt,select:Px,selectAll:Nx,selectChild:jx,selectChildren:Ux,filter:Gx,data:Jx,enter:Xx,exit:eb,join:rb,merge:ib,selection:l1,order:nb,sort:ab,call:ob,nodes:lb,node:cb,size:hb,empty:ub,each:db,attr:bb,style:Cb,property:Bb,classed:Ab,text:Rb,html:Ib,raise:qb,lower:Wb,append:Hb,insert:Ub,remove:Xb,clone:Kb,datum:Qb,on:i1,dispatch:s1,[Symbol.iterator]:o1};function lt(e){return typeof e=="string"?new Yt([[document.querySelector(e)]],[document.documentElement]):new Yt([[e]],Oh)}function ta(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function mo(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function Or(){}var gi=.7,wn=1/gi,mr="\\s*([+-]?\\d+)\\s*",mi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",se="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",c1=/^#([0-9a-f]{3,8})$/,h1=new RegExp(`^rgb\\(${mr},${mr},${mr}\\)$`),u1=new RegExp(`^rgb\\(${se},${se},${se}\\)$`),d1=new RegExp(`^rgba\\(${mr},${mr},${mr},${mi}\\)$`),f1=new RegExp(`^rgba\\(${se},${se},${se},${mi}\\)$`),p1=new RegExp(`^hsl\\(${mi},${se},${se}\\)$`),g1=new RegExp(`^hsla\\(${mi},${se},${se},${mi}\\)$`),Sl={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};ta(Or,$r,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Tl,formatHex:Tl,formatHex8:m1,formatHsl:y1,formatRgb:Bl,toString:Bl});function Tl(){return this.rgb().formatHex()}function m1(){return this.rgb().formatHex8()}function y1(){return Nh(this).formatHsl()}function Bl(){return this.rgb().formatRgb()}function $r(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=c1.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?$l(t):r===3?new Dt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?ji(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?ji(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=h1.exec(e))?new Dt(t[1],t[2],t[3],1):(t=u1.exec(e))?new Dt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=d1.exec(e))?ji(t[1],t[2],t[3],t[4]):(t=f1.exec(e))?ji(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=p1.exec(e))?Al(t[1],t[2]/100,t[3]/100,1):(t=g1.exec(e))?Al(t[1],t[2]/100,t[3]/100,t[4]):Sl.hasOwnProperty(e)?$l(Sl[e]):e==="transparent"?new Dt(NaN,NaN,NaN,0):null}function $l(e){return new Dt(e>>16&255,e>>8&255,e&255,1)}function ji(e,t,r,i){return i<=0&&(e=t=r=NaN),new Dt(e,t,r,i)}function Dh(e){return e instanceof Or||(e=$r(e)),e?(e=e.rgb(),new Dt(e.r,e.g,e.b,e.opacity)):new Dt}function as(e,t,r,i){return arguments.length===1?Dh(e):new Dt(e,t,r,i??1)}function Dt(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}ta(Dt,as,mo(Or,{brighter(e){return e=e==null?wn:Math.pow(wn,e),new Dt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?gi:Math.pow(gi,e),new Dt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Dt(Ye(this.r),Ye(this.g),Ye(this.b),vn(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ll,formatHex:Ll,formatHex8:x1,formatRgb:Ml,toString:Ml}));function Ll(){return`#${qe(this.r)}${qe(this.g)}${qe(this.b)}`}function x1(){return`#${qe(this.r)}${qe(this.g)}${qe(this.b)}${qe((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ml(){const e=vn(this.opacity);return`${e===1?"rgb(":"rgba("}${Ye(this.r)}, ${Ye(this.g)}, ${Ye(this.b)}${e===1?")":`, ${e})`}`}function vn(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ye(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function qe(e){return e=Ye(e),(e<16?"0":"")+e.toString(16)}function Al(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Kt(e,t,r,i)}function Nh(e){if(e instanceof Kt)return new Kt(e.h,e.s,e.l,e.opacity);if(e instanceof Or||(e=$r(e)),!e)return new Kt;if(e instanceof Kt)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,n=Math.min(t,r,i),a=Math.max(t,r,i),o=NaN,s=a-n,l=(a+n)/2;return s?(t===a?o=(r-i)/s+(r<i)*6:r===a?o=(i-t)/s+2:o=(t-r)/s+4,s/=l<.5?a+n:2-a-n,o*=60):s=l>0&&l<1?0:o,new Kt(o,s,l,e.opacity)}function b1(e,t,r,i){return arguments.length===1?Nh(e):new Kt(e,t,r,i??1)}function Kt(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}ta(Kt,b1,mo(Or,{brighter(e){return e=e==null?wn:Math.pow(wn,e),new Kt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?gi:Math.pow(gi,e),new Kt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,n=2*r-i;return new Dt(Ra(e>=240?e-240:e+120,n,i),Ra(e,n,i),Ra(e<120?e+240:e-120,n,i),this.opacity)},clamp(){return new Kt(El(this.h),Wi(this.s),Wi(this.l),vn(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=vn(this.opacity);return`${e===1?"hsl(":"hsla("}${El(this.h)}, ${Wi(this.s)*100}%, ${Wi(this.l)*100}%${e===1?")":`, ${e})`}`}}));function El(e){return e=(e||0)%360,e<0?e+360:e}function Wi(e){return Math.max(0,Math.min(1,e||0))}function Ra(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const ea=e=>()=>e;function Ih(e,t){return function(r){return e+r*t}}function w1(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function v1(e,t){var r=t-e;return r?Ih(e,r>180||r<-180?r-360*Math.round(r/360):r):ea(isNaN(e)?t:e)}function k1(e){return(e=+e)==1?yo:function(t,r){return r-t?w1(t,r,e):ea(isNaN(t)?r:t)}}function yo(e,t){var r=t-e;return r?Ih(e,r):ea(isNaN(e)?t:e)}const ss=(function e(t){var r=k1(t);function i(n,a){var o=r((n=as(n)).r,(a=as(a)).r),s=r(n.g,a.g),l=r(n.b,a.b),c=yo(n.opacity,a.opacity);return function(h){return n.r=o(h),n.g=s(h),n.b=l(h),n.opacity=c(h),n+""}}return i.gamma=e,i})(1);function me(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var os=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Oa=new RegExp(os.source,"g");function C1(e){return function(){return e}}function _1(e){return function(t){return e(t)+""}}function zh(e,t){var r=os.lastIndex=Oa.lastIndex=0,i,n,a,o=-1,s=[],l=[];for(e=e+"",t=t+"";(i=os.exec(e))&&(n=Oa.exec(t));)(a=n.index)>r&&(a=t.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(i=i[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:me(i,n)})),r=Oa.lastIndex;return r<t.length&&(a=t.slice(r),s[o]?s[o]+=a:s[++o]=a),s.length<2?l[0]?_1(l[0].x):C1(t):(t=l.length,function(c){for(var h=0,u;h<t;++h)s[(u=l[h]).i]=u.x(c);return s.join("")})}var Fl=180/Math.PI,ls={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function qh(e,t,r,i,n,a){var o,s,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*r+t*i)&&(r-=e*l,i-=t*l),(s=Math.sqrt(r*r+i*i))&&(r/=s,i/=s,l/=s),e*i<t*r&&(e=-e,t=-t,l=-l,o=-o),{translateX:n,translateY:a,rotate:Math.atan2(t,e)*Fl,skewX:Math.atan(l)*Fl,scaleX:o,scaleY:s}}var Hi;function S1(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?ls:qh(t.a,t.b,t.c,t.d,t.e,t.f)}function T1(e){return e==null||(Hi||(Hi=document.createElementNS("http://www.w3.org/2000/svg","g")),Hi.setAttribute("transform",e),!(e=Hi.transform.baseVal.consolidate()))?ls:(e=e.matrix,qh(e.a,e.b,e.c,e.d,e.e,e.f))}function jh(e,t,r,i){function n(c){return c.length?c.pop()+" ":""}function a(c,h,u,d,f,g){if(c!==u||h!==d){var m=f.push("translate(",null,t,null,r);g.push({i:m-4,x:me(c,u)},{i:m-2,x:me(h,d)})}else(u||d)&&f.push("translate("+u+t+d+r)}function o(c,h,u,d){c!==h?(c-h>180?h+=360:h-c>180&&(c+=360),d.push({i:u.push(n(u)+"rotate(",null,i)-2,x:me(c,h)})):h&&u.push(n(u)+"rotate("+h+i)}function s(c,h,u,d){c!==h?d.push({i:u.push(n(u)+"skewX(",null,i)-2,x:me(c,h)}):h&&u.push(n(u)+"skewX("+h+i)}function l(c,h,u,d,f,g){if(c!==u||h!==d){var m=f.push(n(f)+"scale(",null,",",null,")");g.push({i:m-4,x:me(c,u)},{i:m-2,x:me(h,d)})}else(u!==1||d!==1)&&f.push(n(f)+"scale("+u+","+d+")")}return function(c,h){var u=[],d=[];return c=e(c),h=e(h),a(c.translateX,c.translateY,h.translateX,h.translateY,u,d),o(c.rotate,h.rotate,u,d),s(c.skewX,h.skewX,u,d),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,u,d),c=h=null,function(f){for(var g=-1,m=d.length,y;++g<m;)u[(y=d[g]).i]=y.x(f);return u.join("")}}}var B1=jh(S1,"px, ","px)","deg)"),$1=jh(T1,", ",")",")"),Lr=0,ti=0,Yr=0,Wh=1e3,kn,ei,Cn=0,Ke=0,ra=0,yi=typeof performance=="object"&&performance.now?performance:Date,Hh=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function xo(){return Ke||(Hh(L1),Ke=yi.now()+ra)}function L1(){Ke=0}function _n(){this._call=this._time=this._next=null}_n.prototype=Yh.prototype={constructor:_n,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?xo():+r)+(t==null?0:+t),!this._next&&ei!==this&&(ei?ei._next=this:kn=this,ei=this),this._call=e,this._time=r,cs()},stop:function(){this._call&&(this._call=null,this._time=1/0,cs())}};function Yh(e,t,r){var i=new _n;return i.restart(e,t,r),i}function M1(){xo(),++Lr;for(var e=kn,t;e;)(t=Ke-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Lr}function Pl(){Ke=(Cn=yi.now())+ra,Lr=ti=0;try{M1()}finally{Lr=0,E1(),Ke=0}}function A1(){var e=yi.now(),t=e-Cn;t>Wh&&(ra-=t,Cn=e)}function E1(){for(var e,t=kn,r,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:kn=r);ei=e,cs(i)}function cs(e){if(!Lr){ti&&(ti=clearTimeout(ti));var t=e-Ke;t>24?(e<1/0&&(ti=setTimeout(Pl,e-yi.now()-ra)),Yr&&(Yr=clearInterval(Yr))):(Yr||(Cn=yi.now(),Yr=setInterval(A1,Wh)),Lr=1,Hh(Pl))}}function Rl(e,t,r){var i=new _n;return t=t==null?0:+t,i.restart(n=>{i.stop(),e(n+t)},t,r),i}var F1=_h("start","end","cancel","interrupt"),P1=[],Uh=0,Ol=1,hs=2,nn=3,Dl=4,us=5,an=6;function ia(e,t,r,i,n,a){var o=e.__transition;if(!o)e.__transition={};else if(r in o)return;R1(e,r,{name:t,index:i,group:n,on:F1,tween:P1,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Uh})}function bo(e,t){var r=ee(e,t);if(r.state>Uh)throw new Error("too late; already scheduled");return r}function ce(e,t){var r=ee(e,t);if(r.state>nn)throw new Error("too late; already running");return r}function ee(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function R1(e,t,r){var i=e.__transition,n;i[t]=r,r.timer=Yh(a,0,r.time);function a(c){r.state=Ol,r.timer.restart(o,r.delay,r.time),r.delay<=c&&o(c-r.delay)}function o(c){var h,u,d,f;if(r.state!==Ol)return l();for(h in i)if(f=i[h],f.name===r.name){if(f.state===nn)return Rl(o);f.state===Dl?(f.state=an,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete i[h]):+h<t&&(f.state=an,f.timer.stop(),f.on.call("cancel",e,e.__data__,f.index,f.group),delete i[h])}if(Rl(function(){r.state===nn&&(r.state=Dl,r.timer.restart(s,r.delay,r.time),s(c))}),r.state=hs,r.on.call("start",e,e.__data__,r.index,r.group),r.state===hs){for(r.state=nn,n=new Array(d=r.tween.length),h=0,u=-1;h<d;++h)(f=r.tween[h].value.call(e,e.__data__,r.index,r.group))&&(n[++u]=f);n.length=u+1}}function s(c){for(var h=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(l),r.state=us,1),u=-1,d=n.length;++u<d;)n[u].call(e,h);r.state===us&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=an,r.timer.stop(),delete i[t];for(var c in i)return;delete e.__transition}}function O1(e,t){var r=e.__transition,i,n,a=!0,o;if(r){t=t==null?null:t+"";for(o in r){if((i=r[o]).name!==t){a=!1;continue}n=i.state>hs&&i.state<us,i.state=an,i.timer.stop(),i.on.call(n?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[o]}a&&delete e.__transition}}function D1(e){return this.each(function(){O1(this,e)})}function N1(e,t){var r,i;return function(){var n=ce(this,e),a=n.tween;if(a!==r){i=r=a;for(var o=0,s=i.length;o<s;++o)if(i[o].name===t){i=i.slice(),i.splice(o,1);break}}n.tween=i}}function I1(e,t,r){var i,n;if(typeof r!="function")throw new Error;return function(){var a=ce(this,e),o=a.tween;if(o!==i){n=(i=o).slice();for(var s={name:t,value:r},l=0,c=n.length;l<c;++l)if(n[l].name===t){n[l]=s;break}l===c&&n.push(s)}a.tween=n}}function z1(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=ee(this.node(),r).tween,n=0,a=i.length,o;n<a;++n)if((o=i[n]).name===e)return o.value;return null}return this.each((t==null?N1:I1)(r,e,t))}function wo(e,t,r){var i=e._id;return e.each(function(){var n=ce(this,i);(n.value||(n.value={}))[t]=r.apply(this,arguments)}),function(n){return ee(n,i).value[t]}}function Gh(e,t){var r;return(typeof t=="number"?me:t instanceof $r?ss:(r=$r(t))?(t=r,ss):zh)(e,t)}function q1(e){return function(){this.removeAttribute(e)}}function j1(e){return function(){this.removeAttributeNS(e.space,e.local)}}function W1(e,t,r){var i,n=r+"",a;return function(){var o=this.getAttribute(e);return o===n?null:o===i?a:a=t(i=o,r)}}function H1(e,t,r){var i,n=r+"",a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===n?null:o===i?a:a=t(i=o,r)}}function Y1(e,t,r){var i,n,a;return function(){var o,s=r(this),l;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),l=s+"",o===l?null:o===i&&l===n?a:(n=l,a=t(i=o,s)))}}function U1(e,t,r){var i,n,a;return function(){var o,s=r(this),l;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),l=s+"",o===l?null:o===i&&l===n?a:(n=l,a=t(i=o,s)))}}function G1(e,t){var r=Jn(e),i=r==="transform"?$1:Gh;return this.attrTween(e,typeof t=="function"?(r.local?U1:Y1)(r,i,wo(this,"attr."+e,t)):t==null?(r.local?j1:q1)(r):(r.local?H1:W1)(r,i,t))}function X1(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function V1(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function Z1(e,t){var r,i;function n(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&V1(e,a)),r}return n._value=t,n}function K1(e,t){var r,i;function n(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&X1(e,a)),r}return n._value=t,n}function Q1(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var i=Jn(e);return this.tween(r,(i.local?Z1:K1)(i,t))}function J1(e,t){return function(){bo(this,e).delay=+t.apply(this,arguments)}}function t2(e,t){return t=+t,function(){bo(this,e).delay=t}}function e2(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?J1:t2)(t,e)):ee(this.node(),t).delay}function r2(e,t){return function(){ce(this,e).duration=+t.apply(this,arguments)}}function i2(e,t){return t=+t,function(){ce(this,e).duration=t}}function n2(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?r2:i2)(t,e)):ee(this.node(),t).duration}function a2(e,t){if(typeof t!="function")throw new Error;return function(){ce(this,e).ease=t}}function s2(e){var t=this._id;return arguments.length?this.each(a2(t,e)):ee(this.node(),t).ease}function o2(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;ce(this,e).ease=r}}function l2(e){if(typeof e!="function")throw new Error;return this.each(o2(this._id,e))}function c2(e){typeof e!="function"&&(e=Bh(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a=t[n],o=a.length,s=i[n]=[],l,c=0;c<o;++c)(l=a[c])&&e.call(l,l.__data__,c,a)&&s.push(l);return new be(i,this._parents,this._name,this._id)}function h2(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,n=r.length,a=Math.min(i,n),o=new Array(i),s=0;s<a;++s)for(var l=t[s],c=r[s],h=l.length,u=o[s]=new Array(h),d,f=0;f<h;++f)(d=l[f]||c[f])&&(u[f]=d);for(;s<i;++s)o[s]=t[s];return new be(o,this._parents,this._name,this._id)}function u2(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function d2(e,t,r){var i,n,a=u2(t)?bo:ce;return function(){var o=a(this,e),s=o.on;s!==i&&(n=(i=s).copy()).on(t,r),o.on=n}}function f2(e,t){var r=this._id;return arguments.length<2?ee(this.node(),r).on.on(e):this.each(d2(r,e,t))}function p2(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function g2(){return this.on("end.remove",p2(this._id))}function m2(e){var t=this._name,r=this._id;typeof e!="function"&&(e=po(e));for(var i=this._groups,n=i.length,a=new Array(n),o=0;o<n;++o)for(var s=i[o],l=s.length,c=a[o]=new Array(l),h,u,d=0;d<l;++d)(h=s[d])&&(u=e.call(h,h.__data__,d,s))&&("__data__"in h&&(u.__data__=h.__data__),c[d]=u,ia(c[d],t,r,d,c,ee(h,r)));return new be(a,this._parents,t,r)}function y2(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Th(e));for(var i=this._groups,n=i.length,a=[],o=[],s=0;s<n;++s)for(var l=i[s],c=l.length,h,u=0;u<c;++u)if(h=l[u]){for(var d=e.call(h,h.__data__,u,l),f,g=ee(h,r),m=0,y=d.length;m<y;++m)(f=d[m])&&ia(f,t,r,m,d,g);a.push(d),o.push(h)}return new be(a,o,t,r)}var x2=Mi.prototype.constructor;function b2(){return new x2(this._groups,this._parents)}function w2(e,t){var r,i,n;return function(){var a=Br(this,e),o=(this.style.removeProperty(e),Br(this,e));return a===o?null:a===r&&o===i?n:n=t(r=a,i=o)}}function Xh(e){return function(){this.style.removeProperty(e)}}function v2(e,t,r){var i,n=r+"",a;return function(){var o=Br(this,e);return o===n?null:o===i?a:a=t(i=o,r)}}function k2(e,t,r){var i,n,a;return function(){var o=Br(this,e),s=r(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(e),Br(this,e))),o===l?null:o===i&&l===n?a:(n=l,a=t(i=o,s))}}function C2(e,t){var r,i,n,a="style."+t,o="end."+a,s;return function(){var l=ce(this,e),c=l.on,h=l.value[a]==null?s||(s=Xh(t)):void 0;(c!==r||n!==h)&&(i=(r=c).copy()).on(o,n=h),l.on=i}}function _2(e,t,r){var i=(e+="")=="transform"?B1:Gh;return t==null?this.styleTween(e,w2(e,i)).on("end.style."+e,Xh(e)):typeof t=="function"?this.styleTween(e,k2(e,i,wo(this,"style."+e,t))).each(C2(this._id,e)):this.styleTween(e,v2(e,i,t),r).on("end.style."+e,null)}function S2(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function T2(e,t,r){var i,n;function a(){var o=t.apply(this,arguments);return o!==n&&(i=(n=o)&&S2(e,o,r)),i}return a._value=t,a}function B2(e,t,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,T2(e,t,r??""))}function $2(e){return function(){this.textContent=e}}function L2(e){return function(){var t=e(this);this.textContent=t??""}}function M2(e){return this.tween("text",typeof e=="function"?L2(wo(this,"text",e)):$2(e==null?"":e+""))}function A2(e){return function(t){this.textContent=e.call(this,t)}}function E2(e){var t,r;function i(){var n=e.apply(this,arguments);return n!==r&&(t=(r=n)&&A2(n)),t}return i._value=e,i}function F2(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,E2(e))}function P2(){for(var e=this._name,t=this._id,r=Vh(),i=this._groups,n=i.length,a=0;a<n;++a)for(var o=i[a],s=o.length,l,c=0;c<s;++c)if(l=o[c]){var h=ee(l,t);ia(l,e,r,c,o,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new be(i,this._parents,e,r)}function R2(){var e,t,r=this,i=r._id,n=r.size();return new Promise(function(a,o){var s={value:o},l={value:function(){--n===0&&a()}};r.each(function(){var c=ce(this,i),h=c.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),c.on=t}),n===0&&a()})}var O2=0;function be(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function Vh(){return++O2}var fe=Mi.prototype;be.prototype={constructor:be,select:m2,selectAll:y2,selectChild:fe.selectChild,selectChildren:fe.selectChildren,filter:c2,merge:h2,selection:b2,transition:P2,call:fe.call,nodes:fe.nodes,node:fe.node,size:fe.size,empty:fe.empty,each:fe.each,on:f2,attr:G1,attrTween:Q1,style:_2,styleTween:B2,text:M2,textTween:F2,remove:g2,tween:z1,delay:e2,duration:n2,ease:s2,easeVarying:l2,end:R2,[Symbol.iterator]:fe[Symbol.iterator]};function D2(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var N2={time:null,delay:0,duration:250,ease:D2};function I2(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function z2(e){var t,r;e instanceof be?(t=e._id,e=e._name):(t=Vh(),(r=N2).time=xo(),e=e==null?null:e+"");for(var i=this._groups,n=i.length,a=0;a<n;++a)for(var o=i[a],s=o.length,l,c=0;c<s;++c)(l=o[c])&&ia(l,e,t,c,o,r||I2(l,t));return new be(i,this._parents,e,t)}Mi.prototype.interrupt=D1;Mi.prototype.transition=z2;const ds=Math.PI,fs=2*ds,De=1e-6,q2=fs-De;function Zh(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function j2(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Zh;const r=10**t;return function(i){this._+=i[0];for(let n=1,a=i.length;n<a;++n)this._+=Math.round(arguments[n]*r)/r+i[n]}}class W2{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Zh:j2(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,n){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+n}`}bezierCurveTo(t,r,i,n,a,o){this._append`C${+t},${+r},${+i},${+n},${this._x1=+a},${this._y1=+o}`}arcTo(t,r,i,n,a){if(t=+t,r=+r,i=+i,n=+n,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,s=this._y1,l=i-t,c=n-r,h=o-t,u=s-r,d=h*h+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(d>De)if(!(Math.abs(u*l-c*h)>De)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let f=i-o,g=n-s,m=l*l+c*c,y=f*f+g*g,x=Math.sqrt(m),b=Math.sqrt(d),w=a*Math.tan((ds-Math.acos((m+d-y)/(2*x*b)))/2),C=w/b,v=w/x;Math.abs(C-1)>De&&this._append`L${t+C*h},${r+C*u}`,this._append`A${a},${a},0,0,${+(u*f>h*g)},${this._x1=t+v*l},${this._y1=r+v*c}`}}arc(t,r,i,n,a,o){if(t=+t,r=+r,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let s=i*Math.cos(n),l=i*Math.sin(n),c=t+s,h=r+l,u=1^o,d=o?n-a:a-n;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>De||Math.abs(this._y1-h)>De)&&this._append`L${c},${h}`,i&&(d<0&&(d=d%fs+fs),d>q2?this._append`A${i},${i},0,1,${u},${t-s},${r-l}A${i},${i},0,1,${u},${this._x1=c},${this._y1=h}`:d>De&&this._append`A${i},${i},0,${+(d>=ds)},${u},${this._x1=t+i*Math.cos(a)},${this._y1=r+i*Math.sin(a)}`)}rect(t,r,i,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+n}h${-i}Z`}toString(){return this._}}function Ne(e){return function(){return e}}const H2=Math.abs,Y2=Math.atan2,U2=Math.cos,G2=Math.max,X2=Math.min,V2=Math.sin,Z2=Math.sqrt,ps=1e-12,na=Math.PI,gs=na/2,K2=2*na;function Q2(e){return e>1?0:e<-1?na:Math.acos(e)}function J2(e){return e>=1?gs:e<=-1?-gs:Math.asin(e)}function Kh(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new W2(t)}function Qh(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Jh(e){this._context=e}Jh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Sn(e){return new Jh(e)}function tw(e){return e[0]}function ew(e){return e[1]}function tu(e,t){var r=Ne(!0),i=null,n=Sn,a=null,o=Kh(s);e=typeof e=="function"?e:e===void 0?tw:Ne(e),t=typeof t=="function"?t:t===void 0?ew:Ne(t);function s(l){var c,h=(l=Qh(l)).length,u,d=!1,f;for(i==null&&(a=n(f=o())),c=0;c<=h;++c)!(c<h&&r(u=l[c],c,l))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,l),+t(u,c,l));if(f)return a=null,f+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:Ne(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:Ne(+l),s):t},s.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Ne(!!l),s):r},s.curve=function(l){return arguments.length?(n=l,i!=null&&(a=n(i)),s):n},s.context=function(l){return arguments.length?(l==null?i=a=null:a=n(i=l),s):i},s}class eu{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function ru(e){return new eu(e,!0)}function iu(e){return new eu(e,!1)}function $e(){}function Tn(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function aa(e){this._context=e}aa.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Tn(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Tn(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ui(e){return new aa(e)}function nu(e){this._context=e}nu.prototype={areaStart:$e,areaEnd:$e,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Tn(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function rw(e){return new nu(e)}function au(e){this._context=e}au.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:Tn(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function iw(e){return new au(e)}function su(e,t){this._basis=new aa(e),this._beta=t}su.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],n=t[0],a=e[r]-i,o=t[r]-n,s=-1,l;++s<=r;)l=s/r,this._basis.point(this._beta*e[s]+(1-this._beta)*(i+l*a),this._beta*t[s]+(1-this._beta)*(n+l*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const nw=(function e(t){function r(i){return t===1?new aa(i):new su(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function Bn(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function vo(e,t){this._context=e,this._k=(1-t)/6}vo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Bn(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Bn(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const ou=(function e(t){function r(i){return new vo(i,t)}return r.tension=function(i){return e(+i)},r})(0);function ko(e,t){this._context=e,this._k=(1-t)/6}ko.prototype={areaStart:$e,areaEnd:$e,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Bn(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const aw=(function e(t){function r(i){return new ko(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Co(e,t){this._context=e,this._k=(1-t)/6}Co.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Bn(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const sw=(function e(t){function r(i){return new Co(i,t)}return r.tension=function(i){return e(+i)},r})(0);function _o(e,t,r){var i=e._x1,n=e._y1,a=e._x2,o=e._y2;if(e._l01_a>ps){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,n=(n*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>ps){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*c+e._x1*e._l23_2a-t*e._l12_2a)/h,o=(o*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,n,a,o,e._x2,e._y2)}function lu(e,t){this._context=e,this._alpha=t}lu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:_o(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const cu=(function e(t){function r(i){return t?new lu(i,t):new vo(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function hu(e,t){this._context=e,this._alpha=t}hu.prototype={areaStart:$e,areaEnd:$e,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:_o(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const ow=(function e(t){function r(i){return t?new hu(i,t):new ko(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function uu(e,t){this._context=e,this._alpha=t}uu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:_o(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const lw=(function e(t){function r(i){return t?new uu(i,t):new Co(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function du(e){this._context=e}du.prototype={areaStart:$e,areaEnd:$e,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function cw(e){return new du(e)}function Nl(e){return e<0?-1:1}function Il(e,t,r){var i=e._x1-e._x0,n=t-e._x1,a=(e._y1-e._y0)/(i||n<0&&-0),o=(r-e._y1)/(n||i<0&&-0),s=(a*n+o*i)/(i+n);return(Nl(a)+Nl(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function zl(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Da(e,t,r){var i=e._x0,n=e._y0,a=e._x1,o=e._y1,s=(a-i)/3;e._context.bezierCurveTo(i+s,n+s*t,a-s,o-s*r,a,o)}function $n(e){this._context=e}$n.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Da(this,this._t0,zl(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Da(this,zl(this,r=Il(this,e,t)),r);break;default:Da(this,this._t0,r=Il(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function fu(e){this._context=new pu(e)}(fu.prototype=Object.create($n.prototype)).point=function(e,t){$n.prototype.point.call(this,t,e)};function pu(e){this._context=e}pu.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,n,a){this._context.bezierCurveTo(t,e,i,r,a,n)}};function gu(e){return new $n(e)}function mu(e){return new fu(e)}function yu(e){this._context=e}yu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=ql(e),n=ql(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(i[0][a],n[0][a],i[1][a],n[1][a],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function ql(e){var t,r=e.length-1,i,n=new Array(r),a=new Array(r),o=new Array(r);for(n[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)n[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(n[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=n[t]/a[t-1],a[t]-=i,o[t]-=i*o[t-1];for(n[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)n[t]=(o[t]-n[t+1])/a[t];for(a[r-1]=(e[r]+n[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-n[t+1];return[n,a]}function xu(e){return new yu(e)}function sa(e,t){this._context=e,this._t=t}sa.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function bu(e){return new sa(e,.5)}function wu(e){return new sa(e,0)}function vu(e){return new sa(e,1)}function ri(e,t,r){this.k=e,this.x=t,this.y=r}ri.prototype={constructor:ri,scale:function(e){return e===1?this:new ri(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new ri(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};ri.prototype;var ku=p(e=>{const{securityLevel:t}=ut();let r=lt("body");if(t==="sandbox"){const a=lt(`#i${e}`).node()?.contentDocument??document;r=lt(a.body)}return r.select(`#${e}`)},"selectSvgElement");function So(e){return typeof e>"u"||e===null}p(So,"isNothing");function Cu(e){return typeof e=="object"&&e!==null}p(Cu,"isObject");function _u(e){return Array.isArray(e)?e:So(e)?[]:[e]}p(_u,"toArray");function Su(e,t){var r,i,n,a;if(t)for(a=Object.keys(t),r=0,i=a.length;r<i;r+=1)n=a[r],e[n]=t[n];return e}p(Su,"extend");function Tu(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}p(Tu,"repeat");function Bu(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}p(Bu,"isNegativeZero");var hw=So,uw=Cu,dw=_u,fw=Tu,pw=Bu,gw=Su,Ct={isNothing:hw,isObject:uw,toArray:dw,repeat:fw,isNegativeZero:pw,extend:gw};function To(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
|
|
136
|
+
|
|
137
|
+
`+e.mark.snippet),i+" "+r):i}p(To,"formatError");function Mr(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=To(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}p(Mr,"YAMLException$1");Mr.prototype=Object.create(Error.prototype);Mr.prototype.constructor=Mr;Mr.prototype.toString=p(function(t){return this.name+": "+To(this,t)},"toString");var jt=Mr;function sn(e,t,r,i,n){var a="",o="",s=Math.floor(n/2)-1;return i-t>s&&(a=" ... ",t=i-s+a.length),r-i>s&&(o=" ...",r=i+s-o.length),{str:a+e.slice(t,r).replace(/\t/g,"→")+o,pos:i-t+a.length}}p(sn,"getLine");function on(e,t){return Ct.repeat(" ",t-e.length)+e}p(on,"padStart");function $u(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],n=[],a,o=-1;a=r.exec(e.buffer);)n.push(a.index),i.push(a.index+a[0].length),e.position<=a.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var s="",l,c,h=Math.min(e.line+t.linesAfter,n.length).toString().length,u=t.maxLength-(t.indent+h+3);for(l=1;l<=t.linesBefore&&!(o-l<0);l++)c=sn(e.buffer,i[o-l],n[o-l],e.position-(i[o]-i[o-l]),u),s=Ct.repeat(" ",t.indent)+on((e.line-l+1).toString(),h)+" | "+c.str+`
|
|
138
|
+
`+s;for(c=sn(e.buffer,i[o],n[o],e.position,u),s+=Ct.repeat(" ",t.indent)+on((e.line+1).toString(),h)+" | "+c.str+`
|
|
139
|
+
`,s+=Ct.repeat("-",t.indent+h+3+c.pos)+`^
|
|
140
|
+
`,l=1;l<=t.linesAfter&&!(o+l>=n.length);l++)c=sn(e.buffer,i[o+l],n[o+l],e.position-(i[o]-i[o+l]),u),s+=Ct.repeat(" ",t.indent)+on((e.line+l+1).toString(),h)+" | "+c.str+`
|
|
141
|
+
`;return s.replace(/\n$/,"")}p($u,"makeSnippet");var mw=$u,yw=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],xw=["scalar","sequence","mapping"];function Lu(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}p(Lu,"compileStyleAliases");function Mu(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(yw.indexOf(r)===-1)throw new jt('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=Lu(t.styleAliases||null),xw.indexOf(this.kind)===-1)throw new jt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}p(Mu,"Type$1");var Ft=Mu;function ms(e,t){var r=[];return e[t].forEach(function(i){var n=r.length;r.forEach(function(a,o){a.tag===i.tag&&a.kind===i.kind&&a.multi===i.multi&&(n=o)}),r[n]=i}),r}p(ms,"compileList");function Au(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(n){n.multi?(e.multi[n.kind].push(n),e.multi.fallback.push(n)):e[n.kind][n.tag]=e.fallback[n.tag]=n}for(p(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}p(Au,"compileMap");function Ln(e){return this.extend(e)}p(Ln,"Schema$1");Ln.prototype.extend=p(function(t){var r=[],i=[];if(t instanceof Ft)i.push(t);else if(Array.isArray(t))i=i.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit));else throw new jt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof Ft))throw new jt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new jt("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new jt("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(a){if(!(a instanceof Ft))throw new jt("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(Ln.prototype);return n.implicit=(this.implicit||[]).concat(r),n.explicit=(this.explicit||[]).concat(i),n.compiledImplicit=ms(n,"implicit"),n.compiledExplicit=ms(n,"explicit"),n.compiledTypeMap=Au(n.compiledImplicit,n.compiledExplicit),n},"extend");var bw=Ln,ww=new Ft("tag:yaml.org,2002:str",{kind:"scalar",construct:p(function(e){return e!==null?e:""},"construct")}),vw=new Ft("tag:yaml.org,2002:seq",{kind:"sequence",construct:p(function(e){return e!==null?e:[]},"construct")}),kw=new Ft("tag:yaml.org,2002:map",{kind:"mapping",construct:p(function(e){return e!==null?e:{}},"construct")}),Cw=new bw({explicit:[ww,vw,kw]});function Eu(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}p(Eu,"resolveYamlNull");function Fu(){return null}p(Fu,"constructYamlNull");function Pu(e){return e===null}p(Pu,"isNull");var _w=new Ft("tag:yaml.org,2002:null",{kind:"scalar",resolve:Eu,construct:Fu,predicate:Pu,represent:{canonical:p(function(){return"~"},"canonical"),lowercase:p(function(){return"null"},"lowercase"),uppercase:p(function(){return"NULL"},"uppercase"),camelcase:p(function(){return"Null"},"camelcase"),empty:p(function(){return""},"empty")},defaultStyle:"lowercase"});function Ru(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}p(Ru,"resolveYamlBoolean");function Ou(e){return e==="true"||e==="True"||e==="TRUE"}p(Ou,"constructYamlBoolean");function Du(e){return Object.prototype.toString.call(e)==="[object Boolean]"}p(Du,"isBoolean");var Sw=new Ft("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Ru,construct:Ou,predicate:Du,represent:{lowercase:p(function(e){return e?"true":"false"},"lowercase"),uppercase:p(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:p(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function Nu(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}p(Nu,"isHexCode");function Iu(e){return 48<=e&&e<=55}p(Iu,"isOctCode");function zu(e){return 48<=e&&e<=57}p(zu,"isDecCode");function qu(e){if(e===null)return!1;var t=e.length,r=0,i=!1,n;if(!t)return!1;if(n=e[r],(n==="-"||n==="+")&&(n=e[++r]),n==="0"){if(r+1===t)return!0;if(n=e[++r],n==="b"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(n!=="0"&&n!=="1")return!1;i=!0}return i&&n!=="_"}if(n==="x"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!Nu(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}if(n==="o"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!Iu(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}}if(n==="_")return!1;for(;r<t;r++)if(n=e[r],n!=="_"){if(!zu(e.charCodeAt(r)))return!1;i=!0}return!(!i||n==="_")}p(qu,"resolveYamlInteger");function ju(e){var t=e,r=1,i;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0")return 0;if(i==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}p(ju,"constructYamlInteger");function Wu(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Ct.isNegativeZero(e)}p(Wu,"isInteger");var Tw=new Ft("tag:yaml.org,2002:int",{kind:"scalar",resolve:qu,construct:ju,predicate:Wu,represent:{binary:p(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:p(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:p(function(e){return e.toString(10)},"decimal"),hexadecimal:p(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Bw=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Hu(e){return!(e===null||!Bw.test(e)||e[e.length-1]==="_")}p(Hu,"resolveYamlFloat");function Yu(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}p(Yu,"constructYamlFloat");var $w=/^[-+]?[0-9]+e/;function Uu(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Ct.isNegativeZero(e))return"-0.0";return r=e.toString(10),$w.test(r)?r.replace("e",".e"):r}p(Uu,"representYamlFloat");function Gu(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Ct.isNegativeZero(e))}p(Gu,"isFloat");var Lw=new Ft("tag:yaml.org,2002:float",{kind:"scalar",resolve:Hu,construct:Yu,predicate:Gu,represent:Uu,defaultStyle:"lowercase"}),Xu=Cw.extend({implicit:[_w,Sw,Tw,Lw]}),Mw=Xu,Vu=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Zu=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function Ku(e){return e===null?!1:Vu.exec(e)!==null||Zu.exec(e)!==null}p(Ku,"resolveYamlTimestamp");function Qu(e){var t,r,i,n,a,o,s,l=0,c=null,h,u,d;if(t=Vu.exec(e),t===null&&(t=Zu.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,n=+t[3],!t[4])return new Date(Date.UTC(r,i,n));if(a=+t[4],o=+t[5],s=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(h=+t[10],u=+(t[11]||0),c=(h*60+u)*6e4,t[9]==="-"&&(c=-c)),d=new Date(Date.UTC(r,i,n,a,o,s,l)),c&&d.setTime(d.getTime()-c),d}p(Qu,"constructYamlTimestamp");function Ju(e){return e.toISOString()}p(Ju,"representYamlTimestamp");var Aw=new Ft("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Ku,construct:Qu,instanceOf:Date,represent:Ju});function td(e){return e==="<<"||e===null}p(td,"resolveYamlMerge");var Ew=new Ft("tag:yaml.org,2002:merge",{kind:"scalar",resolve:td}),Bo=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
142
|
+
\r`;function ed(e){if(e===null)return!1;var t,r,i=0,n=e.length,a=Bo;for(r=0;r<n;r++)if(t=a.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}p(ed,"resolveYamlBinary");function rd(e){var t,r,i=e.replace(/[\r\n=]/g,""),n=i.length,a=Bo,o=0,s=[];for(t=0;t<n;t++)t%4===0&&t&&(s.push(o>>16&255),s.push(o>>8&255),s.push(o&255)),o=o<<6|a.indexOf(i.charAt(t));return r=n%4*6,r===0?(s.push(o>>16&255),s.push(o>>8&255),s.push(o&255)):r===18?(s.push(o>>10&255),s.push(o>>2&255)):r===12&&s.push(o>>4&255),new Uint8Array(s)}p(rd,"constructYamlBinary");function id(e){var t="",r=0,i,n,a=e.length,o=Bo;for(i=0;i<a;i++)i%3===0&&i&&(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]),r=(r<<8)+e[i];return n=a%3,n===0?(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]):n===2?(t+=o[r>>10&63],t+=o[r>>4&63],t+=o[r<<2&63],t+=o[64]):n===1&&(t+=o[r>>2&63],t+=o[r<<4&63],t+=o[64],t+=o[64]),t}p(id,"representYamlBinary");function nd(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}p(nd,"isBinary");var Fw=new Ft("tag:yaml.org,2002:binary",{kind:"scalar",resolve:ed,construct:rd,predicate:nd,represent:id}),Pw=Object.prototype.hasOwnProperty,Rw=Object.prototype.toString;function ad(e){if(e===null)return!0;var t=[],r,i,n,a,o,s=e;for(r=0,i=s.length;r<i;r+=1){if(n=s[r],o=!1,Rw.call(n)!=="[object Object]")return!1;for(a in n)if(Pw.call(n,a))if(!o)o=!0;else return!1;if(!o)return!1;if(t.indexOf(a)===-1)t.push(a);else return!1}return!0}p(ad,"resolveYamlOmap");function sd(e){return e!==null?e:[]}p(sd,"constructYamlOmap");var Ow=new Ft("tag:yaml.org,2002:omap",{kind:"sequence",resolve:ad,construct:sd}),Dw=Object.prototype.toString;function od(e){if(e===null)return!0;var t,r,i,n,a,o=e;for(a=new Array(o.length),t=0,r=o.length;t<r;t+=1){if(i=o[t],Dw.call(i)!=="[object Object]"||(n=Object.keys(i),n.length!==1))return!1;a[t]=[n[0],i[n[0]]]}return!0}p(od,"resolveYamlPairs");function ld(e){if(e===null)return[];var t,r,i,n,a,o=e;for(a=new Array(o.length),t=0,r=o.length;t<r;t+=1)i=o[t],n=Object.keys(i),a[t]=[n[0],i[n[0]]];return a}p(ld,"constructYamlPairs");var Nw=new Ft("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:od,construct:ld}),Iw=Object.prototype.hasOwnProperty;function cd(e){if(e===null)return!0;var t,r=e;for(t in r)if(Iw.call(r,t)&&r[t]!==null)return!1;return!0}p(cd,"resolveYamlSet");function hd(e){return e!==null?e:{}}p(hd,"constructYamlSet");var zw=new Ft("tag:yaml.org,2002:set",{kind:"mapping",resolve:cd,construct:hd}),ud=Mw.extend({implicit:[Aw,Ew],explicit:[Fw,Ow,Nw,zw]}),Le=Object.prototype.hasOwnProperty,Mn=1,dd=2,fd=3,An=4,Na=1,qw=2,jl=3,jw=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Ww=/[\x85\u2028\u2029]/,Hw=/[,\[\]\{\}]/,pd=/^(?:!|!!|![a-z\-]+!)$/i,gd=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function ys(e){return Object.prototype.toString.call(e)}p(ys,"_class");function Qt(e){return e===10||e===13}p(Qt,"is_EOL");function Be(e){return e===9||e===32}p(Be,"is_WHITE_SPACE");function Nt(e){return e===9||e===32||e===10||e===13}p(Nt,"is_WS_OR_EOL");function je(e){return e===44||e===91||e===93||e===123||e===125}p(je,"is_FLOW_INDICATOR");function md(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}p(md,"fromHexCode");function yd(e){return e===120?2:e===117?4:e===85?8:0}p(yd,"escapedHexLen");function xd(e){return 48<=e&&e<=57?e-48:-1}p(xd,"fromDecimalCode");function xs(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
|
143
|
+
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"
":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}p(xs,"simpleEscapeSequence");function bd(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}p(bd,"charFromCodepoint");var wd=new Array(256),vd=new Array(256);for(Oe=0;Oe<256;Oe++)wd[Oe]=xs(Oe)?1:0,vd[Oe]=xs(Oe);var Oe;function kd(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||ud,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}p(kd,"State$1");function $o(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=mw(r),new jt(t,r)}p($o,"generateError");function tt(e,t){throw $o(e,t)}p(tt,"throwError");function xi(e,t){e.onWarning&&e.onWarning.call(null,$o(e,t))}p(xi,"throwWarning");var Wl={YAML:p(function(t,r,i){var n,a,o;t.version!==null&&tt(t,"duplication of %YAML directive"),i.length!==1&&tt(t,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&tt(t,"ill-formed argument of the YAML directive"),a=parseInt(n[1],10),o=parseInt(n[2],10),a!==1&&tt(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&xi(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:p(function(t,r,i){var n,a;i.length!==2&&tt(t,"TAG directive accepts exactly two arguments"),n=i[0],a=i[1],pd.test(n)||tt(t,"ill-formed tag handle (first argument) of the TAG directive"),Le.call(t.tagMap,n)&&tt(t,'there is a previously declared suffix for "'+n+'" tag handle'),gd.test(a)||tt(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{tt(t,"tag prefix is malformed: "+a)}t.tagMap[n]=a},"handleTagDirective")};function xe(e,t,r,i){var n,a,o,s;if(t<r){if(s=e.input.slice(t,r),i)for(n=0,a=s.length;n<a;n+=1)o=s.charCodeAt(n),o===9||32<=o&&o<=1114111||tt(e,"expected valid JSON character");else jw.test(s)&&tt(e,"the stream contains non-printable characters");e.result+=s}}p(xe,"captureSegment");function bs(e,t,r,i){var n,a,o,s;for(Ct.isObject(r)||tt(e,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(r),o=0,s=n.length;o<s;o+=1)a=n[o],Le.call(t,a)||(t[a]=r[a],i[a]=!0)}p(bs,"mergeMappings");function We(e,t,r,i,n,a,o,s,l){var c,h;if(Array.isArray(n))for(n=Array.prototype.slice.call(n),c=0,h=n.length;c<h;c+=1)Array.isArray(n[c])&&tt(e,"nested arrays are not supported inside keys"),typeof n=="object"&&ys(n[c])==="[object Object]"&&(n[c]="[object Object]");if(typeof n=="object"&&ys(n)==="[object Object]"&&(n="[object Object]"),n=String(n),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(c=0,h=a.length;c<h;c+=1)bs(e,t,a[c],r);else bs(e,t,a,r);else!e.json&&!Le.call(r,n)&&Le.call(t,n)&&(e.line=o||e.line,e.lineStart=s||e.lineStart,e.position=l||e.position,tt(e,"duplicated mapping key")),n==="__proto__"?Object.defineProperty(t,n,{configurable:!0,enumerable:!0,writable:!0,value:a}):t[n]=a,delete r[n];return t}p(We,"storeMappingPair");function oa(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):tt(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}p(oa,"readLineBreak");function yt(e,t,r){for(var i=0,n=e.input.charCodeAt(e.position);n!==0;){for(;Be(n);)n===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),n=e.input.charCodeAt(++e.position);if(t&&n===35)do n=e.input.charCodeAt(++e.position);while(n!==10&&n!==13&&n!==0);if(Qt(n))for(oa(e),n=e.input.charCodeAt(e.position),i++,e.lineIndent=0;n===32;)e.lineIndent++,n=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&xi(e,"deficient indentation"),i}p(yt,"skipSeparationSpace");function Ai(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||Nt(r)))}p(Ai,"testDocumentSeparator");function la(e,t){t===1?e.result+=" ":t>1&&(e.result+=Ct.repeat(`
|
|
144
|
+
`,t-1))}p(la,"writeFoldedLines");function Cd(e,t,r){var i,n,a,o,s,l,c,h,u=e.kind,d=e.result,f;if(f=e.input.charCodeAt(e.position),Nt(f)||je(f)||f===35||f===38||f===42||f===33||f===124||f===62||f===39||f===34||f===37||f===64||f===96||(f===63||f===45)&&(n=e.input.charCodeAt(e.position+1),Nt(n)||r&&je(n)))return!1;for(e.kind="scalar",e.result="",a=o=e.position,s=!1;f!==0;){if(f===58){if(n=e.input.charCodeAt(e.position+1),Nt(n)||r&&je(n))break}else if(f===35){if(i=e.input.charCodeAt(e.position-1),Nt(i))break}else{if(e.position===e.lineStart&&Ai(e)||r&&je(f))break;if(Qt(f))if(l=e.line,c=e.lineStart,h=e.lineIndent,yt(e,!1,-1),e.lineIndent>=t){s=!0,f=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=l,e.lineStart=c,e.lineIndent=h;break}}s&&(xe(e,a,o,!1),la(e,e.line-l),a=o=e.position,s=!1),Be(f)||(o=e.position+1),f=e.input.charCodeAt(++e.position)}return xe(e,a,o,!1),e.result?!0:(e.kind=u,e.result=d,!1)}p(Cd,"readPlainScalar");function _d(e,t){var r,i,n;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=n=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(xe(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,n=e.position;else return!0;else Qt(r)?(xe(e,i,n,!0),la(e,yt(e,!1,t)),i=n=e.position):e.position===e.lineStart&&Ai(e)?tt(e,"unexpected end of the document within a single quoted scalar"):(e.position++,n=e.position);tt(e,"unexpected end of the stream within a single quoted scalar")}p(_d,"readSingleQuotedScalar");function Sd(e,t){var r,i,n,a,o,s;if(s=e.input.charCodeAt(e.position),s!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(s=e.input.charCodeAt(e.position))!==0;){if(s===34)return xe(e,r,e.position,!0),e.position++,!0;if(s===92){if(xe(e,r,e.position,!0),s=e.input.charCodeAt(++e.position),Qt(s))yt(e,!1,t);else if(s<256&&wd[s])e.result+=vd[s],e.position++;else if((o=yd(s))>0){for(n=o,a=0;n>0;n--)s=e.input.charCodeAt(++e.position),(o=md(s))>=0?a=(a<<4)+o:tt(e,"expected hexadecimal character");e.result+=bd(a),e.position++}else tt(e,"unknown escape sequence");r=i=e.position}else Qt(s)?(xe(e,r,i,!0),la(e,yt(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Ai(e)?tt(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}tt(e,"unexpected end of the stream within a double quoted scalar")}p(Sd,"readDoubleQuotedScalar");function Td(e,t){var r=!0,i,n,a,o=e.tag,s,l=e.anchor,c,h,u,d,f,g=Object.create(null),m,y,x,b;if(b=e.input.charCodeAt(e.position),b===91)h=93,f=!1,s=[];else if(b===123)h=125,f=!0,s={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),b=e.input.charCodeAt(++e.position);b!==0;){if(yt(e,!0,t),b=e.input.charCodeAt(e.position),b===h)return e.position++,e.tag=o,e.anchor=l,e.kind=f?"mapping":"sequence",e.result=s,!0;r?b===44&&tt(e,"expected the node content, but found ','"):tt(e,"missed comma between flow collection entries"),y=m=x=null,u=d=!1,b===63&&(c=e.input.charCodeAt(e.position+1),Nt(c)&&(u=d=!0,e.position++,yt(e,!0,t))),i=e.line,n=e.lineStart,a=e.position,Qe(e,t,Mn,!1,!0),y=e.tag,m=e.result,yt(e,!0,t),b=e.input.charCodeAt(e.position),(d||e.line===i)&&b===58&&(u=!0,b=e.input.charCodeAt(++e.position),yt(e,!0,t),Qe(e,t,Mn,!1,!0),x=e.result),f?We(e,s,g,y,m,x,i,n,a):u?s.push(We(e,null,g,y,m,x,i,n,a)):s.push(m),yt(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}tt(e,"unexpected end of the stream within a flow collection")}p(Td,"readFlowCollection");function Bd(e,t){var r,i,n=Na,a=!1,o=!1,s=t,l=0,c=!1,h,u;if(u=e.input.charCodeAt(e.position),u===124)i=!1;else if(u===62)i=!0;else return!1;for(e.kind="scalar",e.result="";u!==0;)if(u=e.input.charCodeAt(++e.position),u===43||u===45)Na===n?n=u===43?jl:qw:tt(e,"repeat of a chomping mode identifier");else if((h=xd(u))>=0)h===0?tt(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?tt(e,"repeat of an indentation width identifier"):(s=t+h-1,o=!0);else break;if(Be(u)){do u=e.input.charCodeAt(++e.position);while(Be(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!Qt(u)&&u!==0)}for(;u!==0;){for(oa(e),e.lineIndent=0,u=e.input.charCodeAt(e.position);(!o||e.lineIndent<s)&&u===32;)e.lineIndent++,u=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>s&&(s=e.lineIndent),Qt(u)){l++;continue}if(e.lineIndent<s){n===jl?e.result+=Ct.repeat(`
|
|
145
|
+
`,a?1+l:l):n===Na&&a&&(e.result+=`
|
|
146
|
+
`);break}for(i?Be(u)?(c=!0,e.result+=Ct.repeat(`
|
|
147
|
+
`,a?1+l:l)):c?(c=!1,e.result+=Ct.repeat(`
|
|
148
|
+
`,l+1)):l===0?a&&(e.result+=" "):e.result+=Ct.repeat(`
|
|
149
|
+
`,l):e.result+=Ct.repeat(`
|
|
150
|
+
`,a?1+l:l),a=!0,o=!0,l=0,r=e.position;!Qt(u)&&u!==0;)u=e.input.charCodeAt(++e.position);xe(e,r,e.position,!1)}return!0}p(Bd,"readBlockScalar");function ws(e,t){var r,i=e.tag,n=e.anchor,a=[],o,s=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,tt(e,"tab characters must not be used in indentation")),!(l!==45||(o=e.input.charCodeAt(e.position+1),!Nt(o))));){if(s=!0,e.position++,yt(e,!0,-1)&&e.lineIndent<=t){a.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,Qe(e,t,fd,!1,!0),a.push(e.result),yt(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)tt(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return s?(e.tag=i,e.anchor=n,e.kind="sequence",e.result=a,!0):!1}p(ws,"readBlockSequence");function $d(e,t,r){var i,n,a,o,s,l,c=e.tag,h=e.anchor,u={},d=Object.create(null),f=null,g=null,m=null,y=!1,x=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),b=e.input.charCodeAt(e.position);b!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,tt(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),a=e.line,(b===63||b===58)&&Nt(i))b===63?(y&&(We(e,u,d,f,g,null,o,s,l),f=g=m=null),x=!0,y=!0,n=!0):y?(y=!1,n=!0):tt(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,b=i;else{if(o=e.line,s=e.lineStart,l=e.position,!Qe(e,r,dd,!1,!0))break;if(e.line===a){for(b=e.input.charCodeAt(e.position);Be(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),Nt(b)||tt(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(We(e,u,d,f,g,null,o,s,l),f=g=m=null),x=!0,y=!1,n=!1,f=e.tag,g=e.result;else if(x)tt(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=h,!0}else if(x)tt(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=c,e.anchor=h,!0}if((e.line===a||e.lineIndent>t)&&(y&&(o=e.line,s=e.lineStart,l=e.position),Qe(e,t,An,!0,n)&&(y?g=e.result:m=e.result),y||(We(e,u,d,f,g,m,o,s,l),f=g=m=null),yt(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&b!==0)tt(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&We(e,u,d,f,g,null,o,s,l),x&&(e.tag=c,e.anchor=h,e.kind="mapping",e.result=u),x}p($d,"readBlockMapping");function Ld(e){var t,r=!1,i=!1,n,a,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&tt(e,"duplication of a tag property"),o=e.input.charCodeAt(++e.position),o===60?(r=!0,o=e.input.charCodeAt(++e.position)):o===33?(i=!0,n="!!",o=e.input.charCodeAt(++e.position)):n="!",t=e.position,r){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(a=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):tt(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!Nt(o);)o===33&&(i?tt(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),pd.test(n)||tt(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);a=e.input.slice(t,e.position),Hw.test(a)&&tt(e,"tag suffix cannot contain flow indicator characters")}a&&!gd.test(a)&&tt(e,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{tt(e,"tag name is malformed: "+a)}return r?e.tag=a:Le.call(e.tagMap,n)?e.tag=e.tagMap[n]+a:n==="!"?e.tag="!"+a:n==="!!"?e.tag="tag:yaml.org,2002:"+a:tt(e,'undeclared tag handle "'+n+'"'),!0}p(Ld,"readTagProperty");function Md(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&tt(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Nt(r)&&!je(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&tt(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}p(Md,"readAnchorProperty");function Ad(e){var t,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!Nt(i)&&!je(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&tt(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Le.call(e.anchorMap,r)||tt(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],yt(e,!0,-1),!0}p(Ad,"readAlias");function Qe(e,t,r,i,n){var a,o,s,l=1,c=!1,h=!1,u,d,f,g,m,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=o=s=An===r||fd===r,i&&yt(e,!0,-1)&&(c=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;Ld(e)||Md(e);)yt(e,!0,-1)?(c=!0,s=a,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):s=!1;if(s&&(s=c||n),(l===1||An===r)&&(Mn===r||dd===r?m=t:m=t+1,y=e.position-e.lineStart,l===1?s&&(ws(e,y)||$d(e,y,m))||Td(e,m)?h=!0:(o&&Bd(e,m)||_d(e,m)||Sd(e,m)?h=!0:Ad(e)?(h=!0,(e.tag!==null||e.anchor!==null)&&tt(e,"alias node should not have any properties")):Cd(e,m,Mn===r)&&(h=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(h=s&&ws(e,y))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&tt(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),u=0,d=e.implicitTypes.length;u<d;u+=1)if(g=e.implicitTypes[u],g.resolve(e.result)){e.result=g.construct(e.result),e.tag=g.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(Le.call(e.typeMap[e.kind||"fallback"],e.tag))g=e.typeMap[e.kind||"fallback"][e.tag];else for(g=null,f=e.typeMap.multi[e.kind||"fallback"],u=0,d=f.length;u<d;u+=1)if(e.tag.slice(0,f[u].tag.length)===f[u].tag){g=f[u];break}g||tt(e,"unknown tag !<"+e.tag+">"),e.result!==null&&g.kind!==e.kind&&tt(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+g.kind+'", not "'+e.kind+'"'),g.resolve(e.result,e.tag)?(e.result=g.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):tt(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||h}p(Qe,"composeNode");function Ed(e){var t=e.position,r,i,n,a=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(yt(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(a=!0,o=e.input.charCodeAt(++e.position),r=e.position;o!==0&&!Nt(o);)o=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),n=[],i.length<1&&tt(e,"directive name must not be less than one character in length");o!==0;){for(;Be(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!Qt(o));break}if(Qt(o))break;for(r=e.position;o!==0&&!Nt(o);)o=e.input.charCodeAt(++e.position);n.push(e.input.slice(r,e.position))}o!==0&&oa(e),Le.call(Wl,i)?Wl[i](e,i,n):xi(e,'unknown document directive "'+i+'"')}if(yt(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,yt(e,!0,-1)):a&&tt(e,"directives end mark is expected"),Qe(e,e.lineIndent-1,An,!1,!0),yt(e,!0,-1),e.checkLineBreaks&&Ww.test(e.input.slice(t,e.position))&&xi(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Ai(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,yt(e,!0,-1));return}if(e.position<e.length-1)tt(e,"end of the stream or a document separator is expected");else return}p(Ed,"readDocument");function Lo(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
151
|
+
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new kd(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,tt(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)Ed(r);return r.documents}p(Lo,"loadDocuments");function Yw(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=Lo(e,r);if(typeof t!="function")return i;for(var n=0,a=i.length;n<a;n+=1)t(i[n])}p(Yw,"loadAll$1");function Fd(e,t){var r=Lo(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new jt("expected a single document in the stream, but found more")}}p(Fd,"load$1");var Uw=Fd,Gw={load:Uw},Pd=Object.prototype.toString,Rd=Object.prototype.hasOwnProperty,Mo=65279,Xw=9,bi=10,Vw=13,Zw=32,Kw=33,Qw=34,vs=35,Jw=37,tv=38,ev=39,rv=42,Od=44,iv=45,En=58,nv=61,av=62,sv=63,ov=64,Dd=91,Nd=93,lv=96,Id=123,cv=124,zd=125,Rt={};Rt[0]="\\0";Rt[7]="\\a";Rt[8]="\\b";Rt[9]="\\t";Rt[10]="\\n";Rt[11]="\\v";Rt[12]="\\f";Rt[13]="\\r";Rt[27]="\\e";Rt[34]='\\"';Rt[92]="\\\\";Rt[133]="\\N";Rt[160]="\\_";Rt[8232]="\\L";Rt[8233]="\\P";var hv=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],uv=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function qd(e,t){var r,i,n,a,o,s,l;if(t===null)return{};for(r={},i=Object.keys(t),n=0,a=i.length;n<a;n+=1)o=i[n],s=String(t[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),l=e.compiledTypeMap.fallback[o],l&&Rd.call(l.styleAliases,s)&&(s=l.styleAliases[s]),r[o]=s;return r}p(qd,"compileStyleMap");function jd(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new jt("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Ct.repeat("0",i-t.length)+t}p(jd,"encodeHex");var dv=1,wi=2;function Wd(e){this.schema=e.schema||ud,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Ct.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=qd(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?wi:dv,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}p(Wd,"State");function ks(e,t){for(var r=Ct.repeat(" ",t),i=0,n=-1,a="",o,s=e.length;i<s;)n=e.indexOf(`
|
|
152
|
+
`,i),n===-1?(o=e.slice(i),i=s):(o=e.slice(i,n+1),i=n+1),o.length&&o!==`
|
|
153
|
+
`&&(a+=r),a+=o;return a}p(ks,"indentString");function Fn(e,t){return`
|
|
154
|
+
`+Ct.repeat(" ",e.indent*t)}p(Fn,"generateNextLine");function Hd(e,t){var r,i,n;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(n=e.implicitTypes[r],n.resolve(t))return!0;return!1}p(Hd,"testImplicitResolving");function vi(e){return e===Zw||e===Xw}p(vi,"isWhitespace");function Ar(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Mo||65536<=e&&e<=1114111}p(Ar,"isPrintable");function Cs(e){return Ar(e)&&e!==Mo&&e!==Vw&&e!==bi}p(Cs,"isNsCharOrWhitespace");function _s(e,t,r){var i=Cs(e),n=i&&!vi(e);return(r?i:i&&e!==Od&&e!==Dd&&e!==Nd&&e!==Id&&e!==zd)&&e!==vs&&!(t===En&&!n)||Cs(t)&&!vi(t)&&e===vs||t===En&&n}p(_s,"isPlainSafe");function Yd(e){return Ar(e)&&e!==Mo&&!vi(e)&&e!==iv&&e!==sv&&e!==En&&e!==Od&&e!==Dd&&e!==Nd&&e!==Id&&e!==zd&&e!==vs&&e!==tv&&e!==rv&&e!==Kw&&e!==cv&&e!==nv&&e!==av&&e!==ev&&e!==Qw&&e!==Jw&&e!==ov&&e!==lv}p(Yd,"isPlainSafeFirst");function Ud(e){return!vi(e)&&e!==En}p(Ud,"isPlainSafeLast");function fr(e,t){var r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&t+1<e.length&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}p(fr,"codePointAt");function Ao(e){var t=/^\n* /;return t.test(e)}p(Ao,"needIndentIndicator");var Gd=1,Ss=2,Xd=3,Vd=4,cr=5;function Zd(e,t,r,i,n,a,o,s){var l,c=0,h=null,u=!1,d=!1,f=i!==-1,g=-1,m=Yd(fr(e,0))&&Ud(fr(e,e.length-1));if(t||o)for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=fr(e,l),!Ar(c))return cr;m=m&&_s(c,h,s),h=c}else{for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=fr(e,l),c===bi)u=!0,f&&(d=d||l-g-1>i&&e[g+1]!==" ",g=l);else if(!Ar(c))return cr;m=m&&_s(c,h,s),h=c}d=d||f&&l-g-1>i&&e[g+1]!==" "}return!u&&!d?m&&!o&&!n(e)?Gd:a===wi?cr:Ss:r>9&&Ao(e)?cr:o?a===wi?cr:Ss:d?Vd:Xd}p(Zd,"chooseScalarStyle");function Kd(e,t,r,i,n){e.dump=(function(){if(t.length===0)return e.quotingType===wi?'""':"''";if(!e.noCompatMode&&(hv.indexOf(t)!==-1||uv.test(t)))return e.quotingType===wi?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),s=i||e.flowLevel>-1&&r>=e.flowLevel;function l(c){return Hd(e,c)}switch(p(l,"testAmbiguity"),Zd(t,s,e.indent,o,l,e.quotingType,e.forceQuotes&&!i,n)){case Gd:return t;case Ss:return"'"+t.replace(/'/g,"''")+"'";case Xd:return"|"+Ts(t,e.indent)+Bs(ks(t,a));case Vd:return">"+Ts(t,e.indent)+Bs(ks(Qd(t,o),a));case cr:return'"'+Jd(t)+'"';default:throw new jt("impossible error: invalid scalar style")}})()}p(Kd,"writeScalar");function Ts(e,t){var r=Ao(e)?String(t):"",i=e[e.length-1]===`
|
|
155
|
+
`,n=i&&(e[e.length-2]===`
|
|
156
|
+
`||e===`
|
|
157
|
+
`),a=n?"+":i?"":"-";return r+a+`
|
|
158
|
+
`}p(Ts,"blockHeader");function Bs(e){return e[e.length-1]===`
|
|
159
|
+
`?e.slice(0,-1):e}p(Bs,"dropEndingNewline");function Qd(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var c=e.indexOf(`
|
|
160
|
+
`);return c=c!==-1?c:e.length,r.lastIndex=c,$s(e.slice(0,c),t)})(),n=e[0]===`
|
|
161
|
+
`||e[0]===" ",a,o;o=r.exec(e);){var s=o[1],l=o[2];a=l[0]===" ",i+=s+(!n&&!a&&l!==""?`
|
|
162
|
+
`:"")+$s(l,t),n=a}return i}p(Qd,"foldString");function $s(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,n=0,a,o=0,s=0,l="";i=r.exec(e);)s=i.index,s-n>t&&(a=o>n?o:s,l+=`
|
|
163
|
+
`+e.slice(n,a),n=a+1),o=s;return l+=`
|
|
164
|
+
`,e.length-n>t&&o>n?l+=e.slice(n,o)+`
|
|
165
|
+
`+e.slice(o+1):l+=e.slice(n),l.slice(1)}p($s,"foldLine");function Jd(e){for(var t="",r=0,i,n=0;n<e.length;r>=65536?n+=2:n++)r=fr(e,n),i=Rt[r],!i&&Ar(r)?(t+=e[n],r>=65536&&(t+=e[n+1])):t+=i||jd(r);return t}p(Jd,"escapeString");function tf(e,t,r){var i="",n=e.tag,a,o,s;for(a=0,o=r.length;a<o;a+=1)s=r[a],e.replacer&&(s=e.replacer.call(r,String(a),s)),(oe(e,t,s,!1,!1)||typeof s>"u"&&oe(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=n,e.dump="["+i+"]"}p(tf,"writeFlowSequence");function Ls(e,t,r,i){var n="",a=e.tag,o,s,l;for(o=0,s=r.length;o<s;o+=1)l=r[o],e.replacer&&(l=e.replacer.call(r,String(o),l)),(oe(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&oe(e,t+1,null,!0,!0,!1,!0))&&((!i||n!=="")&&(n+=Fn(e,t)),e.dump&&bi===e.dump.charCodeAt(0)?n+="-":n+="- ",n+=e.dump);e.tag=a,e.dump=n||"[]"}p(Ls,"writeBlockSequence");function ef(e,t,r){var i="",n=e.tag,a=Object.keys(r),o,s,l,c,h;for(o=0,s=a.length;o<s;o+=1)h="",i!==""&&(h+=", "),e.condenseFlow&&(h+='"'),l=a[o],c=r[l],e.replacer&&(c=e.replacer.call(r,l,c)),oe(e,t,l,!1,!1)&&(e.dump.length>1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),oe(e,t,c,!1,!1)&&(h+=e.dump,i+=h));e.tag=n,e.dump="{"+i+"}"}p(ef,"writeFlowMapping");function rf(e,t,r,i){var n="",a=e.tag,o=Object.keys(r),s,l,c,h,u,d;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new jt("sortKeys must be a boolean or a function");for(s=0,l=o.length;s<l;s+=1)d="",(!i||n!=="")&&(d+=Fn(e,t)),c=o[s],h=r[c],e.replacer&&(h=e.replacer.call(r,c,h)),oe(e,t+1,c,!0,!0,!0)&&(u=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,u&&(e.dump&&bi===e.dump.charCodeAt(0)?d+="?":d+="? "),d+=e.dump,u&&(d+=Fn(e,t)),oe(e,t+1,h,!0,u)&&(e.dump&&bi===e.dump.charCodeAt(0)?d+=":":d+=": ",d+=e.dump,n+=d));e.tag=a,e.dump=n||"{}"}p(rf,"writeBlockMapping");function Ms(e,t,r){var i,n,a,o,s,l;for(n=r?e.explicitTypes:e.implicitTypes,a=0,o=n.length;a<o;a+=1)if(s=n[a],(s.instanceOf||s.predicate)&&(!s.instanceOf||typeof t=="object"&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(r?s.multi&&s.representName?e.tag=s.representName(t):e.tag=s.tag:e.tag="?",s.represent){if(l=e.styleMap[s.tag]||s.defaultStyle,Pd.call(s.represent)==="[object Function]")i=s.represent(t,l);else if(Rd.call(s.represent,l))i=s.represent[l](t,l);else throw new jt("!<"+s.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}p(Ms,"detectType");function oe(e,t,r,i,n,a,o){e.tag=null,e.dump=r,Ms(e,r,!1)||Ms(e,r,!0);var s=Pd.call(e.dump),l=i,c;i&&(i=e.flowLevel<0||e.flowLevel>t);var h=s==="[object Object]"||s==="[object Array]",u,d;if(h&&(u=e.duplicates.indexOf(r),d=u!==-1),(e.tag!==null&&e.tag!=="?"||d||e.indent!==2&&t>0)&&(n=!1),d&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(h&&d&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),s==="[object Object]")i&&Object.keys(e.dump).length!==0?(rf(e,t,e.dump,n),d&&(e.dump="&ref_"+u+e.dump)):(ef(e,t,e.dump),d&&(e.dump="&ref_"+u+" "+e.dump));else if(s==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?Ls(e,t-1,e.dump,n):Ls(e,t,e.dump,n),d&&(e.dump="&ref_"+u+e.dump)):(tf(e,t,e.dump),d&&(e.dump="&ref_"+u+" "+e.dump));else if(s==="[object String]")e.tag!=="?"&&Kd(e,e.dump,t,a,l);else{if(s==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new jt("unacceptable kind of an object to dump "+s)}e.tag!==null&&e.tag!=="?"&&(c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",e.dump=c+" "+e.dump)}return!0}p(oe,"writeNode");function nf(e,t){var r=[],i=[],n,a;for(Pn(e,r,i),n=0,a=i.length;n<a;n+=1)t.duplicates.push(r[i[n]]);t.usedDuplicates=new Array(a)}p(nf,"getDuplicateReferences");function Pn(e,t,r){var i,n,a;if(e!==null&&typeof e=="object")if(n=t.indexOf(e),n!==-1)r.indexOf(n)===-1&&r.push(n);else if(t.push(e),Array.isArray(e))for(n=0,a=e.length;n<a;n+=1)Pn(e[n],t,r);else for(i=Object.keys(e),n=0,a=i.length;n<a;n+=1)Pn(e[i[n]],t,r)}p(Pn,"inspectNode");function fv(e,t){t=t||{};var r=new Wd(t);r.noRefs||nf(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),oe(r,0,i,!0,!0)?r.dump+`
|
|
166
|
+
`:""}p(fv,"dump$1");function pv(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}p(pv,"renamed");var af=Xu,sf=Gw.load;/*! Bundled license information:
|
|
167
|
+
|
|
168
|
+
js-yaml/dist/js-yaml.mjs:
|
|
169
|
+
(*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *)
|
|
170
|
+
*/var Et={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},Hl={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5};function ii(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=gt(e),t=gt(t);const[r,i]=[e.x,e.y],[n,a]=[t.x,t.y],o=n-r,s=a-i;return{angle:Math.atan(s/o),deltaX:o,deltaY:s}}p(ii,"calculateDeltaAndAngle");var gt=p(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),of=p(e=>({x:p(function(t,r,i){let n=0;const a=gt(i[0]).x<gt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Et,e.arrowTypeStart)){const{angle:f,deltaX:g}=ii(i[0],i[1]);n=Et[e.arrowTypeStart]*Math.cos(f)*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Et,e.arrowTypeEnd)){const{angle:f,deltaX:g}=ii(i[i.length-1],i[i.length-2]);n=Et[e.arrowTypeEnd]*Math.cos(f)*(g>=0?1:-1)}const o=Math.abs(gt(t).x-gt(i[i.length-1]).x),s=Math.abs(gt(t).y-gt(i[i.length-1]).y),l=Math.abs(gt(t).x-gt(i[0]).x),c=Math.abs(gt(t).y-gt(i[0]).y),h=Et[e.arrowTypeStart],u=Et[e.arrowTypeEnd],d=1;if(o<u&&o>0&&s<u){let f=u+d-o;f*=a==="right"?-1:1,n-=f}if(l<h&&l>0&&c<h){let f=h+d-l;f*=a==="right"?-1:1,n+=f}return gt(t).x+n},"x"),y:p(function(t,r,i){let n=0;const a=gt(i[0]).y<gt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Et,e.arrowTypeStart)){const{angle:f,deltaY:g}=ii(i[0],i[1]);n=Et[e.arrowTypeStart]*Math.abs(Math.sin(f))*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Et,e.arrowTypeEnd)){const{angle:f,deltaY:g}=ii(i[i.length-1],i[i.length-2]);n=Et[e.arrowTypeEnd]*Math.abs(Math.sin(f))*(g>=0?1:-1)}const o=Math.abs(gt(t).y-gt(i[i.length-1]).y),s=Math.abs(gt(t).x-gt(i[i.length-1]).x),l=Math.abs(gt(t).y-gt(i[0]).y),c=Math.abs(gt(t).x-gt(i[0]).x),h=Et[e.arrowTypeStart],u=Et[e.arrowTypeEnd],d=1;if(o<u&&o>0&&s<u){let f=u+d-o;f*=a==="up"?-1:1,n-=f}if(l<h&&l>0&&c<h){let f=h+d-l;f*=a==="up"?-1:1,n+=f}return gt(t).y+n},"y")}),"getLineFunctionsWithOffset"),ca=p(({flowchart:e})=>{const t=e?.subGraphTitleMargin?.top??0,r=e?.subGraphTitleMargin?.bottom??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),gv=p(e=>{const{handDrawnSeed:t}=ut();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),Dr=p(e=>{const t=mv([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),mv=p(e=>{const t=new Map;return e.forEach(r=>{const[i,n]=r.split(":");t.set(i.trim(),n?.trim())}),t},"styles2Map"),Eo=p(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),V=p(e=>{const{stylesArray:t}=Dr(e),r=[],i=[],n=[],a=[];return t.forEach(o=>{const s=o[0];Eo(s)?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),s.includes("stroke")&&n.push(o.join(":")+" !important"),s==="fill"&&a.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:n,backgroundStyles:a}},"styles2String"),K=p((e,t)=>{const{themeVariables:r,handDrawnSeed:i}=ut(),{nodeBorder:n,mainBkg:a}=r,{stylesMap:o}=Dr(e);return Object.assign({roughness:.7,fill:o.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||n,seed:i,strokeWidth:o.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:yv(o.get("stroke-dasharray"))},t)},"userNodeOverrides"),yv=p(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const n=isNaN(t[0])?0:t[0];return[n,n]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray"),Ur={},vt={},Yl;function xv(){return Yl||(Yl=1,Object.defineProperty(vt,"__esModule",{value:!0}),vt.BLANK_URL=vt.relativeFirstCharacters=vt.whitespaceEscapeCharsRegex=vt.urlSchemeRegex=vt.ctrlCharactersRegex=vt.htmlCtrlEntityRegex=vt.htmlEntitiesRegex=vt.invalidProtocolRegex=void 0,vt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,vt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,vt.htmlCtrlEntityRegex=/&(newline|tab);/gi,vt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,vt.urlSchemeRegex=/^.+(:|:)/gim,vt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,vt.relativeFirstCharacters=[".","/"],vt.BLANK_URL="about:blank"),vt}var Ul;function bv(){if(Ul)return Ur;Ul=1,Object.defineProperty(Ur,"__esModule",{value:!0}),Ur.sanitizeUrl=void 0;var e=xv();function t(o){return e.relativeFirstCharacters.indexOf(o[0])>-1}function r(o){var s=o.replace(e.ctrlCharactersRegex,"");return s.replace(e.htmlEntitiesRegex,function(l,c){return String.fromCharCode(c)})}function i(o){return URL.canParse(o)}function n(o){try{return decodeURIComponent(o)}catch{return o}}function a(o){if(!o)return e.BLANK_URL;var s,l=n(o.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=n(l),s=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(s&&s.length>0);var c=l;if(!c)return e.BLANK_URL;if(t(c))return c;var h=c.trimStart(),u=h.match(e.urlSchemeRegex);if(!u)return c;var d=u[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(d))return e.BLANK_URL;var f=h.replace(/\\/g,"/");if(d==="mailto:"||d.includes("://"))return f;if(d==="http:"||d==="https:"){if(!i(f))return e.BLANK_URL;var g=new URL(f);return g.protocol=g.protocol.toLowerCase(),g.hostname=g.hostname.toLowerCase(),g.toString()}return f}return Ur.sanitizeUrl=a,Ur}var lf=bv(),cf=typeof global=="object"&&global&&global.Object===Object&&global,wv=typeof self=="object"&&self&&self.Object===Object&&self,he=cf||wv||Function("return this")(),ki=he.Symbol,hf=Object.prototype,vv=hf.hasOwnProperty,kv=hf.toString,Gr=ki?ki.toStringTag:void 0;function Cv(e){var t=vv.call(e,Gr),r=e[Gr];try{e[Gr]=void 0;var i=!0}catch{}var n=kv.call(e);return i&&(t?e[Gr]=r:delete e[Gr]),n}var _v=Object.prototype,Sv=_v.toString;function Tv(e){return Sv.call(e)}var Bv="[object Null]",$v="[object Undefined]",Gl=ki?ki.toStringTag:void 0;function ir(e){return e==null?e===void 0?$v:Bv:Gl&&Gl in Object(e)?Cv(e):Tv(e)}function Ee(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Lv="[object AsyncFunction]",Mv="[object Function]",Av="[object GeneratorFunction]",Ev="[object Proxy]";function ha(e){if(!Ee(e))return!1;var t=ir(e);return t==Mv||t==Av||t==Lv||t==Ev}var Ia=he["__core-js_shared__"],Xl=(function(){var e=/[^.]+$/.exec(Ia&&Ia.keys&&Ia.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function Fv(e){return!!Xl&&Xl in e}var Pv=Function.prototype,Rv=Pv.toString;function nr(e){if(e!=null){try{return Rv.call(e)}catch{}try{return e+""}catch{}}return""}var Ov=/[\\^$.*+?()[\]{}|]/g,Dv=/^\[object .+?Constructor\]$/,Nv=Function.prototype,Iv=Object.prototype,zv=Nv.toString,qv=Iv.hasOwnProperty,jv=RegExp("^"+zv.call(qv).replace(Ov,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Wv(e){if(!Ee(e)||Fv(e))return!1;var t=ha(e)?jv:Dv;return t.test(nr(e))}function Hv(e,t){return e?.[t]}function ar(e,t){var r=Hv(e,t);return Wv(r)?r:void 0}var Ci=ar(Object,"create");function Yv(){this.__data__=Ci?Ci(null):{},this.size=0}function Uv(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Gv="__lodash_hash_undefined__",Xv=Object.prototype,Vv=Xv.hasOwnProperty;function Zv(e){var t=this.__data__;if(Ci){var r=t[e];return r===Gv?void 0:r}return Vv.call(t,e)?t[e]:void 0}var Kv=Object.prototype,Qv=Kv.hasOwnProperty;function Jv(e){var t=this.__data__;return Ci?t[e]!==void 0:Qv.call(t,e)}var tk="__lodash_hash_undefined__";function ek(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Ci&&t===void 0?tk:t,this}function Je(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Je.prototype.clear=Yv;Je.prototype.delete=Uv;Je.prototype.get=Zv;Je.prototype.has=Jv;Je.prototype.set=ek;function rk(){this.__data__=[],this.size=0}function Ei(e,t){return e===t||e!==e&&t!==t}function ua(e,t){for(var r=e.length;r--;)if(Ei(e[r][0],t))return r;return-1}var ik=Array.prototype,nk=ik.splice;function ak(e){var t=this.__data__,r=ua(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():nk.call(t,r,1),--this.size,!0}function sk(e){var t=this.__data__,r=ua(t,e);return r<0?void 0:t[r][1]}function ok(e){return ua(this.__data__,e)>-1}function lk(e,t){var r=this.__data__,i=ua(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function ve(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}ve.prototype.clear=rk;ve.prototype.delete=ak;ve.prototype.get=sk;ve.prototype.has=ok;ve.prototype.set=lk;var _i=ar(he,"Map");function ck(){this.size=0,this.__data__={hash:new Je,map:new(_i||ve),string:new Je}}function hk(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function da(e,t){var r=e.__data__;return hk(t)?r[typeof t=="string"?"string":"hash"]:r.map}function uk(e){var t=da(this,e).delete(e);return this.size-=t?1:0,t}function dk(e){return da(this,e).get(e)}function fk(e){return da(this,e).has(e)}function pk(e,t){var r=da(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function ke(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}ke.prototype.clear=ck;ke.prototype.delete=uk;ke.prototype.get=dk;ke.prototype.has=fk;ke.prototype.set=pk;var gk="Expected a function";function Nr(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(gk);var r=function(){var i=arguments,n=t?t.apply(this,i):i[0],a=r.cache;if(a.has(n))return a.get(n);var o=e.apply(this,i);return r.cache=a.set(n,o)||a,o};return r.cache=new(Nr.Cache||ke),r}Nr.Cache=ke;function mk(){this.__data__=new ve,this.size=0}function yk(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function xk(e){return this.__data__.get(e)}function bk(e){return this.__data__.has(e)}var wk=200;function vk(e,t){var r=this.__data__;if(r instanceof ve){var i=r.__data__;if(!_i||i.length<wk-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new ke(i)}return r.set(e,t),this.size=r.size,this}function sr(e){var t=this.__data__=new ve(e);this.size=t.size}sr.prototype.clear=mk;sr.prototype.delete=yk;sr.prototype.get=xk;sr.prototype.has=bk;sr.prototype.set=vk;var Rn=(function(){try{var e=ar(Object,"defineProperty");return e({},"",{}),e}catch{}})();function fa(e,t,r){t=="__proto__"&&Rn?Rn(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function As(e,t,r){(r!==void 0&&!Ei(e[t],r)||r===void 0&&!(t in e))&&fa(e,t,r)}function kk(e){return function(t,r,i){for(var n=-1,a=Object(t),o=i(t),s=o.length;s--;){var l=o[++n];if(r(a[l],l,a)===!1)break}return t}}var uf=kk(),df=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Vl=df&&typeof module=="object"&&module&&!module.nodeType&&module,Ck=Vl&&Vl.exports===df,Zl=Ck?he.Buffer:void 0,Kl=Zl?Zl.allocUnsafe:void 0;function ff(e,t){if(t)return e.slice();var r=e.length,i=Kl?Kl(r):new e.constructor(r);return e.copy(i),i}var Es=he.Uint8Array;function pf(e){var t=new e.constructor(e.byteLength);return new Es(t).set(new Es(e)),t}function gf(e,t){var r=t?pf(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function mf(e,t){var r=-1,i=e.length;for(t||(t=Array(i));++r<i;)t[r]=e[r];return t}var Ql=Object.create,_k=(function(){function e(){}return function(t){if(!Ee(t))return{};if(Ql)return Ql(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})();function yf(e,t){return function(r){return e(t(r))}}var Fo=yf(Object.getPrototypeOf,Object),Sk=Object.prototype;function Fi(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Sk;return e===r}function xf(e){return typeof e.constructor=="function"&&!Fi(e)?_k(Fo(e)):{}}function Ir(e){return e!=null&&typeof e=="object"}var Tk="[object Arguments]";function Jl(e){return Ir(e)&&ir(e)==Tk}var bf=Object.prototype,Bk=bf.hasOwnProperty,$k=bf.propertyIsEnumerable,Si=Jl((function(){return arguments})())?Jl:function(e){return Ir(e)&&Bk.call(e,"callee")&&!$k.call(e,"callee")},Ti=Array.isArray,Lk=9007199254740991;function Po(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Lk}function Pi(e){return e!=null&&Po(e.length)&&!ha(e)}function wf(e){return Ir(e)&&Pi(e)}function Mk(){return!1}var vf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,tc=vf&&typeof module=="object"&&module&&!module.nodeType&&module,Ak=tc&&tc.exports===vf,ec=Ak?he.Buffer:void 0,Ek=ec?ec.isBuffer:void 0,pa=Ek||Mk,Fk="[object Object]",Pk=Function.prototype,Rk=Object.prototype,kf=Pk.toString,Ok=Rk.hasOwnProperty,Dk=kf.call(Object);function Nk(e){if(!Ir(e)||ir(e)!=Fk)return!1;var t=Fo(e);if(t===null)return!0;var r=Ok.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&kf.call(r)==Dk}var Ik="[object Arguments]",zk="[object Array]",qk="[object Boolean]",jk="[object Date]",Wk="[object Error]",Hk="[object Function]",Yk="[object Map]",Uk="[object Number]",Gk="[object Object]",Xk="[object RegExp]",Vk="[object Set]",Zk="[object String]",Kk="[object WeakMap]",Qk="[object ArrayBuffer]",Jk="[object DataView]",tC="[object Float32Array]",eC="[object Float64Array]",rC="[object Int8Array]",iC="[object Int16Array]",nC="[object Int32Array]",aC="[object Uint8Array]",sC="[object Uint8ClampedArray]",oC="[object Uint16Array]",lC="[object Uint32Array]",pt={};pt[tC]=pt[eC]=pt[rC]=pt[iC]=pt[nC]=pt[aC]=pt[sC]=pt[oC]=pt[lC]=!0;pt[Ik]=pt[zk]=pt[Qk]=pt[qk]=pt[Jk]=pt[jk]=pt[Wk]=pt[Hk]=pt[Yk]=pt[Uk]=pt[Gk]=pt[Xk]=pt[Vk]=pt[Zk]=pt[Kk]=!1;function cC(e){return Ir(e)&&Po(e.length)&&!!pt[ir(e)]}function Cf(e){return function(t){return e(t)}}var _f=typeof exports=="object"&&exports&&!exports.nodeType&&exports,di=_f&&typeof module=="object"&&module&&!module.nodeType&&module,hC=di&&di.exports===_f,za=hC&&cf.process,Fs=(function(){try{var e=di&&di.require&&di.require("util").types;return e||za&&za.binding&&za.binding("util")}catch{}})(),rc=Fs&&Fs.isTypedArray,ga=rc?Cf(rc):cC;function Ps(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var uC=Object.prototype,dC=uC.hasOwnProperty;function Sf(e,t,r){var i=e[t];(!(dC.call(e,t)&&Ei(i,r))||r===void 0&&!(t in e))&&fa(e,t,r)}function Tf(e,t,r,i){var n=!r;r||(r={});for(var a=-1,o=t.length;++a<o;){var s=t[a],l=void 0;l===void 0&&(l=e[s]),n?fa(r,s,l):Sf(r,s,l)}return r}function fC(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var pC=9007199254740991,gC=/^(?:0|[1-9]\d*)$/;function Ro(e,t){var r=typeof e;return t=t??pC,!!t&&(r=="number"||r!="symbol"&&gC.test(e))&&e>-1&&e%1==0&&e<t}var mC=Object.prototype,yC=mC.hasOwnProperty;function Bf(e,t){var r=Ti(e),i=!r&&Si(e),n=!r&&!i&&pa(e),a=!r&&!i&&!n&&ga(e),o=r||i||n||a,s=o?fC(e.length,String):[],l=s.length;for(var c in e)(t||yC.call(e,c))&&!(o&&(c=="length"||n&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Ro(c,l)))&&s.push(c);return s}function xC(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var bC=Object.prototype,wC=bC.hasOwnProperty;function vC(e){if(!Ee(e))return xC(e);var t=Fi(e),r=[];for(var i in e)i=="constructor"&&(t||!wC.call(e,i))||r.push(i);return r}function Oo(e){return Pi(e)?Bf(e,!0):vC(e)}function kC(e){return Tf(e,Oo(e))}function CC(e,t,r,i,n,a,o){var s=Ps(e,r),l=Ps(t,r),c=o.get(l);if(c){As(e,r,c);return}var h=a?a(s,l,r+"",e,t,o):void 0,u=h===void 0;if(u){var d=Ti(l),f=!d&&pa(l),g=!d&&!f&&ga(l);h=l,d||f||g?Ti(s)?h=s:wf(s)?h=mf(s):f?(u=!1,h=ff(l,!0)):g?(u=!1,h=gf(l,!0)):h=[]:Nk(l)||Si(l)?(h=s,Si(s)?h=kC(s):(!Ee(s)||ha(s))&&(h=xf(l))):u=!1}u&&(o.set(l,h),n(h,l,i,a,o),o.delete(l)),As(e,r,h)}function $f(e,t,r,i,n){e!==t&&uf(t,function(a,o){if(n||(n=new sr),Ee(a))CC(e,t,o,r,$f,i,n);else{var s=i?i(Ps(e,o),a,o+"",e,t,n):void 0;s===void 0&&(s=a),As(e,o,s)}},Oo)}function Do(e){return e}function _C(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var ic=Math.max;function Lf(e,t,r){return t=ic(t===void 0?e.length-1:t,0),function(){for(var i=arguments,n=-1,a=ic(i.length-t,0),o=Array(a);++n<a;)o[n]=i[t+n];n=-1;for(var s=Array(t+1);++n<t;)s[n]=i[n];return s[t]=r(o),_C(e,this,s)}}function Mf(e){return function(){return e}}var SC=Rn?function(e,t){return Rn(e,"toString",{configurable:!0,enumerable:!1,value:Mf(t),writable:!0})}:Do,TC=800,BC=16,$C=Date.now;function LC(e){var t=0,r=0;return function(){var i=$C(),n=BC-(i-r);if(r=i,n>0){if(++t>=TC)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Af=LC(SC);function Ef(e,t){return Af(Lf(e,t,Do),e+"")}function Ff(e,t,r){if(!Ee(r))return!1;var i=typeof t;return(i=="number"?Pi(r)&&Ro(t,r.length):i=="string"&&t in r)?Ei(r[t],e):!1}function Pf(e){return Ef(function(t,r){var i=-1,n=r.length,a=n>1?r[n-1]:void 0,o=n>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(n--,a):void 0,o&&Ff(r[0],r[1],o)&&(a=n<3?void 0:a,n=1),t=Object(t);++i<n;){var s=r[i];s&&e(t,s,i,a)}return t})}var Rf=Pf(function(e,t,r){$f(e,t,r)}),Of="",MC={curveBasis:ui,curveBasisClosed:rw,curveBasisOpen:iw,curveBumpX:ru,curveBumpY:iu,curveBundle:nw,curveCardinalClosed:aw,curveCardinalOpen:sw,curveCardinal:ou,curveCatmullRomClosed:ow,curveCatmullRomOpen:lw,curveCatmullRom:cu,curveLinear:Sn,curveLinearClosed:cw,curveMonotoneX:gu,curveMonotoneY:mu,curveNatural:xu,curveStep:bu,curveStepAfter:vu,curveStepBefore:wu},AC=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,EC=p(function(e,t){const r=Df(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const o=r.map(s=>s.args);pn(o),i=bt(i,[...o])}else i=r.args;if(!i)return;let n=no(e,t);const a="config";return i[a]!==void 0&&(n==="flowchart-v2"&&(n="flowchart"),i[n]=i[a],delete i[a]),i},"detectInit"),Df=p(function(e,t=null){try{const r=new RegExp(`[%]{2}(?![{]${AC.source})(?=[}][%]{2}).*
|
|
171
|
+
`,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),N.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let i;const n=[];for(;(i=ci.exec(e))!==null;)if(i.index===ci.lastIndex&&ci.lastIndex++,i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t)){const a=i[1]?i[1]:i[2],o=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;n.push({type:a,args:o})}return n.length===0?{type:e,args:null}:n.length===1?n[0]:n}catch(r){return N.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),FC=p(function(e){return e.replace(ci,"")},"removeDirectives"),PC=p(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function No(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return MC[r]??t}p(No,"interpolateToCurve");function Nf(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?lf.sanitizeUrl(r):r}p(Nf,"formatUrl");var RC=p((e,...t)=>{const r=e.split("."),i=r.length-1,n=r[i];let a=window;for(let o=0;o<i;o++)if(a=a[r[o]],!a){N.error(`Function name: ${e} not found in window`);return}a[n](...t)},"runFunc");function Io(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}p(Io,"distance");function If(e){let t,r=0;e.forEach(n=>{r+=Io(n,t),t=n});const i=r/2;return zo(e,i)}p(If,"traverseEdge");function zf(e){return e.length===1?e[0]:If(e)}p(zf,"calcLabelPosition");var nc=p((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),zo=p((e,t)=>{let r,i=t;for(const n of e){if(r){const a=Io(n,r);if(a===0)return r;if(a<i)i-=a;else{const o=i/a;if(o<=0)return r;if(o>=1)return{x:n.x,y:n.y};if(o>0&&o<1)return{x:nc((1-o)*r.x+o*n.x,5),y:nc((1-o)*r.y+o*n.y,5)}}}r=n}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),OC=p((e,t,r)=>{N.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const n=zo(t,25),a=e?10:5,o=Math.atan2(t[0].y-n.y,t[0].x-n.x),s={x:0,y:0};return s.x=Math.sin(o)*a+(t[0].x+n.x)/2,s.y=-Math.cos(o)*a+(t[0].y+n.y)/2,s},"calcCardinalityPosition");function qf(e,t,r){const i=structuredClone(r);N.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const n=25+e,a=zo(i,n),o=10+e*.5,s=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(s+Math.PI)*o+(i[0].x+a.x)/2,l.y=-Math.cos(s+Math.PI)*o+(i[0].y+a.y)/2):t==="end_right"?(l.x=Math.sin(s-Math.PI)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(s-Math.PI)*o+(i[0].y+a.y)/2-5):t==="end_left"?(l.x=Math.sin(s)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(s)*o+(i[0].y+a.y)/2-5):(l.x=Math.sin(s)*o+(i[0].x+a.x)/2,l.y=-Math.cos(s)*o+(i[0].y+a.y)/2),l}p(qf,"calcTerminalLabelPosition");function qo(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}p(qo,"getStylesFromArray");var ac=0,jf=p(()=>(ac++,"id-"+Math.random().toString(36).substr(2,12)+"-"+ac),"generateId");function Wf(e){let t="";const r="0123456789abcdef",i=r.length;for(let n=0;n<e;n++)t+=r.charAt(Math.floor(Math.random()*i));return t}p(Wf,"makeRandomHex");var Hf=p(e=>Wf(e.length),"random"),DC=p(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),NC=p(function(e,t){const r=t.text.replace(rr.lineBreakRegex," "),[,i]=Ri(t.fontSize),n=e.append("text");n.attr("x",t.x),n.attr("y",t.y),n.style("text-anchor",t.anchor),n.style("font-family",t.fontFamily),n.style("font-size",i),n.style("font-weight",t.fontWeight),n.attr("fill",t.fill),t.class!==void 0&&n.attr("class",t.class);const a=n.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.attr("fill",t.fill),a.text(r),n},"drawSimpleText"),Yf=Nr((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),rr.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),n=[];let a="";return i.forEach((o,s)=>{const l=le(`${o} `,r),c=le(a,r);if(l>t){const{hyphenatedStrings:d,remainingWord:f}=IC(o,t,"-",r);n.push(a,...d),a=f}else c+l>=t?(n.push(a),a=o):a=[a,o].filter(Boolean).join(" ");s+1===i.length&&n.push(a)}),n.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),IC=Nr((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const n=[...e],a=[];let o="";return n.forEach((s,l)=>{const c=`${o}${s}`;if(le(c,i)>=t){const u=l+1,d=n.length===u,f=`${c}${r}`;a.push(d?c:f),o=""}else o=c}),{hyphenatedStrings:a,remainingWord:o}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function jo(e,t){return Wo(e,t).height}p(jo,"calculateTextHeight");function le(e,t){return Wo(e,t).width}p(le,"calculateTextWidth");var Wo=Nr((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:n=400}=t;if(!e)return{width:0,height:0};const[,a]=Ri(r),o=["sans-serif",i],s=e.split(rr.lineBreakRegex),l=[],c=lt("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const d of o){let f=0;const g={width:0,height:0,lineHeight:0};for(const m of s){const y=DC();y.text=m||Of;const x=NC(h,y).style("font-size",a).style("font-weight",n).style("font-family",d),b=(x._groups||x)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,b.width)),f=Math.round(b.height),g.height+=f,g.lineHeight=Math.round(Math.max(g.lineHeight,f))}l.push(g)}h.remove();const u=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[u]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Sr,zC=(Sr=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},p(Sr,"InitIDGenerator"),Sr),Yi,qC=p(function(e){return Yi=Yi||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Yi.innerHTML=e,unescape(Yi.textContent)},"entityDecode");function Ho(e){return"str"in e}p(Ho,"isDetailedError");var jC=p((e,t,r,i)=>{if(!i)return;const n=e.node()?.getBBox();n&&e.append("text").text(i).attr("text-anchor","middle").attr("x",n.x+n.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Ri=p(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function ma(e,t){return Rf({},e,t)}p(ma,"cleanAndMerge");var Gt={assignWithDepth:bt,wrapLabel:Yf,calculateTextHeight:jo,calculateTextWidth:le,calculateTextDimensions:Wo,cleanAndMerge:ma,detectInit:EC,detectDirective:Df,isSubstringInArray:PC,interpolateToCurve:No,calcLabelPosition:zf,calcCardinalityPosition:OC,calcTerminalLabelPosition:qf,formatUrl:Nf,getStylesFromArray:qo,generateId:jf,random:Hf,runFunc:RC,entityDecode:qC,insertTitle:jC,isLabelCoordinateInPath:Uf,parseFontSize:Ri,InitIDGenerator:zC},WC=p(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),Fe=p(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),HC=p((e,t,{counter:r=0,prefix:i,suffix:n},a)=>a||`${i?`${i}_`:""}${e}_${t}_${r}${n?`_${n}`:""}`,"getEdgeId");function Pt(e){return e??null}p(Pt,"handleUndefinedAttr");function Uf(e,t){const r=Math.round(e.x),i=Math.round(e.y),n=t.replace(/(\d+\.\d+)/g,a=>Math.round(parseFloat(a)).toString());return n.includes(r.toString())||n.includes(i.toString())}p(Uf,"isLabelCoordinateInPath");const YC=Object.freeze({left:0,top:0,width:16,height:16}),On=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Gf=Object.freeze({...YC,...On}),UC=Object.freeze({...Gf,body:"",hidden:!1}),GC=Object.freeze({width:null,height:null}),XC=Object.freeze({...GC,...On}),VC=(e,t,r,i="")=>{const n=e.split(":");if(e.slice(0,1)==="@"){if(n.length<2||n.length>3)return null;i=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const s=n.pop(),l=n.pop(),c={provider:n.length>0?n[0]:i,prefix:l,name:s};return qa(c)?c:null}const a=n[0],o=a.split("-");if(o.length>1){const s={provider:i,prefix:o.shift(),name:o.join("-")};return qa(s)?s:null}if(r&&i===""){const s={provider:i,prefix:"",name:a};return qa(s,r)?s:null}return null},qa=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function ZC(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}function sc(e,t){const r=ZC(e,t);for(const i in UC)i in On?i in e&&!(i in r)&&(r[i]=On[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function KC(e,t){const r=e.icons,i=e.aliases||Object.create(null),n=Object.create(null);function a(o){if(r[o])return n[o]=[];if(!(o in n)){n[o]=null;const s=i[o]&&i[o].parent,l=s&&a(s);l&&(n[o]=[s].concat(l))}return n[o]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(a),n}function oc(e,t,r){const i=e.icons,n=e.aliases||Object.create(null);let a={};function o(s){a=sc(i[s]||n[s],a)}return o(t),r.forEach(o),sc(e,a)}function QC(e,t){if(e.icons[t])return oc(e,t,[]);const r=KC(e,[t])[t];return r?oc(e,t,r):null}const JC=/(-?[0-9.]*[0-9]+[0-9.]*)/g,t_=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function lc(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(JC);if(i===null||!i.length)return e;const n=[];let a=i.shift(),o=t_.test(a);for(;;){if(o){const s=parseFloat(a);isNaN(s)?n.push(a):n.push(Math.ceil(s*t*r)/r)}else n.push(a);if(a=i.shift(),a===void 0)return n.join("");o=!o}}function e_(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const n=e.indexOf(">",i),a=e.indexOf("</"+t);if(n===-1||a===-1)break;const o=e.indexOf(">",a);if(o===-1)break;r+=e.slice(n+1,a).trim(),e=e.slice(0,i).trim()+e.slice(o+1)}return{defs:r,content:e}}function r_(e,t){return e?"<defs>"+e+"</defs>"+t:t}function i_(e,t,r){const i=e_(e);return r_(i.defs,t+i.content+r)}const n_=e=>e==="unset"||e==="undefined"||e==="none";function a_(e,t){const r={...Gf,...e},i={...XC,...t},n={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(m=>{const y=[],x=m.hFlip,b=m.vFlip;let w=m.rotate;x?b?w+=2:(y.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),y.push("scale(-1 1)"),n.top=n.left=0):b&&(y.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),y.push("scale(1 -1)"),n.top=n.left=0);let C;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:C=n.height/2+n.top,y.unshift("rotate(90 "+C.toString()+" "+C.toString()+")");break;case 2:y.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:C=n.width/2+n.left,y.unshift("rotate(-90 "+C.toString()+" "+C.toString()+")");break}w%2===1&&(n.left!==n.top&&(C=n.left,n.left=n.top,n.top=C),n.width!==n.height&&(C=n.width,n.width=n.height,n.height=C)),y.length&&(a=i_(a,'<g transform="'+y.join(" ")+'">',"</g>"))});const o=i.width,s=i.height,l=n.width,c=n.height;let h,u;o===null?(u=s===null?"1em":s==="auto"?c:s,h=lc(u,l/c)):(h=o==="auto"?l:o,u=s===null?lc(h,c/l):s==="auto"?c:s);const d={},f=(m,y)=>{n_(y)||(d[m]=y.toString())};f("width",h),f("height",u);const g=[n.left,n.top,l,c];return d.viewBox=g.join(" "),{attributes:d,viewBox:g,body:a}}const s_=/\sid="(\S+)"/g,o_="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let l_=0;function c_(e,t=o_){const r=[];let i;for(;i=s_.exec(e);)r.push(i[1]);if(!r.length)return e;const n="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(a=>{const o=typeof t=="function"?t(a):t+(l_++).toString(),s=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+o+n+"$3")}),e=e.replace(new RegExp(n,"g"),""),e}function h_(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}function Yo(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var or=Yo();function Xf(e){or=e}var fi={exec:()=>null};function ht(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(n,a)=>{let o=typeof a=="string"?a:a.source;return o=o.replace(It.caret,"$1"),r=r.replace(n,o),i},getRegex:()=>new RegExp(r,t)};return i}var It={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},u_=/^(?:[ \t]*(?:\n|$))+/,d_=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,f_=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Oi=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,p_=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Uo=/(?:[*+-]|\d{1,9}[.)])/,Vf=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Zf=ht(Vf).replace(/bull/g,Uo).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),g_=ht(Vf).replace(/bull/g,Uo).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Go=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,m_=/^[^\n]+/,Xo=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,y_=ht(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Xo).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),x_=ht(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Uo).getRegex(),ya="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Vo=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,b_=ht("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Vo).replace("tag",ya).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Kf=ht(Go).replace("hr",Oi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ya).getRegex(),w_=ht(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Kf).getRegex(),Zo={blockquote:w_,code:d_,def:y_,fences:f_,heading:p_,hr:Oi,html:b_,lheading:Zf,list:x_,newline:u_,paragraph:Kf,table:fi,text:m_},cc=ht("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Oi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ya).getRegex(),v_={...Zo,lheading:g_,table:cc,paragraph:ht(Go).replace("hr",Oi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",cc).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ya).getRegex()},k_={...Zo,html:ht(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Vo).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:fi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ht(Go).replace("hr",Oi).replace("heading",` *#{1,6} *[^
|
|
172
|
+
]`).replace("lheading",Zf).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},C_=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,__=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Qf=/^( {2,}|\\)\n(?!\s*$)/,S_=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,xa=/[\p{P}\p{S}]/u,Ko=/[\s\p{P}\p{S}]/u,Jf=/[^\s\p{P}\p{S}]/u,T_=ht(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ko).getRegex(),tp=/(?!~)[\p{P}\p{S}]/u,B_=/(?!~)[\s\p{P}\p{S}]/u,$_=/(?:[^\s\p{P}\p{S}]|~)/u,L_=ht(/link|code|html/,"g").replace("link",new RegExp("\\[(?:[^\\[\\]`]|(?<!`)(?<a>`+)[^`]+\\k<a>(?!`))*?\\]\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)]|\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)])*\\))*\\)")).replace("code",new RegExp("(?<!`)(?<b>`+)[^`]+\\k<b>(?!`)")).replace("html",/<(?! )[^<>]*?>/).getRegex(),ep=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,M_=ht(ep,"u").replace(/punct/g,xa).getRegex(),A_=ht(ep,"u").replace(/punct/g,tp).getRegex(),rp="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",E_=ht(rp,"gu").replace(/notPunctSpace/g,Jf).replace(/punctSpace/g,Ko).replace(/punct/g,xa).getRegex(),F_=ht(rp,"gu").replace(/notPunctSpace/g,$_).replace(/punctSpace/g,B_).replace(/punct/g,tp).getRegex(),P_=ht("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Jf).replace(/punctSpace/g,Ko).replace(/punct/g,xa).getRegex(),R_=ht(/\\(punct)/,"gu").replace(/punct/g,xa).getRegex(),O_=ht(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),D_=ht(Vo).replace("(?:-->|$)","-->").getRegex(),N_=ht("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",D_).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Dn=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,I_=ht(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Dn).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ip=ht(/^!?\[(label)\]\[(ref)\]/).replace("label",Dn).replace("ref",Xo).getRegex(),np=ht(/^!?\[(ref)\](?:\[\])?/).replace("ref",Xo).getRegex(),z_=ht("reflink|nolink(?!\\()","g").replace("reflink",ip).replace("nolink",np).getRegex(),hc=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Qo={_backpedal:fi,anyPunctuation:R_,autolink:O_,blockSkip:L_,br:Qf,code:__,del:fi,emStrongLDelim:M_,emStrongRDelimAst:E_,emStrongRDelimUnd:P_,escape:C_,link:I_,nolink:np,punctuation:T_,reflink:ip,reflinkSearch:z_,tag:N_,text:S_,url:fi},q_={...Qo,link:ht(/^!?\[(label)\]\((.*?)\)/).replace("label",Dn).getRegex(),reflink:ht(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Dn).getRegex()},Rs={...Qo,emStrongRDelimAst:F_,emStrongLDelim:A_,url:ht(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",hc).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:ht(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",hc).getRegex()},j_={...Rs,br:ht(Qf).replace("{2,}","*").getRegex(),text:ht(Rs.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ui={normal:Zo,gfm:v_,pedantic:k_},Xr={normal:Qo,gfm:Rs,breaks:j_,pedantic:q_},W_={"&":"&","<":"<",">":">",'"':""","'":"'"},uc=e=>W_[e];function ie(e,t){if(t){if(It.escapeTest.test(e))return e.replace(It.escapeReplace,uc)}else if(It.escapeTestNoEncode.test(e))return e.replace(It.escapeReplaceNoEncode,uc);return e}function dc(e){try{e=encodeURI(e).replace(It.percentDecode,"%")}catch{return null}return e}function fc(e,t){let r=e.replace(It.findPipe,(a,o,s)=>{let l=!1,c=o;for(;--c>=0&&s[c]==="\\";)l=!l;return l?"|":" |"}),i=r.split(It.splitPipe),n=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(It.slashPipe,"|");return i}function Vr(e,t,r){let i=e.length;if(i===0)return"";let n=0;for(;n<i&&e.charAt(i-n-1)===t;)n++;return e.slice(0,i-n)}function H_(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return r>0?-2:-1}function pc(e,t,r,i,n){let a=t.href,o=t.title||null,s=e[1].replace(n.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:o,text:s,tokens:i.inlineTokens(s)};return i.state.inLink=!1,l}function Y_(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let n=i[1];return t.split(`
|
|
173
|
+
`).map(a=>{let o=a.match(r.other.beginningSpace);if(o===null)return a;let[s]=o;return s.length>=n.length?a.slice(n.length):a}).join(`
|
|
174
|
+
`)}var Nn=class{options;rules;lexer;constructor(t){this.options=t||or}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:Vr(i,`
|
|
175
|
+
`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],n=Y_(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:n}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let n=Vr(i,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(i=n.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:Vr(r[0],`
|
|
176
|
+
`)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=Vr(r[0],`
|
|
177
|
+
`).split(`
|
|
178
|
+
`),n="",a="",o=[];for(;i.length>0;){let s=!1,l=[],c;for(c=0;c<i.length;c++)if(this.rules.other.blockquoteStart.test(i[c]))l.push(i[c]),s=!0;else if(!s)l.push(i[c]);else break;i=i.slice(c);let h=l.join(`
|
|
179
|
+
`),u=h.replace(this.rules.other.blockquoteSetextReplace,`
|
|
180
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
|
|
181
|
+
${h}`:h,a=a?`${a}
|
|
182
|
+
${u}`:u;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,o,!0),this.lexer.state.top=d,i.length===0)break;let f=o.at(-1);if(f?.type==="code")break;if(f?.type==="blockquote"){let g=f,m=g.raw+`
|
|
183
|
+
`+i.join(`
|
|
184
|
+
`),y=this.blockquote(m);o[o.length-1]=y,n=n.substring(0,n.length-g.raw.length)+y.raw,a=a.substring(0,a.length-g.text.length)+y.text;break}else if(f?.type==="list"){let g=f,m=g.raw+`
|
|
185
|
+
`+i.join(`
|
|
186
|
+
`),y=this.list(m);o[o.length-1]=y,n=n.substring(0,n.length-f.raw.length)+y.raw,a=a.substring(0,a.length-g.raw.length)+y.raw,i=m.substring(o.at(-1).raw.length).split(`
|
|
187
|
+
`);continue}}return{type:"blockquote",raw:n,tokens:o,text:a}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),n=i.length>1,a={type:"list",raw:"",ordered:n,start:n?+i.slice(0,-1):"",loose:!1,items:[]};i=n?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=n?i:"[*+-]");let o=this.rules.other.listItemRegex(i),s=!1;for(;t;){let c=!1,h="",u="";if(!(r=o.exec(t))||this.rules.block.hr.test(t))break;h=r[0],t=t.substring(h.length);let d=r[2].split(`
|
|
188
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),f=t.split(`
|
|
189
|
+
`,1)[0],g=!d.trim(),m=0;if(this.options.pedantic?(m=2,u=d.trimStart()):g?m=r[1].length+1:(m=r[2].search(this.rules.other.nonSpaceChar),m=m>4?1:m,u=d.slice(m),m+=r[1].length),g&&this.rules.other.blankLine.test(f)&&(h+=f+`
|
|
190
|
+
`,t=t.substring(f.length+1),c=!0),!c){let b=this.rules.other.nextBulletRegex(m),w=this.rules.other.hrRegex(m),C=this.rules.other.fencesBeginRegex(m),v=this.rules.other.headingBeginRegex(m),L=this.rules.other.htmlBeginRegex(m);for(;t;){let T=t.split(`
|
|
191
|
+
`,1)[0],D;if(f=T,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),D=f):D=f.replace(this.rules.other.tabCharGlobal," "),C.test(f)||v.test(f)||L.test(f)||b.test(f)||w.test(f))break;if(D.search(this.rules.other.nonSpaceChar)>=m||!f.trim())u+=`
|
|
192
|
+
`+D.slice(m);else{if(g||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||C.test(d)||v.test(d)||w.test(d))break;u+=`
|
|
193
|
+
`+f}!g&&!f.trim()&&(g=!0),h+=T+`
|
|
194
|
+
`,t=t.substring(T.length+1),d=D.slice(m)}}a.loose||(s?a.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(s=!0));let y=null,x;this.options.gfm&&(y=this.rules.other.listIsTask.exec(u),y&&(x=y[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:h,task:!!y,checked:x,loose:!1,text:u,tokens:[]}),a.raw+=h}let l=a.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let c=0;c<a.items.length;c++)if(this.lexer.state.top=!1,a.items[c].tokens=this.lexer.blockTokens(a.items[c].text,[]),!a.loose){let h=a.items[c].tokens.filter(d=>d.type==="space"),u=h.length>0&&h.some(d=>this.rules.other.anyLine.test(d.raw));a.loose=u}if(a.loose)for(let c=0;c<a.items.length;c++)a.items[c].loose=!0;return a}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:n,title:a}}}table(t){let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=fc(r[1]),n=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=r[3]?.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
195
|
+
`):[],o={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===n.length){for(let s of n)this.rules.other.tableAlignRight.test(s)?o.align.push("right"):this.rules.other.tableAlignCenter.test(s)?o.align.push("center"):this.rules.other.tableAlignLeft.test(s)?o.align.push("left"):o.align.push(null);for(let s=0;s<i.length;s++)o.header.push({text:i[s],tokens:this.lexer.inline(i[s]),header:!0,align:o.align[s]});for(let s of a)o.rows.push(fc(s,o.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:o.align[c]})));return o}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
|
|
196
|
+
`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let o=Vr(i.slice(0,-1),"\\");if((i.length-o.length)%2===0)return}else{let o=H_(r[2],"()");if(o===-2)return;if(o>-1){let s=(r[0].indexOf("!")===0?5:4)+r[1].length+o;r[2]=r[2].substring(0,o),r[0]=r[0].substring(0,s).trim(),r[3]=""}}let n=r[2],a="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(n);o&&(n=o[1],a=o[3])}else a=r[3]?r[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?n=n.slice(1):n=n.slice(1,-1)),pc(r,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let n=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=r[n.toLowerCase()];if(!a){let o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return pc(i,a,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(!(!n||n[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!i||this.rules.inline.punctuation.exec(i))){let a=[...n[0]].length-1,o,s,l=a,c=0,h=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+a);(n=h.exec(r))!=null;){if(o=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!o)continue;if(s=[...o].length,n[3]||n[4]){l+=s;continue}else if((n[5]||n[6])&&a%3&&!((a+s)%3)){c+=s;continue}if(l-=s,l>0)continue;s=Math.min(s,s+l+c);let u=[...n[0]][0].length,d=t.slice(0,a+n.index+u+s);if(Math.min(a,s)%2){let g=d.slice(1,-1);return{type:"em",raw:d,text:g,tokens:this.lexer.inlineTokens(g)}}let f=d.slice(2,-2);return{type:"strong",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(i),a=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return n&&a&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,n;return r[2]==="@"?(i=r[1],n="mailto:"+i):(i=r[1],n=i),{type:"link",raw:r[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}url(t){let r;if(r=this.rules.inline.url.exec(t)){let i,n;if(r[2]==="@")i=r[0],n="mailto:"+i;else{let a;do a=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(a!==r[0]);i=r[0],r[1]==="www."?n="http://"+r[0]:n=r[0]}return{type:"link",raw:r[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},Vt=class Os{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||or,this.options.tokenizer=this.options.tokenizer||new Nn,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:It,block:Ui.normal,inline:Xr.normal};this.options.pedantic?(r.block=Ui.pedantic,r.inline=Xr.pedantic):this.options.gfm&&(r.block=Ui.gfm,this.options.breaks?r.inline=Xr.breaks:r.inline=Xr.gfm),this.tokenizer.rules=r}static get rules(){return{block:Ui,inline:Xr}}static lex(t,r){return new Os(r).lex(t)}static lexInline(t,r){return new Os(r).inlineTokens(t)}lex(t){t=t.replace(It.carriageReturn,`
|
|
197
|
+
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){for(this.options.pedantic&&(t=t.replace(It.tabCharGlobal," ").replace(It.spaceLine,""));t;){let n;if(this.options.extensions?.block?.some(o=>(n=o.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))continue;if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length);let o=r.at(-1);n.raw.length===1&&o!==void 0?o.raw+=`
|
|
198
|
+
`:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length);let o=r.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(`
|
|
199
|
+
`)?"":`
|
|
200
|
+
`)+n.raw,o.text+=`
|
|
201
|
+
`+n.text,this.inlineQueue.at(-1).src=o.text):r.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length);let o=r.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(`
|
|
202
|
+
`)?"":`
|
|
203
|
+
`)+n.raw,o.text+=`
|
|
204
|
+
`+n.raw,this.inlineQueue.at(-1).src=o.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},r.push(n));continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),r.push(n);continue}let a=t;if(this.options.extensions?.startBlock){let o=1/0,s=t.slice(1),l;this.options.extensions.startBlock.forEach(c=>{l=c.call({lexer:this},s),typeof l=="number"&&l>=0&&(o=Math.min(o,l))}),o<1/0&&o>=0&&(a=t.substring(0,o+1))}if(this.state.top&&(n=this.tokenizer.paragraph(a))){let o=r.at(-1);i&&o?.type==="paragraph"?(o.raw+=(o.raw.endsWith(`
|
|
205
|
+
`)?"":`
|
|
206
|
+
`)+n.raw,o.text+=`
|
|
207
|
+
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):r.push(n),i=a.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length);let o=r.at(-1);o?.type==="text"?(o.raw+=(o.raw.endsWith(`
|
|
208
|
+
`)?"":`
|
|
209
|
+
`)+n.raw,o.text+=`
|
|
210
|
+
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):r.push(n);continue}if(t){let o="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw new Error(o)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let i=t,n=null;if(this.tokens.links){let s=Object.keys(this.tokens.links);if(s.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)s.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,n.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(n=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let a=!1,o="";for(;t;){a||(o=""),a=!1;let s;if(this.options.extensions?.inline?.some(c=>(s=c.call({lexer:this},t,r))?(t=t.substring(s.raw.length),r.push(s),!0):!1))continue;if(s=this.tokenizer.escape(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.tag(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.link(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(s.raw.length);let c=r.at(-1);s.type==="text"&&c?.type==="text"?(c.raw+=s.raw,c.text+=s.text):r.push(s);continue}if(s=this.tokenizer.emStrong(t,i,o)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.codespan(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.br(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.del(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.autolink(t)){t=t.substring(s.raw.length),r.push(s);continue}if(!this.state.inLink&&(s=this.tokenizer.url(t))){t=t.substring(s.raw.length),r.push(s);continue}let l=t;if(this.options.extensions?.startInline){let c=1/0,h=t.slice(1),u;this.options.extensions.startInline.forEach(d=>{u=d.call({lexer:this},h),typeof u=="number"&&u>=0&&(c=Math.min(c,u))}),c<1/0&&c>=0&&(l=t.substring(0,c+1))}if(s=this.tokenizer.inlineText(l)){t=t.substring(s.raw.length),s.raw.slice(-1)!=="_"&&(o=s.raw.slice(-1)),a=!0;let c=r.at(-1);c?.type==="text"?(c.raw+=s.raw,c.text+=s.text):r.push(s);continue}if(t){let c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return r}},In=class{options;parser;constructor(t){this.options=t||or}space(t){return""}code({text:t,lang:r,escaped:i}){let n=(r||"").match(It.notSpaceStart)?.[0],a=t.replace(It.endingNewline,"")+`
|
|
211
|
+
`;return n?'<pre><code class="language-'+ie(n)+'">'+(i?a:ie(a,!0))+`</code></pre>
|
|
212
|
+
`:"<pre><code>"+(i?a:ie(a,!0))+`</code></pre>
|
|
213
|
+
`}blockquote({tokens:t}){return`<blockquote>
|
|
214
|
+
${this.parser.parse(t)}</blockquote>
|
|
215
|
+
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
|
|
216
|
+
`}hr(t){return`<hr>
|
|
217
|
+
`}list(t){let r=t.ordered,i=t.start,n="";for(let s=0;s<t.items.length;s++){let l=t.items[s];n+=this.listitem(l)}let a=r?"ol":"ul",o=r&&i!==1?' start="'+i+'"':"";return"<"+a+o+`>
|
|
218
|
+
`+n+"</"+a+`>
|
|
219
|
+
`}listitem(t){let r="";if(t.task){let i=this.checkbox({checked:!!t.checked});t.loose?t.tokens[0]?.type==="paragraph"?(t.tokens[0].text=i+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=i+" "+ie(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):r+=i+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
|
|
220
|
+
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
221
|
+
`}table(t){let r="",i="";for(let a=0;a<t.header.length;a++)i+=this.tablecell(t.header[a]);r+=this.tablerow({text:i});let n="";for(let a=0;a<t.rows.length;a++){let o=t.rows[a];i="";for(let s=0;s<o.length;s++)i+=this.tablecell(o[s]);n+=this.tablerow({text:i})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
|
|
222
|
+
<thead>
|
|
223
|
+
`+r+`</thead>
|
|
224
|
+
`+n+`</table>
|
|
225
|
+
`}tablerow({text:t}){return`<tr>
|
|
226
|
+
${t}</tr>
|
|
227
|
+
`}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
|
|
228
|
+
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${ie(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let n=this.parser.parseInline(i),a=dc(t);if(a===null)return n;t=a;let o='<a href="'+t+'"';return r&&(o+=' title="'+ie(r)+'"'),o+=">"+n+"</a>",o}image({href:t,title:r,text:i,tokens:n}){n&&(i=this.parser.parseInline(n,this.parser.textRenderer));let a=dc(t);if(a===null)return ie(i);t=a;let o=`<img src="${t}" alt="${i}"`;return r&&(o+=` title="${ie(r)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:ie(t.text)}},Jo=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},Zt=class Ds{options;renderer;textRenderer;constructor(t){this.options=t||or,this.options.renderer=this.options.renderer||new In,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Jo}static parse(t,r){return new Ds(r).parse(t)}static parseInline(t,r){return new Ds(r).parseInline(t)}parse(t,r=!0){let i="";for(let n=0;n<t.length;n++){let a=t[n];if(this.options.extensions?.renderers?.[a.type]){let s=a,l=this.options.extensions.renderers[s.type].call({parser:this},s);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(s.type)){i+=l||"";continue}}let o=a;switch(o.type){case"space":{i+=this.renderer.space(o);continue}case"hr":{i+=this.renderer.hr(o);continue}case"heading":{i+=this.renderer.heading(o);continue}case"code":{i+=this.renderer.code(o);continue}case"table":{i+=this.renderer.table(o);continue}case"blockquote":{i+=this.renderer.blockquote(o);continue}case"list":{i+=this.renderer.list(o);continue}case"html":{i+=this.renderer.html(o);continue}case"def":{i+=this.renderer.def(o);continue}case"paragraph":{i+=this.renderer.paragraph(o);continue}case"text":{let s=o,l=this.renderer.text(s);for(;n+1<t.length&&t[n+1].type==="text";)s=t[++n],l+=`
|
|
229
|
+
`+this.renderer.text(s);r?i+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):i+=l;continue}default:{let s='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return i}parseInline(t,r=this.renderer){let i="";for(let n=0;n<t.length;n++){let a=t[n];if(this.options.extensions?.renderers?.[a.type]){let s=this.options.extensions.renderers[a.type].call({parser:this},a);if(s!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){i+=s||"";continue}}let o=a;switch(o.type){case"escape":{i+=r.text(o);break}case"html":{i+=r.html(o);break}case"link":{i+=r.link(o);break}case"image":{i+=r.image(o);break}case"strong":{i+=r.strong(o);break}case"em":{i+=r.em(o);break}case"codespan":{i+=r.codespan(o);break}case"br":{i+=r.br(o);break}case"del":{i+=r.del(o);break}case"text":{i+=r.text(o);break}default:{let s='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return i}},ni=class{options;block;constructor(t){this.options=t||or}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?Vt.lex:Vt.lexInline}provideParser(){return this.block?Zt.parse:Zt.parseInline}},U_=class{defaults=Yo();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Zt;Renderer=In;TextRenderer=Jo;Lexer=Vt;Tokenizer=Nn;Hooks=ni;constructor(...t){this.use(...t)}walkTokens(t,r){let i=[];for(let n of t)switch(i=i.concat(r.call(this,n)),n.type){case"table":{let a=n;for(let o of a.header)i=i.concat(this.walkTokens(o.tokens,r));for(let o of a.rows)for(let s of o)i=i.concat(this.walkTokens(s.tokens,r));break}case"list":{let a=n;i=i.concat(this.walkTokens(a.items,r));break}default:{let a=n;this.defaults.extensions?.childTokens?.[a.type]?this.defaults.extensions.childTokens[a.type].forEach(o=>{let s=a[o].flat(1/0);i=i.concat(this.walkTokens(s,r))}):a.tokens&&(i=i.concat(this.walkTokens(a.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let n={...i};if(n.async=this.defaults.async||n.async||!1,i.extensions&&(i.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let o=r.renderers[a.name];o?r.renderers[a.name]=function(...s){let l=a.renderer.apply(this,s);return l===!1&&(l=o.apply(this,s)),l}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=r[a.level];o?o.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),n.extensions=r),i.renderer){let a=this.defaults.renderer||new In(this.defaults);for(let o in i.renderer){if(!(o in a))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let s=o,l=i.renderer[s],c=a[s];a[s]=(...h)=>{let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u||""}}n.renderer=a}if(i.tokenizer){let a=this.defaults.tokenizer||new Nn(this.defaults);for(let o in i.tokenizer){if(!(o in a))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let s=o,l=i.tokenizer[s],c=a[s];a[s]=(...h)=>{let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u}}n.tokenizer=a}if(i.hooks){let a=this.defaults.hooks||new ni;for(let o in i.hooks){if(!(o in a))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let s=o,l=i.hooks[s],c=a[s];ni.passThroughHooks.has(o)?a[s]=h=>{if(this.defaults.async&&ni.passThroughHooksRespectAsync.has(o))return(async()=>{let d=await l.call(a,h);return c.call(a,d)})();let u=l.call(a,h);return c.call(a,u)}:a[s]=(...h)=>{if(this.defaults.async)return(async()=>{let d=await l.apply(a,h);return d===!1&&(d=await c.apply(a,h)),d})();let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u}}n.hooks=a}if(i.walkTokens){let a=this.defaults.walkTokens,o=i.walkTokens;n.walkTokens=function(s){let l=[];return l.push(o.call(this,s)),a&&(l=l.concat(a.call(this,s))),l}}this.defaults={...this.defaults,...n}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return Vt.lex(t,r??this.defaults)}parser(t,r){return Zt.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let n={...i},a={...this.defaults,...n},o=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&n.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let s=a.hooks?await a.hooks.preprocess(r):r,l=await(a.hooks?await a.hooks.provideLexer():t?Vt.lex:Vt.lexInline)(s,a),c=a.hooks?await a.hooks.processAllTokens(l):l;a.walkTokens&&await Promise.all(this.walkTokens(c,a.walkTokens));let h=await(a.hooks?await a.hooks.provideParser():t?Zt.parse:Zt.parseInline)(c,a);return a.hooks?await a.hooks.postprocess(h):h})().catch(o);try{a.hooks&&(r=a.hooks.preprocess(r));let s=(a.hooks?a.hooks.provideLexer():t?Vt.lex:Vt.lexInline)(r,a);a.hooks&&(s=a.hooks.processAllTokens(s)),a.walkTokens&&this.walkTokens(s,a.walkTokens);let l=(a.hooks?a.hooks.provideParser():t?Zt.parse:Zt.parseInline)(s,a);return a.hooks&&(l=a.hooks.postprocess(l)),l}catch(s){return o(s)}}}onError(t,r){return i=>{if(i.message+=`
|
|
230
|
+
Please report this to https://github.com/markedjs/marked.`,t){let n="<p>An error occurred:</p><pre>"+ie(i.message+"",!0)+"</pre>";return r?Promise.resolve(n):n}if(r)return Promise.reject(i);throw i}}},tr=new U_;function dt(e,t){return tr.parse(e,t)}dt.options=dt.setOptions=function(e){return tr.setOptions(e),dt.defaults=tr.defaults,Xf(dt.defaults),dt};dt.getDefaults=Yo;dt.defaults=or;dt.use=function(...e){return tr.use(...e),dt.defaults=tr.defaults,Xf(dt.defaults),dt};dt.walkTokens=function(e,t){return tr.walkTokens(e,t)};dt.parseInline=tr.parseInline;dt.Parser=Zt;dt.parser=Zt.parse;dt.Renderer=In;dt.TextRenderer=Jo;dt.Lexer=Vt;dt.lexer=Vt.lex;dt.Tokenizer=Nn;dt.Hooks=ni;dt.parse=dt;dt.options;dt.setOptions;dt.use;dt.walkTokens;dt.parseInline;Zt.parse;Vt.lex;function ap(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var n=i.reduce(function(s,l){var c=l.match(/\n([\t ]+|(?!\s).)/g);return c?s.concat(c.map(function(h){var u,d;return(d=(u=h.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&d!==void 0?d:0})):s},[]);if(n.length){var a=new RegExp(`
|
|
231
|
+
[ ]{`+Math.min.apply(Math,n)+"}","g");i=i.map(function(s){return s.replace(a,`
|
|
232
|
+
`)})}i[0]=i[0].replace(/^\r?\n/,"");var o=i[0];return t.forEach(function(s,l){var c=o.match(/(?:^|\n)( *)$/),h=c?c[1]:"",u=s;typeof s=="string"&&s.includes(`
|
|
233
|
+
`)&&(u=String(s).split(`
|
|
234
|
+
`).map(function(d,f){return f===0?d:""+h+d}).join(`
|
|
235
|
+
`)),o+=u+i[l+1]}),o}var sp={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},Ns=new Map,op=new Map,lp=p(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(N.debug("Registering icon pack:",t.name),"loader"in t)op.set(t.name,t.loader);else if("icons"in t)Ns.set(t.name,t.icons);else throw N.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),cp=p(async(e,t)=>{const r=VC(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let n=Ns.get(i);if(!n){const o=op.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{n={...await o(),prefix:i},Ns.set(i,n)}catch(s){throw N.error(s),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=QC(n,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),G_=p(async e=>{try{return await cp(e),!0}catch{return!1}},"isIconAvailable"),zr=p(async(e,t,r)=>{let i;try{i=await cp(e,t?.fallbackPrefix)}catch(o){N.error(o),i=sp}const n=a_(i,t),a=h_(c_(n.body),{...n.attributes,...r});return Ht(a,$t())},"getIconSVG");function hp(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
|
|
236
|
+
`).replace(/\n{2,}/g,`
|
|
237
|
+
`),n=ap(i);return t===!1?n.replace(/ /g," "):n}p(hp,"preprocessMarkdown");function up(e,t={}){const r=hp(e,t),i=dt.lexer(r),n=[[]];let a=0;function o(s,l="normal"){s.type==="text"?s.text.split(`
|
|
238
|
+
`).forEach((h,u)=>{u!==0&&(a++,n.push([])),h.split(" ").forEach(d=>{d=d.replace(/'/g,"'"),d&&n[a].push({content:d,type:l})})}):s.type==="strong"||s.type==="em"?s.tokens.forEach(c=>{o(c,s.type)}):s.type==="html"&&n[a].push({content:s.text,type:"normal"})}return p(o,"processNode"),i.forEach(s=>{s.type==="paragraph"?s.tokens?.forEach(l=>{o(l)}):s.type==="html"?n[a].push({content:s.text,type:"normal"}):n[a].push({content:s.raw,type:"normal"})}),n}p(up,"markdownToLines");function dp(e,{markdownAutoWrap:t}={}){const r=dt.lexer(e);function i(n){return n.type==="text"?t===!1?n.text.replace(/\n */g,"<br/>").replace(/ /g," "):n.text.replace(/\n */g,"<br/>"):n.type==="strong"?`<strong>${n.tokens?.map(i).join("")}</strong>`:n.type==="em"?`<em>${n.tokens?.map(i).join("")}</em>`:n.type==="paragraph"?`<p>${n.tokens?.map(i).join("")}</p>`:n.type==="space"?"":n.type==="html"?`${n.text}`:n.type==="escape"?n.text:(N.warn(`Unsupported markdown: ${n.type}`),n.raw)}return p(i,"output"),r.map(i).join("")}p(dp,"markdownToHTML");function fp(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}p(fp,"splitTextToChars");function pp(e,t){const r=fp(t.content);return tl(e,[],r,t.type)}p(pp,"splitWordToFitWidth");function tl(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[n,...a]=r,o=[...t,n];return e([{content:o.join(""),type:i}])?tl(e,o,a,i):(t.length===0&&n&&(t.push(n),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}p(tl,"splitWordToFitWidthRecursion");function gp(e,t){if(e.some(({content:r})=>r.includes(`
|
|
239
|
+
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return zn(e,t)}p(gp,"splitLineToFitWidth");function zn(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let n="";e[0].content===" "&&(n=" ",e.shift());const a=e.shift()??{content:" ",type:"normal"},o=[...i];if(n!==""&&o.push({content:n,type:"normal"}),o.push(a),t(o))return zn(e,t,r,o);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){const[s,l]=pp(t,a);r.push([s]),l.content&&e.unshift(l)}return zn(e,t,r)}p(zn,"splitLineToFitWidthRecursion");function Is(e,t){t&&e.attr("style",t)}p(Is,"applyStyle");async function mp(e,t,r,i,n=!1,a=$t()){const o=e.append("foreignObject");o.attr("width",`${10*r}px`),o.attr("height",`${10*r}px`);const s=o.append("xhtml:div"),l=Ze(t.label)?await Qn(t.label.replace(rr.lineBreakRegex,`
|
|
240
|
+
`),a):Ht(t.label,a),c=t.isNode?"nodeLabel":"edgeLabel",h=s.append("span");h.html(l),Is(h,t.labelStyle),h.attr("class",`${c} ${i}`),Is(s,t.labelStyle),s.style("display","table-cell"),s.style("white-space","nowrap"),s.style("line-height","1.5"),s.style("max-width",r+"px"),s.style("text-align","center"),s.attr("xmlns","http://www.w3.org/1999/xhtml"),n&&s.attr("class","labelBkg");let u=s.node().getBoundingClientRect();return u.width===r&&(s.style("display","table"),s.style("white-space","break-spaces"),s.style("width",r+"px"),u=s.node().getBoundingClientRect()),o.node()}p(mp,"addHtmlSpan");function ba(e,t,r){return e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em")}p(ba,"createTspan");function yp(e,t,r){const i=e.append("text"),n=ba(i,1,t);wa(n,r);const a=n.node().getComputedTextLength();return i.remove(),a}p(yp,"computeWidthOfText");function xp(e,t,r){const i=e.append("text"),n=ba(i,1,t);wa(n,[{content:r,type:"normal"}]);const a=n.node()?.getBoundingClientRect();return a&&i.remove(),a}p(xp,"computeDimensionOfText");function bp(e,t,r,i=!1){const a=t.append("g"),o=a.insert("rect").attr("class","background").attr("style","stroke: none"),s=a.append("text").attr("y","-10.1");let l=0;for(const c of r){const h=p(d=>yp(a,1.1,d)<=e,"checkWidth"),u=h(c)?[c]:gp(c,h);for(const d of u){const f=ba(s,l,1.1);wa(f,d),l++}}if(i){const c=s.node().getBBox(),h=2;return o.attr("x",c.x-h).attr("y",c.y-h).attr("width",c.width+2*h).attr("height",c.height+2*h),a.node()}else return s.node()}p(bp,"createFormattedText");function wa(e,t){e.text(""),t.forEach((r,i)=>{const n=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?n.text(r.content):n.text(" "+r.content)})}p(wa,"updateTextContentAndStyles");async function el(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(n,a,o)=>(r.push((async()=>{const s=`${a}:${o}`;return await G_(s)?await zr(s,void 0,{class:"label-icon"}):`<i class='${Ht(n,t).replace(":"," ")}'></i>`})()),n));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}p(el,"replaceIconSubstring");var Ce=p(async(e,t="",{style:r="",isTitle:i=!1,classes:n="",useHtmlLabels:a=!0,isNode:o=!0,width:s=200,addSvgBackground:l=!1}={},c)=>{if(N.debug("XYZ createText",t,r,i,n,a,o,"addSvgBackground: ",l),a){const h=dp(t,c),u=await el(Fe(h),c),d=t.replace(/\\\\/g,"\\"),f={isNode:o,label:Ze(t)?d:u,labelStyle:r.replace("fill:","color:")};return await mp(e,f,s,n,l,c)}else{const h=t.replace(/<br\s*\/?>/g,"<br/>"),u=up(h.replace("<br>","<br/>"),c),d=bp(s,e,u,t?l:!1);if(o){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const f=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");lt(d).attr("style",f)}else{const f=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");lt(d).select("rect").attr("style",f.replace(/background:/g,"fill:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");lt(d).select("text").attr("style",g)}return d}},"createText");function ja(e,t,r){if(e&&e.length){const[i,n]=t,a=Math.PI/180*r,o=Math.cos(a),s=Math.sin(a);for(const l of e){const[c,h]=l;l[0]=(c-i)*o-(h-n)*s+i,l[1]=(c-i)*s+(h-n)*o+n}}}function X_(e,t){return e[0]===t[0]&&e[1]===t[1]}function V_(e,t,r,i=1){const n=r,a=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,s=[0,0];if(n)for(const c of o)ja(c,s,n);const l=(function(c,h,u){const d=[];for(const b of c){const w=[...b];X_(w[0],w[w.length-1])||w.push([w[0][0],w[0][1]]),w.length>2&&d.push(w)}const f=[];h=Math.max(h,.1);const g=[];for(const b of d)for(let w=0;w<b.length-1;w++){const C=b[w],v=b[w+1];if(C[1]!==v[1]){const L=Math.min(C[1],v[1]);g.push({ymin:L,ymax:Math.max(C[1],v[1]),x:L===C[1]?C[0]:v[0],islope:(v[0]-C[0])/(v[1]-C[1])})}}if(g.sort(((b,w)=>b.ymin<w.ymin?-1:b.ymin>w.ymin?1:b.x<w.x?-1:b.x>w.x?1:b.ymax===w.ymax?0:(b.ymax-w.ymax)/Math.abs(b.ymax-w.ymax))),!g.length)return f;let m=[],y=g[0].ymin,x=0;for(;m.length||g.length;){if(g.length){let b=-1;for(let w=0;w<g.length&&!(g[w].ymin>y);w++)b=w;g.splice(0,b+1).forEach((w=>{m.push({s:y,edge:w})}))}if(m=m.filter((b=>!(b.edge.ymax<=y))),m.sort(((b,w)=>b.edge.x===w.edge.x?0:(b.edge.x-w.edge.x)/Math.abs(b.edge.x-w.edge.x))),(u!==1||x%h==0)&&m.length>1)for(let b=0;b<m.length;b+=2){const w=b+1;if(w>=m.length)break;const C=m[b].edge,v=m[w].edge;f.push([[Math.round(C.x),y],[Math.round(v.x),y]])}y+=u,m.forEach((b=>{b.edge.x=b.edge.x+u*b.edge.islope})),x++}return f})(o,a,i);if(n){for(const c of o)ja(c,s,-n);(function(c,h,u){const d=[];c.forEach((f=>d.push(...f))),ja(d,h,u)})(l,s,-n)}return l}function Di(e,t){var r;const i=t.hachureAngle+90;let n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.round(Math.max(n,.1));let a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=n),V_(e,n,i,a||1)}class rl{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Di(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const n of t)i.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],r));return i}}function va(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class Z_ extends rl{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const n=Di(t,Object.assign({},r,{hachureGap:i})),a=Math.PI/180*r.hachureAngle,o=[],s=.5*i*Math.cos(a),l=.5*i*Math.sin(a);for(const[c,h]of n)va([c,h])&&o.push([[c[0]-s,c[1]+l],[...h]],[[c[0]+s,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}}class K_ extends rl{fillPolygons(t,r){const i=this._fillPolygons(t,r),n=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(t,n);return i.ops=i.ops.concat(a.ops),i}}class Q_{constructor(t){this.helper=t}fillPolygons(t,r){const i=Di(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);const o=n/4;for(const s of t){const l=va(s),c=l/n,h=Math.ceil(c)-1,u=l-h*n,d=(s[0][0]+s[1][0])/2-n/4,f=Math.min(s[0][1],s[1][1]);for(let g=0;g<h;g++){const m=f+u+g*n,y=d-o+2*Math.random()*o,x=m-o+2*Math.random()*o,b=this.helper.ellipse(y,x,a,a,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class J_{constructor(t){this.helper=t}fillPolygons(t,r){const i=Di(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,n=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,a=[];return t.forEach((o=>{const s=va(o),l=Math.floor(s/(i+n)),c=(s+n-l*(i+n))/2;let h=o[0],u=o[1];h[0]>u[0]&&(h=o[1],u=o[0]);const d=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let f=0;f<l;f++){const g=f*(i+n),m=g+i,y=[h[0]+g*Math.cos(d)+c*Math.cos(d),h[1]+g*Math.sin(d)+c*Math.sin(d)],x=[h[0]+m*Math.cos(d)+c*Math.cos(d),h[1]+m*Math.sin(d)+c*Math.sin(d)];a.push(...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],r))}})),a}}class tS{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,n=r.zigzagOffset<0?i:r.zigzagOffset,a=Di(t,r=Object.assign({},r,{hachureGap:i+n}));return{type:"fillSketch",ops:this.zigzagLines(a,n,r)}}zigzagLines(t,r,i){const n=[];return t.forEach((a=>{const o=va(a),s=Math.round(o/(2*r));let l=a[0],c=a[1];l[0]>c[0]&&(l=a[1],c=a[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let u=0;u<s;u++){const d=2*u*r,f=2*(u+1)*r,g=Math.sqrt(2*Math.pow(r,2)),m=[l[0]+d*Math.cos(h),l[1]+d*Math.sin(h)],y=[l[0]+f*Math.cos(h),l[1]+f*Math.sin(h)],x=[m[0]+g*Math.cos(h+Math.PI/4),m[1]+g*Math.sin(h+Math.PI/4)];n.push(...this.helper.doubleLineOps(m[0],m[1],x[0],x[1],i),...this.helper.doubleLineOps(x[0],x[1],y[0],y[1],i))}})),n}}const zt={};class eS{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const rS=0,Wa=1,gc=2,Gi={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function Ha(e,t){return e.type===t}function il(e){const t=[],r=(function(o){const s=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))s[s.length]={type:rS,text:RegExp.$1},o=o.substr(RegExp.$1.length);else{if(!o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];s[s.length]={type:Wa,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return s[s.length]={type:gc,text:""},s})(e);let i="BOD",n=0,a=r[n];for(;!Ha(a,gc);){let o=0;const s=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return il("M0,0"+e);n++,o=Gi[a.text],i=a.text}else Ha(a,Wa)?o=Gi[i]:(n++,o=Gi[a.text],i=a.text);if(!(n+o<r.length))throw new Error("Path data ended short");for(let l=n;l<n+o;l++){const c=r[l];if(!Ha(c,Wa))throw new Error("Param not a number: "+i+","+c.text);s[s.length]=+c.text}if(typeof Gi[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:s};t.push(l),n+=o,a=r[n],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function wp(e){let t=0,r=0,i=0,n=0;const a=[];for(const{key:o,data:s}of e)switch(o){case"M":a.push({key:"M",data:[...s]}),[t,r]=s,[i,n]=s;break;case"m":t+=s[0],r+=s[1],a.push({key:"M",data:[t,r]}),i=t,n=r;break;case"L":a.push({key:"L",data:[...s]}),[t,r]=s;break;case"l":t+=s[0],r+=s[1],a.push({key:"L",data:[t,r]});break;case"C":a.push({key:"C",data:[...s]}),t=s[4],r=s[5];break;case"c":{const l=s.map(((c,h)=>h%2?c+r:c+t));a.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":a.push({key:"Q",data:[...s]}),t=s[2],r=s[3];break;case"q":{const l=s.map(((c,h)=>h%2?c+r:c+t));a.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":a.push({key:"A",data:[...s]}),t=s[5],r=s[6];break;case"a":t+=s[5],r+=s[6],a.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],t,r]});break;case"H":a.push({key:"H",data:[...s]}),t=s[0];break;case"h":t+=s[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...s]}),r=s[0];break;case"v":r+=s[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...s]}),t=s[2],r=s[3];break;case"s":{const l=s.map(((c,h)=>h%2?c+r:c+t));a.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":a.push({key:"T",data:[...s]}),t=s[0],r=s[1];break;case"t":t+=s[0],r+=s[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=i,r=n}return a}function vp(e){const t=[];let r="",i=0,n=0,a=0,o=0,s=0,l=0;for(const{key:c,data:h}of e){switch(c){case"M":t.push({key:"M",data:[...h]}),[i,n]=h,[a,o]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],n=h[5],s=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,n]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,n]});break;case"V":n=h[0],t.push({key:"L",data:[i,n]});break;case"S":{let u=0,d=0;r==="C"||r==="S"?(u=i+(i-s),d=n+(n-l)):(u=i,d=n),t.push({key:"C",data:[u,d,...h]}),s=h[0],l=h[1],i=h[2],n=h[3];break}case"T":{const[u,d]=h;let f=0,g=0;r==="Q"||r==="T"?(f=i+(i-s),g=n+(n-l)):(f=i,g=n);const m=i+2*(f-i)/3,y=n+2*(g-n)/3,x=u+2*(f-u)/3,b=d+2*(g-d)/3;t.push({key:"C",data:[m,y,x,b,u,d]}),s=f,l=g,i=u,n=d;break}case"Q":{const[u,d,f,g]=h,m=i+2*(u-i)/3,y=n+2*(d-n)/3,x=f+2*(u-f)/3,b=g+2*(d-g)/3;t.push({key:"C",data:[m,y,x,b,f,g]}),s=u,l=d,i=f,n=g;break}case"A":{const u=Math.abs(h[0]),d=Math.abs(h[1]),f=h[2],g=h[3],m=h[4],y=h[5],x=h[6];u===0||d===0?(t.push({key:"C",data:[i,n,y,x,y,x]}),i=y,n=x):(i!==y||n!==x)&&(kp(i,n,y,x,u,d,f,g,m).forEach((function(b){t.push({key:"C",data:b})})),i=y,n=x);break}case"Z":t.push({key:"Z",data:[]}),i=a,n=o}r=c}return t}function Zr(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function kp(e,t,r,i,n,a,o,s,l,c){const h=(u=o,Math.PI*u/180);var u;let d=[],f=0,g=0,m=0,y=0;if(c)[f,g,m,y]=c;else{[e,t]=Zr(e,t,-h),[r,i]=Zr(r,i,-h);const j=(e-r)/2,$=(t-i)/2;let M=j*j/(n*n)+$*$/(a*a);M>1&&(M=Math.sqrt(M),n*=M,a*=M);const B=n*n,P=a*a,E=B*P-B*$*$-P*j*j,A=B*$*$+P*j*j,I=(s===l?-1:1)*Math.sqrt(Math.abs(E/A));m=I*n*$/a+(e+r)/2,y=I*-a*j/n+(t+i)/2,f=Math.asin(parseFloat(((t-y)/a).toFixed(9))),g=Math.asin(parseFloat(((i-y)/a).toFixed(9))),e<m&&(f=Math.PI-f),r<m&&(g=Math.PI-g),f<0&&(f=2*Math.PI+f),g<0&&(g=2*Math.PI+g),l&&f>g&&(f-=2*Math.PI),!l&&g>f&&(g-=2*Math.PI)}let x=g-f;if(Math.abs(x)>120*Math.PI/180){const j=g,$=r,M=i;g=l&&g>f?f+120*Math.PI/180*1:f+120*Math.PI/180*-1,d=kp(r=m+n*Math.cos(g),i=y+a*Math.sin(g),$,M,n,a,o,0,l,[g,j,m,y])}x=g-f;const b=Math.cos(f),w=Math.sin(f),C=Math.cos(g),v=Math.sin(g),L=Math.tan(x/4),T=4/3*n*L,D=4/3*a*L,z=[e,t],q=[e+T*w,t-D*b],O=[r+T*v,i-D*C],W=[r,i];if(q[0]=2*z[0]-q[0],q[1]=2*z[1]-q[1],c)return[q,O,W].concat(d);{d=[q,O,W].concat(d);const j=[];for(let $=0;$<d.length;$+=3){const M=Zr(d[$][0],d[$][1],h),B=Zr(d[$+1][0],d[$+1][1],h),P=Zr(d[$+2][0],d[$+2][1],h);j.push([M[0],M[1],B[0],B[1],P[0],P[1]])}return j}}const iS={randOffset:function(e,t){return nt(e,t)},randOffsetWithRange:function(e,t,r){return qn(e,t,r)},ellipse:function(e,t,r,i,n){const a=_p(r,i,n);return zs(e,t,n,a).opset},doubleLineOps:function(e,t,r,i,n){return Me(e,t,r,i,n,!0)}};function Cp(e,t,r,i,n){return{type:"path",ops:Me(e,t,r,i,n)}}function ln(e,t,r){const i=(e||[]).length;if(i>2){const n=[];for(let a=0;a<i-1;a++)n.push(...Me(e[a][0],e[a][1],e[a+1][0],e[a+1][1],r));return t&&n.push(...Me(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:n}}return i===2?Cp(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function nS(e,t,r,i,n){return(function(a,o){return ln(a,!0,o)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],n)}function mc(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Xi(r[0],1*(1+.2*t.roughness),t),n=t.disableMultiStroke?[]:Xi(r[0],1.5*(1+.22*t.roughness),bc(t));for(let a=1;a<r.length;a++){const o=r[a];if(o.length){const s=Xi(o,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:Xi(o,1.5*(1+.22*t.roughness),bc(t));for(const c of s)c.op!=="move"&&i.push(c);for(const c of l)c.op!=="move"&&n.push(c)}}return{type:"path",ops:i.concat(n)}}return{type:"path",ops:[]}}function _p(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),n=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),a=2*Math.PI/n;let o=Math.abs(e/2),s=Math.abs(t/2);const l=1-r.curveFitting;return o+=nt(o*l,r),s+=nt(s*l,r),{increment:a,rx:o,ry:s}}function zs(e,t,r,i){const[n,a]=wc(i.increment,e,t,i.rx,i.ry,1,i.increment*qn(.1,qn(.4,1,r),r),r);let o=jn(n,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[s]=wc(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=jn(s,null,r);o=o.concat(l)}return{estimatedPoints:a,opset:{type:"path",ops:o}}}function yc(e,t,r,i,n,a,o,s,l){const c=e,h=t;let u=Math.abs(r/2),d=Math.abs(i/2);u+=nt(.01*u,l),d+=nt(.01*d,l);let f=n,g=a;for(;f<0;)f+=2*Math.PI,g+=2*Math.PI;g-f>2*Math.PI&&(f=0,g=2*Math.PI);const m=2*Math.PI/l.curveStepCount,y=Math.min(m/2,(g-f)/2),x=vc(y,c,h,u,d,f,g,1,l);if(!l.disableMultiStroke){const b=vc(y,c,h,u,d,f,g,1.5,l);x.push(...b)}return o&&(s?x.push(...Me(c,h,c+u*Math.cos(f),h+d*Math.sin(f),l),...Me(c,h,c+u*Math.cos(g),h+d*Math.sin(g),l)):x.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(f),h+d*Math.sin(f)]})),{type:"path",ops:x}}function xc(e,t){const r=vp(wp(il(e))),i=[];let n=[0,0],a=[0,0];for(const{key:o,data:s}of r)switch(o){case"M":a=[s[0],s[1]],n=[s[0],s[1]];break;case"L":i.push(...Me(a[0],a[1],s[0],s[1],t)),a=[s[0],s[1]];break;case"C":{const[l,c,h,u,d,f]=s;i.push(...aS(l,c,h,u,d,f,a,t)),a=[d,f];break}case"Z":i.push(...Me(a[0],a[1],n[0],n[1],t)),a=[n[0],n[1]]}return{type:"path",ops:i}}function Ya(e,t){const r=[];for(const i of e)if(i.length){const n=t.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+nt(n,t),i[0][1]+nt(n,t)]});for(let o=1;o<a;o++)r.push({op:"lineTo",data:[i[o][0]+nt(n,t),i[o][1]+nt(n,t)]})}}return{type:"fillPath",ops:r}}function lr(e,t){return(function(r,i){let n=r.fillStyle||"hachure";if(!zt[n])switch(n){case"zigzag":zt[n]||(zt[n]=new Z_(i));break;case"cross-hatch":zt[n]||(zt[n]=new K_(i));break;case"dots":zt[n]||(zt[n]=new Q_(i));break;case"dashed":zt[n]||(zt[n]=new J_(i));break;case"zigzag-line":zt[n]||(zt[n]=new tS(i));break;default:n="hachure",zt[n]||(zt[n]=new rl(i))}return zt[n]})(t,iS).fillPolygons(e,t)}function bc(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Sp(e){return e.randomizer||(e.randomizer=new eS(e.seed||0)),e.randomizer.next()}function qn(e,t,r,i=1){return r.roughness*i*(Sp(r)*(t-e)+e)}function nt(e,t,r=1){return qn(-e,e,t,r)}function Me(e,t,r,i,n,a=!1){const o=a?n.disableMultiStrokeFill:n.disableMultiStroke,s=qs(e,t,r,i,n,!0,!1);if(o)return s;const l=qs(e,t,r,i,n,!0,!0);return s.concat(l)}function qs(e,t,r,i,n,a,o){const s=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(s);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=n.maxRandomnessOffset||0;h*h*100>s&&(h=l/10);const u=h/2,d=.2+.2*Sp(n);let f=n.bowing*n.maxRandomnessOffset*(i-t)/200,g=n.bowing*n.maxRandomnessOffset*(e-r)/200;f=nt(f,n,c),g=nt(g,n,c);const m=[],y=()=>nt(u,n,c),x=()=>nt(h,n,c),b=n.preserveVertices;return o?m.push({op:"move",data:[e+(b?0:y()),t+(b?0:y())]}):m.push({op:"move",data:[e+(b?0:nt(h,n,c)),t+(b?0:nt(h,n,c))]}),o?m.push({op:"bcurveTo",data:[f+e+(r-e)*d+y(),g+t+(i-t)*d+y(),f+e+2*(r-e)*d+y(),g+t+2*(i-t)*d+y(),r+(b?0:y()),i+(b?0:y())]}):m.push({op:"bcurveTo",data:[f+e+(r-e)*d+x(),g+t+(i-t)*d+x(),f+e+2*(r-e)*d+x(),g+t+2*(i-t)*d+x(),r+(b?0:x()),i+(b?0:x())]}),m}function Xi(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+nt(t,r),e[0][1]+nt(t,r)]),i.push([e[0][0]+nt(t,r),e[0][1]+nt(t,r)]);for(let n=1;n<e.length;n++)i.push([e[n][0]+nt(t,r),e[n][1]+nt(t,r)]),n===e.length-1&&i.push([e[n][0]+nt(t,r),e[n][1]+nt(t,r)]);return jn(i,null,r)}function jn(e,t,r){const i=e.length,n=[];if(i>3){const a=[],o=1-r.curveTightness;n.push({op:"move",data:[e[1][0],e[1][1]]});for(let s=1;s+2<i;s++){const l=e[s];a[0]=[l[0],l[1]],a[1]=[l[0]+(o*e[s+1][0]-o*e[s-1][0])/6,l[1]+(o*e[s+1][1]-o*e[s-1][1])/6],a[2]=[e[s+1][0]+(o*e[s][0]-o*e[s+2][0])/6,e[s+1][1]+(o*e[s][1]-o*e[s+2][1])/6],a[3]=[e[s+1][0],e[s+1][1]],n.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}}else i===3?(n.push({op:"move",data:[e[1][0],e[1][1]]}),n.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&n.push(...qs(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return n}function wc(e,t,r,i,n,a,o,s){const l=[],c=[];if(s.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+n*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const u=[t+i*Math.cos(h),r+n*Math.sin(h)];l.push(u),c.push(u)}c.push([t+i*Math.cos(0),r+n*Math.sin(0)]),c.push([t+i*Math.cos(e),r+n*Math.sin(e)])}else{const h=nt(.5,s)-Math.PI/2;c.push([nt(a,s)+t+.9*i*Math.cos(h-e),nt(a,s)+r+.9*n*Math.sin(h-e)]);const u=2*Math.PI+h-.01;for(let d=h;d<u;d+=e){const f=[nt(a,s)+t+i*Math.cos(d),nt(a,s)+r+n*Math.sin(d)];l.push(f),c.push(f)}c.push([nt(a,s)+t+i*Math.cos(h+2*Math.PI+.5*o),nt(a,s)+r+n*Math.sin(h+2*Math.PI+.5*o)]),c.push([nt(a,s)+t+.98*i*Math.cos(h+o),nt(a,s)+r+.98*n*Math.sin(h+o)]),c.push([nt(a,s)+t+.9*i*Math.cos(h+.5*o),nt(a,s)+r+.9*n*Math.sin(h+.5*o)])}return[c,l]}function vc(e,t,r,i,n,a,o,s,l){const c=a+nt(.1,l),h=[];h.push([nt(s,l)+t+.9*i*Math.cos(c-e),nt(s,l)+r+.9*n*Math.sin(c-e)]);for(let u=c;u<=o;u+=e)h.push([nt(s,l)+t+i*Math.cos(u),nt(s,l)+r+n*Math.sin(u)]);return h.push([t+i*Math.cos(o),r+n*Math.sin(o)]),h.push([t+i*Math.cos(o),r+n*Math.sin(o)]),jn(h,null,l)}function aS(e,t,r,i,n,a,o,s){const l=[],c=[s.maxRandomnessOffset||1,(s.maxRandomnessOffset||1)+.3];let h=[0,0];const u=s.disableMultiStroke?1:2,d=s.preserveVertices;for(let f=0;f<u;f++)f===0?l.push({op:"move",data:[o[0],o[1]]}):l.push({op:"move",data:[o[0]+(d?0:nt(c[0],s)),o[1]+(d?0:nt(c[0],s))]}),h=d?[n,a]:[n+nt(c[f],s),a+nt(c[f],s)],l.push({op:"bcurveTo",data:[e+nt(c[f],s),t+nt(c[f],s),r+nt(c[f],s),i+nt(c[f],s),h[0],h[1]]});return l}function Kr(e){return[...e]}function kc(e,t=0){const r=e.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(r===3)i.push(Kr(e[0]),Kr(e[1]),Kr(e[2]),Kr(e[2]));else{const n=[];n.push(e[0],e[0]);for(let s=1;s<e.length;s++)n.push(e[s]),s===e.length-1&&n.push(e[s]);const a=[],o=1-t;i.push(Kr(n[0]));for(let s=1;s+2<n.length;s++){const l=n[s];a[0]=[l[0],l[1]],a[1]=[l[0]+(o*n[s+1][0]-o*n[s-1][0])/6,l[1]+(o*n[s+1][1]-o*n[s-1][1])/6],a[2]=[n[s+1][0]+(o*n[s][0]-o*n[s+2][0])/6,n[s+1][1]+(o*n[s][1]-o*n[s+2][1])/6],a[3]=[n[s+1][0],n[s+1][1]],i.push(a[1],a[2],a[3])}}return i}function cn(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function sS(e,t,r){const i=cn(t,r);if(i===0)return cn(e,t);let n=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return n=Math.max(0,Math.min(1,n)),cn(e,Ie(t,r,n))}function Ie(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function js(e,t,r,i){const n=i||[];if((function(s,l){const c=s[l+0],h=s[l+1],u=s[l+2],d=s[l+3];let f=3*h[0]-2*c[0]-d[0];f*=f;let g=3*h[1]-2*c[1]-d[1];g*=g;let m=3*u[0]-2*d[0]-c[0];m*=m;let y=3*u[1]-2*d[1]-c[1];return y*=y,f<m&&(f=m),g<y&&(g=y),f+g})(e,t)<r){const s=e[t+0];n.length?(a=n[n.length-1],o=s,Math.sqrt(cn(a,o))>1&&n.push(s)):n.push(s),n.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],u=e[t+3],d=Ie(l,c,.5),f=Ie(c,h,.5),g=Ie(h,u,.5),m=Ie(d,f,.5),y=Ie(f,g,.5),x=Ie(m,y,.5);js([l,d,m,x],0,r,n),js([x,y,g,u],0,r,n)}var a,o;return n}function oS(e,t){return Wn(e,0,e.length,t)}function Wn(e,t,r,i,n){const a=n||[],o=e[t],s=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const u=sS(e[h],o,s);u>l&&(l=u,c=h)}return Math.sqrt(l)>i?(Wn(e,t,c+1,i,a),Wn(e,c,r,i,a)):(a.length||a.push(o),a.push(s)),a}function Ua(e,t=.15,r){const i=[],n=(e.length-1)/3;for(let a=0;a<n;a++)js(e,3*a,t,i);return r&&r>0?Wn(i,0,i.length,r):i}const Wt="none";class Hn{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,n,a){const o=this._o(a);return this._d("line",[Cp(t,r,i,n,o)],o)}rectangle(t,r,i,n,a){const o=this._o(a),s=[],l=nS(t,r,i,n,o);if(o.fill){const c=[[t,r],[t+i,r],[t+i,r+n],[t,r+n]];o.fillStyle==="solid"?s.push(Ya([c],o)):s.push(lr([c],o))}return o.stroke!==Wt&&s.push(l),this._d("rectangle",s,o)}ellipse(t,r,i,n,a){const o=this._o(a),s=[],l=_p(i,n,o),c=zs(t,r,o,l);if(o.fill)if(o.fillStyle==="solid"){const h=zs(t,r,o,l).opset;h.type="fillPath",s.push(h)}else s.push(lr([c.estimatedPoints],o));return o.stroke!==Wt&&s.push(c.opset),this._d("ellipse",s,o)}circle(t,r,i,n){const a=this.ellipse(t,r,i,i,n);return a.shape="circle",a}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[ln(t,!1,i)],i)}arc(t,r,i,n,a,o,s=!1,l){const c=this._o(l),h=[],u=yc(t,r,i,n,a,o,s,!0,c);if(s&&c.fill)if(c.fillStyle==="solid"){const d=Object.assign({},c);d.disableMultiStroke=!0;const f=yc(t,r,i,n,a,o,!0,!1,d);f.type="fillPath",h.push(f)}else h.push((function(d,f,g,m,y,x,b){const w=d,C=f;let v=Math.abs(g/2),L=Math.abs(m/2);v+=nt(.01*v,b),L+=nt(.01*L,b);let T=y,D=x;for(;T<0;)T+=2*Math.PI,D+=2*Math.PI;D-T>2*Math.PI&&(T=0,D=2*Math.PI);const z=(D-T)/b.curveStepCount,q=[];for(let O=T;O<=D;O+=z)q.push([w+v*Math.cos(O),C+L*Math.sin(O)]);return q.push([w+v*Math.cos(D),C+L*Math.sin(D)]),q.push([w,C]),lr([q],b)})(t,r,i,n,a,o,c));return c.stroke!==Wt&&h.push(u),this._d("arc",h,c)}curve(t,r){const i=this._o(r),n=[],a=mc(t,i);if(i.fill&&i.fill!==Wt)if(i.fillStyle==="solid"){const o=mc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],s=t;if(s.length){const l=typeof s[0][0]=="number"?[s]:s;for(const c of l)c.length<3?o.push(...c):c.length===3?o.push(...Ua(kc([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):o.push(...Ua(kc(c),10,(1+i.roughness)/2))}o.length&&n.push(lr([o],i))}return i.stroke!==Wt&&n.push(a),this._d("curve",n,i)}polygon(t,r){const i=this._o(r),n=[],a=ln(t,!0,i);return i.fill&&(i.fillStyle==="solid"?n.push(Ya([t],i)):n.push(lr([t],i))),i.stroke!==Wt&&n.push(a),this._d("polygon",n,i)}path(t,r){const i=this._o(r),n=[];if(!t)return this._d("path",n,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=i.fill&&i.fill!=="transparent"&&i.fill!==Wt,o=i.stroke!==Wt,s=!!(i.simplification&&i.simplification<1),l=(function(h,u,d){const f=vp(wp(il(h))),g=[];let m=[],y=[0,0],x=[];const b=()=>{x.length>=4&&m.push(...Ua(x,u)),x=[]},w=()=>{b(),m.length&&(g.push(m),m=[])};for(const{key:v,data:L}of f)switch(v){case"M":w(),y=[L[0],L[1]],m.push(y);break;case"L":b(),m.push([L[0],L[1]]);break;case"C":if(!x.length){const T=m.length?m[m.length-1]:y;x.push([T[0],T[1]])}x.push([L[0],L[1]]),x.push([L[2],L[3]]),x.push([L[4],L[5]]);break;case"Z":b(),m.push([y[0],y[1]])}if(w(),!d)return g;const C=[];for(const v of g){const L=oS(v,d);L.length&&C.push(L)}return C})(t,1,s?4-4*(i.simplification||1):(1+i.roughness)/2),c=xc(t,i);if(a)if(i.fillStyle==="solid")if(l.length===1){const h=xc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else n.push(Ya(l,i));else n.push(lr(l,i));return o&&(s?l.forEach((h=>{n.push(ln(h,!1,i))})):n.push(c)),this._d("path",n,i)}opsToPath(t,r){let i="";for(const n of t.ops){const a=typeof r=="number"&&r>=0?n.data.map((o=>+o.toFixed(r))):n.data;switch(n.op){case"move":i+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,n=[];for(const a of r){let o=null;switch(a.type){case"path":o={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Wt};break;case"fillPath":o={d:this.opsToPath(a),stroke:Wt,strokeWidth:0,fill:i.fill||Wt};break;case"fillSketch":o=this.fillSketch(a,i)}o&&n.push(o)}return n}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Wt,strokeWidth:i,fill:Wt}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class lS{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Hn(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.type){case"path":n.save(),n.strokeStyle=i.stroke==="none"?"transparent":i.stroke,n.lineWidth=i.strokeWidth,i.strokeLineDash&&n.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(n.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(n,o,a),n.restore();break;case"fillPath":{n.save(),n.fillStyle=i.fill||"";const s=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(n,o,a,s),n.restore();break}case"fillSketch":this.fillSketch(n,o,i)}}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=n,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,n="nonzero"){t.beginPath();for(const a of r.ops){const o=typeof i=="number"&&i>=0?a.data.map((s=>+s.toFixed(i))):a.data;switch(a.op){case"move":t.moveTo(o[0],o[1]);break;case"bcurveTo":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":t.lineTo(o[0],o[1])}}r.type==="fillPath"?t.fill(n):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,n,a){const o=this.gen.line(t,r,i,n,a);return this.draw(o),o}rectangle(t,r,i,n,a){const o=this.gen.rectangle(t,r,i,n,a);return this.draw(o),o}ellipse(t,r,i,n,a){const o=this.gen.ellipse(t,r,i,n,a);return this.draw(o),o}circle(t,r,i,n){const a=this.gen.circle(t,r,i,n);return this.draw(a),a}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,n,a,o,s=!1,l){const c=this.gen.arc(t,r,i,n,a,o,s,l);return this.draw(c),c}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const Vi="http://www.w3.org/2000/svg";class cS{constructor(t,r){this.svg=t,this.gen=new Hn(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,a=n.createElementNS(Vi,"g"),o=t.options.fixedDecimalPlaceDigits;for(const s of r){let l=null;switch(s.type){case"path":l=n.createElementNS(Vi,"path"),l.setAttribute("d",this.opsToPath(s,o)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=n.createElementNS(Vi,"path"),l.setAttribute("d",this.opsToPath(s,o)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(n,s,i)}l&&a.appendChild(l)}return a}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2);const a=t.createElementNS(Vi,"path");return a.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),a.setAttribute("stroke",i.fill||""),a.setAttribute("stroke-width",n+""),a.setAttribute("fill","none"),i.fillLineDash&&a.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,n,a){const o=this.gen.line(t,r,i,n,a);return this.draw(o)}rectangle(t,r,i,n,a){const o=this.gen.rectangle(t,r,i,n,a);return this.draw(o)}ellipse(t,r,i,n,a){const o=this.gen.ellipse(t,r,i,n,a);return this.draw(o)}circle(t,r,i,n){const a=this.gen.circle(t,r,i,n);return this.draw(a)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,n,a,o,s=!1,l){const c=this.gen.arc(t,r,i,n,a,o,s,l);return this.draw(c)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var Z={canvas:(e,t)=>new lS(e,t),svg:(e,t)=>new cS(e,t),generator:e=>new Hn(e),newSeed:()=>Hn.newSeed()},it=p(async(e,t,r)=>{let i;const n=t.useHtmlLabels||wt(ut()?.htmlLabels);r?i=r:i="node default";const a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=a.insert("g").attr("class","label").attr("style",Pt(t.labelStyle));let s;t.label===void 0?s="":s=typeof t.label=="string"?t.label:t.label[0];const l=await Ce(o,Ht(Fe(s),ut()),{useHtmlLabels:n,width:t.width||ut().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:t.labelStyle,addSvgBackground:!!t.icon||!!t.img});let c=l.getBBox();const h=(t?.padding??0)/2;if(n){const u=l.children[0],d=lt(l),f=u.getElementsByTagName("img");if(f){const g=s.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...f].map(m=>new Promise(y=>{function x(){if(m.style.display="flex",m.style.flexDirection="column",g){const b=ut().fontSize?ut().fontSize:window.getComputedStyle(document.body).fontSize,w=5,[C=ao.fontSize]=Ri(b),v=C*w+"px";m.style.minWidth=v,m.style.maxWidth=v}else m.style.width="100%";y(m)}p(x,"setupImage"),setTimeout(()=>{m.complete&&x()}),m.addEventListener("error",x),m.addEventListener("load",x)})))}c=u.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}return n?o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):o.attr("transform","translate(0, "+-c.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:a,bbox:c,halfPadding:h,label:o}},"labelHelper"),Ga=p(async(e,t,r)=>{const i=r.useHtmlLabels||wt(ut()?.flowchart?.htmlLabels),n=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await Ce(n,Ht(Fe(t),ut()),{useHtmlLabels:i,width:r.width||ut()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let o=a.getBBox();const s=r.padding/2;if(wt(ut()?.flowchart?.htmlLabels)){const l=a.children[0],c=lt(a);o=l.getBoundingClientRect(),c.attr("width",o.width),c.attr("height",o.height)}return i?n.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):n.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&n.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:s,label:n}},"insertLabel"),Q=p((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),rt=p((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function ot(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}p(ot,"createPathFromPoints");function Ae(e,t,r,i,n,a){const o=[],l=r-e,c=i-t,h=l/a,u=2*Math.PI/h,d=t+c/2;for(let f=0;f<=50;f++){const g=f/50,m=e+g*l,y=d+n*Math.sin(u*(m-e));o.push({x:m,y})}return o}p(Ae,"generateFullSineWavePoints");function Bi(e,t,r,i,n,a){const o=[],s=n*Math.PI/180,h=(a*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const d=s+u*h,f=e+r*Math.cos(d),g=t+r*Math.sin(d);o.push({x:-f,y:-g})}return o}p(Bi,"generateCirclePoints");var hS=p((e,t)=>{var r=e.x,i=e.y,n=t.x-r,a=t.y-i,o=e.width/2,s=e.height/2,l,c;return Math.abs(a)*o>Math.abs(n)*s?(a<0&&(s=-s),l=a===0?0:s*n/a,c=s):(n<0&&(o=-o),l=o,c=n===0?0:o*a/n),{x:r+l,y:i+c}},"intersectRect"),qr=hS;function Tp(e,t){t&&e.attr("style",t)}p(Tp,"applyStyle");async function Bp(e){const t=lt(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),i=ut();let n=e.label;e.label&&Ze(e.label)&&(n=await Qn(e.label.replace(rr.lineBreakRegex,`
|
|
241
|
+
`),i));const o='<span class="'+(e.isNode?"nodeLabel":"edgeLabel")+'" '+(e.labelStyle?'style="'+e.labelStyle+'"':"")+">"+n+"</span>";return r.html(Ht(o,i)),Tp(r,e.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}p(Bp,"addHtmlLabel");var uS=p(async(e,t,r,i)=>{let n=e||"";if(typeof n=="object"&&(n=n[0]),wt(ut().flowchart.htmlLabels)){n=n.replace(/\\n|\n/g,"<br />"),N.info("vertexText"+n);const a={isNode:i,label:Fe(n).replace(/fa[blrs]?:fa-[\w-]+/g,s=>`<i class='${s.replace(":"," ")}'></i>`),labelStyle:t&&t.replace("fill:","color:")};return await Bp(a)}else{const a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",t.replace("color:","fill:"));let o=[];typeof n=="string"?o=n.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(n)?o=n:o=[];for(const s of o){const l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),r?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=s.trim(),a.appendChild(l)}return a}},"createLabel"),He=uS,Pe=p((e,t,r,i,n)=>["M",e+n,t,"H",e+r-n,"A",n,n,0,0,1,e+r,t+n,"V",t+i-n,"A",n,n,0,0,1,e+r-n,t+i,"H",e+n,"A",n,n,0,0,1,e,t+i-n,"V",t+n,"A",n,n,0,0,1,e+n,t,"Z"].join(" "),"createRoundedRectPathD"),$p=p(async(e,t)=>{N.info("Creating subgraph rect for ",t.id,t);const r=ut(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:s,nodeStyles:l,borderStyles:c,backgroundStyles:h}=V(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),d=wt(r.flowchart.htmlLabels),f=u.insert("g").attr("class","cluster-label "),g=await Ce(f,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0});let m=g.getBBox();if(wt(r.flowchart.htmlLabels)){const T=g.children[0],D=lt(g);m=T.getBoundingClientRect(),D.attr("width",m.width),D.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,w=t.y-x/2;N.trace("Data ",t,JSON.stringify(t));let C;if(t.look==="handDrawn"){const T=Z.svg(u),D=K(t,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:n}),z=T.path(Pe(b,w,y,x,0),D);C=u.insert(()=>(N.debug("Rough node insert CXC",z),z),":first-child"),C.select("path:nth-child(2)").attr("style",c.join(";")),C.select("path").attr("style",h.join(";").replace("fill","stroke"))}else C=u.insert("rect",":first-child"),C.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",w).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:v}=ca(r);if(f.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+v})`),s){const T=f.select("span");T&&T.attr("style",s)}const L=C.node().getBBox();return t.offsetX=0,t.width=L.width,t.height=L.height,t.offsetY=m.height-t.padding/2,t.intersect=function(T){return qr(t,T)},{cluster:u,labelBBox:m}},"rect"),dS=p((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.id),i=r.insert("rect",":first-child"),n=0*t.padding,a=n/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+n).attr("height",t.height+n).attr("fill","none");const o=i.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(s){return qr(t,s)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),fS=p(async(e,t)=>{const r=ut(),{themeVariables:i,handDrawnSeed:n}=r,{altBackground:a,compositeBackground:o,compositeTitleBackground:s,nodeBorder:l}=i,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-id",t.id).attr("data-look",t.look),h=c.insert("g",":first-child"),u=c.insert("g").attr("class","cluster-label");let d=c.append("rect");const f=u.node().appendChild(await He(t.label,t.labelStyle,void 0,!0));let g=f.getBBox();if(wt(r.flowchart.htmlLabels)){const z=f.children[0],q=lt(f);g=z.getBoundingClientRect(),q.attr("width",g.width),q.attr("height",g.height)}const m=0*t.padding,y=m/2,x=(t.width<=g.width+t.padding?g.width+t.padding:t.width)+m;t.width<=g.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+m,w=t.height+m-g.height-6,C=t.x-x/2,v=t.y-b/2;t.width=x;const L=t.y-t.height/2-y+g.height+2;let T;if(t.look==="handDrawn"){const z=t.cssClasses.includes("statediagram-cluster-alt"),q=Z.svg(c),O=t.rx||t.ry?q.path(Pe(C,v,x,b,10),{roughness:.7,fill:s,fillStyle:"solid",stroke:l,seed:n}):q.rectangle(C,v,x,b,{seed:n});T=c.insert(()=>O,":first-child");const W=q.rectangle(C,L,x,w,{fill:z?a:o,fillStyle:z?"hachure":"solid",stroke:l,seed:n});T=c.insert(()=>O,":first-child"),d=c.insert(()=>W)}else T=h.insert("rect",":first-child"),T.attr("class","outer").attr("x",C).attr("y",v).attr("width",x).attr("height",b).attr("data-look",t.look),d.attr("class","inner").attr("x",C).attr("y",L).attr("width",x).attr("height",w);u.attr("transform",`translate(${t.x-g.width/2}, ${v+1-(wt(r.flowchart.htmlLabels)?0:3)})`);const D=T.node().getBBox();return t.height=D.height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function(z){return qr(t,z)},{cluster:c,labelBBox:g}},"roundedWithTitle"),pS=p(async(e,t)=>{N.info("Creating subgraph rect for ",t.id,t);const r=ut(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:s,nodeStyles:l,borderStyles:c,backgroundStyles:h}=V(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),d=wt(r.flowchart.htmlLabels),f=u.insert("g").attr("class","cluster-label "),g=await Ce(f,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width});let m=g.getBBox();if(wt(r.flowchart.htmlLabels)){const T=g.children[0],D=lt(g);m=T.getBoundingClientRect(),D.attr("width",m.width),D.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,w=t.y-x/2;N.trace("Data ",t,JSON.stringify(t));let C;if(t.look==="handDrawn"){const T=Z.svg(u),D=K(t,{roughness:.7,fill:a,stroke:o,fillWeight:4,seed:n}),z=T.path(Pe(b,w,y,x,t.rx),D);C=u.insert(()=>(N.debug("Rough node insert CXC",z),z),":first-child"),C.select("path:nth-child(2)").attr("style",c.join(";")),C.select("path").attr("style",h.join(";").replace("fill","stroke"))}else C=u.insert("rect",":first-child"),C.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",w).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:v}=ca(r);if(f.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+v})`),s){const T=f.select("span");T&&T.attr("style",s)}const L=C.node().getBBox();return t.offsetX=0,t.width=L.width,t.height=L.height,t.offsetY=m.height-t.padding/2,t.intersect=function(T){return qr(t,T)},{cluster:u,labelBBox:m}},"kanbanSection"),gS=p((e,t)=>{const r=ut(),{themeVariables:i,handDrawnSeed:n}=r,{nodeBorder:a}=i,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-look",t.look),s=o.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const h=t.height+l,u=t.x-c/2,d=t.y-h/2;t.width=c;let f;if(t.look==="handDrawn"){const y=Z.svg(o).rectangle(u,d,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:n});f=o.insert(()=>y,":first-child")}else f=s.insert("rect",":first-child"),f.attr("class","divider").attr("x",u).attr("y",d).attr("width",c).attr("height",h).attr("data-look",t.look);const g=f.node().getBBox();return t.height=g.height,t.offsetX=0,t.offsetY=0,t.intersect=function(m){return qr(t,m)},{cluster:o,labelBBox:{}}},"divider"),mS=$p,yS={rect:$p,squareRect:mS,roundedWithTitle:fS,noteGroup:dS,divider:gS,kanbanSection:pS},Lp=new Map,Mp=p(async(e,t)=>{const r=t.shape||"rect",i=await yS[r](e,t);return Lp.set(t.id,i),i},"insertCluster"),xS=p(()=>{Lp=new Map},"clear");function Ap(e,t){return e.intersect(t)}p(Ap,"intersectNode");var bS=Ap;function Ep(e,t,r,i){var n=e.x,a=e.y,o=n-i.x,s=a-i.y,l=Math.sqrt(t*t*s*s+r*r*o*o),c=Math.abs(t*r*o/l);i.x<n&&(c=-c);var h=Math.abs(t*r*s/l);return i.y<a&&(h=-h),{x:n+c,y:a+h}}p(Ep,"intersectEllipse");var Fp=Ep;function Pp(e,t,r){return Fp(e,t,t,r)}p(Pp,"intersectCircle");var wS=Pp;function Rp(e,t,r,i){{const n=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,s=n*r.x+a*r.y+o,l=n*i.x+a*i.y+o,c=1e-6;if(s!==0&&l!==0&&Ws(s,l))return;const h=i.y-r.y,u=r.x-i.x,d=i.x*r.y-r.x*i.y,f=h*e.x+u*e.y+d,g=h*t.x+u*t.y+d;if(Math.abs(f)<c&&Math.abs(g)<c&&Ws(f,g))return;const m=n*u-h*a;if(m===0)return;const y=Math.abs(m/2);let x=a*d-u*o;const b=x<0?(x-y)/m:(x+y)/m;x=h*o-n*d;const w=x<0?(x-y)/m:(x+y)/m;return{x:b,y:w}}}p(Rp,"intersectLine");function Ws(e,t){return e*t>0}p(Ws,"sameSign");var vS=Rp;function Op(e,t,r){let i=e.x,n=e.y,a=[],o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){o=Math.min(o,h.x),s=Math.min(s,h.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));let l=i-e.width/2-o,c=n-e.height/2-s;for(let h=0;h<t.length;h++){let u=t[h],d=t[h<t.length-1?h+1:0],f=vS(e,r,{x:l+u.x,y:c+u.y},{x:l+d.x,y:c+d.y});f&&a.push(f)}return a.length?(a.length>1&&a.sort(function(h,u){let d=h.x-r.x,f=h.y-r.y,g=Math.sqrt(d*d+f*f),m=u.x-r.x,y=u.y-r.y,x=Math.sqrt(m*m+y*y);return g<x?-1:g===x?0:1}),a[0]):e}p(Op,"intersectPolygon");var kS=Op,G={node:bS,circle:wS,ellipse:Fp,polygon:kS,rect:qr};function Dp(e,t){const{labelStyles:r}=V(t);t.labelStyle=r;const i=rt(t);let n=i;i||(n="anchor");const a=e.insert("g").attr("class",n).attr("id",t.domId||t.id),o=1,{cssStyles:s}=t,l=Z.svg(a),c=K(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,o*2,c),u=a.insert(()=>h,":first-child");return u.attr("class","anchor").attr("style",Pt(s)),Q(t,u),t.intersect=function(d){return N.info("Circle intersect",t,o,d),G.circle(t,o,d)},a}p(Dp,"anchor");function Hs(e,t,r,i,n,a,o){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,d=(i-t)/2,f=u/n,g=d/a,m=Math.sqrt(f**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-m**2),x=l+y*a*Math.sin(h)*(o?-1:1),b=c-y*n*Math.cos(h)*(o?-1:1),w=Math.atan2((t-b)/a,(e-x)/n);let v=Math.atan2((i-b)/a,(r-x)/n)-w;o&&v<0&&(v+=2*Math.PI),!o&&v>0&&(v-=2*Math.PI);const L=[];for(let T=0;T<20;T++){const D=T/19,z=w+D*v,q=x+n*Math.cos(z),O=b+a*Math.sin(z);L.push({x:q,y:O})}return L}p(Hs,"generateArcPoints");async function Np(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),o=a.width+t.padding+20,s=a.height+t.padding,l=s/2,c=l/(2.5+s/50),{cssStyles:h}=t,u=[{x:o/2,y:-s/2},{x:-o/2,y:-s/2},...Hs(-o/2,-s/2,-o/2,s/2,c,l,!1),{x:o/2,y:s/2},...Hs(o/2,s/2,o/2,-s/2,c,l,!0)],d=Z.svg(n),f=K(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=ot(u),m=d.path(g,f),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(${c/2}, 0)`),Q(t,y),t.intersect=function(x){return G.polygon(t,u,x)},n}p(Np,"bowTieRect");function Re(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(n){return n.x+","+n.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}p(Re,"insertPolygonShape");async function Ip(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),o=a.height+t.padding,s=12,l=a.width+t.padding+s,c=0,h=l,u=-o,d=0,f=[{x:c+s,y:u},{x:h,y:u},{x:h,y:d},{x:c,y:d},{x:c,y:u+s},{x:c+s,y:u}];let g;const{cssStyles:m}=t;if(t.look==="handDrawn"){const y=Z.svg(n),x=K(t,{}),b=ot(f),w=y.path(b,x);g=n.insert(()=>w,":first-child").attr("transform",`translate(${-l/2}, ${o/2})`),m&&g.attr("style",m)}else g=Re(n,l,o,f);return i&&g.attr("style",i),Q(t,g),t.intersect=function(y){return G.polygon(t,f,y)},n}p(Ip,"card");function zp(e,t){const{nodeStyles:r}=V(t);t.label="";const i=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),{cssStyles:n}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],s=Z.svg(i),l=K(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=ot(o),h=s.path(c,l),u=i.insert(()=>h,":first-child");return n&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",n),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(d){return G.polygon(t,o,d)},i}p(zp,"choice");async function nl(e,t,r){const{labelStyles:i,nodeStyles:n}=V(t);t.labelStyle=i;const{shapeSvg:a,bbox:o,halfPadding:s}=await it(e,t,rt(t)),l=r?.padding??s,c=o.width/2+l;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const d=Z.svg(a),f=K(t,{}),g=d.circle(0,0,c*2,f);h=a.insert(()=>g,":first-child"),h.attr("class","basic label-container").attr("style",Pt(u))}else h=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",c).attr("cx",0).attr("cy",0);return Q(t,h),t.calcIntersect=function(d,f){const g=d.width/2;return G.circle(d,g,f)},t.intersect=function(d){return N.info("Circle intersect",t,c,d),G.circle(t,c,d)},a}p(nl,"circle");function qp(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,n={x:i/2*t,y:i/2*r},a={x:-(i/2)*t,y:i/2*r},o={x:-(i/2)*t,y:-(i/2)*r},s={x:i/2*t,y:-(i/2)*r};return`M ${a.x},${a.y} L ${s.x},${s.y}
|
|
242
|
+
M ${n.x},${n.y} L ${o.x},${o.y}`}p(qp,"createLine");function jp(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r,t.label="";const n=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),a=Math.max(30,t?.width??0),{cssStyles:o}=t,s=Z.svg(n),l=K(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=s.circle(0,0,a*2,l),h=qp(a),u=s.path(h,l),d=n.insert(()=>c,":first-child");return d.insert(()=>u),o&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",i),Q(t,d),t.intersect=function(f){return N.info("crossedCircle intersect",t,{radius:a,point:f}),G.circle(t,a,f)},n}p(jp,"crossedCircle");function pe(e,t,r,i=100,n=0,a=180){const o=[],s=n*Math.PI/180,h=(a*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const d=s+u*h,f=e+r*Math.cos(d),g=t+r*Math.sin(d);o.push({x:-f,y:-g})}return o}p(pe,"generateCirclePoints");async function Wp(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await it(e,t,rt(t)),s=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...pe(s/2,-l/2,c,30,-90,0),{x:-s/2-c,y:c},...pe(s/2+c*2,-c,c,20,-180,-270),...pe(s/2+c*2,c,c,20,-90,-180),{x:-s/2-c,y:-l/2},...pe(s/2,l/2,c,20,0,90)],d=[{x:s/2,y:-l/2-c},{x:-s/2,y:-l/2-c},...pe(s/2,-l/2,c,20,-90,0),{x:-s/2-c,y:-c},...pe(s/2+s*.1,-c,c,20,-180,-270),...pe(s/2+s*.1,c,c,20,-90,-180),{x:-s/2-c,y:l/2},...pe(s/2,l/2,c,20,0,90),{x:-s/2,y:l/2+c},{x:s/2,y:l/2+c}],f=Z.svg(n),g=K(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=ot(u).replace("Z",""),x=f.path(y,g),b=ot(d),w=f.path(b,{...g}),C=n.insert("g",":first-child");return C.insert(()=>w,":first-child").attr("stroke-opacity",0),C.insert(()=>x,":first-child"),C.attr("class","text"),h&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",i),C.attr("transform",`translate(${c}, 0)`),o.attr("transform",`translate(${-s/2+c-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Q(t,C),t.intersect=function(v){return G.polygon(t,d,v)},n}p(Wp,"curlyBraceLeft");function ge(e,t,r,i=100,n=0,a=180){const o=[],s=n*Math.PI/180,h=(a*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const d=s+u*h,f=e+r*Math.cos(d),g=t+r*Math.sin(d);o.push({x:f,y:g})}return o}p(ge,"generateCirclePoints");async function Hp(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await it(e,t,rt(t)),s=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...ge(s/2,-l/2,c,20,-90,0),{x:s/2+c,y:-c},...ge(s/2+c*2,-c,c,20,-180,-270),...ge(s/2+c*2,c,c,20,-90,-180),{x:s/2+c,y:l/2},...ge(s/2,l/2,c,20,0,90)],d=[{x:-s/2,y:-l/2-c},{x:s/2,y:-l/2-c},...ge(s/2,-l/2,c,20,-90,0),{x:s/2+c,y:-c},...ge(s/2+c*2,-c,c,20,-180,-270),...ge(s/2+c*2,c,c,20,-90,-180),{x:s/2+c,y:l/2},...ge(s/2,l/2,c,20,0,90),{x:s/2,y:l/2+c},{x:-s/2,y:l/2+c}],f=Z.svg(n),g=K(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=ot(u).replace("Z",""),x=f.path(y,g),b=ot(d),w=f.path(b,{...g}),C=n.insert("g",":first-child");return C.insert(()=>w,":first-child").attr("stroke-opacity",0),C.insert(()=>x,":first-child"),C.attr("class","text"),h&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",i),C.attr("transform",`translate(${-c}, 0)`),o.attr("transform",`translate(${-s/2+(t.padding??0)/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Q(t,C),t.intersect=function(v){return G.polygon(t,d,v)},n}p(Hp,"curlyBraceRight");function Tt(e,t,r,i=100,n=0,a=180){const o=[],s=n*Math.PI/180,h=(a*Math.PI/180-s)/(i-1);for(let u=0;u<i;u++){const d=s+u*h,f=e+r*Math.cos(d),g=t+r*Math.sin(d);o.push({x:-f,y:-g})}return o}p(Tt,"generateCirclePoints");async function Yp(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await it(e,t,rt(t)),s=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...Tt(s/2,-l/2,c,30,-90,0),{x:-s/2-c,y:c},...Tt(s/2+c*2,-c,c,20,-180,-270),...Tt(s/2+c*2,c,c,20,-90,-180),{x:-s/2-c,y:-l/2},...Tt(s/2,l/2,c,20,0,90)],d=[...Tt(-s/2+c+c/2,-l/2,c,20,-90,-180),{x:s/2-c/2,y:c},...Tt(-s/2-c/2,-c,c,20,0,90),...Tt(-s/2-c/2,c,c,20,-90,0),{x:s/2-c/2,y:-c},...Tt(-s/2+c+c/2,l/2,c,30,-180,-270)],f=[{x:s/2,y:-l/2-c},{x:-s/2,y:-l/2-c},...Tt(s/2,-l/2,c,20,-90,0),{x:-s/2-c,y:-c},...Tt(s/2+c*2,-c,c,20,-180,-270),...Tt(s/2+c*2,c,c,20,-90,-180),{x:-s/2-c,y:l/2},...Tt(s/2,l/2,c,20,0,90),{x:-s/2,y:l/2+c},{x:s/2-c-c/2,y:l/2+c},...Tt(-s/2+c+c/2,-l/2,c,20,-90,-180),{x:s/2-c/2,y:c},...Tt(-s/2-c/2,-c,c,20,0,90),...Tt(-s/2-c/2,c,c,20,-90,0),{x:s/2-c/2,y:-c},...Tt(-s/2+c+c/2,l/2,c,30,-180,-270)],g=Z.svg(n),m=K(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=ot(u).replace("Z",""),b=g.path(x,m),C=ot(d).replace("Z",""),v=g.path(C,m),L=ot(f),T=g.path(L,{...m}),D=n.insert("g",":first-child");return D.insert(()=>T,":first-child").attr("stroke-opacity",0),D.insert(()=>b,":first-child"),D.insert(()=>v,":first-child"),D.attr("class","text"),h&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),D.attr("transform",`translate(${c-c/4}, 0)`),o.attr("transform",`translate(${-s/2+(t.padding??0)/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Q(t,D),t.intersect=function(z){return G.polygon(t,f,z)},n}p(Yp,"curlyBraces");async function Up(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),o=80,s=20,l=Math.max(o,(a.width+(t.padding??0)*2)*1.25,t?.width??0),c=Math.max(s,a.height+(t.padding??0)*2,t?.height??0),h=c/2,{cssStyles:u}=t,d=Z.svg(n),f=K(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=l,m=c,y=g-h,x=m/4,b=[{x:y,y:0},{x,y:0},{x:0,y:m/2},{x,y:m},{x:y,y:m},...Bi(-y,-m/2,h,50,270,90)],w=ot(b),C=d.path(w,f),v=n.insert(()=>C,":first-child");return v.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",i),v.attr("transform",`translate(${-l/2}, ${-c/2})`),Q(t,v),t.intersect=function(L){return G.polygon(t,b,L)},n}p(Up,"curvedTrapezoid");var CS=p((e,t,r,i,n,a)=>[`M${e},${t+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),_S=p((e,t,r,i,n,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),SS=p((e,t,r,i,n,a)=>[`M${e-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function Gp(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await it(e,t,rt(t)),s=Math.max(a.width+t.padding,t.width??0),l=s/2,c=l/(2.5+s/50),h=Math.max(a.height+c+t.padding,t.height??0);let u;const{cssStyles:d}=t;if(t.look==="handDrawn"){const f=Z.svg(n),g=_S(0,0,s,h,l,c),m=SS(0,c,s,h,l,c),y=f.path(g,K(t,{})),x=f.path(m,K(t,{fill:"none"}));u=n.insert(()=>x,":first-child"),u=n.insert(()=>y,":first-child"),u.attr("class","basic label-container"),d&&u.attr("style",d)}else{const f=CS(0,0,s,h,l,c);u=n.insert("path",":first-child").attr("d",f).attr("class","basic label-container").attr("style",Pt(d)).attr("style",i)}return u.attr("label-offset-y",c),u.attr("transform",`translate(${-s/2}, ${-(h/2+c)})`),Q(t,u),o.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+(t.padding??0)/1.5-(a.y-(a.top??0))})`),t.intersect=function(f){const g=G.rect(t,f),m=g.x-(t.x??0);if(l!=0&&(Math.abs(m)<(t.width??0)/2||Math.abs(m)==(t.width??0)/2&&Math.abs(g.y-(t.y??0))>(t.height??0)/2-c)){let y=c*c*(1-m*m/(l*l));y>0&&(y=Math.sqrt(y)),y=c-y,f.y-(t.y??0)>0&&(y=-y),g.y+=y}return g},n}p(Gp,"cylinder");async function Xp(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await it(e,t,rt(t)),s=a.width+t.padding,l=a.height+t.padding,c=l*.2,h=-s/2,u=-l/2-c/2,{cssStyles:d}=t,f=Z.svg(n),g=K(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u+c},{x:-h,y:u+c},{x:-h,y:-u},{x:h,y:-u},{x:h,y:u},{x:-h,y:u},{x:-h,y:u+c}],y=f.polygon(m.map(b=>[b.x,b.y]),g),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),o.attr("transform",`translate(${h+(t.padding??0)/2-(a.x-(a.left??0))}, ${u+c+(t.padding??0)/2-(a.y-(a.top??0))})`),Q(t,x),t.intersect=function(b){return G.rect(t,b)},n}p(Xp,"dividedRectangle");async function Vp(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:o}=await it(e,t,rt(t)),l=a.width/2+o+5,c=a.width/2+o;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const d=Z.svg(n),f=K(t,{roughness:.2,strokeWidth:2.5}),g=K(t,{roughness:.2,strokeWidth:1.5}),m=d.circle(0,0,l*2,f),y=d.circle(0,0,c*2,g);h=n.insert("g",":first-child"),h.attr("class",Pt(t.cssClasses)).attr("style",Pt(u)),h.node()?.appendChild(m),h.node()?.appendChild(y)}else{h=n.insert("g",":first-child");const d=h.insert("circle",":first-child"),f=h.insert("circle");h.attr("class","basic label-container").attr("style",i),d.attr("class","outer-circle").attr("style",i).attr("r",l).attr("cx",0).attr("cy",0),f.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return Q(t,h),t.intersect=function(d){return N.info("DoubleCircle intersect",t,l,d),G.circle(t,l,d)},n}p(Vp,"doublecircle");function Zp(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=V(t);t.label="",t.labelStyle=i;const a=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),o=7,{cssStyles:s}=t,l=Z.svg(a),{nodeBorder:c}=r,h=K(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const u=l.circle(0,0,o*2,h),d=a.insert(()=>u,":first-child");return d.selectAll("path").attr("style",`fill: ${c} !important;`),s&&s.length>0&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",s),n&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",n),Q(t,d),t.intersect=function(f){return N.info("filledCircle intersect",t,{radius:o,point:f}),G.circle(t,o,f)},a}p(Zp,"filledCircle");async function Kp(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await it(e,t,rt(t)),s=a.width+(t.padding??0),l=s+a.height,c=s+a.height,h=[{x:0,y:-l},{x:c,y:-l},{x:c/2,y:0}],{cssStyles:u}=t,d=Z.svg(n),f=K(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=ot(h),m=d.path(g,f),y=n.insert(()=>m,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return u&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),t.width=s,t.height=l,Q(t,y),o.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-l/2+(t.padding??0)/2+(a.y-(a.top??0))})`),t.intersect=function(x){return N.info("Triangle intersect",t,h,x),G.polygon(t,h,x)},n}p(Kp,"flippedTriangle");function Qp(e,t,{dir:r,config:{state:i,themeVariables:n}}){const{nodeStyles:a}=V(t);t.label="";const o=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),{cssStyles:s}=t;let l=Math.max(70,t?.width??0),c=Math.max(10,t?.height??0);r==="LR"&&(l=Math.max(10,t?.width??0),c=Math.max(70,t?.height??0));const h=-1*l/2,u=-1*c/2,d=Z.svg(o),f=K(t,{stroke:n.lineColor,fill:n.lineColor});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=d.rectangle(h,u,l,c,f),m=o.insert(()=>g,":first-child");s&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",s),a&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",a),Q(t,m);const y=i?.padding??0;return t.width&&t.height&&(t.width+=y/2||0,t.height+=y/2||0),t.intersect=function(x){return G.rect(t,x)},o}p(Qp,"forkJoin");async function Jp(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const n=80,a=50,{shapeSvg:o,bbox:s}=await it(e,t,rt(t)),l=Math.max(n,s.width+(t.padding??0)*2,t?.width??0),c=Math.max(a,s.height+(t.padding??0)*2,t?.height??0),h=c/2,{cssStyles:u}=t,d=Z.svg(o),f=K(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=[{x:-l/2,y:-c/2},{x:l/2-h,y:-c/2},...Bi(-l/2+h,0,h,50,90,270),{x:l/2-h,y:c/2},{x:-l/2,y:c/2}],m=ot(g),y=d.path(m,f),x=o.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),Q(t,x),t.intersect=function(b){return N.info("Pill intersect",t,{radius:h,point:b}),G.polygon(t,g,b)},o}p(Jp,"halfRoundedRectangle");async function tg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),o=a.height+(t.padding??0),s=a.width+(t.padding??0)*2.5,{cssStyles:l}=t,c=Z.svg(n),h=K(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");let u=s/2;const d=u/6;u=u+d;const f=o/2,g=f/2,m=u-g,y=[{x:-m,y:-f},{x:0,y:-f},{x:m,y:-f},{x:u,y:0},{x:m,y:f},{x:0,y:f},{x:-m,y:f},{x:-u,y:0}],x=ot(y),b=c.path(x,h),w=n.insert(()=>b,":first-child");return w.attr("class","basic label-container"),l&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",l),i&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",i),t.width=s,t.height=o,Q(t,w),t.intersect=function(C){return G.polygon(t,y,C)},n}p(tg,"hexagon");async function eg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.label="",t.labelStyle=r;const{shapeSvg:n}=await it(e,t,rt(t)),a=Math.max(30,t?.width??0),o=Math.max(30,t?.height??0),{cssStyles:s}=t,l=Z.svg(n),c=K(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:a,y:0},{x:0,y:o},{x:a,y:o}],u=ot(h),d=l.path(u,c),f=n.insert(()=>d,":first-child");return f.attr("class","basic label-container"),s&&t.look!=="handDrawn"&&f.selectChildren("path").attr("style",s),i&&t.look!=="handDrawn"&&f.selectChildren("path").attr("style",i),f.attr("transform",`translate(${-a/2}, ${-o/2})`),Q(t,f),t.intersect=function(g){return N.info("Pill intersect",t,{points:h}),G.polygon(t,h,g)},n}p(eg,"hourglass");async function rg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=V(t);t.labelStyle=n;const a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),l=i?.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:c,bbox:h,label:u}=await it(e,t,"icon-shape default"),d=t.pos==="t",f=s,g=s,{nodeBorder:m}=r,{stylesMap:y}=Dr(t),x=-g/2,b=-f/2,w=t.label?8:0,C=Z.svg(c),v=K(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const L=C.rectangle(x,b,g,f,v),T=Math.max(g,h.width),D=f+h.height+w,z=C.rectangle(-T/2,-D/2,T,D,{...v,fill:"transparent",stroke:"none"}),q=c.insert(()=>L,":first-child"),O=c.insert(()=>z);if(t.icon){const W=c.append("g");W.html(`<g>${await zr(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const j=W.node().getBBox(),$=j.width,M=j.height,B=j.x,P=j.y;W.attr("transform",`translate(${-$/2-B},${d?h.height/2+w/2-M/2-P:-h.height/2-w/2-M/2-P})`),W.attr("style",`color: ${y.get("stroke")??m};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-D/2:D/2-h.height})`),q.attr("transform",`translate(0,${d?h.height/2+w/2:-h.height/2-w/2})`),Q(t,O),t.intersect=function(W){if(N.info("iconSquare intersect",t,W),!t.label)return G.rect(t,W);const j=t.x??0,$=t.y??0,M=t.height??0;let B=[];return d?B=[{x:j-h.width/2,y:$-M/2},{x:j+h.width/2,y:$-M/2},{x:j+h.width/2,y:$-M/2+h.height+w},{x:j+g/2,y:$-M/2+h.height+w},{x:j+g/2,y:$+M/2},{x:j-g/2,y:$+M/2},{x:j-g/2,y:$-M/2+h.height+w},{x:j-h.width/2,y:$-M/2+h.height+w}]:B=[{x:j-g/2,y:$-M/2},{x:j+g/2,y:$-M/2},{x:j+g/2,y:$-M/2+f},{x:j+h.width/2,y:$-M/2+f},{x:j+h.width/2/2,y:$+M/2},{x:j-h.width/2,y:$+M/2},{x:j-h.width/2,y:$-M/2+f},{x:j-g/2,y:$-M/2+f}],G.polygon(t,B,W)},c}p(rg,"icon");async function ig(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=V(t);t.labelStyle=n;const a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),l=i?.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:c,bbox:h,label:u}=await it(e,t,"icon-shape default"),d=20,f=t.label?8:0,g=t.pos==="t",{nodeBorder:m,mainBkg:y}=r,{stylesMap:x}=Dr(t),b=Z.svg(c),w=K(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const C=x.get("fill");w.stroke=C??y;const v=c.append("g");t.icon&&v.html(`<g>${await zr(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const L=v.node().getBBox(),T=L.width,D=L.height,z=L.x,q=L.y,O=Math.max(T,D)*Math.SQRT2+d*2,W=b.circle(0,0,O,w),j=Math.max(O,h.width),$=O+h.height+f,M=b.rectangle(-j/2,-$/2,j,$,{...w,fill:"transparent",stroke:"none"}),B=c.insert(()=>W,":first-child"),P=c.insert(()=>M);return v.attr("transform",`translate(${-T/2-z},${g?h.height/2+f/2-D/2-q:-h.height/2-f/2-D/2-q})`),v.attr("style",`color: ${x.get("stroke")??m};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-$/2:$/2-h.height})`),B.attr("transform",`translate(0,${g?h.height/2+f/2:-h.height/2-f/2})`),Q(t,P),t.intersect=function(E){return N.info("iconSquare intersect",t,E),G.rect(t,E)},c}p(ig,"iconCircle");async function ng(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=V(t);t.labelStyle=n;const a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),l=i?.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:d}=await it(e,t,"icon-shape default"),f=t.pos==="t",g=s+u*2,m=s+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=Dr(t),w=-m/2,C=-g/2,v=t.label?8:0,L=Z.svg(c),T=K(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const D=b.get("fill");T.stroke=D??x;const z=L.path(Pe(w,C,m,g,5),T),q=Math.max(m,h.width),O=g+h.height+v,W=L.rectangle(-q/2,-O/2,q,O,{...T,fill:"transparent",stroke:"none"}),j=c.insert(()=>z,":first-child").attr("class","icon-shape2"),$=c.insert(()=>W);if(t.icon){const M=c.append("g");M.html(`<g>${await zr(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const B=M.node().getBBox(),P=B.width,E=B.height,A=B.x,I=B.y;M.attr("transform",`translate(${-P/2-A},${f?h.height/2+v/2-E/2-I:-h.height/2-v/2-E/2-I})`),M.attr("style",`color: ${b.get("stroke")??y};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-O/2:O/2-h.height})`),j.attr("transform",`translate(0,${f?h.height/2+v/2:-h.height/2-v/2})`),Q(t,$),t.intersect=function(M){if(N.info("iconSquare intersect",t,M),!t.label)return G.rect(t,M);const B=t.x??0,P=t.y??0,E=t.height??0;let A=[];return f?A=[{x:B-h.width/2,y:P-E/2},{x:B+h.width/2,y:P-E/2},{x:B+h.width/2,y:P-E/2+h.height+v},{x:B+m/2,y:P-E/2+h.height+v},{x:B+m/2,y:P+E/2},{x:B-m/2,y:P+E/2},{x:B-m/2,y:P-E/2+h.height+v},{x:B-h.width/2,y:P-E/2+h.height+v}]:A=[{x:B-m/2,y:P-E/2},{x:B+m/2,y:P-E/2},{x:B+m/2,y:P-E/2+g},{x:B+h.width/2,y:P-E/2+g},{x:B+h.width/2/2,y:P+E/2},{x:B-h.width/2,y:P+E/2},{x:B-h.width/2,y:P-E/2+g},{x:B-m/2,y:P-E/2+g}],G.polygon(t,A,M)},c}p(ng,"iconRounded");async function ag(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=V(t);t.labelStyle=n;const a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),l=i?.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:d}=await it(e,t,"icon-shape default"),f=t.pos==="t",g=s+u*2,m=s+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=Dr(t),w=-m/2,C=-g/2,v=t.label?8:0,L=Z.svg(c),T=K(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const D=b.get("fill");T.stroke=D??x;const z=L.path(Pe(w,C,m,g,.1),T),q=Math.max(m,h.width),O=g+h.height+v,W=L.rectangle(-q/2,-O/2,q,O,{...T,fill:"transparent",stroke:"none"}),j=c.insert(()=>z,":first-child"),$=c.insert(()=>W);if(t.icon){const M=c.append("g");M.html(`<g>${await zr(t.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);const B=M.node().getBBox(),P=B.width,E=B.height,A=B.x,I=B.y;M.attr("transform",`translate(${-P/2-A},${f?h.height/2+v/2-E/2-I:-h.height/2-v/2-E/2-I})`),M.attr("style",`color: ${b.get("stroke")??y};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-O/2:O/2-h.height})`),j.attr("transform",`translate(0,${f?h.height/2+v/2:-h.height/2-v/2})`),Q(t,$),t.intersect=function(M){if(N.info("iconSquare intersect",t,M),!t.label)return G.rect(t,M);const B=t.x??0,P=t.y??0,E=t.height??0;let A=[];return f?A=[{x:B-h.width/2,y:P-E/2},{x:B+h.width/2,y:P-E/2},{x:B+h.width/2,y:P-E/2+h.height+v},{x:B+m/2,y:P-E/2+h.height+v},{x:B+m/2,y:P+E/2},{x:B-m/2,y:P+E/2},{x:B-m/2,y:P-E/2+h.height+v},{x:B-h.width/2,y:P-E/2+h.height+v}]:A=[{x:B-m/2,y:P-E/2},{x:B+m/2,y:P-E/2},{x:B+m/2,y:P-E/2+g},{x:B+h.width/2,y:P-E/2+g},{x:B+h.width/2/2,y:P+E/2},{x:B-h.width/2,y:P+E/2},{x:B-h.width/2,y:P-E/2+g},{x:B-m/2,y:P-E/2+g}],G.polygon(t,A,M)},c}p(ag,"iconSquare");async function sg(e,t,{config:{flowchart:r}}){const i=new Image;i.src=t?.img??"",await i.decode();const n=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=n/a;const{labelStyles:o}=V(t);t.labelStyle=o;const s=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;const l=Math.max(t.label?s??0:0,t?.assetWidth??n),c=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:t?.assetHeight??a;t.width=Math.max(c,s??0);const{shapeSvg:u,bbox:d,label:f}=await it(e,t,"image-shape default"),g=t.pos==="t",m=-c/2,y=-h/2,x=t.label?8:0,b=Z.svg(u),w=K(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const C=b.rectangle(m,y,c,h,w),v=Math.max(c,d.width),L=h+d.height+x,T=b.rectangle(-v/2,-L/2,v,L,{...w,fill:"none",stroke:"none"}),D=u.insert(()=>C,":first-child"),z=u.insert(()=>T);if(t.img){const q=u.append("image");q.attr("href",t.img),q.attr("width",c),q.attr("height",h),q.attr("preserveAspectRatio","none"),q.attr("transform",`translate(${-c/2},${g?L/2-h:-L/2})`)}return f.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${g?-h/2-d.height/2-x/2:h/2-d.height/2+x/2})`),D.attr("transform",`translate(0,${g?d.height/2+x/2:-d.height/2-x/2})`),Q(t,z),t.intersect=function(q){if(N.info("iconSquare intersect",t,q),!t.label)return G.rect(t,q);const O=t.x??0,W=t.y??0,j=t.height??0;let $=[];return g?$=[{x:O-d.width/2,y:W-j/2},{x:O+d.width/2,y:W-j/2},{x:O+d.width/2,y:W-j/2+d.height+x},{x:O+c/2,y:W-j/2+d.height+x},{x:O+c/2,y:W+j/2},{x:O-c/2,y:W+j/2},{x:O-c/2,y:W-j/2+d.height+x},{x:O-d.width/2,y:W-j/2+d.height+x}]:$=[{x:O-c/2,y:W-j/2},{x:O+c/2,y:W-j/2},{x:O+c/2,y:W-j/2+h},{x:O+d.width/2,y:W-j/2+h},{x:O+d.width/2/2,y:W+j/2},{x:O-d.width/2,y:W+j/2},{x:O-d.width/2,y:W-j/2+h},{x:O-c/2,y:W-j/2+h}],G.polygon(t,$,q)},u}p(sg,"imageSquare");async function og(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),s=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=[{x:0,y:0},{x:o,y:0},{x:o+3*s/6,y:-s},{x:-3*s/6,y:-s}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=Z.svg(n),d=K(t,{}),f=ot(l),g=u.path(f,d);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=Re(n,o,s,l);return i&&c.attr("style",i),t.width=o,t.height=s,Q(t,c),t.intersect=function(u){return G.polygon(t,l,u)},n}p(og,"inv_trapezoid");async function ka(e,t,r){const{labelStyles:i,nodeStyles:n}=V(t);t.labelStyle=i;const{shapeSvg:a,bbox:o}=await it(e,t,rt(t)),s=Math.max(o.width+r.labelPaddingX*2,t?.width||0),l=Math.max(o.height+r.labelPaddingY*2,t?.height||0),c=-s/2,h=-l/2;let u,{rx:d,ry:f}=t;const{cssStyles:g}=t;if(r?.rx&&r.ry&&(d=r.rx,f=r.ry),t.look==="handDrawn"){const m=Z.svg(a),y=K(t,{}),x=d||f?m.path(Pe(c,h,s,l,d||0),y):m.rectangle(c,h,s,l,y);u=a.insert(()=>x,":first-child"),u.attr("class","basic label-container").attr("style",Pt(g))}else u=a.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",n).attr("rx",Pt(d)).attr("ry",Pt(f)).attr("x",c).attr("y",h).attr("width",s).attr("height",l);return Q(t,u),t.calcIntersect=function(m,y){return G.rect(m,y)},t.intersect=function(m){return G.rect(t,m)},a}p(ka,"drawRect");async function lg(e,t){const{shapeSvg:r,bbox:i,label:n}=await it(e,t,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),n.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),Q(t,a),t.intersect=function(l){return G.rect(t,l)},r}p(lg,"labelRect");async function cg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),o=Math.max(a.width+(t.padding??0),t?.width??0),s=Math.max(a.height+(t.padding??0),t?.height??0),l=[{x:0,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:-(3*s)/6,y:-s}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=Z.svg(n),d=K(t,{}),f=ot(l),g=u.path(f,d);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=Re(n,o,s,l);return i&&c.attr("style",i),t.width=o,t.height=s,Q(t,c),t.intersect=function(u){return G.polygon(t,l,u)},n}p(cg,"lean_left");async function hg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),o=Math.max(a.width+(t.padding??0),t?.width??0),s=Math.max(a.height+(t.padding??0),t?.height??0),l=[{x:-3*s/6,y:0},{x:o,y:0},{x:o+3*s/6,y:-s},{x:0,y:-s}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=Z.svg(n),d=K(t,{}),f=ot(l),g=u.path(f,d);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=Re(n,o,s,l);return i&&c.attr("style",i),t.width=o,t.height=s,Q(t,c),t.intersect=function(u){return G.polygon(t,l,u)},n}p(hg,"lean_right");function ug(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.label="",t.labelStyle=r;const n=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,o=Math.max(35,t?.width??0),s=Math.max(35,t?.height??0),l=7,c=[{x:o,y:0},{x:0,y:s+l/2},{x:o-2*l,y:s+l/2},{x:0,y:2*s},{x:o,y:s-l/2},{x:2*l,y:s-l/2}],h=Z.svg(n),u=K(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=ot(c),f=h.path(d,u),g=n.insert(()=>f,":first-child");return a&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(-${o/2},${-s})`),Q(t,g),t.intersect=function(m){return N.info("lightningBolt intersect",t,m),G.polygon(t,c,m)},n}p(ug,"lightningBolt");var TS=p((e,t,r,i,n,a,o)=>[`M${e},${t+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),BS=p((e,t,r,i,n,a,o)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),$S=p((e,t,r,i,n,a)=>[`M${e-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function dg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await it(e,t,rt(t)),s=Math.max(a.width+(t.padding??0),t.width??0),l=s/2,c=l/(2.5+s/50),h=Math.max(a.height+c+(t.padding??0),t.height??0),u=h*.1;let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const g=Z.svg(n),m=BS(0,0,s,h,l,c,u),y=$S(0,c,s,h,l,c),x=K(t,{}),b=g.path(m,x),w=g.path(y,x);n.insert(()=>w,":first-child").attr("class","line"),d=n.insert(()=>b,":first-child"),d.attr("class","basic label-container"),f&&d.attr("style",f)}else{const g=TS(0,0,s,h,l,c,u);d=n.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",Pt(f)).attr("style",i)}return d.attr("label-offset-y",c),d.attr("transform",`translate(${-s/2}, ${-(h/2+c)})`),Q(t,d),o.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+c-(a.y-(a.top??0))})`),t.intersect=function(g){const m=G.rect(t,g),y=m.x-(t.x??0);if(l!=0&&(Math.abs(y)<(t.width??0)/2||Math.abs(y)==(t.width??0)/2&&Math.abs(m.y-(t.y??0))>(t.height??0)/2-c)){let x=c*c*(1-y*y/(l*l));x>0&&(x=Math.sqrt(x)),x=c-x,g.y-(t.y??0)>0&&(x=-x),m.y+=x}return m},n}p(dg,"linedCylinder");async function fg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await it(e,t,rt(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/4,h=l+c,{cssStyles:u}=t,d=Z.svg(n),f=K(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=[{x:-s/2-s/2*.1,y:-h/2},{x:-s/2-s/2*.1,y:h/2},...Ae(-s/2-s/2*.1,h/2,s/2+s/2*.1,h/2,c,.8),{x:s/2+s/2*.1,y:-h/2},{x:-s/2-s/2*.1,y:-h/2},{x:-s/2,y:-h/2},{x:-s/2,y:h/2*1.1},{x:-s/2,y:-h/2}],m=d.polygon(g.map(x=>[x.x,x.y]),f),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-s/2+(t.padding??0)+s/2*.1/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c/2-(a.y-(a.top??0))})`),Q(t,y),t.intersect=function(x){return G.polygon(t,g,x)},n}p(fg,"linedWaveEdgedRect");async function pg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await it(e,t,rt(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=5,h=-s/2,u=-l/2,{cssStyles:d}=t,f=Z.svg(n),g=K(t,{}),m=[{x:h-c,y:u+c},{x:h-c,y:u+l+c},{x:h+s-c,y:u+l+c},{x:h+s-c,y:u+l},{x:h+s,y:u+l},{x:h+s,y:u+l-c},{x:h+s+c,y:u+l-c},{x:h+s+c,y:u-c},{x:h+c,y:u-c},{x:h+c,y:u},{x:h,y:u},{x:h,y:u+c}],y=[{x:h,y:u+c},{x:h+s-c,y:u+c},{x:h+s-c,y:u+l},{x:h+s,y:u+l},{x:h+s,y:u},{x:h,y:u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=ot(m),b=f.path(x,g),w=ot(y),C=f.path(w,{...g,fill:"none"}),v=n.insert(()=>C,":first-child");return v.insert(()=>b,":first-child"),v.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),o.attr("transform",`translate(${-(a.width/2)-c-(a.x-(a.left??0))}, ${-(a.height/2)+c-(a.y-(a.top??0))})`),Q(t,v),t.intersect=function(L){return G.polygon(t,m,L)},n}p(pg,"multiRect");async function gg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await it(e,t,rt(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/4,h=l+c,u=-s/2,d=-h/2,f=5,{cssStyles:g}=t,m=Ae(u-f,d+h+f,u+s-f,d+h+f,c,.8),y=m?.[m.length-1],x=[{x:u-f,y:d+f},{x:u-f,y:d+h+f},...m,{x:u+s-f,y:y.y-f},{x:u+s,y:y.y-f},{x:u+s,y:y.y-2*f},{x:u+s+f,y:y.y-2*f},{x:u+s+f,y:d-f},{x:u+f,y:d-f},{x:u+f,y:d},{x:u,y:d},{x:u,y:d+f}],b=[{x:u,y:d+f},{x:u+s-f,y:d+f},{x:u+s-f,y:y.y-f},{x:u+s,y:y.y-f},{x:u+s,y:d},{x:u,y:d}],w=Z.svg(n),C=K(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const v=ot(x),L=w.path(v,C),T=ot(b),D=w.path(T,C),z=n.insert(()=>L,":first-child");return z.insert(()=>D),z.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&z.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&z.selectAll("path").attr("style",i),z.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-(a.width/2)-f-(a.x-(a.left??0))}, ${-(a.height/2)+f-c/2-(a.y-(a.top??0))})`),Q(t,z),t.intersect=function(q){return G.polygon(t,x,q)},n}p(gg,"multiWaveEdgedRectangle");async function mg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=V(t);t.labelStyle=i,t.useHtmlLabels||$t().flowchart?.htmlLabels!==!1||(t.centerLabel=!0);const{shapeSvg:o,bbox:s,label:l}=await it(e,t,rt(t)),c=Math.max(s.width+(t.padding??0)*2,t?.width??0),h=Math.max(s.height+(t.padding??0)*2,t?.height??0),u=-c/2,d=-h/2,{cssStyles:f}=t,g=Z.svg(o),m=K(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=g.rectangle(u,d,c,h,m),x=o.insert(()=>y,":first-child");return x.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",f),n&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",n),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),Q(t,x),t.intersect=function(b){return G.rect(t,b)},o}p(mg,"note");var LS=p((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function yg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),o=a.width+t.padding,s=a.height+t.padding,l=o+s,c=.5,h=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let u;const{cssStyles:d}=t;if(t.look==="handDrawn"){const f=Z.svg(n),g=K(t,{}),m=LS(0,0,l),y=f.path(m,g);u=n.insert(()=>y,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),d&&u.attr("style",d)}else u=Re(n,l,l,h),u.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&u.attr("style",i),Q(t,u),t.calcIntersect=function(f,g){const m=f.width,y=[{x:m/2,y:0},{x:m,y:-m/2},{x:m/2,y:-m},{x:0,y:-m/2}],x=G.polygon(f,y,g);return{x:x.x-.5,y:x.y-.5}},t.intersect=function(f){return this.calcIntersect(t,f)},n}p(yg,"question");async function xg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await it(e,t,rt(t)),s=Math.max(a.width+(t.padding??0),t?.width??0),l=Math.max(a.height+(t.padding??0),t?.height??0),c=-s/2,h=-l/2,u=h/2,d=[{x:c+u,y:h},{x:c,y:0},{x:c+u,y:-h},{x:-c,y:-h},{x:-c,y:h}],{cssStyles:f}=t,g=Z.svg(n),m=K(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=ot(d),x=g.path(y,m),b=n.insert(()=>x,":first-child");return b.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${-u/2},0)`),o.attr("transform",`translate(${-u/2-a.width/2-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),Q(t,b),t.intersect=function(w){return G.polygon(t,d,w)},n}p(xg,"rect_left_inv_arrow");async function bg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;let n;t.cssClasses?n="node "+t.cssClasses:n="node default";const a=e.insert("g").attr("class",n).attr("id",t.domId||t.id),o=a.insert("g"),s=a.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=s.node().appendChild(await He(c,t.labelStyle,!0,!0));let u={width:0,height:0};if(wt(ut()?.flowchart?.htmlLabels)){const D=h.children[0],z=lt(h);u=D.getBoundingClientRect(),z.attr("width",u.width),z.attr("height",u.height)}N.info("Text 2",l);const d=l||[],f=h.getBBox(),g=s.node().appendChild(await He(d.join?d.join("<br/>"):d,t.labelStyle,!0,!0)),m=g.children[0],y=lt(g);u=m.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height);const x=(t.padding||0)/2;lt(g).attr("transform","translate( "+(u.width>f.width?0:(f.width-u.width)/2)+", "+(f.height+x+5)+")"),lt(h).attr("transform","translate( "+(u.width<f.width?0:-(f.width-u.width)/2)+", 0)"),u=s.node().getBBox(),s.attr("transform","translate("+-u.width/2+", "+(-u.height/2-x+3)+")");const b=u.width+(t.padding||0),w=u.height+(t.padding||0),C=-u.width/2-x,v=-u.height/2-x;let L,T;if(t.look==="handDrawn"){const D=Z.svg(a),z=K(t,{}),q=D.path(Pe(C,v,b,w,t.rx||0),z),O=D.line(-u.width/2-x,-u.height/2-x+f.height+x,u.width/2+x,-u.height/2-x+f.height+x,z);T=a.insert(()=>(N.debug("Rough node insert CXC",q),O),":first-child"),L=a.insert(()=>(N.debug("Rough node insert CXC",q),q),":first-child")}else L=o.insert("rect",":first-child"),T=o.insert("line"),L.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-x).attr("y",-u.height/2-x).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),T.attr("class","divider").attr("x1",-u.width/2-x).attr("x2",u.width/2+x).attr("y1",-u.height/2-x+f.height+x).attr("y2",-u.height/2-x+f.height+x);return Q(t,L),t.intersect=function(D){return G.rect(t,D)},a}p(bg,"rectWithTitle");function ai(e,t,r,i,n,a,o){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,d=(i-t)/2,f=u/n,g=d/a,m=Math.sqrt(f**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-m**2),x=l+y*a*Math.sin(h)*(o?-1:1),b=c-y*n*Math.cos(h)*(o?-1:1),w=Math.atan2((t-b)/a,(e-x)/n);let v=Math.atan2((i-b)/a,(r-x)/n)-w;o&&v<0&&(v+=2*Math.PI),!o&&v>0&&(v-=2*Math.PI);const L=[];for(let T=0;T<20;T++){const D=T/19,z=w+D*v,q=x+n*Math.cos(z),O=b+a*Math.sin(z);L.push({x:q,y:O})}return L}p(ai,"generateArcPoints");async function wg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),o=t?.padding??0,s=t?.padding??0,l=(t?.width?t?.width:a.width)+o*2,c=(t?.height?t?.height:a.height)+s*2,h=t.radius||5,u=t.taper||5,{cssStyles:d}=t,f=Z.svg(n),g=K(t,{});t.stroke&&(g.stroke=t.stroke),t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:-l/2+u,y:-c/2},{x:l/2-u,y:-c/2},...ai(l/2-u,-c/2,l/2,-c/2+u,h,h,!0),{x:l/2,y:-c/2+u},{x:l/2,y:c/2-u},...ai(l/2,c/2-u,l/2-u,c/2,h,h,!0),{x:l/2-u,y:c/2},{x:-l/2+u,y:c/2},...ai(-l/2+u,c/2,-l/2,c/2-u,h,h,!0),{x:-l/2,y:c/2-u},{x:-l/2,y:-c/2+u},...ai(-l/2,-c/2+u,-l/2+u,-c/2,h,h,!0)],y=ot(m),x=f.path(y,g),b=n.insert(()=>x,":first-child");return b.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),Q(t,b),t.intersect=function(w){return G.polygon(t,m,w)},n}p(wg,"roundedRect");async function vg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await it(e,t,rt(t)),s=t?.padding??0,l=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),h=-a.width/2-s,u=-a.height/2-s,{cssStyles:d}=t,f=Z.svg(n),g=K(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u},{x:h+l+8,y:u},{x:h+l+8,y:u+c},{x:h-8,y:u+c},{x:h-8,y:u},{x:h,y:u},{x:h,y:u+c}],y=f.polygon(m.map(b=>[b.x,b.y]),g),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container").attr("style",Pt(d)),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),d&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),o.attr("transform",`translate(${-l/2+4+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-(a.y-(a.top??0))})`),Q(t,x),t.intersect=function(b){return G.rect(t,b)},n}p(vg,"shadedProcess");async function kg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await it(e,t,rt(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=-s/2,h=-l/2,{cssStyles:u}=t,d=Z.svg(n),f=K(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=[{x:c,y:h},{x:c,y:h+l},{x:c+s,y:h+l},{x:c+s,y:h-l/2}],m=ot(g),y=d.path(m,f),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),x.attr("transform",`translate(0, ${l/4})`),o.attr("transform",`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))}, ${-l/4+(t.padding??0)-(a.y-(a.top??0))})`),Q(t,x),t.intersect=function(b){return G.polygon(t,g,b)},n}p(kg,"slopedRect");async function Cg(e,t){const r={rx:0,ry:0,labelPaddingX:t.labelPaddingX??(t?.padding||0)*2,labelPaddingY:(t?.padding||0)*1};return ka(e,t,r)}p(Cg,"squareRect");async function _g(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),o=a.height+t.padding,s=a.width+o/4+t.padding,l=o/2,{cssStyles:c}=t,h=Z.svg(n),u=K(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=[{x:-s/2+l,y:-o/2},{x:s/2-l,y:-o/2},...Bi(-s/2+l,0,l,50,90,270),{x:s/2-l,y:o/2},...Bi(s/2-l,0,l,50,270,450)],f=ot(d),g=h.path(f,u),m=n.insert(()=>g,":first-child");return m.attr("class","basic label-container outer-path"),c&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",c),i&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",i),Q(t,m),t.intersect=function(y){return G.polygon(t,d,y)},n}p(_g,"stadium");async function Sg(e,t){return ka(e,t,{rx:5,ry:5})}p(Sg,"state");function Tg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=V(t);t.labelStyle=i;const{cssStyles:a}=t,{lineColor:o,stateBorder:s,nodeBorder:l}=r,c=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),h=Z.svg(c),u=K(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=h.circle(0,0,14,{...u,stroke:o,strokeWidth:2}),f=s??l,g=h.circle(0,0,5,{...u,fill:f,stroke:f,strokeWidth:2,fillStyle:"solid"}),m=c.insert(()=>d,":first-child");return m.insert(()=>g),a&&m.selectAll("path").attr("style",a),n&&m.selectAll("path").attr("style",n),Q(t,m),t.intersect=function(y){return G.circle(t,7,y)},c}p(Tg,"stateEnd");function Bg(e,t,{config:{themeVariables:r}}){const{lineColor:i}=r,n=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let a;if(t.look==="handDrawn"){const s=Z.svg(n).circle(0,0,14,gv(i));a=n.insert(()=>s),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else a=n.insert("circle",":first-child"),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return Q(t,a),t.intersect=function(o){return G.circle(t,7,o)},n}p(Bg,"stateStart");async function $g(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),o=(t?.padding||0)/2,s=a.width+t.padding,l=a.height+t.padding,c=-a.width/2-o,h=-a.height/2-o,u=[{x:0,y:0},{x:s,y:0},{x:s,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:s+8,y:0},{x:s+8,y:-l},{x:-8,y:-l},{x:-8,y:0}];if(t.look==="handDrawn"){const d=Z.svg(n),f=K(t,{}),g=d.rectangle(c-8,h,s+16,l,f),m=d.line(c,h,c,h+l,f),y=d.line(c+s,h,c+s,h+l,f);n.insert(()=>m,":first-child"),n.insert(()=>y,":first-child");const x=n.insert(()=>g,":first-child"),{cssStyles:b}=t;x.attr("class","basic label-container").attr("style",Pt(b)),Q(t,x)}else{const d=Re(n,s,l,u);i&&d.attr("style",i),Q(t,d)}return t.intersect=function(d){return G.polygon(t,u,d)},n}p($g,"subroutine");async function Lg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),s=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=-o/2,c=-s/2,h=.2*s,u=.2*s,{cssStyles:d}=t,f=Z.svg(n),g=K(t,{}),m=[{x:l-h/2,y:c},{x:l+o+h/2,y:c},{x:l+o+h/2,y:c+s},{x:l-h/2,y:c+s}],y=[{x:l+o-h/2,y:c+s},{x:l+o+h/2,y:c+s},{x:l+o+h/2,y:c+s-u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=ot(m),b=f.path(x,g),w=ot(y),C=f.path(w,{...g,fillStyle:"solid"}),v=n.insert(()=>C,":first-child");return v.insert(()=>b,":first-child"),v.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),Q(t,v),t.intersect=function(L){return G.polygon(t,m,L)},n}p(Lg,"taggedRect");async function Mg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await it(e,t,rt(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/4,h=.2*s,u=.2*l,d=l+c,{cssStyles:f}=t,g=Z.svg(n),m=K(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-s/2-s/2*.1,y:d/2},...Ae(-s/2-s/2*.1,d/2,s/2+s/2*.1,d/2,c,.8),{x:s/2+s/2*.1,y:-d/2},{x:-s/2-s/2*.1,y:-d/2}],x=-s/2+s/2*.1,b=-d/2-u*.4,w=[{x:x+s-h,y:(b+l)*1.4},{x:x+s,y:b+l-u},{x:x+s,y:(b+l)*.9},...Ae(x+s,(b+l)*1.3,x+s-h,(b+l)*1.5,-l*.03,.5)],C=ot(y),v=g.path(C,m),L=ot(w),T=g.path(L,{...m,fillStyle:"solid"}),D=n.insert(()=>T,":first-child");return D.insert(()=>v,":first-child"),D.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),D.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c/2-(a.y-(a.top??0))})`),Q(t,D),t.intersect=function(z){return G.polygon(t,y,z)},n}p(Mg,"taggedWaveEdgedRectangle");async function Ag(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),o=Math.max(a.width+t.padding,t?.width||0),s=Math.max(a.height+t.padding,t?.height||0),l=-o/2,c=-s/2,h=n.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",o).attr("height",s),Q(t,h),t.intersect=function(u){return G.rect(t,u)},n}p(Ag,"text");var MS=p((e,t,r,i,n,a)=>`M${e},${t}
|
|
243
|
+
a${n},${a} 0,0,1 0,${-i}
|
|
244
|
+
l${r},0
|
|
245
|
+
a${n},${a} 0,0,1 0,${i}
|
|
246
|
+
M${r},${-i}
|
|
247
|
+
a${n},${a} 0,0,0 0,${i}
|
|
248
|
+
l${-r},0`,"createCylinderPathD"),AS=p((e,t,r,i,n,a)=>[`M${e},${t}`,`M${e+r},${t}`,`a${n},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${n},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),ES=p((e,t,r,i,n,a)=>[`M${e+r/2},${-i/2}`,`a${n},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function Eg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o,halfPadding:s}=await it(e,t,rt(t)),l=t.look==="neo"?s*2:s,c=a.height+l,h=c/2,u=h/(2.5+c/50),d=a.width+u+l,{cssStyles:f}=t;let g;if(t.look==="handDrawn"){const m=Z.svg(n),y=AS(0,0,d,c,u,h),x=ES(0,0,d,c,u,h),b=m.path(y,K(t,{})),w=m.path(x,K(t,{fill:"none"}));g=n.insert(()=>w,":first-child"),g=n.insert(()=>b,":first-child"),g.attr("class","basic label-container"),f&&g.attr("style",f)}else{const m=MS(0,0,d,c,u,h);g=n.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",Pt(f)).attr("style",i),g.attr("class","basic label-container"),f&&g.selectAll("path").attr("style",f),i&&g.selectAll("path").attr("style",i)}return g.attr("label-offset-x",u),g.attr("transform",`translate(${-d/2}, ${c/2} )`),o.attr("transform",`translate(${-(a.width/2)-u-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),Q(t,g),t.intersect=function(m){const y=G.rect(t,m),x=y.y-(t.y??0);if(h!=0&&(Math.abs(x)<(t.height??0)/2||Math.abs(x)==(t.height??0)/2&&Math.abs(y.x-(t.x??0))>(t.width??0)/2-u)){let b=u*u*(1-x*x/(h*h));b!=0&&(b=Math.sqrt(Math.abs(b))),b=u-b,m.x-(t.x??0)>0&&(b=-b),y.x+=b}return y},n}p(Eg,"tiltedCylinder");async function Fg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),o=a.width+t.padding,s=a.height+t.padding,l=[{x:-3*s/6,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:0,y:-s}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=Z.svg(n),d=K(t,{}),f=ot(l),g=u.path(f,d);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=Re(n,o,s,l);return i&&c.attr("style",i),t.width=o,t.height=s,Q(t,c),t.intersect=function(u){return G.polygon(t,l,u)},n}p(Fg,"trapezoid");async function Pg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),o=60,s=20,l=Math.max(o,a.width+(t.padding??0)*2,t?.width??0),c=Math.max(s,a.height+(t.padding??0)*2,t?.height??0),{cssStyles:h}=t,u=Z.svg(n),d=K(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const f=[{x:-l/2*.8,y:-c/2},{x:l/2*.8,y:-c/2},{x:l/2,y:-c/2*.6},{x:l/2,y:c/2},{x:-l/2,y:c/2},{x:-l/2,y:-c/2*.6}],g=ot(f),m=u.path(g,d),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),Q(t,y),t.intersect=function(x){return G.polygon(t,f,x)},n}p(Pg,"trapezoidalPentagon");async function Rg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await it(e,t,rt(t)),s=wt(ut().flowchart?.htmlLabels),l=a.width+(t.padding??0),c=l+a.height,h=l+a.height,u=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-c}],{cssStyles:d}=t,f=Z.svg(n),g=K(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=ot(u),y=f.path(m,g),x=n.insert(()=>y,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return d&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),t.width=l,t.height=c,Q(t,x),o.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${c/2-(a.height+(t.padding??0)/(s?2:1)-(a.y-(a.top??0)))})`),t.intersect=function(b){return N.info("Triangle intersect",t,u,b),G.polygon(t,u,b)},n}p(Rg,"triangle");async function Og(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await it(e,t,rt(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/8,h=l+c,{cssStyles:u}=t,f=70-s,g=f>0?f/2:0,m=Z.svg(n),y=K(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-s/2-g,y:h/2},...Ae(-s/2-g,h/2,s/2+g,h/2,c,.8),{x:s/2+g,y:-h/2},{x:-s/2-g,y:-h/2}],b=ot(x),w=m.path(b,y),C=n.insert(()=>w,":first-child");return C.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",i),C.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c-(a.y-(a.top??0))})`),Q(t,C),t.intersect=function(v){return G.polygon(t,x,v)},n}p(Og,"waveEdgedRectangle");async function Dg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),o=100,s=50,l=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),h=l/c;let u=l,d=c;u>d*h?d=u/h:u=d*h,u=Math.max(u,o),d=Math.max(d,s);const f=Math.min(d*.2,d/4),g=d+f*2,{cssStyles:m}=t,y=Z.svg(n),x=K(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=[{x:-u/2,y:g/2},...Ae(-u/2,g/2,u/2,g/2,f,1),{x:u/2,y:-g/2},...Ae(u/2,-g/2,-u/2,-g/2,f,-1)],w=ot(b),C=y.path(w,x),v=n.insert(()=>C,":first-child");return v.attr("class","basic label-container"),m&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),Q(t,v),t.intersect=function(L){return G.polygon(t,b,L)},n}p(Dg,"waveRectangle");async function Ng(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await it(e,t,rt(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=5,h=-s/2,u=-l/2,{cssStyles:d}=t,f=Z.svg(n),g=K(t,{}),m=[{x:h-c,y:u-c},{x:h-c,y:u+l},{x:h+s,y:u+l},{x:h+s,y:u-c}],y=`M${h-c},${u-c} L${h+s},${u-c} L${h+s},${u+l} L${h-c},${u+l} L${h-c},${u-c}
|
|
249
|
+
M${h-c},${u} L${h+s},${u}
|
|
250
|
+
M${h},${u-c} L${h},${u+l}`;t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=f.path(y,g),b=n.insert(()=>x,":first-child");return b.attr("transform",`translate(${c/2}, ${c/2})`),b.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),o.attr("transform",`translate(${-(a.width/2)+c/2-(a.x-(a.left??0))}, ${-(a.height/2)+c/2-(a.y-(a.top??0))})`),Q(t,b),t.intersect=function(w){return G.polygon(t,m,w)},n}p(Ng,"windowPane");async function al(e,t){const r=t;if(r.alias&&(t.label=r.alias),t.look==="handDrawn"){const{themeVariables:R}=$t(),{background:F}=R,H={...t,id:t.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${F}`]};await al(e,H)}const i=$t();t.useHtmlLabels=i.htmlLabels;let n=i.er?.diagramPadding??10,a=i.er?.entityPadding??6;const{cssStyles:o}=t,{labelStyles:s,nodeStyles:l}=V(t);if(r.attributes.length===0&&t.label){const R={rx:0,ry:0,labelPaddingX:n,labelPaddingY:n*1.5};le(t.label,i)+R.labelPaddingX*2<i.er.minEntityWidth&&(t.width=i.er.minEntityWidth);const F=await ka(e,t,R);if(!wt(i.htmlLabels)){const H=F.select("text"),U=H.node()?.getBBox();H.attr("transform",`translate(${-U.width/2}, 0)`)}return F}i.htmlLabels||(n*=1.25,a*=1.25);let c=rt(t);c||(c="node default");const h=e.insert("g").attr("class",c).attr("id",t.domId||t.id),u=await hr(h,t.label??"",i,0,0,["name"],s);u.height+=a;let d=0;const f=[],g=[];let m=0,y=0,x=0,b=0,w=!0,C=!0;for(const R of r.attributes){const F=await hr(h,R.type,i,0,d,["attribute-type"],s);m=Math.max(m,F.width+n);const H=await hr(h,R.name,i,0,d,["attribute-name"],s);y=Math.max(y,H.width+n);const U=await hr(h,R.keys.join(),i,0,d,["attribute-keys"],s);x=Math.max(x,U.width+n);const ct=await hr(h,R.comment,i,0,d,["attribute-comment"],s);b=Math.max(b,ct.width+n);const st=Math.max(F.height,H.height,U.height,ct.height)+a;g.push({yOffset:d,rowHeight:st}),d+=st}let v=4;x<=n&&(w=!1,x=0,v--),b<=n&&(C=!1,b=0,v--);const L=h.node().getBBox();if(u.width+n*2-(m+y+x+b)>0){const R=u.width+n*2-(m+y+x+b);m+=R/v,y+=R/v,x>0&&(x+=R/v),b>0&&(b+=R/v)}const T=m+y+x+b,D=Z.svg(h),z=K(t,{});t.look!=="handDrawn"&&(z.roughness=0,z.fillStyle="solid");let q=0;g.length>0&&(q=g.reduce((R,F)=>R+(F?.rowHeight??0),0));const O=Math.max(L.width+n*2,t?.width||0,T),W=Math.max((q??0)+u.height,t?.height||0),j=-O/2,$=-W/2;h.selectAll("g:not(:first-child)").each((R,F,H)=>{const U=lt(H[F]),ct=U.attr("transform");let st=0,mt=0;if(ct){const ft=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(ct);ft&&(st=parseFloat(ft[1]),mt=parseFloat(ft[2]),U.attr("class").includes("attribute-name")?st+=m:U.attr("class").includes("attribute-keys")?st+=m+y:U.attr("class").includes("attribute-comment")&&(st+=m+y+x))}U.attr("transform",`translate(${j+n/2+st}, ${mt+$+u.height+a/2})`)}),h.select(".name").attr("transform","translate("+-u.width/2+", "+($+a/2)+")");const M=D.rectangle(j,$,O,W,z),B=h.insert(()=>M,":first-child").attr("style",o.join("")),{themeVariables:P}=$t(),{rowEven:E,rowOdd:A,nodeBorder:I}=P;f.push(0);for(const[R,F]of g.entries()){const U=(R+1)%2===0&&F.yOffset!==0,ct=D.rectangle(j,u.height+$+F?.yOffset,O,F?.rowHeight,{...z,fill:U?E:A,stroke:I});h.insert(()=>ct,"g.label").attr("style",o.join("")).attr("class",`row-rect-${U?"even":"odd"}`)}let k=D.line(j,u.height+$,O+j,u.height+$,z);h.insert(()=>k).attr("class","divider"),k=D.line(m+j,u.height+$,m+j,W+$,z),h.insert(()=>k).attr("class","divider"),w&&(k=D.line(m+y+j,u.height+$,m+y+j,W+$,z),h.insert(()=>k).attr("class","divider")),C&&(k=D.line(m+y+x+j,u.height+$,m+y+x+j,W+$,z),h.insert(()=>k).attr("class","divider"));for(const R of f)k=D.line(j,u.height+$+R,O+j,u.height+$+R,z),h.insert(()=>k).attr("class","divider");if(Q(t,B),l&&t.look!=="handDrawn"){const F=l.split(";")?.filter(H=>H.includes("stroke"))?.map(H=>`${H}`).join("; ");h.selectAll("path").attr("style",F??""),h.selectAll(".row-rect-even path").attr("style",l)}return t.intersect=function(R){return G.rect(t,R)},h}p(al,"erBox");async function hr(e,t,r,i=0,n=0,a=[],o=""){const s=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${n})`).attr("style",o);t!==ts(t)&&(t=ts(t),t=t.replaceAll("<","<").replaceAll(">",">"));const l=s.node().appendChild(await Ce(s,t,{width:le(t,r)+100,style:o,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let h=l.children[0];for(h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">")}let c=l.getBBox();if(wt(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const u=lt(l);c=h.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}return c}p(hr,"addText");async function Ig(e,t,r,i,n=r.class.padding??12){const a=i?0:3,o=e.insert("g").attr("class",rt(t)).attr("id",t.domId||t.id);let s=null,l=null,c=null,h=null,u=0,d=0,f=0;if(s=o.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await si(s,{text:`«${b}»`},0),u=s.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await si(l,t,0,["font-weight: bolder"]);const g=l.node().getBBox();d=g.height,c=o.insert("g").attr("class","members-group text");let m=0;for(const b of t.members){const w=await si(c,b,m,[b.parseClassifier()]);m+=w+a}f=c.node().getBBox().height,f<=0&&(f=n/2),h=o.insert("g").attr("class","methods-group text");let y=0;for(const b of t.methods){const w=await si(h,b,y,[b.parseClassifier()]);y+=w+a}let x=o.node().getBBox();if(s!==null){const b=s.node().getBBox();s.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${u})`),x=o.node().getBBox(),c.attr("transform",`translate(0, ${u+d+n*2})`),x=o.node().getBBox(),h.attr("transform",`translate(0, ${u+d+(f?f+n*4:n*2)})`),x=o.node().getBBox(),{shapeSvg:o,bbox:x}}p(Ig,"textHelper");async function si(e,t,r,i=[]){const n=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=$t();let o="useHtmlLabels"in t?t.useHtmlLabels:wt(a.htmlLabels)??!0,s="";"text"in t?s=t.text:s=t.label,!o&&s.startsWith("\\")&&(s=s.substring(1)),Ze(s)&&(o=!0);const l=await Ce(n,fo(Fe(s)),{width:le(s,a)+50,classes:"markdown-node-label",useHtmlLabels:o},a);let c,h=1;if(o){const u=l.children[0],d=lt(l);h=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(h+=u.innerHTML.split("<mrow>").length-1);const f=u.getElementsByTagName("img");if(f){const g=s.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...f].map(m=>new Promise(y=>{function x(){if(m.style.display="flex",m.style.flexDirection="column",g){const b=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,C=parseInt(b,10)*5+"px";m.style.minWidth=C,m.style.maxWidth=C}else m.style.width="100%";y(m)}p(x,"setupImage"),setTimeout(()=>{m.complete&&x()}),m.addEventListener("error",x),m.addEventListener("load",x)})))}c=u.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}else{i.includes("font-weight: bolder")&<(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;const u=l.children[0];(l.textContent===""||l.textContent.includes(">"))&&(u.textContent=s[0]+s.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),s[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),c=l.getBBox()}return n.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}p(si,"addText");async function zg(e,t){const r=ut(),i=r.class.padding??12,n=i,a=t.useHtmlLabels??wt(r.htmlLabels)??!0,o=t;o.annotations=o.annotations??[],o.members=o.members??[],o.methods=o.methods??[];const{shapeSvg:s,bbox:l}=await Ig(e,t,r,a,n),{labelStyles:c,nodeStyles:h}=V(t);t.labelStyle=c,t.cssStyles=o.styles||"";const u=o.styles?.join(";")||h||"";t.cssStyles||(t.cssStyles=u.replaceAll("!important","").split(";"));const d=o.members.length===0&&o.methods.length===0&&!r.class?.hideEmptyMembersBox,f=Z.svg(s),g=K(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=l.width;let y=l.height;o.members.length===0&&o.methods.length===0?y+=n:o.members.length>0&&o.methods.length===0&&(y+=n*2);const x=-m/2,b=-y/2,w=f.rectangle(x-i,b-i-(d?i:o.members.length===0&&o.methods.length===0?-i/2:0),m+2*i,y+2*i+(d?i*2:o.members.length===0&&o.methods.length===0?-i:0),g),C=s.insert(()=>w,":first-child");C.attr("class","basic label-container");const v=C.node().getBBox();s.selectAll(".text").each((z,q,O)=>{const W=lt(O[q]),j=W.attr("transform");let $=0;if(j){const E=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(j);E&&($=parseFloat(E[2]))}let M=$+b+i-(d?i:o.members.length===0&&o.methods.length===0?-i/2:0);a||(M-=4);let B=x;(W.attr("class").includes("label-group")||W.attr("class").includes("annotation-group"))&&(B=-W.node()?.getBBox().width/2||0,s.selectAll("text").each(function(P,E,A){window.getComputedStyle(A[E]).textAnchor==="middle"&&(B=0)})),W.attr("transform",`translate(${B}, ${M})`)});const L=s.select(".annotation-group").node().getBBox().height-(d?i/2:0)||0,T=s.select(".label-group").node().getBBox().height-(d?i/2:0)||0,D=s.select(".members-group").node().getBBox().height-(d?i/2:0)||0;if(o.members.length>0||o.methods.length>0||d){const z=f.line(v.x,L+T+b+i,v.x+v.width,L+T+b+i,g);s.insert(()=>z).attr("class","divider").attr("style",u)}if(d||o.members.length>0||o.methods.length>0){const z=f.line(v.x,L+T+D+b+n*2+i,v.x+v.width,L+T+D+b+i+n*2,g);s.insert(()=>z).attr("class","divider").attr("style",u)}if(o.look!=="handDrawn"&&s.selectAll("path").attr("style",u),C.select(":nth-child(2)").attr("style",u),s.selectAll(".divider").select("path").attr("style",u),t.labelStyle?s.selectAll("span").attr("style",t.labelStyle):s.selectAll("span").attr("style",u),!a){const z=RegExp(/color\s*:\s*([^;]*)/),q=z.exec(u);if(q){const O=q[0].replace("color","fill");s.selectAll("tspan").attr("style",O)}else if(c){const O=z.exec(c);if(O){const W=O[0].replace("color","fill");s.selectAll("tspan").attr("style",W)}}}return Q(t,C),t.intersect=function(z){return G.rect(t,z)},s}p(zg,"classBox");async function qg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const n=t,a=t,o=20,s=20,l="verifyMethod"in t,c=rt(t),h=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let u;l?u=await ne(h,`<<${n.type}>>`,0,t.labelStyle):u=await ne(h,"<<Element>>",0,t.labelStyle);let d=u;const f=await ne(h,n.name,d,t.labelStyle+"; font-weight: bold;");if(d+=f+s,l){const L=await ne(h,`${n.requirementId?`ID: ${n.requirementId}`:""}`,d,t.labelStyle);d+=L;const T=await ne(h,`${n.text?`Text: ${n.text}`:""}`,d,t.labelStyle);d+=T;const D=await ne(h,`${n.risk?`Risk: ${n.risk}`:""}`,d,t.labelStyle);d+=D,await ne(h,`${n.verifyMethod?`Verification: ${n.verifyMethod}`:""}`,d,t.labelStyle)}else{const L=await ne(h,`${a.type?`Type: ${a.type}`:""}`,d,t.labelStyle);d+=L,await ne(h,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,d,t.labelStyle)}const g=(h.node()?.getBBox().width??200)+o,m=(h.node()?.getBBox().height??200)+o,y=-g/2,x=-m/2,b=Z.svg(h),w=K(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const C=b.rectangle(y,x,g,m,w),v=h.insert(()=>C,":first-child");if(v.attr("class","basic label-container").attr("style",i),h.selectAll(".label").each((L,T,D)=>{const z=lt(D[T]),q=z.attr("transform");let O=0,W=0;if(q){const B=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(q);B&&(O=parseFloat(B[1]),W=parseFloat(B[2]))}const j=W-m/2;let $=y+o/2;(T===0||T===1)&&($=O),z.attr("transform",`translate(${$}, ${j+o})`)}),d>u+f+s){const L=b.line(y,x+u+f+s,y+g,x+u+f+s,w);h.insert(()=>L).attr("style",i)}return Q(t,v),t.intersect=function(L){return G.rect(t,L)},h}p(qg,"requirementBox");async function ne(e,t,r,i=""){if(t==="")return 0;const n=e.insert("g").attr("class","label").attr("style",i),a=ut(),o=a.htmlLabels??!0,s=await Ce(n,fo(Fe(t)),{width:le(t,a)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},a);let l;if(o){const c=s.children[0],h=lt(s);l=c.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)}else{const c=s.children[0];for(const h of c.children)h.textContent=h.textContent.replaceAll(">",">").replaceAll("<","<"),i&&h.setAttribute("style",i);l=s.getBBox(),l.height+=6}return n.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}p(ne,"addText");var FS=p(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function jg(e,t,{config:r}){const{labelStyles:i,nodeStyles:n}=V(t);t.labelStyle=i||"";const a=10,o=t.width;t.width=(t.width??200)-10;const{shapeSvg:s,bbox:l,label:c}=await it(e,t,rt(t)),h=t.padding||10;let u="",d;"ticket"in t&&t.ticket&&r?.kanban?.ticketBaseUrl&&(u=r?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),d=s.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const f={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let g,m;d?{label:g,bbox:m}=await Ga(d,"ticket"in t&&t.ticket||"",f):{label:g,bbox:m}=await Ga(s,"ticket"in t&&t.ticket||"",f);const{label:y,bbox:x}=await Ga(s,"assigned"in t&&t.assigned||"",f);t.width=o;const b=10,w=t?.width||0,C=Math.max(m.height,x.height)/2,v=Math.max(l.height+b*2,t?.height||0)+C,L=-w/2,T=-v/2;c.attr("transform","translate("+(h-w/2)+", "+(-C-l.height/2)+")"),g.attr("transform","translate("+(h-w/2)+", "+(-C+l.height/2)+")"),y.attr("transform","translate("+(h+w/2-x.width-2*a)+", "+(-C+l.height/2)+")");let D;const{rx:z,ry:q}=t,{cssStyles:O}=t;if(t.look==="handDrawn"){const W=Z.svg(s),j=K(t,{}),$=z||q?W.path(Pe(L,T,w,v,z||0),j):W.rectangle(L,T,w,v,j);D=s.insert(()=>$,":first-child"),D.attr("class","basic label-container").attr("style",O||null)}else{D=s.insert("rect",":first-child"),D.attr("class","basic label-container __APA__").attr("style",n).attr("rx",z??5).attr("ry",q??5).attr("x",L).attr("y",T).attr("width",w).attr("height",v);const W="priority"in t&&t.priority;if(W){const j=s.append("line"),$=L+2,M=T+Math.floor((z??0)/2),B=T+v-Math.floor((z??0)/2);j.attr("x1",$).attr("y1",M).attr("x2",$).attr("y2",B).attr("stroke-width","4").attr("stroke",FS(W))}}return Q(t,D),t.height=v,t.intersect=function(W){return G.rect(t,W)},s}p(jg,"kanbanItem");async function Wg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:o,label:s}=await it(e,t,rt(t)),l=a.width+10*o,c=a.height+8*o,h=.15*l,{cssStyles:u}=t,d=a.width+20,f=a.height+20,g=Math.max(l,d),m=Math.max(c,f);s.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let y;const x=`M0 0
|
|
251
|
+
a${h},${h} 1 0,0 ${g*.25},${-1*m*.1}
|
|
252
|
+
a${h},${h} 1 0,0 ${g*.25},0
|
|
253
|
+
a${h},${h} 1 0,0 ${g*.25},0
|
|
254
|
+
a${h},${h} 1 0,0 ${g*.25},${m*.1}
|
|
255
|
+
|
|
256
|
+
a${h},${h} 1 0,0 ${g*.15},${m*.33}
|
|
257
|
+
a${h*.8},${h*.8} 1 0,0 0,${m*.34}
|
|
258
|
+
a${h},${h} 1 0,0 ${-1*g*.15},${m*.33}
|
|
259
|
+
|
|
260
|
+
a${h},${h} 1 0,0 ${-1*g*.25},${m*.15}
|
|
261
|
+
a${h},${h} 1 0,0 ${-1*g*.25},0
|
|
262
|
+
a${h},${h} 1 0,0 ${-1*g*.25},0
|
|
263
|
+
a${h},${h} 1 0,0 ${-1*g*.25},${-1*m*.15}
|
|
264
|
+
|
|
265
|
+
a${h},${h} 1 0,0 ${-1*g*.1},${-1*m*.33}
|
|
266
|
+
a${h*.8},${h*.8} 1 0,0 0,${-1*m*.34}
|
|
267
|
+
a${h},${h} 1 0,0 ${g*.1},${-1*m*.33}
|
|
268
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const b=Z.svg(n),w=K(t,{}),C=b.path(x,w);y=n.insert(()=>C,":first-child"),y.attr("class","basic label-container").attr("style",Pt(u))}else y=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return y.attr("transform",`translate(${-g/2}, ${-m/2})`),Q(t,y),t.calcIntersect=function(b,w){return G.rect(b,w)},t.intersect=function(b){return N.info("Bang intersect",t,b),G.rect(t,b)},n}p(Wg,"bang");async function Hg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:o,label:s}=await it(e,t,rt(t)),l=a.width+2*o,c=a.height+2*o,h=.15*l,u=.25*l,d=.35*l,f=.2*l,{cssStyles:g}=t;let m;const y=`M0 0
|
|
269
|
+
a${h},${h} 0 0,1 ${l*.25},${-1*l*.1}
|
|
270
|
+
a${d},${d} 1 0,1 ${l*.4},${-1*l*.1}
|
|
271
|
+
a${u},${u} 1 0,1 ${l*.35},${l*.2}
|
|
272
|
+
|
|
273
|
+
a${h},${h} 1 0,1 ${l*.15},${c*.35}
|
|
274
|
+
a${f},${f} 1 0,1 ${-1*l*.15},${c*.65}
|
|
275
|
+
|
|
276
|
+
a${u},${h} 1 0,1 ${-1*l*.25},${l*.15}
|
|
277
|
+
a${d},${d} 1 0,1 ${-1*l*.5},0
|
|
278
|
+
a${h},${h} 1 0,1 ${-1*l*.25},${-1*l*.15}
|
|
279
|
+
|
|
280
|
+
a${h},${h} 1 0,1 ${-1*l*.1},${-1*c*.35}
|
|
281
|
+
a${f},${f} 1 0,1 ${l*.1},${-1*c*.65}
|
|
282
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const x=Z.svg(n),b=K(t,{}),w=x.path(y,b);m=n.insert(()=>w,":first-child"),m.attr("class","basic label-container").attr("style",Pt(g))}else m=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",y);return s.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),m.attr("transform",`translate(${-l/2}, ${-c/2})`),Q(t,m),t.calcIntersect=function(x,b){return G.rect(x,b)},t.intersect=function(x){return N.info("Cloud intersect",t,x),G.rect(t,x)},n}p(Hg,"cloud");async function Yg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:o,label:s}=await it(e,t,rt(t)),l=a.width+8*o,c=a.height+2*o,h=5,u=`
|
|
283
|
+
M${-l/2} ${c/2-h}
|
|
284
|
+
v${-c+2*h}
|
|
285
|
+
q0,-${h} ${h},-${h}
|
|
286
|
+
h${l-2*h}
|
|
287
|
+
q${h},0 ${h},${h}
|
|
288
|
+
v${c-2*h}
|
|
289
|
+
q0,${h} -${h},${h}
|
|
290
|
+
h${-l+2*h}
|
|
291
|
+
q-${h},0 -${h},-${h}
|
|
292
|
+
Z
|
|
293
|
+
`,d=n.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return n.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),s.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),n.append(()=>s.node()),Q(t,d),t.calcIntersect=function(f,g){return G.rect(f,g)},t.intersect=function(f){return G.rect(t,f)},n}p(Yg,"defaultMindmapNode");async function Ug(e,t){const r={padding:t.padding??0};return nl(e,t,r)}p(Ug,"mindmapCircle");var PS=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Cg},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:wg},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:_g},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:$g},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Gp},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:nl},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:Wg},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Hg},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:yg},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:tg},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:hg},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:cg},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Fg},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:og},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Vp},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Ag},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Ip},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:vg},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Bg},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Tg},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Qp},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:eg},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Wp},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Hp},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Yp},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:ug},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Og},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Jp},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Eg},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:dg},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Up},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Xp},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Rg},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Ng},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Zp},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Pg},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Kp},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:kg},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:gg},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:pg},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Np},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:jp},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Mg},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Lg},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Dg},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:xg},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:fg}],RS=p(()=>{const t=[...Object.entries({state:Sg,choice:zp,note:mg,rectWithTitle:bg,labelRect:lg,iconSquare:ag,iconCircle:ig,icon:rg,iconRounded:ng,imageSquare:sg,anchor:Dp,kanbanItem:jg,mindmapCircle:Ug,defaultMindmapNode:Yg,classBox:zg,erBox:al,requirementBox:qg}),...PS.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(n=>[n,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Gg=RS();function Xg(e){return e in Gg}p(Xg,"isValidShape");var Ca=new Map;async function sl(e,t,r){let i,n;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const a=t.shape?Gg[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;r.config.securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),n=await a(i,t,r)}else n=await a(e,t,r),i=n;return t.tooltip&&n.attr("title",t.tooltip),Ca.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}p(sl,"insertNode");var OS=p((e,t)=>{Ca.set(t.id,e)},"setNodeElem"),DS=p(()=>{Ca.clear()},"clear"),NS=p(e=>{const t=Ca.get(e.id);N.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode"),IS=p((e,t,r,i,n,a)=>{t.arrowTypeStart&&Cc(e,"start",t.arrowTypeStart,r,i,n,a),t.arrowTypeEnd&&Cc(e,"end",t.arrowTypeEnd,r,i,n,a)},"addEdgeMarkers"),zS={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},Cc=p((e,t,r,i,n,a,o)=>{const s=zS[r];if(!s){N.warn(`Unknown arrow type: ${r}`);return}const l=s.type,h=`${n}_${a}-${l}${t==="start"?"Start":"End"}`;if(o&&o.trim()!==""){const u=o.replace(/[^\dA-Za-z]/g,"_"),d=`${h}_${u}`;if(!document.getElementById(d)){const f=document.getElementById(h);if(f){const g=f.cloneNode(!0);g.id=d,g.querySelectorAll("path, circle, line").forEach(y=>{y.setAttribute("stroke",o),s.fill&&y.setAttribute("fill",o)}),f.parentNode?.appendChild(g)}}e.attr(`marker-${t}`,`url(${i}#${d})`)}else e.attr(`marker-${t}`,`url(${i}#${h})`)},"addEdgeMarker"),Yn=new Map,Bt=new Map,qS=p(()=>{Yn.clear(),Bt.clear()},"clear"),Zi=p(e=>e?e.reduce((r,i)=>r+";"+i,""):"","getLabelStyles"),Vg=p(async(e,t)=>{let r=wt(ut().flowchart.htmlLabels);const{labelStyles:i}=V(t);t.labelStyle=i;const n=await Ce(e,t.label,{style:t.labelStyle,useHtmlLabels:r,addSvgBackground:!0,isNode:!1});N.info("abc82",t,t.labelType);const a=e.insert("g").attr("class","edgeLabel"),o=a.insert("g").attr("class","label").attr("data-id",t.id);o.node().appendChild(n);let s=n.getBBox();if(r){const c=n.children[0],h=lt(n);s=c.getBoundingClientRect(),h.attr("width",s.width),h.attr("height",s.height)}o.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),Yn.set(t.id,a),t.width=s.width,t.height=s.height;let l;if(t.startLabelLeft){const c=await He(t.startLabelLeft,Zi(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=u.node().appendChild(c);const d=c.getBBox();u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),Bt.get(t.id)||Bt.set(t.id,{}),Bt.get(t.id).startLeft=h,oi(l,t.startLabelLeft)}if(t.startLabelRight){const c=await He(t.startLabelRight,Zi(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=h.node().appendChild(c),u.node().appendChild(c);const d=c.getBBox();u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),Bt.get(t.id)||Bt.set(t.id,{}),Bt.get(t.id).startRight=h,oi(l,t.startLabelRight)}if(t.endLabelLeft){const c=await He(t.endLabelLeft,Zi(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=u.node().appendChild(c);const d=c.getBBox();u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),h.node().appendChild(c),Bt.get(t.id)||Bt.set(t.id,{}),Bt.get(t.id).endLeft=h,oi(l,t.endLabelLeft)}if(t.endLabelRight){const c=await He(t.endLabelRight,Zi(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=u.node().appendChild(c);const d=c.getBBox();u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),h.node().appendChild(c),Bt.get(t.id)||Bt.set(t.id,{}),Bt.get(t.id).endRight=h,oi(l,t.endLabelRight)}return n},"insertEdgeLabel");function oi(e,t){ut().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}p(oi,"setTerminalWidth");var Zg=p((e,t)=>{N.debug("Moving label abc88 ",e.id,e.label,Yn.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=ut(),{subGraphTitleTotalMargin:n}=ca(i);if(e.label){const a=Yn.get(e.id);let o=e.x,s=e.y;if(r){const l=Gt.calcLabelPosition(r);N.debug("Moving label "+e.label+" from (",o,",",s,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(o=l.x,s=l.y)}a.attr("transform",`translate(${o}, ${s+n/2})`)}if(e.startLabelLeft){const a=Bt.get(e.id).startLeft;let o=e.x,s=e.y;if(r){const l=Gt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=l.x,s=l.y}a.attr("transform",`translate(${o}, ${s})`)}if(e.startLabelRight){const a=Bt.get(e.id).startRight;let o=e.x,s=e.y;if(r){const l=Gt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=l.x,s=l.y}a.attr("transform",`translate(${o}, ${s})`)}if(e.endLabelLeft){const a=Bt.get(e.id).endLeft;let o=e.x,s=e.y;if(r){const l=Gt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=l.x,s=l.y}a.attr("transform",`translate(${o}, ${s})`)}if(e.endLabelRight){const a=Bt.get(e.id).endRight;let o=e.x,s=e.y;if(r){const l=Gt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=l.x,s=l.y}a.attr("transform",`translate(${o}, ${s})`)}},"positionEdgeLabel"),jS=p((e,t)=>{const r=e.x,i=e.y,n=Math.abs(t.x-r),a=Math.abs(t.y-i),o=e.width/2,s=e.height/2;return n>=o||a>=s},"outsideNode"),WS=p((e,t,r)=>{N.debug(`intersection calc abc89:
|
|
294
|
+
outsidePoint: ${JSON.stringify(t)}
|
|
295
|
+
insidePoint : ${JSON.stringify(r)}
|
|
296
|
+
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,n=e.y,a=Math.abs(i-r.x),o=e.width/2;let s=r.x<t.x?o-a:o+a;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(n-t.y)*o>Math.abs(i-t.x)*l){let u=r.y<t.y?t.y-l-n:n-l-t.y;s=h*u/c;const d={x:r.x<t.x?r.x+s:r.x-h+s,y:r.y<t.y?r.y+c-u:r.y-c+u};return s===0&&(d.x=t.x,d.y=t.y),h===0&&(d.x=t.x),c===0&&(d.y=t.y),N.debug(`abc89 top/bottom calc, Q ${c}, q ${u}, R ${h}, r ${s}`,d),d}else{r.x<t.x?s=t.x-o-i:s=i-o-t.x;let u=c*s/h,d=r.x<t.x?r.x+h-s:r.x-h+s,f=r.y<t.y?r.y+u:r.y-u;return N.debug(`sides calc abc89, Q ${c}, q ${u}, R ${h}, r ${s}`,{_x:d,_y:f}),s===0&&(d=t.x,f=t.y),h===0&&(d=t.x),c===0&&(f=t.y),{x:d,y:f}}},"intersection"),_c=p((e,t)=>{N.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],n=!1;return e.forEach(a=>{if(N.info("abc88 checking point",a,t),!jS(t,a)&&!n){const o=WS(t,i,a);N.debug("abc88 inside",a,i,o),N.debug("abc88 intersection",o,t);let s=!1;r.forEach(l=>{s=s||l.x===o.x&&l.y===o.y}),r.some(l=>l.x===o.x&&l.y===o.y)?N.warn("abc88 no intersect",o,r):r.push(o),n=!0}else N.warn("abc88 outside",a,i),i=a,n||r.push(a)}),N.debug("returning points",r),r},"cutPathAtIntersect");function Kg(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const n=e[i-1],a=e[i],o=e[i+1];(n.x===a.x&&a.y===o.y&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-n.y)>5||n.y===a.y&&a.x===o.x&&Math.abs(a.x-n.x)>5&&Math.abs(a.y-o.y)>5)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}p(Kg,"extractCornerPoints");var Sc=p(function(e,t,r){const i=t.x-e.x,n=t.y-e.y,a=Math.sqrt(i*i+n*n),o=r/a;return{x:t.x-o*i,y:t.y-o*n}},"findAdjacentPoint"),HS=p(function(e){const{cornerPointPositions:t}=Kg(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const n=e[i-1],a=e[i+1],o=e[i],s=Sc(n,o,5),l=Sc(a,o,5),c=l.x-s.x,h=l.y-s.y;r.push(s);const u=Math.sqrt(2)*2;let d={x:o.x,y:o.y};if(Math.abs(a.x-n.x)>10&&Math.abs(a.y-n.y)>=10){N.debug("Corner point fixing",Math.abs(a.x-n.x),Math.abs(a.y-n.y));const f=5;o.x===s.x?d={x:c<0?s.x-f+u:s.x+f-u,y:h<0?s.y-u:s.y+u}:d={x:c<0?s.x-u:s.x+u,y:h<0?s.y-f+u:s.y+f-u}}else N.debug("Corner point skipping fixing",Math.abs(a.x-n.x),Math.abs(a.y-n.y));r.push(d,l)}else r.push(e[i]);return r},"fixCorners"),YS=p((e,t,r)=>{const i=e-t-r,n=2,a=2,o=n+a,s=Math.floor(i/o),l=Array(s).fill(`${n} ${a}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),Qg=p(function(e,t,r,i,n,a,o,s=!1){const{handDrawnSeed:l}=ut();let c=t.points,h=!1;const u=n;var d=a;const f=[];for(const $ in t.cssCompiledStyles)Eo($)||f.push(t.cssCompiledStyles[$]);N.debug("UIO intersect check",t.points,d.x,u.x),d.intersect&&u.intersect&&!s&&(c=c.slice(1,t.points.length-1),c.unshift(u.intersect(c[0])),N.debug("Last point UIO",t.start,"-->",t.end,c[c.length-1],d,d.intersect(c[c.length-1])),c.push(d.intersect(c[c.length-1])));const g=btoa(JSON.stringify(c));t.toCluster&&(N.info("to cluster abc88",r.get(t.toCluster)),c=_c(t.points,r.get(t.toCluster).node),h=!0),t.fromCluster&&(N.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(c,null,2)),c=_c(c.reverse(),r.get(t.fromCluster).node).reverse(),h=!0);let m=c.filter($=>!Number.isNaN($.y));m=HS(m);let y=ui;switch(y=Sn,t.curve){case"linear":y=Sn;break;case"basis":y=ui;break;case"cardinal":y=ou;break;case"bumpX":y=ru;break;case"bumpY":y=iu;break;case"catmullRom":y=cu;break;case"monotoneX":y=gu;break;case"monotoneY":y=mu;break;case"natural":y=xu;break;case"step":y=bu;break;case"stepAfter":y=vu;break;case"stepBefore":y=wu;break;default:y=ui}const{x,y:b}=of(t),w=tu().x(x).y(b).curve(y);let C;switch(t.thickness){case"normal":C="edge-thickness-normal";break;case"thick":C="edge-thickness-thick";break;case"invisible":C="edge-thickness-invisible";break;default:C="edge-thickness-normal"}switch(t.pattern){case"solid":C+=" edge-pattern-solid";break;case"dotted":C+=" edge-pattern-dotted";break;case"dashed":C+=" edge-pattern-dashed";break;default:C+=" edge-pattern-solid"}let v,L=t.curve==="rounded"?Jg(tm(m,t),5):w(m);const T=Array.isArray(t.style)?t.style:[t.style];let D=T.find($=>$?.startsWith("stroke:")),z=!1;if(t.look==="handDrawn"){const $=Z.svg(e);Object.assign([],m);const M=$.path(L,{roughness:.3,seed:l});C+=" transition",v=lt(M).select("path").attr("id",t.id).attr("class"," "+C+(t.classes?" "+t.classes:"")).attr("style",T?T.reduce((P,E)=>P+";"+E,""):"");let B=v.attr("d");v.attr("d",B),e.node().appendChild(v.node())}else{const $=f.join(";"),M=T?T.reduce((R,F)=>R+F+";",""):"";let B="";t.animate&&(B=" edge-animation-fast"),t.animation&&(B=" edge-animation-"+t.animation);const P=($?$+";"+M+";":M)+";"+(T?T.reduce((R,F)=>R+";"+F,""):"");v=e.append("path").attr("d",L).attr("id",t.id).attr("class"," "+C+(t.classes?" "+t.classes:"")+(B??"")).attr("style",P),D=P.match(/stroke:([^;]+)/)?.[1],z=t.animate===!0||!!t.animation||$.includes("animation");const E=v.node(),A=typeof E.getTotalLength=="function"?E.getTotalLength():0,I=Hl[t.arrowTypeStart]||0,k=Hl[t.arrowTypeEnd]||0;if(t.look==="neo"&&!z){const F=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?YS(A,I,k):`0 ${I} ${A-I-k} ${k}`}; stroke-dashoffset: 0;`;v.attr("style",F+v.attr("style"))}}v.attr("data-edge",!0),v.attr("data-et","edge"),v.attr("data-id",t.id),v.attr("data-points",g),t.showPoints&&m.forEach($=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",$.x).attr("cy",$.y)});let q="";(ut().flowchart.arrowMarkerAbsolute||ut().state.arrowMarkerAbsolute)&&(q=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,q=q.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),N.info("arrowTypeStart",t.arrowTypeStart),N.info("arrowTypeEnd",t.arrowTypeEnd),IS(v,t,q,o,i,D);const O=Math.floor(c.length/2),W=c[O];Gt.isLabelCoordinateInPath(W,v.attr("d"))||(h=!0);let j={};return h&&(j.updatedPath=c),j.originalPath=t.points,j},"insertEdge");function Jg(e,t){if(e.length<2)return"";let r="";const i=e.length,n=1e-5;for(let a=0;a<i;a++){const o=e[a],s=e[a-1],l=e[a+1];if(a===0)r+=`M${o.x},${o.y}`;else if(a===i-1)r+=`L${o.x},${o.y}`;else{const c=o.x-s.x,h=o.y-s.y,u=l.x-o.x,d=l.y-o.y,f=Math.hypot(c,h),g=Math.hypot(u,d);if(f<n||g<n){r+=`L${o.x},${o.y}`;continue}const m=c/f,y=h/f,x=u/g,b=d/g,w=m*x+y*b,C=Math.max(-1,Math.min(1,w)),v=Math.acos(C);if(v<n||Math.abs(Math.PI-v)<n){r+=`L${o.x},${o.y}`;continue}const L=Math.min(t/Math.sin(v/2),f/2,g/2),T=o.x-m*L,D=o.y-y*L,z=o.x+x*L,q=o.y+b*L;r+=`L${T},${D}`,r+=`Q${o.x},${o.y} ${z},${q}`}}return r}p(Jg,"generateRoundedPath");function Ys(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}p(Ys,"calculateDeltaAndAngle");function tm(e,t){const r=e.map(n=>({...n}));if(e.length>=2&&Et[t.arrowTypeStart]){const n=Et[t.arrowTypeStart],a=e[0],o=e[1],{angle:s}=Ys(a,o),l=n*Math.cos(s),c=n*Math.sin(s);r[0].x=a.x+l,r[0].y=a.y+c}const i=e.length;if(i>=2&&Et[t.arrowTypeEnd]){const n=Et[t.arrowTypeEnd],a=e[i-1],o=e[i-2],{angle:s}=Ys(o,a),l=n*Math.cos(s),c=n*Math.sin(s);r[i-1].x=a.x-l,r[i-1].y=a.y-c}return r}p(tm,"applyMarkerOffsetsToPoints");var US=p((e,t,r,i)=>{t.forEach(n=>{lT[n](e,r,i)})},"insertMarkers"),GS=p((e,t,r)=>{N.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),XS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),VS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),ZS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),KS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),QS=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),JS=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),tT=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),eT=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),rT=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),iT=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),nT=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),aT=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),sT=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
|
|
297
|
+
L20,10
|
|
298
|
+
M20,10
|
|
299
|
+
L0,20`)},"requirement_arrow"),oT=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),lT={extension:GS,composition:XS,aggregation:VS,dependency:ZS,lollipop:KS,point:QS,circle:JS,cross:tT,barb:eT,only_one:rT,zero_or_one:iT,one_or_more:nT,zero_or_more:aT,requirement_arrow:sT,requirement_contains:oT},em=US,cT={common:rr,getConfig:$t,insertCluster:Mp,insertEdge:Qg,insertEdgeLabel:Vg,insertMarkers:em,insertNode:sl,interpolateToCurve:No,labelHelper:it,log:N,positionEdgeLabel:Zg},$i={},rm=p(e=>{for(const t of e)$i[t.name]=t},"registerLayoutLoaders"),hT=p(()=>{rm([{name:"dagre",loader:p(async()=>await Promise.resolve().then(()=>require("./dagre-6UL2VRFP-ZQ5YAEnU.cjs")),"loader")},{name:"cose-bilkent",loader:p(async()=>await Promise.resolve().then(()=>require("./cose-bilkent-S5V4N54A-DSWO1JhV.cjs")),"loader")}])},"registerDefaultLayoutLoaders");hT();var uT=p(async(e,t)=>{if(!(e.layoutAlgorithm in $i))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=$i[e.layoutAlgorithm];return(await r.loader()).render(e,t,cT,{algorithm:r.algorithm})},"render"),dT=p((e="",{fallback:t="dagre"}={})=>{if(e in $i)return e;if(t in $i)return N.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),im="comm",nm="rule",am="decl",fT="@import",pT="@namespace",gT="@keyframes",mT="@layer",sm=Math.abs,ol=String.fromCharCode;function om(e){return e.trim()}function hn(e,t,r){return e.replace(t,r)}function yT(e,t,r){return e.indexOf(t,r)}function yr(e,t){return e.charCodeAt(t)|0}function Er(e,t,r){return e.slice(t,r)}function ae(e){return e.length}function xT(e){return e.length}function Ki(e,t){return t.push(e),e}var _a=1,Fr=1,lm=0,Xt=0,xt=0,jr="";function ll(e,t,r,i,n,a,o,s){return{value:e,root:t,parent:r,type:i,props:n,children:a,line:_a,column:Fr,length:o,return:"",siblings:s}}function bT(){return xt}function wT(){return xt=Xt>0?yr(jr,--Xt):0,Fr--,xt===10&&(Fr=1,_a--),xt}function Jt(){return xt=Xt<lm?yr(jr,Xt++):0,Fr++,xt===10&&(Fr=1,_a++),xt}function Te(){return yr(jr,Xt)}function un(){return Xt}function Sa(e,t){return Er(jr,e,t)}function Li(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function vT(e){return _a=Fr=1,lm=ae(jr=e),Xt=0,[]}function kT(e){return jr="",e}function Xa(e){return om(Sa(Xt-1,Us(e===91?e+2:e===40?e+1:e)))}function CT(e){for(;(xt=Te())&&xt<33;)Jt();return Li(e)>2||Li(xt)>3?"":" "}function _T(e,t){for(;--t&&Jt()&&!(xt<48||xt>102||xt>57&&xt<65||xt>70&&xt<97););return Sa(e,un()+(t<6&&Te()==32&&Jt()==32))}function Us(e){for(;Jt();)switch(xt){case e:return Xt;case 34:case 39:e!==34&&e!==39&&Us(xt);break;case 40:e===41&&Us(e);break;case 92:Jt();break}return Xt}function ST(e,t){for(;Jt()&&e+xt!==57;)if(e+xt===84&&Te()===47)break;return"/*"+Sa(t,Xt-1)+"*"+ol(e===47?e:Jt())}function TT(e){for(;!Li(Te());)Jt();return Sa(e,Xt)}function BT(e){return kT(dn("",null,null,null,[""],e=vT(e),0,[0],e))}function dn(e,t,r,i,n,a,o,s,l){for(var c=0,h=0,u=o,d=0,f=0,g=0,m=1,y=1,x=1,b=0,w="",C=n,v=a,L=i,T=w;y;)switch(g=b,b=Jt()){case 40:if(g!=108&&yr(T,u-1)==58){yT(T+=hn(Xa(b),"&","&\f"),"&\f",sm(c?s[c-1]:0))!=-1&&(x=-1);break}case 34:case 39:case 91:T+=Xa(b);break;case 9:case 10:case 13:case 32:T+=CT(g);break;case 92:T+=_T(un()-1,7);continue;case 47:switch(Te()){case 42:case 47:Ki($T(ST(Jt(),un()),t,r,l),l),(Li(g||1)==5||Li(Te()||1)==5)&&ae(T)&&Er(T,-1,void 0)!==" "&&(T+=" ");break;default:T+="/"}break;case 123*m:s[c++]=ae(T)*x;case 125*m:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+h:x==-1&&(T=hn(T,/\f/g,"")),f>0&&(ae(T)-u||m===0&&g===47)&&Ki(f>32?Bc(T+";",i,r,u-1,l):Bc(hn(T," ","")+";",i,r,u-2,l),l);break;case 59:T+=";";default:if(Ki(L=Tc(T,t,r,c,h,n,s,w,C=[],v=[],u,a),a),b===123)if(h===0)dn(T,t,L,L,C,a,u,s,v);else{switch(d){case 99:if(yr(T,3)===110)break;case 108:if(yr(T,2)===97)break;default:h=0;case 100:case 109:case 115:}h?dn(e,L,L,i&&Ki(Tc(e,L,L,0,0,n,s,w,n,C=[],u,v),v),n,v,u,s,i?C:v):dn(T,L,L,L,[""],v,0,s,v)}}c=h=f=0,m=x=1,w=T="",u=o;break;case 58:u=1+ae(T),f=g;default:if(m<1){if(b==123)--m;else if(b==125&&m++==0&&wT()==125)continue}switch(T+=ol(b),b*m){case 38:x=h>0?1:(T+="\f",-1);break;case 44:s[c++]=(ae(T)-1)*x,x=1;break;case 64:Te()===45&&(T+=Xa(Jt())),d=Te(),h=u=ae(w=T+=TT(un())),b++;break;case 45:g===45&&ae(T)==2&&(m=0)}}return a}function Tc(e,t,r,i,n,a,o,s,l,c,h,u){for(var d=n-1,f=n===0?a:[""],g=xT(f),m=0,y=0,x=0;m<i;++m)for(var b=0,w=Er(e,d+1,d=sm(y=o[m])),C=e;b<g;++b)(C=om(y>0?f[b]+" "+w:hn(w,/&\f/g,f[b])))&&(l[x++]=C);return ll(e,t,r,n===0?nm:s,l,c,h,u)}function $T(e,t,r,i){return ll(e,t,r,im,ol(bT()),Er(e,2,-2),0,i)}function Bc(e,t,r,i,n){return ll(e,t,r,am,Er(e,0,i),Er(e,i+1,-1),i,n)}function Gs(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function LT(e,t,r,i){switch(e.type){case mT:if(e.children.length)break;case fT:case pT:case am:return e.return=e.return||e.value;case im:return"";case gT:return e.return=e.value+"{"+Gs(e.children,i)+"}";case nm:if(!ae(e.value=e.props.join(",")))return""}return ae(r=Gs(e.children,i))?e.return=e.value+"{"+r+"}":""}var MT=yf(Object.keys,Object),AT=Object.prototype,ET=AT.hasOwnProperty;function cm(e){if(!Fi(e))return MT(e);var t=[];for(var r in Object(e))ET.call(e,r)&&r!="constructor"&&t.push(r);return t}var Xs=ar(he,"DataView"),Vs=ar(he,"Promise"),Un=ar(he,"Set"),Zs=ar(he,"WeakMap"),$c="[object Map]",FT="[object Object]",Lc="[object Promise]",Mc="[object Set]",Ac="[object WeakMap]",Ec="[object DataView]",PT=nr(Xs),RT=nr(_i),OT=nr(Vs),DT=nr(Un),NT=nr(Zs);exports.getTag=ir;(Xs&&exports.getTag(new Xs(new ArrayBuffer(1)))!=Ec||_i&&exports.getTag(new _i)!=$c||Vs&&exports.getTag(Vs.resolve())!=Lc||Un&&exports.getTag(new Un)!=Mc||Zs&&exports.getTag(new Zs)!=Ac)&&(exports.getTag=function(e){var t=ir(e),r=t==FT?e.constructor:void 0,i=r?nr(r):"";if(i)switch(i){case PT:return Ec;case RT:return $c;case OT:return Lc;case DT:return Mc;case NT:return Ac}return t});var IT="[object Map]",zT="[object Set]",qT=Object.prototype,jT=qT.hasOwnProperty;function Ks(e){if(e==null)return!0;if(Pi(e)&&(Ti(e)||typeof e=="string"||typeof e.splice=="function"||pa(e)||ga(e)||Si(e)))return!e.length;var t=exports.getTag(e);if(t==IT||t==zT)return!e.size;if(Fi(e))return!cm(e).length;for(var r in e)if(jT.call(e,r))return!1;return!0}var hm="c4",WT=p(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),HT=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./c4Diagram-YG6GDRKO-ChHo1WBS.cjs"));return{id:hm,diagram:e}},"loader"),YT={id:hm,detector:WT,loader:HT},UT=YT,um="flowchart",GT=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),XT=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-DBaSAM68.cjs"));return{id:um,diagram:e}},"loader"),VT={id:um,detector:GT,loader:XT},ZT=VT,dm="flowchart-v2",KT=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-d3"?!1:(t?.flowchart?.defaultRenderer==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),QT=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-DBaSAM68.cjs"));return{id:dm,diagram:e}},"loader"),JT={id:dm,detector:KT,loader:QT},tB=JT,fm="er",eB=p(e=>/^\s*erDiagram/.test(e),"detector"),rB=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./erDiagram-Q2GNP2WA-JaYIUcKI.cjs"));return{id:fm,diagram:e}},"loader"),iB={id:fm,detector:eB,loader:rB},nB=iB,pm="gitGraph",aB=p(e=>/^\s*gitGraph/.test(e),"detector"),sB=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./gitGraphDiagram-NY62KEGX-CRq5jUCx.cjs"));return{id:pm,diagram:e}},"loader"),oB={id:pm,detector:aB,loader:sB},lB=oB,gm="gantt",cB=p(e=>/^\s*gantt/.test(e),"detector"),hB=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./ganttDiagram-LVOFAZNH-CkuTaxdW.cjs"));return{id:gm,diagram:e}},"loader"),uB={id:gm,detector:cB,loader:hB},dB=uB,mm="info",fB=p(e=>/^\s*info/.test(e),"detector"),pB=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./infoDiagram-ER5ION4S-CvRdqD6y.cjs"));return{id:mm,diagram:e}},"loader"),gB={id:mm,detector:fB,loader:pB},ym="pie",mB=p(e=>/^\s*pie/.test(e),"detector"),yB=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./pieDiagram-ADFJNKIX-D5N3jTfS.cjs"));return{id:ym,diagram:e}},"loader"),xB={id:ym,detector:mB,loader:yB},xm="quadrantChart",bB=p(e=>/^\s*quadrantChart/.test(e),"detector"),wB=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./quadrantDiagram-AYHSOK5B-CtJwyADb.cjs"));return{id:xm,diagram:e}},"loader"),vB={id:xm,detector:bB,loader:wB},kB=vB,bm="xychart",CB=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),_B=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./xychartDiagram-PRI3JC2R-BC__kA61.cjs"));return{id:bm,diagram:e}},"loader"),SB={id:bm,detector:CB,loader:_B},TB=SB,wm="requirement",BB=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),$B=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./requirementDiagram-UZGBJVZJ-BqvtxY8r.cjs"));return{id:wm,diagram:e}},"loader"),LB={id:wm,detector:BB,loader:$B},MB=LB,vm="sequence",AB=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),EB=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sequenceDiagram-WL72ISMW-DXGlw8C8.cjs"));return{id:vm,diagram:e}},"loader"),FB={id:vm,detector:AB,loader:EB},PB=FB,km="class",RB=p((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),OB=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./classDiagram-2ON5EDUG-CsprUVVW.cjs"));return{id:km,diagram:e}},"loader"),DB={id:km,detector:RB,loader:OB},NB=DB,Cm="classDiagram",IB=p((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),zB=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./classDiagram-v2-WZHVMYZB-CsprUVVW.cjs"));return{id:Cm,diagram:e}},"loader"),qB={id:Cm,detector:IB,loader:zB},jB=qB,_m="state",WB=p((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),HB=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./stateDiagram-FKZM4ZOC-CRko_wcM.cjs"));return{id:_m,diagram:e}},"loader"),YB={id:_m,detector:WB,loader:HB},UB=YB,Sm="stateDiagram",GB=p((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),XB=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./stateDiagram-v2-4FDKWEC3-8B4m8DVq.cjs"));return{id:Sm,diagram:e}},"loader"),VB={id:Sm,detector:GB,loader:XB},ZB=VB,Tm="journey",KB=p(e=>/^\s*journey/.test(e),"detector"),QB=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./journeyDiagram-XKPGCS4Q-fyS7IwGo.cjs"));return{id:Tm,diagram:e}},"loader"),JB={id:Tm,detector:KB,loader:QB},t$=JB,e$=p((e,t,r)=>{N.debug(`rendering svg for syntax error
|
|
300
|
+
`);const i=ku(t),n=i.append("g");i.attr("viewBox","0 0 2412 512"),so(i,100,512,!0),n.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),n.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),n.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),n.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),n.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),n.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),n.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),n.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),Bm={draw:e$},r$=Bm,i$={db:{},renderer:Bm,parser:{parse:p(()=>{},"parse")}},n$=i$,$m="flowchart-elk",a$=p((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),s$=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-DBaSAM68.cjs"));return{id:$m,diagram:e}},"loader"),o$={id:$m,detector:a$,loader:s$},l$=o$,Lm="timeline",c$=p(e=>/^\s*timeline/.test(e),"detector"),h$=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./timeline-definition-IT6M3QCI-C1bBEjWc.cjs"));return{id:Lm,diagram:e}},"loader"),u$={id:Lm,detector:c$,loader:h$},d$=u$,Mm="mindmap",f$=p(e=>/^\s*mindmap/.test(e),"detector"),p$=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./mindmap-definition-VGOIOE7T-Cv1hrDNE.cjs"));return{id:Mm,diagram:e}},"loader"),g$={id:Mm,detector:f$,loader:p$},m$=g$,Am="kanban",y$=p(e=>/^\s*kanban/.test(e),"detector"),x$=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./kanban-definition-3W4ZIXB7-BNNO8Pch.cjs"));return{id:Am,diagram:e}},"loader"),b$={id:Am,detector:y$,loader:x$},w$=b$,Em="sankey",v$=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),k$=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sankeyDiagram-TZEHDZUN-DQXz814t.cjs"));return{id:Em,diagram:e}},"loader"),C$={id:Em,detector:v$,loader:k$},_$=C$,Fm="packet",S$=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),T$=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-S2PKOQOG-BMza4-jI.cjs"));return{id:Fm,diagram:e}},"loader"),B$={id:Fm,detector:S$,loader:T$},Pm="radar",$$=p(e=>/^\s*radar-beta/.test(e),"detector"),L$=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-QEK2KX5R-DOjY0eaD.cjs"));return{id:Pm,diagram:e}},"loader"),M$={id:Pm,detector:$$,loader:L$},Rm="block",A$=p(e=>/^\s*block(-beta)?/.test(e),"detector"),E$=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./blockDiagram-VD42YOAC-OVvG-qvh.cjs"));return{id:Rm,diagram:e}},"loader"),F$={id:Rm,detector:A$,loader:E$},P$=F$,Om="architecture",R$=p(e=>/^\s*architecture/.test(e),"detector"),O$=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./architectureDiagram-VXUJARFQ-swg0hzdO.cjs"));return{id:Om,diagram:e}},"loader"),D$={id:Om,detector:R$,loader:O$},N$=D$,Dm="treemap",I$=p(e=>/^\s*treemap/.test(e),"detector"),z$=p(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-PSM6KHXK-r4cFRZZM.cjs"));return{id:Dm,diagram:e}},"loader"),q$={id:Dm,detector:I$,loader:z$},Fc=!1,Ta=p(()=>{Fc||(Fc=!0,xn("error",n$,e=>e.toLowerCase().trim()==="error"),xn("---",{db:{clear:p(()=>{},"clear")},styles:{},renderer:{draw:p(()=>{},"draw")},parser:{parse:p(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:p(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Qa(l$,m$,N$),Qa(UT,w$,jB,NB,nB,dB,gB,xB,MB,PB,tB,ZT,d$,lB,ZB,UB,t$,kB,_$,B$,TB,P$,M$,q$))},"addDiagrams"),j$=p(async()=>{N.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Xe).map(async([r,{detector:i,loader:n}])=>{if(n)try{is(r)}catch{try{const{diagram:a,id:o}=await n();xn(o,a,i)}catch(a){throw N.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Xe[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){N.error(`Failed to load ${t.length} external diagrams`);for(const r of t)N.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),W$="graphics-document document";function Nm(e,t){e.attr("role",W$),t!==""&&e.attr("aria-roledescription",t)}p(Nm,"setA11yDiagramInfo");function Im(e,t,r,i){if(e.insert!==void 0){if(r){const n=`chart-desc-${i}`;e.attr("aria-describedby",n),e.insert("desc",":first-child").attr("id",n).text(r)}if(t){const n=`chart-title-${i}`;e.attr("aria-labelledby",n),e.insert("title",":first-child").attr("id",n).text(t)}}}p(Im,"addSVGa11yTitleDescription");var Ue,Qs=(Ue=class{constructor(t,r,i,n,a){this.type=t,this.text=r,this.db=i,this.parser=n,this.renderer=a}static async fromText(t,r={}){const i=$t(),n=no(t,i);t=WC(t)+`
|
|
301
|
+
`;try{is(n)}catch{const c=qy(n);if(!c)throw new rh(`Diagram ${n} not found.`);const{id:h,diagram:u}=await c();xn(h,u)}const{db:a,parser:o,renderer:s,init:l}=is(n);return o.parser&&(o.parser.yy=a),a.clear?.(),l?.(i),r.title&&a.setDiagramTitle?.(r.title),await o.parse(t),new Ue(n,t,a,o,s)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},p(Ue,"Diagram"),Ue),Pc=[],H$=p(()=>{Pc.forEach(e=>{e()}),Pc=[]},"attachFunctions"),Y$=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function zm(e){const t=e.match(eh);if(!t)return{text:e,metadata:{}};let r=sf(t[1],{schema:af})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(t[0].length),metadata:i}}p(zm,"extractFrontMatter");var U$=p(e=>e.replace(/\r\n?/g,`
|
|
302
|
+
`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),G$=p(e=>{const{text:t,metadata:r}=zm(e),{displayMode:i,title:n,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:n,config:a,text:t}},"processFrontmatter"),X$=p(e=>{const t=Gt.detectInit(e)??{},r=Gt.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:FC(e),directive:t}},"processDirectives");function cl(e){const t=U$(e),r=G$(t),i=X$(r.text),n=ma(r.config,i.directive);return e=Y$(i.text),{code:e,title:r.title,config:n}}p(cl,"preprocessDiagram");function qm(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}p(qm,"toBase64");var V$=5e4,Z$="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",K$="sandbox",Q$="loose",J$="http://www.w3.org/2000/svg",tL="http://www.w3.org/1999/xlink",eL="http://www.w3.org/1999/xhtml",rL="100%",iL="100%",nL="border:0;margin:0;",aL="margin:0",sL="allow-top-navigation-by-user-activation allow-popups",oL='The "iframe" tag is not supported by your browser.',lL=["foreignobject"],cL=["dominant-baseline"];function hl(e){const t=cl(e);return mn(),rx(t.config??{}),t}p(hl,"processAndSetConfigs");async function jm(e,t){Ta();try{const{code:r,config:i}=hl(e);return{diagramType:(await Hm(r)).type,config:i}}catch(r){if(t?.suppressErrors)return!1;throw r}}p(jm,"parse");var Rc=p((e,t,r=[])=>`
|
|
303
|
+
.${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),hL=p((e,t=new Map)=>{let r="";if(e.themeCSS!==void 0&&(r+=`
|
|
304
|
+
${e.themeCSS}`),e.fontFamily!==void 0&&(r+=`
|
|
305
|
+
:root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(r+=`
|
|
306
|
+
:root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){const o=e.htmlLabels??e.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(s=>{Ks(s.styles)||o.forEach(l=>{r+=Rc(s.id,l,s.styles)}),Ks(s.textStyles)||(r+=Rc(s.id,"tspan",(s?.textStyles||[]).map(l=>l.replace("color","fill"))))})}return r},"createCssStyles"),uL=p((e,t,r,i)=>{const n=hL(e,r),a=kx(t,n,e.themeVariables);return Gs(BT(`${i}{${a}}`),LT)},"createUserStyles"),dL=p((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Fe(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),fL=p((e="",t)=>{const r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":iL,i=qm(`<body style="${aL}">${e}</body>`);return`<iframe style="width:${rL};height:${r};${nL}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${sL}">
|
|
307
|
+
${oL}
|
|
308
|
+
</iframe>`},"putIntoIFrame"),Oc=p((e,t,r,i,n)=>{const a=e.append("div");a.attr("id",r),i&&a.attr("style",i);const o=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",J$);return n&&o.attr("xmlns:xlink",n),o.append("g"),e},"appendDivSvgG");function Js(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}p(Js,"sandboxedIframe");var pL=p((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),gL=p(async function(e,t,r){Ta();const i=hl(t);t=i.code;const n=$t();N.debug(n),t.length>(n?.maxTextSize??V$)&&(t=Z$);const a="#"+e,o="i"+e,s="#"+o,l="d"+e,c="#"+l,h=p(()=>{const j=lt(d?s:c).node();j&&"remove"in j&&j.remove()},"removeTempElements");let u=lt("body");const d=n.securityLevel===K$,f=n.securityLevel===Q$,g=n.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),d){const W=Js(lt(r),o);u=lt(W.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=lt(r);Oc(u,e,l,`font-family: ${g}`,tL)}else{if(pL(document,e,l,o),d){const W=Js(lt("body"),o);u=lt(W.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=lt("body");Oc(u,e,l)}let m,y;try{m=await Qs.fromText(t,{title:i.title})}catch(W){if(n.suppressErrorRendering)throw h(),W;m=await Qs.fromText("error"),y=W}const x=u.select(c).node(),b=m.type,w=x.firstChild,C=w.firstChild,v=m.renderer.getClasses?.(t,m),L=uL(n,b,v,a),T=document.createElement("style");T.innerHTML=L,w.insertBefore(T,C);try{await m.renderer.draw(t,e,Ka.version,m)}catch(W){throw n.suppressErrorRendering?h():r$.draw(t,e,Ka.version),W}const D=u.select(`${c} svg`),z=m.db.getAccTitle?.(),q=m.db.getAccDescription?.();Ym(b,D,z,q),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",eL);let O=u.select(c).node().innerHTML;if(N.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),O=dL(O,d,wt(n.arrowMarkerAbsolute)),d){const W=u.select(c+" svg").node();O=fL(O,W)}else f||(O=Ge.sanitize(O,{ADD_TAGS:lL,ADD_ATTR:cL,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(H$(),y)throw y;return h(),{diagramType:b,svg:O,bindFunctions:m.db.bindFunctions}},"render");function Wm(e={}){const t=bt({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),tx(t),t?.theme&&t.theme in ye?t.themeVariables=ye[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=ye.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?Jy(t):oh();io(r.logLevel),Ta()}p(Wm,"initialize");var Hm=p((e,t={})=>{const{code:r}=cl(e);return Qs.fromText(r,t)},"getDiagramFromText");function Ym(e,t,r,i){Nm(t,e),Im(t,r,i,t.attr("id"))}p(Ym,"addA11yInfo");var er=Object.freeze({render:gL,parse:jm,getDiagramFromText:Hm,initialize:Wm,getConfig:$t,setConfig:lh,getSiteConfig:oh,updateSiteConfig:ex,reset:p(()=>{mn()},"reset"),globalReset:p(()=>{mn(Tr)},"globalReset"),defaultConfig:Tr});io($t().logLevel);mn($t());var mL=p((e,t,r)=>{N.warn(e),Ho(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),Um=p(async function(e={querySelector:".mermaid"}){try{await yL(e)}catch(t){if(Ho(t)&&N.error(t.str),we.parseError&&we.parseError(t),!e.suppressErrors)throw N.error("Use the suppressErrors option to suppress these errors"),t}},"run"),yL=p(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=er.getConfig();N.debug(`${e?"":"No "}Callback function found`);let n;if(r)n=r;else if(t)n=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");N.debug(`Found ${n.length} diagrams`),i?.startOnLoad!==void 0&&(N.debug("Start On Load: "+i?.startOnLoad),er.updateSiteConfig({startOnLoad:i?.startOnLoad}));const a=new Gt.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const s=[];for(const l of Array.from(n)){if(N.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${a.next()}`;o=l.innerHTML,o=ap(Gt.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=Gt.detectInit(o);h&&N.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:d}=await Zm(c,o,l);l.innerHTML=u,e&&await e(c),d&&d(l)}catch(u){mL(u,s,we.parseError)}}if(s.length>0)throw s[0]},"runThrowsErrors"),Gm=p(function(e){er.initialize(e)},"initialize"),xL=p(async function(e,t,r){N.warn("mermaid.init is deprecated. Please use run instead."),e&&Gm(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await Um(i)},"init"),bL=p(async(e,{lazyLoad:t=!0}={})=>{Ta(),Qa(...e),t===!1&&await j$()},"registerExternalDiagrams"),Xm=p(function(){if(we.startOnLoad){const{startOnLoad:e}=er.getConfig();e&&we.run().catch(t=>N.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",Xm,!1);var wL=p(function(e){we.parseError=e},"setParseErrorHandler"),Gn=[],Va=!1,Vm=p(async()=>{if(!Va){for(Va=!0;Gn.length>0;){const e=Gn.shift();if(e)try{await e()}catch(t){N.error("Error executing queue",t)}}Va=!1}},"executeQueue"),vL=p(async(e,t)=>new Promise((r,i)=>{const n=p(()=>new Promise((a,o)=>{er.parse(e,t).then(s=>{a(s),r(s)},s=>{N.error("Error parsing",s),we.parseError?.(s),o(s),i(s)})}),"performCall");Gn.push(n),Vm().catch(i)}),"parse"),Zm=p((e,t,r)=>new Promise((i,n)=>{const a=p(()=>new Promise((o,s)=>{er.render(e,t,r).then(l=>{o(l),i(l)},l=>{N.error("Error parsing",l),we.parseError?.(l),s(l),n(l)})}),"performCall");Gn.push(a),Vm().catch(n)}),"render"),kL=p(()=>Object.keys(Xe).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),we={startOnLoad:!0,mermaidAPI:er,parse:vL,render:Zm,init:xL,run:Um,registerExternalDiagrams:bL,registerLayoutLoaders:rm,initialize:Gm,parseError:void 0,contentLoaded:Xm,setParseErrorHandler:wL,detectType:no,registerIconPacks:lp,getRegisteredDiagramsMetadata:kL},fn=we;/*! Check if previously processed *//*!
|
|
309
|
+
* Wait for document loaded before starting the execution
|
|
310
|
+
*/let Km=!1,to=null;if(typeof fn<"u"&&fn.initialize)try{fn.initialize({startOnLoad:!1}),Km=!0}catch(e){to=e instanceof Error?e:new Error(String(e))}else to=new Error("Mermaid library or mermaid.initialize is not available.");const Qm=({chartContent:e})=>{const t=J.useRef(`mermaid-chart-${Math.random().toString(36).substring(2,15)}`),r=J.useRef(null),i=J.useRef(null),[n,a]=J.useState(!0),[o,s]=J.useState(null),[l,c]=J.useState(null),[h,u]=J.useState(null),[d,f]=J.useState(!1);return J.useEffect(()=>{if(u(null),a(!0),s(null),f(!1),!Km){s(to?.message||"Mermaid failed to initialize globally."),a(!1);return}if(!e||e.trim()===""){a(!1),r.current&&(r.current.innerHTML=""),c(null);return}(async()=>{try{const m=e.trim();if(!m){a(!1),r.current&&(r.current.innerHTML=""),c(null);return}const y=`${t.current}-render`,x=await fn.render(y,m);x&&typeof x.svg=="string"&&x.svg.length>0?(c(x.svg),typeof x.bindFunctions=="function"?u(()=>x.bindFunctions):u(null)):(s("Failed to render Mermaid diagram: SVG content is empty or invalid."),c(null))}catch(m){console.error(`[MermaidDiagram ${t.current}] Error rendering Mermaid diagram:`,m),s(m instanceof Error?m.message:"An unknown error occurred while rendering the diagram."),c(null)}finally{a(!1)}})().catch(m=>{console.error(`[MermaidDiagram ${t.current}] Unhandled error in renderMermaid:`,m),s(m instanceof Error?m.message:"An unexpected error occurred."),a(!1)})},[e]),J.useEffect(()=>{const g=r.current;if(!g)return;const m=()=>{i.current&&(i.current.destroy(),i.current=null),f(!1)};if(!l){g.innerHTML="",m();return}g.innerHTML=l;const y=g.querySelector("svg");if(y){const x=()=>{const b=y.getBBox();if(!b||b.width===0||b.height===0){setTimeout(x,100);return}i.current&&i.current.destroy();const w=Xc(y,{startScale:1,minScale:.5,maxScale:10,origin:"0 0",animate:!0});i.current=w,g.addEventListener("wheel",C=>{C.shiftKey&&(C.preventDefault(),w.zoomWithWheel(C))},{passive:!1}),f(!0)};x()}return h&&h(g),m},[l,h]),J.useEffect(()=>{d&&r.current&&(r.current.style.overflow="visible")},[d]),n?S.jsx("div",{className:"flex h-32 items-center justify-center bg-white dark:bg-gray-800 dark:text-white",children:"🌀 Loading diagram..."}):o?S.jsxs("div",{className:"rounded border border-red-400 bg-red-100 p-4 text-red-600 dark:border-red-700 dark:bg-red-900/50 dark:text-red-300",children:["Error: ",o]}):S.jsxs("div",{className:"relative",children:[S.jsx("div",{ref:r,className:"mermaid mermaid-diagram-container bg-white dark:bg-gray-400",style:{overflow:"visible"}}),d&&S.jsxs("div",{className:"absolute top-2 right-2 z-10 flex gap-1",children:[S.jsx("button",{type:"button",onClick:()=>i.current?.zoomIn(),className:"flex h-8 w-8 items-center justify-center rounded border border-gray-200 bg-white p-1 text-gray-700 text-lg shadow hover:bg-gray-100 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-700","aria-label":"Zoom In",children:S.jsx(By,{size:20})}),S.jsx("button",{type:"button",onClick:()=>i.current?.zoomOut(),className:"flex h-8 w-8 items-center justify-center rounded border border-gray-200 bg-white p-1 text-gray-700 text-lg shadow hover:bg-gray-100 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-700","aria-label":"Zoom Out",children:S.jsx(Ly,{size:20})}),S.jsx("button",{type:"button",onClick:()=>i.current?.reset(),className:"flex h-8 items-center justify-center rounded border border-gray-200 bg-white px-2 py-1 text-gray-700 text-sm shadow hover:bg-gray-100 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-700","aria-label":"Reset View",children:S.jsx(Sy,{size:18})})]})]})};Qm.displayName="MermaidDiagramInternal";const Jm=J.memo(Qm);function CL(e){const t={};for(const r in e){const i=e[r];switch(r){case"class":t.className=i;break;case"style":{const n={};for(const a of i.split(";")){const[o,s]=a.split(":");if(o&&s){const l=o.trim().replace(/-(\w)/g,(c,h)=>h.toUpperCase());l.startsWith("-")?n[l.substring(1)]=s.trim():n[l]=s.trim()}}t.style=n;break}case"tabindex":t.tabIndex=Number(i);break;default:t[r]=i}}return t}const _L=({code:e})=>{const[t,r]=J.useState(!1),i=()=>{navigator.clipboard.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),2e3)},n=>{console.error("Failed to copy: ",n)})};return S.jsx("button",{type:"button",className:"absolute top-2 right-2 z-10 rounded-md bg-gray-200 px-2 py-1 text-gray-800 text-sm transition-colors hover:bg-gray-300 dark:bg-gray-700 dark:text-gray-100 dark:hover:bg-gray-600",onClick:i,children:t?"COPIED!":"Copy"})},SL=({htmlPromise:e,filename:t,code:r})=>{const i=J.use(e),n={replace:a=>{if(a instanceof La.Element&&a.name==="pre"){const o=CL(a.attribs);if(typeof o.style=="object"){const{backgroundColor:s,...l}=o.style;o.style={...l,margin:"1rem 0",padding:"0.8rem 0"}}else o.style={margin:"1rem 0",padding:"0.8rem 0"};return o.className=`${o.className||""} bg-gray-900 dark:bg-gray-900`,S.jsxs("div",{className:"relative",children:[t&&S.jsx("div",{className:"code-filename -top-4 absolute left-0 z-0 rounded-md bg-gray-200 px-2 py-0.5 text-gray-800 text-sm dark:bg-gray-700 dark:text-gray-100",children:t}),S.jsx(_L,{code:r}),S.jsx("pre",{...o,children:La.domToReact(a.children,n)})]})}},htmlparser2:{lowerCaseTags:!0}};return S.jsx(S.Fragment,{children:La(i,n)})},TL=/^(diff)?:?(\w+):?([\w.-]*)?/,BL=()=>({code(e){for(const t of e.children){if(t.type!=="element")continue;const r=t.children[0];if(r?.type!=="element")continue;const i=r.children[0];if(i?.type!=="text")continue;const n=i.value;let a,o="",s="";if(n.startsWith("+")?(a="+",o="background-color: rgba(16, 185, 129, 0.2);",s="bg-green-200 dark:bg-green-400/90 text-green-700"):n.startsWith("-")&&(a="-",o="background-color: rgba(239, 68, 68, 0.2);",s="bg-red-200 dark:bg-red-400/90 text-red-700"),a){t.properties.style=o,i.value=n.substring(1).trimStart();const l={type:"element",tagName:"span",properties:{className:`inline-flex items-center justify-center w-4 h-4 rounded-full select-none font-bold text-[0.5rem] mr-2 ${s}`},children:[{type:"text",value:a==="+"?"➕":"➖"}]};t.children.unshift(l)}}}}),$L=e=>{const t=TL.exec(e??"");return{isDiff:t?.[1]==="diff",lang:t?.[2]||"text",filename:t?.[3]||void 0}},t0=({node:e})=>{const{isDiff:t,lang:r,filename:i}=$L(e.lang??void 0),n=J.useMemo(async()=>{const a=[];return t&&a.push(BL()),await V0.codeToHtml(e.value,{lang:r,themes:{light:"dark-plus",dark:"light-plus"},transformers:a})},[e.value,r,t]);return r==="mermaid"?S.jsx(Jm,{chartContent:e.value}):S.jsx(J.Suspense,{fallback:S.jsx("div",{className:"dark:text-white",children:"🌀 Loading code..."}),children:S.jsx(SL,{htmlPromise:n,filename:i,code:e.value})})},e0=({node:e})=>S.jsx("del",{children:S.jsx(Lt,{nodes:e.children})}),r0=({node:e})=>S.jsx("em",{children:S.jsx(Lt,{nodes:e.children})}),LL=e=>{switch(e){case 1:return"border-b-2 border-gray-300 pb-2 text-3xl font-bold dark:border-gray-600 dark:text-gray-100";case 2:return"border-b border-gray-300 pb-2 text-2xl font-semibold dark:border-gray-600 dark:text-gray-200";case 3:return"text-xl font-semibold dark:text-gray-300";default:return"text-lg font-medium dark:text-gray-400"}},i0=e=>{let t="";for(const r of e)"value"in r&&typeof r.value=="string"?t+=r.value:"children"in r&&Array.isArray(r.children)&&(t+=i0(r.children));return t},n0=({node:e})=>{const t=new Z0,r=`h${e.depth}`,i=e.data?.hProperties?.id,n=t.slug(i0(e.children));return S.jsx(r,{id:i||n,className:LL(e.depth),children:S.jsx(Lt,{nodes:e.children})})},ML=({iframeHtml:e,iFrameAllowedDomains:t=[]})=>{const[r,i]=J.useState(!0),[n,a]=J.useState(!1),o=J.useRef(null),s=J.useRef(null),c=J.useCallback(g=>g.match(/src\s*=\s*["']([^"']*)["']/i)?.[1]||"",[])(e),h=J.useCallback(g=>{try{const m=new URL(g);return t.includes(m.hostname)}catch{return!1}},[t]),u=J.useCallback(g=>{if(!h(g.origin))return;const{type:m}=g.data;m==="dify-chatbot-iframe-ready"&&(console.log("Dify chatbot iframe is ready"),i(y=>y&&(a(!1),o.current&&(clearTimeout(o.current),o.current=null),s.current&&(clearTimeout(s.current),s.current=null),!1)))},[h]),d=J.useCallback(()=>{const g=document.querySelector(`iframe[src="${c}"]`);if(g)try{if(!g.contentDocument)throw new Error("Cannot access iframe content");i(y=>y&&(a(!1),!1))}catch{console.log("Crossorigin error detected, showing auth prompt"),a(y=>y||(i(!1),!0))}},[c]),f=J.useCallback(g=>{const m=window.open(g,"dify-oauth","width=500,height=600,scrollbars=yes,resizable=yes");if(!m){console.error("ポップアップがブロックされました");return}const y=setInterval(()=>{if(m.closed){clearInterval(y),console.log("ポップアップが閉じられました");try{console.log("ポップアップURL:",m.location.href)}catch(b){console.log("クロスオリジンのためURLにアクセスできません:",b)}const x=document.querySelector(`iframe[src="${g}"]`);if(x?.src){const b=x.src;i(w=>w||!0),a(w=>w&&!1),x.src="",setTimeout(()=>{x.src=b,o.current=setTimeout(()=>{console.log("認証後タイムアウト: dify-chatbot-iframe-ready not received after auth"),d()},5e3)},100)}}},1e3);console.log("ポップアップを開きました:"),console.log("- 初期URL:",g),console.log("- ウィンドウ名:","dify-oauth"),console.log("- ウィンドウサイズ: 500x600")},[d]);return J.useEffect(()=>(window.addEventListener("message",u),()=>{window.removeEventListener("message",u)}),[u]),J.useEffect(()=>{const g=setTimeout(()=>{console.log("Timeout: dify-chatbot-iframe-ready not received, checking iframe access"),d()},5e3);return s.current=g,()=>{s.current&&(clearTimeout(s.current),s.current=null)}},[d]),J.useEffect(()=>()=>{o.current&&(clearTimeout(o.current),o.current=null)},[]),h(c)?S.jsxs("div",{className:"dify-iframe-container",children:[r&&!n&&S.jsxs("div",{className:"flex items-center justify-center rounded-lg bg-gray-50 p-8",children:[S.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-blue-600 border-b-2"}),S.jsx("span",{className:"ml-3 text-gray-600",children:"Dify チャットボットを読み込み中..."})]}),n&&S.jsxs("div",{className:"mb-4 rounded-lg border border-blue-200 bg-blue-50 p-6",children:[S.jsx("div",{className:"flex items-center",children:S.jsxs("div",{className:"text-blue-800",children:[S.jsx("h3",{className:"font-medium",children:"認証が必要です"}),S.jsx("p",{className:"mt-1 text-sm",children:"Dify チャットボットにアクセスするには OAuth 認証が必要です。 ポップアップウィンドウで認証を完了してください。"})]})}),S.jsx("div",{className:"mt-4",children:S.jsx("button",{type:"button",onClick:()=>f(c),className:"rounded-md border border-gray-700 bg-gray-900 px-4 py-2 font-medium text-sm text-white shadow-lg transition-colors hover:bg-gray-800",children:"OAuth 認証を開始"})})]}),S.jsx("div",{className:`${r||n?"hidden":"block"}`,dangerouslySetInnerHTML:{__html:e}})]}):(console.warn("DifyIFramePlugin: Invalid domain for iframe:",c),null)},AL={dify:ML},EL=e=>AL[e]||null,FL=/^[a-z][a-z0-9+.-]*:/,a0=({node:e,iFrameAllowedDomains:t=[]})=>{const[r,i]=J.useState(""),[n,a]=J.useState(!1),[o,s]=J.useState(null);if(J.useEffect(()=>{if(a(!0),typeof window<"u"){const l=Ge(window);let c=null;l.addHook("afterSanitizeAttributes",u=>{const d=u.tagName.toLowerCase();if(d==="iframe"){const f=u.getAttribute("src"),g=u.getAttribute("data-plugin-type");if(f)try{const m=new URL(f);t.includes(m.hostname)?g&&(c={type:g,iframeHtml:u.outerHTML}):u.removeAttribute("src")}catch{u.removeAttribute("src")}}if(d==="a"){u.classList.add("inline-block","w-fit","text-link","underline","visited:text-link-visited");const f=u.getAttribute("href");f&&FL.test(f)&&(u.setAttribute("target","_blank"),u.setAttribute("rel","noreferrer"))}});const h=l.sanitize(e.value,{ADD_TAGS:["iframe"],ADD_ATTR:["src","frameborder","allow","allowfullscreen","target","rel","data-plugin-type","width","height","title","class"]});c?s(c):i(h)}},[e.value,t]),!n)return null;if(o){const{type:l,iframeHtml:c}=o,h=EL(l);if(h)return S.jsx(h,{iframeHtml:c,iFrameAllowedDomains:t});console.warn(`Unknown or unregistered plugin type: ${l}`)}return S.jsx(S.Fragment,{children:r===""?null:S.jsx("div",{dangerouslySetInnerHTML:{__html:r}})})},s0=({node:e})=>{if(!e.url)return null;const t=e.title??"",r=e.data?.hProperties?.width,i=e.data?.hProperties?.height;return S.jsxs("span",{style:{width:r,height:i},className:"mt-4 mb-4 block w-fit max-w-full",children:[S.jsx("img",{src:e.url,alt:e.alt??"",className:"mx-auto h-full w-full",width:r,height:i}),t&&S.jsx("em",{className:"block text-center text-gray-400 text-xs",children:t})]})},o0=({node:e})=>S.jsx("code",{className:"rounded-md bg-gray-200 px-1.5 py-1 font-mono text-gray-800 text-sm dark:bg-gray-700 dark:text-gray-200",children:e.value}),l0=({node:e})=>{const t=J.useRef(null);return J.useLayoutEffect(()=>{try{t.current&&Ic.render(e.value,t.current)}catch(r){console.error("An error occurred while rendering KaTeX:",r),t.current&&(t.current.innerText=`Math rendering error: ${r instanceof Error?r.message:String(r)}`)}},[e.value]),S.jsx("span",{ref:t,className:"rounded-md px-1.5 py-1 font-mono text-gray-800 text-sm dark:text-gray-200"})},PL=/^[a-z][a-z0-9+.-]*:/,c0=({node:e})=>{const t=PL.test(e.url);return S.jsx("a",{className:"inline-block w-fit text-link underline visited:text-link-visited",href:e.url,target:t?"_blank":void 0,rel:t?"noreferrer":void 0,children:S.jsx(Lt,{nodes:e.children})})},h0=({node:e})=>e.children.length===1&&e.children[0].type==="paragraph"?S.jsx("li",{children:S.jsx(Lt,{nodes:e.children[0].children})}):S.jsx("li",{children:S.jsx(Lt,{nodes:e.children})}),u0=({node:e})=>{const t=e.ordered?"ol":"ul";return S.jsx(t,{children:S.jsx(Lt,{nodes:e.children})})},RL=({code:e})=>{const[t,r]=J.useState(!1),i=()=>{navigator.clipboard.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),2e3)},n=>{console.error("Failed to copy: ",n)})};return S.jsx("button",{type:"button",className:"absolute right-2 z-10 rounded-md bg-gray-200 px-2 py-1 text-gray-800 text-xs transition-colors hover:bg-gray-300 dark:bg-gray-700 dark:text-gray-100 dark:hover:bg-gray-600",onClick:i,children:t?"COPIED!":"Copy"})},d0=({node:e})=>{const t=J.useRef(null);return J.useLayoutEffect(()=>{try{t.current&&Ic.render(e.value,t.current)}catch(r){console.error("An error occurred while rendering KaTeX:",r),t.current&&(t.current.innerText=`Math rendering error: ${r instanceof Error?r.message:String(r)}`)}},[e.value]),S.jsxs("div",{className:"relative",children:[S.jsx(RL,{code:e.value}),S.jsx("article",{ref:t,className:"rounded-md px-1.5 py-1 font-mono text-gray-800 text-sm dark:text-gray-200"})]})},f0=({node:e})=>S.jsx("p",{children:S.jsx(Lt,{nodes:e.children})}),p0=({node:e})=>S.jsx("strong",{children:S.jsx(Lt,{nodes:e.children})}),g0=({node:e})=>{const[t,...r]=e.children;return S.jsx("div",{className:"overflow-x-auto",children:S.jsxs("table",{className:"w-full border-collapse border-none",children:[S.jsx("thead",{className:"bg-gray-100 dark:bg-gray-800",children:S.jsx("tr",{children:t.children.map((i,n)=>S.jsx("th",{style:{textAlign:e.align?.[n]??void 0},className:"border border-gray-300 px-4 py-2 text-left font-semibold dark:border-gray-600 dark:text-gray-200",children:S.jsx(Lt,{nodes:i.children})},`mdast-table-node-${e.type}-${n}`))})}),S.jsx("tbody",{children:r.map((i,n)=>S.jsx("tr",{className:"border-gray-200 border-t bg-white dark:border-gray-700 dark:bg-gray-900",children:i.children.map((a,o)=>S.jsx("td",{style:{textAlign:e.align?.[o]??void 0},className:"border border-gray-300 px-4 py-2 dark:border-gray-600 dark:text-gray-300",children:S.jsx(Lt,{nodes:a.children})},`mdast-table-node-${e.type}-${o}`))},`mdast-table-node-${e.type}-${n}`))})]})})},m0=({node:e})=>S.jsx(S.Fragment,{children:e.value}),y0=()=>S.jsx("hr",{className:"border-gray-300 dark:border-gray-600"});let Qi=null;const OL=()=>typeof window>"u"||typeof document>"u"?Promise.resolve(null):Qi||(Qi=new Promise((e,t)=>{if(window.twttr?.widgets)return e(window.twttr.widgets);const r="twitter-wjs",i=()=>{window.twttr?.widgets?e(window.twttr.widgets):t(new Error("Twitter widget script loaded, but `window.twttr.widgets` not found."))},n=document.getElementById(r);if(n){n.addEventListener("load",i),n.addEventListener("error",()=>t(new Error("Failed to load Twitter script.")));return}const a=document.createElement("script");a.id=r,a.src="https://platform.twitter.com/widgets.js",a.async=!0,a.charset="utf-8",a.onload=i,a.onerror=()=>t(new Error("Failed to load Twitter script.")),document.body.appendChild(a)}),Qi),DL=({promise:e})=>(J.use(e),null),NL=({setPromise:e,createPromise:t})=>{const r=J.useRef(null);return J.useEffect(()=>{const i=r.current;if(!i){console.warn("Mount point for Twitter widget not found.");return}const n=t(i).then(a=>{if(!a){console.warn("createPromise から要素が返されませんでした。");return}return a}).catch(a=>{console.error("ツイートウィジェットの作成中にエラーが発生しました:",a),i.innerText=`ツイートの読み込みエラー: ${a.message}`});return e(n),()=>{i.innerHTML=""}},[t,e]),S.jsx("div",{ref:r,className:"twitter-embed min-h-24"})},IL=({node:e,loadWidgetsPromise:t,theme:r})=>{const i=J.use(t),n=J.useRef(null),a=J.useRef(null),[o,s]=J.useState(null),[l,c]=J.useState(null),h=J.useCallback(d=>{let f;return d&&i?new Promise((g,m)=>{n.current=g,a.current=m;const y=new MutationObserver(()=>{d?.querySelector(".twitter-tweet > iframe:last-of-type")?.addEventListener("load",()=>{f&&clearTimeout(f),y?.disconnect(),n.current=null,a.current=null,g(d)},{once:!0,passive:!0,capture:!0})});f=setTimeout(()=>{y.disconnect(),n.current=null,a.current=null,m(new Error("ツイートの作成が 10 秒後にタイムアウトしました。"))},1e4),y.observe(d,{childList:!0,subtree:!0,attributes:!1,characterData:!1}),i?.createTweet(e.tweetId,d,{cards:e.cards,conversation:e.conversation,theme:e.theme||r,width:e.width,align:e.align,lang:e.lang||"ja",dnt:e.dnt}).catch(x=>{f&&clearTimeout(f),y.disconnect(),n.current=null,a.current=null,m(x),console.error("ツイートウィジェットの作成中にエラーが発生しました:",x)})}):new Promise((g,m)=>{console.warn("TweetEmbed: No targetNode or twitterWidgetsJS available."),m(new Error("No targetNode or twitterWidgetsJS available."))})},[i,e.tweetId,e.cards,e.conversation,e.theme,e.width,e.align,e.lang,e.dnt,r]),u=J.useMemo(()=>S.jsx(NL,{setPromise:c,createPromise:h}),[h]);return J.useEffect(()=>(s(u),()=>{n.current&&(n.current(void 0),n.current=null,a.current=null)}),[u]),i?S.jsxs(J.Suspense,{fallback:S.jsx("div",{className:"min-h-24",children:"🌀 Loading Tweet..."}),children:[o,l&&S.jsx(DL,{promise:l})]}):S.jsx("div",{className:"min-h-24",children:"🌀 Loading Twitter renderer..."})},x0=({node:e,theme:t})=>{const r=J.useMemo(()=>OL(),[]);return S.jsx(J.Suspense,{fallback:S.jsx("div",{className:"min-h-24",children:"🌀 Loading Twitter widget..."}),children:S.jsx(IL,{node:e,loadWidgetsPromise:r,theme:t})})},b0=({node:e})=>{const{videoId:t,params:r}=e,i={...r,rel:"0"},n=new URLSearchParams(i).toString();return S.jsx("iframe",{className:"aspect-video w-full max-w-[560px] rounded-lg",src:`https://www.youtube.com/embed/${t}${n?`?${n}`:""}`,title:"YouTube video player",allow:"accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",referrerPolicy:"strict-origin-when-cross-origin",allowFullScreen:!0})},w0=({node:e})=>{const t=e.data?.title||"";return S.jsxs("details",{className:"markdown-details",children:[S.jsx("summary",{children:t}),S.jsx("div",{className:"markdown-details-content",children:S.jsx(Lt,{nodes:e.children})})]})},v0=({node:e})=>{const r=["message",e.data?.messageType||"message"].filter(Boolean).join(" ");return S.jsxs("aside",{className:r,children:[S.jsx("span",{className:"message-symbol",style:{userSelect:"none"},children:"!"}),S.jsx("div",{className:"message-content",children:S.jsx(Lt,{nodes:e.children})})]})},Lt=({nodes:e,theme:t="light",iFrameAllowedDomains:r=[]})=>e.map((i,n)=>{switch(i.type){case"block-link":return S.jsx(Hc,{node:i},`mdast-node-${i.type}-${n}`);case"blockquote":return S.jsx(Yc,{node:i},`mdast-node-${i.type}-${n}`);case"break":return S.jsx("br",{},`mdast-node-${i.type}-${n}`);case"code":return S.jsx(t0,{node:i},`mdast-node-${i.type}-${n}`);case"delete":return S.jsx(e0,{node:i},`mdast-node-${i.type}-${n}`);case"details":return S.jsx(w0,{node:i},`mdast-node-${i.type}-${n}`);case"emphasis":return S.jsx(r0,{node:i},`mdast-node-${i.type}-${n}`);case"footnoteReference":return S.jsx(k0,{node:i},`mdast-node-${i.type}-${n}`);case"footnoteDefinition":return null;case"footnote-back-link":return S.jsx(_0,{node:i},`mdast-node-${i.type}-${n}`);case"heading":return S.jsx(n0,{node:i},`mdast-node-${i.type}-${n}`);case"html":return S.jsx(a0,{node:i,iFrameAllowedDomains:r},`mdast-node-${i.type}-${n}`);case"image":return S.jsx(s0,{node:i},`mdast-node-${i.type}-${n}`);case"inlineCode":return S.jsx(o0,{node:i},`mdast-node-${i.type}-${n}`);case"inlineMath":return S.jsx(l0,{node:i},`mdast-node-${i.type}-${n}`);case"link":return S.jsx(c0,{node:i},`mdast-node-${i.type}-${n}`);case"listItem":return S.jsx(h0,{node:i},`mdast-node-${i.type}-${n}`);case"list":return S.jsx(u0,{node:i},`mdast-node-${i.type}-${n}`);case"math":return S.jsx(d0,{node:i},`mdast-node-${i.type}-${n}`);case"message":return S.jsx(v0,{node:i},`mdast-node-${i.type}-${n}`);case"paragraph":return S.jsx(f0,{node:i},`mdast-node-${i.type}-${n}`);case"strong":return S.jsx(p0,{node:i},`mdast-node-${i.type}-${n}`);case"table":return S.jsx(g0,{node:i},`mdast-node-${i.type}-${n}`);case"text":return S.jsx(m0,{node:i},`mdast-node-${i.type}-${n}`);case"thematicBreak":return S.jsx(y0,{},`mdast-node-${i.type}-${n}`);case"yaml":return null;case"twitter-embed":return S.jsx(x0,{node:i,theme:t},`mdast-node-${i.type}-${i.tweetId}-${n}`);case"youtube-embed":return S.jsx(b0,{node:i},`mdast-node-${i.type}-${n}`);default:{if(process.env.NODE_ENV==="development")return S.jsxs("div",{children:[S.jsxs("p",{style:{color:"red"},children:["Unknown node type: ",i.type]}),S.jsx("pre",{children:JSON.stringify(i,null,2)})]},`mdast-node-${i.type}-${n}`);throw new Error(`Unknown node type: ${i.type}`)}}}),k0=({node:e})=>S.jsx("sup",{children:S.jsxs("a",{id:`fnref-${e.identifier}`,className:"text-[#316dce] underline visited:text-[#6b46c1] dark:text-[#3182ce] dark:visited:text-[#805ad5]",href:`#fn-${e.identifier}`,children:["[",e.identifier,"]"]})}),C0=({nodes:e,theme:t="light"})=>e.length===0?null:S.jsx("section",{className:"border-[#171717] border-t pt-4 dark:border-[#464646]",children:S.jsx("ol",{className:"pl-6 text-[#686868] text-sm dark:text-[#a4a5a9]",children:e.map((r,i)=>S.jsx("li",{id:`fn-${r.identifier}`,className:i===0?"":"mt-4",children:S.jsx(Lt,{nodes:r.children,theme:t})},`mdast-node-fn-${r.identifier}-${i}`))})}),_0=({node:e})=>S.jsx("a",{href:e.url,className:"text-[#316dce] underline visited:text-[#6b46c1] dark:text-[#3182ce] dark:visited:text-[#805ad5]",children:"↩"}),S0=e=>{const t=[];for(const r of e)r.type==="footnoteDefinition"?t.push(r):"children"in r&&t.push(...S0(r.children));return t},zL=({rootNode:e,theme:t="light",iFrameAllowedDomains:r=[]})=>{const i=S0(e.children);return S.jsxs(S.Fragment,{children:[S.jsx(Lt,{nodes:e.children,theme:t,iFrameAllowedDomains:r}),S.jsx(C0,{nodes:i,theme:t})]})};function qL({text:e,url:t,hashtags:r,via:i,related:n,in_reply_to:a}){const o=new URL("https://twitter.com/intent/tweet");return e!==void 0&&o.searchParams.set("text",e),t!==void 0&&o.searchParams.set("url",t),r!==void 0&&o.searchParams.set("hashtags",r.join(",")),i!==void 0&&o.searchParams.set("via",i),n!==void 0&&o.searchParams.set("related",n.join(",")),a!==void 0&&o.searchParams.set("in_reply_to",a),o.toString()}const T0=e=>{try{const t=new URL(e),r=Object.fromEntries(t.searchParams.entries());let i=null;if(t.hostname==="youtu.be"?i=t.pathname.substring(1):t.hostname.endsWith("youtube.com")&&(t.pathname==="/watch"?i=t.searchParams.get("v"):t.pathname.startsWith("/embed/")&&(i=t.pathname.split("/")[2])),i){const{v:n,...a}=r;return{videoId:i,params:a}}return null}catch{return null}},B0=async e=>{try{const t=new AbortController,r=setTimeout(()=>t.abort(),5e3),i=await fetch(e,{signal:t.signal});if(clearTimeout(r),!i.ok)return null;const n=await i.text(),a={url:e},o=K0.load(n),s=o("title").text().trim();a.title=s;const l=o("meta");for(const c of l){const h=c.attribs.property;h==="og:site_name"&&(a.site_name=c.attribs.content||void 0),h==="og:title"&&(a.title=c.attribs.content||s),h==="og:description"&&(a.description=c.attribs.content||void 0),h==="og:image"&&(a.image=c.attribs.content||void 0),h==="og:type"&&(a.type=c.attribs.content||void 0),c.attribs.name==="description"&&(a.description=c.attribs.content||void 0)}return a}catch(t){return console.error("Error fetching site metadata:",t),null}},$0=()=>e=>{St.visit(e,"paragraph",(t,r,i)=>{const n=t.children[0];t.children.length!==1||n.type!=="link"||n.children.length!==1||!(n.children[0].type==="text"&&n.url===n.children[0].value)||!i||r===void 0||(i.children[r]={type:"block-link",url:n.url})})},Qr=new Map,jL=(e,t)=>t.fetchAll?!0:t.urlPatterns&&t.urlPatterns.length>0?t.urlPatterns.some(r=>r.test(e)):/^https?:\/\//.test(e)&&!e.includes("localhost")&&!e.includes("127.0.0.1"),L0=(e={})=>{const{enableCache:t=!0}=e;return async r=>{const i=[];St.visit(r,"block-link",a=>{jL(a.url,e)&&i.push(a)});const n=i.map(async a=>{const o=a.url;if(t&&Qr.has(o)){const s=Qr.get(o);s&&(a.data=a.data||{},a.data.siteMetadata=s);return}try{const s=await B0(o);s?(a.data=a.data||{},a.data.siteMetadata=s,t&&Qr.set(o,s)):t&&Qr.set(o,null)}catch(s){console.warn(`Failed to fetch metadata for ${o}:`,s),t&&Qr.set(o,null)}});await Promise.all(n)}},WL=/\s*\{#(.+?)\}\s*$/,M0=()=>e=>{St.visit(e,"heading",t=>{if(t.children.length===0)return;const r=t.children[t.children.length-1];if(r?.type!=="text")return;const i=r,n=i.value.match(WL);if(n){const a=n[1];t.data||(t.data={});const o=t.data,s=o.hProperties||{};s.id=a,o.hProperties=s,i.value=i.value.substring(0,n.index).trimEnd(),i.value===""&&t.children.pop()}})},A0=()=>e=>{St.visit(e,"footnoteDefinition",t=>{St.visit(t,"paragraph",r=>{r.children.push({type:"footnote-back-link",url:`#fnref-${t.identifier}`})})})},E0=()=>e=>{St.visit(e,"html",(t,r,i)=>{if(typeof r!="number"||!i)return;const a=t.value.trim().match(/^<a\s+href="([^"]+)"[^>]*>(.*?)<\/a>$/i);if(a){const[,o,s]=a,l={type:"link",url:o,children:[{type:"text",value:s}]};i.children.splice(r,1,l)}})},F0=()=>e=>{const t=r=>{const i=r.children;if(!i)return;let n=0;for(;n<i.length;){const a=i[n];if(a.type==="html"&&a.value.startsWith("<")&&!a.value.startsWith("</")&&a.value.match(/<([a-zA-Z0-9]+)/)){let s="",l=0;const c=[];let h=!1;for(let u=n;u<i.length;u++){const d=i[u];if(d.type==="html"){s+=d.value;const f=d.value.match(/<\/?([a-zA-Z0-9]+)/g)||[];for(const g of f){const m=g.match(/<\/?([a-zA-Z0-9]+)/);if(!m)continue;const y=m[1];g.startsWith("</")?c.length>0&&c[c.length-1]===y&&c.pop():g.startsWith("<")&&c.push(y)}}else if(d.type==="text")s+=d.value;else{c.length===0&&(h=!0);break}if(l++,c.length===0){h=!0;break}}h&&i.splice(n,l,{type:"html",value:s})}n++}};St.visit(e,"paragraph",t),St.visit(e,"tableCell",t),St.visit(e,"heading",t),St.visit(e,"emphasis",t),St.visit(e,"strong",t),St.visit(e,"delete",t)},Dc=/\s*=\s*(\d+)(w|h|x|y)\s*/g,P0=()=>e=>{St.visit(e,"image",t=>{const r=l=>{if(!l)return{updatedText:l,matches:[]};const c=[...l.matchAll(Dc)];return{updatedText:l.replaceAll(Dc,"").trim(),matches:c}},{updatedText:i,matches:n}=r(t.alt);t.alt=i;const{updatedText:a,matches:o}=r(t.title);t.title=a||null;const s=[...n,...o];if(s.length>0){t.data||(t.data={}),t.data.hProperties||(t.data.hProperties={});for(const l of s){const c=Number.parseInt(l[1],10),h=l[2];h==="w"||h==="x"?t.data.hProperties.width=c:(h==="h"||h==="y")&&(t.data.hProperties.height=c)}}})},HL=/<!--\s+@import\s+"(.+?)"\s+-->/;function R0(e){return async t=>{const{markdownFilePath:r}=e,i=ur.dirname(r),n=[];if(St.visit(t,"html",(o,s,l)=>{if(!l||typeof s!="number")return;const c=o.value.match(HL);if(!c)return;const h=c[1],u=ur.resolve(i,h);n.push({parent:l,index:s,absolutePath:u})}),n.length===0)return;const a=await Promise.all(n.map(async({absolutePath:o})=>{try{const s=await zc.readFile(o,"utf-8");return this.parse(s)}catch(s){return s&&s.code==="ENOENT"?console.warn(`[remark-import-directive] Import file not found: ${o}`):console.error(`[remark-import-directive] Error processing import: ${o}`,s),null}}));for(let o=n.length-1;o>=0;o--){const{parent:s,index:l}=n[o],c=a[o];c?.children&&Array.isArray(c.children)&&s.children.splice(l,1,...c.children)}}}const O0=()=>e=>{St.visit(e,(t,r,i)=>{i&&Object.defineProperty(t,"parent",{value:i,writable:!0,configurable:!0,enumerable:!1})})},YL=/^[a-z][a-z0-9+.-]*:/,D0=async(e,t,r,i,n=!1)=>{if(!e)return"";if(YL.test(e)){const c=e.substring(0,e.indexOf(":")).toLowerCase();if(["http","https","mailto","tel","file"].includes(c))return e}if(e.startsWith("#")||e.startsWith("/"))return e;const a=ur.dirname(r),o=ur.normalize(ur.join(a,e)),s=ur.resolve(i,o);if(!s.startsWith(i)||o.startsWith(".."))return console.error(`Security Alert: Attempt to access file outside project root: ${s}`),"";if(n)try{await zc.access(s)}catch{return console.warn(`File not found: ${s}`),""}const l=o.replace(/\\/g,"/");return t?Q0("/assets/",l):`?filePath=${encodeURIComponent(l)}`};function N0(e){return async t=>{if(!(e?.markdownFilePath&&e?.workspaceRoot)){console.warn("remark-resolve-uri-async: markdownFilePath and workspaceRoot are required. Skipping URI resolution.");return}const r=[];St.visit(t,n=>{(n.type==="image"||n.type==="link")&&n.url&&r.push({node:n,isImage:n.type==="image"})});const i=r.map(async({node:n,isImage:a})=>{const o=await D0(n.url,a,e.markdownFilePath,e.workspaceRoot,e.validateExistence);n.url=o});await Promise.all(i)}}const UL=/https?:\/\/(?:www\.|mobile\.)?(?:twitter|x)\.com\/[^/]+\/status\/(\d+)/,I0=()=>e=>{St.visit(e,"paragraph",(t,r,i)=>{const n=t.children[0];if(t.children.length!==1||n.type!=="link"||!n.children.every(l=>l.type==="text")||!i||r===void 0)return;const o=n.url.match(UL);if(!o)return;const s=o[1];s&&(i.children[r]={type:"twitter-embed",tweetId:s})})},z0=()=>e=>{St.visit(e,"paragraph",(t,r,i)=>{const n=t.children[0];if(t.children.length!==1||n.type!=="link"||!n.children.every(s=>s.type==="text")||!i||r===void 0)return;const o=T0(n.url);o&&(i.children[r]={type:"youtube-embed",videoId:o.videoId,params:o.params})})},Nc=/^:::(message|details)\s*(.*)/,q0=()=>e=>{function t(r){const i=[];let n=0;for(;n<r.length;){const a=r[n];if(a.type==="paragraph"&&a.children[0]?.type==="text"&&a.children[0].value.trim().startsWith(":::")){const l=a.children[0].value.trim().match(Nc);if(l){const c=n;let h=-1,u=1;const d=a.children.at(-1);if(a.children.length>1&&d?.type==="text"&&d.value.trim()===":::")h=c;else for(let f=c+1;f<r.length;f++){const g=r[f];if(g.type==="paragraph"&&g.children[0]?.type==="text"){const m=g.children[0].value.trim();Nc.test(m)?u++:m===":::"&&u--}if(u===0){h=f;break}}if(h!==-1){const f=l[1],g=l[2];let m;if(h===c){const b=a.children.slice(1,-1);b[0]?.type==="break"&&b.shift(),b.at(-1)?.type==="break"&&b.pop(),m=b.length>0?[{type:"paragraph",children:b}]:[]}else{const b=a.children.slice(1);b[0]?.type==="break"&&b.shift();const w={type:"paragraph",children:b},v=r[h].children.slice(0,-1);v.at(-1)?.type==="break"&&v.pop();const L={type:"paragraph",children:v},T=r.slice(c+1,h);m=[w,...T,L].filter(D=>!(D.type==="paragraph"&&D.children.length===0))}const y=t(m);let x;if(f==="message"?x={type:"message",data:{messageType:g.trim()},children:y}:f==="details"&&(x={type:"details",data:{title:g.trim()},children:y}),x){i.push(x),n=h+1;continue}}}}const o={...a};"children"in o&&Array.isArray(o.children)&&(o.type==="blockquote"||o.type==="footnoteDefinition"||o.type==="message"||o.type==="details"?o.children=t(o.children):o.type==="list"&&(o.children=o.children.map(s=>({...s,children:t(s.children)})))),i.push(o),n++}return i}e.children=t(e.children)},GL=async(e,t,r)=>{const i=J0.remark().use(F0).use(E0).use(O0).use(A0).use(ey).use(ty).use(P0).use(q0).use(iy).use(R0,{markdownFilePath:t}).use(I0).use(z0).use($0).use(L0).use(M0).use(ry).use(N0,{markdownFilePath:t,workspaceRoot:r,validateExistence:!0}),n=i.parse(e);return await i.run(n)};exports.BlockLinkNode=Hc;exports.BlockquoteNode=Yc;exports.CodeNode=t0;exports.Color=te;exports.Color$1=Or;exports.DeleteNode=e0;exports.EmphasisNode=r0;exports.FootnoteBackLinkNode=_0;exports.FootnoteReferenceNode=k0;exports.FootnotesSection=C0;exports.HTMLNode=a0;exports.HeadingNode=n0;exports.ImageNode=s0;exports.InlineCodeNode=o0;exports.InlineMathNode=l0;exports.JSON_SCHEMA=af;exports.LinkNode=c0;exports.ListItemNode=h0;exports.ListNode=u0;exports.MapCache=ke;exports.MarkdownRenderer=zL;exports.MathNode=d0;exports.MermaidDiagram=Jm;exports.NodesRenderer=Lt;exports.ParagraphNode=f0;exports.Rgb=Dt;exports.RichLinkCard=Wc;exports.Set=Un;exports.Stack=sr;exports.StrongNode=p0;exports.Symbol=ki;exports.TableNode=g0;exports.TextNode=m0;exports.ThematicBreakNode=y0;exports.TwitterEmbedNode=x0;exports.Uint8Array=Es;exports.Utils=at;exports.YouTubeEmbedNode=b0;exports.ZERO_WIDTH_SPACE=Of;exports.ZennDetailsNode=w0;exports.ZennMessageNode=v0;exports.__export=Qc;exports.__name=p;exports.abs=H2;exports.acos=Q2;exports.array=Qh;exports.arrayLikeKeys=Bf;exports.asin=J2;exports.assignValue=Sf;exports.assignWithDepth_default=bt;exports.atan2=Y2;exports.baseAssignValue=fa;exports.baseFor=uf;exports.baseGetTag=ir;exports.baseKeys=cm;exports.baseRest=Ef;exports.baseUnary=Cf;exports.calculateMathMLDimensions=mx;exports.calculateTextHeight=jo;exports.calculateTextWidth=le;exports.cleanAndMerge=ma;exports.clear=mh;exports.clear$1=qS;exports.clear$2=xS;exports.clear2=DS;exports.cloneArrayBuffer=pf;exports.cloneBuffer=ff;exports.cloneTypedArray=gf;exports.color=$r;exports.commonDb_exports=oo;exports.common_default=rr;exports.computeDimensionOfText=xp;exports.configureSvgSize=so;exports.constant=Ne;exports.constant$1=Mf;exports.constant$2=ea;exports.copyArray=mf;exports.copyObject=Tf;exports.cos=U2;exports.createAssigner=Pf;exports.createIntentTweetLink=qL;exports.createText=Ce;exports.curveBasis=ui;exports.darken=et;exports.dayjs2=Zc;exports.decodeEntities=Fe;exports.defaultConfig2=Sx;exports.defaultConfig_default=ao;exports.define=ta;exports.distExports=lf;exports.epsilon=ps;exports.eq=Ei;exports.evaluate=wt;exports.extend=mo;exports.extractYouTubeVideoId=T0;exports.fetchSiteMetadata=B0;exports.generateId=jf;exports.getAccDescription=wh;exports.getAccTitle=xh;exports.getConfig=$t;exports.getConfig2=ut;exports.getDefaultExportFromCjs=qc;exports.getDiagramTitle=kh;exports.getEdgeId=HC;exports.getFaviconUrl=jc;exports.getIconSVG=zr;exports.getLineFunctionsWithOffset=of;exports.getPrototype=Fo;exports.getRegisteredLayoutAlgorithm=dT;exports.getStylesFromArray=qo;exports.getSubGraphTitleMargins=ca;exports.getThemeVariables3=nh;exports.getUrl=ph;exports.getUserDefinedConfig=ax;exports.halfPi=gs;exports.hasKatex=Ze;exports.hue=v1;exports.identity=Do;exports.initCloneObject=xf;exports.insertCluster=Mp;exports.insertEdge=Qg;exports.insertEdgeLabel=Vg;exports.insertNode=sl;exports.interpolateNumber=me;exports.interpolateRgb=ss;exports.interpolateString=zh;exports.isArguments=Si;exports.isArray=Ti;exports.isArrayLike=Pi;exports.isArrayLikeObject=wf;exports.isBuffer=pa;exports.isDark=Pr;exports.isEmpty=Ks;exports.isFunction=ha;exports.isIndex=Ro;exports.isIterateeCall=Ff;exports.isLabelStyle=Eo;exports.isLength=Po;exports.isObject=Ee;exports.isObjectLike=Ir;exports.isPrototype=Fi;exports.isTypedArray=ga;exports.isValidShape=Xg;exports.keysIn=Oo;exports.lighten=X;exports.line=tu;exports.lineBreakRegex=Rr;exports.load=sf;exports.log=N;exports.markers_default=em;exports.max=G2;exports.memoize=Nr;exports.merge=Rf;exports.min=X2;exports.nodeUtil=Fs;exports.nogamma=yo;exports.overRest=Lf;exports.package_default=Ka;exports.parseFontSize=Ri;exports.parseGenericTypes=ts;exports.parseMarkdown=GL;exports.pi=na;exports.positionEdgeLabel=Zg;exports.positionNode=NS;exports.random=Hf;exports.registerIconPacks=lp;exports.remarkBlockLink=$0;exports.remarkBlockLinkMetadata=L0;exports.remarkCustomHeadingId=M0;exports.remarkFootnoteBackLink=A0;exports.remarkHtmlAnchorToLink=E0;exports.remarkHtmlInHtml=F0;exports.remarkImageSize=P0;exports.remarkImportDirective=R0;exports.remarkParentNode=O0;exports.remarkResolveUriAsync=N0;exports.remarkTwitterEmbed=I0;exports.remarkYouTubeEmbed=z0;exports.remarkZennMessage=q0;exports.render=uT;exports.renderKatexSanitized=Qn;exports.replaceIconSubstring=el;exports.rgbConvert=Dh;exports.rgba=gr;exports.sanitizeText=Ht;exports.select=lt;exports.selectSvgElement=ku;exports.setAccDescription=bh;exports.setAccTitle=yh;exports.setConfig2=_x;exports.setDiagramTitle=vh;exports.setNodeElem=OS;exports.setToString=Af;exports.setupGraphViewbox=gh;exports.setupGraphViewbox2=Ch;exports.sin=V2;exports.sqrt=Z2;exports.styles2String=V;exports.tau=K2;exports.transformUriAsync=D0;exports.unknownIcon=sp;exports.updateNodeBounds=Q;exports.utils_default=Gt;exports.withPath=Kh;exports.wrapLabel=Yf;
|
|
311
|
+
//# sourceMappingURL=index-DSNpXrO0.cjs.map
|