@aiquants/markdown 1.5.0 → 1.6.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/README.md +67 -13
- package/dist/arc-BoCDCi7a.js +84 -0
- package/dist/{arc-CEt7sPHR.js.map → arc-BoCDCi7a.js.map} +1 -1
- package/dist/{arc-DIzHZzU-.cjs → arc-De-Zv-A5.cjs} +2 -2
- package/dist/{arc-DIzHZzU-.cjs.map → arc-De-Zv-A5.cjs.map} +1 -1
- package/dist/{architectureDiagram-3BPJPVTR-BwXrmOEe.js → architectureDiagram-3BPJPVTR--B7uWkzb.js} +3 -3
- package/dist/{architectureDiagram-3BPJPVTR-BwXrmOEe.js.map → architectureDiagram-3BPJPVTR--B7uWkzb.js.map} +1 -1
- package/dist/{architectureDiagram-3BPJPVTR-BObLtWhv.cjs → architectureDiagram-3BPJPVTR-BU8vezuK.cjs} +2 -2
- package/dist/{architectureDiagram-3BPJPVTR-BObLtWhv.cjs.map → architectureDiagram-3BPJPVTR-BU8vezuK.cjs.map} +1 -1
- package/dist/{blockDiagram-GPEHLZMM-DlSz5bgX.cjs → blockDiagram-GPEHLZMM-BgMaQKJL.cjs} +2 -2
- package/dist/{blockDiagram-GPEHLZMM-DlSz5bgX.cjs.map → blockDiagram-GPEHLZMM-BgMaQKJL.cjs.map} +1 -1
- package/dist/{blockDiagram-GPEHLZMM-CuNIZgrH.js → blockDiagram-GPEHLZMM-D9Qu4RmQ.js} +4 -4
- package/dist/{blockDiagram-GPEHLZMM-CuNIZgrH.js.map → blockDiagram-GPEHLZMM-D9Qu4RmQ.js.map} +1 -1
- package/dist/{c4Diagram-AAUBKEIU-yYGK7jpN.js → c4Diagram-AAUBKEIU-B_S1FVg0.js} +3 -3
- package/dist/{c4Diagram-AAUBKEIU-yYGK7jpN.js.map → c4Diagram-AAUBKEIU-B_S1FVg0.js.map} +1 -1
- package/dist/{c4Diagram-AAUBKEIU-BeW_zC3n.cjs → c4Diagram-AAUBKEIU-DdYus-OD.cjs} +2 -2
- package/dist/{c4Diagram-AAUBKEIU-BeW_zC3n.cjs.map → c4Diagram-AAUBKEIU-DdYus-OD.cjs.map} +1 -1
- package/dist/channel-CL-Jpcy1.cjs +2 -0
- package/dist/{channel-DJV0Dpb7.cjs.map → channel-CL-Jpcy1.cjs.map} +1 -1
- package/dist/channel-K4LsZJQ3.js +6 -0
- package/dist/{channel-D_k9IBco.js.map → channel-K4LsZJQ3.js.map} +1 -1
- package/dist/{chunk-2J33WTMH-_yO_LcWk.js → chunk-2J33WTMH-DRQXzgFz.js} +5 -5
- package/dist/{chunk-2J33WTMH-_yO_LcWk.js.map → chunk-2J33WTMH-DRQXzgFz.js.map} +1 -1
- package/dist/{chunk-2J33WTMH-Cowi4nma.cjs → chunk-2J33WTMH-DwPHxvbM.cjs} +2 -2
- package/dist/{chunk-2J33WTMH-Cowi4nma.cjs.map → chunk-2J33WTMH-DwPHxvbM.cjs.map} +1 -1
- package/dist/{chunk-4BX2VUAB-Bfs3RK7t.js → chunk-4BX2VUAB-D9XJDecT.js} +2 -2
- package/dist/{chunk-4BX2VUAB-Bfs3RK7t.js.map → chunk-4BX2VUAB-D9XJDecT.js.map} +1 -1
- package/dist/{chunk-4BX2VUAB-CvWrfkZa.cjs → chunk-4BX2VUAB-dlb1zwjz.cjs} +2 -2
- package/dist/{chunk-4BX2VUAB-CvWrfkZa.cjs.map → chunk-4BX2VUAB-dlb1zwjz.cjs.map} +1 -1
- package/dist/chunk-55IACEB6-D6SBdsxQ.js +9 -0
- package/dist/{chunk-55IACEB6-DJuAcFli.js.map → chunk-55IACEB6-D6SBdsxQ.js.map} +1 -1
- package/dist/{chunk-55IACEB6-B0mU27TO.cjs → chunk-55IACEB6-DsigtXV5.cjs} +2 -2
- package/dist/{chunk-55IACEB6-B0mU27TO.cjs.map → chunk-55IACEB6-DsigtXV5.cjs.map} +1 -1
- package/dist/{chunk-727SXJPM-CVzH4wV5.js → chunk-727SXJPM-BPMnljJt.js} +6 -6
- package/dist/{chunk-727SXJPM-CVzH4wV5.js.map → chunk-727SXJPM-BPMnljJt.js.map} +1 -1
- package/dist/{chunk-727SXJPM-B5m5LYHV.cjs → chunk-727SXJPM-e9WFwXOz.cjs} +2 -2
- package/dist/{chunk-727SXJPM-B5m5LYHV.cjs.map → chunk-727SXJPM-e9WFwXOz.cjs.map} +1 -1
- package/dist/{chunk-AQP2D5EJ-BQmegdYZ.js → chunk-AQP2D5EJ-BpywKue8.js} +24 -24
- package/dist/{chunk-AQP2D5EJ-BQmegdYZ.js.map → chunk-AQP2D5EJ-BpywKue8.js.map} +1 -1
- package/dist/{chunk-AQP2D5EJ-D8g3xVfY.cjs → chunk-AQP2D5EJ-CfVceSH6.cjs} +2 -2
- package/dist/{chunk-AQP2D5EJ-D8g3xVfY.cjs.map → chunk-AQP2D5EJ-CfVceSH6.cjs.map} +1 -1
- package/dist/{chunk-FMBD7UC4-DOp7_K1e.cjs → chunk-FMBD7UC4-BGnaELVV.cjs} +2 -2
- package/dist/{chunk-FMBD7UC4-DOp7_K1e.cjs.map → chunk-FMBD7UC4-BGnaELVV.cjs.map} +1 -1
- package/dist/{chunk-FMBD7UC4-A9cVBrbN.js → chunk-FMBD7UC4-Ceyg9OFV.js} +2 -2
- package/dist/{chunk-FMBD7UC4-A9cVBrbN.js.map → chunk-FMBD7UC4-Ceyg9OFV.js.map} +1 -1
- package/dist/{chunk-ND2GUHAM-D25Z9Pku.cjs → chunk-ND2GUHAM-Di1_ImUP.cjs} +2 -2
- package/dist/{chunk-ND2GUHAM-D25Z9Pku.cjs.map → chunk-ND2GUHAM-Di1_ImUP.cjs.map} +1 -1
- package/dist/{chunk-ND2GUHAM-zG18UJLV.js → chunk-ND2GUHAM-_KS2U3Xd.js} +2 -2
- package/dist/{chunk-ND2GUHAM-zG18UJLV.js.map → chunk-ND2GUHAM-_KS2U3Xd.js.map} +1 -1
- package/dist/{chunk-QZHKN3VN-CzUmAQ1N.cjs → chunk-QZHKN3VN-37Dnf6ph.cjs} +2 -2
- package/dist/{chunk-QZHKN3VN-CzUmAQ1N.cjs.map → chunk-QZHKN3VN-37Dnf6ph.cjs.map} +1 -1
- package/dist/{chunk-QZHKN3VN-TMR0u28S.js → chunk-QZHKN3VN-BmwSf22H.js} +2 -2
- package/dist/{chunk-QZHKN3VN-TMR0u28S.js.map → chunk-QZHKN3VN-BmwSf22H.js.map} +1 -1
- package/dist/{classDiagram-4FO5ZUOK-B6q8R48h.js → classDiagram-4FO5ZUOK-BWqlCTLp.js} +3 -3
- package/dist/{classDiagram-4FO5ZUOK-B6q8R48h.js.map → classDiagram-4FO5ZUOK-BWqlCTLp.js.map} +1 -1
- package/dist/{classDiagram-4FO5ZUOK-AWKMUU6E.cjs → classDiagram-4FO5ZUOK-C4BU4T62.cjs} +2 -2
- package/dist/{classDiagram-4FO5ZUOK-AWKMUU6E.cjs.map → classDiagram-4FO5ZUOK-C4BU4T62.cjs.map} +1 -1
- package/dist/{classDiagram-v2-Q7XG4LA2-B6q8R48h.js → classDiagram-v2-Q7XG4LA2-BWqlCTLp.js} +3 -3
- package/dist/{classDiagram-v2-Q7XG4LA2-B6q8R48h.js.map → classDiagram-v2-Q7XG4LA2-BWqlCTLp.js.map} +1 -1
- package/dist/{classDiagram-v2-Q7XG4LA2-AWKMUU6E.cjs → classDiagram-v2-Q7XG4LA2-C4BU4T62.cjs} +2 -2
- package/dist/{classDiagram-v2-Q7XG4LA2-AWKMUU6E.cjs.map → classDiagram-v2-Q7XG4LA2-C4BU4T62.cjs.map} +1 -1
- package/dist/{cose-bilkent-S5V4N54A-CmOvtbW1.js → cose-bilkent-S5V4N54A-XubnkySi.js} +25 -25
- package/dist/{cose-bilkent-S5V4N54A-CmOvtbW1.js.map → cose-bilkent-S5V4N54A-XubnkySi.js.map} +1 -1
- package/dist/{cose-bilkent-S5V4N54A-Be0WGYzv.cjs → cose-bilkent-S5V4N54A-i82zh9MZ.cjs} +2 -2
- package/dist/{cose-bilkent-S5V4N54A-Be0WGYzv.cjs.map → cose-bilkent-S5V4N54A-i82zh9MZ.cjs.map} +1 -1
- package/dist/{dagre-BM42HDAG-Cj9S9AJL.cjs → dagre-BM42HDAG-BnI0bbQQ.cjs} +2 -2
- package/dist/{dagre-BM42HDAG-Cj9S9AJL.cjs.map → dagre-BM42HDAG-BnI0bbQQ.cjs.map} +1 -1
- package/dist/{dagre-BM42HDAG-BdMc_uQ_.js → dagre-BM42HDAG-dbwMNqTJ.js} +20 -20
- package/dist/{dagre-BM42HDAG-BdMc_uQ_.js.map → dagre-BM42HDAG-dbwMNqTJ.js.map} +1 -1
- package/dist/{diagram-2AECGRRQ-BoIVObSX.js → diagram-2AECGRRQ-Dq3jgteK.js} +9 -9
- package/dist/{diagram-2AECGRRQ-BoIVObSX.js.map → diagram-2AECGRRQ-Dq3jgteK.js.map} +1 -1
- package/dist/{diagram-2AECGRRQ-pClFOcCf.cjs → diagram-2AECGRRQ-LK0WewmW.cjs} +2 -2
- package/dist/{diagram-2AECGRRQ-pClFOcCf.cjs.map → diagram-2AECGRRQ-LK0WewmW.cjs.map} +1 -1
- package/dist/{diagram-5GNKFQAL-B4QZF1L-.cjs → diagram-5GNKFQAL-Cjn8C55h.cjs} +2 -2
- package/dist/{diagram-5GNKFQAL-B4QZF1L-.cjs.map → diagram-5GNKFQAL-Cjn8C55h.cjs.map} +1 -1
- package/dist/{diagram-5GNKFQAL-CF9CayfA.js → diagram-5GNKFQAL-Dee1SqZg.js} +23 -23
- package/dist/{diagram-5GNKFQAL-CF9CayfA.js.map → diagram-5GNKFQAL-Dee1SqZg.js.map} +1 -1
- package/dist/{diagram-KO2AKTUF-DpJGYqyH.js → diagram-KO2AKTUF-CrPdYBLO.js} +14 -14
- package/dist/{diagram-KO2AKTUF-DpJGYqyH.js.map → diagram-KO2AKTUF-CrPdYBLO.js.map} +1 -1
- package/dist/{diagram-KO2AKTUF-OcgLlHLQ.cjs → diagram-KO2AKTUF-DoIuQ47y.cjs} +2 -2
- package/dist/{diagram-KO2AKTUF-OcgLlHLQ.cjs.map → diagram-KO2AKTUF-DoIuQ47y.cjs.map} +1 -1
- package/dist/{diagram-LMA3HP47-E2tXDlPZ.js → diagram-LMA3HP47-B04Q5TTr.js} +12 -12
- package/dist/{diagram-LMA3HP47-E2tXDlPZ.js.map → diagram-LMA3HP47-B04Q5TTr.js.map} +1 -1
- package/dist/{diagram-LMA3HP47-DLDXNgwR.cjs → diagram-LMA3HP47-DMo-Du0O.cjs} +2 -2
- package/dist/{diagram-LMA3HP47-DLDXNgwR.cjs.map → diagram-LMA3HP47-DMo-Du0O.cjs.map} +1 -1
- package/dist/{diagram-OG6HWLK6-D39m55l2.cjs → diagram-OG6HWLK6-CYAVH4wV.cjs} +2 -2
- package/dist/{diagram-OG6HWLK6-D39m55l2.cjs.map → diagram-OG6HWLK6-CYAVH4wV.cjs.map} +1 -1
- package/dist/{diagram-OG6HWLK6-DrX6SniD.js → diagram-OG6HWLK6-DttOCE5a.js} +31 -31
- package/dist/{diagram-OG6HWLK6-DrX6SniD.js.map → diagram-OG6HWLK6-DttOCE5a.js.map} +1 -1
- package/dist/{erDiagram-TEJ5UH35-DHpUNAJP.cjs → erDiagram-TEJ5UH35-Od4ZN_Jj.cjs} +2 -2
- package/dist/{erDiagram-TEJ5UH35-DHpUNAJP.cjs.map → erDiagram-TEJ5UH35-Od4ZN_Jj.cjs.map} +1 -1
- package/dist/{erDiagram-TEJ5UH35-Dv81-v_G.js → erDiagram-TEJ5UH35-l6r2moWp.js} +13 -13
- package/dist/{erDiagram-TEJ5UH35-Dv81-v_G.js.map → erDiagram-TEJ5UH35-l6r2moWp.js.map} +1 -1
- package/dist/extractHeadings-BCDkDiAF.cjs +306 -0
- package/dist/extractHeadings-BCDkDiAF.cjs.map +1 -0
- package/dist/{extractHeadings-BIH0osfd.js → extractHeadings-CvNjLb_I.js} +7799 -6950
- package/dist/extractHeadings-CvNjLb_I.js.map +1 -0
- package/dist/{flowDiagram-I6XJVG4X-ClmjxIFB.js → flowDiagram-I6XJVG4X-BSY6idek.js} +22 -22
- package/dist/{flowDiagram-I6XJVG4X-ClmjxIFB.js.map → flowDiagram-I6XJVG4X-BSY6idek.js.map} +1 -1
- package/dist/{flowDiagram-I6XJVG4X-DYouWDNV.cjs → flowDiagram-I6XJVG4X-DqFjV_FQ.cjs} +2 -2
- package/dist/{flowDiagram-I6XJVG4X-DYouWDNV.cjs.map → flowDiagram-I6XJVG4X-DqFjV_FQ.cjs.map} +1 -1
- package/dist/{ganttDiagram-6RSMTGT7-Me5Zb7D7.cjs → ganttDiagram-6RSMTGT7-Ch-is2L9.cjs} +2 -2
- package/dist/{ganttDiagram-6RSMTGT7-Me5Zb7D7.cjs.map → ganttDiagram-6RSMTGT7-Ch-is2L9.cjs.map} +1 -1
- package/dist/{ganttDiagram-6RSMTGT7-BA96mVrd.js → ganttDiagram-6RSMTGT7-NbUTajI9.js} +114 -114
- package/dist/{ganttDiagram-6RSMTGT7-BA96mVrd.js.map → ganttDiagram-6RSMTGT7-NbUTajI9.js.map} +1 -1
- package/dist/{gitGraphDiagram-PVQCEYII-DyCea4nE.js → gitGraphDiagram-PVQCEYII-BON2AIjh.js} +4 -4
- package/dist/{gitGraphDiagram-PVQCEYII-DyCea4nE.js.map → gitGraphDiagram-PVQCEYII-BON2AIjh.js.map} +1 -1
- package/dist/{gitGraphDiagram-PVQCEYII-D9wpFJGN.cjs → gitGraphDiagram-PVQCEYII-CsKS4JsX.cjs} +2 -2
- package/dist/{gitGraphDiagram-PVQCEYII-D9wpFJGN.cjs.map → gitGraphDiagram-PVQCEYII-CsKS4JsX.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.client.cjs +1 -1
- package/dist/index.client.js +43 -39
- package/dist/index.client.js.map +1 -1
- package/dist/index.js +43 -39
- package/dist/index.js.map +1 -1
- package/dist/index.server.cjs +1 -1
- package/dist/index.server.cjs.map +1 -1
- package/dist/index.server.js +303 -372
- package/dist/index.server.js.map +1 -1
- package/dist/{infoDiagram-5YYISTIA-Bm90rqIU.js → infoDiagram-5YYISTIA-D9ZSyMlU.js} +8 -8
- package/dist/{infoDiagram-5YYISTIA-Bm90rqIU.js.map → infoDiagram-5YYISTIA-D9ZSyMlU.js.map} +1 -1
- package/dist/{infoDiagram-5YYISTIA-CFhVEX_s.cjs → infoDiagram-5YYISTIA-DPFwfg1u.cjs} +2 -2
- package/dist/{infoDiagram-5YYISTIA-CFhVEX_s.cjs.map → infoDiagram-5YYISTIA-DPFwfg1u.cjs.map} +1 -1
- package/dist/{ishikawaDiagram-YF4QCWOH-ClcY08Tk.cjs → ishikawaDiagram-YF4QCWOH-7n8wfnaJ.cjs} +2 -2
- package/dist/{ishikawaDiagram-YF4QCWOH-ClcY08Tk.cjs.map → ishikawaDiagram-YF4QCWOH-7n8wfnaJ.cjs.map} +1 -1
- package/dist/{ishikawaDiagram-YF4QCWOH-Dn_SmX9S.js → ishikawaDiagram-YF4QCWOH-Bwmaj36v.js} +23 -23
- package/dist/{ishikawaDiagram-YF4QCWOH-Dn_SmX9S.js.map → ishikawaDiagram-YF4QCWOH-Bwmaj36v.js.map} +1 -1
- package/dist/{journeyDiagram-JHISSGLW-DGgZLT-L.cjs → journeyDiagram-JHISSGLW-CU1EWMDk.cjs} +2 -2
- package/dist/{journeyDiagram-JHISSGLW-DGgZLT-L.cjs.map → journeyDiagram-JHISSGLW-CU1EWMDk.cjs.map} +1 -1
- package/dist/{journeyDiagram-JHISSGLW-CoQTbK-P.js → journeyDiagram-JHISSGLW-Cs1W2gPR.js} +14 -14
- package/dist/{journeyDiagram-JHISSGLW-CoQTbK-P.js.map → journeyDiagram-JHISSGLW-Cs1W2gPR.js.map} +1 -1
- package/dist/{kanban-definition-UN3LZRKU-UqgCo7Db.js → kanban-definition-UN3LZRKU-BPKrIETE.js} +37 -37
- package/dist/{kanban-definition-UN3LZRKU-UqgCo7Db.js.map → kanban-definition-UN3LZRKU-BPKrIETE.js.map} +1 -1
- package/dist/{kanban-definition-UN3LZRKU-5akhNSgA.cjs → kanban-definition-UN3LZRKU-BaNd7N3-.cjs} +2 -2
- package/dist/{kanban-definition-UN3LZRKU-5akhNSgA.cjs.map → kanban-definition-UN3LZRKU-BaNd7N3-.cjs.map} +1 -1
- package/dist/{linear-D3Fuq7G8.js → linear-ChMxHyCK.js} +32 -32
- package/dist/{linear-D3Fuq7G8.js.map → linear-ChMxHyCK.js.map} +1 -1
- package/dist/{linear-CwRbgLja.cjs → linear-DZcdO2vJ.cjs} +2 -2
- package/dist/{linear-CwRbgLja.cjs.map → linear-DZcdO2vJ.cjs.map} +1 -1
- package/dist/markdown.css +1 -1
- package/dist/{mindmap-definition-RKZ34NQL-Bii9VbaK.js → mindmap-definition-RKZ34NQL-C8nxZGNS.js} +77 -77
- package/dist/{mindmap-definition-RKZ34NQL-Bii9VbaK.js.map → mindmap-definition-RKZ34NQL-C8nxZGNS.js.map} +1 -1
- package/dist/{mindmap-definition-RKZ34NQL-DXADpvuA.cjs → mindmap-definition-RKZ34NQL-DChglGn7.cjs} +2 -2
- package/dist/{mindmap-definition-RKZ34NQL-DXADpvuA.cjs.map → mindmap-definition-RKZ34NQL-DChglGn7.cjs.map} +1 -1
- package/dist/{pieDiagram-4H26LBE5-IxhnJJ7L.js → pieDiagram-4H26LBE5-CV6cejpg.js} +36 -36
- package/dist/{pieDiagram-4H26LBE5-IxhnJJ7L.js.map → pieDiagram-4H26LBE5-CV6cejpg.js.map} +1 -1
- package/dist/{pieDiagram-4H26LBE5-fogswTcl.cjs → pieDiagram-4H26LBE5-md6Jk-kX.cjs} +2 -2
- package/dist/{pieDiagram-4H26LBE5-fogswTcl.cjs.map → pieDiagram-4H26LBE5-md6Jk-kX.cjs.map} +1 -1
- package/dist/{quadrantDiagram-W4KKPZXB-BVTHzx2l.cjs → quadrantDiagram-W4KKPZXB-BiJ3bFZn.cjs} +2 -2
- package/dist/{quadrantDiagram-W4KKPZXB-BVTHzx2l.cjs.map → quadrantDiagram-W4KKPZXB-BiJ3bFZn.cjs.map} +1 -1
- package/dist/{quadrantDiagram-W4KKPZXB-C8_GeFoe.js → quadrantDiagram-W4KKPZXB-CWoZo1iQ.js} +5 -5
- package/dist/{quadrantDiagram-W4KKPZXB-C8_GeFoe.js.map → quadrantDiagram-W4KKPZXB-CWoZo1iQ.js.map} +1 -1
- package/dist/{requirementDiagram-4Y6WPE33-BAt5yldj.cjs → requirementDiagram-4Y6WPE33-BJMM1_nL.cjs} +2 -2
- package/dist/{requirementDiagram-4Y6WPE33-BAt5yldj.cjs.map → requirementDiagram-4Y6WPE33-BJMM1_nL.cjs.map} +1 -1
- package/dist/{requirementDiagram-4Y6WPE33-Ce1YmqAJ.js → requirementDiagram-4Y6WPE33-BOwFaREr.js} +4 -4
- package/dist/{requirementDiagram-4Y6WPE33-Ce1YmqAJ.js.map → requirementDiagram-4Y6WPE33-BOwFaREr.js.map} +1 -1
- package/dist/{sankeyDiagram-5OEKKPKP-CPzjKU9I.js → sankeyDiagram-5OEKKPKP-D_Y2fiVv.js} +27 -27
- package/dist/{sankeyDiagram-5OEKKPKP-CPzjKU9I.js.map → sankeyDiagram-5OEKKPKP-D_Y2fiVv.js.map} +1 -1
- package/dist/{sankeyDiagram-5OEKKPKP-DKAhIIn6.cjs → sankeyDiagram-5OEKKPKP-DkhPTPSt.cjs} +2 -2
- package/dist/{sankeyDiagram-5OEKKPKP-DKAhIIn6.cjs.map → sankeyDiagram-5OEKKPKP-DkhPTPSt.cjs.map} +1 -1
- package/dist/{sequenceDiagram-3UESZ5HK-CgPqURJr.cjs → sequenceDiagram-3UESZ5HK-BRU7h4Ho.cjs} +2 -2
- package/dist/{sequenceDiagram-3UESZ5HK-CgPqURJr.cjs.map → sequenceDiagram-3UESZ5HK-BRU7h4Ho.cjs.map} +1 -1
- package/dist/{sequenceDiagram-3UESZ5HK-BpwEIPSR.js → sequenceDiagram-3UESZ5HK-DxWSY6ex.js} +43 -43
- package/dist/{sequenceDiagram-3UESZ5HK-BpwEIPSR.js.map → sequenceDiagram-3UESZ5HK-DxWSY6ex.js.map} +1 -1
- package/dist/simple-logger-DIfMY3fH.js +102 -0
- package/dist/simple-logger-DIfMY3fH.js.map +1 -0
- package/dist/simple-logger-DZxBpX7v.cjs +2 -0
- package/dist/simple-logger-DZxBpX7v.cjs.map +1 -0
- package/dist/src/components/MarkdownRenderer.d.ts +8 -12
- package/dist/src/components/MarkdownRenderer.d.ts.map +1 -1
- package/dist/src/components/MarkdownViewer.d.ts +133 -0
- package/dist/src/components/MarkdownViewer.d.ts.map +1 -0
- package/dist/src/components/MermaidDiagram.d.ts +9 -1
- package/dist/src/components/MermaidDiagram.d.ts.map +1 -1
- package/dist/src/components/mdastNodes/CodeNode.d.ts +8 -3
- package/dist/src/components/mdastNodes/CodeNode.d.ts.map +1 -1
- package/dist/src/components/mdastNodes/HTMLNode.d.ts.map +1 -1
- package/dist/src/components/mdastNodes/MathNode.d.ts +8 -0
- package/dist/src/components/mdastNodes/MathNode.d.ts.map +1 -1
- package/dist/src/components/mdastNodes/RichLinkCard.d.ts.map +1 -1
- package/dist/src/components/mermaidInteraction.d.ts +57 -0
- package/dist/src/components/mermaidInteraction.d.ts.map +1 -0
- package/dist/src/components/plugins/DifyIFramePlugin.d.ts.map +1 -1
- package/dist/src/gen/markdown/v1/markdown_connect.d.ts +20 -0
- package/dist/src/gen/markdown/v1/markdown_connect.d.ts.map +1 -0
- package/dist/src/gen/markdown/v1/markdown_pb.d.ts +101 -0
- package/dist/src/gen/markdown/v1/markdown_pb.d.ts.map +1 -0
- package/dist/src/index.client.d.ts +2 -1
- package/dist/src/index.client.d.ts.map +1 -1
- package/dist/src/index.server.d.ts +1 -1
- package/dist/src/index.server.d.ts.map +1 -1
- package/dist/src/remarkProcessor.server.d.ts +18 -2
- package/dist/src/remarkProcessor.server.d.ts.map +1 -1
- package/dist/{stateDiagram-AJRCARHV-OpWhWbqI.cjs → stateDiagram-AJRCARHV-CqtM_wb7.cjs} +2 -2
- package/dist/{stateDiagram-AJRCARHV-OpWhWbqI.cjs.map → stateDiagram-AJRCARHV-CqtM_wb7.cjs.map} +1 -1
- package/dist/{stateDiagram-AJRCARHV-OtsOxzY2.js → stateDiagram-AJRCARHV-DSsrJMAA.js} +13 -13
- package/dist/{stateDiagram-AJRCARHV-OtsOxzY2.js.map → stateDiagram-AJRCARHV-DSsrJMAA.js.map} +1 -1
- package/dist/{stateDiagram-v2-BHNVJYJU-CAvz3uwY.js → stateDiagram-v2-BHNVJYJU-BZ0QjYK7.js} +3 -3
- package/dist/{stateDiagram-v2-BHNVJYJU-CAvz3uwY.js.map → stateDiagram-v2-BHNVJYJU-BZ0QjYK7.js.map} +1 -1
- package/dist/{stateDiagram-v2-BHNVJYJU-DEkcCy3a.cjs → stateDiagram-v2-BHNVJYJU-CQp1esNj.cjs} +2 -2
- package/dist/{stateDiagram-v2-BHNVJYJU-DEkcCy3a.cjs.map → stateDiagram-v2-BHNVJYJU-CQp1esNj.cjs.map} +1 -1
- package/dist/styles/markdown.css +1 -1
- package/dist/{timeline-definition-PNZ67QCA-PRJCyjVm.cjs → timeline-definition-PNZ67QCA-B9RmAqqi.cjs} +2 -2
- package/dist/{timeline-definition-PNZ67QCA-PRJCyjVm.cjs.map → timeline-definition-PNZ67QCA-B9RmAqqi.cjs.map} +1 -1
- package/dist/{timeline-definition-PNZ67QCA-CCZVlXOO.js → timeline-definition-PNZ67QCA-CoFHhgLp.js} +38 -38
- package/dist/{timeline-definition-PNZ67QCA-CCZVlXOO.js.map → timeline-definition-PNZ67QCA-CoFHhgLp.js.map} +1 -1
- package/dist/{vennDiagram-CIIHVFJN-CJIbwKdq.cjs → vennDiagram-CIIHVFJN-BLhG-NNC.cjs} +2 -2
- package/dist/{vennDiagram-CIIHVFJN-CJIbwKdq.cjs.map → vennDiagram-CIIHVFJN-BLhG-NNC.cjs.map} +1 -1
- package/dist/{vennDiagram-CIIHVFJN-DjW1FsID.js → vennDiagram-CIIHVFJN-DWsjrahp.js} +98 -98
- package/dist/{vennDiagram-CIIHVFJN-DjW1FsID.js.map → vennDiagram-CIIHVFJN-DWsjrahp.js.map} +1 -1
- package/dist/vite.config.d.ts.map +1 -1
- package/dist/{wardleyDiagram-YWT4CUSO-FRB5Ve3j.cjs → wardleyDiagram-YWT4CUSO-C21VhlO9.cjs} +2 -2
- package/dist/{wardleyDiagram-YWT4CUSO-FRB5Ve3j.cjs.map → wardleyDiagram-YWT4CUSO-C21VhlO9.cjs.map} +1 -1
- package/dist/{wardleyDiagram-YWT4CUSO-opnMU0cO.js → wardleyDiagram-YWT4CUSO-Dcw9yeY5.js} +24 -24
- package/dist/{wardleyDiagram-YWT4CUSO-opnMU0cO.js.map → wardleyDiagram-YWT4CUSO-Dcw9yeY5.js.map} +1 -1
- package/dist/{xychartDiagram-2RQKCTM6-CQh5pyBs.js → xychartDiagram-2RQKCTM6-BwcFF2Mu.js} +3 -3
- package/dist/{xychartDiagram-2RQKCTM6-CQh5pyBs.js.map → xychartDiagram-2RQKCTM6-BwcFF2Mu.js.map} +1 -1
- package/dist/{xychartDiagram-2RQKCTM6-DjDxwlNx.cjs → xychartDiagram-2RQKCTM6-NS9IkwEv.cjs} +2 -2
- package/dist/{xychartDiagram-2RQKCTM6-DjDxwlNx.cjs.map → xychartDiagram-2RQKCTM6-NS9IkwEv.cjs.map} +1 -1
- package/package.json +6 -1
- package/dist/arc-CEt7sPHR.js +0 -84
- package/dist/channel-DJV0Dpb7.cjs +0 -2
- package/dist/channel-D_k9IBco.js +0 -6
- package/dist/chunk-55IACEB6-DJuAcFli.js +0 -9
- package/dist/extractHeadings-BIH0osfd.js.map +0 -1
- package/dist/extractHeadings-C519p0PM.cjs +0 -306
- package/dist/extractHeadings-C519p0PM.cjs.map +0 -1
- package/dist/remark-zenn-message-B-AEffpD.js +0 -408
- package/dist/remark-zenn-message-B-AEffpD.js.map +0 -1
- package/dist/remark-zenn-message-B5yftsqg.cjs +0 -2
- package/dist/remark-zenn-message-B5yftsqg.cjs.map +0 -1
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
"use strict";var L0=Object.create;var ul=Object.defineProperty;var F0=Object.getOwnPropertyDescriptor;var M0=Object.getOwnPropertyNames;var A0=Object.getPrototypeOf,E0=Object.prototype.hasOwnProperty;var $0=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of M0(t))!E0.call(e,s)&&s!==r&&ul(e,s,{get:()=>t[s],enumerable:!(i=F0(t,s))||i.enumerable});return e};var I0=(e,t,r)=>(r=e!=null?L0(A0(e)):{},$0(t||!e||!e.__esModule?ul(r,"default",{value:e,enumerable:!0}):r,e));const H=require("react"),de=require("html-react-parser"),Ya=require("katex"),P0=require("shiki"),tr=require("dompurify"),O0=require("github-slugger"),gs=require("./simple-logger-DZxBpX7v.cjs"),At=require("unist-util-visit"),R0=require("cheerio");function jh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ni={exports:{}},Qr={};var fl;function D0(){if(fl)return Qr;fl=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(i,s,o){var a=null;if(o!==void 0&&(a=""+o),s.key!==void 0&&(a=""+s.key),"key"in s){o={};for(var n in s)n!=="key"&&(o[n]=s[n])}else o=s;return s=o.ref,{$$typeof:e,type:i,key:a,ref:s!==void 0?s:null,props:o}}return Qr.Fragment=t,Qr.jsx=r,Qr.jsxs=r,Qr}var Jr={};var gl;function N0(){return gl||(gl=1,process.env.NODE_ENV!=="production"&&(function(){function e(B){if(B==null)return null;if(typeof B=="function")return B.$$typeof===q?null:B.displayName||B.name||null;if(typeof B=="string")return B;switch(B){case y:return"Fragment";case b:return"Profiler";case x:return"StrictMode";case _:return"Suspense";case $:return"SuspenseList";case I:return"Activity"}if(typeof B=="object")switch(typeof B.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),B.$$typeof){case m:return"Portal";case S:return B.displayName||"Context";case k:return(B._context.displayName||"Context")+".Consumer";case v:var U=B.render;return B=B.displayName,B||(B=U.displayName||U.name||"",B=B!==""?"ForwardRef("+B+")":"ForwardRef"),B;case T:return U=B.displayName||null,U!==null?U:e(B.type)||"Memo";case M:U=B._payload,B=B._init;try{return e(B(U))}catch{}}return null}function t(B){return""+B}function r(B){try{t(B);var U=!1}catch{U=!0}if(U){U=console;var W=U.error,G=typeof Symbol=="function"&&Symbol.toStringTag&&B[Symbol.toStringTag]||B.constructor.name||"Object";return W.call(U,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",G),t(B)}}function i(B){if(B===y)return"<>";if(typeof B=="object"&&B!==null&&B.$$typeof===M)return"<...>";try{var U=e(B);return U?"<"+U+">":"<...>"}catch{return"<...>"}}function s(){var B=X.A;return B===null?null:B.getOwner()}function o(){return Error("react-stack-top-frame")}function a(B){if(Y.call(B,"key")){var U=Object.getOwnPropertyDescriptor(B,"key").get;if(U&&U.isReactWarning)return!1}return B.key!==void 0}function n(B,U){function W(){F||(F=!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)",U))}W.isReactWarning=!0,Object.defineProperty(B,"key",{get:W,configurable:!0})}function l(){var B=e(this.type);return P[B]||(P[B]=!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.")),B=this.props.ref,B!==void 0?B:null}function c(B,U,W,G,V,Q){var Z=W.ref;return B={$$typeof:p,type:B,key:U,props:W,_owner:G},(Z!==void 0?Z:null)!==null?Object.defineProperty(B,"ref",{enumerable:!1,get:l}):Object.defineProperty(B,"ref",{enumerable:!1,value:null}),B._store={},Object.defineProperty(B._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(B,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(B,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:V}),Object.defineProperty(B,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Q}),Object.freeze&&(Object.freeze(B.props),Object.freeze(B)),B}function h(B,U,W,G,V,Q){var Z=U.children;if(Z!==void 0)if(G)if(D(Z)){for(G=0;G<Z.length;G++)d(Z[G]);Object.freeze&&Object.freeze(Z)}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 d(Z);if(Y.call(U,"key")){Z=e(B);var st=Object.keys(U).filter(function(dt){return dt!=="key"});G=0<st.length?"{key: someKey, "+st.join(": ..., ")+": ...}":"{key: someKey}",N[Z+G]||(st=0<st.length?"{"+st.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
2
|
+
let props = %s;
|
|
3
|
+
<%s {...props} />
|
|
4
|
+
React keys must be passed directly to JSX without using spread:
|
|
5
|
+
let props = %s;
|
|
6
|
+
<%s key={someKey} {...props} />`,G,Z,st,Z),N[Z+G]=!0)}if(Z=null,W!==void 0&&(r(W),Z=""+W),a(U)&&(r(U.key),Z=""+U.key),"key"in U){W={};for(var ft in U)ft!=="key"&&(W[ft]=U[ft])}else W=U;return Z&&n(W,typeof B=="function"?B.displayName||B.name||"Unknown":B),c(B,Z,W,s(),V,Q)}function d(B){f(B)?B._store&&(B._store.validated=1):typeof B=="object"&&B!==null&&B.$$typeof===M&&(B._payload.status==="fulfilled"?f(B._payload.value)&&B._payload.value._store&&(B._payload.value._store.validated=1):B._store&&(B._store.validated=1))}function f(B){return typeof B=="object"&&B!==null&&B.$$typeof===p}var u=H,p=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"),k=Symbol.for("react.consumer"),S=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),I=Symbol.for("react.activity"),q=Symbol.for("react.client.reference"),X=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=Object.prototype.hasOwnProperty,D=Array.isArray,A=console.createTask?console.createTask:function(){return null};u={react_stack_bottom_frame:function(B){return B()}};var F,P={},z=u.react_stack_bottom_frame.bind(u,o)(),E=A(i(o)),N={};Jr.Fragment=y,Jr.jsx=function(B,U,W){var G=1e4>X.recentlyCreatedOwnerStacks++;return h(B,U,W,!1,G?Error("react-stack-top-frame"):z,G?A(i(B)):E)},Jr.jsxs=function(B,U,W){var G=1e4>X.recentlyCreatedOwnerStacks++;return h(B,U,W,!0,G?Error("react-stack-top-frame"):z,G?A(i(B)):E)}})()),Jr}var pl;function q0(){return pl||(pl=1,process.env.NODE_ENV==="production"?Ni.exports=D0():Ni.exports=N0()),Ni.exports}var w=q0();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}));const z0=typeof document<"u"&&!!document.documentMode;let bo;function W0(){return bo||(bo=document.createElement("div").style)}const ml=["webkit","moz","ms"],qi={};function Ua(e){if(qi[e])return qi[e];const t=W0();if(e in t)return qi[e]=e;const r=e[0].toUpperCase()+e.slice(1);let i=ml.length;for(;i--;){const s=`${ml[i]}${r}`;if(s in t)return qi[e]=s}}function zi(e,t){return parseFloat(t[Ua(e)])||0}function Wi(e,t,r=window.getComputedStyle(e)){const i=t==="border"?"Width":"";return{left:zi(`${t}Left${i}`,r),right:zi(`${t}Right${i}`,r),top:zi(`${t}Top${i}`,r),bottom:zi(`${t}Bottom${i}`,r)}}function gr(e,t,r){e.style[Ua(t)]=r}function j0(e,t){const r=Ua("transform");gr(e,"transition",`${r} ${t.duration}ms ${t.easing}`)}function H0(e,{x:t,y:r,scale:i,isSVG:s},o){if(gr(e,"transform",`scale(${i}) translate(${t}px, ${r}px)`),s&&z0){const a=window.getComputedStyle(e).getPropertyValue("transform");e.setAttribute("transform",a)}}function ko(e){let t=e.parentNode;(!t||t.nodeType!==1)&&(t=document.documentElement);const r=window.getComputedStyle(e),i=window.getComputedStyle(t),s=e.getBoundingClientRect(),o=t.getBoundingClientRect();return{elem:{style:r,width:s.width,height:s.height,top:s.top,bottom:s.bottom,left:s.left,right:s.right,margin:Wi(e,"margin",r),border:Wi(e,"border",r)},parent:{style:i,width:o.width,height:o.height,top:o.top,bottom:o.bottom,left:o.left,right:o.right,padding:Wi(t,"padding",i),border:Wi(t,"border",i)}}}let wi={down:"mousedown",move:"mousemove",up:"mouseup mouseleave"};typeof window<"u"&&(typeof window.PointerEvent=="function"?wi={down:"pointerdown",move:"pointermove",up:"pointerup pointerleave pointercancel"}:typeof window.TouchEvent=="function"&&(wi={down:"touchstart",move:"touchmove",up:"touchend touchcancel"}));function wo(e,t,r,i){wi[e].split(" ").forEach(s=>{t.addEventListener(s,r,i)})}function vo(e,t,r){wi[e].split(" ").forEach(i=>{t.removeEventListener(i,r)})}function Hh(e,t){let r=e.length;for(;r--;)if(e[r].pointerId===t.pointerId)return r;return-1}function zo(e,t){let r;if(t.touches){r=0;for(const i of t.touches)i.pointerId=r++,zo(e,i);return}r=Hh(e,t),r>-1&&e.splice(r,1),e.push(t)}function Y0(e,t){if(t.touches){for(;e.length;)e.pop();return}const r=Hh(e,t);r>-1&&e.splice(r,1)}function yl(e){e=e.slice(0);let t=e.pop(),r;for(;r=e.pop();)t={clientX:(r.clientX-t.clientX)/2+t.clientX,clientY:(r.clientY-t.clientY)/2+t.clientY};return t}function So(e){if(e.length<2)return 0;const 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 U0(e){let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1}function X0(e){return(e.getAttribute("class")||"").trim()}function G0(e,t){return e.nodeType===1&&` ${X0(e)} `.indexOf(` ${t} `)>-1}function V0(e,t){for(let r=e;r!=null;r=r.parentNode)if(G0(r,t.excludeClass)||t.exclude.indexOf(r)>-1)return!0;return!1}const Z0=/^http:[\w\.\/]+svg$/;function K0(e){return Z0.test(e.namespaceURI)&&e.nodeName.toLowerCase()!=="svg"}function Q0(e){const t={};for(const r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}const Yh={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:e=>{e.preventDefault(),e.stopPropagation()},maxScale:4,minScale:.125,overflow:"hidden",panOnlyWhenZoomed:!1,pinchAndPan:!1,relative:!1,setTransform:H0,startX:0,startY:0,startScale:1,step:.3,touchAction:"none"};function Uh(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(!U0(e))throw new Error("Panzoom should be called on elements that have been attached to the DOM");t={...Yh,...t};const r=K0(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,gr(e,"transformOrigin",typeof t.origin=="string"?t.origin:r?"0 0":"50% 50%");function s(){i.style.overflow="",i.style.userSelect="",i.style.touchAction="",i.style.cursor="",e.style.cursor="",e.style.userSelect="",e.style.touchAction="",gr(e,"transformOrigin","")}function o(E={}){for(const N in E)E.hasOwnProperty(N)&&(t[N]=E[N]);(E.hasOwnProperty("cursor")||E.hasOwnProperty("canvas"))&&(i.style.cursor=e.style.cursor="",(t.canvas?i:e).style.cursor=t.cursor),E.hasOwnProperty("overflow")&&(i.style.overflow=E.overflow),E.hasOwnProperty("touchAction")&&(i.style.touchAction=E.touchAction,e.style.touchAction=E.touchAction)}let a=0,n=0,l=1,c=!1;m(t.startScale,{animate:!1,force:!0}),setTimeout(()=>{p(t.startX,t.startY,{animate:!1,force:!0})});function h(E,N,B){if(B.silent)return;const U=new CustomEvent(E,{detail:N});e.dispatchEvent(U)}function d(E,N,B){const U={x:a,y:n,scale:l,isSVG:r,originalEvent:B};return requestAnimationFrame(()=>{typeof N.animate=="boolean"&&(N.animate?j0(e,N):gr(e,"transition","none")),N.setTransform(e,U,N),h(E,U,N),h("panzoomchange",U,N)}),U}function f(E,N,B,U){const W={...t,...U},G={x:a,y:n,opts:W};if(!U?.force&&(W.disablePan||W.panOnlyWhenZoomed&&l===W.startScale))return G;if(E=parseFloat(E),N=parseFloat(N),W.disableXAxis||(G.x=(W.relative?a:0)+E),W.disableYAxis||(G.y=(W.relative?n:0)+N),W.contain){const V=ko(e),Q=V.elem.width/l,Z=V.elem.height/l,st=Q*B,ft=Z*B,dt=(st-Q)/2,gt=(ft-Z)/2;if(W.contain==="inside"){const Bt=(-V.elem.margin.left-V.parent.padding.left+dt)/B,zt=(V.parent.width-st-V.parent.padding.left-V.elem.margin.left-V.parent.border.left-V.parent.border.right+dt)/B;G.x=Math.max(Math.min(G.x,zt),Bt);const Yt=(-V.elem.margin.top-V.parent.padding.top+gt)/B,We=(V.parent.height-ft-V.parent.padding.top-V.elem.margin.top-V.parent.border.top-V.parent.border.bottom+gt)/B;G.y=Math.max(Math.min(G.y,We),Yt)}else if(W.contain==="outside"){const Bt=(-(st-V.parent.width)-V.parent.padding.left-V.parent.border.left-V.parent.border.right+dt)/B,zt=(dt-V.parent.padding.left)/B;G.x=Math.max(Math.min(G.x,zt),Bt);const Yt=(-(ft-V.parent.height)-V.parent.padding.top-V.parent.border.top-V.parent.border.bottom+gt)/B,We=(gt-V.parent.padding.top)/B;G.y=Math.max(Math.min(G.y,We),Yt)}}return W.roundPixels&&(G.x=Math.round(G.x),G.y=Math.round(G.y)),G}function u(E,N){const B={...t,...N},U={scale:l,opts:B};if(!N?.force&&B.disableZoom)return U;let W=t.minScale,G=t.maxScale;if(B.contain){const V=ko(e),Q=V.elem.width/l,Z=V.elem.height/l;if(Q>1&&Z>1){const st=V.parent.width-V.parent.border.left-V.parent.border.right,ft=V.parent.height-V.parent.border.top-V.parent.border.bottom,dt=st/Q,gt=ft/Z;t.contain==="inside"?G=Math.min(G,dt,gt):t.contain==="outside"&&(W=Math.max(W,dt,gt))}}return U.scale=Math.min(Math.max(E,W),G),U}function p(E,N,B,U){const W=f(E,N,l,B);return a!==W.x||n!==W.y?(a=W.x,n=W.y,d("panzoompan",W.opts,U)):{x:a,y:n,scale:l,isSVG:r,originalEvent:U}}function m(E,N,B){const U=u(E,N),W=U.opts;if(!N?.force&&W.disableZoom)return;E=U.scale;let G=a,V=n;if(W.focal){const Z=W.focal;G=(Z.x/E-Z.x/l+a*E)/E,V=(Z.y/E-Z.y/l+n*E)/E}const Q=f(G,V,E,{relative:!1,force:!0});return a=Q.x,n=Q.y,l=E,d("panzoomzoom",W,B)}function y(E,N){const B={...t,animate:!0,...N};return m(l*Math.exp((E?1:-1)*B.step),B)}function x(E){return y(!0,E)}function b(E){return y(!1,E)}function k(E,N,B,U){const W=ko(e),G={width:W.parent.width-W.parent.padding.left-W.parent.padding.right-W.parent.border.left-W.parent.border.right,height:W.parent.height-W.parent.padding.top-W.parent.padding.bottom-W.parent.border.top-W.parent.border.bottom};let V=N.clientX-W.parent.left-W.parent.padding.left-W.parent.border.left-W.elem.margin.left,Q=N.clientY-W.parent.top-W.parent.padding.top-W.parent.border.top-W.elem.margin.top;r||(V-=W.elem.width/l/2,Q-=W.elem.height/l/2);const Z={x:V/G.width*(G.width*E),y:Q/G.height*(G.height*E)};return m(E,{...B,animate:!1,focal:Z},U)}function S(E,N){E.preventDefault();const B={...t,...N,animate:!1},W=(E.deltaY===0&&E.deltaX?E.deltaX:E.deltaY)<0?1:-1,G=u(l*Math.exp(W*B.step/3),B).scale;return k(G,E,B,E)}function v(E){const N={...t,animate:!0,force:!0,...E};l=u(N.startScale,N).scale;const B=f(N.startX,N.startY,l,N);return a=B.x,n=B.y,d("panzoomreset",N)}let _,$,T,M,I,q;const X=[];function Y(E){if(V0(E.target,t))return;zo(X,E),c=!0,t.handleStartEvent(E),_=a,$=n,h("panzoomstart",{x:a,y:n,scale:l,isSVG:r,originalEvent:E},t);const N=yl(X);T=N.clientX,M=N.clientY,I=l,q=So(X)}function D(E){if(!c||_===void 0||$===void 0||T===void 0||M===void 0)return;zo(X,E);const N=yl(X),B=X.length>1;let U=l;if(B){q===0&&(q=So(X));const W=So(X)-q;U=u(W*t.step/80+I).scale,k(U,N,{animate:!1},E)}(!B||t.pinchAndPan)&&p(_+(N.clientX-T)/U,$+(N.clientY-M)/U,{animate:!1},E)}function A(E){X.length===1&&h("panzoomend",{x:a,y:n,scale:l,isSVG:r,originalEvent:E},t),Y0(X,E),c&&(c=!1,_=$=T=M=void 0)}let F=!1;function P(){F||(F=!0,wo("down",t.canvas?i:e,Y),wo("move",document,D,{passive:!0}),wo("up",document,A,{passive:!0}))}function z(){F=!1,vo("down",t.canvas?i:e,Y),vo("move",document,D),vo("up",document,A)}return t.noBind||P(),{bind:P,destroy:z,eventNames:wi,getPan:()=>({x:a,y:n}),getScale:()=>l,getOptions:()=>Q0(t),handleDown:Y,handleMove:D,handleUp:A,pan:p,reset:v,resetStyle:s,setOptions:o,setStyle:(E,N)=>gr(e,E,N),zoom:m,zoomIn:x,zoomOut:b,zoomToPoint:k,zoomWithWheel:S}}Uh.defaultOptions=Yh;const J0=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ty=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,i)=>i?i.toUpperCase():r.toLowerCase()),xl=e=>{const t=ty(e);return t.charAt(0).toUpperCase()+t.slice(1)},Xh=(...e)=>e.filter((t,r,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===r).join(" ").trim(),ey=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var ry={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"};const iy=H.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:i,className:s="",children:o,iconNode:a,...n},l)=>H.createElement("svg",{ref:l,...ry,width:t,height:t,stroke:e,strokeWidth:i?Number(r)*24/Number(t):r,className:Xh("lucide",s),...!o&&!ey(n)&&{"aria-hidden":"true"},...n},[...a.map(([c,h])=>H.createElement(c,h)),...Array.isArray(o)?o:[o]]));const ne=(e,t)=>{const r=H.forwardRef(({className:i,...s},o)=>H.createElement(iy,{ref:o,iconNode:t,className:Xh(`lucide-${J0(xl(e))}`,`lucide-${e}`,i),...s}));return r.displayName=xl(e),r};const sy=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],oy=ne("list",sy);const ay=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],ny=ne("palette",ay);const ly=[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]],Xa=ne("pin-off",ly);const hy=[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]],Ga=ne("pin",hy);const cy=[["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"}]],dy=ne("refresh-cw",cy);const uy=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],fy=ne("settings-2",uy);const gy=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 19H5",key:"vjpgq2"}]],py=ne("text-align-center",gy);const my=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 19H7",key:"4cu937"}]],yy=ne("text-align-end",my);const xy=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]],Cy=ne("text-align-start",xy);const by=[["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"}]],ky=ne("zoom-in",by);const wy=[["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"}]],vy=ne("zoom-out",wy);var es={exports:{}},Sy=es.exports,Cl;function Ty(){return Cl||(Cl=1,(function(e,t){(function(r,i){e.exports=i()})(Sy,(function(){var r=1e3,i=6e4,s=36e5,o="millisecond",a="second",n="minute",l="hour",c="day",h="week",d="month",f="quarter",u="year",p="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=/\[([^\]]+)]|YYYY|YY|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(D){var A=["th","st","nd","rd"],F=D%100;return"["+D+(A[(F-20)%10]||A[F]||A[0])+"]"}},k=function(D,A,F){var P=String(D);return!P||P.length>=A?D:""+Array(A+1-P.length).join(F)+D},S={s:k,z:function(D){var A=-D.utcOffset(),F=Math.abs(A),P=Math.floor(F/60),z=F%60;return(A<=0?"+":"-")+k(P,2,"0")+":"+k(z,2,"0")},m:function D(A,F){if(A.date()<F.date())return-D(F,A);var P=12*(F.year()-A.year())+(F.month()-A.month()),z=A.clone().add(P,d),E=F-z<0,N=A.clone().add(P+(E?-1:1),d);return+(-(P+(F-z)/(E?z-N:N-z))||0)},a:function(D){return D<0?Math.ceil(D)||0:Math.floor(D)},p:function(D){return{M:d,y:u,w:h,d:c,D:p,h:l,m:n,s:a,ms:o,Q:f}[D]||String(D||"").toLowerCase().replace(/s$/,"")},u:function(D){return D===void 0}},v="en",_={};_[v]=b;var $="$isDayjsObject",T=function(D){return D instanceof X||!(!D||!D[$])},M=function D(A,F,P){var z;if(!A)return v;if(typeof A=="string"){var E=A.toLowerCase();_[E]&&(z=E),F&&(_[E]=F,z=E);var N=A.split("-");if(!z&&N.length>1)return D(N[0])}else{var B=A.name;_[B]=A,z=B}return!P&&z&&(v=z),z||!P&&v},I=function(D,A){if(T(D))return D.clone();var F=typeof A=="object"?A:{};return F.date=D,F.args=arguments,new X(F)},q=S;q.l=M,q.i=T,q.w=function(D,A){return I(D,{locale:A.$L,utc:A.$u,x:A.$x,$offset:A.$offset})};var X=(function(){function D(F){this.$L=M(F.locale,null,!0),this.parse(F),this.$x=this.$x||F.x||{},this[$]=!0}var A=D.prototype;return A.parse=function(F){this.$d=(function(P){var z=P.date,E=P.utc;if(z===null)return new Date(NaN);if(q.u(z))return new Date;if(z instanceof Date)return new Date(z);if(typeof z=="string"&&!/Z$/i.test(z)){var N=z.match(y);if(N){var B=N[2]-1||0,U=(N[7]||"0").substring(0,3);return E?new Date(Date.UTC(N[1],B,N[3]||1,N[4]||0,N[5]||0,N[6]||0,U)):new Date(N[1],B,N[3]||1,N[4]||0,N[5]||0,N[6]||0,U)}}return new Date(z)})(F),this.init()},A.init=function(){var F=this.$d;this.$y=F.getFullYear(),this.$M=F.getMonth(),this.$D=F.getDate(),this.$W=F.getDay(),this.$H=F.getHours(),this.$m=F.getMinutes(),this.$s=F.getSeconds(),this.$ms=F.getMilliseconds()},A.$utils=function(){return q},A.isValid=function(){return this.$d.toString()!==m},A.isSame=function(F,P){var z=I(F);return this.startOf(P)<=z&&z<=this.endOf(P)},A.isAfter=function(F,P){return I(F)<this.startOf(P)},A.isBefore=function(F,P){return this.endOf(P)<I(F)},A.$g=function(F,P,z){return q.u(F)?this[P]:this.set(z,F)},A.unix=function(){return Math.floor(this.valueOf()/1e3)},A.valueOf=function(){return this.$d.getTime()},A.startOf=function(F,P){var z=this,E=!!q.u(P)||P,N=q.p(F),B=function(ft,dt){var gt=q.w(z.$u?Date.UTC(z.$y,dt,ft):new Date(z.$y,dt,ft),z);return E?gt:gt.endOf(c)},U=function(ft,dt){return q.w(z.toDate()[ft].apply(z.toDate("s"),(E?[0,0,0,0]:[23,59,59,999]).slice(dt)),z)},W=this.$W,G=this.$M,V=this.$D,Q="set"+(this.$u?"UTC":"");switch(N){case u:return E?B(1,0):B(31,11);case d:return E?B(1,G):B(0,G+1);case h:var Z=this.$locale().weekStart||0,st=(W<Z?W+7:W)-Z;return B(E?V-st:V+(6-st),G);case c:case p:return U(Q+"Hours",0);case l:return U(Q+"Minutes",1);case n:return U(Q+"Seconds",2);case a:return U(Q+"Milliseconds",3);default:return this.clone()}},A.endOf=function(F){return this.startOf(F,!1)},A.$set=function(F,P){var z,E=q.p(F),N="set"+(this.$u?"UTC":""),B=(z={},z[c]=N+"Date",z[p]=N+"Date",z[d]=N+"Month",z[u]=N+"FullYear",z[l]=N+"Hours",z[n]=N+"Minutes",z[a]=N+"Seconds",z[o]=N+"Milliseconds",z)[E],U=E===c?this.$D+(P-this.$W):P;if(E===d||E===u){var W=this.clone().set(p,1);W.$d[B](U),W.init(),this.$d=W.set(p,Math.min(this.$D,W.daysInMonth())).$d}else B&&this.$d[B](U);return this.init(),this},A.set=function(F,P){return this.clone().$set(F,P)},A.get=function(F){return this[q.p(F)]()},A.add=function(F,P){var z,E=this;F=Number(F);var N=q.p(P),B=function(G){var V=I(E);return q.w(V.date(V.date()+Math.round(G*F)),E)};if(N===d)return this.set(d,this.$M+F);if(N===u)return this.set(u,this.$y+F);if(N===c)return B(1);if(N===h)return B(7);var U=(z={},z[n]=i,z[l]=s,z[a]=r,z)[N]||1,W=this.$d.getTime()+F*U;return q.w(W,this)},A.subtract=function(F,P){return this.add(-1*F,P)},A.format=function(F){var P=this,z=this.$locale();if(!this.isValid())return z.invalidDate||m;var E=F||"YYYY-MM-DDTHH:mm:ssZ",N=q.z(this),B=this.$H,U=this.$m,W=this.$M,G=z.weekdays,V=z.months,Q=z.meridiem,Z=function(dt,gt,Bt,zt){return dt&&(dt[gt]||dt(P,E))||Bt[gt].slice(0,zt)},st=function(dt){return q.s(B%12||12,dt,"0")},ft=Q||function(dt,gt,Bt){var zt=dt<12?"AM":"PM";return Bt?zt.toLowerCase():zt};return E.replace(x,(function(dt,gt){return gt||(function(Bt){switch(Bt){case"YY":return String(P.$y).slice(-2);case"YYYY":return q.s(P.$y,4,"0");case"M":return W+1;case"MM":return q.s(W+1,2,"0");case"MMM":return Z(z.monthsShort,W,V,3);case"MMMM":return Z(V,W);case"D":return P.$D;case"DD":return q.s(P.$D,2,"0");case"d":return String(P.$W);case"dd":return Z(z.weekdaysMin,P.$W,G,2);case"ddd":return Z(z.weekdaysShort,P.$W,G,3);case"dddd":return G[P.$W];case"H":return String(B);case"HH":return q.s(B,2,"0");case"h":return st(1);case"hh":return st(2);case"a":return ft(B,U,!0);case"A":return ft(B,U,!1);case"m":return String(U);case"mm":return q.s(U,2,"0");case"s":return String(P.$s);case"ss":return q.s(P.$s,2,"0");case"SSS":return q.s(P.$ms,3,"0");case"Z":return N}return null})(dt)||N.replace(":","")}))},A.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},A.diff=function(F,P,z){var E,N=this,B=q.p(P),U=I(F),W=(U.utcOffset()-this.utcOffset())*i,G=this-U,V=function(){return q.m(N,U)};switch(B){case u:E=V()/12;break;case d:E=V();break;case f:E=V()/3;break;case h:E=(G-W)/6048e5;break;case c:E=(G-W)/864e5;break;case l:E=G/s;break;case n:E=G/i;break;case a:E=G/r;break;default:E=G}return z?E:q.a(E)},A.daysInMonth=function(){return this.endOf(d).$D},A.$locale=function(){return _[this.$L]},A.locale=function(F,P){if(!F)return this.$L;var z=this.clone(),E=M(F,P,!0);return E&&(z.$L=E),z},A.clone=function(){return q.w(this.$d,this)},A.toDate=function(){return new Date(this.valueOf())},A.toJSON=function(){return this.isValid()?this.toISOString():null},A.toISOString=function(){return this.$d.toISOString()},A.toString=function(){return this.$d.toUTCString()},D})(),Y=X.prototype;return I.prototype=Y,[["$ms",o],["$s",a],["$m",n],["$H",l],["$W",c],["$M",d],["$y",u],["$D",p]].forEach((function(D){Y[D[1]]=function(A){return this.$g(A,D[0],D[1])}})),I.extend=function(D,A){return D.$i||(D(A,X,I),D.$i=!0),I},I.locale=M,I.isDayjs=T,I.unix=function(D){return I(1e3*D)},I.en=_[v],I.Ls=_,I.p={},I}))})(es)),es.exports}var _y=Ty();const Gh=jh(_y);var Vh=Object.defineProperty,g=(e,t)=>Vh(e,"name",{value:t,configurable:!0}),Zh=(e,t)=>{for(var r in t)Vh(e,r,{get:t[r],enumerable:!0})},be={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},j={trace:g((...e)=>{},"trace"),debug:g((...e)=>{},"debug"),info:g((...e)=>{},"info"),warn:g((...e)=>{},"warn"),error:g((...e)=>{},"error"),fatal:g((...e)=>{},"fatal")},Va=g(function(e="fatal"){let t=be.fatal;typeof e=="string"?e.toLowerCase()in be&&(t=be[e]):typeof e=="number"&&(t=e),j.trace=()=>{},j.debug=()=>{},j.info=()=>{},j.warn=()=>{},j.error=()=>{},j.fatal=()=>{},t<=be.fatal&&(j.fatal=console.error?console.error.bind(console,Vt("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Vt("FATAL"))),t<=be.error&&(j.error=console.error?console.error.bind(console,Vt("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Vt("ERROR"))),t<=be.warn&&(j.warn=console.warn?console.warn.bind(console,Vt("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Vt("WARN"))),t<=be.info&&(j.info=console.info?console.info.bind(console,Vt("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Vt("INFO"))),t<=be.debug&&(j.debug=console.debug?console.debug.bind(console,Vt("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Vt("DEBUG"))),t<=be.trace&&(j.trace=console.debug?console.debug.bind(console,Vt("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Vt("TRACE")))},"setLogLevel"),Vt=g(e=>`%c${Gh().format("ss.SSS")} : ${e} : `,"format");const rs={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 s=r<.5?r*(1+t):r+t-r*t,o=2*r-s;switch(i){case"r":return rs.hue2rgb(o,s,e+1/3)*255;case"g":return rs.hue2rgb(o,s,e)*255;case"b":return rs.hue2rgb(o,s,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const s=Math.max(e,t,r),o=Math.min(e,t,r),a=(s+o)/2;if(i==="l")return a*100;if(s===o)return 0;const n=s-o,l=a>.5?n/(2-s-o):n/(s+o);if(i==="s")return l*100;switch(s){case e:return((t-r)/n+(t<r?6:0))*60;case t:return((r-e)/n+2)*60;case r:return((e-t)/n+4)*60;default:return-1}}},By={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},Ly={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},ht={channel:rs,lang:By,unit:Ly},Ee={};for(let e=0;e<=255;e++)Ee[e]=ht.unit.dec2hex(e);const Et={ALL:0,RGB:1,HSL:2};class Fy{constructor(){this.type=Et.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=Et.ALL}is(t){return this.type===t}}class My{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Fy}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Et.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:s}=t;r===void 0&&(t.h=ht.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=ht.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=ht.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=ht.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=ht.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=ht.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Et.HSL)&&r!==void 0?r:(this._ensureHSL(),ht.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Et.HSL)&&r!==void 0?r:(this._ensureHSL(),ht.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Et.HSL)&&r!==void 0?r:(this._ensureHSL(),ht.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Et.RGB)&&r!==void 0?r:(this._ensureRGB(),ht.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Et.RGB)&&r!==void 0?r:(this._ensureRGB(),ht.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Et.RGB)&&r!==void 0?r:(this._ensureRGB(),ht.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Et.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Et.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Et.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Et.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Et.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Et.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Xs=new My({r:0,g:0,b:0,a:0},"transparent"),yr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(yr.re);if(!t)return;const r=t[1],i=parseInt(r,16),s=r.length,o=s%4===0,a=s>4,n=a?1:17,l=a?8:4,c=o?0:-1,h=a?255:15;return Xs.set({r:(i>>l*(c+3)&h)*n,g:(i>>l*(c+2)&h)*n,b:(i>>l*(c+1)&h)*n,a:o?(i&h)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`#${Ee[Math.round(t)]}${Ee[Math.round(r)]}${Ee[Math.round(i)]}${Ee[Math.round(s*255)]}`:`#${Ee[Math.round(t)]}${Ee[Math.round(r)]}${Ee[Math.round(i)]}`}},Ge={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(Ge.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return ht.channel.clamp.h(parseFloat(r)*.9);case"rad":return ht.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return ht.channel.clamp.h(parseFloat(r)*360)}}return ht.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(Ge.re);if(!r)return;const[,i,s,o,a,n]=r;return Xs.set({h:Ge._hue2deg(i),s:ht.channel.clamp.s(parseFloat(s)),l:ht.channel.clamp.l(parseFloat(o)),a:a?ht.channel.clamp.a(n?parseFloat(a)/100:parseFloat(a)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:s}=e;return s<1?`hsla(${ht.lang.round(t)}, ${ht.lang.round(r)}%, ${ht.lang.round(i)}%, ${s})`:`hsl(${ht.lang.round(t)}, ${ht.lang.round(r)}%, ${ht.lang.round(i)}%)`}},pi={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=pi.colors[e];if(t)return yr.parse(t)},stringify:e=>{const t=yr.stringify(e);for(const r in pi.colors)if(pi.colors[r]===t)return r}},ni={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(ni.re);if(!r)return;const[,i,s,o,a,n,l,c,h]=r;return Xs.set({r:ht.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:ht.channel.clamp.g(a?parseFloat(o)*2.55:parseFloat(o)),b:ht.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:c?ht.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`rgba(${ht.lang.round(t)}, ${ht.lang.round(r)}, ${ht.lang.round(i)}, ${ht.lang.round(s)})`:`rgb(${ht.lang.round(t)}, ${ht.lang.round(r)}, ${ht.lang.round(i)})`}},ae={format:{keyword:pi,hex:yr,rgb:ni,rgba:ni,hsl:Ge,hsla:Ge},parse:e=>{if(typeof e!="string")return e;const t=yr.parse(e)||ni.parse(e)||Ge.parse(e)||pi.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Et.HSL)||e.data.r===void 0?Ge.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?ni.stringify(e):yr.stringify(e)},Kh=(e,t)=>{const r=ae.parse(e);for(const i in t)r[i]=ht.channel.clamp[i](t[i]);return ae.stringify(r)},Te=(e,t,r=0,i=1)=>{if(typeof e!="number")return Kh(e,{a:t});const s=Xs.set({r:ht.channel.clamp.r(e),g:ht.channel.clamp.g(t),b:ht.channel.clamp.b(r),a:ht.channel.clamp.a(i)});return ae.stringify(s)},Ay=e=>{const{r:t,g:r,b:i}=ae.parse(e),s=.2126*ht.channel.toLinear(t)+.7152*ht.channel.toLinear(r)+.0722*ht.channel.toLinear(i);return ht.lang.round(s)},Ey=e=>Ay(e)>=.5,Jt=e=>!Ey(e),Za=(e,t,r)=>{const i=ae.parse(e),s=i[t],o=ht.channel.clamp[t](s+r);return s!==o&&(i[t]=o),ae.stringify(i)},O=(e,t)=>Za(e,"l",t),R=(e,t)=>Za(e,"l",-t),C=(e,t)=>{const r=ae.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return Kh(e,i)},$y=(e,t,r=50)=>{const{r:i,g:s,b:o,a}=ae.parse(e),{r:n,g:l,b:c,a:h}=ae.parse(t),d=r/100,f=d*2-1,u=a-h,m=((f*u===-1?f:(f+u)/(1+f*u))+1)/2,y=1-m,x=i*m+n*y,b=s*m+l*y,k=o*m+c*y,S=a*d+h*(1-d);return Te(x,b,k,S)},L=(e,t=100)=>{const r=ae.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,$y(r,e,t)};var Qh=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,mi=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Iy=/\s*%%.*\n/gm,kr,Jh=(kr=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},g(kr,"UnknownDiagramError"),kr),er={},Ka=g(function(e,t){e=e.replace(Qh,"").replace(mi,"").replace(Iy,`
|
|
7
|
+
`);for(const[r,{detector:i}]of Object.entries(er))if(i(e,t))return r;throw new Jh(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Wo=g((...e)=>{for(const{id:t,detector:r,loader:i}of e)tc(t,r,i)},"registerLazyLoadedDiagrams"),tc=g((e,t,r)=>{er[e]&&j.warn(`Detector with key ${e} already exists. Overwriting.`),er[e]={detector:t,loader:r},j.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),Py=g(e=>er[e].loader,"getDiagramLoader"),jo=g((e,t,{depth:r=2,clobber:i=!1}={})=>{const s={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(o=>jo(e,o,s)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(o=>{e.includes(o)||e.push(o)}),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(o=>{typeof t[o]=="object"&&t[o]!==null&&(e[o]===void 0||typeof e[o]=="object")?(e[o]===void 0&&(e[o]=Array.isArray(t[o])?[]:{}),e[o]=jo(e[o],t[o],{depth:r-1,clobber:i})):(i||typeof e[o]!="object"&&typeof t[o]!="object")&&(e[o]=t[o])}),e)},"assignWithDepth"),vt=jo,me="#ffffff",ye="#f2f2f2",lt=g((e,t)=>t?C(e,{s:-40,l:10}):C(e,{s:-40,l:-10}),"mkBorder"),wr,Oy=(wr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||lt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||lt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(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||O(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.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||R(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||R(this.mainBkg,10)):(this.rowOdd=this.rowOdd||O(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||O(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||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=R(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=R(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||L(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||O(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||R(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]||C(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||C(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||C(this.primaryColor,{h:64}),this.fillType3=this.fillType3||C(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||C(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||C(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||C(this.primaryColor,{h:128}),this.fillType7=this.fillType7||C(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||C(this.primaryColor,{l:-10}),this.pie5=this.pie5||C(this.secondaryColor,{l:-10}),this.pie6=this.pie6||C(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||C(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||C(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||C(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||C(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||C(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||C(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.venn1=this.venn1??C(this.primaryColor,{l:-30}),this.venn2=this.venn2??C(this.secondaryColor,{l:-30}),this.venn3=this.venn3??C(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??C(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??C(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??C(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??C(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??C(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,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.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},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||C(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?O(this.quadrant1Fill):R(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,dataLabelColor:this.xyChart?.dataLabelColor||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?R(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||C(this.primaryColor,{h:-30}),this.git4=this.git4||C(this.primaryColor,{h:-60}),this.git5=this.git5||C(this.primaryColor,{h:-90}),this.git6=this.git6||C(this.primaryColor,{h:60}),this.git7=this.git7||C(this.primaryColor,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||me,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ye,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}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]})}},g(wr,"Theme"),wr),Ry=g(e=>{const t=new Oy;return t.calculate(e),t},"getThemeVariables"),vr,Dy=(vr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=O(this.primaryColor,16),this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.background),this.secondaryBorderColor=lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=lt(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.lineColor=L(this.background),this.textColor=L(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=O(L("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Te(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.radius=5,this.strokeWidth=1,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.clusterBkg="#302F3D",this.sectionBkgColor=R("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=R(this.sectionBkgColor,10),this.taskBorderColor=Te(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Te(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||O(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||R(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=O(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=O(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=O(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=L(this.doneTaskBkgColor),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=C(this.primaryColor,{h:64}),this.fillType3=C(this.secondaryColor,{h:64}),this.fillType4=C(this.primaryColor,{h:-64}),this.fillType5=C(this.secondaryColor,{h:-64}),this.fillType6=C(this.primaryColor,{h:128}),this.fillType7=C(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||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||L(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||O(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||C(this.mainBkg,{h:30,s:-30,l:-(-10+t*4)}),this["surfacePeer"+t]=this["surfacePeer"+t]||C(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.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,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";for(let t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??O(this["cScale"+t],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||C(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?O(this.quadrant1Fill):R(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,dataLabelColor:this.xyChart?.dataLabelColor||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.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.mainBkg,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.mainBkg},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?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=O(this.secondaryColor,20),this.git1=O(this.pie2||this.secondaryColor,20),this.git2=O(this.pie3||this.tertiaryColor,20),this.git3=O(this.pie4||C(this.primaryColor,{h:-30}),20),this.git4=O(this.pie5||C(this.primaryColor,{h:-60}),20),this.git5=O(this.pie6||C(this.primaryColor,{h:-90}),10),this.git6=O(this.pie7||C(this.primaryColor,{h:60}),10),this.git7=O(this.pie8||C(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||L(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||L(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.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||O("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||O("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||O("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||O("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||O(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||O(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||O(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||O(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]})}},g(vr,"Theme"),vr),Ny=g(e=>{const t=new Dy;return t.calculate(e),t},"getThemeVariables"),Sr,qy=(Sr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=C(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=lt(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.lineColor=L(this.background),this.textColor=L(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=lt(this.primaryColor,this.darkMode),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.radius=5,this.strokeWidth=1,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.clusterBkg="#FBFBFF",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=Te(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.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",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.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",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||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||R(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||R(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=R(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||R(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||C(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||C(this.mainBkg,{h:30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||C(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||L(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||L(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=this.border1,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||O(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||O(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=C(this.primaryColor,{h:64}),this.fillType3=C(this.secondaryColor,{h:64}),this.fillType4=C(this.primaryColor,{h:-64}),this.fillType5=C(this.secondaryColor,{h:-64}),this.fillType6=C(this.primaryColor,{h:128}),this.fillType7=C(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||C(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||C(this.primaryColor,{l:-10}),this.pie5=this.pie5||C(this.secondaryColor,{l:-30}),this.pie6=this.pie6||C(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||C(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||C(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||C(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||C(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||C(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||C(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.venn1=this.venn1??C(this.primaryColor,{l:-30}),this.venn2=this.venn2??C(this.secondaryColor,{l:-30}),this.venn3=this.venn3??C(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??C(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??C(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??C(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??C(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??C(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||C(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?O(this.quadrant1Fill):R(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.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||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||C(this.primaryColor,{h:-30}),this.git4=this.git4||C(this.primaryColor,{h:-60}),this.git5=this.git5||C(this.primaryColor,{h:-90}),this.git6=this.git6||C(this.primaryColor,{h:60}),this.git7=this.git7||C(this.primaryColor,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||R(L(this.git0),25),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||L(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||L(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||me,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ye}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]})}},g(Sr,"Theme"),Sr),ec=g(e=>{const t=new qy;return t.calculate(e),t},"getThemeVariables"),Tr,zy=(Tr=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=O("#cde498",10),this.primaryBorderColor=lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=lt(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.primaryColor),this.lineColor=L(this.background),this.textColor=L(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,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.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){this.actorBorder=R(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||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||R(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||R(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=R(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||R(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||C(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]||C(this.mainBkg,{h:30,s:-30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||C(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||O(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||O(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=C(this.primaryColor,{h:64}),this.fillType3=C(this.secondaryColor,{h:64}),this.fillType4=C(this.primaryColor,{h:-64}),this.fillType5=C(this.secondaryColor,{h:-64}),this.fillType6=C(this.primaryColor,{h:128}),this.fillType7=C(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||C(this.primaryColor,{l:-30}),this.pie5=this.pie5||C(this.secondaryColor,{l:-30}),this.pie6=this.pie6||C(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||C(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||C(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||C(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||C(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||C(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||C(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.venn1=this.venn1??C(this.primaryColor,{l:-30}),this.venn2=this.venn2??C(this.secondaryColor,{l:-30}),this.venn3=this.venn3??C(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??C(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??C(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??C(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??C(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??C(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||C(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?O(this.quadrant1Fill):R(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.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||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||C(this.primaryColor,{h:-30}),this.git4=this.git4||C(this.primaryColor,{h:-60}),this.git5=this.git5||C(this.primaryColor,{h:-90}),this.git6=this.git6||C(this.primaryColor,{h:60}),this.git7=this.git7||C(this.primaryColor,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||L(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||L(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||me,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ye}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]})}},g(Tr,"Theme"),Tr),Wy=g(e=>{const t=new zy;return t.calculate(e),t},"getThemeVariables"),_r,jy=(_r=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=O(this.contrast,55),this.background="#ffffff",this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=lt(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.lineColor=L(this.background),this.textColor=L(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.radius=5,this.strokeWidth=1,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.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||O(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){this.secondBkg=O(this.contrast,55),this.border2=this.contrast,this.actorBorder=O(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]||L(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||O(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||R(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]||C(this.mainBkg,{l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||C(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=O(this.contrast,30),this.sectionBkgColor2=O(this.contrast,30),this.taskBorderColor=R(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=O(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=R(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=C(this.primaryColor,{h:64}),this.fillType3=C(this.secondaryColor,{h:64}),this.fillType4=C(this.primaryColor,{h:-64}),this.fillType5=C(this.secondaryColor,{h:-64}),this.fillType6=C(this.primaryColor,{h:128}),this.fillType7=C(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";for(let t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??this["cScale"+t];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||C(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?O(this.quadrant1Fill):R(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,dataLabelColor:this.xyChart?.dataLabelColor||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.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},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=R(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||C(this.primaryColor,{h:-30}),this.git4=this.pie5||C(this.primaryColor,{h:-60}),this.git5=this.pie6||C(this.primaryColor,{h:-90}),this.git6=this.pie7||C(this.primaryColor,{h:60}),this.git7=this.pie8||C(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||me,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ye}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]})}},g(_r,"Theme"),_r),Hy=g(e=>{const t=new jy;return t.calculate(e),t},"getThemeVariables"),Br,Yy=(Br=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=lt(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||lt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||lt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=C(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||O(t,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.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,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.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||t,this.cScale1=this.cScale1||r,this.cScale2=this.cScale2||i,this.cScale3=this.cScale3||C(t,{h:30}),this.cScale4=this.cScale4||C(t,{h:60}),this.cScale5=this.cScale5||C(t,{h:90}),this.cScale6=this.cScale6||C(t,{h:120}),this.cScale7=this.cScale7||C(t,{h:150}),this.cScale8=this.cScale8||C(t,{h:210,l:150}),this.cScale9=this.cScale9||C(t,{h:270}),this.cScale10=this.cScale10||C(t,{h:300}),this.cScale11=this.cScale11||C(t,{h:330}),this.darkMode)for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=R(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=R(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||L(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this.darkMode?this["cScalePeer"+o]=this["cScalePeer"+o]||O(this["cScale"+o],10):this["cScalePeer"+o]=this["cScalePeer"+o]||R(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||C(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||C(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||C(t,{h:64}),this.fillType3=this.fillType3||C(r,{h:64}),this.fillType4=this.fillType4||C(t,{h:-64}),this.fillType5=this.fillType5||C(r,{h:-64}),this.fillType6=this.fillType6||C(t,{h:128}),this.fillType7=this.fillType7||C(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||C(t,{l:-10}),this.pie5=this.pie5||C(r,{l:-10}),this.pie6=this.pie6||C(i,{l:-10}),this.pie7=this.pie7||C(t,{h:60,l:-10}),this.pie8=this.pie8||C(t,{h:-60,l:-10}),this.pie9=this.pie9||C(t,{h:120,l:0}),this.pie10=this.pie10||C(t,{h:60,l:-20}),this.pie11=this.pie11||C(t,{h:-60,l:-20}),this.pie12=this.pie12||C(t,{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.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||C(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?O(this.quadrant1Fill):R(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||t,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?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||C(t,{h:-30}),this.git4=this.git4||C(t,{h:-60}),this.git5=this.git5||C(t,{h:-90}),this.git6=this.git6||C(t,{h:60}),this.git7=this.git7||C(t,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||me,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ye}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]})}},g(Br,"Theme"),Br),Uy=g(e=>{const t=new Yy;return t.calculate(e),t},"getThemeVariables"),Lr,Xy=(Lr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=O(this.primaryColor,16),this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.background),this.secondaryBorderColor=lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=lt(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=O(L("#323D47"),10),this.border1="#ccc",this.border2=Te(255,255,255,.25),this.arrowheadColor=L(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||lt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||lt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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.border1,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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(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||O(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||this.primaryBorderColor,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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,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.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||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=R(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=R(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||L(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||O(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||R(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]||C(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||C(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||C(this.primaryColor,{h:64}),this.fillType3=this.fillType3||C(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||C(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||C(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||C(this.primaryColor,{h:128}),this.fillType7=this.fillType7||C(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||C(this.primaryColor,{l:-10}),this.pie5=this.pie5||C(this.secondaryColor,{l:-10}),this.pie6=this.pie6||C(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||C(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||C(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||C(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||C(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||C(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||C(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.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||C(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?O(this.quadrant1Fill):R(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?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||me,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ye}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]})}},g(Lr,"Theme"),Lr),Gy=g(e=>{const t=new Xy;return t.calculate(e),t},"getThemeVariables"),Fr,Vy=(Fr=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=lt("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||lt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||lt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?R(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=C(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||O(t,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.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,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.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=this.mainBkg;if(this.darkMode)for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=R(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=R(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||L(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this.darkMode?this["cScalePeer"+o]=this["cScalePeer"+o]||O(this["cScale"+o],10):this["cScalePeer"+o]=this["cScalePeer"+o]||R(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||C(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||C(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||C(t,{h:64}),this.fillType3=this.fillType3||C(r,{h:64}),this.fillType4=this.fillType4||C(t,{h:-64}),this.fillType5=this.fillType5||C(r,{h:-64}),this.fillType6=this.fillType6||C(t,{h:128}),this.fillType7=this.fillType7||C(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||C(t,{l:-10}),this.pie5=this.pie5||C(r,{l:-10}),this.pie6=this.pie6||C(i,{l:-10}),this.pie7=this.pie7||C(t,{h:60,l:-10}),this.pie8=this.pie8||C(t,{h:-60,l:-10}),this.pie9=this.pie9||C(t,{h:120,l:0}),this.pie10=this.pie10||C(t,{h:60,l:-20}),this.pie11=this.pie11||C(t,{h:-60,l:-20}),this.pie12=this.pie12||C(t,{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.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||C(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?O(this.quadrant1Fill):R(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||t,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?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||C(t,{h:-30}),this.git4=this.git4||C(t,{h:-60}),this.git5=this.git5||C(t,{h:-90}),this.git6=this.git6||C(t,{h:60}),this.git7=this.git7||C(t,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||me,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ye}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]})}},g(Fr,"Theme"),Fr),Zy=g(e=>{const t=new Vy;return t.calculate(e),t},"getThemeVariables"),Mr,Ky=(Mr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=O(this.primaryColor,16),this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.background),this.secondaryBorderColor=lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=lt(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=O(L("#323D47"),10),this.border1="#ccc",this.border2=Te(255,255,255,.25),this.arrowheadColor=L(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||lt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||lt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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.border1,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?R(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(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||O(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.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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,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.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||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=R(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=R(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||L(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||O(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||R(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]||C(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||C(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||C(this.primaryColor,{h:64}),this.fillType3=this.fillType3||C(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||C(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||C(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||C(this.primaryColor,{h:128}),this.fillType7=this.fillType7||C(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||C(this.primaryColor,{l:-10}),this.pie5=this.pie5||C(this.secondaryColor,{l:-10}),this.pie6=this.pie6||C(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||C(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||C(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||C(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||C(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||C(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||C(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.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||C(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?O(this.quadrant1Fill):R(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?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||C(this.primaryColor,{h:-30}),this.git4=this.git4||C(this.primaryColor,{h:-60}),this.git5=this.git5||C(this.primaryColor,{h:-90}),this.git6=this.git6||C(this.primaryColor,{h:60}),this.git7=this.git7||C(this.primaryColor,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||me,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ye}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]})}},g(Mr,"Theme"),Mr),Qy=g(e=>{const t=new Ky;return t.calculate(e),t},"getThemeVariables"),Ar,Jy=(Ar=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=lt(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||lt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||lt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=C(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||O(t,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.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,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.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||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||L(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this.darkMode?this["cScalePeer"+o]=this["cScalePeer"+o]||O(this["cScale"+o],10):this["cScalePeer"+o]=this["cScalePeer"+o]||R(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||C(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||C(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||C(t,{h:64}),this.fillType3=this.fillType3||C(r,{h:64}),this.fillType4=this.fillType4||C(t,{h:-64}),this.fillType5=this.fillType5||C(r,{h:-64}),this.fillType6=this.fillType6||C(t,{h:128}),this.fillType7=this.fillType7||C(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||C(t,{l:-10}),this.pie5=this.pie5||C(r,{l:-10}),this.pie6=this.pie6||C(i,{l:-10}),this.pie7=this.pie7||C(t,{h:60,l:-10}),this.pie8=this.pie8||C(t,{h:-60,l:-10}),this.pie9=this.pie9||C(t,{h:120,l:0}),this.pie10=this.pie10||C(t,{h:60,l:-20}),this.pie11=this.pie11||C(t,{h:-60,l:-20}),this.pie12=this.pie12||C(t,{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.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||C(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?O(this.quadrant1Fill):R(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||t,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?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||C(t,{h:-30}),this.git4=this.git4||C(t,{h:-60}),this.git5=this.git5||C(t,{h:-90}),this.git6=this.git6||C(t,{h:60}),this.git7=this.git7||C(t,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||me,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ye}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]})}},g(Ar,"Theme"),Ar),tx=g(e=>{const t=new Jy;return t.calculate(e),t},"getThemeVariables"),Er,ex=(Er=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=O(this.primaryColor,16),this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.background),this.secondaryBorderColor=lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=lt(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=O(L("#323D47"),10),this.border1="#ccc",this.border2=Te(255,255,255,.25),this.arrowheadColor=L(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||lt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||lt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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.border1,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?R(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(this.lineColor),this.rootLabelColor="#FFFFFF",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||O(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.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,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.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||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||L(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||O(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||R(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=R(this["cScale"+r],75);const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||C(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||C(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||C(this.primaryColor,{h:64}),this.fillType3=this.fillType3||C(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||C(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||C(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||C(this.primaryColor,{h:128}),this.fillType7=this.fillType7||C(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||C(this.primaryColor,{l:-10}),this.pie5=this.pie5||C(this.secondaryColor,{l:-10}),this.pie6=this.pie6||C(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||C(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||C(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||C(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||C(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||C(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||C(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.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||C(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?O(this.quadrant1Fill):R(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?R(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||C(this.primaryColor,{h:-30}),this.git4=this.git4||C(this.primaryColor,{h:-60}),this.git5=this.git5||C(this.primaryColor,{h:-90}),this.git6=this.git6||C(this.primaryColor,{h:60}),this.git7=this.git7||C(this.primaryColor,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||me,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ye}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]})}},g(Er,"Theme"),Er),rx=g(e=>{const t=new ex;return t.calculate(e),t},"getThemeVariables"),_e={base:{getThemeVariables:Ry},dark:{getThemeVariables:Ny},default:{getThemeVariables:ec},forest:{getThemeVariables:Wy},neutral:{getThemeVariables:Hy},neo:{getThemeVariables:Uy},"neo-dark":{getThemeVariables:Gy},redux:{getThemeVariables:Zy},"redux-dark":{getThemeVariables:Qy},"redux-color":{getThemeVariables:tx},"redux-dark-color":{getThemeVariables:rx}},Rt={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,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,hierarchicalNamespaces:!0},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,showDataLabelOutsideBar:!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"},ishikawa:{useMaxWidth:!0,diagramPadding:20},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:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},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},rc={...Rt,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:_e.default.getThemeVariables(),sequence:{...Rt.sequence,messageFont:g(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:g(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:g(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...Rt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Rt.c4,useWidth:void 0,personFont:g(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Rt.flowchart,inheritDir:!1},external_personFont:g(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:g(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:g(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:g(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:g(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:g(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:g(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:g(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:g(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:g(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:g(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:g(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:g(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:g(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:g(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:g(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:g(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:g(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:g(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:g(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:g(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Rt.pie,useWidth:984},xyChart:{...Rt.xyChart,useWidth:void 0},requirement:{...Rt.requirement,useWidth:void 0},packet:{...Rt.packet},eventmodeling:{...Rt.eventmodeling},treeView:{...Rt.treeView,useWidth:void 0},radar:{...Rt.radar},ishikawa:{...Rt.ishikawa},sankey:{...Rt.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...Rt.venn}},ic=g((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...ic(e[i],"")]:[...r,t+i],[]),"keyify"),ix=new Set(ic(rc,"")),Qa=rc,ps=g(e=>{if(j.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>ps(t));return}for(const t of Object.keys(e)){if(j.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!ix.has(t)||e[t]==null){j.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){if(t==="nodeColors"){const i=/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i;for(const s of Object.keys(e[t]))(typeof e[t][s]!="string"||!i.test(e[t][s]))&&(j.debug("sanitize deleting invalid color:",s,e[t][s]),delete e[t][s])}else j.debug("sanitizing object",t),ps(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(j.debug("sanitizing css option",t),e[t]=sc(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]="")}j.debug("After sanitization",e)}},"sanitizeDirective"),sc=g(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"),Pr=Object.freeze(Qa),Me=g(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),jt=vt({},Pr),ms,rr=[],yi=vt({},Pr),Gs=g((e,t)=>{let r=vt({},e),i={};for(const s of t)nc(s),i=vt(i,s);if(r=vt(r,i),i.theme&&i.theme in _e){const s=vt({},ms),o=vt(s.themeVariables||{},i.themeVariables);r.theme&&r.theme in _e&&(r.themeVariables=_e[r.theme].getThemeVariables(o))}return yi=r,hc(yi),yi},"updateCurrentConfig"),sx=g(e=>(jt=vt({},Pr),jt=vt(jt,e),e.theme&&_e[e.theme]&&(jt.themeVariables=_e[e.theme].getThemeVariables(e.themeVariables)),Gs(jt,rr),jt),"setSiteConfig"),ox=g(e=>{ms=vt({},e)},"saveConfigFromInitialize"),ax=g(e=>(jt=vt(jt,e),Gs(jt,rr),jt),"updateSiteConfig"),oc=g(()=>vt({},jt),"getSiteConfig"),ac=g(e=>(hc(e),vt(yi,e),Ct()),"setConfig"),Ct=g(()=>vt({},yi),"getConfig"),nc=g(e=>{e&&(["secure",...jt.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(j.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"&&nc(e[t])}))},"sanitize"),nx=g(e=>{ps(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),rr.push(e),Gs(jt,rr)},"addDirective"),ys=g((e=jt)=>{rr=[],Gs(e,rr)},"reset"),lx={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},bl={},lc=g(e=>{bl[e]||(j.warn(lx[e]),bl[e]=!0)},"issueWarning"),hc=g(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&lc("LAZY_LOAD_DEPRECATED")},"checkConfig"),hx=g(()=>{let e={};ms&&(e=vt(e,ms));for(const t of rr)e=vt(e,t);return e},"getUserDefinedConfig"),Pt=g(e=>(e.flowchart?.htmlLabels!=null&&lc("FLOWCHART_HTML_LABELS_DEPRECATED"),Me(e.htmlLabels??e.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),Hr=/<br\s*\/?>/gi,cx=g(e=>e?uc(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),dx=(()=>{let e=!1;return()=>{e||(cc(),e=!0)}})();function cc(){const e="data-temp-href-target";tr.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),tr.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"))})}g(cc,"setupDompurifyHooks");var dc=g(e=>(dx(),tr.sanitize(e)),"removeScript"),kl=g((e,t)=>{if(Pt(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=dc(e):r!=="loose"&&(e=uc(e),e=e.replace(/</g,"<").replace(/>/g,">"),e=e.replace(/=/g,"="),e=px(e))}return e},"sanitizeMore"),Kt=g((e,t)=>e&&(t.dompurifyConfig?e=tr.sanitize(kl(e,t),t.dompurifyConfig).toString():e=tr.sanitize(kl(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),ux=g((e,t)=>typeof e=="string"?Kt(e,t):e.flat().map(r=>Kt(r,t)),"sanitizeTextOrArray"),fx=g(e=>Hr.test(e),"hasBreaks"),gx=g(e=>e.split(Hr),"splitBreaks"),px=g(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),uc=g(e=>e.replace(Hr,"#br#"),"breakToPlaceholder"),fc=g(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),mx=g(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),yx=g(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),Ho=g(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let s=t[i];if(s===","&&i>0&&i+1<t.length){const o=t[i-1],a=t[i+1];xx(o,a)&&(s=o+","+a,i++,r.pop())}r.push(Cx(s))}return r.join("")},"parseGenericTypes"),Yo=g((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),xx=g((e,t)=>{const r=Yo(e,"~"),i=Yo(t,"~");return r===1&&i===1},"shouldCombineSets"),Cx=g(e=>{const t=Yo(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let s=i.indexOf("~"),o=i.lastIndexOf("~");for(;s!==-1&&o!==-1&&s!==o;)i[s]="<",i[o]=">",s=i.indexOf("~"),o=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),wl=g(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Uo=/\$\$(.*)\$\$/g,Or=g(e=>(e.match(Uo)?.length??0)>0,"hasKatex"),bx=g(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Ja(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 s={width:r.clientWidth,height:r.clientHeight};return r.remove(),s},"calculateMathMLDimensions"),kx=g(async(e,t)=>{if(!Or(e))return e;if(!(wl()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Uo,"MathML is unsupported in this environment.");{const{default:r}=await import("katex"),i=t.forceLegacyMathML||!wl()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Hr).map(s=>Or(s)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${s}</div>`:`<div>${s}</div>`).join("").replace(Uo,(s,o)=>r.renderToString(o,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Ja=g(async(e,t)=>Kt(await kx(e,t),t),"renderKatexSanitized"),Yr={getRows:cx,sanitizeText:Kt,sanitizeTextOrArray:ux,hasBreaks:fx,splitBreaks:gx,lineBreakRegex:Hr,removeScript:dc,getUrl:fc,evaluate:Me,getMax:mx,getMin:yx},wx=g(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),vx=g(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"),tn=g(function(e,t,r,i){const s=vx(t,r,i);wx(e,s)},"configureSvgSize"),gc=g(function(e,t,r,i){const s=t.node().getBBox(),o=s.width,a=s.height;j.info(`SVG bounds: ${o}x${a}`,s);let n=0,l=0;j.info(`Graph bounds: ${n}x${l}`,e),n=o+r*2,l=a+r*2,j.info(`Calculated bounds: ${n}x${l}`),tn(t,l,n,i);const c=`${s.x-r} ${s.y-r} ${s.width+2*r} ${s.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),is={};function Xo(e){return[...e.cssRules].map(t=>t.cssText).join(`
|
|
8
|
+
`)}g(Xo,"cssStyleSheetToString");var Sx=g((e,t,r,i)=>{let s="";return e in is&&is[e]?s=is[e]({...r,svgId:i}):j.warn(`No theme found for ${e}`),` & {
|
|
9
|
+
font-family: ${r.fontFamily};
|
|
10
|
+
font-size: ${r.fontSize};
|
|
11
|
+
fill: ${r.textColor}
|
|
12
|
+
}
|
|
13
|
+
@keyframes edge-animation-frame {
|
|
14
|
+
from {
|
|
15
|
+
stroke-dashoffset: 0;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
@keyframes dash {
|
|
19
|
+
to {
|
|
20
|
+
stroke-dashoffset: 0;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
& .edge-animation-slow {
|
|
24
|
+
stroke-dasharray: 9,5 !important;
|
|
25
|
+
stroke-dashoffset: 900;
|
|
26
|
+
animation: dash 50s linear infinite;
|
|
27
|
+
stroke-linecap: round;
|
|
28
|
+
}
|
|
29
|
+
& .edge-animation-fast {
|
|
30
|
+
stroke-dasharray: 9,5 !important;
|
|
31
|
+
stroke-dashoffset: 900;
|
|
32
|
+
animation: dash 20s linear infinite;
|
|
33
|
+
stroke-linecap: round;
|
|
34
|
+
}
|
|
35
|
+
/* Classes common for multiple diagrams */
|
|
36
|
+
|
|
37
|
+
& .error-icon {
|
|
38
|
+
fill: ${r.errorBkgColor};
|
|
39
|
+
}
|
|
40
|
+
& .error-text {
|
|
41
|
+
fill: ${r.errorTextColor};
|
|
42
|
+
stroke: ${r.errorTextColor};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
& .edge-thickness-normal {
|
|
46
|
+
stroke-width: ${r.strokeWidth??1}px;
|
|
47
|
+
}
|
|
48
|
+
& .edge-thickness-thick {
|
|
49
|
+
stroke-width: 3.5px
|
|
50
|
+
}
|
|
51
|
+
& .edge-pattern-solid {
|
|
52
|
+
stroke-dasharray: 0;
|
|
53
|
+
}
|
|
54
|
+
& .edge-thickness-invisible {
|
|
55
|
+
stroke-width: 0;
|
|
56
|
+
fill: none;
|
|
57
|
+
}
|
|
58
|
+
& .edge-pattern-dashed{
|
|
59
|
+
stroke-dasharray: 3;
|
|
60
|
+
}
|
|
61
|
+
.edge-pattern-dotted {
|
|
62
|
+
stroke-dasharray: 2;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
& .marker {
|
|
66
|
+
fill: ${r.lineColor};
|
|
67
|
+
stroke: ${r.lineColor};
|
|
68
|
+
}
|
|
69
|
+
& .marker.cross {
|
|
70
|
+
stroke: ${r.lineColor};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
& svg {
|
|
74
|
+
font-family: ${r.fontFamily};
|
|
75
|
+
font-size: ${r.fontSize};
|
|
76
|
+
}
|
|
77
|
+
& p {
|
|
78
|
+
margin: 0
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
${s}
|
|
82
|
+
.node .neo-node {
|
|
83
|
+
stroke: ${r.nodeBorder};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
[data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
|
|
87
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
88
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
[data-look="neo"].node path {
|
|
93
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
94
|
+
stroke-width: ${r.strokeWidth??1}px;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
[data-look="neo"].node .outer-path {
|
|
98
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
[data-look="neo"].node .neo-line path {
|
|
102
|
+
stroke: ${r.nodeBorder};
|
|
103
|
+
filter: none;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
[data-look="neo"].node circle{
|
|
107
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
108
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
[data-look="neo"].node circle .state-start{
|
|
112
|
+
fill: #000000;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
[data-look="neo"].icon-shape .icon {
|
|
116
|
+
fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
117
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
[data-look="neo"].icon-shape .icon-neo path {
|
|
121
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
122
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
${t}
|
|
126
|
+
`},"getStyles"),Tx=g((e,t)=>{t!==void 0&&(is[e]=t)},"addStylesForDiagram"),_x=Sx,en={};Zh(en,{clear:()=>pc,getAccDescription:()=>Cc,getAccTitle:()=>yc,getDiagramTitle:()=>kc,setAccDescription:()=>xc,setAccTitle:()=>mc,setDiagramTitle:()=>bc});var rn="",sn="",on="",an=g(e=>Kt(e,Ct()),"sanitizeText"),pc=g(()=>{rn="",on="",sn=""},"clear"),mc=g(e=>{rn=an(e).replace(/^\s+/g,"")},"setAccTitle"),yc=g(()=>rn,"getAccTitle"),xc=g(e=>{on=an(e).replace(/\n\s+/g,`
|
|
127
|
+
`)},"setAccDescription"),Cc=g(()=>on,"getAccDescription"),bc=g(e=>{sn=an(e)},"setDiagramTitle"),kc=g(()=>sn,"getDiagramTitle"),vl=j,Bx=Va,pt=Ct,Lx=ac,Fx=Pr,nn=g(e=>Kt(e,pt()),"sanitizeText"),wc=gc,Mx=g(()=>en,"getCommonDb"),xs={},Cs=g((e,t,r)=>{xs[e]&&vl.warn(`Diagram with id ${e} already registered. Overwriting.`),xs[e]=t,r&&tc(e,r),Tx(e,t.styles),t.injectUtils?.(vl,Bx,pt,nn,wc,Mx(),()=>{})},"registerDiagram"),Go=g(e=>{if(e in xs)return xs[e];throw new Ax(e)},"getDiagram"),$r,Ax=($r=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},g($r,"DiagramNotFoundError"),$r),Ex={value:()=>{}};function vc(){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 ss(r)}function ss(e){this._=e}function $x(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",s=r.indexOf(".");if(s>=0&&(i=r.slice(s+1),r=r.slice(0,s)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}ss.prototype=vc.prototype={constructor:ss,on:function(e,t){var r=this._,i=$x(e+"",r),s,o=-1,a=i.length;if(arguments.length<2){for(;++o<a;)if((s=(e=i[o]).type)&&(s=Ix(r[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<a;)if(s=(e=i[o]).type)r[s]=Sl(r[s],e.name,t);else if(t==null)for(s in r)r[s]=Sl(r[s],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new ss(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var r=new Array(s),i=0,s,o;i<s;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],i=0,s=o.length;i<s;++i)o[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],s=0,o=i.length;s<o;++s)i[s].value.apply(t,r)}};function Ix(e,t){for(var r=0,i=e.length,s;r<i;++r)if((s=e[r]).name===t)return s.value}function Sl(e,t,r){for(var i=0,s=e.length;i<s;++i)if(e[i].name===t){e[i]=Ex,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var Vo="http://www.w3.org/1999/xhtml";const Tl={svg:"http://www.w3.org/2000/svg",xhtml:Vo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Vs(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Tl.hasOwnProperty(t)?{space:Tl[t],local:e}:e}function Px(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Vo&&t.documentElement.namespaceURI===Vo?t.createElement(e):t.createElementNS(r,e)}}function Ox(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Sc(e){var t=Vs(e);return(t.local?Ox:Px)(t)}function Rx(){}function ln(e){return e==null?Rx:function(){return this.querySelector(e)}}function Dx(e){typeof e!="function"&&(e=ln(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var o=t[s],a=o.length,n=i[s]=new Array(a),l,c,h=0;h<a;++h)(l=o[h])&&(c=e.call(l,l.__data__,h,o))&&("__data__"in l&&(c.__data__=l.__data__),n[h]=c);return new Gt(i,this._parents)}function Nx(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function qx(){return[]}function Tc(e){return e==null?qx:function(){return this.querySelectorAll(e)}}function zx(e){return function(){return Nx(e.apply(this,arguments))}}function Wx(e){typeof e=="function"?e=zx(e):e=Tc(e);for(var t=this._groups,r=t.length,i=[],s=[],o=0;o<r;++o)for(var a=t[o],n=a.length,l,c=0;c<n;++c)(l=a[c])&&(i.push(e.call(l,l.__data__,c,a)),s.push(l));return new Gt(i,s)}function _c(e){return function(){return this.matches(e)}}function Bc(e){return function(t){return t.matches(e)}}var jx=Array.prototype.find;function Hx(e){return function(){return jx.call(this.children,e)}}function Yx(){return this.firstElementChild}function Ux(e){return this.select(e==null?Yx:Hx(typeof e=="function"?e:Bc(e)))}var Xx=Array.prototype.filter;function Gx(){return Array.from(this.children)}function Vx(e){return function(){return Xx.call(this.children,e)}}function Zx(e){return this.selectAll(e==null?Gx:Vx(typeof e=="function"?e:Bc(e)))}function Kx(e){typeof e!="function"&&(e=_c(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var o=t[s],a=o.length,n=i[s]=[],l,c=0;c<a;++c)(l=o[c])&&e.call(l,l.__data__,c,o)&&n.push(l);return new Gt(i,this._parents)}function Lc(e){return new Array(e.length)}function Qx(){return new Gt(this._enter||this._groups.map(Lc),this._parents)}function bs(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}bs.prototype={constructor:bs,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 Jx(e){return function(){return e}}function tC(e,t,r,i,s,o){for(var a=0,n,l=t.length,c=o.length;a<c;++a)(n=t[a])?(n.__data__=o[a],i[a]=n):r[a]=new bs(e,o[a]);for(;a<l;++a)(n=t[a])&&(s[a]=n)}function eC(e,t,r,i,s,o,a){var n,l,c=new Map,h=t.length,d=o.length,f=new Array(h),u;for(n=0;n<h;++n)(l=t[n])&&(f[n]=u=a.call(l,l.__data__,n,t)+"",c.has(u)?s[n]=l:c.set(u,l));for(n=0;n<d;++n)u=a.call(e,o[n],n,o)+"",(l=c.get(u))?(i[n]=l,l.__data__=o[n],c.delete(u)):r[n]=new bs(e,o[n]);for(n=0;n<h;++n)(l=t[n])&&c.get(f[n])===l&&(s[n]=l)}function rC(e){return e.__data__}function iC(e,t){if(!arguments.length)return Array.from(this,rC);var r=t?eC:tC,i=this._parents,s=this._groups;typeof e!="function"&&(e=Jx(e));for(var o=s.length,a=new Array(o),n=new Array(o),l=new Array(o),c=0;c<o;++c){var h=i[c],d=s[c],f=d.length,u=sC(e.call(h,h&&h.__data__,c,i)),p=u.length,m=n[c]=new Array(p),y=a[c]=new Array(p),x=l[c]=new Array(f);r(h,d,m,y,x,u,t);for(var b=0,k=0,S,v;b<p;++b)if(S=m[b]){for(b>=k&&(k=b+1);!(v=y[k])&&++k<p;);S._next=v||null}}return a=new Gt(a,i),a._enter=n,a._exit=l,a}function sC(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function oC(){return new Gt(this._exit||this._groups.map(Lc),this._parents)}function aC(e,t,r){var i=this.enter(),s=this,o=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(s=t(s),s&&(s=s.selection())),r==null?o.remove():r(o),i&&s?i.merge(s).order():s}function nC(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,s=r.length,o=i.length,a=Math.min(s,o),n=new Array(s),l=0;l<a;++l)for(var c=r[l],h=i[l],d=c.length,f=n[l]=new Array(d),u,p=0;p<d;++p)(u=c[p]||h[p])&&(f[p]=u);for(;l<s;++l)n[l]=r[l];return new Gt(n,this._parents)}function lC(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],s=i.length-1,o=i[s],a;--s>=0;)(a=i[s])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function hC(e){e||(e=cC);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var r=this._groups,i=r.length,s=new Array(i),o=0;o<i;++o){for(var a=r[o],n=a.length,l=s[o]=new Array(n),c,h=0;h<n;++h)(c=a[h])&&(l[h]=c);l.sort(t)}return new Gt(s,this._parents).order()}function cC(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function dC(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function uC(){return Array.from(this)}function fC(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,o=i.length;s<o;++s){var a=i[s];if(a)return a}return null}function gC(){let e=0;for(const t of this)++e;return e}function pC(){return!this.node()}function mC(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var s=t[r],o=0,a=s.length,n;o<a;++o)(n=s[o])&&e.call(n,n.__data__,o,s);return this}function yC(e){return function(){this.removeAttribute(e)}}function xC(e){return function(){this.removeAttributeNS(e.space,e.local)}}function CC(e,t){return function(){this.setAttribute(e,t)}}function bC(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function kC(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function wC(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 vC(e,t){var r=Vs(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?xC:yC:typeof t=="function"?r.local?wC:kC:r.local?bC:CC)(r,t))}function Fc(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function SC(e){return function(){this.style.removeProperty(e)}}function TC(e,t,r){return function(){this.style.setProperty(e,t,r)}}function _C(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function BC(e,t,r){return arguments.length>1?this.each((t==null?SC:typeof t=="function"?_C:TC)(e,t,r??"")):Rr(this.node(),e)}function Rr(e,t){return e.style.getPropertyValue(t)||Fc(e).getComputedStyle(e,null).getPropertyValue(t)}function LC(e){return function(){delete this[e]}}function FC(e,t){return function(){this[e]=t}}function MC(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function AC(e,t){return arguments.length>1?this.each((t==null?LC:typeof t=="function"?MC:FC)(e,t)):this.node()[e]}function Mc(e){return e.trim().split(/^|\s+/)}function hn(e){return e.classList||new Ac(e)}function Ac(e){this._node=e,this._names=Mc(e.getAttribute("class")||"")}Ac.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 Ec(e,t){for(var r=hn(e),i=-1,s=t.length;++i<s;)r.add(t[i])}function $c(e,t){for(var r=hn(e),i=-1,s=t.length;++i<s;)r.remove(t[i])}function EC(e){return function(){Ec(this,e)}}function $C(e){return function(){$c(this,e)}}function IC(e,t){return function(){(t.apply(this,arguments)?Ec:$c)(this,e)}}function PC(e,t){var r=Mc(e+"");if(arguments.length<2){for(var i=hn(this.node()),s=-1,o=r.length;++s<o;)if(!i.contains(r[s]))return!1;return!0}return this.each((typeof t=="function"?IC:t?EC:$C)(r,t))}function OC(){this.textContent=""}function RC(e){return function(){this.textContent=e}}function DC(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function NC(e){return arguments.length?this.each(e==null?OC:(typeof e=="function"?DC:RC)(e)):this.node().textContent}function qC(){this.innerHTML=""}function zC(e){return function(){this.innerHTML=e}}function WC(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function jC(e){return arguments.length?this.each(e==null?qC:(typeof e=="function"?WC:zC)(e)):this.node().innerHTML}function HC(){this.nextSibling&&this.parentNode.appendChild(this)}function YC(){return this.each(HC)}function UC(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function XC(){return this.each(UC)}function GC(e){var t=typeof e=="function"?e:Sc(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function VC(){return null}function ZC(e,t){var r=typeof e=="function"?e:Sc(e),i=t==null?VC:typeof t=="function"?t:ln(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function KC(){var e=this.parentNode;e&&e.removeChild(this)}function QC(){return this.each(KC)}function JC(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function tb(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function eb(e){return this.select(e?tb:JC)}function rb(e){return arguments.length?this.property("__data__",e):this.node().__data__}function ib(e){return function(t){e.call(this,t,this.__data__)}}function sb(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 ob(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,s=t.length,o;r<s;++r)o=t[r],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++i]=o;++i?t.length=i:delete this.__on}}}function ab(e,t,r){return function(){var i=this.__on,s,o=ib(t);if(i){for(var a=0,n=i.length;a<n;++a)if((s=i[a]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=o,s.options=r),s.value=t;return}}this.addEventListener(e.type,o,r),s={type:e.type,name:e.name,value:t,listener:o,options:r},i?i.push(s):this.__on=[s]}}function nb(e,t,r){var i=sb(e+""),s,o=i.length,a;if(arguments.length<2){var n=this.node().__on;if(n){for(var l=0,c=n.length,h;l<c;++l)for(s=0,h=n[l];s<o;++s)if((a=i[s]).type===h.type&&a.name===h.name)return h.value}return}for(n=t?ab:ob,s=0;s<o;++s)this.each(n(i[s],t,r));return this}function Ic(e,t,r){var i=Fc(e),s=i.CustomEvent;typeof s=="function"?s=new s(t,r):(s=i.document.createEvent("Event"),r?(s.initEvent(t,r.bubbles,r.cancelable),s.detail=r.detail):s.initEvent(t,!1,!1)),e.dispatchEvent(s)}function lb(e,t){return function(){return Ic(this,e,t)}}function hb(e,t){return function(){return Ic(this,e,t.apply(this,arguments))}}function cb(e,t){return this.each((typeof t=="function"?hb:lb)(e,t))}function*db(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,o=i.length,a;s<o;++s)(a=i[s])&&(yield a)}var Pc=[null];function Gt(e,t){this._groups=e,this._parents=t}function $i(){return new Gt([[document.documentElement]],Pc)}function ub(){return this}Gt.prototype=$i.prototype={constructor:Gt,select:Dx,selectAll:Wx,selectChild:Ux,selectChildren:Zx,filter:Kx,data:iC,enter:Qx,exit:oC,join:aC,merge:nC,selection:ub,order:lC,sort:hC,call:dC,nodes:uC,node:fC,size:gC,empty:pC,each:mC,attr:vC,style:BC,property:AC,classed:PC,text:NC,html:jC,raise:YC,lower:XC,append:GC,insert:ZC,remove:QC,clone:eb,datum:rb,on:nb,dispatch:cb,[Symbol.iterator]:db};function ct(e){return typeof e=="string"?new Gt([[document.querySelector(e)]],[document.documentElement]):new Gt([[e]],Pc)}function Zs(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function cn(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function Ur(){}var vi=.7,ks=1/vi,xr="\\s*([+-]?\\d+)\\s*",Si="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",fe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",fb=/^#([0-9a-f]{3,8})$/,gb=new RegExp(`^rgb\\(${xr},${xr},${xr}\\)$`),pb=new RegExp(`^rgb\\(${fe},${fe},${fe}\\)$`),mb=new RegExp(`^rgba\\(${xr},${xr},${xr},${Si}\\)$`),yb=new RegExp(`^rgba\\(${fe},${fe},${fe},${Si}\\)$`),xb=new RegExp(`^hsl\\(${Si},${fe},${fe}\\)$`),Cb=new RegExp(`^hsla\\(${Si},${fe},${fe},${Si}\\)$`),_l={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};Zs(Ur,Dr,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Bl,formatHex:Bl,formatHex8:bb,formatHsl:kb,formatRgb:Ll,toString:Ll});function Bl(){return this.rgb().formatHex()}function bb(){return this.rgb().formatHex8()}function kb(){return Rc(this).formatHsl()}function Ll(){return this.rgb().formatRgb()}function Dr(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=fb.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Fl(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=gb.exec(e))?new Dt(t[1],t[2],t[3],1):(t=pb.exec(e))?new Dt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=mb.exec(e))?ji(t[1],t[2],t[3],t[4]):(t=yb.exec(e))?ji(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=xb.exec(e))?El(t[1],t[2]/100,t[3]/100,1):(t=Cb.exec(e))?El(t[1],t[2]/100,t[3]/100,t[4]):_l.hasOwnProperty(e)?Fl(_l[e]):e==="transparent"?new Dt(NaN,NaN,NaN,0):null}function Fl(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 Oc(e){return e instanceof Ur||(e=Dr(e)),e?(e=e.rgb(),new Dt(e.r,e.g,e.b,e.opacity)):new Dt}function Zo(e,t,r,i){return arguments.length===1?Oc(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}Zs(Dt,Zo,cn(Ur,{brighter(e){return e=e==null?ks:Math.pow(ks,e),new Dt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?vi:Math.pow(vi,e),new Dt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Dt(Qe(this.r),Qe(this.g),Qe(this.b),ws(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:Ml,formatHex:Ml,formatHex8:wb,formatRgb:Al,toString:Al}));function Ml(){return`#${Ve(this.r)}${Ve(this.g)}${Ve(this.b)}`}function wb(){return`#${Ve(this.r)}${Ve(this.g)}${Ve(this.b)}${Ve((isNaN(this.opacity)?1:this.opacity)*255)}`}function Al(){const e=ws(this.opacity);return`${e===1?"rgb(":"rgba("}${Qe(this.r)}, ${Qe(this.g)}, ${Qe(this.b)}${e===1?")":`, ${e})`}`}function ws(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Qe(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ve(e){return e=Qe(e),(e<16?"0":"")+e.toString(16)}function El(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new ie(e,t,r,i)}function Rc(e){if(e instanceof ie)return new ie(e.h,e.s,e.l,e.opacity);if(e instanceof Ur||(e=Dr(e)),!e)return new ie;if(e instanceof ie)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,s=Math.min(t,r,i),o=Math.max(t,r,i),a=NaN,n=o-s,l=(o+s)/2;return n?(t===o?a=(r-i)/n+(r<i)*6:r===o?a=(i-t)/n+2:a=(t-r)/n+4,n/=l<.5?o+s:2-o-s,a*=60):n=l>0&&l<1?0:a,new ie(a,n,l,e.opacity)}function vb(e,t,r,i){return arguments.length===1?Rc(e):new ie(e,t,r,i??1)}function ie(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}Zs(ie,vb,cn(Ur,{brighter(e){return e=e==null?ks:Math.pow(ks,e),new ie(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?vi:Math.pow(vi,e),new ie(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,s=2*r-i;return new Dt(To(e>=240?e-240:e+120,s,i),To(e,s,i),To(e<120?e+240:e-120,s,i),this.opacity)},clamp(){return new ie($l(this.h),Hi(this.s),Hi(this.l),ws(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=ws(this.opacity);return`${e===1?"hsl(":"hsla("}${$l(this.h)}, ${Hi(this.s)*100}%, ${Hi(this.l)*100}%${e===1?")":`, ${e})`}`}}));function $l(e){return e=(e||0)%360,e<0?e+360:e}function Hi(e){return Math.max(0,Math.min(1,e||0))}function To(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 Ks=e=>()=>e;function Dc(e,t){return function(r){return e+r*t}}function Sb(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 Tb(e,t){var r=t-e;return r?Dc(e,r>180||r<-180?r-360*Math.round(r/360):r):Ks(isNaN(e)?t:e)}function _b(e){return(e=+e)==1?dn:function(t,r){return r-t?Sb(t,r,e):Ks(isNaN(t)?r:t)}}function dn(e,t){var r=t-e;return r?Dc(e,r):Ks(isNaN(e)?t:e)}const Ko=(function e(t){var r=_b(t);function i(s,o){var a=r((s=Zo(s)).r,(o=Zo(o)).r),n=r(s.g,o.g),l=r(s.b,o.b),c=dn(s.opacity,o.opacity);return function(h){return s.r=a(h),s.g=n(h),s.b=l(h),s.opacity=c(h),s+""}}return i.gamma=e,i})(1);function Se(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Qo=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,_o=new RegExp(Qo.source,"g");function Bb(e){return function(){return e}}function Lb(e){return function(t){return e(t)+""}}function Nc(e,t){var r=Qo.lastIndex=_o.lastIndex=0,i,s,o,a=-1,n=[],l=[];for(e=e+"",t=t+"";(i=Qo.exec(e))&&(s=_o.exec(t));)(o=s.index)>r&&(o=t.slice(r,o),n[a]?n[a]+=o:n[++a]=o),(i=i[0])===(s=s[0])?n[a]?n[a]+=s:n[++a]=s:(n[++a]=null,l.push({i:a,x:Se(i,s)})),r=_o.lastIndex;return r<t.length&&(o=t.slice(r),n[a]?n[a]+=o:n[++a]=o),n.length<2?l[0]?Lb(l[0].x):Bb(t):(t=l.length,function(c){for(var h=0,d;h<t;++h)n[(d=l[h]).i]=d.x(c);return n.join("")})}var Il=180/Math.PI,Jo={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function qc(e,t,r,i,s,o){var a,n,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*r+t*i)&&(r-=e*l,i-=t*l),(n=Math.sqrt(r*r+i*i))&&(r/=n,i/=n,l/=n),e*i<t*r&&(e=-e,t=-t,l=-l,a=-a),{translateX:s,translateY:o,rotate:Math.atan2(t,e)*Il,skewX:Math.atan(l)*Il,scaleX:a,scaleY:n}}var Yi;function Fb(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Jo:qc(t.a,t.b,t.c,t.d,t.e,t.f)}function Mb(e){return e==null||(Yi||(Yi=document.createElementNS("http://www.w3.org/2000/svg","g")),Yi.setAttribute("transform",e),!(e=Yi.transform.baseVal.consolidate()))?Jo:(e=e.matrix,qc(e.a,e.b,e.c,e.d,e.e,e.f))}function zc(e,t,r,i){function s(c){return c.length?c.pop()+" ":""}function o(c,h,d,f,u,p){if(c!==d||h!==f){var m=u.push("translate(",null,t,null,r);p.push({i:m-4,x:Se(c,d)},{i:m-2,x:Se(h,f)})}else(d||f)&&u.push("translate("+d+t+f+r)}function a(c,h,d,f){c!==h?(c-h>180?h+=360:h-c>180&&(c+=360),f.push({i:d.push(s(d)+"rotate(",null,i)-2,x:Se(c,h)})):h&&d.push(s(d)+"rotate("+h+i)}function n(c,h,d,f){c!==h?f.push({i:d.push(s(d)+"skewX(",null,i)-2,x:Se(c,h)}):h&&d.push(s(d)+"skewX("+h+i)}function l(c,h,d,f,u,p){if(c!==d||h!==f){var m=u.push(s(u)+"scale(",null,",",null,")");p.push({i:m-4,x:Se(c,d)},{i:m-2,x:Se(h,f)})}else(d!==1||f!==1)&&u.push(s(u)+"scale("+d+","+f+")")}return function(c,h){var d=[],f=[];return c=e(c),h=e(h),o(c.translateX,c.translateY,h.translateX,h.translateY,d,f),a(c.rotate,h.rotate,d,f),n(c.skewX,h.skewX,d,f),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,d,f),c=h=null,function(u){for(var p=-1,m=f.length,y;++p<m;)d[(y=f[p]).i]=y.x(u);return d.join("")}}}var Ab=zc(Fb,"px, ","px)","deg)"),Eb=zc(Mb,", ",")",")"),Nr=0,li=0,ti=0,Wc=1e3,vs,hi,Ss=0,ir=0,Qs=0,Ti=typeof performance=="object"&&performance.now?performance:Date,jc=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function un(){return ir||(jc($b),ir=Ti.now()+Qs)}function $b(){ir=0}function Ts(){this._call=this._time=this._next=null}Ts.prototype=Hc.prototype={constructor:Ts,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?un():+r)+(t==null?0:+t),!this._next&&hi!==this&&(hi?hi._next=this:vs=this,hi=this),this._call=e,this._time=r,ta()},stop:function(){this._call&&(this._call=null,this._time=1/0,ta())}};function Hc(e,t,r){var i=new Ts;return i.restart(e,t,r),i}function Ib(){un(),++Nr;for(var e=vs,t;e;)(t=ir-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Nr}function Pl(){ir=(Ss=Ti.now())+Qs,Nr=li=0;try{Ib()}finally{Nr=0,Ob(),ir=0}}function Pb(){var e=Ti.now(),t=e-Ss;t>Wc&&(Qs-=t,Ss=e)}function Ob(){for(var e,t=vs,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:vs=r);hi=e,ta(i)}function ta(e){if(!Nr){li&&(li=clearTimeout(li));var t=e-ir;t>24?(e<1/0&&(li=setTimeout(Pl,e-Ti.now()-Qs)),ti&&(ti=clearInterval(ti))):(ti||(Ss=Ti.now(),ti=setInterval(Pb,Wc)),Nr=1,jc(Pl))}}function Ol(e,t,r){var i=new Ts;return t=t==null?0:+t,i.restart(s=>{i.stop(),e(s+t)},t,r),i}var Rb=vc("start","end","cancel","interrupt"),Db=[],Yc=0,Rl=1,ea=2,os=3,Dl=4,ra=5,as=6;function Js(e,t,r,i,s,o){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;Nb(e,r,{name:t,index:i,group:s,on:Rb,tween:Db,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Yc})}function fn(e,t){var r=le(e,t);if(r.state>Yc)throw new Error("too late; already scheduled");return r}function xe(e,t){var r=le(e,t);if(r.state>os)throw new Error("too late; already running");return r}function le(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function Nb(e,t,r){var i=e.__transition,s;i[t]=r,r.timer=Hc(o,0,r.time);function o(c){r.state=Rl,r.timer.restart(a,r.delay,r.time),r.delay<=c&&a(c-r.delay)}function a(c){var h,d,f,u;if(r.state!==Rl)return l();for(h in i)if(u=i[h],u.name===r.name){if(u.state===os)return Ol(a);u.state===Dl?(u.state=as,u.timer.stop(),u.on.call("interrupt",e,e.__data__,u.index,u.group),delete i[h]):+h<t&&(u.state=as,u.timer.stop(),u.on.call("cancel",e,e.__data__,u.index,u.group),delete i[h])}if(Ol(function(){r.state===os&&(r.state=Dl,r.timer.restart(n,r.delay,r.time),n(c))}),r.state=ea,r.on.call("start",e,e.__data__,r.index,r.group),r.state===ea){for(r.state=os,s=new Array(f=r.tween.length),h=0,d=-1;h<f;++h)(u=r.tween[h].value.call(e,e.__data__,r.index,r.group))&&(s[++d]=u);s.length=d+1}}function n(c){for(var h=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(l),r.state=ra,1),d=-1,f=s.length;++d<f;)s[d].call(e,h);r.state===ra&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=as,r.timer.stop(),delete i[t];for(var c in i)return;delete e.__transition}}function qb(e,t){var r=e.__transition,i,s,o=!0,a;if(r){t=t==null?null:t+"";for(a in r){if((i=r[a]).name!==t){o=!1;continue}s=i.state>ea&&i.state<ra,i.state=as,i.timer.stop(),i.on.call(s?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[a]}o&&delete e.__transition}}function zb(e){return this.each(function(){qb(this,e)})}function Wb(e,t){var r,i;return function(){var s=xe(this,e),o=s.tween;if(o!==r){i=r=o;for(var a=0,n=i.length;a<n;++a)if(i[a].name===t){i=i.slice(),i.splice(a,1);break}}s.tween=i}}function jb(e,t,r){var i,s;if(typeof r!="function")throw new Error;return function(){var o=xe(this,e),a=o.tween;if(a!==i){s=(i=a).slice();for(var n={name:t,value:r},l=0,c=s.length;l<c;++l)if(s[l].name===t){s[l]=n;break}l===c&&s.push(n)}o.tween=s}}function Hb(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=le(this.node(),r).tween,s=0,o=i.length,a;s<o;++s)if((a=i[s]).name===e)return a.value;return null}return this.each((t==null?Wb:jb)(r,e,t))}function gn(e,t,r){var i=e._id;return e.each(function(){var s=xe(this,i);(s.value||(s.value={}))[t]=r.apply(this,arguments)}),function(s){return le(s,i).value[t]}}function Uc(e,t){var r;return(typeof t=="number"?Se:t instanceof Dr?Ko:(r=Dr(t))?(t=r,Ko):Nc)(e,t)}function Yb(e){return function(){this.removeAttribute(e)}}function Ub(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Xb(e,t,r){var i,s=r+"",o;return function(){var a=this.getAttribute(e);return a===s?null:a===i?o:o=t(i=a,r)}}function Gb(e,t,r){var i,s=r+"",o;return function(){var a=this.getAttributeNS(e.space,e.local);return a===s?null:a===i?o:o=t(i=a,r)}}function Vb(e,t,r){var i,s,o;return function(){var a,n=r(this),l;return n==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=n+"",a===l?null:a===i&&l===s?o:(s=l,o=t(i=a,n)))}}function Zb(e,t,r){var i,s,o;return function(){var a,n=r(this),l;return n==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=n+"",a===l?null:a===i&&l===s?o:(s=l,o=t(i=a,n)))}}function Kb(e,t){var r=Vs(e),i=r==="transform"?Eb:Uc;return this.attrTween(e,typeof t=="function"?(r.local?Zb:Vb)(r,i,gn(this,"attr."+e,t)):t==null?(r.local?Ub:Yb)(r):(r.local?Gb:Xb)(r,i,t))}function Qb(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function Jb(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function tk(e,t){var r,i;function s(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&Jb(e,o)),r}return s._value=t,s}function ek(e,t){var r,i;function s(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&Qb(e,o)),r}return s._value=t,s}function rk(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=Vs(e);return this.tween(r,(i.local?tk:ek)(i,t))}function ik(e,t){return function(){fn(this,e).delay=+t.apply(this,arguments)}}function sk(e,t){return t=+t,function(){fn(this,e).delay=t}}function ok(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?ik:sk)(t,e)):le(this.node(),t).delay}function ak(e,t){return function(){xe(this,e).duration=+t.apply(this,arguments)}}function nk(e,t){return t=+t,function(){xe(this,e).duration=t}}function lk(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?ak:nk)(t,e)):le(this.node(),t).duration}function hk(e,t){if(typeof t!="function")throw new Error;return function(){xe(this,e).ease=t}}function ck(e){var t=this._id;return arguments.length?this.each(hk(t,e)):le(this.node(),t).ease}function dk(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;xe(this,e).ease=r}}function uk(e){if(typeof e!="function")throw new Error;return this.each(dk(this._id,e))}function fk(e){typeof e!="function"&&(e=_c(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var o=t[s],a=o.length,n=i[s]=[],l,c=0;c<a;++c)(l=o[c])&&e.call(l,l.__data__,c,o)&&n.push(l);return new Le(i,this._parents,this._name,this._id)}function gk(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,s=r.length,o=Math.min(i,s),a=new Array(i),n=0;n<o;++n)for(var l=t[n],c=r[n],h=l.length,d=a[n]=new Array(h),f,u=0;u<h;++u)(f=l[u]||c[u])&&(d[u]=f);for(;n<i;++n)a[n]=t[n];return new Le(a,this._parents,this._name,this._id)}function pk(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 mk(e,t,r){var i,s,o=pk(t)?fn:xe;return function(){var a=o(this,e),n=a.on;n!==i&&(s=(i=n).copy()).on(t,r),a.on=s}}function yk(e,t){var r=this._id;return arguments.length<2?le(this.node(),r).on.on(e):this.each(mk(r,e,t))}function xk(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function Ck(){return this.on("end.remove",xk(this._id))}function bk(e){var t=this._name,r=this._id;typeof e!="function"&&(e=ln(e));for(var i=this._groups,s=i.length,o=new Array(s),a=0;a<s;++a)for(var n=i[a],l=n.length,c=o[a]=new Array(l),h,d,f=0;f<l;++f)(h=n[f])&&(d=e.call(h,h.__data__,f,n))&&("__data__"in h&&(d.__data__=h.__data__),c[f]=d,Js(c[f],t,r,f,c,le(h,r)));return new Le(o,this._parents,t,r)}function kk(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Tc(e));for(var i=this._groups,s=i.length,o=[],a=[],n=0;n<s;++n)for(var l=i[n],c=l.length,h,d=0;d<c;++d)if(h=l[d]){for(var f=e.call(h,h.__data__,d,l),u,p=le(h,r),m=0,y=f.length;m<y;++m)(u=f[m])&&Js(u,t,r,m,f,p);o.push(f),a.push(h)}return new Le(o,a,t,r)}var wk=$i.prototype.constructor;function vk(){return new wk(this._groups,this._parents)}function Sk(e,t){var r,i,s;return function(){var o=Rr(this,e),a=(this.style.removeProperty(e),Rr(this,e));return o===a?null:o===r&&a===i?s:s=t(r=o,i=a)}}function Xc(e){return function(){this.style.removeProperty(e)}}function Tk(e,t,r){var i,s=r+"",o;return function(){var a=Rr(this,e);return a===s?null:a===i?o:o=t(i=a,r)}}function _k(e,t,r){var i,s,o;return function(){var a=Rr(this,e),n=r(this),l=n+"";return n==null&&(l=n=(this.style.removeProperty(e),Rr(this,e))),a===l?null:a===i&&l===s?o:(s=l,o=t(i=a,n))}}function Bk(e,t){var r,i,s,o="style."+t,a="end."+o,n;return function(){var l=xe(this,e),c=l.on,h=l.value[o]==null?n||(n=Xc(t)):void 0;(c!==r||s!==h)&&(i=(r=c).copy()).on(a,s=h),l.on=i}}function Lk(e,t,r){var i=(e+="")=="transform"?Ab:Uc;return t==null?this.styleTween(e,Sk(e,i)).on("end.style."+e,Xc(e)):typeof t=="function"?this.styleTween(e,_k(e,i,gn(this,"style."+e,t))).each(Bk(this._id,e)):this.styleTween(e,Tk(e,i,t),r).on("end.style."+e,null)}function Fk(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function Mk(e,t,r){var i,s;function o(){var a=t.apply(this,arguments);return a!==s&&(i=(s=a)&&Fk(e,a,r)),i}return o._value=t,o}function Ak(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,Mk(e,t,r??""))}function Ek(e){return function(){this.textContent=e}}function $k(e){return function(){var t=e(this);this.textContent=t??""}}function Ik(e){return this.tween("text",typeof e=="function"?$k(gn(this,"text",e)):Ek(e==null?"":e+""))}function Pk(e){return function(t){this.textContent=e.call(this,t)}}function Ok(e){var t,r;function i(){var s=e.apply(this,arguments);return s!==r&&(t=(r=s)&&Pk(s)),t}return i._value=e,i}function Rk(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,Ok(e))}function Dk(){for(var e=this._name,t=this._id,r=Gc(),i=this._groups,s=i.length,o=0;o<s;++o)for(var a=i[o],n=a.length,l,c=0;c<n;++c)if(l=a[c]){var h=le(l,t);Js(l,e,r,c,a,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Le(i,this._parents,e,r)}function Nk(){var e,t,r=this,i=r._id,s=r.size();return new Promise(function(o,a){var n={value:a},l={value:function(){--s===0&&o()}};r.each(function(){var c=xe(this,i),h=c.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(n),t._.interrupt.push(n),t._.end.push(l)),c.on=t}),s===0&&o()})}var qk=0;function Le(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function Gc(){return++qk}var ke=$i.prototype;Le.prototype={constructor:Le,select:bk,selectAll:kk,selectChild:ke.selectChild,selectChildren:ke.selectChildren,filter:fk,merge:gk,selection:vk,transition:Dk,call:ke.call,nodes:ke.nodes,node:ke.node,size:ke.size,empty:ke.empty,each:ke.each,on:yk,attr:Kb,attrTween:rk,style:Lk,styleTween:Ak,text:Ik,textTween:Rk,remove:Ck,tween:Hb,delay:ok,duration:lk,ease:ck,easeVarying:uk,end:Nk,[Symbol.iterator]:ke[Symbol.iterator]};function zk(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Wk={time:null,delay:0,duration:250,ease:zk};function jk(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 Hk(e){var t,r;e instanceof Le?(t=e._id,e=e._name):(t=Gc(),(r=Wk).time=un(),e=e==null?null:e+"");for(var i=this._groups,s=i.length,o=0;o<s;++o)for(var a=i[o],n=a.length,l,c=0;c<n;++c)(l=a[c])&&Js(l,e,t,c,a,r||jk(l,t));return new Le(i,this._parents,e,t)}$i.prototype.interrupt=zb;$i.prototype.transition=Hk;const ia=Math.PI,sa=2*ia,Ye=1e-6,Yk=sa-Ye;function Vc(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function Uk(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Vc;const r=10**t;return function(i){this._+=i[0];for(let s=1,o=i.length;s<o;++s)this._+=Math.round(arguments[s]*r)/r+i[s]}}class Xk{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Vc:Uk(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,s){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+s}`}bezierCurveTo(t,r,i,s,o,a){this._append`C${+t},${+r},${+i},${+s},${this._x1=+o},${this._y1=+a}`}arcTo(t,r,i,s,o){if(t=+t,r=+r,i=+i,s=+s,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,n=this._y1,l=i-t,c=s-r,h=a-t,d=n-r,f=h*h+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(f>Ye)if(!(Math.abs(d*l-c*h)>Ye)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let u=i-a,p=s-n,m=l*l+c*c,y=u*u+p*p,x=Math.sqrt(m),b=Math.sqrt(f),k=o*Math.tan((ia-Math.acos((m+f-y)/(2*x*b)))/2),S=k/b,v=k/x;Math.abs(S-1)>Ye&&this._append`L${t+S*h},${r+S*d}`,this._append`A${o},${o},0,0,${+(d*u>h*p)},${this._x1=t+v*l},${this._y1=r+v*c}`}}arc(t,r,i,s,o,a){if(t=+t,r=+r,i=+i,a=!!a,i<0)throw new Error(`negative radius: ${i}`);let n=i*Math.cos(s),l=i*Math.sin(s),c=t+n,h=r+l,d=1^a,f=a?s-o:o-s;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>Ye||Math.abs(this._y1-h)>Ye)&&this._append`L${c},${h}`,i&&(f<0&&(f=f%sa+sa),f>Yk?this._append`A${i},${i},0,1,${d},${t-n},${r-l}A${i},${i},0,1,${d},${this._x1=c},${this._y1=h}`:f>Ye&&this._append`A${i},${i},0,${+(f>=ia)},${d},${this._x1=t+i*Math.cos(o)},${this._y1=r+i*Math.sin(o)}`)}rect(t,r,i,s){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+s}h${-i}Z`}toString(){return this._}}function Ue(e){return function(){return e}}const Gk=Math.abs,Vk=Math.atan2,Zk=Math.cos,Kk=Math.max,Qk=Math.min,Jk=Math.sin,t1=Math.sqrt,oa=1e-12,to=Math.PI,aa=to/2,e1=2*to;function r1(e){return e>1?0:e<-1?to:Math.acos(e)}function i1(e){return e>=1?aa:e<=-1?-aa:Math.asin(e)}function Zc(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 Xk(t)}function Kc(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Qc(e){this._context=e}Qc.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 xi(e){return new Qc(e)}function s1(e){return e[0]}function o1(e){return e[1]}function Jc(e,t){var r=Ue(!0),i=null,s=xi,o=null,a=Zc(n);e=typeof e=="function"?e:e===void 0?s1:Ue(e),t=typeof t=="function"?t:t===void 0?o1:Ue(t);function n(l){var c,h=(l=Kc(l)).length,d,f=!1,u;for(i==null&&(o=s(u=a())),c=0;c<=h;++c)!(c<h&&r(d=l[c],c,l))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+e(d,c,l),+t(d,c,l));if(u)return o=null,u+""||null}return n.x=function(l){return arguments.length?(e=typeof l=="function"?l:Ue(+l),n):e},n.y=function(l){return arguments.length?(t=typeof l=="function"?l:Ue(+l),n):t},n.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Ue(!!l),n):r},n.curve=function(l){return arguments.length?(s=l,i!=null&&(o=s(i)),n):s},n.context=function(l){return arguments.length?(l==null?i=o=null:o=s(i=l),n):i},n}class td{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 ed(e){return new td(e,!0)}function rd(e){return new td(e,!1)}function Oe(){}function _s(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 eo(e){this._context=e}eo.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:_s(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:_s(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Bs(e){return new eo(e)}function id(e){this._context=e}id.prototype={areaStart:Oe,areaEnd:Oe,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:_s(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function a1(e){return new id(e)}function sd(e){this._context=e}sd.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:_s(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function n1(e){return new sd(e)}function od(e,t){this._basis=new eo(e),this._beta=t}od.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],s=t[0],o=e[r]-i,a=t[r]-s,n=-1,l;++n<=r;)l=n/r,this._basis.point(this._beta*e[n]+(1-this._beta)*(i+l*o),this._beta*t[n]+(1-this._beta)*(s+l*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const l1=(function e(t){function r(i){return t===1?new eo(i):new od(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function Ls(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 pn(e,t){this._context=e,this._k=(1-t)/6}pn.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:Ls(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:Ls(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 ad=(function e(t){function r(i){return new pn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function mn(e,t){this._context=e,this._k=(1-t)/6}mn.prototype={areaStart:Oe,areaEnd:Oe,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:Ls(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 h1=(function e(t){function r(i){return new mn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function yn(e,t){this._context=e,this._k=(1-t)/6}yn.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:Ls(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 c1=(function e(t){function r(i){return new yn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function xn(e,t,r){var i=e._x1,s=e._y1,o=e._x2,a=e._y2;if(e._l01_a>oa){var n=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*n-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,s=(s*n-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>oa){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);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/h,a=(a*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,s,o,a,e._x2,e._y2)}function nd(e,t){this._context=e,this._alpha=t}nd.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:xn(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 ld=(function e(t){function r(i){return t?new nd(i,t):new pn(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function hd(e,t){this._context=e,this._alpha=t}hd.prototype={areaStart:Oe,areaEnd:Oe,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:xn(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 d1=(function e(t){function r(i){return t?new hd(i,t):new mn(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function cd(e,t){this._context=e,this._alpha=t}cd.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:xn(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 u1=(function e(t){function r(i){return t?new cd(i,t):new yn(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function dd(e){this._context=e}dd.prototype={areaStart:Oe,areaEnd:Oe,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 f1(e){return new dd(e)}function Nl(e){return e<0?-1:1}function ql(e,t,r){var i=e._x1-e._x0,s=t-e._x1,o=(e._y1-e._y0)/(i||s<0&&-0),a=(r-e._y1)/(s||i<0&&-0),n=(o*s+a*i)/(i+s);return(Nl(o)+Nl(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(n))||0}function zl(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Bo(e,t,r){var i=e._x0,s=e._y0,o=e._x1,a=e._y1,n=(o-i)/3;e._context.bezierCurveTo(i+n,s+n*t,o-n,a-n*r,o,a)}function Fs(e){this._context=e}Fs.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:Bo(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,Bo(this,zl(this,r=ql(this,e,t)),r);break;default:Bo(this,this._t0,r=ql(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function ud(e){this._context=new fd(e)}(ud.prototype=Object.create(Fs.prototype)).point=function(e,t){Fs.prototype.point.call(this,t,e)};function fd(e){this._context=e}fd.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,s,o){this._context.bezierCurveTo(t,e,i,r,o,s)}};function gd(e){return new Fs(e)}function pd(e){return new ud(e)}function md(e){this._context=e}md.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=Wl(e),s=Wl(t),o=0,a=1;a<r;++o,++a)this._context.bezierCurveTo(i[0][o],s[0][o],i[1][o],s[1][o],e[a],t[a]);(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 Wl(e){var t,r=e.length-1,i,s=new Array(r),o=new Array(r),a=new Array(r);for(s[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)s[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(s[r-1]=2,o[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=s[t]/o[t-1],o[t]-=i,a[t]-=i*a[t-1];for(s[r-1]=a[r-1]/o[r-1],t=r-2;t>=0;--t)s[t]=(a[t]-s[t+1])/o[t];for(o[r-1]=(e[r]+s[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-s[t+1];return[s,o]}function yd(e){return new md(e)}function ro(e,t){this._context=e,this._t=t}ro.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 xd(e){return new ro(e,.5)}function Cd(e){return new ro(e,0)}function bd(e){return new ro(e,1)}function ci(e,t,r){this.k=e,this.x=t,this.y=r}ci.prototype={constructor:ci,scale:function(e){return e===1?this:new ci(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new ci(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+")"}};ci.prototype;var kd=g(e=>{const{securityLevel:t}=pt();let r=ct("body");if(t==="sandbox"){const o=ct(`#i${e}`).node()?.contentDocument??document;r=ct(o.body)}return r.select(`#${e}`)},"selectSvgElement");function Cn(e){return typeof e>"u"||e===null}g(Cn,"isNothing");function wd(e){return typeof e=="object"&&e!==null}g(wd,"isObject");function vd(e){return Array.isArray(e)?e:Cn(e)?[]:[e]}g(vd,"toArray");function Sd(e,t){var r,i,s,o;if(t)for(o=Object.keys(t),r=0,i=o.length;r<i;r+=1)s=o[r],e[s]=t[s];return e}g(Sd,"extend");function Td(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}g(Td,"repeat");function _d(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}g(_d,"isNegativeZero");var g1=Cn,p1=wd,m1=vd,y1=Td,x1=_d,C1=Sd,_t={isNothing:g1,isObject:p1,toArray:m1,repeat:y1,isNegativeZero:x1,extend:C1};function bn(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+=`
|
|
128
|
+
|
|
129
|
+
`+e.mark.snippet),i+" "+r):i}g(bn,"formatError");function qr(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=bn(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}g(qr,"YAMLException$1");qr.prototype=Object.create(Error.prototype);qr.prototype.constructor=qr;qr.prototype.toString=g(function(t){return this.name+": "+bn(this,t)},"toString");var Ht=qr;function ns(e,t,r,i,s){var o="",a="",n=Math.floor(s/2)-1;return i-t>n&&(o=" ... ",t=i-n+o.length),r-i>n&&(a=" ...",r=i+n-a.length),{str:o+e.slice(t,r).replace(/\t/g,"→")+a,pos:i-t+o.length}}g(ns,"getLine");function ls(e,t){return _t.repeat(" ",t-e.length)+e}g(ls,"padStart");function Bd(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],s=[],o,a=-1;o=r.exec(e.buffer);)s.push(o.index),i.push(o.index+o[0].length),e.position<=o.index&&a<0&&(a=i.length-2);a<0&&(a=i.length-1);var n="",l,c,h=Math.min(e.line+t.linesAfter,s.length).toString().length,d=t.maxLength-(t.indent+h+3);for(l=1;l<=t.linesBefore&&!(a-l<0);l++)c=ns(e.buffer,i[a-l],s[a-l],e.position-(i[a]-i[a-l]),d),n=_t.repeat(" ",t.indent)+ls((e.line-l+1).toString(),h)+" | "+c.str+`
|
|
130
|
+
`+n;for(c=ns(e.buffer,i[a],s[a],e.position,d),n+=_t.repeat(" ",t.indent)+ls((e.line+1).toString(),h)+" | "+c.str+`
|
|
131
|
+
`,n+=_t.repeat("-",t.indent+h+3+c.pos)+`^
|
|
132
|
+
`,l=1;l<=t.linesAfter&&!(a+l>=s.length);l++)c=ns(e.buffer,i[a+l],s[a+l],e.position-(i[a]-i[a+l]),d),n+=_t.repeat(" ",t.indent)+ls((e.line+l+1).toString(),h)+" | "+c.str+`
|
|
133
|
+
`;return n.replace(/\n$/,"")}g(Bd,"makeSnippet");var b1=Bd,k1=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],w1=["scalar","sequence","mapping"];function Ld(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}g(Ld,"compileStyleAliases");function Fd(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(k1.indexOf(r)===-1)throw new Ht('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=Ld(t.styleAliases||null),w1.indexOf(this.kind)===-1)throw new Ht('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}g(Fd,"Type$1");var It=Fd;function na(e,t){var r=[];return e[t].forEach(function(i){var s=r.length;r.forEach(function(o,a){o.tag===i.tag&&o.kind===i.kind&&o.multi===i.multi&&(s=a)}),r[s]=i}),r}g(na,"compileList");function Md(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(s){s.multi?(e.multi[s.kind].push(s),e.multi.fallback.push(s)):e[s.kind][s.tag]=e.fallback[s.tag]=s}for(g(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}g(Md,"compileMap");function Ms(e){return this.extend(e)}g(Ms,"Schema$1");Ms.prototype.extend=g(function(t){var r=[],i=[];if(t instanceof It)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 Ht("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(o){if(!(o instanceof It))throw new Ht("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(o.loadKind&&o.loadKind!=="scalar")throw new Ht("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(o.multi)throw new Ht("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(o){if(!(o instanceof It))throw new Ht("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var s=Object.create(Ms.prototype);return s.implicit=(this.implicit||[]).concat(r),s.explicit=(this.explicit||[]).concat(i),s.compiledImplicit=na(s,"implicit"),s.compiledExplicit=na(s,"explicit"),s.compiledTypeMap=Md(s.compiledImplicit,s.compiledExplicit),s},"extend");var v1=Ms,S1=new It("tag:yaml.org,2002:str",{kind:"scalar",construct:g(function(e){return e!==null?e:""},"construct")}),T1=new It("tag:yaml.org,2002:seq",{kind:"sequence",construct:g(function(e){return e!==null?e:[]},"construct")}),_1=new It("tag:yaml.org,2002:map",{kind:"mapping",construct:g(function(e){return e!==null?e:{}},"construct")}),B1=new v1({explicit:[S1,T1,_1]});function Ad(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}g(Ad,"resolveYamlNull");function Ed(){return null}g(Ed,"constructYamlNull");function $d(e){return e===null}g($d,"isNull");var L1=new It("tag:yaml.org,2002:null",{kind:"scalar",resolve:Ad,construct:Ed,predicate:$d,represent:{canonical:g(function(){return"~"},"canonical"),lowercase:g(function(){return"null"},"lowercase"),uppercase:g(function(){return"NULL"},"uppercase"),camelcase:g(function(){return"Null"},"camelcase"),empty:g(function(){return""},"empty")},defaultStyle:"lowercase"});function Id(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")}g(Id,"resolveYamlBoolean");function Pd(e){return e==="true"||e==="True"||e==="TRUE"}g(Pd,"constructYamlBoolean");function Od(e){return Object.prototype.toString.call(e)==="[object Boolean]"}g(Od,"isBoolean");var F1=new It("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Id,construct:Pd,predicate:Od,represent:{lowercase:g(function(e){return e?"true":"false"},"lowercase"),uppercase:g(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:g(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function Rd(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}g(Rd,"isHexCode");function Dd(e){return 48<=e&&e<=55}g(Dd,"isOctCode");function Nd(e){return 48<=e&&e<=57}g(Nd,"isDecCode");function qd(e){if(e===null)return!1;var t=e.length,r=0,i=!1,s;if(!t)return!1;if(s=e[r],(s==="-"||s==="+")&&(s=e[++r]),s==="0"){if(r+1===t)return!0;if(s=e[++r],s==="b"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(s!=="0"&&s!=="1")return!1;i=!0}return i&&s!=="_"}if(s==="x"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!Rd(e.charCodeAt(r)))return!1;i=!0}return i&&s!=="_"}if(s==="o"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!Dd(e.charCodeAt(r)))return!1;i=!0}return i&&s!=="_"}}if(s==="_")return!1;for(;r<t;r++)if(s=e[r],s!=="_"){if(!Nd(e.charCodeAt(r)))return!1;i=!0}return!(!i||s==="_")}g(qd,"resolveYamlInteger");function zd(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)}g(zd,"constructYamlInteger");function Wd(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!_t.isNegativeZero(e)}g(Wd,"isInteger");var M1=new It("tag:yaml.org,2002:int",{kind:"scalar",resolve:qd,construct:zd,predicate:Wd,represent:{binary:g(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:g(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:g(function(e){return e.toString(10)},"decimal"),hexadecimal:g(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"]}}),A1=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function jd(e){return!(e===null||!A1.test(e)||e[e.length-1]==="_")}g(jd,"resolveYamlFloat");function Hd(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)}g(Hd,"constructYamlFloat");var E1=/^[-+]?[0-9]+e/;function Yd(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(_t.isNegativeZero(e))return"-0.0";return r=e.toString(10),E1.test(r)?r.replace("e",".e"):r}g(Yd,"representYamlFloat");function Ud(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||_t.isNegativeZero(e))}g(Ud,"isFloat");var $1=new It("tag:yaml.org,2002:float",{kind:"scalar",resolve:jd,construct:Hd,predicate:Ud,represent:Yd,defaultStyle:"lowercase"}),Xd=B1.extend({implicit:[L1,F1,M1,$1]}),I1=Xd,Gd=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Vd=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 Zd(e){return e===null?!1:Gd.exec(e)!==null||Vd.exec(e)!==null}g(Zd,"resolveYamlTimestamp");function Kd(e){var t,r,i,s,o,a,n,l=0,c=null,h,d,f;if(t=Gd.exec(e),t===null&&(t=Vd.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,s=+t[3],!t[4])return new Date(Date.UTC(r,i,s));if(o=+t[4],a=+t[5],n=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(h=+t[10],d=+(t[11]||0),c=(h*60+d)*6e4,t[9]==="-"&&(c=-c)),f=new Date(Date.UTC(r,i,s,o,a,n,l)),c&&f.setTime(f.getTime()-c),f}g(Kd,"constructYamlTimestamp");function Qd(e){return e.toISOString()}g(Qd,"representYamlTimestamp");var P1=new It("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Zd,construct:Kd,instanceOf:Date,represent:Qd});function Jd(e){return e==="<<"||e===null}g(Jd,"resolveYamlMerge");var O1=new It("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Jd}),kn=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
134
|
+
\r`;function tu(e){if(e===null)return!1;var t,r,i=0,s=e.length,o=kn;for(r=0;r<s;r++)if(t=o.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}g(tu,"resolveYamlBinary");function eu(e){var t,r,i=e.replace(/[\r\n=]/g,""),s=i.length,o=kn,a=0,n=[];for(t=0;t<s;t++)t%4===0&&t&&(n.push(a>>16&255),n.push(a>>8&255),n.push(a&255)),a=a<<6|o.indexOf(i.charAt(t));return r=s%4*6,r===0?(n.push(a>>16&255),n.push(a>>8&255),n.push(a&255)):r===18?(n.push(a>>10&255),n.push(a>>2&255)):r===12&&n.push(a>>4&255),new Uint8Array(n)}g(eu,"constructYamlBinary");function ru(e){var t="",r=0,i,s,o=e.length,a=kn;for(i=0;i<o;i++)i%3===0&&i&&(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]),r=(r<<8)+e[i];return s=o%3,s===0?(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]):s===2?(t+=a[r>>10&63],t+=a[r>>4&63],t+=a[r<<2&63],t+=a[64]):s===1&&(t+=a[r>>2&63],t+=a[r<<4&63],t+=a[64],t+=a[64]),t}g(ru,"representYamlBinary");function iu(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}g(iu,"isBinary");var R1=new It("tag:yaml.org,2002:binary",{kind:"scalar",resolve:tu,construct:eu,predicate:iu,represent:ru}),D1=Object.prototype.hasOwnProperty,N1=Object.prototype.toString;function su(e){if(e===null)return!0;var t=[],r,i,s,o,a,n=e;for(r=0,i=n.length;r<i;r+=1){if(s=n[r],a=!1,N1.call(s)!=="[object Object]")return!1;for(o in s)if(D1.call(s,o))if(!a)a=!0;else return!1;if(!a)return!1;if(t.indexOf(o)===-1)t.push(o);else return!1}return!0}g(su,"resolveYamlOmap");function ou(e){return e!==null?e:[]}g(ou,"constructYamlOmap");var q1=new It("tag:yaml.org,2002:omap",{kind:"sequence",resolve:su,construct:ou}),z1=Object.prototype.toString;function au(e){if(e===null)return!0;var t,r,i,s,o,a=e;for(o=new Array(a.length),t=0,r=a.length;t<r;t+=1){if(i=a[t],z1.call(i)!=="[object Object]"||(s=Object.keys(i),s.length!==1))return!1;o[t]=[s[0],i[s[0]]]}return!0}g(au,"resolveYamlPairs");function nu(e){if(e===null)return[];var t,r,i,s,o,a=e;for(o=new Array(a.length),t=0,r=a.length;t<r;t+=1)i=a[t],s=Object.keys(i),o[t]=[s[0],i[s[0]]];return o}g(nu,"constructYamlPairs");var W1=new It("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:au,construct:nu}),j1=Object.prototype.hasOwnProperty;function lu(e){if(e===null)return!0;var t,r=e;for(t in r)if(j1.call(r,t)&&r[t]!==null)return!1;return!0}g(lu,"resolveYamlSet");function hu(e){return e!==null?e:{}}g(hu,"constructYamlSet");var H1=new It("tag:yaml.org,2002:set",{kind:"mapping",resolve:lu,construct:hu}),cu=I1.extend({implicit:[P1,O1],explicit:[R1,q1,W1,H1]}),Re=Object.prototype.hasOwnProperty,As=1,du=2,uu=3,Es=4,Lo=1,Y1=2,jl=3,U1=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,X1=/[\x85\u2028\u2029]/,G1=/[,\[\]\{\}]/,fu=/^(?:!|!!|![a-z\-]+!)$/i,gu=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function la(e){return Object.prototype.toString.call(e)}g(la,"_class");function se(e){return e===10||e===13}g(se,"is_EOL");function Pe(e){return e===9||e===32}g(Pe,"is_WHITE_SPACE");function Nt(e){return e===9||e===32||e===10||e===13}g(Nt,"is_WS_OR_EOL");function Ze(e){return e===44||e===91||e===93||e===123||e===125}g(Ze,"is_FLOW_INDICATOR");function pu(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}g(pu,"fromHexCode");function mu(e){return e===120?2:e===117?4:e===85?8:0}g(mu,"escapedHexLen");function yu(e){return 48<=e&&e<=57?e-48:-1}g(yu,"fromDecimalCode");function ha(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
|
135
|
+
`: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":""}g(ha,"simpleEscapeSequence");function xu(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}g(xu,"charFromCodepoint");function wn(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}g(wn,"setProperty");var Cu=new Array(256),bu=new Array(256);for(je=0;je<256;je++)Cu[je]=ha(je)?1:0,bu[je]=ha(je);var je;function ku(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||cu,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=[]}g(ku,"State$1");function vn(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=b1(r),new Ht(t,r)}g(vn,"generateError");function it(e,t){throw vn(e,t)}g(it,"throwError");function _i(e,t){e.onWarning&&e.onWarning.call(null,vn(e,t))}g(_i,"throwWarning");var Hl={YAML:g(function(t,r,i){var s,o,a;t.version!==null&&it(t,"duplication of %YAML directive"),i.length!==1&&it(t,"YAML directive accepts exactly one argument"),s=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),s===null&&it(t,"ill-formed argument of the YAML directive"),o=parseInt(s[1],10),a=parseInt(s[2],10),o!==1&&it(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=a<2,a!==1&&a!==2&&_i(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:g(function(t,r,i){var s,o;i.length!==2&&it(t,"TAG directive accepts exactly two arguments"),s=i[0],o=i[1],fu.test(s)||it(t,"ill-formed tag handle (first argument) of the TAG directive"),Re.call(t.tagMap,s)&&it(t,'there is a previously declared suffix for "'+s+'" tag handle'),gu.test(o)||it(t,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch{it(t,"tag prefix is malformed: "+o)}t.tagMap[s]=o},"handleTagDirective")};function Be(e,t,r,i){var s,o,a,n;if(t<r){if(n=e.input.slice(t,r),i)for(s=0,o=n.length;s<o;s+=1)a=n.charCodeAt(s),a===9||32<=a&&a<=1114111||it(e,"expected valid JSON character");else U1.test(n)&&it(e,"the stream contains non-printable characters");e.result+=n}}g(Be,"captureSegment");function ca(e,t,r,i){var s,o,a,n;for(_t.isObject(r)||it(e,"cannot merge mappings; the provided source object is unacceptable"),s=Object.keys(r),a=0,n=s.length;a<n;a+=1)o=s[a],Re.call(t,o)||(wn(t,o,r[o]),i[o]=!0)}g(ca,"mergeMappings");function Ke(e,t,r,i,s,o,a,n,l){var c,h;if(Array.isArray(s))for(s=Array.prototype.slice.call(s),c=0,h=s.length;c<h;c+=1)Array.isArray(s[c])&&it(e,"nested arrays are not supported inside keys"),typeof s=="object"&&la(s[c])==="[object Object]"&&(s[c]="[object Object]");if(typeof s=="object"&&la(s)==="[object Object]"&&(s="[object Object]"),s=String(s),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(c=0,h=o.length;c<h;c+=1)ca(e,t,o[c],r);else ca(e,t,o,r);else!e.json&&!Re.call(r,s)&&Re.call(t,s)&&(e.line=a||e.line,e.lineStart=n||e.lineStart,e.position=l||e.position,it(e,"duplicated mapping key")),wn(t,s,o),delete r[s];return t}g(Ke,"storeMappingPair");function io(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++):it(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}g(io,"readLineBreak");function kt(e,t,r){for(var i=0,s=e.input.charCodeAt(e.position);s!==0;){for(;Pe(s);)s===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),s=e.input.charCodeAt(++e.position);if(t&&s===35)do s=e.input.charCodeAt(++e.position);while(s!==10&&s!==13&&s!==0);if(se(s))for(io(e),s=e.input.charCodeAt(e.position),i++,e.lineIndent=0;s===32;)e.lineIndent++,s=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&_i(e,"deficient indentation"),i}g(kt,"skipSeparationSpace");function Ii(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)))}g(Ii,"testDocumentSeparator");function so(e,t){t===1?e.result+=" ":t>1&&(e.result+=_t.repeat(`
|
|
136
|
+
`,t-1))}g(so,"writeFoldedLines");function wu(e,t,r){var i,s,o,a,n,l,c,h,d=e.kind,f=e.result,u;if(u=e.input.charCodeAt(e.position),Nt(u)||Ze(u)||u===35||u===38||u===42||u===33||u===124||u===62||u===39||u===34||u===37||u===64||u===96||(u===63||u===45)&&(s=e.input.charCodeAt(e.position+1),Nt(s)||r&&Ze(s)))return!1;for(e.kind="scalar",e.result="",o=a=e.position,n=!1;u!==0;){if(u===58){if(s=e.input.charCodeAt(e.position+1),Nt(s)||r&&Ze(s))break}else if(u===35){if(i=e.input.charCodeAt(e.position-1),Nt(i))break}else{if(e.position===e.lineStart&&Ii(e)||r&&Ze(u))break;if(se(u))if(l=e.line,c=e.lineStart,h=e.lineIndent,kt(e,!1,-1),e.lineIndent>=t){n=!0,u=e.input.charCodeAt(e.position);continue}else{e.position=a,e.line=l,e.lineStart=c,e.lineIndent=h;break}}n&&(Be(e,o,a,!1),so(e,e.line-l),o=a=e.position,n=!1),Pe(u)||(a=e.position+1),u=e.input.charCodeAt(++e.position)}return Be(e,o,a,!1),e.result?!0:(e.kind=d,e.result=f,!1)}g(wu,"readPlainScalar");function vu(e,t){var r,i,s;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=s=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(Be(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,s=e.position;else return!0;else se(r)?(Be(e,i,s,!0),so(e,kt(e,!1,t)),i=s=e.position):e.position===e.lineStart&&Ii(e)?it(e,"unexpected end of the document within a single quoted scalar"):(e.position++,s=e.position);it(e,"unexpected end of the stream within a single quoted scalar")}g(vu,"readSingleQuotedScalar");function Su(e,t){var r,i,s,o,a,n;if(n=e.input.charCodeAt(e.position),n!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;){if(n===34)return Be(e,r,e.position,!0),e.position++,!0;if(n===92){if(Be(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),se(n))kt(e,!1,t);else if(n<256&&Cu[n])e.result+=bu[n],e.position++;else if((a=mu(n))>0){for(s=a,o=0;s>0;s--)n=e.input.charCodeAt(++e.position),(a=pu(n))>=0?o=(o<<4)+a:it(e,"expected hexadecimal character");e.result+=xu(o),e.position++}else it(e,"unknown escape sequence");r=i=e.position}else se(n)?(Be(e,r,i,!0),so(e,kt(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Ii(e)?it(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}it(e,"unexpected end of the stream within a double quoted scalar")}g(Su,"readDoubleQuotedScalar");function Tu(e,t){var r=!0,i,s,o,a=e.tag,n,l=e.anchor,c,h,d,f,u,p=Object.create(null),m,y,x,b;if(b=e.input.charCodeAt(e.position),b===91)h=93,u=!1,n=[];else if(b===123)h=125,u=!0,n={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=n),b=e.input.charCodeAt(++e.position);b!==0;){if(kt(e,!0,t),b=e.input.charCodeAt(e.position),b===h)return e.position++,e.tag=a,e.anchor=l,e.kind=u?"mapping":"sequence",e.result=n,!0;r?b===44&&it(e,"expected the node content, but found ','"):it(e,"missed comma between flow collection entries"),y=m=x=null,d=f=!1,b===63&&(c=e.input.charCodeAt(e.position+1),Nt(c)&&(d=f=!0,e.position++,kt(e,!0,t))),i=e.line,s=e.lineStart,o=e.position,sr(e,t,As,!1,!0),y=e.tag,m=e.result,kt(e,!0,t),b=e.input.charCodeAt(e.position),(f||e.line===i)&&b===58&&(d=!0,b=e.input.charCodeAt(++e.position),kt(e,!0,t),sr(e,t,As,!1,!0),x=e.result),u?Ke(e,n,p,y,m,x,i,s,o):d?n.push(Ke(e,null,p,y,m,x,i,s,o)):n.push(m),kt(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}it(e,"unexpected end of the stream within a flow collection")}g(Tu,"readFlowCollection");function _u(e,t){var r,i,s=Lo,o=!1,a=!1,n=t,l=0,c=!1,h,d;if(d=e.input.charCodeAt(e.position),d===124)i=!1;else if(d===62)i=!0;else return!1;for(e.kind="scalar",e.result="";d!==0;)if(d=e.input.charCodeAt(++e.position),d===43||d===45)Lo===s?s=d===43?jl:Y1:it(e,"repeat of a chomping mode identifier");else if((h=yu(d))>=0)h===0?it(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?it(e,"repeat of an indentation width identifier"):(n=t+h-1,a=!0);else break;if(Pe(d)){do d=e.input.charCodeAt(++e.position);while(Pe(d));if(d===35)do d=e.input.charCodeAt(++e.position);while(!se(d)&&d!==0)}for(;d!==0;){for(io(e),e.lineIndent=0,d=e.input.charCodeAt(e.position);(!a||e.lineIndent<n)&&d===32;)e.lineIndent++,d=e.input.charCodeAt(++e.position);if(!a&&e.lineIndent>n&&(n=e.lineIndent),se(d)){l++;continue}if(e.lineIndent<n){s===jl?e.result+=_t.repeat(`
|
|
137
|
+
`,o?1+l:l):s===Lo&&o&&(e.result+=`
|
|
138
|
+
`);break}for(i?Pe(d)?(c=!0,e.result+=_t.repeat(`
|
|
139
|
+
`,o?1+l:l)):c?(c=!1,e.result+=_t.repeat(`
|
|
140
|
+
`,l+1)):l===0?o&&(e.result+=" "):e.result+=_t.repeat(`
|
|
141
|
+
`,l):e.result+=_t.repeat(`
|
|
142
|
+
`,o?1+l:l),o=!0,a=!0,l=0,r=e.position;!se(d)&&d!==0;)d=e.input.charCodeAt(++e.position);Be(e,r,e.position,!1)}return!0}g(_u,"readBlockScalar");function da(e,t){var r,i=e.tag,s=e.anchor,o=[],a,n=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,it(e,"tab characters must not be used in indentation")),!(l!==45||(a=e.input.charCodeAt(e.position+1),!Nt(a))));){if(n=!0,e.position++,kt(e,!0,-1)&&e.lineIndent<=t){o.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,sr(e,t,uu,!1,!0),o.push(e.result),kt(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)it(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return n?(e.tag=i,e.anchor=s,e.kind="sequence",e.result=o,!0):!1}g(da,"readBlockSequence");function Bu(e,t,r){var i,s,o,a,n,l,c=e.tag,h=e.anchor,d={},f=Object.create(null),u=null,p=null,m=null,y=!1,x=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=d),b=e.input.charCodeAt(e.position);b!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,it(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),o=e.line,(b===63||b===58)&&Nt(i))b===63?(y&&(Ke(e,d,f,u,p,null,a,n,l),u=p=m=null),x=!0,y=!0,s=!0):y?(y=!1,s=!0):it(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(a=e.line,n=e.lineStart,l=e.position,!sr(e,r,du,!1,!0))break;if(e.line===o){for(b=e.input.charCodeAt(e.position);Pe(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),Nt(b)||it(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(Ke(e,d,f,u,p,null,a,n,l),u=p=m=null),x=!0,y=!1,s=!1,u=e.tag,p=e.result;else if(x)it(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=h,!0}else if(x)it(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===o||e.lineIndent>t)&&(y&&(a=e.line,n=e.lineStart,l=e.position),sr(e,t,Es,!0,s)&&(y?p=e.result:m=e.result),y||(Ke(e,d,f,u,p,m,a,n,l),u=p=m=null),kt(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&b!==0)it(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&Ke(e,d,f,u,p,null,a,n,l),x&&(e.tag=c,e.anchor=h,e.kind="mapping",e.result=d),x}g(Bu,"readBlockMapping");function Lu(e){var t,r=!1,i=!1,s,o,a;if(a=e.input.charCodeAt(e.position),a!==33)return!1;if(e.tag!==null&&it(e,"duplication of a tag property"),a=e.input.charCodeAt(++e.position),a===60?(r=!0,a=e.input.charCodeAt(++e.position)):a===33?(i=!0,s="!!",a=e.input.charCodeAt(++e.position)):s="!",t=e.position,r){do a=e.input.charCodeAt(++e.position);while(a!==0&&a!==62);e.position<e.length?(o=e.input.slice(t,e.position),a=e.input.charCodeAt(++e.position)):it(e,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!Nt(a);)a===33&&(i?it(e,"tag suffix cannot contain exclamation marks"):(s=e.input.slice(t-1,e.position+1),fu.test(s)||it(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),a=e.input.charCodeAt(++e.position);o=e.input.slice(t,e.position),G1.test(o)&&it(e,"tag suffix cannot contain flow indicator characters")}o&&!gu.test(o)&&it(e,"tag name cannot contain such characters: "+o);try{o=decodeURIComponent(o)}catch{it(e,"tag name is malformed: "+o)}return r?e.tag=o:Re.call(e.tagMap,s)?e.tag=e.tagMap[s]+o:s==="!"?e.tag="!"+o:s==="!!"?e.tag="tag:yaml.org,2002:"+o:it(e,'undeclared tag handle "'+s+'"'),!0}g(Lu,"readTagProperty");function Fu(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&it(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Nt(r)&&!Ze(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&it(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}g(Fu,"readAnchorProperty");function Mu(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)&&!Ze(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&it(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Re.call(e.anchorMap,r)||it(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],kt(e,!0,-1),!0}g(Mu,"readAlias");function sr(e,t,r,i,s){var o,a,n,l=1,c=!1,h=!1,d,f,u,p,m,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=a=n=Es===r||uu===r,i&&kt(e,!0,-1)&&(c=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;Lu(e)||Fu(e);)kt(e,!0,-1)?(c=!0,n=o,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):n=!1;if(n&&(n=c||s),(l===1||Es===r)&&(As===r||du===r?m=t:m=t+1,y=e.position-e.lineStart,l===1?n&&(da(e,y)||Bu(e,y,m))||Tu(e,m)?h=!0:(a&&_u(e,m)||vu(e,m)||Su(e,m)?h=!0:Mu(e)?(h=!0,(e.tag!==null||e.anchor!==null)&&it(e,"alias node should not have any properties")):wu(e,m,As===r)&&(h=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(h=n&&da(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"&&it(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),d=0,f=e.implicitTypes.length;d<f;d+=1)if(p=e.implicitTypes[d],p.resolve(e.result)){e.result=p.construct(e.result),e.tag=p.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(Re.call(e.typeMap[e.kind||"fallback"],e.tag))p=e.typeMap[e.kind||"fallback"][e.tag];else for(p=null,u=e.typeMap.multi[e.kind||"fallback"],d=0,f=u.length;d<f;d+=1)if(e.tag.slice(0,u[d].tag.length)===u[d].tag){p=u[d];break}p||it(e,"unknown tag !<"+e.tag+">"),e.result!==null&&p.kind!==e.kind&&it(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+p.kind+'", not "'+e.kind+'"'),p.resolve(e.result,e.tag)?(e.result=p.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):it(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}g(sr,"composeNode");function Au(e){var t=e.position,r,i,s,o=!1,a;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(a=e.input.charCodeAt(e.position))!==0&&(kt(e,!0,-1),a=e.input.charCodeAt(e.position),!(e.lineIndent>0||a!==37));){for(o=!0,a=e.input.charCodeAt(++e.position),r=e.position;a!==0&&!Nt(a);)a=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),s=[],i.length<1&&it(e,"directive name must not be less than one character in length");a!==0;){for(;Pe(a);)a=e.input.charCodeAt(++e.position);if(a===35){do a=e.input.charCodeAt(++e.position);while(a!==0&&!se(a));break}if(se(a))break;for(r=e.position;a!==0&&!Nt(a);)a=e.input.charCodeAt(++e.position);s.push(e.input.slice(r,e.position))}a!==0&&io(e),Re.call(Hl,i)?Hl[i](e,i,s):_i(e,'unknown document directive "'+i+'"')}if(kt(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,kt(e,!0,-1)):o&&it(e,"directives end mark is expected"),sr(e,e.lineIndent-1,Es,!1,!0),kt(e,!0,-1),e.checkLineBreaks&&X1.test(e.input.slice(t,e.position))&&_i(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Ii(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,kt(e,!0,-1));return}if(e.position<e.length-1)it(e,"end of the stream or a document separator is expected");else return}g(Au,"readDocument");function Sn(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
143
|
+
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new ku(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,it(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;)Au(r);return r.documents}g(Sn,"loadDocuments");function V1(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=Sn(e,r);if(typeof t!="function")return i;for(var s=0,o=i.length;s<o;s+=1)t(i[s])}g(V1,"loadAll$1");function Eu(e,t){var r=Sn(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new Ht("expected a single document in the stream, but found more")}}g(Eu,"load$1");var Z1=Eu,K1={load:Z1},$u=Object.prototype.toString,Iu=Object.prototype.hasOwnProperty,Tn=65279,Q1=9,Bi=10,J1=13,t2=32,e2=33,r2=34,ua=35,i2=37,s2=38,o2=39,a2=42,Pu=44,n2=45,$s=58,l2=61,h2=62,c2=63,d2=64,Ou=91,Ru=93,u2=96,Du=123,f2=124,Nu=125,Ot={};Ot[0]="\\0";Ot[7]="\\a";Ot[8]="\\b";Ot[9]="\\t";Ot[10]="\\n";Ot[11]="\\v";Ot[12]="\\f";Ot[13]="\\r";Ot[27]="\\e";Ot[34]='\\"';Ot[92]="\\\\";Ot[133]="\\N";Ot[160]="\\_";Ot[8232]="\\L";Ot[8233]="\\P";var g2=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],p2=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function qu(e,t){var r,i,s,o,a,n,l;if(t===null)return{};for(r={},i=Object.keys(t),s=0,o=i.length;s<o;s+=1)a=i[s],n=String(t[a]),a.slice(0,2)==="!!"&&(a="tag:yaml.org,2002:"+a.slice(2)),l=e.compiledTypeMap.fallback[a],l&&Iu.call(l.styleAliases,n)&&(n=l.styleAliases[n]),r[a]=n;return r}g(qu,"compileStyleMap");function zu(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 Ht("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+_t.repeat("0",i-t.length)+t}g(zu,"encodeHex");var m2=1,Li=2;function Wu(e){this.schema=e.schema||cu,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=_t.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=qu(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==='"'?Li:m2,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}g(Wu,"State");function fa(e,t){for(var r=_t.repeat(" ",t),i=0,s=-1,o="",a,n=e.length;i<n;)s=e.indexOf(`
|
|
144
|
+
`,i),s===-1?(a=e.slice(i),i=n):(a=e.slice(i,s+1),i=s+1),a.length&&a!==`
|
|
145
|
+
`&&(o+=r),o+=a;return o}g(fa,"indentString");function Is(e,t){return`
|
|
146
|
+
`+_t.repeat(" ",e.indent*t)}g(Is,"generateNextLine");function ju(e,t){var r,i,s;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(s=e.implicitTypes[r],s.resolve(t))return!0;return!1}g(ju,"testImplicitResolving");function Fi(e){return e===t2||e===Q1}g(Fi,"isWhitespace");function zr(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Tn||65536<=e&&e<=1114111}g(zr,"isPrintable");function ga(e){return zr(e)&&e!==Tn&&e!==J1&&e!==Bi}g(ga,"isNsCharOrWhitespace");function pa(e,t,r){var i=ga(e),s=i&&!Fi(e);return(r?i:i&&e!==Pu&&e!==Ou&&e!==Ru&&e!==Du&&e!==Nu)&&e!==ua&&!(t===$s&&!s)||ga(t)&&!Fi(t)&&e===ua||t===$s&&s}g(pa,"isPlainSafe");function Hu(e){return zr(e)&&e!==Tn&&!Fi(e)&&e!==n2&&e!==c2&&e!==$s&&e!==Pu&&e!==Ou&&e!==Ru&&e!==Du&&e!==Nu&&e!==ua&&e!==s2&&e!==a2&&e!==e2&&e!==f2&&e!==l2&&e!==h2&&e!==o2&&e!==r2&&e!==i2&&e!==d2&&e!==u2}g(Hu,"isPlainSafeFirst");function Yu(e){return!Fi(e)&&e!==$s}g(Yu,"isPlainSafeLast");function pr(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}g(pr,"codePointAt");function _n(e){var t=/^\n* /;return t.test(e)}g(_n,"needIndentIndicator");var Uu=1,ma=2,Xu=3,Gu=4,cr=5;function Vu(e,t,r,i,s,o,a,n){var l,c=0,h=null,d=!1,f=!1,u=i!==-1,p=-1,m=Hu(pr(e,0))&&Yu(pr(e,e.length-1));if(t||a)for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=pr(e,l),!zr(c))return cr;m=m&&pa(c,h,n),h=c}else{for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=pr(e,l),c===Bi)d=!0,u&&(f=f||l-p-1>i&&e[p+1]!==" ",p=l);else if(!zr(c))return cr;m=m&&pa(c,h,n),h=c}f=f||u&&l-p-1>i&&e[p+1]!==" "}return!d&&!f?m&&!a&&!s(e)?Uu:o===Li?cr:ma:r>9&&_n(e)?cr:a?o===Li?cr:ma:f?Gu:Xu}g(Vu,"chooseScalarStyle");function Zu(e,t,r,i,s){e.dump=(function(){if(t.length===0)return e.quotingType===Li?'""':"''";if(!e.noCompatMode&&(g2.indexOf(t)!==-1||p2.test(t)))return e.quotingType===Li?'"'+t+'"':"'"+t+"'";var o=e.indent*Math.max(1,r),a=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),n=i||e.flowLevel>-1&&r>=e.flowLevel;function l(c){return ju(e,c)}switch(g(l,"testAmbiguity"),Vu(t,n,e.indent,a,l,e.quotingType,e.forceQuotes&&!i,s)){case Uu:return t;case ma:return"'"+t.replace(/'/g,"''")+"'";case Xu:return"|"+ya(t,e.indent)+xa(fa(t,o));case Gu:return">"+ya(t,e.indent)+xa(fa(Ku(t,a),o));case cr:return'"'+Qu(t)+'"';default:throw new Ht("impossible error: invalid scalar style")}})()}g(Zu,"writeScalar");function ya(e,t){var r=_n(e)?String(t):"",i=e[e.length-1]===`
|
|
147
|
+
`,s=i&&(e[e.length-2]===`
|
|
148
|
+
`||e===`
|
|
149
|
+
`),o=s?"+":i?"":"-";return r+o+`
|
|
150
|
+
`}g(ya,"blockHeader");function xa(e){return e[e.length-1]===`
|
|
151
|
+
`?e.slice(0,-1):e}g(xa,"dropEndingNewline");function Ku(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var c=e.indexOf(`
|
|
152
|
+
`);return c=c!==-1?c:e.length,r.lastIndex=c,Ca(e.slice(0,c),t)})(),s=e[0]===`
|
|
153
|
+
`||e[0]===" ",o,a;a=r.exec(e);){var n=a[1],l=a[2];o=l[0]===" ",i+=n+(!s&&!o&&l!==""?`
|
|
154
|
+
`:"")+Ca(l,t),s=o}return i}g(Ku,"foldString");function Ca(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,s=0,o,a=0,n=0,l="";i=r.exec(e);)n=i.index,n-s>t&&(o=a>s?a:n,l+=`
|
|
155
|
+
`+e.slice(s,o),s=o+1),a=n;return l+=`
|
|
156
|
+
`,e.length-s>t&&a>s?l+=e.slice(s,a)+`
|
|
157
|
+
`+e.slice(a+1):l+=e.slice(s),l.slice(1)}g(Ca,"foldLine");function Qu(e){for(var t="",r=0,i,s=0;s<e.length;r>=65536?s+=2:s++)r=pr(e,s),i=Ot[r],!i&&zr(r)?(t+=e[s],r>=65536&&(t+=e[s+1])):t+=i||zu(r);return t}g(Qu,"escapeString");function Ju(e,t,r){var i="",s=e.tag,o,a,n;for(o=0,a=r.length;o<a;o+=1)n=r[o],e.replacer&&(n=e.replacer.call(r,String(o),n)),(ge(e,t,n,!1,!1)||typeof n>"u"&&ge(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=s,e.dump="["+i+"]"}g(Ju,"writeFlowSequence");function ba(e,t,r,i){var s="",o=e.tag,a,n,l;for(a=0,n=r.length;a<n;a+=1)l=r[a],e.replacer&&(l=e.replacer.call(r,String(a),l)),(ge(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&ge(e,t+1,null,!0,!0,!1,!0))&&((!i||s!=="")&&(s+=Is(e,t)),e.dump&&Bi===e.dump.charCodeAt(0)?s+="-":s+="- ",s+=e.dump);e.tag=o,e.dump=s||"[]"}g(ba,"writeBlockSequence");function tf(e,t,r){var i="",s=e.tag,o=Object.keys(r),a,n,l,c,h;for(a=0,n=o.length;a<n;a+=1)h="",i!==""&&(h+=", "),e.condenseFlow&&(h+='"'),l=o[a],c=r[l],e.replacer&&(c=e.replacer.call(r,l,c)),ge(e,t,l,!1,!1)&&(e.dump.length>1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),ge(e,t,c,!1,!1)&&(h+=e.dump,i+=h));e.tag=s,e.dump="{"+i+"}"}g(tf,"writeFlowMapping");function ef(e,t,r,i){var s="",o=e.tag,a=Object.keys(r),n,l,c,h,d,f;if(e.sortKeys===!0)a.sort();else if(typeof e.sortKeys=="function")a.sort(e.sortKeys);else if(e.sortKeys)throw new Ht("sortKeys must be a boolean or a function");for(n=0,l=a.length;n<l;n+=1)f="",(!i||s!=="")&&(f+=Is(e,t)),c=a[n],h=r[c],e.replacer&&(h=e.replacer.call(r,c,h)),ge(e,t+1,c,!0,!0,!0)&&(d=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,d&&(e.dump&&Bi===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,d&&(f+=Is(e,t)),ge(e,t+1,h,!0,d)&&(e.dump&&Bi===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,s+=f));e.tag=o,e.dump=s||"{}"}g(ef,"writeBlockMapping");function ka(e,t,r){var i,s,o,a,n,l;for(s=r?e.explicitTypes:e.implicitTypes,o=0,a=s.length;o<a;o+=1)if(n=s[o],(n.instanceOf||n.predicate)&&(!n.instanceOf||typeof t=="object"&&t instanceof n.instanceOf)&&(!n.predicate||n.predicate(t))){if(r?n.multi&&n.representName?e.tag=n.representName(t):e.tag=n.tag:e.tag="?",n.represent){if(l=e.styleMap[n.tag]||n.defaultStyle,$u.call(n.represent)==="[object Function]")i=n.represent(t,l);else if(Iu.call(n.represent,l))i=n.represent[l](t,l);else throw new Ht("!<"+n.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}g(ka,"detectType");function ge(e,t,r,i,s,o,a){e.tag=null,e.dump=r,ka(e,r,!1)||ka(e,r,!0);var n=$u.call(e.dump),l=i,c;i&&(i=e.flowLevel<0||e.flowLevel>t);var h=n==="[object Object]"||n==="[object Array]",d,f;if(h&&(d=e.duplicates.indexOf(r),f=d!==-1),(e.tag!==null&&e.tag!=="?"||f||e.indent!==2&&t>0)&&(s=!1),f&&e.usedDuplicates[d])e.dump="*ref_"+d;else{if(h&&f&&!e.usedDuplicates[d]&&(e.usedDuplicates[d]=!0),n==="[object Object]")i&&Object.keys(e.dump).length!==0?(ef(e,t,e.dump,s),f&&(e.dump="&ref_"+d+e.dump)):(tf(e,t,e.dump),f&&(e.dump="&ref_"+d+" "+e.dump));else if(n==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!a&&t>0?ba(e,t-1,e.dump,s):ba(e,t,e.dump,s),f&&(e.dump="&ref_"+d+e.dump)):(Ju(e,t,e.dump),f&&(e.dump="&ref_"+d+" "+e.dump));else if(n==="[object String]")e.tag!=="?"&&Zu(e,e.dump,t,o,l);else{if(n==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Ht("unacceptable kind of an object to dump "+n)}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}g(ge,"writeNode");function rf(e,t){var r=[],i=[],s,o;for(Ps(e,r,i),s=0,o=i.length;s<o;s+=1)t.duplicates.push(r[i[s]]);t.usedDuplicates=new Array(o)}g(rf,"getDuplicateReferences");function Ps(e,t,r){var i,s,o;if(e!==null&&typeof e=="object")if(s=t.indexOf(e),s!==-1)r.indexOf(s)===-1&&r.push(s);else if(t.push(e),Array.isArray(e))for(s=0,o=e.length;s<o;s+=1)Ps(e[s],t,r);else for(i=Object.keys(e),s=0,o=i.length;s<o;s+=1)Ps(e[i[s]],t,r)}g(Ps,"inspectNode");function y2(e,t){t=t||{};var r=new Wu(t);r.noRefs||rf(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),ge(r,0,i,!0,!0)?r.dump+`
|
|
158
|
+
`:""}g(y2,"dump$1");function x2(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.")}}g(x2,"renamed");var sf=Xd,of=K1.load;var dr=g((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),$t={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},Yl={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function di(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=xt(e),t=xt(t);const[r,i]=[e.x,e.y],[s,o]=[t.x,t.y],a=s-r,n=o-i;return{angle:Math.atan(n/a),deltaX:a,deltaY:n}}g(di,"calculateDeltaAndAngle");var xt=g(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),af=g(e=>({x:g(function(t,r,i){let s=0;const o=xt(i[0]).x<xt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn($t,e.arrowTypeStart)){const{angle:u,deltaX:p}=di(i[0],i[1]);s=$t[e.arrowTypeStart]*Math.cos(u)*(p>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn($t,e.arrowTypeEnd)){const{angle:u,deltaX:p}=di(i[i.length-1],i[i.length-2]);s=$t[e.arrowTypeEnd]*Math.cos(u)*(p>=0?1:-1)}const a=Math.abs(xt(t).x-xt(i[i.length-1]).x),n=Math.abs(xt(t).y-xt(i[i.length-1]).y),l=Math.abs(xt(t).x-xt(i[0]).x),c=Math.abs(xt(t).y-xt(i[0]).y),h=$t[e.arrowTypeStart],d=$t[e.arrowTypeEnd],f=1;if(a<d&&a>0&&n<d){let u=d+f-a;u*=o==="right"?-1:1,s-=u}if(l<h&&l>0&&c<h){let u=h+f-l;u*=o==="right"?-1:1,s+=u}return xt(t).x+s},"x"),y:g(function(t,r,i){let s=0;const o=xt(i[0]).y<xt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn($t,e.arrowTypeStart)){const{angle:u,deltaY:p}=di(i[0],i[1]);s=$t[e.arrowTypeStart]*Math.abs(Math.sin(u))*(p>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn($t,e.arrowTypeEnd)){const{angle:u,deltaY:p}=di(i[i.length-1],i[i.length-2]);s=$t[e.arrowTypeEnd]*Math.abs(Math.sin(u))*(p>=0?1:-1)}const a=Math.abs(xt(t).y-xt(i[i.length-1]).y),n=Math.abs(xt(t).x-xt(i[i.length-1]).x),l=Math.abs(xt(t).y-xt(i[0]).y),c=Math.abs(xt(t).x-xt(i[0]).x),h=$t[e.arrowTypeStart],d=$t[e.arrowTypeEnd],f=1;if(a<d&&a>0&&n<d){let u=d+f-a;u*=o==="up"?-1:1,s-=u}if(l<h&&l>0&&c<h){let u=h+f-l;u*=o==="up"?-1:1,s+=u}return xt(t).y+s},"y")}),"getLineFunctionsWithOffset"),Ui={},Tt={},Ul;function C2(){return Ul||(Ul=1,Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.BLANK_URL=Tt.relativeFirstCharacters=Tt.whitespaceEscapeCharsRegex=Tt.urlSchemeRegex=Tt.ctrlCharactersRegex=Tt.htmlCtrlEntityRegex=Tt.htmlEntitiesRegex=Tt.invalidProtocolRegex=void 0,Tt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,Tt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,Tt.htmlCtrlEntityRegex=/&(newline|tab);/gi,Tt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Tt.urlSchemeRegex=/^.+(:|:)/gim,Tt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,Tt.relativeFirstCharacters=[".","/"],Tt.BLANK_URL="about:blank"),Tt}var Xl;function b2(){if(Xl)return Ui;Xl=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.sanitizeUrl=o;var e=C2();function t(a){return e.relativeFirstCharacters.indexOf(a[0])>-1}function r(a){var n=a.replace(e.ctrlCharactersRegex,"");return n.replace(e.htmlEntitiesRegex,function(l,c){return String.fromCharCode(c)})}function i(a){return URL.canParse(a)}function s(a){try{return decodeURIComponent(a)}catch{return a}}function o(a){if(!a)return e.BLANK_URL;var n,l=s(a.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=s(l),n=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(n&&n.length>0);var c=l;if(!c)return e.BLANK_URL;if(t(c))return c;var h=c.trimStart(),d=h.match(e.urlSchemeRegex);if(!d)return c;var f=d[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(f))return e.BLANK_URL;var u=h.replace(/\\/g,"/");if(f==="mailto:"||f.includes("://"))return u;if(f==="http:"||f==="https:"){if(!i(u))return e.BLANK_URL;var p=new URL(u);return p.protocol=p.protocol.toLowerCase(),p.hostname=p.hostname.toLowerCase(),p.toString()}return u}return Ui}var nf=b2();function Fo(e){if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){const r=e[Symbol.toStringTag];return r==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${r}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function k2(){}function lf(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function oo(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const hf="[object RegExp]",Bn="[object String]",Ln="[object Number]",Fn="[object Boolean]",Mn="[object Arguments]",cf="[object Symbol]",df="[object Date]",uf="[object Map]",ff="[object Set]",gf="[object Array]",pf="[object ArrayBuffer]",mf="[object Object]",yf="[object DataView]",xf="[object Uint8Array]",Cf="[object Uint8ClampedArray]",bf="[object Uint16Array]",kf="[object Uint32Array]",wf="[object Int8Array]",vf="[object Int16Array]",Sf="[object Int32Array]",Tf="[object Float32Array]",_f="[object Float64Array]",Gl=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})()||Function("return this")();function An(e){return typeof Gl.Buffer<"u"&&Gl.Buffer.isBuffer(e)}function w2(e){return Number.isSafeInteger(e)&&e>=0}function Bf(e){return e!=null&&typeof e!="function"&&w2(e.length)}function v2(e){return e==="__proto__"}function ao(e){return e==null||typeof e!="object"&&typeof e!="function"}function En(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function S2(e,t){return mr(e,void 0,e,new Map,t)}function mr(e,t,r,i=new Map,s=void 0){const o=s?.(e,t,r,i);if(o!==void 0)return o;if(ao(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){const a=new Array(e.length);i.set(e,a);for(let n=0;n<e.length;n++)a[n]=mr(e[n],n,r,i,s);return Object.hasOwn(e,"index")&&(a.index=e.index),Object.hasOwn(e,"input")&&(a.input=e.input),a}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const a=new RegExp(e.source,e.flags);return a.lastIndex=e.lastIndex,a}if(e instanceof Map){const a=new Map;i.set(e,a);for(const[n,l]of e)a.set(n,mr(l,n,r,i,s));return a}if(e instanceof Set){const a=new Set;i.set(e,a);for(const n of e)a.add(mr(n,void 0,r,i,s));return a}if(An(e))return e.subarray();if(En(e)){const a=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,a);for(let n=0;n<e.length;n++)a[n]=mr(e[n],n,r,i,s);return a}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const a=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return i.set(e,a),te(a,e,r,i,s),a}if(typeof File<"u"&&e instanceof File){const a=new File([e],e.name,{type:e.type});return i.set(e,a),te(a,e,r,i,s),a}if(typeof Blob<"u"&&e instanceof Blob){const a=new Blob([e],{type:e.type});return i.set(e,a),te(a,e,r,i,s),a}if(e instanceof Error){const a=structuredClone(e);return i.set(e,a),a.message=e.message,a.name=e.name,a.stack=e.stack,a.cause=e.cause,a.constructor=e.constructor,te(a,e,r,i,s),a}if(e instanceof Boolean){const a=new Boolean(e.valueOf());return i.set(e,a),te(a,e,r,i,s),a}if(e instanceof Number){const a=new Number(e.valueOf());return i.set(e,a),te(a,e,r,i,s),a}if(e instanceof String){const a=new String(e.valueOf());return i.set(e,a),te(a,e,r,i,s),a}if(typeof e=="object"&&T2(e)){const a=Object.create(Object.getPrototypeOf(e));return i.set(e,a),te(a,e,r,i,s),a}return e}function te(e,t,r=e,i,s){const o=[...Object.keys(t),...lf(t)];for(let a=0;a<o.length;a++){const n=o[a],l=Object.getOwnPropertyDescriptor(e,n);(l==null||l.writable)&&(e[n]=mr(t[n],n,r,i,s))}}function T2(e){switch(oo(e)){case Mn:case gf:case pf:case yf:case Fn:case df:case Tf:case _f:case wf:case vf:case Sf:case uf:case Ln:case mf:case hf:case ff:case Bn:case cf:case xf:case Cf:case bf:case kf:return!0;default:return!1}}function _2(e,t){return S2(e,(r,i,s,o)=>{if(typeof e=="object"){if(oo(e)==="[object Object]"&&typeof e.constructor!="function"){const a={};return o.set(e,a),te(a,e,s,o),a}switch(Object.prototype.toString.call(e)){case Ln:case Bn:case Fn:{const a=new e.constructor(e?.valueOf());return te(a,e),a}case Mn:{const a={};return te(a,e),a.length=e.length,a[Symbol.iterator]=e[Symbol.iterator],a}default:return}}})}function Vl(e){return _2(e)}function wa(e){return e!==null&&typeof e=="object"&&oo(e)==="[object Arguments]"}function va(e){return typeof e=="object"&&e!==null}function B2(e){return va(e)&&Bf(e)}function Pi(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const r=function(...i){const s=t?t.apply(this,i):i[0],o=r.cache;if(o.has(s))return o.get(s);const a=e.apply(this,i);return r.cache=o.set(s,a)||o,a};return r.cache=new(Pi.Cache||Map),r}Pi.Cache=Map;function Ci(e){return En(e)}function L2(e){const t=e?.constructor;return e===(typeof t=="function"?t.prototype:Object.prototype)}function F2(e){if(ao(e))return e;if(Array.isArray(e)||En(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);const t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);const r=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new r(e);if(e instanceof RegExp){const i=new r(e);return i.lastIndex=e.lastIndex,i}if(e instanceof DataView)return new r(e.buffer.slice(0));if(e instanceof Error){let i;return e instanceof AggregateError?i=new r(e.errors,e.message,{cause:e.cause}):i=new r(e.message,{cause:e.cause}),i.stack=e.stack,Object.assign(i,e),i}return typeof File<"u"&&e instanceof File?new r([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e=="object"?Object.assign(Object.create(t),e):e}function M2(e,...t){const r=t.slice(0,-1),i=t[t.length-1];let s=e;for(let o=0;o<r.length;o++){const a=r[o];s=hs(s,a,i,new Map)}return s}function hs(e,t,r,i){if(ao(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return F2(i.get(t));if(i.set(t,e),Array.isArray(t)){t=t.slice();for(let o=0;o<t.length;o++)t[o]=t[o]??void 0}const s=[...Object.keys(t),...lf(t)];for(let o=0;o<s.length;o++){const a=s[o];if(v2(a))continue;let n=t[a],l=e[a];if(wa(n)&&(n={...n}),wa(l)&&(l={...l}),An(n)&&(n=Vl(n)),Array.isArray(n))if(Array.isArray(l)){const h=[],d=Reflect.ownKeys(l);for(let f=0;f<d.length;f++){const u=d[f];h[u]=l[u]}l=h}else if(B2(l)){const h=[];for(let d=0;d<l.length;d++)h[d]=l[d];l=h}else l=[];const c=r(l,n,a,e,t,i);c!==void 0?e[a]=c:Array.isArray(n)||va(l)&&va(n)&&(Fo(l)||Fo(n)||Ci(l)||Ci(n))?e[a]=hs(l,n,r,i):l==null&&Fo(n)?e[a]=hs({},n,r,i):l==null&&Ci(n)?e[a]=Vl(n):(l===void 0||n!==void 0)&&(e[a]=n)}return e}function A2(e,...t){return M2(e,...t,k2)}function Zl(e){if(e==null)return!0;if(Bf(e))return typeof e.splice!="function"&&typeof e!="string"&&!An(e)&&!Ci(e)&&!wa(e)?!1:e.length===0;if(typeof e=="object"){if(e instanceof Map||e instanceof Set)return e.size===0;const t=Object.keys(e);return L2(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var Lf="",E2={curveBasis:Bs,curveBasisClosed:a1,curveBasisOpen:n1,curveBumpX:ed,curveBumpY:rd,curveBundle:l1,curveCardinalClosed:h1,curveCardinalOpen:c1,curveCardinal:ad,curveCatmullRomClosed:d1,curveCatmullRomOpen:u1,curveCatmullRom:ld,curveLinear:xi,curveLinearClosed:f1,curveMonotoneX:gd,curveMonotoneY:pd,curveNatural:yd,curveStep:xd,curveStepAfter:bd,curveStepBefore:Cd},$2=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,I2=g(function(e,t){const r=Ff(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const a=r.map(n=>n.args);ps(a),i=vt(i,[...a])}else i=r.args;if(!i)return;let s=Ka(e,t);const o="config";return i[o]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),i[s]=i[o],delete i[o]),i},"detectInit"),Ff=g(function(e,t=null){try{const r=new RegExp(`[%]{2}(?![{]${$2.source})(?=[}][%]{2}).*
|
|
159
|
+
`,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),j.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let i;const s=[];for(;(i=mi.exec(e))!==null;)if(i.index===mi.lastIndex&&mi.lastIndex++,i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t)){const o=i[1]?i[1]:i[2],a=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;s.push({type:o,args:a})}return s.length===0?{type:e,args:null}:s.length===1?s[0]:s}catch(r){return j.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),P2=g(function(e){return e.replace(mi,"")},"removeDirectives"),O2=g(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function $n(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return E2[r]??t}g($n,"interpolateToCurve");function Mf(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?nf.sanitizeUrl(r):r}g(Mf,"formatUrl");var R2=g((e,...t)=>{const r=e.split("."),i=r.length-1,s=r[i];let o=window;for(let a=0;a<i;a++)if(o=o[r[a]],!o){j.error(`Function name: ${e} not found in window`);return}o[s](...t)},"runFunc");function In(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}g(In,"distance");function Af(e){let t,r=0;e.forEach(s=>{r+=In(s,t),t=s});const i=r/2;return Pn(e,i)}g(Af,"traverseEdge");function Ef(e){return e.length===1?e[0]:Af(e)}g(Ef,"calcLabelPosition");var Kl=g((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Pn=g((e,t)=>{let r,i=t;for(const s of e){if(r){const o=In(s,r);if(o===0)return r;if(o<i)i-=o;else{const a=i/o;if(a<=0)return r;if(a>=1)return{x:s.x,y:s.y};if(a>0&&a<1)return{x:Kl((1-a)*r.x+a*s.x,5),y:Kl((1-a)*r.y+a*s.y,5)}}}r=s}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),D2=g((e,t,r)=>{j.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const s=Pn(t,25),o=e?10:5,a=Math.atan2(t[0].y-s.y,t[0].x-s.x),n={x:0,y:0};return n.x=Math.sin(a)*o+(t[0].x+s.x)/2,n.y=-Math.cos(a)*o+(t[0].y+s.y)/2,n},"calcCardinalityPosition");function $f(e,t,r){const i=structuredClone(r);j.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const s=25+e,o=Pn(i,s),a=10+e*.5,n=Math.atan2(i[0].y-o.y,i[0].x-o.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(n+Math.PI)*a+(i[0].x+o.x)/2,l.y=-Math.cos(n+Math.PI)*a+(i[0].y+o.y)/2):t==="end_right"?(l.x=Math.sin(n-Math.PI)*a+(i[0].x+o.x)/2-5,l.y=-Math.cos(n-Math.PI)*a+(i[0].y+o.y)/2-5):t==="end_left"?(l.x=Math.sin(n)*a+(i[0].x+o.x)/2-5,l.y=-Math.cos(n)*a+(i[0].y+o.y)/2-5):(l.x=Math.sin(n)*a+(i[0].x+o.x)/2,l.y=-Math.cos(n)*a+(i[0].y+o.y)/2),l}g($f,"calcTerminalLabelPosition");function On(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}}g(On,"getStylesFromArray");var Ql=0,If=g(()=>(Ql++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Ql),"generateId");function Pf(e){let t="";const r="0123456789abcdef",i=r.length;for(let s=0;s<e;s++)t+=r.charAt(Math.floor(Math.random()*i));return t}g(Pf,"makeRandomHex");var Of=g(e=>Pf(e.length),"random"),N2=g(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"),q2=g(function(e,t){const r=t.text.replace(Yr.lineBreakRegex," "),[,i]=Oi(t.fontSize),s=e.append("text");s.attr("x",t.x),s.attr("y",t.y),s.style("text-anchor",t.anchor),s.style("font-family",t.fontFamily),s.style("font-size",i),s.style("font-weight",t.fontWeight),s.attr("fill",t.fill),t.class!==void 0&&s.attr("class",t.class);const o=s.append("tspan");return o.attr("x",t.x+t.textMargin*2),o.attr("fill",t.fill),o.text(r),s},"drawSimpleText"),Rf=Pi((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Yr.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),s=[];let o="";return i.forEach((a,n)=>{const l=pe(`${a} `,r),c=pe(o,r);if(l>t){const{hyphenatedStrings:f,remainingWord:u}=z2(a,t,"-",r);s.push(o,...f),o=u}else c+l>=t?(s.push(o),o=a):o=[o,a].filter(Boolean).join(" ");n+1===i.length&&s.push(o)}),s.filter(a=>a!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),z2=Pi((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const s=[...e],o=[];let a="";return s.forEach((n,l)=>{const c=`${a}${n}`;if(pe(c,i)>=t){const d=l+1,f=s.length===d,u=`${c}${r}`;o.push(f?c:u),a=""}else a=c}),{hyphenatedStrings:o,remainingWord:a}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function Rn(e,t){return no(e,t).height}g(Rn,"calculateTextHeight");function pe(e,t){return no(e,t).width}g(pe,"calculateTextWidth");var no=Pi((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:s=400}=t;if(!e)return{width:0,height:0};const[,o]=Oi(r),a=["sans-serif",i],n=e.split(Yr.lineBreakRegex),l=[],c=ct("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const f of a){let u=0;const p={width:0,height:0,lineHeight:0};for(const m of n){const y=N2();y.text=m||Lf;const x=q2(h,y).style("font-size",o).style("font-weight",s).style("font-family",f),b=(x._groups||x)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");p.width=Math.round(Math.max(p.width,b.width)),u=Math.round(b.height),p.height+=u,p.lineHeight=Math.round(Math.max(p.lineHeight,u))}l.push(p)}h.remove();const d=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[d]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Ir,W2=(Ir=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},g(Ir,"InitIDGenerator"),Ir),Xi,j2=g(function(e){return Xi=Xi||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Xi.innerHTML=e,unescape(Xi.textContent)},"entityDecode");function Dn(e){return"str"in e}g(Dn,"isDetailedError");var H2=g((e,t,r,i)=>{if(!i)return;const s=e.node()?.getBBox();s&&e.append("text").text(i).attr("text-anchor","middle").attr("x",s.x+s.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Oi=g(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 lo(e,t){return A2({},e,t)}g(lo,"cleanAndMerge");var Zt={assignWithDepth:vt,wrapLabel:Rf,calculateTextHeight:Rn,calculateTextWidth:pe,calculateTextDimensions:no,cleanAndMerge:lo,detectInit:I2,detectDirective:Ff,isSubstringInArray:O2,interpolateToCurve:$n,calcLabelPosition:Ef,calcCardinalityPosition:D2,calcTerminalLabelPosition:$f,formatUrl:Mf,getStylesFromArray:On,generateId:If,random:Of,runFunc:R2,entityDecode:j2,insertTitle:H2,isLabelCoordinateInPath:Df,parseFontSize:Oi,InitIDGenerator:W2},Y2=g(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"),De=g(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),U2=g((e,t,{counter:r=0,prefix:i,suffix:s},o)=>o||`${i?`${i}_`:""}${e}_${t}_${r}${s?`_${s}`:""}`,"getEdgeId");function Lt(e){return e??null}g(Lt,"handleUndefinedAttr");function Df(e,t){const r=Math.round(e.x),i=Math.round(e.y),s=t.replace(/(\d+\.\d+)/g,o=>Math.round(parseFloat(o)).toString());return s.includes(r.toString())||s.includes(i.toString())}g(Df,"isLabelCoordinateInPath");var ho=g(({flowchart:e})=>{const t=e?.subGraphTitleMargin?.top??0,r=e?.subGraphTitleMargin?.bottom??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins");async function Nn(e,t){const r=e.getElementsByTagName("img");if(!r||r.length===0)return;const i=t.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...r].map(s=>new Promise(o=>{function a(){if(s.style.display="flex",s.style.flexDirection="column",i){const n=pt().fontSize?pt().fontSize:window.getComputedStyle(document.body).fontSize,l=5,[c=Qa.fontSize]=Oi(n),h=c*l+"px";s.style.minWidth=h,s.style.maxWidth=h}else s.style.width="100%";o(s)}g(a,"setupImage"),setTimeout(()=>{s.complete&&a()}),s.addEventListener("error",a),s.addEventListener("load",a)})))}g(Nn,"configureLabelImages");var X2=g(e=>{const{handDrawnSeed:t}=pt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),Xr=g(e=>{const t=G2([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),G2=g(e=>{const t=new Map;return e.forEach(r=>{const[i,s]=r.split(":");t.set(i.trim(),s?.trim())}),t},"styles2Map"),qn=g(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"),et=g(e=>{const{stylesArray:t}=Xr(e),r=[],i=[],s=[],o=[];return t.forEach(a=>{const n=a[0];qn(n)?r.push(a.join(":")+" !important"):(i.push(a.join(":")+" !important"),n.includes("stroke")&&s.push(a.join(":")+" !important"),n==="fill"&&o.push(a.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:s,backgroundStyles:o}},"styles2String"),tt=g((e,t)=>{const{themeVariables:r,handDrawnSeed:i}=pt(),{nodeBorder:s,mainBkg:o}=r,{stylesMap:a}=Xr(e);return Object.assign({roughness:.7,fill:a.get("fill")||o,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:a.get("stroke")||s,seed:i,strokeWidth:a.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:V2(a.get("stroke-dasharray"))},t)},"userNodeOverrides"),V2=g(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const s=isNaN(t[0])?0:t[0];return[s,s]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray");const Z2=Object.freeze({left:0,top:0,width:16,height:16}),Os=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Nf=Object.freeze({...Z2,...Os}),K2=Object.freeze({...Nf,body:"",hidden:!1}),Q2=Object.freeze({width:null,height:null}),J2=Object.freeze({...Q2,...Os}),tw=(e,t,r,i="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;i=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const n=s.pop(),l=s.pop(),c={provider:s.length>0?s[0]:i,prefix:l,name:n};return Mo(c)?c:null}const o=s[0],a=o.split("-");if(a.length>1){const n={provider:i,prefix:a.shift(),name:a.join("-")};return Mo(n)?n:null}if(r&&i===""){const n={provider:i,prefix:"",name:o};return Mo(n,r)?n:null}return null},Mo=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function ew(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 Jl(e,t){const r=ew(e,t);for(const i in K2)i in Os?i in e&&!(i in r)&&(r[i]=Os[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function rw(e,t){const r=e.icons,i=e.aliases||Object.create(null),s=Object.create(null);function o(a){if(r[a])return s[a]=[];if(!(a in s)){s[a]=null;const n=i[a]&&i[a].parent,l=n&&o(n);l&&(s[a]=[n].concat(l))}return s[a]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(o),s}function th(e,t,r){const i=e.icons,s=e.aliases||Object.create(null);let o={};function a(n){o=Jl(i[n]||s[n],o)}return a(t),r.forEach(a),Jl(e,o)}function iw(e,t){if(e.icons[t])return th(e,t,[]);const r=rw(e,[t])[t];return r?th(e,t,r):null}const sw=/(-?[0-9.]*[0-9]+[0-9.]*)/g,ow=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function eh(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(sw);if(i===null||!i.length)return e;const s=[];let o=i.shift(),a=ow.test(o);for(;;){if(a){const n=parseFloat(o);isNaN(n)?s.push(o):s.push(Math.ceil(n*t*r)/r)}else s.push(o);if(o=i.shift(),o===void 0)return s.join("");a=!a}}function aw(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const s=e.indexOf(">",i),o=e.indexOf("</"+t);if(s===-1||o===-1)break;const a=e.indexOf(">",o);if(a===-1)break;r+=e.slice(s+1,o).trim(),e=e.slice(0,i).trim()+e.slice(a+1)}return{defs:r,content:e}}function nw(e,t){return e?"<defs>"+e+"</defs>"+t:t}function lw(e,t,r){const i=aw(e);return nw(i.defs,t+i.content+r)}const hw=e=>e==="unset"||e==="undefined"||e==="none";function cw(e,t){const r={...Nf,...e},i={...J2,...t},s={left:r.left,top:r.top,width:r.width,height:r.height};let o=r.body;[r,i].forEach(m=>{const y=[],x=m.hFlip,b=m.vFlip;let k=m.rotate;x?b?k+=2:(y.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),y.push("scale(-1 1)"),s.top=s.left=0):b&&(y.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),y.push("scale(1 -1)"),s.top=s.left=0);let S;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:S=s.height/2+s.top,y.unshift("rotate(90 "+S.toString()+" "+S.toString()+")");break;case 2:y.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:S=s.width/2+s.left,y.unshift("rotate(-90 "+S.toString()+" "+S.toString()+")");break}k%2===1&&(s.left!==s.top&&(S=s.left,s.left=s.top,s.top=S),s.width!==s.height&&(S=s.width,s.width=s.height,s.height=S)),y.length&&(o=lw(o,'<g transform="'+y.join(" ")+'">',"</g>"))});const a=i.width,n=i.height,l=s.width,c=s.height;let h,d;a===null?(d=n===null?"1em":n==="auto"?c:n,h=eh(d,l/c)):(h=a==="auto"?l:a,d=n===null?eh(h,c/l):n==="auto"?c:n);const f={},u=(m,y)=>{hw(y)||(f[m]=y.toString())};u("width",h),u("height",d);const p=[s.left,s.top,l,c];return f.viewBox=p.join(" "),{attributes:f,viewBox:p,body:o}}const dw=/\sid="(\S+)"/g,rh=new Map;function uw(e){e=e.replace(/[0-9]+$/,"")||"a";const t=rh.get(e)||0;return rh.set(e,t+1),t?`${e}${t}`:e}function fw(e){const t=[];let r;for(;r=dw.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(s=>{const o=uw(s),a=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+o+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function gw(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 zn(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var nr=zn();function qf(e){nr=e}var bi={exec:()=>null};function mt(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(s,o)=>{let a=typeof o=="string"?o:o.source;return a=a.replace(qt.caret,"$1"),r=r.replace(s,a),i},getRegex:()=>new RegExp(r,t)};return i}var pw=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),qt={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")},mw=/^(?:[ \t]*(?:\n|$))+/,yw=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,xw=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ri=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Cw=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Wn=/(?:[*+-]|\d{1,9}[.)])/,zf=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Wf=mt(zf).replace(/bull/g,Wn).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(),bw=mt(zf).replace(/bull/g,Wn).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(),jn=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,kw=/^[^\n]+/,Hn=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,ww=mt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Hn).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),vw=mt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Wn).getRegex(),co="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",Yn=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Sw=mt("^ {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",Yn).replace("tag",co).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),jf=mt(jn).replace("hr",Ri).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",co).getRegex(),Tw=mt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",jf).getRegex(),Un={blockquote:Tw,code:yw,def:ww,fences:xw,heading:Cw,hr:Ri,html:Sw,lheading:Wf,list:vw,newline:mw,paragraph:jf,table:bi,text:kw},ih=mt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ri).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",co).getRegex(),_w={...Un,lheading:bw,table:ih,paragraph:mt(jn).replace("hr",Ri).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ih).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",co).getRegex()},Bw={...Un,html:mt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Yn).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:bi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:mt(jn).replace("hr",Ri).replace("heading",` *#{1,6} *[^
|
|
160
|
+
]`).replace("lheading",Wf).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Lw=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Fw=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Hf=/^( {2,}|\\)\n(?!\s*$)/,Mw=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,uo=/[\p{P}\p{S}]/u,Xn=/[\s\p{P}\p{S}]/u,Yf=/[^\s\p{P}\p{S}]/u,Aw=mt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Xn).getRegex(),Uf=/(?!~)[\p{P}\p{S}]/u,Ew=/(?!~)[\s\p{P}\p{S}]/u,$w=/(?:[^\s\p{P}\p{S}]|~)/u,Iw=mt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",pw?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Xf=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Pw=mt(Xf,"u").replace(/punct/g,uo).getRegex(),Ow=mt(Xf,"u").replace(/punct/g,Uf).getRegex(),Gf="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Rw=mt(Gf,"gu").replace(/notPunctSpace/g,Yf).replace(/punctSpace/g,Xn).replace(/punct/g,uo).getRegex(),Dw=mt(Gf,"gu").replace(/notPunctSpace/g,$w).replace(/punctSpace/g,Ew).replace(/punct/g,Uf).getRegex(),Nw=mt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Yf).replace(/punctSpace/g,Xn).replace(/punct/g,uo).getRegex(),qw=mt(/\\(punct)/,"gu").replace(/punct/g,uo).getRegex(),zw=mt(/^<(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(),Ww=mt(Yn).replace("(?:-->|$)","-->").getRegex(),jw=mt("^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",Ww).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Rs=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Hw=mt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Rs).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Vf=mt(/^!?\[(label)\]\[(ref)\]/).replace("label",Rs).replace("ref",Hn).getRegex(),Zf=mt(/^!?\[(ref)\](?:\[\])?/).replace("ref",Hn).getRegex(),Yw=mt("reflink|nolink(?!\\()","g").replace("reflink",Vf).replace("nolink",Zf).getRegex(),sh=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Gn={_backpedal:bi,anyPunctuation:qw,autolink:zw,blockSkip:Iw,br:Hf,code:Fw,del:bi,emStrongLDelim:Pw,emStrongRDelimAst:Rw,emStrongRDelimUnd:Nw,escape:Lw,link:Hw,nolink:Zf,punctuation:Aw,reflink:Vf,reflinkSearch:Yw,tag:jw,text:Mw,url:bi},Uw={...Gn,link:mt(/^!?\[(label)\]\((.*?)\)/).replace("label",Rs).getRegex(),reflink:mt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Rs).getRegex()},Sa={...Gn,emStrongRDelimAst:Dw,emStrongLDelim:Ow,url:mt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",sh).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:mt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",sh).getRegex()},Xw={...Sa,br:mt(Hf).replace("{2,}","*").getRegex(),text:mt(Sa.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Gi={normal:Un,gfm:_w,pedantic:Bw},ei={normal:Gn,gfm:Sa,breaks:Xw,pedantic:Uw},Gw={"&":"&","<":"<",">":">",'"':""","'":"'"},oh=e=>Gw[e];function he(e,t){if(t){if(qt.escapeTest.test(e))return e.replace(qt.escapeReplace,oh)}else if(qt.escapeTestNoEncode.test(e))return e.replace(qt.escapeReplaceNoEncode,oh);return e}function ah(e){try{e=encodeURI(e).replace(qt.percentDecode,"%")}catch{return null}return e}function nh(e,t){let r=e.replace(qt.findPipe,(o,a,n)=>{let l=!1,c=a;for(;--c>=0&&n[c]==="\\";)l=!l;return l?"|":" |"}),i=r.split(qt.splitPipe),s=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(;s<i.length;s++)i[s]=i[s].trim().replace(qt.slashPipe,"|");return i}function ri(e,t,r){let i=e.length;if(i===0)return"";let s=0;for(;s<i&&e.charAt(i-s-1)===t;)s++;return e.slice(0,i-s)}function Vw(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 lh(e,t,r,i,s){let o=t.href,a=t.title||null,n=e[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:o,title:a,text:n,tokens:i.inlineTokens(n)};return i.state.inLink=!1,l}function Zw(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
|
|
161
|
+
`).map(o=>{let a=o.match(r.other.beginningSpace);if(a===null)return o;let[n]=a;return n.length>=s.length?o.slice(s.length):o}).join(`
|
|
162
|
+
`)}var Ds=class{options;rules;lexer;constructor(t){this.options=t||nr}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:ri(i,`
|
|
163
|
+
`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],s=Zw(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:s}}}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 s=ri(i,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(i=s.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:ri(r[0],`
|
|
164
|
+
`)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=ri(r[0],`
|
|
165
|
+
`).split(`
|
|
166
|
+
`),s="",o="",a=[];for(;i.length>0;){let n=!1,l=[],c;for(c=0;c<i.length;c++)if(this.rules.other.blockquoteStart.test(i[c]))l.push(i[c]),n=!0;else if(!n)l.push(i[c]);else break;i=i.slice(c);let h=l.join(`
|
|
167
|
+
`),d=h.replace(this.rules.other.blockquoteSetextReplace,`
|
|
168
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
|
|
169
|
+
${h}`:h,o=o?`${o}
|
|
170
|
+
${d}`:d;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,a,!0),this.lexer.state.top=f,i.length===0)break;let u=a.at(-1);if(u?.type==="code")break;if(u?.type==="blockquote"){let p=u,m=p.raw+`
|
|
171
|
+
`+i.join(`
|
|
172
|
+
`),y=this.blockquote(m);a[a.length-1]=y,s=s.substring(0,s.length-p.raw.length)+y.raw,o=o.substring(0,o.length-p.text.length)+y.text;break}else if(u?.type==="list"){let p=u,m=p.raw+`
|
|
173
|
+
`+i.join(`
|
|
174
|
+
`),y=this.list(m);a[a.length-1]=y,s=s.substring(0,s.length-u.raw.length)+y.raw,o=o.substring(0,o.length-p.raw.length)+y.raw,i=m.substring(a.at(-1).raw.length).split(`
|
|
175
|
+
`);continue}}return{type:"blockquote",raw:s,tokens:a,text:o}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),s=i.length>1,o={type:"list",raw:"",ordered:s,start:s?+i.slice(0,-1):"",loose:!1,items:[]};i=s?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=s?i:"[*+-]");let a=this.rules.other.listItemRegex(i),n=!1;for(;t;){let c=!1,h="",d="";if(!(r=a.exec(t))||this.rules.block.hr.test(t))break;h=r[0],t=t.substring(h.length);let f=r[2].split(`
|
|
176
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),u=t.split(`
|
|
177
|
+
`,1)[0],p=!f.trim(),m=0;if(this.options.pedantic?(m=2,d=f.trimStart()):p?m=r[1].length+1:(m=r[2].search(this.rules.other.nonSpaceChar),m=m>4?1:m,d=f.slice(m),m+=r[1].length),p&&this.rules.other.blankLine.test(u)&&(h+=u+`
|
|
178
|
+
`,t=t.substring(u.length+1),c=!0),!c){let b=this.rules.other.nextBulletRegex(m),k=this.rules.other.hrRegex(m),S=this.rules.other.fencesBeginRegex(m),v=this.rules.other.headingBeginRegex(m),_=this.rules.other.htmlBeginRegex(m);for(;t;){let $=t.split(`
|
|
179
|
+
`,1)[0],T;if(u=$,this.options.pedantic?(u=u.replace(this.rules.other.listReplaceNesting," "),T=u):T=u.replace(this.rules.other.tabCharGlobal," "),S.test(u)||v.test(u)||_.test(u)||b.test(u)||k.test(u))break;if(T.search(this.rules.other.nonSpaceChar)>=m||!u.trim())d+=`
|
|
180
|
+
`+T.slice(m);else{if(p||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||S.test(f)||v.test(f)||k.test(f))break;d+=`
|
|
181
|
+
`+u}!p&&!u.trim()&&(p=!0),h+=$+`
|
|
182
|
+
`,t=t.substring($.length+1),f=T.slice(m)}}o.loose||(n?o.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(n=!0));let y=null,x;this.options.gfm&&(y=this.rules.other.listIsTask.exec(d),y&&(x=y[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:h,task:!!y,checked:x,loose:!1,text:d,tokens:[]}),o.raw+=h}let l=o.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let c=0;c<o.items.length;c++)if(this.lexer.state.top=!1,o.items[c].tokens=this.lexer.blockTokens(o.items[c].text,[]),!o.loose){let h=o.items[c].tokens.filter(f=>f.type==="space"),d=h.length>0&&h.some(f=>this.rules.other.anyLine.test(f.raw));o.loose=d}if(o.loose)for(let c=0;c<o.items.length;c++)o.items[c].loose=!0;return o}}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," "),s=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=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:s,title:o}}}table(t){let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=nh(r[1]),s=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=r[3]?.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
183
|
+
`):[],a={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let n of s)this.rules.other.tableAlignRight.test(n)?a.align.push("right"):this.rules.other.tableAlignCenter.test(n)?a.align.push("center"):this.rules.other.tableAlignLeft.test(n)?a.align.push("left"):a.align.push(null);for(let n=0;n<i.length;n++)a.header.push({text:i[n],tokens:this.lexer.inline(i[n]),header:!0,align:a.align[n]});for(let n of o)a.rows.push(nh(n,a.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:a.align[c]})));return a}}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)===`
|
|
184
|
+
`?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 a=ri(i.slice(0,-1),"\\");if((i.length-a.length)%2===0)return}else{let a=Vw(r[2],"()");if(a===-2)return;if(a>-1){let n=(r[0].indexOf("!")===0?5:4)+r[1].length+a;r[2]=r[2].substring(0,a),r[0]=r[0].substring(0,n).trim(),r[3]=""}}let s=r[2],o="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(s);a&&(s=a[1],o=a[3])}else o=r[3]?r[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),lh(r,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.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 s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=r[s.toLowerCase()];if(!o){let a=i[0].charAt(0);return{type:"text",raw:a,text:a}}return lh(i,o,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!i||this.rules.inline.punctuation.exec(i))){let o=[...s[0]].length-1,a,n,l=o,c=0,h=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+o);(s=h.exec(r))!=null;){if(a=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!a)continue;if(n=[...a].length,s[3]||s[4]){l+=n;continue}else if((s[5]||s[6])&&o%3&&!((o+n)%3)){c+=n;continue}if(l-=n,l>0)continue;n=Math.min(n,n+l+c);let d=[...s[0]][0].length,f=t.slice(0,o+s.index+d+n);if(Math.min(o,n)%2){let p=f.slice(1,-1);return{type:"em",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}let u=f.slice(2,-2);return{type:"strong",raw:f,text:u,tokens:this.lexer.inlineTokens(u)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(i),o=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&o&&(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,s;return r[2]==="@"?(i=r[1],s="mailto:"+i):(i=r[1],s=i),{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t){let r;if(r=this.rules.inline.url.exec(t)){let i,s;if(r[2]==="@")i=r[0],s="mailto:"+i;else{let o;do o=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(o!==r[0]);i=r[0],r[1]==="www."?s="http://"+r[0]:s=r[0]}return{type:"link",raw:r[0],text:i,href:s,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}}}},ee=class Ta{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||nr,this.options.tokenizer=this.options.tokenizer||new Ds,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:qt,block:Gi.normal,inline:ei.normal};this.options.pedantic?(r.block=Gi.pedantic,r.inline=ei.pedantic):this.options.gfm&&(r.block=Gi.gfm,this.options.breaks?r.inline=ei.breaks:r.inline=ei.gfm),this.tokenizer.rules=r}static get rules(){return{block:Gi,inline:ei}}static lex(t,r){return new Ta(r).lex(t)}static lexInline(t,r){return new Ta(r).inlineTokens(t)}lex(t){t=t.replace(qt.carriageReturn,`
|
|
185
|
+
`),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(qt.tabCharGlobal," ").replace(qt.spaceLine,""));t;){let s;if(this.options.extensions?.block?.some(a=>(s=a.call({lexer:this},t,r))?(t=t.substring(s.raw.length),r.push(s),!0):!1))continue;if(s=this.tokenizer.space(t)){t=t.substring(s.raw.length);let a=r.at(-1);s.raw.length===1&&a!==void 0?a.raw+=`
|
|
186
|
+
`:r.push(s);continue}if(s=this.tokenizer.code(t)){t=t.substring(s.raw.length);let a=r.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
187
|
+
`)?"":`
|
|
188
|
+
`)+s.raw,a.text+=`
|
|
189
|
+
`+s.text,this.inlineQueue.at(-1).src=a.text):r.push(s);continue}if(s=this.tokenizer.fences(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.heading(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.hr(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.blockquote(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.list(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.html(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.def(t)){t=t.substring(s.raw.length);let a=r.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
190
|
+
`)?"":`
|
|
191
|
+
`)+s.raw,a.text+=`
|
|
192
|
+
`+s.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title},r.push(s));continue}if(s=this.tokenizer.table(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.lheading(t)){t=t.substring(s.raw.length),r.push(s);continue}let o=t;if(this.options.extensions?.startBlock){let a=1/0,n=t.slice(1),l;this.options.extensions.startBlock.forEach(c=>{l=c.call({lexer:this},n),typeof l=="number"&&l>=0&&(a=Math.min(a,l))}),a<1/0&&a>=0&&(o=t.substring(0,a+1))}if(this.state.top&&(s=this.tokenizer.paragraph(o))){let a=r.at(-1);i&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`
|
|
193
|
+
`)?"":`
|
|
194
|
+
`)+s.raw,a.text+=`
|
|
195
|
+
`+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(s),i=o.length!==t.length,t=t.substring(s.raw.length);continue}if(s=this.tokenizer.text(t)){t=t.substring(s.raw.length);let a=r.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
196
|
+
`)?"":`
|
|
197
|
+
`)+s.raw,a.text+=`
|
|
198
|
+
`+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(s);continue}if(t){let a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let i=t,s=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)l.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,s.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let o;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)o=s[2]?s[2].length:0,i=i.slice(0,s.index+o)+"["+"a".repeat(s[0].length-o-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let a=!1,n="";for(;t;){a||(n=""),a=!1;let l;if(this.options.extensions?.inline?.some(h=>(l=h.call({lexer:this},t,r))?(t=t.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.escape(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.tag(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.link(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(l.raw.length);let h=r.at(-1);l.type==="text"&&h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(l=this.tokenizer.emStrong(t,i,n)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.codespan(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.br(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.del(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.autolink(t)){t=t.substring(l.raw.length),r.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(t))){t=t.substring(l.raw.length),r.push(l);continue}let c=t;if(this.options.extensions?.startInline){let h=1/0,d=t.slice(1),f;this.options.extensions.startInline.forEach(u=>{f=u.call({lexer:this},d),typeof f=="number"&&f>=0&&(h=Math.min(h,f))}),h<1/0&&h>=0&&(c=t.substring(0,h+1))}if(l=this.tokenizer.inlineText(c)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(n=l.raw.slice(-1)),a=!0;let h=r.at(-1);h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return r}},Ns=class{options;parser;constructor(t){this.options=t||nr}space(t){return""}code({text:t,lang:r,escaped:i}){let s=(r||"").match(qt.notSpaceStart)?.[0],o=t.replace(qt.endingNewline,"")+`
|
|
199
|
+
`;return s?'<pre><code class="language-'+he(s)+'">'+(i?o:he(o,!0))+`</code></pre>
|
|
200
|
+
`:"<pre><code>"+(i?o:he(o,!0))+`</code></pre>
|
|
201
|
+
`}blockquote({tokens:t}){return`<blockquote>
|
|
202
|
+
${this.parser.parse(t)}</blockquote>
|
|
203
|
+
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
|
|
204
|
+
`}hr(t){return`<hr>
|
|
205
|
+
`}list(t){let r=t.ordered,i=t.start,s="";for(let n=0;n<t.items.length;n++){let l=t.items[n];s+=this.listitem(l)}let o=r?"ol":"ul",a=r&&i!==1?' start="'+i+'"':"";return"<"+o+a+`>
|
|
206
|
+
`+s+"</"+o+`>
|
|
207
|
+
`}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+" "+he(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>
|
|
208
|
+
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
209
|
+
`}table(t){let r="",i="";for(let o=0;o<t.header.length;o++)i+=this.tablecell(t.header[o]);r+=this.tablerow({text:i});let s="";for(let o=0;o<t.rows.length;o++){let a=t.rows[o];i="";for(let n=0;n<a.length;n++)i+=this.tablecell(a[n]);s+=this.tablerow({text:i})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
|
|
210
|
+
<thead>
|
|
211
|
+
`+r+`</thead>
|
|
212
|
+
`+s+`</table>
|
|
213
|
+
`}tablerow({text:t}){return`<tr>
|
|
214
|
+
${t}</tr>
|
|
215
|
+
`}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
|
|
216
|
+
`}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>${he(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 s=this.parser.parseInline(i),o=ah(t);if(o===null)return s;t=o;let a='<a href="'+t+'"';return r&&(a+=' title="'+he(r)+'"'),a+=">"+s+"</a>",a}image({href:t,title:r,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let o=ah(t);if(o===null)return he(i);t=o;let a=`<img src="${t}" alt="${i}"`;return r&&(a+=` title="${he(r)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:he(t.text)}},Vn=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""}},re=class _a{options;renderer;textRenderer;constructor(t){this.options=t||nr,this.options.renderer=this.options.renderer||new Ns,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Vn}static parse(t,r){return new _a(r).parse(t)}static parseInline(t,r){return new _a(r).parseInline(t)}parse(t,r=!0){let i="";for(let s=0;s<t.length;s++){let o=t[s];if(this.options.extensions?.renderers?.[o.type]){let n=o,l=this.options.extensions.renderers[n.type].call({parser:this},n);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(n.type)){i+=l||"";continue}}let a=o;switch(a.type){case"space":{i+=this.renderer.space(a);continue}case"hr":{i+=this.renderer.hr(a);continue}case"heading":{i+=this.renderer.heading(a);continue}case"code":{i+=this.renderer.code(a);continue}case"table":{i+=this.renderer.table(a);continue}case"blockquote":{i+=this.renderer.blockquote(a);continue}case"list":{i+=this.renderer.list(a);continue}case"html":{i+=this.renderer.html(a);continue}case"def":{i+=this.renderer.def(a);continue}case"paragraph":{i+=this.renderer.paragraph(a);continue}case"text":{let n=a,l=this.renderer.text(n);for(;s+1<t.length&&t[s+1].type==="text";)n=t[++s],l+=`
|
|
217
|
+
`+this.renderer.text(n);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 n='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw new Error(n)}}}return i}parseInline(t,r=this.renderer){let i="";for(let s=0;s<t.length;s++){let o=t[s];if(this.options.extensions?.renderers?.[o.type]){let n=this.options.extensions.renderers[o.type].call({parser:this},o);if(n!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){i+=n||"";continue}}let a=o;switch(a.type){case"escape":{i+=r.text(a);break}case"html":{i+=r.html(a);break}case"link":{i+=r.link(a);break}case"image":{i+=r.image(a);break}case"strong":{i+=r.strong(a);break}case"em":{i+=r.em(a);break}case"codespan":{i+=r.codespan(a);break}case"br":{i+=r.br(a);break}case"del":{i+=r.del(a);break}case"text":{i+=r.text(a);break}default:{let n='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw new Error(n)}}}return i}},ui=class{options;block;constructor(t){this.options=t||nr}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?ee.lex:ee.lexInline}provideParser(){return this.block?re.parse:re.parseInline}},Kw=class{defaults=zn();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=re;Renderer=Ns;TextRenderer=Vn;Lexer=ee;Tokenizer=Ds;Hooks=ui;constructor(...t){this.use(...t)}walkTokens(t,r){let i=[];for(let s of t)switch(i=i.concat(r.call(this,s)),s.type){case"table":{let o=s;for(let a of o.header)i=i.concat(this.walkTokens(a.tokens,r));for(let a of o.rows)for(let n of a)i=i.concat(this.walkTokens(n.tokens,r));break}case"list":{let o=s;i=i.concat(this.walkTokens(o.items,r));break}default:{let o=s;this.defaults.extensions?.childTokens?.[o.type]?this.defaults.extensions.childTokens[o.type].forEach(a=>{let n=o[a].flat(1/0);i=i.concat(this.walkTokens(n,r))}):o.tokens&&(i=i.concat(this.walkTokens(o.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let s={...i};if(s.async=this.defaults.async||s.async||!1,i.extensions&&(i.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let a=r.renderers[o.name];a?r.renderers[o.name]=function(...n){let l=o.renderer.apply(this,n);return l===!1&&(l=a.apply(this,n)),l}:r.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=r[o.level];a?a.unshift(o.tokenizer):r[o.level]=[o.tokenizer],o.start&&(o.level==="block"?r.startBlock?r.startBlock.push(o.start):r.startBlock=[o.start]:o.level==="inline"&&(r.startInline?r.startInline.push(o.start):r.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(r.childTokens[o.name]=o.childTokens)}),s.extensions=r),i.renderer){let o=this.defaults.renderer||new Ns(this.defaults);for(let a in i.renderer){if(!(a in o))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let n=a,l=i.renderer[n],c=o[n];o[n]=(...h)=>{let d=l.apply(o,h);return d===!1&&(d=c.apply(o,h)),d||""}}s.renderer=o}if(i.tokenizer){let o=this.defaults.tokenizer||new Ds(this.defaults);for(let a in i.tokenizer){if(!(a in o))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let n=a,l=i.tokenizer[n],c=o[n];o[n]=(...h)=>{let d=l.apply(o,h);return d===!1&&(d=c.apply(o,h)),d}}s.tokenizer=o}if(i.hooks){let o=this.defaults.hooks||new ui;for(let a in i.hooks){if(!(a in o))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let n=a,l=i.hooks[n],c=o[n];ui.passThroughHooks.has(a)?o[n]=h=>{if(this.defaults.async&&ui.passThroughHooksRespectAsync.has(a))return(async()=>{let f=await l.call(o,h);return c.call(o,f)})();let d=l.call(o,h);return c.call(o,d)}:o[n]=(...h)=>{if(this.defaults.async)return(async()=>{let f=await l.apply(o,h);return f===!1&&(f=await c.apply(o,h)),f})();let d=l.apply(o,h);return d===!1&&(d=c.apply(o,h)),d}}s.hooks=o}if(i.walkTokens){let o=this.defaults.walkTokens,a=i.walkTokens;s.walkTokens=function(n){let l=[];return l.push(a.call(this,n)),o&&(l=l.concat(o.call(this,n))),l}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return ee.lex(t,r??this.defaults)}parser(t,r){return re.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let s={...i},o={...this.defaults,...s},a=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&s.async===!1)return a(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 a(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=t),o.async)return(async()=>{let n=o.hooks?await o.hooks.preprocess(r):r,l=await(o.hooks?await o.hooks.provideLexer():t?ee.lex:ee.lexInline)(n,o),c=o.hooks?await o.hooks.processAllTokens(l):l;o.walkTokens&&await Promise.all(this.walkTokens(c,o.walkTokens));let h=await(o.hooks?await o.hooks.provideParser():t?re.parse:re.parseInline)(c,o);return o.hooks?await o.hooks.postprocess(h):h})().catch(a);try{o.hooks&&(r=o.hooks.preprocess(r));let n=(o.hooks?o.hooks.provideLexer():t?ee.lex:ee.lexInline)(r,o);o.hooks&&(n=o.hooks.processAllTokens(n)),o.walkTokens&&this.walkTokens(n,o.walkTokens);let l=(o.hooks?o.hooks.provideParser():t?re.parse:re.parseInline)(n,o);return o.hooks&&(l=o.hooks.postprocess(l)),l}catch(n){return a(n)}}}onError(t,r){return i=>{if(i.message+=`
|
|
218
|
+
Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+he(i.message+"",!0)+"</pre>";return r?Promise.resolve(s):s}if(r)return Promise.reject(i);throw i}}},or=new Kw;function yt(e,t){return or.parse(e,t)}yt.options=yt.setOptions=function(e){return or.setOptions(e),yt.defaults=or.defaults,qf(yt.defaults),yt};yt.getDefaults=zn;yt.defaults=nr;yt.use=function(...e){return or.use(...e),yt.defaults=or.defaults,qf(yt.defaults),yt};yt.walkTokens=function(e,t){return or.walkTokens(e,t)};yt.parseInline=or.parseInline;yt.Parser=re;yt.parser=re.parse;yt.Renderer=Ns;yt.TextRenderer=Vn;yt.Lexer=ee;yt.lexer=ee.lex;yt.Tokenizer=Ds;yt.Hooks=ui;yt.parse=yt;yt.options;yt.setOptions;yt.use;yt.walkTokens;yt.parseInline;re.parse;ee.lex;function Kf(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 s=i.reduce(function(n,l){var c=l.match(/\n([\t ]+|(?!\s).)/g);return c?n.concat(c.map(function(h){var d,f;return(f=(d=h.match(/[\t ]/g))===null||d===void 0?void 0:d.length)!==null&&f!==void 0?f:0})):n},[]);if(s.length){var o=new RegExp(`
|
|
219
|
+
[ ]{`+Math.min.apply(Math,s)+"}","g");i=i.map(function(n){return n.replace(o,`
|
|
220
|
+
`)})}i[0]=i[0].replace(/^\r?\n/,"");var a=i[0];return t.forEach(function(n,l){var c=a.match(/(?:^|\n)( *)$/),h=c?c[1]:"",d=n;typeof n=="string"&&n.includes(`
|
|
221
|
+
`)&&(d=String(n).split(`
|
|
222
|
+
`).map(function(f,u){return u===0?f:""+h+f}).join(`
|
|
223
|
+
`)),a+=d+i[l+1]}),a}var Qf={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},Ba=new Map,Jf=new Map,tg=g(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(j.debug("Registering icon pack:",t.name),"loader"in t)Jf.set(t.name,t.loader);else if("icons"in t)Ba.set(t.name,t.icons);else throw j.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),eg=g(async(e,t)=>{const r=tw(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 s=Ba.get(i);if(!s){const a=Jf.get(i);if(!a)throw new Error(`Icon set not found: ${r.prefix}`);try{s={...await a(),prefix:i},Ba.set(i,s)}catch(n){throw j.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const o=iw(s,r.name);if(!o)throw new Error(`Icon not found: ${e}`);return o},"getRegisteredIconData"),Qw=g(async e=>{try{return await eg(e),!0}catch{return!1}},"isIconAvailable"),Gr=g(async(e,t,r)=>{let i;try{i=await eg(e,t?.fallbackPrefix)}catch(a){j.error(a),i=Qf}const s=cw(i,t),o=gw(fw(s.body),{...s.attributes,...r});return Kt(o,Ct())},"getIconSVG");function rg(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
|
|
224
|
+
`).replace(/\n{2,}/g,`
|
|
225
|
+
`);return Kf(i)}g(rg,"preprocessMarkdown");function ig(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(r=>({content:r,type:"normal"}))??[])}g(ig,"nonMarkdownToLines");function sg(e,t={}){const r=rg(e,t),i=yt.lexer(r),s=[[]];let o=0;function a(n,l="normal"){n.type==="text"?n.text.split(`
|
|
226
|
+
`).forEach((h,d)=>{d!==0&&(o++,s.push([])),h.split(" ").forEach(f=>{f=f.replace(/'/g,"'"),f&&s[o].push({content:f,type:l})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(c=>{a(c,n.type)}):n.type==="html"&&s[o].push({content:n.text,type:"normal"})}return g(a,"processNode"),i.forEach(n=>{n.type==="paragraph"?n.tokens?.forEach(l=>{a(l)}):n.type==="html"?s[o].push({content:n.text,type:"normal"}):s[o].push({content:n.raw,type:"normal"})}),s}g(sg,"markdownToLines");function og(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}g(og,"nonMarkdownToHTML");function ag(e,{markdownAutoWrap:t}={}){const r=yt.lexer(e);function i(s){return s.type==="text"?t===!1?s.text.replace(/\n */g,"<br/>").replace(/ /g," "):s.text.replace(/\n */g,"<br/>"):s.type==="strong"?`<strong>${s.tokens?.map(i).join("")}</strong>`:s.type==="em"?`<em>${s.tokens?.map(i).join("")}</em>`:s.type==="paragraph"?`<p>${s.tokens?.map(i).join("")}</p>`:s.type==="space"?"":s.type==="html"?`${s.text}`:s.type==="escape"?s.text:(j.warn(`Unsupported markdown: ${s.type}`),s.raw)}return g(i,"output"),r.map(i).join("")}g(ag,"markdownToHTML");function ng(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}g(ng,"splitTextToChars");function lg(e,t){const r=ng(t.content);return Zn(e,[],r,t.type)}g(lg,"splitWordToFitWidth");function Zn(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[s,...o]=r,a=[...t,s];return e([{content:a.join(""),type:i}])?Zn(e,a,o,i):(t.length===0&&s&&(t.push(s),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}g(Zn,"splitWordToFitWidthRecursion");function hg(e,t){if(e.some(({content:r})=>r.includes(`
|
|
227
|
+
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return qs(e,t)}g(hg,"splitLineToFitWidth");function qs(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let s="";e[0].content===" "&&(s=" ",e.shift());const o=e.shift()??{content:" ",type:"normal"},a=[...i];if(s!==""&&a.push({content:s,type:"normal"}),a.push(o),t(a))return qs(e,t,r,a);if(i.length>0)r.push(i),e.unshift(o);else if(o.content){const[n,l]=lg(t,o);r.push([n]),l.content&&e.unshift(l)}return qs(e,t,r)}g(qs,"splitLineToFitWidthRecursion");function La(e,t){t&&e.attr("style",t)}g(La,"applyStyle");var hh=16384;async function cg(e,t,r,i,s=!1,o=Ct()){const a=e.append("foreignObject");a.attr("width",`${Math.min(10*r,hh)}px`),a.attr("height",`${Math.min(10*r,hh)}px`);const n=a.append("xhtml:div"),l=Or(t.label)?await Ja(t.label.replace(Yr.lineBreakRegex,`
|
|
228
|
+
`),o):Kt(t.label,o),c=t.isNode?"nodeLabel":"edgeLabel",h=n.append("span");h.html(l),La(h,t.labelStyle),h.attr("class",`${c} ${i}`),La(n,t.labelStyle),n.style("display","table-cell"),n.style("white-space","nowrap"),n.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(n.style("max-width",r+"px"),n.style("text-align","center")),n.attr("xmlns","http://www.w3.org/1999/xhtml"),s&&n.attr("class","labelBkg");let d=n.node().getBoundingClientRect();return d.width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px"),d=n.node().getBoundingClientRect()),a.node()}g(cg,"addHtmlSpan");function fo(e,t,r,i=!1){const s=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&s.attr("text-anchor","middle"),s}g(fo,"createTspan");function dg(e,t,r){const i=e.append("text"),s=fo(i,1,t);go(s,r);const o=s.node().getComputedTextLength();return i.remove(),o}g(dg,"computeWidthOfText");function ug(e,t,r){const i=e.append("text"),s=fo(i,1,t);go(s,[{content:r,type:"normal"}]);const o=s.node()?.getBoundingClientRect();return o&&i.remove(),o}g(ug,"computeDimensionOfText");function fg(e,t,r,i=!1,s=!1){const a=t.append("g"),n=a.insert("rect").attr("class","background").attr("style","stroke: none"),l=a.append("text").attr("y","-10.1");s&&l.attr("text-anchor","middle");let c=0;for(const h of r){const d=g(u=>dg(a,1.1,u)<=e,"checkWidth"),f=d(h)?[h]:hg(h,d);for(const u of f){const p=fo(l,c,1.1,s);go(p,u),c++}}if(i){const h=l.node().getBBox(),d=2;return n.attr("x",h.x-d).attr("y",h.y-d).attr("width",h.width+2*d).attr("height",h.height+2*d),a.node()}else return l.node()}g(fg,"createFormattedText");function Fa(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}g(Fa,"decodeHTMLEntities");function go(e,t){e.text(""),t.forEach((r,i)=>{const s=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?s.text(Fa(r.content)):s.text(" "+Fa(r.content))})}g(go,"updateTextContentAndStyles");async function gg(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,o,a)=>(r.push((async()=>{const n=`${o}:${a}`;return await Qw(n)?await Gr(n,void 0,{class:"label-icon"}):`<i class='${Kt(s,t).replace(":"," ")}'></i>`})()),s));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}g(gg,"replaceIconSubstring");var Ce=g(async(e,t="",{style:r="",isTitle:i=!1,classes:s="",useHtmlLabels:o=!0,markdown:a=!0,isNode:n=!0,width:l=200,addSvgBackground:c=!1}={},h)=>{if(j.debug("XYZ createText",t,r,i,s,o,n,"addSvgBackground: ",c),o){const d=a?ag(t,h):og(t),f=await gg(De(d),h),u=t.replace(/\\\\/g,"\\"),p={isNode:n,label:Or(t)?u:f,labelStyle:r.replace("fill:","color:")};return await cg(e,p,l,s,c,h)}else{const d=De(t.replace(/<br\s*\/?>/g,"<br/>")),f=a?sg(d.replace("<br>","<br/>"),h):ig(d),u=fg(l,e,f,t?c:!1,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ct(u).attr("style",p)}else{const p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");ct(u).select("rect").attr("style",p.replace(/background:/g,"fill:"));const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ct(u).select("text").attr("style",m)}return i?ct(u).selectAll("tspan.text-outer-tspan").classed("title-row",!0):ct(u).selectAll("tspan.text-outer-tspan").classed("row",!0),u}},"createText");function Ao(e,t,r){if(e&&e.length){const[i,s]=t,o=Math.PI/180*r,a=Math.cos(o),n=Math.sin(o);for(const l of e){const[c,h]=l;l[0]=(c-i)*a-(h-s)*n+i,l[1]=(c-i)*n+(h-s)*a+s}}}function Jw(e,t){return e[0]===t[0]&&e[1]===t[1]}function tv(e,t,r,i=1){const s=r,o=Math.max(t,.1),a=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(s)for(const c of a)Ao(c,n,s);const l=(function(c,h,d){const f=[];for(const b of c){const k=[...b];Jw(k[0],k[k.length-1])||k.push([k[0][0],k[0][1]]),k.length>2&&f.push(k)}const u=[];h=Math.max(h,.1);const p=[];for(const b of f)for(let k=0;k<b.length-1;k++){const S=b[k],v=b[k+1];if(S[1]!==v[1]){const _=Math.min(S[1],v[1]);p.push({ymin:_,ymax:Math.max(S[1],v[1]),x:_===S[1]?S[0]:v[0],islope:(v[0]-S[0])/(v[1]-S[1])})}}if(p.sort(((b,k)=>b.ymin<k.ymin?-1:b.ymin>k.ymin?1:b.x<k.x?-1:b.x>k.x?1:b.ymax===k.ymax?0:(b.ymax-k.ymax)/Math.abs(b.ymax-k.ymax))),!p.length)return u;let m=[],y=p[0].ymin,x=0;for(;m.length||p.length;){if(p.length){let b=-1;for(let k=0;k<p.length&&!(p[k].ymin>y);k++)b=k;p.splice(0,b+1).forEach((k=>{m.push({s:y,edge:k})}))}if(m=m.filter((b=>!(b.edge.ymax<=y))),m.sort(((b,k)=>b.edge.x===k.edge.x?0:(b.edge.x-k.edge.x)/Math.abs(b.edge.x-k.edge.x))),(d!==1||x%h==0)&&m.length>1)for(let b=0;b<m.length;b+=2){const k=b+1;if(k>=m.length)break;const S=m[b].edge,v=m[k].edge;u.push([[Math.round(S.x),y],[Math.round(v.x),y]])}y+=d,m.forEach((b=>{b.edge.x=b.edge.x+d*b.edge.islope})),x++}return u})(a,o,i);if(s){for(const c of a)Ao(c,n,-s);(function(c,h,d){const f=[];c.forEach((u=>f.push(...u))),Ao(f,h,d)})(l,n,-s)}return l}function Di(e,t){var r;const i=t.hachureAngle+90;let s=t.hachureGap;s<0&&(s=4*t.strokeWidth),s=Math.round(Math.max(s,.1));let o=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(o=s),tv(e,s,i,o||1)}class Kn{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 s of t)i.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],r));return i}}function po(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 ev extends Kn{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const s=Di(t,Object.assign({},r,{hachureGap:i})),o=Math.PI/180*r.hachureAngle,a=[],n=.5*i*Math.cos(o),l=.5*i*Math.sin(o);for(const[c,h]of s)po([c,h])&&a.push([[c[0]-n,c[1]+l],[...h]],[[c[0]+n,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(a,r)}}}class rv extends Kn{fillPolygons(t,r){const i=this._fillPolygons(t,r),s=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),o=this._fillPolygons(t,s);return i.ops=i.ops.concat(o.ops),i}}class iv{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 s=r.hachureGap;s<0&&(s=4*r.strokeWidth),s=Math.max(s,.1);let o=r.fillWeight;o<0&&(o=r.strokeWidth/2);const a=s/4;for(const n of t){const l=po(n),c=l/s,h=Math.ceil(c)-1,d=l-h*s,f=(n[0][0]+n[1][0])/2-s/4,u=Math.min(n[0][1],n[1][1]);for(let p=0;p<h;p++){const m=u+d+p*s,y=f-a+2*Math.random()*a,x=m-a+2*Math.random()*a,b=this.helper.ellipse(y,x,o,o,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class sv{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,s=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,o=[];return t.forEach((a=>{const n=po(a),l=Math.floor(n/(i+s)),c=(n+s-l*(i+s))/2;let h=a[0],d=a[1];h[0]>d[0]&&(h=a[1],d=a[0]);const f=Math.atan((d[1]-h[1])/(d[0]-h[0]));for(let u=0;u<l;u++){const p=u*(i+s),m=p+i,y=[h[0]+p*Math.cos(f)+c*Math.cos(f),h[1]+p*Math.sin(f)+c*Math.sin(f)],x=[h[0]+m*Math.cos(f)+c*Math.cos(f),h[1]+m*Math.sin(f)+c*Math.sin(f)];o.push(...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],r))}})),o}}class ov{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,s=r.zigzagOffset<0?i:r.zigzagOffset,o=Di(t,r=Object.assign({},r,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(o,s,r)}}zigzagLines(t,r,i){const s=[];return t.forEach((o=>{const a=po(o),n=Math.round(a/(2*r));let l=o[0],c=o[1];l[0]>c[0]&&(l=o[1],c=o[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let d=0;d<n;d++){const f=2*d*r,u=2*(d+1)*r,p=Math.sqrt(2*Math.pow(r,2)),m=[l[0]+f*Math.cos(h),l[1]+f*Math.sin(h)],y=[l[0]+u*Math.cos(h),l[1]+u*Math.sin(h)],x=[m[0]+p*Math.cos(h+Math.PI/4),m[1]+p*Math.sin(h+Math.PI/4)];s.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))}})),s}}const Wt={};class av{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const nv=0,Eo=1,ch=2,Vi={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 $o(e,t){return e.type===t}function Qn(e){const t=[],r=(function(a){const n=new Array;for(;a!=="";)if(a.match(/^([ \t\r\n,]+)/))a=a.substr(RegExp.$1.length);else if(a.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:nv,text:RegExp.$1},a=a.substr(RegExp.$1.length);else{if(!a.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:Eo,text:`${parseFloat(RegExp.$1)}`},a=a.substr(RegExp.$1.length)}return n[n.length]={type:ch,text:""},n})(e);let i="BOD",s=0,o=r[s];for(;!$o(o,ch);){let a=0;const n=[];if(i==="BOD"){if(o.text!=="M"&&o.text!=="m")return Qn("M0,0"+e);s++,a=Vi[o.text],i=o.text}else $o(o,Eo)?a=Vi[i]:(s++,a=Vi[o.text],i=o.text);if(!(s+a<r.length))throw new Error("Path data ended short");for(let l=s;l<s+a;l++){const c=r[l];if(!$o(c,Eo))throw new Error("Param not a number: "+i+","+c.text);n[n.length]=+c.text}if(typeof Vi[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:n};t.push(l),s+=a,o=r[s],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function pg(e){let t=0,r=0,i=0,s=0;const o=[];for(const{key:a,data:n}of e)switch(a){case"M":o.push({key:"M",data:[...n]}),[t,r]=n,[i,s]=n;break;case"m":t+=n[0],r+=n[1],o.push({key:"M",data:[t,r]}),i=t,s=r;break;case"L":o.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],o.push({key:"L",data:[t,r]});break;case"C":o.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const l=n.map(((c,h)=>h%2?c+r:c+t));o.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":o.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const l=n.map(((c,h)=>h%2?c+r:c+t));o.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":o.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],o.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":o.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],o.push({key:"H",data:[t]});break;case"V":o.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],o.push({key:"V",data:[r]});break;case"S":o.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const l=n.map(((c,h)=>h%2?c+r:c+t));o.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":o.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],o.push({key:"T",data:[t,r]});break;case"Z":case"z":o.push({key:"Z",data:[]}),t=i,r=s}return o}function mg(e){const t=[];let r="",i=0,s=0,o=0,a=0,n=0,l=0;for(const{key:c,data:h}of e){switch(c){case"M":t.push({key:"M",data:[...h]}),[i,s]=h,[o,a]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],s=h[5],n=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,s]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,s]});break;case"V":s=h[0],t.push({key:"L",data:[i,s]});break;case"S":{let d=0,f=0;r==="C"||r==="S"?(d=i+(i-n),f=s+(s-l)):(d=i,f=s),t.push({key:"C",data:[d,f,...h]}),n=h[0],l=h[1],i=h[2],s=h[3];break}case"T":{const[d,f]=h;let u=0,p=0;r==="Q"||r==="T"?(u=i+(i-n),p=s+(s-l)):(u=i,p=s);const m=i+2*(u-i)/3,y=s+2*(p-s)/3,x=d+2*(u-d)/3,b=f+2*(p-f)/3;t.push({key:"C",data:[m,y,x,b,d,f]}),n=u,l=p,i=d,s=f;break}case"Q":{const[d,f,u,p]=h,m=i+2*(d-i)/3,y=s+2*(f-s)/3,x=u+2*(d-u)/3,b=p+2*(f-p)/3;t.push({key:"C",data:[m,y,x,b,u,p]}),n=d,l=f,i=u,s=p;break}case"A":{const d=Math.abs(h[0]),f=Math.abs(h[1]),u=h[2],p=h[3],m=h[4],y=h[5],x=h[6];d===0||f===0?(t.push({key:"C",data:[i,s,y,x,y,x]}),i=y,s=x):(i!==y||s!==x)&&(yg(i,s,y,x,d,f,u,p,m).forEach((function(b){t.push({key:"C",data:b})})),i=y,s=x);break}case"Z":t.push({key:"Z",data:[]}),i=o,s=a}r=c}return t}function ii(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function yg(e,t,r,i,s,o,a,n,l,c){const h=(d=a,Math.PI*d/180);var d;let f=[],u=0,p=0,m=0,y=0;if(c)[u,p,m,y]=c;else{[e,t]=ii(e,t,-h),[r,i]=ii(r,i,-h);const Y=(e-r)/2,D=(t-i)/2;let A=Y*Y/(s*s)+D*D/(o*o);A>1&&(A=Math.sqrt(A),s*=A,o*=A);const F=s*s,P=o*o,z=F*P-F*D*D-P*Y*Y,E=F*D*D+P*Y*Y,N=(n===l?-1:1)*Math.sqrt(Math.abs(z/E));m=N*s*D/o+(e+r)/2,y=N*-o*Y/s+(t+i)/2,u=Math.asin(parseFloat(((t-y)/o).toFixed(9))),p=Math.asin(parseFloat(((i-y)/o).toFixed(9))),e<m&&(u=Math.PI-u),r<m&&(p=Math.PI-p),u<0&&(u=2*Math.PI+u),p<0&&(p=2*Math.PI+p),l&&u>p&&(u-=2*Math.PI),!l&&p>u&&(p-=2*Math.PI)}let x=p-u;if(Math.abs(x)>120*Math.PI/180){const Y=p,D=r,A=i;p=l&&p>u?u+120*Math.PI/180*1:u+120*Math.PI/180*-1,f=yg(r=m+s*Math.cos(p),i=y+o*Math.sin(p),D,A,s,o,a,0,l,[p,Y,m,y])}x=p-u;const b=Math.cos(u),k=Math.sin(u),S=Math.cos(p),v=Math.sin(p),_=Math.tan(x/4),$=4/3*s*_,T=4/3*o*_,M=[e,t],I=[e+$*k,t-T*b],q=[r+$*v,i-T*S],X=[r,i];if(I[0]=2*M[0]-I[0],I[1]=2*M[1]-I[1],c)return[I,q,X].concat(f);{f=[I,q,X].concat(f);const Y=[];for(let D=0;D<f.length;D+=3){const A=ii(f[D][0],f[D][1],h),F=ii(f[D+1][0],f[D+1][1],h),P=ii(f[D+2][0],f[D+2][1],h);Y.push([A[0],A[1],F[0],F[1],P[0],P[1]])}return Y}}const lv={randOffset:function(e,t){return nt(e,t)},randOffsetWithRange:function(e,t,r){return zs(e,t,r)},ellipse:function(e,t,r,i,s){const o=Cg(r,i,s);return Ma(e,t,s,o).opset},doubleLineOps:function(e,t,r,i,s){return Ne(e,t,r,i,s,!0)}};function xg(e,t,r,i,s){return{type:"path",ops:Ne(e,t,r,i,s)}}function cs(e,t,r){const i=(e||[]).length;if(i>2){const s=[];for(let o=0;o<i-1;o++)s.push(...Ne(e[o][0],e[o][1],e[o+1][0],e[o+1][1],r));return t&&s.push(...Ne(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:s}}return i===2?xg(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function hv(e,t,r,i,s){return(function(o,a){return cs(o,!0,a)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],s)}function dh(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Zi(r[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:Zi(r[0],1.5*(1+.22*t.roughness),gh(t));for(let o=1;o<r.length;o++){const a=r[o];if(a.length){const n=Zi(a,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:Zi(a,1.5*(1+.22*t.roughness),gh(t));for(const c of n)c.op!=="move"&&i.push(c);for(const c of l)c.op!=="move"&&s.push(c)}}return{type:"path",ops:i.concat(s)}}return{type:"path",ops:[]}}function Cg(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),s=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),o=2*Math.PI/s;let a=Math.abs(e/2),n=Math.abs(t/2);const l=1-r.curveFitting;return a+=nt(a*l,r),n+=nt(n*l,r),{increment:o,rx:a,ry:n}}function Ma(e,t,r,i){const[s,o]=ph(i.increment,e,t,i.rx,i.ry,1,i.increment*zs(.1,zs(.4,1,r),r),r);let a=Ws(s,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=ph(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=Ws(n,null,r);a=a.concat(l)}return{estimatedPoints:o,opset:{type:"path",ops:a}}}function uh(e,t,r,i,s,o,a,n,l){const c=e,h=t;let d=Math.abs(r/2),f=Math.abs(i/2);d+=nt(.01*d,l),f+=nt(.01*f,l);let u=s,p=o;for(;u<0;)u+=2*Math.PI,p+=2*Math.PI;p-u>2*Math.PI&&(u=0,p=2*Math.PI);const m=2*Math.PI/l.curveStepCount,y=Math.min(m/2,(p-u)/2),x=mh(y,c,h,d,f,u,p,1,l);if(!l.disableMultiStroke){const b=mh(y,c,h,d,f,u,p,1.5,l);x.push(...b)}return a&&(n?x.push(...Ne(c,h,c+d*Math.cos(u),h+f*Math.sin(u),l),...Ne(c,h,c+d*Math.cos(p),h+f*Math.sin(p),l)):x.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+d*Math.cos(u),h+f*Math.sin(u)]})),{type:"path",ops:x}}function fh(e,t){const r=mg(pg(Qn(e))),i=[];let s=[0,0],o=[0,0];for(const{key:a,data:n}of r)switch(a){case"M":o=[n[0],n[1]],s=[n[0],n[1]];break;case"L":i.push(...Ne(o[0],o[1],n[0],n[1],t)),o=[n[0],n[1]];break;case"C":{const[l,c,h,d,f,u]=n;i.push(...cv(l,c,h,d,f,u,o,t)),o=[f,u];break}case"Z":i.push(...Ne(o[0],o[1],s[0],s[1],t)),o=[s[0],s[1]]}return{type:"path",ops:i}}function Io(e,t){const r=[];for(const i of e)if(i.length){const s=t.maxRandomnessOffset||0,o=i.length;if(o>2){r.push({op:"move",data:[i[0][0]+nt(s,t),i[0][1]+nt(s,t)]});for(let a=1;a<o;a++)r.push({op:"lineTo",data:[i[a][0]+nt(s,t),i[a][1]+nt(s,t)]})}}return{type:"fillPath",ops:r}}function lr(e,t){return(function(r,i){let s=r.fillStyle||"hachure";if(!Wt[s])switch(s){case"zigzag":Wt[s]||(Wt[s]=new ev(i));break;case"cross-hatch":Wt[s]||(Wt[s]=new rv(i));break;case"dots":Wt[s]||(Wt[s]=new iv(i));break;case"dashed":Wt[s]||(Wt[s]=new sv(i));break;case"zigzag-line":Wt[s]||(Wt[s]=new ov(i));break;default:s="hachure",Wt[s]||(Wt[s]=new Kn(i))}return Wt[s]})(t,lv).fillPolygons(e,t)}function gh(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function bg(e){return e.randomizer||(e.randomizer=new av(e.seed||0)),e.randomizer.next()}function zs(e,t,r,i=1){return r.roughness*i*(bg(r)*(t-e)+e)}function nt(e,t,r=1){return zs(-e,e,t,r)}function Ne(e,t,r,i,s,o=!1){const a=o?s.disableMultiStrokeFill:s.disableMultiStroke,n=Aa(e,t,r,i,s,!0,!1);if(a)return n;const l=Aa(e,t,r,i,s,!0,!0);return n.concat(l)}function Aa(e,t,r,i,s,o,a){const n=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(n);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=s.maxRandomnessOffset||0;h*h*100>n&&(h=l/10);const d=h/2,f=.2+.2*bg(s);let u=s.bowing*s.maxRandomnessOffset*(i-t)/200,p=s.bowing*s.maxRandomnessOffset*(e-r)/200;u=nt(u,s,c),p=nt(p,s,c);const m=[],y=()=>nt(d,s,c),x=()=>nt(h,s,c),b=s.preserveVertices;return a?m.push({op:"move",data:[e+(b?0:y()),t+(b?0:y())]}):m.push({op:"move",data:[e+(b?0:nt(h,s,c)),t+(b?0:nt(h,s,c))]}),a?m.push({op:"bcurveTo",data:[u+e+(r-e)*f+y(),p+t+(i-t)*f+y(),u+e+2*(r-e)*f+y(),p+t+2*(i-t)*f+y(),r+(b?0:y()),i+(b?0:y())]}):m.push({op:"bcurveTo",data:[u+e+(r-e)*f+x(),p+t+(i-t)*f+x(),u+e+2*(r-e)*f+x(),p+t+2*(i-t)*f+x(),r+(b?0:x()),i+(b?0:x())]}),m}function Zi(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 s=1;s<e.length;s++)i.push([e[s][0]+nt(t,r),e[s][1]+nt(t,r)]),s===e.length-1&&i.push([e[s][0]+nt(t,r),e[s][1]+nt(t,r)]);return Ws(i,null,r)}function Ws(e,t,r){const i=e.length,s=[];if(i>3){const o=[],a=1-r.curveTightness;s.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const l=e[n];o[0]=[l[0],l[1]],o[1]=[l[0]+(a*e[n+1][0]-a*e[n-1][0])/6,l[1]+(a*e[n+1][1]-a*e[n-1][1])/6],o[2]=[e[n+1][0]+(a*e[n][0]-a*e[n+2][0])/6,e[n+1][1]+(a*e[n][1]-a*e[n+2][1])/6],o[3]=[e[n+1][0],e[n+1][1]],s.push({op:"bcurveTo",data:[o[1][0],o[1][1],o[2][0],o[2][1],o[3][0],o[3][1]]})}}else i===3?(s.push({op:"move",data:[e[1][0],e[1][1]]}),s.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&s.push(...Aa(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return s}function ph(e,t,r,i,s,o,a,n){const l=[],c=[];if(n.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+s*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const d=[t+i*Math.cos(h),r+s*Math.sin(h)];l.push(d),c.push(d)}c.push([t+i*Math.cos(0),r+s*Math.sin(0)]),c.push([t+i*Math.cos(e),r+s*Math.sin(e)])}else{const h=nt(.5,n)-Math.PI/2;c.push([nt(o,n)+t+.9*i*Math.cos(h-e),nt(o,n)+r+.9*s*Math.sin(h-e)]);const d=2*Math.PI+h-.01;for(let f=h;f<d;f+=e){const u=[nt(o,n)+t+i*Math.cos(f),nt(o,n)+r+s*Math.sin(f)];l.push(u),c.push(u)}c.push([nt(o,n)+t+i*Math.cos(h+2*Math.PI+.5*a),nt(o,n)+r+s*Math.sin(h+2*Math.PI+.5*a)]),c.push([nt(o,n)+t+.98*i*Math.cos(h+a),nt(o,n)+r+.98*s*Math.sin(h+a)]),c.push([nt(o,n)+t+.9*i*Math.cos(h+.5*a),nt(o,n)+r+.9*s*Math.sin(h+.5*a)])}return[c,l]}function mh(e,t,r,i,s,o,a,n,l){const c=o+nt(.1,l),h=[];h.push([nt(n,l)+t+.9*i*Math.cos(c-e),nt(n,l)+r+.9*s*Math.sin(c-e)]);for(let d=c;d<=a;d+=e)h.push([nt(n,l)+t+i*Math.cos(d),nt(n,l)+r+s*Math.sin(d)]);return h.push([t+i*Math.cos(a),r+s*Math.sin(a)]),h.push([t+i*Math.cos(a),r+s*Math.sin(a)]),Ws(h,null,l)}function cv(e,t,r,i,s,o,a,n){const l=[],c=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let h=[0,0];const d=n.disableMultiStroke?1:2,f=n.preserveVertices;for(let u=0;u<d;u++)u===0?l.push({op:"move",data:[a[0],a[1]]}):l.push({op:"move",data:[a[0]+(f?0:nt(c[0],n)),a[1]+(f?0:nt(c[0],n))]}),h=f?[s,o]:[s+nt(c[u],n),o+nt(c[u],n)],l.push({op:"bcurveTo",data:[e+nt(c[u],n),t+nt(c[u],n),r+nt(c[u],n),i+nt(c[u],n),h[0],h[1]]});return l}function si(e){return[...e]}function yh(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(si(e[0]),si(e[1]),si(e[2]),si(e[2]));else{const s=[];s.push(e[0],e[0]);for(let n=1;n<e.length;n++)s.push(e[n]),n===e.length-1&&s.push(e[n]);const o=[],a=1-t;i.push(si(s[0]));for(let n=1;n+2<s.length;n++){const l=s[n];o[0]=[l[0],l[1]],o[1]=[l[0]+(a*s[n+1][0]-a*s[n-1][0])/6,l[1]+(a*s[n+1][1]-a*s[n-1][1])/6],o[2]=[s[n+1][0]+(a*s[n][0]-a*s[n+2][0])/6,s[n+1][1]+(a*s[n][1]-a*s[n+2][1])/6],o[3]=[s[n+1][0],s[n+1][1]],i.push(o[1],o[2],o[3])}}return i}function ds(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function dv(e,t,r){const i=ds(t,r);if(i===0)return ds(e,t);let s=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return s=Math.max(0,Math.min(1,s)),ds(e,Xe(t,r,s))}function Xe(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function Ea(e,t,r,i){const s=i||[];if((function(n,l){const c=n[l+0],h=n[l+1],d=n[l+2],f=n[l+3];let u=3*h[0]-2*c[0]-f[0];u*=u;let p=3*h[1]-2*c[1]-f[1];p*=p;let m=3*d[0]-2*f[0]-c[0];m*=m;let y=3*d[1]-2*f[1]-c[1];return y*=y,u<m&&(u=m),p<y&&(p=y),u+p})(e,t)<r){const n=e[t+0];s.length?(o=s[s.length-1],a=n,Math.sqrt(ds(o,a))>1&&s.push(n)):s.push(n),s.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],d=e[t+3],f=Xe(l,c,.5),u=Xe(c,h,.5),p=Xe(h,d,.5),m=Xe(f,u,.5),y=Xe(u,p,.5),x=Xe(m,y,.5);Ea([l,f,m,x],0,r,s),Ea([x,y,p,d],0,r,s)}var o,a;return s}function uv(e,t){return js(e,0,e.length,t)}function js(e,t,r,i,s){const o=s||[],a=e[t],n=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const d=dv(e[h],a,n);d>l&&(l=d,c=h)}return Math.sqrt(l)>i?(js(e,t,c+1,i,o),js(e,c,r,i,o)):(o.length||o.push(a),o.push(n)),o}function Po(e,t=.15,r){const i=[],s=(e.length-1)/3;for(let o=0;o<s;o++)Ea(e,3*o,t,i);return r&&r>0?js(i,0,i.length,r):i}const Ut="none";class Hs{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,s,o){const a=this._o(o);return this._d("line",[xg(t,r,i,s,a)],a)}rectangle(t,r,i,s,o){const a=this._o(o),n=[],l=hv(t,r,i,s,a);if(a.fill){const c=[[t,r],[t+i,r],[t+i,r+s],[t,r+s]];a.fillStyle==="solid"?n.push(Io([c],a)):n.push(lr([c],a))}return a.stroke!==Ut&&n.push(l),this._d("rectangle",n,a)}ellipse(t,r,i,s,o){const a=this._o(o),n=[],l=Cg(i,s,a),c=Ma(t,r,a,l);if(a.fill)if(a.fillStyle==="solid"){const h=Ma(t,r,a,l).opset;h.type="fillPath",n.push(h)}else n.push(lr([c.estimatedPoints],a));return a.stroke!==Ut&&n.push(c.opset),this._d("ellipse",n,a)}circle(t,r,i,s){const o=this.ellipse(t,r,i,i,s);return o.shape="circle",o}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[cs(t,!1,i)],i)}arc(t,r,i,s,o,a,n=!1,l){const c=this._o(l),h=[],d=uh(t,r,i,s,o,a,n,!0,c);if(n&&c.fill)if(c.fillStyle==="solid"){const f=Object.assign({},c);f.disableMultiStroke=!0;const u=uh(t,r,i,s,o,a,!0,!1,f);u.type="fillPath",h.push(u)}else h.push((function(f,u,p,m,y,x,b){const k=f,S=u;let v=Math.abs(p/2),_=Math.abs(m/2);v+=nt(.01*v,b),_+=nt(.01*_,b);let $=y,T=x;for(;$<0;)$+=2*Math.PI,T+=2*Math.PI;T-$>2*Math.PI&&($=0,T=2*Math.PI);const M=(T-$)/b.curveStepCount,I=[];for(let q=$;q<=T;q+=M)I.push([k+v*Math.cos(q),S+_*Math.sin(q)]);return I.push([k+v*Math.cos(T),S+_*Math.sin(T)]),I.push([k,S]),lr([I],b)})(t,r,i,s,o,a,c));return c.stroke!==Ut&&h.push(d),this._d("arc",h,c)}curve(t,r){const i=this._o(r),s=[],o=dh(t,i);if(i.fill&&i.fill!==Ut)if(i.fillStyle==="solid"){const a=dh(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(a.ops)})}else{const a=[],n=t;if(n.length){const l=typeof n[0][0]=="number"?[n]:n;for(const c of l)c.length<3?a.push(...c):c.length===3?a.push(...Po(yh([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):a.push(...Po(yh(c),10,(1+i.roughness)/2))}a.length&&s.push(lr([a],i))}return i.stroke!==Ut&&s.push(o),this._d("curve",s,i)}polygon(t,r){const i=this._o(r),s=[],o=cs(t,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(Io([t],i)):s.push(lr([t],i))),i.stroke!==Ut&&s.push(o),this._d("polygon",s,i)}path(t,r){const i=this._o(r),s=[];if(!t)return this._d("path",s,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=i.fill&&i.fill!=="transparent"&&i.fill!==Ut,a=i.stroke!==Ut,n=!!(i.simplification&&i.simplification<1),l=(function(h,d,f){const u=mg(pg(Qn(h))),p=[];let m=[],y=[0,0],x=[];const b=()=>{x.length>=4&&m.push(...Po(x,d)),x=[]},k=()=>{b(),m.length&&(p.push(m),m=[])};for(const{key:v,data:_}of u)switch(v){case"M":k(),y=[_[0],_[1]],m.push(y);break;case"L":b(),m.push([_[0],_[1]]);break;case"C":if(!x.length){const $=m.length?m[m.length-1]:y;x.push([$[0],$[1]])}x.push([_[0],_[1]]),x.push([_[2],_[3]]),x.push([_[4],_[5]]);break;case"Z":b(),m.push([y[0],y[1]])}if(k(),!f)return p;const S=[];for(const v of p){const _=uv(v,f);_.length&&S.push(_)}return S})(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),c=fh(t,i);if(o)if(i.fillStyle==="solid")if(l.length===1){const h=fh(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else s.push(Io(l,i));else s.push(lr(l,i));return a&&(n?l.forEach((h=>{s.push(cs(h,!1,i))})):s.push(c)),this._d("path",s,i)}opsToPath(t,r){let i="";for(const s of t.ops){const o=typeof r=="number"&&r>=0?s.data.map((a=>+a.toFixed(r))):s.data;switch(s.op){case"move":i+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":i+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":i+=`L${o[0]} ${o[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,s=[];for(const o of r){let a=null;switch(o.type){case"path":a={d:this.opsToPath(o),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Ut};break;case"fillPath":a={d:this.opsToPath(o),stroke:Ut,strokeWidth:0,fill:i.fill||Ut};break;case"fillSketch":a=this.fillSketch(o,i)}a&&s.push(a)}return s}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Ut,strokeWidth:i,fill:Ut}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class fv{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Hs(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.ctx,o=t.options.fixedDecimalPlaceDigits;for(const a of r)switch(a.type){case"path":s.save(),s.strokeStyle=i.stroke==="none"?"transparent":i.stroke,s.lineWidth=i.strokeWidth,i.strokeLineDash&&s.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(s.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(s,a,o),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,a,o,n),s.restore();break}case"fillSketch":this.fillSketch(s,a,i)}}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=s,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,s="nonzero"){t.beginPath();for(const o of r.ops){const a=typeof i=="number"&&i>=0?o.data.map((n=>+n.toFixed(i))):o.data;switch(o.op){case"move":t.moveTo(a[0],a[1]);break;case"bcurveTo":t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":t.lineTo(a[0],a[1])}}r.type==="fillPath"?t.fill(s):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,s,o){const a=this.gen.line(t,r,i,s,o);return this.draw(a),a}rectangle(t,r,i,s,o){const a=this.gen.rectangle(t,r,i,s,o);return this.draw(a),a}ellipse(t,r,i,s,o){const a=this.gen.ellipse(t,r,i,s,o);return this.draw(a),a}circle(t,r,i,s){const o=this.gen.circle(t,r,i,s);return this.draw(o),o}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,s,o,a,n=!1,l){const c=this.gen.arc(t,r,i,s,o,a,n,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 Ki="http://www.w3.org/2000/svg";class gv{constructor(t,r){this.svg=t,this.gen=new Hs(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,o=s.createElementNS(Ki,"g"),a=t.options.fixedDecimalPlaceDigits;for(const n of r){let l=null;switch(n.type){case"path":l=s.createElementNS(Ki,"path"),l.setAttribute("d",this.opsToPath(n,a)),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=s.createElementNS(Ki,"path"),l.setAttribute("d",this.opsToPath(n,a)),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(s,n,i)}l&&o.appendChild(l)}return o}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);const o=t.createElementNS(Ki,"path");return o.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),o.setAttribute("stroke",i.fill||""),o.setAttribute("stroke-width",s+""),o.setAttribute("fill","none"),i.fillLineDash&&o.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,s,o){const a=this.gen.line(t,r,i,s,o);return this.draw(a)}rectangle(t,r,i,s,o){const a=this.gen.rectangle(t,r,i,s,o);return this.draw(a)}ellipse(t,r,i,s,o){const a=this.gen.ellipse(t,r,i,s,o);return this.draw(a)}circle(t,r,i,s){const o=this.gen.circle(t,r,i,s);return this.draw(o)}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,s,o,a,n=!1,l){const c=this.gen.arc(t,r,i,s,o,a,n,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 J={canvas:(e,t)=>new fv(e,t),svg:(e,t)=>new gv(e,t),generator:e=>new Hs(e),newSeed:()=>Hs.newSeed()},at=g(async(e,t,r)=>{let i;const s=t.useHtmlLabels||Me(pt()?.htmlLabels);r?i=r:i="node default";const o=e.insert("g").attr("class",i).attr("id",t.domId||t.id),a=o.insert("g").attr("class","label").attr("style",Lt(t.labelStyle));let n;t.label===void 0?n="":n=typeof t.label=="string"?t.label:t.label[0];const l=!!t.icon||!!t.img,c=t.labelType==="markdown",h=await Ce(a,Kt(De(n),pt()),{useHtmlLabels:s,width:t.width||pt().flowchart?.wrappingWidth,classes:c?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:c},pt());let d=h.getBBox();const f=(t?.padding??0)/2;if(s){const u=h.children[0],p=ct(h);await Nn(u,n),d=u.getBoundingClientRect(),p.attr("width",d.width),p.attr("height",d.height)}return s?a.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):a.attr("transform","translate(0, "+-d.height/2+")"),t.centerLabel&&a.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:o,bbox:d,halfPadding:f,label:a}},"labelHelper"),Oo=g(async(e,t,r)=>{const i=r.useHtmlLabels??Pt(pt()),s=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),o=await Ce(s,Kt(De(t),pt()),{useHtmlLabels:i,width:r.width||pt()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let a=o.getBBox();const n=r.padding/2;if(Pt(pt())){const l=o.children[0],c=ct(o);a=l.getBoundingClientRect(),c.attr("width",a.width),c.attr("height",a.height)}return i?s.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"):s.attr("transform","translate(0, "+-a.height/2+")"),r.centerLabel&&s.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:e,bbox:a,halfPadding:n,label:s}},"insertLabel"),rt=g((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),ot=g((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function ut(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}g(ut,"createPathFromPoints");function qe(e,t,r,i,s,o){const a=[],l=r-e,c=i-t,h=l/o,d=2*Math.PI/h,f=t+c/2;for(let u=0;u<=50;u++){const p=u/50,m=e+p*l,y=f+s*Math.sin(d*(m-e));a.push({x:m,y})}return a}g(qe,"generateFullSineWavePoints");function Mi(e,t,r,i,s,o){const a=[],n=s*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const f=n+d*h,u=e+r*Math.cos(f),p=t+r*Math.sin(f);a.push({x:-u,y:-p})}return a}g(Mi,"generateCirclePoints");function $a(e){const t=Array.from(e.childNodes).filter(l=>l.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(l=>l.getAttribute("d")).filter(l=>l!==null).join(" ");r.setAttribute("d",i);const s=t.find(l=>l.getAttribute("fill")!=="none"),o=t.find(l=>l.getAttribute("stroke")!=="none"),a=g((l,c)=>l?.getAttribute(c)??void 0,"getAttr");if(s){const l={fill:a(s,"fill"),"fill-opacity":a(s,"fill-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}if(o){const l={stroke:a(o,"stroke"),"stroke-width":a(o,"stroke-width")??"1","stroke-opacity":a(o,"stroke-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}const n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(r),n}g($a,"mergePaths");var pv=g((e,t)=>{var r=e.x,i=e.y,s=t.x-r,o=t.y-i,a=e.width/2,n=e.height/2,l,c;return Math.abs(o)*a>Math.abs(s)*n?(o<0&&(n=-n),l=o===0?0:n*s/o,c=n):(s<0&&(a=-a),l=a,c=s===0?0:a*o/s),{x:r+l,y:i+c}},"intersectRect"),Vr=pv,mv=g(async(e,t,r,i=!1,s=!1)=>{let o=t||"";typeof o=="object"&&(o=o[0]);const a=pt(),n=Pt(a);return await Ce(e,o,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},a)},"createLabel"),$e=mv,ze=g((e,t,r,i,s)=>["M",e+s,t,"H",e+r-s,"A",s,s,0,0,1,e+r,t+s,"V",t+i-s,"A",s,s,0,0,1,e+r-s,t+i,"H",e+s,"A",s,s,0,0,1,e,t+i-s,"V",t+s,"A",s,s,0,0,1,e+s,t,"Z"].join(" "),"createRoundedRectPathD"),kg=g(async(e,t)=>{j.info("Creating subgraph rect for ",t.id,t);const r=pt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:o,clusterBorder:a}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=et(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),f=Pt(r),u=d.insert("g").attr("class","cluster-label ");let p;t.labelType==="markdown"?p=await Ce(u,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width}):p=await $e(u,t.label,t.labelStyle||"",!1,!0);let m=p.getBBox();if(Pt(r)){const $=p.children[0],T=ct(p);m=$.getBoundingClientRect(),T.attr("width",m.width),T.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,k=t.y-x/2;j.trace("Data ",t,JSON.stringify(t));let S;if(t.look==="handDrawn"){const $=J.svg(d),T=tt(t,{roughness:.7,fill:o,stroke:a,fillWeight:3,seed:s}),M=$.path(ze(b,k,y,x,0),T);S=d.insert(()=>(j.debug("Rough node insert CXC",M),M),":first-child"),S.select("path:nth-child(2)").attr("style",c.join(";")),S.select("path").attr("style",h.join(";").replace("fill","stroke"))}else S=d.insert("rect",":first-child"),S.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:v}=ho(r);if(u.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+v})`),n){const $=u.select("span");$&&$.attr("style",n)}const _=S.node().getBBox();return t.offsetX=0,t.width=_.width,t.height=_.height,t.offsetY=m.height-t.padding/2,t.intersect=function($){return Vr(t,$)},{cluster:d,labelBBox:m}},"rect"),yv=g((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),s=0*t.padding,o=s/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-o).attr("y",t.y-t.height/2-o).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const a=i.node().getBBox();return t.width=a.width,t.height=a.height,t.intersect=function(n){return Vr(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),xv=g(async(e,t)=>{const r=pt(),{themeVariables:i,handDrawnSeed:s}=r,{altBackground:o,compositeBackground:a,compositeTitleBackground:n,nodeBorder:l}=i,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),h=c.insert("g",":first-child"),d=c.insert("g").attr("class","cluster-label");let f=c.append("rect");const u=await $e(d,t.label,t.labelStyle,void 0,!0);let p=u.getBBox();if(Pt(r)){const M=u.children[0],I=ct(u);p=M.getBoundingClientRect(),I.attr("width",p.width),I.attr("height",p.height)}const m=0*t.padding,y=m/2,x=(t.width<=p.width+t.padding?p.width+t.padding:t.width)+m;t.width<=p.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+m,k=t.height+m-p.height-6,S=t.x-x/2,v=t.y-b/2;t.width=x;const _=t.y-t.height/2-y+p.height+2;let $;if(t.look==="handDrawn"){const M=t.cssClasses.includes("statediagram-cluster-alt"),I=J.svg(c),q=t.rx||t.ry?I.path(ze(S,v,x,b,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:s}):I.rectangle(S,v,x,b,{seed:s});$=c.insert(()=>q,":first-child");const X=I.rectangle(S,_,x,k,{fill:M?o:a,fillStyle:M?"hachure":"solid",stroke:l,seed:s});$=c.insert(()=>q,":first-child"),f=c.insert(()=>X)}else $=h.insert("rect",":first-child"),$.attr("class","outer").attr("x",S).attr("y",v).attr("width",x).attr("height",b).attr("data-look",t.look),f.attr("class","inner").attr("x",S).attr("y",_).attr("width",x).attr("height",k);d.attr("transform",`translate(${t.x-p.width/2}, ${v+1-(Pt(r)?0:3)})`);const T=$.node().getBBox();return t.height=T.height,t.offsetX=0,t.offsetY=p.height-t.padding/2,t.labelBBox=p,t.intersect=function(M){return Vr(t,M)},{cluster:c,labelBBox:p}},"roundedWithTitle"),Cv=g(async(e,t)=>{j.info("Creating subgraph rect for ",t.id,t);const r=pt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:o,clusterBorder:a}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=et(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),f=Pt(r),u=d.insert("g").attr("class","cluster-label "),p=await Ce(u,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width});let m=p.getBBox();if(Pt(r)){const $=p.children[0],T=ct(p);m=$.getBoundingClientRect(),T.attr("width",m.width),T.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,k=t.y-x/2;j.trace("Data ",t,JSON.stringify(t));let S;if(t.look==="handDrawn"){const $=J.svg(d),T=tt(t,{roughness:.7,fill:o,stroke:a,fillWeight:4,seed:s}),M=$.path(ze(b,k,y,x,t.rx),T);S=d.insert(()=>(j.debug("Rough node insert CXC",M),M),":first-child"),S.select("path:nth-child(2)").attr("style",c.join(";")),S.select("path").attr("style",h.join(";").replace("fill","stroke"))}else S=d.insert("rect",":first-child"),S.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:v}=ho(r);if(u.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+v})`),n){const $=u.select("span");$&&$.attr("style",n)}const _=S.node().getBBox();return t.offsetX=0,t.width=_.width,t.height=_.height,t.offsetY=m.height-t.padding/2,t.intersect=function($){return Vr(t,$)},{cluster:d,labelBBox:m}},"kanbanSection"),bv=g((e,t)=>{const r=pt(),{themeVariables:i,handDrawnSeed:s}=r,{nodeBorder:o}=i,a=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),n=a.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const h=t.height+l,d=t.x-c/2,f=t.y-h/2;t.width=c;let u;if(t.look==="handDrawn"){const y=J.svg(a).rectangle(d,f,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:o,seed:s});u=a.insert(()=>y,":first-child")}else{u=n.insert("rect",":first-child");let m="outer";t.look,m="divider",u.attr("class",m).attr("x",d).attr("y",f).attr("width",c).attr("height",h).attr("data-look",t.look)}const p=u.node().getBBox();return t.height=p.height,t.offsetX=0,t.offsetY=0,t.intersect=function(m){return Vr(t,m)},{cluster:a,labelBBox:{}}},"divider"),kv=kg,wv={rect:kg,squareRect:kv,roundedWithTitle:xv,noteGroup:yv,divider:bv,kanbanSection:Cv},wg=new Map,vg=g(async(e,t)=>{const r=t.shape||"rect",i=await wv[r](e,t);return wg.set(t.id,i),i},"insertCluster"),vv=g(()=>{wg=new Map},"clear");function Sg(e,t){return e.intersect(t)}g(Sg,"intersectNode");var Sv=Sg;function Tg(e,t,r,i){var s=e.x,o=e.y,a=s-i.x,n=o-i.y,l=Math.sqrt(t*t*n*n+r*r*a*a),c=Math.abs(t*r*a/l);i.x<s&&(c=-c);var h=Math.abs(t*r*n/l);return i.y<o&&(h=-h),{x:s+c,y:o+h}}g(Tg,"intersectEllipse");var _g=Tg;function Bg(e,t,r){return _g(e,t,t,r)}g(Bg,"intersectCircle");var Tv=Bg;function Lg(e,t,r,i){{const s=t.y-e.y,o=e.x-t.x,a=t.x*e.y-e.x*t.y,n=s*r.x+o*r.y+a,l=s*i.x+o*i.y+a,c=1e-6;if(n!==0&&l!==0&&Ia(n,l))return;const h=i.y-r.y,d=r.x-i.x,f=i.x*r.y-r.x*i.y,u=h*e.x+d*e.y+f,p=h*t.x+d*t.y+f;if(Math.abs(u)<c&&Math.abs(p)<c&&Ia(u,p))return;const m=s*d-h*o;if(m===0)return;const y=Math.abs(m/2);let x=o*f-d*a;const b=x<0?(x-y)/m:(x+y)/m;x=h*a-s*f;const k=x<0?(x-y)/m:(x+y)/m;return{x:b,y:k}}}g(Lg,"intersectLine");function Ia(e,t){return e*t>0}g(Ia,"sameSign");var _v=Lg;function Fg(e,t,r){let i=e.x,s=e.y,o=[],a=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){a=Math.min(a,h.x),n=Math.min(n,h.y)}):(a=Math.min(a,t.x),n=Math.min(n,t.y));let l=i-e.width/2-a,c=s-e.height/2-n;for(let h=0;h<t.length;h++){let d=t[h],f=t[h<t.length-1?h+1:0],u=_v(e,r,{x:l+d.x,y:c+d.y},{x:l+f.x,y:c+f.y});u&&o.push(u)}return o.length?(o.length>1&&o.sort(function(h,d){let f=h.x-r.x,u=h.y-r.y,p=Math.sqrt(f*f+u*u),m=d.x-r.x,y=d.y-r.y,x=Math.sqrt(m*m+y*y);return p<x?-1:p===x?0:1}),o[0]):e}g(Fg,"intersectPolygon");var Bv=Fg,K={node:Sv,circle:Tv,ellipse:_g,polygon:Bv,rect:Vr};function Mg(e,t){const{labelStyles:r}=et(t);t.labelStyle=r;const i=ot(t);let s=i;i||(s="anchor");const o=e.insert("g").attr("class",s).attr("id",t.domId||t.id),a=1,{cssStyles:n}=t,l=J.svg(o),c=tt(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,a*2,c),d=o.insert(()=>h,":first-child");return d.attr("class","anchor").attr("style",Lt(n)),rt(t,d),t.intersect=function(f){return j.info("Circle intersect",t,a,f),K.circle(t,a,f)},o}g(Mg,"anchor");function Pa(e,t,r,i,s,o,a){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),d=(r-e)/2,f=(i-t)/2,u=d/s,p=f/o,m=Math.sqrt(u**2+p**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*o*Math.sin(h)*(a?-1:1),b=c-y*s*Math.cos(h)*(a?-1:1),k=Math.atan2((t-b)/o,(e-x)/s);let v=Math.atan2((i-b)/o,(r-x)/s)-k;a&&v<0&&(v+=2*Math.PI),!a&&v>0&&(v-=2*Math.PI);const _=[];for(let $=0;$<20;$++){const T=$/19,M=k+T*v,I=x+s*Math.cos(M),q=b+o*Math.sin(M);_.push({x:I,y:q})}return _}g(Pa,"generateArcPoints");function Ag(e,t,r){const[i,s]=[t,r].sort((o,a)=>a-o);return s*(1-Math.sqrt(1-(e/i/2)**2))}g(Ag,"calculateArcSagitta");async function Eg(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=g(M=>M+a,"calcTotalHeight"),l=g(M=>{const I=M/2;return[I/(2.5+M/50),I]},"calcEllipseRadius"),{shapeSvg:c,bbox:h}=await at(e,t,ot(t)),d=n(t?.height?t?.height:h.height),[f,u]=l(d),p=Ag(d,f,u),y=(t?.width?t?.width:h.width)+o*2+p-p,x=d,{cssStyles:b}=t,k=[{x:y/2,y:-x/2},{x:-y/2,y:-x/2},...Pa(-y/2,-x/2,-y/2,x/2,f,u,!1),{x:y/2,y:x/2},...Pa(y/2,x/2,y/2,-x/2,f,u,!0)],S=J.svg(c),v=tt(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const _=ut(k),$=S.path(_,v),T=c.insert(()=>$,":first-child");return T.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(${f/2}, 0)`),rt(t,T),t.intersect=function(M){return K.polygon(t,k,M)},c}g(Eg,"bowTieRect");function Ae(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}g(Ae,"insertPolygonShape");var Qi=12;async function $g(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?28:s,a=t.look==="neo"?24:s,{shapeSvg:n,bbox:l}=await at(e,t,ot(t)),c=(t?.width??l.width)+(t.look==="neo"?o*2:o+Qi),h=(t?.height??l.height)+(t.look==="neo"?a*2:a),d=0,f=c,u=-h,p=0,m=[{x:d+Qi,y:u},{x:f,y:u},{x:f,y:p},{x:d,y:p},{x:d,y:u+Qi},{x:d+Qi,y:u}];let y;const{cssStyles:x}=t;if(t.look==="handDrawn"){const b=J.svg(n),k=tt(t,{}),S=ut(m),v=b.path(S,k);y=n.insert(()=>v,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),x&&y.attr("style",x)}else y=Ae(n,c,h,m);return i&&y.attr("style",i),rt(t,y),t.intersect=function(b){return K.polygon(t,m,b)},n}g($g,"card");function Ig(e,t){const{nodeStyles:r}=et(t);t.label="";const i=e.insert("g").attr("class",ot(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,o=Math.max(28,t.width??0),a=[{x:0,y:o/2},{x:o/2,y:0},{x:0,y:-o/2},{x:-o/2,y:0}],n=J.svg(i),l=tt(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=ut(a),h=n.path(c,l),d=i.insert(()=>h,":first-child");return s&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",s),r&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(f){return K.polygon(t,a,f)},i}g(Ig,"choice");async function Jn(e,t,r){const{labelStyles:i,nodeStyles:s}=et(t);t.labelStyle=i;const{shapeSvg:o,bbox:a,halfPadding:n}=await at(e,t,ot(t)),l=16,c=r?.padding??n,h=t.look==="neo"?a.width/2+l*2:a.width/2+c;let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const u=J.svg(o),p=tt(t,{}),m=u.circle(0,0,h*2,p);d=o.insert(()=>m,":first-child"),d.attr("class","basic label-container").attr("style",Lt(f))}else d=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",h).attr("cx",0).attr("cy",0);return rt(t,d),t.calcIntersect=function(u,p){const m=u.width/2;return K.circle(u,m,p)},t.intersect=function(u){return j.info("Circle intersect",t,h,u),K.circle(t,h,u)},o}g(Jn,"circle");function Pg(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,s={x:i/2*t,y:i/2*r},o={x:-(i/2)*t,y:i/2*r},a={x:-(i/2)*t,y:-(i/2)*r},n={x:i/2*t,y:-(i/2)*r};return`M ${o.x},${o.y} L ${n.x},${n.y}
|
|
229
|
+
M ${s.x},${s.y} L ${a.x},${a.y}`}g(Pg,"createLine");function Og(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r,t.label="";const s=e.insert("g").attr("class",ot(t)).attr("id",t.domId??t.id),o=Math.max(30,t?.width??0),{cssStyles:a}=t,n=J.svg(s),l=tt(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=n.circle(0,0,o*2,l),h=Pg(o),d=n.path(h,l),f=s.insert(()=>c,":first-child");return f.insert(()=>d),f.attr("class","outer-path"),a&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),rt(t,f),t.intersect=function(u){return j.info("crossedCircle intersect",t,{radius:o,point:u}),K.circle(t,o,u)},s}g(Og,"crossedCircle");function we(e,t,r,i=100,s=0,o=180){const a=[],n=s*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const f=n+d*h,u=e+r*Math.cos(f),p=t+r*Math.sin(f);a.push({x:-u,y:-p})}return a}g(we,"generateCirclePoints");async function Rg(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await at(e,t,ot(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=o.width+n,h=o.height+l,d=Math.max(5,h*.1),{cssStyles:f}=t,u=[...we(c/2,-h/2,d,30,-90,0),{x:-c/2-d,y:d},...we(c/2+d*2,-d,d,20,-180,-270),...we(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:-h/2},...we(c/2,h/2,d,20,0,90)],p=[{x:c/2,y:-h/2-d},{x:-c/2,y:-h/2-d},...we(c/2,-h/2,d,20,-90,0),{x:-c/2-d,y:-d},...we(c/2+c*.1,-d,d,20,-180,-270),...we(c/2+c*.1,d,d,20,-90,-180),{x:-c/2-d,y:h/2},...we(c/2,h/2,d,20,0,90),{x:-c/2,y:h/2+d},{x:c/2,y:h/2+d}],m=J.svg(s),y=tt(t,{fill:"none"});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=ut(u).replace("Z",""),k=m.path(b,y),S=ut(p),v=m.path(S,{...y}),_=s.insert("g",":first-child");return _.insert(()=>v,":first-child").attr("stroke-opacity",0),_.insert(()=>k,":first-child"),_.attr("class","text"),f&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(${d}, 0)`),a.attr("transform",`translate(${-c/2+d-(o.x-(o.left??0))},${-h/2+(t.padding??0)/2-(o.y-(o.top??0))})`),rt(t,_),t.intersect=function($){return K.polygon(t,p,$)},s}g(Rg,"curlyBraceLeft");function ve(e,t,r,i=100,s=0,o=180){const a=[],n=s*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const f=n+d*h,u=e+r*Math.cos(f),p=t+r*Math.sin(f);a.push({x:u,y:p})}return a}g(ve,"generateCirclePoints");async function Dg(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await at(e,t,ot(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=o.width+(t.look==="neo"?n*2:n),h=o.height+(t.look==="neo"?l*2:l),d=Math.max(5,h*.1),{cssStyles:f}=t,u=[...ve(c/2,-h/2,d,20,-90,0),{x:c/2+d,y:-d},...ve(c/2+d*2,-d,d,20,-180,-270),...ve(c/2+d*2,d,d,20,-90,-180),{x:c/2+d,y:h/2},...ve(c/2,h/2,d,20,0,90)],p=[{x:-c/2,y:-h/2-d},{x:c/2,y:-h/2-d},...ve(c/2,-h/2,d,20,-90,0),{x:c/2+d,y:-d},...ve(c/2+d*2,-d,d,20,-180,-270),...ve(c/2+d*2,d,d,20,-90,-180),{x:c/2+d,y:h/2},...ve(c/2,h/2,d,20,0,90),{x:c/2,y:h/2+d},{x:-c/2,y:h/2+d}],m=J.svg(s),y=tt(t,{fill:"none"});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=ut(u).replace("Z",""),k=m.path(b,y),S=ut(p),v=m.path(S,{...y}),_=s.insert("g",":first-child");return _.insert(()=>v,":first-child").attr("stroke-opacity",0),_.insert(()=>k,":first-child"),_.attr("class","text"),f&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(${-d}, 0)`),a.attr("transform",`translate(${-c/2+(t.padding??0)/2-(o.x-(o.left??0))},${-h/2+(t.padding??0)/2-(o.y-(o.top??0))})`),rt(t,_),t.intersect=function($){return K.polygon(t,p,$)},s}g(Dg,"curlyBraceRight");function Ft(e,t,r,i=100,s=0,o=180){const a=[],n=s*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const f=n+d*h,u=e+r*Math.cos(f),p=t+r*Math.sin(f);a.push({x:-u,y:-p})}return a}g(Ft,"generateCirclePoints");async function Ng(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await at(e,t,ot(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=o.width+(t.look==="neo"?n*2:n),h=o.height+(t.look==="neo"?l*2:l),d=Math.max(5,h*.1),{cssStyles:f}=t,u=[...Ft(c/2,-h/2,d,30,-90,0),{x:-c/2-d,y:d},...Ft(c/2+d*2,-d,d,20,-180,-270),...Ft(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:-h/2},...Ft(c/2,h/2,d,20,0,90)],p=[...Ft(-c/2+d+d/2,-h/2,d,20,-90,-180),{x:c/2-d/2,y:d},...Ft(-c/2-d/2,-d,d,20,0,90),...Ft(-c/2-d/2,d,d,20,-90,0),{x:c/2-d/2,y:-d},...Ft(-c/2+d+d/2,h/2,d,30,-180,-270)],m=[{x:c/2,y:-h/2-d},{x:-c/2,y:-h/2-d},...Ft(c/2,-h/2,d,20,-90,0),{x:-c/2-d,y:-d},...Ft(c/2+d*2,-d,d,20,-180,-270),...Ft(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:h/2},...Ft(c/2,h/2,d,20,0,90),{x:-c/2,y:h/2+d},{x:c/2-d-d/2,y:h/2+d},...Ft(-c/2+d+d/2,-h/2,d,20,-90,-180),{x:c/2-d/2,y:d},...Ft(-c/2-d/2,-d,d,20,0,90),...Ft(-c/2-d/2,d,d,20,-90,0),{x:c/2-d/2,y:-d},...Ft(-c/2+d+d/2,h/2,d,30,-180,-270)],y=J.svg(s),x=tt(t,{fill:"none"});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const k=ut(u).replace("Z",""),S=y.path(k,x),_=ut(p).replace("Z",""),$=y.path(_,x),T=ut(m),M=y.path(T,{...x}),I=s.insert("g",":first-child");return I.insert(()=>M,":first-child").attr("stroke-opacity",0),I.insert(()=>S,":first-child"),I.insert(()=>$,":first-child"),I.attr("class","text"),f&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",i),I.attr("transform",`translate(${d-d/4}, 0)`),a.attr("transform",`translate(${-c/2+(t.padding??0)/2-(o.x-(o.left??0))},${-h/2+(t.padding??0)/2-(o.y-(o.top??0))})`),rt(t,I),t.intersect=function(q){return K.polygon(t,m,q)},s}g(Ng,"curlyBraces");async function qg(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=20,l=5,{shapeSvg:c,bbox:h}=await at(e,t,ot(t)),d=Math.max(n,(h.width+o*2)*1.25,t?.width??0),f=Math.max(l,h.height+a*2,t?.height??0),u=f/2,{cssStyles:p}=t,m=J.svg(c),y=tt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=d,b=f,k=x-u,S=b/4,v=[{x:k,y:0},{x:S,y:0},{x:0,y:b/2},{x:S,y:b},{x:k,y:b},...Mi(-k,-b/2,u,50,270,90)],_=ut(v),$=m.path(_,y),T=c.insert(()=>$,":first-child");return T.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",p),i&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",i),T.attr("transform",`translate(${-d/2}, ${-f/2})`),rt(t,T),t.intersect=function(M){return K.polygon(t,v,M)},c}g(qg,"curvedTrapezoid");var Lv=g((e,t,r,i,s,o)=>[`M${e},${t+o}`,`a${s},${o} 0,0,0 ${r},0`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),Fv=g((e,t,r,i,s,o)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),Mv=g((e,t,r,i,s,o)=>[`M${e-r/2},${-i/2}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),xh=8,Ch=8;async function zg(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?24:s,a=t.look==="neo"?24:s;if(t.width||t.height){const y=t.width??0;t.width=(t.width??0)-a,t.width<Ch&&(t.width=Ch);const b=y/2/(2.5+y/50);t.height=(t.height??0)-o-b*3,t.height<xh&&(t.height=xh)}const{shapeSvg:n,bbox:l,label:c}=await at(e,t,ot(t)),h=(t.width?t.width:l.width)+a,d=h/2,f=d/(2.5+h/50),u=(t.height?t.height:l.height)+o+f;let p;const{cssStyles:m}=t;if(t.look==="handDrawn"){const y=J.svg(n),x=Fv(0,0,h,u,d,f),b=Mv(0,f,h,u,d,f),k=tt(t,{}),S=y.path(x,k),v=y.path(b,tt(t,{fill:"none"}));p=n.insert(()=>v,":first-child"),p=n.insert(()=>S,":first-child"),p.attr("class","basic label-container"),m&&p.attr("style",m)}else{const y=Lv(0,0,h,u,d,f);p=n.insert("path",":first-child").attr("d",y).attr("class","basic label-container outer-path").attr("style",Lt(m)).attr("style",i)}return p.attr("label-offset-y",f),p.attr("transform",`translate(${-h/2}, ${-(u/2+f)})`),rt(t,p),c.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+(t.padding??0)/1.5-(l.y-(l.top??0))})`),t.intersect=function(y){const x=K.rect(t,y),b=x.x-(t.x??0);if(d!=0&&(Math.abs(b)<(t.width??0)/2||Math.abs(b)==(t.width??0)/2&&Math.abs(x.y-(t.y??0))>(t.height??0)/2-f)){let k=f*f*(1-b*b/(d*d));k>0&&(k=Math.sqrt(k)),k=f-k,y.y-(t.y??0)>0&&(k=-k),x.y+=k}return x},n}g(zg,"cylinder");async function Zr(e,t,r){const{labelStyles:i,nodeStyles:s}=et(t);t.labelStyle=i;const{shapeSvg:o,bbox:a}=await at(e,t,ot(t)),n=Math.max(a.width+r.labelPaddingX*2,t?.width||0),l=Math.max(a.height+r.labelPaddingY*2,t?.height||0),c=-n/2,h=-l/2;let d,{rx:f,ry:u}=t;const{cssStyles:p}=t;if(r?.rx&&r.ry&&(f=r.rx,u=r.ry),t.look==="handDrawn"){const m=J.svg(o),y=tt(t,{}),x=f||u?m.path(ze(c,h,n,l,f||0),y):m.rectangle(c,h,n,l,y);d=o.insert(()=>x,":first-child"),d.attr("class","basic label-container").attr("style",Lt(p))}else d=o.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",s).attr("rx",Lt(f)).attr("ry",Lt(u)).attr("x",c).attr("y",h).attr("width",n).attr("height",l);return rt(t,d),t.calcIntersect=function(m,y){return K.rect(m,y)},t.intersect=function(m){return K.rect(t,m)},o}g(Zr,"drawRect");async function Wg(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:s,padding:o,width:a,height:n}=t,l={rx:0,ry:0,labelPaddingX:i??(o??0)*2,labelPaddingY:s??o??0},c=await Zr(e,t,l);if(t.look==="handDrawn"){const u=J.svg(c),p=tt(t,{}),m=c.select(".basic.label-container > path:nth-child(2)"),y=m.node();if(!y)return c;let x=null;if(y instanceof SVGGraphicsElement)x=y.getBBox();else return c;return c.insert(()=>u.line(x.x,x.y,x.x+x.width,x.y,p),".basic.label-container g.label"),c.insert(()=>u.line(x.x,x.y+x.height,x.x+x.width,x.y+x.height,p),".basic.label-container g.label"),m.remove(),c}const h=c.select(".basic.label-container"),d=(Number(h.attr("width"))||a)??0,f=(Number(h.attr("height"))||n)??0;return d>0&&f>0&&h.attr("stroke-dasharray",`${d} ${f}`),c}g(Wg,"datastore");async function jg(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?16:t.padding??0,{shapeSvg:a,bbox:n,label:l}=await at(e,t,ot(t)),c=n.width+s,h=n.height+o,d=h*.2,f=-c/2,u=-h/2-d/2,{cssStyles:p}=t,m=J.svg(a),y=tt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:f,y:u+d},{x:-f,y:u+d},{x:-f,y:-u},{x:f,y:-u},{x:f,y:u},{x:-f,y:u},{x:-f,y:u+d}],b=m.polygon(x.map(S=>[S.x,S.y]),y),k=a.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),l.attr("transform",`translate(${f+(t.padding??0)/2-(n.x-(n.left??0))}, ${u+d+(t.padding??0)/2-(n.y-(n.top??0))})`),rt(t,k),t.intersect=function(S){return K.rect(t,S)},a}g(jg,"dividedRectangle");async function Hg(e,t){const{labelStyles:r,nodeStyles:i}=et(t),s=t.look==="neo"?12:5;t.labelStyle=r;const o=t.padding??0,a=t.look==="neo"?16:o,{shapeSvg:n,bbox:l}=await at(e,t,ot(t)),c=(t?.width?t?.width/2:l.width/2)+(a??0),h=c-s;let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const u=J.svg(n),p=tt(t,{roughness:.2,strokeWidth:2.5}),m=tt(t,{roughness:.2,strokeWidth:1.5}),y=u.circle(0,0,c*2,p),x=u.circle(0,0,h*2,m);d=n.insert("g",":first-child"),d.attr("class",Lt(t.cssClasses)).attr("style",Lt(f)),d.node()?.appendChild(y),d.node()?.appendChild(x)}else{d=n.insert("g",":first-child");const u=d.insert("circle",":first-child"),p=d.insert("circle");d.attr("class","basic label-container").attr("style",i),u.attr("class","outer-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0),p.attr("class","inner-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0)}return rt(t,d),t.intersect=function(u){return j.info("DoubleCircle intersect",t,c,u),K.circle(t,c,u)},n}g(Hg,"doublecircle");function Yg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=et(t);t.label="",t.labelStyle=i;const o=e.insert("g").attr("class",ot(t)).attr("id",t.domId??t.id),a=7,{cssStyles:n}=t,l=J.svg(o),{nodeBorder:c}=r,h=tt(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const d=l.circle(0,0,a*2,h),f=o.insert(()=>d,":first-child");return f.selectAll("path").attr("style",`fill: ${c} !important;`),n&&n.length>0&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",n),s&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",s),rt(t,f),t.intersect=function(u){return j.info("filledCircle intersect",t,{radius:a,point:u}),K.circle(t,a,u)},o}g(Yg,"filledCircle");var bh=10,kh=10;async function Ug(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.height=t?.height??0,t.height<bh&&(t.height=bh),t.width=(t?.width??0)-o-o/2,t.width<kh&&(t.width=kh));const{shapeSvg:a,bbox:n,label:l}=await at(e,t,ot(t)),c=(t?.width?t?.width:n.width)+(o??0),h=t?.height?t?.height:c+n.height,d=h,f=[{x:0,y:-h},{x:d,y:-h},{x:d/2,y:0}],{cssStyles:u}=t,p=J.svg(a),m=tt(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=ut(f),x=p.path(y,m),b=a.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${h/2})`).attr("class","outer-path");return u&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),t.width=c,t.height=h,rt(t,b),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-h/2+(t.padding??0)/2+(n.y-(n.top??0))})`),t.intersect=function(k){return j.info("Triangle intersect",t,f,k),K.polygon(t,f,k)},a}g(Ug,"flippedTriangle");function Xg(e,t,{dir:r,config:{state:i,themeVariables:s}}){const{nodeStyles:o}=et(t);t.label="";const a=e.insert("g").attr("class",ot(t)).attr("id",t.domId??t.id),{cssStyles:n}=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,d=-1*c/2,f=J.svg(a),u=tt(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const p=f.rectangle(h,d,l,c,u),m=a.insert(()=>p,":first-child");n&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",n),o&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",o),rt(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 K.rect(t,x)},a}g(Xg,"forkJoin");async function Gg(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=15,o=10,a=t.look==="neo"?16:t.padding??0,n=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-n*2,t.height<o&&(t.height=o),t.width=(t?.width??0)-a*2,t.width<s&&(t.width=s));const{shapeSvg:l,bbox:c}=await at(e,t,ot(t)),h=(t?.width?t?.width:Math.max(s,c.width))+a*2,d=(t?.height?t?.height:Math.max(o,c.height))+n*2,f=d/2,{cssStyles:u}=t,p=J.svg(l),m=tt(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-h/2,y:-d/2},{x:h/2-f,y:-d/2},...Mi(-h/2+f,0,f,50,90,270),{x:h/2-f,y:d/2},{x:-h/2,y:d/2}],x=ut(y),b=p.path(x,m),k=l.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),rt(t,k),t.intersect=function(S){return j.info("Pill intersect",t,{radius:f,point:S}),K.polygon(t,y,S)},l}g(Gg,"halfRoundedRectangle");var Av=g((e,t,r,i,s)=>[`M${e+s},${t}`,`L${e+r-s},${t}`,`L${e+r},${t-i/2}`,`L${e+r-s},${t-i}`,`L${e+s},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function Vg(e,t){const{labelStyles:r,nodeStyles:i}=et(t),s=t.look==="neo"?3.5:4;t.labelStyle=r;const o=t.padding??0,a=70,n=32,l=t.look==="neo"?a:o,c=t.look==="neo"?n:o;if(t.width||t.height){const k=(t.height??0)/s;t.width=(t?.width??0)-2*k-c,t.height=(t.height??0)-l}const{shapeSvg:h,bbox:d}=await at(e,t,ot(t)),f=(t?.height?t?.height:d.height)+l,u=f/s,p=(t?.width?t?.width:d.width)+2*u+c,m=[{x:u,y:0},{x:p-u,y:0},{x:p,y:-f/2},{x:p-u,y:-f},{x:u,y:-f},{x:0,y:-f/2}];let y;const{cssStyles:x}=t;if(t.look==="handDrawn"){const b=J.svg(h),k=tt(t,{}),S=Av(0,0,p,f,u),v=b.path(S,k);y=h.insert(()=>v,":first-child").attr("transform",`translate(${-p/2}, ${f/2})`),x&&y.attr("style",x)}else y=Ae(h,p,f,m);return i&&y.attr("style",i),t.width=p,t.height=f,rt(t,y),t.intersect=function(b){return K.polygon(t,m,b)},h}g(Vg,"hexagon");async function Zg(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.label="",t.labelStyle=r;const{shapeSvg:s}=await at(e,t,ot(t)),o=Math.max(30,t?.width??0),a=Math.max(30,t?.height??0),{cssStyles:n}=t,l=J.svg(s),c=tt(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:o,y:0},{x:0,y:a},{x:o,y:a}],d=ut(h),f=l.path(d,c),u=s.insert(()=>f,":first-child");return u.attr("class","basic label-container outer-path"),n&&t.look!=="handDrawn"&&u.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&u.selectChildren("path").attr("style",i),u.attr("transform",`translate(${-o/2}, ${-a/2})`),rt(t,u),t.intersect=function(p){return j.info("Pill intersect",t,{points:h}),K.polygon(t,h,p)},s}g(Zg,"hourglass");async function Kg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=et(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:d}=await at(e,t,"icon-shape default"),f=t.pos==="t",u=n,p=n,{nodeBorder:m}=r,{stylesMap:y}=Xr(t),x=-p/2,b=-u/2,k=t.label?8:0,S=J.svg(c),v=tt(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const _=S.rectangle(x,b,p,u,v),$=Math.max(p,h.width),T=u+h.height+k,M=S.rectangle(-$/2,-T/2,$,T,{...v,fill:"transparent",stroke:"none"}),I=c.insert(()=>_,":first-child"),q=c.insert(()=>M);if(t.icon){const X=c.append("g");X.html(`<g>${await Gr(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const Y=X.node().getBBox(),D=Y.width,A=Y.height,F=Y.x,P=Y.y;X.attr("transform",`translate(${-D/2-F},${f?h.height/2+k/2-A/2-P:-h.height/2-k/2-A/2-P})`),X.attr("style",`color: ${y.get("stroke")??m};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-T/2:T/2-h.height})`),I.attr("transform",`translate(0,${f?h.height/2+k/2:-h.height/2-k/2})`),rt(t,q),t.intersect=function(X){if(j.info("iconSquare intersect",t,X),!t.label)return K.rect(t,X);const Y=t.x??0,D=t.y??0,A=t.height??0;let F=[];return f?F=[{x:Y-h.width/2,y:D-A/2},{x:Y+h.width/2,y:D-A/2},{x:Y+h.width/2,y:D-A/2+h.height+k},{x:Y+p/2,y:D-A/2+h.height+k},{x:Y+p/2,y:D+A/2},{x:Y-p/2,y:D+A/2},{x:Y-p/2,y:D-A/2+h.height+k},{x:Y-h.width/2,y:D-A/2+h.height+k}]:F=[{x:Y-p/2,y:D-A/2},{x:Y+p/2,y:D-A/2},{x:Y+p/2,y:D-A/2+u},{x:Y+h.width/2,y:D-A/2+u},{x:Y+h.width/2/2,y:D+A/2},{x:Y-h.width/2,y:D+A/2},{x:Y-h.width/2,y:D-A/2+u},{x:Y-p/2,y:D-A/2+u}],K.polygon(t,F,X)},c}g(Kg,"icon");async function Qg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=et(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:d}=await at(e,t,"icon-shape default"),f=20,u=t.label?8:0,p=t.pos==="t",{nodeBorder:m,mainBkg:y}=r,{stylesMap:x}=Xr(t),b=J.svg(c),k=tt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const S=x.get("fill");k.stroke=S??y;const v=c.append("g");t.icon&&v.html(`<g>${await Gr(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const _=v.node().getBBox(),$=_.width,T=_.height,M=_.x,I=_.y,q=Math.max($,T)*Math.SQRT2+f*2,X=b.circle(0,0,q,k),Y=Math.max(q,h.width),D=q+h.height+u,A=b.rectangle(-Y/2,-D/2,Y,D,{...k,fill:"transparent",stroke:"none"}),F=c.insert(()=>X,":first-child"),P=c.insert(()=>A);return v.attr("transform",`translate(${-$/2-M},${p?h.height/2+u/2-T/2-I:-h.height/2-u/2-T/2-I})`),v.attr("style",`color: ${x.get("stroke")??m};`),d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-D/2:D/2-h.height})`),F.attr("transform",`translate(0,${p?h.height/2+u/2:-h.height/2-u/2})`),rt(t,P),t.intersect=function(z){return j.info("iconSquare intersect",t,z),K.rect(t,z)},c}g(Qg,"iconCircle");async function Jg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=et(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:d,label:f}=await at(e,t,"icon-shape default"),u=t.pos==="t",p=n+d*2,m=n+d*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=Xr(t),k=-m/2,S=-p/2,v=t.label?8:0,_=J.svg(c),$=tt(t,{});t.look!=="handDrawn"&&($.roughness=0,$.fillStyle="solid");const T=b.get("fill");$.stroke=T??x;const M=_.path(ze(k,S,m,p,5),$),I=Math.max(m,h.width),q=p+h.height+v,X=_.rectangle(-I/2,-q/2,I,q,{...$,fill:"transparent",stroke:"none"}),Y=c.insert(()=>M,":first-child").attr("class","icon-shape2"),D=c.insert(()=>X);if(t.icon){const A=c.append("g");A.html(`<g>${await Gr(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const F=A.node().getBBox(),P=F.width,z=F.height,E=F.x,N=F.y;A.attr("transform",`translate(${-P/2-E},${u?h.height/2+v/2-z/2-N:-h.height/2-v/2-z/2-N})`),A.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${u?-q/2:q/2-h.height})`),Y.attr("transform",`translate(0,${u?h.height/2+v/2:-h.height/2-v/2})`),rt(t,D),t.intersect=function(A){if(j.info("iconSquare intersect",t,A),!t.label)return K.rect(t,A);const F=t.x??0,P=t.y??0,z=t.height??0;let E=[];return u?E=[{x:F-h.width/2,y:P-z/2},{x:F+h.width/2,y:P-z/2},{x:F+h.width/2,y:P-z/2+h.height+v},{x:F+m/2,y:P-z/2+h.height+v},{x:F+m/2,y:P+z/2},{x:F-m/2,y:P+z/2},{x:F-m/2,y:P-z/2+h.height+v},{x:F-h.width/2,y:P-z/2+h.height+v}]:E=[{x:F-m/2,y:P-z/2},{x:F+m/2,y:P-z/2},{x:F+m/2,y:P-z/2+p},{x:F+h.width/2,y:P-z/2+p},{x:F+h.width/2/2,y:P+z/2},{x:F-h.width/2,y:P+z/2},{x:F-h.width/2,y:P-z/2+p},{x:F-m/2,y:P-z/2+p}],K.polygon(t,E,A)},c}g(Jg,"iconRounded");async function tp(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=et(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:d,label:f}=await at(e,t,"icon-shape default"),u=t.pos==="t",p=n+d*2,m=n+d*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=Xr(t),k=-m/2,S=-p/2,v=t.label?8:0,_=J.svg(c),$=tt(t,{});t.look!=="handDrawn"&&($.roughness=0,$.fillStyle="solid");const T=b.get("fill");$.stroke=T??x;const M=_.path(ze(k,S,m,p,.1),$),I=Math.max(m,h.width),q=p+h.height+v,X=_.rectangle(-I/2,-q/2,I,q,{...$,fill:"transparent",stroke:"none"}),Y=c.insert(()=>M,":first-child"),D=c.insert(()=>X);if(t.icon){const A=c.append("g");A.html(`<g>${await Gr(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const F=A.node().getBBox(),P=F.width,z=F.height,E=F.x,N=F.y;A.attr("transform",`translate(${-P/2-E},${u?h.height/2+v/2-z/2-N:-h.height/2-v/2-z/2-N})`),A.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${u?-q/2:q/2-h.height})`),Y.attr("transform",`translate(0,${u?h.height/2+v/2:-h.height/2-v/2})`),rt(t,D),t.intersect=function(A){if(j.info("iconSquare intersect",t,A),!t.label)return K.rect(t,A);const F=t.x??0,P=t.y??0,z=t.height??0;let E=[];return u?E=[{x:F-h.width/2,y:P-z/2},{x:F+h.width/2,y:P-z/2},{x:F+h.width/2,y:P-z/2+h.height+v},{x:F+m/2,y:P-z/2+h.height+v},{x:F+m/2,y:P+z/2},{x:F-m/2,y:P+z/2},{x:F-m/2,y:P-z/2+h.height+v},{x:F-h.width/2,y:P-z/2+h.height+v}]:E=[{x:F-m/2,y:P-z/2},{x:F+m/2,y:P-z/2},{x:F+m/2,y:P-z/2+p},{x:F+h.width/2,y:P-z/2+p},{x:F+h.width/2/2,y:P+z/2},{x:F-h.width/2,y:P+z/2},{x:F-h.width/2,y:P-z/2+p},{x:F-m/2,y:P-z/2+p}],K.polygon(t,E,A)},c}g(tp,"iconSquare");async function ep(e,t,{config:{flowchart:r}}){const i=new Image;i.src=t?.img??"",await i.decode();const s=Number(i.naturalWidth.toString().replace("px","")),o=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=s/o;const{labelStyles:a}=et(t);t.labelStyle=a;const n=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;const l=Math.max(t.label?n??0:0,t?.assetWidth??s),c=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:t?.assetHeight??o;t.width=Math.max(c,n??0);const{shapeSvg:d,bbox:f,label:u}=await at(e,t,"image-shape default"),p=t.pos==="t",m=-c/2,y=-h/2,x=t.label?8:0,b=J.svg(d),k=tt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const S=b.rectangle(m,y,c,h,k),v=Math.max(c,f.width),_=h+f.height+x,$=b.rectangle(-v/2,-_/2,v,_,{...k,fill:"none",stroke:"none"}),T=d.insert(()=>S,":first-child"),M=d.insert(()=>$);if(t.img){const I=d.append("image");I.attr("href",t.img),I.attr("width",c),I.attr("height",h),I.attr("preserveAspectRatio","none"),I.attr("transform",`translate(${-c/2},${p?_/2-h:-_/2})`)}return u.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${p?-h/2-f.height/2-x/2:h/2-f.height/2+x/2})`),T.attr("transform",`translate(0,${p?f.height/2+x/2:-f.height/2-x/2})`),rt(t,M),t.intersect=function(I){if(j.info("iconSquare intersect",t,I),!t.label)return K.rect(t,I);const q=t.x??0,X=t.y??0,Y=t.height??0;let D=[];return p?D=[{x:q-f.width/2,y:X-Y/2},{x:q+f.width/2,y:X-Y/2},{x:q+f.width/2,y:X-Y/2+f.height+x},{x:q+c/2,y:X-Y/2+f.height+x},{x:q+c/2,y:X+Y/2},{x:q-c/2,y:X+Y/2},{x:q-c/2,y:X-Y/2+f.height+x},{x:q-f.width/2,y:X-Y/2+f.height+x}]:D=[{x:q-c/2,y:X-Y/2},{x:q+c/2,y:X-Y/2},{x:q+c/2,y:X-Y/2+h},{x:q+f.width/2,y:X-Y/2+h},{x:q+f.width/2/2,y:X+Y/2},{x:q-f.width/2,y:X+Y/2},{x:q-f.width/2,y:X-Y/2+h},{x:q-c/2,y:X-Y/2+h}],K.polygon(t,D,I)},d}g(ep,"imageSquare");async function rp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=s,a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await at(e,t,ot(t)),c=Math.max(l.width+(a??0)*2,t?.width??0),h=Math.max(l.height+(o??0)*2,t?.height??0),d=[{x:0,y:0},{x:c,y:0},{x:c+3*h/6,y:-h},{x:-3*h/6,y:-h}];let f;const{cssStyles:u}=t;if(t.look==="handDrawn"){const p=J.svg(n),m=tt(t,{}),y=ut(d),x=p.path(y,m);f=n.insert(()=>x,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),u&&f.attr("style",u)}else f=Ae(n,c,h,d);return i&&f.attr("style",i),t.width=c,t.height=h,rt(t,f),t.intersect=function(p){return K.polygon(t,d,p)},n}g(rp,"inv_trapezoid");async function ip(e,t){const{shapeSvg:r,bbox:i,label:s}=await at(e,t,"label"),o=r.insert("rect",":first-child");return o.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),s.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),rt(t,o),t.intersect=function(l){return K.rect(t,l)},r}g(ip,"labelRect");async function sp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=s,a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await at(e,t,ot(t)),c=(t?.height??l.height)+o,h=(t?.width??l.width)+a,d=[{x:0,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:-(3*c)/6,y:-c}];let f;const{cssStyles:u}=t;if(t.look==="handDrawn"){const p=J.svg(n),m=tt(t,{}),y=ut(d),x=p.path(y,m);f=n.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),u&&f.attr("style",u)}else f=Ae(n,h,c,d);return i&&f.attr("style",i),t.width=h,t.height=c,rt(t,f),t.intersect=function(p){return K.polygon(t,d,p)},n}g(sp,"lean_left");async function op(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=s,a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await at(e,t,ot(t)),c=(t?.height??l.height)+o,h=(t?.width??l.width)+a,d=[{x:-3*c/6,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:0,y:-c}];let f;const{cssStyles:u}=t;if(t.look==="handDrawn"){const p=J.svg(n),m=tt(t,{}),y=ut(d),x=p.path(y,m);f=n.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),u&&f.attr("style",u)}else f=Ae(n,h,c,d);return i&&f.attr("style",i),t.width=h,t.height=c,rt(t,f),t.intersect=function(p){return K.polygon(t,d,p)},n}g(op,"lean_right");function ap(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.label="",t.labelStyle=r;const s=e.insert("g").attr("class",ot(t)).attr("id",t.domId??t.id),{cssStyles:o}=t,a=Math.max(35,t?.width??0),n=Math.max(35,t?.height??0),l=7,c=[{x:a,y:0},{x:0,y:n+l/2},{x:a-2*l,y:n+l/2},{x:0,y:2*n},{x:a,y:n-l/2},{x:2*l,y:n-l/2}],h=J.svg(s),d=tt(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const f=ut(c),u=h.path(f,d),p=s.insert(()=>u,":first-child");return p.attr("class","outer-path"),o&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",i),p.attr("transform",`translate(-${a/2},${-n})`),rt(t,p),t.intersect=function(m){return j.info("lightningBolt intersect",t,m),K.polygon(t,c,m)},s}g(ap,"lightningBolt");var Ev=g((e,t,r,i,s,o,a)=>[`M${e},${t+o}`,`a${s},${o} 0,0,0 ${r},0`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+o+a}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),$v=g((e,t,r,i,s,o,a)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+o+a}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),Iv=g((e,t,r,i,s,o)=>[`M${e-r/2},${-i/2}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),wh=10,vh=10;async function np(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?24:s;if(t.width||t.height){const x=t.width??0;t.width=(t.width??0)-o,t.width<vh&&(t.width=vh);const k=x/2/(2.5+x/50);t.height=(t.height??0)-a-k*3,t.height<wh&&(t.height=wh)}const{shapeSvg:n,bbox:l,label:c}=await at(e,t,ot(t)),h=(t?.width?t?.width:l.width)+o*2,d=h/2,f=d/(2.5+h/50),u=(t?.height?t?.height:l.height)+f+a*2,p=u*.1;let m;const{cssStyles:y}=t;if(t.look==="handDrawn"){const x=J.svg(n),b=$v(0,0,h,u,d,f,p),k=Iv(0,f,h,u,d,f),S=tt(t,{}),v=x.path(b,S),_=x.path(k,S);n.insert(()=>_,":first-child").attr("class","line"),m=n.insert(()=>v,":first-child"),m.attr("class","basic label-container"),y&&m.attr("style",y)}else{const x=Ev(0,0,h,u,d,f,p);m=n.insert("path",":first-child").attr("d",x).attr("class","basic label-container outer-path").attr("style",Lt(y)).attr("style",i)}return m.attr("label-offset-y",f),m.attr("transform",`translate(${-h/2}, ${-(u/2+f)})`),rt(t,m),c.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+f-(l.y-(l.top??0))})`),t.intersect=function(x){const b=K.rect(t,x),k=b.x-(t.x??0);if(d!=0&&(Math.abs(k)<(t.width??0)/2||Math.abs(k)==(t.width??0)/2&&Math.abs(b.y-(t.y??0))>(t.height??0)/2-f)){let S=f*f*(1-k*k/(d*d));S>0&&(S=Math.sqrt(S)),S=f-S,x.y-(t.y??0)>0&&(S=-S),b.y+=S}return b},n}g(np,"linedCylinder");async function lp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;if(t.width||t.height){const S=t.width;t.width=(S??0)*10/11-o*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-a*2,t.height<10&&(t.height=10)}const{shapeSvg:n,bbox:l,label:c}=await at(e,t,ot(t)),h=(t?.width?t?.width:l.width)+(o??0)*2,d=(t?.height?t?.height:l.height)+(a??0)*2,f=t.look==="neo"?d/4:d/8,u=d+f,{cssStyles:p}=t,m=J.svg(n),y=tt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-h/2-h/2*.1,y:-u/2},{x:-h/2-h/2*.1,y:u/2},...qe(-h/2-h/2*.1,u/2,h/2+h/2*.1,u/2,f,.8),{x:h/2+h/2*.1,y:-u/2},{x:-h/2-h/2*.1,y:-u/2},{x:-h/2,y:-u/2},{x:-h/2,y:u/2*1.1},{x:-h/2,y:-u/2}],b=m.polygon(x.map(S=>[S.x,S.y]),y),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-f/2})`),c.attr("transform",`translate(${-h/2+(t.padding??0)+h/2*.1/2-(l.x-(l.left??0))},${-d/2+(t.padding??0)-f/2-(l.y-(l.top??0))})`),rt(t,k),t.intersect=function(S){return K.polygon(t,x,S)},n}g(lp,"linedWaveEdgedRect");async function hp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-o*2-2*n,10),t.height=Math.max((t?.height??0)-a*2-2*n,10));const{shapeSvg:l,bbox:c,label:h}=await at(e,t,ot(t)),d=(t?.width?t?.width:c.width)+o*2+2*n,f=(t?.height?t?.height:c.height)+a*2+2*n,u=d-2*n,p=f-2*n,m=-u/2,y=-p/2,{cssStyles:x}=t,b=J.svg(l),k=tt(t,{}),S=[{x:m-n,y:y+n},{x:m-n,y:y+p+n},{x:m+u-n,y:y+p+n},{x:m+u-n,y:y+p},{x:m+u,y:y+p},{x:m+u,y:y+p-n},{x:m+u+n,y:y+p-n},{x:m+u+n,y:y-n},{x:m+n,y:y-n},{x:m+n,y},{x:m,y},{x:m,y:y+n}],v=[{x:m,y:y+n},{x:m+u-n,y:y+n},{x:m+u-n,y:y+p},{x:m+u,y:y+p},{x:m+u,y},{x:m,y}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const _=ut(S);let $=b.path(_,k);const T=ut(v);let M=b.path(T,k);t.look!=="handDrawn"&&($=$a($),M=$a(M));const I=l.insert("g",":first-child");return I.insert(()=>$),I.insert(()=>M),I.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",x),i&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",i),h.attr("transform",`translate(${-(c.width/2)-n-(c.x-(c.left??0))}, ${-(c.height/2)+n-(c.y-(c.top??0))})`),rt(t,I),t.intersect=function(q){return K.polygon(t,S,q)},l}g(hp,"multiRect");async function cp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await at(e,t,ot(t)),n=t.padding??0,l=t.look==="neo"?16:n,c=t.look==="neo"?12:n;let h=!0;(t.width||t.height)&&(h=!1,t.width=(t?.width??0)-l*2,t.height=(t?.height??0)-c*3);const d=Math.max(o.width,t?.width??0)+l*2,f=Math.max(o.height,t?.height??0)+c*3,u=t.look==="neo"?f/4:f/8,p=f+(h?u/2:-u/2),m=-d/2,y=-p/2,x=10,{cssStyles:b}=t,k=qe(m-x,y+p+x,m+d-x,y+p+x,u,.8),S=k?.[k.length-1],v=[{x:m-x,y:y+x},{x:m-x,y:y+p+x},...k,{x:m+d-x,y:S.y-x},{x:m+d,y:S.y-x},{x:m+d,y:S.y-2*x},{x:m+d+x,y:S.y-2*x},{x:m+d+x,y:y-x},{x:m+x,y:y-x},{x:m+x,y},{x:m,y},{x:m,y:y+x}],_=[{x:m,y:y+x},{x:m+d-x,y:y+x},{x:m+d-x,y:S.y-x},{x:m+d,y:S.y-x},{x:m+d,y},{x:m,y}],$=J.svg(s),T=tt(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const M=ut(v),I=$.path(M,T),q=ut(_),X=$.path(q,T),Y=s.insert(()=>I,":first-child");return Y.insert(()=>X),Y.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&Y.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&Y.selectAll("path").attr("style",i),Y.attr("transform",`translate(0,${-u/2})`),a.attr("transform",`translate(${-(o.width/2)-x-(o.x-(o.left??0))}, ${-(o.height/2)+x-u/2-(o.y-(o.top??0))})`),rt(t,Y),t.intersect=function(D){return K.polygon(t,v,D)},s}g(cp,"multiWaveEdgedRectangle");async function dp(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=et(t);t.labelStyle=i,t.useHtmlLabels||Pt(Ct())||(t.centerLabel=!0);const{shapeSvg:a,bbox:n,label:l}=await at(e,t,ot(t)),c=Math.max(n.width+(t.padding??0)*2,t?.width??0),h=Math.max(n.height+(t.padding??0)*2,t?.height??0),d=-c/2,f=-h/2,{cssStyles:u}=t,p=J.svg(a),m=tt(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=p.rectangle(d,f,c,h,m),x=a.insert(()=>y,":first-child");return x.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),u&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",u),s&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",s),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),rt(t,x),t.intersect=function(b){return K.rect(t,b)},a}g(dp,"note");var Pv=g((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 up(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const{shapeSvg:s,bbox:o}=await at(e,t,ot(t)),a=o.width+(t.padding??0),n=o.height+(t.padding??0),l=a+n,c=.5,h=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const u=J.svg(s),p=tt(t,{}),m=Pv(0,0,l),y=u.path(m,p);d=s.insert(()=>y,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),f&&d.attr("style",f)}else d=Ae(s,l,l,h),d.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&d.attr("style",i),rt(t,d),t.calcIntersect=function(u,p){const m=u.width,y=[{x:m/2,y:0},{x:m,y:-m/2},{x:m/2,y:-m},{x:0,y:-m/2}],x=K.polygon(u,y,p);return{x:x.x-.5,y:x.y-.5}},t.intersect=function(u){return this.calcIntersect(t,u)},s}g(up,"question");async function fp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?21:s??0,a=t.look==="neo"?12:s??0,{shapeSvg:n,bbox:l,label:c}=await at(e,t,ot(t)),h=(t?.width??l.width)+(t.look==="neo"?o*2:o),d=(t?.height??l.height)+(t.look==="neo"?a*2:a),f=-h/2,u=-d/2,p=u/2,m=[{x:f+p,y:u},{x:f,y:0},{x:f+p,y:-u},{x:-f,y:-u},{x:-f,y:u}],{cssStyles:y}=t,x=J.svg(n),b=tt(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=ut(m),S=x.path(k,b),v=n.insert(()=>S,":first-child");return v.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${-p/2},0)`),c.attr("transform",`translate(${-p/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),rt(t,v),t.intersect=function(_){return K.polygon(t,m,_)},n}g(fp,"rect_left_inv_arrow");async function gp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;let s;t.cssClasses?s="node "+t.cssClasses:s="node default";const o=e.insert("g").attr("class",s).attr("id",t.domId||t.id),a=o.insert("g"),n=o.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=await $e(n,c,t.labelStyle,!0,!0);let d={width:0,height:0};if(Pt(pt())){const T=h.children[0],M=ct(h);d=T.getBoundingClientRect(),M.attr("width",d.width),M.attr("height",d.height)}j.info("Text 2",l);const f=l||[],u=h.getBBox(),p=await $e(n,Array.isArray(f)?f.join("<br/>"):f,t.labelStyle,!0,!0),m=p.children[0],y=ct(p);d=m.getBoundingClientRect(),y.attr("width",d.width),y.attr("height",d.height);const x=(t.padding||0)/2;ct(p).attr("transform","translate( "+(d.width>u.width?0:(u.width-d.width)/2)+", "+(u.height+x+5)+")"),ct(h).attr("transform","translate( "+(d.width<u.width?0:-(u.width-d.width)/2)+", 0)"),d=n.node().getBBox(),n.attr("transform","translate("+-d.width/2+", "+(-d.height/2-x+3)+")");const b=d.width+(t.padding||0),k=d.height+(t.padding||0),S=-d.width/2-x,v=-d.height/2-x;let _,$;if(t.look==="handDrawn"){const T=J.svg(o),M=tt(t,{}),I=T.path(ze(S,v,b,k,t.rx||0),M),q=T.line(-d.width/2-x,-d.height/2-x+u.height+x,d.width/2+x,-d.height/2-x+u.height+x,M);$=o.insert(()=>(j.debug("Rough node insert CXC",I),q),":first-child"),_=o.insert(()=>(j.debug("Rough node insert CXC",I),I),":first-child")}else _=a.insert("rect",":first-child"),$=a.insert("line"),_.attr("class","outer title-state").attr("style",i).attr("x",-d.width/2-x).attr("y",-d.height/2-x).attr("width",d.width+(t.padding||0)).attr("height",d.height+(t.padding||0)),$.attr("class","divider").attr("x1",-d.width/2-x).attr("x2",d.width/2+x).attr("y1",-d.height/2-x+u.height+x).attr("y2",-d.height/2-x+u.height+x);return rt(t,_),t.intersect=function(T){return K.rect(t,T)},o}g(gp,"rectWithTitle");async function pp(e,t,{config:{themeVariables:r}}){const i=r?.radius??5,s={rx:i,ry:i,labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1};return Zr(e,t,s)}g(pp,"roundedRect");var He=8;async function mp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0,{shapeSvg:a,bbox:n,label:l}=await at(e,t,ot(t)),c=(t?.width??n.width)+s*2+(t.look==="neo"?He:He*2),h=(t?.height??n.height)+o*2,d=c-He,f=h,u=He-c/2,p=-h/2,{cssStyles:m}=t,y=J.svg(a),x=tt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=[{x:u,y:p},{x:u+d,y:p},{x:u+d,y:p+f},{x:u-He,y:p+f},{x:u-He,y:p},{x:u,y:p},{x:u,y:p+f}],k=y.polygon(b.map(v=>[v.x,v.y]),x),S=a.insert(()=>k,":first-child");return S.attr("class","basic label-container outer-path").attr("style",Lt(m)),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),m&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),l.attr("transform",`translate(${He/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),rt(t,S),t.intersect=function(v){return K.rect(t,v)},a}g(mp,"shadedProcess");async function yp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-o*2,10),t.height=Math.max((t?.height??0)/1.5-a*2,10));const{shapeSvg:n,bbox:l,label:c}=await at(e,t,ot(t)),h=(t?.width?t?.width:l.width)+o*2,d=((t?.height?t?.height:l.height)+a*2)*1.5,f=h,u=d/1.5,p=-f/2,m=-u/2,{cssStyles:y}=t,x=J.svg(n),b=tt(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=[{x:p,y:m},{x:p,y:m+u},{x:p+f,y:m+u},{x:p+f,y:m-u/2}],S=ut(k),v=x.path(S,b),_=n.insert(()=>v,":first-child");return _.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",y),i&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",i),_.attr("transform",`translate(0, ${u/4})`),c.attr("transform",`translate(${-f/2+(t.padding??0)-(l.x-(l.left??0))}, ${-u/4+(t.padding??0)-(l.y-(l.top??0))})`),rt(t,_),t.intersect=function($){return K.polygon(t,k,$)},n}g(yp,"slopedRect");async function xp(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,s=t.look==="neo"?12:r,o={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:s};return Zr(e,t,o)}g(xp,"squareRect");async function Cp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?20:s,a=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await at(e,t,ot(t)),c=l.height+(t.look==="neo"?a*2:a),h=l.width+c/4+(t.look==="neo"?o*2:o),d=c/2,{cssStyles:f}=t,u=J.svg(n),p=tt(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const m=[{x:-h/2+d,y:-c/2},{x:h/2-d,y:-c/2},...Mi(-h/2+d,0,d,50,90,270),{x:h/2-d,y:c/2},...Mi(h/2-d,0,d,50,270,450)],y=ut(m),x=u.path(y,p),b=n.insert(()=>x,":first-child");return b.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),rt(t,b),t.intersect=function(k){return K.polygon(t,m,k)},n}g(Cp,"stadium");async function bp(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return Zr(e,t,r)}g(bp,"state");function kp(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=et(t);t.labelStyle=i;const{cssStyles:o}=t,{lineColor:a,stateBorder:n,nodeBorder:l,nodeShadow:c}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const h=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),d=J.svg(h),f=tt(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const u=d.circle(0,0,t.width,{...f,stroke:a,strokeWidth:2}),p=n??l,m=(t.width??0)*5/14,y=d.circle(0,0,m,{...f,fill:p,stroke:p,strokeWidth:2,fillStyle:"solid"}),x=h.insert(()=>u,":first-child");if(x.insert(()=>y),t.look!=="handDrawn"&&x.attr("class","outer-path"),o&&x.selectAll("path").attr("style",o),s&&x.selectAll("path").attr("style",s),t.width<25&&c&&t.look!=="handDrawn"){const b=e.node()?.ownerSVGElement?.id??"",k=b?`${b}-drop-shadow-small`:"drop-shadow-small";x.attr("style",`filter:url(#${k})`)}return rt(t,x),t.intersect=function(b){return K.circle(t,(t.width??0)/2,b)},h}g(kp,"stateEnd");function wp(e,t,{config:{themeVariables:r}}){const{lineColor:i,nodeShadow:s}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const o=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let a;if(t.look==="handDrawn"){const l=J.svg(o).circle(0,0,t.width,X2(i));a=o.insert(()=>l),a.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else a=o.insert("circle",":first-child"),a.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&s&&t.look!=="handDrawn"){const n=e.node()?.ownerSVGElement?.id??"",l=n?`${n}-drop-shadow-small`:"drop-shadow-small";a.attr("style",`filter:url(#${l})`)}return rt(t,a),t.intersect=function(n){return K.circle(t,(t.width??7)/2,n)},o}g(wp,"stateStart");var hr=8;async function vp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t?.padding??8,o=t.look==="neo"?28:s,a=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await at(e,t,ot(t)),c=(t?.width??l.width)+2*hr+o,h=(t?.height??l.height)+a,d=c-2*hr,f=h,u=-c/2,p=-h/2,m=[{x:0,y:0},{x:d,y:0},{x:d,y:-f},{x:0,y:-f},{x:0,y:0},{x:-8,y:0},{x:d+8,y:0},{x:d+8,y:-f},{x:-8,y:-f},{x:-8,y:0}];if(t.look==="handDrawn"){const y=J.svg(n),x=tt(t,{}),b=y.rectangle(u,p,d+16,f,x),k=y.line(u+hr,p,u+hr,p+f,x),S=y.line(u+hr+d,p,u+hr+d,p+f,x);n.insert(()=>k,":first-child"),n.insert(()=>S,":first-child");const v=n.insert(()=>b,":first-child"),{cssStyles:_}=t;v.attr("class","basic label-container").attr("style",Lt(_)),rt(t,v)}else{const y=Ae(n,d,f,m);i&&y.attr("style",i),rt(t,y)}return t.intersect=function(y){return K.polygon(t,m,y)},n}g(vp,"subroutine");var Ro=.2;async function Sp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-a*2,10),t.width=Math.max((t?.width??0)-o*2-Ro*(t.height+a*2),10));const{shapeSvg:n,bbox:l}=await at(e,t,ot(t)),c=(t?.height?t?.height:l.height)+a*2,h=Ro*c,d=Ro*c,u=(t?.width?t?.width:l.width)+o*2+h-h,p=c,m=-u/2,y=-p/2,{cssStyles:x}=t,b=J.svg(n),k=tt(t,{}),S=[{x:m-h/2,y},{x:m+u+h/2,y},{x:m+u+h/2,y:y+p},{x:m-h/2,y:y+p}],v=[{x:m+u-h/2,y:y+p},{x:m+u+h/2,y:y+p},{x:m+u+h/2,y:y+p-d}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const _=ut(S),$=b.path(_,k),T=ut(v),M=b.path(T,{...k,fillStyle:"solid"}),I=n.insert(()=>M,":first-child");return I.insert(()=>$,":first-child"),I.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",x),i&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",i),rt(t,I),t.intersect=function(q){return K.polygon(t,S,q)},n}g(Sp,"taggedRect");async function Tp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await at(e,t,ot(t)),n=Math.max(o.width+(t.padding??0)*2,t?.width??0),l=Math.max(o.height+(t.padding??0)*2,t?.height??0),c=l/8,h=.2*n,d=.2*l,f=l+c,{cssStyles:u}=t,p=J.svg(s),m=tt(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-n/2-n/2*.1,y:f/2},...qe(-n/2-n/2*.1,f/2,n/2+n/2*.1,f/2,c,.8),{x:n/2+n/2*.1,y:-f/2},{x:-n/2-n/2*.1,y:-f/2}],x=-n/2+n/2*.1,b=-f/2-d*.4,k=[{x:x+n-h,y:(b+l)*1.3},{x:x+n,y:b+l-d},{x:x+n,y:(b+l)*.9},...qe(x+n,(b+l)*1.25,x+n-h,(b+l)*1.3,-l*.02,.5)],S=ut(y),v=p.path(S,m),_=ut(k),$=p.path(_,{...m,fillStyle:"solid"}),T=s.insert(()=>$,":first-child");return T.insert(()=>v,":first-child"),T.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(0,${-c/2})`),a.attr("transform",`translate(${-n/2+(t.padding??0)-(o.x-(o.left??0))},${-l/2+(t.padding??0)-c/2-(o.y-(o.top??0))})`),rt(t,T),t.intersect=function(M){return K.polygon(t,y,M)},s}g(Tp,"taggedWaveEdgedRectangle");async function _p(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const{shapeSvg:s,bbox:o}=await at(e,t,ot(t)),a=Math.max(o.width+(t.padding??0),t?.width||0),n=Math.max(o.height+(t.padding??0),t?.height||0),l=-a/2,c=-n/2,h=s.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",a).attr("height",n),rt(t,h),t.intersect=function(d){return K.rect(t,d)},s}g(_p,"text");var Ov=g((e,t,r,i,s,o)=>`M${e},${t}
|
|
230
|
+
a${s},${o} 0,0,1 0,${-i}
|
|
231
|
+
l${r},0
|
|
232
|
+
a${s},${o} 0,0,1 0,${i}
|
|
233
|
+
M${r},${-i}
|
|
234
|
+
a${s},${o} 0,0,0 0,${i}
|
|
235
|
+
l${-r},0`,"createCylinderPathD"),Rv=g((e,t,r,i,s,o)=>[`M${e},${t}`,`M${e+r},${t}`,`a${s},${o} 0,0,0 0,${-i}`,`l${-r},0`,`a${s},${o} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),Dv=g((e,t,r,i,s,o)=>[`M${e+r/2},${-i/2}`,`a${s},${o} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),Sh=5,Th=10;async function Bp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?12:s/2;if(t.width||t.height){const m=t.height??0;t.height=(t.height??0)-o,t.height<Sh&&(t.height=Sh);const x=m/2/(2.5+m/50);t.width=(t.width??0)-o-x*3,t.width<Th&&(t.width=Th)}const{shapeSvg:a,bbox:n,label:l}=await at(e,t,ot(t)),c=(t.height?t.height:n.height)+o,h=c/2,d=h/(2.5+c/50),f=(t.width?t.width:n.width)+d+o,{cssStyles:u}=t;let p;if(t.look==="handDrawn"){const m=J.svg(a),y=Rv(0,0,f,c,d,h),x=Dv(0,0,f,c,d,h),b=m.path(y,tt(t,{})),k=m.path(x,tt(t,{fill:"none"}));p=a.insert(()=>k,":first-child"),p=a.insert(()=>b,":first-child"),p.attr("class","basic label-container"),u&&p.attr("style",u)}else{const m=Ov(0,0,f,c,d,h);p=a.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",Lt(u)).attr("style",i),p.attr("class","basic label-container outer-path"),u&&p.selectAll("path").attr("style",u),i&&p.selectAll("path").attr("style",i)}return p.attr("label-offset-x",d),p.attr("transform",`translate(${-f/2}, ${c/2} )`),l.attr("transform",`translate(${-(n.width/2)-d-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),rt(t,p),t.intersect=function(m){const y=K.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-d)){let b=d*d*(1-x*x/(h*h));b!=0&&(b=Math.sqrt(Math.abs(b))),b=d-b,m.x-(t.x??0)>0&&(b=-b),y.x+=b}return y},a}g(Bp,"tiltedCylinder");async function Lp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=(t.look==="neo",s),a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await at(e,t,ot(t)),c=(t?.height??l.height)+o,h=(t?.width??l.width)+a,d=[{x:-3*c/6,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:0,y:-c}];let f;const{cssStyles:u}=t;if(t.look==="handDrawn"){const p=J.svg(n),m=tt(t,{}),y=ut(d),x=p.path(y,m);f=n.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),u&&f.attr("style",u)}else f=Ae(n,h,c,d);return i&&f.attr("style",i),t.width=h,t.height=c,rt(t,f),t.intersect=function(p){return K.polygon(t,d,p)},n}g(Lp,"trapezoid");async function Fp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=15,l=5;(t.width||t.height)&&(t.height=(t.height??0)-a*2,t.height<l&&(t.height=l),t.width=(t.width??0)-o*2,t.width<n&&(t.width=n));const{shapeSvg:c,bbox:h}=await at(e,t,ot(t)),d=(t?.width?t?.width:h.width)+o*2,f=(t?.height?t?.height:h.height)+a*2,{cssStyles:u}=t,p=J.svg(c),m=tt(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-d/2*.8,y:-f/2},{x:d/2*.8,y:-f/2},{x:d/2,y:-f/2*.6},{x:d/2,y:f/2},{x:-d/2,y:f/2},{x:-d/2,y:-f/2*.6}],x=ut(y),b=p.path(x,m),k=c.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),rt(t,k),t.intersect=function(S){return K.polygon(t,y,S)},c}g(Fp,"trapezoidalPentagon");var _h=10,Bh=10;async function Mp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.width=((t?.width??0)-o)/2,t.width<Bh&&(t.width=Bh),t.height=t?.height??0,t.height<_h&&(t.height=_h));const{shapeSvg:a,bbox:n,label:l}=await at(e,t,ot(t)),c=Me(pt().flowchart?.htmlLabels),h=(t?.width?t?.width:n.width)+o,d=t?.height?t?.height:h+n.height,f=d,u=[{x:0,y:0},{x:f,y:0},{x:f/2,y:-d}],{cssStyles:p}=t,m=J.svg(a),y=tt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=ut(u),b=m.path(x,y),k=a.insert(()=>b,":first-child").attr("transform",`translate(${-d/2}, ${d/2})`).attr("class","outer-path");return p&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",p),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=h,t.height=d,rt(t,k),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${d/2-(n.height+(t.padding??0)/(c?2:1)-(n.y-(n.top??0)))})`),t.intersect=function(S){return j.info("Triangle intersect",t,u,S),K.polygon(t,u,S)},a}g(Mp,"triangle");async function Ap(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;let n=!0;(t.width||t.height)&&(n=!1,t.width=(t?.width??0)-o*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-a*2,t.height<10&&(t.height=10));const{shapeSvg:l,bbox:c,label:h}=await at(e,t,ot(t)),d=(t?.width?t?.width:c.width)+(o??0)*2,f=(t?.height?t?.height:c.height)+(a??0)*2,u=t.look==="neo"?f/4:f/8,p=f+(n?u:-u),{cssStyles:m}=t,x=14-d,b=x>0?x/2:0,k=J.svg(l),S=tt(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const v=[{x:-d/2-b,y:p/2},...qe(-d/2-b,p/2,d/2+b,p/2,u,.8),{x:d/2+b,y:-p/2},{x:-d/2-b,y:-p/2}],_=ut(v),$=k.path(_,S),T=l.insert(()=>$,":first-child");return T.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(0,${-u/2})`),h.attr("transform",`translate(${-d/2+(t.padding??0)-(c.x-(c.left??0))},${-f/2+(t.padding??0)-u-(c.y-(c.top??0))})`),rt(t,T),t.intersect=function(M){return K.polygon(t,v,M)},l}g(Ap,"waveEdgedRectangle");async function Ep(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?20:s;if(t.width||t.height){t.width=t?.width??0,t.width<20&&(t.width=20),t.height=t?.height??0,t.height<10&&(t.height=10);const S=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-a-S*(20/9)),t.width=t.width-o*2}const{shapeSvg:n,bbox:l}=await at(e,t,ot(t)),c=(t?.width?t?.width:l.width)+o*2,h=(t?.height?t?.height:l.height)+a,d=h/8,f=h+d*2,{cssStyles:u}=t,p=J.svg(n),m=tt(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-c/2,y:f/2},...qe(-c/2,f/2,c/2,f/2,d,1),{x:c/2,y:-f/2},...qe(c/2,-f/2,-c/2,-f/2,d,-1)],x=ut(y),b=p.path(x,m),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),rt(t,k),t.intersect=function(S){return K.polygon(t,y,S)},n}g(Ep,"waveRectangle");var bt=10;async function $p(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-s*2-bt,10),t.height=Math.max((t?.height??0)-o*2-bt,10));const{shapeSvg:a,bbox:n,label:l}=await at(e,t,ot(t)),c=(t?.width?t?.width:n.width)+s*2+bt,h=(t?.height?t?.height:n.height)+o*2+bt,d=c-bt,f=h-bt,u=-d/2,p=-f/2,{cssStyles:m}=t,y=J.svg(a),x=tt(t,{}),b=[{x:u-bt,y:p-bt},{x:u-bt,y:p+f},{x:u+d,y:p+f},{x:u+d,y:p-bt}],k=`M${u-bt},${p-bt} L${u+d},${p-bt} L${u+d},${p+f} L${u-bt},${p+f} L${u-bt},${p-bt}
|
|
236
|
+
M${u-bt},${p} L${u+d},${p}
|
|
237
|
+
M${u},${p-bt} L${u},${p+f}`;t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const S=y.path(k,x),v=a.insert(()=>S,":first-child");return v.attr("transform",`translate(${bt/2}, ${bt/2})`),v.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(n.width/2)+bt/2-(n.x-(n.left??0))}, ${-(n.height/2)+bt/2-(n.y-(n.top??0))})`),rt(t,v),t.intersect=function(_){return K.polygon(t,b,_)},a}g($p,"windowPane");var Lh=new Set(["redux-color","redux-dark-color"]),Nv=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function tl(e,t){const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:s}=Ct(),{rowEven:o,rowOdd:a,nodeBorder:n,borderColorArray:l}=s;if(t.look==="handDrawn"){const{themeVariables:Q}=Ct(),{background:Z}=Q,st={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${Z}`]};await tl(e,st)}const c=Ct();t.useHtmlLabels=c.htmlLabels;let h=c.er?.diagramPadding??10,d=c.er?.entityPadding??6;const{cssStyles:f}=t,{labelStyles:u,nodeStyles:p}=et(t);if(r.attributes.length===0&&t.label){const Q={rx:0,ry:0,labelPaddingX:h,labelPaddingY:h*1.5};pe(t.label,c)+Q.labelPaddingX*2<c.er.minEntityWidth&&(t.width=c.er.minEntityWidth);const Z=await Zr(e,t,Q);if(i!=null&&Lh.has(i)){const st=r.colorIndex??0;Z.attr("data-color-id",`color-${st%l.length}`)}if(!Me(c.htmlLabels)){const st=Z.select("text"),ft=st.node()?.getBBox();st.attr("transform",`translate(${-ft.width/2}, 0)`)}return Z}c.htmlLabels||(h*=1.25,d*=1.25);let m=ot(t);m||(m="node default");const y=e.insert("g").attr("class",m).attr("id",t.domId||t.id),x=await ur(y,t.label??"",c,0,0,["name"],u);x.height+=d;let b=0;const k=[],S=[];let v=0,_=0,$=0,T=0,M=!0,I=!0;for(const Q of r.attributes){const Z=await ur(y,Q.type,c,0,b,["attribute-type"],u);v=Math.max(v,Z.width+h);const st=await ur(y,Q.name,c,0,b,["attribute-name"],u);_=Math.max(_,st.width+h);const ft=await ur(y,Q.keys.join(),c,0,b,["attribute-keys"],u);$=Math.max($,ft.width+h);const dt=await ur(y,Q.comment,c,0,b,["attribute-comment"],u);T=Math.max(T,dt.width+h);const gt=Math.max(Z.height,st.height,ft.height,dt.height)+d;S.push({yOffset:b,rowHeight:gt}),b+=gt}let q=4;$<=h&&(M=!1,$=0,q--),T<=h&&(I=!1,T=0,q--);const X=y.node().getBBox();if(x.width+h*2-(v+_+$+T)>0){const Q=x.width+h*2-(v+_+$+T);v+=Q/q,_+=Q/q,$>0&&($+=Q/q),T>0&&(T+=Q/q)}const Y=v+_+$+T,D=J.svg(y),A=tt(t,{});t.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");let F=0;S.length>0&&(F=S.reduce((Q,Z)=>Q+(Z?.rowHeight??0),0));const P=Math.max(X.width+h*2,t?.width||0,Y),z=Math.max((F??0)+x.height,t?.height||0),E=-P/2,N=-z/2;if(y.selectAll("g:not(:first-child)").each((Q,Z,st)=>{const ft=ct(st[Z]),dt=ft.attr("transform");let gt=0,Bt=0;if(dt){const Yt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(dt);Yt&&(gt=parseFloat(Yt[1]),Bt=parseFloat(Yt[2]),ft.attr("class").includes("attribute-name")?gt+=v:ft.attr("class").includes("attribute-keys")?gt+=v+_:ft.attr("class").includes("attribute-comment")&&(gt+=v+_+$))}ft.attr("transform",`translate(${E+h/2+gt}, ${Bt+N+x.height+d/2})`)}),y.select(".name").attr("transform","translate("+-x.width/2+", "+(N+d/2)+")"),i!=null&&Lh.has(i)){const Q=r.colorIndex??0;y.attr("data-color-id",`color-${Q%l.length}`)}const B=D.rectangle(E,N,P,z,A),U=y.insert(()=>B,":first-child").attr("class","outer-path").attr("style",f.join(""));k.push(0);for(const[Q,Z]of S.entries()){const ft=(Q+1)%2===0&&Z.yOffset!==0,dt=D.rectangle(E,x.height+N+Z?.yOffset,P,Z?.rowHeight,{...A,fill:ft?o:a,stroke:n});y.insert(()=>dt,"g.label").attr("style",f.join("")).attr("class",`row-rect-${ft?"even":"odd"}`)}const W=1e-4;let G=fr(E,x.height+N,P+E,x.height+N,W),V=D.polygon(G.map(Q=>[Q.x,Q.y]),A);if(y.insert(()=>V).attr("class","divider"),G=fr(v+E,x.height+N,v+E,z+N,W),V=D.polygon(G.map(Q=>[Q.x,Q.y]),A),y.insert(()=>V).attr("class","divider"),M){const Q=v+_+E;G=fr(Q,x.height+N,Q,z+N,W),V=D.polygon(G.map(Z=>[Z.x,Z.y]),A),y.insert(()=>V).attr("class","divider")}if(I){const Q=v+_+$+E;G=fr(Q,x.height+N,Q,z+N,W),V=D.polygon(G.map(Z=>[Z.x,Z.y]),A),y.insert(()=>V).attr("class","divider")}for(const Q of k){const Z=x.height+N+Q;G=fr(E,Z,P+E,Z,W),V=D.polygon(G.map(st=>[st.x,st.y]),A),y.insert(()=>V).attr("class","divider")}if(rt(t,U),p&&t.look!=="handDrawn")if(i!=null&&Nv.has(i))y.selectAll("path").attr("style",p);else{const Z=p.split(";")?.filter(st=>st.includes("stroke"))?.map(st=>`${st}`).join("; ");y.selectAll("path").attr("style",Z??""),y.selectAll(".row-rect-even path").attr("style",p)}return t.intersect=function(Q){return K.rect(t,Q)},y}g(tl,"erBox");async function ur(e,t,r,i=0,s=0,o=[],a=""){const n=e.insert("g").attr("class",`label ${o.join(" ")}`).attr("transform",`translate(${i}, ${s})`).attr("style",a);t!==Ho(t)&&(t=Ho(t),t=t.replaceAll("<","<").replaceAll(">",">"));const l=n.node().appendChild(await Ce(n,t,{width:pe(t,r)+100,style:a,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(Me(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const d=ct(l);c=h.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}return c}g(ur,"addText");function fr(e,t,r,i,s){return e===r?[{x:e-s/2,y:t},{x:e+s/2,y:t},{x:r+s/2,y:i},{x:r-s/2,y:i}]:[{x:e,y:t-s/2},{x:e,y:t+s/2},{x:r,y:i+s/2},{x:r,y:i-s/2}]}g(fr,"lineToPolygon");async function Ip(e,t,r,i,s=r.class.padding??12){const o=i?0:3,a=e.insert("g").attr("class",ot(t)).attr("id",t.domId||t.id);let n=null,l=null,c=null,h=null,d=0,f=0,u=0;if(n=a.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await fi(n,{text:`«${b}»`},0),d=n.node().getBBox().height}l=a.insert("g").attr("class","label-group text"),await fi(l,t,0,["font-weight: bolder"]);const p=l.node().getBBox();f=p.height,c=a.insert("g").attr("class","members-group text");let m=0;for(const b of t.members){const k=await fi(c,b,m,[b.parseClassifier()]);m+=k+o}u=c.node().getBBox().height,u<=0&&(u=s/2),h=a.insert("g").attr("class","methods-group text");let y=0;for(const b of t.methods){const k=await fi(h,b,y,[b.parseClassifier()]);y+=k+o}let x=a.node().getBBox();if(n!==null){const b=n.node().getBBox();n.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-p.width/2}, ${d})`),x=a.node().getBBox(),c.attr("transform",`translate(0, ${d+f+s*2})`),x=a.node().getBBox(),h.attr("transform",`translate(0, ${d+f+(u?u+s*4:s*2)})`),x=a.node().getBBox(),{shapeSvg:a,bbox:x}}g(Ip,"textHelper");async function fi(e,t,r,i=[]){const s=e.insert("g").attr("class","label").attr("style",i.join("; ")),o=Ct();let a="useHtmlLabels"in t?t.useHtmlLabels:Me(o.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!a&&n.startsWith("\\")&&(n=n.substring(1)),Or(n)&&(a=!0);const l=await Ce(s,nn(De(n)),{width:pe(n,o)+50,classes:"markdown-node-label",useHtmlLabels:a},o);let c,h=1;if(a){const d=l.children[0],f=ct(l);h=d.innerHTML.split("<br>").length,d.innerHTML.includes("</math>")&&(h+=d.innerHTML.split("<mrow>").length-1);const u=d.getElementsByTagName("img");if(u){const p=n.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...u].map(m=>new Promise(y=>{function x(){if(m.style.display="flex",m.style.flexDirection="column",p){const b=o.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,S=parseInt(b,10)*5+"px";m.style.minWidth=S,m.style.maxWidth=S}else m.style.width="100%";y(m)}g(x,"setupImage"),setTimeout(()=>{m.complete&&x()}),m.addEventListener("error",x),m.addEventListener("load",x)})))}c=d.getBoundingClientRect(),f.attr("width",c.width),f.attr("height",c.height)}else{i.includes("font-weight: bolder")&&ct(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;const d=l.children[0];(l.textContent===""||l.textContent.includes(">"))&&(d.textContent=n[0]+n.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),n[1]===" "&&(d.textContent=d.textContent[0]+" "+d.textContent.substring(1))),d.textContent==="undefined"&&(d.textContent=""),c=l.getBBox()}return s.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}g(fi,"addText");async function Pp(e,t){const r=pt(),{themeVariables:i}=r,{useGradient:s}=i,o=r.class.padding??12,a=o,n=t.useHtmlLabels??Me(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:c,bbox:h}=await Ip(e,t,r,n,a),{labelStyles:d,nodeStyles:f}=et(t);t.labelStyle=d,t.cssStyles=l.styles||"";const u=l.styles?.join(";")||f||"";t.cssStyles||(t.cssStyles=u.replaceAll("!important","").split(";"));const p=l.members.length===0&&l.methods.length===0&&!r.class?.hideEmptyMembersBox,m=J.svg(c),y=tt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=Math.max(t.width??0,h.width);let b=Math.max(t.height??0,h.height);const k=(t.height??0)>h.height;l.members.length===0&&l.methods.length===0?b+=a:l.members.length>0&&l.methods.length===0&&(b+=a*2);const S=-x/2,v=-b/2;let _=p?o*2:l.members.length===0&&l.methods.length===0?-o:0;k&&(_=o*2);const $=m.rectangle(S-o,v-o-(p?o:l.members.length===0&&l.methods.length===0?-o/2:0),x+2*o,b+2*o+_,y),T=c.insert(()=>$,":first-child");T.attr("class","basic label-container outer-path");const M=T.node().getBBox(),I=c.select(".annotation-group").node().getBBox().height-(p?o/2:0)||0,q=c.select(".label-group").node().getBBox().height-(p?o/2:0)||0,X=c.select(".members-group").node().getBBox().height-(p?o/2:0)||0,Y=(I+q+v+o-(v-o-(p?o:l.members.length===0&&l.methods.length===0?-o/2:0)))/2;if(c.selectAll(".text").each((D,A,F)=>{const P=ct(F[A]),z=P.attr("transform");let E=0;if(z){const W=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(z);W&&(E=parseFloat(W[2]))}let N=E+v+o-(p?o:l.members.length===0&&l.methods.length===0?-o/2:0);if(P.attr("class").includes("methods-group")){const U=Math.max(X,a/2);k?N=Math.max(Y,I+q+U+v+a*2+o)+a*2:N=I+q+U+v+a*4+o}l.members.length===0&&l.methods.length===0&&r.class?.hideEmptyMembersBox&&(l.annotations.length>0?N=E-a:N=E),n||(N-=4);let B=S;(P.attr("class").includes("label-group")||P.attr("class").includes("annotation-group"))&&(B=-P.node()?.getBBox().width/2||0,c.selectAll("text").each(function(U,W,G){window.getComputedStyle(G[W]).textAnchor==="middle"&&(B=0)})),P.attr("transform",`translate(${B}, ${N})`)}),l.members.length>0||l.methods.length>0||p){const D=I+q+v+o,A=m.line(M.x,D,M.x+M.width,D+.001,y);c.insert(()=>A).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",u)}if(p||l.members.length>0||l.methods.length>0){const D=I+q+X+v+a*2+o,A=m.line(M.x,k?Math.max(Y,D):D,M.x+M.width,(k?Math.max(Y,D):D)+.001,y);c.insert(()=>A).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",u)}if(l.look!=="handDrawn"&&c.selectAll("path").attr("style",u),T.select(":nth-child(2)").attr("style",u),c.selectAll(".divider").select("path").attr("style",u),t.labelStyle?c.selectAll("span").attr("style",t.labelStyle):c.selectAll("span").attr("style",u),!n){const D=RegExp(/color\s*:\s*([^;]*)/),A=D.exec(u);if(A){const F=A[0].replace("color","fill");c.selectAll("tspan").attr("style",F)}else if(d){const F=D.exec(d);if(F){const P=F[0].replace("color","fill");c.selectAll("tspan").attr("style",P)}}}return rt(t,T),t.intersect=function(D){return K.rect(t,D)},c}g(Pp,"classBox");async function Op(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t,o=t,a=20,n=20,l="verifyMethod"in t,c=ot(t),{themeVariables:h}=pt(),{borderColorArray:d,requirementEdgeLabelBackground:f}=h,u=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let p;l?p=await ce(u,`<<${s.type}>>`,0,t.labelStyle):p=await ce(u,"<<Element>>",0,t.labelStyle);let m=p;const y=await ce(u,s.name,m,t.labelStyle+"; font-weight: bold;");if(m+=y+n,l){const M=await ce(u,`${s.requirementId?`ID: ${s.requirementId}`:""}`,m,t.labelStyle);m+=M;const I=await ce(u,`${s.text?`Text: ${s.text}`:""}`,m,t.labelStyle);m+=I;const q=await ce(u,`${s.risk?`Risk: ${s.risk}`:""}`,m,t.labelStyle);m+=q,await ce(u,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,m,t.labelStyle)}else{const M=await ce(u,`${o.type?`Type: ${o.type}`:""}`,m,t.labelStyle);m+=M,await ce(u,`${o.docRef?`Doc Ref: ${o.docRef}`:""}`,m,t.labelStyle)}const x=(u.node()?.getBBox().width??200)+a,b=(u.node()?.getBBox().height??200)+a,k=-x/2,S=-b/2,v=J.svg(u),_=tt(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const $=v.rectangle(k,S,x,b,_),T=u.insert(()=>$,":first-child");if(T.attr("class","basic label-container outer-path").attr("style",i),d?.length){const M=t.colorIndex??0;u.attr("data-color-id",`color-${M%d.length}`)}if(u.selectAll(".label").each((M,I,q)=>{const X=ct(q[I]),Y=X.attr("transform");let D=0,A=0;if(Y){const E=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Y);E&&(D=parseFloat(E[1]),A=parseFloat(E[2]))}const F=A-b/2;let P=k+a/2;(I===0||I===1)&&(P=D),X.attr("transform",`translate(${P}, ${F+a})`)}),m>p+y+n){const M=S+p+y+n;let I;if(t.look==="neo"){const Y=[[k,M],[k+x,M],[k+x,M+.001],[k,M+.001]];I=v.polygon(Y,_)}else I=v.line(k,M,k+x,M,_);u.insert(()=>I).attr("class","divider")}return rt(t,T),t.intersect=function(M){return K.rect(t,M)},i&&t.look!=="handDrawn"&&(f||d?.length)&&u.selectAll("path").attr("style",i),u}g(Op,"requirementBox");async function ce(e,t,r,i=""){if(t==="")return 0;const s=e.insert("g").attr("class","label").attr("style",i),o=pt(),a=o.htmlLabels??!0,n=await Ce(s,nn(De(t)),{width:pe(t,o)+50,classes:"markdown-node-label",useHtmlLabels:a,style:i},o);let l;if(a){const c=n.children[0],h=ct(n);l=c.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)}else{const c=n.children[0];for(const h of c.children)i&&h.setAttribute("style",i);l=n.getBBox(),l.height+=6}return s.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}g(ce,"addText");var qv=g(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 Rp(e,t,{config:r}){const{labelStyles:i,nodeStyles:s}=et(t);t.labelStyle=i||"";const o=10,a=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:l,label:c}=await at(e,t,ot(t)),h=t.padding||10;let d="",f;"ticket"in t&&t.ticket&&r?.kanban?.ticketBaseUrl&&(d=r?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),f=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",d).attr("target","_blank"));const u={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let p,m;f?{label:p,bbox:m}=await Oo(f,"ticket"in t&&t.ticket||"",u):{label:p,bbox:m}=await Oo(n,"ticket"in t&&t.ticket||"",u);const{label:y,bbox:x}=await Oo(n,"assigned"in t&&t.assigned||"",u);t.width=a;const b=10,k=t?.width||0,S=Math.max(m.height,x.height)/2,v=Math.max(l.height+b*2,t?.height||0)+S,_=-k/2,$=-v/2;c.attr("transform","translate("+(h-k/2)+", "+(-S-l.height/2)+")"),p.attr("transform","translate("+(h-k/2)+", "+(-S+l.height/2)+")"),y.attr("transform","translate("+(h+k/2-x.width-2*o)+", "+(-S+l.height/2)+")");let T;const{rx:M,ry:I}=t,{cssStyles:q}=t;if(t.look==="handDrawn"){const X=J.svg(n),Y=tt(t,{}),D=M||I?X.path(ze(_,$,k,v,M||0),Y):X.rectangle(_,$,k,v,Y);T=n.insert(()=>D,":first-child"),T.attr("class","basic label-container").attr("style",q||null)}else{T=n.insert("rect",":first-child"),T.attr("class","basic label-container __APA__").attr("style",s).attr("rx",M??5).attr("ry",I??5).attr("x",_).attr("y",$).attr("width",k).attr("height",v);const X="priority"in t&&t.priority;if(X){const Y=n.append("line"),D=_+2,A=$+Math.floor((M??0)/2),F=$+v-Math.floor((M??0)/2);Y.attr("x1",D).attr("y1",A).attr("x2",D).attr("y2",F).attr("stroke-width","4").attr("stroke",qv(X))}}return rt(t,T),t.height=v,t.intersect=function(X){return K.rect(t,X)},n}g(Rp,"kanbanItem");async function Dp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:a,label:n}=await at(e,t,ot(t)),l=o.width+10*a,c=o.height+8*a,h=.15*l,{cssStyles:d}=t,f=o.width+20,u=o.height+20,p=Math.max(l,f),m=Math.max(c,u);n.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`);let y;const x=`M0 0
|
|
238
|
+
a${h},${h} 1 0,0 ${p*.25},${-1*m*.1}
|
|
239
|
+
a${h},${h} 1 0,0 ${p*.25},0
|
|
240
|
+
a${h},${h} 1 0,0 ${p*.25},0
|
|
241
|
+
a${h},${h} 1 0,0 ${p*.25},${m*.1}
|
|
242
|
+
|
|
243
|
+
a${h},${h} 1 0,0 ${p*.15},${m*.33}
|
|
244
|
+
a${h*.8},${h*.8} 1 0,0 0,${m*.34}
|
|
245
|
+
a${h},${h} 1 0,0 ${-1*p*.15},${m*.33}
|
|
246
|
+
|
|
247
|
+
a${h},${h} 1 0,0 ${-1*p*.25},${m*.15}
|
|
248
|
+
a${h},${h} 1 0,0 ${-1*p*.25},0
|
|
249
|
+
a${h},${h} 1 0,0 ${-1*p*.25},0
|
|
250
|
+
a${h},${h} 1 0,0 ${-1*p*.25},${-1*m*.15}
|
|
251
|
+
|
|
252
|
+
a${h},${h} 1 0,0 ${-1*p*.1},${-1*m*.33}
|
|
253
|
+
a${h*.8},${h*.8} 1 0,0 0,${-1*m*.34}
|
|
254
|
+
a${h},${h} 1 0,0 ${p*.1},${-1*m*.33}
|
|
255
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const b=J.svg(s),k=tt(t,{}),S=b.path(x,k);y=s.insert(()=>S,":first-child"),y.attr("class","basic label-container").attr("style",Lt(d))}else y=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return y.attr("transform",`translate(${-p/2}, ${-m/2})`),rt(t,y),t.calcIntersect=function(b,k){return K.rect(b,k)},t.intersect=function(b){return j.info("Bang intersect",t,b),K.rect(t,b)},s}g(Dp,"bang");async function Np(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:a,label:n}=await at(e,t,ot(t)),l=o.width+2*a,c=o.height+2*a,h=.15*l,d=.25*l,f=.35*l,u=.2*l,{cssStyles:p}=t;let m;const y=`M0 0
|
|
256
|
+
a${h},${h} 0 0,1 ${l*.25},${-1*l*.1}
|
|
257
|
+
a${f},${f} 1 0,1 ${l*.4},${-1*l*.1}
|
|
258
|
+
a${d},${d} 1 0,1 ${l*.35},${l*.2}
|
|
259
|
+
|
|
260
|
+
a${h},${h} 1 0,1 ${l*.15},${c*.35}
|
|
261
|
+
a${u},${u} 1 0,1 ${-1*l*.15},${c*.65}
|
|
262
|
+
|
|
263
|
+
a${d},${h} 1 0,1 ${-1*l*.25},${l*.15}
|
|
264
|
+
a${f},${f} 1 0,1 ${-1*l*.5},0
|
|
265
|
+
a${h},${h} 1 0,1 ${-1*l*.25},${-1*l*.15}
|
|
266
|
+
|
|
267
|
+
a${h},${h} 1 0,1 ${-1*l*.1},${-1*c*.35}
|
|
268
|
+
a${u},${u} 1 0,1 ${l*.1},${-1*c*.65}
|
|
269
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const x=J.svg(s),b=tt(t,{}),k=x.path(y,b);m=s.insert(()=>k,":first-child"),m.attr("class","basic label-container").attr("style",Lt(p))}else m=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",y);return n.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),m.attr("transform",`translate(${-l/2}, ${-c/2})`),rt(t,m),t.calcIntersect=function(x,b){return K.rect(x,b)},t.intersect=function(x){return j.info("Cloud intersect",t,x),K.rect(t,x)},s}g(Np,"cloud");async function qp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:a,label:n}=await at(e,t,ot(t)),l=o.width+8*a,c=o.height+2*a,h=5,d=t.look==="neo"?`
|
|
270
|
+
M${-l/2} ${c/2-h}
|
|
271
|
+
v${-c+2*h}
|
|
272
|
+
q0,-${h} ${h},-${h}
|
|
273
|
+
h${l-2*h}
|
|
274
|
+
q${h},0 ${h},${h}
|
|
275
|
+
v${c-h}
|
|
276
|
+
H${-l/2}
|
|
277
|
+
Z
|
|
278
|
+
`:`
|
|
279
|
+
M${-l/2} ${c/2-h}
|
|
280
|
+
v${-c+2*h}
|
|
281
|
+
q0,-${h} ${h},-${h}
|
|
282
|
+
h${l-2*h}
|
|
283
|
+
q${h},0 ${h},${h}
|
|
284
|
+
v${c-2*h}
|
|
285
|
+
q0,${h} ${-h},${h}
|
|
286
|
+
h${-(l-2*h)}
|
|
287
|
+
q${-h},0 ${-h},${-h}
|
|
288
|
+
Z
|
|
289
|
+
`;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const f=s.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",d);return s.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),n.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),s.append(()=>n.node()),rt(t,f),t.calcIntersect=function(u,p){return K.rect(u,p)},t.intersect=function(u){return K.rect(t,u)},s}g(qp,"defaultMindmapNode");async function zp(e,t){const r={padding:t.padding??0};return Jn(e,t,r)}g(zp,"mindmapCircle");var zv=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:xp},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:pp},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Cp},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:vp},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:zg},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:Wg},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Jn},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:Dp},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Np},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:up},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Vg},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:op},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:sp},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Lp},{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:rp},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Hg},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:_p},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:$g},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:mp},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:wp},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:kp},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Xg},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Zg},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Rg},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Dg},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Ng},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:ap},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Ap},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Gg},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Bp},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:np},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:qg},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:jg},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Mp},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:$p},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Yg},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Fp},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Ug},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:yp},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:cp},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:hp},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Eg},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Og},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Tp},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Sp},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Ep},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:fp},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:lp}],Wv=g(()=>{const t=[...Object.entries({state:bp,choice:Ig,note:dp,rectWithTitle:gp,labelRect:ip,iconSquare:tp,iconCircle:Qg,icon:Kg,iconRounded:Jg,imageSquare:ep,anchor:Mg,kanbanItem:Rp,mindmapCircle:zp,defaultMindmapNode:qp,classBox:Pp,erBox:tl,requirementBox:Op}),...zv.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(s=>[s,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Wp=Wv();function jp(e){return e in Wp}g(jp,"isValidShape");var mo=new Map;async function el(e,t,r){let i,s;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const o=t.shape?Wp[t.shape]:void 0;if(!o)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let a;r.config.securityLevel==="sandbox"?a="_top":t.linkTarget&&(a=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",a??null),s=await o(i,t,r)}else s=await o(e,t,r),i=s;return i.attr("data-look",Lt(t.look)),t.tooltip&&s.attr("title",t.tooltip),mo.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}g(el,"insertNode");var jv=g((e,t)=>{mo.set(t.id,e)},"setNodeElem"),Hv=g(()=>{mo.clear()},"clear"),Yv=g(e=>{const t=mo.get(e.id);j.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"),Uv=g((e,t,r,i,s,o=!1,a)=>{t.arrowTypeStart&&Fh(e,"start",t.arrowTypeStart,r,i,s,o,a),t.arrowTypeEnd&&Fh(e,"end",t.arrowTypeEnd,r,i,s,o,a)},"addEdgeMarkers"),Xv={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{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}},Gv=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],Fh=g((e,t,r,i,s,o,a=!1,n)=>{const l=Xv[r],c=l&&Gv.includes(l.type);if(!l){j.warn(`Unknown arrow type: ${r}`);return}const h=l.type,u=`${s}_${o}-${h}${t==="start"?"Start":"End"}${a&&c?"-margin":""}`;if(n&&n.trim()!==""){const p=n.replace(/[^\dA-Za-z]/g,"_"),m=`${u}_${p}`;if(!document.getElementById(m)){const y=document.getElementById(u);if(y){const x=y.cloneNode(!0);x.id=m,x.querySelectorAll("path, circle, line").forEach(k=>{k.setAttribute("stroke",n),l.fill&&k.setAttribute("fill",n)}),y.parentNode?.appendChild(x)}}e.attr(`marker-${t}`,`url(${i}#${m})`)}else e.attr(`marker-${t}`,`url(${i}#${u})`)},"addEdgeMarker"),Vv=g(e=>typeof e=="string"?e:pt()?.flowchart?.curve,"resolveEdgeCurveType"),Ys=new Map,Mt=new Map,Zv=g(()=>{Ys.clear(),Mt.clear()},"clear"),oi=g(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),Hp=g(async(e,t)=>{const r=pt();let i=Pt(r);const{labelStyles:s}=et(t);t.labelStyle=s;const o=e.insert("g").attr("class","edgeLabel"),a=o.insert("g").attr("class","label").attr("data-id",t.id),n=t.labelType==="markdown",c=await Ce(e,t.label,{style:oi(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:n?void 0:void 0},r);a.node().appendChild(c),j.info("abc82",t,t.labelType);let h=c.getBBox(),d=h;if(i){const u=c.children[0],p=ct(c);h=u.getBoundingClientRect(),d=h,p.attr("width",h.width),p.attr("height",h.height)}else{const u=ct(c).select("text").node();u&&typeof u.getBBox=="function"&&(d=u.getBBox())}a.attr("transform",dr(d,i)),Ys.set(t.id,o),t.width=h.width,t.height=h.height;let f;if(t.startLabelLeft){const u=e.insert("g").attr("class","edgeTerminals"),p=u.insert("g").attr("class","inner"),m=await $e(p,t.startLabelLeft,oi(t.labelStyle)||"",!1,!1);f=m;let y=m.getBBox();if(i){const x=m.children[0],b=ct(m);y=x.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}p.attr("transform",dr(y,i)),Mt.get(t.id)||Mt.set(t.id,{}),Mt.get(t.id).startLeft=u,gi(f,t.startLabelLeft)}if(t.startLabelRight){const u=e.insert("g").attr("class","edgeTerminals"),p=u.insert("g").attr("class","inner"),m=await $e(p,t.startLabelRight,oi(t.labelStyle)||"",!1,!1);f=m;let y=m.getBBox();if(i){const x=m.children[0],b=ct(m);y=x.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}p.attr("transform",dr(y,i)),Mt.get(t.id)||Mt.set(t.id,{}),Mt.get(t.id).startRight=u,gi(f,t.startLabelRight)}if(t.endLabelLeft){const u=e.insert("g").attr("class","edgeTerminals"),p=u.insert("g").attr("class","inner"),m=await $e(u,t.endLabelLeft,oi(t.labelStyle)||"",!1,!1);f=m;let y=m.getBBox();if(i){const x=m.children[0],b=ct(m);y=x.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}p.attr("transform",dr(y,i)),Mt.get(t.id)||Mt.set(t.id,{}),Mt.get(t.id).endLeft=u,gi(f,t.endLabelLeft)}if(t.endLabelRight){const u=e.insert("g").attr("class","edgeTerminals"),p=u.insert("g").attr("class","inner"),m=await $e(u,t.endLabelRight,oi(t.labelStyle)||"",!1,!1);f=m;let y=m.getBBox();if(i){const x=m.children[0],b=ct(m);y=x.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}p.attr("transform",dr(y,i)),Mt.get(t.id)||Mt.set(t.id,{}),Mt.get(t.id).endRight=u,gi(f,t.endLabelRight)}return c},"insertEdgeLabel");function gi(e,t){Pt(pt())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}g(gi,"setTerminalWidth");var Yp=g((e,t)=>{j.debug("Moving label abc88 ",e.id,e.label,Ys.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=pt(),{subGraphTitleTotalMargin:s}=ho(i);if(e.label){const o=Ys.get(e.id);let a=e.x,n=e.y;if(r){const l=Zt.calcLabelPosition(r);j.debug("Moving label "+e.label+" from (",a,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(a=l.x,n=l.y)}o.attr("transform",`translate(${a}, ${n+s/2})`)}if(e.startLabelLeft){const o=Mt.get(e.id).startLeft;let a=e.x,n=e.y;if(r){const l=Zt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.startLabelRight){const o=Mt.get(e.id).startRight;let a=e.x,n=e.y;if(r){const l=Zt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelLeft){const o=Mt.get(e.id).endLeft;let a=e.x,n=e.y;if(r){const l=Zt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelRight){const o=Mt.get(e.id).endRight;let a=e.x,n=e.y;if(r){const l=Zt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}},"positionEdgeLabel"),Kv=g((e,t)=>{const r=e.x,i=e.y,s=Math.abs(t.x-r),o=Math.abs(t.y-i),a=e.width/2,n=e.height/2;return s>=a||o>=n},"outsideNode"),Qv=g((e,t,r)=>{j.debug(`intersection calc abc89:
|
|
290
|
+
outsidePoint: ${JSON.stringify(t)}
|
|
291
|
+
insidePoint : ${JSON.stringify(r)}
|
|
292
|
+
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,s=e.y,o=Math.abs(i-r.x),a=e.width/2;let n=r.x<t.x?a-o:a+o;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(s-t.y)*a>Math.abs(i-t.x)*l){let d=r.y<t.y?t.y-l-s:s-l-t.y;n=h*d/c;const f={x:r.x<t.x?r.x+n:r.x-h+n,y:r.y<t.y?r.y+c-d:r.y-c+d};return n===0&&(f.x=t.x,f.y=t.y),h===0&&(f.x=t.x),c===0&&(f.y=t.y),j.debug(`abc89 top/bottom calc, Q ${c}, q ${d}, R ${h}, r ${n}`,f),f}else{r.x<t.x?n=t.x-a-i:n=i-a-t.x;let d=c*n/h,f=r.x<t.x?r.x+h-n:r.x-h+n,u=r.y<t.y?r.y+d:r.y-d;return j.debug(`sides calc abc89, Q ${c}, q ${d}, R ${h}, r ${n}`,{_x:f,_y:u}),n===0&&(f=t.x,u=t.y),h===0&&(f=t.x),c===0&&(u=t.y),{x:f,y:u}}},"intersection"),Mh=g((e,t)=>{j.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],s=!1;return e.forEach(o=>{if(j.info("abc88 checking point",o,t),!Kv(t,o)&&!s){const a=Qv(t,i,o);j.debug("abc88 inside",o,i,a),j.debug("abc88 intersection",a,t);let n=!1;r.forEach(l=>{n=n||l.x===a.x&&l.y===a.y}),r.some(l=>l.x===a.x&&l.y===a.y)?j.warn("abc88 no intersect",a,r):r.push(a),s=!0}else j.warn("abc88 outside",o,i),i=o,s||r.push(o)}),j.debug("returning points",r),r},"cutPathAtIntersect");function Up(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const s=e[i-1],o=e[i],a=e[i+1];(s.x===o.x&&o.y===a.y&&Math.abs(o.x-a.x)>5&&Math.abs(o.y-s.y)>5||s.y===o.y&&o.x===a.x&&Math.abs(o.x-s.x)>5&&Math.abs(o.y-a.y)>5)&&(t.push(o),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}g(Up,"extractCornerPoints");var Ah=g(function(e,t,r){const i=t.x-e.x,s=t.y-e.y,o=Math.sqrt(i*i+s*s),a=r/o;return{x:t.x-a*i,y:t.y-a*s}},"findAdjacentPoint"),Jv=g(function(e){const{cornerPointPositions:t}=Up(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const s=e[i-1],o=e[i+1],a=e[i],n=Ah(s,a,5),l=Ah(o,a,5),c=l.x-n.x,h=l.y-n.y;r.push(n);const d=Math.sqrt(2)*2;let f={x:a.x,y:a.y};if(Math.abs(o.x-s.x)>10&&Math.abs(o.y-s.y)>=10){j.debug("Corner point fixing",Math.abs(o.x-s.x),Math.abs(o.y-s.y));const u=5;a.x===n.x?f={x:c<0?n.x-u+d:n.x+u-d,y:h<0?n.y-d:n.y+d}:f={x:c<0?n.x-d:n.x+d,y:h<0?n.y-u+d:n.y+u-d}}else j.debug("Corner point skipping fixing",Math.abs(o.x-s.x),Math.abs(o.y-s.y));r.push(f,l)}else r.push(e[i]);return r},"fixCorners"),tS=g((e,t,r)=>{const i=e-t-r,s=2,o=2,a=s+o,n=Math.floor(i/a),l=Array(n).fill(`${s} ${o}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),Xp=g(function(e,t,r,i,s,o,a,n=!1){if(!a)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l}=pt();let c=t.points,h=!1;const d=s;var f=o;const u=[];for(const P in t.cssCompiledStyles)qn(P)||u.push(t.cssCompiledStyles[P]);j.debug("UIO intersect check",t.points,f.x,d.x),f.intersect&&d.intersect&&!n&&(c=c.slice(1,t.points.length-1),c.unshift(d.intersect(c[0])),j.debug("Last point UIO",t.start,"-->",t.end,c[c.length-1],f,f.intersect(c[c.length-1])),c.push(f.intersect(c[c.length-1])));const p=btoa(JSON.stringify(c));t.toCluster&&(j.info("to cluster abc88",r.get(t.toCluster)),c=Mh(t.points,r.get(t.toCluster).node),h=!0),t.fromCluster&&(j.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(c,null,2)),c=Mh(c.reverse(),r.get(t.fromCluster).node).reverse(),h=!0);let m=c.filter(P=>!Number.isNaN(P.y));const y=Vv(t.curve);y!=="rounded"&&(m=Jv(m));let x=xi;switch(y){case"linear":x=xi;break;case"basis":x=Bs;break;case"cardinal":x=ad;break;case"bumpX":x=ed;break;case"bumpY":x=rd;break;case"catmullRom":x=ld;break;case"monotoneX":x=gd;break;case"monotoneY":x=pd;break;case"natural":x=yd;break;case"step":x=xd;break;case"stepAfter":x=bd;break;case"stepBefore":x=Cd;break;case"rounded":x=xi;break;default:x=Bs}const{x:b,y:k}=af(t),S=Jc().x(b).y(k).curve(x);let v;switch(t.thickness){case"normal":v="edge-thickness-normal";break;case"thick":v="edge-thickness-thick";break;case"invisible":v="edge-thickness-invisible";break;default:v="edge-thickness-normal"}switch(t.pattern){case"solid":v+=" edge-pattern-solid";break;case"dotted":v+=" edge-pattern-dotted";break;case"dashed":v+=" edge-pattern-dashed";break;default:v+=" edge-pattern-solid"}let _,$=y==="rounded"?Gp(Vp(m,t),5):S(m);const T=Array.isArray(t.style)?t.style:[t.style];let M=T.find(P=>P?.startsWith("stroke:")),I="";t.animate&&(I="edge-animation-fast"),t.animation&&(I="edge-animation-"+t.animation);let q=!1;if(t.look==="handDrawn"){const P=J.svg(e);Object.assign([],m);const z=P.path($,{roughness:.3,seed:l});v+=" transition",_=ct(z).select("path").attr("id",`${a}-${t.id}`).attr("class"," "+v+(t.classes?" "+t.classes:"")+(I?" "+I:"")).attr("style",T?T.reduce((N,B)=>N+";"+B,""):"");let E=_.attr("d");_.attr("d",E),e.node().appendChild(_.node())}else{const P=u.join(";"),z=T?T.reduce((G,V)=>G+V+";",""):"",E=(P?P+";"+z+";":z)+";"+(T?T.reduce((G,V)=>G+";"+V,""):"");_=e.append("path").attr("d",$).attr("id",`${a}-${t.id}`).attr("class"," "+v+(t.classes?" "+t.classes:"")+(I?" "+I:"")).attr("style",E),M=E.match(/stroke:([^;]+)/)?.[1],q=t.animate===!0||!!t.animation||P.includes("animation");const N=_.node(),B=typeof N.getTotalLength=="function"?N.getTotalLength():0,U=Yl[t.arrowTypeStart]||0,W=Yl[t.arrowTypeEnd]||0;if(t.look==="neo"&&!q){const V=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?tS(B,U,W):`0 ${U} ${B-U-W} ${W}`}; stroke-dashoffset: 0;`;_.attr("style",V+_.attr("style"))}}_.attr("data-edge",!0),_.attr("data-et","edge"),_.attr("data-id",t.id),_.attr("data-points",p),_.attr("data-look",Lt(t.look)),t.showPoints&&m.forEach(P=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",P.x).attr("cy",P.y)});let X="";(pt().flowchart.arrowMarkerAbsolute||pt().state.arrowMarkerAbsolute)&&(X=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,X=X.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),j.info("arrowTypeStart",t.arrowTypeStart),j.info("arrowTypeEnd",t.arrowTypeEnd);const Y=!q&&t?.look==="neo";Uv(_,t,X,a,i,Y,M);const D=Math.floor(c.length/2),A=c[D];Zt.isLabelCoordinateInPath(A,_.attr("d"))||(h=!0);let F={};return h&&(F.updatedPath=c),F.originalPath=t.points,F},"insertEdge");function Gp(e,t){if(e.length<2)return"";let r="";const i=e.length,s=1e-5;for(let o=0;o<i;o++){const a=e[o],n=e[o-1],l=e[o+1];if(o===0)r+=`M${a.x},${a.y}`;else if(o===i-1)r+=`L${a.x},${a.y}`;else{const c=a.x-n.x,h=a.y-n.y,d=l.x-a.x,f=l.y-a.y,u=Math.hypot(c,h),p=Math.hypot(d,f);if(u<s||p<s){r+=`L${a.x},${a.y}`;continue}const m=c/u,y=h/u,x=d/p,b=f/p,k=m*x+y*b,S=Math.max(-1,Math.min(1,k)),v=Math.acos(S);if(v<s||Math.abs(Math.PI-v)<s){r+=`L${a.x},${a.y}`;continue}const _=Math.min(t/Math.sin(v/2),u/2,p/2),$=a.x-m*_,T=a.y-y*_,M=a.x+x*_,I=a.y+b*_;r+=`L${$},${T}`,r+=`Q${a.x},${a.y} ${M},${I}`}}return r}g(Gp,"generateRoundedPath");function Oa(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}}g(Oa,"calculateDeltaAndAngle");function Vp(e,t){const r=e.map(s=>({...s}));if(e.length>=2&&$t[t.arrowTypeStart]){const s=$t[t.arrowTypeStart],o=e[0],a=e[1],{angle:n}=Oa(o,a),l=s*Math.cos(n),c=s*Math.sin(n);r[0].x=o.x+l,r[0].y=o.y+c}const i=e.length;if(i>=2&&$t[t.arrowTypeEnd]){const s=$t[t.arrowTypeEnd],o=e[i-1],a=e[i-2],{angle:n}=Oa(a,o),l=s*Math.cos(n),c=s*Math.sin(n);r[i-1].x=o.x-l,r[i-1].y=o.y-c}return r}g(Vp,"applyMarkerOffsetsToPoints");var eS=g((e,t,r,i)=>{t.forEach(s=>{SS[s](e,r,i)})},"insertMarkers"),rS=g((e,t,r)=>{j.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",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").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"),e.append("marker").attr("id",r+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),iS=g((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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),sS=g((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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),oS=g((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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),aS=g((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("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("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),nS=g((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"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),lS=g((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"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),hS=g((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"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),cS=g((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"),dS=g((e,t,r)=>{const i=Ct(),{themeVariables:s}=i,{transitionColor:o}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${o}`)},"barbNeo"),uS=g((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"),fS=g((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 s=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");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),s.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),gS=g((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"),pS=g((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 s=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");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),s.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),mS=g((e,t,r)=>{const i=Ct(),{themeVariables:s}=i,{strokeWidth:o}=s;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").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${o}`),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").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${o}`)},"only_one_neo"),yS=g((e,t,r)=>{const i=Ct(),{themeVariables:s}=i,{strokeWidth:o,mainBkg:a}=s,n=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").attr("markerUnits","userSpaceOnUse");n.append("circle").attr("fill",a??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${o}`);const l=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("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",a??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${o}`)},"zero_or_one_neo"),xS=g((e,t,r)=>{const i=Ct(),{themeVariables:s}=i,{strokeWidth:o}=s;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").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${o}`),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("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${o}`)},"one_or_more_neo"),CS=g((e,t,r)=>{const i=Ct(),{themeVariables:s}=i,{strokeWidth:o,mainBkg:a}=s,n=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("markerUnits","userSpaceOnUse").attr("orient","auto");n.append("circle").attr("fill",a??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${o}`);const l=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").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",a??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${o}`)},"zero_or_more_neo"),bS=g((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
|
|
293
|
+
L20,10
|
|
294
|
+
M20,10
|
|
295
|
+
L0,20`)},"requirement_arrow"),kS=g((e,t,r)=>{const i=Ct(),{themeVariables:s}=i,{strokeWidth:o}=s;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").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${o}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
|
|
296
|
+
L20,10
|
|
297
|
+
M20,10
|
|
298
|
+
L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),wS=g((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"),vS=g((e,t,r)=>{const i=Ct(),{themeVariables:s}=i,{strokeWidth:o}=s,a=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").attr("markerUnits","userSpaceOnUse").append("g");a.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),a.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),a.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),a.selectAll("*").attr("stroke-width",`${o}`)},"requirement_contains_neo"),SS={extension:rS,composition:iS,aggregation:sS,dependency:oS,lollipop:aS,point:nS,circle:lS,cross:hS,barb:cS,barbNeo:dS,only_one:uS,zero_or_one:fS,one_or_more:gS,zero_or_more:pS,only_one_neo:mS,zero_or_one_neo:yS,one_or_more_neo:xS,zero_or_more_neo:CS,requirement_arrow:bS,requirement_contains:wS,requirement_arrow_neo:kS,requirement_contains_neo:vS},Zp=eS,TS={common:Yr,getConfig:Ct,insertCluster:vg,insertEdge:Xp,insertEdgeLabel:Hp,insertMarkers:Zp,insertNode:el,interpolateToCurve:$n,labelHelper:at,log:j,positionEdgeLabel:Yp},Ai={},Kp=g(e=>{for(const t of e)Ai[t.name]=t},"registerLayoutLoaders"),_S=g(()=>{Kp([{name:"dagre",loader:g(async()=>await Promise.resolve().then(()=>require("./dagre-BM42HDAG-BnI0bbQQ.cjs")),"loader")},{name:"cose-bilkent",loader:g(async()=>await Promise.resolve().then(()=>require("./cose-bilkent-S5V4N54A-i82zh9MZ.cjs")),"loader")}])},"registerDefaultLayoutLoaders");_S();var BS=g(async(e,t)=>{if(!(e.layoutAlgorithm in Ai))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const h of e.nodes){const d=h.domId||h.id;h.domId=`${e.diagramId}-${d}`}const r=Ai[e.layoutAlgorithm],i=await r.loader(),{theme:s,themeVariables:o}=e.config,{useGradient:a,gradientStart:n,gradientStop:l}=o,c=t.attr("id");if(t.append("defs").append("filter").attr("id",`${c}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s?.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${c}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s?.includes("dark")?"#FFFFFF":"#000000"}`),a){const h=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");h.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),h.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(e,t,TS,{algorithm:r.algorithm})},"render"),LS=g((e="",{fallback:t="dagre"}={})=>{if(e in Ai)return e;if(t in Ai)return j.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"),rl="comm",Qp="rule",Jp="decl",FS="@media",MS="@import",AS="@supports",ES="@namespace",Ra="@keyframes",tm="@layer",$S="@scope",IS=Math.abs,ki=String.fromCharCode;function em(e){return e.trim()}function Da(e,t,r){return e.replace(t,r)}function Cr(e,t){return e.charCodeAt(t)|0}function Wr(e,t,r){return e.slice(t,r)}function ue(e){return e.length}function rm(e){return e.length}function Ji(e,t){return t.push(e),e}var yo=1,jr=1,im=0,Qt=0,wt=0,Kr="";function il(e,t,r,i,s,o,a,n){return{value:e,root:t,parent:r,type:i,props:s,children:o,line:yo,column:jr,length:a,return:"",siblings:n}}function PS(){return wt}function OS(){return wt=Qt>0?Cr(Kr,--Qt):0,jr--,wt===10&&(jr=1,yo--),wt}function oe(){return wt=Qt<im?Cr(Kr,Qt++):0,jr++,wt===10&&(jr=1,yo++),wt}function Ie(){return Cr(Kr,Qt)}function us(){return Qt}function xo(e,t){return Wr(Kr,e,t)}function Ei(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 RS(e){return yo=jr=1,im=ue(Kr=e),Qt=0,[]}function DS(e){return Kr="",e}function Do(e){return em(xo(Qt-1,Na(e===91?e+2:e===40?e+1:e)))}function NS(e){for(;(wt=Ie())&&wt<33;)oe();return Ei(e)>2||Ei(wt)>3?"":" "}function qS(e,t){for(;--t&&oe()&&!(wt<48||wt>102||wt>57&&wt<65||wt>70&&wt<97););return xo(e,us()+(t<6&&Ie()==32&&oe()==32))}function Na(e){for(;oe();)switch(wt){case e:return Qt;case 34:case 39:e!==34&&e!==39&&Na(wt);break;case 40:e===41&&Na(e);break;case 92:oe();break}return Qt}function zS(e,t){for(;oe()&&e+wt!==57;)if(e+wt===84&&Ie()===47)break;return"/*"+xo(t,Qt-1)+"*"+ki(e===47?e:oe())}function WS(e){for(;!Ei(Ie());)oe();return xo(e,Qt)}function jS(e){return DS(fs("",null,null,null,[""],e=RS(e),0,[0],e))}function fs(e,t,r,i,s,o,a,n,l){for(var c=0,h=0,d=a,f=0,u=0,p=0,m=1,y=1,x=1,b=0,k=0,S="",v=s,_=o,$=i,T=S;y;)switch(p=k,k=oe()){case 40:p!=108&&Cr(T,d-1)==58?(b++,T+="("):T+=Do(k);break;case 41:b--,T+=")";break;case 34:case 39:case 91:T+=Do(k);break;case 9:case 10:case 13:case 32:if(b>0){T+=ki(k);break}T+=NS(p);break;case 92:T+=qS(us()-1,7);continue;case 47:switch(Ie()){case 42:case 47:Ji(HS(zS(oe(),us()),t,r,l),l),(Ei(p||1)==5||Ei(Ie()||1)==5)&&ue(T)&&Wr(T,-1,void 0)!==" "&&(T+=" ");break;default:T+="/"}break;case 123*m:n[c++]=ue(T)*x;case 125*m:case 59:case 0:if(b>0&&k){T+=ki(k);break}switch(k){case 0:case 125:y=0;case 59+h:x==-1&&(T=Da(T,/\f/g,"")),u>0&&(ue(T)-d||m===0)&&Ji(u>32?$h(T+";",i,r,d-1,l):$h(Da(T," ","")+";",i,r,d-2,l),l);break;case 59:T+=";";default:if(Ji($=Eh(T,t,r,c,h,s,n,S,v=[],_=[],d,o),o),k===123)if(h===0)fs(T,t,$,$,v,o,d,n,_);else{switch(f){case 99:if(Cr(T,3)===110)break;case 108:if(Cr(T,2)===97)break;default:h=0;case 100:case 109:case 115:}h?fs(e,$,$,i&&Ji(Eh(e,$,$,0,0,s,n,S,s,v=[],d,_),_),s,_,d,n,i?v:_):fs(T,$,$,$,[""],_,0,n,_)}}c=h=u=0,m=x=1,S=T="",d=a;break;case 58:d=1+ue(T),u=p;default:if(m<1){if(k==123)--m;else if(k==125&&m++==0&&OS()==125)continue}switch(T+=ki(k),k*m){case 38:x=h>0?1:(T+="\f",-1);break;case 44:if(b>0)break;n[c++]=(ue(T)-1)*x,x=1;break;case 64:Ie()===45&&(T+=Do(oe())),f=Ie(),h=d=ue(S=T+=WS(us())),k++;break;case 45:p===45&&ue(T)==2&&(m=0)}}return o}function Eh(e,t,r,i,s,o,a,n,l,c,h,d){for(var f=s-1,u=s===0?o:[""],p=rm(u),m=0,y=0,x=0;m<i;++m)for(var b=0,k=Wr(e,f+1,f=IS(y=a[m])),S=e;b<p;++b)(S=em(y>0?u[b]+" "+k:Da(k,/&\f/g,u[b])))&&(l[x++]=S);return il(e,t,r,s===0?Qp:n,l,c,h,d)}function HS(e,t,r,i){return il(e,t,r,rl,ki(PS()),Wr(e,2,-2),0,i)}function $h(e,t,r,i,s){return il(e,t,r,Jp,Wr(e,0,i),Wr(e,i+1,-1),i,s)}function qa(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function YS(e,t,r,i){switch(e.type){case tm:if(e.children.length)break;case MS:case ES:case Jp:return e.return=e.return||e.value;case rl:return"";case Ra:return e.return=e.value+"{"+qa(e.children,i)+"}";case Qp:if(!ue(e.value=e.props.join(",")))return""}return ue(r=qa(e.children,i))?e.return=e.value+"{"+r+"}":""}function US(e){var t=rm(e);return function(r,i,s,o){for(var a="",n=0;n<t;n++)a+=e[n](r,i,s,o)||"";return a}}var sm="c4",XS=g(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),GS=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./c4Diagram-AAUBKEIU-DdYus-OD.cjs"));return{id:sm,diagram:e}},"loader"),VS={id:sm,detector:XS,loader:GS},ZS=VS,om="flowchart",KS=g((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),QS=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-I6XJVG4X-DqFjV_FQ.cjs"));return{id:om,diagram:e}},"loader"),JS={id:om,detector:KS,loader:QS},tT=JS,am="flowchart-v2",eT=g((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"),rT=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-I6XJVG4X-DqFjV_FQ.cjs"));return{id:am,diagram:e}},"loader"),iT={id:am,detector:eT,loader:rT},sT=iT,nm="er",oT=g(e=>/^\s*erDiagram/.test(e),"detector"),aT=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./erDiagram-TEJ5UH35-Od4ZN_Jj.cjs"));return{id:nm,diagram:e}},"loader"),nT={id:nm,detector:oT,loader:aT},lT=nT,lm="gitGraph",hT=g(e=>/^\s*gitGraph/.test(e),"detector"),cT=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./gitGraphDiagram-PVQCEYII-CsKS4JsX.cjs"));return{id:lm,diagram:e}},"loader"),dT={id:lm,detector:hT,loader:cT},uT=dT,hm="gantt",fT=g(e=>/^\s*gantt/.test(e),"detector"),gT=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./ganttDiagram-6RSMTGT7-Ch-is2L9.cjs"));return{id:hm,diagram:e}},"loader"),pT={id:hm,detector:fT,loader:gT},mT=pT,cm="info",yT=g(e=>/^\s*info/.test(e),"detector"),xT=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./infoDiagram-5YYISTIA-DPFwfg1u.cjs"));return{id:cm,diagram:e}},"loader"),CT={id:cm,detector:yT,loader:xT},dm="pie",bT=g(e=>/^\s*pie/.test(e),"detector"),kT=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./pieDiagram-4H26LBE5-md6Jk-kX.cjs"));return{id:dm,diagram:e}},"loader"),wT={id:dm,detector:bT,loader:kT},um="quadrantChart",vT=g(e=>/^\s*quadrantChart/.test(e),"detector"),ST=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./quadrantDiagram-W4KKPZXB-BiJ3bFZn.cjs"));return{id:um,diagram:e}},"loader"),TT={id:um,detector:vT,loader:ST},_T=TT,fm="xychart",BT=g(e=>/^\s*xychart(-beta)?/.test(e),"detector"),LT=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./xychartDiagram-2RQKCTM6-NS9IkwEv.cjs"));return{id:fm,diagram:e}},"loader"),FT={id:fm,detector:BT,loader:LT},MT=FT,gm="requirement",AT=g(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),ET=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./requirementDiagram-4Y6WPE33-BJMM1_nL.cjs"));return{id:gm,diagram:e}},"loader"),$T={id:gm,detector:AT,loader:ET},IT=$T,pm="sequence",PT=g(e=>/^\s*sequenceDiagram/.test(e),"detector"),OT=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sequenceDiagram-3UESZ5HK-BRU7h4Ho.cjs"));return{id:pm,diagram:e}},"loader"),RT={id:pm,detector:PT,loader:OT},DT=RT,mm="class",NT=g((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),qT=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./classDiagram-4FO5ZUOK-C4BU4T62.cjs"));return{id:mm,diagram:e}},"loader"),zT={id:mm,detector:NT,loader:qT},WT=zT,ym="classDiagram",jT=g((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),HT=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./classDiagram-v2-Q7XG4LA2-C4BU4T62.cjs"));return{id:ym,diagram:e}},"loader"),YT={id:ym,detector:jT,loader:HT},UT=YT,xm="state",XT=g((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),GT=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./stateDiagram-AJRCARHV-CqtM_wb7.cjs"));return{id:xm,diagram:e}},"loader"),VT={id:xm,detector:XT,loader:GT},ZT=VT,Cm="stateDiagram",KT=g((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),QT=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./stateDiagram-v2-BHNVJYJU-CQp1esNj.cjs"));return{id:Cm,diagram:e}},"loader"),JT={id:Cm,detector:KT,loader:QT},t_=JT,bm="journey",e_=g(e=>/^\s*journey/.test(e),"detector"),r_=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./journeyDiagram-JHISSGLW-CU1EWMDk.cjs"));return{id:bm,diagram:e}},"loader"),i_={id:bm,detector:e_,loader:r_},s_=i_,o_=g((e,t,r)=>{j.debug(`rendering svg for syntax error
|
|
299
|
+
`);const i=kd(t),s=i.append("g");i.attr("viewBox","0 0 2412 512"),tn(i,100,512,!0),s.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"),s.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"),s.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"),s.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"),s.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"),s.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"),s.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"),s.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"),km={draw:o_},a_=km,n_={db:{},renderer:km,parser:{parse:g(()=>{},"parse")}},l_=n_,wm="flowchart-elk",h_=g((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),c_=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-I6XJVG4X-DqFjV_FQ.cjs"));return{id:wm,diagram:e}},"loader"),d_={id:wm,detector:h_,loader:c_},u_=d_,vm="timeline",f_=g(e=>/^\s*timeline/.test(e),"detector"),g_=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./timeline-definition-PNZ67QCA-B9RmAqqi.cjs"));return{id:vm,diagram:e}},"loader"),p_={id:vm,detector:f_,loader:g_},m_=p_,Sm="mindmap",y_=g(e=>/^\s*mindmap/.test(e),"detector"),x_=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./mindmap-definition-RKZ34NQL-DChglGn7.cjs"));return{id:Sm,diagram:e}},"loader"),C_={id:Sm,detector:y_,loader:x_},b_=C_,Tm="kanban",k_=g(e=>/^\s*kanban/.test(e),"detector"),w_=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./kanban-definition-UN3LZRKU-BaNd7N3-.cjs"));return{id:Tm,diagram:e}},"loader"),v_={id:Tm,detector:k_,loader:w_},S_=v_,_m="sankey",T_=g(e=>/^\s*sankey(-beta)?/.test(e),"detector"),__=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sankeyDiagram-5OEKKPKP-DkhPTPSt.cjs"));return{id:_m,diagram:e}},"loader"),B_={id:_m,detector:T_,loader:__},L_=B_,Bm="packet",F_=g(e=>/^\s*packet(-beta)?/.test(e),"detector"),M_=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-LMA3HP47-DMo-Du0O.cjs"));return{id:Bm,diagram:e}},"loader"),A_={id:Bm,detector:F_,loader:M_},Lm="radar",E_=g(e=>/^\s*radar-beta/.test(e),"detector"),$_=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-2AECGRRQ-LK0WewmW.cjs"));return{id:Lm,diagram:e}},"loader"),I_={id:Lm,detector:E_,loader:$_},Fm="block",P_=g(e=>/^\s*block(-beta)?/.test(e),"detector"),O_=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./blockDiagram-GPEHLZMM-BgMaQKJL.cjs"));return{id:Fm,diagram:e}},"loader"),R_={id:Fm,detector:P_,loader:O_},D_=R_,Mm="treeView",N_=g(e=>/^\s*treeView-beta/.test(e),"detector"),q_=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-5GNKFQAL-Cjn8C55h.cjs"));return{id:Mm,diagram:e}},"loader"),z_={id:Mm,detector:N_,loader:q_},W_=z_,Am="architecture",j_=g(e=>/^\s*architecture/.test(e),"detector"),H_=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./architectureDiagram-3BPJPVTR-BU8vezuK.cjs"));return{id:Am,diagram:e}},"loader"),Y_={id:Am,detector:j_,loader:H_},U_=Y_,Em="eventmodeling",X_=g(e=>/^\s*eventmodeling/.test(e),"detector"),G_=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-KO2AKTUF-DoIuQ47y.cjs"));return{id:Em,diagram:e}},"loader"),V_={id:Em,detector:X_,loader:G_},Z_=V_,$m="ishikawa",K_=g(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),Q_=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./ishikawaDiagram-YF4QCWOH-7n8wfnaJ.cjs"));return{id:$m,diagram:e}},"loader"),J_={id:$m,detector:K_,loader:Q_},Im="venn",tB=g(e=>/^\s*venn-beta/.test(e),"detector"),eB=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./vennDiagram-CIIHVFJN-BLhG-NNC.cjs"));return{id:Im,diagram:e}},"loader"),rB={id:Im,detector:tB,loader:eB},iB=rB,Pm="treemap",sB=g(e=>/^\s*treemap/.test(e),"detector"),oB=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-OG6HWLK6-CYAVH4wV.cjs"));return{id:Pm,diagram:e}},"loader"),aB={id:Pm,detector:sB,loader:oB},Om="wardley-beta",nB=g(e=>/^\s*wardley-beta/i.test(e),"detector"),lB=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./wardleyDiagram-YWT4CUSO-C21VhlO9.cjs"));return{id:Om,diagram:e}},"loader"),hB={id:Om,detector:nB,loader:lB},cB=hB,Ih=!1,Co=g(()=>{Ih||(Ih=!0,Cs("error",l_,e=>e.toLowerCase().trim()==="error"),Cs("---",{db:{clear:g(()=>{},"clear")},styles:{},renderer:{draw:g(()=>{},"draw")},parser:{parse:g(()=>{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:g(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Wo(u_,b_,U_),Wo(ZS,S_,UT,WT,lT,mT,CT,wT,IT,DT,sT,tT,m_,uT,t_,ZT,s_,_T,L_,A_,MT,D_,Z_,W_,I_,J_,aB,iB,cB))},"addDiagrams"),dB=g(async()=>{j.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(er).map(async([r,{detector:i,loader:s}])=>{if(s)try{Go(r)}catch{try{const{diagram:o,id:a}=await s();Cs(a,o,i)}catch(o){throw j.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete er[r],o}}}))).filter(r=>r.status==="rejected");if(t.length>0){j.error(`Failed to load ${t.length} external diagrams`);for(const r of t)j.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),uB="graphics-document document";function Rm(e,t){e.attr("role",uB),t!==""&&e.attr("aria-roledescription",t)}g(Rm,"setA11yDiagramInfo");function Dm(e,t,r,i){if(e.insert!==void 0){if(r){const s=`chart-desc-${i}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(r)}if(t){const s=`chart-title-${i}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(t)}}}g(Dm,"addSVGa11yTitleDescription");var Je,za=(Je=class{constructor(t,r,i,s,o){this.type=t,this.text=r,this.db=i,this.parser=s,this.renderer=o}static async fromText(t,r={}){const i=Ct(),s=Ka(t,i);t=Y2(t)+`
|
|
300
|
+
`;try{Go(s)}catch{const c=Py(s);if(!c)throw new Jh(`Diagram ${s} not found.`);const{id:h,diagram:d}=await c();Cs(h,d)}const{db:o,parser:a,renderer:n,init:l}=Go(s);return a.parser&&(a.parser.yy=o),o.clear?.(),l?.(i),r.title&&o.setDiagramTitle?.(r.title),await a.parse(t),new Je(s,t,o,a,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},g(Je,"Diagram"),Je),Ph=[],fB=g(()=>{Ph.forEach(e=>{e()}),Ph=[]},"attachFunctions"),gB=g(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Nm(e){const t=e.match(Qh);if(!t)return{text:e,metadata:{}};let r=of(t[1],{schema:sf})??{};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}}g(Nm,"extractFrontMatter");var pB=g(e=>e.replace(/\r\n?/g,`
|
|
301
|
+
`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),mB=g(e=>{const{text:t,metadata:r}=Nm(e),{displayMode:i,title:s,config:o={}}=r;return i&&(o.gantt||(o.gantt={}),o.gantt.displayMode=i),{title:s,config:o,text:t}},"processFrontmatter"),yB=g(e=>{const t=Zt.detectInit(e)??{},r=Zt.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:P2(e),directive:t}},"processDirectives");function sl(e){const t=pB(e),r=mB(t),i=yB(r.text),s=lo(r.config,i.directive);return e=gB(i.text),{code:e,title:r.title,config:s}}g(sl,"preprocessDiagram");function qm(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}g(qm,"toBase64");var xB=5e4,CB="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",bB="sandbox",kB="loose",wB="http://www.w3.org/2000/svg",vB="http://www.w3.org/1999/xlink",SB="http://www.w3.org/1999/xhtml",TB="100%",_B="100%",BB="border:0;margin:0;",LB="margin:0",FB="allow-top-navigation-by-user-activation allow-popups",MB='The "iframe" tag is not supported by your browser.',AB=["foreignobject"],EB=["dominant-baseline"];function ol(e){const t=sl(e);return ys(),nx(t.config??{}),t}g(ol,"processAndSetConfigs");async function zm(e,t){Co();try{const{code:r,config:i}=ol(e);return{diagramType:(await jm(r)).type,config:i}}catch(r){if(t?.suppressErrors)return!1;throw r}}g(zm,"parse");var Oh=g((e,t,r=[])=>{const i=sc(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),$B=g((e,t=new Map)=>{const r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){const n=Pt(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{Zl(l.styles)||n.forEach(c=>{r.insertRule(Oh(l.id,c,l.styles),r.cssRules.length)}),Zl(l.textStyles)||r.insertRule(Oh(l.id,"tspan",(l?.textStyles||[]).map(c=>c.replace("color","fill"))),r.cssRules.length)})}let i="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){const s=new CSSStyleSheet;s.replaceSync(e.themeCSS),i=Xo(s)+`
|
|
302
|
+
`}else i+=`${e.themeCSS}
|
|
303
|
+
`;return i+Xo(r)},"createCssStyles"),IB=g((e,t)=>qa(jS(`${e}{${t}}`),US([g(function(i,s,o,a){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===Ra)return;i.props=i.props.map(n=>n.startsWith(e)?n:`${e} ${n}`)}else i.type.startsWith("@")&&([...[FS,AS,tm,$S,"@container","@starting-style"],Ra].includes(i.type)||(j.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=rl))},"addNamespace"),YS])),"compileCSS"),PB=g((e,t,r,i)=>{const s=$B(e,r),o=_x(t,s,{...e.themeVariables,theme:e.theme,look:e.look},i);return IB(i,o)},"createUserStyles"),OB=g((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=De(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),RB=g((e="",t)=>{const r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":_B,i=qm(`<body style="${LB}">${e}</body>`);return`<iframe style="width:${TB};height:${r};${BB}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${FB}">
|
|
304
|
+
${MB}
|
|
305
|
+
</iframe>`},"putIntoIFrame"),Rh=g((e,t,r,i,s)=>{const o=e.append("div");o.attr("id",r),i&&o.attr("style",i);const a=o.append("svg").attr("id",t).attr("width","100%").attr("xmlns",wB);return s&&a.attr("xmlns:xlink",s),a.append("g"),e},"appendDivSvgG");function Wa(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}g(Wa,"sandboxedIframe");var DB=g((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),NB=g(async function(e,t,r){Co();const i=ol(t);t=i.code;const s=Ct();j.debug(s),t.length>(s?.maxTextSize??xB)&&(t=CB);const o=`#${e}`,a="i"+e,n="#"+a,l="d"+e,c="#"+l,h=g(()=>{const Y=ct(f?n:c).node();Y&&"remove"in Y&&Y.remove()},"removeTempElements");let d=ct(document.body);const f=s.securityLevel===bB,u=s.securityLevel===kB,p=s.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),f){const X=Wa(ct(r),a);d=ct(X.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=ct(r);Rh(d,e,l,`font-family: ${p}`,vB)}else{if(DB(document,e,l,a),f){const X=Wa(ct(document.body),a);d=ct(X.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=ct("body");Rh(d,e,l)}let m,y;try{m=await za.fromText(t,{title:i.title})}catch(X){if(s.suppressErrorRendering)throw h(),X;m=await za.fromText("error"),y=X}const x=d.select(c).node(),b=m.type,k=x.firstChild,S=k.firstChild,v=m.renderer.getClasses?.(t,m),_=PB(s,b,v,o),$=document.createElement("style");$.innerHTML=_,k.insertBefore($,S);try{await m.renderer.draw(t,e,"11.15.0",m)}catch(X){throw s.suppressErrorRendering?h():a_.draw(t,e,"11.15.0"),X}const T=d.select(`${c} svg`),M=m.db.getAccTitle?.(),I=m.db.getAccDescription?.();Hm(b,T,M,I),d.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",SB);let q=d.select(c).node().innerHTML;if(j.debug("config.arrowMarkerAbsolute",s.arrowMarkerAbsolute),q=OB(q,f,Me(s.arrowMarkerAbsolute)),f){const X=d.select(c+" svg").node();q=RB(q,X)}else u||(q=tr.sanitize(q,{ADD_TAGS:AB,ADD_ATTR:EB,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(fB(),y)throw y;return h(),{diagramType:b,svg:q,bindFunctions:m.db.bindFunctions}},"render");function Wm(e={}){const t=vt({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),ox(t),t?.theme&&t.theme in _e?t.themeVariables=_e[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=_e.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?sx(t):oc();Va(r.logLevel),Co()}g(Wm,"initialize");var jm=g((e,t={})=>{const{code:r}=sl(e);return za.fromText(r,t)},"getDiagramFromText");function Hm(e,t,r,i){Rm(t,e),Dm(t,r,i,t.attr("id"))}g(Hm,"addA11yInfo");var ar=Object.freeze({render:NB,parse:zm,getDiagramFromText:jm,initialize:Wm,getConfig:Ct,setConfig:ac,getSiteConfig:oc,updateSiteConfig:ax,reset:g(()=>{ys()},"reset"),globalReset:g(()=>{ys(Pr)},"globalReset"),defaultConfig:Pr});Va(Ct().logLevel);ys(Ct());var qB=g((e,t,r)=>{j.warn(e),Dn(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"),Ym=g(async function(e={querySelector:".mermaid"}){try{await zB(e)}catch(t){if(Dn(t)&&j.error(t.str),Fe.parseError&&Fe.parseError(t),!e.suppressErrors)throw j.error("Use the suppressErrors option to suppress these errors"),t}},"run"),zB=g(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=ar.getConfig();j.debug(`${e?"":"No "}Callback function found`);let s;if(r)s=r;else if(t)s=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");j.debug(`Found ${s.length} diagrams`),i?.startOnLoad!==void 0&&(j.debug("Start On Load: "+i?.startOnLoad),ar.updateSiteConfig({startOnLoad:i?.startOnLoad}));const o=new Zt.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let a;const n=[];for(const l of Array.from(s)){if(j.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${o.next()}`;a=l.innerHTML,a=Kf(Zt.entityDecode(a)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=Zt.detectInit(a);h&&j.debug("Detected early reinit: ",h);try{const{svg:d,bindFunctions:f}=await Vm(c,a,l);l.innerHTML=d,e&&await e(c),f&&f(l)}catch(d){qB(d,n,Fe.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),Um=g(function(e){ar.initialize(e)},"initialize"),WB=g(async function(e,t,r){j.warn("mermaid.init is deprecated. Please use run instead."),e&&Um(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await Ym(i)},"init"),jB=g(async(e,{lazyLoad:t=!0}={})=>{Co(),Wo(...e),t===!1&&await dB()},"registerExternalDiagrams"),Xm=g(function(){if(Fe.startOnLoad){const{startOnLoad:e}=ar.getConfig();e&&Fe.run().catch(t=>j.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",Xm,!1);var HB=g(function(e){Fe.parseError=e},"setParseErrorHandler"),Us=[],No=!1,Gm=g(async()=>{if(!No){for(No=!0;Us.length>0;){const e=Us.shift();if(e)try{await e()}catch(t){j.error("Error executing queue",t)}}No=!1}},"executeQueue"),YB=g(async(e,t)=>new Promise((r,i)=>{const s=g(()=>new Promise((o,a)=>{ar.parse(e,t).then(n=>{o(n),r(n)},n=>{j.error("Error parsing",n),Fe.parseError?.(n),a(n),i(n)})}),"performCall");Us.push(s),Gm().catch(i)}),"parse"),Vm=g((e,t,r)=>new Promise((i,s)=>{const o=g(()=>new Promise((a,n)=>{ar.render(e,t,r).then(l=>{a(l),i(l)},l=>{j.error("Error parsing",l),Fe.parseError?.(l),n(l),s(l)})}),"performCall");Us.push(o),Gm().catch(s)}),"render"),UB=g(()=>Object.keys(er).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),Fe={startOnLoad:!0,mermaidAPI:ar,parse:YB,render:Vm,init:WB,run:Ym,registerExternalDiagrams:jB,registerLayoutLoaders:Kp,initialize:Um,parseError:void 0,contentLoaded:Xm,setParseErrorHandler:HB,detectType:Ka,registerIconPacks:tg,getRegisteredDiagramsMetadata:UB},ja=Fe;const Zm="both-shift",Dh={none:{panTrigger:null,wheelZoom:!1},zoom:{panTrigger:null,wheelZoom:!0},pan:{panTrigger:"drag",wheelZoom:!1},"pan-shift":{panTrigger:"shift-drag",wheelZoom:!1},both:{panTrigger:"drag",wheelZoom:!0},"both-shift":{panTrigger:"shift-drag",wheelZoom:!0}},XB=[{value:"none",label:"操作なし"},{value:"zoom",label:"拡大縮小のみ"},{value:"pan",label:"移動のみ(左ドラッグ)"},{value:"pan-shift",label:"移動のみ(Shift+ドラッグ)"},{value:"both",label:"拡大縮小+移動(左ドラッグ)"},{value:"both-shift",label:"拡大縮小+移動(Shift+ドラッグ)"}],GB=0;function VB(e,t){return!(!e.panTrigger||t.button!==GB||e.panTrigger==="shift-drag"&&!t.shiftKey)}function ZB(e,t){return e.wheelZoom&&t.shiftKey}let Km=!1,Ha=null;if(ja?.initialize)try{ja.initialize({startOnLoad:!1}),Km=!0}catch(e){Ha=e instanceof Error?e:new Error(String(e))}else Ha=new Error("Mermaid library or mermaid.initialize is not available.");const Qm=({chartContent:e,interaction:t,hideInteractionMenu:r=!1})=>{const i=H.useRef(`mermaid-chart-${Math.random().toString(36).substring(2,15)}`),s=H.useRef(null),o=H.useRef(null),[a,n]=H.useState(!0),[l,c]=H.useState(null),[h,d]=H.useState(null),[f,u]=H.useState(null),[p,m]=H.useState(!1),[y,x]=H.useState(t??Zm),b=H.useRef(Dh[y]),[k,S]=H.useState(!1),v=H.useRef(null);H.useEffect(()=>{t&&x(t)},[t]),H.useEffect(()=>{const T=Dh[y];b.current=T;const M=s.current;M&&(M.style.cursor=T.panTrigger==="drag"?"move":"")},[y]),H.useEffect(()=>{if(!k)return;const T=M=>{v.current&&!v.current.contains(M.target)&&S(!1)};return document.addEventListener("pointerdown",T),()=>document.removeEventListener("pointerdown",T)},[k]),H.useEffect(()=>{if(u(null),n(!0),c(null),m(!1),!Km){c(Ha?.message||"Mermaid failed to initialize globally."),n(!1);return}if(!e||e.trim()===""){n(!1),s.current&&(s.current.innerHTML=""),d(null);return}(async()=>{try{const M=e.trim();if(!M){n(!1),s.current&&(s.current.innerHTML=""),d(null);return}const I=`${i.current}-render`,q=await ja.render(I,M);q&&typeof q.svg=="string"&&q.svg.length>0?(d(q.svg),typeof q.bindFunctions=="function"?u(()=>q.bindFunctions):u(null)):(c("Failed to render Mermaid diagram: SVG content is empty or invalid."),d(null))}catch(M){console.error(`[MermaidDiagram ${i.current}] Error rendering Mermaid diagram:`,M),c(M instanceof Error?M.message:"An unknown error occurred while rendering the diagram."),d(null)}finally{n(!1)}})().catch(M=>{console.error(`[MermaidDiagram ${i.current}] Unhandled error in renderMermaid:`,M),c(M instanceof Error?M.message:"An unexpected error occurred."),n(!1)})},[e]),H.useEffect(()=>{const T=s.current;if(!T)return;const M=()=>{o.current&&(o.current.destroy(),o.current=null),m(!1)};if(!h){T.innerHTML="",M();return}T.innerHTML=h;const I=T.querySelector("svg");let q=!1;const X=[];if(I){const Y=()=>{if(q)return;const D=I.getBBox();if(!D||D.width===0||D.height===0){setTimeout(Y,100);return}o.current&&o.current.destroy();const A=Uh(I,{startScale:1,minScale:.5,maxScale:10,origin:"0 0",animate:!0,noBind:!0,cursor:""});o.current=A;let F=!1,P=0,z=0;const E=W=>{if(!F)return;const G=A.getScale()||1,V=(W.clientX-P)/G,Q=(W.clientY-z)/G;P=W.clientX,z=W.clientY,A.pan(V,Q,{relative:!0,force:!0,animate:!1})},N=()=>{F&&(F=!1,T.style.cursor=b.current.panTrigger==="drag"?"move":"",window.removeEventListener("pointermove",E),window.removeEventListener("pointerup",N),window.removeEventListener("pointercancel",N))},B=W=>{VB(b.current,W)&&(F=!0,P=W.clientX,z=W.clientY,T.style.cursor="grabbing",window.addEventListener("pointermove",E),window.addEventListener("pointerup",N),window.addEventListener("pointercancel",N),W.preventDefault())},U=W=>{ZB(b.current,W)&&(W.preventDefault(),A.zoomWithWheel(W))};T.addEventListener("pointerdown",B),T.addEventListener("wheel",U,{passive:!1}),X.push(()=>{T.removeEventListener("pointerdown",B),T.removeEventListener("wheel",U),window.removeEventListener("pointermove",E),window.removeEventListener("pointerup",N),window.removeEventListener("pointercancel",N)}),T.style.cursor=b.current.panTrigger==="drag"?"move":"",m(!0)};Y()}return f&&f(T),()=>{q=!0;for(const Y of X)Y();M()}},[h,f]),H.useEffect(()=>{p&&s.current&&(s.current.style.overflow="visible")},[p]);const _=H.useCallback(()=>S(T=>!T),[]),$=H.useCallback(T=>{x(T),S(!1)},[]);return a?w.jsx("div",{className:"flex h-32 items-center justify-center bg-white dark:bg-gray-800 dark:text-white",children:"🌀 Loading diagram..."}):l?w.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: ",l]}):w.jsxs("div",{className:"relative",children:[w.jsx("div",{ref:s,className:"mermaid mermaid-diagram-container bg-white dark:bg-gray-400",style:{overflow:"visible"}}),p&&w.jsxs("div",{className:"absolute top-2 right-2 z-10 flex items-start gap-1",children:[!r&&w.jsxs("div",{ref:v,className:"relative",children:[w.jsx("button",{type:"button",onClick:_,className:"flex h-8 w-8 items-center justify-center rounded border border-gray-200 bg-white p-1 text-gray-700 shadow hover:bg-gray-100 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-700","aria-label":"マウス操作モード","aria-haspopup":"menu","aria-expanded":k,children:w.jsx(fy,{size:18})}),k&&w.jsx("div",{role:"menu","aria-label":"マウス操作モード",className:"absolute right-0 mt-1 w-60 overflow-hidden rounded border border-gray-200 bg-white py-1 text-sm shadow-lg dark:border-gray-600 dark:bg-gray-800",children:XB.map(T=>{const M=T.value===y;return w.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":M,onClick:()=>$(T.value),className:`flex w-full items-center gap-2 px-3 py-1.5 text-left hover:bg-gray-100 dark:hover:bg-gray-700 ${M?"font-semibold text-blue-600 dark:text-blue-400":"text-gray-700 dark:text-gray-300"}`,children:[w.jsx("span",{className:"w-3 shrink-0",children:M?"✓":""}),w.jsx("span",{children:T.label})]},T.value)})})]}),w.jsx("button",{type:"button",onClick:()=>o.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:w.jsx(ky,{size:20})}),w.jsx("button",{type:"button",onClick:()=>o.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:w.jsx(vy,{size:20})}),w.jsx("button",{type:"button",onClick:()=>o.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:w.jsx(dy,{size:18})})]})]})};Qm.displayName="MermaidDiagramInternal";const al=H.memo(Qm);function KB(e){const t={};for(const r in e){const i=e[r];switch(r){case"class":t.className=i;break;case"style":{const s={};for(const o of i.split(";")){const[a,n]=o.split(":");if(a&&n){const l=a.trim().replace(/-(\w)/g,(c,h)=>h.toUpperCase());l.startsWith("-")?s[l.substring(1)]=n.trim():s[l]=n.trim()}}t.style=s;break}case"tabindex":t.tabIndex=Number(i);break;default:t[r]=i}}return t}const QB=({code:e})=>{const[t,r]=H.useState(!1),i=()=>{navigator.clipboard.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),2e3)},s=>{console.error("Failed to copy: ",s)})};return w.jsx("button",{type:"button",className:"copy-button 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"})},JB=({htmlPromise:e,filename:t,code:r})=>{const i=H.use(e),s={replace:o=>{if(o instanceof de.Element&&o.name==="pre"){const a=KB(o.attribs),n=t?"2.2rem 0 1rem 0":"1rem 0";if(typeof a.style=="object"){const{backgroundColor:l,...c}=a.style;a.style={...c,margin:"0",padding:"0.8rem 0"}}else a.style={margin:"0",padding:"0.8rem 0"};return a.className=`${a.className||""} bg-gray-900 dark:bg-gray-900`,w.jsxs("div",{className:"relative",style:{margin:n},children:[t&&w.jsx("div",{className:"code-filename absolute -top-4 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}),w.jsx(QB,{code:r}),w.jsx("pre",{...a,children:de.domToReact(o.children,s)})]})}},htmlparser2:{lowerCaseTags:!0}};return w.jsx(w.Fragment,{children:de(i,s)})},tL=/^(diff)?:?(\w+):?([\w.-]*)?/,eL=()=>({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 s=i.value;let o,a="",n="";if(s.startsWith("+")?(o="+",a="background-color: rgba(16, 185, 129, 0.2);",n="bg-green-200 dark:bg-green-400/90 text-green-700"):s.startsWith("-")&&(o="-",a="background-color: rgba(239, 68, 68, 0.2);",n="bg-red-200 dark:bg-red-400/90 text-red-700"),o){t.properties.style=a,i.value=s.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 ${n}`},children:[{type:"text",value:o==="+"?"➕":"➖"}]};t.children.unshift(l)}}}}),rL=e=>{const t=tL.exec(e??"");return{isDiff:t?.[1]==="diff",lang:t?.[2]||"text",filename:t?.[3]||void 0}},nl=({lang:e,code:t,node:r})=>{const i=e??r?.lang??void 0,s=t??r?.value??"",{isDiff:o,lang:a,filename:n}=rL(i),l=H.useMemo(async()=>{const c=[];return o&&c.push(eL()),await P0.codeToHtml(s,{lang:a,themes:{light:"solarized-light",dark:"github-dark-high-contrast"},transformers:c})},[s,a,o]);return a==="mermaid"?w.jsx(al,{chartContent:s}):w.jsx(H.Suspense,{fallback:w.jsx("div",{className:"dark:text-white",children:"🌀 Loading code..."}),children:w.jsx(JB,{htmlPromise:l,filename:n,code:s})})},Jm=({code:e})=>{const[t,r]=H.useState(!1),i=()=>{navigator.clipboard.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),2e3)},s=>{console.error("Failed to copy: ",s)})};return w.jsx("button",{type:"button",className:"copy-button 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"})},iL=({node:e})=>{const t=H.useRef(null);return H.useLayoutEffect(()=>{try{t.current&&Ya.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]),w.jsxs("div",{className:"relative",children:[w.jsx(Jm,{code:e.value}),w.jsx("article",{ref:t,className:"rounded-md px-1.5 py-1 font-mono text-gray-800 text-sm dark:text-gray-200"})]})},sL=(e,t=64)=>`https://www.google.com/s2/favicons?domain=${encodeURIComponent(e)}&size=${t}`,ll=({href:e,isExternal:t,metadata:r})=>{const[i,s]=H.useState(!1);H.useEffect(()=>{s(!0)},[]);const o=H.useMemo(()=>r?Promise.resolve(r):i?fetch(`/api/site_metadata?url=${encodeURIComponent(e)}`).then(a=>a.ok?a.json():null).catch(()=>null):null,[r,e,i]);return o===null?w.jsx(Nh,{}):w.jsx(H.Suspense,{fallback:w.jsx(Nh,{}),children:w.jsx(oL,{metadataPromise:o,href:e,isExternal:t})})},oL=({metadataPromise:e,href:t})=>{const r=H.use(e);if(r===null)return w.jsx(aL,{href:t});let i=t;try{i=new URL(r.url||t).hostname}catch{}return w.jsxs("a",{className:"!border !border-solid !border-gray-200 dark:!border-neutral-800 hover:!border-gray-300 dark:hover:!border-neutral-700 !no-underline flex h-36 w-full gap-2 overflow-hidden rounded-xl bg-white shadow-sm transition-all duration-300 hover:-translate-y-0.5 hover:shadow-md dark:bg-neutral-900",href:r.url||t,target:"_blank",rel:"noreferrer",children:[w.jsxs("div",{className:"flex flex-1 flex-col justify-between p-2 px-4",children:[w.jsx("div",{className:"!text-gray-900 dark:!text-gray-100 !no-underline line-clamp-1 break-words font-semibold",children:r.title||r.site_name||t}),w.jsx("div",{className:"my-1 flex-1",children:w.jsx("div",{className:"!text-gray-500 dark:!text-gray-400 !no-underline line-clamp-2 break-words text-xs",children:r.description})}),w.jsxs("div",{className:"!no-underline mt-auto flex items-center gap-2",children:[w.jsx("img",{src:sL(t,16),alt:"",width:16,height:16,className:"rounded-sm"}),w.jsx("span",{className:"!text-gray-400 dark:!text-gray-500 !no-underline line-clamp-1 text-xs",children:r.site_name||i})]})]}),w.jsx("div",{className:"h-full w-48 max-w-[35%] flex-shrink-0 overflow-hidden",children:r.image?w.jsx("img",{className:"h-full w-full object-cover transition-transform duration-300 hover:scale-105",src:r.image,alt:""}):w.jsx("div",{className:"flex h-full w-full items-center justify-center bg-gray-100 text-gray-300 dark:bg-neutral-800 dark:text-neutral-700",children:w.jsxs("svg",{className:"h-8 w-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[w.jsx("title",{children:"Placeholder Image"}),w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})]})})})]})},aL=({href:e})=>w.jsx("a",{className:"!border !border-solid !border-gray-200 dark:!border-neutral-800 hover:!border-gray-300 dark:hover:!border-neutral-700 !no-underline flex gap-2 rounded-xl bg-white p-4 transition-all duration-300 hover:-translate-y-0.5 hover:shadow-sm dark:bg-neutral-900",href:e,target:"_blank",rel:"noreferrer",children:w.jsx("div",{className:"!text-gray-500 dark:!text-gray-400 !no-underline break-all text-sm",children:e})}),Nh=()=>w.jsxs("div",{className:"!border !border-solid !border-gray-200 dark:!border-neutral-800 flex h-36 w-full gap-2 overflow-hidden rounded-xl bg-white shadow-sm dark:bg-neutral-900",children:[w.jsxs("div",{className:"flex flex-1 flex-col justify-between p-2 px-4",children:[w.jsxs("div",{className:"flex flex-col gap-2",children:[w.jsx("div",{className:"h-4 w-full animate-pulse rounded bg-gray-200 dark:bg-neutral-800"}),w.jsx("div",{className:"h-4 w-4/5 animate-pulse rounded bg-gray-200 dark:bg-neutral-800"})]}),w.jsxs("div",{className:"flex flex-col gap-2",children:[w.jsx("div",{className:"h-3 w-full animate-pulse rounded bg-gray-200 dark:bg-neutral-800"}),w.jsx("div",{className:"h-3 w-4/5 animate-pulse rounded bg-gray-200 dark:bg-neutral-800"})]}),w.jsx("div",{className:"mt-auto h-4 w-4 animate-pulse rounded-sm bg-gray-200 dark:bg-neutral-800"})]}),w.jsx("div",{className:"h-full w-48 max-w-[35%] flex-shrink-0 animate-pulse bg-gray-200 dark:bg-neutral-800"})]});let ts=null;const nL=()=>typeof window>"u"||typeof document>"u"?Promise.resolve(null):ts||(ts=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."))},s=document.getElementById(r);if(s){s.addEventListener("load",i),s.addEventListener("error",()=>t(new Error("Failed to load Twitter script.")));return}const o=document.createElement("script");o.id=r,o.src="https://platform.twitter.com/widgets.js",o.async=!0,o.charset="utf-8",o.onload=i,o.onerror=()=>t(new Error("Failed to load Twitter script.")),document.body.appendChild(o)}),ts),lL=({promise:e})=>(H.use(e),null),hL=({setPromise:e,createPromise:t})=>{const r=H.useRef(null);return H.useEffect(()=>{const i=r.current;if(!i){console.warn("Mount point for Twitter widget not found.");return}const s=t(i).then(o=>{if(!o){console.warn("createPromise から要素が返されませんでした。");return}return o}).catch(o=>{console.error("ツイートウィジェットの作成中にエラーが発生しました:",o),i.innerText=`ツイートの読み込みエラー: ${o.message}`});return e(s),()=>{i.innerHTML=""}},[t,e]),w.jsx("div",{ref:r,className:"twitter-embed min-h-24"})},cL=({node:e,loadWidgetsPromise:t,theme:r})=>{const i=H.use(t),s=H.useRef(null),o=H.useRef(null),[a,n]=H.useState(null),[l,c]=H.useState(null),h=H.useCallback(f=>{let u;return f&&i?new Promise((p,m)=>{s.current=p,o.current=m;const y=new MutationObserver(()=>{f?.querySelector(".twitter-tweet > iframe:last-of-type")?.addEventListener("load",()=>{u&&clearTimeout(u),y?.disconnect(),s.current=null,o.current=null,p(f)},{once:!0,passive:!0,capture:!0})});u=setTimeout(()=>{y.disconnect(),s.current=null,o.current=null,m(new Error("ツイートの作成が 10 秒後にタイムアウトしました。"))},1e4),y.observe(f,{childList:!0,subtree:!0,attributes:!1,characterData:!1}),i?.createTweet(e.tweetId,f,{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=>{u&&clearTimeout(u),y.disconnect(),s.current=null,o.current=null,m(x),console.error("ツイートウィジェットの作成中にエラーが発生しました:",x)})}):new Promise((p,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]),d=H.useMemo(()=>w.jsx(hL,{setPromise:c,createPromise:h}),[h]);return H.useEffect(()=>(n(d),()=>{s.current&&(s.current(void 0),s.current=null,o.current=null)}),[d]),i?w.jsxs(H.Suspense,{fallback:w.jsx("div",{className:"min-h-24",children:"🌀 Loading Tweet..."}),children:[a,l&&w.jsx(lL,{promise:l})]}):w.jsx("div",{className:"min-h-24",children:"🌀 Loading Twitter renderer..."})},hl=({node:e,theme:t})=>{const r=H.useMemo(()=>nL(),[]);return w.jsx(H.Suspense,{fallback:w.jsx("div",{className:"min-h-24",children:"🌀 Loading Twitter widget..."}),children:w.jsx(cL,{node:e,loadWidgetsPromise:r,theme:t})})},cl=({node:e})=>{const{videoId:t,params:r}=e,i={...r,rel:"0"},s=new URLSearchParams(i).toString();return w.jsx("iframe",{className:"aspect-video w-full max-w-[560px] rounded-lg",src:`https://www.youtube.com/embed/${t}${s?`?${s}`:""}`,title:"YouTube video player",allow:"accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",referrerPolicy:"strict-origin-when-cross-origin",allowFullScreen:!0})},Xt=new gs.Logger(gs.LogLevel.INFO,"[DifyIFramePlugin]"),t0=({iframeHtml:e,iFrameAllowedDomains:t=[]})=>{const[r,i]=H.useState(!0),[s,o]=H.useState(!1),a=H.useRef(null),n=H.useRef(null),c=H.useCallback(p=>p.match(/src\s*=\s*["']([^"']*)["']/i)?.[1]||"",[])(e),h=H.useCallback(p=>{try{const m=new URL(p);return t.includes(m.hostname)}catch{return!1}},[t]),d=H.useCallback(p=>{if(!h(p.origin))return;const{type:m}=p.data;m==="dify-chatbot-iframe-ready"&&(Xt.info("Dify chatbot iframe is ready"),i(y=>y&&(o(!1),a.current&&(clearTimeout(a.current),a.current=null),n.current&&(clearTimeout(n.current),n.current=null),!1)))},[h]),f=H.useCallback(()=>{const p=document.querySelector(`iframe[src="${c}"]`);if(p)try{if(!p.contentDocument)throw new Error("Cannot access iframe content");i(y=>y&&(o(!1),!1))}catch{Xt.info("Crossorigin error detected, showing auth prompt"),o(y=>y||(i(!1),!0))}},[c]),u=H.useCallback(p=>{const m=window.open(p,"dify-oauth","width=500,height=600,scrollbars=yes,resizable=yes");if(!m){Xt.error("ポップアップがブロックされました");return}const y=setInterval(()=>{if(m.closed){clearInterval(y),Xt.info("ポップアップが閉じられました");try{Xt.info("ポップアップURL:",m.location.href)}catch(b){Xt.info("クロスオリジンのためURLにアクセスできません:",b)}const x=document.querySelector(`iframe[src="${p}"]`);if(x?.src){const b=x.src;i(k=>k||!0),o(k=>k&&!1),x.src="",setTimeout(()=>{x.src=b,a.current=setTimeout(()=>{Xt.warn("認証後タイムアウト: dify-chatbot-iframe-ready not received after auth"),f()},5e3)},100)}}},1e3);Xt.info("ポップアップを開きました:"),Xt.info("- 初期URL:",p),Xt.info("- ウィンドウ名:","dify-oauth"),Xt.info("- ウィンドウサイズ: 500x600")},[f]);return H.useEffect(()=>(window.addEventListener("message",d),()=>{window.removeEventListener("message",d)}),[d]),H.useEffect(()=>{const p=setTimeout(()=>{Xt.warn("Timeout: dify-chatbot-iframe-ready not received, checking iframe access"),f()},5e3);return n.current=p,()=>{n.current&&(clearTimeout(n.current),n.current=null)}},[f]),H.useEffect(()=>()=>{a.current&&(clearTimeout(a.current),a.current=null)},[]),h(c)?w.jsxs("div",{className:"dify-iframe-container",children:[r&&!s&&w.jsxs("div",{className:"flex items-center justify-center rounded-lg bg-gray-50 p-8",children:[w.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-blue-600 border-b-2"}),w.jsx("span",{className:"ml-3 text-gray-600",children:"Dify チャットボットを読み込み中..."})]}),s&&w.jsxs("div",{className:"mb-4 rounded-lg border border-blue-200 bg-blue-50 p-6",children:[w.jsx("div",{className:"flex items-center",children:w.jsxs("div",{className:"text-blue-800",children:[w.jsx("h3",{className:"font-medium",children:"認証が必要です"}),w.jsx("p",{className:"mt-1 text-sm",children:"Dify チャットボットにアクセスするには OAuth 認証が必要です。 ポップアップウィンドウで認証を完了してください。"})]})}),w.jsx("div",{className:"mt-4",children:w.jsx("button",{type:"button",onClick:()=>u(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 認証を開始"})})]}),w.jsx("div",{className:`${r||s?"hidden":"block"}`,dangerouslySetInnerHTML:{__html:e}})]}):(Xt.warn("DifyIFramePlugin: Invalid domain for iframe:",c),null)},dL=/^[a-z][a-z0-9+.-]*:/,e0=({htmlContent:e,theme:t="light",iFrameAllowedDomains:r=[],mermaidInteraction:i})=>{const s={replace:o=>{if(o instanceof de.Element){if(o.name==="pre"&&o.children.length===1){const a=o.children[0];if(a instanceof de.Element&&a.name==="code"&&a.attribs.class?.includes("language-mermaid")){const n=de.domToReact(a.children);return w.jsx(al,{chartContent:n,interaction:i})}}if(o.name==="pre"&&o.children.length===1){const a=o.children[0];if(a instanceof de.Element&&a.name==="code"){const l=(a.attribs.class||"").replace("language-",""),c=de.domToReact(a.children);return w.jsx(nl,{lang:l,code:c,theme:t})}}if(o.name==="iframe"){const a=o.attribs.src||"";if(o.attribs["data-plugin-type"]==="dify"){const l=o.attribs.width||"100%",c=o.attribs.height||"600px",h=o.attribs.title||"",d=o.attribs.frameborder||"0",f=o.attribs.allow||"",u=o.attribs.allowfullscreen!==void 0?"allowfullscreen":"",p=`<iframe src="${a}" data-plugin-type="dify" width="${l}" height="${c}" title="${h}" frameborder="${d}" allow="${f}" ${u}></iframe>`;return w.jsx(t0,{iframeHtml:p,iFrameAllowedDomains:r})}if(a)try{const l=new URL(a);if(!r.includes(l.hostname))return null}catch{return null}}if(o.name==="div"){const a=o.attribs["data-plugin-type"];if(a==="youtube"){const n=o.attribs["data-video-id"];return w.jsx(cl,{node:{type:"youtube-embed",videoId:n,params:{}}})}if(a==="twitter"){const n=o.attribs["data-tweet-id"];return w.jsx(hl,{node:{type:"twitter-embed",tweetId:n},theme:t==="dark"?"dark":"light"})}if(a==="block-link"){const n=o.attribs["data-url"];return w.jsx(ll,{href:n,isExternal:!0})}}if(o.name==="span"&&o.attribs.class?.includes("math")){const a=o.attribs.class.includes("display"),n=h=>{let d="";for(const f of h)f.type==="text"?d+=f.data:f.children&&(d+=n(f.children));return d};let c=n(o.children).trim();a?c=c.replace(/^\\\[/,"").replace(/\\\]$/,""):c=c.replace(/^\\\(/,"").replace(/\\\)$/,"");try{const h=Ya.renderToString(c,{displayMode:a,throwOnError:!1});return a?w.jsxs("span",{className:"group relative block",children:[w.jsx(Jm,{code:c}),w.jsx("span",{dangerouslySetInnerHTML:{__html:h}})]}):w.jsx("span",{dangerouslySetInnerHTML:{__html:h}})}catch(h){return console.error("Failed to render math:",h),null}}if(o.name==="a"){const{class:a,...n}=o.attribs;n.href&&dL.test(n.href)&&(n.target="_blank",n.rel="noreferrer");const l=`${a||""} inline-block w-fit text-link underline visited:text-link-visited`.trim();return w.jsx("a",{className:l,...n,children:de.domToReact(o.children,s)})}}}};return w.jsx("div",{className:"markdown-body",children:de(e,s)})},r0=({headings:e,className:t="",onHeadingClick:r})=>{if(e.length===0)return null;const i=Math.min(...e.map(s=>s.depth));return w.jsx("nav",{className:`toc ${t}`,"aria-label":"Table of contents",children:w.jsx("ul",{className:"m-0 list-none p-0",children:e.map(s=>w.jsx("li",{className:"py-1",style:{paddingLeft:`${(s.depth-i)*1}rem`},children:w.jsx("a",{href:`#${s.id}`,className:"block truncate text-gray-600 no-underline hover:text-blue-600 dark:text-gray-400 dark:hover:text-blue-400",onClick:o=>{r&&(o.preventDefault(),r(s.id))},title:s.text,children:s.text})},s.id))})})},i0=[{name:"None",className:""},{name:"GitHub",className:"markdown-body"},{name:"Zenn",className:"znc"}],uL=["left","center","right"],s0="left",fL=(e,t=s0)=>e!=null&&uL.includes(e)?e:t,qo=[{value:"left",label:"左揃え",Icon:Cy},{value:"center",label:"中央揃え",Icon:py},{value:"right",label:"右揃え",Icon:yy}],gL=e=>e==="center"?"auto":e==="right"?"auto 0":"0 auto",pL=24,mL=60,yL=48,br=e=>`calc(max(var(--aiquants-menu-pinned-width, 0px) + ${pL}px, ${mL}px) + ${e*yL}px)`,xL=H.memo(function({headings:t,onHeadingClick:r,position:i,zIndex:s=60,onActivate:o,isOpen:a,onToggle:n,onClose:l,isPinned:c,onPinToggle:h}){const d=H.useRef(null),f={top:"0",right:br(0),...i},u=a,p=H.useCallback(()=>{n(),o?.()},[o,n]),m=H.useCallback(()=>{l()},[l]);return H.useEffect(()=>{if(!u||c)return;const y=x=>{d.current&&!d.current.contains(x.target)&&m()};return document.addEventListener("pointerdown",y),()=>{document.removeEventListener("pointerdown",y)}},[m,c,u]),w.jsxs("div",{ref:d,className:"pointer-events-none fixed flex flex-col items-end",style:{top:f.top,right:f.right,bottom:f.bottom,left:f.left,zIndex:s,transition:"right 0.5s"},children:[w.jsx("button",{type:"button",className:"pointer-events-auto rounded-full border border-gray-200 bg-white p-2 shadow-lg transition-colors hover:bg-gray-100 dark:border-gray-700 dark:bg-gray-800 dark:hover:bg-gray-700",onClick:p,"aria-label":"目次を開く",children:w.jsx(oy,{className:"h-5 w-5 text-gray-600 dark:text-gray-300"})}),u&&w.jsxs("div",{className:"markdown-viewer-scrollbar-thin pointer-events-auto mt-2 max-h-[80vh] w-64 overflow-y-auto rounded-lg border border-gray-200 bg-white p-4 shadow-xl transition-all duration-200 ease-in-out dark:border-gray-700 dark:bg-gray-800",children:[w.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[w.jsx("h3",{className:"font-bold text-gray-500 text-sm uppercase tracking-wider",children:"目次"}),w.jsx("button",{type:"button",className:"rounded p-1 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-600 dark:hover:bg-gray-700 dark:hover:text-gray-300",onClick:h,"aria-label":c?"目次のピン留めを解除":"目次をピン留め",children:c?w.jsx(Ga,{className:"h-4 w-4"}):w.jsx(Xa,{className:"h-4 w-4"})})]}),w.jsx(r0,{headings:t,className:"text-sm",onHeadingClick:r})]})]})}),CL=H.memo(function({currentStyle:t,availableStyles:r,onStyleChange:i,position:s,zIndex:o=50,onActivate:a,isOpen:n,onToggle:l,onClose:c,isPinned:h,onPinToggle:d}){const f=H.useRef(null),u={top:"0",right:br(1),...s},p=n,m=H.useCallback(()=>{l(),a?.()},[a,l]),y=H.useCallback(()=>{c()},[c]);return H.useEffect(()=>{if(!p||h)return;const x=b=>{f.current&&!f.current.contains(b.target)&&y()};return document.addEventListener("pointerdown",x),()=>{document.removeEventListener("pointerdown",x)}},[y,h,p]),w.jsxs("div",{ref:f,className:"pointer-events-none fixed flex flex-col items-end",style:{top:u.top,right:u.right,bottom:u.bottom,left:u.left,zIndex:o,transition:"right 0.5s"},children:[w.jsx("button",{type:"button",className:"pointer-events-auto rounded-full border border-gray-200 bg-white p-2 shadow-lg transition-colors hover:bg-gray-100 dark:border-gray-700 dark:bg-gray-800 dark:hover:bg-gray-700",onClick:m,"aria-label":"表示スタイルを選択",children:w.jsx(ny,{className:"h-5 w-5 text-gray-600 dark:text-gray-300"})}),p&&w.jsxs("div",{className:"pointer-events-auto mt-2 w-48 rounded-lg border border-gray-200 bg-white p-2 shadow-xl transition-all duration-200 ease-in-out dark:border-gray-700 dark:bg-gray-800",children:[w.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[w.jsx("h3",{className:"px-2 font-bold text-gray-500 text-sm uppercase tracking-wider",children:"表示スタイル"}),w.jsx("button",{type:"button",className:"rounded p-1 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-600 dark:hover:bg-gray-700 dark:hover:text-gray-300",onClick:d,"aria-label":h?"スタイル選択のピン留めを解除":"スタイル選択をピン留め",children:h?w.jsx(Ga,{className:"h-4 w-4"}):w.jsx(Xa,{className:"h-4 w-4"})})]}),w.jsx("div",{className:"space-y-1",children:r.map(x=>{const b=t===x.name;return w.jsx("button",{type:"button",className:`w-full rounded px-2 py-1 text-left text-sm transition-colors ${b?"bg-blue-100 font-medium text-blue-800 dark:bg-blue-900 dark:text-blue-200":"text-gray-700 hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-gray-700"}`,onClick:()=>{i(x.name),h||y()},children:x.name},x.name)})})]})]})}),bL=H.memo(function({currentAlign:t,onAlignChange:r,position:i,zIndex:s=40,onActivate:o,isOpen:a,onToggle:n,onClose:l,isPinned:c,onPinToggle:h}){const d=H.useRef(null),f={top:"0",right:br(2),...i},u=a,p=(qo.find(x=>x.value===t)??qo[0]).Icon,m=H.useCallback(()=>{n(),o?.()},[o,n]),y=H.useCallback(()=>{l()},[l]);return H.useEffect(()=>{if(!u||c)return;const x=b=>{d.current&&!d.current.contains(b.target)&&y()};return document.addEventListener("pointerdown",x),()=>{document.removeEventListener("pointerdown",x)}},[y,c,u]),w.jsxs("div",{ref:d,className:"pointer-events-none fixed flex flex-col items-end",style:{top:f.top,right:f.right,bottom:f.bottom,left:f.left,zIndex:s,transition:"right 0.5s"},children:[w.jsx("button",{type:"button",className:"pointer-events-auto rounded-full border border-gray-200 bg-white p-2 shadow-lg transition-colors hover:bg-gray-100 dark:border-gray-700 dark:bg-gray-800 dark:hover:bg-gray-700",onClick:m,"aria-label":"揃えを選択",children:w.jsx(p,{className:"h-5 w-5 text-gray-600 dark:text-gray-300"})}),u&&w.jsxs("div",{className:"pointer-events-auto mt-2 w-48 rounded-lg border border-gray-200 bg-white p-2 shadow-xl transition-all duration-200 ease-in-out dark:border-gray-700 dark:bg-gray-800",children:[w.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[w.jsx("h3",{className:"px-2 font-bold text-gray-500 text-sm uppercase tracking-wider",children:"揃え"}),w.jsx("button",{type:"button",className:"rounded p-1 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-600 dark:hover:bg-gray-700 dark:hover:text-gray-300",onClick:h,"aria-label":c?"揃え選択のピン留めを解除":"揃え選択をピン留め",children:c?w.jsx(Ga,{className:"h-4 w-4"}):w.jsx(Xa,{className:"h-4 w-4"})})]}),w.jsx("div",{className:"space-y-1",children:qo.map(({value:x,label:b,Icon:k})=>{const S=t===x;return w.jsxs("button",{type:"button",className:`flex w-full items-center gap-2 rounded px-2 py-1 text-left text-sm transition-colors ${S?"bg-blue-100 font-medium text-blue-800 dark:bg-blue-900 dark:text-blue-200":"text-gray-700 hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-gray-700"}`,onClick:()=>{r(x),c||y()},children:[w.jsx(k,{className:"h-4 w-4"}),b]},x)})})]})]})}),kL=H.memo(function({parseResult:t,theme:r,styleClassName:i,iFrameAllowedDomains:s}){return w.jsx("div",{className:"w-full min-w-0",children:w.jsx("div",{className:i,"data-theme":r,children:w.jsx(e0,{htmlContent:t.htmlContent,theme:r,iFrameAllowedDomains:s})})})});function o0(){const[e,t]=H.useState("toc"),[r,i]=H.useState(!1),[s,o]=H.useState(!1),[a,n]=H.useState(!1),[l,c]=H.useState(!1),[h,d]=H.useState(!1),[f,u]=H.useState(!1),p=H.useCallback(()=>t("toc"),[]),m=H.useCallback(()=>i(I=>!I),[]),y=H.useCallback(()=>i(!1),[]),x=H.useCallback(()=>c(I=>!I),[]),b=H.useCallback(()=>t("style"),[]),k=H.useCallback(()=>o(I=>!I),[]),S=H.useCallback(()=>o(!1),[]),v=H.useCallback(()=>d(I=>!I),[]),_=H.useCallback(()=>t("align"),[]),$=H.useCallback(()=>n(I=>!I),[]),T=H.useCallback(()=>n(!1),[]),M=H.useCallback(()=>u(I=>!I),[]);return{lastActiveMenu:e,isTocOpen:r,isStyleOpen:s,isAlignOpen:a,isTocPinned:l,isStylePinned:h,isAlignPinned:f,activateToc:p,toggleToc:m,closeToc:y,togglePinToc:x,activateStyle:b,toggleStyle:k,closeStyle:S,togglePinStyle:v,activateAlign:_,toggleAlign:$,closeAlign:T,togglePinAlign:M}}function wL({parseResult:e,content:t,error:r=null,isLoading:i=!1,theme:s,style:o,onStyleChange:a,availableStyles:n=i0,align:l=s0,onAlignChange:c,showToc:h=!0,showStyle:d=!0,showAlign:f=!0,tocPosition:u,stylePosition:p,alignPosition:m,width:y,maxWidth:x,padding:b=16,iFrameAllowedDomains:k,emptyMessage:S="ファイルを選択してください。",toolbar:v}){const _=H.useRef(null),$=H.useRef(null),T=o0(),M=v??T,I=Number.isFinite(b)&&b>=0?b:16,q=f&&typeof c=="function",X=H.useCallback(Z=>{const st=_.current;if(st){const ft=st.querySelector("[data-theme]"),dt=st.getBoundingClientRect(),gt=ft?.children;let Bt=-1,zt=Number.POSITIVE_INFINITY;if(gt)for(let Yt=0;Yt<gt.length;Yt+=1){const We=gt[Yt],dl=Math.abs(We.getBoundingClientRect().top-dt.top);dl<zt&&(zt=dl,Bt=Yt)}if(gt&&Bt>=0){const We=gt[Bt].getBoundingClientRect();$.current={childIndex:Bt,offset:We.top-dt.top}}else $.current=null}a(Z)},[a]);H.useLayoutEffect(()=>{const Z=$.current;if(!Z)return;$.current=null;const st=_.current;if(!st)return;const dt=st.querySelector("[data-theme]")?.children[Z.childIndex];if(!dt)return;const gt=st.getBoundingClientRect(),zt=dt.getBoundingClientRect().top-gt.top;st.scrollTop+=zt-Z.offset});const Y=H.useCallback(Z=>{const st=document.getElementById(Z);st&&st.scrollIntoView({behavior:"smooth"})},[]),D=H.useMemo(()=>n.find(st=>st.name===o)?.className??"markdown-body",[n,o]),A=e?.headings??[],F=A.length>0,P=h&&F,z=M.lastActiveMenu==="style"?60:50,E=M.lastActiveMenu==="toc"?60:50,N=M.lastActiveMenu==="align"?60:50;let B=0;const U=P?br(B++):void 0,W=d?br(B++):void 0,G=q?br(B++):void 0,V=q&&c?w.jsx(bL,{currentAlign:l,onAlignChange:c,position:{right:G,...m},zIndex:N,onActivate:M.activateAlign,isOpen:M.isAlignOpen,onToggle:M.toggleAlign,onClose:M.closeAlign,isPinned:M.isAlignPinned,onPinToggle:M.togglePinAlign}):null,Q=()=>i?w.jsx("p",{children:"🌀 Loading data..."}):r?w.jsxs("p",{className:"text-red-500",children:["エラー: ",r]}):e?w.jsxs("div",{className:"relative w-full min-w-0",children:[w.jsx(kL,{parseResult:e,theme:s,styleClassName:D,iFrameAllowedDomains:k}),d&&w.jsx(CL,{currentStyle:o,availableStyles:n,onStyleChange:X,position:{right:W,...p},zIndex:z,onActivate:M.activateStyle,isOpen:M.isStyleOpen,onToggle:M.toggleStyle,onClose:M.closeStyle,isPinned:M.isStylePinned,onPinToggle:M.togglePinStyle}),P&&w.jsx(xL,{headings:A,onHeadingClick:Y,position:{right:U,...u},zIndex:E,onActivate:M.activateToc,isOpen:M.isTocOpen,onToggle:M.toggleToc,onClose:M.closeToc,isPinned:M.isTocPinned,onPinToggle:M.togglePinToc}),V]}):t!==null?w.jsxs(w.Fragment,{children:[w.jsx("pre",{className:"whitespace-pre-wrap break-all",children:t}),V]}):w.jsx("p",{children:S});return w.jsx("div",{ref:_,className:"grid h-full w-full overflow-x-auto overflow-y-auto *:min-w-0",style:{padding:`${I}px`},children:w.jsx("div",{style:{width:y,maxWidth:x,marginInline:gL(l)},children:Q()})})}const a0=({node:e})=>{const r=e.data?.siteMetadata;return w.jsx("div",{className:"mt-6 mb-6",children:w.jsx(ll,{href:e.url,isExternal:!0,metadata:r})})},n0=({node:e})=>w.jsx("del",{children:w.jsx(St,{nodes:e.children})}),l0=({node:e})=>w.jsx("em",{children:w.jsx(St,{nodes:e.children})}),h0=({node:e})=>w.jsx("sup",{children:w.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,"]"]})}),vL=({nodes:e,theme:t="light"})=>e.length===0?null:w.jsx("section",{className:"border-[#171717] border-t pt-4 dark:border-[#464646]",children:w.jsx("ol",{className:"pl-6 text-[#686868] text-sm dark:text-[#a4a5a9]",children:e.map((r,i)=>w.jsx("li",{id:`fn-${r.identifier}`,className:i===0?"":"mt-4",children:w.jsx(St,{nodes:r.children,theme:t})},`mdast-node-fn-${r.identifier}-${i}`))})}),c0=({node:e})=>w.jsx("a",{href:e.url,className:"text-[#316dce] underline visited:text-[#6b46c1] dark:text-[#3182ce] dark:visited:text-[#805ad5]",children:"↩"}),SL=e=>e.replace(/<rt\b[^>]*>[\s\S]*?<\/rt>/gi,"").replace(/<rp\b[^>]*>[\s\S]*?<\/rp>/gi,"").replace(/<[^>]+>/g,"").replace(/ /gi," ").replace(/&/gi,"&").replace(/</gi,"<").replace(/>/gi,">").replace(/"/gi,'"').replace(/'/gi,"'").replace(/&#(\d+);/g,(s,o)=>{const a=Number(o);return Number.isFinite(a)?String.fromCodePoint(a):""}).replace(/&#x([0-9a-f]+);/gi,(s,o)=>{const a=Number.parseInt(o,16);return Number.isFinite(a)?String.fromCodePoint(a):""}).replace(/\s+/g," ").trim(),d0=e=>{const t=r=>{if(!r||typeof r!="object")return"";if("type"in r&&r.type==="html"){const i=r.value;return typeof i=="string"?SL(i):""}if("value"in r){const i=r.value;if(typeof i=="string")return i}return"children"in r&&Array.isArray(r.children)?r.children.map(i=>t(i)).join(""):""};return e.map(r=>t(r)).join("").replace(/\s+/g," ").trim()},TL=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"}},u0=({node:e})=>{const t=new O0,r=`h${e.depth}`,i=e.data?.hProperties?.id,s=t.slug(d0(e.children));return w.jsx(r,{id:i||s,className:TL(e.depth),children:w.jsx(St,{nodes:e.children})})},_L=e=>{const t={};return e.split(";").forEach(r=>{const[i,...s]=r.split(":");if(i&&s.length>0){const o=s.join(":"),a=i.trim().replace(/-([a-z])/g,n=>n[1]?n[1].toUpperCase():"");t[a]=o.trim()}}),t},BL=({node:e,theme:t,iFrameAllowedDomains:r})=>{const{tagName:i="div",properties:s={}}=e.data||{},o=i,a={...s};if(s.style&&typeof s.style=="string"){const n=_L(s.style);a.style=n}return w.jsx(o,{...a,children:w.jsx(St,{nodes:e.children,theme:t,iFrameAllowedDomains:r})})},LL={dify:t0},FL=e=>LL[e]||null,ML=/^[a-z][a-z0-9+.-]*:/,AL=({node:e,iFrameAllowedDomains:t=[]})=>{const[r,i]=H.useState(""),[s,o]=H.useState(!1),[a,n]=H.useState(null);H.useEffect(()=>{if(o(!0),typeof window<"u"){const c=tr(window);let h=null;c.addHook("afterSanitizeAttributes",f=>{const u=f.tagName.toLowerCase();if(u==="iframe"){const p=f.getAttribute("src"),m=f.getAttribute("data-plugin-type");if(p)try{const y=new URL(p);t.includes(y.hostname)?m&&(h={type:m,iframeHtml:f.outerHTML}):f.removeAttribute("src")}catch{f.removeAttribute("src")}}if(u==="a"){f.classList.add("inline-block","w-fit","text-link","underline","visited:text-link-visited");const p=f.getAttribute("href");p&&ML.test(p)&&(f.setAttribute("target","_blank"),f.setAttribute("rel","noreferrer"))}});const d=c.sanitize(e.value,{ADD_TAGS:["iframe"],ADD_ATTR:["src","frameborder","allow","allowfullscreen","target","rel","data-plugin-type","width","height","title","class","style"]});h?n(h):i(d)}},[e.value,t]);const l=/^\s*<(address|article|aside|blockquote|details|dialog|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h[1-6]|header|hgroup|hr|li|main|nav|ol|p|pre|section|table|ul)/i.test(e.value);if(!s)return null;if(a){const{type:c,iframeHtml:h}=a,d=FL(c);if(d)return w.jsx(d,{iframeHtml:h,iFrameAllowedDomains:t});console.warn(`Unknown or unregistered plugin type: ${c}`)}return r===""?null:l?w.jsx("div",{dangerouslySetInnerHTML:{__html:r}}):w.jsx("span",{dangerouslySetInnerHTML:{__html:r}})},f0=({node:e})=>{if(!e.url)return null;const t=e.title??"",r=e.data?.hProperties?.width,i=e.data?.hProperties?.height;return w.jsxs("span",{style:{width:r,height:i},className:"mt-4 mb-4 inline-block w-fit max-w-full",children:[w.jsx("img",{src:e.url,alt:e.alt??"",className:"mx-auto h-full w-full",width:r,height:i}),t&&w.jsx("em",{className:"block text-center text-gray-400 text-xs",children:t})]})},g0=({node:e})=>w.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}),EL=({node:e})=>{const t=H.useRef(null);return H.useLayoutEffect(()=>{try{t.current&&Ya.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]),w.jsx("span",{ref:t,className:"rounded-md px-1.5 py-1 font-mono text-gray-800 text-sm dark:text-gray-200"})},$L=/^[a-z][a-z0-9+.-]*:/,p0=({node:e})=>{const t=$L.test(e.url);return w.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:w.jsx(St,{nodes:e.children})})},m0=({node:e})=>e.children.length===1&&e.children[0].type==="paragraph"?w.jsx("li",{children:w.jsx(St,{nodes:e.children[0].children})}):w.jsx("li",{children:w.jsx(St,{nodes:e.children})}),y0=({node:e})=>{const t=e.ordered?"ol":"ul";return w.jsx(t,{children:w.jsx(St,{nodes:e.children})})},IL=({node:e})=>w.jsx("mark",{children:w.jsx(St,{nodes:e.children})}),x0=({node:e})=>w.jsx("p",{children:w.jsx(St,{nodes:e.children})}),C0=({node:e})=>w.jsx("strong",{children:w.jsx(St,{nodes:e.children})}),PL=({node:e})=>w.jsx("sub",{children:w.jsx(St,{nodes:e.children})}),OL=({node:e})=>w.jsx("sup",{children:w.jsx(St,{nodes:e.children})}),qh=e=>{const t=e.data?.hProperties;return{merged:t?.merged??!1,colSpan:t?.colSpan,rowSpan:t?.rowSpan,textAlign:t?.textAlign}},b0=({node:e})=>{const[t,...r]=e.children;return w.jsx("div",{className:"overflow-x-auto",children:w.jsxs("table",{className:"w-full border-collapse border-none",children:[w.jsx("thead",{className:"bg-gray-100 dark:bg-gray-800",children:w.jsx("tr",{children:t.children.map((i,s)=>{const{merged:o,colSpan:a,rowSpan:n,textAlign:l}=qh(i);return o?null:w.jsx("th",{colSpan:a,rowSpan:n,style:{textAlign:l??e.align?.[s]??void 0},className:"border border-gray-300 px-4 py-2 text-left font-semibold dark:border-gray-600 dark:text-gray-200",children:w.jsx(St,{nodes:i.children})},`mdast-table-node-${e.type}-${s}`)})})}),w.jsx("tbody",{children:r.map((i,s)=>w.jsx("tr",{className:"border-gray-200 border-t bg-white dark:border-gray-700 dark:bg-gray-900",children:i.children.map((o,a)=>{const{merged:n,colSpan:l,rowSpan:c,textAlign:h}=qh(o);return n?null:w.jsx("td",{colSpan:l,rowSpan:c,style:{textAlign:h??e.align?.[a]??void 0},className:"border border-gray-300 px-4 py-2 dark:border-gray-600 dark:text-gray-300",children:w.jsx(St,{nodes:o.children})},`mdast-table-node-${e.type}-${a}`)})},`mdast-table-node-${e.type}-${s}`))})]})})},k0=({node:e})=>w.jsx(w.Fragment,{children:e.value}),w0=()=>w.jsx("hr",{className:"border-gray-300 dark:border-gray-600"}),v0=({node:e})=>{const t=e.data?.title||"";return w.jsxs("details",{className:"markdown-details",children:[w.jsx("summary",{children:t}),w.jsx("div",{className:"markdown-details-content",children:w.jsx(St,{nodes:e.children})})]})},S0=({node:e})=>{const r=["message",e.data?.messageType||"message"].filter(Boolean).join(" ");return w.jsxs("aside",{className:r,children:[w.jsx("span",{className:"message-symbol",style:{userSelect:"none"},children:"!"}),w.jsx("div",{className:"message-content",children:w.jsx(St,{nodes:e.children})})]})},St=({nodes:e,theme:t="light",iFrameAllowedDomains:r=[]})=>e.map((i,s)=>{switch(i.type){case"block-link":return w.jsx(a0,{node:i},`mdast-node-${i.type}-${s}`);case"blockquote":return w.jsx(T0,{node:i},`mdast-node-${i.type}-${s}`);case"break":return w.jsx("br",{},`mdast-node-${i.type}-${s}`);case"code":return w.jsx(nl,{node:i,theme:t},`mdast-node-${i.type}-${s}`);case"delete":return w.jsx(n0,{node:i},`mdast-node-${i.type}-${s}`);case"details":return w.jsx(v0,{node:i},`mdast-node-${i.type}-${s}`);case"emphasis":return w.jsx(l0,{node:i},`mdast-node-${i.type}-${s}`);case"footnoteReference":return w.jsx(h0,{node:i},`mdast-node-${i.type}-${s}`);case"footnoteDefinition":return null;case"footnote-back-link":return w.jsx(c0,{node:i},`mdast-node-${i.type}-${s}`);case"heading":return w.jsx(u0,{node:i},`mdast-node-${i.type}-${s}`);case"html":return w.jsx(AL,{node:i,iFrameAllowedDomains:r},`mdast-node-${i.type}-${s}`);case"html-block-container":{const o=i,a=`mdast-node-${o.type}-${o.position?.start?.offset??"na"}-${o.position?.end?.offset??"na"}`;return w.jsx(BL,{node:o,theme:t,iFrameAllowedDomains:r},a)}case"image":return w.jsx(f0,{node:i},`mdast-node-${i.type}-${s}`);case"inlineCode":return w.jsx(g0,{node:i},`mdast-node-${i.type}-${s}`);case"inlineMath":return w.jsx(EL,{node:i},`mdast-node-${i.type}-${s}`);case"link":return w.jsx(p0,{node:i},`mdast-node-${i.type}-${s}`);case"listItem":return w.jsx(m0,{node:i},`mdast-node-${i.type}-${s}`);case"list":return w.jsx(y0,{node:i},`mdast-node-${i.type}-${s}`);case"mark":return w.jsx(IL,{node:i},`mdast-node-${i.type}-${s}`);case"math":return w.jsx(iL,{node:i},`mdast-node-${i.type}-${s}`);case"message":return w.jsx(S0,{node:i},`mdast-node-${i.type}-${s}`);case"paragraph":return w.jsx(x0,{node:i},`mdast-node-${i.type}-${s}`);case"strong":return w.jsx(C0,{node:i},`mdast-node-${i.type}-${s}`);case"subscript":return w.jsx(PL,{node:i},`mdast-node-${i.type}-${s}`);case"superscript":return w.jsx(OL,{node:i},`mdast-node-${i.type}-${s}`);case"table":return w.jsx(b0,{node:i},`mdast-node-${i.type}-${s}`);case"text":return w.jsx(k0,{node:i},`mdast-node-${i.type}-${s}`);case"thematicBreak":return w.jsx(w0,{},`mdast-node-${i.type}-${s}`);case"yaml":return null;case"twitter-embed":return w.jsx(hl,{node:i,theme:t},`mdast-node-${i.type}-${i.tweetId}-${s}`);case"youtube-embed":return w.jsx(cl,{node:i},`mdast-node-${i.type}-${s}`);default:{if(process.env.NODE_ENV==="development")return w.jsxs("div",{children:[w.jsxs("p",{style:{color:"red"},children:["Unknown node type: ",i.type]}),w.jsx("pre",{children:JSON.stringify(i,null,2)})]},`mdast-node-${i.type}-${s}`);throw new Error(`Unknown node type: ${i.type}`)}}}),T0=({node:e})=>w.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:w.jsx(St,{nodes:e.children})});function RL({text:e,url:t,hashtags:r,via:i,related:s,in_reply_to:o}){const a=new URL("https://twitter.com/intent/tweet");return e!==void 0&&a.searchParams.set("text",e),t!==void 0&&a.searchParams.set("url",t),r!==void 0&&a.searchParams.set("hashtags",r.join(",")),i!==void 0&&a.searchParams.set("via",i),s!==void 0&&a.searchParams.set("related",s.join(",")),o!==void 0&&a.searchParams.set("in_reply_to",o),a.toString()}const _0=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:s,...o}=r;return{videoId:i,params:o}}return null}catch{return null}},B0=async e=>{try{const t=new AbortController,r=setTimeout(()=>t.abort(),1e4),i=await fetch(e,{signal:t.signal});if(clearTimeout(r),!i.ok)return null;const s=await i.text(),o={url:e},a=R0.load(s),n=a("title").text().trim();o.title=n;const l=a("meta");for(const c of l){const h=c.attribs.property;h==="og:site_name"&&(o.site_name=c.attribs.content||void 0),h==="og:title"&&(o.title=c.attribs.content||n),h==="og:description"&&(o.description=c.attribs.content||void 0),h==="og:image"&&(o.image=c.attribs.content||void 0),h==="og:type"&&(o.type=c.attribs.content||void 0),c.attribs.name==="description"&&(o.description=c.attribs.content||void 0)}return o}catch(t){return gs.Logger.error("Error fetching site metadata:",t),null}},DL=()=>e=>{At.visit(e,"paragraph",(t,r,i)=>{const s=t.children[0];t.children.length!==1||s.type!=="link"||s.children.length!==1||!(s.children[0].type==="text"&&s.url===s.children[0].value)||!i||r===void 0||(i.children[r]={type:"block-link",url:s.url})})},ai=new Map,NL=(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"),qL=(e={})=>{const{enableCache:t=!0}=e;return async r=>{const i=[];At.visit(r,"block-link",o=>{NL(o.url,e)&&i.push(o)});const s=i.map(async o=>{const a=o.url;if(t&&ai.has(a)){const n=ai.get(a);n&&(o.data=o.data||{},o.data.siteMetadata=n);return}try{const n=await B0(a);n?(o.data=o.data||{},o.data.siteMetadata=n,t&&ai.set(a,n)):t&&ai.set(a,null)}catch(n){gs.Logger.warn(`Failed to fetch metadata for ${a}:`,n),t&&ai.set(a,null)}});await Promise.all(s)}},zL=/\s*\{#(.+?)\}\s*$/,WL=()=>e=>{At.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,s=i.value.match(zL);if(s){const o=s[1];t.data||(t.data={});const a=t.data,n=a.hProperties||{};n.id=o,a.hProperties=n,i.value=i.value.substring(0,s.index).trimEnd(),i.value===""&&t.children.pop()}})},jL=()=>e=>{At.visit(e,"footnoteDefinition",t=>{At.visit(t,"paragraph",r=>{r.children.push({type:"footnote-back-link",url:`#fnref-${t.identifier}`})})})},HL=()=>e=>{At.visit(e,"html",(t,r,i)=>{if(typeof r!="number"||!i)return;const o=t.value.trim().match(/^<a\s+href="([^"]+)"[^>]*>(.*?)<\/a>$/i);if(o){const[,a,n]=o,l={type:"link",url:a,children:[{type:"text",value:n}]};i.children.splice(r,1,l)}})},YL=()=>e=>{const t=r=>{const i=r.children;if(!i)return;let s=0;for(;s<i.length;){const o=i[s];if(o.type==="html"&&o.value.startsWith("<")&&!o.value.startsWith("</")&&o.value.match(/<([a-zA-Z0-9]+)/)){let n="",l=0;const c=[];let h=!1;for(let d=s;d<i.length;d++){const f=i[d];if(f.type==="html"){n+=f.value;const u=f.value.match(/<\/?([a-zA-Z0-9]+)/g)||[];for(const p of u){const m=p.match(/<\/?([a-zA-Z0-9]+)/);if(!m)continue;const y=m[1];p.startsWith("</")?c.length>0&&c[c.length-1]===y&&c.pop():p.startsWith("<")&&c.push(y)}}else if(f.type==="text")n+=f.value;else{c.length===0&&(h=!0);break}if(l++,c.length===0){h=!0;break}}h&&i.splice(s,l,{type:"html",value:n})}s++}};At.visit(e,"paragraph",t),At.visit(e,"tableCell",t),At.visit(e,"heading",t),At.visit(e,"emphasis",t),At.visit(e,"strong",t),At.visit(e,"delete",t)},zh=/\s*=\s*(\d+)(w|h|x|y)\s*/g,UL=()=>e=>{At.visit(e,"image",t=>{const r=l=>{if(!l)return{updatedText:l,matches:[]};const c=[...l.matchAll(zh)];return{updatedText:l.replaceAll(zh,"").trim(),matches:c}},{updatedText:i,matches:s}=r(t.alt);t.alt=i;const{updatedText:o,matches:a}=r(t.title);t.title=o||null;const n=[...s,...a];if(n.length>0){t.data||(t.data={}),t.data.hProperties||(t.data.hProperties={});for(const l of n){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)}}})},XL=()=>e=>{At.visit(e,(t,r,i)=>{i&&Object.defineProperty(t,"parent",{value:i,writable:!0,configurable:!0,enumerable:!1})})},GL=/https?:\/\/(?:www\.|mobile\.)?(?:twitter|x)\.com\/[^/]+\/status\/(\d+)/,VL=()=>e=>{At.visit(e,"paragraph",(t,r,i)=>{const s=t.children[0];if(t.children.length!==1||s.type!=="link"||!s.children.every(l=>l.type==="text")||!i||r===void 0)return;const a=s.url.match(GL);if(!a)return;const n=a[1];n&&(i.children[r]={type:"twitter-embed",tweetId:n})})},ZL=()=>e=>{At.visit(e,"paragraph",(t,r,i)=>{const s=t.children[0];if(t.children.length!==1||s.type!=="link"||!s.children.every(n=>n.type==="text")||!i||r===void 0)return;const a=_0(s.url);a&&(i.children[r]={type:"youtube-embed",videoId:a.videoId,params:a.params})})},Wh=/^:::(message|details)\s*(.*)/,KL=()=>e=>{function t(r){const i=[];let s=0;for(;s<r.length;){const o=r[s];if(o.type==="paragraph"&&o.children[0]?.type==="text"&&o.children[0].value.trim().startsWith(":::")){const l=o.children[0].value.trim().match(Wh);if(l){const c=s;let h=-1,d=1;const f=o.children.at(-1);if(o.children.length>1&&f?.type==="text"&&f.value.trim()===":::")h=c;else for(let u=c+1;u<r.length;u++){const p=r[u];if(p.type==="paragraph"&&p.children[0]?.type==="text"){const m=p.children[0].value.trim();Wh.test(m)?d++:m===":::"&&d--}if(d===0){h=u;break}}if(h!==-1){const u=l[1],p=l[2];let m;if(h===c){const b=o.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=o.children.slice(1);b[0]?.type==="break"&&b.shift();const k={type:"paragraph",children:b},v=r[h].children.slice(0,-1);v.at(-1)?.type==="break"&&v.pop();const _={type:"paragraph",children:v},$=r.slice(c+1,h);m=[k,...$,_].filter(T=>!(T.type==="paragraph"&&T.children.length===0))}const y=t(m);let x;if(u==="message"?x={type:"message",data:{messageType:p.trim()},children:y}:u==="details"&&(x={type:"details",data:{title:p.trim()},children:y}),x){i.push(x),s=h+1;continue}}}}const a={...o};"children"in a&&Array.isArray(a.children)&&(a.type==="blockquote"||a.type==="footnoteDefinition"||a.type==="message"||a.type==="details"?a.children=t(a.children):a.type==="list"&&(a.children=a.children.map(n=>({...n,children:t(n.children)})))),i.push(a),s++}return i}e.children=t(e.children)},QL=e=>{const t=[];return At.visit(e,"heading",r=>{const i=d0(r.children),s=r.data?.hProperties?.id;s&&i&&t.push({depth:r.depth,text:i,id:s})}),t};exports.BlockLinkNode=a0;exports.BlockquoteNode=T0;exports.CodeNode=nl;exports.Color=ae;exports.Color$1=Ur;exports.DEFAULT_MARKDOWN_STYLES=i0;exports.DEFAULT_MERMAID_INTERACTION=Zm;exports.DeleteNode=n0;exports.EmphasisNode=l0;exports.FootnoteBackLinkNode=c0;exports.FootnoteReferenceNode=h0;exports.FootnotesSection=vL;exports.HeadingNode=u0;exports.ImageNode=f0;exports.InlineCodeNode=g0;exports.JSON_SCHEMA=sf;exports.LinkNode=p0;exports.ListItemNode=m0;exports.ListNode=y0;exports.MarkdownRenderer=e0;exports.MarkdownViewer=wL;exports.MermaidDiagram=al;exports.NodesRenderer=St;exports.ParagraphNode=x0;exports.Rgb=Dt;exports.RichLinkCard=ll;exports.StrongNode=C0;exports.TableNode=b0;exports.TableOfContents=r0;exports.TextNode=k0;exports.ThematicBreakNode=w0;exports.TwitterEmbedNode=hl;exports.Utils=ht;exports.YouTubeEmbedNode=cl;exports.ZERO_WIDTH_SPACE=Lf;exports.ZennDetailsNode=v0;exports.ZennMessageNode=S0;exports.__export=Zh;exports.__name=g;exports.abs=Gk;exports.acos=r1;exports.adjustChannel=Za;exports.argumentsTag=Mn;exports.array=Kc;exports.arrayBufferTag=pf;exports.arrayTag=gf;exports.asin=i1;exports.assignWithDepth_default=vt;exports.at=J;exports.atan2=Vk;exports.booleanTag=Fn;exports.calculateMathMLDimensions=bx;exports.calculateTextDimensions=no;exports.calculateTextHeight=Rn;exports.calculateTextWidth=pe;exports.cleanAndMerge=lo;exports.clear=pc;exports.clear$1=Zv;exports.clear$2=vv;exports.clear2=Hv;exports.color=Dr;exports.commonDb_exports=en;exports.common_default=Yr;exports.computeDimensionOfText=ug;exports.computeLabelTransform=dr;exports.configureLabelImages=Nn;exports.configureSvgSize=tn;exports.constant=Ue;exports.constant$1=Ks;exports.cos=Zk;exports.createIntentTweetLink=RL;exports.createText=Ce;exports.curveBasis=Bs;exports.darken=R;exports.dataViewTag=yf;exports.dateTag=df;exports.dayjs2=Gh;exports.decodeEntities=De;exports.defaultConfig2=Fx;exports.defaultConfig_default=Qa;exports.define=Zs;exports.distExports=nf;exports.epsilon=oa;exports.extend=cn;exports.extractHeadings=QL;exports.extractYouTubeVideoId=_0;exports.fetchSiteMetadata=B0;exports.float32ArrayTag=Tf;exports.float64ArrayTag=_f;exports.generateId=If;exports.getAccDescription=Cc;exports.getAccTitle=yc;exports.getConfig=Ct;exports.getConfig2=pt;exports.getDefaultExportFromCjs=jh;exports.getDiagramTitle=kc;exports.getEdgeId=U2;exports.getEffectiveHtmlLabels=Pt;exports.getIconSVG=Gr;exports.getLineFunctionsWithOffset=af;exports.getRegisteredLayoutAlgorithm=LS;exports.getStylesFromArray=On;exports.getSubGraphTitleMargins=ho;exports.getTag=oo;exports.getThemeVariables3=ec;exports.getUrl=fc;exports.getUserDefinedConfig=hx;exports.halfPi=aa;exports.hasKatex=Or;exports.hue=Tb;exports.insertCluster=vg;exports.insertEdge=Xp;exports.insertEdgeLabel=Hp;exports.insertNode=el;exports.int16ArrayTag=vf;exports.int32ArrayTag=Sf;exports.int8ArrayTag=wf;exports.interpolateNumber=Se;exports.interpolateRgb=Ko;exports.interpolateString=Nc;exports.isDark=Jt;exports.isLabelStyle=qn;exports.isPrimitive=ao;exports.isTypedArray=Ci;exports.isValidShape=jp;exports.lighten=O;exports.line=Jc;exports.lineBreakRegex=Hr;exports.load=of;exports.log=j;exports.mapTag=uf;exports.markers_default=Zp;exports.max=Kk;exports.min=Qk;exports.nogamma=dn;exports.numberTag=Ln;exports.objectTag=mf;exports.parseFontSize=Oi;exports.parseGenericTypes=Ho;exports.pi=to;exports.positionEdgeLabel=Yp;exports.positionNode=Yv;exports.random=Of;exports.regexpTag=hf;exports.registerIconPacks=tg;exports.remarkBlockLink=DL;exports.remarkBlockLinkMetadata=qL;exports.remarkCustomHeadingId=WL;exports.remarkFootnoteBackLink=jL;exports.remarkHtmlAnchorToLink=HL;exports.remarkHtmlInHtml=YL;exports.remarkImageSize=UL;exports.remarkParentNode=XL;exports.remarkTwitterEmbed=VL;exports.remarkYouTubeEmbed=ZL;exports.remarkZennMessage=KL;exports.render=BS;exports.renderKatexSanitized=Ja;exports.rgbConvert=Oc;exports.rgba=Te;exports.sanitizeText=Kt;exports.select=ct;exports.selectSvgElement=kd;exports.setAccDescription=xc;exports.setAccTitle=mc;exports.setConfig2=Lx;exports.setDiagramTitle=bc;exports.setNodeElem=jv;exports.setTag=ff;exports.setupGraphViewbox=gc;exports.setupGraphViewbox2=wc;exports.sin=Jk;exports.sqrt=t1;exports.stringTag=Bn;exports.styles2String=et;exports.symbolTag=cf;exports.tau=e1;exports.toContentAlign=fL;exports.uint16ArrayTag=bf;exports.uint32ArrayTag=kf;exports.uint8ArrayTag=xf;exports.uint8ClampedArrayTag=Cf;exports.unknownIcon=Qf;exports.updateNodeBounds=rt;exports.useMarkdownToolbarState=o0;exports.utils_default=Zt;exports.withPath=Zc;exports.wrapLabel=Rf;
|
|
306
|
+
//# sourceMappingURL=extractHeadings-BCDkDiAF.cjs.map
|