From a955c20158ebf1e761d7dbf4ba57086240357147 Mon Sep 17 00:00:00 2001 From: "Azure Pipelines (template-sync)" Date: Tue, 27 Oct 2026 10:57:07 +0000 Subject: [PATCH] Sync docs site template with internal template --- ...hitectureDiagram-3BPJPVTR-OLGG2C47.min.js} | 4 +- ...ctureDiagram-3BPJPVTR-OLGG2C47.min.js.map} | 0 ... => blockDiagram-GPEHLZMM-3OKIGOBQ.min.js} | 4 +- ...blockDiagram-GPEHLZMM-3OKIGOBQ.min.js.map} | 0 ....js => c4Diagram-AAUBKEIU-RCWASNEG.min.js} | 4 +- ...=> c4Diagram-AAUBKEIU-RCWASNEG.min.js.map} | 0 ...-FE5ZIIEJ.min.js => chunk-35PJYFUZ.min.js} | 4 +- ...J.min.js.map => chunk-35PJYFUZ.min.js.map} | 0 .../public/chunk-7PRAVCJT.min.js.map | 7 - ...-FU2EUEZL.min.js => chunk-BAYE47ZU.min.js} | 4 +- ...L.min.js.map => chunk-BAYE47ZU.min.js.map} | 0 ...-IXKFR5M2.min.js => chunk-BSOUP4V7.min.js} | 4 +- ...2.min.js.map => chunk-BSOUP4V7.min.js.map} | 0 ...-WEUFLJCQ.min.js => chunk-E2QUWX3Y.min.js} | 4 +- ...Q.min.js.map => chunk-E2QUWX3Y.min.js.map} | 0 ...-F37HX2WT.min.js => chunk-EUHHC2DS.min.js} | 4 +- ...T.min.js.map => chunk-EUHHC2DS.min.js.map} | 0 ...-C5SK55CT.min.js => chunk-KBTCHML7.min.js} | 4 +- ...T.min.js.map => chunk-KBTCHML7.min.js.map} | 0 ...-L3PWVFHQ.min.js => chunk-LUSFEUM7.min.js} | 4 +- ...Q.min.js.map => chunk-LUSFEUM7.min.js.map} | 0 ...-JXIGGPPB.min.js => chunk-LW6SCGDZ.min.js} | 4 +- ...B.min.js.map => chunk-LW6SCGDZ.min.js.map} | 0 ...-7PRAVCJT.min.js => chunk-OYCWXTBX.min.js} | 38 +-- .../public/chunk-OYCWXTBX.min.js.map | 7 + ...-ELBPDDB4.min.js => chunk-R5KY77F3.min.js} | 4 +- ...4.min.js.map => chunk-R5KY77F3.min.js.map} | 0 ...-ANPX43U5.min.js => chunk-RSHCK4XQ.min.js} | 4 +- ...5.min.js.map => chunk-RSHCK4XQ.min.js.map} | 0 ...-WNWVX3PL.min.js => chunk-STQM5NEZ.min.js} | 4 +- ...L.min.js.map => chunk-STQM5NEZ.min.js.map} | 0 ...-QD4STHJA.min.js => chunk-STULGUR3.min.js} | 4 +- ...A.min.js.map => chunk-STULGUR3.min.js.map} | 0 .../classDiagram-4FO5ZUOK-DQPI3RMH.min.js | 2 + ...classDiagram-4FO5ZUOK-DQPI3RMH.min.js.map} | 0 .../classDiagram-4FO5ZUOK-HLERBCJ4.min.js | 2 - .../classDiagram-v2-Q7XG4LA2-6636GVKU.min.js | 2 - .../classDiagram-v2-Q7XG4LA2-PXMWC4MS.min.js | 2 + ...ssDiagram-v2-Q7XG4LA2-PXMWC4MS.min.js.map} | 0 ....min.js => dagre-BM42HDAG-YRRYDAWI.min.js} | 4 +- ...map => dagre-BM42HDAG-YRRYDAWI.min.js.map} | 0 ...in.js => diagram-2AECGRRQ-KEQBS5V5.min.js} | 4 +- ...p => diagram-2AECGRRQ-KEQBS5V5.min.js.map} | 0 ...in.js => diagram-5GNKFQAL-LLI6NUAT.min.js} | 4 +- ...p => diagram-5GNKFQAL-LLI6NUAT.min.js.map} | 0 ...in.js => diagram-KO2AKTUF-SQQV2XYA.min.js} | 4 +- ...p => diagram-KO2AKTUF-SQQV2XYA.min.js.map} | 0 ...in.js => diagram-LMA3HP47-K5X3SHWV.min.js} | 4 +- ...p => diagram-LMA3HP47-K5X3SHWV.min.js.map} | 0 ...in.js => diagram-OG6HWLK6-6IXDQDO3.min.js} | 4 +- ...p => diagram-OG6HWLK6-6IXDQDO3.min.js.map} | 0 templates/tabulareditor/public/docfx.min.js | 2 +- ....js => erDiagram-TEJ5UH35-E3J5MK7E.min.js} | 4 +- ...=> erDiagram-TEJ5UH35-E3J5MK7E.min.js.map} | 0 ...s => flowDiagram-I6XJVG4X-XT5NVU2M.min.js} | 4 +- ... flowDiagram-I6XJVG4X-XT5NVU2M.min.js.map} | 0 ... => ganttDiagram-6RSMTGT7-XYXKMRH4.min.js} | 4 +- ...ganttDiagram-6RSMTGT7-XYXKMRH4.min.js.map} | 0 ... gitGraphDiagram-PVQCEYII-VKX7RXFI.min.js} | 4 +- ...GraphDiagram-PVQCEYII-VKX7RXFI.min.js.map} | 0 ...s => infoDiagram-5YYISTIA-LNGXWYHF.min.js} | 4 +- ... infoDiagram-5YYISTIA-LNGXWYHF.min.js.map} | 0 ... ishikawaDiagram-YF4QCWOH-WL7TIAXP.min.js} | 4 +- ...ikawaDiagram-YF4QCWOH-WL7TIAXP.min.js.map} | 0 ...> journeyDiagram-JHISSGLW-W5ZAVMLQ.min.js} | 4 +- ...urneyDiagram-JHISSGLW-W5ZAVMLQ.min.js.map} | 0 ...anban-definition-UN3LZRKU-X3ZEFO2B.min.js} | 4 +- ...n-definition-UN3LZRKU-X3ZEFO2B.min.js.map} | 0 .../public/katex-GDFLULNE.min.js | 258 ------------------ .../public/katex-GDFLULNE.min.js.map | 7 - .../public/katex-YKMXVIXW.min.js | 258 ++++++++++++++++++ .../public/katex-YKMXVIXW.min.js.map | 7 + ...IE.min.js => mermaid.core-RYCBC6YV.min.js} | 6 +- ...s.map => mermaid.core-RYCBC6YV.min.js.map} | 0 ...ndmap-definition-RKZ34NQL-CZ3S6CUN.min.js} | 4 +- ...p-definition-RKZ34NQL-CZ3S6CUN.min.js.map} | 0 ...js => pieDiagram-4H26LBE5-Y7RZCZRY.min.js} | 4 +- ...> pieDiagram-4H26LBE5-Y7RZCZRY.min.js.map} | 0 ... quadrantDiagram-W4KKPZXB-MG4SWTOH.min.js} | 4 +- ...drantDiagram-W4KKPZXB-MG4SWTOH.min.js.map} | 0 ...quirementDiagram-4Y6WPE33-CBTOTNUO.min.js} | 4 +- ...ementDiagram-4Y6WPE33-CBTOTNUO.min.js.map} | 0 ...=> sankeyDiagram-5OEKKPKP-FCKJS6UT.min.js} | 4 +- ...ankeyDiagram-5OEKKPKP-FCKJS6UT.min.js.map} | 0 ... sequenceDiagram-3UESZ5HK-NUHTEM4D.min.js} | 4 +- ...uenceDiagram-3UESZ5HK-NUHTEM4D.min.js.map} | 0 ... => stateDiagram-AJRCARHV-CDIB45FK.min.js} | 4 +- ...stateDiagram-AJRCARHV-CDIB45FK.min.js.map} | 0 .../stateDiagram-v2-BHNVJYJU-OEB6SCVA.min.js | 2 + ...teDiagram-v2-BHNVJYJU-OEB6SCVA.min.js.map} | 0 .../stateDiagram-v2-BHNVJYJU-PDN77SEH.min.js | 2 - ...eline-definition-PNZ67QCA-KIKICTUT.min.js} | 4 +- ...e-definition-PNZ67QCA-KIKICTUT.min.js.map} | 0 ...s => vennDiagram-CIIHVFJN-4KBTSVZQ.min.js} | 4 +- ... vennDiagram-CIIHVFJN-4KBTSVZQ.min.js.map} | 0 ...> wardleyDiagram-YWT4CUSO-CIE4QUO7.min.js} | 4 +- ...rdleyDiagram-YWT4CUSO-CIE4QUO7.min.js.map} | 0 ...> xychartDiagram-2RQKCTM6-IJU5S7TR.min.js} | 4 +- ...chartDiagram-2RQKCTM6-IJU5S7TR.min.js.map} | 0 99 files changed, 381 insertions(+), 381 deletions(-) rename templates/tabulareditor/public/{architectureDiagram-3BPJPVTR-R6CHV6J7.min.js => architectureDiagram-3BPJPVTR-OLGG2C47.min.js} (99%) rename templates/tabulareditor/public/{architectureDiagram-3BPJPVTR-R6CHV6J7.min.js.map => architectureDiagram-3BPJPVTR-OLGG2C47.min.js.map} (100%) rename templates/tabulareditor/public/{blockDiagram-GPEHLZMM-LC63GRO2.min.js => blockDiagram-GPEHLZMM-3OKIGOBQ.min.js} (99%) rename templates/tabulareditor/public/{blockDiagram-GPEHLZMM-LC63GRO2.min.js.map => blockDiagram-GPEHLZMM-3OKIGOBQ.min.js.map} (100%) rename templates/tabulareditor/public/{c4Diagram-AAUBKEIU-XUDUJAA2.min.js => c4Diagram-AAUBKEIU-RCWASNEG.min.js} (99%) rename templates/tabulareditor/public/{c4Diagram-AAUBKEIU-XUDUJAA2.min.js.map => c4Diagram-AAUBKEIU-RCWASNEG.min.js.map} (100%) rename templates/tabulareditor/public/{chunk-FE5ZIIEJ.min.js => chunk-35PJYFUZ.min.js} (94%) rename templates/tabulareditor/public/{chunk-FE5ZIIEJ.min.js.map => chunk-35PJYFUZ.min.js.map} (100%) delete mode 100644 templates/tabulareditor/public/chunk-7PRAVCJT.min.js.map rename templates/tabulareditor/public/{chunk-FU2EUEZL.min.js => chunk-BAYE47ZU.min.js} (99%) rename templates/tabulareditor/public/{chunk-FU2EUEZL.min.js.map => chunk-BAYE47ZU.min.js.map} (100%) rename templates/tabulareditor/public/{chunk-IXKFR5M2.min.js => chunk-BSOUP4V7.min.js} (99%) rename templates/tabulareditor/public/{chunk-IXKFR5M2.min.js.map => chunk-BSOUP4V7.min.js.map} (100%) rename templates/tabulareditor/public/{chunk-WEUFLJCQ.min.js => chunk-E2QUWX3Y.min.js} (80%) rename templates/tabulareditor/public/{chunk-WEUFLJCQ.min.js.map => chunk-E2QUWX3Y.min.js.map} (100%) rename templates/tabulareditor/public/{chunk-F37HX2WT.min.js => chunk-EUHHC2DS.min.js} (99%) rename templates/tabulareditor/public/{chunk-F37HX2WT.min.js.map => chunk-EUHHC2DS.min.js.map} (100%) rename templates/tabulareditor/public/{chunk-C5SK55CT.min.js => chunk-KBTCHML7.min.js} (66%) rename templates/tabulareditor/public/{chunk-C5SK55CT.min.js.map => chunk-KBTCHML7.min.js.map} (100%) rename templates/tabulareditor/public/{chunk-L3PWVFHQ.min.js => chunk-LUSFEUM7.min.js} (84%) rename templates/tabulareditor/public/{chunk-L3PWVFHQ.min.js.map => chunk-LUSFEUM7.min.js.map} (100%) rename templates/tabulareditor/public/{chunk-JXIGGPPB.min.js => chunk-LW6SCGDZ.min.js} (98%) rename templates/tabulareditor/public/{chunk-JXIGGPPB.min.js.map => chunk-LW6SCGDZ.min.js.map} (100%) rename templates/tabulareditor/public/{chunk-7PRAVCJT.min.js => chunk-OYCWXTBX.min.js} (76%) create mode 100644 templates/tabulareditor/public/chunk-OYCWXTBX.min.js.map rename templates/tabulareditor/public/{chunk-ELBPDDB4.min.js => chunk-R5KY77F3.min.js} (99%) rename templates/tabulareditor/public/{chunk-ELBPDDB4.min.js.map => chunk-R5KY77F3.min.js.map} (100%) rename templates/tabulareditor/public/{chunk-ANPX43U5.min.js => chunk-RSHCK4XQ.min.js} (94%) rename templates/tabulareditor/public/{chunk-ANPX43U5.min.js.map => chunk-RSHCK4XQ.min.js.map} (100%) rename templates/tabulareditor/public/{chunk-WNWVX3PL.min.js => chunk-STQM5NEZ.min.js} (99%) rename templates/tabulareditor/public/{chunk-WNWVX3PL.min.js.map => chunk-STQM5NEZ.min.js.map} (100%) rename templates/tabulareditor/public/{chunk-QD4STHJA.min.js => chunk-STULGUR3.min.js} (82%) rename templates/tabulareditor/public/{chunk-QD4STHJA.min.js.map => chunk-STULGUR3.min.js.map} (100%) create mode 100644 templates/tabulareditor/public/classDiagram-4FO5ZUOK-DQPI3RMH.min.js rename templates/tabulareditor/public/{classDiagram-4FO5ZUOK-HLERBCJ4.min.js.map => classDiagram-4FO5ZUOK-DQPI3RMH.min.js.map} (100%) delete mode 100644 templates/tabulareditor/public/classDiagram-4FO5ZUOK-HLERBCJ4.min.js delete mode 100644 templates/tabulareditor/public/classDiagram-v2-Q7XG4LA2-6636GVKU.min.js create mode 100644 templates/tabulareditor/public/classDiagram-v2-Q7XG4LA2-PXMWC4MS.min.js rename templates/tabulareditor/public/{classDiagram-v2-Q7XG4LA2-6636GVKU.min.js.map => classDiagram-v2-Q7XG4LA2-PXMWC4MS.min.js.map} (100%) rename templates/tabulareditor/public/{dagre-BM42HDAG-T24UZ7UM.min.js => dagre-BM42HDAG-YRRYDAWI.min.js} (95%) rename templates/tabulareditor/public/{dagre-BM42HDAG-T24UZ7UM.min.js.map => dagre-BM42HDAG-YRRYDAWI.min.js.map} (100%) rename templates/tabulareditor/public/{diagram-2AECGRRQ-OVQMD2ZW.min.js => diagram-2AECGRRQ-KEQBS5V5.min.js} (95%) rename templates/tabulareditor/public/{diagram-2AECGRRQ-OVQMD2ZW.min.js.map => diagram-2AECGRRQ-KEQBS5V5.min.js.map} (100%) rename templates/tabulareditor/public/{diagram-5GNKFQAL-SYKJIICX.min.js => diagram-5GNKFQAL-LLI6NUAT.min.js} (92%) rename templates/tabulareditor/public/{diagram-5GNKFQAL-SYKJIICX.min.js.map => diagram-5GNKFQAL-LLI6NUAT.min.js.map} (100%) rename templates/tabulareditor/public/{diagram-KO2AKTUF-67V64JXH.min.js => diagram-KO2AKTUF-SQQV2XYA.min.js} (98%) rename templates/tabulareditor/public/{diagram-KO2AKTUF-67V64JXH.min.js.map => diagram-KO2AKTUF-SQQV2XYA.min.js.map} (100%) rename templates/tabulareditor/public/{diagram-LMA3HP47-BEU7RNFX.min.js => diagram-LMA3HP47-K5X3SHWV.min.js} (93%) rename templates/tabulareditor/public/{diagram-LMA3HP47-BEU7RNFX.min.js.map => diagram-LMA3HP47-K5X3SHWV.min.js.map} (100%) rename templates/tabulareditor/public/{diagram-OG6HWLK6-7SJQZU6W.min.js => diagram-OG6HWLK6-6IXDQDO3.min.js} (96%) rename templates/tabulareditor/public/{diagram-OG6HWLK6-7SJQZU6W.min.js.map => diagram-OG6HWLK6-6IXDQDO3.min.js.map} (100%) rename templates/tabulareditor/public/{erDiagram-TEJ5UH35-4VQR4XDQ.min.js => erDiagram-TEJ5UH35-E3J5MK7E.min.js} (98%) rename templates/tabulareditor/public/{erDiagram-TEJ5UH35-4VQR4XDQ.min.js.map => erDiagram-TEJ5UH35-E3J5MK7E.min.js.map} (100%) rename templates/tabulareditor/public/{flowDiagram-I6XJVG4X-QK7UK2JR.min.js => flowDiagram-I6XJVG4X-XT5NVU2M.min.js} (99%) rename templates/tabulareditor/public/{flowDiagram-I6XJVG4X-QK7UK2JR.min.js.map => flowDiagram-I6XJVG4X-XT5NVU2M.min.js.map} (100%) rename templates/tabulareditor/public/{ganttDiagram-6RSMTGT7-LEEYTTRF.min.js => ganttDiagram-6RSMTGT7-XYXKMRH4.min.js} (99%) rename templates/tabulareditor/public/{ganttDiagram-6RSMTGT7-LEEYTTRF.min.js.map => ganttDiagram-6RSMTGT7-XYXKMRH4.min.js.map} (100%) rename templates/tabulareditor/public/{gitGraphDiagram-PVQCEYII-Q4MNVJNA.min.js => gitGraphDiagram-PVQCEYII-VKX7RXFI.min.js} (99%) rename templates/tabulareditor/public/{gitGraphDiagram-PVQCEYII-Q4MNVJNA.min.js.map => gitGraphDiagram-PVQCEYII-VKX7RXFI.min.js.map} (100%) rename templates/tabulareditor/public/{infoDiagram-5YYISTIA-3ACUZLKK.min.js => infoDiagram-5YYISTIA-LNGXWYHF.min.js} (82%) rename templates/tabulareditor/public/{infoDiagram-5YYISTIA-3ACUZLKK.min.js.map => infoDiagram-5YYISTIA-LNGXWYHF.min.js.map} (100%) rename templates/tabulareditor/public/{ishikawaDiagram-YF4QCWOH-ZDIBWQQ7.min.js => ishikawaDiagram-YF4QCWOH-WL7TIAXP.min.js} (98%) rename templates/tabulareditor/public/{ishikawaDiagram-YF4QCWOH-ZDIBWQQ7.min.js.map => ishikawaDiagram-YF4QCWOH-WL7TIAXP.min.js.map} (100%) rename templates/tabulareditor/public/{journeyDiagram-JHISSGLW-A2HCIDHM.min.js => journeyDiagram-JHISSGLW-W5ZAVMLQ.min.js} (99%) rename templates/tabulareditor/public/{journeyDiagram-JHISSGLW-A2HCIDHM.min.js.map => journeyDiagram-JHISSGLW-W5ZAVMLQ.min.js.map} (100%) rename templates/tabulareditor/public/{kanban-definition-UN3LZRKU-HUAJCAXC.min.js => kanban-definition-UN3LZRKU-X3ZEFO2B.min.js} (97%) rename templates/tabulareditor/public/{kanban-definition-UN3LZRKU-HUAJCAXC.min.js.map => kanban-definition-UN3LZRKU-X3ZEFO2B.min.js.map} (100%) delete mode 100644 templates/tabulareditor/public/katex-GDFLULNE.min.js delete mode 100644 templates/tabulareditor/public/katex-GDFLULNE.min.js.map create mode 100644 templates/tabulareditor/public/katex-YKMXVIXW.min.js create mode 100644 templates/tabulareditor/public/katex-YKMXVIXW.min.js.map rename templates/tabulareditor/public/{mermaid.core-6UIGISIE.min.js => mermaid.core-RYCBC6YV.min.js} (89%) rename templates/tabulareditor/public/{mermaid.core-6UIGISIE.min.js.map => mermaid.core-RYCBC6YV.min.js.map} (100%) rename templates/tabulareditor/public/{mindmap-definition-RKZ34NQL-4RGJ3ECU.min.js => mindmap-definition-RKZ34NQL-CZ3S6CUN.min.js} (97%) rename templates/tabulareditor/public/{mindmap-definition-RKZ34NQL-4RGJ3ECU.min.js.map => mindmap-definition-RKZ34NQL-CZ3S6CUN.min.js.map} (100%) rename templates/tabulareditor/public/{pieDiagram-4H26LBE5-ZLQT6OJD.min.js => pieDiagram-4H26LBE5-Y7RZCZRY.min.js} (94%) rename templates/tabulareditor/public/{pieDiagram-4H26LBE5-ZLQT6OJD.min.js.map => pieDiagram-4H26LBE5-Y7RZCZRY.min.js.map} (100%) rename templates/tabulareditor/public/{quadrantDiagram-W4KKPZXB-IQAIETB7.min.js => quadrantDiagram-W4KKPZXB-MG4SWTOH.min.js} (99%) rename templates/tabulareditor/public/{quadrantDiagram-W4KKPZXB-IQAIETB7.min.js.map => quadrantDiagram-W4KKPZXB-MG4SWTOH.min.js.map} (100%) rename templates/tabulareditor/public/{requirementDiagram-4Y6WPE33-JI54LDVT.min.js => requirementDiagram-4Y6WPE33-CBTOTNUO.min.js} (98%) rename templates/tabulareditor/public/{requirementDiagram-4Y6WPE33-JI54LDVT.min.js.map => requirementDiagram-4Y6WPE33-CBTOTNUO.min.js.map} (100%) rename templates/tabulareditor/public/{sankeyDiagram-5OEKKPKP-BMQQFXWT.min.js => sankeyDiagram-5OEKKPKP-FCKJS6UT.min.js} (99%) rename templates/tabulareditor/public/{sankeyDiagram-5OEKKPKP-BMQQFXWT.min.js.map => sankeyDiagram-5OEKKPKP-FCKJS6UT.min.js.map} (100%) rename templates/tabulareditor/public/{sequenceDiagram-3UESZ5HK-WC3O4YBU.min.js => sequenceDiagram-3UESZ5HK-NUHTEM4D.min.js} (99%) rename templates/tabulareditor/public/{sequenceDiagram-3UESZ5HK-WC3O4YBU.min.js.map => sequenceDiagram-3UESZ5HK-NUHTEM4D.min.js.map} (100%) rename templates/tabulareditor/public/{stateDiagram-AJRCARHV-CFQ6H5KG.min.js => stateDiagram-AJRCARHV-CDIB45FK.min.js} (94%) rename templates/tabulareditor/public/{stateDiagram-AJRCARHV-CFQ6H5KG.min.js.map => stateDiagram-AJRCARHV-CDIB45FK.min.js.map} (100%) create mode 100644 templates/tabulareditor/public/stateDiagram-v2-BHNVJYJU-OEB6SCVA.min.js rename templates/tabulareditor/public/{stateDiagram-v2-BHNVJYJU-PDN77SEH.min.js.map => stateDiagram-v2-BHNVJYJU-OEB6SCVA.min.js.map} (100%) delete mode 100644 templates/tabulareditor/public/stateDiagram-v2-BHNVJYJU-PDN77SEH.min.js rename templates/tabulareditor/public/{timeline-definition-PNZ67QCA-PD2EDFDD.min.js => timeline-definition-PNZ67QCA-KIKICTUT.min.js} (99%) rename templates/tabulareditor/public/{timeline-definition-PNZ67QCA-PD2EDFDD.min.js.map => timeline-definition-PNZ67QCA-KIKICTUT.min.js.map} (100%) rename templates/tabulareditor/public/{vennDiagram-CIIHVFJN-GEPMLYRS.min.js => vennDiagram-CIIHVFJN-4KBTSVZQ.min.js} (99%) rename templates/tabulareditor/public/{vennDiagram-CIIHVFJN-GEPMLYRS.min.js.map => vennDiagram-CIIHVFJN-4KBTSVZQ.min.js.map} (100%) rename templates/tabulareditor/public/{wardleyDiagram-YWT4CUSO-KHVI35ND.min.js => wardleyDiagram-YWT4CUSO-CIE4QUO7.min.js} (99%) rename templates/tabulareditor/public/{wardleyDiagram-YWT4CUSO-KHVI35ND.min.js.map => wardleyDiagram-YWT4CUSO-CIE4QUO7.min.js.map} (100%) rename templates/tabulareditor/public/{xychartDiagram-2RQKCTM6-A37RYHOM.min.js => xychartDiagram-2RQKCTM6-IJU5S7TR.min.js} (99%) rename templates/tabulareditor/public/{xychartDiagram-2RQKCTM6-A37RYHOM.min.js.map => xychartDiagram-2RQKCTM6-IJU5S7TR.min.js.map} (100%) diff --git a/templates/tabulareditor/public/architectureDiagram-3BPJPVTR-R6CHV6J7.min.js b/templates/tabulareditor/public/architectureDiagram-3BPJPVTR-OLGG2C47.min.js similarity index 99% rename from templates/tabulareditor/public/architectureDiagram-3BPJPVTR-R6CHV6J7.min.js rename to templates/tabulareditor/public/architectureDiagram-3BPJPVTR-OLGG2C47.min.js index 4ae7946ee..810bfa225 100644 --- a/templates/tabulareditor/public/architectureDiagram-3BPJPVTR-R6CHV6J7.min.js +++ b/templates/tabulareditor/public/architectureDiagram-3BPJPVTR-OLGG2C47.min.js @@ -1,4 +1,4 @@ -import{a as qe}from"./chunk-PPWLQFJD.min.js";import{a as ze}from"./chunk-C5SK55CT.min.js";import{a as Qe}from"./chunk-CCNPHFNE.min.js";import"./chunk-IJMU45IO.min.js";import"./chunk-HWCHFEAH.min.js";import"./chunk-OH5PAVPX.min.js";import"./chunk-RN42Y33E.min.js";import"./chunk-XNJBVM5Z.min.js";import"./chunk-Q5YIQYCF.min.js";import"./chunk-4HQ5XQBY.min.js";import"./chunk-X6TCRES7.min.js";import"./chunk-P3KXGIV7.min.js";import"./chunk-NE3GILF7.min.js";import"./chunk-25XGUDQ5.min.js";import{b as ke,c as Ze,d as he,f as le}from"./chunk-WNWVX3PL.min.js";import{a as me}from"./chunk-G3CW6HDB.min.js";import{o as Be,s as $e}from"./chunk-IXKFR5M2.min.js";import"./chunk-HCOLC5CQ.min.js";import{B as Se,H as Fe,P as be,T as Pe,U as Ge,V as Ue,W as Ye,X as Xe,Y as He,Z as We,_ as se,r as Re}from"./chunk-7PRAVCJT.min.js";import{b as ct,d as ye,j as Ve}from"./chunk-BJGJ3C53.min.js";import{a as pe,c as ur}from"./chunk-MY7PHHTQ.min.js";var Te=pe((re,Ee)=>{(function(w,N){typeof re=="object"&&typeof Ee=="object"?Ee.exports=N():typeof define=="function"&&define.amd?define([],N):typeof re=="object"?re.layoutBase=N():w.layoutBase=N()})(re,function(){return(function(E){var w={};function N(u){if(w[u])return w[u].exports;var l=w[u]={i:u,l:!1,exports:{}};return E[u].call(l.exports,l,l.exports,N),l.l=!0,l.exports}return N.m=E,N.c=w,N.i=function(u){return u},N.d=function(u,l,a){N.o(u,l)||Object.defineProperty(u,l,{configurable:!1,enumerable:!0,get:a})},N.n=function(u){var l=u&&u.__esModule?function(){return u.default}:function(){return u};return N.d(l,"a",l),l},N.o=function(u,l){return Object.prototype.hasOwnProperty.call(u,l)},N.p="",N(N.s=28)})([(function(E,w,N){"use strict";function u(){}u.QUALITY=1,u.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,u.DEFAULT_INCREMENTAL=!1,u.DEFAULT_ANIMATION_ON_LAYOUT=!0,u.DEFAULT_ANIMATION_DURING_LAYOUT=!1,u.DEFAULT_ANIMATION_PERIOD=50,u.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,u.DEFAULT_GRAPH_MARGIN=15,u.NODE_DIMENSIONS_INCLUDE_LABELS=!1,u.SIMPLE_NODE_SIZE=40,u.SIMPLE_NODE_HALF_SIZE=u.SIMPLE_NODE_SIZE/2,u.EMPTY_COMPOUND_NODE_SIZE=40,u.MIN_EDGE_LENGTH=1,u.WORLD_BOUNDARY=1e6,u.INITIAL_WORLD_BOUNDARY=u.WORLD_BOUNDARY/1e3,u.WORLD_CENTER_X=1200,u.WORLD_CENTER_Y=900,E.exports=u}),(function(E,w,N){"use strict";var u=N(2),l=N(8),a=N(9);function r(f,e,c){u.call(this,c),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=c,this.bendpoints=[],this.source=f,this.target=e}r.prototype=Object.create(u.prototype);for(var n in u)r[n]=u[n];r.prototype.getSource=function(){return this.source},r.prototype.getTarget=function(){return this.target},r.prototype.isInterGraph=function(){return this.isInterGraph},r.prototype.getLength=function(){return this.length},r.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},r.prototype.getBendpoints=function(){return this.bendpoints},r.prototype.getLca=function(){return this.lca},r.prototype.getSourceInLca=function(){return this.sourceInLca},r.prototype.getTargetInLca=function(){return this.targetInLca},r.prototype.getOtherEnd=function(f){if(this.source===f)return this.target;if(this.target===f)return this.source;throw"Node is not incident with this edge"},r.prototype.getOtherEndInGraph=function(f,e){for(var c=this.getOtherEnd(f),t=e.getGraphManager().getRoot();;){if(c.getOwner()==e)return c;if(c.getOwner()==t)break;c=c.getOwner().getParent()}return null},r.prototype.updateLength=function(){var f=new Array(4);this.isOverlapingSourceAndTarget=l.getIntersection(this.target.getRect(),this.source.getRect(),f),this.isOverlapingSourceAndTarget||(this.lengthX=f[0]-f[2],this.lengthY=f[1]-f[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},r.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},E.exports=r}),(function(E,w,N){"use strict";function u(l){this.vGraphObject=l}E.exports=u}),(function(E,w,N){"use strict";var u=N(2),l=N(10),a=N(13),r=N(0),n=N(16),f=N(5);function e(t,i,h,g){h==null&&g==null&&(g=i),u.call(this,g),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=l.MIN_VALUE,this.inclusionTreeDepth=l.MAX_VALUE,this.vGraphObject=g,this.edges=[],this.graphManager=t,h!=null&&i!=null?this.rect=new a(i.x,i.y,h.width,h.height):this.rect=new a}e.prototype=Object.create(u.prototype);for(var c in u)e[c]=u[c];e.prototype.getEdges=function(){return this.edges},e.prototype.getChild=function(){return this.child},e.prototype.getOwner=function(){return this.owner},e.prototype.getWidth=function(){return this.rect.width},e.prototype.setWidth=function(t){this.rect.width=t},e.prototype.getHeight=function(){return this.rect.height},e.prototype.setHeight=function(t){this.rect.height=t},e.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},e.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},e.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},e.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},e.prototype.getRect=function(){return this.rect},e.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},e.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},e.prototype.setRect=function(t,i){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=i.width,this.rect.height=i.height},e.prototype.setCenter=function(t,i){this.rect.x=t-this.rect.width/2,this.rect.y=i-this.rect.height/2},e.prototype.setLocation=function(t,i){this.rect.x=t,this.rect.y=i},e.prototype.moveBy=function(t,i){this.rect.x+=t,this.rect.y+=i},e.prototype.getEdgeListToNode=function(t){var i=[],h,g=this;return g.edges.forEach(function(s){if(s.target==t){if(s.source!=g)throw"Incorrect edge source!";i.push(s)}}),i},e.prototype.getEdgesBetween=function(t){var i=[],h,g=this;return g.edges.forEach(function(s){if(!(s.source==g||s.target==g))throw"Incorrect edge source and/or target";(s.target==t||s.source==t)&&i.push(s)}),i},e.prototype.getNeighborsList=function(){var t=new Set,i=this;return i.edges.forEach(function(h){if(h.source==i)t.add(h.target);else{if(h.target!=i)throw"Incorrect incidency!";t.add(h.source)}}),t},e.prototype.withChildren=function(){var t=new Set,i,h;if(t.add(this),this.child!=null)for(var g=this.child.getNodes(),s=0;si?(this.rect.x-=(this.labelWidth-i)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(i+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(h+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>h?(this.rect.y-=(this.labelHeight-h)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(h+this.labelHeight))}}},e.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==l.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},e.prototype.transform=function(t){var i=this.rect.x;i>r.WORLD_BOUNDARY?i=r.WORLD_BOUNDARY:i<-r.WORLD_BOUNDARY&&(i=-r.WORLD_BOUNDARY);var h=this.rect.y;h>r.WORLD_BOUNDARY?h=r.WORLD_BOUNDARY:h<-r.WORLD_BOUNDARY&&(h=-r.WORLD_BOUNDARY);var g=new f(i,h),s=t.inverseTransformPoint(g);this.setLocation(s.x,s.y)},e.prototype.getLeft=function(){return this.rect.x},e.prototype.getRight=function(){return this.rect.x+this.rect.width},e.prototype.getTop=function(){return this.rect.y},e.prototype.getBottom=function(){return this.rect.y+this.rect.height},e.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},E.exports=e}),(function(E,w,N){"use strict";var u=N(0);function l(){}for(var a in u)l[a]=u[a];l.MAX_ITERATIONS=2500,l.DEFAULT_EDGE_LENGTH=50,l.DEFAULT_SPRING_STRENGTH=.45,l.DEFAULT_REPULSION_STRENGTH=4500,l.DEFAULT_GRAVITY_STRENGTH=.4,l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,l.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,l.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,l.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,l.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,l.COOLING_ADAPTATION_FACTOR=.33,l.ADAPTATION_LOWER_NODE_LIMIT=1e3,l.ADAPTATION_UPPER_NODE_LIMIT=5e3,l.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,l.MAX_NODE_DISPLACEMENT=l.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,l.MIN_REPULSION_DIST=l.DEFAULT_EDGE_LENGTH/10,l.CONVERGENCE_CHECK_PERIOD=100,l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,l.MIN_EDGE_LENGTH=1,l.GRID_CALCULATION_CHECK_PERIOD=10,E.exports=l}),(function(E,w,N){"use strict";function u(l,a){l==null&&a==null?(this.x=0,this.y=0):(this.x=l,this.y=a)}u.prototype.getX=function(){return this.x},u.prototype.getY=function(){return this.y},u.prototype.setX=function(l){this.x=l},u.prototype.setY=function(l){this.y=l},u.prototype.getDifference=function(l){return new DimensionD(this.x-l.x,this.y-l.y)},u.prototype.getCopy=function(){return new u(this.x,this.y)},u.prototype.translate=function(l){return this.x+=l.width,this.y+=l.height,this},E.exports=u}),(function(E,w,N){"use strict";var u=N(2),l=N(10),a=N(0),r=N(7),n=N(3),f=N(1),e=N(13),c=N(12),t=N(11);function i(g,s,L){u.call(this,L),this.estimatedSize=l.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=g,s!=null&&s instanceof r?this.graphManager=s:s!=null&&s instanceof Layout&&(this.graphManager=s.graphManager)}i.prototype=Object.create(u.prototype);for(var h in u)i[h]=u[h];i.prototype.getNodes=function(){return this.nodes},i.prototype.getEdges=function(){return this.edges},i.prototype.getGraphManager=function(){return this.graphManager},i.prototype.getParent=function(){return this.parent},i.prototype.getLeft=function(){return this.left},i.prototype.getRight=function(){return this.right},i.prototype.getTop=function(){return this.top},i.prototype.getBottom=function(){return this.bottom},i.prototype.isConnected=function(){return this.isConnected},i.prototype.add=function(g,s,L){if(s==null&&L==null){var y=g;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(y)>-1)throw"Node already in graph!";return y.owner=this,this.getNodes().push(y),y}else{var p=g;if(!(this.getNodes().indexOf(s)>-1&&this.getNodes().indexOf(L)>-1))throw"Source or target not in graph!";if(!(s.owner==L.owner&&s.owner==this))throw"Both owners must be this graph!";return s.owner!=L.owner?null:(p.source=s,p.target=L,p.isInterGraph=!1,this.getEdges().push(p),s.edges.push(p),L!=s&&L.edges.push(p),p)}},i.prototype.remove=function(g){var s=g;if(g instanceof n){if(s==null)throw"Node is null!";if(!(s.owner!=null&&s.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var L=s.edges.slice(),y,p=L.length,C=0;C-1&&b>-1))throw"Source and/or target doesn't know this edge!";y.source.edges.splice(A,1),y.target!=y.source&&y.target.edges.splice(b,1);var R=y.source.owner.getEdges().indexOf(y);if(R==-1)throw"Not in owner's edge list!";y.source.owner.getEdges().splice(R,1)}},i.prototype.updateLeftTop=function(){for(var g=l.MAX_VALUE,s=l.MAX_VALUE,L,y,p,C=this.getNodes(),R=C.length,A=0;AL&&(g=L),s>y&&(s=y)}return g==l.MAX_VALUE?null:(C[0].getParent().paddingLeft!=null?p=C[0].getParent().paddingLeft:p=this.margin,this.left=s-p,this.top=g-p,new c(this.left,this.top))},i.prototype.updateBounds=function(g){for(var s=l.MAX_VALUE,L=-l.MAX_VALUE,y=l.MAX_VALUE,p=-l.MAX_VALUE,C,R,A,b,W,G=this.nodes,J=G.length,x=0;xC&&(s=C),LA&&(y=A),pC&&(s=C),LA&&(y=A),p=this.nodes.length){var J=0;L.forEach(function(x){x.owner==g&&J++}),J==this.nodes.length&&(this.isConnected=!0)}},E.exports=i}),(function(E,w,N){"use strict";var u,l=N(1);function a(r){u=N(6),this.layout=r,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var r=this.layout.newGraph(),n=this.layout.newNode(null),f=this.add(r,n);return this.setRootGraph(f),this.rootGraph},a.prototype.add=function(r,n,f,e,c){if(f==null&&e==null&&c==null){if(r==null)throw"Graph is null!";if(n==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(n.child!=null)throw"Already has a child!";return r.parent=n,n.child=r,r}else{c=f,e=n,f=r;var t=e.getOwner(),i=c.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(i!=null&&i.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==i)return f.isInterGraph=!1,t.add(f,e,c);if(f.isInterGraph=!0,f.source=e,f.target=c,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},a.prototype.remove=function(r){if(r instanceof u){var n=r;if(n.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(n==this.rootGraph||n.parent!=null&&n.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(n.getEdges());for(var e,c=f.length,t=0;t=r.getRight()?n[0]+=Math.min(r.getX()-a.getX(),a.getRight()-r.getRight()):r.getX()<=a.getX()&&r.getRight()>=a.getRight()&&(n[0]+=Math.min(a.getX()-r.getX(),r.getRight()-a.getRight())),a.getY()<=r.getY()&&a.getBottom()>=r.getBottom()?n[1]+=Math.min(r.getY()-a.getY(),a.getBottom()-r.getBottom()):r.getY()<=a.getY()&&r.getBottom()>=a.getBottom()&&(n[1]+=Math.min(a.getY()-r.getY(),r.getBottom()-a.getBottom()));var c=Math.abs((r.getCenterY()-a.getCenterY())/(r.getCenterX()-a.getCenterX()));r.getCenterY()===a.getCenterY()&&r.getCenterX()===a.getCenterX()&&(c=1);var t=c*n[0],i=n[1]/c;n[0]t)return n[0]=f,n[1]=h,n[2]=c,n[3]=G,!1;if(ec)return n[0]=i,n[1]=e,n[2]=b,n[3]=t,!1;if(fc?(n[0]=s,n[1]=L,o=!0):(n[0]=g,n[1]=h,o=!0):d===v&&(f>c?(n[0]=i,n[1]=h,o=!0):(n[0]=y,n[1]=L,o=!0)),-T===v?c>f?(n[2]=W,n[3]=G,m=!0):(n[2]=b,n[3]=A,m=!0):T===v&&(c>f?(n[2]=R,n[3]=A,m=!0):(n[2]=J,n[3]=G,m=!0)),o&&m)return!1;if(f>c?e>t?(D=this.getCardinalDirection(d,v,4),O=this.getCardinalDirection(T,v,2)):(D=this.getCardinalDirection(-d,v,3),O=this.getCardinalDirection(-T,v,1)):e>t?(D=this.getCardinalDirection(-d,v,1),O=this.getCardinalDirection(-T,v,3)):(D=this.getCardinalDirection(d,v,2),O=this.getCardinalDirection(T,v,4)),!o)switch(D){case 1:S=h,P=f+-C/v,n[0]=P,n[1]=S;break;case 2:P=y,S=e+p*v,n[0]=P,n[1]=S;break;case 3:S=L,P=f+C/v,n[0]=P,n[1]=S;break;case 4:P=s,S=e+-p*v,n[0]=P,n[1]=S;break}if(!m)switch(O){case 1:Z=A,I=c+-z/v,n[2]=I,n[3]=Z;break;case 2:I=J,Z=t+x*v,n[2]=I,n[3]=Z;break;case 3:Z=G,I=c+z/v,n[2]=I,n[3]=Z;break;case 4:I=W,Z=t+-x*v,n[2]=I,n[3]=Z;break}}return!1},l.getCardinalDirection=function(a,r,n){return a>r?n:1+n%4},l.getIntersection=function(a,r,n,f){if(f==null)return this.getIntersection2(a,r,n);var e=a.x,c=a.y,t=r.x,i=r.y,h=n.x,g=n.y,s=f.x,L=f.y,y=void 0,p=void 0,C=void 0,R=void 0,A=void 0,b=void 0,W=void 0,G=void 0,J=void 0;return C=i-c,A=e-t,W=t*c-e*i,R=L-g,b=h-s,G=s*g-h*L,J=C*b-R*A,J===0?null:(y=(A*G-b*W)/J,p=(R*W-C*G)/J,new u(y,p))},l.angleOfVector=function(a,r,n,f){var e=void 0;return a!==n?(e=Math.atan((f-r)/(n-a)),n=0){var L=(-h+Math.sqrt(h*h-4*i*g))/(2*i),y=(-h-Math.sqrt(h*h-4*i*g))/(2*i),p=null;return L>=0&&L<=1?[L]:y>=0&&y<=1?[y]:p}else return null},l.HALF_PI=.5*Math.PI,l.ONE_AND_HALF_PI=1.5*Math.PI,l.TWO_PI=2*Math.PI,l.THREE_PI=3*Math.PI,E.exports=l}),(function(E,w,N){"use strict";function u(){}u.sign=function(l){return l>0?1:l<0?-1:0},u.floor=function(l){return l<0?Math.ceil(l):Math.floor(l)},u.ceil=function(l){return l<0?Math.floor(l):Math.ceil(l)},E.exports=u}),(function(E,w,N){"use strict";function u(){}u.MAX_VALUE=2147483647,u.MIN_VALUE=-2147483648,E.exports=u}),(function(E,w,N){"use strict";var u=(function(){function e(c,t){for(var i=0;i"u"?"undefined":u(a);return a==null||r!="object"&&r!="function"},E.exports=l}),(function(E,w,N){"use strict";function u(h){if(Array.isArray(h)){for(var g=0,s=Array(h.length);g0&&g;){for(C.push(A[0]);C.length>0&&g;){var b=C[0];C.splice(0,1),p.add(b);for(var W=b.getEdges(),y=0;y-1&&A.splice(z,1)}p=new Set,R=new Map}}return h},i.prototype.createDummyNodesForBendpoints=function(h){for(var g=[],s=h.source,L=this.graphManager.calcLowestCommonAncestor(h.source,h.target),y=0;y0){for(var L=this.edgeToDummyNodes.get(s),y=0;y=0&&g.splice(G,1);var J=R.getNeighborsList();J.forEach(function(o){if(s.indexOf(o)<0){var m=L.get(o),d=m-1;d==1&&b.push(o),L.set(o,d)}})}s=s.concat(b),(g.length==1||g.length==2)&&(y=!0,p=g[0])}return p},i.prototype.setGraphManager=function(h){this.graphManager=h},E.exports=i}),(function(E,w,N){"use strict";function u(){}u.seed=1,u.x=0,u.nextDouble=function(){return u.x=Math.sin(u.seed++)*1e4,u.x-Math.floor(u.x)},E.exports=u}),(function(E,w,N){"use strict";var u=N(5);function l(a,r){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}l.prototype.getWorldOrgX=function(){return this.lworldOrgX},l.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},l.prototype.getWorldOrgY=function(){return this.lworldOrgY},l.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},l.prototype.getWorldExtX=function(){return this.lworldExtX},l.prototype.setWorldExtX=function(a){this.lworldExtX=a},l.prototype.getWorldExtY=function(){return this.lworldExtY},l.prototype.setWorldExtY=function(a){this.lworldExtY=a},l.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},l.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},l.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},l.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},l.prototype.getDeviceExtX=function(){return this.ldeviceExtX},l.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},l.prototype.getDeviceExtY=function(){return this.ldeviceExtY},l.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},l.prototype.transformX=function(a){var r=0,n=this.lworldExtX;return n!=0&&(r=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/n),r},l.prototype.transformY=function(a){var r=0,n=this.lworldExtY;return n!=0&&(r=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/n),r},l.prototype.inverseTransformX=function(a){var r=0,n=this.ldeviceExtX;return n!=0&&(r=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/n),r},l.prototype.inverseTransformY=function(a){var r=0,n=this.ldeviceExtY;return n!=0&&(r=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/n),r},l.prototype.inverseTransformPoint=function(a){var r=new u(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return r},E.exports=l}),(function(E,w,N){"use strict";function u(t){if(Array.isArray(t)){for(var i=0,h=Array(t.length);ia.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},e.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),i,h=0;h0&&arguments[0]!==void 0?arguments[0]:!0,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,h,g,s,L,y=this.getAllNodes(),p;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),p=new Set,h=0;hC||p>C)&&(t.gravitationForceX=-this.gravityConstant*s,t.gravitationForceY=-this.gravityConstant*L)):(C=i.getEstimatedSize()*this.compoundGravityRangeFactor,(y>C||p>C)&&(t.gravitationForceX=-this.gravityConstant*s*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*L*this.compoundGravityConstant))},e.prototype.isConverged=function(){var t,i=!1;return this.totalIterations>this.maxIterations/3&&(i=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=y.length||C>=y[0].length)){for(var R=0;Re}}]),n})();E.exports=r}),(function(E,w,N){"use strict";function u(){}u.svd=function(l){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=l.length,this.n=l[0].length;var a=Math.min(this.m,this.n);this.s=(function(Dt){for(var Nt=[];Dt-- >0;)Nt.push(0);return Nt})(Math.min(this.m+1,this.n)),this.U=(function(Dt){var Nt=function $t(Rt){if(Rt.length==0)return 0;for(var Xt=[],zt=0;zt0;)Nt.push(0);return Nt})(this.n),n=(function(Dt){for(var Nt=[];Dt-- >0;)Nt.push(0);return Nt})(this.m),f=!0,e=!0,c=Math.min(this.m-1,this.n),t=Math.max(0,Math.min(this.n-2,this.m)),i=0;i=0;v--)if(this.s[v]!==0){for(var D=v+1;D=0;F--){if((function(Dt,Nt){return Dt&&Nt})(F0;){var Q=void 0,Ut=void 0;for(Q=m-2;Q>=-1&&Q!==-1;Q--)if(Math.abs(r[Q])<=St+Lt*(Math.abs(this.s[Q])+Math.abs(this.s[Q+1]))){r[Q]=0;break}if(Q===m-2)Ut=4;else{var Mt=void 0;for(Mt=m-1;Mt>=Q&&Mt!==Q;Mt--){var at=(Mt!==m?Math.abs(r[Mt]):0)+(Mt!==Q+1?Math.abs(r[Mt-1]):0);if(Math.abs(this.s[Mt])<=St+Lt*at){this.s[Mt]=0;break}}Mt===Q?Ut=3:Mt===m-1?Ut=1:(Ut=2,Q=Mt)}switch(Q++,Ut){case 1:{var et=r[m-2];r[m-2]=0;for(var pt=m-2;pt>=Q;pt--){var mt=u.hypot(this.s[pt],et),Ct=this.s[pt]/mt,Et=et/mt;if(this.s[pt]=mt,pt!==Q&&(et=-Et*r[pt-1],r[pt-1]=Ct*r[pt-1]),e)for(var Tt=0;Tt=this.s[Q+1]);){var lt=this.s[Q];if(this.s[Q]=this.s[Q+1],this.s[Q+1]=lt,e&&QMath.abs(a)?(r=a/l,r=Math.abs(l)*Math.sqrt(1+r*r)):a!=0?(r=l/a,r=Math.abs(a)*Math.sqrt(1+r*r)):r=0,r},E.exports=u}),(function(E,w,N){"use strict";var u=(function(){function r(n,f){for(var e=0;e2&&arguments[2]!==void 0?arguments[2]:1,c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;l(this,r),this.sequence1=n,this.sequence2=f,this.match_score=e,this.mismatch_penalty=c,this.gap_penalty=t,this.iMax=n.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var i=0;i=0;n--){var f=this.listeners[n];f.event===a&&f.callback===r&&this.listeners.splice(n,1)}},l.emit=function(a,r){for(var n=0;n{(function(w,N){typeof ie=="object"&&typeof Ne=="object"?Ne.exports=N(Te()):typeof define=="function"&&define.amd?define(["layout-base"],N):typeof ie=="object"?ie.coseBase=N(Te()):w.coseBase=N(w.layoutBase)})(ie,function(E){return(()=>{"use strict";var w={45:((a,r,n)=>{var f={};f.layoutBase=n(551),f.CoSEConstants=n(806),f.CoSEEdge=n(767),f.CoSEGraph=n(880),f.CoSEGraphManager=n(578),f.CoSELayout=n(765),f.CoSENode=n(991),f.ConstraintHandler=n(902),a.exports=f}),806:((a,r,n)=>{var f=n(551).FDLayoutConstants;function e(){}for(var c in f)e[c]=f[c];e.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,e.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,e.DEFAULT_COMPONENT_SEPERATION=60,e.TILE=!0,e.TILING_PADDING_VERTICAL=10,e.TILING_PADDING_HORIZONTAL=10,e.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,e.ENFORCE_CONSTRAINTS=!0,e.APPLY_LAYOUT=!0,e.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,e.TREE_REDUCTION_ON_INCREMENTAL=!0,e.PURE_INCREMENTAL=e.DEFAULT_INCREMENTAL,a.exports=e}),767:((a,r,n)=>{var f=n(551).FDLayoutEdge;function e(t,i,h){f.call(this,t,i,h)}e.prototype=Object.create(f.prototype);for(var c in f)e[c]=f[c];a.exports=e}),880:((a,r,n)=>{var f=n(551).LGraph;function e(t,i,h){f.call(this,t,i,h)}e.prototype=Object.create(f.prototype);for(var c in f)e[c]=f[c];a.exports=e}),578:((a,r,n)=>{var f=n(551).LGraphManager;function e(t){f.call(this,t)}e.prototype=Object.create(f.prototype);for(var c in f)e[c]=f[c];a.exports=e}),765:((a,r,n)=>{var f=n(551).FDLayout,e=n(578),c=n(880),t=n(991),i=n(767),h=n(806),g=n(902),s=n(551).FDLayoutConstants,L=n(551).LayoutConstants,y=n(551).Point,p=n(551).PointD,C=n(551).DimensionD,R=n(551).Layout,A=n(551).Integer,b=n(551).IGeometry,W=n(551).LGraph,G=n(551).Transform,J=n(551).LinkedList;function x(){f.call(this),this.toBeTiled={},this.constraints={}}x.prototype=Object.create(f.prototype);for(var z in f)x[z]=f[z];x.prototype.newGraphManager=function(){var o=new e(this);return this.graphManager=o,o},x.prototype.newGraph=function(o){return new c(null,this.graphManager,o)},x.prototype.newNode=function(o){return new t(this.graphManager,o)},x.prototype.newEdge=function(o){return new i(null,null,o)},x.prototype.initParameters=function(){f.prototype.initParameters.call(this,arguments),this.isSubLayout||(h.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=h.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=s.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=s.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=s.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},x.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/s.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},x.prototype.layout=function(){var o=L.DEFAULT_CREATE_BENDS_AS_NEEDED;return o&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},x.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(h.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),d=this.nodesWithGravity.filter(function(D){return m.has(D)});this.graphManager.setAllNodesToApplyGravitation(d)}}else{var o=this.getFlatForest();if(o.length>0)this.positionNodesRadially(o);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),d=this.nodesWithGravity.filter(function(T){return m.has(T)});this.graphManager.setAllNodesToApplyGravitation(d),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(g.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),h.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},x.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%s.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var o=new Set(this.getAllNodes()),m=this.nodesWithGravity.filter(function(v){return o.has(v)});this.graphManager.setAllNodesToApplyGravitation(m),this.graphManager.updateBounds(),this.updateGrid(),h.PURE_INCREMENTAL?this.coolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),h.PURE_INCREMENTAL?this.coolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var d=!this.isTreeGrowing&&!this.isGrowthFinished,T=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(d,T),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},x.prototype.getPositionsData=function(){for(var o=this.graphManager.getAllNodes(),m={},d=0;d0&&this.updateDisplacements();for(var d=0;d0&&(T.fixedNodeWeight=D)}}if(this.constraints.relativePlacementConstraint){var O=new Map,P=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(M){o.fixedNodesOnHorizontal.add(M),o.fixedNodesOnVertical.add(M)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var S=this.constraints.alignmentConstraint.vertical,d=0;d=2*M.length/3;K--)Y=Math.floor(Math.random()*(K+1)),X=M[K],M[K]=M[Y],M[Y]=X;return M},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(M){if(M.left){var Y=O.has(M.left)?O.get(M.left):M.left,X=O.has(M.right)?O.get(M.right):M.right;o.nodesInRelativeHorizontal.includes(Y)||(o.nodesInRelativeHorizontal.push(Y),o.nodeToRelativeConstraintMapHorizontal.set(Y,[]),o.dummyToNodeForVerticalAlignment.has(Y)?o.nodeToTempPositionMapHorizontal.set(Y,o.idToNodeMap.get(o.dummyToNodeForVerticalAlignment.get(Y)[0]).getCenterX()):o.nodeToTempPositionMapHorizontal.set(Y,o.idToNodeMap.get(Y).getCenterX())),o.nodesInRelativeHorizontal.includes(X)||(o.nodesInRelativeHorizontal.push(X),o.nodeToRelativeConstraintMapHorizontal.set(X,[]),o.dummyToNodeForVerticalAlignment.has(X)?o.nodeToTempPositionMapHorizontal.set(X,o.idToNodeMap.get(o.dummyToNodeForVerticalAlignment.get(X)[0]).getCenterX()):o.nodeToTempPositionMapHorizontal.set(X,o.idToNodeMap.get(X).getCenterX())),o.nodeToRelativeConstraintMapHorizontal.get(Y).push({right:X,gap:M.gap}),o.nodeToRelativeConstraintMapHorizontal.get(X).push({left:Y,gap:M.gap})}else{var K=P.has(M.top)?P.get(M.top):M.top,st=P.has(M.bottom)?P.get(M.bottom):M.bottom;o.nodesInRelativeVertical.includes(K)||(o.nodesInRelativeVertical.push(K),o.nodeToRelativeConstraintMapVertical.set(K,[]),o.dummyToNodeForHorizontalAlignment.has(K)?o.nodeToTempPositionMapVertical.set(K,o.idToNodeMap.get(o.dummyToNodeForHorizontalAlignment.get(K)[0]).getCenterY()):o.nodeToTempPositionMapVertical.set(K,o.idToNodeMap.get(K).getCenterY())),o.nodesInRelativeVertical.includes(st)||(o.nodesInRelativeVertical.push(st),o.nodeToRelativeConstraintMapVertical.set(st,[]),o.dummyToNodeForHorizontalAlignment.has(st)?o.nodeToTempPositionMapVertical.set(st,o.idToNodeMap.get(o.dummyToNodeForHorizontalAlignment.get(st)[0]).getCenterY()):o.nodeToTempPositionMapVertical.set(st,o.idToNodeMap.get(st).getCenterY())),o.nodeToRelativeConstraintMapVertical.get(K).push({bottom:st,gap:M.gap}),o.nodeToRelativeConstraintMapVertical.get(st).push({top:K,gap:M.gap})}});else{var Z=new Map,tt=new Map;this.constraints.relativePlacementConstraint.forEach(function(M){if(M.left){var Y=O.has(M.left)?O.get(M.left):M.left,X=O.has(M.right)?O.get(M.right):M.right;Z.has(Y)?Z.get(Y).push(X):Z.set(Y,[X]),Z.has(X)?Z.get(X).push(Y):Z.set(X,[Y])}else{var K=P.has(M.top)?P.get(M.top):M.top,st=P.has(M.bottom)?P.get(M.bottom):M.bottom;tt.has(K)?tt.get(K).push(st):tt.set(K,[st]),tt.has(st)?tt.get(st).push(K):tt.set(st,[K])}});var F=function(Y,X){var K=[],st=[],Lt=new J,St=new Set,Q=0;return Y.forEach(function(Ut,Mt){if(!St.has(Mt)){K[Q]=[],st[Q]=!1;var at=Mt;for(Lt.push(at),St.add(at),K[Q].push(at);Lt.length!=0;){at=Lt.shift(),X.has(at)&&(st[Q]=!0);var et=Y.get(at);et.forEach(function(pt){St.has(pt)||(Lt.push(pt),St.add(pt),K[Q].push(pt))})}Q++}}),{components:K,isFixed:st}},_=F(Z,o.fixedNodesOnHorizontal);this.componentsOnHorizontal=_.components,this.fixedComponentsOnHorizontal=_.isFixed;var B=F(tt,o.fixedNodesOnVertical);this.componentsOnVertical=B.components,this.fixedComponentsOnVertical=B.isFixed}}},x.prototype.updateDisplacements=function(){var o=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(B){var M=o.idToNodeMap.get(B.nodeId);M.displacementX=0,M.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var m=this.constraints.alignmentConstraint.vertical,d=0;d1){var P;for(P=0;PT&&(T=Math.floor(O.y)),D=Math.floor(O.x+h.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(L.WORLD_CENTER_X-O.x/2,L.WORLD_CENTER_Y-O.y/2))},x.radialLayout=function(o,m,d){var T=Math.max(this.maxDiagonalInTree(o),h.DEFAULT_RADIAL_SEPARATION);x.branchRadialLayout(m,null,0,359,0,T);var v=W.calculateBounds(o),D=new G;D.setDeviceOrgX(v.getMinX()),D.setDeviceOrgY(v.getMinY()),D.setWorldOrgX(d.x),D.setWorldOrgY(d.y);for(var O=0;O1;){var K=X[0];X.splice(0,1);var st=F.indexOf(K);st>=0&&F.splice(st,1),M--,_--}m!=null?Y=(F.indexOf(X[0])+1)%M:Y=0;for(var Lt=Math.abs(T-d)/_,St=Y;B!=_;St=++St%M){var Q=F[St].getOtherEnd(o);if(Q!=m){var Ut=(d+B*Lt)%360,Mt=(Ut+Lt)%360;x.branchRadialLayout(Q,o,Ut,Mt,v+D,D),B++}}},x.maxDiagonalInTree=function(o){for(var m=A.MIN_VALUE,d=0;dm&&(m=v)}return m},x.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},x.prototype.groupZeroDegreeMembers=function(){var o=this,m={};this.memberGroups={},this.idToDummyNode={};for(var d=[],T=this.graphManager.getAllNodes(),v=0;v"u"&&(m[P]=[]),m[P]=m[P].concat(D)}Object.keys(m).forEach(function(S){if(m[S].length>1){var I="DummyCompound_"+S;o.memberGroups[I]=m[S];var Z=m[S][0].getParent(),tt=new t(o.graphManager);tt.id=I,tt.paddingLeft=Z.paddingLeft||0,tt.paddingRight=Z.paddingRight||0,tt.paddingBottom=Z.paddingBottom||0,tt.paddingTop=Z.paddingTop||0,o.idToDummyNode[I]=tt;var F=o.getGraphManager().add(o.newGraph(),tt),_=Z.getChild();_.add(tt);for(var B=0;Bv?(T.rect.x-=(T.labelWidth-v)/2,T.setWidth(T.labelWidth),T.labelMarginLeft=(T.labelWidth-v)/2):T.labelPosHorizontal=="right"&&T.setWidth(v+T.labelWidth)),T.labelHeight&&(T.labelPosVertical=="top"?(T.rect.y-=T.labelHeight,T.setHeight(D+T.labelHeight),T.labelMarginTop=T.labelHeight):T.labelPosVertical=="center"&&T.labelHeight>D?(T.rect.y-=(T.labelHeight-D)/2,T.setHeight(T.labelHeight),T.labelMarginTop=(T.labelHeight-D)/2):T.labelPosVertical=="bottom"&&T.setHeight(D+T.labelHeight))}})},x.prototype.repopulateCompounds=function(){for(var o=this.compoundOrder.length-1;o>=0;o--){var m=this.compoundOrder[o],d=m.id,T=m.paddingLeft,v=m.paddingTop,D=m.labelMarginLeft,O=m.labelMarginTop;this.adjustLocations(this.tiledMemberPack[d],m.rect.x,m.rect.y,T,v,D,O)}},x.prototype.repopulateZeroDegreeMembers=function(){var o=this,m=this.tiledZeroDegreePack;Object.keys(m).forEach(function(d){var T=o.idToDummyNode[d],v=T.paddingLeft,D=T.paddingTop,O=T.labelMarginLeft,P=T.labelMarginTop;o.adjustLocations(m[d],T.rect.x,T.rect.y,v,D,O,P)})},x.prototype.getToBeTiled=function(o){var m=o.id;if(this.toBeTiled[m]!=null)return this.toBeTiled[m];var d=o.getChild();if(d==null)return this.toBeTiled[m]=!1,!1;for(var T=d.getNodes(),v=0;v0)return this.toBeTiled[m]=!1,!1;if(D.getChild()==null){this.toBeTiled[D.id]=!1;continue}if(!this.getToBeTiled(D))return this.toBeTiled[m]=!1,!1}return this.toBeTiled[m]=!0,!0},x.prototype.getNodeDegree=function(o){for(var m=o.id,d=o.getEdges(),T=0,v=0;vZ&&(Z=F.rect.height)}d+=Z+o.verticalPadding}},x.prototype.tileCompoundMembers=function(o,m){var d=this;this.tiledMemberPack=[],Object.keys(o).forEach(function(T){var v=m[T];if(d.tiledMemberPack[T]=d.tileNodes(o[T],v.paddingLeft+v.paddingRight),v.rect.width=d.tiledMemberPack[T].width,v.rect.height=d.tiledMemberPack[T].height,v.setCenter(d.tiledMemberPack[T].centerX,d.tiledMemberPack[T].centerY),v.labelMarginLeft=0,v.labelMarginTop=0,h.NODE_DIMENSIONS_INCLUDE_LABELS){var D=v.rect.width,O=v.rect.height;v.labelWidth&&(v.labelPosHorizontal=="left"?(v.rect.x-=v.labelWidth,v.setWidth(D+v.labelWidth),v.labelMarginLeft=v.labelWidth):v.labelPosHorizontal=="center"&&v.labelWidth>D?(v.rect.x-=(v.labelWidth-D)/2,v.setWidth(v.labelWidth),v.labelMarginLeft=(v.labelWidth-D)/2):v.labelPosHorizontal=="right"&&v.setWidth(D+v.labelWidth)),v.labelHeight&&(v.labelPosVertical=="top"?(v.rect.y-=v.labelHeight,v.setHeight(O+v.labelHeight),v.labelMarginTop=v.labelHeight):v.labelPosVertical=="center"&&v.labelHeight>O?(v.rect.y-=(v.labelHeight-O)/2,v.setHeight(v.labelHeight),v.labelMarginTop=(v.labelHeight-O)/2):v.labelPosVertical=="bottom"&&v.setHeight(O+v.labelHeight))}})},x.prototype.tileNodes=function(o,m){var d=this.tileNodesByFavoringDim(o,m,!0),T=this.tileNodesByFavoringDim(o,m,!1),v=this.getOrgRatio(d),D=this.getOrgRatio(T),O;return DP&&(P=B.getWidth())});var S=D/v,I=O/v,Z=Math.pow(d-T,2)+4*(S+T)*(I+d)*v,tt=(T-d+Math.sqrt(Z))/(2*(S+T)),F;m?(F=Math.ceil(tt),F==tt&&F++):F=Math.floor(tt);var _=F*(S+T)-T;return P>_&&(_=P),_+=T*2,_},x.prototype.tileNodesByFavoringDim=function(o,m,d){var T=h.TILING_PADDING_VERTICAL,v=h.TILING_PADDING_HORIZONTAL,D=h.TILING_COMPARE_BY,O={rows:[],rowWidth:[],rowHeight:[],width:0,height:m,verticalPadding:T,horizontalPadding:v,centerX:0,centerY:0};D&&(O.idealRowWidth=this.calcIdealRowWidth(o,d));var P=function(M){return M.rect.width*M.rect.height},S=function(M,Y){return P(Y)-P(M)};o.sort(function(B,M){var Y=S;return O.idealRowWidth?(Y=D,Y(B.id,M.id)):Y(B,M)});for(var I=0,Z=0,tt=0;tt0&&(O+=o.horizontalPadding),o.rowWidth[d]=O,o.width0&&(P+=o.verticalPadding);var S=0;P>o.rowHeight[d]&&(S=o.rowHeight[d],o.rowHeight[d]=P,S=o.rowHeight[d]-S),o.height+=S,o.rows[d].push(m)},x.prototype.getShortestRowIndex=function(o){for(var m=-1,d=Number.MAX_VALUE,T=0;Td&&(m=T,d=o.rowWidth[T]);return m},x.prototype.canAddHorizontal=function(o,m,d){if(o.idealRowWidth){var T=o.rows.length-1,v=o.rowWidth[T];return v+m+o.horizontalPadding<=o.idealRowWidth}var D=this.getShortestRowIndex(o);if(D<0)return!0;var O=o.rowWidth[D];if(O+o.horizontalPadding+m<=o.width)return!0;var P=0;o.rowHeight[D]0&&(P=d+o.verticalPadding-o.rowHeight[D]);var S;o.width-O>=m+o.horizontalPadding?S=(o.height+P)/(O+m+o.horizontalPadding):S=(o.height+P)/o.width,P=d+o.verticalPadding;var I;return o.widthD&&m!=d){T.splice(-1,1),o.rows[d].push(v),o.rowWidth[m]=o.rowWidth[m]-D,o.rowWidth[d]=o.rowWidth[d]+D,o.width=o.rowWidth[instance.getLongestRowIndex(o)];for(var O=Number.MIN_VALUE,P=0;PO&&(O=T[P].height);m>0&&(O+=o.verticalPadding);var S=o.rowHeight[m]+o.rowHeight[d];o.rowHeight[m]=O,o.rowHeight[d]0)for(var _=v;_<=D;_++)F[0]+=this.grid[_][O-1].length+this.grid[_][O].length-1;if(D0)for(var _=O;_<=P;_++)F[3]+=this.grid[v-1][_].length+this.grid[v][_].length-1;for(var B=A.MAX_VALUE,M,Y,X=0;X{var f=n(551).FDLayoutNode,e=n(551).IMath;function c(i,h,g,s){f.call(this,i,h,g,s)}c.prototype=Object.create(f.prototype);for(var t in f)c[t]=f[t];c.prototype.calculateDisplacement=function(){var i=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=i.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=i.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=i.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=i.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>i.coolingFactor*i.maxNodeDisplacement&&(this.displacementX=i.coolingFactor*i.maxNodeDisplacement*e.sign(this.displacementX)),Math.abs(this.displacementY)>i.coolingFactor*i.maxNodeDisplacement&&(this.displacementY=i.coolingFactor*i.maxNodeDisplacement*e.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},c.prototype.propogateDisplacementToChildren=function(i,h){for(var g=this.getChild().getNodes(),s,L=0;L{function f(g){if(Array.isArray(g)){for(var s=0,L=Array(g.length);s0){var dt=0;it.forEach(function(lt){V=="horizontal"?(q.set(lt,y.has(lt)?p[y.get(lt)]:k.get(lt)),dt+=q.get(lt)):(q.set(lt,y.has(lt)?C[y.get(lt)]:k.get(lt)),dt+=q.get(lt))}),dt=dt/it.length,ot.forEach(function(lt){$.has(lt)||q.set(lt,dt)})}else{var nt=0;ot.forEach(function(lt){V=="horizontal"?nt+=y.has(lt)?p[y.get(lt)]:k.get(lt):nt+=y.has(lt)?C[y.get(lt)]:k.get(lt)}),nt=nt/ot.length,ot.forEach(function(lt){q.set(lt,nt)})}});for(var rt=function(){var it=gt.shift(),dt=H.get(it);dt.forEach(function(nt){if(q.get(nt.id)lt&&(lt=Xt),ztFt&&(Ft=zt)}}catch(_t){Vt=!0,Dt=_t}finally{try{!xt&&Nt.return&&Nt.return()}finally{if(Vt)throw Dt}}var ce=(dt+lt)/2-(nt+Ft)/2,qt=!0,Jt=!1,Kt=void 0;try{for(var Qt=ot[Symbol.iterator](),oe;!(qt=(oe=Qt.next()).done);qt=!0){var jt=oe.value;q.set(jt,q.get(jt)+ce)}}catch(_t){Jt=!0,Kt=_t}finally{try{!qt&&Qt.return&&Qt.return()}finally{if(Jt)throw Kt}}})}return q},z=function(H){var V=0,$=0,k=0,j=0;if(H.forEach(function(ht){ht.left?p[y.get(ht.left)]-p[y.get(ht.right)]>=0?V++:$++:C[y.get(ht.top)]-C[y.get(ht.bottom)]>=0?k++:j++}),V>$&&k>j)for(var ut=0;ut$)for(var ft=0;ftj)for(var q=0;q1)s.fixedNodeConstraint.forEach(function(U,H){T[H]=[U.position.x,U.position.y],v[H]=[p[y.get(U.nodeId)],C[y.get(U.nodeId)]]}),D=!0;else if(s.alignmentConstraint)(function(){var U=0;if(s.alignmentConstraint.vertical){for(var H=s.alignmentConstraint.vertical,V=function(q){var ht=new Set;H[q].forEach(function(vt){ht.add(vt)});var gt=new Set([].concat(f(ht)).filter(function(vt){return P.has(vt)})),rt=void 0;gt.size>0?rt=p[y.get(gt.values().next().value)]:rt=J(ht).x,H[q].forEach(function(vt){T[U]=[rt,C[y.get(vt)]],v[U]=[p[y.get(vt)],C[y.get(vt)]],U++})},$=0;$0?rt=p[y.get(gt.values().next().value)]:rt=J(ht).y,k[q].forEach(function(vt){T[U]=[p[y.get(vt)],rt],v[U]=[p[y.get(vt)],C[y.get(vt)]],U++})},ut=0;uttt&&(tt=Z[_].length,F=_);if(tt0){var Ct={x:0,y:0};s.fixedNodeConstraint.forEach(function(U,H){var V={x:p[y.get(U.nodeId)],y:C[y.get(U.nodeId)]},$=U.position,k=G($,V);Ct.x+=k.x,Ct.y+=k.y}),Ct.x/=s.fixedNodeConstraint.length,Ct.y/=s.fixedNodeConstraint.length,p.forEach(function(U,H){p[H]+=Ct.x}),C.forEach(function(U,H){C[H]+=Ct.y}),s.fixedNodeConstraint.forEach(function(U){p[y.get(U.nodeId)]=U.position.x,C[y.get(U.nodeId)]=U.position.y})}if(s.alignmentConstraint){if(s.alignmentConstraint.vertical)for(var Et=s.alignmentConstraint.vertical,Tt=function(H){var V=new Set;Et[H].forEach(function(j){V.add(j)});var $=new Set([].concat(f(V)).filter(function(j){return P.has(j)})),k=void 0;$.size>0?k=p[y.get($.values().next().value)]:k=J(V).x,V.forEach(function(j){P.has(j)||(p[y.get(j)]=k)})},Ot=0;Ot0?k=C[y.get($.values().next().value)]:k=J(V).y,V.forEach(function(j){P.has(j)||(C[y.get(j)]=k)})},Pt=0;Pt{a.exports=E})},N={};function u(a){var r=N[a];if(r!==void 0)return r.exports;var n=N[a]={exports:{}};return w[a](n,n.exports,u),n.exports}var l=u(45);return l})()})});var Je=pe((ne,Ce)=>{(function(w,N){typeof ne=="object"&&typeof Ce=="object"?Ce.exports=N(Le()):typeof define=="function"&&define.amd?define(["cose-base"],N):typeof ne=="object"?ne.cytoscapeFcose=N(Le()):w.cytoscapeFcose=N(w.coseBase)})(ne,function(E){return(()=>{"use strict";var w={658:(a=>{a.exports=Object.assign!=null?Object.assign.bind(Object):function(r){for(var n=arguments.length,f=Array(n>1?n-1:0),e=1;e{var f=(function(){function t(i,h){var g=[],s=!0,L=!1,y=void 0;try{for(var p=i[Symbol.iterator](),C;!(s=(C=p.next()).done)&&(g.push(C.value),!(h&&g.length===h));s=!0);}catch(R){L=!0,y=R}finally{try{!s&&p.return&&p.return()}finally{if(L)throw y}}return g}return function(i,h){if(Array.isArray(i))return i;if(Symbol.iterator in Object(i))return t(i,h);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),e=n(140).layoutBase.LinkedList,c={};c.getTopMostNodes=function(t){for(var i={},h=0;h0&&D.merge(I)});for(var O=0;O1){C=y[0],R=C.connectedEdges().length,y.forEach(function(v){v.connectedEdges().length0&&g.set("dummy"+(g.size+1),W),G},c.relocateComponent=function(t,i,h){if(!h.fixedNodeConstraint){var g=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,L=Number.POSITIVE_INFINITY,y=Number.NEGATIVE_INFINITY;if(h.quality=="draft"){var p=!0,C=!1,R=void 0;try{for(var A=i.nodeIndexes[Symbol.iterator](),b;!(p=(b=A.next()).done);p=!0){var W=b.value,G=f(W,2),J=G[0],x=G[1],z=h.cy.getElementById(J);if(z){var o=z.boundingBox(),m=i.xCoords[x]-o.w/2,d=i.xCoords[x]+o.w/2,T=i.yCoords[x]-o.h/2,v=i.yCoords[x]+o.h/2;ms&&(s=d),Ty&&(y=v)}}}catch(I){C=!0,R=I}finally{try{!p&&A.return&&A.return()}finally{if(C)throw R}}var D=t.x-(s+g)/2,O=t.y-(y+L)/2;i.xCoords=i.xCoords.map(function(I){return I+D}),i.yCoords=i.yCoords.map(function(I){return I+O})}else{Object.keys(i).forEach(function(I){var Z=i[I],tt=Z.getRect().x,F=Z.getRect().x+Z.getRect().width,_=Z.getRect().y,B=Z.getRect().y+Z.getRect().height;tts&&(s=F),_y&&(y=B)});var P=t.x-(s+g)/2,S=t.y-(y+L)/2;Object.keys(i).forEach(function(I){var Z=i[I];Z.setCenter(Z.getCenterX()+P,Z.getCenterY()+S)})}}},c.calcBoundingBox=function(t,i,h,g){for(var s=Number.MAX_SAFE_INTEGER,L=Number.MIN_SAFE_INTEGER,y=Number.MAX_SAFE_INTEGER,p=Number.MIN_SAFE_INTEGER,C=void 0,R=void 0,A=void 0,b=void 0,W=t.descendants().not(":parent"),G=W.length,J=0;JC&&(s=C),LA&&(y=A),p{var f=n(548),e=n(140).CoSELayout,c=n(140).CoSENode,t=n(140).layoutBase.PointD,i=n(140).layoutBase.DimensionD,h=n(140).layoutBase.LayoutConstants,g=n(140).layoutBase.FDLayoutConstants,s=n(140).CoSEConstants,L=function(p,C){var R=p.cy,A=p.eles,b=A.nodes(),W=A.edges(),G=void 0,J=void 0,x=void 0,z={};p.randomize&&(G=C.nodeIndexes,J=C.xCoords,x=C.yCoords);var o=function(I){return typeof I=="function"},m=function(I,Z){return o(I)?I(Z):I},d=f.calcParentsWithoutChildren(R,A),T=function S(I,Z,tt,F){for(var _=Z.length,B=0;B<_;B++){var M=Z[B],Y=null;M.intersection(d).length==0&&(Y=M.children());var X=void 0,K=M.layoutDimensions({nodeDimensionsIncludeLabels:F.nodeDimensionsIncludeLabels});if(M.outerWidth()!=null&&M.outerHeight()!=null)if(F.randomize)if(!M.isParent())X=I.add(new c(tt.graphManager,new t(J[G.get(M.id())]-K.w/2,x[G.get(M.id())]-K.h/2),new i(parseFloat(K.w),parseFloat(K.h))));else{var st=f.calcBoundingBox(M,J,x,G);M.intersection(d).length==0?X=I.add(new c(tt.graphManager,new t(st.topLeftX,st.topLeftY),new i(st.width,st.height))):X=I.add(new c(tt.graphManager,new t(st.topLeftX,st.topLeftY),new i(parseFloat(K.w),parseFloat(K.h))))}else X=I.add(new c(tt.graphManager,new t(M.position("x")-K.w/2,M.position("y")-K.h/2),new i(parseFloat(K.w),parseFloat(K.h))));else X=I.add(new c(this.graphManager));if(X.id=M.data("id"),X.nodeRepulsion=m(F.nodeRepulsion,M),X.paddingLeft=parseInt(M.css("padding")),X.paddingTop=parseInt(M.css("padding")),X.paddingRight=parseInt(M.css("padding")),X.paddingBottom=parseInt(M.css("padding")),F.nodeDimensionsIncludeLabels&&(X.labelWidth=M.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,X.labelHeight=M.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,X.labelPosVertical=M.css("text-valign"),X.labelPosHorizontal=M.css("text-halign")),z[M.data("id")]=X,isNaN(X.rect.x)&&(X.rect.x=0),isNaN(X.rect.y)&&(X.rect.y=0),Y!=null&&Y.length>0){var Lt=void 0;Lt=tt.getGraphManager().add(tt.newGraph(),X),S(Lt,Y,tt,F)}}},v=function(I,Z,tt){for(var F=0,_=0,B=0;B0?s.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=F/_:o(p.idealEdgeLength)?s.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=50:s.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=p.idealEdgeLength,s.MIN_REPULSION_DIST=g.MIN_REPULSION_DIST=g.DEFAULT_EDGE_LENGTH/10,s.DEFAULT_RADIAL_SEPARATION=g.DEFAULT_EDGE_LENGTH)},D=function(I,Z){Z.fixedNodeConstraint&&(I.constraints.fixedNodeConstraint=Z.fixedNodeConstraint),Z.alignmentConstraint&&(I.constraints.alignmentConstraint=Z.alignmentConstraint),Z.relativePlacementConstraint&&(I.constraints.relativePlacementConstraint=Z.relativePlacementConstraint)};p.nestingFactor!=null&&(s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=g.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=p.nestingFactor),p.gravity!=null&&(s.DEFAULT_GRAVITY_STRENGTH=g.DEFAULT_GRAVITY_STRENGTH=p.gravity),p.numIter!=null&&(s.MAX_ITERATIONS=g.MAX_ITERATIONS=p.numIter),p.gravityRange!=null&&(s.DEFAULT_GRAVITY_RANGE_FACTOR=g.DEFAULT_GRAVITY_RANGE_FACTOR=p.gravityRange),p.gravityCompound!=null&&(s.DEFAULT_COMPOUND_GRAVITY_STRENGTH=g.DEFAULT_COMPOUND_GRAVITY_STRENGTH=p.gravityCompound),p.gravityRangeCompound!=null&&(s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=g.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=p.gravityRangeCompound),p.initialEnergyOnIncremental!=null&&(s.DEFAULT_COOLING_FACTOR_INCREMENTAL=g.DEFAULT_COOLING_FACTOR_INCREMENTAL=p.initialEnergyOnIncremental),p.tilingCompareBy!=null&&(s.TILING_COMPARE_BY=p.tilingCompareBy),p.quality=="proof"?h.QUALITY=2:h.QUALITY=0,s.NODE_DIMENSIONS_INCLUDE_LABELS=g.NODE_DIMENSIONS_INCLUDE_LABELS=h.NODE_DIMENSIONS_INCLUDE_LABELS=p.nodeDimensionsIncludeLabels,s.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=h.DEFAULT_INCREMENTAL=!p.randomize,s.ANIMATE=g.ANIMATE=h.ANIMATE=p.animate,s.TILE=p.tile,s.TILING_PADDING_VERTICAL=typeof p.tilingPaddingVertical=="function"?p.tilingPaddingVertical.call():p.tilingPaddingVertical,s.TILING_PADDING_HORIZONTAL=typeof p.tilingPaddingHorizontal=="function"?p.tilingPaddingHorizontal.call():p.tilingPaddingHorizontal,s.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=h.DEFAULT_INCREMENTAL=!0,s.PURE_INCREMENTAL=!p.randomize,h.DEFAULT_UNIFORM_LEAF_NODE_SIZES=p.uniformNodeDimensions,p.step=="transformed"&&(s.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,s.ENFORCE_CONSTRAINTS=!1,s.APPLY_LAYOUT=!1),p.step=="enforced"&&(s.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,s.ENFORCE_CONSTRAINTS=!0,s.APPLY_LAYOUT=!1),p.step=="cose"&&(s.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,s.ENFORCE_CONSTRAINTS=!1,s.APPLY_LAYOUT=!0),p.step=="all"&&(p.randomize?s.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:s.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,s.ENFORCE_CONSTRAINTS=!0,s.APPLY_LAYOUT=!0),p.fixedNodeConstraint||p.alignmentConstraint||p.relativePlacementConstraint?s.TREE_REDUCTION_ON_INCREMENTAL=!1:s.TREE_REDUCTION_ON_INCREMENTAL=!0;var O=new e,P=O.newGraphManager();return T(P.addRoot(),f.getTopMostNodes(b),O,p),v(O,P,W),D(O,p),O.runLayout(),z};a.exports={coseLayout:L}}),212:((a,r,n)=>{var f=(function(){function p(C,R){for(var A=0;A0)if(v){var P=t.getTopMostNodes(A.eles.nodes());if(o=t.connectComponents(b,A.eles,P),o.forEach(function(at){var et=at.boundingBox();m.push({x:et.x1+et.w/2,y:et.y1+et.h/2})}),A.randomize&&o.forEach(function(at){A.eles=at,G.push(h(A))}),A.quality=="default"||A.quality=="proof"){var S=b.collection();if(A.tile){var I=new Map,Z=[],tt=[],F=0,_={nodeIndexes:I,xCoords:Z,yCoords:tt},B=[];if(o.forEach(function(at,et){at.edges().length==0&&(at.nodes().forEach(function(pt,mt){S.merge(at.nodes()[mt]),pt.isParent()||(_.nodeIndexes.set(at.nodes()[mt].id(),F++),_.xCoords.push(at.nodes()[0].position().x),_.yCoords.push(at.nodes()[0].position().y))}),B.push(et))}),S.length>1){var M=S.boundingBox();m.push({x:M.x1+M.w/2,y:M.y1+M.h/2}),o.push(S),G.push(_);for(var Y=B.length-1;Y>=0;Y--)o.splice(B[Y],1),G.splice(B[Y],1),m.splice(B[Y],1)}}o.forEach(function(at,et){A.eles=at,z.push(s(A,G[et])),t.relocateComponent(m[et],z[et],A)})}else o.forEach(function(at,et){t.relocateComponent(m[et],G[et],A)});var X=new Set;if(o.length>1){var K=[],st=W.filter(function(at){return at.css("display")=="none"});o.forEach(function(at,et){var pt=void 0;if(A.quality=="draft"&&(pt=G[et].nodeIndexes),at.nodes().not(st).length>0){var mt={};mt.edges=[],mt.nodes=[];var Ct=void 0;at.nodes().not(st).forEach(function(Et){if(A.quality=="draft")if(!Et.isParent())Ct=pt.get(Et.id()),mt.nodes.push({x:G[et].xCoords[Ct]-Et.boundingbox().w/2,y:G[et].yCoords[Ct]-Et.boundingbox().h/2,width:Et.boundingbox().w,height:Et.boundingbox().h});else{var Tt=t.calcBoundingBox(Et,G[et].xCoords,G[et].yCoords,pt);mt.nodes.push({x:Tt.topLeftX,y:Tt.topLeftY,width:Tt.width,height:Tt.height})}else z[et][Et.id()]&&mt.nodes.push({x:z[et][Et.id()].getLeft(),y:z[et][Et.id()].getTop(),width:z[et][Et.id()].getWidth(),height:z[et][Et.id()].getHeight()})}),at.edges().forEach(function(Et){var Tt=Et.source(),Ot=Et.target();if(Tt.css("display")!="none"&&Ot.css("display")!="none")if(A.quality=="draft"){var It=pt.get(Tt.id()),Wt=pt.get(Ot.id()),Pt=[],Yt=[];if(Tt.isParent()){var bt=t.calcBoundingBox(Tt,G[et].xCoords,G[et].yCoords,pt);Pt.push(bt.topLeftX+bt.width/2),Pt.push(bt.topLeftY+bt.height/2)}else Pt.push(G[et].xCoords[It]),Pt.push(G[et].yCoords[It]);if(Ot.isParent()){var U=t.calcBoundingBox(Ot,G[et].xCoords,G[et].yCoords,pt);Yt.push(U.topLeftX+U.width/2),Yt.push(U.topLeftY+U.height/2)}else Yt.push(G[et].xCoords[Wt]),Yt.push(G[et].yCoords[Wt]);mt.edges.push({startX:Pt[0],startY:Pt[1],endX:Yt[0],endY:Yt[1]})}else z[et][Tt.id()]&&z[et][Ot.id()]&&mt.edges.push({startX:z[et][Tt.id()].getCenterX(),startY:z[et][Tt.id()].getCenterY(),endX:z[et][Ot.id()].getCenterX(),endY:z[et][Ot.id()].getCenterY()})}),mt.nodes.length>0&&(K.push(mt),X.add(et))}});var Lt=T.packComponents(K,A.randomize).shifts;if(A.quality=="draft")G.forEach(function(at,et){var pt=at.xCoords.map(function(Ct){return Ct+Lt[et].dx}),mt=at.yCoords.map(function(Ct){return Ct+Lt[et].dy});at.xCoords=pt,at.yCoords=mt});else{var St=0;X.forEach(function(at){Object.keys(z[at]).forEach(function(et){var pt=z[at][et];pt.setCenter(pt.getCenterX()+Lt[St].dx,pt.getCenterY()+Lt[St].dy)}),St++})}}}else{var D=A.eles.boundingBox();if(m.push({x:D.x1+D.w/2,y:D.y1+D.h/2}),A.randomize){var O=h(A);G.push(O)}A.quality=="default"||A.quality=="proof"?(z.push(s(A,G[0])),t.relocateComponent(m[0],z[0],A)):t.relocateComponent(m[0],G[0],A)}var Q=function(et,pt){if(A.quality=="default"||A.quality=="proof"){typeof et=="number"&&(et=pt);var mt=void 0,Ct=void 0,Et=et.data("id");return z.forEach(function(Ot){Et in Ot&&(mt={x:Ot[Et].getRect().getCenterX(),y:Ot[Et].getRect().getCenterY()},Ct=Ot[Et])}),A.nodeDimensionsIncludeLabels&&(Ct.labelWidth&&(Ct.labelPosHorizontal=="left"?mt.x+=Ct.labelWidth/2:Ct.labelPosHorizontal=="right"&&(mt.x-=Ct.labelWidth/2)),Ct.labelHeight&&(Ct.labelPosVertical=="top"?mt.y+=Ct.labelHeight/2:Ct.labelPosVertical=="bottom"&&(mt.y-=Ct.labelHeight/2))),mt==null&&(mt={x:et.position("x"),y:et.position("y")}),{x:mt.x,y:mt.y}}else{var Tt=void 0;return G.forEach(function(Ot){var It=Ot.nodeIndexes.get(et.id());It!=null&&(Tt={x:Ot.xCoords[It],y:Ot.yCoords[It]})}),Tt==null&&(Tt={x:et.position("x"),y:et.position("y")}),{x:Tt.x,y:Tt.y}}};if(A.quality=="default"||A.quality=="proof"||A.randomize){var Ut=t.calcParentsWithoutChildren(b,W),Mt=W.filter(function(at){return at.css("display")=="none"});A.eles=W.not(Mt),W.nodes().not(":parent").not(Mt).layoutPositions(R,A,Q),Ut.length>0&&Ut.forEach(function(at){at.position(Q(at))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),p})();a.exports=y}),657:((a,r,n)=>{var f=n(548),e=n(140).layoutBase.Matrix,c=n(140).layoutBase.SVD,t=function(h){var g=h.cy,s=h.eles,L=s.nodes(),y=s.nodes(":parent"),p=new Map,C=new Map,R=new Map,A=[],b=[],W=[],G=[],J=[],x=[],z=[],o=[],m=void 0,d=void 0,T=1e8,v=1e-9,D=h.piTol,O=h.samplingType,P=h.nodeSeparation,S=void 0,I=function(){for(var V=0,$=0,k=!1;$=ut;){q=j[ut++];for(var ot=A[q],it=0;itrt&&(rt=J[nt],vt=nt)}return vt},tt=function(V){var $=void 0;if(V){$=Math.floor(Math.random()*d),m=$;for(var j=0;j=1)break;rt=gt}for(var ot=0;ot=1)break;rt=gt}for(var dt=0;dt0&&($.isParent()?A[V].push(R.get($.id())):A[V].push($.id()))})});var Ut=function(V){var $=C.get(V),k=void 0;p.get(V).forEach(function(j){g.getElementById(j).isParent()?k=R.get(j):k=j,A[$].push(k),A[C.get(k)].push(V)})},Mt=!0,at=!1,et=void 0;try{for(var pt=p.keys()[Symbol.iterator](),mt;!(Mt=(mt=pt.next()).done);Mt=!0){var Ct=mt.value;Ut(Ct)}}catch(H){at=!0,et=H}finally{try{!Mt&&pt.return&&pt.return()}finally{if(at)throw et}}d=C.size;var Et=void 0;if(d>2){S=d{var f=n(212),e=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&e(cytoscape),a.exports=e}),140:(a=>{a.exports=E})},N={};function u(a){var r=N[a];if(r!==void 0)return r.exports;var n=N[a]={exports:{}};return w[a](n,n.exports,u),n.exports}var l=u(579);return l})()})});var ir=ur(Je(),1);var Ke={L:"left",R:"right",T:"top",B:"bottom"},je={L:ct(E=>`${E},${E/2} 0,${E} 0,0`,"L"),R:ct(E=>`0,${E/2} ${E},0 ${E},${E}`,"R"),T:ct(E=>`0,0 ${E},0 ${E/2},${E}`,"T"),B:ct(E=>`${E/2},0 ${E},${E} 0,${E}`,"B")},fe={L:ct((E,w)=>E-w+2,"L"),R:ct((E,w)=>E-2,"R"),T:ct((E,w)=>E-w+2,"T"),B:ct((E,w)=>E-2,"B")},dr=ct(function(E){return Ht(E)?E==="L"?"R":"L":E==="T"?"B":"T"},"getOppositeArchitectureDirection"),_e=ct(function(E){let w=E;return w==="L"||w==="R"||w==="T"||w==="B"},"isArchitectureDirection"),Ht=ct(function(E){let w=E;return w==="L"||w==="R"},"isArchitectureDirectionX"),Zt=ct(function(E){let w=E;return w==="T"||w==="B"},"isArchitectureDirectionY"),we=ct(function(E,w){let N=Ht(E)&&Zt(w),u=Zt(E)&&Ht(w);return N||u},"isArchitectureDirectionXY"),vr=ct(function(E){let w=E[0],N=E[1],u=Ht(w)&&Zt(N),l=Zt(w)&&Ht(N);return u||l},"isArchitecturePairXY"),pr=ct(function(E){return E!=="LL"&&E!=="RR"&&E!=="TT"&&E!=="BB"},"isValidArchitectureDirectionPair"),Ae=ct(function(E,w){let N=`${E}${w}`;return pr(N)?N:void 0},"getArchitectureDirectionPair"),yr=ct(function([E,w],N){let u=N[0],l=N[1];return Ht(u)?Zt(l)?[E+(u==="L"?-1:1),w+(l==="T"?1:-1)]:[E+(u==="L"?-1:1),w]:Ht(l)?[E+(l==="L"?1:-1),w+(u==="T"?1:-1)]:[E,w+(u==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),mr=ct(function(E){return E==="LT"||E==="TL"?[1,1]:E==="BL"||E==="LB"?[1,-1]:E==="BR"||E==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Er=ct(function(E,w){return we(E,w)?"bend":Ht(E)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Tr=ct(function(E){return E.type==="service"},"isArchitectureService"),Nr=ct(function(E){return E.type==="junction"},"isArchitectureJunction"),tr=ct(E=>E.data(),"edgeData"),ee=ct(E=>E.data(),"nodeData"),Lr=Re.architecture,er=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=Ge,this.getAccTitle=Ue,this.setDiagramTitle=He,this.getDiagramTitle=We,this.getAccDescription=Xe,this.setAccDescription=Ye,this.clear()}static{ct(this,"ArchitectureDB")}setDiagramId(E){this.diagramId=E}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",Pe()}addService({id:E,icon:w,in:N,title:u,iconText:l}){if(this.registeredIds[E]!==void 0)throw new Error(`The service id [${E}] is already in use by another ${this.registeredIds[E]}`);if(N!==void 0){if(E===N)throw new Error(`The service [${E}] cannot be placed within itself`);if(this.registeredIds[N]===void 0)throw new Error(`The service [${E}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[N]==="node")throw new Error(`The service [${E}]'s parent is not a group`)}this.registeredIds[E]="node",this.nodes[E]={id:E,type:"service",icon:w,iconText:l,title:u,edges:[],in:N}}getServices(){return Object.values(this.nodes).filter(Tr)}addJunction({id:E,in:w}){if(this.registeredIds[E]!==void 0)throw new Error(`The junction id [${E}] is already in use by another ${this.registeredIds[E]}`);if(w!==void 0){if(E===w)throw new Error(`The junction [${E}] cannot be placed within itself`);if(this.registeredIds[w]===void 0)throw new Error(`The junction [${E}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds[w]==="node")throw new Error(`The junction [${E}]'s parent is not a group`)}this.registeredIds[E]="node",this.nodes[E]={id:E,type:"junction",edges:[],in:w}}getJunctions(){return Object.values(this.nodes).filter(Nr)}getNodes(){return Object.values(this.nodes)}getNode(E){return this.nodes[E]??null}addGroup({id:E,icon:w,in:N,title:u}){if(this.registeredIds?.[E]!==void 0)throw new Error(`The group id [${E}] is already in use by another ${this.registeredIds[E]}`);if(N!==void 0){if(E===N)throw new Error(`The group [${E}] cannot be placed within itself`);if(this.registeredIds?.[N]===void 0)throw new Error(`The group [${E}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds?.[N]==="node")throw new Error(`The group [${E}]'s parent is not a group`)}this.registeredIds[E]="group",this.groups[E]={id:E,icon:w,title:u,in:N}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:E,rhsId:w,lhsDir:N,rhsDir:u,lhsInto:l,rhsInto:a,lhsGroup:r,rhsGroup:n,title:f}){if(!_e(N))throw new Error(`Invalid direction given for left hand side of edge ${E}--${w}. Expected (L,R,T,B) got ${String(N)}`);if(!_e(u))throw new Error(`Invalid direction given for right hand side of edge ${E}--${w}. Expected (L,R,T,B) got ${String(u)}`);if(this.nodes[E]===void 0&&this.groups[E]===void 0)throw new Error(`The left-hand id [${E}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[w]===void 0&&this.groups[w]===void 0)throw new Error(`The right-hand id [${w}] does not yet exist. Please create the service/group before declaring an edge to it.`);let e=this.nodes[E].in,c=this.nodes[w].in;if(r&&e&&c&&e==c)throw new Error(`The left-hand id [${E}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(n&&e&&c&&e==c)throw new Error(`The right-hand id [${w}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let t={lhsId:E,lhsDir:N,lhsInto:l,lhsGroup:r,rhsId:w,rhsDir:u,rhsInto:a,rhsGroup:n,title:f};this.edges.push(t),this.nodes[E]&&this.nodes[w]&&(this.nodes[E].edges.push(this.edges[this.edges.length-1]),this.nodes[w].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(this.dataStructures===void 0){let E={},w=Object.entries(this.nodes).reduce((n,[f,e])=>(n[f]=e.edges.reduce((c,t)=>{let i=this.getNode(t.lhsId)?.in,h=this.getNode(t.rhsId)?.in;if(i&&h&&i!==h){let g=Er(t.lhsDir,t.rhsDir);g!=="bend"&&(E[i]??={},E[i][h]=g,E[h]??={},E[h][i]=g)}if(t.lhsId===f){let g=Ae(t.lhsDir,t.rhsDir);g&&(c[g]=t.rhsId)}else{let g=Ae(t.rhsDir,t.lhsDir);g&&(c[g]=t.lhsId)}return c},{}),n),{}),N=Object.keys(w)[0],u={[N]:1},l=Object.keys(w).reduce((n,f)=>f===N?n:{...n,[f]:1},{}),a=ct(n=>{let f={[n]:[0,0]},e=[n];for(;e.length>0;){let c=e.shift();if(c){u[c]=1,delete l[c];let t=w[c],[i,h]=f[c];Object.entries(t).forEach(([g,s])=>{u[s]||(f[s]=yr([i,h],g),e.push(s))})}}return f},"BFS"),r=[a(N)];for(;Object.keys(l).length>0;)r.push(a(Object.keys(l)[0]));this.dataStructures={adjList:w,spatialMaps:r,groupAlignments:E}}return this.dataStructures}setElementForId(E,w){this.elements[E]=w}getElementById(E){return this.elements[E]}getConfig(){return Be({...Lr,...Se().architecture})}getConfigField(E){return this.getConfig()[E]}},Cr=ct((E,w)=>{qe(E,w),E.groups.map(N=>w.addGroup(N)),E.services.map(N=>w.addService({...N,type:"service"})),E.junctions.map(N=>w.addJunction({...N,type:"junction"})),E.edges.map(N=>w.addEdge(N))},"populateDb"),rr={parser:{yy:void 0},parse:ct(async E=>{let w=await Qe("architecture",E);ye.debug(w);let N=rr.parser?.yy;if(!(N instanceof er))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Cr(w,N)},"parse")},Ar=ct(E=>` +import{a as qe}from"./chunk-PPWLQFJD.min.js";import{a as ze}from"./chunk-KBTCHML7.min.js";import{a as Qe}from"./chunk-CCNPHFNE.min.js";import"./chunk-IJMU45IO.min.js";import"./chunk-HWCHFEAH.min.js";import"./chunk-OH5PAVPX.min.js";import"./chunk-RN42Y33E.min.js";import"./chunk-XNJBVM5Z.min.js";import"./chunk-Q5YIQYCF.min.js";import"./chunk-4HQ5XQBY.min.js";import"./chunk-X6TCRES7.min.js";import"./chunk-P3KXGIV7.min.js";import"./chunk-NE3GILF7.min.js";import"./chunk-25XGUDQ5.min.js";import{b as ke,c as Ze,d as he,f as le}from"./chunk-STQM5NEZ.min.js";import{a as me}from"./chunk-G3CW6HDB.min.js";import{o as Be,s as $e}from"./chunk-BSOUP4V7.min.js";import"./chunk-HCOLC5CQ.min.js";import{B as Se,H as Fe,P as be,T as Pe,U as Ge,V as Ue,W as Ye,X as Xe,Y as He,Z as We,_ as se,r as Re}from"./chunk-OYCWXTBX.min.js";import{b as ct,d as ye,j as Ve}from"./chunk-BJGJ3C53.min.js";import{a as pe,c as ur}from"./chunk-MY7PHHTQ.min.js";var Te=pe((re,Ee)=>{(function(w,N){typeof re=="object"&&typeof Ee=="object"?Ee.exports=N():typeof define=="function"&&define.amd?define([],N):typeof re=="object"?re.layoutBase=N():w.layoutBase=N()})(re,function(){return(function(E){var w={};function N(u){if(w[u])return w[u].exports;var l=w[u]={i:u,l:!1,exports:{}};return E[u].call(l.exports,l,l.exports,N),l.l=!0,l.exports}return N.m=E,N.c=w,N.i=function(u){return u},N.d=function(u,l,a){N.o(u,l)||Object.defineProperty(u,l,{configurable:!1,enumerable:!0,get:a})},N.n=function(u){var l=u&&u.__esModule?function(){return u.default}:function(){return u};return N.d(l,"a",l),l},N.o=function(u,l){return Object.prototype.hasOwnProperty.call(u,l)},N.p="",N(N.s=28)})([(function(E,w,N){"use strict";function u(){}u.QUALITY=1,u.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,u.DEFAULT_INCREMENTAL=!1,u.DEFAULT_ANIMATION_ON_LAYOUT=!0,u.DEFAULT_ANIMATION_DURING_LAYOUT=!1,u.DEFAULT_ANIMATION_PERIOD=50,u.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,u.DEFAULT_GRAPH_MARGIN=15,u.NODE_DIMENSIONS_INCLUDE_LABELS=!1,u.SIMPLE_NODE_SIZE=40,u.SIMPLE_NODE_HALF_SIZE=u.SIMPLE_NODE_SIZE/2,u.EMPTY_COMPOUND_NODE_SIZE=40,u.MIN_EDGE_LENGTH=1,u.WORLD_BOUNDARY=1e6,u.INITIAL_WORLD_BOUNDARY=u.WORLD_BOUNDARY/1e3,u.WORLD_CENTER_X=1200,u.WORLD_CENTER_Y=900,E.exports=u}),(function(E,w,N){"use strict";var u=N(2),l=N(8),a=N(9);function r(f,e,c){u.call(this,c),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=c,this.bendpoints=[],this.source=f,this.target=e}r.prototype=Object.create(u.prototype);for(var n in u)r[n]=u[n];r.prototype.getSource=function(){return this.source},r.prototype.getTarget=function(){return this.target},r.prototype.isInterGraph=function(){return this.isInterGraph},r.prototype.getLength=function(){return this.length},r.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},r.prototype.getBendpoints=function(){return this.bendpoints},r.prototype.getLca=function(){return this.lca},r.prototype.getSourceInLca=function(){return this.sourceInLca},r.prototype.getTargetInLca=function(){return this.targetInLca},r.prototype.getOtherEnd=function(f){if(this.source===f)return this.target;if(this.target===f)return this.source;throw"Node is not incident with this edge"},r.prototype.getOtherEndInGraph=function(f,e){for(var c=this.getOtherEnd(f),t=e.getGraphManager().getRoot();;){if(c.getOwner()==e)return c;if(c.getOwner()==t)break;c=c.getOwner().getParent()}return null},r.prototype.updateLength=function(){var f=new Array(4);this.isOverlapingSourceAndTarget=l.getIntersection(this.target.getRect(),this.source.getRect(),f),this.isOverlapingSourceAndTarget||(this.lengthX=f[0]-f[2],this.lengthY=f[1]-f[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},r.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},E.exports=r}),(function(E,w,N){"use strict";function u(l){this.vGraphObject=l}E.exports=u}),(function(E,w,N){"use strict";var u=N(2),l=N(10),a=N(13),r=N(0),n=N(16),f=N(5);function e(t,i,h,g){h==null&&g==null&&(g=i),u.call(this,g),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=l.MIN_VALUE,this.inclusionTreeDepth=l.MAX_VALUE,this.vGraphObject=g,this.edges=[],this.graphManager=t,h!=null&&i!=null?this.rect=new a(i.x,i.y,h.width,h.height):this.rect=new a}e.prototype=Object.create(u.prototype);for(var c in u)e[c]=u[c];e.prototype.getEdges=function(){return this.edges},e.prototype.getChild=function(){return this.child},e.prototype.getOwner=function(){return this.owner},e.prototype.getWidth=function(){return this.rect.width},e.prototype.setWidth=function(t){this.rect.width=t},e.prototype.getHeight=function(){return this.rect.height},e.prototype.setHeight=function(t){this.rect.height=t},e.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},e.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},e.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},e.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},e.prototype.getRect=function(){return this.rect},e.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},e.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},e.prototype.setRect=function(t,i){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=i.width,this.rect.height=i.height},e.prototype.setCenter=function(t,i){this.rect.x=t-this.rect.width/2,this.rect.y=i-this.rect.height/2},e.prototype.setLocation=function(t,i){this.rect.x=t,this.rect.y=i},e.prototype.moveBy=function(t,i){this.rect.x+=t,this.rect.y+=i},e.prototype.getEdgeListToNode=function(t){var i=[],h,g=this;return g.edges.forEach(function(s){if(s.target==t){if(s.source!=g)throw"Incorrect edge source!";i.push(s)}}),i},e.prototype.getEdgesBetween=function(t){var i=[],h,g=this;return g.edges.forEach(function(s){if(!(s.source==g||s.target==g))throw"Incorrect edge source and/or target";(s.target==t||s.source==t)&&i.push(s)}),i},e.prototype.getNeighborsList=function(){var t=new Set,i=this;return i.edges.forEach(function(h){if(h.source==i)t.add(h.target);else{if(h.target!=i)throw"Incorrect incidency!";t.add(h.source)}}),t},e.prototype.withChildren=function(){var t=new Set,i,h;if(t.add(this),this.child!=null)for(var g=this.child.getNodes(),s=0;si?(this.rect.x-=(this.labelWidth-i)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(i+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(h+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>h?(this.rect.y-=(this.labelHeight-h)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(h+this.labelHeight))}}},e.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==l.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},e.prototype.transform=function(t){var i=this.rect.x;i>r.WORLD_BOUNDARY?i=r.WORLD_BOUNDARY:i<-r.WORLD_BOUNDARY&&(i=-r.WORLD_BOUNDARY);var h=this.rect.y;h>r.WORLD_BOUNDARY?h=r.WORLD_BOUNDARY:h<-r.WORLD_BOUNDARY&&(h=-r.WORLD_BOUNDARY);var g=new f(i,h),s=t.inverseTransformPoint(g);this.setLocation(s.x,s.y)},e.prototype.getLeft=function(){return this.rect.x},e.prototype.getRight=function(){return this.rect.x+this.rect.width},e.prototype.getTop=function(){return this.rect.y},e.prototype.getBottom=function(){return this.rect.y+this.rect.height},e.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},E.exports=e}),(function(E,w,N){"use strict";var u=N(0);function l(){}for(var a in u)l[a]=u[a];l.MAX_ITERATIONS=2500,l.DEFAULT_EDGE_LENGTH=50,l.DEFAULT_SPRING_STRENGTH=.45,l.DEFAULT_REPULSION_STRENGTH=4500,l.DEFAULT_GRAVITY_STRENGTH=.4,l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,l.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,l.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,l.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,l.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,l.COOLING_ADAPTATION_FACTOR=.33,l.ADAPTATION_LOWER_NODE_LIMIT=1e3,l.ADAPTATION_UPPER_NODE_LIMIT=5e3,l.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,l.MAX_NODE_DISPLACEMENT=l.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,l.MIN_REPULSION_DIST=l.DEFAULT_EDGE_LENGTH/10,l.CONVERGENCE_CHECK_PERIOD=100,l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,l.MIN_EDGE_LENGTH=1,l.GRID_CALCULATION_CHECK_PERIOD=10,E.exports=l}),(function(E,w,N){"use strict";function u(l,a){l==null&&a==null?(this.x=0,this.y=0):(this.x=l,this.y=a)}u.prototype.getX=function(){return this.x},u.prototype.getY=function(){return this.y},u.prototype.setX=function(l){this.x=l},u.prototype.setY=function(l){this.y=l},u.prototype.getDifference=function(l){return new DimensionD(this.x-l.x,this.y-l.y)},u.prototype.getCopy=function(){return new u(this.x,this.y)},u.prototype.translate=function(l){return this.x+=l.width,this.y+=l.height,this},E.exports=u}),(function(E,w,N){"use strict";var u=N(2),l=N(10),a=N(0),r=N(7),n=N(3),f=N(1),e=N(13),c=N(12),t=N(11);function i(g,s,L){u.call(this,L),this.estimatedSize=l.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=g,s!=null&&s instanceof r?this.graphManager=s:s!=null&&s instanceof Layout&&(this.graphManager=s.graphManager)}i.prototype=Object.create(u.prototype);for(var h in u)i[h]=u[h];i.prototype.getNodes=function(){return this.nodes},i.prototype.getEdges=function(){return this.edges},i.prototype.getGraphManager=function(){return this.graphManager},i.prototype.getParent=function(){return this.parent},i.prototype.getLeft=function(){return this.left},i.prototype.getRight=function(){return this.right},i.prototype.getTop=function(){return this.top},i.prototype.getBottom=function(){return this.bottom},i.prototype.isConnected=function(){return this.isConnected},i.prototype.add=function(g,s,L){if(s==null&&L==null){var y=g;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(y)>-1)throw"Node already in graph!";return y.owner=this,this.getNodes().push(y),y}else{var p=g;if(!(this.getNodes().indexOf(s)>-1&&this.getNodes().indexOf(L)>-1))throw"Source or target not in graph!";if(!(s.owner==L.owner&&s.owner==this))throw"Both owners must be this graph!";return s.owner!=L.owner?null:(p.source=s,p.target=L,p.isInterGraph=!1,this.getEdges().push(p),s.edges.push(p),L!=s&&L.edges.push(p),p)}},i.prototype.remove=function(g){var s=g;if(g instanceof n){if(s==null)throw"Node is null!";if(!(s.owner!=null&&s.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var L=s.edges.slice(),y,p=L.length,C=0;C-1&&b>-1))throw"Source and/or target doesn't know this edge!";y.source.edges.splice(A,1),y.target!=y.source&&y.target.edges.splice(b,1);var R=y.source.owner.getEdges().indexOf(y);if(R==-1)throw"Not in owner's edge list!";y.source.owner.getEdges().splice(R,1)}},i.prototype.updateLeftTop=function(){for(var g=l.MAX_VALUE,s=l.MAX_VALUE,L,y,p,C=this.getNodes(),R=C.length,A=0;AL&&(g=L),s>y&&(s=y)}return g==l.MAX_VALUE?null:(C[0].getParent().paddingLeft!=null?p=C[0].getParent().paddingLeft:p=this.margin,this.left=s-p,this.top=g-p,new c(this.left,this.top))},i.prototype.updateBounds=function(g){for(var s=l.MAX_VALUE,L=-l.MAX_VALUE,y=l.MAX_VALUE,p=-l.MAX_VALUE,C,R,A,b,W,G=this.nodes,J=G.length,x=0;xC&&(s=C),LA&&(y=A),pC&&(s=C),LA&&(y=A),p=this.nodes.length){var J=0;L.forEach(function(x){x.owner==g&&J++}),J==this.nodes.length&&(this.isConnected=!0)}},E.exports=i}),(function(E,w,N){"use strict";var u,l=N(1);function a(r){u=N(6),this.layout=r,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var r=this.layout.newGraph(),n=this.layout.newNode(null),f=this.add(r,n);return this.setRootGraph(f),this.rootGraph},a.prototype.add=function(r,n,f,e,c){if(f==null&&e==null&&c==null){if(r==null)throw"Graph is null!";if(n==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(n.child!=null)throw"Already has a child!";return r.parent=n,n.child=r,r}else{c=f,e=n,f=r;var t=e.getOwner(),i=c.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(i!=null&&i.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==i)return f.isInterGraph=!1,t.add(f,e,c);if(f.isInterGraph=!0,f.source=e,f.target=c,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},a.prototype.remove=function(r){if(r instanceof u){var n=r;if(n.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(n==this.rootGraph||n.parent!=null&&n.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(n.getEdges());for(var e,c=f.length,t=0;t=r.getRight()?n[0]+=Math.min(r.getX()-a.getX(),a.getRight()-r.getRight()):r.getX()<=a.getX()&&r.getRight()>=a.getRight()&&(n[0]+=Math.min(a.getX()-r.getX(),r.getRight()-a.getRight())),a.getY()<=r.getY()&&a.getBottom()>=r.getBottom()?n[1]+=Math.min(r.getY()-a.getY(),a.getBottom()-r.getBottom()):r.getY()<=a.getY()&&r.getBottom()>=a.getBottom()&&(n[1]+=Math.min(a.getY()-r.getY(),r.getBottom()-a.getBottom()));var c=Math.abs((r.getCenterY()-a.getCenterY())/(r.getCenterX()-a.getCenterX()));r.getCenterY()===a.getCenterY()&&r.getCenterX()===a.getCenterX()&&(c=1);var t=c*n[0],i=n[1]/c;n[0]t)return n[0]=f,n[1]=h,n[2]=c,n[3]=G,!1;if(ec)return n[0]=i,n[1]=e,n[2]=b,n[3]=t,!1;if(fc?(n[0]=s,n[1]=L,o=!0):(n[0]=g,n[1]=h,o=!0):d===v&&(f>c?(n[0]=i,n[1]=h,o=!0):(n[0]=y,n[1]=L,o=!0)),-T===v?c>f?(n[2]=W,n[3]=G,m=!0):(n[2]=b,n[3]=A,m=!0):T===v&&(c>f?(n[2]=R,n[3]=A,m=!0):(n[2]=J,n[3]=G,m=!0)),o&&m)return!1;if(f>c?e>t?(D=this.getCardinalDirection(d,v,4),O=this.getCardinalDirection(T,v,2)):(D=this.getCardinalDirection(-d,v,3),O=this.getCardinalDirection(-T,v,1)):e>t?(D=this.getCardinalDirection(-d,v,1),O=this.getCardinalDirection(-T,v,3)):(D=this.getCardinalDirection(d,v,2),O=this.getCardinalDirection(T,v,4)),!o)switch(D){case 1:S=h,P=f+-C/v,n[0]=P,n[1]=S;break;case 2:P=y,S=e+p*v,n[0]=P,n[1]=S;break;case 3:S=L,P=f+C/v,n[0]=P,n[1]=S;break;case 4:P=s,S=e+-p*v,n[0]=P,n[1]=S;break}if(!m)switch(O){case 1:Z=A,I=c+-z/v,n[2]=I,n[3]=Z;break;case 2:I=J,Z=t+x*v,n[2]=I,n[3]=Z;break;case 3:Z=G,I=c+z/v,n[2]=I,n[3]=Z;break;case 4:I=W,Z=t+-x*v,n[2]=I,n[3]=Z;break}}return!1},l.getCardinalDirection=function(a,r,n){return a>r?n:1+n%4},l.getIntersection=function(a,r,n,f){if(f==null)return this.getIntersection2(a,r,n);var e=a.x,c=a.y,t=r.x,i=r.y,h=n.x,g=n.y,s=f.x,L=f.y,y=void 0,p=void 0,C=void 0,R=void 0,A=void 0,b=void 0,W=void 0,G=void 0,J=void 0;return C=i-c,A=e-t,W=t*c-e*i,R=L-g,b=h-s,G=s*g-h*L,J=C*b-R*A,J===0?null:(y=(A*G-b*W)/J,p=(R*W-C*G)/J,new u(y,p))},l.angleOfVector=function(a,r,n,f){var e=void 0;return a!==n?(e=Math.atan((f-r)/(n-a)),n=0){var L=(-h+Math.sqrt(h*h-4*i*g))/(2*i),y=(-h-Math.sqrt(h*h-4*i*g))/(2*i),p=null;return L>=0&&L<=1?[L]:y>=0&&y<=1?[y]:p}else return null},l.HALF_PI=.5*Math.PI,l.ONE_AND_HALF_PI=1.5*Math.PI,l.TWO_PI=2*Math.PI,l.THREE_PI=3*Math.PI,E.exports=l}),(function(E,w,N){"use strict";function u(){}u.sign=function(l){return l>0?1:l<0?-1:0},u.floor=function(l){return l<0?Math.ceil(l):Math.floor(l)},u.ceil=function(l){return l<0?Math.floor(l):Math.ceil(l)},E.exports=u}),(function(E,w,N){"use strict";function u(){}u.MAX_VALUE=2147483647,u.MIN_VALUE=-2147483648,E.exports=u}),(function(E,w,N){"use strict";var u=(function(){function e(c,t){for(var i=0;i"u"?"undefined":u(a);return a==null||r!="object"&&r!="function"},E.exports=l}),(function(E,w,N){"use strict";function u(h){if(Array.isArray(h)){for(var g=0,s=Array(h.length);g0&&g;){for(C.push(A[0]);C.length>0&&g;){var b=C[0];C.splice(0,1),p.add(b);for(var W=b.getEdges(),y=0;y-1&&A.splice(z,1)}p=new Set,R=new Map}}return h},i.prototype.createDummyNodesForBendpoints=function(h){for(var g=[],s=h.source,L=this.graphManager.calcLowestCommonAncestor(h.source,h.target),y=0;y0){for(var L=this.edgeToDummyNodes.get(s),y=0;y=0&&g.splice(G,1);var J=R.getNeighborsList();J.forEach(function(o){if(s.indexOf(o)<0){var m=L.get(o),d=m-1;d==1&&b.push(o),L.set(o,d)}})}s=s.concat(b),(g.length==1||g.length==2)&&(y=!0,p=g[0])}return p},i.prototype.setGraphManager=function(h){this.graphManager=h},E.exports=i}),(function(E,w,N){"use strict";function u(){}u.seed=1,u.x=0,u.nextDouble=function(){return u.x=Math.sin(u.seed++)*1e4,u.x-Math.floor(u.x)},E.exports=u}),(function(E,w,N){"use strict";var u=N(5);function l(a,r){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}l.prototype.getWorldOrgX=function(){return this.lworldOrgX},l.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},l.prototype.getWorldOrgY=function(){return this.lworldOrgY},l.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},l.prototype.getWorldExtX=function(){return this.lworldExtX},l.prototype.setWorldExtX=function(a){this.lworldExtX=a},l.prototype.getWorldExtY=function(){return this.lworldExtY},l.prototype.setWorldExtY=function(a){this.lworldExtY=a},l.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},l.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},l.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},l.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},l.prototype.getDeviceExtX=function(){return this.ldeviceExtX},l.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},l.prototype.getDeviceExtY=function(){return this.ldeviceExtY},l.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},l.prototype.transformX=function(a){var r=0,n=this.lworldExtX;return n!=0&&(r=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/n),r},l.prototype.transformY=function(a){var r=0,n=this.lworldExtY;return n!=0&&(r=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/n),r},l.prototype.inverseTransformX=function(a){var r=0,n=this.ldeviceExtX;return n!=0&&(r=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/n),r},l.prototype.inverseTransformY=function(a){var r=0,n=this.ldeviceExtY;return n!=0&&(r=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/n),r},l.prototype.inverseTransformPoint=function(a){var r=new u(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return r},E.exports=l}),(function(E,w,N){"use strict";function u(t){if(Array.isArray(t)){for(var i=0,h=Array(t.length);ia.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},e.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),i,h=0;h0&&arguments[0]!==void 0?arguments[0]:!0,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,h,g,s,L,y=this.getAllNodes(),p;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),p=new Set,h=0;hC||p>C)&&(t.gravitationForceX=-this.gravityConstant*s,t.gravitationForceY=-this.gravityConstant*L)):(C=i.getEstimatedSize()*this.compoundGravityRangeFactor,(y>C||p>C)&&(t.gravitationForceX=-this.gravityConstant*s*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*L*this.compoundGravityConstant))},e.prototype.isConverged=function(){var t,i=!1;return this.totalIterations>this.maxIterations/3&&(i=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=y.length||C>=y[0].length)){for(var R=0;Re}}]),n})();E.exports=r}),(function(E,w,N){"use strict";function u(){}u.svd=function(l){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=l.length,this.n=l[0].length;var a=Math.min(this.m,this.n);this.s=(function(Dt){for(var Nt=[];Dt-- >0;)Nt.push(0);return Nt})(Math.min(this.m+1,this.n)),this.U=(function(Dt){var Nt=function $t(Rt){if(Rt.length==0)return 0;for(var Xt=[],zt=0;zt0;)Nt.push(0);return Nt})(this.n),n=(function(Dt){for(var Nt=[];Dt-- >0;)Nt.push(0);return Nt})(this.m),f=!0,e=!0,c=Math.min(this.m-1,this.n),t=Math.max(0,Math.min(this.n-2,this.m)),i=0;i=0;v--)if(this.s[v]!==0){for(var D=v+1;D=0;F--){if((function(Dt,Nt){return Dt&&Nt})(F0;){var Q=void 0,Ut=void 0;for(Q=m-2;Q>=-1&&Q!==-1;Q--)if(Math.abs(r[Q])<=St+Lt*(Math.abs(this.s[Q])+Math.abs(this.s[Q+1]))){r[Q]=0;break}if(Q===m-2)Ut=4;else{var Mt=void 0;for(Mt=m-1;Mt>=Q&&Mt!==Q;Mt--){var at=(Mt!==m?Math.abs(r[Mt]):0)+(Mt!==Q+1?Math.abs(r[Mt-1]):0);if(Math.abs(this.s[Mt])<=St+Lt*at){this.s[Mt]=0;break}}Mt===Q?Ut=3:Mt===m-1?Ut=1:(Ut=2,Q=Mt)}switch(Q++,Ut){case 1:{var et=r[m-2];r[m-2]=0;for(var pt=m-2;pt>=Q;pt--){var mt=u.hypot(this.s[pt],et),Ct=this.s[pt]/mt,Et=et/mt;if(this.s[pt]=mt,pt!==Q&&(et=-Et*r[pt-1],r[pt-1]=Ct*r[pt-1]),e)for(var Tt=0;Tt=this.s[Q+1]);){var lt=this.s[Q];if(this.s[Q]=this.s[Q+1],this.s[Q+1]=lt,e&&QMath.abs(a)?(r=a/l,r=Math.abs(l)*Math.sqrt(1+r*r)):a!=0?(r=l/a,r=Math.abs(a)*Math.sqrt(1+r*r)):r=0,r},E.exports=u}),(function(E,w,N){"use strict";var u=(function(){function r(n,f){for(var e=0;e2&&arguments[2]!==void 0?arguments[2]:1,c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;l(this,r),this.sequence1=n,this.sequence2=f,this.match_score=e,this.mismatch_penalty=c,this.gap_penalty=t,this.iMax=n.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var i=0;i=0;n--){var f=this.listeners[n];f.event===a&&f.callback===r&&this.listeners.splice(n,1)}},l.emit=function(a,r){for(var n=0;n{(function(w,N){typeof ie=="object"&&typeof Ne=="object"?Ne.exports=N(Te()):typeof define=="function"&&define.amd?define(["layout-base"],N):typeof ie=="object"?ie.coseBase=N(Te()):w.coseBase=N(w.layoutBase)})(ie,function(E){return(()=>{"use strict";var w={45:((a,r,n)=>{var f={};f.layoutBase=n(551),f.CoSEConstants=n(806),f.CoSEEdge=n(767),f.CoSEGraph=n(880),f.CoSEGraphManager=n(578),f.CoSELayout=n(765),f.CoSENode=n(991),f.ConstraintHandler=n(902),a.exports=f}),806:((a,r,n)=>{var f=n(551).FDLayoutConstants;function e(){}for(var c in f)e[c]=f[c];e.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,e.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,e.DEFAULT_COMPONENT_SEPERATION=60,e.TILE=!0,e.TILING_PADDING_VERTICAL=10,e.TILING_PADDING_HORIZONTAL=10,e.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,e.ENFORCE_CONSTRAINTS=!0,e.APPLY_LAYOUT=!0,e.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,e.TREE_REDUCTION_ON_INCREMENTAL=!0,e.PURE_INCREMENTAL=e.DEFAULT_INCREMENTAL,a.exports=e}),767:((a,r,n)=>{var f=n(551).FDLayoutEdge;function e(t,i,h){f.call(this,t,i,h)}e.prototype=Object.create(f.prototype);for(var c in f)e[c]=f[c];a.exports=e}),880:((a,r,n)=>{var f=n(551).LGraph;function e(t,i,h){f.call(this,t,i,h)}e.prototype=Object.create(f.prototype);for(var c in f)e[c]=f[c];a.exports=e}),578:((a,r,n)=>{var f=n(551).LGraphManager;function e(t){f.call(this,t)}e.prototype=Object.create(f.prototype);for(var c in f)e[c]=f[c];a.exports=e}),765:((a,r,n)=>{var f=n(551).FDLayout,e=n(578),c=n(880),t=n(991),i=n(767),h=n(806),g=n(902),s=n(551).FDLayoutConstants,L=n(551).LayoutConstants,y=n(551).Point,p=n(551).PointD,C=n(551).DimensionD,R=n(551).Layout,A=n(551).Integer,b=n(551).IGeometry,W=n(551).LGraph,G=n(551).Transform,J=n(551).LinkedList;function x(){f.call(this),this.toBeTiled={},this.constraints={}}x.prototype=Object.create(f.prototype);for(var z in f)x[z]=f[z];x.prototype.newGraphManager=function(){var o=new e(this);return this.graphManager=o,o},x.prototype.newGraph=function(o){return new c(null,this.graphManager,o)},x.prototype.newNode=function(o){return new t(this.graphManager,o)},x.prototype.newEdge=function(o){return new i(null,null,o)},x.prototype.initParameters=function(){f.prototype.initParameters.call(this,arguments),this.isSubLayout||(h.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=h.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=s.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=s.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=s.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},x.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/s.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},x.prototype.layout=function(){var o=L.DEFAULT_CREATE_BENDS_AS_NEEDED;return o&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},x.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(h.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),d=this.nodesWithGravity.filter(function(D){return m.has(D)});this.graphManager.setAllNodesToApplyGravitation(d)}}else{var o=this.getFlatForest();if(o.length>0)this.positionNodesRadially(o);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),d=this.nodesWithGravity.filter(function(T){return m.has(T)});this.graphManager.setAllNodesToApplyGravitation(d),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(g.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),h.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},x.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%s.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var o=new Set(this.getAllNodes()),m=this.nodesWithGravity.filter(function(v){return o.has(v)});this.graphManager.setAllNodesToApplyGravitation(m),this.graphManager.updateBounds(),this.updateGrid(),h.PURE_INCREMENTAL?this.coolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),h.PURE_INCREMENTAL?this.coolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var d=!this.isTreeGrowing&&!this.isGrowthFinished,T=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(d,T),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},x.prototype.getPositionsData=function(){for(var o=this.graphManager.getAllNodes(),m={},d=0;d0&&this.updateDisplacements();for(var d=0;d0&&(T.fixedNodeWeight=D)}}if(this.constraints.relativePlacementConstraint){var O=new Map,P=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(M){o.fixedNodesOnHorizontal.add(M),o.fixedNodesOnVertical.add(M)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var S=this.constraints.alignmentConstraint.vertical,d=0;d=2*M.length/3;K--)Y=Math.floor(Math.random()*(K+1)),X=M[K],M[K]=M[Y],M[Y]=X;return M},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(M){if(M.left){var Y=O.has(M.left)?O.get(M.left):M.left,X=O.has(M.right)?O.get(M.right):M.right;o.nodesInRelativeHorizontal.includes(Y)||(o.nodesInRelativeHorizontal.push(Y),o.nodeToRelativeConstraintMapHorizontal.set(Y,[]),o.dummyToNodeForVerticalAlignment.has(Y)?o.nodeToTempPositionMapHorizontal.set(Y,o.idToNodeMap.get(o.dummyToNodeForVerticalAlignment.get(Y)[0]).getCenterX()):o.nodeToTempPositionMapHorizontal.set(Y,o.idToNodeMap.get(Y).getCenterX())),o.nodesInRelativeHorizontal.includes(X)||(o.nodesInRelativeHorizontal.push(X),o.nodeToRelativeConstraintMapHorizontal.set(X,[]),o.dummyToNodeForVerticalAlignment.has(X)?o.nodeToTempPositionMapHorizontal.set(X,o.idToNodeMap.get(o.dummyToNodeForVerticalAlignment.get(X)[0]).getCenterX()):o.nodeToTempPositionMapHorizontal.set(X,o.idToNodeMap.get(X).getCenterX())),o.nodeToRelativeConstraintMapHorizontal.get(Y).push({right:X,gap:M.gap}),o.nodeToRelativeConstraintMapHorizontal.get(X).push({left:Y,gap:M.gap})}else{var K=P.has(M.top)?P.get(M.top):M.top,st=P.has(M.bottom)?P.get(M.bottom):M.bottom;o.nodesInRelativeVertical.includes(K)||(o.nodesInRelativeVertical.push(K),o.nodeToRelativeConstraintMapVertical.set(K,[]),o.dummyToNodeForHorizontalAlignment.has(K)?o.nodeToTempPositionMapVertical.set(K,o.idToNodeMap.get(o.dummyToNodeForHorizontalAlignment.get(K)[0]).getCenterY()):o.nodeToTempPositionMapVertical.set(K,o.idToNodeMap.get(K).getCenterY())),o.nodesInRelativeVertical.includes(st)||(o.nodesInRelativeVertical.push(st),o.nodeToRelativeConstraintMapVertical.set(st,[]),o.dummyToNodeForHorizontalAlignment.has(st)?o.nodeToTempPositionMapVertical.set(st,o.idToNodeMap.get(o.dummyToNodeForHorizontalAlignment.get(st)[0]).getCenterY()):o.nodeToTempPositionMapVertical.set(st,o.idToNodeMap.get(st).getCenterY())),o.nodeToRelativeConstraintMapVertical.get(K).push({bottom:st,gap:M.gap}),o.nodeToRelativeConstraintMapVertical.get(st).push({top:K,gap:M.gap})}});else{var Z=new Map,tt=new Map;this.constraints.relativePlacementConstraint.forEach(function(M){if(M.left){var Y=O.has(M.left)?O.get(M.left):M.left,X=O.has(M.right)?O.get(M.right):M.right;Z.has(Y)?Z.get(Y).push(X):Z.set(Y,[X]),Z.has(X)?Z.get(X).push(Y):Z.set(X,[Y])}else{var K=P.has(M.top)?P.get(M.top):M.top,st=P.has(M.bottom)?P.get(M.bottom):M.bottom;tt.has(K)?tt.get(K).push(st):tt.set(K,[st]),tt.has(st)?tt.get(st).push(K):tt.set(st,[K])}});var F=function(Y,X){var K=[],st=[],Lt=new J,St=new Set,Q=0;return Y.forEach(function(Ut,Mt){if(!St.has(Mt)){K[Q]=[],st[Q]=!1;var at=Mt;for(Lt.push(at),St.add(at),K[Q].push(at);Lt.length!=0;){at=Lt.shift(),X.has(at)&&(st[Q]=!0);var et=Y.get(at);et.forEach(function(pt){St.has(pt)||(Lt.push(pt),St.add(pt),K[Q].push(pt))})}Q++}}),{components:K,isFixed:st}},_=F(Z,o.fixedNodesOnHorizontal);this.componentsOnHorizontal=_.components,this.fixedComponentsOnHorizontal=_.isFixed;var B=F(tt,o.fixedNodesOnVertical);this.componentsOnVertical=B.components,this.fixedComponentsOnVertical=B.isFixed}}},x.prototype.updateDisplacements=function(){var o=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(B){var M=o.idToNodeMap.get(B.nodeId);M.displacementX=0,M.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var m=this.constraints.alignmentConstraint.vertical,d=0;d1){var P;for(P=0;PT&&(T=Math.floor(O.y)),D=Math.floor(O.x+h.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(L.WORLD_CENTER_X-O.x/2,L.WORLD_CENTER_Y-O.y/2))},x.radialLayout=function(o,m,d){var T=Math.max(this.maxDiagonalInTree(o),h.DEFAULT_RADIAL_SEPARATION);x.branchRadialLayout(m,null,0,359,0,T);var v=W.calculateBounds(o),D=new G;D.setDeviceOrgX(v.getMinX()),D.setDeviceOrgY(v.getMinY()),D.setWorldOrgX(d.x),D.setWorldOrgY(d.y);for(var O=0;O1;){var K=X[0];X.splice(0,1);var st=F.indexOf(K);st>=0&&F.splice(st,1),M--,_--}m!=null?Y=(F.indexOf(X[0])+1)%M:Y=0;for(var Lt=Math.abs(T-d)/_,St=Y;B!=_;St=++St%M){var Q=F[St].getOtherEnd(o);if(Q!=m){var Ut=(d+B*Lt)%360,Mt=(Ut+Lt)%360;x.branchRadialLayout(Q,o,Ut,Mt,v+D,D),B++}}},x.maxDiagonalInTree=function(o){for(var m=A.MIN_VALUE,d=0;dm&&(m=v)}return m},x.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},x.prototype.groupZeroDegreeMembers=function(){var o=this,m={};this.memberGroups={},this.idToDummyNode={};for(var d=[],T=this.graphManager.getAllNodes(),v=0;v"u"&&(m[P]=[]),m[P]=m[P].concat(D)}Object.keys(m).forEach(function(S){if(m[S].length>1){var I="DummyCompound_"+S;o.memberGroups[I]=m[S];var Z=m[S][0].getParent(),tt=new t(o.graphManager);tt.id=I,tt.paddingLeft=Z.paddingLeft||0,tt.paddingRight=Z.paddingRight||0,tt.paddingBottom=Z.paddingBottom||0,tt.paddingTop=Z.paddingTop||0,o.idToDummyNode[I]=tt;var F=o.getGraphManager().add(o.newGraph(),tt),_=Z.getChild();_.add(tt);for(var B=0;Bv?(T.rect.x-=(T.labelWidth-v)/2,T.setWidth(T.labelWidth),T.labelMarginLeft=(T.labelWidth-v)/2):T.labelPosHorizontal=="right"&&T.setWidth(v+T.labelWidth)),T.labelHeight&&(T.labelPosVertical=="top"?(T.rect.y-=T.labelHeight,T.setHeight(D+T.labelHeight),T.labelMarginTop=T.labelHeight):T.labelPosVertical=="center"&&T.labelHeight>D?(T.rect.y-=(T.labelHeight-D)/2,T.setHeight(T.labelHeight),T.labelMarginTop=(T.labelHeight-D)/2):T.labelPosVertical=="bottom"&&T.setHeight(D+T.labelHeight))}})},x.prototype.repopulateCompounds=function(){for(var o=this.compoundOrder.length-1;o>=0;o--){var m=this.compoundOrder[o],d=m.id,T=m.paddingLeft,v=m.paddingTop,D=m.labelMarginLeft,O=m.labelMarginTop;this.adjustLocations(this.tiledMemberPack[d],m.rect.x,m.rect.y,T,v,D,O)}},x.prototype.repopulateZeroDegreeMembers=function(){var o=this,m=this.tiledZeroDegreePack;Object.keys(m).forEach(function(d){var T=o.idToDummyNode[d],v=T.paddingLeft,D=T.paddingTop,O=T.labelMarginLeft,P=T.labelMarginTop;o.adjustLocations(m[d],T.rect.x,T.rect.y,v,D,O,P)})},x.prototype.getToBeTiled=function(o){var m=o.id;if(this.toBeTiled[m]!=null)return this.toBeTiled[m];var d=o.getChild();if(d==null)return this.toBeTiled[m]=!1,!1;for(var T=d.getNodes(),v=0;v0)return this.toBeTiled[m]=!1,!1;if(D.getChild()==null){this.toBeTiled[D.id]=!1;continue}if(!this.getToBeTiled(D))return this.toBeTiled[m]=!1,!1}return this.toBeTiled[m]=!0,!0},x.prototype.getNodeDegree=function(o){for(var m=o.id,d=o.getEdges(),T=0,v=0;vZ&&(Z=F.rect.height)}d+=Z+o.verticalPadding}},x.prototype.tileCompoundMembers=function(o,m){var d=this;this.tiledMemberPack=[],Object.keys(o).forEach(function(T){var v=m[T];if(d.tiledMemberPack[T]=d.tileNodes(o[T],v.paddingLeft+v.paddingRight),v.rect.width=d.tiledMemberPack[T].width,v.rect.height=d.tiledMemberPack[T].height,v.setCenter(d.tiledMemberPack[T].centerX,d.tiledMemberPack[T].centerY),v.labelMarginLeft=0,v.labelMarginTop=0,h.NODE_DIMENSIONS_INCLUDE_LABELS){var D=v.rect.width,O=v.rect.height;v.labelWidth&&(v.labelPosHorizontal=="left"?(v.rect.x-=v.labelWidth,v.setWidth(D+v.labelWidth),v.labelMarginLeft=v.labelWidth):v.labelPosHorizontal=="center"&&v.labelWidth>D?(v.rect.x-=(v.labelWidth-D)/2,v.setWidth(v.labelWidth),v.labelMarginLeft=(v.labelWidth-D)/2):v.labelPosHorizontal=="right"&&v.setWidth(D+v.labelWidth)),v.labelHeight&&(v.labelPosVertical=="top"?(v.rect.y-=v.labelHeight,v.setHeight(O+v.labelHeight),v.labelMarginTop=v.labelHeight):v.labelPosVertical=="center"&&v.labelHeight>O?(v.rect.y-=(v.labelHeight-O)/2,v.setHeight(v.labelHeight),v.labelMarginTop=(v.labelHeight-O)/2):v.labelPosVertical=="bottom"&&v.setHeight(O+v.labelHeight))}})},x.prototype.tileNodes=function(o,m){var d=this.tileNodesByFavoringDim(o,m,!0),T=this.tileNodesByFavoringDim(o,m,!1),v=this.getOrgRatio(d),D=this.getOrgRatio(T),O;return DP&&(P=B.getWidth())});var S=D/v,I=O/v,Z=Math.pow(d-T,2)+4*(S+T)*(I+d)*v,tt=(T-d+Math.sqrt(Z))/(2*(S+T)),F;m?(F=Math.ceil(tt),F==tt&&F++):F=Math.floor(tt);var _=F*(S+T)-T;return P>_&&(_=P),_+=T*2,_},x.prototype.tileNodesByFavoringDim=function(o,m,d){var T=h.TILING_PADDING_VERTICAL,v=h.TILING_PADDING_HORIZONTAL,D=h.TILING_COMPARE_BY,O={rows:[],rowWidth:[],rowHeight:[],width:0,height:m,verticalPadding:T,horizontalPadding:v,centerX:0,centerY:0};D&&(O.idealRowWidth=this.calcIdealRowWidth(o,d));var P=function(M){return M.rect.width*M.rect.height},S=function(M,Y){return P(Y)-P(M)};o.sort(function(B,M){var Y=S;return O.idealRowWidth?(Y=D,Y(B.id,M.id)):Y(B,M)});for(var I=0,Z=0,tt=0;tt0&&(O+=o.horizontalPadding),o.rowWidth[d]=O,o.width0&&(P+=o.verticalPadding);var S=0;P>o.rowHeight[d]&&(S=o.rowHeight[d],o.rowHeight[d]=P,S=o.rowHeight[d]-S),o.height+=S,o.rows[d].push(m)},x.prototype.getShortestRowIndex=function(o){for(var m=-1,d=Number.MAX_VALUE,T=0;Td&&(m=T,d=o.rowWidth[T]);return m},x.prototype.canAddHorizontal=function(o,m,d){if(o.idealRowWidth){var T=o.rows.length-1,v=o.rowWidth[T];return v+m+o.horizontalPadding<=o.idealRowWidth}var D=this.getShortestRowIndex(o);if(D<0)return!0;var O=o.rowWidth[D];if(O+o.horizontalPadding+m<=o.width)return!0;var P=0;o.rowHeight[D]0&&(P=d+o.verticalPadding-o.rowHeight[D]);var S;o.width-O>=m+o.horizontalPadding?S=(o.height+P)/(O+m+o.horizontalPadding):S=(o.height+P)/o.width,P=d+o.verticalPadding;var I;return o.widthD&&m!=d){T.splice(-1,1),o.rows[d].push(v),o.rowWidth[m]=o.rowWidth[m]-D,o.rowWidth[d]=o.rowWidth[d]+D,o.width=o.rowWidth[instance.getLongestRowIndex(o)];for(var O=Number.MIN_VALUE,P=0;PO&&(O=T[P].height);m>0&&(O+=o.verticalPadding);var S=o.rowHeight[m]+o.rowHeight[d];o.rowHeight[m]=O,o.rowHeight[d]0)for(var _=v;_<=D;_++)F[0]+=this.grid[_][O-1].length+this.grid[_][O].length-1;if(D0)for(var _=O;_<=P;_++)F[3]+=this.grid[v-1][_].length+this.grid[v][_].length-1;for(var B=A.MAX_VALUE,M,Y,X=0;X{var f=n(551).FDLayoutNode,e=n(551).IMath;function c(i,h,g,s){f.call(this,i,h,g,s)}c.prototype=Object.create(f.prototype);for(var t in f)c[t]=f[t];c.prototype.calculateDisplacement=function(){var i=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=i.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=i.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=i.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=i.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>i.coolingFactor*i.maxNodeDisplacement&&(this.displacementX=i.coolingFactor*i.maxNodeDisplacement*e.sign(this.displacementX)),Math.abs(this.displacementY)>i.coolingFactor*i.maxNodeDisplacement&&(this.displacementY=i.coolingFactor*i.maxNodeDisplacement*e.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},c.prototype.propogateDisplacementToChildren=function(i,h){for(var g=this.getChild().getNodes(),s,L=0;L{function f(g){if(Array.isArray(g)){for(var s=0,L=Array(g.length);s0){var dt=0;it.forEach(function(lt){V=="horizontal"?(q.set(lt,y.has(lt)?p[y.get(lt)]:k.get(lt)),dt+=q.get(lt)):(q.set(lt,y.has(lt)?C[y.get(lt)]:k.get(lt)),dt+=q.get(lt))}),dt=dt/it.length,ot.forEach(function(lt){$.has(lt)||q.set(lt,dt)})}else{var nt=0;ot.forEach(function(lt){V=="horizontal"?nt+=y.has(lt)?p[y.get(lt)]:k.get(lt):nt+=y.has(lt)?C[y.get(lt)]:k.get(lt)}),nt=nt/ot.length,ot.forEach(function(lt){q.set(lt,nt)})}});for(var rt=function(){var it=gt.shift(),dt=H.get(it);dt.forEach(function(nt){if(q.get(nt.id)lt&&(lt=Xt),ztFt&&(Ft=zt)}}catch(_t){Vt=!0,Dt=_t}finally{try{!xt&&Nt.return&&Nt.return()}finally{if(Vt)throw Dt}}var ce=(dt+lt)/2-(nt+Ft)/2,qt=!0,Jt=!1,Kt=void 0;try{for(var Qt=ot[Symbol.iterator](),oe;!(qt=(oe=Qt.next()).done);qt=!0){var jt=oe.value;q.set(jt,q.get(jt)+ce)}}catch(_t){Jt=!0,Kt=_t}finally{try{!qt&&Qt.return&&Qt.return()}finally{if(Jt)throw Kt}}})}return q},z=function(H){var V=0,$=0,k=0,j=0;if(H.forEach(function(ht){ht.left?p[y.get(ht.left)]-p[y.get(ht.right)]>=0?V++:$++:C[y.get(ht.top)]-C[y.get(ht.bottom)]>=0?k++:j++}),V>$&&k>j)for(var ut=0;ut$)for(var ft=0;ftj)for(var q=0;q1)s.fixedNodeConstraint.forEach(function(U,H){T[H]=[U.position.x,U.position.y],v[H]=[p[y.get(U.nodeId)],C[y.get(U.nodeId)]]}),D=!0;else if(s.alignmentConstraint)(function(){var U=0;if(s.alignmentConstraint.vertical){for(var H=s.alignmentConstraint.vertical,V=function(q){var ht=new Set;H[q].forEach(function(vt){ht.add(vt)});var gt=new Set([].concat(f(ht)).filter(function(vt){return P.has(vt)})),rt=void 0;gt.size>0?rt=p[y.get(gt.values().next().value)]:rt=J(ht).x,H[q].forEach(function(vt){T[U]=[rt,C[y.get(vt)]],v[U]=[p[y.get(vt)],C[y.get(vt)]],U++})},$=0;$0?rt=p[y.get(gt.values().next().value)]:rt=J(ht).y,k[q].forEach(function(vt){T[U]=[p[y.get(vt)],rt],v[U]=[p[y.get(vt)],C[y.get(vt)]],U++})},ut=0;uttt&&(tt=Z[_].length,F=_);if(tt0){var Ct={x:0,y:0};s.fixedNodeConstraint.forEach(function(U,H){var V={x:p[y.get(U.nodeId)],y:C[y.get(U.nodeId)]},$=U.position,k=G($,V);Ct.x+=k.x,Ct.y+=k.y}),Ct.x/=s.fixedNodeConstraint.length,Ct.y/=s.fixedNodeConstraint.length,p.forEach(function(U,H){p[H]+=Ct.x}),C.forEach(function(U,H){C[H]+=Ct.y}),s.fixedNodeConstraint.forEach(function(U){p[y.get(U.nodeId)]=U.position.x,C[y.get(U.nodeId)]=U.position.y})}if(s.alignmentConstraint){if(s.alignmentConstraint.vertical)for(var Et=s.alignmentConstraint.vertical,Tt=function(H){var V=new Set;Et[H].forEach(function(j){V.add(j)});var $=new Set([].concat(f(V)).filter(function(j){return P.has(j)})),k=void 0;$.size>0?k=p[y.get($.values().next().value)]:k=J(V).x,V.forEach(function(j){P.has(j)||(p[y.get(j)]=k)})},Ot=0;Ot0?k=C[y.get($.values().next().value)]:k=J(V).y,V.forEach(function(j){P.has(j)||(C[y.get(j)]=k)})},Pt=0;Pt{a.exports=E})},N={};function u(a){var r=N[a];if(r!==void 0)return r.exports;var n=N[a]={exports:{}};return w[a](n,n.exports,u),n.exports}var l=u(45);return l})()})});var Je=pe((ne,Ce)=>{(function(w,N){typeof ne=="object"&&typeof Ce=="object"?Ce.exports=N(Le()):typeof define=="function"&&define.amd?define(["cose-base"],N):typeof ne=="object"?ne.cytoscapeFcose=N(Le()):w.cytoscapeFcose=N(w.coseBase)})(ne,function(E){return(()=>{"use strict";var w={658:(a=>{a.exports=Object.assign!=null?Object.assign.bind(Object):function(r){for(var n=arguments.length,f=Array(n>1?n-1:0),e=1;e{var f=(function(){function t(i,h){var g=[],s=!0,L=!1,y=void 0;try{for(var p=i[Symbol.iterator](),C;!(s=(C=p.next()).done)&&(g.push(C.value),!(h&&g.length===h));s=!0);}catch(R){L=!0,y=R}finally{try{!s&&p.return&&p.return()}finally{if(L)throw y}}return g}return function(i,h){if(Array.isArray(i))return i;if(Symbol.iterator in Object(i))return t(i,h);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),e=n(140).layoutBase.LinkedList,c={};c.getTopMostNodes=function(t){for(var i={},h=0;h0&&D.merge(I)});for(var O=0;O1){C=y[0],R=C.connectedEdges().length,y.forEach(function(v){v.connectedEdges().length0&&g.set("dummy"+(g.size+1),W),G},c.relocateComponent=function(t,i,h){if(!h.fixedNodeConstraint){var g=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,L=Number.POSITIVE_INFINITY,y=Number.NEGATIVE_INFINITY;if(h.quality=="draft"){var p=!0,C=!1,R=void 0;try{for(var A=i.nodeIndexes[Symbol.iterator](),b;!(p=(b=A.next()).done);p=!0){var W=b.value,G=f(W,2),J=G[0],x=G[1],z=h.cy.getElementById(J);if(z){var o=z.boundingBox(),m=i.xCoords[x]-o.w/2,d=i.xCoords[x]+o.w/2,T=i.yCoords[x]-o.h/2,v=i.yCoords[x]+o.h/2;ms&&(s=d),Ty&&(y=v)}}}catch(I){C=!0,R=I}finally{try{!p&&A.return&&A.return()}finally{if(C)throw R}}var D=t.x-(s+g)/2,O=t.y-(y+L)/2;i.xCoords=i.xCoords.map(function(I){return I+D}),i.yCoords=i.yCoords.map(function(I){return I+O})}else{Object.keys(i).forEach(function(I){var Z=i[I],tt=Z.getRect().x,F=Z.getRect().x+Z.getRect().width,_=Z.getRect().y,B=Z.getRect().y+Z.getRect().height;tts&&(s=F),_y&&(y=B)});var P=t.x-(s+g)/2,S=t.y-(y+L)/2;Object.keys(i).forEach(function(I){var Z=i[I];Z.setCenter(Z.getCenterX()+P,Z.getCenterY()+S)})}}},c.calcBoundingBox=function(t,i,h,g){for(var s=Number.MAX_SAFE_INTEGER,L=Number.MIN_SAFE_INTEGER,y=Number.MAX_SAFE_INTEGER,p=Number.MIN_SAFE_INTEGER,C=void 0,R=void 0,A=void 0,b=void 0,W=t.descendants().not(":parent"),G=W.length,J=0;JC&&(s=C),LA&&(y=A),p{var f=n(548),e=n(140).CoSELayout,c=n(140).CoSENode,t=n(140).layoutBase.PointD,i=n(140).layoutBase.DimensionD,h=n(140).layoutBase.LayoutConstants,g=n(140).layoutBase.FDLayoutConstants,s=n(140).CoSEConstants,L=function(p,C){var R=p.cy,A=p.eles,b=A.nodes(),W=A.edges(),G=void 0,J=void 0,x=void 0,z={};p.randomize&&(G=C.nodeIndexes,J=C.xCoords,x=C.yCoords);var o=function(I){return typeof I=="function"},m=function(I,Z){return o(I)?I(Z):I},d=f.calcParentsWithoutChildren(R,A),T=function S(I,Z,tt,F){for(var _=Z.length,B=0;B<_;B++){var M=Z[B],Y=null;M.intersection(d).length==0&&(Y=M.children());var X=void 0,K=M.layoutDimensions({nodeDimensionsIncludeLabels:F.nodeDimensionsIncludeLabels});if(M.outerWidth()!=null&&M.outerHeight()!=null)if(F.randomize)if(!M.isParent())X=I.add(new c(tt.graphManager,new t(J[G.get(M.id())]-K.w/2,x[G.get(M.id())]-K.h/2),new i(parseFloat(K.w),parseFloat(K.h))));else{var st=f.calcBoundingBox(M,J,x,G);M.intersection(d).length==0?X=I.add(new c(tt.graphManager,new t(st.topLeftX,st.topLeftY),new i(st.width,st.height))):X=I.add(new c(tt.graphManager,new t(st.topLeftX,st.topLeftY),new i(parseFloat(K.w),parseFloat(K.h))))}else X=I.add(new c(tt.graphManager,new t(M.position("x")-K.w/2,M.position("y")-K.h/2),new i(parseFloat(K.w),parseFloat(K.h))));else X=I.add(new c(this.graphManager));if(X.id=M.data("id"),X.nodeRepulsion=m(F.nodeRepulsion,M),X.paddingLeft=parseInt(M.css("padding")),X.paddingTop=parseInt(M.css("padding")),X.paddingRight=parseInt(M.css("padding")),X.paddingBottom=parseInt(M.css("padding")),F.nodeDimensionsIncludeLabels&&(X.labelWidth=M.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,X.labelHeight=M.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,X.labelPosVertical=M.css("text-valign"),X.labelPosHorizontal=M.css("text-halign")),z[M.data("id")]=X,isNaN(X.rect.x)&&(X.rect.x=0),isNaN(X.rect.y)&&(X.rect.y=0),Y!=null&&Y.length>0){var Lt=void 0;Lt=tt.getGraphManager().add(tt.newGraph(),X),S(Lt,Y,tt,F)}}},v=function(I,Z,tt){for(var F=0,_=0,B=0;B0?s.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=F/_:o(p.idealEdgeLength)?s.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=50:s.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=p.idealEdgeLength,s.MIN_REPULSION_DIST=g.MIN_REPULSION_DIST=g.DEFAULT_EDGE_LENGTH/10,s.DEFAULT_RADIAL_SEPARATION=g.DEFAULT_EDGE_LENGTH)},D=function(I,Z){Z.fixedNodeConstraint&&(I.constraints.fixedNodeConstraint=Z.fixedNodeConstraint),Z.alignmentConstraint&&(I.constraints.alignmentConstraint=Z.alignmentConstraint),Z.relativePlacementConstraint&&(I.constraints.relativePlacementConstraint=Z.relativePlacementConstraint)};p.nestingFactor!=null&&(s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=g.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=p.nestingFactor),p.gravity!=null&&(s.DEFAULT_GRAVITY_STRENGTH=g.DEFAULT_GRAVITY_STRENGTH=p.gravity),p.numIter!=null&&(s.MAX_ITERATIONS=g.MAX_ITERATIONS=p.numIter),p.gravityRange!=null&&(s.DEFAULT_GRAVITY_RANGE_FACTOR=g.DEFAULT_GRAVITY_RANGE_FACTOR=p.gravityRange),p.gravityCompound!=null&&(s.DEFAULT_COMPOUND_GRAVITY_STRENGTH=g.DEFAULT_COMPOUND_GRAVITY_STRENGTH=p.gravityCompound),p.gravityRangeCompound!=null&&(s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=g.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=p.gravityRangeCompound),p.initialEnergyOnIncremental!=null&&(s.DEFAULT_COOLING_FACTOR_INCREMENTAL=g.DEFAULT_COOLING_FACTOR_INCREMENTAL=p.initialEnergyOnIncremental),p.tilingCompareBy!=null&&(s.TILING_COMPARE_BY=p.tilingCompareBy),p.quality=="proof"?h.QUALITY=2:h.QUALITY=0,s.NODE_DIMENSIONS_INCLUDE_LABELS=g.NODE_DIMENSIONS_INCLUDE_LABELS=h.NODE_DIMENSIONS_INCLUDE_LABELS=p.nodeDimensionsIncludeLabels,s.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=h.DEFAULT_INCREMENTAL=!p.randomize,s.ANIMATE=g.ANIMATE=h.ANIMATE=p.animate,s.TILE=p.tile,s.TILING_PADDING_VERTICAL=typeof p.tilingPaddingVertical=="function"?p.tilingPaddingVertical.call():p.tilingPaddingVertical,s.TILING_PADDING_HORIZONTAL=typeof p.tilingPaddingHorizontal=="function"?p.tilingPaddingHorizontal.call():p.tilingPaddingHorizontal,s.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=h.DEFAULT_INCREMENTAL=!0,s.PURE_INCREMENTAL=!p.randomize,h.DEFAULT_UNIFORM_LEAF_NODE_SIZES=p.uniformNodeDimensions,p.step=="transformed"&&(s.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,s.ENFORCE_CONSTRAINTS=!1,s.APPLY_LAYOUT=!1),p.step=="enforced"&&(s.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,s.ENFORCE_CONSTRAINTS=!0,s.APPLY_LAYOUT=!1),p.step=="cose"&&(s.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,s.ENFORCE_CONSTRAINTS=!1,s.APPLY_LAYOUT=!0),p.step=="all"&&(p.randomize?s.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:s.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,s.ENFORCE_CONSTRAINTS=!0,s.APPLY_LAYOUT=!0),p.fixedNodeConstraint||p.alignmentConstraint||p.relativePlacementConstraint?s.TREE_REDUCTION_ON_INCREMENTAL=!1:s.TREE_REDUCTION_ON_INCREMENTAL=!0;var O=new e,P=O.newGraphManager();return T(P.addRoot(),f.getTopMostNodes(b),O,p),v(O,P,W),D(O,p),O.runLayout(),z};a.exports={coseLayout:L}}),212:((a,r,n)=>{var f=(function(){function p(C,R){for(var A=0;A0)if(v){var P=t.getTopMostNodes(A.eles.nodes());if(o=t.connectComponents(b,A.eles,P),o.forEach(function(at){var et=at.boundingBox();m.push({x:et.x1+et.w/2,y:et.y1+et.h/2})}),A.randomize&&o.forEach(function(at){A.eles=at,G.push(h(A))}),A.quality=="default"||A.quality=="proof"){var S=b.collection();if(A.tile){var I=new Map,Z=[],tt=[],F=0,_={nodeIndexes:I,xCoords:Z,yCoords:tt},B=[];if(o.forEach(function(at,et){at.edges().length==0&&(at.nodes().forEach(function(pt,mt){S.merge(at.nodes()[mt]),pt.isParent()||(_.nodeIndexes.set(at.nodes()[mt].id(),F++),_.xCoords.push(at.nodes()[0].position().x),_.yCoords.push(at.nodes()[0].position().y))}),B.push(et))}),S.length>1){var M=S.boundingBox();m.push({x:M.x1+M.w/2,y:M.y1+M.h/2}),o.push(S),G.push(_);for(var Y=B.length-1;Y>=0;Y--)o.splice(B[Y],1),G.splice(B[Y],1),m.splice(B[Y],1)}}o.forEach(function(at,et){A.eles=at,z.push(s(A,G[et])),t.relocateComponent(m[et],z[et],A)})}else o.forEach(function(at,et){t.relocateComponent(m[et],G[et],A)});var X=new Set;if(o.length>1){var K=[],st=W.filter(function(at){return at.css("display")=="none"});o.forEach(function(at,et){var pt=void 0;if(A.quality=="draft"&&(pt=G[et].nodeIndexes),at.nodes().not(st).length>0){var mt={};mt.edges=[],mt.nodes=[];var Ct=void 0;at.nodes().not(st).forEach(function(Et){if(A.quality=="draft")if(!Et.isParent())Ct=pt.get(Et.id()),mt.nodes.push({x:G[et].xCoords[Ct]-Et.boundingbox().w/2,y:G[et].yCoords[Ct]-Et.boundingbox().h/2,width:Et.boundingbox().w,height:Et.boundingbox().h});else{var Tt=t.calcBoundingBox(Et,G[et].xCoords,G[et].yCoords,pt);mt.nodes.push({x:Tt.topLeftX,y:Tt.topLeftY,width:Tt.width,height:Tt.height})}else z[et][Et.id()]&&mt.nodes.push({x:z[et][Et.id()].getLeft(),y:z[et][Et.id()].getTop(),width:z[et][Et.id()].getWidth(),height:z[et][Et.id()].getHeight()})}),at.edges().forEach(function(Et){var Tt=Et.source(),Ot=Et.target();if(Tt.css("display")!="none"&&Ot.css("display")!="none")if(A.quality=="draft"){var It=pt.get(Tt.id()),Wt=pt.get(Ot.id()),Pt=[],Yt=[];if(Tt.isParent()){var bt=t.calcBoundingBox(Tt,G[et].xCoords,G[et].yCoords,pt);Pt.push(bt.topLeftX+bt.width/2),Pt.push(bt.topLeftY+bt.height/2)}else Pt.push(G[et].xCoords[It]),Pt.push(G[et].yCoords[It]);if(Ot.isParent()){var U=t.calcBoundingBox(Ot,G[et].xCoords,G[et].yCoords,pt);Yt.push(U.topLeftX+U.width/2),Yt.push(U.topLeftY+U.height/2)}else Yt.push(G[et].xCoords[Wt]),Yt.push(G[et].yCoords[Wt]);mt.edges.push({startX:Pt[0],startY:Pt[1],endX:Yt[0],endY:Yt[1]})}else z[et][Tt.id()]&&z[et][Ot.id()]&&mt.edges.push({startX:z[et][Tt.id()].getCenterX(),startY:z[et][Tt.id()].getCenterY(),endX:z[et][Ot.id()].getCenterX(),endY:z[et][Ot.id()].getCenterY()})}),mt.nodes.length>0&&(K.push(mt),X.add(et))}});var Lt=T.packComponents(K,A.randomize).shifts;if(A.quality=="draft")G.forEach(function(at,et){var pt=at.xCoords.map(function(Ct){return Ct+Lt[et].dx}),mt=at.yCoords.map(function(Ct){return Ct+Lt[et].dy});at.xCoords=pt,at.yCoords=mt});else{var St=0;X.forEach(function(at){Object.keys(z[at]).forEach(function(et){var pt=z[at][et];pt.setCenter(pt.getCenterX()+Lt[St].dx,pt.getCenterY()+Lt[St].dy)}),St++})}}}else{var D=A.eles.boundingBox();if(m.push({x:D.x1+D.w/2,y:D.y1+D.h/2}),A.randomize){var O=h(A);G.push(O)}A.quality=="default"||A.quality=="proof"?(z.push(s(A,G[0])),t.relocateComponent(m[0],z[0],A)):t.relocateComponent(m[0],G[0],A)}var Q=function(et,pt){if(A.quality=="default"||A.quality=="proof"){typeof et=="number"&&(et=pt);var mt=void 0,Ct=void 0,Et=et.data("id");return z.forEach(function(Ot){Et in Ot&&(mt={x:Ot[Et].getRect().getCenterX(),y:Ot[Et].getRect().getCenterY()},Ct=Ot[Et])}),A.nodeDimensionsIncludeLabels&&(Ct.labelWidth&&(Ct.labelPosHorizontal=="left"?mt.x+=Ct.labelWidth/2:Ct.labelPosHorizontal=="right"&&(mt.x-=Ct.labelWidth/2)),Ct.labelHeight&&(Ct.labelPosVertical=="top"?mt.y+=Ct.labelHeight/2:Ct.labelPosVertical=="bottom"&&(mt.y-=Ct.labelHeight/2))),mt==null&&(mt={x:et.position("x"),y:et.position("y")}),{x:mt.x,y:mt.y}}else{var Tt=void 0;return G.forEach(function(Ot){var It=Ot.nodeIndexes.get(et.id());It!=null&&(Tt={x:Ot.xCoords[It],y:Ot.yCoords[It]})}),Tt==null&&(Tt={x:et.position("x"),y:et.position("y")}),{x:Tt.x,y:Tt.y}}};if(A.quality=="default"||A.quality=="proof"||A.randomize){var Ut=t.calcParentsWithoutChildren(b,W),Mt=W.filter(function(at){return at.css("display")=="none"});A.eles=W.not(Mt),W.nodes().not(":parent").not(Mt).layoutPositions(R,A,Q),Ut.length>0&&Ut.forEach(function(at){at.position(Q(at))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),p})();a.exports=y}),657:((a,r,n)=>{var f=n(548),e=n(140).layoutBase.Matrix,c=n(140).layoutBase.SVD,t=function(h){var g=h.cy,s=h.eles,L=s.nodes(),y=s.nodes(":parent"),p=new Map,C=new Map,R=new Map,A=[],b=[],W=[],G=[],J=[],x=[],z=[],o=[],m=void 0,d=void 0,T=1e8,v=1e-9,D=h.piTol,O=h.samplingType,P=h.nodeSeparation,S=void 0,I=function(){for(var V=0,$=0,k=!1;$=ut;){q=j[ut++];for(var ot=A[q],it=0;itrt&&(rt=J[nt],vt=nt)}return vt},tt=function(V){var $=void 0;if(V){$=Math.floor(Math.random()*d),m=$;for(var j=0;j=1)break;rt=gt}for(var ot=0;ot=1)break;rt=gt}for(var dt=0;dt0&&($.isParent()?A[V].push(R.get($.id())):A[V].push($.id()))})});var Ut=function(V){var $=C.get(V),k=void 0;p.get(V).forEach(function(j){g.getElementById(j).isParent()?k=R.get(j):k=j,A[$].push(k),A[C.get(k)].push(V)})},Mt=!0,at=!1,et=void 0;try{for(var pt=p.keys()[Symbol.iterator](),mt;!(Mt=(mt=pt.next()).done);Mt=!0){var Ct=mt.value;Ut(Ct)}}catch(H){at=!0,et=H}finally{try{!Mt&&pt.return&&pt.return()}finally{if(at)throw et}}d=C.size;var Et=void 0;if(d>2){S=d{var f=n(212),e=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&e(cytoscape),a.exports=e}),140:(a=>{a.exports=E})},N={};function u(a){var r=N[a];if(r!==void 0)return r.exports;var n=N[a]={exports:{}};return w[a](n,n.exports,u),n.exports}var l=u(579);return l})()})});var ir=ur(Je(),1);var Ke={L:"left",R:"right",T:"top",B:"bottom"},je={L:ct(E=>`${E},${E/2} 0,${E} 0,0`,"L"),R:ct(E=>`0,${E/2} ${E},0 ${E},${E}`,"R"),T:ct(E=>`0,0 ${E},0 ${E/2},${E}`,"T"),B:ct(E=>`${E/2},0 ${E},${E} 0,${E}`,"B")},fe={L:ct((E,w)=>E-w+2,"L"),R:ct((E,w)=>E-2,"R"),T:ct((E,w)=>E-w+2,"T"),B:ct((E,w)=>E-2,"B")},dr=ct(function(E){return Ht(E)?E==="L"?"R":"L":E==="T"?"B":"T"},"getOppositeArchitectureDirection"),_e=ct(function(E){let w=E;return w==="L"||w==="R"||w==="T"||w==="B"},"isArchitectureDirection"),Ht=ct(function(E){let w=E;return w==="L"||w==="R"},"isArchitectureDirectionX"),Zt=ct(function(E){let w=E;return w==="T"||w==="B"},"isArchitectureDirectionY"),we=ct(function(E,w){let N=Ht(E)&&Zt(w),u=Zt(E)&&Ht(w);return N||u},"isArchitectureDirectionXY"),vr=ct(function(E){let w=E[0],N=E[1],u=Ht(w)&&Zt(N),l=Zt(w)&&Ht(N);return u||l},"isArchitecturePairXY"),pr=ct(function(E){return E!=="LL"&&E!=="RR"&&E!=="TT"&&E!=="BB"},"isValidArchitectureDirectionPair"),Ae=ct(function(E,w){let N=`${E}${w}`;return pr(N)?N:void 0},"getArchitectureDirectionPair"),yr=ct(function([E,w],N){let u=N[0],l=N[1];return Ht(u)?Zt(l)?[E+(u==="L"?-1:1),w+(l==="T"?1:-1)]:[E+(u==="L"?-1:1),w]:Ht(l)?[E+(l==="L"?1:-1),w+(u==="T"?1:-1)]:[E,w+(u==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),mr=ct(function(E){return E==="LT"||E==="TL"?[1,1]:E==="BL"||E==="LB"?[1,-1]:E==="BR"||E==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Er=ct(function(E,w){return we(E,w)?"bend":Ht(E)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Tr=ct(function(E){return E.type==="service"},"isArchitectureService"),Nr=ct(function(E){return E.type==="junction"},"isArchitectureJunction"),tr=ct(E=>E.data(),"edgeData"),ee=ct(E=>E.data(),"nodeData"),Lr=Re.architecture,er=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=Ge,this.getAccTitle=Ue,this.setDiagramTitle=He,this.getDiagramTitle=We,this.getAccDescription=Xe,this.setAccDescription=Ye,this.clear()}static{ct(this,"ArchitectureDB")}setDiagramId(E){this.diagramId=E}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",Pe()}addService({id:E,icon:w,in:N,title:u,iconText:l}){if(this.registeredIds[E]!==void 0)throw new Error(`The service id [${E}] is already in use by another ${this.registeredIds[E]}`);if(N!==void 0){if(E===N)throw new Error(`The service [${E}] cannot be placed within itself`);if(this.registeredIds[N]===void 0)throw new Error(`The service [${E}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[N]==="node")throw new Error(`The service [${E}]'s parent is not a group`)}this.registeredIds[E]="node",this.nodes[E]={id:E,type:"service",icon:w,iconText:l,title:u,edges:[],in:N}}getServices(){return Object.values(this.nodes).filter(Tr)}addJunction({id:E,in:w}){if(this.registeredIds[E]!==void 0)throw new Error(`The junction id [${E}] is already in use by another ${this.registeredIds[E]}`);if(w!==void 0){if(E===w)throw new Error(`The junction [${E}] cannot be placed within itself`);if(this.registeredIds[w]===void 0)throw new Error(`The junction [${E}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds[w]==="node")throw new Error(`The junction [${E}]'s parent is not a group`)}this.registeredIds[E]="node",this.nodes[E]={id:E,type:"junction",edges:[],in:w}}getJunctions(){return Object.values(this.nodes).filter(Nr)}getNodes(){return Object.values(this.nodes)}getNode(E){return this.nodes[E]??null}addGroup({id:E,icon:w,in:N,title:u}){if(this.registeredIds?.[E]!==void 0)throw new Error(`The group id [${E}] is already in use by another ${this.registeredIds[E]}`);if(N!==void 0){if(E===N)throw new Error(`The group [${E}] cannot be placed within itself`);if(this.registeredIds?.[N]===void 0)throw new Error(`The group [${E}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds?.[N]==="node")throw new Error(`The group [${E}]'s parent is not a group`)}this.registeredIds[E]="group",this.groups[E]={id:E,icon:w,title:u,in:N}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:E,rhsId:w,lhsDir:N,rhsDir:u,lhsInto:l,rhsInto:a,lhsGroup:r,rhsGroup:n,title:f}){if(!_e(N))throw new Error(`Invalid direction given for left hand side of edge ${E}--${w}. Expected (L,R,T,B) got ${String(N)}`);if(!_e(u))throw new Error(`Invalid direction given for right hand side of edge ${E}--${w}. Expected (L,R,T,B) got ${String(u)}`);if(this.nodes[E]===void 0&&this.groups[E]===void 0)throw new Error(`The left-hand id [${E}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[w]===void 0&&this.groups[w]===void 0)throw new Error(`The right-hand id [${w}] does not yet exist. Please create the service/group before declaring an edge to it.`);let e=this.nodes[E].in,c=this.nodes[w].in;if(r&&e&&c&&e==c)throw new Error(`The left-hand id [${E}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(n&&e&&c&&e==c)throw new Error(`The right-hand id [${w}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let t={lhsId:E,lhsDir:N,lhsInto:l,lhsGroup:r,rhsId:w,rhsDir:u,rhsInto:a,rhsGroup:n,title:f};this.edges.push(t),this.nodes[E]&&this.nodes[w]&&(this.nodes[E].edges.push(this.edges[this.edges.length-1]),this.nodes[w].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(this.dataStructures===void 0){let E={},w=Object.entries(this.nodes).reduce((n,[f,e])=>(n[f]=e.edges.reduce((c,t)=>{let i=this.getNode(t.lhsId)?.in,h=this.getNode(t.rhsId)?.in;if(i&&h&&i!==h){let g=Er(t.lhsDir,t.rhsDir);g!=="bend"&&(E[i]??={},E[i][h]=g,E[h]??={},E[h][i]=g)}if(t.lhsId===f){let g=Ae(t.lhsDir,t.rhsDir);g&&(c[g]=t.rhsId)}else{let g=Ae(t.rhsDir,t.lhsDir);g&&(c[g]=t.lhsId)}return c},{}),n),{}),N=Object.keys(w)[0],u={[N]:1},l=Object.keys(w).reduce((n,f)=>f===N?n:{...n,[f]:1},{}),a=ct(n=>{let f={[n]:[0,0]},e=[n];for(;e.length>0;){let c=e.shift();if(c){u[c]=1,delete l[c];let t=w[c],[i,h]=f[c];Object.entries(t).forEach(([g,s])=>{u[s]||(f[s]=yr([i,h],g),e.push(s))})}}return f},"BFS"),r=[a(N)];for(;Object.keys(l).length>0;)r.push(a(Object.keys(l)[0]));this.dataStructures={adjList:w,spatialMaps:r,groupAlignments:E}}return this.dataStructures}setElementForId(E,w){this.elements[E]=w}getElementById(E){return this.elements[E]}getConfig(){return Be({...Lr,...Se().architecture})}getConfigField(E){return this.getConfig()[E]}},Cr=ct((E,w)=>{qe(E,w),E.groups.map(N=>w.addGroup(N)),E.services.map(N=>w.addService({...N,type:"service"})),E.junctions.map(N=>w.addJunction({...N,type:"junction"})),E.edges.map(N=>w.addEdge(N))},"populateDb"),rr={parser:{yy:void 0},parse:ct(async E=>{let w=await Qe("architecture",E);ye.debug(w);let N=rr.parser?.yy;if(!(N instanceof er))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Cr(w,N)},"parse")},Ar=ct(E=>` .edge { stroke-width: ${E.archEdgeWidth}; stroke: ${E.archEdgeColor}; @@ -34,4 +34,4 @@ import{a as qe}from"./chunk-PPWLQFJD.min.js";import{a as ze}from"./chunk-C5SK55C translate(${v*O.width/2}, ${D*O.height/2}) rotate(${-1*v*D*45}, 0, ${T.height/2}) `)}}}}}))},"drawEdges"),Or=ct(async function(E,w,N,u){let a=N.getConfigField("padding")*.75,r=N.getConfigField("fontSize"),f=N.getConfigField("iconSize")/2;await Promise.all(w.nodes().map(async e=>{let c=ee(e);if(c.type==="group"){let{h:t,w:i,x1:h,y1:g}=e.boundingBox(),s=E.append("rect");s.attr("id",`${u}-group-${c.id}`).attr("x",h+f).attr("y",g+f).attr("width",i).attr("height",t).attr("class","node-bkg");let L=E.append("g"),y=h,p=g;if(c.icon){let C=L.append("g");C.html(`${await he(c.icon,{height:a,width:a,fallbackPrefix:ae.prefix})}`),C.attr("transform","translate("+(y+f+1)+", "+(p+f+1)+")"),y+=a,p+=r/2-1-2}if(c.label){let C=L.append("g");await le(C,c.label,{useHtmlLabels:!1,width:i,classes:"architecture-service-label"},se()),C.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),C.attr("transform","translate("+(y+f+4)+", "+(p+f+2)+")")}N.setElementForId(c.id,s)}}))},"drawGroups"),Dr=ct(async function(E,w,N,u){let l=se();for(let a of N){let r=w.append("g"),n=E.getConfigField("iconSize");if(a.title){let t=r.append("g");await le(t,a.title,{useHtmlLabels:!1,width:n*1.5,classes:"architecture-service-label"},l),t.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),t.attr("transform","translate("+n/2+", "+n+")")}let f=r.append("g");if(a.icon)f.html(`${await he(a.icon,{height:n,width:n,fallbackPrefix:ae.prefix})}`);else if(a.iconText){f.html(`${await he("blank",{height:n,width:n,fallbackPrefix:ae.prefix})}`);let h=f.append("g").append("foreignObject").attr("width",n).attr("height",n).append("div").attr("class","node-icon-text").attr("style",`height: ${n}px;`).append("div").html(Fe(a.iconText,l)),g=parseInt(window.getComputedStyle(h.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;h.attr("style",`-webkit-line-clamp: ${Math.floor((n-2)/g)};`)}else f.append("path").attr("class","node-bkg").attr("id",`${u}-node-${a.id}`).attr("d",`M0,${n} V5 Q0,0 5,0 H${n-5} Q${n},0 ${n},5 V${n} Z`);r.attr("id",`${u}-service-${a.id}`).attr("class","architecture-service");let{width:e,height:c}=r.node().getBBox();a.width=e,a.height=c,E.setElementForId(a.id,r)}return 0},"drawServices"),xr=ct(function(E,w,N,u){N.forEach(l=>{let a=w.append("g"),r=E.getConfigField("iconSize");a.append("g").append("rect").attr("id",`${u}-node-${l.id}`).attr("fill-opacity","0").attr("width",r).attr("height",r),a.attr("class","architecture-junction");let{width:f,height:e}=a._groups[0][0].getBBox();a.width=f,a.height=e,E.setElementForId(l.id,a)})},"drawJunctions");Ze([{name:ae.prefix,icons:ae}]);me.use(ir.default);function nr(E,w,N){E.forEach(u=>{w.add({group:"nodes",data:{type:"service",id:u.id,icon:u.icon,label:u.title,parent:u.in,width:N.getConfigField("iconSize"),height:N.getConfigField("iconSize")},classes:"node-service"})})}ct(nr,"addServices");function ar(E,w,N){E.forEach(u=>{w.add({group:"nodes",data:{type:"junction",id:u.id,parent:u.in,width:N.getConfigField("iconSize"),height:N.getConfigField("iconSize")},classes:"node-junction"})})}ct(ar,"addJunctions");function or(E,w){w.nodes().map(N=>{let u=ee(N);if(u.type==="group")return;u.x=N.position().x,u.y=N.position().y,E.getElementById(u.id).attr("transform","translate("+(u.x||0)+","+(u.y||0)+")")})}ct(or,"positionNodes");function sr(E,w){E.forEach(N=>{w.add({group:"nodes",data:{type:"group",id:N.id,icon:N.icon,label:N.title,parent:N.in},classes:"node-group"})})}ct(sr,"addGroups");function hr(E,w){E.forEach(N=>{let{lhsId:u,rhsId:l,lhsInto:a,lhsGroup:r,rhsInto:n,lhsDir:f,rhsDir:e,rhsGroup:c,title:t}=N,i=we(N.lhsDir,N.rhsDir)?"segments":"straight",h={id:`${u}-${l}`,label:t,source:u,sourceDir:f,sourceArrow:a,sourceGroup:r,sourceEndpoint:f==="L"?"0 50%":f==="R"?"100% 50%":f==="T"?"50% 0":"50% 100%",target:l,targetDir:e,targetArrow:n,targetGroup:c,targetEndpoint:e==="L"?"0 50%":e==="R"?"100% 50%":e==="T"?"50% 0":"50% 100%"};w.add({group:"edges",data:h,classes:i})})}ct(hr,"addEdges");function lr(E,w,N){let u=ct((n,f)=>Object.entries(n).reduce((e,[c,t])=>{let i=0,h=Object.entries(t);if(h.length===1)return e[c]=h[0][1],e;for(let g=0;g{let f={},e={};return Object.entries(n).forEach(([c,[t,i]])=>{let h=E.getNode(c)?.in??"default";f[i]??={},f[i][h]??=[],f[i][h].push(c),e[t]??={},e[t][h]??=[],e[t][h].push(c)}),{horiz:Object.values(u(f,"horizontal")).filter(c=>c.length>1),vert:Object.values(u(e,"vertical")).filter(c=>c.length>1)}}),[a,r]=l.reduce(([n,f],{horiz:e,vert:c})=>[[...n,...e],[...f,...c]],[[],[]]);return{horizontal:a,vertical:r}}ct(lr,"getAlignments");function fr(E,w){let N=[],u=ct(a=>`${a[0]},${a[1]}`,"posToStr"),l=ct(a=>a.split(",").map(r=>parseInt(r)),"strToPos");return E.forEach(a=>{let r=Object.fromEntries(Object.entries(a).map(([c,t])=>[u(t),c])),n=[u([0,0])],f={},e={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;n.length>0;){let c=n.shift();if(c){f[c]=1;let t=r[c];if(t){let i=l(c);Object.entries(e).forEach(([h,g])=>{let s=u([i[0]+g[0],i[1]+g[1]]),L=r[s];L&&!f[s]&&(n.push(s),N.push({[Ke[h]]:L,[Ke[dr(h)]]:t,gap:1.5*w.getConfigField("iconSize")}))})}}}}),N}ct(fr,"getRelativeConstraints");function cr(E,w,N,u,l,{spatialMaps:a,groupAlignments:r}){return new Promise(n=>{let f=Ve("body").append("div").attr("id","cy").attr("style","display:none"),e=me({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge[label]",style:{label:"data(label)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${l.getConfigField("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${l.getConfigField("padding")}px`}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}});f.remove(),sr(N,e),nr(E,e,l),ar(w,e,l),hr(u,e);let c=lr(l,a,r),t=fr(a,l),i=l.getConfigField("iconSize"),h=l.getConfigField("idealEdgeLengthMultiplier")*i,g=.5*i,s=l.getConfigField("edgeElasticity"),L=e.layout({name:"fcose",quality:"proof",randomize:l.getConfigField("randomize"),nodeSeparation:l.getConfigField("nodeSeparation"),numIter:l.getConfigField("numIter"),styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(y){let[p,C]=y.connectedNodes(),{parent:R}=ee(p),{parent:A}=ee(C);return R===A?h:g},edgeElasticity(y){let[p,C]=y.connectedNodes(),{parent:R}=ee(p),{parent:A}=ee(C);return R===A?s:.001},alignmentConstraint:c,relativePlacementConstraint:t});L.one("layoutstop",()=>{function y(p,C,R,A){let b,W,{x:G,y:J}=p,{x,y:z}=C;W=(A-J+(G-R)*(J-z)/(G-x))/Math.sqrt(1+Math.pow((J-z)/(G-x),2)),b=Math.sqrt(Math.pow(A-J,2)+Math.pow(R-G,2)-Math.pow(W,2));let o=Math.sqrt(Math.pow(x-G,2)+Math.pow(z-J,2));b=b/o;let m=(x-G)*(A-J)-(z-J)*(R-G);switch(!0){case m>=0:m=1;break;case m<0:m=-1;break}let d=(x-G)*(R-G)+(z-J)*(A-J);switch(!0){case d>=0:d=1;break;case d<0:d=-1;break}return W=Math.abs(W)*m,b=b*d,{distances:W,weights:b}}ct(y,"getSegmentWeights"),e.startBatch();for(let p of Object.values(e.edges()))if(p.data?.()){let{x:C,y:R}=p.source().position(),{x:A,y:b}=p.target().position();if(C!==A&&R!==b){let W=p.sourceEndpoint(),G=p.targetEndpoint(),{sourceDir:J}=tr(p),[x,z]=Zt(J)?[W.x,G.y]:[G.x,W.y],{weights:o,distances:m}=y(W,G,x,z);p.style("segment-distances",m),p.style("segment-weights",o)}}e.endBatch(),L.run()}),L.run(),e.ready(y=>{ye.info("Ready",y),n(e)})})}ct(cr,"layoutArchitecture");var Ir=ct(async(E,w,N,u)=>{let l=u.db;l.setDiagramId(w);let a=l.getServices(),r=l.getJunctions(),n=l.getGroups(),f=l.getEdges(),e=l.getDataStructures(),c=ze(w),t=c.append("g");t.attr("class","architecture-edges");let i=c.append("g");i.attr("class","architecture-services");let h=c.append("g");h.attr("class","architecture-groups"),await Dr(l,i,a,w),xr(l,i,r,w);let g=await cr(a,r,n,f,l,e);await Mr(t,g,l,w),await Or(h,g,l,w),or(l,g),be(void 0,c,l.getConfigField("padding"),l.getConfigField("useMaxWidth"))},"draw"),Rr={draw:Ir},Wr={parser:rr,get db(){return new er},renderer:Rr,styles:wr};export{Wr as diagram}; -//# sourceMappingURL=architectureDiagram-3BPJPVTR-R6CHV6J7.min.js.map +//# sourceMappingURL=architectureDiagram-3BPJPVTR-OLGG2C47.min.js.map diff --git a/templates/tabulareditor/public/architectureDiagram-3BPJPVTR-R6CHV6J7.min.js.map b/templates/tabulareditor/public/architectureDiagram-3BPJPVTR-OLGG2C47.min.js.map similarity index 100% rename from templates/tabulareditor/public/architectureDiagram-3BPJPVTR-R6CHV6J7.min.js.map rename to templates/tabulareditor/public/architectureDiagram-3BPJPVTR-OLGG2C47.min.js.map diff --git a/templates/tabulareditor/public/blockDiagram-GPEHLZMM-LC63GRO2.min.js b/templates/tabulareditor/public/blockDiagram-GPEHLZMM-3OKIGOBQ.min.js similarity index 99% rename from templates/tabulareditor/public/blockDiagram-GPEHLZMM-LC63GRO2.min.js rename to templates/tabulareditor/public/blockDiagram-GPEHLZMM-3OKIGOBQ.min.js index 096b21707..ab01bc8a3 100644 --- a/templates/tabulareditor/public/blockDiagram-GPEHLZMM-LC63GRO2.min.js +++ b/templates/tabulareditor/public/blockDiagram-GPEHLZMM-3OKIGOBQ.min.js @@ -1,4 +1,4 @@ -import{a as qt}from"./chunk-MZ3CL6N5.min.js";import{D as Gt}from"./chunk-7MS36IQK.min.js";import{a as tt,d as Ut}from"./chunk-AZ7QTF4J.min.js";import{a as Vt,b as Zt}from"./chunk-QD4STHJA.min.js";import{f as lt}from"./chunk-WNWVX3PL.min.js";import{a as Xt,f as jt,p as et,r as kt}from"./chunk-IXKFR5M2.min.js";import"./chunk-HCOLC5CQ.min.js";import{B as $,F as M,H as wt,I as Ft,N as Pt,O as Wt,T as Yt,_ as C,a as At,b as Mt}from"./chunk-7PRAVCJT.min.js";import{J as Ht,N as Kt,b as g,d as L,j as _}from"./chunk-BJGJ3C53.min.js";import"./chunk-MY7PHHTQ.min.js";var Lt=(function(){var e=g(function(T,w,u,b){for(u=u||{},b=T.length;b--;u[T[b]]=w);return u},"o"),t=[1,15],a=[1,7],n=[1,13],s=[1,14],l=[1,19],r=[1,16],i=[1,17],c=[1,18],d=[8,30],o=[8,10,21,28,29,30,31,39,43,46],p=[1,23],y=[1,24],x=[8,10,15,16,21,28,29,30,31,39,43,46],m=[8,10,15,16,21,27,28,29,30,31,39,43,46],v=[1,49],k={trace:g(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:g(function(w,u,b,S,E,h,W){var f=h.length-1;switch(E){case 4:S.getLogger().debug("Rule: separator (NL) ");break;case 5:S.getLogger().debug("Rule: separator (Space) ");break;case 6:S.getLogger().debug("Rule: separator (EOF) ");break;case 7:S.getLogger().debug("Rule: hierarchy: ",h[f-1]),S.setHierarchy(h[f-1]);break;case 8:S.getLogger().debug("Stop NL ");break;case 9:S.getLogger().debug("Stop EOF ");break;case 10:S.getLogger().debug("Stop NL2 ");break;case 11:S.getLogger().debug("Stop EOF2 ");break;case 12:S.getLogger().debug("Rule: statement: ",h[f]),typeof h[f].length=="number"?this.$=h[f]:this.$=[h[f]];break;case 13:S.getLogger().debug("Rule: statement #2: ",h[f-1]),this.$=[h[f-1]].concat(h[f]);break;case 14:S.getLogger().debug("Rule: link: ",h[f],w),this.$={edgeTypeStr:h[f],label:""};break;case 15:S.getLogger().debug("Rule: LABEL link: ",h[f-3],h[f-1],h[f]),this.$={edgeTypeStr:h[f],label:h[f-1]};break;case 18:let R=parseInt(h[f]),q=S.generateId();this.$={id:q,type:"space",label:"",width:R,children:[]};break;case 23:S.getLogger().debug("Rule: (nodeStatement link node) ",h[f-2],h[f-1],h[f]," typestr: ",h[f-1].edgeTypeStr);let V=S.edgeStrToEdgeData(h[f-1].edgeTypeStr),ut=S.edgeStrToEdgeStartData(h[f-1].edgeTypeStr),st=S.edgeStrToThickness(h[f-1].edgeTypeStr),pt=S.edgeStrToPattern(h[f-1].edgeTypeStr);this.$=[{id:h[f-2].id,label:h[f-2].label,type:h[f-2].type,directions:h[f-2].directions},{id:h[f-2].id+"-"+h[f].id,start:h[f-2].id,end:h[f].id,label:h[f-1].label,type:"edge",thickness:st,pattern:pt,directions:h[f].directions,arrowTypeEnd:V,arrowTypeStart:ut},{id:h[f].id,label:h[f].label,type:S.typeStr2Type(h[f].typeStr),directions:h[f].directions}];break;case 24:S.getLogger().debug("Rule: nodeStatement (abc88 node size) ",h[f-1],h[f]),this.$={id:h[f-1].id,label:h[f-1].label,type:S.typeStr2Type(h[f-1].typeStr),directions:h[f-1].directions,widthInColumns:parseInt(h[f],10)};break;case 25:S.getLogger().debug("Rule: nodeStatement (node) ",h[f]),this.$={id:h[f].id,label:h[f].label,type:S.typeStr2Type(h[f].typeStr),directions:h[f].directions,widthInColumns:1};break;case 26:S.getLogger().debug("APA123",this?this:"na"),S.getLogger().debug("COLUMNS: ",h[f]),this.$={type:"column-setting",columns:h[f]==="auto"?-1:parseInt(h[f])};break;case 27:S.getLogger().debug("Rule: id-block statement : ",h[f-2],h[f-1]);let z=S.generateId();this.$={...h[f-2],type:"composite",children:h[f-1]};break;case 28:S.getLogger().debug("Rule: blockStatement : ",h[f-2],h[f-1],h[f]);let Z=S.generateId();this.$={id:Z,type:"composite",label:"",children:h[f-1]};break;case 29:S.getLogger().debug("Rule: node (NODE_ID separator): ",h[f]),this.$={id:h[f]};break;case 30:S.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",h[f-1],h[f]),this.$={id:h[f-1],label:h[f].label,typeStr:h[f].typeStr,directions:h[f].directions};break;case 31:S.getLogger().debug("Rule: dirList: ",h[f]),this.$=[h[f]];break;case 32:S.getLogger().debug("Rule: dirList: ",h[f-1],h[f]),this.$=[h[f-1]].concat(h[f]);break;case 33:S.getLogger().debug("Rule: nodeShapeNLabel: ",h[f-2],h[f-1],h[f]),this.$={typeStr:h[f-2]+h[f],label:h[f-1]};break;case 34:S.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",h[f-3],h[f-2]," #3:",h[f-1],h[f]),this.$={typeStr:h[f-3]+h[f],label:h[f-2],directions:h[f-1]};break;case 35:case 36:this.$={type:"classDef",id:h[f-1].trim(),css:h[f].trim()};break;case 37:this.$={type:"applyClass",id:h[f-1].trim(),styleClass:h[f].trim()};break;case 38:this.$={type:"applyStyles",id:h[f-1].trim(),stylesStr:h[f].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:n,29:s,31:l,39:r,43:i,46:c},{8:[1,20]},e(d,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:a,28:n,29:s,31:l,39:r,43:i,46:c}),e(o,[2,16],{14:22,15:p,16:y}),e(o,[2,17]),e(o,[2,18]),e(o,[2,19]),e(o,[2,20]),e(o,[2,21]),e(o,[2,22]),e(x,[2,25],{27:[1,25]}),e(o,[2,26]),{19:26,26:12,31:l},{10:t,11:27,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:n,29:s,31:l,39:r,43:i,46:c},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(m,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(d,[2,13]),{26:35,31:l},{31:[2,14]},{17:[1,36]},e(x,[2,24]),{10:t,11:37,13:4,14:22,15:p,16:y,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:n,29:s,31:l,39:r,43:i,46:c},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(m,[2,30]),{18:[1,43]},{18:[1,44]},e(x,[2,23]),{18:[1,45]},{30:[1,46]},e(o,[2,28]),e(o,[2,35]),e(o,[2,36]),e(o,[2,37]),e(o,[2,38]),{36:[1,47]},{33:48,34:v},{15:[1,50]},e(o,[2,27]),e(m,[2,33]),{38:[1,51]},{33:52,34:v,38:[2,31]},{31:[2,15]},e(m,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:g(function(w,u){if(u.recoverable)this.trace(w);else{var b=new Error(w);throw b.hash=u,b}},"parseError"),parse:g(function(w){var u=this,b=[0],S=[],E=[null],h=[],W=this.table,f="",R=0,q=0,V=0,ut=2,st=1,pt=h.slice.call(arguments,1),z=Object.create(this.lexer),Z={yy:{}};for(var ft in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ft)&&(Z.yy[ft]=this.yy[ft]);z.setInput(w,Z.yy),Z.yy.lexer=z,Z.yy.parser=this,typeof z.yylloc>"u"&&(z.yylloc={});var xt=z.yylloc;h.push(xt);var De=z.options&&z.options.ranges;typeof Z.yy.parseError=="function"?this.parseError=Z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Te(Y){b.length=b.length-2*Y,E.length=E.length-Y,h.length=h.length-Y}g(Te,"popStack");function Rt(){var Y;return Y=S.pop()||z.lex()||st,typeof Y!="number"&&(Y instanceof Array&&(S=Y,Y=S.pop()),Y=u.symbols_[Y]||Y),Y}g(Rt,"lex");for(var P,bt,J,K,ea,yt,Q={},it,G,zt,nt;;){if(J=b[b.length-1],this.defaultActions[J]?K=this.defaultActions[J]:((P===null||typeof P>"u")&&(P=Rt()),K=W[J]&&W[J][P]),typeof K>"u"||!K.length||!K[0]){var mt="";nt=[];for(it in W[J])this.terminals_[it]&&it>ut&&nt.push("'"+this.terminals_[it]+"'");z.showPosition?mt="Parse error on line "+(R+1)+`: +import{a as qt}from"./chunk-MZ3CL6N5.min.js";import{D as Gt}from"./chunk-7MS36IQK.min.js";import{a as tt,d as Ut}from"./chunk-AZ7QTF4J.min.js";import{a as Vt,b as Zt}from"./chunk-STULGUR3.min.js";import{f as lt}from"./chunk-STQM5NEZ.min.js";import{a as Xt,f as jt,p as et,r as kt}from"./chunk-BSOUP4V7.min.js";import"./chunk-HCOLC5CQ.min.js";import{B as $,F as M,H as wt,I as Ft,N as Pt,O as Wt,T as Yt,_ as C,a as At,b as Mt}from"./chunk-OYCWXTBX.min.js";import{J as Ht,N as Kt,b as g,d as L,j as _}from"./chunk-BJGJ3C53.min.js";import"./chunk-MY7PHHTQ.min.js";var Lt=(function(){var e=g(function(T,w,u,b){for(u=u||{},b=T.length;b--;u[T[b]]=w);return u},"o"),t=[1,15],a=[1,7],n=[1,13],s=[1,14],l=[1,19],r=[1,16],i=[1,17],c=[1,18],d=[8,30],o=[8,10,21,28,29,30,31,39,43,46],p=[1,23],y=[1,24],x=[8,10,15,16,21,28,29,30,31,39,43,46],m=[8,10,15,16,21,27,28,29,30,31,39,43,46],v=[1,49],k={trace:g(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:g(function(w,u,b,S,E,h,W){var f=h.length-1;switch(E){case 4:S.getLogger().debug("Rule: separator (NL) ");break;case 5:S.getLogger().debug("Rule: separator (Space) ");break;case 6:S.getLogger().debug("Rule: separator (EOF) ");break;case 7:S.getLogger().debug("Rule: hierarchy: ",h[f-1]),S.setHierarchy(h[f-1]);break;case 8:S.getLogger().debug("Stop NL ");break;case 9:S.getLogger().debug("Stop EOF ");break;case 10:S.getLogger().debug("Stop NL2 ");break;case 11:S.getLogger().debug("Stop EOF2 ");break;case 12:S.getLogger().debug("Rule: statement: ",h[f]),typeof h[f].length=="number"?this.$=h[f]:this.$=[h[f]];break;case 13:S.getLogger().debug("Rule: statement #2: ",h[f-1]),this.$=[h[f-1]].concat(h[f]);break;case 14:S.getLogger().debug("Rule: link: ",h[f],w),this.$={edgeTypeStr:h[f],label:""};break;case 15:S.getLogger().debug("Rule: LABEL link: ",h[f-3],h[f-1],h[f]),this.$={edgeTypeStr:h[f],label:h[f-1]};break;case 18:let R=parseInt(h[f]),q=S.generateId();this.$={id:q,type:"space",label:"",width:R,children:[]};break;case 23:S.getLogger().debug("Rule: (nodeStatement link node) ",h[f-2],h[f-1],h[f]," typestr: ",h[f-1].edgeTypeStr);let V=S.edgeStrToEdgeData(h[f-1].edgeTypeStr),ut=S.edgeStrToEdgeStartData(h[f-1].edgeTypeStr),st=S.edgeStrToThickness(h[f-1].edgeTypeStr),pt=S.edgeStrToPattern(h[f-1].edgeTypeStr);this.$=[{id:h[f-2].id,label:h[f-2].label,type:h[f-2].type,directions:h[f-2].directions},{id:h[f-2].id+"-"+h[f].id,start:h[f-2].id,end:h[f].id,label:h[f-1].label,type:"edge",thickness:st,pattern:pt,directions:h[f].directions,arrowTypeEnd:V,arrowTypeStart:ut},{id:h[f].id,label:h[f].label,type:S.typeStr2Type(h[f].typeStr),directions:h[f].directions}];break;case 24:S.getLogger().debug("Rule: nodeStatement (abc88 node size) ",h[f-1],h[f]),this.$={id:h[f-1].id,label:h[f-1].label,type:S.typeStr2Type(h[f-1].typeStr),directions:h[f-1].directions,widthInColumns:parseInt(h[f],10)};break;case 25:S.getLogger().debug("Rule: nodeStatement (node) ",h[f]),this.$={id:h[f].id,label:h[f].label,type:S.typeStr2Type(h[f].typeStr),directions:h[f].directions,widthInColumns:1};break;case 26:S.getLogger().debug("APA123",this?this:"na"),S.getLogger().debug("COLUMNS: ",h[f]),this.$={type:"column-setting",columns:h[f]==="auto"?-1:parseInt(h[f])};break;case 27:S.getLogger().debug("Rule: id-block statement : ",h[f-2],h[f-1]);let z=S.generateId();this.$={...h[f-2],type:"composite",children:h[f-1]};break;case 28:S.getLogger().debug("Rule: blockStatement : ",h[f-2],h[f-1],h[f]);let Z=S.generateId();this.$={id:Z,type:"composite",label:"",children:h[f-1]};break;case 29:S.getLogger().debug("Rule: node (NODE_ID separator): ",h[f]),this.$={id:h[f]};break;case 30:S.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",h[f-1],h[f]),this.$={id:h[f-1],label:h[f].label,typeStr:h[f].typeStr,directions:h[f].directions};break;case 31:S.getLogger().debug("Rule: dirList: ",h[f]),this.$=[h[f]];break;case 32:S.getLogger().debug("Rule: dirList: ",h[f-1],h[f]),this.$=[h[f-1]].concat(h[f]);break;case 33:S.getLogger().debug("Rule: nodeShapeNLabel: ",h[f-2],h[f-1],h[f]),this.$={typeStr:h[f-2]+h[f],label:h[f-1]};break;case 34:S.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",h[f-3],h[f-2]," #3:",h[f-1],h[f]),this.$={typeStr:h[f-3]+h[f],label:h[f-2],directions:h[f-1]};break;case 35:case 36:this.$={type:"classDef",id:h[f-1].trim(),css:h[f].trim()};break;case 37:this.$={type:"applyClass",id:h[f-1].trim(),styleClass:h[f].trim()};break;case 38:this.$={type:"applyStyles",id:h[f-1].trim(),stylesStr:h[f].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:n,29:s,31:l,39:r,43:i,46:c},{8:[1,20]},e(d,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:a,28:n,29:s,31:l,39:r,43:i,46:c}),e(o,[2,16],{14:22,15:p,16:y}),e(o,[2,17]),e(o,[2,18]),e(o,[2,19]),e(o,[2,20]),e(o,[2,21]),e(o,[2,22]),e(x,[2,25],{27:[1,25]}),e(o,[2,26]),{19:26,26:12,31:l},{10:t,11:27,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:n,29:s,31:l,39:r,43:i,46:c},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(m,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(d,[2,13]),{26:35,31:l},{31:[2,14]},{17:[1,36]},e(x,[2,24]),{10:t,11:37,13:4,14:22,15:p,16:y,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:n,29:s,31:l,39:r,43:i,46:c},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(m,[2,30]),{18:[1,43]},{18:[1,44]},e(x,[2,23]),{18:[1,45]},{30:[1,46]},e(o,[2,28]),e(o,[2,35]),e(o,[2,36]),e(o,[2,37]),e(o,[2,38]),{36:[1,47]},{33:48,34:v},{15:[1,50]},e(o,[2,27]),e(m,[2,33]),{38:[1,51]},{33:52,34:v,38:[2,31]},{31:[2,15]},e(m,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:g(function(w,u){if(u.recoverable)this.trace(w);else{var b=new Error(w);throw b.hash=u,b}},"parseError"),parse:g(function(w){var u=this,b=[0],S=[],E=[null],h=[],W=this.table,f="",R=0,q=0,V=0,ut=2,st=1,pt=h.slice.call(arguments,1),z=Object.create(this.lexer),Z={yy:{}};for(var ft in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ft)&&(Z.yy[ft]=this.yy[ft]);z.setInput(w,Z.yy),Z.yy.lexer=z,Z.yy.parser=this,typeof z.yylloc>"u"&&(z.yylloc={});var xt=z.yylloc;h.push(xt);var De=z.options&&z.options.ranges;typeof Z.yy.parseError=="function"?this.parseError=Z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Te(Y){b.length=b.length-2*Y,E.length=E.length-Y,h.length=h.length-Y}g(Te,"popStack");function Rt(){var Y;return Y=S.pop()||z.lex()||st,typeof Y!="number"&&(Y instanceof Array&&(S=Y,Y=S.pop()),Y=u.symbols_[Y]||Y),Y}g(Rt,"lex");for(var P,bt,J,K,ea,yt,Q={},it,G,zt,nt;;){if(J=b[b.length-1],this.defaultActions[J]?K=this.defaultActions[J]:((P===null||typeof P>"u")&&(P=Rt()),K=W[J]&&W[J][P]),typeof K>"u"||!K.length||!K[0]){var mt="";nt=[];for(it in W[J])this.terminals_[it]&&it>ut&&nt.push("'"+this.terminals_[it]+"'");z.showPosition?mt="Parse error on line "+(R+1)+`: `+z.showPosition()+` Expecting `+nt.join(", ")+", got '"+(this.terminals_[P]||P)+"'":mt="Parse error on line "+(R+1)+": Unexpected "+(P==st?"end of input":"'"+(this.terminals_[P]||P)+"'"),this.parseError(mt,{text:z.match,token:this.terminals_[P]||P,line:z.yylineno,loc:xt,expected:nt})}if(K[0]instanceof Array&&K.length>1)throw new Error("Parse Error: multiple actions possible at state: "+J+", token: "+P);switch(K[0]){case 1:b.push(P),E.push(z.yytext),h.push(z.yylloc),b.push(K[1]),P=null,bt?(P=bt,bt=null):(q=z.yyleng,f=z.yytext,R=z.yylineno,xt=z.yylloc,V>0&&V--);break;case 2:if(G=this.productions_[K[1]][1],Q.$=E[E.length-G],Q._$={first_line:h[h.length-(G||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(G||1)].first_column,last_column:h[h.length-1].last_column},De&&(Q._$.range=[h[h.length-(G||1)].range[0],h[h.length-1].range[1]]),yt=this.performAction.apply(Q,[f,q,R,Z.yy,K[1],E,h].concat(pt)),typeof yt<"u")return yt;G&&(b=b.slice(0,-1*G*2),E=E.slice(0,-1*G),h=h.slice(0,-1*G)),b.push(this.productions_[K[1]][0]),E.push(Q.$),h.push(Q._$),zt=W[b[b.length-2]][b[b.length-1]],b.push(zt);break;case 3:return!0}}return!0},"parse")},D=(function(){var T={EOF:1,parseError:g(function(u,b){if(this.yy.parser)this.yy.parser.parseError(u,b);else throw new Error(u)},"parseError"),setInput:g(function(w,u){return this.yy=u||this.yy||{},this._input=w,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:g(function(){var w=this._input[0];this.yytext+=w,this.yyleng++,this.offset++,this.match+=w,this.matched+=w;var u=w.match(/(?:\r\n?|\n).*/g);return u?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),w},"input"),unput:g(function(w){var u=w.length,b=w.split(/(?:\r\n?|\n)/g);this._input=w+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var S=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),b.length-1&&(this.yylineno-=b.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:b?(b.length===S.length?this.yylloc.first_column:0)+S[S.length-b.length].length-b[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:g(function(){return this._more=!0,this},"more"),reject:g(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:g(function(w){this.unput(this.match.slice(w))},"less"),pastInput:g(function(){var w=this.matched.substr(0,this.matched.length-this.match.length);return(w.length>20?"...":"")+w.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:g(function(){var w=this.match;return w.length<20&&(w+=this._input.substr(0,20-w.length)),(w.substr(0,20)+(w.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:g(function(){var w=this.pastInput(),u=new Array(w.length+1).join("-");return w+this.upcomingInput()+` @@ -130,4 +130,4 @@ Expecting `+nt.join(", ")+", got '"+(this.terminals_[P]||P)+"'":mt="Parse error outsidePoint: ${JSON.stringify(t)} insidePoint : ${JSON.stringify(a)} node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);let n=e.x,s=e.y,l=Math.abs(n-a.x),r=e.width/2,i=a.xMath.abs(n-t.x)*c){let p=a.y{L.debug("abc88 cutPathAtIntersect",e,t);let a=[],n=e[0],s=!1;return e.forEach(l=>{if(!br(t,l)&&!s){let r=yr(t,n,l),i=!1;a.forEach(c=>{i=i||c.x===r.x&&c.y===r.y}),a.some(c=>c.x===r.x&&c.y===r.y)||a.push(r),s=!0}else n=l,s||a.push(l)}),a},"cutPathAtIntersect"),mr=g(function(e,t,a,n,s,l,r){let i=a.points;L.debug("abc88 InsertEdge: edge=",a,"e=",t);let c=!1,d=l.node(t.v);var o=l.node(t.w);o?.intersect&&d?.intersect&&(i=i.slice(1,a.points.length-1),i.unshift(d.intersect(i[0])),i.push(o.intersect(i[i.length-1]))),a.toCluster&&(L.debug("to cluster abc88",n[a.toCluster]),i=ee(a.points,n[a.toCluster].node),c=!0),a.fromCluster&&(L.debug("from cluster abc88",n[a.fromCluster]),i=ee(i.reverse(),n[a.fromCluster].node).reverse(),c=!0);let p=i.filter(w=>!Number.isNaN(w.y)),y=Kt;a.curve&&(s==="graph"||s==="flowchart")&&(y=a.curve);let{x,y:m}=Ut(a),v=Ht().x(x).y(m).curve(y),k;switch(a.thickness){case"normal":k="edge-thickness-normal";break;case"thick":k="edge-thickness-thick";break;case"invisible":k="edge-thickness-thick";break;default:k=""}switch(a.pattern){case"solid":k+=" edge-pattern-solid";break;case"dotted":k+=" edge-pattern-dotted";break;case"dashed":k+=" edge-pattern-dashed";break}let D=e.append("path").attr("d",v(p)).attr("id",a.id).attr("class"," "+k+(a.classes?" "+a.classes:"")).attr("style",a.style),N="";(C().flowchart.arrowMarkerAbsolute||C().state.arrowMarkerAbsolute)&&(N=Ft(!0)),ur(D,a,N,r,s);let T={};return c&&(T.updatedPath=i),T.originalPath=a.points,T},"insertEdge"),wr=g(e=>{let t=new Set;for(let a of e)switch(a){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(a);break}return t},"expandAndDeduplicateDirections"),kr=g((e,t,a,n)=>{let s=wr(e),l=2,r=t.height+2*a.padding,i=r/l,c=n??t.width+2*i+a.padding,d=a.padding/2;return s.has("right")&&s.has("left")&&s.has("up")&&s.has("down")?[{x:0,y:0},{x:i,y:0},{x:c/2,y:2*d},{x:c-i,y:0},{x:c,y:0},{x:c,y:-r/3},{x:c+2*d,y:-r/2},{x:c,y:-2*r/3},{x:c,y:-r},{x:c-i,y:-r},{x:c/2,y:-r-2*d},{x:i,y:-r},{x:0,y:-r},{x:0,y:-2*r/3},{x:-2*d,y:-r/2},{x:0,y:-r/3}]:s.has("right")&&s.has("left")&&s.has("up")?[{x:i,y:0},{x:c-i,y:0},{x:c,y:-r/2},{x:c-i,y:-r},{x:i,y:-r},{x:0,y:-r/2}]:s.has("right")&&s.has("left")&&s.has("down")?[{x:0,y:0},{x:i,y:-r},{x:c-i,y:-r},{x:c,y:0}]:s.has("right")&&s.has("up")&&s.has("down")?[{x:0,y:0},{x:c,y:-i},{x:c,y:-r+i},{x:0,y:-r}]:s.has("left")&&s.has("up")&&s.has("down")?[{x:c,y:0},{x:0,y:-i},{x:0,y:-r+i},{x:c,y:-r}]:s.has("right")&&s.has("left")?[{x:i,y:0},{x:i,y:-d},{x:c-i,y:-d},{x:c-i,y:0},{x:c,y:-r/2},{x:c-i,y:-r},{x:c-i,y:-r+d},{x:i,y:-r+d},{x:i,y:-r},{x:0,y:-r/2}]:s.has("up")&&s.has("down")?[{x:c/2,y:0},{x:0,y:-d},{x:i,y:-d},{x:i,y:-r+d},{x:0,y:-r+d},{x:c/2,y:-r},{x:c,y:-r+d},{x:c-i,y:-r+d},{x:c-i,y:-d},{x:c,y:-d}]:s.has("right")&&s.has("up")?[{x:0,y:0},{x:c,y:-i},{x:0,y:-r}]:s.has("right")&&s.has("down")?[{x:0,y:0},{x:c,y:0},{x:0,y:-r}]:s.has("left")&&s.has("up")?[{x:c,y:0},{x:0,y:-i},{x:c,y:-r}]:s.has("left")&&s.has("down")?[{x:c,y:0},{x:0,y:0},{x:c,y:-r}]:s.has("right")?[{x:i,y:-d},{x:i,y:-d},{x:c-i,y:-d},{x:c-i,y:0},{x:c,y:-r/2},{x:c-i,y:-r},{x:c-i,y:-r+d},{x:i,y:-r+d},{x:i,y:-r+d}]:s.has("left")?[{x:i,y:0},{x:i,y:-d},{x:c-i,y:-d},{x:c-i,y:-r+d},{x:i,y:-r+d},{x:i,y:-r},{x:0,y:-r/2}]:s.has("up")?[{x:i,y:-d},{x:i,y:-r+d},{x:0,y:-r+d},{x:c/2,y:-r},{x:c,y:-r+d},{x:c-i,y:-r+d},{x:c-i,y:-d}]:s.has("down")?[{x:c/2,y:0},{x:0,y:-d},{x:i,y:-d},{x:i,y:-r+d},{x:c-i,y:-r+d},{x:c-i,y:-d},{x:c,y:-d}]:[{x:0,y:0}]},"getArrowPoints");function fe(e,t){return e.intersect(t)}g(fe,"intersectNode");var Sr=fe;function xe(e,t,a,n){var s=e.x,l=e.y,r=s-n.x,i=l-n.y,c=Math.sqrt(t*t*i*i+a*a*r*r),d=Math.abs(t*a*r/c);n.x0}g(Dt,"sameSign");var vr=me,Er=we;function we(e,t,a){var n=e.x,s=e.y,l=[],r=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(m){r=Math.min(r,m.x),i=Math.min(i,m.y)}):(r=Math.min(r,t.x),i=Math.min(i,t.y));for(var c=n-e.width/2-r,d=s-e.height/2-i,o=0;o1&&l.sort(function(m,v){var k=m.x-a.x,D=m.y-a.y,N=Math.sqrt(k*k+D*D),T=v.x-a.x,w=v.y-a.y,u=Math.sqrt(T*T+w*w);return N{var a=e.x,n=e.y,s=t.x-a,l=t.y-n,r=e.width/2,i=e.height/2,c,d;return Math.abs(l)*r>Math.abs(s)*i?(l<0&&(i=-i),c=l===0?0:i*s/l,d=i):(s<0&&(r=-r),c=r,d=s===0?0:r*l/s),{x:a+c,y:n+d}},"intersectRect"),Dr=_r,B={node:Sr,circle:Lr,ellipse:be,polygon:Er,rect:Dr},A=g(async(e,t,a,n)=>{let s=C(),l,r=t.useHtmlLabels||M(s);a?l=a:l="node default";let i=e.insert("g").attr("class",l).attr("id",t.domId||t.id),c=i.insert("g").attr("class","label").attr("style",t.labelStyle),d;t.labelText===void 0?d="":d=typeof t.labelText=="string"?t.labelText:t.labelText[0];let o;t.labelType==="markdown"?o=lt(c,wt(kt(d),s),{useHtmlLabels:r,width:t.width||s.flowchart.wrappingWidth,classes:"markdown-node-label"},s):o=await U(c,wt(kt(d),s),t.labelStyle,!1,n);let p=o.getBBox(),y=t.padding/2;if(M(s)){let x=o.children[0],m=_(o);await Zt(x,d),p=x.getBoundingClientRect(),m.attr("width",p.width),m.attr("height",p.height)}return r?c.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"):c.attr("transform","translate(0, "+-p.height/2+")"),t.centerLabel&&c.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),c.insert("rect",":first-child"),{shapeSvg:i,bbox:p,halfPadding:y,label:c}},"labelHelper"),I=g((e,t)=>{let a=t.node().getBBox();e.width=a.width,e.height=a.height},"updateNodeBounds");function j(e,t,a,n){return e.insert("polygon",":first-child").attr("points",n.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+a/2+")")}g(j,"insertPolygonShape");var Tr=g(async(e,t)=>{t.useHtmlLabels||M(C())||(t.centerLabel=!0);let{shapeSvg:n,bbox:s,halfPadding:l}=await A(e,t,"node "+t.classes,!0);L.info("Classes = ",t.classes);let r=n.insert("rect",":first-child");return r.attr("rx",t.rx).attr("ry",t.ry).attr("x",-s.width/2-l).attr("y",-s.height/2-l).attr("width",s.width+t.padding).attr("height",s.height+t.padding),I(t,r),t.intersect=function(i){return B.rect(t,i)},n},"note"),Br=Tr,re=g(e=>e?" "+e:"","formatClass"),H=g((e,t)=>`${t||"node default"}${re(e.classes)} ${re(e.class)}`,"getClassesFromNode"),ae=g(async(e,t)=>{let{shapeSvg:a,bbox:n}=await A(e,t,H(t,void 0),!0),s=n.width+t.padding,l=n.height+t.padding,r=s+l,i=[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}];L.info("Question main (Circle)");let c=j(a,r,r,i);return c.attr("style",t.style),I(t,c),t.intersect=function(d){return L.warn("Intersect called"),B.polygon(t,i,d)},a},"question"),Ir=g((e,t)=>{let a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=28,s=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}];return a.insert("polygon",":first-child").attr("points",s.map(function(r){return r.x+","+r.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),t.width=28,t.height=28,t.intersect=function(r){return B.circle(t,14,r)},a},"choice"),Nr=g(async(e,t)=>{let{shapeSvg:a,bbox:n}=await A(e,t,H(t,void 0),!0),s=4,l=t.positioned?t.height:n.height+t.padding,r=l/s,i=t.positioned?t.width:n.width+2*r+t.padding,c=[{x:r,y:0},{x:i-r,y:0},{x:i,y:-l/2},{x:i-r,y:-l},{x:r,y:-l},{x:0,y:-l/2}],d=j(a,i,l,c);return d.attr("style",t.style),I(t,d),t.intersect=function(o){return B.polygon(t,c,o)},a},"hexagon"),Cr=g(async(e,t)=>{let{shapeSvg:a,bbox:n}=await A(e,t,void 0,!0),s=2,l=n.height+2*t.padding,r=l/s,i=n.width+2*r+t.padding,d=t.positioned&&(t.widthInColumns??1)>1&&t.width>i?t.width:i,o=kr(t.directions,n,t,d),p=j(a,d,l,o);return p.attr("style",t.style),I(t,p),t.intersect=function(y){return B.polygon(t,o,y)},a},"block_arrow"),Or=g(async(e,t)=>{let{shapeSvg:a,bbox:n}=await A(e,t,H(t,void 0),!0),s=n.width+t.padding,l=n.height+t.padding,r=[{x:-l/2,y:0},{x:s,y:0},{x:s,y:-l},{x:-l/2,y:-l},{x:0,y:-l/2}];return j(a,s,l,r).attr("style",t.style),t.width=s+l,t.height=l,t.intersect=function(c){return B.polygon(t,r,c)},a},"rect_left_inv_arrow"),Rr=g(async(e,t)=>{let{shapeSvg:a,bbox:n}=await A(e,t,H(t),!0),s=n.width+t.padding,l=n.height+t.padding,r=[{x:-2*l/6,y:0},{x:s-l/6,y:0},{x:s+2*l/6,y:-l},{x:l/6,y:-l}],i=j(a,s,l,r);return i.attr("style",t.style),I(t,i),t.intersect=function(c){return B.polygon(t,r,c)},a},"lean_right"),zr=g(async(e,t)=>{let{shapeSvg:a,bbox:n}=await A(e,t,H(t,void 0),!0),s=n.width+t.padding,l=n.height+t.padding,r=[{x:2*l/6,y:0},{x:s+l/6,y:0},{x:s-2*l/6,y:-l},{x:-l/6,y:-l}],i=j(a,s,l,r);return i.attr("style",t.style),I(t,i),t.intersect=function(c){return B.polygon(t,r,c)},a},"lean_left"),Ar=g(async(e,t)=>{let{shapeSvg:a,bbox:n}=await A(e,t,H(t,void 0),!0),s=n.width+t.padding,l=n.height+t.padding,r=[{x:-2*l/6,y:0},{x:s+2*l/6,y:0},{x:s-l/6,y:-l},{x:l/6,y:-l}],i=j(a,s,l,r);return i.attr("style",t.style),I(t,i),t.intersect=function(c){return B.polygon(t,r,c)},a},"trapezoid"),Mr=g(async(e,t)=>{let{shapeSvg:a,bbox:n}=await A(e,t,H(t,void 0),!0),s=n.width+t.padding,l=n.height+t.padding,r=[{x:l/6,y:0},{x:s-l/6,y:0},{x:s+2*l/6,y:-l},{x:-2*l/6,y:-l}],i=j(a,s,l,r);return i.attr("style",t.style),I(t,i),t.intersect=function(c){return B.polygon(t,r,c)},a},"inv_trapezoid"),Fr=g(async(e,t)=>{let{shapeSvg:a,bbox:n}=await A(e,t,H(t,void 0),!0),s=n.width+t.padding,l=n.height+t.padding,r=[{x:0,y:0},{x:s+l/2,y:0},{x:s,y:-l/2},{x:s+l/2,y:-l},{x:0,y:-l}],i=j(a,s,l,r);return i.attr("style",t.style),I(t,i),t.intersect=function(c){return B.polygon(t,r,c)},a},"rect_right_inv_arrow"),Pr=g(async(e,t)=>{let{shapeSvg:a,bbox:n}=await A(e,t,H(t,void 0),!0),s=n.width+t.padding,l=s/2,r=l/(2.5+s/50),i=n.height+r+t.padding,c="M 0,"+r+" a "+l+","+r+" 0,0,0 "+s+" 0 a "+l+","+r+" 0,0,0 "+-s+" 0 l 0,"+i+" a "+l+","+r+" 0,0,0 "+s+" 0 l 0,"+-i,d=a.attr("label-offset-y",r).insert("path",":first-child").attr("style",t.style).attr("d",c).attr("transform","translate("+-s/2+","+-(i/2+r)+")");return I(t,d),t.intersect=function(o){let p=B.rect(t,o),y=p.x-t.x;if(l!=0&&(Math.abs(y)t.height/2-r)){let x=r*r*(1-y*y/(l*l));x!=0&&(x=Math.sqrt(x)),x=r-x,o.y-t.y>0&&(x=-x),p.y+=x}return p},a},"cylinder"),Wr=g(async(e,t)=>{let{shapeSvg:a,bbox:n,halfPadding:s}=await A(e,t,"node "+t.classes+" "+t.class,!0),l=a.insert("rect",":first-child"),r=t.positioned?t.width:n.width+t.padding,i=t.positioned?t.height:n.height+t.padding,c=t.positioned?-r/2:-n.width/2-s,d=t.positioned?-i/2:-n.height/2-s;if(l.attr("class","basic label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",c).attr("y",d).attr("width",r).attr("height",i),t.props){let o=new Set(Object.keys(t.props));t.props.borders&&(dt(l,t.props.borders,r,i),o.delete("borders")),o.forEach(p=>{L.warn(`Unknown node property ${p}`)})}return I(t,l),t.intersect=function(o){return B.rect(t,o)},a},"rect"),Yr=g(async(e,t)=>{let{shapeSvg:a,bbox:n,halfPadding:s}=await A(e,t,"node "+t.classes,!0),l=a.insert("rect",":first-child"),r=t.positioned?t.width:n.width+t.padding,i=t.positioned?t.height:n.height+t.padding,c=t.positioned?-r/2:-n.width/2-s,d=t.positioned?-i/2:-n.height/2-s;if(l.attr("class","basic cluster composite label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",c).attr("y",d).attr("width",r).attr("height",i),t.props){let o=new Set(Object.keys(t.props));t.props.borders&&(dt(l,t.props.borders,r,i),o.delete("borders")),o.forEach(p=>{L.warn(`Unknown node property ${p}`)})}return I(t,l),t.intersect=function(o){return B.rect(t,o)},a},"composite"),Hr=g(async(e,t)=>{let{shapeSvg:a}=await A(e,t,"label",!0);L.trace("Classes = ",t.class);let n=a.insert("rect",":first-child"),s=0,l=0;if(n.attr("width",s).attr("height",l),a.attr("class","label edgeLabel"),t.props){let r=new Set(Object.keys(t.props));t.props.borders&&(dt(n,t.props.borders,s,l),r.delete("borders")),r.forEach(i=>{L.warn(`Unknown node property ${i}`)})}return I(t,n),t.intersect=function(r){return B.rect(t,r)},a},"labelRect");function dt(e,t,a,n){let s=[],l=g(i=>{s.push(i,0)},"addBorder"),r=g(i=>{s.push(0,i)},"skipBorder");t.includes("t")?(L.debug("add top border"),l(a)):r(a),t.includes("r")?(L.debug("add right border"),l(n)):r(n),t.includes("b")?(L.debug("add bottom border"),l(a)):r(a),t.includes("l")?(L.debug("add left border"),l(n)):r(n),e.attr("stroke-dasharray",s.join(" "))}g(dt,"applyNodePropertyBorders");var Kr=g(async(e,t)=>{let a;t.classes?a="node "+t.classes:a="node default";let n=e.insert("g").attr("class",a).attr("id",t.domId||t.id),s=n.insert("rect",":first-child"),l=n.insert("line"),r=n.insert("g").attr("class","label"),i=t.labelText.flat?t.labelText.flat():t.labelText,c="";typeof i=="object"?c=i[0]:c=i,L.info("Label text abc79",c,i,typeof i=="object");let d=await U(r,c,t.labelStyle,!0,!0),o={width:0,height:0};if(M(C())){let v=d.children[0],k=_(d);o=v.getBoundingClientRect(),k.attr("width",o.width),k.attr("height",o.height)}L.info("Text 2",i);let p=i.slice(1,i.length),y=d.getBBox(),x=await U(r,p.join?p.join("
"):p,t.labelStyle,!0,!0);if(M(C())){let v=x.children[0],k=_(x);o=v.getBoundingClientRect(),k.attr("width",o.width),k.attr("height",o.height)}let m=t.padding/2;return _(x).attr("transform","translate( "+(o.width>y.width?0:(y.width-o.width)/2)+", "+(y.height+m+5)+")"),_(d).attr("transform","translate( "+(o.width{let{shapeSvg:a,bbox:n}=await A(e,t,H(t,void 0),!0),s=n.height+t.padding,l=n.width+s/4+t.padding,r=a.insert("rect",":first-child").attr("style",t.style).attr("rx",s/2).attr("ry",s/2).attr("x",-l/2).attr("y",-s/2).attr("width",l).attr("height",s);return I(t,r),t.intersect=function(i){return B.rect(t,i)},a},"stadium"),Xr=g(async(e,t)=>{let{shapeSvg:a,bbox:n,halfPadding:s}=await A(e,t,H(t,void 0),!0),l=a.insert("circle",":first-child");return l.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+s).attr("width",n.width+t.padding).attr("height",n.height+t.padding),L.info("Circle main"),I(t,l),t.intersect=function(r){return L.info("Circle intersect",t,n.width/2+s,r),B.circle(t,n.width/2+s,r)},a},"circle"),jr=g(async(e,t)=>{let{shapeSvg:a,bbox:n,halfPadding:s}=await A(e,t,H(t,void 0),!0),l=5,r=a.insert("g",":first-child"),i=r.insert("circle"),c=r.insert("circle");return r.attr("class",t.class),i.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+s+l).attr("width",n.width+t.padding+l*2).attr("height",n.height+t.padding+l*2),c.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+s).attr("width",n.width+t.padding).attr("height",n.height+t.padding),L.info("DoubleCircle main"),I(t,i),t.intersect=function(d){return L.info("DoubleCircle intersect",t,n.width/2+s+l,d),B.circle(t,n.width/2+s+l,d)},a},"doublecircle"),Vr=g(async(e,t)=>{let{shapeSvg:a,bbox:n}=await A(e,t,H(t,void 0),!0),s=n.width+t.padding,l=n.height+t.padding,r=[{x:0,y:0},{x:s,y:0},{x:s,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:s+8,y:0},{x:s+8,y:-l},{x:-8,y:-l},{x:-8,y:0}],i=j(a,s,l,r);return i.attr("style",t.style),I(t,i),t.intersect=function(c){return B.polygon(t,r,c)},a},"subroutine"),Zr=g((e,t)=>{let a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=a.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),I(t,n),t.intersect=function(s){return B.circle(t,7,s)},a},"start"),se=g((e,t,a)=>{let n=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),s=70,l=10;a==="LR"&&(s=10,l=70);let r=n.append("rect").attr("x",-1*s/2).attr("y",-1*l/2).attr("width",s).attr("height",l).attr("class","fork-join");return I(t,r),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(i){return B.rect(t,i)},n},"forkJoin"),Gr=g((e,t)=>{let a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=a.insert("circle",":first-child"),s=a.insert("circle",":first-child");return s.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),n.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),I(t,s),t.intersect=function(l){return B.circle(t,7,l)},a},"end"),qr=g(async(e,t)=>{let a=t.padding/2,n=4,s=8,l;t.classes?l="node "+t.classes:l="node default";let r=e.insert("g").attr("class",l).attr("id",t.domId||t.id),i=r.insert("rect",":first-child"),c=r.insert("line"),d=r.insert("line"),o=0,p=n,y=r.insert("g").attr("class","label"),x=0,m=t.classData.annotations?.[0],v=t.classData.annotations[0]?"\xAB"+t.classData.annotations[0]+"\xBB":"",k=await U(y,v,t.labelStyle,!0,!0),D=k.getBBox();if(M(C())){let E=k.children[0],h=_(k);D=E.getBoundingClientRect(),h.attr("width",D.width),h.attr("height",D.height)}t.classData.annotations[0]&&(p+=D.height+n,o+=D.width);let N=t.classData.label;t.classData.type!==void 0&&t.classData.type!==""&&(M(C())?N+="<"+t.classData.type+">":N+="<"+t.classData.type+">");let T=await U(y,N,t.labelStyle,!0,!0);_(T).attr("class","classTitle");let w=T.getBBox();if(M(C())){let E=T.children[0],h=_(T);w=E.getBoundingClientRect(),h.attr("width",w.width),h.attr("height",w.height)}p+=w.height+n,w.width>o&&(o=w.width);let u=[];t.classData.members.forEach(async E=>{let h=E.getDisplayDetails(),W=h.displayText;M(C())&&(W=W.replace(//g,">"));let f=await U(y,W,h.cssStyle?h.cssStyle:t.labelStyle,!0,!0),R=f.getBBox();if(M(C())){let q=f.children[0],V=_(f);R=q.getBoundingClientRect(),V.attr("width",R.width),V.attr("height",R.height)}R.width>o&&(o=R.width),p+=R.height+n,u.push(f)}),p+=s;let b=[];if(t.classData.methods.forEach(async E=>{let h=E.getDisplayDetails(),W=h.displayText;M(C())&&(W=W.replace(//g,">"));let f=await U(y,W,h.cssStyle?h.cssStyle:t.labelStyle,!0,!0),R=f.getBBox();if(M(C())){let q=f.children[0],V=_(f);R=q.getBoundingClientRect(),V.attr("width",R.width),V.attr("height",R.height)}R.width>o&&(o=R.width),p+=R.height+n,b.push(f)}),p+=s,m){let E=(o-D.width)/2;_(k).attr("transform","translate( "+(-1*o/2+E)+", "+-1*p/2+")"),x=D.height+n}let S=(o-w.width)/2;return _(T).attr("transform","translate( "+(-1*o/2+S)+", "+(-1*p/2+x)+")"),x+=w.height+n,c.attr("class","divider").attr("x1",-o/2-a).attr("x2",o/2+a).attr("y1",-p/2-a+s+x).attr("y2",-p/2-a+s+x),x+=s,u.forEach(E=>{_(E).attr("transform","translate( "+-o/2+", "+(-1*p/2+x+s/2)+")");let h=E?.getBBox();x+=(h?.height??0)+n}),x+=s,d.attr("class","divider").attr("x1",-o/2-a).attr("x2",o/2+a).attr("y1",-p/2-a+s+x).attr("y2",-p/2-a+s+x),x+=s,b.forEach(E=>{_(E).attr("transform","translate( "+-o/2+", "+(-1*p/2+x)+")");let h=E?.getBBox();x+=(h?.height??0)+n}),i.attr("style",t.style).attr("class","outer title-state").attr("x",-o/2-a).attr("y",-(p/2)-a).attr("width",o+t.padding).attr("height",p+t.padding),I(t,i),t.intersect=function(E){return B.rect(t,E)},r},"class_box"),ie={rhombus:ae,composite:Yr,question:ae,rect:Wr,labelRect:Hr,rectWithTitle:Kr,choice:Ir,circle:Xr,doublecircle:jr,stadium:Ur,hexagon:Nr,block_arrow:Cr,rect_left_inv_arrow:Or,lean_right:Rr,lean_left:zr,trapezoid:Ar,inv_trapezoid:Mr,rect_right_inv_arrow:Fr,cylinder:Pr,start:Zr,end:Gr,note:Br,subroutine:Vr,fork:se,join:se,class_box:qr},ct={},ke=g(async(e,t,a)=>{let n,s;if(t.link){let l;C().securityLevel==="sandbox"?l="_top":t.linkTarget&&(l=t.linkTarget||"_blank"),n=e.insert("svg:a").attr("xlink:href",t.link).attr("target",l),s=await ie[t.shape](n,t,a)}else s=await ie[t.shape](e,t,a),n=s;return t.tooltip&&s.attr("title",t.tooltip),t.class&&s.attr("class","node default "+t.class),ct[t.id]=n,t.haveCallback&&ct[t.id].attr("class",ct[t.id].attr("class")+" clickable"),n},"insertNode"),Jr=g(e=>{let t=ct[e.id];L.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");let a=8,n=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+n-e.width/2)+", "+(e.y-e.height/2-a)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),n},"positionNode");function Ot(e,t,a=!1){let n=e,s="default";(n?.classes?.length||0)>0&&(s=(n?.classes??[]).join(" ")),s=s+" flowchart-label";let l=0,r="",i;switch(n.type){case"round":l=5,r="rect";break;case"composite":l=0,r="composite",i=0;break;case"square":r="rect";break;case"diamond":r="question";break;case"hexagon":r="hexagon";break;case"block_arrow":r="block_arrow";break;case"odd":r="rect_left_inv_arrow";break;case"lean_right":r="lean_right";break;case"lean_left":r="lean_left";break;case"trapezoid":r="trapezoid";break;case"inv_trapezoid":r="inv_trapezoid";break;case"rect_left_inv_arrow":r="rect_left_inv_arrow";break;case"circle":r="circle";break;case"ellipse":r="ellipse";break;case"stadium":r="stadium";break;case"subroutine":r="subroutine";break;case"cylinder":r="cylinder";break;case"group":r="rect";break;case"doublecircle":r="doublecircle";break;default:r="rect"}let c=jt(n?.styles??[]),d=n.label,o=n.size??{width:0,height:0,x:0,y:0},p=t.getDiagramId();return{labelStyle:c.labelStyle,shape:r,labelText:d,rx:l,ry:l,class:s,style:c.style,id:n.id,domId:p?`${p}-${n.id}`:n.id,directions:n.directions,width:o.width,height:o.height,x:o.x,y:o.y,positioned:a,intersect:void 0,type:n.type,padding:i??$()?.block?.padding??0,widthInColumns:n.widthInColumns??1}}g(Ot,"getNodeFromBlock");async function Se(e,t,a){let n=Ot(t,a,!1);if(n.type==="group")return;let s=$(),l=await ke(e,n,{config:s}),r=l.node().getBBox(),i=a.getBlock(n.id);i.size={width:r.width,height:r.height,x:0,y:0,node:l},a.setBlock(i),l.remove()}g(Se,"calculateBlockSize");async function Le(e,t,a){let n=Ot(t,a,!0);if(a.getBlock(n.id).type!=="space"){let l=$();await ke(e,n,{config:l}),t.intersect=n?.intersect,Jr(n)}}g(Le,"insertBlockPositioned");async function gt(e,t,a,n){for(let s of t)await n(e,s,a),s.children&&await gt(e,s.children,a,n)}g(gt,"performOperations");async function ve(e,t,a){await gt(e,t,a,Se)}g(ve,"calculateBlockSizes");async function Ee(e,t,a){await gt(e,t,a,Le)}g(Ee,"insertBlocks");async function _e(e,t,a,n,s){let l=new Gt({multigraph:!0,compound:!0});l.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(let r of a)r.size&&l.setNode(r.id,{width:r.size.width,height:r.size.height,intersect:r.intersect});for(let r of t)if(r.start&&r.end){let i=n.getBlock(r.start),c=n.getBlock(r.end);if(i?.size&&c?.size){let d=i.size,o=c.size,p=[{x:d.x,y:d.y},{x:d.x+(o.x-d.x)/2,y:d.y+(o.y-d.y)/2},{x:o.x,y:o.y}],y=s?`${s}-${r.id}`:r.id,x=r.thickness==="thick"?"edge-thickness-thick":"edge-thickness-normal",m=r.pattern==="dotted"?"edge-pattern-dotted":"edge-pattern-solid",v=`${x} ${m} flowchart-link LS-a1 LE-b1`;mr(e,{v:r.start,w:r.end,name:y},{...r,id:y,arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:p,classes:v},void 0,"block",l,s),r.label&&(await fr(e,{...r,label:r.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:p,classes:v}),xr({...r,x:p[1].x,y:p[1].y},{originalPath:p}))}}}g(_e,"insertEdges");var Qr=g(function(e,t){return t.db.getClasses()},"getClasses"),$r=g(async function(e,t,a,n){let{securityLevel:s,block:l}=$(),r=n.db;r.setDiagramId(t);let i;s==="sandbox"&&(i=_("#i"+t));let c=s==="sandbox"?_(i.nodes()[0].contentDocument.body):_("body"),d=s==="sandbox"?c.select(`[id="${t}"]`):_(`[id="${t}"]`);hr(d,["point","circle","cross"],n.type,t);let p=r.getBlocks(),y=r.getBlocksFlat(),x=r.getEdges(),m=d.insert("g").attr("class","block");await ve(m,p,r);let v=pe(r);if(await Ee(m,p,r),await _e(m,x,y,r,t),v){let k=v,D=Math.max(1,Math.round(.125*(k.width/k.height))),N=k.height+D+10,T=k.width+10,{useMaxWidth:w}=l;Wt(d,N,T,!!w),L.debug("Here Bounds",v,k),d.attr("viewBox",`${k.x-5} ${k.y-5} ${k.width+10} ${k.height+10}`)}},"draw"),ta={draw:$r,getClasses:Qr},xa={parser:Be,db:qe,renderer:ta,styles:Qe};export{xa as diagram}; -//# sourceMappingURL=blockDiagram-GPEHLZMM-LC63GRO2.min.js.map +//# sourceMappingURL=blockDiagram-GPEHLZMM-3OKIGOBQ.min.js.map diff --git a/templates/tabulareditor/public/blockDiagram-GPEHLZMM-LC63GRO2.min.js.map b/templates/tabulareditor/public/blockDiagram-GPEHLZMM-3OKIGOBQ.min.js.map similarity index 100% rename from templates/tabulareditor/public/blockDiagram-GPEHLZMM-LC63GRO2.min.js.map rename to templates/tabulareditor/public/blockDiagram-GPEHLZMM-3OKIGOBQ.min.js.map diff --git a/templates/tabulareditor/public/c4Diagram-AAUBKEIU-XUDUJAA2.min.js b/templates/tabulareditor/public/c4Diagram-AAUBKEIU-RCWASNEG.min.js similarity index 99% rename from templates/tabulareditor/public/c4Diagram-AAUBKEIU-XUDUJAA2.min.js rename to templates/tabulareditor/public/c4Diagram-AAUBKEIU-RCWASNEG.min.js index b1832fea0..a74fa592c 100644 --- a/templates/tabulareditor/public/c4Diagram-AAUBKEIU-XUDUJAA2.min.js +++ b/templates/tabulareditor/public/c4Diagram-AAUBKEIU-RCWASNEG.min.js @@ -1,4 +1,4 @@ -import{a as ke,f as Ee}from"./chunk-ANPX43U5.min.js";import{i as ve,j as ee,k as Ct}from"./chunk-IXKFR5M2.min.js";import{a as Fe}from"./chunk-HCOLC5CQ.min.js";import{H as te,N as Yt,O as be,U as ge,V as _e,W as xe,X as me,_ as Ot,o as ye}from"./chunk-7PRAVCJT.min.js";import{b as y,d as $t,j as Dt}from"./chunk-BJGJ3C53.min.js";import{c as Ue}from"./chunk-MY7PHHTQ.min.js";var Re=Ue(Fe(),1),Ut=(function(){var e=y(function(_t,x,v,k){for(v=v||{},k=_t.length;k--;v[_t[k]]=x);return v},"o"),t=[1,24],n=[1,25],o=[1,26],l=[1,27],s=[1,28],a=[1,63],r=[1,64],i=[1,65],u=[1,66],d=[1,67],p=[1,68],b=[1,69],m=[1,29],O=[1,30],S=[1,31],P=[1,32],M=[1,33],U=[1,34],H=[1,35],q=[1,36],G=[1,37],K=[1,38],J=[1,39],Z=[1,40],$=[1,41],tt=[1,42],et=[1,43],at=[1,44],it=[1,45],rt=[1,46],nt=[1,47],st=[1,48],lt=[1,50],ot=[1,51],ct=[1,52],ht=[1,53],ut=[1,54],dt=[1,55],ft=[1,56],pt=[1,57],yt=[1,58],bt=[1,59],gt=[1,60],wt=[14,42],Wt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Rt=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],E=[1,82],A=[1,83],C=[1,84],w=[1,85],T=[12,14,42],ce=[12,14,33,42],It=[12,14,33,42,76,77,79,80],vt=[12,33],Qt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Ht={trace:y(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:y(function(x,v,k,g,R,h,St){var f=h.length-1;switch(R){case 3:g.setDirection("TB");break;case 4:g.setDirection("BT");break;case 5:g.setDirection("RL");break;case 6:g.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:g.setC4Type(h[f-3]);break;case 19:g.setTitle(h[f].substring(6)),this.$=h[f].substring(6);break;case 20:g.setAccDescription(h[f].substring(15)),this.$=h[f].substring(15);break;case 21:this.$=h[f].trim(),g.setTitle(this.$);break;case 22:case 23:this.$=h[f].trim(),g.setAccDescription(this.$);break;case 28:h[f].splice(2,0,"ENTERPRISE"),g.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 29:h[f].splice(2,0,"SYSTEM"),g.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 30:g.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 31:h[f].splice(2,0,"CONTAINER"),g.addContainerBoundary(...h[f]),this.$=h[f];break;case 32:g.addDeploymentNode("node",...h[f]),this.$=h[f];break;case 33:g.addDeploymentNode("nodeL",...h[f]),this.$=h[f];break;case 34:g.addDeploymentNode("nodeR",...h[f]),this.$=h[f];break;case 35:g.popBoundaryParseStack();break;case 39:g.addPersonOrSystem("person",...h[f]),this.$=h[f];break;case 40:g.addPersonOrSystem("external_person",...h[f]),this.$=h[f];break;case 41:g.addPersonOrSystem("system",...h[f]),this.$=h[f];break;case 42:g.addPersonOrSystem("system_db",...h[f]),this.$=h[f];break;case 43:g.addPersonOrSystem("system_queue",...h[f]),this.$=h[f];break;case 44:g.addPersonOrSystem("external_system",...h[f]),this.$=h[f];break;case 45:g.addPersonOrSystem("external_system_db",...h[f]),this.$=h[f];break;case 46:g.addPersonOrSystem("external_system_queue",...h[f]),this.$=h[f];break;case 47:g.addContainer("container",...h[f]),this.$=h[f];break;case 48:g.addContainer("container_db",...h[f]),this.$=h[f];break;case 49:g.addContainer("container_queue",...h[f]),this.$=h[f];break;case 50:g.addContainer("external_container",...h[f]),this.$=h[f];break;case 51:g.addContainer("external_container_db",...h[f]),this.$=h[f];break;case 52:g.addContainer("external_container_queue",...h[f]),this.$=h[f];break;case 53:g.addComponent("component",...h[f]),this.$=h[f];break;case 54:g.addComponent("component_db",...h[f]),this.$=h[f];break;case 55:g.addComponent("component_queue",...h[f]),this.$=h[f];break;case 56:g.addComponent("external_component",...h[f]),this.$=h[f];break;case 57:g.addComponent("external_component_db",...h[f]),this.$=h[f];break;case 58:g.addComponent("external_component_queue",...h[f]),this.$=h[f];break;case 60:g.addRel("rel",...h[f]),this.$=h[f];break;case 61:g.addRel("birel",...h[f]),this.$=h[f];break;case 62:g.addRel("rel_u",...h[f]),this.$=h[f];break;case 63:g.addRel("rel_d",...h[f]),this.$=h[f];break;case 64:g.addRel("rel_l",...h[f]),this.$=h[f];break;case 65:g.addRel("rel_r",...h[f]),this.$=h[f];break;case 66:g.addRel("rel_b",...h[f]),this.$=h[f];break;case 67:h[f].splice(0,1),g.addRel("rel",...h[f]),this.$=h[f];break;case 68:g.updateElStyle("update_el_style",...h[f]),this.$=h[f];break;case 69:g.updateRelStyle("update_rel_style",...h[f]),this.$=h[f];break;case 70:g.updateLayoutConfig("update_layout_config",...h[f]),this.$=h[f];break;case 71:this.$=[h[f]];break;case 72:h[f].unshift(h[f-1]),this.$=h[f];break;case 73:case 75:this.$=h[f].trim();break;case 74:let kt={};kt[h[f-1].trim()]=h[f].trim(),this.$=kt;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:n,24:o,26:l,28:s,29:49,30:61,32:62,34:a,36:r,37:i,38:u,39:d,40:p,41:b,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt},{13:70,19:20,20:21,21:22,22:t,23:n,24:o,26:l,28:s,29:49,30:61,32:62,34:a,36:r,37:i,38:u,39:d,40:p,41:b,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt},{13:71,19:20,20:21,21:22,22:t,23:n,24:o,26:l,28:s,29:49,30:61,32:62,34:a,36:r,37:i,38:u,39:d,40:p,41:b,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt},{13:72,19:20,20:21,21:22,22:t,23:n,24:o,26:l,28:s,29:49,30:61,32:62,34:a,36:r,37:i,38:u,39:d,40:p,41:b,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt},{13:73,19:20,20:21,21:22,22:t,23:n,24:o,26:l,28:s,29:49,30:61,32:62,34:a,36:r,37:i,38:u,39:d,40:p,41:b,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt},{14:[1,74]},e(wt,[2,13],{43:23,29:49,30:61,32:62,20:75,34:a,36:r,37:i,38:u,39:d,40:p,41:b,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt}),e(wt,[2,14]),e(Wt,[2,16],{12:[1,76]}),e(wt,[2,36],{12:[1,77]}),e(Rt,[2,19]),e(Rt,[2,20]),{25:[1,78]},{27:[1,79]},e(Rt,[2,23]),{35:80,75:81,76:E,77:A,79:C,80:w},{35:86,75:81,76:E,77:A,79:C,80:w},{35:87,75:81,76:E,77:A,79:C,80:w},{35:88,75:81,76:E,77:A,79:C,80:w},{35:89,75:81,76:E,77:A,79:C,80:w},{35:90,75:81,76:E,77:A,79:C,80:w},{35:91,75:81,76:E,77:A,79:C,80:w},{35:92,75:81,76:E,77:A,79:C,80:w},{35:93,75:81,76:E,77:A,79:C,80:w},{35:94,75:81,76:E,77:A,79:C,80:w},{35:95,75:81,76:E,77:A,79:C,80:w},{35:96,75:81,76:E,77:A,79:C,80:w},{35:97,75:81,76:E,77:A,79:C,80:w},{35:98,75:81,76:E,77:A,79:C,80:w},{35:99,75:81,76:E,77:A,79:C,80:w},{35:100,75:81,76:E,77:A,79:C,80:w},{35:101,75:81,76:E,77:A,79:C,80:w},{35:102,75:81,76:E,77:A,79:C,80:w},{35:103,75:81,76:E,77:A,79:C,80:w},{35:104,75:81,76:E,77:A,79:C,80:w},e(T,[2,59]),{35:105,75:81,76:E,77:A,79:C,80:w},{35:106,75:81,76:E,77:A,79:C,80:w},{35:107,75:81,76:E,77:A,79:C,80:w},{35:108,75:81,76:E,77:A,79:C,80:w},{35:109,75:81,76:E,77:A,79:C,80:w},{35:110,75:81,76:E,77:A,79:C,80:w},{35:111,75:81,76:E,77:A,79:C,80:w},{35:112,75:81,76:E,77:A,79:C,80:w},{35:113,75:81,76:E,77:A,79:C,80:w},{35:114,75:81,76:E,77:A,79:C,80:w},{35:115,75:81,76:E,77:A,79:C,80:w},{20:116,29:49,30:61,32:62,34:a,36:r,37:i,38:u,39:d,40:p,41:b,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt},{12:[1,118],33:[1,117]},{35:119,75:81,76:E,77:A,79:C,80:w},{35:120,75:81,76:E,77:A,79:C,80:w},{35:121,75:81,76:E,77:A,79:C,80:w},{35:122,75:81,76:E,77:A,79:C,80:w},{35:123,75:81,76:E,77:A,79:C,80:w},{35:124,75:81,76:E,77:A,79:C,80:w},{35:125,75:81,76:E,77:A,79:C,80:w},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(wt,[2,15]),e(Wt,[2,17],{21:22,19:130,22:t,23:n,24:o,26:l,28:s}),e(wt,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:n,24:o,26:l,28:s,34:a,36:r,37:i,38:u,39:d,40:p,41:b,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt}),e(Rt,[2,21]),e(Rt,[2,22]),e(T,[2,39]),e(ce,[2,71],{75:81,35:132,76:E,77:A,79:C,80:w}),e(It,[2,73]),{78:[1,133]},e(It,[2,75]),e(It,[2,76]),e(T,[2,40]),e(T,[2,41]),e(T,[2,42]),e(T,[2,43]),e(T,[2,44]),e(T,[2,45]),e(T,[2,46]),e(T,[2,47]),e(T,[2,48]),e(T,[2,49]),e(T,[2,50]),e(T,[2,51]),e(T,[2,52]),e(T,[2,53]),e(T,[2,54]),e(T,[2,55]),e(T,[2,56]),e(T,[2,57]),e(T,[2,58]),e(T,[2,60]),e(T,[2,61]),e(T,[2,62]),e(T,[2,63]),e(T,[2,64]),e(T,[2,65]),e(T,[2,66]),e(T,[2,67]),e(T,[2,68]),e(T,[2,69]),e(T,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(vt,[2,28]),e(vt,[2,29]),e(vt,[2,30]),e(vt,[2,31]),e(vt,[2,32]),e(vt,[2,33]),e(vt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Wt,[2,18]),e(wt,[2,38]),e(ce,[2,72]),e(It,[2,74]),e(T,[2,24]),e(T,[2,35]),e(Qt,[2,25]),e(Qt,[2,26],{12:[1,138]}),e(Qt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:y(function(x,v){if(v.recoverable)this.trace(x);else{var k=new Error(x);throw k.hash=v,k}},"parseError"),parse:y(function(x){var v=this,k=[0],g=[],R=[null],h=[],St=this.table,f="",kt=0,he=0,ue=0,Le=2,de=1,Ne=h.slice.call(arguments,1),D=Object.create(this.lexer),Et={yy:{}};for(var qt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,qt)&&(Et.yy[qt]=this.yy[qt]);D.setInput(x,Et.yy),Et.yy.lexer=D,Et.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Gt=D.yylloc;h.push(Gt);var Ye=D.options&&D.options.ranges;typeof Et.yy.parseError=="function"?this.parseError=Et.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function je(L){k.length=k.length-2*L,R.length=R.length-L,h.length=h.length-L}y(je,"popStack");function fe(){var L;return L=g.pop()||D.lex()||de,typeof L!="number"&&(L instanceof Array&&(g=L,L=g.pop()),L=v.symbols_[L]||L),L}y(fe,"lex");for(var B,Kt,At,N,I0,Jt,Tt={},Lt,W,pe,Nt;;){if(At=k[k.length-1],this.defaultActions[At]?N=this.defaultActions[At]:((B===null||typeof B>"u")&&(B=fe()),N=St[At]&&St[At][B]),typeof N>"u"||!N.length||!N[0]){var Zt="";Nt=[];for(Lt in St[At])this.terminals_[Lt]&&Lt>Le&&Nt.push("'"+this.terminals_[Lt]+"'");D.showPosition?Zt="Parse error on line "+(kt+1)+`: +import{a as ke,f as Ee}from"./chunk-RSHCK4XQ.min.js";import{i as ve,j as ee,k as Ct}from"./chunk-BSOUP4V7.min.js";import{a as Fe}from"./chunk-HCOLC5CQ.min.js";import{H as te,N as Yt,O as be,U as ge,V as _e,W as xe,X as me,_ as Ot,o as ye}from"./chunk-OYCWXTBX.min.js";import{b as y,d as $t,j as Dt}from"./chunk-BJGJ3C53.min.js";import{c as Ue}from"./chunk-MY7PHHTQ.min.js";var Re=Ue(Fe(),1),Ut=(function(){var e=y(function(_t,x,v,k){for(v=v||{},k=_t.length;k--;v[_t[k]]=x);return v},"o"),t=[1,24],n=[1,25],o=[1,26],l=[1,27],s=[1,28],a=[1,63],r=[1,64],i=[1,65],u=[1,66],d=[1,67],p=[1,68],b=[1,69],m=[1,29],O=[1,30],S=[1,31],P=[1,32],M=[1,33],U=[1,34],H=[1,35],q=[1,36],G=[1,37],K=[1,38],J=[1,39],Z=[1,40],$=[1,41],tt=[1,42],et=[1,43],at=[1,44],it=[1,45],rt=[1,46],nt=[1,47],st=[1,48],lt=[1,50],ot=[1,51],ct=[1,52],ht=[1,53],ut=[1,54],dt=[1,55],ft=[1,56],pt=[1,57],yt=[1,58],bt=[1,59],gt=[1,60],wt=[14,42],Wt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Rt=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],E=[1,82],A=[1,83],C=[1,84],w=[1,85],T=[12,14,42],ce=[12,14,33,42],It=[12,14,33,42,76,77,79,80],vt=[12,33],Qt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Ht={trace:y(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:y(function(x,v,k,g,R,h,St){var f=h.length-1;switch(R){case 3:g.setDirection("TB");break;case 4:g.setDirection("BT");break;case 5:g.setDirection("RL");break;case 6:g.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:g.setC4Type(h[f-3]);break;case 19:g.setTitle(h[f].substring(6)),this.$=h[f].substring(6);break;case 20:g.setAccDescription(h[f].substring(15)),this.$=h[f].substring(15);break;case 21:this.$=h[f].trim(),g.setTitle(this.$);break;case 22:case 23:this.$=h[f].trim(),g.setAccDescription(this.$);break;case 28:h[f].splice(2,0,"ENTERPRISE"),g.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 29:h[f].splice(2,0,"SYSTEM"),g.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 30:g.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 31:h[f].splice(2,0,"CONTAINER"),g.addContainerBoundary(...h[f]),this.$=h[f];break;case 32:g.addDeploymentNode("node",...h[f]),this.$=h[f];break;case 33:g.addDeploymentNode("nodeL",...h[f]),this.$=h[f];break;case 34:g.addDeploymentNode("nodeR",...h[f]),this.$=h[f];break;case 35:g.popBoundaryParseStack();break;case 39:g.addPersonOrSystem("person",...h[f]),this.$=h[f];break;case 40:g.addPersonOrSystem("external_person",...h[f]),this.$=h[f];break;case 41:g.addPersonOrSystem("system",...h[f]),this.$=h[f];break;case 42:g.addPersonOrSystem("system_db",...h[f]),this.$=h[f];break;case 43:g.addPersonOrSystem("system_queue",...h[f]),this.$=h[f];break;case 44:g.addPersonOrSystem("external_system",...h[f]),this.$=h[f];break;case 45:g.addPersonOrSystem("external_system_db",...h[f]),this.$=h[f];break;case 46:g.addPersonOrSystem("external_system_queue",...h[f]),this.$=h[f];break;case 47:g.addContainer("container",...h[f]),this.$=h[f];break;case 48:g.addContainer("container_db",...h[f]),this.$=h[f];break;case 49:g.addContainer("container_queue",...h[f]),this.$=h[f];break;case 50:g.addContainer("external_container",...h[f]),this.$=h[f];break;case 51:g.addContainer("external_container_db",...h[f]),this.$=h[f];break;case 52:g.addContainer("external_container_queue",...h[f]),this.$=h[f];break;case 53:g.addComponent("component",...h[f]),this.$=h[f];break;case 54:g.addComponent("component_db",...h[f]),this.$=h[f];break;case 55:g.addComponent("component_queue",...h[f]),this.$=h[f];break;case 56:g.addComponent("external_component",...h[f]),this.$=h[f];break;case 57:g.addComponent("external_component_db",...h[f]),this.$=h[f];break;case 58:g.addComponent("external_component_queue",...h[f]),this.$=h[f];break;case 60:g.addRel("rel",...h[f]),this.$=h[f];break;case 61:g.addRel("birel",...h[f]),this.$=h[f];break;case 62:g.addRel("rel_u",...h[f]),this.$=h[f];break;case 63:g.addRel("rel_d",...h[f]),this.$=h[f];break;case 64:g.addRel("rel_l",...h[f]),this.$=h[f];break;case 65:g.addRel("rel_r",...h[f]),this.$=h[f];break;case 66:g.addRel("rel_b",...h[f]),this.$=h[f];break;case 67:h[f].splice(0,1),g.addRel("rel",...h[f]),this.$=h[f];break;case 68:g.updateElStyle("update_el_style",...h[f]),this.$=h[f];break;case 69:g.updateRelStyle("update_rel_style",...h[f]),this.$=h[f];break;case 70:g.updateLayoutConfig("update_layout_config",...h[f]),this.$=h[f];break;case 71:this.$=[h[f]];break;case 72:h[f].unshift(h[f-1]),this.$=h[f];break;case 73:case 75:this.$=h[f].trim();break;case 74:let kt={};kt[h[f-1].trim()]=h[f].trim(),this.$=kt;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:n,24:o,26:l,28:s,29:49,30:61,32:62,34:a,36:r,37:i,38:u,39:d,40:p,41:b,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt},{13:70,19:20,20:21,21:22,22:t,23:n,24:o,26:l,28:s,29:49,30:61,32:62,34:a,36:r,37:i,38:u,39:d,40:p,41:b,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt},{13:71,19:20,20:21,21:22,22:t,23:n,24:o,26:l,28:s,29:49,30:61,32:62,34:a,36:r,37:i,38:u,39:d,40:p,41:b,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt},{13:72,19:20,20:21,21:22,22:t,23:n,24:o,26:l,28:s,29:49,30:61,32:62,34:a,36:r,37:i,38:u,39:d,40:p,41:b,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt},{13:73,19:20,20:21,21:22,22:t,23:n,24:o,26:l,28:s,29:49,30:61,32:62,34:a,36:r,37:i,38:u,39:d,40:p,41:b,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt},{14:[1,74]},e(wt,[2,13],{43:23,29:49,30:61,32:62,20:75,34:a,36:r,37:i,38:u,39:d,40:p,41:b,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt}),e(wt,[2,14]),e(Wt,[2,16],{12:[1,76]}),e(wt,[2,36],{12:[1,77]}),e(Rt,[2,19]),e(Rt,[2,20]),{25:[1,78]},{27:[1,79]},e(Rt,[2,23]),{35:80,75:81,76:E,77:A,79:C,80:w},{35:86,75:81,76:E,77:A,79:C,80:w},{35:87,75:81,76:E,77:A,79:C,80:w},{35:88,75:81,76:E,77:A,79:C,80:w},{35:89,75:81,76:E,77:A,79:C,80:w},{35:90,75:81,76:E,77:A,79:C,80:w},{35:91,75:81,76:E,77:A,79:C,80:w},{35:92,75:81,76:E,77:A,79:C,80:w},{35:93,75:81,76:E,77:A,79:C,80:w},{35:94,75:81,76:E,77:A,79:C,80:w},{35:95,75:81,76:E,77:A,79:C,80:w},{35:96,75:81,76:E,77:A,79:C,80:w},{35:97,75:81,76:E,77:A,79:C,80:w},{35:98,75:81,76:E,77:A,79:C,80:w},{35:99,75:81,76:E,77:A,79:C,80:w},{35:100,75:81,76:E,77:A,79:C,80:w},{35:101,75:81,76:E,77:A,79:C,80:w},{35:102,75:81,76:E,77:A,79:C,80:w},{35:103,75:81,76:E,77:A,79:C,80:w},{35:104,75:81,76:E,77:A,79:C,80:w},e(T,[2,59]),{35:105,75:81,76:E,77:A,79:C,80:w},{35:106,75:81,76:E,77:A,79:C,80:w},{35:107,75:81,76:E,77:A,79:C,80:w},{35:108,75:81,76:E,77:A,79:C,80:w},{35:109,75:81,76:E,77:A,79:C,80:w},{35:110,75:81,76:E,77:A,79:C,80:w},{35:111,75:81,76:E,77:A,79:C,80:w},{35:112,75:81,76:E,77:A,79:C,80:w},{35:113,75:81,76:E,77:A,79:C,80:w},{35:114,75:81,76:E,77:A,79:C,80:w},{35:115,75:81,76:E,77:A,79:C,80:w},{20:116,29:49,30:61,32:62,34:a,36:r,37:i,38:u,39:d,40:p,41:b,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt},{12:[1,118],33:[1,117]},{35:119,75:81,76:E,77:A,79:C,80:w},{35:120,75:81,76:E,77:A,79:C,80:w},{35:121,75:81,76:E,77:A,79:C,80:w},{35:122,75:81,76:E,77:A,79:C,80:w},{35:123,75:81,76:E,77:A,79:C,80:w},{35:124,75:81,76:E,77:A,79:C,80:w},{35:125,75:81,76:E,77:A,79:C,80:w},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(wt,[2,15]),e(Wt,[2,17],{21:22,19:130,22:t,23:n,24:o,26:l,28:s}),e(wt,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:n,24:o,26:l,28:s,34:a,36:r,37:i,38:u,39:d,40:p,41:b,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt}),e(Rt,[2,21]),e(Rt,[2,22]),e(T,[2,39]),e(ce,[2,71],{75:81,35:132,76:E,77:A,79:C,80:w}),e(It,[2,73]),{78:[1,133]},e(It,[2,75]),e(It,[2,76]),e(T,[2,40]),e(T,[2,41]),e(T,[2,42]),e(T,[2,43]),e(T,[2,44]),e(T,[2,45]),e(T,[2,46]),e(T,[2,47]),e(T,[2,48]),e(T,[2,49]),e(T,[2,50]),e(T,[2,51]),e(T,[2,52]),e(T,[2,53]),e(T,[2,54]),e(T,[2,55]),e(T,[2,56]),e(T,[2,57]),e(T,[2,58]),e(T,[2,60]),e(T,[2,61]),e(T,[2,62]),e(T,[2,63]),e(T,[2,64]),e(T,[2,65]),e(T,[2,66]),e(T,[2,67]),e(T,[2,68]),e(T,[2,69]),e(T,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(vt,[2,28]),e(vt,[2,29]),e(vt,[2,30]),e(vt,[2,31]),e(vt,[2,32]),e(vt,[2,33]),e(vt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Wt,[2,18]),e(wt,[2,38]),e(ce,[2,72]),e(It,[2,74]),e(T,[2,24]),e(T,[2,35]),e(Qt,[2,25]),e(Qt,[2,26],{12:[1,138]}),e(Qt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:y(function(x,v){if(v.recoverable)this.trace(x);else{var k=new Error(x);throw k.hash=v,k}},"parseError"),parse:y(function(x){var v=this,k=[0],g=[],R=[null],h=[],St=this.table,f="",kt=0,he=0,ue=0,Le=2,de=1,Ne=h.slice.call(arguments,1),D=Object.create(this.lexer),Et={yy:{}};for(var qt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,qt)&&(Et.yy[qt]=this.yy[qt]);D.setInput(x,Et.yy),Et.yy.lexer=D,Et.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Gt=D.yylloc;h.push(Gt);var Ye=D.options&&D.options.ranges;typeof Et.yy.parseError=="function"?this.parseError=Et.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function je(L){k.length=k.length-2*L,R.length=R.length-L,h.length=h.length-L}y(je,"popStack");function fe(){var L;return L=g.pop()||D.lex()||de,typeof L!="number"&&(L instanceof Array&&(g=L,L=g.pop()),L=v.symbols_[L]||L),L}y(fe,"lex");for(var B,Kt,At,N,I0,Jt,Tt={},Lt,W,pe,Nt;;){if(At=k[k.length-1],this.defaultActions[At]?N=this.defaultActions[At]:((B===null||typeof B>"u")&&(B=fe()),N=St[At]&&St[At][B]),typeof N>"u"||!N.length||!N[0]){var Zt="";Nt=[];for(Lt in St[At])this.terminals_[Lt]&&Lt>Le&&Nt.push("'"+this.terminals_[Lt]+"'");D.showPosition?Zt="Parse error on line "+(kt+1)+`: `+D.showPosition()+` Expecting `+Nt.join(", ")+", got '"+(this.terminals_[B]||B)+"'":Zt="Parse error on line "+(kt+1)+": Unexpected "+(B==de?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(Zt,{text:D.match,token:this.terminals_[B]||B,line:D.yylineno,loc:Gt,expected:Nt})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+At+", token: "+B);switch(N[0]){case 1:k.push(B),R.push(D.yytext),h.push(D.yylloc),k.push(N[1]),B=null,Kt?(B=Kt,Kt=null):(he=D.yyleng,f=D.yytext,kt=D.yylineno,Gt=D.yylloc,ue>0&&ue--);break;case 2:if(W=this.productions_[N[1]][1],Tt.$=R[R.length-W],Tt._$={first_line:h[h.length-(W||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(W||1)].first_column,last_column:h[h.length-1].last_column},Ye&&(Tt._$.range=[h[h.length-(W||1)].range[0],h[h.length-1].range[1]]),Jt=this.performAction.apply(Tt,[f,he,kt,Et.yy,N[1],R,h].concat(Ne)),typeof Jt<"u")return Jt;W&&(k=k.slice(0,-1*W*2),R=R.slice(0,-1*W),h=h.slice(0,-1*W)),k.push(this.productions_[N[1]][0]),R.push(Tt.$),h.push(Tt._$),pe=St[k[k.length-2]][k[k.length-1]],k.push(pe);break;case 3:return!0}}return!0},"parse")},Me=(function(){var _t={EOF:1,parseError:y(function(v,k){if(this.yy.parser)this.yy.parser.parseError(v,k);else throw new Error(v)},"parseError"),setInput:y(function(x,v){return this.yy=v||this.yy||{},this._input=x,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:y(function(){var x=this._input[0];this.yytext+=x,this.yyleng++,this.offset++,this.match+=x,this.matched+=x;var v=x.match(/(?:\r\n?|\n).*/g);return v?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),x},"input"),unput:y(function(x){var v=x.length,k=x.split(/(?:\r\n?|\n)/g);this._input=x+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-v),this.offset-=v;var g=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),k.length-1&&(this.yylineno-=k.length-1);var R=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:k?(k.length===g.length?this.yylloc.first_column:0)+g[g.length-k.length].length-k[0].length:this.yylloc.first_column-v},this.options.ranges&&(this.yylloc.range=[R[0],R[0]+this.yyleng-v]),this.yyleng=this.yytext.length,this},"unput"),more:y(function(){return this._more=!0,this},"more"),reject:y(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:y(function(x){this.unput(this.match.slice(x))},"less"),pastInput:y(function(){var x=this.matched.substr(0,this.matched.length-this.match.length);return(x.length>20?"...":"")+x.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:y(function(){var x=this.match;return x.length<20&&(x+=this._input.substr(0,20-x.length)),(x.substr(0,20)+(x.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:y(function(){var x=this.pastInput(),v=new Array(x.length+1).join("-");return x+this.upcomingInput()+` @@ -8,4 +8,4 @@ Expecting `+Nt.join(", ")+", got '"+(this.terminals_[B]||B)+"'":Zt="Parse error fill: ${e.personBkg}; } `,"getStyles"),B0=P0,U0={parser:Ve,db:ae,renderer:Ce,styles:B0,init:y(({c4:e,wrap:t})=>{Ce.setConf(e),ae.setWrap(t)},"init")};export{U0 as diagram}; -//# sourceMappingURL=c4Diagram-AAUBKEIU-XUDUJAA2.min.js.map +//# sourceMappingURL=c4Diagram-AAUBKEIU-RCWASNEG.min.js.map diff --git a/templates/tabulareditor/public/c4Diagram-AAUBKEIU-XUDUJAA2.min.js.map b/templates/tabulareditor/public/c4Diagram-AAUBKEIU-RCWASNEG.min.js.map similarity index 100% rename from templates/tabulareditor/public/c4Diagram-AAUBKEIU-XUDUJAA2.min.js.map rename to templates/tabulareditor/public/c4Diagram-AAUBKEIU-RCWASNEG.min.js.map diff --git a/templates/tabulareditor/public/chunk-FE5ZIIEJ.min.js b/templates/tabulareditor/public/chunk-35PJYFUZ.min.js similarity index 94% rename from templates/tabulareditor/public/chunk-FE5ZIIEJ.min.js rename to templates/tabulareditor/public/chunk-35PJYFUZ.min.js index 9b8c72a03..3f2208136 100644 --- a/templates/tabulareditor/public/chunk-FE5ZIIEJ.min.js +++ b/templates/tabulareditor/public/chunk-35PJYFUZ.min.js @@ -1,2 +1,2 @@ -import{_ as c}from"./chunk-7PRAVCJT.min.js";import{b as l}from"./chunk-BJGJ3C53.min.js";var m=l(t=>{let{handDrawnSeed:e}=c();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),h=l(t=>{let e=p([...t.cssCompiledStyles||[],...t.cssStyles||[],...t.labelStyle||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),p=l(t=>{let e=new Map;return t.forEach(o=>{let[a,r]=o.split(":");e.set(a.trim(),r?.trim())}),e},"styles2Map"),d=l(t=>t==="color"||t==="font-size"||t==="font-family"||t==="font-weight"||t==="font-style"||t==="text-decoration"||t==="text-align"||t==="text-transform"||t==="line-height"||t==="letter-spacing"||t==="word-spacing"||t==="text-shadow"||t==="text-overflow"||t==="white-space"||t==="word-wrap"||t==="word-break"||t==="overflow-wrap"||t==="hyphens","isLabelStyle"),S=l(t=>{let{stylesArray:e}=h(t),o=[],a=[],r=[],n=[];return e.forEach(s=>{let i=s[0];d(i)?o.push(s.join(":")+" !important"):(a.push(s.join(":")+" !important"),i.includes("stroke")&&r.push(s.join(":")+" !important"),i==="fill"&&n.push(s.join(":")+" !important"))}),{labelStyles:o.join(";"),nodeStyles:a.join(";"),stylesArray:e,borderStyles:r,backgroundStyles:n}},"styles2String"),w=l((t,e)=>{let{themeVariables:o,handDrawnSeed:a}=c(),{nodeBorder:r,mainBkg:n}=o,{stylesMap:s}=h(t);return Object.assign({roughness:.7,fill:s.get("fill")||n,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:s.get("stroke")||r,seed:a,strokeWidth:s.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:f(s.get("stroke-dasharray"))},e)},"userNodeOverrides"),f=l(t=>{if(!t)return[0,0];let e=t.trim().split(/\s+/).map(Number);if(e.length===1){let r=isNaN(e[0])?0:e[0];return[r,r]}let o=isNaN(e[0])?0:e[0],a=isNaN(e[1])?0:e[1];return[o,a]},"getStrokeDashArray");export{m as a,h as b,d as c,S as d,w as e}; -//# sourceMappingURL=chunk-FE5ZIIEJ.min.js.map +import{_ as c}from"./chunk-OYCWXTBX.min.js";import{b as l}from"./chunk-BJGJ3C53.min.js";var m=l(t=>{let{handDrawnSeed:e}=c();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),h=l(t=>{let e=p([...t.cssCompiledStyles||[],...t.cssStyles||[],...t.labelStyle||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),p=l(t=>{let e=new Map;return t.forEach(o=>{let[a,r]=o.split(":");e.set(a.trim(),r?.trim())}),e},"styles2Map"),d=l(t=>t==="color"||t==="font-size"||t==="font-family"||t==="font-weight"||t==="font-style"||t==="text-decoration"||t==="text-align"||t==="text-transform"||t==="line-height"||t==="letter-spacing"||t==="word-spacing"||t==="text-shadow"||t==="text-overflow"||t==="white-space"||t==="word-wrap"||t==="word-break"||t==="overflow-wrap"||t==="hyphens","isLabelStyle"),S=l(t=>{let{stylesArray:e}=h(t),o=[],a=[],r=[],n=[];return e.forEach(s=>{let i=s[0];d(i)?o.push(s.join(":")+" !important"):(a.push(s.join(":")+" !important"),i.includes("stroke")&&r.push(s.join(":")+" !important"),i==="fill"&&n.push(s.join(":")+" !important"))}),{labelStyles:o.join(";"),nodeStyles:a.join(";"),stylesArray:e,borderStyles:r,backgroundStyles:n}},"styles2String"),w=l((t,e)=>{let{themeVariables:o,handDrawnSeed:a}=c(),{nodeBorder:r,mainBkg:n}=o,{stylesMap:s}=h(t);return Object.assign({roughness:.7,fill:s.get("fill")||n,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:s.get("stroke")||r,seed:a,strokeWidth:s.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:f(s.get("stroke-dasharray"))},e)},"userNodeOverrides"),f=l(t=>{if(!t)return[0,0];let e=t.trim().split(/\s+/).map(Number);if(e.length===1){let r=isNaN(e[0])?0:e[0];return[r,r]}let o=isNaN(e[0])?0:e[0],a=isNaN(e[1])?0:e[1];return[o,a]},"getStrokeDashArray");export{m as a,h as b,d as c,S as d,w as e}; +//# sourceMappingURL=chunk-35PJYFUZ.min.js.map diff --git a/templates/tabulareditor/public/chunk-FE5ZIIEJ.min.js.map b/templates/tabulareditor/public/chunk-35PJYFUZ.min.js.map similarity index 100% rename from templates/tabulareditor/public/chunk-FE5ZIIEJ.min.js.map rename to templates/tabulareditor/public/chunk-35PJYFUZ.min.js.map diff --git a/templates/tabulareditor/public/chunk-7PRAVCJT.min.js.map b/templates/tabulareditor/public/chunk-7PRAVCJT.min.js.map deleted file mode 100644 index f36931f69..000000000 --- a/templates/tabulareditor/public/chunk-7PRAVCJT.min.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../../node_modules/khroma/dist/utils/channel.js", "../../node_modules/khroma/dist/utils/lang.js", "../../node_modules/khroma/dist/utils/unit.js", "../../node_modules/khroma/dist/utils/index.js", "../../node_modules/khroma/dist/constants.js", "../../node_modules/khroma/dist/channels/type.js", "../../node_modules/khroma/dist/channels/index.js", "../../node_modules/khroma/dist/channels/reusable.js", "../../node_modules/khroma/dist/color/hex.js", "../../node_modules/khroma/dist/color/hsl.js", "../../node_modules/khroma/dist/color/keyword.js", "../../node_modules/khroma/dist/color/rgb.js", "../../node_modules/khroma/dist/color/index.js", "../../node_modules/khroma/dist/methods/change.js", "../../node_modules/khroma/dist/methods/rgba.js", "../../node_modules/khroma/dist/methods/channel.js", "../../node_modules/khroma/dist/methods/luminance.js", "../../node_modules/khroma/dist/methods/is_light.js", "../../node_modules/khroma/dist/methods/is_dark.js", "../../node_modules/khroma/dist/methods/adjust_channel.js", "../../node_modules/khroma/dist/methods/lighten.js", "../../node_modules/khroma/dist/methods/darken.js", "../../node_modules/khroma/dist/methods/transparentize.js", "../../node_modules/khroma/dist/methods/adjust.js", "../../node_modules/khroma/dist/methods/mix.js", "../../node_modules/khroma/dist/methods/invert.js", "../../node_modules/dompurify/src/utils.ts", "../../node_modules/dompurify/src/tags.ts", "../../node_modules/dompurify/src/attrs.ts", "../../node_modules/dompurify/src/regexp.ts", "../../node_modules/dompurify/src/purify.ts", "../../node_modules/mermaid/dist/chunks/mermaid.core/chunk-CSCIHK7Q.mjs"], - "sourcesContent": ["/* IMPORT */\n/* MAIN */\nconst Channel = {\n /* CLAMP */\n min: {\n r: 0,\n g: 0,\n b: 0,\n s: 0,\n l: 0,\n a: 0\n },\n max: {\n r: 255,\n g: 255,\n b: 255,\n h: 360,\n s: 100,\n l: 100,\n a: 1\n },\n clamp: {\n r: (r) => r >= 255 ? 255 : (r < 0 ? 0 : r),\n g: (g) => g >= 255 ? 255 : (g < 0 ? 0 : g),\n b: (b) => b >= 255 ? 255 : (b < 0 ? 0 : b),\n h: (h) => h % 360,\n s: (s) => s >= 100 ? 100 : (s < 0 ? 0 : s),\n l: (l) => l >= 100 ? 100 : (l < 0 ? 0 : l),\n a: (a) => a >= 1 ? 1 : (a < 0 ? 0 : a)\n },\n /* CONVERSION */\n //SOURCE: https://planetcalc.com/7779\n toLinear: (c) => {\n const n = c / 255;\n return c > .03928 ? Math.pow(((n + .055) / 1.055), 2.4) : n / 12.92;\n },\n //SOURCE: https://gist.github.com/mjackson/5311256\n hue2rgb: (p, q, t) => {\n if (t < 0)\n t += 1;\n if (t > 1)\n t -= 1;\n if (t < 1 / 6)\n return p + (q - p) * 6 * t;\n if (t < 1 / 2)\n return q;\n if (t < 2 / 3)\n return p + (q - p) * (2 / 3 - t) * 6;\n return p;\n },\n hsl2rgb: ({ h, s, l }, channel) => {\n if (!s)\n return l * 2.55; // Achromatic\n h /= 360;\n s /= 100;\n l /= 100;\n const q = (l < .5) ? l * (1 + s) : (l + s) - (l * s);\n const p = 2 * l - q;\n switch (channel) {\n case 'r': return Channel.hue2rgb(p, q, h + 1 / 3) * 255;\n case 'g': return Channel.hue2rgb(p, q, h) * 255;\n case 'b': return Channel.hue2rgb(p, q, h - 1 / 3) * 255;\n }\n },\n rgb2hsl: ({ r, g, b }, channel) => {\n r /= 255;\n g /= 255;\n b /= 255;\n const max = Math.max(r, g, b);\n const min = Math.min(r, g, b);\n const l = (max + min) / 2;\n if (channel === 'l')\n return l * 100;\n if (max === min)\n return 0; // Achromatic\n const d = max - min;\n const s = (l > .5) ? d / (2 - max - min) : d / (max + min);\n if (channel === 's')\n return s * 100;\n switch (max) {\n case r: return ((g - b) / d + (g < b ? 6 : 0)) * 60;\n case g: return ((b - r) / d + 2) * 60;\n case b: return ((r - g) / d + 4) * 60;\n default: return -1; //TSC: TypeScript is stupid and complains if there isn't this useless default statement\n }\n }\n};\n/* EXPORT */\nexport default Channel;\n", "/* MAIN */\nconst Lang = {\n /* API */\n clamp: (number, lower, upper) => {\n if (lower > upper)\n return Math.min(lower, Math.max(upper, number));\n return Math.min(upper, Math.max(lower, number));\n },\n round: (number) => {\n return Math.round(number * 10000000000) / 10000000000;\n }\n};\n/* EXPORT */\nexport default Lang;\n", "/* MAIN */\nconst Unit = {\n /* API */\n dec2hex: (dec) => {\n const hex = Math.round(dec).toString(16);\n return hex.length > 1 ? hex : `0${hex}`;\n }\n};\n/* EXPORT */\nexport default Unit;\n", "/* IMPORT */\nimport channel from './channel.js';\nimport lang from './lang.js';\nimport unit from './unit.js';\n/* MAIN */\nconst Utils = {\n channel,\n lang,\n unit\n};\n/* EXPORT */\nexport default Utils;\n", "/* IMPORT */\nimport _ from './utils/index.js';\n/* MAIN */\nconst DEC2HEX = {};\nfor (let i = 0; i <= 255; i++)\n DEC2HEX[i] = _.unit.dec2hex(i); // Populating dynamically, striking a balance between code size and performance\nconst TYPE = {\n ALL: 0,\n RGB: 1,\n HSL: 2\n};\n/* EXPORT */\nexport { DEC2HEX, TYPE };\n", "/* IMPORT */\nimport { TYPE } from '../constants.js';\n/* MAIN */\nclass Type {\n constructor() {\n /* VARIABLES */\n this.type = TYPE.ALL;\n }\n /* API */\n get() {\n return this.type;\n }\n set(type) {\n if (this.type && this.type !== type)\n throw new Error('Cannot change both RGB and HSL channels at the same time');\n this.type = type;\n }\n reset() {\n this.type = TYPE.ALL;\n }\n is(type) {\n return this.type === type;\n }\n}\n/* EXPORT */\nexport default Type;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport Type from './type.js';\nimport { TYPE } from '../constants.js';\n/* MAIN */\nclass Channels {\n /* CONSTRUCTOR */\n constructor(data, color) {\n this.color = color;\n this.changed = false;\n this.data = data; //TSC\n this.type = new Type();\n }\n /* API */\n set(data, color) {\n this.color = color;\n this.changed = false;\n this.data = data; //TSC\n this.type.type = TYPE.ALL;\n return this;\n }\n /* HELPERS */\n _ensureHSL() {\n const data = this.data;\n const { h, s, l } = data;\n if (h === undefined)\n data.h = _.channel.rgb2hsl(data, 'h');\n if (s === undefined)\n data.s = _.channel.rgb2hsl(data, 's');\n if (l === undefined)\n data.l = _.channel.rgb2hsl(data, 'l');\n }\n _ensureRGB() {\n const data = this.data;\n const { r, g, b } = data;\n if (r === undefined)\n data.r = _.channel.hsl2rgb(data, 'r');\n if (g === undefined)\n data.g = _.channel.hsl2rgb(data, 'g');\n if (b === undefined)\n data.b = _.channel.hsl2rgb(data, 'b');\n }\n /* GETTERS */\n get r() {\n const data = this.data;\n const r = data.r;\n if (!this.type.is(TYPE.HSL) && r !== undefined)\n return r;\n this._ensureHSL();\n return _.channel.hsl2rgb(data, 'r');\n }\n get g() {\n const data = this.data;\n const g = data.g;\n if (!this.type.is(TYPE.HSL) && g !== undefined)\n return g;\n this._ensureHSL();\n return _.channel.hsl2rgb(data, 'g');\n }\n get b() {\n const data = this.data;\n const b = data.b;\n if (!this.type.is(TYPE.HSL) && b !== undefined)\n return b;\n this._ensureHSL();\n return _.channel.hsl2rgb(data, 'b');\n }\n get h() {\n const data = this.data;\n const h = data.h;\n if (!this.type.is(TYPE.RGB) && h !== undefined)\n return h;\n this._ensureRGB();\n return _.channel.rgb2hsl(data, 'h');\n }\n get s() {\n const data = this.data;\n const s = data.s;\n if (!this.type.is(TYPE.RGB) && s !== undefined)\n return s;\n this._ensureRGB();\n return _.channel.rgb2hsl(data, 's');\n }\n get l() {\n const data = this.data;\n const l = data.l;\n if (!this.type.is(TYPE.RGB) && l !== undefined)\n return l;\n this._ensureRGB();\n return _.channel.rgb2hsl(data, 'l');\n }\n get a() {\n return this.data.a;\n }\n /* SETTERS */\n set r(r) {\n this.type.set(TYPE.RGB);\n this.changed = true;\n this.data.r = r;\n }\n set g(g) {\n this.type.set(TYPE.RGB);\n this.changed = true;\n this.data.g = g;\n }\n set b(b) {\n this.type.set(TYPE.RGB);\n this.changed = true;\n this.data.b = b;\n }\n set h(h) {\n this.type.set(TYPE.HSL);\n this.changed = true;\n this.data.h = h;\n }\n set s(s) {\n this.type.set(TYPE.HSL);\n this.changed = true;\n this.data.s = s;\n }\n set l(l) {\n this.type.set(TYPE.HSL);\n this.changed = true;\n this.data.l = l;\n }\n set a(a) {\n this.changed = true;\n this.data.a = a;\n }\n}\n/* EXPORT */\nexport default Channels;\n", "/* IMPORT */\nimport Channels from './/index.js';\n/* MAIN */\nconst channels = new Channels({ r: 0, g: 0, b: 0, a: 0 }, 'transparent');\n/* EXPORT */\nexport default channels;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport ChannelsReusable from '../channels/reusable.js';\nimport { DEC2HEX } from '../constants.js';\n/* MAIN */\nconst Hex = {\n /* VARIABLES */\n re: /^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,\n /* API */\n parse: (color) => {\n if (color.charCodeAt(0) !== 35)\n return; // '#'\n const match = color.match(Hex.re);\n if (!match)\n return;\n const hex = match[1];\n const dec = parseInt(hex, 16);\n const length = hex.length;\n const hasAlpha = length % 4 === 0;\n const isFullLength = length > 4;\n const multiplier = isFullLength ? 1 : 17;\n const bits = isFullLength ? 8 : 4;\n const bitsOffset = hasAlpha ? 0 : -1;\n const mask = isFullLength ? 255 : 15;\n return ChannelsReusable.set({\n r: ((dec >> (bits * (bitsOffset + 3))) & mask) * multiplier,\n g: ((dec >> (bits * (bitsOffset + 2))) & mask) * multiplier,\n b: ((dec >> (bits * (bitsOffset + 1))) & mask) * multiplier,\n a: hasAlpha ? (dec & mask) * multiplier / 255 : 1\n }, color);\n },\n stringify: (channels) => {\n const { r, g, b, a } = channels;\n if (a < 1) { // #RRGGBBAA\n return `#${DEC2HEX[Math.round(r)]}${DEC2HEX[Math.round(g)]}${DEC2HEX[Math.round(b)]}${DEC2HEX[Math.round(a * 255)]}`;\n }\n else { // #RRGGBB\n return `#${DEC2HEX[Math.round(r)]}${DEC2HEX[Math.round(g)]}${DEC2HEX[Math.round(b)]}`;\n }\n }\n};\n/* EXPORT */\nexport default Hex;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport ChannelsReusable from '../channels/reusable.js';\n/* MAIN */\nconst HSL = {\n /* VARIABLES */\n 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,\n hueRe: /^(.+?)(deg|grad|rad|turn)$/i,\n /* HELPERS */\n _hue2deg: (hue) => {\n const match = hue.match(HSL.hueRe);\n if (match) {\n const [, number, unit] = match;\n switch (unit) {\n case 'grad': return _.channel.clamp.h(parseFloat(number) * .9);\n case 'rad': return _.channel.clamp.h(parseFloat(number) * 180 / Math.PI);\n case 'turn': return _.channel.clamp.h(parseFloat(number) * 360);\n }\n }\n return _.channel.clamp.h(parseFloat(hue));\n },\n /* API */\n parse: (color) => {\n const charCode = color.charCodeAt(0);\n if (charCode !== 104 && charCode !== 72)\n return; // 'h'/'H'\n const match = color.match(HSL.re);\n if (!match)\n return;\n const [, h, s, l, a, isAlphaPercentage] = match;\n return ChannelsReusable.set({\n h: HSL._hue2deg(h),\n s: _.channel.clamp.s(parseFloat(s)),\n l: _.channel.clamp.l(parseFloat(l)),\n a: a ? _.channel.clamp.a(isAlphaPercentage ? parseFloat(a) / 100 : parseFloat(a)) : 1\n }, color);\n },\n stringify: (channels) => {\n const { h, s, l, a } = channels;\n if (a < 1) { // HSLA\n return `hsla(${_.lang.round(h)}, ${_.lang.round(s)}%, ${_.lang.round(l)}%, ${a})`;\n }\n else { // HSL\n return `hsl(${_.lang.round(h)}, ${_.lang.round(s)}%, ${_.lang.round(l)}%)`;\n }\n }\n};\n/* EXPORT */\nexport default HSL;\n", "/* IMPORT */\nimport Hex from './hex.js';\n/* MAIN */\nconst Keyword = {\n /* VARIABLES */\n colors: {\n aliceblue: '#f0f8ff',\n antiquewhite: '#faebd7',\n aqua: '#00ffff',\n aquamarine: '#7fffd4',\n azure: '#f0ffff',\n beige: '#f5f5dc',\n bisque: '#ffe4c4',\n black: '#000000',\n blanchedalmond: '#ffebcd',\n blue: '#0000ff',\n blueviolet: '#8a2be2',\n brown: '#a52a2a',\n burlywood: '#deb887',\n cadetblue: '#5f9ea0',\n chartreuse: '#7fff00',\n chocolate: '#d2691e',\n coral: '#ff7f50',\n cornflowerblue: '#6495ed',\n cornsilk: '#fff8dc',\n crimson: '#dc143c',\n cyanaqua: '#00ffff',\n darkblue: '#00008b',\n darkcyan: '#008b8b',\n darkgoldenrod: '#b8860b',\n darkgray: '#a9a9a9',\n darkgreen: '#006400',\n darkgrey: '#a9a9a9',\n darkkhaki: '#bdb76b',\n darkmagenta: '#8b008b',\n darkolivegreen: '#556b2f',\n darkorange: '#ff8c00',\n darkorchid: '#9932cc',\n darkred: '#8b0000',\n darksalmon: '#e9967a',\n darkseagreen: '#8fbc8f',\n darkslateblue: '#483d8b',\n darkslategray: '#2f4f4f',\n darkslategrey: '#2f4f4f',\n darkturquoise: '#00ced1',\n darkviolet: '#9400d3',\n deeppink: '#ff1493',\n deepskyblue: '#00bfff',\n dimgray: '#696969',\n dimgrey: '#696969',\n dodgerblue: '#1e90ff',\n firebrick: '#b22222',\n floralwhite: '#fffaf0',\n forestgreen: '#228b22',\n fuchsia: '#ff00ff',\n gainsboro: '#dcdcdc',\n ghostwhite: '#f8f8ff',\n gold: '#ffd700',\n goldenrod: '#daa520',\n gray: '#808080',\n green: '#008000',\n greenyellow: '#adff2f',\n grey: '#808080',\n honeydew: '#f0fff0',\n hotpink: '#ff69b4',\n indianred: '#cd5c5c',\n indigo: '#4b0082',\n ivory: '#fffff0',\n khaki: '#f0e68c',\n lavender: '#e6e6fa',\n lavenderblush: '#fff0f5',\n lawngreen: '#7cfc00',\n lemonchiffon: '#fffacd',\n lightblue: '#add8e6',\n lightcoral: '#f08080',\n lightcyan: '#e0ffff',\n lightgoldenrodyellow: '#fafad2',\n lightgray: '#d3d3d3',\n lightgreen: '#90ee90',\n lightgrey: '#d3d3d3',\n lightpink: '#ffb6c1',\n lightsalmon: '#ffa07a',\n lightseagreen: '#20b2aa',\n lightskyblue: '#87cefa',\n lightslategray: '#778899',\n lightslategrey: '#778899',\n lightsteelblue: '#b0c4de',\n lightyellow: '#ffffe0',\n lime: '#00ff00',\n limegreen: '#32cd32',\n linen: '#faf0e6',\n magenta: '#ff00ff',\n maroon: '#800000',\n mediumaquamarine: '#66cdaa',\n mediumblue: '#0000cd',\n mediumorchid: '#ba55d3',\n mediumpurple: '#9370db',\n mediumseagreen: '#3cb371',\n mediumslateblue: '#7b68ee',\n mediumspringgreen: '#00fa9a',\n mediumturquoise: '#48d1cc',\n mediumvioletred: '#c71585',\n midnightblue: '#191970',\n mintcream: '#f5fffa',\n mistyrose: '#ffe4e1',\n moccasin: '#ffe4b5',\n navajowhite: '#ffdead',\n navy: '#000080',\n oldlace: '#fdf5e6',\n olive: '#808000',\n olivedrab: '#6b8e23',\n orange: '#ffa500',\n orangered: '#ff4500',\n orchid: '#da70d6',\n palegoldenrod: '#eee8aa',\n palegreen: '#98fb98',\n paleturquoise: '#afeeee',\n palevioletred: '#db7093',\n papayawhip: '#ffefd5',\n peachpuff: '#ffdab9',\n peru: '#cd853f',\n pink: '#ffc0cb',\n plum: '#dda0dd',\n powderblue: '#b0e0e6',\n purple: '#800080',\n rebeccapurple: '#663399',\n red: '#ff0000',\n rosybrown: '#bc8f8f',\n royalblue: '#4169e1',\n saddlebrown: '#8b4513',\n salmon: '#fa8072',\n sandybrown: '#f4a460',\n seagreen: '#2e8b57',\n seashell: '#fff5ee',\n sienna: '#a0522d',\n silver: '#c0c0c0',\n skyblue: '#87ceeb',\n slateblue: '#6a5acd',\n slategray: '#708090',\n slategrey: '#708090',\n snow: '#fffafa',\n springgreen: '#00ff7f',\n tan: '#d2b48c',\n teal: '#008080',\n thistle: '#d8bfd8',\n transparent: '#00000000',\n turquoise: '#40e0d0',\n violet: '#ee82ee',\n wheat: '#f5deb3',\n white: '#ffffff',\n whitesmoke: '#f5f5f5',\n yellow: '#ffff00',\n yellowgreen: '#9acd32'\n },\n /* API */\n parse: (color) => {\n color = color.toLowerCase();\n const hex = Keyword.colors[color];\n if (!hex)\n return;\n return Hex.parse(hex);\n },\n stringify: (channels) => {\n const hex = Hex.stringify(channels);\n for (const name in Keyword.colors) {\n if (Keyword.colors[name] === hex)\n return name;\n }\n return;\n }\n};\n/* EXPORT */\nexport default Keyword;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport ChannelsReusable from '../channels/reusable.js';\n/* MAIN */\nconst RGB = {\n /* VARIABLES */\n 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,\n /* API */\n parse: (color) => {\n const charCode = color.charCodeAt(0);\n if (charCode !== 114 && charCode !== 82)\n return; // 'r'/'R'\n const match = color.match(RGB.re);\n if (!match)\n return;\n const [, r, isRedPercentage, g, isGreenPercentage, b, isBluePercentage, a, isAlphaPercentage] = match;\n return ChannelsReusable.set({\n r: _.channel.clamp.r(isRedPercentage ? parseFloat(r) * 2.55 : parseFloat(r)),\n g: _.channel.clamp.g(isGreenPercentage ? parseFloat(g) * 2.55 : parseFloat(g)),\n b: _.channel.clamp.b(isBluePercentage ? parseFloat(b) * 2.55 : parseFloat(b)),\n a: a ? _.channel.clamp.a(isAlphaPercentage ? parseFloat(a) / 100 : parseFloat(a)) : 1\n }, color);\n },\n stringify: (channels) => {\n const { r, g, b, a } = channels;\n if (a < 1) { // RGBA\n return `rgba(${_.lang.round(r)}, ${_.lang.round(g)}, ${_.lang.round(b)}, ${_.lang.round(a)})`;\n }\n else { // RGB\n return `rgb(${_.lang.round(r)}, ${_.lang.round(g)}, ${_.lang.round(b)})`;\n }\n }\n};\n/* EXPORT */\nexport default RGB;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport Hex from './hex.js';\nimport HSL from './hsl.js';\nimport Keyword from './keyword.js';\nimport RGB from './rgb.js';\nimport { TYPE } from '../constants.js';\n/* MAIN */\nconst Color = {\n /* VARIABLES */\n format: {\n keyword: Keyword,\n hex: Hex,\n rgb: RGB,\n rgba: RGB,\n hsl: HSL,\n hsla: HSL\n },\n /* API */\n parse: (color) => {\n if (typeof color !== 'string')\n return color;\n const channels = Hex.parse(color) || RGB.parse(color) || HSL.parse(color) || Keyword.parse(color); // Color providers ordered with performance in mind\n if (channels)\n return channels;\n throw new Error(`Unsupported color format: \"${color}\"`);\n },\n stringify: (channels) => {\n // SASS returns a keyword if possible, but we avoid doing that as it's slower and doesn't really add any value\n if (!channels.changed && channels.color)\n return channels.color;\n if (channels.type.is(TYPE.HSL) || channels.data.r === undefined) {\n return HSL.stringify(channels);\n }\n else if (channels.a < 1 || !Number.isInteger(channels.r) || !Number.isInteger(channels.g) || !Number.isInteger(channels.b)) {\n return RGB.stringify(channels);\n }\n else {\n return Hex.stringify(channels);\n }\n }\n};\n/* EXPORT */\nexport default Color;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport Color from '../color/index.js';\n/* MAIN */\nconst change = (color, channels) => {\n const ch = Color.parse(color);\n for (const c in channels) {\n ch[c] = _.channel.clamp[c](channels[c]);\n }\n return Color.stringify(ch);\n};\n/* EXPORT */\nexport default change;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport ChannelsReusable from '../channels/reusable.js';\nimport Color from '../color/index.js';\nimport change from './change.js';\n/* MAIN */\nconst rgba = (r, g, b = 0, a = 1) => {\n if (typeof r !== 'number')\n return change(r, { a: g });\n const channels = ChannelsReusable.set({\n r: _.channel.clamp.r(r),\n g: _.channel.clamp.g(g),\n b: _.channel.clamp.b(b),\n a: _.channel.clamp.a(a)\n });\n return Color.stringify(channels);\n};\n/* EXPORT */\nexport default rgba;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport Color from '../color/index.js';\n/* MAIN */\nconst channel = (color, channel) => {\n return _.lang.round(Color.parse(color)[channel]);\n};\n/* EXPORT */\nexport default channel;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport Color from '../color/index.js';\n/* MAIN */\n//SOURCE: https://planetcalc.com/7779\nconst luminance = (color) => {\n const { r, g, b } = Color.parse(color);\n const luminance = .2126 * _.channel.toLinear(r) + .7152 * _.channel.toLinear(g) + .0722 * _.channel.toLinear(b);\n return _.lang.round(luminance);\n};\n/* EXPORT */\nexport default luminance;\n", "/* IMPORT */\nimport luminance from './luminance.js';\n/* MAIN */\nconst isLight = (color) => {\n return luminance(color) >= .5;\n};\n/* EXPORT */\nexport default isLight;\n", "/* IMPORT */\nimport isLight from './is_light.js';\n/* MAIN */\nconst isDark = (color) => {\n return !isLight(color);\n};\n/* EXPORT */\nexport default isDark;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport Color from '../color/index.js';\n/* MAIN */\nconst adjustChannel = (color, channel, amount) => {\n const channels = Color.parse(color);\n const amountCurrent = channels[channel];\n const amountNext = _.channel.clamp[channel](amountCurrent + amount);\n if (amountCurrent !== amountNext)\n channels[channel] = amountNext;\n return Color.stringify(channels);\n};\n/* EXPORT */\nexport default adjustChannel;\n", "/* IMPORT */\nimport adjustChannel from './adjust_channel.js';\n/* MAIN */\nconst lighten = (color, amount) => {\n return adjustChannel(color, 'l', amount);\n};\n/* EXPORT */\nexport default lighten;\n", "/* IMPORT */\nimport adjustChannel from './adjust_channel.js';\n/* MAIN */\nconst darken = (color, amount) => {\n return adjustChannel(color, 'l', -amount);\n};\n/* EXPORT */\nexport default darken;\n", "/* IMPORT */\nimport adjustChannel from './adjust_channel.js';\n/* MAIN */\nconst transparentize = (color, amount) => {\n return adjustChannel(color, 'a', -amount);\n};\n/* EXPORT */\nexport default transparentize;\n", "/* IMPORT */\nimport Color from '../color/index.js';\nimport change from './change.js';\n/* MAIN */\nconst adjust = (color, channels) => {\n const ch = Color.parse(color);\n const changes = {};\n for (const c in channels) {\n if (!channels[c])\n continue;\n changes[c] = ch[c] + channels[c];\n }\n return change(color, changes);\n};\n/* EXPORT */\nexport default adjust;\n", "/* IMPORT */\nimport Color from '../color/index.js';\nimport rgba from './rgba.js';\n/* MAIN */\n//SOURCE: https://github.com/sass/dart-sass/blob/7457d2e9e7e623d9844ffd037a070cf32d39c348/lib/src/functions/color.dart#L718-L756\nconst mix = (color1, color2, weight = 50) => {\n const { r: r1, g: g1, b: b1, a: a1 } = Color.parse(color1);\n const { r: r2, g: g2, b: b2, a: a2 } = Color.parse(color2);\n const weightScale = weight / 100;\n const weightNormalized = (weightScale * 2) - 1;\n const alphaDelta = a1 - a2;\n const weight1combined = ((weightNormalized * alphaDelta) === -1) ? weightNormalized : (weightNormalized + alphaDelta) / (1 + weightNormalized * alphaDelta);\n const weight1 = (weight1combined + 1) / 2;\n const weight2 = 1 - weight1;\n const r = (r1 * weight1) + (r2 * weight2);\n const g = (g1 * weight1) + (g2 * weight2);\n const b = (b1 * weight1) + (b2 * weight2);\n const a = (a1 * weightScale) + (a2 * (1 - weightScale));\n return rgba(r, g, b, a);\n};\n/* EXPORT */\nexport default mix;\n", "/* IMPORT */\nimport Color from '../color/index.js';\nimport mix from './mix.js';\n/* MAIN */\nconst invert = (color, weight = 100) => {\n const inverse = Color.parse(color);\n inverse.r = 255 - inverse.r;\n inverse.g = 255 - inverse.g;\n inverse.b = 255 - inverse.b;\n return mix(inverse, color, weight);\n};\n/* EXPORT */\nexport default invert;\n", "const {\n entries,\n setPrototypeOf,\n isFrozen,\n getPrototypeOf,\n getOwnPropertyDescriptor,\n} = Object;\n\nlet { freeze, seal, create } = Object; // eslint-disable-line import/no-mutable-exports\nlet { apply, construct } = typeof Reflect !== 'undefined' && Reflect;\n\nif (!freeze) {\n freeze = function (x: T): T {\n return x;\n };\n}\n\nif (!seal) {\n seal = function (x: T): T {\n return x;\n };\n}\n\nif (!apply) {\n apply = function (\n func: (thisArg: any, ...args: any[]) => T,\n thisArg: any,\n ...args: any[]\n ): T {\n return func.apply(thisArg, args);\n };\n}\n\nif (!construct) {\n construct = function (Func: new (...args: any[]) => T, ...args: any[]): T {\n return new Func(...args);\n };\n}\n\nconst arrayForEach = unapply(Array.prototype.forEach);\nconst arrayIndexOf = unapply(Array.prototype.indexOf);\nconst arrayLastIndexOf = unapply(Array.prototype.lastIndexOf);\nconst arrayPop = unapply(Array.prototype.pop);\nconst arrayPush = unapply(Array.prototype.push);\nconst arraySlice = unapply(Array.prototype.slice);\nconst arraySplice = unapply(Array.prototype.splice);\nconst arrayIsArray = Array.isArray;\n\nconst stringToLowerCase = unapply(String.prototype.toLowerCase);\nconst stringToString = unapply(String.prototype.toString);\nconst stringMatch = unapply(String.prototype.match);\nconst stringReplace = unapply(String.prototype.replace);\nconst stringIndexOf = unapply(String.prototype.indexOf);\nconst stringTrim = unapply(String.prototype.trim);\n\nconst numberToString = unapply(Number.prototype.toString);\nconst booleanToString = unapply(Boolean.prototype.toString);\nconst bigintToString =\n typeof BigInt === 'undefined' ? null : unapply(BigInt.prototype.toString);\nconst symbolToString =\n typeof Symbol === 'undefined' ? null : unapply(Symbol.prototype.toString);\n\nconst objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);\nconst objectToString = unapply(Object.prototype.toString);\n\nconst regExpTest = unapply(RegExp.prototype.test);\n\nconst typeErrorCreate = unconstruct(TypeError);\n\n/**\n * Creates a new function that calls the given function with a specified thisArg and arguments.\n *\n * @param func - The function to be wrapped and called.\n * @returns A new function that calls the given function with a specified thisArg and arguments.\n */\nfunction unapply(\n func: (thisArg: any, ...args: any[]) => T\n): (thisArg: any, ...args: any[]) => T {\n return (thisArg: any, ...args: any[]): T => {\n if (thisArg instanceof RegExp) {\n thisArg.lastIndex = 0;\n }\n\n return apply(func, thisArg, args);\n };\n}\n\n/**\n * Creates a new function that constructs an instance of the given constructor function with the provided arguments.\n *\n * @param func - The constructor function to be wrapped and called.\n * @returns A new function that constructs an instance of the given constructor function with the provided arguments.\n */\nfunction unconstruct(\n Func: new (...args: any[]) => T\n): (...args: any[]) => T {\n return (...args: any[]): T => construct(Func, args);\n}\n\n/**\n * Add properties to a lookup table\n *\n * @param set - The set to which elements will be added.\n * @param array - The array containing elements to be added to the set.\n * @param transformCaseFunc - An optional function to transform the case of each element before adding to the set.\n * @returns The modified set with added elements.\n */\nfunction addToSet(\n set: Record,\n array: readonly unknown[],\n transformCaseFunc: ReturnType> = stringToLowerCase\n): Record {\n if (setPrototypeOf) {\n // Make 'in' and truthy checks like Boolean(set.constructor)\n // independent of any properties defined on Object.prototype.\n // Prevent prototype setters from intercepting set as a this value.\n setPrototypeOf(set, null);\n }\n\n if (!arrayIsArray(array)) {\n return set;\n }\n\n let l = array.length;\n while (l--) {\n let element = array[l];\n\n if (typeof element === 'string') {\n const lcElement = transformCaseFunc(element);\n\n if (lcElement !== element) {\n // Config presets (e.g. tags.js, attrs.js) are immutable.\n if (!isFrozen(array)) {\n (array as unknown[])[l] = lcElement;\n }\n\n element = lcElement;\n }\n }\n\n set[element as string] = true;\n }\n\n return set;\n}\n\n/**\n * Clean up an array to harden against CSPP\n *\n * @param array - The array to be cleaned.\n * @returns The cleaned version of the array\n */\nfunction cleanArray(array: T[]): Array {\n for (let index = 0; index < array.length; index++) {\n const isPropertyExist = objectHasOwnProperty(array, index);\n\n if (!isPropertyExist) {\n array[index] = null;\n }\n }\n\n return array;\n}\n\n/**\n * Shallow clone an object\n *\n * @param object - The object to be cloned.\n * @returns A new object that copies the original.\n */\nfunction clone>(object: T): T {\n const newObject = create(null);\n\n for (const [property, value] of entries(object)) {\n const isPropertyExist = objectHasOwnProperty(object, property);\n\n if (isPropertyExist) {\n if (arrayIsArray(value)) {\n newObject[property] = cleanArray(value);\n } else if (\n value &&\n typeof value === 'object' &&\n value.constructor === Object\n ) {\n newObject[property] = clone(value);\n } else {\n newObject[property] = value;\n }\n }\n }\n\n return newObject;\n}\n\n/**\n * Convert non-node values into strings without depending on direct property access.\n *\n * @param value - The value to stringify.\n * @returns A string representation of the provided value.\n */\nfunction stringifyValue(value: unknown): string {\n switch (typeof value) {\n case 'string': {\n return value;\n }\n\n case 'number': {\n return numberToString(value);\n }\n\n case 'boolean': {\n return booleanToString(value);\n }\n\n case 'bigint': {\n return bigintToString ? bigintToString(value) : '0';\n }\n\n case 'symbol': {\n return symbolToString ? symbolToString(value) : 'Symbol()';\n }\n\n case 'undefined': {\n return objectToString(value);\n }\n\n case 'function':\n case 'object': {\n if (value === null) {\n return objectToString(value);\n }\n\n const valueAsRecord = value as Record;\n const valueToString = lookupGetter(valueAsRecord, 'toString');\n\n if (typeof valueToString === 'function') {\n const stringified = valueToString(valueAsRecord);\n\n return typeof stringified === 'string'\n ? stringified\n : objectToString(stringified);\n }\n\n return objectToString(value);\n }\n\n default: {\n return objectToString(value);\n }\n }\n}\n\n/**\n * This method automatically checks if the prop is function or getter and behaves accordingly.\n *\n * @param object - The object to look up the getter function in its prototype chain.\n * @param prop - The property name for which to find the getter function.\n * @returns The getter function found in the prototype chain or a fallback function.\n */\nfunction lookupGetter>(\n object: T,\n prop: string\n): ReturnType> | (() => null) {\n while (object !== null) {\n const desc = getOwnPropertyDescriptor(object, prop);\n\n if (desc) {\n if (desc.get) {\n return unapply(desc.get);\n }\n\n if (typeof desc.value === 'function') {\n return unapply(desc.value);\n }\n }\n\n object = getPrototypeOf(object);\n }\n\n function fallbackValue(): null {\n return null;\n }\n\n return fallbackValue;\n}\n\nfunction isRegex(value: unknown): value is RegExp {\n try {\n regExpTest(value as RegExp, '');\n return true;\n } catch {\n return false;\n }\n}\n\nexport {\n // Array\n arrayForEach,\n arrayIndexOf,\n arrayIsArray,\n arrayLastIndexOf,\n arrayPop,\n arrayPush,\n arraySlice,\n arraySplice,\n // Object\n entries,\n freeze,\n getPrototypeOf,\n getOwnPropertyDescriptor,\n isFrozen,\n setPrototypeOf,\n seal,\n clone,\n create,\n objectHasOwnProperty,\n objectToString,\n // RegExp\n regExpTest,\n isRegex,\n // String\n stringIndexOf,\n stringMatch,\n stringReplace,\n stringToLowerCase,\n stringToString,\n stringTrim,\n // Other conversion\n stringifyValue,\n // Errors\n typeErrorCreate,\n // Other\n lookupGetter,\n addToSet,\n // Reflect\n unapply,\n unconstruct,\n};\n", "import { freeze } from './utils.js';\n\nexport const html = freeze([\n 'a',\n 'abbr',\n 'acronym',\n 'address',\n 'area',\n 'article',\n 'aside',\n 'audio',\n 'b',\n 'bdi',\n 'bdo',\n 'big',\n 'blink',\n 'blockquote',\n 'body',\n 'br',\n 'button',\n 'canvas',\n 'caption',\n 'center',\n 'cite',\n 'code',\n 'col',\n 'colgroup',\n 'content',\n 'data',\n 'datalist',\n 'dd',\n 'decorator',\n 'del',\n 'details',\n 'dfn',\n 'dialog',\n 'dir',\n 'div',\n 'dl',\n 'dt',\n 'element',\n 'em',\n 'fieldset',\n 'figcaption',\n 'figure',\n 'font',\n 'footer',\n 'form',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'head',\n 'header',\n 'hgroup',\n 'hr',\n 'html',\n 'i',\n 'img',\n 'input',\n 'ins',\n 'kbd',\n 'label',\n 'legend',\n 'li',\n 'main',\n 'map',\n 'mark',\n 'marquee',\n 'menu',\n 'menuitem',\n 'meter',\n 'nav',\n 'nobr',\n 'ol',\n 'optgroup',\n 'option',\n 'output',\n 'p',\n 'picture',\n 'pre',\n 'progress',\n 'q',\n 'rp',\n 'rt',\n 'ruby',\n 's',\n 'samp',\n 'search',\n 'section',\n 'select',\n 'shadow',\n 'slot',\n 'small',\n 'source',\n 'spacer',\n 'span',\n 'strike',\n 'strong',\n 'style',\n 'sub',\n 'summary',\n 'sup',\n 'table',\n 'tbody',\n 'td',\n 'template',\n 'textarea',\n 'tfoot',\n 'th',\n 'thead',\n 'time',\n 'tr',\n 'track',\n 'tt',\n 'u',\n 'ul',\n 'var',\n 'video',\n 'wbr',\n] as const);\n\nexport const svg = freeze([\n 'svg',\n 'a',\n 'altglyph',\n 'altglyphdef',\n 'altglyphitem',\n 'animatecolor',\n 'animatemotion',\n 'animatetransform',\n 'circle',\n 'clippath',\n 'defs',\n 'desc',\n 'ellipse',\n 'enterkeyhint',\n 'exportparts',\n 'filter',\n 'font',\n 'g',\n 'glyph',\n 'glyphref',\n 'hkern',\n 'image',\n 'inputmode',\n 'line',\n 'lineargradient',\n 'marker',\n 'mask',\n 'metadata',\n 'mpath',\n 'part',\n 'path',\n 'pattern',\n 'polygon',\n 'polyline',\n 'radialgradient',\n 'rect',\n 'stop',\n 'style',\n 'switch',\n 'symbol',\n 'text',\n 'textpath',\n 'title',\n 'tref',\n 'tspan',\n 'view',\n 'vkern',\n] as const);\n\nexport const svgFilters = freeze([\n 'feBlend',\n 'feColorMatrix',\n 'feComponentTransfer',\n 'feComposite',\n 'feConvolveMatrix',\n 'feDiffuseLighting',\n 'feDisplacementMap',\n 'feDistantLight',\n 'feDropShadow',\n 'feFlood',\n 'feFuncA',\n 'feFuncB',\n 'feFuncG',\n 'feFuncR',\n 'feGaussianBlur',\n 'feImage',\n 'feMerge',\n 'feMergeNode',\n 'feMorphology',\n 'feOffset',\n 'fePointLight',\n 'feSpecularLighting',\n 'feSpotLight',\n 'feTile',\n 'feTurbulence',\n] as const);\n\n// List of SVG elements that are disallowed by default.\n// We still need to know them so that we can do namespace\n// checks properly in case one wants to add them to\n// allow-list.\nexport const svgDisallowed = freeze([\n 'animate',\n 'color-profile',\n 'cursor',\n 'discard',\n 'font-face',\n 'font-face-format',\n 'font-face-name',\n 'font-face-src',\n 'font-face-uri',\n 'foreignobject',\n 'hatch',\n 'hatchpath',\n 'mesh',\n 'meshgradient',\n 'meshpatch',\n 'meshrow',\n 'missing-glyph',\n 'script',\n 'set',\n 'solidcolor',\n 'unknown',\n 'use',\n] as const);\n\nexport const mathMl = freeze([\n 'math',\n 'menclose',\n 'merror',\n 'mfenced',\n 'mfrac',\n 'mglyph',\n 'mi',\n 'mlabeledtr',\n 'mmultiscripts',\n 'mn',\n 'mo',\n 'mover',\n 'mpadded',\n 'mphantom',\n 'mroot',\n 'mrow',\n 'ms',\n 'mspace',\n 'msqrt',\n 'mstyle',\n 'msub',\n 'msup',\n 'msubsup',\n 'mtable',\n 'mtd',\n 'mtext',\n 'mtr',\n 'munder',\n 'munderover',\n 'mprescripts',\n] as const);\n\n// Similarly to SVG, we want to know all MathML elements,\n// even those that we disallow by default.\nexport const mathMlDisallowed = freeze([\n 'maction',\n 'maligngroup',\n 'malignmark',\n 'mlongdiv',\n 'mscarries',\n 'mscarry',\n 'msgroup',\n 'mstack',\n 'msline',\n 'msrow',\n 'semantics',\n 'annotation',\n 'annotation-xml',\n 'mprescripts',\n 'none',\n] as const);\n\nexport const text = freeze(['#text'] as const);\n", "import { freeze } from './utils.js';\n\nexport const html = freeze([\n 'accept',\n 'action',\n 'align',\n 'alt',\n 'autocapitalize',\n 'autocomplete',\n 'autopictureinpicture',\n 'autoplay',\n 'background',\n 'bgcolor',\n 'border',\n 'capture',\n 'cellpadding',\n 'cellspacing',\n 'checked',\n 'cite',\n 'class',\n 'clear',\n 'color',\n 'cols',\n 'colspan',\n 'command',\n 'commandfor',\n 'controls',\n 'controlslist',\n 'coords',\n 'crossorigin',\n 'datetime',\n 'decoding',\n 'default',\n 'dir',\n 'disabled',\n 'disablepictureinpicture',\n 'disableremoteplayback',\n 'download',\n 'draggable',\n 'enctype',\n 'enterkeyhint',\n 'exportparts',\n 'face',\n 'for',\n 'headers',\n 'height',\n 'hidden',\n 'high',\n 'href',\n 'hreflang',\n 'id',\n 'inert',\n 'inputmode',\n 'integrity',\n 'ismap',\n 'kind',\n 'label',\n 'lang',\n 'list',\n 'loading',\n 'loop',\n 'low',\n 'max',\n 'maxlength',\n 'media',\n 'method',\n 'min',\n 'minlength',\n 'multiple',\n 'muted',\n 'name',\n 'nonce',\n 'noshade',\n 'novalidate',\n 'nowrap',\n 'open',\n 'optimum',\n 'part',\n 'pattern',\n 'placeholder',\n 'playsinline',\n 'popover',\n 'popovertarget',\n 'popovertargetaction',\n 'poster',\n 'preload',\n 'pubdate',\n 'radiogroup',\n 'readonly',\n 'rel',\n 'required',\n 'rev',\n 'reversed',\n 'role',\n 'rows',\n 'rowspan',\n 'spellcheck',\n 'scope',\n 'selected',\n 'shape',\n 'size',\n 'sizes',\n 'slot',\n 'span',\n 'srclang',\n 'start',\n 'src',\n 'srcset',\n 'step',\n 'style',\n 'summary',\n 'tabindex',\n 'title',\n 'translate',\n 'type',\n 'usemap',\n 'valign',\n 'value',\n 'width',\n 'wrap',\n 'xmlns',\n] as const);\n\nexport const svg = freeze([\n 'accent-height',\n 'accumulate',\n 'additive',\n 'alignment-baseline',\n 'amplitude',\n 'ascent',\n 'attributename',\n 'attributetype',\n 'azimuth',\n 'basefrequency',\n 'baseline-shift',\n 'begin',\n 'bias',\n 'by',\n 'class',\n 'clip',\n 'clippathunits',\n 'clip-path',\n 'clip-rule',\n 'color',\n 'color-interpolation',\n 'color-interpolation-filters',\n 'color-profile',\n 'color-rendering',\n 'cx',\n 'cy',\n 'd',\n 'dx',\n 'dy',\n 'diffuseconstant',\n 'direction',\n 'display',\n 'divisor',\n 'dominant-baseline',\n 'dur',\n 'edgemode',\n 'elevation',\n 'end',\n 'exponent',\n 'fill',\n 'fill-opacity',\n 'fill-rule',\n 'filter',\n 'filterunits',\n 'flood-color',\n 'flood-opacity',\n 'font-family',\n 'font-size',\n 'font-size-adjust',\n 'font-stretch',\n 'font-style',\n 'font-variant',\n 'font-weight',\n 'fx',\n 'fy',\n 'g1',\n 'g2',\n 'glyph-name',\n 'glyphref',\n 'gradientunits',\n 'gradienttransform',\n 'height',\n 'href',\n 'id',\n 'image-rendering',\n 'in',\n 'in2',\n 'intercept',\n 'k',\n 'k1',\n 'k2',\n 'k3',\n 'k4',\n 'kerning',\n 'keypoints',\n 'keysplines',\n 'keytimes',\n 'lang',\n 'lengthadjust',\n 'letter-spacing',\n 'kernelmatrix',\n 'kernelunitlength',\n 'lighting-color',\n 'local',\n 'marker-end',\n 'marker-mid',\n 'marker-start',\n 'markerheight',\n 'markerunits',\n 'markerwidth',\n 'maskcontentunits',\n 'maskunits',\n 'max',\n 'mask',\n 'mask-type',\n 'media',\n 'method',\n 'mode',\n 'min',\n 'name',\n 'numoctaves',\n 'offset',\n 'operator',\n 'opacity',\n 'order',\n 'orient',\n 'orientation',\n 'origin',\n 'overflow',\n 'paint-order',\n 'path',\n 'pathlength',\n 'patterncontentunits',\n 'patterntransform',\n 'patternunits',\n 'pointer-events',\n 'points',\n 'preservealpha',\n 'preserveaspectratio',\n 'primitiveunits',\n 'r',\n 'rx',\n 'ry',\n 'radius',\n 'refx',\n 'refy',\n 'repeatcount',\n 'repeatdur',\n 'restart',\n 'result',\n 'rotate',\n 'scale',\n 'seed',\n 'shape-rendering',\n 'slope',\n 'specularconstant',\n 'specularexponent',\n 'spreadmethod',\n 'startoffset',\n 'stddeviation',\n 'stitchtiles',\n 'stop-color',\n 'stop-opacity',\n 'stroke-dasharray',\n 'stroke-dashoffset',\n 'stroke-linecap',\n 'stroke-linejoin',\n 'stroke-miterlimit',\n 'stroke-opacity',\n 'stroke',\n 'stroke-width',\n 'style',\n 'surfacescale',\n 'systemlanguage',\n 'tabindex',\n 'tablevalues',\n 'targetx',\n 'targety',\n 'transform',\n 'transform-origin',\n 'text-anchor',\n 'text-decoration',\n 'text-orientation',\n 'text-rendering',\n 'textlength',\n 'type',\n 'u1',\n 'u2',\n 'unicode',\n 'values',\n 'vector-effect',\n 'viewbox',\n 'visibility',\n 'version',\n 'vert-adv-y',\n 'vert-origin-x',\n 'vert-origin-y',\n 'width',\n 'word-spacing',\n 'wrap',\n 'writing-mode',\n 'xchannelselector',\n 'ychannelselector',\n 'x',\n 'x1',\n 'x2',\n 'xmlns',\n 'y',\n 'y1',\n 'y2',\n 'z',\n 'zoomandpan',\n] as const);\n\nexport const mathMl = freeze([\n 'accent',\n 'accentunder',\n 'align',\n 'bevelled',\n 'close',\n 'columnalign',\n 'columnlines',\n 'columnspacing',\n 'columnspan',\n 'denomalign',\n 'depth',\n 'dir',\n 'display',\n 'displaystyle',\n 'encoding',\n 'fence',\n 'frame',\n 'height',\n 'href',\n 'id',\n 'largeop',\n 'length',\n 'linethickness',\n 'lquote',\n 'lspace',\n 'mathbackground',\n 'mathcolor',\n 'mathsize',\n 'mathvariant',\n 'maxsize',\n 'minsize',\n 'movablelimits',\n 'notation',\n 'numalign',\n 'open',\n 'rowalign',\n 'rowlines',\n 'rowspacing',\n 'rowspan',\n 'rspace',\n 'rquote',\n 'scriptlevel',\n 'scriptminsize',\n 'scriptsizemultiplier',\n 'selection',\n 'separator',\n 'separators',\n 'stretchy',\n 'subscriptshift',\n 'supscriptshift',\n 'symmetric',\n 'voffset',\n 'width',\n 'xmlns',\n]);\n\nexport const xml = freeze([\n 'xlink:href',\n 'xml:id',\n 'xlink:title',\n 'xml:space',\n 'xmlns:xlink',\n] as const);\n", "import { seal } from './utils.js';\n\nexport const MUSTACHE_EXPR = seal(/{{[\\w\\W]*|^[\\w\\W]*}}/g);\nexport const ERB_EXPR = seal(/<%[\\w\\W]*|^[\\w\\W]*%>/g);\nexport const TMPLIT_EXPR = seal(/\\${[\\w\\W]*/g);\nexport const DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]+$/); // eslint-disable-line no-useless-escape\nexport const ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\nexport const IS_ALLOWED_URI = seal(\n /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i // eslint-disable-line no-useless-escape\n);\nexport const IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\nexport const ATTR_WHITESPACE = seal(\n /[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g // eslint-disable-line no-control-regex\n);\nexport const DOCTYPE_NAME = seal(/^html$/i);\nexport const CUSTOM_ELEMENT = seal(/^[a-z][.\\w]*(-[.\\w]+)+$/i);\n\n// Markup-significant character probes used by _sanitizeElements.\n// Shared module-level instances are safe despite the sticky /g flags:\n// unapply() resets lastIndex for RegExp receivers before every call.\nexport const ELEMENT_MARKUP_PROBE = seal(/<[/\\w!]/g);\nexport const COMMENT_MARKUP_PROBE = seal(/<[/\\w]/g);\nexport const FALLBACK_TAG_CLOSE = seal(/<\\/no(script|embed|frames)/i);\nexport const SELF_CLOSING_TAG = seal(/\\/>/i);\n", "import type { Config, UseProfilesConfig } from './config';\nimport type { DOMPurify, HooksMap, HookFunction, WindowLike } from './types';\nimport * as TAGS from './tags.js';\nimport * as ATTRS from './attrs.js';\nimport * as EXPRESSIONS from './regexp.js';\nimport {\n addToSet,\n clone,\n entries,\n freeze,\n seal,\n arrayForEach,\n arrayIsArray,\n arrayLastIndexOf,\n arrayPop,\n arrayPush,\n arraySplice,\n stringMatch,\n stringReplace,\n stringToLowerCase,\n stringToString,\n stringIndexOf,\n stringTrim,\n regExpTest,\n isRegex,\n typeErrorCreate,\n lookupGetter,\n create,\n objectHasOwnProperty,\n stringifyValue,\n} from './utils.js';\n\nexport type { Config } from './config';\n\nexport type {\n DOMPurify,\n RemovedElement,\n RemovedAttribute,\n HookName,\n NodeHook,\n ElementHook,\n DocumentFragmentHook,\n UponSanitizeElementHook,\n UponSanitizeAttributeHook,\n UponSanitizeElementHookEvent,\n UponSanitizeAttributeHookEvent,\n WindowLike,\n} from './types';\n\ndeclare const VERSION: string;\n\n// https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType\nconst NODE_TYPE = {\n element: 1,\n attribute: 2,\n text: 3,\n cdataSection: 4,\n entityReference: 5, // Deprecated\n entityNode: 6, // Deprecated\n processingInstruction: 7,\n comment: 8,\n document: 9,\n documentType: 10,\n documentFragment: 11,\n notation: 12, // Deprecated\n};\n\n/* HTML-namespace elements whose child text nodes are serialized *literally*\n (unescaped) by the HTML fragment-serialization algorithm. Two reparse-mXSS\n shapes ride on that literal serialization:\n (a) an element child - a tree the HTML parser can never build, but the DOM\n API and an XML/XHTML parse can - after which a ``-bearing text\n sibling breaks the element open on reparse; and\n (b) text-only content that already carries the element's OWN end tag, e.g.\n `` built as a node, which the literal\n serializer emits verbatim for the HTML parser to re-open.\n Shape (a) is handled by the firstElementChild branch in _isUnsafeNode; shape\n (b) by the LITERAL_TEXT_CLOSE probe. Both read textContent (the raw-serialized\n form for these elements) rather than innerHTML, because an XML/XHTML working\n document serializes innerHTML with `<` escaped, which silently blinds the\n innerHTML-based probes (rule 1's second probe and FALLBACK_TAG_CLOSE) there.\n `script` is never allow-listed, but is kept here so the guard matches the\n serializer's own literal-text list exactly. */\nconst LITERAL_TEXT_ELEMENT_NAMES = [\n 'style',\n 'script',\n 'xmp',\n 'iframe',\n 'noembed',\n 'noframes',\n 'plaintext',\n 'noscript',\n];\nconst LITERAL_TEXT_ELEMENTS = freeze(addToSet({}, LITERAL_TEXT_ELEMENT_NAMES));\n\n/* Per-element end-tag matcher. On an HTML reparse the ONLY token that\n terminates a literal-text element's raw content is its own end tag; a foreign\n literal-text close (e.g. `` sitting inside `` built as a node, which the literal\n serializer emits verbatim for the HTML parser to re-open.\n Shape (a) is handled by the firstElementChild branch in _isUnsafeNode; shape\n (b), and any other markup in the text, by the ELEMENT_MARKUP_PROBE branch next\n to it. Both read textContent (the raw-serialized form for these elements)\n rather than innerHTML, because an XML/XHTML working document serializes\n innerHTML with `<` escaped, which silently blinds the innerHTML-based probes\n (rule 1's second probe and FALLBACK_TAG_CLOSE) there.\n `script` is never allow-listed, but is kept here so the guard matches the\n serializer's own literal-text list exactly. */\nconst LITERAL_TEXT_ELEMENT_NAMES = [\n 'style',\n 'script',\n 'xmp',\n 'iframe',\n 'noembed',\n 'noframes',\n 'plaintext',\n 'noscript',\n];\nconst LITERAL_TEXT_ELEMENTS = freeze(addToSet({}, LITERAL_TEXT_ELEMENT_NAMES));\n\nconst getGlobal = function (): WindowLike {\n return typeof window === 'undefined' ? null : window;\n};\n\n/**\n * Creates a no-op policy for internal use only.\n * Don't export this function outside this module!\n * @param trustedTypes The policy factory.\n * @param purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).\n * @return The policy created (or null, if Trusted Types\n * are not supported or creating the policy failed).\n */\nconst _createTrustedTypesPolicy = function (\n trustedTypes: TrustedTypePolicyFactory,\n purifyHostElement: HTMLScriptElement\n) {\n if (\n typeof trustedTypes !== 'object' ||\n typeof trustedTypes.createPolicy !== 'function'\n ) {\n return null;\n }\n\n // Allow the callers to control the unique policy name\n // by adding a data-tt-policy-suffix to the script element with the DOMPurify.\n // Policy creation with duplicate names throws in Trusted Types.\n let suffix = null;\n const ATTR_NAME = 'data-tt-policy-suffix';\n if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {\n suffix = purifyHostElement.getAttribute(ATTR_NAME);\n }\n\n const policyName = 'dompurify' + (suffix ? '#' + suffix : '');\n\n try {\n return trustedTypes.createPolicy(policyName, {\n createHTML(html) {\n return html;\n },\n createScriptURL(scriptUrl) {\n return scriptUrl;\n },\n });\n } catch (_) {\n // Policy creation failed (most likely another DOMPurify script has\n // already run). Skip creating the policy, as this will only cause errors\n // if TT are enforced.\n console.warn(\n 'TrustedTypes policy ' + policyName + ' could not be created.'\n );\n return null;\n }\n};\n\nconst _createHooksMap = function (): HooksMap {\n return {\n afterSanitizeAttributes: [],\n afterSanitizeElements: [],\n afterSanitizeShadowDOM: [],\n beforeSanitizeAttributes: [],\n beforeSanitizeElements: [],\n beforeSanitizeShadowDOM: [],\n uponSanitizeAttribute: [],\n uponSanitizeElement: [],\n uponSanitizeShadowNode: [],\n };\n};\n\n/**\n * Resolve a set-valued configuration option: a fresh set built from\n * cfg[key] when it is an own array property (seeded with a clone of\n * options.base when given, case-normalized via options.transform),\n * the fallback set otherwise.\n *\n * @param cfg the cloned, prototype-free configuration object\n * @param key the configuration property to read\n * @param fallback the set to use when the option is absent or not an array\n * @param options transform and optional base set to merge into\n * @returns the resolved set\n */\nconst _resolveSetOption = function (\n cfg: Config,\n key: keyof Config,\n fallback: Record,\n options: {\n transform: Parameters[2];\n base?: Record;\n }\n): Record {\n return objectHasOwnProperty(cfg, key) && arrayIsArray(cfg[key])\n ? addToSet(\n options.base ? clone(options.base) : {},\n cfg[key] as readonly unknown[],\n options.transform\n )\n : fallback;\n};\n\n/**\n * Resolve an object-valued configuration option: a prototype-free clone\n * of cfg[key] when it is an own, truthy object property, else a fresh\n * fallback built by makeFallback (fresh on every parse, so a previous\n * parse can never leak state into the next one).\n *\n * @param cfg the cloned, prototype-free configuration object\n * @param key the configuration property to read\n * @param makeFallback builds the fallback value when the option is absent\n * @returns the resolved object\n */\nconst _resolveObjectOption = function >(\n cfg: Config,\n key: keyof Config,\n makeFallback: () => T\n): T {\n const value = objectHasOwnProperty(cfg, key) ? cfg[key] : undefined;\n return value && typeof value === 'object'\n ? clone(value as T)\n : makeFallback();\n};\n\nfunction createDOMPurify(window: WindowLike = getGlobal()): DOMPurify {\n const DOMPurify: DOMPurify = (root: WindowLike) => createDOMPurify(root);\n\n DOMPurify.version = VERSION;\n\n DOMPurify.removed = [];\n\n if (\n !window ||\n !window.document ||\n window.document.nodeType !== NODE_TYPE.document ||\n !window.Element\n ) {\n // Not running in a browser, provide a factory function\n // so that you can pass your own Window\n DOMPurify.isSupported = false;\n\n return DOMPurify;\n }\n\n let { document } = window;\n\n const originalDocument = document;\n const currentScript: HTMLScriptElement =\n originalDocument.currentScript as HTMLScriptElement;\n const {\n DocumentFragment,\n HTMLTemplateElement,\n Node,\n Element,\n NodeFilter,\n NamedNodeMap = window.NamedNodeMap || (window as any).MozNamedAttrMap,\n HTMLFormElement,\n DOMParser,\n trustedTypes,\n } = window;\n\n const ElementPrototype = Element.prototype;\n\n const cloneNode = lookupGetter(ElementPrototype, 'cloneNode');\n const remove = lookupGetter(ElementPrototype, 'remove');\n // Clobber-safe Attr-node removal. On an HTMLFormElement a descendant named\n // \"removeAttributeNode\" shadows the prototype method via\n // [LegacyOverrideBuiltIns], so element.removeAttributeNode(attr) throws.\n // Calling the cached Element.prototype method with the element as the\n // receiver removes the exact live Attr node regardless of the shadowing.\n const removeAttributeNode = lookupGetter(\n ElementPrototype,\n 'removeAttributeNode'\n );\n const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');\n const getChildNodes = lookupGetter(ElementPrototype, 'childNodes');\n const getParentNode = lookupGetter(ElementPrototype, 'parentNode');\n const getShadowRoot = lookupGetter(ElementPrototype, 'shadowRoot');\n const getAttributes = lookupGetter(ElementPrototype, 'attributes');\n const getNodeType =\n Node && Node.prototype ? lookupGetter(Node.prototype, 'nodeType') : null;\n const getNodeName =\n Node && Node.prototype ? lookupGetter(Node.prototype, 'nodeName') : null;\n const getOwnerDocument =\n Node && Node.prototype\n ? lookupGetter(Node.prototype, 'ownerDocument')\n : null;\n\n /* Clobber-safe nodeType / nodeName reads through the cached Node.prototype\n getters, with a direct-property fallback for environments that lack\n Node.prototype. Sites that need a different fallback (e.g. _isClobbered\n returns early on a null name) intentionally keep their own reads. */\n const _readNodeType = function (node: Node): number {\n return getNodeType ? getNodeType(node) : (node as any).nodeType;\n };\n\n const _readNodeName = function (node: Node): string {\n return getNodeName ? getNodeName(node) : (node as any).nodeName;\n };\n\n /* Element namespace through the cached Element.prototype getter, so a live\n node's own-property override (Object.defineProperty) cannot steer\n namespace decisions; direct read where the getter does not exist. Only\n call this on Elements - the getter throws on other node types. */\n const getNamespaceURI = lookupAccessor(ElementPrototype, 'namespaceURI');\n const _readNamespaceURI = function (element: Element): string | null {\n return getNamespaceURI\n ? getNamespaceURI(element)\n : (element as any).namespaceURI;\n };\n\n // As per issue #47, the web-components registry is inherited by a\n // new document created via createHTMLDocument. As per the spec\n // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n // a new empty registry is used when creating a template contents owner\n // document, so we use that as our parent document to ensure nothing\n // is inherited.\n if (typeof HTMLTemplateElement === 'function') {\n const template = document.createElement('template');\n if (template.content && template.content.ownerDocument) {\n document = template.content.ownerDocument;\n }\n }\n\n let trustedTypesPolicy;\n let emptyHTML = '';\n\n // The instance's own internal Trusted Types policy. Unlike a caller-supplied\n // `TRUSTED_TYPES_POLICY`, this is created at most once \u2014 Trusted Types throws\n // on duplicate policy names \u2014 and is the only policy allowed to persist\n // across configurations and survive `clearConfig()`.\n let defaultTrustedTypesPolicy;\n let defaultTrustedTypesPolicyResolved = false;\n\n // Tracks whether we are already inside a call to the configured Trusted Types\n // policy (`createHTML` or `createScriptURL`). If a supplied policy callback\n // itself calls `DOMPurify.sanitize` (the cause of #1422), `sanitize` would\n // re-enter the policy and recurse until the stack overflows. We detect that\n // re-entry and throw a clear, actionable error instead. The guard is shared\n // across both callbacks, because either one re-entering `sanitize` triggers\n // the same unbounded recursion.\n let IN_TRUSTED_TYPES_POLICY = 0;\n const _assertNotInTrustedTypesPolicy = function (): void {\n if (IN_TRUSTED_TYPES_POLICY > 0) {\n throw typeErrorCreate(\n 'A configured TRUSTED_TYPES_POLICY callback (createHTML or ' +\n 'createScriptURL) must not call DOMPurify.sanitize, as that causes ' +\n 'infinite recursion. Do not pass a policy whose callbacks wrap ' +\n 'DOMPurify as TRUSTED_TYPES_POLICY; see the \"DOMPurify and Trusted ' +\n 'Types\" section of the README.'\n );\n }\n };\n\n const _createTrustedHTML = function (html: string): string {\n _assertNotInTrustedTypesPolicy();\n\n IN_TRUSTED_TYPES_POLICY++;\n try {\n return trustedTypesPolicy.createHTML(html);\n } finally {\n IN_TRUSTED_TYPES_POLICY--;\n }\n };\n\n const _createTrustedScriptURL = function (scriptUrl: string): string {\n _assertNotInTrustedTypesPolicy();\n\n IN_TRUSTED_TYPES_POLICY++;\n try {\n return trustedTypesPolicy.createScriptURL(scriptUrl);\n } finally {\n IN_TRUSTED_TYPES_POLICY--;\n }\n };\n\n // Lazily resolve (and cache) the instance's internal default policy.\n // Resolution is attempted at most once: a successful `createPolicy` cannot be\n // repeated (Trusted Types throws on duplicate names), and a failed or\n // unsupported attempt must not be retried on every parse.\n const _getDefaultTrustedTypesPolicy = function () {\n if (!defaultTrustedTypesPolicyResolved) {\n defaultTrustedTypesPolicy = _createTrustedTypesPolicy(\n trustedTypes,\n currentScript\n );\n defaultTrustedTypesPolicyResolved = true;\n }\n\n return defaultTrustedTypesPolicy;\n };\n\n const {\n implementation,\n createNodeIterator,\n createDocumentFragment,\n getElementsByTagName,\n } = document;\n const { importNode } = originalDocument;\n\n let hooks = _createHooksMap();\n\n /**\n * Expose whether this browser supports running the full DOMPurify.\n */\n DOMPurify.isSupported =\n typeof entries === 'function' &&\n typeof getParentNode === 'function' &&\n implementation &&\n implementation.createHTMLDocument !== undefined;\n\n const {\n MUSTACHE_EXPR,\n ERB_EXPR,\n TMPLIT_EXPR,\n DATA_ATTR,\n ARIA_ATTR,\n IS_SCRIPT_OR_DATA,\n ATTR_WHITESPACE,\n CUSTOM_ELEMENT,\n } = EXPRESSIONS;\n\n let { IS_ALLOWED_URI } = EXPRESSIONS;\n\n /**\n * We consider the elements and attributes below to be safe. Ideally\n * don't add any new ones but feel free to remove unwanted ones.\n */\n\n /* allowed element names */\n let ALLOWED_TAGS = null;\n const DEFAULT_ALLOWED_TAGS = addToSet({}, [\n ...TAGS.html,\n ...TAGS.svg,\n ...TAGS.svgFilters,\n ...TAGS.mathMl,\n ...TAGS.text,\n ]);\n\n /* Allowed attribute names */\n let ALLOWED_ATTR = null;\n const DEFAULT_ALLOWED_ATTR = addToSet({}, [\n ...ATTRS.html,\n ...ATTRS.svg,\n ...ATTRS.mathMl,\n ...ATTRS.xml,\n ]);\n\n /*\n * Configure how DOMPurify should handle custom elements and their attributes as well as customized built-in elements.\n * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)\n * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)\n * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.\n */\n let CUSTOM_ELEMENT_HANDLING = Object.seal(\n create(null, {\n tagNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null,\n },\n attributeNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null,\n },\n allowCustomizedBuiltInElements: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: false,\n },\n })\n );\n\n /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n let FORBID_TAGS = null;\n\n /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n let FORBID_ATTR = null;\n\n /* Config object to store ADD_TAGS/ADD_ATTR functions (when used as functions) */\n const EXTRA_ELEMENT_HANDLING = Object.seal(\n create(null, {\n tagCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null,\n },\n attributeCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null,\n },\n })\n );\n\n /* Decide if ARIA attributes are okay */\n let ALLOW_ARIA_ATTR = true;\n\n /* Decide if custom data attributes are okay */\n let ALLOW_DATA_ATTR = true;\n\n /* Decide if unknown protocols are okay */\n let ALLOW_UNKNOWN_PROTOCOLS = false;\n\n /* Decide if self-closing tags in attributes are allowed.\n * Usually removed due to a mXSS issue in jQuery 3.0 */\n let ALLOW_SELF_CLOSE_IN_ATTR = true;\n\n /* Output should be safe for common template engines.\n * This means, DOMPurify removes data attributes, mustaches and ERB\n */\n let SAFE_FOR_TEMPLATES = false;\n\n /* Output should be safe even for XML used within HTML and alike.\n * This means, DOMPurify removes comments when containing risky content.\n */\n let SAFE_FOR_XML = true;\n\n /* Decide if document with ... should be returned */\n let WHOLE_DOCUMENT = false;\n\n /* Track whether config is already set on this instance of DOMPurify. */\n let SET_CONFIG = false;\n\n /* Pristine allowlist bindings captured at setConfig() time. On the\n * persistent-config path sanitize() restores the sets from these before\n * the per-walk hook clone-guard, so a hook's in-call widening cannot\n * carry across calls. Null until setConfig() is called; reset by\n * clearConfig(). */\n let SET_CONFIG_ALLOWED_TAGS = null;\n let SET_CONFIG_ALLOWED_ATTR = null;\n\n /* Decide if all elements (e.g. style, script) must be children of\n * document.body. By default, browsers might move them to document.head */\n let FORCE_BODY = false;\n\n /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported).\n * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n */\n let RETURN_DOM = false;\n\n /* Decide if a DOM `DocumentFragment` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported) */\n let RETURN_DOM_FRAGMENT = false;\n\n /* Try to return a Trusted Type object instead of a string, return a string in\n * case Trusted Types are not supported */\n let RETURN_TRUSTED_TYPE = false;\n\n /* Output should be free from DOM clobbering attacks?\n * This sanitizes markups named with colliding, clobberable built-in DOM APIs.\n */\n let SANITIZE_DOM = true;\n\n /* Achieve full DOM Clobbering protection by isolating the namespace of named\n * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.\n *\n * HTML/DOM spec rules that enable DOM Clobbering:\n * - Named Access on Window (\u00A77.3.3)\n * - DOM Tree Accessors (\u00A73.1.5)\n * - Form Element Parent-Child Relations (\u00A74.10.3)\n * - Iframe srcdoc / Nested WindowProxies (\u00A74.8.5)\n * - HTMLCollection (\u00A74.2.10.2)\n *\n * Namespace isolation is implemented by prefixing `id` and `name` attributes\n * with a constant string, i.e., `user-content-`\n */\n let SANITIZE_NAMED_PROPS = false;\n const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';\n\n /* Keep element content when removing element? */\n let KEEP_CONTENT = true;\n\n /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead\n * of importing it into a new Document and returning a sanitized copy */\n let IN_PLACE = false;\n\n /* IN_PLACE: nodes processed during the current call */\n let IN_PLACE_VISITED: Set | null = null;\n\n /* Allow usage of profiles like html, svg and mathMl */\n let USE_PROFILES: UseProfilesConfig | false = {};\n\n /* Tags to ignore content of when KEEP_CONTENT is true */\n let FORBID_CONTENTS = null;\n const DEFAULT_FORBID_CONTENTS = addToSet({}, [\n 'annotation-xml',\n 'audio',\n 'colgroup',\n 'desc',\n 'foreignobject',\n 'head',\n 'iframe',\n 'math',\n 'mi',\n 'mn',\n 'mo',\n 'ms',\n 'mtext',\n 'noembed',\n 'noframes',\n 'noscript',\n 'plaintext',\n 'script',\n // mirrors the selected