agent-whiteboard 1.0.4 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +76 -0
- package/README.md +61 -5
- package/dist/client/assets/abnfDiagram-VCTEODGH-Dj8sd_5g.js +1 -0
- package/dist/client/assets/{arc-4691b008.js → arc-Aq92EeUK.js} +1 -1
- package/dist/client/assets/architectureDiagram-5GKGNRK7-B1QyVL0F.js +36 -0
- package/dist/client/assets/blockDiagram-I7D4REHJ-CmU2SSFe.js +129 -0
- package/dist/client/assets/{bootstrap.min-21652813.js → bootstrap.min-UtnB-TxT.js} +1 -2
- package/dist/client/assets/c4Diagram-7LVT6UL2-DWmhp77c.js +38 -0
- package/dist/client/assets/channel-C9ni1Via.js +1 -0
- package/dist/client/assets/{chunk-QZHKN3VN-0f554985.js → chunk-2Q5K7J3B-CQLo8Sbv.js} +1 -1
- package/dist/client/assets/{chunk-FMBD7UC4-23d48b24.js → chunk-5VM5RSS4-fJTWmTTt.js} +1 -1
- package/dist/client/assets/{chunk-ND2GUHAM-1104c326.js → chunk-F27PBJKO-DqzEf5gi.js} +1 -1
- package/dist/client/assets/chunk-IMKFNOWR-CMamLTz3.js +231 -0
- package/dist/client/assets/{chunk-4BX2VUAB-3c93511d.js → chunk-JWPE2WC7-tyYPyD43.js} +1 -1
- package/dist/client/assets/chunk-POPQ4Y6H-XdY4rO_V.js +1 -0
- package/dist/client/assets/chunk-SVP7TREG-COvqzqaO.js +88 -0
- package/dist/client/assets/chunk-TICWLB2K-BsJSFuPC.js +206 -0
- package/dist/client/assets/{chunk-55IACEB6-0243aefd.js → chunk-XXDRQBXY-HfVrYBJb.js} +1 -1
- package/dist/client/assets/classDiagram-ZZMXUADV-DktNEiGC.js +1 -0
- package/dist/client/assets/classDiagram-v2-VYDZK3BY-DktNEiGC.js +1 -0
- package/dist/client/assets/cose-bilkent-JH36ORCC-UXGdwSjS.js +1 -0
- package/dist/client/assets/cynefin-OW5HDTMX-PWlPYnpn.js +178 -0
- package/dist/client/assets/cynefinDiagram-5FMLGOSQ-CYE5H1wR.js +62 -0
- package/dist/client/assets/cytoscape.esm-C5JX3QLV.js +331 -0
- package/dist/client/assets/dagre-GXQ25YYZ-DaknBOKq.js +4 -0
- package/dist/client/assets/diagram-S7CK7UJ4-Dz7rZHxF.js +30 -0
- package/dist/client/assets/diagram-UQ7AKVKN-DzCi6tiS.js +41 -0
- package/dist/client/assets/{diagram-KO2AKTUF-81f42eeb.js → diagram-VSXAHHWV-TlUzhXgv.js} +3 -3
- package/dist/client/assets/diagram-VX7I27RA-Ds7jdzK7.js +24 -0
- package/dist/client/assets/diagram-Z3DM3KII-C--JD7cf.js +24 -0
- package/dist/client/assets/ebnfDiagram-PWID7BFC-Dw5OM-dL.js +1 -0
- package/dist/client/assets/embed-DcNeILcO.js +211 -0
- package/dist/client/assets/erDiagram-RLTQ6QDP-DXalBHjA.js +99 -0
- package/dist/client/assets/flowDiagram-HODETNUW-DcI3UqyE.js +168 -0
- package/dist/client/assets/ganttDiagram-EL5Y4UJY-DyrkIo6c.js +292 -0
- package/dist/client/assets/gitGraphDiagram-WWUBYQGX-fJKfGRcg.js +106 -0
- package/dist/client/assets/index-CIhkXT_z.js +19 -0
- package/dist/client/assets/index-DEiH2AE7.css +1 -0
- package/dist/client/assets/infoDiagram-27XIBGKW-Cijiqswb.js +2 -0
- package/dist/client/assets/{ishikawaDiagram-YF4QCWOH-50b43d03.js → ishikawaDiagram-5VMMS53U-C1WqWU2l.js} +2 -2
- package/dist/client/assets/{journeyDiagram-JHISSGLW-dce41bdf.js → journeyDiagram-3NMN7TZE-7j05mbLR.js} +4 -4
- package/dist/client/assets/{kanban-definition-UN3LZRKU-92401a86.js → kanban-definition-UXKFOSKX-D5mGDfs_.js} +1 -1
- package/dist/client/assets/{katex-4c9ea27f.js → katex-BTI-AXqd.js} +3 -3
- package/dist/client/assets/{katex-0cba7652.js → katex-C5jXJg4s.js} +3 -3
- package/dist/client/assets/layout-KEin06-H.js +1 -0
- package/dist/client/assets/linear-D1EL1Azg.js +1 -0
- package/dist/client/assets/mermaid.core-CLvSDmrA.js +310 -0
- package/dist/client/assets/{mindmap-definition-RKZ34NQL-66fe4544.js → mindmap-definition-YA3MSWOX-BsCqKd_d.js} +12 -12
- package/dist/client/assets/{ordinal-db88ae6f.js → ordinal-BeghXfj9.js} +1 -1
- package/dist/client/assets/pegDiagram-XKGWAZYB-Du5lDU3W.js +1 -0
- package/dist/client/assets/pieDiagram-E7YTZNPT-hjv5Ao6B.js +39 -0
- package/dist/client/assets/{quadrantDiagram-W4KKPZXB-f64a7ed7.js → quadrantDiagram-AXDQQJYC-DNon8LWK.js} +4 -4
- package/dist/client/assets/railroadDiagram-O6MQD6OU-yNZz2zxo.js +1 -0
- package/dist/client/assets/requirementDiagram-BXWQKSXE-CZiiEUHW.js +84 -0
- package/dist/client/assets/sankeyDiagram-P5KCCOFB-D-u8ZQUV.js +40 -0
- package/dist/client/assets/sequenceDiagram-WJ2MYXX4-BxjTf3q9.js +162 -0
- package/dist/client/assets/sizeCapture-INFHLROL-Dt4Wg8C5.js +1 -0
- package/dist/client/assets/stateDiagram-D77RDMKH-B8BM6dln.js +1 -0
- package/dist/client/assets/stateDiagram-v2-MP3YSRHH-MJauX84T.js +1 -0
- package/dist/client/assets/step-BEQzeS8V.js +1 -0
- package/dist/client/assets/swimlanes-42K2YHIH-eGWrsWAA.js +1 -0
- package/dist/client/assets/swimlanesDiagram-VR7AAH4N-BYFu8tyL.js +8 -0
- package/dist/client/assets/{time-043b3464.js → time-BaoZouO5.js} +1 -1
- package/dist/client/assets/{timeline-definition-PNZ67QCA-b0c81243.js → timeline-definition-24CTP7MA-CAM-3Qj9.js} +10 -10
- package/dist/client/assets/vennDiagram-4TSXK5OY-CuFEwwD0.js +34 -0
- package/dist/client/assets/{wardleyDiagram-YWT4CUSO-8d4d7626.js → wardleyDiagram-VM6X3IG4-DI5yCVh0.js} +3 -3
- package/dist/client/assets/xychartDiagram-S5SC5T6Z-BI0Bn-OQ.js +7 -0
- package/dist/client/index.html +2 -3
- package/dist/server/app.js +28 -396
- package/dist/server/channel.js +5 -3
- package/dist/server/export-html.js +30 -60
- package/dist/server/export-zip.js +83 -0
- package/dist/server/import-zip.js +196 -0
- package/dist/server/index.js +2 -1
- package/dist/server/mcp.js +28 -13
- package/dist/server/port.js +18 -0
- package/dist/server/quiz-submission.js +116 -0
- package/dist/server/quiz.js +110 -0
- package/dist/server/render-core.js +8 -7
- package/dist/server/routes/export.js +95 -0
- package/dist/server/routes/import.js +24 -0
- package/dist/server/routes/quiz.js +12 -0
- package/dist/server/routes/render.js +184 -0
- package/dist/server/routes/slideshow.js +52 -0
- package/dist/server/routes/snapshots.js +119 -0
- package/dist/server/snapshot-reader.js +58 -20
- package/dist/server/snapshot-writer.js +18 -16
- package/dist/server/validate.js +14 -0
- package/dist/server/viewport-cache.js +97 -25
- package/package.json +13 -7
- package/dist/client/assets/architecture-7EHR7CIX-1221aa61.js +0 -1
- package/dist/client/assets/architectureDiagram-3BPJPVTR-1eef4d3c.js +0 -36
- package/dist/client/assets/blockDiagram-GPEHLZMM-313fb06c.js +0 -132
- package/dist/client/assets/c4Diagram-AAUBKEIU-92b023ad.js +0 -10
- package/dist/client/assets/channel-5ee4a8a7.js +0 -1
- package/dist/client/assets/chunk-2J33WTMH-fb021fdc.js +0 -1
- package/dist/client/assets/chunk-727SXJPM-8e0e0228.js +0 -206
- package/dist/client/assets/chunk-AQP2D5EJ-2ccc13c2.js +0 -231
- package/dist/client/assets/classDiagram-4FO5ZUOK-42ffecb6.js +0 -1
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-42ffecb6.js +0 -1
- package/dist/client/assets/cose-bilkent-S5V4N54A-45ec2e52.js +0 -1
- package/dist/client/assets/cytoscape.esm-1491e259.js +0 -331
- package/dist/client/assets/dagre-BM42HDAG-ed748885.js +0 -4
- package/dist/client/assets/diagram-2AECGRRQ-ccc0ddec.js +0 -43
- package/dist/client/assets/diagram-5GNKFQAL-342efdea.js +0 -10
- package/dist/client/assets/diagram-LMA3HP47-39e66739.js +0 -24
- package/dist/client/assets/diagram-OG6HWLK6-b3e61903.js +0 -24
- package/dist/client/assets/embed-2b4adf34.js +0 -201
- package/dist/client/assets/erDiagram-TEJ5UH35-281f5cc7.js +0 -85
- package/dist/client/assets/eventmodeling-FCH6USID-6508120e.js +0 -1
- package/dist/client/assets/flowDiagram-I6XJVG4X-c3a4269e.js +0 -162
- package/dist/client/assets/ganttDiagram-6RSMTGT7-013b07ec.js +0 -292
- package/dist/client/assets/gitGraph-WXDBUCRP-02827359.js +0 -1
- package/dist/client/assets/gitGraphDiagram-PVQCEYII-de184acb.js +0 -106
- package/dist/client/assets/graph-f3dfaf53.js +0 -1
- package/dist/client/assets/index-d674a6a4.css +0 -1
- package/dist/client/assets/index-ffc5af4b.js +0 -5
- package/dist/client/assets/info-J43DQDTF-81e32294.js +0 -1
- package/dist/client/assets/infoDiagram-5YYISTIA-196101ee.js +0 -2
- package/dist/client/assets/layout-3a4eff80.js +0 -1
- package/dist/client/assets/linear-fed00341.js +0 -1
- package/dist/client/assets/mermaid-parser.core-52f9cd92.js +0 -173
- package/dist/client/assets/mermaid.core-7dfc221a.js +0 -306
- package/dist/client/assets/packet-YPE3B663-278a272a.js +0 -1
- package/dist/client/assets/pie-LRSECV5Y-2e55d9ae.js +0 -1
- package/dist/client/assets/pieDiagram-4H26LBE5-65b1bcbd.js +0 -30
- package/dist/client/assets/radar-GUYGQ44K-608e459f.js +0 -1
- package/dist/client/assets/requirementDiagram-4Y6WPE33-90ebf889.js +0 -84
- package/dist/client/assets/sankeyDiagram-5OEKKPKP-2d1a83b3.js +0 -40
- package/dist/client/assets/sequenceDiagram-3UESZ5HK-aece3633.js +0 -162
- package/dist/client/assets/stateDiagram-AJRCARHV-9bd5b5f4.js +0 -1
- package/dist/client/assets/stateDiagram-v2-BHNVJYJU-7c16c251.js +0 -1
- package/dist/client/assets/step-171ad54a.js +0 -1
- package/dist/client/assets/treeView-BLDUP644-e54b9ddb.js +0 -1
- package/dist/client/assets/treemap-LRROVOQU-6a81775b.js +0 -1
- package/dist/client/assets/vennDiagram-CIIHVFJN-8eaf0464.js +0 -34
- package/dist/client/assets/wardley-L42UT6IY-7abd921f.js +0 -1
- package/dist/client/assets/xychartDiagram-2RQKCTM6-450f333c.js +0 -7
- /package/dist/client/assets/{KaTeX_AMS-Regular-0cdd387c.woff2 → KaTeX_AMS-Regular-BQhdFMY1.woff2} +0 -0
- /package/dist/client/assets/{KaTeX_AMS-Regular-30da91e8.woff → KaTeX_AMS-Regular-DMm9YOAa.woff} +0 -0
- /package/dist/client/assets/{KaTeX_AMS-Regular-68534840.ttf → KaTeX_AMS-Regular-DRggAlZN.ttf} +0 -0
- /package/dist/client/assets/{KaTeX_Caligraphic-Bold-07d8e303.ttf → KaTeX_Caligraphic-Bold-ATXxdsX0.ttf} +0 -0
- /package/dist/client/assets/{KaTeX_Caligraphic-Bold-1ae6bd74.woff → KaTeX_Caligraphic-Bold-BEiXGLvX.woff} +0 -0
- /package/dist/client/assets/{KaTeX_Caligraphic-Bold-de7701e4.woff2 → KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2} +0 -0
- /package/dist/client/assets/{KaTeX_Caligraphic-Regular-3398dd02.woff → KaTeX_Caligraphic-Regular-CTRA-rTL.woff} +0 -0
- /package/dist/client/assets/{KaTeX_Caligraphic-Regular-5d53e70a.woff2 → KaTeX_Caligraphic-Regular-Di6jR-x-.woff2} +0 -0
- /package/dist/client/assets/{KaTeX_Caligraphic-Regular-ed0b7437.ttf → KaTeX_Caligraphic-Regular-wX97UBjC.ttf} +0 -0
- /package/dist/client/assets/{KaTeX_Fraktur-Bold-9163df9c.ttf → KaTeX_Fraktur-Bold-BdnERNNW.ttf} +0 -0
- /package/dist/client/assets/{KaTeX_Fraktur-Bold-9be7ceb8.woff → KaTeX_Fraktur-Bold-BsDP51OF.woff} +0 -0
- /package/dist/client/assets/{KaTeX_Fraktur-Bold-74444efd.woff2 → KaTeX_Fraktur-Bold-CL6g_b3V.woff2} +0 -0
- /package/dist/client/assets/{KaTeX_Fraktur-Regular-1e6f9579.ttf → KaTeX_Fraktur-Regular-CB_wures.ttf} +0 -0
- /package/dist/client/assets/{KaTeX_Fraktur-Regular-51814d27.woff2 → KaTeX_Fraktur-Regular-CTYiF6lA.woff2} +0 -0
- /package/dist/client/assets/{KaTeX_Fraktur-Regular-5e28753b.woff → KaTeX_Fraktur-Regular-Dxdc4cR9.woff} +0 -0
- /package/dist/client/assets/{KaTeX_Main-Bold-0f60d1b8.woff2 → KaTeX_Main-Bold-Cx986IdX.woff2} +0 -0
- /package/dist/client/assets/{KaTeX_Main-Bold-c76c5d69.woff → KaTeX_Main-Bold-Jm3AIy58.woff} +0 -0
- /package/dist/client/assets/{KaTeX_Main-Bold-138ac28d.ttf → KaTeX_Main-Bold-waoOVXN0.ttf} +0 -0
- /package/dist/client/assets/{KaTeX_Main-BoldItalic-99cd42a3.woff2 → KaTeX_Main-BoldItalic-DxDJ3AOS.woff2} +0 -0
- /package/dist/client/assets/{KaTeX_Main-BoldItalic-70ee1f64.ttf → KaTeX_Main-BoldItalic-DzxPMmG6.ttf} +0 -0
- /package/dist/client/assets/{KaTeX_Main-BoldItalic-a6f7ec0d.woff → KaTeX_Main-BoldItalic-SpSLRI95.woff} +0 -0
- /package/dist/client/assets/{KaTeX_Main-Italic-0d85ae7c.ttf → KaTeX_Main-Italic-3WenGoN9.ttf} +0 -0
- /package/dist/client/assets/{KaTeX_Main-Italic-f1d6ef86.woff → KaTeX_Main-Italic-BMLOBm91.woff} +0 -0
- /package/dist/client/assets/{KaTeX_Main-Italic-97479ca6.woff2 → KaTeX_Main-Italic-NWA7e6Wa.woff2} +0 -0
- /package/dist/client/assets/{KaTeX_Main-Regular-c2342cd8.woff2 → KaTeX_Main-Regular-B22Nviop.woff2} +0 -0
- /package/dist/client/assets/{KaTeX_Main-Regular-c6368d87.woff → KaTeX_Main-Regular-Dr94JaBh.woff} +0 -0
- /package/dist/client/assets/{KaTeX_Main-Regular-d0332f52.ttf → KaTeX_Main-Regular-ypZvNtVU.ttf} +0 -0
- /package/dist/client/assets/{KaTeX_Math-BoldItalic-f9377ab0.ttf → KaTeX_Math-BoldItalic-B3XSjfu4.ttf} +0 -0
- /package/dist/client/assets/{KaTeX_Math-BoldItalic-dc47344d.woff2 → KaTeX_Math-BoldItalic-CZnvNsCZ.woff2} +0 -0
- /package/dist/client/assets/{KaTeX_Math-BoldItalic-850c0af5.woff → KaTeX_Math-BoldItalic-iY-2wyZ7.woff} +0 -0
- /package/dist/client/assets/{KaTeX_Math-Italic-8a8d2445.woff → KaTeX_Math-Italic-DA0__PXp.woff} +0 -0
- /package/dist/client/assets/{KaTeX_Math-Italic-08ce98e5.ttf → KaTeX_Math-Italic-flOr_0UB.ttf} +0 -0
- /package/dist/client/assets/{KaTeX_Math-Italic-7af58c5e.woff2 → KaTeX_Math-Italic-t53AETM-.woff2} +0 -0
- /package/dist/client/assets/{KaTeX_SansSerif-Bold-1ece03f7.ttf → KaTeX_SansSerif-Bold-CFMepnvq.ttf} +0 -0
- /package/dist/client/assets/{KaTeX_SansSerif-Bold-e99ae511.woff2 → KaTeX_SansSerif-Bold-D1sUS0GD.woff2} +0 -0
- /package/dist/client/assets/{KaTeX_SansSerif-Bold-ece03cfd.woff → KaTeX_SansSerif-Bold-DbIhKOiC.woff} +0 -0
- /package/dist/client/assets/{KaTeX_SansSerif-Italic-00b26ac8.woff2 → KaTeX_SansSerif-Italic-C3H0VqGB.woff2} +0 -0
- /package/dist/client/assets/{KaTeX_SansSerif-Italic-91ee6750.woff → KaTeX_SansSerif-Italic-DN2j7dab.woff} +0 -0
- /package/dist/client/assets/{KaTeX_SansSerif-Italic-3931dd81.ttf → KaTeX_SansSerif-Italic-YYjJ1zSn.ttf} +0 -0
- /package/dist/client/assets/{KaTeX_SansSerif-Regular-f36ea897.ttf → KaTeX_SansSerif-Regular-BNo7hRIc.ttf} +0 -0
- /package/dist/client/assets/{KaTeX_SansSerif-Regular-11e4dc8a.woff → KaTeX_SansSerif-Regular-CS6fqUqJ.woff} +0 -0
- /package/dist/client/assets/{KaTeX_SansSerif-Regular-68e8c73e.woff2 → KaTeX_SansSerif-Regular-DDBCnlJ7.woff2} +0 -0
- /package/dist/client/assets/{KaTeX_Script-Regular-1c67f068.ttf → KaTeX_Script-Regular-C5JkGWo-.ttf} +0 -0
- /package/dist/client/assets/{KaTeX_Script-Regular-036d4e95.woff2 → KaTeX_Script-Regular-D3wIWfF6.woff2} +0 -0
- /package/dist/client/assets/{KaTeX_Script-Regular-d96cdf2b.woff → KaTeX_Script-Regular-D5yQViql.woff} +0 -0
- /package/dist/client/assets/{KaTeX_Size1-Regular-c943cc98.woff → KaTeX_Size1-Regular-C195tn64.woff} +0 -0
- /package/dist/client/assets/{KaTeX_Size1-Regular-95b6d2f1.ttf → KaTeX_Size1-Regular-Dbsnue_I.ttf} +0 -0
- /package/dist/client/assets/{KaTeX_Size1-Regular-6b47c401.woff2 → KaTeX_Size1-Regular-mCD8mA8B.woff2} +0 -0
- /package/dist/client/assets/{KaTeX_Size2-Regular-a6b2099f.ttf → KaTeX_Size2-Regular-B7gKUWhC.ttf} +0 -0
- /package/dist/client/assets/{KaTeX_Size2-Regular-d04c5421.woff2 → KaTeX_Size2-Regular-Dy4dx90m.woff2} +0 -0
- /package/dist/client/assets/{KaTeX_Size2-Regular-2014c523.woff → KaTeX_Size2-Regular-oD1tc_U0.woff} +0 -0
- /package/dist/client/assets/{KaTeX_Size3-Regular-6ab6b62e.woff → KaTeX_Size3-Regular-CTq5MqoE.woff} +0 -0
- /package/dist/client/assets/{KaTeX_Size3-Regular-500e04d5.ttf → KaTeX_Size3-Regular-DgpXs0kz.ttf} +0 -0
- /package/dist/client/assets/{KaTeX_Size4-Regular-99f9c675.woff → KaTeX_Size4-Regular-BF-4gkZK.woff} +0 -0
- /package/dist/client/assets/{KaTeX_Size4-Regular-c647367d.ttf → KaTeX_Size4-Regular-DWFBv043.ttf} +0 -0
- /package/dist/client/assets/{KaTeX_Size4-Regular-a4af7d41.woff2 → KaTeX_Size4-Regular-Dl5lxZxV.woff2} +0 -0
- /package/dist/client/assets/{KaTeX_Typewriter-Regular-e14fed02.woff → KaTeX_Typewriter-Regular-C0xS9mPB.woff} +0 -0
- /package/dist/client/assets/{KaTeX_Typewriter-Regular-71d517d6.woff2 → KaTeX_Typewriter-Regular-CO6r4hn1.woff2} +0 -0
- /package/dist/client/assets/{KaTeX_Typewriter-Regular-f01f3e87.ttf → KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf} +0 -0
- /package/dist/client/assets/{colors-98f238a0.js → colors-Cc3OSVma.js} +0 -0
- /package/dist/client/assets/{defaultLocale-a8476f12.js → defaultLocale-CzDG__Ur.js} +0 -0
- /package/dist/client/assets/{index-a1656aec.js → index-Bi7T_FA4.js} +0 -0
- /package/dist/client/assets/{init-a5b10ee5.js → init-Dmth1JHB.js} +0 -0
- /package/dist/client/assets/{range-6bc2a9a0.js → range-OtVwhkKS.js} +0 -0
|
@@ -1,306 +0,0 @@
|
|
|
1
|
-
var kg=Object.defineProperty;var Sg=(e,t,r)=>t in e?kg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var gt=(e,t,r)=>(Sg(e,typeof t!="symbol"?t+"":t,r),r);import{p as Je,_ as ot}from"./index-ffc5af4b.js";import{T as wg,D as Tg,E as Bg,y as vg,z as po,A as fo,B as Lg,F as Fg,G as _g,H as Ag,c as vs,I as Mg,J as Eg,K as $g,L as Og,M as Ig,N as kn,O as Dg,P as Pg,Q as Sn,S as gi,U as Rg,V as wn,W as Tn,X as Bn,Y as vn,Z as Ln,_ as Fn,l as qg}from"./step-171ad54a.js";var Wg=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function zg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _n={exports:{}};(function(e,t){(function(r,i){e.exports=i()})(Wg,function(){var r=1e3,i=6e4,s=36e5,a="millisecond",o="second",n="minute",l="hour",h="day",c="week",d="month",g="quarter",u="year",y="date",f="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(D){var A=["th","st","nd","rd"],F=D%100;return"["+D+(A[(F-20)%10]||A[F]||A[0])+"]"}},k=function(D,A,F){var E=String(D);return!E||E.length>=A?D:""+Array(A+1-E.length).join(F)+D},T={s:k,z:function(D){var A=-D.utcOffset(),F=Math.abs(A),E=Math.floor(F/60),_=F%60;return(A<=0?"+":"-")+k(E,2,"0")+":"+k(_,2,"0")},m:function D(A,F){if(A.date()<F.date())return-D(F,A);var E=12*(F.year()-A.year())+(F.month()-A.month()),_=A.clone().add(E,d),S=F-_<0,R=A.clone().add(E+(S?-1:1),d);return+(-(E+(F-_)/(S?_-R:R-_))||0)},a:function(D){return D<0?Math.ceil(D)||0:Math.floor(D)},p:function(D){return{M:d,y:u,w:c,d:h,D:y,h:l,m:n,s:o,ms:a,Q:g}[D]||String(D||"").toLowerCase().replace(/s$/,"")},u:function(D){return D===void 0}},w="en",B={};B[w]=b;var M="$isDayjsObject",L=function(D){return D instanceof N||!(!D||!D[M])},W=function D(A,F,E){var _;if(!A)return w;if(typeof A=="string"){var S=A.toLowerCase();B[S]&&(_=S),F&&(B[S]=F,_=S);var R=A.split("-");if(!_&&R.length>1)return D(R[0])}else{var et=A.name;B[et]=A,_=et}return!E&&_&&(w=_),_||!E&&w},P=function(D,A){if(L(D))return D.clone();var F=typeof A=="object"?A:{};return F.date=D,F.args=arguments,new N(F)},$=T;$.l=W,$.i=L,$.w=function(D,A){return P(D,{locale:A.$L,utc:A.$u,x:A.$x,$offset:A.$offset})};var N=function(){function D(F){this.$L=W(F.locale,null,!0),this.parse(F),this.$x=this.$x||F.x||{},this[M]=!0}var A=D.prototype;return A.parse=function(F){this.$d=function(E){var _=E.date,S=E.utc;if(_===null)return new Date(NaN);if($.u(_))return new Date;if(_ instanceof Date)return new Date(_);if(typeof _=="string"&&!/Z$/i.test(_)){var R=_.match(m);if(R){var et=R[2]-1||0,st=(R[7]||"0").substring(0,3);return S?new Date(Date.UTC(R[1],et,R[3]||1,R[4]||0,R[5]||0,R[6]||0,st)):new Date(R[1],et,R[3]||1,R[4]||0,R[5]||0,R[6]||0,st)}}return new Date(_)}(F),this.init()},A.init=function(){var F=this.$d;this.$y=F.getFullYear(),this.$M=F.getMonth(),this.$D=F.getDate(),this.$W=F.getDay(),this.$H=F.getHours(),this.$m=F.getMinutes(),this.$s=F.getSeconds(),this.$ms=F.getMilliseconds()},A.$utils=function(){return $},A.isValid=function(){return this.$d.toString()!==f},A.isSame=function(F,E){var _=P(F);return this.startOf(E)<=_&&_<=this.endOf(E)},A.isAfter=function(F,E){return P(F)<this.startOf(E)},A.isBefore=function(F,E){return this.endOf(E)<P(F)},A.$g=function(F,E,_){return $.u(F)?this[E]:this.set(_,F)},A.unix=function(){return Math.floor(this.valueOf()/1e3)},A.valueOf=function(){return this.$d.getTime()},A.startOf=function(F,E){var _=this,S=!!$.u(E)||E,R=$.p(F),et=function(re,V){var rt=$.w(_.$u?Date.UTC(_.$y,V,re):new Date(_.$y,V,re),_);return S?rt:rt.endOf(h)},st=function(re,V){return $.w(_.toDate()[re].apply(_.toDate("s"),(S?[0,0,0,0]:[23,59,59,999]).slice(V)),_)},lt=this.$W,nt=this.$M,dt=this.$D,xt="set"+(this.$u?"UTC":"");switch(R){case u:return S?et(1,0):et(31,11);case d:return S?et(1,nt):et(0,nt+1);case c:var $t=this.$locale().weekStart||0,ee=(lt<$t?lt+7:lt)-$t;return et(S?dt-ee:dt+(6-ee),nt);case h:case y:return st(xt+"Hours",0);case l:return st(xt+"Minutes",1);case n:return st(xt+"Seconds",2);case o:return st(xt+"Milliseconds",3);default:return this.clone()}},A.endOf=function(F){return this.startOf(F,!1)},A.$set=function(F,E){var _,S=$.p(F),R="set"+(this.$u?"UTC":""),et=(_={},_[h]=R+"Date",_[y]=R+"Date",_[d]=R+"Month",_[u]=R+"FullYear",_[l]=R+"Hours",_[n]=R+"Minutes",_[o]=R+"Seconds",_[a]=R+"Milliseconds",_)[S],st=S===h?this.$D+(E-this.$W):E;if(S===d||S===u){var lt=this.clone().set(y,1);lt.$d[et](st),lt.init(),this.$d=lt.set(y,Math.min(this.$D,lt.daysInMonth())).$d}else et&&this.$d[et](st);return this.init(),this},A.set=function(F,E){return this.clone().$set(F,E)},A.get=function(F){return this[$.p(F)]()},A.add=function(F,E){var _,S=this;F=Number(F);var R=$.p(E),et=function(nt){var dt=P(S);return $.w(dt.date(dt.date()+Math.round(nt*F)),S)};if(R===d)return this.set(d,this.$M+F);if(R===u)return this.set(u,this.$y+F);if(R===h)return et(1);if(R===c)return et(7);var st=(_={},_[n]=i,_[l]=s,_[o]=r,_)[R]||1,lt=this.$d.getTime()+F*st;return $.w(lt,this)},A.subtract=function(F,E){return this.add(-1*F,E)},A.format=function(F){var E=this,_=this.$locale();if(!this.isValid())return _.invalidDate||f;var S=F||"YYYY-MM-DDTHH:mm:ssZ",R=$.z(this),et=this.$H,st=this.$m,lt=this.$M,nt=_.weekdays,dt=_.months,xt=_.meridiem,$t=function(V,rt,pt,wt){return V&&(V[rt]||V(E,S))||pt[rt].slice(0,wt)},ee=function(V){return $.s(et%12||12,V,"0")},re=xt||function(V,rt,pt){var wt=V<12?"AM":"PM";return pt?wt.toLowerCase():wt};return S.replace(C,function(V,rt){return rt||function(pt){switch(pt){case"YY":return String(E.$y).slice(-2);case"YYYY":return $.s(E.$y,4,"0");case"M":return lt+1;case"MM":return $.s(lt+1,2,"0");case"MMM":return $t(_.monthsShort,lt,dt,3);case"MMMM":return $t(dt,lt);case"D":return E.$D;case"DD":return $.s(E.$D,2,"0");case"d":return String(E.$W);case"dd":return $t(_.weekdaysMin,E.$W,nt,2);case"ddd":return $t(_.weekdaysShort,E.$W,nt,3);case"dddd":return nt[E.$W];case"H":return String(et);case"HH":return $.s(et,2,"0");case"h":return ee(1);case"hh":return ee(2);case"a":return re(et,st,!0);case"A":return re(et,st,!1);case"m":return String(st);case"mm":return $.s(st,2,"0");case"s":return String(E.$s);case"ss":return $.s(E.$s,2,"0");case"SSS":return $.s(E.$ms,3,"0");case"Z":return R}return null}(V)||R.replace(":","")})},A.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},A.diff=function(F,E,_){var S,R=this,et=$.p(E),st=P(F),lt=(st.utcOffset()-this.utcOffset())*i,nt=this-st,dt=function(){return $.m(R,st)};switch(et){case u:S=dt()/12;break;case d:S=dt();break;case g:S=dt()/3;break;case c:S=(nt-lt)/6048e5;break;case h:S=(nt-lt)/864e5;break;case l:S=nt/s;break;case n:S=nt/i;break;case o:S=nt/r;break;default:S=nt}return _?S:$.a(S)},A.daysInMonth=function(){return this.endOf(d).$D},A.$locale=function(){return B[this.$L]},A.locale=function(F,E){if(!F)return this.$L;var _=this.clone(),S=W(F,E,!0);return S&&(_.$L=S),_},A.clone=function(){return $.w(this.$d,this)},A.toDate=function(){return new Date(this.valueOf())},A.toJSON=function(){return this.isValid()?this.toISOString():null},A.toISOString=function(){return this.$d.toISOString()},A.toString=function(){return this.$d.toUTCString()},D}(),z=N.prototype;return P.prototype=z,[["$ms",a],["$s",o],["$m",n],["$H",l],["$W",h],["$M",d],["$y",u],["$D",y]].forEach(function(D){z[D[1]]=function(A){return this.$g(A,D[0],D[1])}}),P.extend=function(D,A){return D.$i||(D(A,N,P),D.$i=!0),P},P.locale=W,P.isDayjs=L,P.unix=function(D){return P(1e3*D)},P.en=B[w],P.Ls=B,P.p={},P})})(_n);var Ng=_n.exports;const Hg=zg(Ng);var An=Object.defineProperty,p=(e,t)=>An(e,"name",{value:t,configurable:!0}),Yg=(e,t)=>{for(var r in t)An(e,r,{get:t[r],enumerable:!0})},de={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},q={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},Ca=p(function(e="fatal"){let t=de.fatal;typeof e=="string"?e.toLowerCase()in de&&(t=de[e]):typeof e=="number"&&(t=e),q.trace=()=>{},q.debug=()=>{},q.info=()=>{},q.warn=()=>{},q.error=()=>{},q.fatal=()=>{},t<=de.fatal&&(q.fatal=console.error?console.error.bind(console,Yt("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Yt("FATAL"))),t<=de.error&&(q.error=console.error?console.error.bind(console,Yt("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Yt("ERROR"))),t<=de.warn&&(q.warn=console.warn?console.warn.bind(console,Yt("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Yt("WARN"))),t<=de.info&&(q.info=console.info?console.info.bind(console,Yt("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Yt("INFO"))),t<=de.debug&&(q.debug=console.debug?console.debug.bind(console,Yt("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Yt("DEBUG"))),t<=de.trace&&(q.trace=console.debug?console.debug.bind(console,Yt("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Yt("TRACE")))},"setLogLevel"),Yt=p(e=>`%c${Hg().format("ss.SSS")} : ${e} : `,"format");const pi={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const s=r<.5?r*(1+t):r+t-r*t,a=2*r-s;switch(i){case"r":return pi.hue2rgb(a,s,e+1/3)*255;case"g":return pi.hue2rgb(a,s,e)*255;case"b":return pi.hue2rgb(a,s,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const s=Math.max(e,t,r),a=Math.min(e,t,r),o=(s+a)/2;if(i==="l")return o*100;if(s===a)return 0;const n=s-a,l=o>.5?n/(2-s-a):n/(s+a);if(i==="s")return l*100;switch(s){case e:return((t-r)/n+(t<r?6:0))*60;case t:return((r-e)/n+2)*60;case r:return((e-t)/n+4)*60;default:return-1}}},Ug=pi,jg={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},Xg=jg,Gg={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},Vg=Gg,Zg={channel:Ug,lang:Xg,unit:Vg},tt=Zg,we={};for(let e=0;e<=255;e++)we[e]=tt.unit.dec2hex(e);const Ft={ALL:0,RGB:1,HSL:2};class Qg{constructor(){this.type=Ft.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=Ft.ALL}is(t){return this.type===t}}const Kg=Qg;class Jg{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Kg}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Ft.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:s}=t;r===void 0&&(t.h=tt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=tt.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=tt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=tt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=tt.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=tt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Ft.HSL)&&r!==void 0?r:(this._ensureHSL(),tt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Ft.HSL)&&r!==void 0?r:(this._ensureHSL(),tt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Ft.HSL)&&r!==void 0?r:(this._ensureHSL(),tt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Ft.RGB)&&r!==void 0?r:(this._ensureRGB(),tt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Ft.RGB)&&r!==void 0?r:(this._ensureRGB(),tt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Ft.RGB)&&r!==void 0?r:(this._ensureRGB(),tt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Ft.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Ft.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Ft.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Ft.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Ft.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Ft.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const tp=Jg,ep=new tp({r:0,g:0,b:0,a:0},"transparent"),Qi=ep,Mn={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Mn.re);if(!t)return;const r=t[1],i=parseInt(r,16),s=r.length,a=s%4===0,o=s>4,n=o?1:17,l=o?8:4,h=a?0:-1,c=o?255:15;return Qi.set({r:(i>>l*(h+3)&c)*n,g:(i>>l*(h+2)&c)*n,b:(i>>l*(h+1)&c)*n,a:a?(i&c)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`#${we[Math.round(t)]}${we[Math.round(r)]}${we[Math.round(i)]}${we[Math.round(s*255)]}`:`#${we[Math.round(t)]}${we[Math.round(r)]}${we[Math.round(i)]}`}},Sr=Mn,fi={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(fi.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return tt.channel.clamp.h(parseFloat(r)*.9);case"rad":return tt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return tt.channel.clamp.h(parseFloat(r)*360)}}return tt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(fi.re);if(!r)return;const[,i,s,a,o,n]=r;return Qi.set({h:fi._hue2deg(i),s:tt.channel.clamp.s(parseFloat(s)),l:tt.channel.clamp.l(parseFloat(a)),a:o?tt.channel.clamp.a(n?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:s}=e;return s<1?`hsla(${tt.lang.round(t)}, ${tt.lang.round(r)}%, ${tt.lang.round(i)}%, ${s})`:`hsl(${tt.lang.round(t)}, ${tt.lang.round(r)}%, ${tt.lang.round(i)}%)`}},ii=fi,mi={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=mi.colors[e];if(t)return Sr.parse(t)},stringify:e=>{const t=Sr.stringify(e);for(const r in mi.colors)if(mi.colors[r]===t)return r}},mo=mi,En={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(En.re);if(!r)return;const[,i,s,a,o,n,l,h,c]=r;return Qi.set({r:tt.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:tt.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:tt.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:h?tt.channel.clamp.a(c?parseFloat(h)/100:parseFloat(h)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`rgba(${tt.lang.round(t)}, ${tt.lang.round(r)}, ${tt.lang.round(i)}, ${tt.lang.round(s)})`:`rgb(${tt.lang.round(t)}, ${tt.lang.round(r)}, ${tt.lang.round(i)})`}},si=En,rp={format:{keyword:mo,hex:Sr,rgb:si,rgba:si,hsl:ii,hsla:ii},parse:e=>{if(typeof e!="string")return e;const t=Sr.parse(e)||si.parse(e)||ii.parse(e)||mo.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Ft.HSL)||e.data.r===void 0?ii.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?si.stringify(e):Sr.stringify(e)},oe=rp,ip=(e,t)=>{const r=oe.parse(e);for(const i in t)r[i]=tt.channel.clamp[i](t[i]);return oe.stringify(r)},$n=ip,sp=(e,t,r=0,i=1)=>{if(typeof e!="number")return $n(e,{a:t});const s=Qi.set({r:tt.channel.clamp.r(e),g:tt.channel.clamp.g(t),b:tt.channel.clamp.b(r),a:tt.channel.clamp.a(i)});return oe.stringify(s)},ve=sp,ap=e=>{const{r:t,g:r,b:i}=oe.parse(e),s=.2126*tt.channel.toLinear(t)+.7152*tt.channel.toLinear(r)+.0722*tt.channel.toLinear(i);return tt.lang.round(s)},op=ap,np=e=>op(e)>=.5,lp=np,hp=e=>!lp(e),Jt=hp,cp=(e,t,r)=>{const i=oe.parse(e),s=i[t],a=tt.channel.clamp[t](s+r);return s!==a&&(i[t]=a),oe.stringify(i)},On=cp,dp=(e,t)=>On(e,"l",t),O=dp,up=(e,t)=>On(e,"l",-t),I=up,gp=(e,t)=>{const r=oe.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return $n(e,i)},x=gp,pp=(e,t,r=50)=>{const{r:i,g:s,b:a,a:o}=oe.parse(e),{r:n,g:l,b:h,a:c}=oe.parse(t),d=r/100,g=d*2-1,u=o-c,f=((g*u===-1?g:(g+u)/(1+g*u))+1)/2,m=1-f,C=i*f+n*m,b=s*f+l*m,k=a*f+h*m,T=o*d+c*(1-d);return ve(C,b,k,T)},fp=pp,mp=(e,t=100)=>{const r=oe.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,fp(r,e,t)},v=mp;var In=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,wr=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,yp=/\s*%%.*\n/gm,Ir,Dn=(Ir=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},p(Ir,"UnknownDiagramError"),Ir),Re={},xa=p(function(e,t){e=e.replace(In,"").replace(wr,"").replace(yp,`
|
|
2
|
-
`);for(const[r,{detector:i}]of Object.entries(Re))if(i(e,t))return r;throw new Dn(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Ls=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)Pn(t,r,i)},"registerLazyLoadedDiagrams"),Pn=p((e,t,r)=>{Re[e]&&q.warn(`Detector with key ${e} already exists. Overwriting.`),Re[e]={detector:t,loader:r},q.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),Cp=p(e=>Re[e].loader,"getDiagramLoader"),Fs=p((e,t,{depth:r=2,clobber:i=!1}={})=>{const s={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(a=>Fs(e,a,s)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(a=>{e.includes(a)||e.push(a)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(a=>{typeof t[a]=="object"&&t[a]!==null&&(e[a]===void 0||typeof e[a]=="object")?(e[a]===void 0&&(e[a]=Array.isArray(t[a])?[]:{}),e[a]=Fs(e[a],t[a],{depth:r-1,clobber:i})):(i||typeof e[a]!="object"&&typeof t[a]!="object")&&(e[a]=t[a])}),e)},"assignWithDepth"),kt=Fs,le="#ffffff",he="#f2f2f2",J=p((e,t)=>t?x(e,{s:-40,l:10}):x(e,{s:-40,l:-10}),"mkBorder"),Dr,xp=(Dr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var r,i,s,a,o,n,l,h,c,d,g,u,y,f,m,C,b,k,T,w,B,M,L,W,P,$,N,z,D,A,F,E,_,S;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||J(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||J(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||J(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||v(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||v(this.tertiaryColor),this.lineColor=this.lineColor||v(this.background),this.arrowheadColor=this.arrowheadColor||v(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||I(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||v(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||O(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||I(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||I(this.mainBkg,10)):(this.rowOdd=this.rowOdd||O(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||O(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScale"+R]=I(this["cScale"+R],75);else for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScale"+R]=I(this["cScale"+R],25);for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScaleInv"+R]=this["cScaleInv"+R]||v(this["cScale"+R]);for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this.darkMode?this["cScalePeer"+R]=this["cScalePeer"+R]||O(this["cScale"+R],10):this["cScalePeer"+R]=this["cScalePeer"+R]||I(this["cScale"+R],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScaleLabel"+R]=this["cScaleLabel"+R]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let R=0;R<5;R++)this["surface"+R]=this["surface"+R]||x(this.mainBkg,{h:180,s:-15,l:t*(5+R*3)}),this["surfacePeer"+R]=this["surfacePeer"+R]||x(this.mainBkg,{h:180,s:-15,l:t*(8+R*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.radar={axisColor:((r=this.radar)==null?void 0:r.axisColor)||this.lineColor,axisStrokeWidth:((i=this.radar)==null?void 0:i.axisStrokeWidth)||2,axisLabelFontSize:((s=this.radar)==null?void 0:s.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((n=this.radar)==null?void 0:n.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((l=this.radar)==null?void 0:l.graticuleStrokeWidth)||1,graticuleOpacity:((h=this.radar)==null?void 0:h.graticuleOpacity)||.3,legendBoxSize:((c=this.radar)==null?void 0:c.legendBoxSize)||12,legendFontSize:((d=this.radar)==null?void 0:d.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((g=this.wardley)==null?void 0:g.backgroundColor)||this.background,axisColor:((u=this.wardley)==null?void 0:u.axisColor)||this.lineColor,axisTextColor:((y=this.wardley)==null?void 0:y.axisTextColor)||this.primaryTextColor,gridColor:((f=this.wardley)==null?void 0:f.gridColor)||this.gridColor,componentFill:((m=this.wardley)==null?void 0:m.componentFill)||this.background,componentStroke:((C=this.wardley)==null?void 0:C.componentStroke)||this.lineColor,componentLabelColor:((b=this.wardley)==null?void 0:b.componentLabelColor)||this.primaryTextColor,linkStroke:((k=this.wardley)==null?void 0:k.linkStroke)||this.lineColor,evolutionStroke:((T=this.wardley)==null?void 0:T.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((w=this.wardley)==null?void 0:w.annotationStroke)||this.lineColor,annotationTextColor:((B=this.wardley)==null?void 0:B.annotationTextColor)||this.primaryTextColor,annotationFill:((M=this.wardley)==null?void 0:M.annotationFill)||this.background},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?O(this.quadrant1Fill):I(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((L=this.xyChart)==null?void 0:L.backgroundColor)||this.background,titleColor:((W=this.xyChart)==null?void 0:W.titleColor)||this.primaryTextColor,dataLabelColor:((P=this.xyChart)==null?void 0:P.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:(($=this.xyChart)==null?void 0:$.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((N=this.xyChart)==null?void 0:N.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((z=this.xyChart)==null?void 0:z.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((D=this.xyChart)==null?void 0:D.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((A=this.xyChart)==null?void 0:A.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((F=this.xyChart)==null?void 0:F.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((E=this.xyChart)==null?void 0:E.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((_=this.xyChart)==null?void 0:_.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((S=this.xyChart)==null?void 0:S.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=I(this.git0,25),this.git1=I(this.git1,25),this.git2=I(this.git2,25),this.git3=I(this.git3,25),this.git4=I(this.git4,25),this.git5=I(this.git5,25),this.git6=I(this.git6,25),this.git7=I(this.git7,25)),this.gitInv0=this.gitInv0||v(this.git0),this.gitInv1=this.gitInv1||v(this.git1),this.gitInv2=this.gitInv2||v(this.git2),this.gitInv3=this.gitInv3||v(this.git3),this.gitInv4=this.gitInv4||v(this.git4),this.gitInv5=this.gitInv5||v(this.git5),this.gitInv6=this.gitInv6||v(this.git6),this.gitInv7=this.gitInv7||v(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||le,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||he,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Dr,"Theme"),Dr),bp=p(e=>{const t=new xp;return t.calculate(e),t},"getThemeVariables"),Pr,kp=(Pr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=O(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=v(this.background),this.secondaryBorderColor=J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=J(this.tertiaryColor,this.darkMode),this.primaryTextColor=v(this.primaryColor),this.secondaryTextColor=v(this.secondaryColor),this.tertiaryTextColor=v(this.tertiaryColor),this.lineColor=v(this.background),this.textColor=v(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=O(v("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=ve(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=I("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=I(this.sectionBkgColor,10),this.taskBorderColor=ve(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=ve(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||O(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||I(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){var t,r,i,s,a,o,n,l,h,c,d,g,u,y,f,m,C,b,k,T,w,B,M,L,W,P,$,N,z,D,A,F,E,_;this.secondBkg=O(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=O(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=O(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=v(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330});for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScaleInv"+S]=this["cScaleInv"+S]||v(this["cScale"+S]);for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScalePeer"+S]=this["cScalePeer"+S]||O(this["cScale"+S],10);for(let S=0;S<5;S++)this["surface"+S]=this["surface"+S]||x(this.mainBkg,{h:30,s:-30,l:-(-10+S*4)}),this["surfacePeer"+S]=this["surfacePeer"+S]||x(this.mainBkg,{h:30,s:-30,l:-(-7+S*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScaleLabel"+S]=this["cScaleLabel"+S]||this.scaleLabelColor;for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["pie"+S]=this["cScale"+S];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let S=0;S<8;S++)this["venn"+(S+1)]=this["venn"+(S+1)]??O(this["cScale"+S],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?O(this.quadrant1Fill):I(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,dataLabelColor:((i=this.xyChart)==null?void 0:i.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.plotColorPalette)||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:((u=this.radar)==null?void 0:u.axisColor)||this.lineColor,axisStrokeWidth:((y=this.radar)==null?void 0:y.axisStrokeWidth)||2,axisLabelFontSize:((f=this.radar)==null?void 0:f.axisLabelFontSize)||12,curveOpacity:((m=this.radar)==null?void 0:m.curveOpacity)||.5,curveStrokeWidth:((C=this.radar)==null?void 0:C.curveStrokeWidth)||2,graticuleColor:((b=this.radar)==null?void 0:b.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((k=this.radar)==null?void 0:k.graticuleStrokeWidth)||1,graticuleOpacity:((T=this.radar)==null?void 0:T.graticuleOpacity)||.3,legendBoxSize:((w=this.radar)==null?void 0:w.legendBoxSize)||12,legendFontSize:((B=this.radar)==null?void 0:B.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:((M=this.wardley)==null?void 0:M.backgroundColor)||this.background,axisColor:((L=this.wardley)==null?void 0:L.axisColor)||this.lineColor,axisTextColor:((W=this.wardley)==null?void 0:W.axisTextColor)||this.primaryTextColor,gridColor:((P=this.wardley)==null?void 0:P.gridColor)||this.gridColor,componentFill:(($=this.wardley)==null?void 0:$.componentFill)||this.mainBkg,componentStroke:((N=this.wardley)==null?void 0:N.componentStroke)||this.lineColor,componentLabelColor:((z=this.wardley)==null?void 0:z.componentLabelColor)||this.primaryTextColor,linkStroke:((D=this.wardley)==null?void 0:D.linkStroke)||this.lineColor,evolutionStroke:((A=this.wardley)==null?void 0:A.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((F=this.wardley)==null?void 0:F.annotationStroke)||this.lineColor,annotationTextColor:((E=this.wardley)==null?void 0:E.annotationTextColor)||this.primaryTextColor,annotationFill:((_=this.wardley)==null?void 0:_.annotationFill)||this.mainBkg},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=O(this.secondaryColor,20),this.git1=O(this.pie2||this.secondaryColor,20),this.git2=O(this.pie3||this.tertiaryColor,20),this.git3=O(this.pie4||x(this.primaryColor,{h:-30}),20),this.git4=O(this.pie5||x(this.primaryColor,{h:-60}),20),this.git5=O(this.pie6||x(this.primaryColor,{h:-90}),10),this.git6=O(this.pie7||x(this.primaryColor,{h:60}),10),this.git7=O(this.pie8||x(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||v(this.git0),this.gitInv1=this.gitInv1||v(this.git1),this.gitInv2=this.gitInv2||v(this.git2),this.gitInv3=this.gitInv3||v(this.git3),this.gitInv4=this.gitInv4||v(this.git4),this.gitInv5=this.gitInv5||v(this.git5),this.gitInv6=this.gitInv6||v(this.git6),this.gitInv7=this.gitInv7||v(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||v(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||v(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||O("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||O("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||O("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||O("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||O(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||O(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||O(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||O(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Pr,"Theme"),Pr),Sp=p(e=>{const t=new kp;return t.calculate(e),t},"getThemeVariables"),Rr,wp=(Rr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=x(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=J(this.primaryColor,this.darkMode),this.secondaryBorderColor=J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=J(this.tertiaryColor,this.darkMode),this.primaryTextColor=v(this.primaryColor),this.secondaryTextColor=v(this.secondaryColor),this.tertiaryTextColor=v(this.tertiaryColor),this.lineColor=v(this.background),this.textColor=v(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=J(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=ve(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){var t,r,i,s,a,o,n,l,h,c,d,g,u,y,f,m,C,b,k,T,w,B,M,L,W,P,$,N,z,D,A,F,E,_;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||I(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||I(this.tertiaryColor,40);for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScale"+S]=I(this["cScale"+S],10),this["cScalePeer"+S]=this["cScalePeer"+S]||I(this["cScale"+S],25);for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScaleInv"+S]=this["cScaleInv"+S]||x(this["cScale"+S],{h:180});for(let S=0;S<5;S++)this["surface"+S]=this["surface"+S]||x(this.mainBkg,{h:30,l:-(5+S*5)}),this["surfacePeer"+S]=this["surfacePeer"+S]||x(this.mainBkg,{h:30,l:-(7+S*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||v(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||v(this.labelTextColor);for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScaleLabel"+S]=this["cScaleLabel"+S]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||O(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||O(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||x(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-30}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||x(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?O(this.quadrant1Fill):I(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((s=this.radar)==null?void 0:s.curveOpacity)||.5,curveStrokeWidth:((a=this.radar)==null?void 0:a.curveStrokeWidth)||2,graticuleColor:((o=this.radar)==null?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((n=this.radar)==null?void 0:n.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.graticuleOpacity)||.3,legendBoxSize:((h=this.radar)==null?void 0:h.legendBoxSize)||12,legendFontSize:((c=this.radar)==null?void 0:c.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((d=this.wardley)==null?void 0:d.backgroundColor)||this.background,axisColor:((g=this.wardley)==null?void 0:g.axisColor)||this.lineColor,axisTextColor:((u=this.wardley)==null?void 0:u.axisTextColor)||this.primaryTextColor,gridColor:((y=this.wardley)==null?void 0:y.gridColor)||this.gridColor,componentFill:((f=this.wardley)==null?void 0:f.componentFill)||this.background,componentStroke:((m=this.wardley)==null?void 0:m.componentStroke)||this.lineColor,componentLabelColor:((C=this.wardley)==null?void 0:C.componentLabelColor)||this.primaryTextColor,linkStroke:((b=this.wardley)==null?void 0:b.linkStroke)||this.lineColor,evolutionStroke:((k=this.wardley)==null?void 0:k.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((T=this.wardley)==null?void 0:T.annotationStroke)||this.lineColor,annotationTextColor:((w=this.wardley)==null?void 0:w.annotationTextColor)||this.primaryTextColor,annotationFill:((B=this.wardley)==null?void 0:B.annotationFill)||this.background},this.xyChart={backgroundColor:((M=this.xyChart)==null?void 0:M.backgroundColor)||this.background,titleColor:((L=this.xyChart)==null?void 0:L.titleColor)||this.primaryTextColor,dataLabelColor:((W=this.xyChart)==null?void 0:W.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((P=this.xyChart)==null?void 0:P.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:(($=this.xyChart)==null?void 0:$.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((N=this.xyChart)==null?void 0:N.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((z=this.xyChart)==null?void 0:z.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((D=this.xyChart)==null?void 0:D.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((A=this.xyChart)==null?void 0:A.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((F=this.xyChart)==null?void 0:F.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((E=this.xyChart)==null?void 0:E.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((_=this.xyChart)==null?void 0:_.plotColorPalette)||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=I(this.git0,25),this.git1=I(this.git1,25),this.git2=I(this.git2,25),this.git3=I(this.git3,25),this.git4=I(this.git4,25),this.git5=I(this.git5,25),this.git6=I(this.git6,25),this.git7=I(this.git7,25)),this.gitInv0=this.gitInv0||I(v(this.git0),25),this.gitInv1=this.gitInv1||v(this.git1),this.gitInv2=this.gitInv2||v(this.git2),this.gitInv3=this.gitInv3||v(this.git3),this.gitInv4=this.gitInv4||v(this.git4),this.gitInv5=this.gitInv5||v(this.git5),this.gitInv6=this.gitInv6||v(this.git6),this.gitInv7=this.gitInv7||v(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||v(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||v(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||le,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||he}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Rr,"Theme"),Rr),Tp=p(e=>{const t=new wp;return t.calculate(e),t},"getThemeVariables"),qr,Bp=(qr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=O("#cde498",10),this.primaryBorderColor=J(this.primaryColor,this.darkMode),this.secondaryBorderColor=J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=J(this.tertiaryColor,this.darkMode),this.primaryTextColor=v(this.primaryColor),this.secondaryTextColor=v(this.secondaryColor),this.tertiaryTextColor=v(this.primaryColor),this.lineColor=v(this.background),this.textColor=v(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){var t,r,i,s,a,o,n,l,h,c,d,g,u,y,f,m,C,b,k,T,w,B,M,L,W,P,$,N,z,D,A,F,E,_;this.actorBorder=I(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||I(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||I(this.tertiaryColor,40);for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScale"+S]=I(this["cScale"+S],10),this["cScalePeer"+S]=this["cScalePeer"+S]||I(this["cScale"+S],25);for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScaleInv"+S]=this["cScaleInv"+S]||x(this["cScale"+S],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScaleLabel"+S]=this["cScaleLabel"+S]||this.scaleLabelColor;for(let S=0;S<5;S++)this["surface"+S]=this["surface"+S]||x(this.mainBkg,{h:30,s:-30,l:-(5+S*5)}),this["surfacePeer"+S]=this["surfacePeer"+S]||x(this.mainBkg,{h:30,s:-30,l:-(8+S*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||O(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||O(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-30}),this.pie5=this.pie5||x(this.secondaryColor,{l:-30}),this.pie6=this.pie6||x(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?O(this.quadrant1Fill):I(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((s=this.radar)==null?void 0:s.curveOpacity)||.5,curveStrokeWidth:((a=this.radar)==null?void 0:a.curveStrokeWidth)||2,graticuleColor:((o=this.radar)==null?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((n=this.radar)==null?void 0:n.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.graticuleOpacity)||.3,legendBoxSize:((h=this.radar)==null?void 0:h.legendBoxSize)||12,legendFontSize:((c=this.radar)==null?void 0:c.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((d=this.wardley)==null?void 0:d.backgroundColor)||this.background,axisColor:((g=this.wardley)==null?void 0:g.axisColor)||this.lineColor,axisTextColor:((u=this.wardley)==null?void 0:u.axisTextColor)||this.primaryTextColor,gridColor:((y=this.wardley)==null?void 0:y.gridColor)||this.gridColor,componentFill:((f=this.wardley)==null?void 0:f.componentFill)||this.background,componentStroke:((m=this.wardley)==null?void 0:m.componentStroke)||this.lineColor,componentLabelColor:((C=this.wardley)==null?void 0:C.componentLabelColor)||this.primaryTextColor,linkStroke:((b=this.wardley)==null?void 0:b.linkStroke)||this.lineColor,evolutionStroke:((k=this.wardley)==null?void 0:k.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((T=this.wardley)==null?void 0:T.annotationStroke)||this.lineColor,annotationTextColor:((w=this.wardley)==null?void 0:w.annotationTextColor)||this.primaryTextColor,annotationFill:((B=this.wardley)==null?void 0:B.annotationFill)||this.background},this.xyChart={backgroundColor:((M=this.xyChart)==null?void 0:M.backgroundColor)||this.background,titleColor:((L=this.xyChart)==null?void 0:L.titleColor)||this.primaryTextColor,dataLabelColor:((W=this.xyChart)==null?void 0:W.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((P=this.xyChart)==null?void 0:P.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:(($=this.xyChart)==null?void 0:$.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((N=this.xyChart)==null?void 0:N.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((z=this.xyChart)==null?void 0:z.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((D=this.xyChart)==null?void 0:D.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((A=this.xyChart)==null?void 0:A.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((F=this.xyChart)==null?void 0:F.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((E=this.xyChart)==null?void 0:E.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((_=this.xyChart)==null?void 0:_.plotColorPalette)||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=I(this.git0,25),this.git1=I(this.git1,25),this.git2=I(this.git2,25),this.git3=I(this.git3,25),this.git4=I(this.git4,25),this.git5=I(this.git5,25),this.git6=I(this.git6,25),this.git7=I(this.git7,25)),this.gitInv0=this.gitInv0||v(this.git0),this.gitInv1=this.gitInv1||v(this.git1),this.gitInv2=this.gitInv2||v(this.git2),this.gitInv3=this.gitInv3||v(this.git3),this.gitInv4=this.gitInv4||v(this.git4),this.gitInv5=this.gitInv5||v(this.git5),this.gitInv6=this.gitInv6||v(this.git6),this.gitInv7=this.gitInv7||v(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||v(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||v(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||le,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||he}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(qr,"Theme"),qr),vp=p(e=>{const t=new Bp;return t.calculate(e),t},"getThemeVariables"),Wr,Lp=(Wr=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=O(this.contrast,55),this.background="#ffffff",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=J(this.primaryColor,this.darkMode),this.secondaryBorderColor=J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=J(this.tertiaryColor,this.darkMode),this.primaryTextColor=v(this.primaryColor),this.secondaryTextColor=v(this.secondaryColor),this.tertiaryTextColor=v(this.tertiaryColor),this.lineColor=v(this.background),this.textColor=v(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||O(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var t,r,i,s,a,o,n,l,h,c,d,g,u,y,f,m,C,b,k,T,w,B,M,L,W,P,$,N,z,D,A,F,E,_;this.secondBkg=O(this.contrast,55),this.border2=this.contrast,this.actorBorder=O(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScaleInv"+S]=this["cScaleInv"+S]||v(this["cScale"+S]);for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this.darkMode?this["cScalePeer"+S]=this["cScalePeer"+S]||O(this["cScale"+S],10):this["cScalePeer"+S]=this["cScalePeer"+S]||I(this["cScale"+S],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScaleLabel"+S]=this["cScaleLabel"+S]||this.scaleLabelColor;for(let S=0;S<5;S++)this["surface"+S]=this["surface"+S]||x(this.mainBkg,{l:-(5+S*5)}),this["surfacePeer"+S]=this["surfacePeer"+S]||x(this.mainBkg,{l:-(8+S*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=O(this.contrast,30),this.sectionBkgColor2=O(this.contrast,30),this.taskBorderColor=I(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=O(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=I(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128});for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["pie"+S]=this["cScale"+S];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let S=0;S<8;S++)this["venn"+(S+1)]=this["venn"+(S+1)]??this["cScale"+S];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?O(this.quadrant1Fill):I(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,dataLabelColor:((i=this.xyChart)==null?void 0:i.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((u=this.radar)==null?void 0:u.axisColor)||this.lineColor,axisStrokeWidth:((y=this.radar)==null?void 0:y.axisStrokeWidth)||2,axisLabelFontSize:((f=this.radar)==null?void 0:f.axisLabelFontSize)||12,curveOpacity:((m=this.radar)==null?void 0:m.curveOpacity)||.5,curveStrokeWidth:((C=this.radar)==null?void 0:C.curveStrokeWidth)||2,graticuleColor:((b=this.radar)==null?void 0:b.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((k=this.radar)==null?void 0:k.graticuleStrokeWidth)||1,graticuleOpacity:((T=this.radar)==null?void 0:T.graticuleOpacity)||.3,legendBoxSize:((w=this.radar)==null?void 0:w.legendBoxSize)||12,legendFontSize:((B=this.radar)==null?void 0:B.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((M=this.wardley)==null?void 0:M.backgroundColor)||this.background,axisColor:((L=this.wardley)==null?void 0:L.axisColor)||this.lineColor,axisTextColor:((W=this.wardley)==null?void 0:W.axisTextColor)||this.primaryTextColor,gridColor:((P=this.wardley)==null?void 0:P.gridColor)||this.gridColor,componentFill:(($=this.wardley)==null?void 0:$.componentFill)||this.background,componentStroke:((N=this.wardley)==null?void 0:N.componentStroke)||this.lineColor,componentLabelColor:((z=this.wardley)==null?void 0:z.componentLabelColor)||this.primaryTextColor,linkStroke:((D=this.wardley)==null?void 0:D.linkStroke)||this.lineColor,evolutionStroke:((A=this.wardley)==null?void 0:A.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((F=this.wardley)==null?void 0:F.annotationStroke)||this.lineColor,annotationTextColor:((E=this.wardley)==null?void 0:E.annotationTextColor)||this.primaryTextColor,annotationFill:((_=this.wardley)==null?void 0:_.annotationFill)||this.background},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=I(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||x(this.primaryColor,{h:-30}),this.git4=this.pie5||x(this.primaryColor,{h:-60}),this.git5=this.pie6||x(this.primaryColor,{h:-90}),this.git6=this.pie7||x(this.primaryColor,{h:60}),this.git7=this.pie8||x(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||v(this.git0),this.gitInv1=this.gitInv1||v(this.git1),this.gitInv2=this.gitInv2||v(this.git2),this.gitInv3=this.gitInv3||v(this.git3),this.gitInv4=this.gitInv4||v(this.git4),this.gitInv5=this.gitInv5||v(this.git5),this.gitInv6=this.gitInv6||v(this.git6),this.gitInv7=this.gitInv7||v(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||le,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||he}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Wr,"Theme"),Wr),Fp=p(e=>{const t=new Lp;return t.calculate(e),t},"getThemeVariables"),zr,_p=(zr=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=J(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var a,o,n,l,h,c,d,g,u,y,f;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||J(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||J(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||J(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||v(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||v(this.tertiaryColor),this.lineColor=this.lineColor||v(this.background),this.arrowheadColor=this.arrowheadColor||v(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||I(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||v(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=x(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||O(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||t,this.cScale1=this.cScale1||r,this.cScale2=this.cScale2||i,this.cScale3=this.cScale3||x(t,{h:30}),this.cScale4=this.cScale4||x(t,{h:60}),this.cScale5=this.cScale5||x(t,{h:90}),this.cScale6=this.cScale6||x(t,{h:120}),this.cScale7=this.cScale7||x(t,{h:150}),this.cScale8=this.cScale8||x(t,{h:210,l:150}),this.cScale9=this.cScale9||x(t,{h:270}),this.cScale10=this.cScale10||x(t,{h:300}),this.cScale11=this.cScale11||x(t,{h:330}),this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=I(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=I(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||v(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||O(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||I(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?O(this.quadrant1Fill):I(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((d=this.xyChart)==null?void 0:d.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((g=this.xyChart)==null?void 0:g.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||x(t,{h:-30}),this.git4=this.git4||x(t,{h:-60}),this.git5=this.git5||x(t,{h:-90}),this.git6=this.git6||x(t,{h:60}),this.git7=this.git7||x(t,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=I(this.git0,25),this.git1=I(this.git1,25),this.git2=I(this.git2,25),this.git3=I(this.git3,25),this.git4=I(this.git4,25),this.git5=I(this.git5,25),this.git6=I(this.git6,25),this.git7=I(this.git7,25)),this.gitInv0=this.gitInv0||v(this.git0),this.gitInv1=this.gitInv1||v(this.git1),this.gitInv2=this.gitInv2||v(this.git2),this.gitInv3=this.gitInv3||v(this.git3),this.gitInv4=this.gitInv4||v(this.git4),this.gitInv5=this.gitInv5||v(this.git5),this.gitInv6=this.gitInv6||v(this.git6),this.gitInv7=this.gitInv7||v(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||le,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||he}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(zr,"Theme"),zr),Ap=p(e=>{const t=new _p;return t.calculate(e),t},"getThemeVariables"),Nr,Mp=(Nr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=O(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=v(this.background),this.secondaryBorderColor=J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=J(this.tertiaryColor,this.darkMode),this.primaryTextColor=v(this.primaryColor),this.secondaryTextColor=v(this.secondaryColor),this.tertiaryTextColor=v(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=O(v("#323D47"),10),this.border1="#ccc",this.border2=ve(255,255,255,.25),this.arrowheadColor=v(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var r,i,s,a,o,n,l,h,c,d,g;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||J(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||J(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||J(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||v(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||v(this.tertiaryColor),this.lineColor=this.lineColor||v(this.background),this.arrowheadColor=this.arrowheadColor||v(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||I(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||v(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||O(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScale"+u]=I(this["cScale"+u],75);else for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScale"+u]=I(this["cScale"+u],25);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleInv"+u]=this["cScaleInv"+u]||v(this["cScale"+u]);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this.darkMode?this["cScalePeer"+u]=this["cScalePeer"+u]||O(this["cScale"+u],10):this["cScalePeer"+u]=this["cScalePeer"+u]||I(this["cScale"+u],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleLabel"+u]=this["cScaleLabel"+u]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let u=0;u<5;u++)this["surface"+u]=this["surface"+u]||x(this.mainBkg,{h:180,s:-15,l:t*(5+u*3)}),this["surfacePeer"+u]=this["surfacePeer"+u]||x(this.mainBkg,{h:180,s:-15,l:t*(8+u*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?O(this.quadrant1Fill):I(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=I(this.git0,25),this.git1=I(this.git1,25),this.git2=I(this.git2,25),this.git3=I(this.git3,25),this.git4=I(this.git4,25),this.git5=I(this.git5,25),this.git6=I(this.git6,25),this.git7=I(this.git7,25)),this.gitInv0=this.gitInv0||v(this.git0),this.gitInv1=this.gitInv1||v(this.git1),this.gitInv2=this.gitInv2||v(this.git2),this.gitInv3=this.gitInv3||v(this.git3),this.gitInv4=this.gitInv4||v(this.git4),this.gitInv5=this.gitInv5||v(this.git5),this.gitInv6=this.gitInv6||v(this.git6),this.gitInv7=this.gitInv7||v(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||le,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||he}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Nr,"Theme"),Nr),Ep=p(e=>{const t=new Mp;return t.calculate(e),t},"getThemeVariables"),Hr,$p=(Hr=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=J("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){var a,o,n,l,h,c,d,g,u,y,f;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||J(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||J(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||J(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||v(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||v(this.tertiaryColor),this.lineColor=this.lineColor||v(this.background),this.arrowheadColor=this.arrowheadColor||v(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||I(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||v(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=x(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||O(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=this.mainBkg;if(this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=I(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=I(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||v(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||O(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||I(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?O(this.quadrant1Fill):I(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((d=this.xyChart)==null?void 0:d.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((g=this.xyChart)==null?void 0:g.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||x(t,{h:-30}),this.git4=this.git4||x(t,{h:-60}),this.git5=this.git5||x(t,{h:-90}),this.git6=this.git6||x(t,{h:60}),this.git7=this.git7||x(t,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=I(this.git0,25),this.git1=I(this.git1,25),this.git2=I(this.git2,25),this.git3=I(this.git3,25),this.git4=I(this.git4,25),this.git5=I(this.git5,25),this.git6=I(this.git6,25),this.git7=I(this.git7,25)),this.gitInv0=this.gitInv0||v(this.git0),this.gitInv1=this.gitInv1||v(this.git1),this.gitInv2=this.gitInv2||v(this.git2),this.gitInv3=this.gitInv3||v(this.git3),this.gitInv4=this.gitInv4||v(this.git4),this.gitInv5=this.gitInv5||v(this.git5),this.gitInv6=this.gitInv6||v(this.git6),this.gitInv7=this.gitInv7||v(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||le,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||he}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Hr,"Theme"),Hr),Op=p(e=>{const t=new $p;return t.calculate(e),t},"getThemeVariables"),Yr,Ip=(Yr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=O(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=v(this.background),this.secondaryBorderColor=J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=J(this.tertiaryColor,this.darkMode),this.primaryTextColor=v(this.primaryColor),this.secondaryTextColor=v(this.secondaryColor),this.tertiaryTextColor=v(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=O(v("#323D47"),10),this.border1="#ccc",this.border2=ve(255,255,255,.25),this.arrowheadColor=v(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){var r,i,s,a,o,n,l,h,c,d,g;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||J(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||J(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||J(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||v(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||v(this.tertiaryColor),this.lineColor=this.lineColor||v(this.background),this.arrowheadColor=this.arrowheadColor||v(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||I(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||v(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||O(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScale"+u]=I(this["cScale"+u],75);else for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScale"+u]=I(this["cScale"+u],25);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleInv"+u]=this["cScaleInv"+u]||v(this["cScale"+u]);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this.darkMode?this["cScalePeer"+u]=this["cScalePeer"+u]||O(this["cScale"+u],10):this["cScalePeer"+u]=this["cScalePeer"+u]||I(this["cScale"+u],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleLabel"+u]=this["cScaleLabel"+u]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let u=0;u<5;u++)this["surface"+u]=this["surface"+u]||x(this.mainBkg,{h:180,s:-15,l:t*(5+u*3)}),this["surfacePeer"+u]=this["surfacePeer"+u]||x(this.mainBkg,{h:180,s:-15,l:t*(8+u*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?O(this.quadrant1Fill):I(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=I(this.git0,25),this.git1=I(this.git1,25),this.git2=I(this.git2,25),this.git3=I(this.git3,25),this.git4=I(this.git4,25),this.git5=I(this.git5,25),this.git6=I(this.git6,25),this.git7=I(this.git7,25)),this.gitInv0=this.gitInv0||v(this.git0),this.gitInv1=this.gitInv1||v(this.git1),this.gitInv2=this.gitInv2||v(this.git2),this.gitInv3=this.gitInv3||v(this.git3),this.gitInv4=this.gitInv4||v(this.git4),this.gitInv5=this.gitInv5||v(this.git5),this.gitInv6=this.gitInv6||v(this.git6),this.gitInv7=this.gitInv7||v(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||le,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||he}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Yr,"Theme"),Yr),Dp=p(e=>{const t=new Ip;return t.calculate(e),t},"getThemeVariables"),Ur,Pp=(Ur=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=J(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){var a,o,n,l,h,c,d,g,u,y,f;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||J(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||J(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||J(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||v(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||v(this.tertiaryColor),this.lineColor=this.lineColor||v(this.background),this.arrowheadColor=this.arrowheadColor||v(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||I(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||v(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=x(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||O(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||v(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||O(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||I(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?O(this.quadrant1Fill):I(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((d=this.xyChart)==null?void 0:d.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((g=this.xyChart)==null?void 0:g.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||x(t,{h:-30}),this.git4=this.git4||x(t,{h:-60}),this.git5=this.git5||x(t,{h:-90}),this.git6=this.git6||x(t,{h:60}),this.git7=this.git7||x(t,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=I(this.git0,25),this.git1=I(this.git1,25),this.git2=I(this.git2,25),this.git3=I(this.git3,25),this.git4=I(this.git4,25),this.git5=I(this.git5,25),this.git6=I(this.git6,25),this.git7=I(this.git7,25)),this.gitInv0=this.gitInv0||v(this.git0),this.gitInv1=this.gitInv1||v(this.git1),this.gitInv2=this.gitInv2||v(this.git2),this.gitInv3=this.gitInv3||v(this.git3),this.gitInv4=this.gitInv4||v(this.git4),this.gitInv5=this.gitInv5||v(this.git5),this.gitInv6=this.gitInv6||v(this.git6),this.gitInv7=this.gitInv7||v(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||le,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||he}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Ur,"Theme"),Ur),Rp=p(e=>{const t=new Pp;return t.calculate(e),t},"getThemeVariables"),jr,qp=(jr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=O(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=v(this.background),this.secondaryBorderColor=J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=J(this.tertiaryColor,this.darkMode),this.primaryTextColor=v(this.primaryColor),this.secondaryTextColor=v(this.secondaryColor),this.tertiaryTextColor=v(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=O(v("#323D47"),10),this.border1="#ccc",this.border2=ve(255,255,255,.25),this.arrowheadColor=v(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){var r,i,s,a,o,n,l,h,c,d,g;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||J(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||J(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||J(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||J(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||v(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||v(this.tertiaryColor),this.lineColor=this.lineColor||v(this.background),this.arrowheadColor=this.arrowheadColor||v(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||I(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||v(this.lineColor),this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||O(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleInv"+u]=this["cScaleInv"+u]||v(this["cScale"+u]);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this.darkMode?this["cScalePeer"+u]=this["cScalePeer"+u]||O(this["cScale"+u],10):this["cScalePeer"+u]=this["cScalePeer"+u]||I(this["cScale"+u],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleLabel"+u]=I(this["cScale"+u],75);const t=this.darkMode?-4:-1;for(let u=0;u<5;u++)this["surface"+u]=this["surface"+u]||x(this.mainBkg,{h:180,s:-15,l:t*(5+u*3)}),this["surfacePeer"+u]=this["surfacePeer"+u]||x(this.mainBkg,{h:180,s:-15,l:t*(8+u*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?O(this.quadrant1Fill):I(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=I(this.git0,25),this.git1=I(this.git1,25),this.git2=I(this.git2,25),this.git3=I(this.git3,25),this.git4=I(this.git4,25),this.git5=I(this.git5,25),this.git6=I(this.git6,25),this.git7=I(this.git7,25)),this.gitInv0=this.gitInv0||v(this.git0),this.gitInv1=this.gitInv1||v(this.git1),this.gitInv2=this.gitInv2||v(this.git2),this.gitInv3=this.gitInv3||v(this.git3),this.gitInv4=this.gitInv4||v(this.git4),this.gitInv5=this.gitInv5||v(this.git5),this.gitInv6=this.gitInv6||v(this.git6),this.gitInv7=this.gitInv7||v(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||le,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||he}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(jr,"Theme"),jr),Wp=p(e=>{const t=new qp;return t.calculate(e),t},"getThemeVariables"),fe={base:{getThemeVariables:bp},dark:{getThemeVariables:Sp},default:{getThemeVariables:Tp},forest:{getThemeVariables:vp},neutral:{getThemeVariables:Fp},neo:{getThemeVariables:Ap},"neo-dark":{getThemeVariables:Ep},redux:{getThemeVariables:Op},"redux-dark":{getThemeVariables:Dp},"redux-color":{getThemeVariables:Rp},"redux-dark-color":{getThemeVariables:Wp}},Ot={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},Rn={...Ot,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:fe.default.getThemeVariables(),sequence:{...Ot.sequence,messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:p(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:p(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...Ot.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Ot.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Ot.flowchart,inheritDir:!1},external_personFont:p(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:p(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:p(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:p(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:p(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:p(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:p(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:p(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:p(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:p(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:p(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:p(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:p(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:p(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:p(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:p(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:p(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:p(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:p(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:p(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Ot.pie,useWidth:984},xyChart:{...Ot.xyChart,useWidth:void 0},requirement:{...Ot.requirement,useWidth:void 0},packet:{...Ot.packet},eventmodeling:{...Ot.eventmodeling},treeView:{...Ot.treeView,useWidth:void 0},radar:{...Ot.radar},ishikawa:{...Ot.ishikawa},sankey:{...Ot.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...Ot.venn}},qn=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...qn(e[i],"")]:[...r,t+i],[]),"keyify"),zp=new Set(qn(Rn,"")),Wn=Rn,Fi=p(e=>{if(q.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Fi(t));return}for(const t of Object.keys(e)){if(q.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!zp.has(t)||e[t]==null){q.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){if(t==="nodeColors"){const i=/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i;for(const s of Object.keys(e[t]))(typeof e[t][s]!="string"||!i.test(e[t][s]))&&(q.debug("sanitize deleting invalid color:",s,e[t][s]),delete e[t][s])}else q.debug("sanitizing object",t),Fi(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(q.debug("sanitizing css option",t),e[t]=zn(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}q.debug("After sanitization",e)}},"sanitizeDirective"),zn=p(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),tr=Object.freeze(Wn),xe=p(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),qt=kt({},tr),_i,qe=[],Tr=kt({},tr),Ki=p((e,t)=>{let r=kt({},e),i={};for(const s of t)Yn(s),i=kt(i,s);if(r=kt(r,i),i.theme&&i.theme in fe){const s=kt({},_i),a=kt(s.themeVariables||{},i.themeVariables);r.theme&&r.theme in fe&&(r.themeVariables=fe[r.theme].getThemeVariables(a))}return Tr=r,jn(Tr),Tr},"updateCurrentConfig"),Np=p(e=>(qt=kt({},tr),qt=kt(qt,e),e.theme&&fe[e.theme]&&(qt.themeVariables=fe[e.theme].getThemeVariables(e.themeVariables)),Ki(qt,qe),qt),"setSiteConfig"),Hp=p(e=>{_i=kt({},e)},"saveConfigFromInitialize"),Yp=p(e=>(qt=kt(qt,e),Ki(qt,qe),qt),"updateSiteConfig"),Nn=p(()=>kt({},qt),"getSiteConfig"),Hn=p(e=>(jn(e),kt(Tr,e),mt()),"setConfig"),mt=p(()=>kt({},Tr),"getConfig"),Yn=p(e=>{e&&(["secure",...qt.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(q.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&Yn(e[t])}))},"sanitize"),Up=p(e=>{var t;Fi(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),qe.push(e),Ki(qt,qe)},"addDirective"),Ai=p((e=qt)=>{qe=[],Ki(e,qe)},"reset"),jp={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},yo={},Un=p(e=>{yo[e]||(q.warn(jp[e]),yo[e]=!0)},"issueWarning"),jn=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Un("LAZY_LOAD_DEPRECATED")},"checkConfig"),ww=p(()=>{let e={};_i&&(e=kt(e,_i));for(const t of qe)e=kt(e,t);return e},"getUserDefinedConfig"),Pt=p(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&Un("FLOWCHART_HTML_LABELS_DEPRECATED"),xe(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),Vr=/<br\s*\/?>/gi,Xp=p(e=>e?Vn(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Gp=(()=>{let e=!1;return()=>{e||(Xn(),e=!0)}})();function Xn(){const e="data-temp-href-target";Je.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Je.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}p(Xn,"setupDompurifyHooks");var Gn=p(e=>(Gp(),Je.sanitize(e)),"removeScript"),Co=p((e,t)=>{if(Pt(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=Gn(e):r!=="loose"&&(e=Vn(e),e=e.replace(/</g,"<").replace(/>/g,">"),e=e.replace(/=/g,"="),e=Kp(e))}return e},"sanitizeMore"),Kt=p((e,t)=>e&&(t.dompurifyConfig?e=Je.sanitize(Co(e,t),t.dompurifyConfig).toString():e=Je.sanitize(Co(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),Vp=p((e,t)=>typeof e=="string"?Kt(e,t):e.flat().map(r=>Kt(r,t)),"sanitizeTextOrArray"),Zp=p(e=>Vr.test(e),"hasBreaks"),Qp=p(e=>e.split(Vr),"splitBreaks"),Kp=p(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Vn=p(e=>e.replace(Vr,"#br#"),"breakToPlaceholder"),Jp=p(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),tf=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),ef=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),xo=p(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let s=t[i];if(s===","&&i>0&&i+1<t.length){const a=t[i-1],o=t[i+1];rf(a,o)&&(s=a+","+o,i++,r.pop())}r.push(sf(s))}return r.join("")},"parseGenericTypes"),_s=p((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),rf=p((e,t)=>{const r=_s(e,"~"),i=_s(t,"~");return r===1&&i===1},"shouldCombineSets"),sf=p(e=>{const t=_s(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let s=i.indexOf("~"),a=i.lastIndexOf("~");for(;s!==-1&&a!==-1&&s!==a;)i[s]="<",i[a]=">",s=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),bo=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),As=/\$\$(.*)\$\$/g,Lr=p(e=>{var t;return(((t=e.match(As))==null?void 0:t.length)??0)>0},"hasKatex"),Tw=p(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Zn(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i==null||i.insertAdjacentElement("beforeend",r);const s={width:r.clientWidth,height:r.clientHeight};return r.remove(),s},"calculateMathMLDimensions"),af=p(async(e,t)=>{if(!Lr(e))return e;if(!(bo()||t.legacyMathML||t.forceLegacyMathML))return e.replace(As,"MathML is unsupported in this environment.");{const{default:r}=await ot(()=>import("./katex-0cba7652.js"),[]),i=t.forceLegacyMathML||!bo()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Vr).map(s=>Lr(s)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${s}</div>`:`<div>${s}</div>`).join("").replace(As,(s,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Zn=p(async(e,t)=>Kt(await af(e,t),t),"renderKatexSanitized"),Zr={getRows:Xp,sanitizeText:Kt,sanitizeTextOrArray:Vp,hasBreaks:Zp,splitBreaks:Qp,lineBreakRegex:Vr,removeScript:Gn,getUrl:Jp,evaluate:xe,getMax:tf,getMin:ef},of=p(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),nf=p(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),Qn=p(function(e,t,r,i){const s=nf(t,r,i);of(e,s)},"configureSvgSize"),lf=p(function(e,t,r,i){const s=t.node().getBBox(),a=s.width,o=s.height;q.info(`SVG bounds: ${a}x${o}`,s);let n=0,l=0;q.info(`Graph bounds: ${n}x${l}`,e),n=a+r*2,l=o+r*2,q.info(`Calculated bounds: ${n}x${l}`),Qn(t,l,n,i);const h=`${s.x-r} ${s.y-r} ${s.width+2*r} ${s.height+2*r}`;t.attr("viewBox",h)},"setupGraphViewbox"),yi={};function Ms(e){return[...e.cssRules].map(t=>t.cssText).join(`
|
|
3
|
-
`)}p(Ms,"cssStyleSheetToString");var hf=p((e,t,r,i)=>{let s="";return e in yi&&yi[e]?s=yi[e]({...r,svgId:i}):q.warn(`No theme found for ${e}`),` & {
|
|
4
|
-
font-family: ${r.fontFamily};
|
|
5
|
-
font-size: ${r.fontSize};
|
|
6
|
-
fill: ${r.textColor}
|
|
7
|
-
}
|
|
8
|
-
@keyframes edge-animation-frame {
|
|
9
|
-
from {
|
|
10
|
-
stroke-dashoffset: 0;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
@keyframes dash {
|
|
14
|
-
to {
|
|
15
|
-
stroke-dashoffset: 0;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
& .edge-animation-slow {
|
|
19
|
-
stroke-dasharray: 9,5 !important;
|
|
20
|
-
stroke-dashoffset: 900;
|
|
21
|
-
animation: dash 50s linear infinite;
|
|
22
|
-
stroke-linecap: round;
|
|
23
|
-
}
|
|
24
|
-
& .edge-animation-fast {
|
|
25
|
-
stroke-dasharray: 9,5 !important;
|
|
26
|
-
stroke-dashoffset: 900;
|
|
27
|
-
animation: dash 20s linear infinite;
|
|
28
|
-
stroke-linecap: round;
|
|
29
|
-
}
|
|
30
|
-
/* Classes common for multiple diagrams */
|
|
31
|
-
|
|
32
|
-
& .error-icon {
|
|
33
|
-
fill: ${r.errorBkgColor};
|
|
34
|
-
}
|
|
35
|
-
& .error-text {
|
|
36
|
-
fill: ${r.errorTextColor};
|
|
37
|
-
stroke: ${r.errorTextColor};
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
& .edge-thickness-normal {
|
|
41
|
-
stroke-width: ${r.strokeWidth??1}px;
|
|
42
|
-
}
|
|
43
|
-
& .edge-thickness-thick {
|
|
44
|
-
stroke-width: 3.5px
|
|
45
|
-
}
|
|
46
|
-
& .edge-pattern-solid {
|
|
47
|
-
stroke-dasharray: 0;
|
|
48
|
-
}
|
|
49
|
-
& .edge-thickness-invisible {
|
|
50
|
-
stroke-width: 0;
|
|
51
|
-
fill: none;
|
|
52
|
-
}
|
|
53
|
-
& .edge-pattern-dashed{
|
|
54
|
-
stroke-dasharray: 3;
|
|
55
|
-
}
|
|
56
|
-
.edge-pattern-dotted {
|
|
57
|
-
stroke-dasharray: 2;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
& .marker {
|
|
61
|
-
fill: ${r.lineColor};
|
|
62
|
-
stroke: ${r.lineColor};
|
|
63
|
-
}
|
|
64
|
-
& .marker.cross {
|
|
65
|
-
stroke: ${r.lineColor};
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
& svg {
|
|
69
|
-
font-family: ${r.fontFamily};
|
|
70
|
-
font-size: ${r.fontSize};
|
|
71
|
-
}
|
|
72
|
-
& p {
|
|
73
|
-
margin: 0
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
${s}
|
|
77
|
-
.node .neo-node {
|
|
78
|
-
stroke: ${r.nodeBorder};
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
[data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
|
|
82
|
-
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
83
|
-
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
[data-look="neo"].node path {
|
|
88
|
-
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
89
|
-
stroke-width: ${r.strokeWidth??1}px;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
[data-look="neo"].node .outer-path {
|
|
93
|
-
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
[data-look="neo"].node .neo-line path {
|
|
97
|
-
stroke: ${r.nodeBorder};
|
|
98
|
-
filter: none;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
[data-look="neo"].node circle{
|
|
102
|
-
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
103
|
-
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
[data-look="neo"].node circle .state-start{
|
|
107
|
-
fill: #000000;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
[data-look="neo"].icon-shape .icon {
|
|
111
|
-
fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
112
|
-
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
[data-look="neo"].icon-shape .icon-neo path {
|
|
116
|
-
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
117
|
-
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
${t}
|
|
121
|
-
`},"getStyles"),cf=p((e,t)=>{t!==void 0&&(yi[e]=t)},"addStylesForDiagram"),df=hf,Kn={};Yg(Kn,{clear:()=>uf,getAccDescription:()=>mf,getAccTitle:()=>pf,getDiagramTitle:()=>Cf,setAccDescription:()=>ff,setAccTitle:()=>gf,setDiagramTitle:()=>yf});var ba="",ka="",Sa="",wa=p(e=>Kt(e,mt()),"sanitizeText"),uf=p(()=>{ba="",Sa="",ka=""},"clear"),gf=p(e=>{ba=wa(e).replace(/^\s+/g,"")},"setAccTitle"),pf=p(()=>ba,"getAccTitle"),ff=p(e=>{Sa=wa(e).replace(/\n\s+/g,`
|
|
122
|
-
`)},"setAccDescription"),mf=p(()=>Sa,"getAccDescription"),yf=p(e=>{ka=wa(e)},"setDiagramTitle"),Cf=p(()=>ka,"getDiagramTitle"),ko=q,xf=Ca,ht=mt,Bw=Hn,vw=tr,Ta=p(e=>Kt(e,ht()),"sanitizeText"),bf=lf,kf=p(()=>Kn,"getCommonDb"),Mi={},Ei=p((e,t,r)=>{var i;Mi[e]&&ko.warn(`Diagram with id ${e} already registered. Overwriting.`),Mi[e]=t,r&&Pn(e,r),cf(e,t.styles),(i=t.injectUtils)==null||i.call(t,ko,xf,ht,Ta,bf,kf(),()=>{})},"registerDiagram"),Es=p(e=>{if(e in Mi)return Mi[e];throw new Sf(e)},"getDiagram"),Xr,Sf=(Xr=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},p(Xr,"DiagramNotFoundError"),Xr),$s="http://www.w3.org/1999/xhtml";const So={svg:"http://www.w3.org/2000/svg",xhtml:$s,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ji(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),So.hasOwnProperty(t)?{space:So[t],local:e}:e}function wf(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===$s&&t.documentElement.namespaceURI===$s?t.createElement(e):t.createElementNS(r,e)}}function Tf(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Jn(e){var t=Ji(e);return(t.local?Tf:wf)(t)}function Bf(){}function Ba(e){return e==null?Bf:function(){return this.querySelector(e)}}function vf(e){typeof e!="function"&&(e=Ba(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],o=a.length,n=i[s]=new Array(o),l,h,c=0;c<o;++c)(l=a[c])&&(h=e.call(l,l.__data__,c,a))&&("__data__"in l&&(h.__data__=l.__data__),n[c]=h);return new Ht(i,this._parents)}function Lf(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Ff(){return[]}function tl(e){return e==null?Ff:function(){return this.querySelectorAll(e)}}function _f(e){return function(){return Lf(e.apply(this,arguments))}}function Af(e){typeof e=="function"?e=_f(e):e=tl(e);for(var t=this._groups,r=t.length,i=[],s=[],a=0;a<r;++a)for(var o=t[a],n=o.length,l,h=0;h<n;++h)(l=o[h])&&(i.push(e.call(l,l.__data__,h,o)),s.push(l));return new Ht(i,s)}function el(e){return function(){return this.matches(e)}}function rl(e){return function(t){return t.matches(e)}}var Mf=Array.prototype.find;function Ef(e){return function(){return Mf.call(this.children,e)}}function $f(){return this.firstElementChild}function Of(e){return this.select(e==null?$f:Ef(typeof e=="function"?e:rl(e)))}var If=Array.prototype.filter;function Df(){return Array.from(this.children)}function Pf(e){return function(){return If.call(this.children,e)}}function Rf(e){return this.selectAll(e==null?Df:Pf(typeof e=="function"?e:rl(e)))}function qf(e){typeof e!="function"&&(e=el(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],o=a.length,n=i[s]=[],l,h=0;h<o;++h)(l=a[h])&&e.call(l,l.__data__,h,a)&&n.push(l);return new Ht(i,this._parents)}function il(e){return new Array(e.length)}function Wf(){return new Ht(this._enter||this._groups.map(il),this._parents)}function $i(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}$i.prototype={constructor:$i,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function zf(e){return function(){return e}}function Nf(e,t,r,i,s,a){for(var o=0,n,l=t.length,h=a.length;o<h;++o)(n=t[o])?(n.__data__=a[o],i[o]=n):r[o]=new $i(e,a[o]);for(;o<l;++o)(n=t[o])&&(s[o]=n)}function Hf(e,t,r,i,s,a,o){var n,l,h=new Map,c=t.length,d=a.length,g=new Array(c),u;for(n=0;n<c;++n)(l=t[n])&&(g[n]=u=o.call(l,l.__data__,n,t)+"",h.has(u)?s[n]=l:h.set(u,l));for(n=0;n<d;++n)u=o.call(e,a[n],n,a)+"",(l=h.get(u))?(i[n]=l,l.__data__=a[n],h.delete(u)):r[n]=new $i(e,a[n]);for(n=0;n<c;++n)(l=t[n])&&h.get(g[n])===l&&(s[n]=l)}function Yf(e){return e.__data__}function Uf(e,t){if(!arguments.length)return Array.from(this,Yf);var r=t?Hf:Nf,i=this._parents,s=this._groups;typeof e!="function"&&(e=zf(e));for(var a=s.length,o=new Array(a),n=new Array(a),l=new Array(a),h=0;h<a;++h){var c=i[h],d=s[h],g=d.length,u=jf(e.call(c,c&&c.__data__,h,i)),y=u.length,f=n[h]=new Array(y),m=o[h]=new Array(y),C=l[h]=new Array(g);r(c,d,f,m,C,u,t);for(var b=0,k=0,T,w;b<y;++b)if(T=f[b]){for(b>=k&&(k=b+1);!(w=m[k])&&++k<y;);T._next=w||null}}return o=new Ht(o,i),o._enter=n,o._exit=l,o}function jf(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Xf(){return new Ht(this._exit||this._groups.map(il),this._parents)}function Gf(e,t,r){var i=this.enter(),s=this,a=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(s=t(s),s&&(s=s.selection())),r==null?a.remove():r(a),i&&s?i.merge(s).order():s}function Vf(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,s=r.length,a=i.length,o=Math.min(s,a),n=new Array(s),l=0;l<o;++l)for(var h=r[l],c=i[l],d=h.length,g=n[l]=new Array(d),u,y=0;y<d;++y)(u=h[y]||c[y])&&(g[y]=u);for(;l<s;++l)n[l]=r[l];return new Ht(n,this._parents)}function Zf(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],s=i.length-1,a=i[s],o;--s>=0;)(o=i[s])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function Qf(e){e||(e=Kf);function t(d,g){return d&&g?e(d.__data__,g.__data__):!d-!g}for(var r=this._groups,i=r.length,s=new Array(i),a=0;a<i;++a){for(var o=r[a],n=o.length,l=s[a]=new Array(n),h,c=0;c<n;++c)(h=o[c])&&(l[c]=h);l.sort(t)}return new Ht(s,this._parents).order()}function Kf(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Jf(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function tm(){return Array.from(this)}function em(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,a=i.length;s<a;++s){var o=i[s];if(o)return o}return null}function rm(){let e=0;for(const t of this)++e;return e}function im(){return!this.node()}function sm(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var s=t[r],a=0,o=s.length,n;a<o;++a)(n=s[a])&&e.call(n,n.__data__,a,s);return this}function am(e){return function(){this.removeAttribute(e)}}function om(e){return function(){this.removeAttributeNS(e.space,e.local)}}function nm(e,t){return function(){this.setAttribute(e,t)}}function lm(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function hm(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function cm(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function dm(e,t){var r=Ji(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((t==null?r.local?om:am:typeof t=="function"?r.local?cm:hm:r.local?lm:nm)(r,t))}function sl(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function um(e){return function(){this.style.removeProperty(e)}}function gm(e,t,r){return function(){this.style.setProperty(e,t,r)}}function pm(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function fm(e,t,r){return arguments.length>1?this.each((t==null?um:typeof t=="function"?pm:gm)(e,t,r??"")):er(this.node(),e)}function er(e,t){return e.style.getPropertyValue(t)||sl(e).getComputedStyle(e,null).getPropertyValue(t)}function mm(e){return function(){delete this[e]}}function ym(e,t){return function(){this[e]=t}}function Cm(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function xm(e,t){return arguments.length>1?this.each((t==null?mm:typeof t=="function"?Cm:ym)(e,t)):this.node()[e]}function al(e){return e.trim().split(/^|\s+/)}function va(e){return e.classList||new ol(e)}function ol(e){this._node=e,this._names=al(e.getAttribute("class")||"")}ol.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function nl(e,t){for(var r=va(e),i=-1,s=t.length;++i<s;)r.add(t[i])}function ll(e,t){for(var r=va(e),i=-1,s=t.length;++i<s;)r.remove(t[i])}function bm(e){return function(){nl(this,e)}}function km(e){return function(){ll(this,e)}}function Sm(e,t){return function(){(t.apply(this,arguments)?nl:ll)(this,e)}}function wm(e,t){var r=al(e+"");if(arguments.length<2){for(var i=va(this.node()),s=-1,a=r.length;++s<a;)if(!i.contains(r[s]))return!1;return!0}return this.each((typeof t=="function"?Sm:t?bm:km)(r,t))}function Tm(){this.textContent=""}function Bm(e){return function(){this.textContent=e}}function vm(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Lm(e){return arguments.length?this.each(e==null?Tm:(typeof e=="function"?vm:Bm)(e)):this.node().textContent}function Fm(){this.innerHTML=""}function _m(e){return function(){this.innerHTML=e}}function Am(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Mm(e){return arguments.length?this.each(e==null?Fm:(typeof e=="function"?Am:_m)(e)):this.node().innerHTML}function Em(){this.nextSibling&&this.parentNode.appendChild(this)}function $m(){return this.each(Em)}function Om(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Im(){return this.each(Om)}function Dm(e){var t=typeof e=="function"?e:Jn(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Pm(){return null}function Rm(e,t){var r=typeof e=="function"?e:Jn(e),i=t==null?Pm:typeof t=="function"?t:Ba(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function qm(){var e=this.parentNode;e&&e.removeChild(this)}function Wm(){return this.each(qm)}function zm(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Nm(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Hm(e){return this.select(e?Nm:zm)}function Ym(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Um(e){return function(t){e.call(this,t,this.__data__)}}function jm(e){return e.trim().split(/^|\s+/).map(function(t){var r="",i=t.indexOf(".");return i>=0&&(r=t.slice(i+1),t=t.slice(0,i)),{type:t,name:r}})}function Xm(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,s=t.length,a;r<s;++r)a=t[r],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++i]=a;++i?t.length=i:delete this.__on}}}function Gm(e,t,r){return function(){var i=this.__on,s,a=Um(t);if(i){for(var o=0,n=i.length;o<n;++o)if((s=i[o]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=a,s.options=r),s.value=t;return}}this.addEventListener(e.type,a,r),s={type:e.type,name:e.name,value:t,listener:a,options:r},i?i.push(s):this.__on=[s]}}function Vm(e,t,r){var i=jm(e+""),s,a=i.length,o;if(arguments.length<2){var n=this.node().__on;if(n){for(var l=0,h=n.length,c;l<h;++l)for(s=0,c=n[l];s<a;++s)if((o=i[s]).type===c.type&&o.name===c.name)return c.value}return}for(n=t?Gm:Xm,s=0;s<a;++s)this.each(n(i[s],t,r));return this}function hl(e,t,r){var i=sl(e),s=i.CustomEvent;typeof s=="function"?s=new s(t,r):(s=i.document.createEvent("Event"),r?(s.initEvent(t,r.bubbles,r.cancelable),s.detail=r.detail):s.initEvent(t,!1,!1)),e.dispatchEvent(s)}function Zm(e,t){return function(){return hl(this,e,t)}}function Qm(e,t){return function(){return hl(this,e,t.apply(this,arguments))}}function Km(e,t){return this.each((typeof t=="function"?Qm:Zm)(e,t))}function*Jm(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,a=i.length,o;s<a;++s)(o=i[s])&&(yield o)}var cl=[null];function Ht(e,t){this._groups=e,this._parents=t}function Qr(){return new Ht([[document.documentElement]],cl)}function ty(){return this}Ht.prototype=Qr.prototype={constructor:Ht,select:vf,selectAll:Af,selectChild:Of,selectChildren:Rf,filter:qf,data:Uf,enter:Wf,exit:Xf,join:Gf,merge:Vf,selection:ty,order:Zf,sort:Qf,call:Jf,nodes:tm,node:em,size:rm,empty:im,each:sm,attr:dm,style:fm,property:xm,classed:wm,text:Lm,html:Mm,raise:$m,lower:Im,append:Dm,insert:Rm,remove:Wm,clone:Hm,datum:Ym,on:Vm,dispatch:Km,[Symbol.iterator]:Jm};function it(e){return typeof e=="string"?new Ht([[document.querySelector(e)]],[document.documentElement]):new Ht([[e]],cl)}function wo(e,t,r){var i=new wg;return t=t==null?0:+t,i.restart(s=>{i.stop(),e(s+t)},t,r),i}var ey=Tg("start","end","cancel","interrupt"),ry=[],dl=0,To=1,Os=2,Ci=3,Bo=4,Is=5,xi=6;function ts(e,t,r,i,s,a){var o=e.__transition;if(!o)e.__transition={};else if(r in o)return;iy(e,r,{name:t,index:i,group:s,on:ey,tween:ry,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:dl})}function La(e,t){var r=te(e,t);if(r.state>dl)throw new Error("too late; already scheduled");return r}function ce(e,t){var r=te(e,t);if(r.state>Ci)throw new Error("too late; already running");return r}function te(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function iy(e,t,r){var i=e.__transition,s;i[t]=r,r.timer=Bg(a,0,r.time);function a(h){r.state=To,r.timer.restart(o,r.delay,r.time),r.delay<=h&&o(h-r.delay)}function o(h){var c,d,g,u;if(r.state!==To)return l();for(c in i)if(u=i[c],u.name===r.name){if(u.state===Ci)return wo(o);u.state===Bo?(u.state=xi,u.timer.stop(),u.on.call("interrupt",e,e.__data__,u.index,u.group),delete i[c]):+c<t&&(u.state=xi,u.timer.stop(),u.on.call("cancel",e,e.__data__,u.index,u.group),delete i[c])}if(wo(function(){r.state===Ci&&(r.state=Bo,r.timer.restart(n,r.delay,r.time),n(h))}),r.state=Os,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Os){for(r.state=Ci,s=new Array(g=r.tween.length),c=0,d=-1;c<g;++c)(u=r.tween[c].value.call(e,e.__data__,r.index,r.group))&&(s[++d]=u);s.length=d+1}}function n(h){for(var c=h<r.duration?r.ease.call(null,h/r.duration):(r.timer.restart(l),r.state=Is,1),d=-1,g=s.length;++d<g;)s[d].call(e,c);r.state===Is&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=xi,r.timer.stop(),delete i[t];for(var h in i)return;delete e.__transition}}function sy(e,t){var r=e.__transition,i,s,a=!0,o;if(r){t=t==null?null:t+"";for(o in r){if((i=r[o]).name!==t){a=!1;continue}s=i.state>Os&&i.state<Is,i.state=xi,i.timer.stop(),i.on.call(s?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[o]}a&&delete e.__transition}}function ay(e){return this.each(function(){sy(this,e)})}function oy(e,t){var r,i;return function(){var s=ce(this,e),a=s.tween;if(a!==r){i=r=a;for(var o=0,n=i.length;o<n;++o)if(i[o].name===t){i=i.slice(),i.splice(o,1);break}}s.tween=i}}function ny(e,t,r){var i,s;if(typeof r!="function")throw new Error;return function(){var a=ce(this,e),o=a.tween;if(o!==i){s=(i=o).slice();for(var n={name:t,value:r},l=0,h=s.length;l<h;++l)if(s[l].name===t){s[l]=n;break}l===h&&s.push(n)}a.tween=s}}function ly(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=te(this.node(),r).tween,s=0,a=i.length,o;s<a;++s)if((o=i[s]).name===e)return o.value;return null}return this.each((t==null?oy:ny)(r,e,t))}function Fa(e,t,r){var i=e._id;return e.each(function(){var s=ce(this,i);(s.value||(s.value={}))[t]=r.apply(this,arguments)}),function(s){return te(s,i).value[t]}}function ul(e,t){var r;return(typeof t=="number"?vg:t instanceof po?fo:(r=po(t))?(t=r,fo):Lg)(e,t)}function hy(e){return function(){this.removeAttribute(e)}}function cy(e){return function(){this.removeAttributeNS(e.space,e.local)}}function dy(e,t,r){var i,s=r+"",a;return function(){var o=this.getAttribute(e);return o===s?null:o===i?a:a=t(i=o,r)}}function uy(e,t,r){var i,s=r+"",a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===s?null:o===i?a:a=t(i=o,r)}}function gy(e,t,r){var i,s,a;return function(){var o,n=r(this),l;return n==null?void this.removeAttribute(e):(o=this.getAttribute(e),l=n+"",o===l?null:o===i&&l===s?a:(s=l,a=t(i=o,n)))}}function py(e,t,r){var i,s,a;return function(){var o,n=r(this),l;return n==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),l=n+"",o===l?null:o===i&&l===s?a:(s=l,a=t(i=o,n)))}}function fy(e,t){var r=Ji(e),i=r==="transform"?Fg:ul;return this.attrTween(e,typeof t=="function"?(r.local?py:gy)(r,i,Fa(this,"attr."+e,t)):t==null?(r.local?cy:hy)(r):(r.local?uy:dy)(r,i,t))}function my(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function yy(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function Cy(e,t){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&yy(e,a)),r}return s._value=t,s}function xy(e,t){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&my(e,a)),r}return s._value=t,s}function by(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var i=Ji(e);return this.tween(r,(i.local?Cy:xy)(i,t))}function ky(e,t){return function(){La(this,e).delay=+t.apply(this,arguments)}}function Sy(e,t){return t=+t,function(){La(this,e).delay=t}}function wy(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?ky:Sy)(t,e)):te(this.node(),t).delay}function Ty(e,t){return function(){ce(this,e).duration=+t.apply(this,arguments)}}function By(e,t){return t=+t,function(){ce(this,e).duration=t}}function vy(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Ty:By)(t,e)):te(this.node(),t).duration}function Ly(e,t){if(typeof t!="function")throw new Error;return function(){ce(this,e).ease=t}}function Fy(e){var t=this._id;return arguments.length?this.each(Ly(t,e)):te(this.node(),t).ease}function _y(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;ce(this,e).ease=r}}function Ay(e){if(typeof e!="function")throw new Error;return this.each(_y(this._id,e))}function My(e){typeof e!="function"&&(e=el(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],o=a.length,n=i[s]=[],l,h=0;h<o;++h)(l=a[h])&&e.call(l,l.__data__,h,a)&&n.push(l);return new ye(i,this._parents,this._name,this._id)}function Ey(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,s=r.length,a=Math.min(i,s),o=new Array(i),n=0;n<a;++n)for(var l=t[n],h=r[n],c=l.length,d=o[n]=new Array(c),g,u=0;u<c;++u)(g=l[u]||h[u])&&(d[u]=g);for(;n<i;++n)o[n]=t[n];return new ye(o,this._parents,this._name,this._id)}function $y(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function Oy(e,t,r){var i,s,a=$y(t)?La:ce;return function(){var o=a(this,e),n=o.on;n!==i&&(s=(i=n).copy()).on(t,r),o.on=s}}function Iy(e,t){var r=this._id;return arguments.length<2?te(this.node(),r).on.on(e):this.each(Oy(r,e,t))}function Dy(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function Py(){return this.on("end.remove",Dy(this._id))}function Ry(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Ba(e));for(var i=this._groups,s=i.length,a=new Array(s),o=0;o<s;++o)for(var n=i[o],l=n.length,h=a[o]=new Array(l),c,d,g=0;g<l;++g)(c=n[g])&&(d=e.call(c,c.__data__,g,n))&&("__data__"in c&&(d.__data__=c.__data__),h[g]=d,ts(h[g],t,r,g,h,te(c,r)));return new ye(a,this._parents,t,r)}function qy(e){var t=this._name,r=this._id;typeof e!="function"&&(e=tl(e));for(var i=this._groups,s=i.length,a=[],o=[],n=0;n<s;++n)for(var l=i[n],h=l.length,c,d=0;d<h;++d)if(c=l[d]){for(var g=e.call(c,c.__data__,d,l),u,y=te(c,r),f=0,m=g.length;f<m;++f)(u=g[f])&&ts(u,t,r,f,g,y);a.push(g),o.push(c)}return new ye(a,o,t,r)}var Wy=Qr.prototype.constructor;function zy(){return new Wy(this._groups,this._parents)}function Ny(e,t){var r,i,s;return function(){var a=er(this,e),o=(this.style.removeProperty(e),er(this,e));return a===o?null:a===r&&o===i?s:s=t(r=a,i=o)}}function gl(e){return function(){this.style.removeProperty(e)}}function Hy(e,t,r){var i,s=r+"",a;return function(){var o=er(this,e);return o===s?null:o===i?a:a=t(i=o,r)}}function Yy(e,t,r){var i,s,a;return function(){var o=er(this,e),n=r(this),l=n+"";return n==null&&(l=n=(this.style.removeProperty(e),er(this,e))),o===l?null:o===i&&l===s?a:(s=l,a=t(i=o,n))}}function Uy(e,t){var r,i,s,a="style."+t,o="end."+a,n;return function(){var l=ce(this,e),h=l.on,c=l.value[a]==null?n||(n=gl(t)):void 0;(h!==r||s!==c)&&(i=(r=h).copy()).on(o,s=c),l.on=i}}function jy(e,t,r){var i=(e+="")=="transform"?_g:ul;return t==null?this.styleTween(e,Ny(e,i)).on("end.style."+e,gl(e)):typeof t=="function"?this.styleTween(e,Yy(e,i,Fa(this,"style."+e,t))).each(Uy(this._id,e)):this.styleTween(e,Hy(e,i,t),r).on("end.style."+e,null)}function Xy(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function Gy(e,t,r){var i,s;function a(){var o=t.apply(this,arguments);return o!==s&&(i=(s=o)&&Xy(e,o,r)),i}return a._value=t,a}function Vy(e,t,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,Gy(e,t,r??""))}function Zy(e){return function(){this.textContent=e}}function Qy(e){return function(){var t=e(this);this.textContent=t??""}}function Ky(e){return this.tween("text",typeof e=="function"?Qy(Fa(this,"text",e)):Zy(e==null?"":e+""))}function Jy(e){return function(t){this.textContent=e.call(this,t)}}function tC(e){var t,r;function i(){var s=e.apply(this,arguments);return s!==r&&(t=(r=s)&&Jy(s)),t}return i._value=e,i}function eC(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,tC(e))}function rC(){for(var e=this._name,t=this._id,r=pl(),i=this._groups,s=i.length,a=0;a<s;++a)for(var o=i[a],n=o.length,l,h=0;h<n;++h)if(l=o[h]){var c=te(l,t);ts(l,e,r,h,o,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new ye(i,this._parents,e,r)}function iC(){var e,t,r=this,i=r._id,s=r.size();return new Promise(function(a,o){var n={value:o},l={value:function(){--s===0&&a()}};r.each(function(){var h=ce(this,i),c=h.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(n),t._.interrupt.push(n),t._.end.push(l)),h.on=t}),s===0&&a()})}var sC=0;function ye(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function pl(){return++sC}var ue=Qr.prototype;ye.prototype={constructor:ye,select:Ry,selectAll:qy,selectChild:ue.selectChild,selectChildren:ue.selectChildren,filter:My,merge:Ey,selection:zy,transition:rC,call:ue.call,nodes:ue.nodes,node:ue.node,size:ue.size,empty:ue.empty,each:ue.each,on:Iy,attr:fy,attrTween:by,style:jy,styleTween:Vy,text:Ky,textTween:eC,remove:Py,tween:ly,delay:wy,duration:vy,ease:Fy,easeVarying:Ay,end:iC,[Symbol.iterator]:ue[Symbol.iterator]};function aC(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var oC={time:null,delay:0,duration:250,ease:aC};function nC(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function lC(e){var t,r;e instanceof ye?(t=e._id,e=e._name):(t=pl(),(r=oC).time=Ag(),e=e==null?null:e+"");for(var i=this._groups,s=i.length,a=0;a<s;++a)for(var o=i[a],n=o.length,l,h=0;h<n;++h)(l=o[h])&&ts(l,e,t,h,o,r||nC(l,t));return new ye(i,this._parents,e,t)}Qr.prototype.interrupt=ay;Qr.prototype.transition=lC;class fl{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function ml(e){return new fl(e,!0)}function yl(e){return new fl(e,!1)}function yr(e,t,r){this.k=e,this.x=t,this.y=r}yr.prototype={constructor:yr,scale:function(e){return e===1?this:new yr(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new yr(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};yr.prototype;var hC=p(e=>{var s;const{securityLevel:t}=ht();let r=it("body");if(t==="sandbox"){const o=((s=it(`#i${e}`).node())==null?void 0:s.contentDocument)??document;r=it(o.body)}return r.select(`#${e}`)},"selectSvgElement");function _a(e){return typeof e>"u"||e===null}p(_a,"isNothing");function Cl(e){return typeof e=="object"&&e!==null}p(Cl,"isObject");function xl(e){return Array.isArray(e)?e:_a(e)?[]:[e]}p(xl,"toArray");function bl(e,t){var r,i,s,a;if(t)for(a=Object.keys(t),r=0,i=a.length;r<i;r+=1)s=a[r],e[s]=t[s];return e}p(bl,"extend");function kl(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}p(kl,"repeat");function Sl(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}p(Sl,"isNegativeZero");var cC=_a,dC=Cl,uC=xl,gC=kl,pC=Sl,fC=bl,St={isNothing:cC,isObject:dC,toArray:uC,repeat:gC,isNegativeZero:pC,extend:fC};function Aa(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
|
|
123
|
-
|
|
124
|
-
`+e.mark.snippet),i+" "+r):i}p(Aa,"formatError");function rr(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Aa(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}p(rr,"YAMLException$1");rr.prototype=Object.create(Error.prototype);rr.prototype.constructor=rr;rr.prototype.toString=p(function(t){return this.name+": "+Aa(this,t)},"toString");var Wt=rr;function bi(e,t,r,i,s){var a="",o="",n=Math.floor(s/2)-1;return i-t>n&&(a=" ... ",t=i-n+a.length),r-i>n&&(o=" ...",r=i+n-o.length),{str:a+e.slice(t,r).replace(/\t/g,"→")+o,pos:i-t+a.length}}p(bi,"getLine");function ki(e,t){return St.repeat(" ",t-e.length)+e}p(ki,"padStart");function wl(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],s=[],a,o=-1;a=r.exec(e.buffer);)s.push(a.index),i.push(a.index+a[0].length),e.position<=a.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var n="",l,h,c=Math.min(e.line+t.linesAfter,s.length).toString().length,d=t.maxLength-(t.indent+c+3);for(l=1;l<=t.linesBefore&&!(o-l<0);l++)h=bi(e.buffer,i[o-l],s[o-l],e.position-(i[o]-i[o-l]),d),n=St.repeat(" ",t.indent)+ki((e.line-l+1).toString(),c)+" | "+h.str+`
|
|
125
|
-
`+n;for(h=bi(e.buffer,i[o],s[o],e.position,d),n+=St.repeat(" ",t.indent)+ki((e.line+1).toString(),c)+" | "+h.str+`
|
|
126
|
-
`,n+=St.repeat("-",t.indent+c+3+h.pos)+`^
|
|
127
|
-
`,l=1;l<=t.linesAfter&&!(o+l>=s.length);l++)h=bi(e.buffer,i[o+l],s[o+l],e.position-(i[o]-i[o+l]),d),n+=St.repeat(" ",t.indent)+ki((e.line+l+1).toString(),c)+" | "+h.str+`
|
|
128
|
-
`;return n.replace(/\n$/,"")}p(wl,"makeSnippet");var mC=wl,yC=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],CC=["scalar","sequence","mapping"];function Tl(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}p(Tl,"compileStyleAliases");function Bl(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(yC.indexOf(r)===-1)throw new Wt('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=Tl(t.styleAliases||null),CC.indexOf(this.kind)===-1)throw new Wt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}p(Bl,"Type$1");var Mt=Bl;function Ds(e,t){var r=[];return e[t].forEach(function(i){var s=r.length;r.forEach(function(a,o){a.tag===i.tag&&a.kind===i.kind&&a.multi===i.multi&&(s=o)}),r[s]=i}),r}p(Ds,"compileList");function vl(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(s){s.multi?(e.multi[s.kind].push(s),e.multi.fallback.push(s)):e[s.kind][s.tag]=e.fallback[s.tag]=s}for(p(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}p(vl,"compileMap");function Oi(e){return this.extend(e)}p(Oi,"Schema$1");Oi.prototype.extend=p(function(t){var r=[],i=[];if(t instanceof Mt)i.push(t);else if(Array.isArray(t))i=i.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit));else throw new Wt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof Mt))throw new Wt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new Wt("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new Wt("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(a){if(!(a instanceof Mt))throw new Wt("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var s=Object.create(Oi.prototype);return s.implicit=(this.implicit||[]).concat(r),s.explicit=(this.explicit||[]).concat(i),s.compiledImplicit=Ds(s,"implicit"),s.compiledExplicit=Ds(s,"explicit"),s.compiledTypeMap=vl(s.compiledImplicit,s.compiledExplicit),s},"extend");var xC=Oi,bC=new Mt("tag:yaml.org,2002:str",{kind:"scalar",construct:p(function(e){return e!==null?e:""},"construct")}),kC=new Mt("tag:yaml.org,2002:seq",{kind:"sequence",construct:p(function(e){return e!==null?e:[]},"construct")}),SC=new Mt("tag:yaml.org,2002:map",{kind:"mapping",construct:p(function(e){return e!==null?e:{}},"construct")}),wC=new xC({explicit:[bC,kC,SC]});function Ll(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}p(Ll,"resolveYamlNull");function Fl(){return null}p(Fl,"constructYamlNull");function _l(e){return e===null}p(_l,"isNull");var TC=new Mt("tag:yaml.org,2002:null",{kind:"scalar",resolve:Ll,construct:Fl,predicate:_l,represent:{canonical:p(function(){return"~"},"canonical"),lowercase:p(function(){return"null"},"lowercase"),uppercase:p(function(){return"NULL"},"uppercase"),camelcase:p(function(){return"Null"},"camelcase"),empty:p(function(){return""},"empty")},defaultStyle:"lowercase"});function Al(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}p(Al,"resolveYamlBoolean");function Ml(e){return e==="true"||e==="True"||e==="TRUE"}p(Ml,"constructYamlBoolean");function El(e){return Object.prototype.toString.call(e)==="[object Boolean]"}p(El,"isBoolean");var BC=new Mt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Al,construct:Ml,predicate:El,represent:{lowercase:p(function(e){return e?"true":"false"},"lowercase"),uppercase:p(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:p(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function $l(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}p($l,"isHexCode");function Ol(e){return 48<=e&&e<=55}p(Ol,"isOctCode");function Il(e){return 48<=e&&e<=57}p(Il,"isDecCode");function Dl(e){if(e===null)return!1;var t=e.length,r=0,i=!1,s;if(!t)return!1;if(s=e[r],(s==="-"||s==="+")&&(s=e[++r]),s==="0"){if(r+1===t)return!0;if(s=e[++r],s==="b"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(s!=="0"&&s!=="1")return!1;i=!0}return i&&s!=="_"}if(s==="x"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!$l(e.charCodeAt(r)))return!1;i=!0}return i&&s!=="_"}if(s==="o"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!Ol(e.charCodeAt(r)))return!1;i=!0}return i&&s!=="_"}}if(s==="_")return!1;for(;r<t;r++)if(s=e[r],s!=="_"){if(!Il(e.charCodeAt(r)))return!1;i=!0}return!(!i||s==="_")}p(Dl,"resolveYamlInteger");function Pl(e){var t=e,r=1,i;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0")return 0;if(i==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}p(Pl,"constructYamlInteger");function Rl(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!St.isNegativeZero(e)}p(Rl,"isInteger");var vC=new Mt("tag:yaml.org,2002:int",{kind:"scalar",resolve:Dl,construct:Pl,predicate:Rl,represent:{binary:p(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:p(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:p(function(e){return e.toString(10)},"decimal"),hexadecimal:p(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),LC=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function ql(e){return!(e===null||!LC.test(e)||e[e.length-1]==="_")}p(ql,"resolveYamlFloat");function Wl(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}p(Wl,"constructYamlFloat");var FC=/^[-+]?[0-9]+e/;function zl(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(St.isNegativeZero(e))return"-0.0";return r=e.toString(10),FC.test(r)?r.replace("e",".e"):r}p(zl,"representYamlFloat");function Nl(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||St.isNegativeZero(e))}p(Nl,"isFloat");var _C=new Mt("tag:yaml.org,2002:float",{kind:"scalar",resolve:ql,construct:Wl,predicate:Nl,represent:zl,defaultStyle:"lowercase"}),Hl=wC.extend({implicit:[TC,BC,vC,_C]}),AC=Hl,Yl=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Ul=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function jl(e){return e===null?!1:Yl.exec(e)!==null||Ul.exec(e)!==null}p(jl,"resolveYamlTimestamp");function Xl(e){var t,r,i,s,a,o,n,l=0,h=null,c,d,g;if(t=Yl.exec(e),t===null&&(t=Ul.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,s=+t[3],!t[4])return new Date(Date.UTC(r,i,s));if(a=+t[4],o=+t[5],n=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(c=+t[10],d=+(t[11]||0),h=(c*60+d)*6e4,t[9]==="-"&&(h=-h)),g=new Date(Date.UTC(r,i,s,a,o,n,l)),h&&g.setTime(g.getTime()-h),g}p(Xl,"constructYamlTimestamp");function Gl(e){return e.toISOString()}p(Gl,"representYamlTimestamp");var MC=new Mt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:jl,construct:Xl,instanceOf:Date,represent:Gl});function Vl(e){return e==="<<"||e===null}p(Vl,"resolveYamlMerge");var EC=new Mt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Vl}),Ma=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
129
|
-
\r`;function Zl(e){if(e===null)return!1;var t,r,i=0,s=e.length,a=Ma;for(r=0;r<s;r++)if(t=a.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}p(Zl,"resolveYamlBinary");function Ql(e){var t,r,i=e.replace(/[\r\n=]/g,""),s=i.length,a=Ma,o=0,n=[];for(t=0;t<s;t++)t%4===0&&t&&(n.push(o>>16&255),n.push(o>>8&255),n.push(o&255)),o=o<<6|a.indexOf(i.charAt(t));return r=s%4*6,r===0?(n.push(o>>16&255),n.push(o>>8&255),n.push(o&255)):r===18?(n.push(o>>10&255),n.push(o>>2&255)):r===12&&n.push(o>>4&255),new Uint8Array(n)}p(Ql,"constructYamlBinary");function Kl(e){var t="",r=0,i,s,a=e.length,o=Ma;for(i=0;i<a;i++)i%3===0&&i&&(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]),r=(r<<8)+e[i];return s=a%3,s===0?(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]):s===2?(t+=o[r>>10&63],t+=o[r>>4&63],t+=o[r<<2&63],t+=o[64]):s===1&&(t+=o[r>>2&63],t+=o[r<<4&63],t+=o[64],t+=o[64]),t}p(Kl,"representYamlBinary");function Jl(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}p(Jl,"isBinary");var $C=new Mt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Zl,construct:Ql,predicate:Jl,represent:Kl}),OC=Object.prototype.hasOwnProperty,IC=Object.prototype.toString;function th(e){if(e===null)return!0;var t=[],r,i,s,a,o,n=e;for(r=0,i=n.length;r<i;r+=1){if(s=n[r],o=!1,IC.call(s)!=="[object Object]")return!1;for(a in s)if(OC.call(s,a))if(!o)o=!0;else return!1;if(!o)return!1;if(t.indexOf(a)===-1)t.push(a);else return!1}return!0}p(th,"resolveYamlOmap");function eh(e){return e!==null?e:[]}p(eh,"constructYamlOmap");var DC=new Mt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:th,construct:eh}),PC=Object.prototype.toString;function rh(e){if(e===null)return!0;var t,r,i,s,a,o=e;for(a=new Array(o.length),t=0,r=o.length;t<r;t+=1){if(i=o[t],PC.call(i)!=="[object Object]"||(s=Object.keys(i),s.length!==1))return!1;a[t]=[s[0],i[s[0]]]}return!0}p(rh,"resolveYamlPairs");function ih(e){if(e===null)return[];var t,r,i,s,a,o=e;for(a=new Array(o.length),t=0,r=o.length;t<r;t+=1)i=o[t],s=Object.keys(i),a[t]=[s[0],i[s[0]]];return a}p(ih,"constructYamlPairs");var RC=new Mt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:rh,construct:ih}),qC=Object.prototype.hasOwnProperty;function sh(e){if(e===null)return!0;var t,r=e;for(t in r)if(qC.call(r,t)&&r[t]!==null)return!1;return!0}p(sh,"resolveYamlSet");function ah(e){return e!==null?e:{}}p(ah,"constructYamlSet");var WC=new Mt("tag:yaml.org,2002:set",{kind:"mapping",resolve:sh,construct:ah}),oh=AC.extend({implicit:[MC,EC],explicit:[$C,DC,RC,WC]}),Fe=Object.prototype.hasOwnProperty,Ii=1,nh=2,lh=3,Di=4,ps=1,zC=2,vo=3,NC=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,HC=/[\x85\u2028\u2029]/,YC=/[,\[\]\{\}]/,hh=/^(?:!|!!|![a-z\-]+!)$/i,ch=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Ps(e){return Object.prototype.toString.call(e)}p(Ps,"_class");function Zt(e){return e===10||e===13}p(Zt,"is_EOL");function Le(e){return e===9||e===32}p(Le,"is_WHITE_SPACE");function It(e){return e===9||e===32||e===10||e===13}p(It,"is_WS_OR_EOL");function De(e){return e===44||e===91||e===93||e===123||e===125}p(De,"is_FLOW_INDICATOR");function dh(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}p(dh,"fromHexCode");function uh(e){return e===120?2:e===117?4:e===85?8:0}p(uh,"escapedHexLen");function gh(e){return 48<=e&&e<=57?e-48:-1}p(gh,"fromDecimalCode");function Rs(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
|
130
|
-
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"
":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}p(Rs,"simpleEscapeSequence");function ph(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}p(ph,"charFromCodepoint");function Ea(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}p(Ea,"setProperty");var fh=new Array(256),mh=new Array(256);for($e=0;$e<256;$e++)fh[$e]=Rs($e)?1:0,mh[$e]=Rs($e);var $e;function yh(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||oh,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}p(yh,"State$1");function $a(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=mC(r),new Wt(t,r)}p($a,"generateError");function G(e,t){throw $a(e,t)}p(G,"throwError");function Fr(e,t){e.onWarning&&e.onWarning.call(null,$a(e,t))}p(Fr,"throwWarning");var Lo={YAML:p(function(t,r,i){var s,a,o;t.version!==null&&G(t,"duplication of %YAML directive"),i.length!==1&&G(t,"YAML directive accepts exactly one argument"),s=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),s===null&&G(t,"ill-formed argument of the YAML directive"),a=parseInt(s[1],10),o=parseInt(s[2],10),a!==1&&G(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&Fr(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:p(function(t,r,i){var s,a;i.length!==2&&G(t,"TAG directive accepts exactly two arguments"),s=i[0],a=i[1],hh.test(s)||G(t,"ill-formed tag handle (first argument) of the TAG directive"),Fe.call(t.tagMap,s)&&G(t,'there is a previously declared suffix for "'+s+'" tag handle'),ch.test(a)||G(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{G(t,"tag prefix is malformed: "+a)}t.tagMap[s]=a},"handleTagDirective")};function me(e,t,r,i){var s,a,o,n;if(t<r){if(n=e.input.slice(t,r),i)for(s=0,a=n.length;s<a;s+=1)o=n.charCodeAt(s),o===9||32<=o&&o<=1114111||G(e,"expected valid JSON character");else NC.test(n)&&G(e,"the stream contains non-printable characters");e.result+=n}}p(me,"captureSegment");function qs(e,t,r,i){var s,a,o,n;for(St.isObject(r)||G(e,"cannot merge mappings; the provided source object is unacceptable"),s=Object.keys(r),o=0,n=s.length;o<n;o+=1)a=s[o],Fe.call(t,a)||(Ea(t,a,r[a]),i[a]=!0)}p(qs,"mergeMappings");function Pe(e,t,r,i,s,a,o,n,l){var h,c;if(Array.isArray(s))for(s=Array.prototype.slice.call(s),h=0,c=s.length;h<c;h+=1)Array.isArray(s[h])&&G(e,"nested arrays are not supported inside keys"),typeof s=="object"&&Ps(s[h])==="[object Object]"&&(s[h]="[object Object]");if(typeof s=="object"&&Ps(s)==="[object Object]"&&(s="[object Object]"),s=String(s),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(h=0,c=a.length;h<c;h+=1)qs(e,t,a[h],r);else qs(e,t,a,r);else!e.json&&!Fe.call(r,s)&&Fe.call(t,s)&&(e.line=o||e.line,e.lineStart=n||e.lineStart,e.position=l||e.position,G(e,"duplicated mapping key")),Ea(t,s,a),delete r[s];return t}p(Pe,"storeMappingPair");function es(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):G(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}p(es,"readLineBreak");function Ct(e,t,r){for(var i=0,s=e.input.charCodeAt(e.position);s!==0;){for(;Le(s);)s===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),s=e.input.charCodeAt(++e.position);if(t&&s===35)do s=e.input.charCodeAt(++e.position);while(s!==10&&s!==13&&s!==0);if(Zt(s))for(es(e),s=e.input.charCodeAt(e.position),i++,e.lineIndent=0;s===32;)e.lineIndent++,s=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&Fr(e,"deficient indentation"),i}p(Ct,"skipSeparationSpace");function Kr(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||It(r)))}p(Kr,"testDocumentSeparator");function rs(e,t){t===1?e.result+=" ":t>1&&(e.result+=St.repeat(`
|
|
131
|
-
`,t-1))}p(rs,"writeFoldedLines");function Ch(e,t,r){var i,s,a,o,n,l,h,c,d=e.kind,g=e.result,u;if(u=e.input.charCodeAt(e.position),It(u)||De(u)||u===35||u===38||u===42||u===33||u===124||u===62||u===39||u===34||u===37||u===64||u===96||(u===63||u===45)&&(s=e.input.charCodeAt(e.position+1),It(s)||r&&De(s)))return!1;for(e.kind="scalar",e.result="",a=o=e.position,n=!1;u!==0;){if(u===58){if(s=e.input.charCodeAt(e.position+1),It(s)||r&&De(s))break}else if(u===35){if(i=e.input.charCodeAt(e.position-1),It(i))break}else{if(e.position===e.lineStart&&Kr(e)||r&&De(u))break;if(Zt(u))if(l=e.line,h=e.lineStart,c=e.lineIndent,Ct(e,!1,-1),e.lineIndent>=t){n=!0,u=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=l,e.lineStart=h,e.lineIndent=c;break}}n&&(me(e,a,o,!1),rs(e,e.line-l),a=o=e.position,n=!1),Le(u)||(o=e.position+1),u=e.input.charCodeAt(++e.position)}return me(e,a,o,!1),e.result?!0:(e.kind=d,e.result=g,!1)}p(Ch,"readPlainScalar");function xh(e,t){var r,i,s;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=s=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(me(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,s=e.position;else return!0;else Zt(r)?(me(e,i,s,!0),rs(e,Ct(e,!1,t)),i=s=e.position):e.position===e.lineStart&&Kr(e)?G(e,"unexpected end of the document within a single quoted scalar"):(e.position++,s=e.position);G(e,"unexpected end of the stream within a single quoted scalar")}p(xh,"readSingleQuotedScalar");function bh(e,t){var r,i,s,a,o,n;if(n=e.input.charCodeAt(e.position),n!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;){if(n===34)return me(e,r,e.position,!0),e.position++,!0;if(n===92){if(me(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),Zt(n))Ct(e,!1,t);else if(n<256&&fh[n])e.result+=mh[n],e.position++;else if((o=uh(n))>0){for(s=o,a=0;s>0;s--)n=e.input.charCodeAt(++e.position),(o=dh(n))>=0?a=(a<<4)+o:G(e,"expected hexadecimal character");e.result+=ph(a),e.position++}else G(e,"unknown escape sequence");r=i=e.position}else Zt(n)?(me(e,r,i,!0),rs(e,Ct(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Kr(e)?G(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}G(e,"unexpected end of the stream within a double quoted scalar")}p(bh,"readDoubleQuotedScalar");function kh(e,t){var r=!0,i,s,a,o=e.tag,n,l=e.anchor,h,c,d,g,u,y=Object.create(null),f,m,C,b;if(b=e.input.charCodeAt(e.position),b===91)c=93,u=!1,n=[];else if(b===123)c=125,u=!0,n={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=n),b=e.input.charCodeAt(++e.position);b!==0;){if(Ct(e,!0,t),b=e.input.charCodeAt(e.position),b===c)return e.position++,e.tag=o,e.anchor=l,e.kind=u?"mapping":"sequence",e.result=n,!0;r?b===44&&G(e,"expected the node content, but found ','"):G(e,"missed comma between flow collection entries"),m=f=C=null,d=g=!1,b===63&&(h=e.input.charCodeAt(e.position+1),It(h)&&(d=g=!0,e.position++,Ct(e,!0,t))),i=e.line,s=e.lineStart,a=e.position,We(e,t,Ii,!1,!0),m=e.tag,f=e.result,Ct(e,!0,t),b=e.input.charCodeAt(e.position),(g||e.line===i)&&b===58&&(d=!0,b=e.input.charCodeAt(++e.position),Ct(e,!0,t),We(e,t,Ii,!1,!0),C=e.result),u?Pe(e,n,y,m,f,C,i,s,a):d?n.push(Pe(e,null,y,m,f,C,i,s,a)):n.push(f),Ct(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}G(e,"unexpected end of the stream within a flow collection")}p(kh,"readFlowCollection");function Sh(e,t){var r,i,s=ps,a=!1,o=!1,n=t,l=0,h=!1,c,d;if(d=e.input.charCodeAt(e.position),d===124)i=!1;else if(d===62)i=!0;else return!1;for(e.kind="scalar",e.result="";d!==0;)if(d=e.input.charCodeAt(++e.position),d===43||d===45)ps===s?s=d===43?vo:zC:G(e,"repeat of a chomping mode identifier");else if((c=gh(d))>=0)c===0?G(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?G(e,"repeat of an indentation width identifier"):(n=t+c-1,o=!0);else break;if(Le(d)){do d=e.input.charCodeAt(++e.position);while(Le(d));if(d===35)do d=e.input.charCodeAt(++e.position);while(!Zt(d)&&d!==0)}for(;d!==0;){for(es(e),e.lineIndent=0,d=e.input.charCodeAt(e.position);(!o||e.lineIndent<n)&&d===32;)e.lineIndent++,d=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>n&&(n=e.lineIndent),Zt(d)){l++;continue}if(e.lineIndent<n){s===vo?e.result+=St.repeat(`
|
|
132
|
-
`,a?1+l:l):s===ps&&a&&(e.result+=`
|
|
133
|
-
`);break}for(i?Le(d)?(h=!0,e.result+=St.repeat(`
|
|
134
|
-
`,a?1+l:l)):h?(h=!1,e.result+=St.repeat(`
|
|
135
|
-
`,l+1)):l===0?a&&(e.result+=" "):e.result+=St.repeat(`
|
|
136
|
-
`,l):e.result+=St.repeat(`
|
|
137
|
-
`,a?1+l:l),a=!0,o=!0,l=0,r=e.position;!Zt(d)&&d!==0;)d=e.input.charCodeAt(++e.position);me(e,r,e.position,!1)}return!0}p(Sh,"readBlockScalar");function Ws(e,t){var r,i=e.tag,s=e.anchor,a=[],o,n=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,G(e,"tab characters must not be used in indentation")),!(l!==45||(o=e.input.charCodeAt(e.position+1),!It(o))));){if(n=!0,e.position++,Ct(e,!0,-1)&&e.lineIndent<=t){a.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,We(e,t,lh,!1,!0),a.push(e.result),Ct(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)G(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return n?(e.tag=i,e.anchor=s,e.kind="sequence",e.result=a,!0):!1}p(Ws,"readBlockSequence");function wh(e,t,r){var i,s,a,o,n,l,h=e.tag,c=e.anchor,d={},g=Object.create(null),u=null,y=null,f=null,m=!1,C=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=d),b=e.input.charCodeAt(e.position);b!==0;){if(!m&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,G(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),a=e.line,(b===63||b===58)&&It(i))b===63?(m&&(Pe(e,d,g,u,y,null,o,n,l),u=y=f=null),C=!0,m=!0,s=!0):m?(m=!1,s=!0):G(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,b=i;else{if(o=e.line,n=e.lineStart,l=e.position,!We(e,r,nh,!1,!0))break;if(e.line===a){for(b=e.input.charCodeAt(e.position);Le(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),It(b)||G(e,"a whitespace character is expected after the key-value separator within a block mapping"),m&&(Pe(e,d,g,u,y,null,o,n,l),u=y=f=null),C=!0,m=!1,s=!1,u=e.tag,y=e.result;else if(C)G(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=h,e.anchor=c,!0}else if(C)G(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=h,e.anchor=c,!0}if((e.line===a||e.lineIndent>t)&&(m&&(o=e.line,n=e.lineStart,l=e.position),We(e,t,Di,!0,s)&&(m?y=e.result:f=e.result),m||(Pe(e,d,g,u,y,f,o,n,l),u=y=f=null),Ct(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&b!==0)G(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return m&&Pe(e,d,g,u,y,null,o,n,l),C&&(e.tag=h,e.anchor=c,e.kind="mapping",e.result=d),C}p(wh,"readBlockMapping");function Th(e){var t,r=!1,i=!1,s,a,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&G(e,"duplication of a tag property"),o=e.input.charCodeAt(++e.position),o===60?(r=!0,o=e.input.charCodeAt(++e.position)):o===33?(i=!0,s="!!",o=e.input.charCodeAt(++e.position)):s="!",t=e.position,r){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(a=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):G(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!It(o);)o===33&&(i?G(e,"tag suffix cannot contain exclamation marks"):(s=e.input.slice(t-1,e.position+1),hh.test(s)||G(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);a=e.input.slice(t,e.position),YC.test(a)&&G(e,"tag suffix cannot contain flow indicator characters")}a&&!ch.test(a)&&G(e,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{G(e,"tag name is malformed: "+a)}return r?e.tag=a:Fe.call(e.tagMap,s)?e.tag=e.tagMap[s]+a:s==="!"?e.tag="!"+a:s==="!!"?e.tag="tag:yaml.org,2002:"+a:G(e,'undeclared tag handle "'+s+'"'),!0}p(Th,"readTagProperty");function Bh(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&G(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!It(r)&&!De(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&G(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}p(Bh,"readAnchorProperty");function vh(e){var t,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!It(i)&&!De(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&G(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Fe.call(e.anchorMap,r)||G(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Ct(e,!0,-1),!0}p(vh,"readAlias");function We(e,t,r,i,s){var a,o,n,l=1,h=!1,c=!1,d,g,u,y,f,m;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=o=n=Di===r||lh===r,i&&Ct(e,!0,-1)&&(h=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;Th(e)||Bh(e);)Ct(e,!0,-1)?(h=!0,n=a,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):n=!1;if(n&&(n=h||s),(l===1||Di===r)&&(Ii===r||nh===r?f=t:f=t+1,m=e.position-e.lineStart,l===1?n&&(Ws(e,m)||wh(e,m,f))||kh(e,f)?c=!0:(o&&Sh(e,f)||xh(e,f)||bh(e,f)?c=!0:vh(e)?(c=!0,(e.tag!==null||e.anchor!==null)&&G(e,"alias node should not have any properties")):Ch(e,f,Ii===r)&&(c=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(c=n&&Ws(e,m))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&G(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),d=0,g=e.implicitTypes.length;d<g;d+=1)if(y=e.implicitTypes[d],y.resolve(e.result)){e.result=y.construct(e.result),e.tag=y.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(Fe.call(e.typeMap[e.kind||"fallback"],e.tag))y=e.typeMap[e.kind||"fallback"][e.tag];else for(y=null,u=e.typeMap.multi[e.kind||"fallback"],d=0,g=u.length;d<g;d+=1)if(e.tag.slice(0,u[d].tag.length)===u[d].tag){y=u[d];break}y||G(e,"unknown tag !<"+e.tag+">"),e.result!==null&&y.kind!==e.kind&&G(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+y.kind+'", not "'+e.kind+'"'),y.resolve(e.result,e.tag)?(e.result=y.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):G(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||c}p(We,"composeNode");function Lh(e){var t=e.position,r,i,s,a=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(Ct(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(a=!0,o=e.input.charCodeAt(++e.position),r=e.position;o!==0&&!It(o);)o=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),s=[],i.length<1&&G(e,"directive name must not be less than one character in length");o!==0;){for(;Le(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!Zt(o));break}if(Zt(o))break;for(r=e.position;o!==0&&!It(o);)o=e.input.charCodeAt(++e.position);s.push(e.input.slice(r,e.position))}o!==0&&es(e),Fe.call(Lo,i)?Lo[i](e,i,s):Fr(e,'unknown document directive "'+i+'"')}if(Ct(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,Ct(e,!0,-1)):a&&G(e,"directives end mark is expected"),We(e,e.lineIndent-1,Di,!1,!0),Ct(e,!0,-1),e.checkLineBreaks&&HC.test(e.input.slice(t,e.position))&&Fr(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Kr(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Ct(e,!0,-1));return}if(e.position<e.length-1)G(e,"end of the stream or a document separator is expected");else return}p(Lh,"readDocument");function Oa(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
138
|
-
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new yh(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,G(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)Lh(r);return r.documents}p(Oa,"loadDocuments");function Fh(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=Oa(e,r);if(typeof t!="function")return i;for(var s=0,a=i.length;s<a;s+=1)t(i[s])}p(Fh,"loadAll$1");function _h(e,t){var r=Oa(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new Wt("expected a single document in the stream, but found more")}}p(_h,"load$1");var UC=Fh,jC=_h,XC={loadAll:UC,load:jC},Ah=Object.prototype.toString,Mh=Object.prototype.hasOwnProperty,Ia=65279,GC=9,_r=10,VC=13,ZC=32,QC=33,KC=34,zs=35,JC=37,t0=38,e0=39,r0=42,Eh=44,i0=45,Pi=58,s0=61,a0=62,o0=63,n0=64,$h=91,Oh=93,l0=96,Ih=123,h0=124,Dh=125,Et={};Et[0]="\\0";Et[7]="\\a";Et[8]="\\b";Et[9]="\\t";Et[10]="\\n";Et[11]="\\v";Et[12]="\\f";Et[13]="\\r";Et[27]="\\e";Et[34]='\\"';Et[92]="\\\\";Et[133]="\\N";Et[160]="\\_";Et[8232]="\\L";Et[8233]="\\P";var c0=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],d0=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Ph(e,t){var r,i,s,a,o,n,l;if(t===null)return{};for(r={},i=Object.keys(t),s=0,a=i.length;s<a;s+=1)o=i[s],n=String(t[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),l=e.compiledTypeMap.fallback[o],l&&Mh.call(l.styleAliases,n)&&(n=l.styleAliases[n]),r[o]=n;return r}p(Ph,"compileStyleMap");function Rh(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new Wt("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+St.repeat("0",i-t.length)+t}p(Rh,"encodeHex");var u0=1,Ar=2;function qh(e){this.schema=e.schema||oh,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=St.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Ph(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?Ar:u0,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}p(qh,"State");function Ns(e,t){for(var r=St.repeat(" ",t),i=0,s=-1,a="",o,n=e.length;i<n;)s=e.indexOf(`
|
|
139
|
-
`,i),s===-1?(o=e.slice(i),i=n):(o=e.slice(i,s+1),i=s+1),o.length&&o!==`
|
|
140
|
-
`&&(a+=r),a+=o;return a}p(Ns,"indentString");function Ri(e,t){return`
|
|
141
|
-
`+St.repeat(" ",e.indent*t)}p(Ri,"generateNextLine");function Wh(e,t){var r,i,s;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(s=e.implicitTypes[r],s.resolve(t))return!0;return!1}p(Wh,"testImplicitResolving");function Mr(e){return e===ZC||e===GC}p(Mr,"isWhitespace");function ir(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Ia||65536<=e&&e<=1114111}p(ir,"isPrintable");function Hs(e){return ir(e)&&e!==Ia&&e!==VC&&e!==_r}p(Hs,"isNsCharOrWhitespace");function Ys(e,t,r){var i=Hs(e),s=i&&!Mr(e);return(r?i:i&&e!==Eh&&e!==$h&&e!==Oh&&e!==Ih&&e!==Dh)&&e!==zs&&!(t===Pi&&!s)||Hs(t)&&!Mr(t)&&e===zs||t===Pi&&s}p(Ys,"isPlainSafe");function zh(e){return ir(e)&&e!==Ia&&!Mr(e)&&e!==i0&&e!==o0&&e!==Pi&&e!==Eh&&e!==$h&&e!==Oh&&e!==Ih&&e!==Dh&&e!==zs&&e!==t0&&e!==r0&&e!==QC&&e!==h0&&e!==s0&&e!==a0&&e!==e0&&e!==KC&&e!==JC&&e!==n0&&e!==l0}p(zh,"isPlainSafeFirst");function Nh(e){return!Mr(e)&&e!==Pi}p(Nh,"isPlainSafeLast");function Ze(e,t){var r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&t+1<e.length&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}p(Ze,"codePointAt");function Da(e){var t=/^\n* /;return t.test(e)}p(Da,"needIndentIndicator");var Hh=1,Us=2,Yh=3,Uh=4,Xe=5;function jh(e,t,r,i,s,a,o,n){var l,h=0,c=null,d=!1,g=!1,u=i!==-1,y=-1,f=zh(Ze(e,0))&&Nh(Ze(e,e.length-1));if(t||o)for(l=0;l<e.length;h>=65536?l+=2:l++){if(h=Ze(e,l),!ir(h))return Xe;f=f&&Ys(h,c,n),c=h}else{for(l=0;l<e.length;h>=65536?l+=2:l++){if(h=Ze(e,l),h===_r)d=!0,u&&(g=g||l-y-1>i&&e[y+1]!==" ",y=l);else if(!ir(h))return Xe;f=f&&Ys(h,c,n),c=h}g=g||u&&l-y-1>i&&e[y+1]!==" "}return!d&&!g?f&&!o&&!s(e)?Hh:a===Ar?Xe:Us:r>9&&Da(e)?Xe:o?a===Ar?Xe:Us:g?Uh:Yh}p(jh,"chooseScalarStyle");function Xh(e,t,r,i,s){e.dump=function(){if(t.length===0)return e.quotingType===Ar?'""':"''";if(!e.noCompatMode&&(c0.indexOf(t)!==-1||d0.test(t)))return e.quotingType===Ar?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),n=i||e.flowLevel>-1&&r>=e.flowLevel;function l(h){return Wh(e,h)}switch(p(l,"testAmbiguity"),jh(t,n,e.indent,o,l,e.quotingType,e.forceQuotes&&!i,s)){case Hh:return t;case Us:return"'"+t.replace(/'/g,"''")+"'";case Yh:return"|"+js(t,e.indent)+Xs(Ns(t,a));case Uh:return">"+js(t,e.indent)+Xs(Ns(Gh(t,o),a));case Xe:return'"'+Vh(t)+'"';default:throw new Wt("impossible error: invalid scalar style")}}()}p(Xh,"writeScalar");function js(e,t){var r=Da(e)?String(t):"",i=e[e.length-1]===`
|
|
142
|
-
`,s=i&&(e[e.length-2]===`
|
|
143
|
-
`||e===`
|
|
144
|
-
`),a=s?"+":i?"":"-";return r+a+`
|
|
145
|
-
`}p(js,"blockHeader");function Xs(e){return e[e.length-1]===`
|
|
146
|
-
`?e.slice(0,-1):e}p(Xs,"dropEndingNewline");function Gh(e,t){for(var r=/(\n+)([^\n]*)/g,i=function(){var h=e.indexOf(`
|
|
147
|
-
`);return h=h!==-1?h:e.length,r.lastIndex=h,Gs(e.slice(0,h),t)}(),s=e[0]===`
|
|
148
|
-
`||e[0]===" ",a,o;o=r.exec(e);){var n=o[1],l=o[2];a=l[0]===" ",i+=n+(!s&&!a&&l!==""?`
|
|
149
|
-
`:"")+Gs(l,t),s=a}return i}p(Gh,"foldString");function Gs(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,s=0,a,o=0,n=0,l="";i=r.exec(e);)n=i.index,n-s>t&&(a=o>s?o:n,l+=`
|
|
150
|
-
`+e.slice(s,a),s=a+1),o=n;return l+=`
|
|
151
|
-
`,e.length-s>t&&o>s?l+=e.slice(s,o)+`
|
|
152
|
-
`+e.slice(o+1):l+=e.slice(s),l.slice(1)}p(Gs,"foldLine");function Vh(e){for(var t="",r=0,i,s=0;s<e.length;r>=65536?s+=2:s++)r=Ze(e,s),i=Et[r],!i&&ir(r)?(t+=e[s],r>=65536&&(t+=e[s+1])):t+=i||Rh(r);return t}p(Vh,"escapeString");function Zh(e,t,r){var i="",s=e.tag,a,o,n;for(a=0,o=r.length;a<o;a+=1)n=r[a],e.replacer&&(n=e.replacer.call(r,String(a),n)),(ne(e,t,n,!1,!1)||typeof n>"u"&&ne(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=s,e.dump="["+i+"]"}p(Zh,"writeFlowSequence");function Vs(e,t,r,i){var s="",a=e.tag,o,n,l;for(o=0,n=r.length;o<n;o+=1)l=r[o],e.replacer&&(l=e.replacer.call(r,String(o),l)),(ne(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&ne(e,t+1,null,!0,!0,!1,!0))&&((!i||s!=="")&&(s+=Ri(e,t)),e.dump&&_r===e.dump.charCodeAt(0)?s+="-":s+="- ",s+=e.dump);e.tag=a,e.dump=s||"[]"}p(Vs,"writeBlockSequence");function Qh(e,t,r){var i="",s=e.tag,a=Object.keys(r),o,n,l,h,c;for(o=0,n=a.length;o<n;o+=1)c="",i!==""&&(c+=", "),e.condenseFlow&&(c+='"'),l=a[o],h=r[l],e.replacer&&(h=e.replacer.call(r,l,h)),ne(e,t,l,!1,!1)&&(e.dump.length>1024&&(c+="? "),c+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),ne(e,t,h,!1,!1)&&(c+=e.dump,i+=c));e.tag=s,e.dump="{"+i+"}"}p(Qh,"writeFlowMapping");function Kh(e,t,r,i){var s="",a=e.tag,o=Object.keys(r),n,l,h,c,d,g;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new Wt("sortKeys must be a boolean or a function");for(n=0,l=o.length;n<l;n+=1)g="",(!i||s!=="")&&(g+=Ri(e,t)),h=o[n],c=r[h],e.replacer&&(c=e.replacer.call(r,h,c)),ne(e,t+1,h,!0,!0,!0)&&(d=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,d&&(e.dump&&_r===e.dump.charCodeAt(0)?g+="?":g+="? "),g+=e.dump,d&&(g+=Ri(e,t)),ne(e,t+1,c,!0,d)&&(e.dump&&_r===e.dump.charCodeAt(0)?g+=":":g+=": ",g+=e.dump,s+=g));e.tag=a,e.dump=s||"{}"}p(Kh,"writeBlockMapping");function Zs(e,t,r){var i,s,a,o,n,l;for(s=r?e.explicitTypes:e.implicitTypes,a=0,o=s.length;a<o;a+=1)if(n=s[a],(n.instanceOf||n.predicate)&&(!n.instanceOf||typeof t=="object"&&t instanceof n.instanceOf)&&(!n.predicate||n.predicate(t))){if(r?n.multi&&n.representName?e.tag=n.representName(t):e.tag=n.tag:e.tag="?",n.represent){if(l=e.styleMap[n.tag]||n.defaultStyle,Ah.call(n.represent)==="[object Function]")i=n.represent(t,l);else if(Mh.call(n.represent,l))i=n.represent[l](t,l);else throw new Wt("!<"+n.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}p(Zs,"detectType");function ne(e,t,r,i,s,a,o){e.tag=null,e.dump=r,Zs(e,r,!1)||Zs(e,r,!0);var n=Ah.call(e.dump),l=i,h;i&&(i=e.flowLevel<0||e.flowLevel>t);var c=n==="[object Object]"||n==="[object Array]",d,g;if(c&&(d=e.duplicates.indexOf(r),g=d!==-1),(e.tag!==null&&e.tag!=="?"||g||e.indent!==2&&t>0)&&(s=!1),g&&e.usedDuplicates[d])e.dump="*ref_"+d;else{if(c&&g&&!e.usedDuplicates[d]&&(e.usedDuplicates[d]=!0),n==="[object Object]")i&&Object.keys(e.dump).length!==0?(Kh(e,t,e.dump,s),g&&(e.dump="&ref_"+d+e.dump)):(Qh(e,t,e.dump),g&&(e.dump="&ref_"+d+" "+e.dump));else if(n==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?Vs(e,t-1,e.dump,s):Vs(e,t,e.dump,s),g&&(e.dump="&ref_"+d+e.dump)):(Zh(e,t,e.dump),g&&(e.dump="&ref_"+d+" "+e.dump));else if(n==="[object String]")e.tag!=="?"&&Xh(e,e.dump,t,a,l);else{if(n==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Wt("unacceptable kind of an object to dump "+n)}e.tag!==null&&e.tag!=="?"&&(h=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?h="!"+h:h.slice(0,18)==="tag:yaml.org,2002:"?h="!!"+h.slice(18):h="!<"+h+">",e.dump=h+" "+e.dump)}return!0}p(ne,"writeNode");function Jh(e,t){var r=[],i=[],s,a;for(qi(e,r,i),s=0,a=i.length;s<a;s+=1)t.duplicates.push(r[i[s]]);t.usedDuplicates=new Array(a)}p(Jh,"getDuplicateReferences");function qi(e,t,r){var i,s,a;if(e!==null&&typeof e=="object")if(s=t.indexOf(e),s!==-1)r.indexOf(s)===-1&&r.push(s);else if(t.push(e),Array.isArray(e))for(s=0,a=e.length;s<a;s+=1)qi(e[s],t,r);else for(i=Object.keys(e),s=0,a=i.length;s<a;s+=1)qi(e[i[s]],t,r)}p(qi,"inspectNode");function g0(e,t){t=t||{};var r=new qh(t);r.noRefs||Jh(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),ne(r,0,i,!0,!0)?r.dump+`
|
|
153
|
-
`:""}p(g0,"dump$1");function p0(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}p(p0,"renamed");var f0=Hl,m0=XC.load;/*! Bundled license information:
|
|
154
|
-
|
|
155
|
-
js-yaml/dist/js-yaml.mjs:
|
|
156
|
-
(*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
|
|
157
|
-
*/var dr=p((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),At={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},Fo={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Cr(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=ft(e),t=ft(t);const[r,i]=[e.x,e.y],[s,a]=[t.x,t.y],o=s-r,n=a-i;return{angle:Math.atan(n/o),deltaX:o,deltaY:n}}p(Cr,"calculateDeltaAndAngle");var ft=p(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),y0=p(e=>({x:p(function(t,r,i){let s=0;const a=ft(i[0]).x<ft(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(At,e.arrowTypeStart)){const{angle:u,deltaX:y}=Cr(i[0],i[1]);s=At[e.arrowTypeStart]*Math.cos(u)*(y>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(At,e.arrowTypeEnd)){const{angle:u,deltaX:y}=Cr(i[i.length-1],i[i.length-2]);s=At[e.arrowTypeEnd]*Math.cos(u)*(y>=0?1:-1)}const o=Math.abs(ft(t).x-ft(i[i.length-1]).x),n=Math.abs(ft(t).y-ft(i[i.length-1]).y),l=Math.abs(ft(t).x-ft(i[0]).x),h=Math.abs(ft(t).y-ft(i[0]).y),c=At[e.arrowTypeStart],d=At[e.arrowTypeEnd],g=1;if(o<d&&o>0&&n<d){let u=d+g-o;u*=a==="right"?-1:1,s-=u}if(l<c&&l>0&&h<c){let u=c+g-l;u*=a==="right"?-1:1,s+=u}return ft(t).x+s},"x"),y:p(function(t,r,i){let s=0;const a=ft(i[0]).y<ft(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(At,e.arrowTypeStart)){const{angle:u,deltaY:y}=Cr(i[0],i[1]);s=At[e.arrowTypeStart]*Math.abs(Math.sin(u))*(y>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(At,e.arrowTypeEnd)){const{angle:u,deltaY:y}=Cr(i[i.length-1],i[i.length-2]);s=At[e.arrowTypeEnd]*Math.abs(Math.sin(u))*(y>=0?1:-1)}const o=Math.abs(ft(t).y-ft(i[i.length-1]).y),n=Math.abs(ft(t).x-ft(i[i.length-1]).x),l=Math.abs(ft(t).y-ft(i[0]).y),h=Math.abs(ft(t).x-ft(i[0]).x),c=At[e.arrowTypeStart],d=At[e.arrowTypeEnd],g=1;if(o<d&&o>0&&n<d){let u=d+g-o;u*=a==="up"?-1:1,s-=u}if(l<c&&l>0&&h<c){let u=c+g-l;u*=a==="up"?-1:1,s+=u}return ft(t).y+s},"y")}),"getLineFunctionsWithOffset"),tc={},Tt={};Object.defineProperty(Tt,"__esModule",{value:!0});Tt.BLANK_URL=Tt.relativeFirstCharacters=Tt.whitespaceEscapeCharsRegex=Tt.urlSchemeRegex=Tt.ctrlCharactersRegex=Tt.htmlCtrlEntityRegex=Tt.htmlEntitiesRegex=Tt.invalidProtocolRegex=void 0;Tt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;Tt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;Tt.htmlCtrlEntityRegex=/&(newline|tab);/gi;Tt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;Tt.urlSchemeRegex=/^.+(:|:)/gim;Tt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;Tt.relativeFirstCharacters=[".","/"];Tt.BLANK_URL="about:blank";Object.defineProperty(tc,"__esModule",{value:!0});var C0=tc.sanitizeUrl=S0,_t=Tt;function x0(e){return _t.relativeFirstCharacters.indexOf(e[0])>-1}function b0(e){var t=e.replace(_t.ctrlCharactersRegex,"");return t.replace(_t.htmlEntitiesRegex,function(r,i){return String.fromCharCode(i)})}function k0(e){return URL.canParse(e)}function _o(e){try{return decodeURIComponent(e)}catch{return e}}function S0(e){if(!e)return _t.BLANK_URL;var t,r=_o(e.trim());do r=b0(r).replace(_t.htmlCtrlEntityRegex,"").replace(_t.ctrlCharactersRegex,"").replace(_t.whitespaceEscapeCharsRegex,"").trim(),r=_o(r),t=r.match(_t.ctrlCharactersRegex)||r.match(_t.htmlEntitiesRegex)||r.match(_t.htmlCtrlEntityRegex)||r.match(_t.whitespaceEscapeCharsRegex);while(t&&t.length>0);var i=r;if(!i)return _t.BLANK_URL;if(x0(i))return i;var s=i.trimStart(),a=s.match(_t.urlSchemeRegex);if(!a)return i;var o=a[0].toLowerCase().trim();if(_t.invalidProtocolRegex.test(o))return _t.BLANK_URL;var n=s.replace(/\\/g,"/");if(o==="mailto:"||o.includes("://"))return n;if(o==="http:"||o==="https:"){if(!k0(n))return _t.BLANK_URL;var l=new URL(n);return l.protocol=l.protocol.toLowerCase(),l.hostname=l.hostname.toLowerCase(),l.toString()}return n}function fs(e){var r;if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){const i=e[Symbol.toStringTag];return i==null||!((r=Object.getOwnPropertyDescriptor(e,Symbol.toStringTag))!=null&&r.writable)?!1:e.toString()===`[object ${i}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function w0(){}function ec(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function Pa(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const T0="[object RegExp]",rc="[object String]",ic="[object Number]",sc="[object Boolean]",ac="[object Arguments]",B0="[object Symbol]",v0="[object Date]",L0="[object Map]",F0="[object Set]",_0="[object Array]",A0="[object ArrayBuffer]",M0="[object Object]",E0="[object DataView]",$0="[object Uint8Array]",O0="[object Uint8ClampedArray]",I0="[object Uint16Array]",D0="[object Uint32Array]",P0="[object Int8Array]",R0="[object Int16Array]",q0="[object Int32Array]",W0="[object Float32Array]",z0="[object Float64Array]",Ao=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||function(){return this}()||Function("return this")();function Ra(e){return typeof Ao.Buffer<"u"&&Ao.Buffer.isBuffer(e)}function N0(e){return Number.isSafeInteger(e)&&e>=0}function oc(e){return e!=null&&typeof e!="function"&&N0(e.length)}function H0(e){return e==="__proto__"}function qa(e){return e==null||typeof e!="object"&&typeof e!="function"}function Wa(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Y0(e,t){return Qe(e,void 0,e,new Map,t)}function Qe(e,t,r,i=new Map,s=void 0){const a=s==null?void 0:s(e,t,r,i);if(a!==void 0)return a;if(qa(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){const o=new Array(e.length);i.set(e,o);for(let n=0;n<e.length;n++)o[n]=Qe(e[n],n,r,i,s);return Object.hasOwn(e,"index")&&(o.index=e.index),Object.hasOwn(e,"input")&&(o.input=e.input),o}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const o=new RegExp(e.source,e.flags);return o.lastIndex=e.lastIndex,o}if(e instanceof Map){const o=new Map;i.set(e,o);for(const[n,l]of e)o.set(n,Qe(l,n,r,i,s));return o}if(e instanceof Set){const o=new Set;i.set(e,o);for(const n of e)o.add(Qe(n,void 0,r,i,s));return o}if(Ra(e))return e.subarray();if(Wa(e)){const o=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,o);for(let n=0;n<e.length;n++)o[n]=Qe(e[n],n,r,i,s);return o}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const o=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return i.set(e,o),jt(o,e,r,i,s),o}if(typeof File<"u"&&e instanceof File){const o=new File([e],e.name,{type:e.type});return i.set(e,o),jt(o,e,r,i,s),o}if(typeof Blob<"u"&&e instanceof Blob){const o=new Blob([e],{type:e.type});return i.set(e,o),jt(o,e,r,i,s),o}if(e instanceof Error){const o=structuredClone(e);return i.set(e,o),o.message=e.message,o.name=e.name,o.stack=e.stack,o.cause=e.cause,o.constructor=e.constructor,jt(o,e,r,i,s),o}if(e instanceof Boolean){const o=new Boolean(e.valueOf());return i.set(e,o),jt(o,e,r,i,s),o}if(e instanceof Number){const o=new Number(e.valueOf());return i.set(e,o),jt(o,e,r,i,s),o}if(e instanceof String){const o=new String(e.valueOf());return i.set(e,o),jt(o,e,r,i,s),o}if(typeof e=="object"&&U0(e)){const o=Object.create(Object.getPrototypeOf(e));return i.set(e,o),jt(o,e,r,i,s),o}return e}function jt(e,t,r=e,i,s){const a=[...Object.keys(t),...ec(t)];for(let o=0;o<a.length;o++){const n=a[o],l=Object.getOwnPropertyDescriptor(e,n);(l==null||l.writable)&&(e[n]=Qe(t[n],n,r,i,s))}}function U0(e){switch(Pa(e)){case ac:case _0:case A0:case E0:case sc:case v0:case W0:case z0:case P0:case R0:case q0:case L0:case ic:case M0:case T0:case F0:case rc:case B0:case $0:case O0:case I0:case D0:return!0;default:return!1}}function j0(e,t){return Y0(e,(r,i,s,a)=>{const o=t==null?void 0:t(r,i,s,a);if(o!==void 0)return o;if(typeof e=="object"){if(Pa(e)==="[object Object]"&&typeof e.constructor!="function"){const n={};return a.set(e,n),jt(n,e,s,a),n}switch(Object.prototype.toString.call(e)){case ic:case rc:case sc:{const n=new e.constructor(e==null?void 0:e.valueOf());return jt(n,e),n}case ac:{const n={};return jt(n,e),n.length=e.length,n[Symbol.iterator]=e[Symbol.iterator],n}default:return}}})}function Mo(e){return j0(e)}function Qs(e){return e!==null&&typeof e=="object"&&Pa(e)==="[object Arguments]"}function Ks(e){return typeof e=="object"&&e!==null}function X0(e){return Ks(e)&&oc(e)}function Jr(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const r=function(...i){const s=t?t.apply(this,i):i[0],a=r.cache;if(a.has(s))return a.get(s);const o=e.apply(this,i);return r.cache=a.set(s,o)||a,o};return r.cache=new(Jr.Cache||Map),r}Jr.Cache=Map;function Si(e){return Wa(e)}function G0(e){const t=e==null?void 0:e.constructor;return e===(typeof t=="function"?t.prototype:Object.prototype)}function V0(e){if(qa(e))return e;if(Array.isArray(e)||Wa(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);const t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);const r=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new r(e);if(e instanceof RegExp){const i=new r(e);return i.lastIndex=e.lastIndex,i}if(e instanceof DataView)return new r(e.buffer.slice(0));if(e instanceof Error){let i;return e instanceof AggregateError?i=new r(e.errors,e.message,{cause:e.cause}):i=new r(e.message,{cause:e.cause}),i.stack=e.stack,Object.assign(i,e),i}return typeof File<"u"&&e instanceof File?new r([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e=="object"?Object.assign(Object.create(t),e):e}function Z0(e,...t){const r=t.slice(0,-1),i=t[t.length-1];let s=e;for(let a=0;a<r.length;a++){const o=r[a];s=wi(s,o,i,new Map)}return s}function wi(e,t,r,i){if(qa(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return V0(i.get(t));if(i.set(t,e),Array.isArray(t)){t=t.slice();for(let a=0;a<t.length;a++)t[a]=t[a]??void 0}const s=[...Object.keys(t),...ec(t)];for(let a=0;a<s.length;a++){const o=s[a];if(H0(o))continue;let n=t[o],l=e[o];if(Qs(n)&&(n={...n}),Qs(l)&&(l={...l}),Ra(n)&&(n=Mo(n)),Array.isArray(n))if(Array.isArray(l)){const c=[],d=Reflect.ownKeys(l);for(let g=0;g<d.length;g++){const u=d[g];c[u]=l[u]}l=c}else if(X0(l)){const c=[];for(let d=0;d<l.length;d++)c[d]=l[d];l=c}else l=[];const h=r(l,n,o,e,t,i);h!==void 0?e[o]=h:Array.isArray(n)||Ks(l)&&Ks(n)&&(fs(l)||fs(n)||Si(l)||Si(n))?e[o]=wi(l,n,r,i):l==null&&fs(n)?e[o]=wi({},n,r,i):l==null&&Si(n)?e[o]=Mo(n):(l===void 0||n!==void 0)&&(e[o]=n)}return e}function Q0(e,...t){return Z0(e,...t,w0)}function Eo(e){if(e==null)return!0;if(oc(e))return typeof e.splice!="function"&&typeof e!="string"&&!Ra(e)&&!Si(e)&&!Qs(e)?!1:e.length===0;if(typeof e=="object"){if(e instanceof Map||e instanceof Set)return e.size===0;const t=Object.keys(e);return G0(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var K0="",J0={curveBasis:vs,curveBasisClosed:Mg,curveBasisOpen:Eg,curveBumpX:ml,curveBumpY:yl,curveBundle:$g,curveCardinalClosed:Og,curveCardinalOpen:Ig,curveCardinal:kn,curveCatmullRomClosed:Dg,curveCatmullRomOpen:Pg,curveCatmullRom:Sn,curveLinear:gi,curveLinearClosed:Rg,curveMonotoneX:wn,curveMonotoneY:Tn,curveNatural:Bn,curveStep:vn,curveStepAfter:Ln,curveStepBefore:Fn},tx=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,ex=p(function(e,t){const r=nc(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const o=r.map(n=>n.args);Fi(o),i=kt(i,[...o])}else i=r.args;if(!i)return;let s=xa(e,t);const a="config";return i[a]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),i[s]=i[a],delete i[a]),i},"detectInit"),nc=p(function(e,t=null){var r,i;try{const s=new RegExp(`[%]{2}(?![{]${tx.source})(?=[}][%]{2}).*
|
|
158
|
-
`,"ig");e=e.trim().replace(s,"").replace(/'/gm,'"'),q.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let a;const o=[];for(;(a=wr.exec(e))!==null;)if(a.index===wr.lastIndex&&wr.lastIndex++,a&&!t||t&&((r=a[1])!=null&&r.match(t))||t&&((i=a[2])!=null&&i.match(t))){const n=a[1]?a[1]:a[2],l=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;o.push({type:n,args:l})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(s){return q.error(`ERROR: ${s.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),rx=p(function(e){return e.replace(wr,"")},"removeDirectives"),ix=p(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function za(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return J0[r]??t}p(za,"interpolateToCurve");function lc(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?C0(r):r}p(lc,"formatUrl");var sx=p((e,...t)=>{const r=e.split("."),i=r.length-1,s=r[i];let a=window;for(let o=0;o<i;o++)if(a=a[r[o]],!a){q.error(`Function name: ${e} not found in window`);return}a[s](...t)},"runFunc");function Na(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}p(Na,"distance");function hc(e){let t,r=0;e.forEach(s=>{r+=Na(s,t),t=s});const i=r/2;return Ha(e,i)}p(hc,"traverseEdge");function cc(e){return e.length===1?e[0]:hc(e)}p(cc,"calcLabelPosition");var $o=p((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Ha=p((e,t)=>{let r,i=t;for(const s of e){if(r){const a=Na(s,r);if(a===0)return r;if(a<i)i-=a;else{const o=i/a;if(o<=0)return r;if(o>=1)return{x:s.x,y:s.y};if(o>0&&o<1)return{x:$o((1-o)*r.x+o*s.x,5),y:$o((1-o)*r.y+o*s.y,5)}}}r=s}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),ax=p((e,t,r)=>{q.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const s=Ha(t,25),a=e?10:5,o=Math.atan2(t[0].y-s.y,t[0].x-s.x),n={x:0,y:0};return n.x=Math.sin(o)*a+(t[0].x+s.x)/2,n.y=-Math.cos(o)*a+(t[0].y+s.y)/2,n},"calcCardinalityPosition");function dc(e,t,r){const i=structuredClone(r);q.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const s=25+e,a=Ha(i,s),o=10+e*.5,n=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(n+Math.PI)*o+(i[0].x+a.x)/2,l.y=-Math.cos(n+Math.PI)*o+(i[0].y+a.y)/2):t==="end_right"?(l.x=Math.sin(n-Math.PI)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(n-Math.PI)*o+(i[0].y+a.y)/2-5):t==="end_left"?(l.x=Math.sin(n)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(n)*o+(i[0].y+a.y)/2-5):(l.x=Math.sin(n)*o+(i[0].x+a.x)/2,l.y=-Math.cos(n)*o+(i[0].y+a.y)/2),l}p(dc,"calcTerminalLabelPosition");function uc(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}p(uc,"getStylesFromArray");var Oo=0,ox=p(()=>(Oo++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Oo),"generateId");function gc(e){let t="";const r="0123456789abcdef",i=r.length;for(let s=0;s<e;s++)t+=r.charAt(Math.floor(Math.random()*i));return t}p(gc,"makeRandomHex");var nx=p(e=>gc(e.length),"random"),lx=p(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),hx=p(function(e,t){const r=t.text.replace(Zr.lineBreakRegex," "),[,i]=is(t.fontSize),s=e.append("text");s.attr("x",t.x),s.attr("y",t.y),s.style("text-anchor",t.anchor),s.style("font-family",t.fontFamily),s.style("font-size",i),s.style("font-weight",t.fontWeight),s.attr("fill",t.fill),t.class!==void 0&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.attr("fill",t.fill),a.text(r),s},"drawSimpleText"),cx=Jr((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Zr.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),s=[];let a="";return i.forEach((o,n)=>{const l=Ce(`${o} `,r),h=Ce(a,r);if(l>t){const{hyphenatedStrings:g,remainingWord:u}=dx(o,t,"-",r);s.push(a,...g),a=u}else h+l>=t?(s.push(a),a=o):a=[a,o].filter(Boolean).join(" ");n+1===i.length&&s.push(a)}),s.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),dx=Jr((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const s=[...e],a=[];let o="";return s.forEach((n,l)=>{const h=`${o}${n}`;if(Ce(h,i)>=t){const d=l+1,g=s.length===d,u=`${h}${r}`;a.push(g?h:u),o=""}else o=h}),{hyphenatedStrings:a,remainingWord:o}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function pc(e,t){return Ya(e,t).height}p(pc,"calculateTextHeight");function Ce(e,t){return Ya(e,t).width}p(Ce,"calculateTextWidth");var Ya=Jr((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:s=400}=t;if(!e)return{width:0,height:0};const[,a]=is(r),o=["sans-serif",i],n=e.split(Zr.lineBreakRegex),l=[],h=it("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const c=h.append("svg");for(const g of o){let u=0;const y={width:0,height:0,lineHeight:0};for(const f of n){const m=lx();m.text=f||K0;const C=hx(c,m).style("font-size",a).style("font-weight",s).style("font-family",g),b=(C._groups||C)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");y.width=Math.round(Math.max(y.width,b.width)),u=Math.round(b.height),y.height+=u,y.lineHeight=Math.round(Math.max(y.lineHeight,u))}l.push(y)}c.remove();const d=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[d]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Gr,ux=(Gr=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},p(Gr,"InitIDGenerator"),Gr),ai,gx=p(function(e){return ai=ai||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),ai.innerHTML=e,unescape(ai.textContent)},"entityDecode");function Ua(e){return"str"in e}p(Ua,"isDetailedError");var px=p((e,t,r,i)=>{var a;if(!i)return;const s=(a=e.node())==null?void 0:a.getBBox();s&&e.append("text").text(i).attr("text-anchor","middle").attr("x",s.x+s.width/2).attr("y",-r).attr("class",t)},"insertTitle"),is=p(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function ja(e,t){return Q0({},e,t)}p(ja,"cleanAndMerge");var Vt={assignWithDepth:kt,wrapLabel:cx,calculateTextHeight:pc,calculateTextWidth:Ce,calculateTextDimensions:Ya,cleanAndMerge:ja,detectInit:ex,detectDirective:nc,isSubstringInArray:ix,interpolateToCurve:za,calcLabelPosition:cc,calcCardinalityPosition:ax,calcTerminalLabelPosition:dc,formatUrl:lc,getStylesFromArray:uc,generateId:ox,random:nx,runFunc:sx,entityDecode:gx,insertTitle:px,isLabelCoordinateInPath:fc,parseFontSize:is,InitIDGenerator:ux},fx=p(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),ze=p(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),Lw=p((e,t,{counter:r=0,prefix:i,suffix:s},a)=>a||`${i?`${i}_`:""}${e}_${t}_${r}${s?`_${s}`:""}`,"getEdgeId");function Bt(e){return e??null}p(Bt,"handleUndefinedAttr");function fc(e,t){const r=Math.round(e.x),i=Math.round(e.y),s=t.replace(/(\d+\.\d+)/g,a=>Math.round(parseFloat(a)).toString());return s.includes(r.toString())||s.includes(i.toString())}p(fc,"isLabelCoordinateInPath");var Xa=p(({flowchart:e})=>{var s,a;const t=((s=e==null?void 0:e.subGraphTitleMargin)==null?void 0:s.top)??0,r=((a=e==null?void 0:e.subGraphTitleMargin)==null?void 0:a.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins");async function mc(e,t){const r=e.getElementsByTagName("img");if(!r||r.length===0)return;const i=t.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...r].map(s=>new Promise(a=>{function o(){if(s.style.display="flex",s.style.flexDirection="column",i){const n=ht().fontSize?ht().fontSize:window.getComputedStyle(document.body).fontSize,l=5,[h=Wn.fontSize]=is(n),c=h*l+"px";s.style.minWidth=c,s.style.maxWidth=c}else s.style.width="100%";a(s)}p(o,"setupImage"),setTimeout(()=>{s.complete&&o()}),s.addEventListener("error",o),s.addEventListener("load",o)})))}p(mc,"configureLabelImages");var mx=p(e=>{const{handDrawnSeed:t}=ht();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),nr=p(e=>{const t=yx([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),yx=p(e=>{const t=new Map;return e.forEach(r=>{const[i,s]=r.split(":");t.set(i.trim(),s==null?void 0:s.trim())}),t},"styles2Map"),yc=p(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),j=p(e=>{const{stylesArray:t}=nr(e),r=[],i=[],s=[],a=[];return t.forEach(o=>{const n=o[0];yc(n)?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),n.includes("stroke")&&s.push(o.join(":")+" !important"),n==="fill"&&a.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:s,backgroundStyles:a}},"styles2String"),U=p((e,t)=>{var l;const{themeVariables:r,handDrawnSeed:i}=ht(),{nodeBorder:s,mainBkg:a}=r,{stylesMap:o}=nr(e);return Object.assign({roughness:.7,fill:o.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||s,seed:i,strokeWidth:((l=o.get("stroke-width"))==null?void 0:l.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:Cx(o.get("stroke-dasharray"))},t)},"userNodeOverrides"),Cx=p(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const s=isNaN(t[0])?0:t[0];return[s,s]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray");const xx=Object.freeze({left:0,top:0,width:16,height:16}),Wi=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Cc=Object.freeze({...xx,...Wi}),bx=Object.freeze({...Cc,body:"",hidden:!1}),kx=Object.freeze({width:null,height:null}),Sx=Object.freeze({...kx,...Wi}),wx=(e,t,r,i="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;i=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const n=s.pop(),l=s.pop(),h={provider:s.length>0?s[0]:i,prefix:l,name:n};return t&&!ms(h)?null:h}const a=s[0],o=a.split("-");if(o.length>1){const n={provider:i,prefix:o.shift(),name:o.join("-")};return t&&!ms(n)?null:n}if(r&&i===""){const n={provider:i,prefix:"",name:a};return t&&!ms(n,r)?null:n}return null},ms=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function Tx(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}function Io(e,t){const r=Tx(e,t);for(const i in bx)i in Wi?i in e&&!(i in r)&&(r[i]=Wi[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function Bx(e,t){const r=e.icons,i=e.aliases||Object.create(null),s=Object.create(null);function a(o){if(r[o])return s[o]=[];if(!(o in s)){s[o]=null;const n=i[o]&&i[o].parent,l=n&&a(n);l&&(s[o]=[n].concat(l))}return s[o]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(a),s}function Do(e,t,r){const i=e.icons,s=e.aliases||Object.create(null);let a={};function o(n){a=Io(i[n]||s[n],a)}return o(t),r.forEach(o),Io(e,a)}function vx(e,t){if(e.icons[t])return Do(e,t,[]);const r=Bx(e,[t])[t];return r?Do(e,t,r):null}const Lx=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Fx=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Po(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(Lx);if(i===null||!i.length)return e;const s=[];let a=i.shift(),o=Fx.test(a);for(;;){if(o){const n=parseFloat(a);isNaN(n)?s.push(a):s.push(Math.ceil(n*t*r)/r)}else s.push(a);if(a=i.shift(),a===void 0)return s.join("");o=!o}}function _x(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const s=e.indexOf(">",i),a=e.indexOf("</"+t);if(s===-1||a===-1)break;const o=e.indexOf(">",a);if(o===-1)break;r+=e.slice(s+1,a).trim(),e=e.slice(0,i).trim()+e.slice(o+1)}return{defs:r,content:e}}function Ax(e,t){return e?"<defs>"+e+"</defs>"+t:t}function Mx(e,t,r){const i=_x(e);return Ax(i.defs,t+i.content+r)}const Ex=e=>e==="unset"||e==="undefined"||e==="none";function $x(e,t){const r={...Cc,...e},i={...Sx,...t},s={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(f=>{const m=[],C=f.hFlip,b=f.vFlip;let k=f.rotate;C?b?k+=2:(m.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),m.push("scale(-1 1)"),s.top=s.left=0):b&&(m.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),m.push("scale(1 -1)"),s.top=s.left=0);let T;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:T=s.height/2+s.top,m.unshift("rotate(90 "+T.toString()+" "+T.toString()+")");break;case 2:m.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:T=s.width/2+s.left,m.unshift("rotate(-90 "+T.toString()+" "+T.toString()+")");break}k%2===1&&(s.left!==s.top&&(T=s.left,s.left=s.top,s.top=T),s.width!==s.height&&(T=s.width,s.width=s.height,s.height=T)),m.length&&(a=Mx(a,'<g transform="'+m.join(" ")+'">',"</g>"))});const o=i.width,n=i.height,l=s.width,h=s.height;let c,d;o===null?(d=n===null?"1em":n==="auto"?h:n,c=Po(d,l/h)):(c=o==="auto"?l:o,d=n===null?Po(c,h/l):n==="auto"?h:n);const g={},u=(f,m)=>{Ex(m)||(g[f]=m.toString())};u("width",c),u("height",d);const y=[s.left,s.top,l,h];return g.viewBox=y.join(" "),{attributes:g,viewBox:y,body:a}}const Ox=/\sid="(\S+)"/g,Ro=new Map;function Ix(e){e=e.replace(/[0-9]+$/,"")||"a";const t=Ro.get(e)||0;return Ro.set(e,t+1),t?`${e}${t}`:e}function Dx(e){const t=[];let r;for(;r=Ox.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(s=>{const a=Ix(s),o=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function Px(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}function Ga(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ye=Ga();function xc(e){Ye=e}var Br={exec:()=>null};function ct(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(s,a)=>{let o=typeof a=="string"?a:a.source;return o=o.replace(Dt.caret,"$1"),r=r.replace(s,o),i},getRegex:()=>new RegExp(r,t)};return i}var Rx=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Dt={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},qx=/^(?:[ \t]*(?:\n|$))+/,Wx=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,zx=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ti=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Nx=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Va=/(?:[*+-]|\d{1,9}[.)])/,bc=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,kc=ct(bc).replace(/bull/g,Va).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Hx=ct(bc).replace(/bull/g,Va).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Za=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Yx=/^[^\n]+/,Qa=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Ux=ct(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Qa).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),jx=ct(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Va).getRegex(),ss="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ka=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Xx=ct("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Ka).replace("tag",ss).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Sc=ct(Za).replace("hr",ti).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ss).getRegex(),Gx=ct(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Sc).getRegex(),Ja={blockquote:Gx,code:Wx,def:Ux,fences:zx,heading:Nx,hr:ti,html:Xx,lheading:kc,list:jx,newline:qx,paragraph:Sc,table:Br,text:Yx},qo=ct("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ti).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ss).getRegex(),Vx={...Ja,lheading:Hx,table:qo,paragraph:ct(Za).replace("hr",ti).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",qo).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ss).getRegex()},Zx={...Ja,html:ct(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ka).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Br,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ct(Za).replace("hr",ti).replace("heading",` *#{1,6} *[^
|
|
159
|
-
]`).replace("lheading",kc).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Qx=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Kx=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,wc=/^( {2,}|\\)\n(?!\s*$)/,Jx=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,as=/[\p{P}\p{S}]/u,to=/[\s\p{P}\p{S}]/u,Tc=/[^\s\p{P}\p{S}]/u,tb=ct(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,to).getRegex(),Bc=/(?!~)[\p{P}\p{S}]/u,eb=/(?!~)[\s\p{P}\p{S}]/u,rb=/(?:[^\s\p{P}\p{S}]|~)/u,ib=ct(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Rx?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),vc=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,sb=ct(vc,"u").replace(/punct/g,as).getRegex(),ab=ct(vc,"u").replace(/punct/g,Bc).getRegex(),Lc="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",ob=ct(Lc,"gu").replace(/notPunctSpace/g,Tc).replace(/punctSpace/g,to).replace(/punct/g,as).getRegex(),nb=ct(Lc,"gu").replace(/notPunctSpace/g,rb).replace(/punctSpace/g,eb).replace(/punct/g,Bc).getRegex(),lb=ct("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Tc).replace(/punctSpace/g,to).replace(/punct/g,as).getRegex(),hb=ct(/\\(punct)/,"gu").replace(/punct/g,as).getRegex(),cb=ct(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),db=ct(Ka).replace("(?:-->|$)","-->").getRegex(),ub=ct("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",db).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),zi=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,gb=ct(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",zi).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Fc=ct(/^!?\[(label)\]\[(ref)\]/).replace("label",zi).replace("ref",Qa).getRegex(),_c=ct(/^!?\[(ref)\](?:\[\])?/).replace("ref",Qa).getRegex(),pb=ct("reflink|nolink(?!\\()","g").replace("reflink",Fc).replace("nolink",_c).getRegex(),Wo=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,eo={_backpedal:Br,anyPunctuation:hb,autolink:cb,blockSkip:ib,br:wc,code:Kx,del:Br,emStrongLDelim:sb,emStrongRDelimAst:ob,emStrongRDelimUnd:lb,escape:Qx,link:gb,nolink:_c,punctuation:tb,reflink:Fc,reflinkSearch:pb,tag:ub,text:Jx,url:Br},fb={...eo,link:ct(/^!?\[(label)\]\((.*?)\)/).replace("label",zi).getRegex(),reflink:ct(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",zi).getRegex()},Js={...eo,emStrongRDelimAst:nb,emStrongLDelim:ab,url:ct(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Wo).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:ct(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Wo).getRegex()},mb={...Js,br:ct(wc).replace("{2,}","*").getRegex(),text:ct(Js.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},oi={normal:Ja,gfm:Vx,pedantic:Zx},ur={normal:eo,gfm:Js,breaks:mb,pedantic:fb},yb={"&":"&","<":"<",">":">",'"':""","'":"'"},zo=e=>yb[e];function ie(e,t){if(t){if(Dt.escapeTest.test(e))return e.replace(Dt.escapeReplace,zo)}else if(Dt.escapeTestNoEncode.test(e))return e.replace(Dt.escapeReplaceNoEncode,zo);return e}function No(e){try{e=encodeURI(e).replace(Dt.percentDecode,"%")}catch{return null}return e}function Ho(e,t){var a;let r=e.replace(Dt.findPipe,(o,n,l)=>{let h=!1,c=n;for(;--c>=0&&l[c]==="\\";)h=!h;return h?"|":" |"}),i=r.split(Dt.splitPipe),s=0;if(i[0].trim()||i.shift(),i.length>0&&!((a=i.at(-1))!=null&&a.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;s<i.length;s++)i[s]=i[s].trim().replace(Dt.slashPipe,"|");return i}function gr(e,t,r){let i=e.length;if(i===0)return"";let s=0;for(;s<i;){let a=e.charAt(i-s-1);if(a===t&&!r)s++;else if(a!==t&&r)s++;else break}return e.slice(0,i-s)}function Cb(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return r>0?-2:-1}function Yo(e,t,r,i,s){let a=t.href,o=t.title||null,n=e[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:o,text:n,tokens:i.inlineTokens(n)};return i.state.inLink=!1,l}function xb(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
|
|
160
|
-
`).map(a=>{let o=a.match(r.other.beginningSpace);if(o===null)return a;let[n]=o;return n.length>=s.length?a.slice(s.length):a}).join(`
|
|
161
|
-
`)}var Ni=class{constructor(t){gt(this,"options");gt(this,"rules");gt(this,"lexer");this.options=t||Ye}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:gr(i,`
|
|
162
|
-
`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],s=xb(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:s}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let s=gr(i,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(i=s.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:gr(r[0],`
|
|
163
|
-
`)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=gr(r[0],`
|
|
164
|
-
`).split(`
|
|
165
|
-
`),s="",a="",o=[];for(;i.length>0;){let n=!1,l=[],h;for(h=0;h<i.length;h++)if(this.rules.other.blockquoteStart.test(i[h]))l.push(i[h]),n=!0;else if(!n)l.push(i[h]);else break;i=i.slice(h);let c=l.join(`
|
|
166
|
-
`),d=c.replace(this.rules.other.blockquoteSetextReplace,`
|
|
167
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
|
|
168
|
-
${c}`:c,a=a?`${a}
|
|
169
|
-
${d}`:d;let g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,o,!0),this.lexer.state.top=g,i.length===0)break;let u=o.at(-1);if((u==null?void 0:u.type)==="code")break;if((u==null?void 0:u.type)==="blockquote"){let y=u,f=y.raw+`
|
|
170
|
-
`+i.join(`
|
|
171
|
-
`),m=this.blockquote(f);o[o.length-1]=m,s=s.substring(0,s.length-y.raw.length)+m.raw,a=a.substring(0,a.length-y.text.length)+m.text;break}else if((u==null?void 0:u.type)==="list"){let y=u,f=y.raw+`
|
|
172
|
-
`+i.join(`
|
|
173
|
-
`),m=this.list(f);o[o.length-1]=m,s=s.substring(0,s.length-u.raw.length)+m.raw,a=a.substring(0,a.length-y.raw.length)+m.raw,i=f.substring(o.at(-1).raw.length).split(`
|
|
174
|
-
`);continue}}return{type:"blockquote",raw:s,tokens:o,text:a}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),s=i.length>1,a={type:"list",raw:"",ordered:s,start:s?+i.slice(0,-1):"",loose:!1,items:[]};i=s?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=s?i:"[*+-]");let o=this.rules.other.listItemRegex(i),n=!1;for(;t;){let h=!1,c="",d="";if(!(r=o.exec(t))||this.rules.block.hr.test(t))break;c=r[0],t=t.substring(c.length);let g=r[2].split(`
|
|
175
|
-
`,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),u=t.split(`
|
|
176
|
-
`,1)[0],y=!g.trim(),f=0;if(this.options.pedantic?(f=2,d=g.trimStart()):y?f=r[1].length+1:(f=r[2].search(this.rules.other.nonSpaceChar),f=f>4?1:f,d=g.slice(f),f+=r[1].length),y&&this.rules.other.blankLine.test(u)&&(c+=u+`
|
|
177
|
-
`,t=t.substring(u.length+1),h=!0),!h){let b=this.rules.other.nextBulletRegex(f),k=this.rules.other.hrRegex(f),T=this.rules.other.fencesBeginRegex(f),w=this.rules.other.headingBeginRegex(f),B=this.rules.other.htmlBeginRegex(f);for(;t;){let M=t.split(`
|
|
178
|
-
`,1)[0],L;if(u=M,this.options.pedantic?(u=u.replace(this.rules.other.listReplaceNesting," "),L=u):L=u.replace(this.rules.other.tabCharGlobal," "),T.test(u)||w.test(u)||B.test(u)||b.test(u)||k.test(u))break;if(L.search(this.rules.other.nonSpaceChar)>=f||!u.trim())d+=`
|
|
179
|
-
`+L.slice(f);else{if(y||g.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||T.test(g)||w.test(g)||k.test(g))break;d+=`
|
|
180
|
-
`+u}!y&&!u.trim()&&(y=!0),c+=M+`
|
|
181
|
-
`,t=t.substring(M.length+1),g=L.slice(f)}}a.loose||(n?a.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(n=!0));let m=null,C;this.options.gfm&&(m=this.rules.other.listIsTask.exec(d),m&&(C=m[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:c,task:!!m,checked:C,loose:!1,text:d,tokens:[]}),a.raw+=c}let l=a.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let h=0;h<a.items.length;h++)if(this.lexer.state.top=!1,a.items[h].tokens=this.lexer.blockTokens(a.items[h].text,[]),!a.loose){let c=a.items[h].tokens.filter(g=>g.type==="space"),d=c.length>0&&c.some(g=>this.rules.other.anyLine.test(g.raw));a.loose=d}if(a.loose)for(let h=0;h<a.items.length;h++)a.items[h].loose=!0;return a}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:s,title:a}}}table(t){var n;let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=Ho(r[1]),s=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(n=r[3])!=null&&n.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
182
|
-
`):[],o={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let l of s)this.rules.other.tableAlignRight.test(l)?o.align.push("right"):this.rules.other.tableAlignCenter.test(l)?o.align.push("center"):this.rules.other.tableAlignLeft.test(l)?o.align.push("left"):o.align.push(null);for(let l=0;l<i.length;l++)o.header.push({text:i[l],tokens:this.lexer.inline(i[l]),header:!0,align:o.align[l]});for(let l of a)o.rows.push(Ho(l,o.header.length).map((h,c)=>({text:h,tokens:this.lexer.inline(h),header:!1,align:o.align[c]})));return o}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
|
|
183
|
-
`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let o=gr(i.slice(0,-1),"\\");if((i.length-o.length)%2===0)return}else{let o=Cb(r[2],"()");if(o===-2)return;if(o>-1){let n=(r[0].indexOf("!")===0?5:4)+r[1].length+o;r[2]=r[2].substring(0,o),r[0]=r[0].substring(0,n).trim(),r[3]=""}}let s=r[2],a="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(s);o&&(s=o[1],a=o[3])}else a=r[3]?r[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),Yo(r,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=r[s.toLowerCase()];if(!a){let o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return Yo(i,a,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!i||this.rules.inline.punctuation.exec(i))){let a=[...s[0]].length-1,o,n,l=a,h=0,c=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,r=r.slice(-1*t.length+a);(s=c.exec(r))!=null;){if(o=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!o)continue;if(n=[...o].length,s[3]||s[4]){l+=n;continue}else if((s[5]||s[6])&&a%3&&!((a+n)%3)){h+=n;continue}if(l-=n,l>0)continue;n=Math.min(n,n+l+h);let d=[...s[0]][0].length,g=t.slice(0,a+s.index+d+n);if(Math.min(a,n)%2){let y=g.slice(1,-1);return{type:"em",raw:g,text:y,tokens:this.lexer.inlineTokens(y)}}let u=g.slice(2,-2);return{type:"strong",raw:g,text:u,tokens:this.lexer.inlineTokens(u)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(i),a=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&a&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,s;return r[2]==="@"?(i=r[1],s="mailto:"+i):(i=r[1],s=i),{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i;let r;if(r=this.rules.inline.url.exec(t)){let s,a;if(r[2]==="@")s=r[0],a="mailto:"+s;else{let o;do o=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(o!==r[0]);s=r[0],r[1]==="www."?a="http://"+r[0]:a=r[0]}return{type:"link",raw:r[0],text:s,href:a,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},Xt=class ta{constructor(t){gt(this,"tokens");gt(this,"options");gt(this,"state");gt(this,"tokenizer");gt(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Ye,this.options.tokenizer=this.options.tokenizer||new Ni,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:Dt,block:oi.normal,inline:ur.normal};this.options.pedantic?(r.block=oi.pedantic,r.inline=ur.pedantic):this.options.gfm&&(r.block=oi.gfm,this.options.breaks?r.inline=ur.breaks:r.inline=ur.gfm),this.tokenizer.rules=r}static get rules(){return{block:oi,inline:ur}}static lex(t,r){return new ta(r).lex(t)}static lexInline(t,r){return new ta(r).inlineTokens(t)}lex(t){t=t.replace(Dt.carriageReturn,`
|
|
184
|
-
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){var s,a,o;for(this.options.pedantic&&(t=t.replace(Dt.tabCharGlobal," ").replace(Dt.spaceLine,""));t;){let n;if((a=(s=this.options.extensions)==null?void 0:s.block)!=null&&a.some(h=>(n=h.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))continue;if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length);let h=r.at(-1);n.raw.length===1&&h!==void 0?h.raw+=`
|
|
185
|
-
`:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
186
|
-
`)?"":`
|
|
187
|
-
`)+n.raw,h.text+=`
|
|
188
|
-
`+n.text,this.inlineQueue.at(-1).src=h.text):r.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
189
|
-
`)?"":`
|
|
190
|
-
`)+n.raw,h.text+=`
|
|
191
|
-
`+n.raw,this.inlineQueue.at(-1).src=h.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},r.push(n));continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),r.push(n);continue}let l=t;if((o=this.options.extensions)!=null&&o.startBlock){let h=1/0,c=t.slice(1),d;this.options.extensions.startBlock.forEach(g=>{d=g.call({lexer:this},c),typeof d=="number"&&d>=0&&(h=Math.min(h,d))}),h<1/0&&h>=0&&(l=t.substring(0,h+1))}if(this.state.top&&(n=this.tokenizer.paragraph(l))){let h=r.at(-1);i&&(h==null?void 0:h.type)==="paragraph"?(h.raw+=(h.raw.endsWith(`
|
|
192
|
-
`)?"":`
|
|
193
|
-
`)+n.raw,h.text+=`
|
|
194
|
-
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(n),i=l.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
195
|
-
`)?"":`
|
|
196
|
-
`)+n.raw,h.text+=`
|
|
197
|
-
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(n);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var l,h,c,d,g;let i=t,s=null;if(this.tokens.links){let u=Object.keys(this.tokens.links);if(u.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)u.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,s.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)a=s[2]?s[2].length:0,i=i.slice(0,s.index+a)+"["+"a".repeat(s[0].length-a-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=((h=(l=this.options.hooks)==null?void 0:l.emStrongMask)==null?void 0:h.call({lexer:this},i))??i;let o=!1,n="";for(;t;){o||(n=""),o=!1;let u;if((d=(c=this.options.extensions)==null?void 0:c.inline)!=null&&d.some(f=>(u=f.call({lexer:this},t,r))?(t=t.substring(u.raw.length),r.push(u),!0):!1))continue;if(u=this.tokenizer.escape(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.tag(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.link(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(u.raw.length);let f=r.at(-1);u.type==="text"&&(f==null?void 0:f.type)==="text"?(f.raw+=u.raw,f.text+=u.text):r.push(u);continue}if(u=this.tokenizer.emStrong(t,i,n)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.codespan(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.br(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.del(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.autolink(t)){t=t.substring(u.raw.length),r.push(u);continue}if(!this.state.inLink&&(u=this.tokenizer.url(t))){t=t.substring(u.raw.length),r.push(u);continue}let y=t;if((g=this.options.extensions)!=null&&g.startInline){let f=1/0,m=t.slice(1),C;this.options.extensions.startInline.forEach(b=>{C=b.call({lexer:this},m),typeof C=="number"&&C>=0&&(f=Math.min(f,C))}),f<1/0&&f>=0&&(y=t.substring(0,f+1))}if(u=this.tokenizer.inlineText(y)){t=t.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(n=u.raw.slice(-1)),o=!0;let f=r.at(-1);(f==null?void 0:f.type)==="text"?(f.raw+=u.raw,f.text+=u.text):r.push(u);continue}if(t){let f="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(f);break}else throw new Error(f)}}return r}},Hi=class{constructor(t){gt(this,"options");gt(this,"parser");this.options=t||Ye}space(t){return""}code({text:t,lang:r,escaped:i}){var o;let s=(o=(r||"").match(Dt.notSpaceStart))==null?void 0:o[0],a=t.replace(Dt.endingNewline,"")+`
|
|
198
|
-
`;return s?'<pre><code class="language-'+ie(s)+'">'+(i?a:ie(a,!0))+`</code></pre>
|
|
199
|
-
`:"<pre><code>"+(i?a:ie(a,!0))+`</code></pre>
|
|
200
|
-
`}blockquote({tokens:t}){return`<blockquote>
|
|
201
|
-
${this.parser.parse(t)}</blockquote>
|
|
202
|
-
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
|
|
203
|
-
`}hr(t){return`<hr>
|
|
204
|
-
`}list(t){let r=t.ordered,i=t.start,s="";for(let n=0;n<t.items.length;n++){let l=t.items[n];s+=this.listitem(l)}let a=r?"ol":"ul",o=r&&i!==1?' start="'+i+'"':"";return"<"+a+o+`>
|
|
205
|
-
`+s+"</"+a+`>
|
|
206
|
-
`}listitem(t){var i;let r="";if(t.task){let s=this.checkbox({checked:!!t.checked});t.loose?((i=t.tokens[0])==null?void 0:i.type)==="paragraph"?(t.tokens[0].text=s+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=s+" "+ie(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:s+" ",text:s+" ",escaped:!0}):r+=s+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
|
|
207
|
-
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
208
|
-
`}table(t){let r="",i="";for(let a=0;a<t.header.length;a++)i+=this.tablecell(t.header[a]);r+=this.tablerow({text:i});let s="";for(let a=0;a<t.rows.length;a++){let o=t.rows[a];i="";for(let n=0;n<o.length;n++)i+=this.tablecell(o[n]);s+=this.tablerow({text:i})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
|
|
209
|
-
<thead>
|
|
210
|
-
`+r+`</thead>
|
|
211
|
-
`+s+`</table>
|
|
212
|
-
`}tablerow({text:t}){return`<tr>
|
|
213
|
-
${t}</tr>
|
|
214
|
-
`}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
|
|
215
|
-
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${ie(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let s=this.parser.parseInline(i),a=No(t);if(a===null)return s;t=a;let o='<a href="'+t+'"';return r&&(o+=' title="'+ie(r)+'"'),o+=">"+s+"</a>",o}image({href:t,title:r,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let a=No(t);if(a===null)return ie(i);t=a;let o=`<img src="${t}" alt="${i}"`;return r&&(o+=` title="${ie(r)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:ie(t.text)}},ro=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},Gt=class ea{constructor(t){gt(this,"options");gt(this,"renderer");gt(this,"textRenderer");this.options=t||Ye,this.options.renderer=this.options.renderer||new Hi,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ro}static parse(t,r){return new ea(r).parse(t)}static parseInline(t,r){return new ea(r).parseInline(t)}parse(t,r=!0){var s,a;let i="";for(let o=0;o<t.length;o++){let n=t[o];if((a=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&a[n.type]){let h=n,c=this.options.extensions.renderers[h.type].call({parser:this},h);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(h.type)){i+=c||"";continue}}let l=n;switch(l.type){case"space":{i+=this.renderer.space(l);continue}case"hr":{i+=this.renderer.hr(l);continue}case"heading":{i+=this.renderer.heading(l);continue}case"code":{i+=this.renderer.code(l);continue}case"table":{i+=this.renderer.table(l);continue}case"blockquote":{i+=this.renderer.blockquote(l);continue}case"list":{i+=this.renderer.list(l);continue}case"html":{i+=this.renderer.html(l);continue}case"def":{i+=this.renderer.def(l);continue}case"paragraph":{i+=this.renderer.paragraph(l);continue}case"text":{let h=l,c=this.renderer.text(h);for(;o+1<t.length&&t[o+1].type==="text";)h=t[++o],c+=`
|
|
216
|
-
`+this.renderer.text(h);r?i+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c,escaped:!0}]}):i+=c;continue}default:{let h='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return i}parseInline(t,r=this.renderer){var s,a;let i="";for(let o=0;o<t.length;o++){let n=t[o];if((a=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&a[n.type]){let h=this.options.extensions.renderers[n.type].call({parser:this},n);if(h!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type)){i+=h||"";continue}}let l=n;switch(l.type){case"escape":{i+=r.text(l);break}case"html":{i+=r.html(l);break}case"link":{i+=r.link(l);break}case"image":{i+=r.image(l);break}case"strong":{i+=r.strong(l);break}case"em":{i+=r.em(l);break}case"codespan":{i+=r.codespan(l);break}case"br":{i+=r.br(l);break}case"del":{i+=r.del(l);break}case"text":{i+=r.text(l);break}default:{let h='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return i}},ui,xr=(ui=class{constructor(t){gt(this,"options");gt(this,"block");this.options=t||Ye}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?Xt.lex:Xt.lexInline}provideParser(){return this.block?Gt.parse:Gt.parseInline}},gt(ui,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),gt(ui,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),ui),bb=class{constructor(...t){gt(this,"defaults",Ga());gt(this,"options",this.setOptions);gt(this,"parse",this.parseMarkdown(!0));gt(this,"parseInline",this.parseMarkdown(!1));gt(this,"Parser",Gt);gt(this,"Renderer",Hi);gt(this,"TextRenderer",ro);gt(this,"Lexer",Xt);gt(this,"Tokenizer",Ni);gt(this,"Hooks",xr);this.use(...t)}walkTokens(t,r){var s,a;let i=[];for(let o of t)switch(i=i.concat(r.call(this,o)),o.type){case"table":{let n=o;for(let l of n.header)i=i.concat(this.walkTokens(l.tokens,r));for(let l of n.rows)for(let h of l)i=i.concat(this.walkTokens(h.tokens,r));break}case"list":{let n=o;i=i.concat(this.walkTokens(n.items,r));break}default:{let n=o;(a=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&a[n.type]?this.defaults.extensions.childTokens[n.type].forEach(l=>{let h=n[l].flat(1/0);i=i.concat(this.walkTokens(h,r))}):n.tokens&&(i=i.concat(this.walkTokens(n.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let s={...i};if(s.async=this.defaults.async||s.async||!1,i.extensions&&(i.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let o=r.renderers[a.name];o?r.renderers[a.name]=function(...n){let l=a.renderer.apply(this,n);return l===!1&&(l=o.apply(this,n)),l}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=r[a.level];o?o.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),s.extensions=r),i.renderer){let a=this.defaults.renderer||new Hi(this.defaults);for(let o in i.renderer){if(!(o in a))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let n=o,l=i.renderer[n],h=a[n];a[n]=(...c)=>{let d=l.apply(a,c);return d===!1&&(d=h.apply(a,c)),d||""}}s.renderer=a}if(i.tokenizer){let a=this.defaults.tokenizer||new Ni(this.defaults);for(let o in i.tokenizer){if(!(o in a))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let n=o,l=i.tokenizer[n],h=a[n];a[n]=(...c)=>{let d=l.apply(a,c);return d===!1&&(d=h.apply(a,c)),d}}s.tokenizer=a}if(i.hooks){let a=this.defaults.hooks||new xr;for(let o in i.hooks){if(!(o in a))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let n=o,l=i.hooks[n],h=a[n];xr.passThroughHooks.has(o)?a[n]=c=>{if(this.defaults.async&&xr.passThroughHooksRespectAsync.has(o))return(async()=>{let g=await l.call(a,c);return h.call(a,g)})();let d=l.call(a,c);return h.call(a,d)}:a[n]=(...c)=>{if(this.defaults.async)return(async()=>{let g=await l.apply(a,c);return g===!1&&(g=await h.apply(a,c)),g})();let d=l.apply(a,c);return d===!1&&(d=h.apply(a,c)),d}}s.hooks=a}if(i.walkTokens){let a=this.defaults.walkTokens,o=i.walkTokens;s.walkTokens=function(n){let l=[];return l.push(o.call(this,n)),a&&(l=l.concat(a.call(this,n))),l}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return Xt.lex(t,r??this.defaults)}parser(t,r){return Gt.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let s={...i},a={...this.defaults,...s},o=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&s.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let n=a.hooks?await a.hooks.preprocess(r):r,l=await(a.hooks?await a.hooks.provideLexer():t?Xt.lex:Xt.lexInline)(n,a),h=a.hooks?await a.hooks.processAllTokens(l):l;a.walkTokens&&await Promise.all(this.walkTokens(h,a.walkTokens));let c=await(a.hooks?await a.hooks.provideParser():t?Gt.parse:Gt.parseInline)(h,a);return a.hooks?await a.hooks.postprocess(c):c})().catch(o);try{a.hooks&&(r=a.hooks.preprocess(r));let n=(a.hooks?a.hooks.provideLexer():t?Xt.lex:Xt.lexInline)(r,a);a.hooks&&(n=a.hooks.processAllTokens(n)),a.walkTokens&&this.walkTokens(n,a.walkTokens);let l=(a.hooks?a.hooks.provideParser():t?Gt.parse:Gt.parseInline)(n,a);return a.hooks&&(l=a.hooks.postprocess(l)),l}catch(n){return o(n)}}}onError(t,r){return i=>{if(i.message+=`
|
|
217
|
-
Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+ie(i.message+"",!0)+"</pre>";return r?Promise.resolve(s):s}if(r)return Promise.reject(i);throw i}}},Ne=new bb;function ut(e,t){return Ne.parse(e,t)}ut.options=ut.setOptions=function(e){return Ne.setOptions(e),ut.defaults=Ne.defaults,xc(ut.defaults),ut};ut.getDefaults=Ga;ut.defaults=Ye;ut.use=function(...e){return Ne.use(...e),ut.defaults=Ne.defaults,xc(ut.defaults),ut};ut.walkTokens=function(e,t){return Ne.walkTokens(e,t)};ut.parseInline=Ne.parseInline;ut.Parser=Gt;ut.parser=Gt.parse;ut.Renderer=Hi;ut.TextRenderer=ro;ut.Lexer=Xt;ut.lexer=Xt.lex;ut.Tokenizer=Ni;ut.Hooks=xr;ut.parse=ut;ut.options;ut.setOptions;ut.use;ut.walkTokens;ut.parseInline;Gt.parse;Xt.lex;function Ac(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var s=i.reduce(function(n,l){var h=l.match(/\n([\t ]+|(?!\s).)/g);return h?n.concat(h.map(function(c){var d,g;return(g=(d=c.match(/[\t ]/g))===null||d===void 0?void 0:d.length)!==null&&g!==void 0?g:0})):n},[]);if(s.length){var a=new RegExp(`
|
|
218
|
-
[ ]{`+Math.min.apply(Math,s)+"}","g");i=i.map(function(n){return n.replace(a,`
|
|
219
|
-
`)})}i[0]=i[0].replace(/^\r?\n/,"");var o=i[0];return t.forEach(function(n,l){var h=o.match(/(?:^|\n)( *)$/),c=h?h[1]:"",d=n;typeof n=="string"&&n.includes(`
|
|
220
|
-
`)&&(d=String(n).split(`
|
|
221
|
-
`).map(function(g,u){return u===0?g:""+c+g}).join(`
|
|
222
|
-
`)),o+=d+i[l+1]}),o}var kb={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},ra=new Map,Mc=new Map,Sb=p(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(q.debug("Registering icon pack:",t.name),"loader"in t)Mc.set(t.name,t.loader);else if("icons"in t)ra.set(t.name,t.icons);else throw q.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Ec=p(async(e,t)=>{const r=wx(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let s=ra.get(i);if(!s){const o=Mc.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{s={...await o(),prefix:i},ra.set(i,s)}catch(n){throw q.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=vx(s,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),wb=p(async e=>{try{return await Ec(e),!0}catch{return!1}},"isIconAvailable"),ei=p(async(e,t,r)=>{let i;try{i=await Ec(e,t==null?void 0:t.fallbackPrefix)}catch(o){q.error(o),i=kb}const s=$x(i,t),a=Px(Dx(s.body),{...s.attributes,...r});return Kt(a,mt())},"getIconSVG");function $c(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
|
|
223
|
-
`).replace(/\n{2,}/g,`
|
|
224
|
-
`);return Ac(i)}p($c,"preprocessMarkdown");function Oc(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>{var r;return((r=t.trim().match(/<[^>]+>|[^\s<>]+/g))==null?void 0:r.map(i=>({content:i,type:"normal"})))??[]})}p(Oc,"nonMarkdownToLines");function Ic(e,t={}){const r=$c(e,t),i=ut.lexer(r),s=[[]];let a=0;function o(n,l="normal"){n.type==="text"?n.text.split(`
|
|
225
|
-
`).forEach((c,d)=>{d!==0&&(a++,s.push([])),c.split(" ").forEach(g=>{g=g.replace(/'/g,"'"),g&&s[a].push({content:g,type:l})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(h=>{o(h,n.type)}):n.type==="html"&&s[a].push({content:n.text,type:"normal"})}return p(o,"processNode"),i.forEach(n=>{var l;n.type==="paragraph"?(l=n.tokens)==null||l.forEach(h=>{o(h)}):n.type==="html"?s[a].push({content:n.text,type:"normal"}):s[a].push({content:n.raw,type:"normal"})}),s}p(Ic,"markdownToLines");function Dc(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}p(Dc,"nonMarkdownToHTML");function Pc(e,{markdownAutoWrap:t}={}){const r=ut.lexer(e);function i(s){var a,o,n;return s.type==="text"?t===!1?s.text.replace(/\n */g,"<br/>").replace(/ /g," "):s.text.replace(/\n */g,"<br/>"):s.type==="strong"?`<strong>${(a=s.tokens)==null?void 0:a.map(i).join("")}</strong>`:s.type==="em"?`<em>${(o=s.tokens)==null?void 0:o.map(i).join("")}</em>`:s.type==="paragraph"?`<p>${(n=s.tokens)==null?void 0:n.map(i).join("")}</p>`:s.type==="space"?"":s.type==="html"?`${s.text}`:s.type==="escape"?s.text:(q.warn(`Unsupported markdown: ${s.type}`),s.raw)}return p(i,"output"),r.map(i).join("")}p(Pc,"markdownToHTML");function Rc(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}p(Rc,"splitTextToChars");function qc(e,t){const r=Rc(t.content);return io(e,[],r,t.type)}p(qc,"splitWordToFitWidth");function io(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[s,...a]=r,o=[...t,s];return e([{content:o.join(""),type:i}])?io(e,o,a,i):(t.length===0&&s&&(t.push(s),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}p(io,"splitWordToFitWidthRecursion");function Wc(e,t){if(e.some(({content:r})=>r.includes(`
|
|
226
|
-
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return Yi(e,t)}p(Wc,"splitLineToFitWidth");function Yi(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let s="";e[0].content===" "&&(s=" ",e.shift());const a=e.shift()??{content:" ",type:"normal"},o=[...i];if(s!==""&&o.push({content:s,type:"normal"}),o.push(a),t(o))return Yi(e,t,r,o);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){const[n,l]=qc(t,a);r.push([n]),l.content&&e.unshift(l)}return Yi(e,t,r)}p(Yi,"splitLineToFitWidthRecursion");function ia(e,t){t&&e.attr("style",t)}p(ia,"applyStyle");var Uo=16384;async function zc(e,t,r,i,s=!1,a=mt()){const o=e.append("foreignObject");o.attr("width",`${Math.min(10*r,Uo)}px`),o.attr("height",`${Math.min(10*r,Uo)}px`);const n=o.append("xhtml:div"),l=Lr(t.label)?await Zn(t.label.replace(Zr.lineBreakRegex,`
|
|
227
|
-
`),a):Kt(t.label,a),h=t.isNode?"nodeLabel":"edgeLabel",c=n.append("span");c.html(l),ia(c,t.labelStyle),c.attr("class",`${h} ${i}`),ia(n,t.labelStyle),n.style("display","table-cell"),n.style("white-space","nowrap"),n.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(n.style("max-width",r+"px"),n.style("text-align","center")),n.attr("xmlns","http://www.w3.org/1999/xhtml"),s&&n.attr("class","labelBkg");let d=n.node().getBoundingClientRect();return d.width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px"),d=n.node().getBoundingClientRect()),o.node()}p(zc,"addHtmlSpan");function os(e,t,r,i=!1){const s=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&s.attr("text-anchor","middle"),s}p(os,"createTspan");function Nc(e,t,r){const i=e.append("text"),s=os(i,1,t);ns(s,r);const a=s.node().getComputedTextLength();return i.remove(),a}p(Nc,"computeWidthOfText");function Tb(e,t,r){var o;const i=e.append("text"),s=os(i,1,t);ns(s,[{content:r,type:"normal"}]);const a=(o=s.node())==null?void 0:o.getBoundingClientRect();return a&&i.remove(),a}p(Tb,"computeDimensionOfText");function Hc(e,t,r,i=!1,s=!1){const o=t.append("g"),n=o.insert("rect").attr("class","background").attr("style","stroke: none"),l=o.append("text").attr("y","-10.1");s&&l.attr("text-anchor","middle");let h=0;for(const c of r){const d=p(u=>Nc(o,1.1,u)<=e,"checkWidth"),g=d(c)?[c]:Wc(c,d);for(const u of g){const y=os(l,h,1.1,s);ns(y,u),h++}}if(i){const c=l.node().getBBox(),d=2;return n.attr("x",c.x-d).attr("y",c.y-d).attr("width",c.width+2*d).attr("height",c.height+2*d),o.node()}else return l.node()}p(Hc,"createFormattedText");function sa(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}p(sa,"decodeHTMLEntities");function ns(e,t){e.text(""),t.forEach((r,i)=>{const s=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?s.text(sa(r.content)):s.text(" "+sa(r.content))})}p(ns,"updateTextContentAndStyles");async function Yc(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,a,o)=>(r.push((async()=>{const n=`${a}:${o}`;return await wb(n)?await ei(n,void 0,{class:"label-icon"}):`<i class='${Kt(s,t).replace(":"," ")}'></i>`})()),s));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}p(Yc,"replaceIconSubstring");var be=p(async(e,t="",{style:r="",isTitle:i=!1,classes:s="",useHtmlLabels:a=!0,markdown:o=!0,isNode:n=!0,width:l=200,addSvgBackground:h=!1}={},c)=>{if(q.debug("XYZ createText",t,r,i,s,a,n,"addSvgBackground: ",h),a){const d=o?Pc(t,c):Dc(t),g=await Yc(ze(d),c),u=t.replace(/\\\\/g,"\\"),y={isNode:n,label:Lr(t)?u:g,labelStyle:r.replace("fill:","color:")};return await zc(e,y,l,s,h,c)}else{const d=ze(t.replace(/<br\s*\/?>/g,"<br/>")),g=o?Ic(d.replace("<br>","<br/>"),c):Oc(d),u=Hc(l,e,g,t?h:!1,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");it(u).attr("style",y)}else{const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");it(u).select("rect").attr("style",y.replace(/background:/g,"fill:"));const f=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");it(u).select("text").attr("style",f)}return i?it(u).selectAll("tspan.text-outer-tspan").classed("title-row",!0):it(u).selectAll("tspan.text-outer-tspan").classed("row",!0),u}},"createText");function ys(e,t,r){if(e&&e.length){const[i,s]=t,a=Math.PI/180*r,o=Math.cos(a),n=Math.sin(a);for(const l of e){const[h,c]=l;l[0]=(h-i)*o-(c-s)*n+i,l[1]=(h-i)*n+(c-s)*o+s}}}function Bb(e,t){return e[0]===t[0]&&e[1]===t[1]}function vb(e,t,r,i=1){const s=r,a=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(s)for(const h of o)ys(h,n,s);const l=function(h,c,d){const g=[];for(const b of h){const k=[...b];Bb(k[0],k[k.length-1])||k.push([k[0][0],k[0][1]]),k.length>2&&g.push(k)}const u=[];c=Math.max(c,.1);const y=[];for(const b of g)for(let k=0;k<b.length-1;k++){const T=b[k],w=b[k+1];if(T[1]!==w[1]){const B=Math.min(T[1],w[1]);y.push({ymin:B,ymax:Math.max(T[1],w[1]),x:B===T[1]?T[0]:w[0],islope:(w[0]-T[0])/(w[1]-T[1])})}}if(y.sort((b,k)=>b.ymin<k.ymin?-1:b.ymin>k.ymin?1:b.x<k.x?-1:b.x>k.x?1:b.ymax===k.ymax?0:(b.ymax-k.ymax)/Math.abs(b.ymax-k.ymax)),!y.length)return u;let f=[],m=y[0].ymin,C=0;for(;f.length||y.length;){if(y.length){let b=-1;for(let k=0;k<y.length&&!(y[k].ymin>m);k++)b=k;y.splice(0,b+1).forEach(k=>{f.push({s:m,edge:k})})}if(f=f.filter(b=>!(b.edge.ymax<=m)),f.sort((b,k)=>b.edge.x===k.edge.x?0:(b.edge.x-k.edge.x)/Math.abs(b.edge.x-k.edge.x)),(d!==1||C%c==0)&&f.length>1)for(let b=0;b<f.length;b+=2){const k=b+1;if(k>=f.length)break;const T=f[b].edge,w=f[k].edge;u.push([[Math.round(T.x),m],[Math.round(w.x),m]])}m+=d,f.forEach(b=>{b.edge.x=b.edge.x+d*b.edge.islope}),C++}return u}(o,a,i);if(s){for(const h of o)ys(h,n,-s);(function(h,c,d){const g=[];h.forEach(u=>g.push(...u)),ys(g,c,d)})(l,n,-s)}return l}function ri(e,t){var r;const i=t.hachureAngle+90;let s=t.hachureGap;s<0&&(s=4*t.strokeWidth),s=Math.round(Math.max(s,.1));let a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=s),vb(e,s,i,a||1)}class so{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=ri(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const s of t)i.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],r));return i}}function ls(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class Lb extends so{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const s=ri(t,Object.assign({},r,{hachureGap:i})),a=Math.PI/180*r.hachureAngle,o=[],n=.5*i*Math.cos(a),l=.5*i*Math.sin(a);for(const[h,c]of s)ls([h,c])&&o.push([[h[0]-n,h[1]+l],[...c]],[[h[0]+n,h[1]-l],[...c]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}}class Fb extends so{fillPolygons(t,r){const i=this._fillPolygons(t,r),s=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(t,s);return i.ops=i.ops.concat(a.ops),i}}class _b{constructor(t){this.helper=t}fillPolygons(t,r){const i=ri(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let s=r.hachureGap;s<0&&(s=4*r.strokeWidth),s=Math.max(s,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);const o=s/4;for(const n of t){const l=ls(n),h=l/s,c=Math.ceil(h)-1,d=l-c*s,g=(n[0][0]+n[1][0])/2-s/4,u=Math.min(n[0][1],n[1][1]);for(let y=0;y<c;y++){const f=u+d+y*s,m=g-o+2*Math.random()*o,C=f-o+2*Math.random()*o,b=this.helper.ellipse(m,C,a,a,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class Ab{constructor(t){this.helper=t}fillPolygons(t,r){const i=ri(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,s=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,a=[];return t.forEach(o=>{const n=ls(o),l=Math.floor(n/(i+s)),h=(n+s-l*(i+s))/2;let c=o[0],d=o[1];c[0]>d[0]&&(c=o[1],d=o[0]);const g=Math.atan((d[1]-c[1])/(d[0]-c[0]));for(let u=0;u<l;u++){const y=u*(i+s),f=y+i,m=[c[0]+y*Math.cos(g)+h*Math.cos(g),c[1]+y*Math.sin(g)+h*Math.sin(g)],C=[c[0]+f*Math.cos(g)+h*Math.cos(g),c[1]+f*Math.sin(g)+h*Math.sin(g)];a.push(...this.helper.doubleLineOps(m[0],m[1],C[0],C[1],r))}}),a}}class Mb{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,s=r.zigzagOffset<0?i:r.zigzagOffset,a=ri(t,r=Object.assign({},r,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(a,s,r)}}zigzagLines(t,r,i){const s=[];return t.forEach(a=>{const o=ls(a),n=Math.round(o/(2*r));let l=a[0],h=a[1];l[0]>h[0]&&(l=a[1],h=a[0]);const c=Math.atan((h[1]-l[1])/(h[0]-l[0]));for(let d=0;d<n;d++){const g=2*d*r,u=2*(d+1)*r,y=Math.sqrt(2*Math.pow(r,2)),f=[l[0]+g*Math.cos(c),l[1]+g*Math.sin(c)],m=[l[0]+u*Math.cos(c),l[1]+u*Math.sin(c)],C=[f[0]+y*Math.cos(c+Math.PI/4),f[1]+y*Math.sin(c+Math.PI/4)];s.push(...this.helper.doubleLineOps(f[0],f[1],C[0],C[1],i),...this.helper.doubleLineOps(C[0],C[1],m[0],m[1],i))}}),s}}const Rt={};class Eb{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const $b=0,Cs=1,jo=2,ni={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function xs(e,t){return e.type===t}function ao(e){const t=[],r=function(o){const n=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:$b,text:RegExp.$1},o=o.substr(RegExp.$1.length);else{if(!o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:Cs,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return n[n.length]={type:jo,text:""},n}(e);let i="BOD",s=0,a=r[s];for(;!xs(a,jo);){let o=0;const n=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return ao("M0,0"+e);s++,o=ni[a.text],i=a.text}else xs(a,Cs)?o=ni[i]:(s++,o=ni[a.text],i=a.text);if(!(s+o<r.length))throw new Error("Path data ended short");for(let l=s;l<s+o;l++){const h=r[l];if(!xs(h,Cs))throw new Error("Param not a number: "+i+","+h.text);n[n.length]=+h.text}if(typeof ni[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:n};t.push(l),s+=o,a=r[s],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function Uc(e){let t=0,r=0,i=0,s=0;const a=[];for(const{key:o,data:n}of e)switch(o){case"M":a.push({key:"M",data:[...n]}),[t,r]=n,[i,s]=n;break;case"m":t+=n[0],r+=n[1],a.push({key:"M",data:[t,r]}),i=t,s=r;break;case"L":a.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],a.push({key:"L",data:[t,r]});break;case"C":a.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const l=n.map((h,c)=>c%2?h+r:h+t);a.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":a.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const l=n.map((h,c)=>c%2?h+r:h+t);a.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":a.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],a.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":a.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const l=n.map((h,c)=>c%2?h+r:h+t);a.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":a.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=i,r=s}return a}function jc(e){const t=[];let r="",i=0,s=0,a=0,o=0,n=0,l=0;for(const{key:h,data:c}of e){switch(h){case"M":t.push({key:"M",data:[...c]}),[i,s]=c,[a,o]=c;break;case"C":t.push({key:"C",data:[...c]}),i=c[4],s=c[5],n=c[2],l=c[3];break;case"L":t.push({key:"L",data:[...c]}),[i,s]=c;break;case"H":i=c[0],t.push({key:"L",data:[i,s]});break;case"V":s=c[0],t.push({key:"L",data:[i,s]});break;case"S":{let d=0,g=0;r==="C"||r==="S"?(d=i+(i-n),g=s+(s-l)):(d=i,g=s),t.push({key:"C",data:[d,g,...c]}),n=c[0],l=c[1],i=c[2],s=c[3];break}case"T":{const[d,g]=c;let u=0,y=0;r==="Q"||r==="T"?(u=i+(i-n),y=s+(s-l)):(u=i,y=s);const f=i+2*(u-i)/3,m=s+2*(y-s)/3,C=d+2*(u-d)/3,b=g+2*(y-g)/3;t.push({key:"C",data:[f,m,C,b,d,g]}),n=u,l=y,i=d,s=g;break}case"Q":{const[d,g,u,y]=c,f=i+2*(d-i)/3,m=s+2*(g-s)/3,C=u+2*(d-u)/3,b=y+2*(g-y)/3;t.push({key:"C",data:[f,m,C,b,u,y]}),n=d,l=g,i=u,s=y;break}case"A":{const d=Math.abs(c[0]),g=Math.abs(c[1]),u=c[2],y=c[3],f=c[4],m=c[5],C=c[6];d===0||g===0?(t.push({key:"C",data:[i,s,m,C,m,C]}),i=m,s=C):(i!==m||s!==C)&&(Xc(i,s,m,C,d,g,u,y,f).forEach(function(b){t.push({key:"C",data:b})}),i=m,s=C);break}case"Z":t.push({key:"Z",data:[]}),i=a,s=o}r=h}return t}function pr(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function Xc(e,t,r,i,s,a,o,n,l,h){const c=(d=o,Math.PI*d/180);var d;let g=[],u=0,y=0,f=0,m=0;if(h)[u,y,f,m]=h;else{[e,t]=pr(e,t,-c),[r,i]=pr(r,i,-c);const z=(e-r)/2,D=(t-i)/2;let A=z*z/(s*s)+D*D/(a*a);A>1&&(A=Math.sqrt(A),s*=A,a*=A);const F=s*s,E=a*a,_=F*E-F*D*D-E*z*z,S=F*D*D+E*z*z,R=(n===l?-1:1)*Math.sqrt(Math.abs(_/S));f=R*s*D/a+(e+r)/2,m=R*-a*z/s+(t+i)/2,u=Math.asin(parseFloat(((t-m)/a).toFixed(9))),y=Math.asin(parseFloat(((i-m)/a).toFixed(9))),e<f&&(u=Math.PI-u),r<f&&(y=Math.PI-y),u<0&&(u=2*Math.PI+u),y<0&&(y=2*Math.PI+y),l&&u>y&&(u-=2*Math.PI),!l&&y>u&&(y-=2*Math.PI)}let C=y-u;if(Math.abs(C)>120*Math.PI/180){const z=y,D=r,A=i;y=l&&y>u?u+120*Math.PI/180*1:u+120*Math.PI/180*-1,g=Xc(r=f+s*Math.cos(y),i=m+a*Math.sin(y),D,A,s,a,o,0,l,[y,z,f,m])}C=y-u;const b=Math.cos(u),k=Math.sin(u),T=Math.cos(y),w=Math.sin(y),B=Math.tan(C/4),M=4/3*s*B,L=4/3*a*B,W=[e,t],P=[e+M*k,t-L*b],$=[r+M*w,i-L*T],N=[r,i];if(P[0]=2*W[0]-P[0],P[1]=2*W[1]-P[1],h)return[P,$,N].concat(g);{g=[P,$,N].concat(g);const z=[];for(let D=0;D<g.length;D+=3){const A=pr(g[D][0],g[D][1],c),F=pr(g[D+1][0],g[D+1][1],c),E=pr(g[D+2][0],g[D+2][1],c);z.push([A[0],A[1],F[0],F[1],E[0],E[1]])}return z}}const Ob={randOffset:function(e,t){return Q(e,t)},randOffsetWithRange:function(e,t,r){return Ui(e,t,r)},ellipse:function(e,t,r,i,s){const a=Vc(r,i,s);return aa(e,t,s,a).opset},doubleLineOps:function(e,t,r,i,s){return _e(e,t,r,i,s,!0)}};function Gc(e,t,r,i,s){return{type:"path",ops:_e(e,t,r,i,s)}}function Ti(e,t,r){const i=(e||[]).length;if(i>2){const s=[];for(let a=0;a<i-1;a++)s.push(..._e(e[a][0],e[a][1],e[a+1][0],e[a+1][1],r));return t&&s.push(..._e(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:s}}return i===2?Gc(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function Ib(e,t,r,i,s){return function(a,o){return Ti(a,!0,o)}([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],s)}function Xo(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=li(r[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:li(r[0],1.5*(1+.22*t.roughness),Zo(t));for(let a=1;a<r.length;a++){const o=r[a];if(o.length){const n=li(o,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:li(o,1.5*(1+.22*t.roughness),Zo(t));for(const h of n)h.op!=="move"&&i.push(h);for(const h of l)h.op!=="move"&&s.push(h)}}return{type:"path",ops:i.concat(s)}}return{type:"path",ops:[]}}function Vc(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),s=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),a=2*Math.PI/s;let o=Math.abs(e/2),n=Math.abs(t/2);const l=1-r.curveFitting;return o+=Q(o*l,r),n+=Q(n*l,r),{increment:a,rx:o,ry:n}}function aa(e,t,r,i){const[s,a]=Qo(i.increment,e,t,i.rx,i.ry,1,i.increment*Ui(.1,Ui(.4,1,r),r),r);let o=ji(s,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=Qo(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=ji(n,null,r);o=o.concat(l)}return{estimatedPoints:a,opset:{type:"path",ops:o}}}function Go(e,t,r,i,s,a,o,n,l){const h=e,c=t;let d=Math.abs(r/2),g=Math.abs(i/2);d+=Q(.01*d,l),g+=Q(.01*g,l);let u=s,y=a;for(;u<0;)u+=2*Math.PI,y+=2*Math.PI;y-u>2*Math.PI&&(u=0,y=2*Math.PI);const f=2*Math.PI/l.curveStepCount,m=Math.min(f/2,(y-u)/2),C=Ko(m,h,c,d,g,u,y,1,l);if(!l.disableMultiStroke){const b=Ko(m,h,c,d,g,u,y,1.5,l);C.push(...b)}return o&&(n?C.push(..._e(h,c,h+d*Math.cos(u),c+g*Math.sin(u),l),..._e(h,c,h+d*Math.cos(y),c+g*Math.sin(y),l)):C.push({op:"lineTo",data:[h,c]},{op:"lineTo",data:[h+d*Math.cos(u),c+g*Math.sin(u)]})),{type:"path",ops:C}}function Vo(e,t){const r=jc(Uc(ao(e))),i=[];let s=[0,0],a=[0,0];for(const{key:o,data:n}of r)switch(o){case"M":a=[n[0],n[1]],s=[n[0],n[1]];break;case"L":i.push(..._e(a[0],a[1],n[0],n[1],t)),a=[n[0],n[1]];break;case"C":{const[l,h,c,d,g,u]=n;i.push(...Db(l,h,c,d,g,u,a,t)),a=[g,u];break}case"Z":i.push(..._e(a[0],a[1],s[0],s[1],t)),a=[s[0],s[1]]}return{type:"path",ops:i}}function bs(e,t){const r=[];for(const i of e)if(i.length){const s=t.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+Q(s,t),i[0][1]+Q(s,t)]});for(let o=1;o<a;o++)r.push({op:"lineTo",data:[i[o][0]+Q(s,t),i[o][1]+Q(s,t)]})}}return{type:"fillPath",ops:r}}function Ue(e,t){return function(r,i){let s=r.fillStyle||"hachure";if(!Rt[s])switch(s){case"zigzag":Rt[s]||(Rt[s]=new Lb(i));break;case"cross-hatch":Rt[s]||(Rt[s]=new Fb(i));break;case"dots":Rt[s]||(Rt[s]=new _b(i));break;case"dashed":Rt[s]||(Rt[s]=new Ab(i));break;case"zigzag-line":Rt[s]||(Rt[s]=new Mb(i));break;default:s="hachure",Rt[s]||(Rt[s]=new so(i))}return Rt[s]}(t,Ob).fillPolygons(e,t)}function Zo(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Zc(e){return e.randomizer||(e.randomizer=new Eb(e.seed||0)),e.randomizer.next()}function Ui(e,t,r,i=1){return r.roughness*i*(Zc(r)*(t-e)+e)}function Q(e,t,r=1){return Ui(-e,e,t,r)}function _e(e,t,r,i,s,a=!1){const o=a?s.disableMultiStrokeFill:s.disableMultiStroke,n=oa(e,t,r,i,s,!0,!1);if(o)return n;const l=oa(e,t,r,i,s,!0,!0);return n.concat(l)}function oa(e,t,r,i,s,a,o){const n=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(n);let h=1;h=l<200?1:l>500?.4:-.0016668*l+1.233334;let c=s.maxRandomnessOffset||0;c*c*100>n&&(c=l/10);const d=c/2,g=.2+.2*Zc(s);let u=s.bowing*s.maxRandomnessOffset*(i-t)/200,y=s.bowing*s.maxRandomnessOffset*(e-r)/200;u=Q(u,s,h),y=Q(y,s,h);const f=[],m=()=>Q(d,s,h),C=()=>Q(c,s,h),b=s.preserveVertices;return a&&(o?f.push({op:"move",data:[e+(b?0:m()),t+(b?0:m())]}):f.push({op:"move",data:[e+(b?0:Q(c,s,h)),t+(b?0:Q(c,s,h))]})),o?f.push({op:"bcurveTo",data:[u+e+(r-e)*g+m(),y+t+(i-t)*g+m(),u+e+2*(r-e)*g+m(),y+t+2*(i-t)*g+m(),r+(b?0:m()),i+(b?0:m())]}):f.push({op:"bcurveTo",data:[u+e+(r-e)*g+C(),y+t+(i-t)*g+C(),u+e+2*(r-e)*g+C(),y+t+2*(i-t)*g+C(),r+(b?0:C()),i+(b?0:C())]}),f}function li(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+Q(t,r),e[0][1]+Q(t,r)]),i.push([e[0][0]+Q(t,r),e[0][1]+Q(t,r)]);for(let s=1;s<e.length;s++)i.push([e[s][0]+Q(t,r),e[s][1]+Q(t,r)]),s===e.length-1&&i.push([e[s][0]+Q(t,r),e[s][1]+Q(t,r)]);return ji(i,null,r)}function ji(e,t,r){const i=e.length,s=[];if(i>3){const a=[],o=1-r.curveTightness;s.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const l=e[n];a[0]=[l[0],l[1]],a[1]=[l[0]+(o*e[n+1][0]-o*e[n-1][0])/6,l[1]+(o*e[n+1][1]-o*e[n-1][1])/6],a[2]=[e[n+1][0]+(o*e[n][0]-o*e[n+2][0])/6,e[n+1][1]+(o*e[n][1]-o*e[n+2][1])/6],a[3]=[e[n+1][0],e[n+1][1]],s.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}if(t&&t.length===2){const n=r.maxRandomnessOffset;s.push({op:"lineTo",data:[t[0]+Q(n,r),t[1]+Q(n,r)]})}}else i===3?(s.push({op:"move",data:[e[1][0],e[1][1]]}),s.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&s.push(...oa(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return s}function Qo(e,t,r,i,s,a,o,n){const l=[],h=[];if(n.roughness===0){e/=4,h.push([t+i*Math.cos(-e),r+s*Math.sin(-e)]);for(let c=0;c<=2*Math.PI;c+=e){const d=[t+i*Math.cos(c),r+s*Math.sin(c)];l.push(d),h.push(d)}h.push([t+i*Math.cos(0),r+s*Math.sin(0)]),h.push([t+i*Math.cos(e),r+s*Math.sin(e)])}else{const c=Q(.5,n)-Math.PI/2;h.push([Q(a,n)+t+.9*i*Math.cos(c-e),Q(a,n)+r+.9*s*Math.sin(c-e)]);const d=2*Math.PI+c-.01;for(let g=c;g<d;g+=e){const u=[Q(a,n)+t+i*Math.cos(g),Q(a,n)+r+s*Math.sin(g)];l.push(u),h.push(u)}h.push([Q(a,n)+t+i*Math.cos(c+2*Math.PI+.5*o),Q(a,n)+r+s*Math.sin(c+2*Math.PI+.5*o)]),h.push([Q(a,n)+t+.98*i*Math.cos(c+o),Q(a,n)+r+.98*s*Math.sin(c+o)]),h.push([Q(a,n)+t+.9*i*Math.cos(c+.5*o),Q(a,n)+r+.9*s*Math.sin(c+.5*o)])}return[h,l]}function Ko(e,t,r,i,s,a,o,n,l){const h=a+Q(.1,l),c=[];c.push([Q(n,l)+t+.9*i*Math.cos(h-e),Q(n,l)+r+.9*s*Math.sin(h-e)]);for(let d=h;d<=o;d+=e)c.push([Q(n,l)+t+i*Math.cos(d),Q(n,l)+r+s*Math.sin(d)]);return c.push([t+i*Math.cos(o),r+s*Math.sin(o)]),c.push([t+i*Math.cos(o),r+s*Math.sin(o)]),ji(c,null,l)}function Db(e,t,r,i,s,a,o,n){const l=[],h=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let c=[0,0];const d=n.disableMultiStroke?1:2,g=n.preserveVertices;for(let u=0;u<d;u++)u===0?l.push({op:"move",data:[o[0],o[1]]}):l.push({op:"move",data:[o[0]+(g?0:Q(h[0],n)),o[1]+(g?0:Q(h[0],n))]}),c=g?[s,a]:[s+Q(h[u],n),a+Q(h[u],n)],l.push({op:"bcurveTo",data:[e+Q(h[u],n),t+Q(h[u],n),r+Q(h[u],n),i+Q(h[u],n),c[0],c[1]]});return l}function fr(e){return[...e]}function Jo(e,t=0){const r=e.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(r===3)i.push(fr(e[0]),fr(e[1]),fr(e[2]),fr(e[2]));else{const s=[];s.push(e[0],e[0]);for(let n=1;n<e.length;n++)s.push(e[n]),n===e.length-1&&s.push(e[n]);const a=[],o=1-t;i.push(fr(s[0]));for(let n=1;n+2<s.length;n++){const l=s[n];a[0]=[l[0],l[1]],a[1]=[l[0]+(o*s[n+1][0]-o*s[n-1][0])/6,l[1]+(o*s[n+1][1]-o*s[n-1][1])/6],a[2]=[s[n+1][0]+(o*s[n][0]-o*s[n+2][0])/6,s[n+1][1]+(o*s[n][1]-o*s[n+2][1])/6],a[3]=[s[n+1][0],s[n+1][1]],i.push(a[1],a[2],a[3])}}return i}function Bi(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function Pb(e,t,r){const i=Bi(t,r);if(i===0)return Bi(e,t);let s=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return s=Math.max(0,Math.min(1,s)),Bi(e,Ie(t,r,s))}function Ie(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function na(e,t,r,i){const s=i||[];if(function(n,l){const h=n[l+0],c=n[l+1],d=n[l+2],g=n[l+3];let u=3*c[0]-2*h[0]-g[0];u*=u;let y=3*c[1]-2*h[1]-g[1];y*=y;let f=3*d[0]-2*g[0]-h[0];f*=f;let m=3*d[1]-2*g[1]-h[1];return m*=m,u<f&&(u=f),y<m&&(y=m),u+y}(e,t)<r){const n=e[t+0];s.length?(a=s[s.length-1],o=n,Math.sqrt(Bi(a,o))>1&&s.push(n)):s.push(n),s.push(e[t+3])}else{const l=e[t+0],h=e[t+1],c=e[t+2],d=e[t+3],g=Ie(l,h,.5),u=Ie(h,c,.5),y=Ie(c,d,.5),f=Ie(g,u,.5),m=Ie(u,y,.5),C=Ie(f,m,.5);na([l,g,f,C],0,r,s),na([C,m,y,d],0,r,s)}var a,o;return s}function Rb(e,t){return Xi(e,0,e.length,t)}function Xi(e,t,r,i,s){const a=s||[],o=e[t],n=e[r-1];let l=0,h=1;for(let c=t+1;c<r-1;++c){const d=Pb(e[c],o,n);d>l&&(l=d,h=c)}return Math.sqrt(l)>i?(Xi(e,t,h+1,i,a),Xi(e,h,r,i,a)):(a.length||a.push(o),a.push(n)),a}function ks(e,t=.15,r){const i=[],s=(e.length-1)/3;for(let a=0;a<s;a++)na(e,3*a,t,i);return r&&r>0?Xi(i,0,i.length,r):i}const zt="none";class Gi{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,s,a){const o=this._o(a);return this._d("line",[Gc(t,r,i,s,o)],o)}rectangle(t,r,i,s,a){const o=this._o(a),n=[],l=Ib(t,r,i,s,o);if(o.fill){const h=[[t,r],[t+i,r],[t+i,r+s],[t,r+s]];o.fillStyle==="solid"?n.push(bs([h],o)):n.push(Ue([h],o))}return o.stroke!==zt&&n.push(l),this._d("rectangle",n,o)}ellipse(t,r,i,s,a){const o=this._o(a),n=[],l=Vc(i,s,o),h=aa(t,r,o,l);if(o.fill)if(o.fillStyle==="solid"){const c=aa(t,r,o,l).opset;c.type="fillPath",n.push(c)}else n.push(Ue([h.estimatedPoints],o));return o.stroke!==zt&&n.push(h.opset),this._d("ellipse",n,o)}circle(t,r,i,s){const a=this.ellipse(t,r,i,i,s);return a.shape="circle",a}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Ti(t,!1,i)],i)}arc(t,r,i,s,a,o,n=!1,l){const h=this._o(l),c=[],d=Go(t,r,i,s,a,o,n,!0,h);if(n&&h.fill)if(h.fillStyle==="solid"){const g=Object.assign({},h);g.disableMultiStroke=!0;const u=Go(t,r,i,s,a,o,!0,!1,g);u.type="fillPath",c.push(u)}else c.push(function(g,u,y,f,m,C,b){const k=g,T=u;let w=Math.abs(y/2),B=Math.abs(f/2);w+=Q(.01*w,b),B+=Q(.01*B,b);let M=m,L=C;for(;M<0;)M+=2*Math.PI,L+=2*Math.PI;L-M>2*Math.PI&&(M=0,L=2*Math.PI);const W=(L-M)/b.curveStepCount,P=[];for(let $=M;$<=L;$+=W)P.push([k+w*Math.cos($),T+B*Math.sin($)]);return P.push([k+w*Math.cos(L),T+B*Math.sin(L)]),P.push([k,T]),Ue([P],b)}(t,r,i,s,a,o,h));return h.stroke!==zt&&c.push(d),this._d("arc",c,h)}curve(t,r){const i=this._o(r),s=[],a=Xo(t,i);if(i.fill&&i.fill!==zt)if(i.fillStyle==="solid"){const o=Xo(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],n=t;if(n.length){const l=typeof n[0][0]=="number"?[n]:n;for(const h of l)h.length<3?o.push(...h):h.length===3?o.push(...ks(Jo([h[0],h[0],h[1],h[2]]),10,(1+i.roughness)/2)):o.push(...ks(Jo(h),10,(1+i.roughness)/2))}o.length&&s.push(Ue([o],i))}return i.stroke!==zt&&s.push(a),this._d("curve",s,i)}polygon(t,r){const i=this._o(r),s=[],a=Ti(t,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(bs([t],i)):s.push(Ue([t],i))),i.stroke!==zt&&s.push(a),this._d("polygon",s,i)}path(t,r){const i=this._o(r),s=[];if(!t)return this._d("path",s,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=i.fill&&i.fill!=="transparent"&&i.fill!==zt,o=i.stroke!==zt,n=!!(i.simplification&&i.simplification<1),l=function(c,d,g){const u=jc(Uc(ao(c))),y=[];let f=[],m=[0,0],C=[];const b=()=>{C.length>=4&&f.push(...ks(C,d)),C=[]},k=()=>{b(),f.length&&(y.push(f),f=[])};for(const{key:w,data:B}of u)switch(w){case"M":k(),m=[B[0],B[1]],f.push(m);break;case"L":b(),f.push([B[0],B[1]]);break;case"C":if(!C.length){const M=f.length?f[f.length-1]:m;C.push([M[0],M[1]])}C.push([B[0],B[1]]),C.push([B[2],B[3]]),C.push([B[4],B[5]]);break;case"Z":b(),f.push([m[0],m[1]])}if(k(),!g)return y;const T=[];for(const w of y){const B=Rb(w,g);B.length&&T.push(B)}return T}(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),h=Vo(t,i);if(a)if(i.fillStyle==="solid")if(l.length===1){const c=Vo(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(c.ops)})}else s.push(bs(l,i));else s.push(Ue(l,i));return o&&(n?l.forEach(c=>{s.push(Ti(c,!1,i))}):s.push(h)),this._d("path",s,i)}opsToPath(t,r){let i="";for(const s of t.ops){const a=typeof r=="number"&&r>=0?s.data.map(o=>+o.toFixed(r)):s.data;switch(s.op){case"move":i+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,s=[];for(const a of r){let o=null;switch(a.type){case"path":o={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:zt};break;case"fillPath":o={d:this.opsToPath(a),stroke:zt,strokeWidth:0,fill:i.fill||zt};break;case"fillSketch":o=this.fillSketch(a,i)}o&&s.push(o)}return s}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||zt,strokeWidth:i,fill:zt}}_mergedShape(t){return t.filter((r,i)=>i===0||r.op!=="move")}}class qb{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Gi(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.type){case"path":s.save(),s.strokeStyle=i.stroke==="none"?"transparent":i.stroke,s.lineWidth=i.strokeWidth,i.strokeLineDash&&s.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(s.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(s,o,a),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,o,a,n),s.restore();break}case"fillSketch":this.fillSketch(s,o,i)}}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=s,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,s="nonzero"){t.beginPath();for(const a of r.ops){const o=typeof i=="number"&&i>=0?a.data.map(n=>+n.toFixed(i)):a.data;switch(a.op){case"move":t.moveTo(o[0],o[1]);break;case"bcurveTo":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":t.lineTo(o[0],o[1])}}r.type==="fillPath"?t.fill(s):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,s,a){const o=this.gen.line(t,r,i,s,a);return this.draw(o),o}rectangle(t,r,i,s,a){const o=this.gen.rectangle(t,r,i,s,a);return this.draw(o),o}ellipse(t,r,i,s,a){const o=this.gen.ellipse(t,r,i,s,a);return this.draw(o),o}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a),a}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,s,a,o,n=!1,l){const h=this.gen.arc(t,r,i,s,a,o,n,l);return this.draw(h),h}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const hi="http://www.w3.org/2000/svg";class Wb{constructor(t,r){this.svg=t,this.gen=new Gi(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,a=s.createElementNS(hi,"g"),o=t.options.fixedDecimalPlaceDigits;for(const n of r){let l=null;switch(n.type){case"path":l=s.createElementNS(hi,"path"),l.setAttribute("d",this.opsToPath(n,o)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=s.createElementNS(hi,"path"),l.setAttribute("d",this.opsToPath(n,o)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(s,n,i)}l&&a.appendChild(l)}return a}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);const a=t.createElementNS(hi,"path");return a.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),a.setAttribute("stroke",i.fill||""),a.setAttribute("stroke-width",s+""),a.setAttribute("fill","none"),i.fillLineDash&&a.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,s,a){const o=this.gen.line(t,r,i,s,a);return this.draw(o)}rectangle(t,r,i,s,a){const o=this.gen.rectangle(t,r,i,s,a);return this.draw(o)}ellipse(t,r,i,s,a){const o=this.gen.ellipse(t,r,i,s,a);return this.draw(o)}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,s,a,o,n=!1,l){const h=this.gen.arc(t,r,i,s,a,o,n,l);return this.draw(h)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var Y={canvas:(e,t)=>new qb(e,t),svg:(e,t)=>new Wb(e,t),generator:e=>new Gi(e),newSeed:()=>Gi.newSeed()},K=p(async(e,t,r)=>{var u,y;let i;const s=t.useHtmlLabels||xe((u=ht())==null?void 0:u.htmlLabels);r?i=r:i="node default";const a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=a.insert("g").attr("class","label").attr("style",Bt(t.labelStyle));let n;t.label===void 0?n="":n=typeof t.label=="string"?t.label:t.label[0];const l=!!t.icon||!!t.img,h=t.labelType==="markdown",c=await be(o,Kt(ze(n),ht()),{useHtmlLabels:s,width:t.width||((y=ht().flowchart)==null?void 0:y.wrappingWidth),classes:h?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:h},ht());let d=c.getBBox();const g=((t==null?void 0:t.padding)??0)/2;if(s){const f=c.children[0],m=it(c);await mc(f,n),d=f.getBoundingClientRect(),m.attr("width",d.width),m.attr("height",d.height)}return s?o.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):o.attr("transform","translate(0, "+-d.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:a,bbox:d,halfPadding:g,label:o}},"labelHelper"),Ss=p(async(e,t,r)=>{var l,h;const i=r.useHtmlLabels??Pt(ht()),s=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await be(s,Kt(ze(t),ht()),{useHtmlLabels:i,width:r.width||((h=(l=ht())==null?void 0:l.flowchart)==null?void 0:h.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let o=a.getBBox();const n=r.padding/2;if(Pt(ht())){const c=a.children[0],d=it(a);o=c.getBoundingClientRect(),d.attr("width",o.width),d.attr("height",o.height)}return i?s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):s.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:n,label:s}},"insertLabel"),X=p((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),Z=p((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function at(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}p(at,"createPathFromPoints");function Ae(e,t,r,i,s,a){const o=[],l=r-e,h=i-t,c=l/a,d=2*Math.PI/c,g=t+h/2;for(let u=0;u<=50;u++){const y=u/50,f=e+y*l,m=g+s*Math.sin(d*(f-e));o.push({x:f,y:m})}return o}p(Ae,"generateFullSineWavePoints");function Er(e,t,r,i,s,a){const o=[],n=s*Math.PI/180,c=(a*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const g=n+d*c,u=e+r*Math.cos(g),y=t+r*Math.sin(g);o.push({x:-u,y:-y})}return o}p(Er,"generateCirclePoints");function la(e){const t=Array.from(e.childNodes).filter(l=>l.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(l=>l.getAttribute("d")).filter(l=>l!==null).join(" ");r.setAttribute("d",i);const s=t.find(l=>l.getAttribute("fill")!=="none"),a=t.find(l=>l.getAttribute("stroke")!=="none"),o=p((l,h)=>(l==null?void 0:l.getAttribute(h))??void 0,"getAttr");if(s){const l={fill:o(s,"fill"),"fill-opacity":o(s,"fill-opacity")??"1"};Object.entries(l).forEach(([h,c])=>{c&&r.setAttribute(h,c)})}if(a){const l={stroke:o(a,"stroke"),"stroke-width":o(a,"stroke-width")??"1","stroke-opacity":o(a,"stroke-opacity")??"1"};Object.entries(l).forEach(([h,c])=>{c&&r.setAttribute(h,c)})}const n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(r),n}p(la,"mergePaths");var zb=p((e,t)=>{var r=e.x,i=e.y,s=t.x-r,a=t.y-i,o=e.width/2,n=e.height/2,l,h;return Math.abs(a)*o>Math.abs(s)*n?(a<0&&(n=-n),l=a===0?0:n*s/a,h=n):(s<0&&(o=-o),l=o,h=s===0?0:o*a/s),{x:r+l,y:i+h}},"intersectRect"),lr=zb,Nb=p(async(e,t,r,i=!1,s=!1)=>{let a=t||"";typeof a=="object"&&(a=a[0]);const o=ht(),n=Pt(o);return await be(e,a,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},o)},"createLabel"),Te=Nb,Me=p((e,t,r,i,s)=>["M",e+s,t,"H",e+r-s,"A",s,s,0,0,1,e+r,t+s,"V",t+i-s,"A",s,s,0,0,1,e+r-s,t+i,"H",e+s,"A",s,s,0,0,1,e,t+i-s,"V",t+s,"A",s,s,0,0,1,e+s,t,"Z"].join(" "),"createRoundedRectPathD"),Qc=p(async(e,t)=>{q.info("Creating subgraph rect for ",t.id,t);const r=ht(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:h,backgroundStyles:c}=j(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),g=Pt(r),u=d.insert("g").attr("class","cluster-label ");let y;t.labelType==="markdown"?y=await be(u,t.label,{style:t.labelStyle,useHtmlLabels:g,isNode:!0,width:t.width}):y=await Te(u,t.label,t.labelStyle||"",!1,!0);let f=y.getBBox();if(Pt(r)){const M=y.children[0],L=it(y);f=M.getBoundingClientRect(),L.attr("width",f.width),L.attr("height",f.height)}const m=t.width<=f.width+t.padding?f.width+t.padding:t.width;t.width<=f.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-m/2,k=t.y-C/2;q.trace("Data ",t,JSON.stringify(t));let T;if(t.look==="handDrawn"){const M=Y.svg(d),L=U(t,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:s}),W=M.path(Me(b,k,m,C,0),L);T=d.insert(()=>(q.debug("Rough node insert CXC",W),W),":first-child"),T.select("path:nth-child(2)").attr("style",h.join(";")),T.select("path").attr("style",c.join(";").replace("fill","stroke"))}else T=d.insert("rect",":first-child"),T.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",m).attr("height",C);const{subGraphTitleTopMargin:w}=Xa(r);if(u.attr("transform",`translate(${t.x-f.width/2}, ${t.y-t.height/2+w})`),n){const M=u.select("span");M&&M.attr("style",n)}const B=T.node().getBBox();return t.offsetX=0,t.width=B.width,t.height=B.height,t.offsetY=f.height-t.padding/2,t.intersect=function(M){return lr(t,M)},{cluster:d,labelBBox:f}},"rect"),Hb=p((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),s=0*t.padding,a=s/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const o=i.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(n){return lr(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),Yb=p(async(e,t)=>{const r=ht(),{themeVariables:i,handDrawnSeed:s}=r,{altBackground:a,compositeBackground:o,compositeTitleBackground:n,nodeBorder:l}=i,h=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),c=h.insert("g",":first-child"),d=h.insert("g").attr("class","cluster-label");let g=h.append("rect");const u=await Te(d,t.label,t.labelStyle,void 0,!0);let y=u.getBBox();if(Pt(r)){const W=u.children[0],P=it(u);y=W.getBoundingClientRect(),P.attr("width",y.width),P.attr("height",y.height)}const f=0*t.padding,m=f/2,C=(t.width<=y.width+t.padding?y.width+t.padding:t.width)+f;t.width<=y.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+f,k=t.height+f-y.height-6,T=t.x-C/2,w=t.y-b/2;t.width=C;const B=t.y-t.height/2-m+y.height+2;let M;if(t.look==="handDrawn"){const W=t.cssClasses.includes("statediagram-cluster-alt"),P=Y.svg(h),$=t.rx||t.ry?P.path(Me(T,w,C,b,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:s}):P.rectangle(T,w,C,b,{seed:s});M=h.insert(()=>$,":first-child");const N=P.rectangle(T,B,C,k,{fill:W?a:o,fillStyle:W?"hachure":"solid",stroke:l,seed:s});M=h.insert(()=>$,":first-child"),g=h.insert(()=>N)}else{M=c.insert("rect",":first-child");const W="outer";M.attr("class",W).attr("x",T).attr("y",w).attr("width",C).attr("height",b).attr("data-look",t.look),g.attr("class","inner").attr("x",T).attr("y",B).attr("width",C).attr("height",k)}d.attr("transform",`translate(${t.x-y.width/2}, ${w+1-(Pt(r)?0:3)})`);const L=M.node().getBBox();return t.height=L.height,t.offsetX=0,t.offsetY=y.height-t.padding/2,t.labelBBox=y,t.intersect=function(W){return lr(t,W)},{cluster:h,labelBBox:y}},"roundedWithTitle"),Ub=p(async(e,t)=>{q.info("Creating subgraph rect for ",t.id,t);const r=ht(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:h,backgroundStyles:c}=j(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),g=Pt(r),u=d.insert("g").attr("class","cluster-label "),y=await be(u,t.label,{style:t.labelStyle,useHtmlLabels:g,isNode:!0,width:t.width});let f=y.getBBox();if(Pt(r)){const M=y.children[0],L=it(y);f=M.getBoundingClientRect(),L.attr("width",f.width),L.attr("height",f.height)}const m=t.width<=f.width+t.padding?f.width+t.padding:t.width;t.width<=f.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-m/2,k=t.y-C/2;q.trace("Data ",t,JSON.stringify(t));let T;if(t.look==="handDrawn"){const M=Y.svg(d),L=U(t,{roughness:.7,fill:a,stroke:o,fillWeight:4,seed:s}),W=M.path(Me(b,k,m,C,t.rx),L);T=d.insert(()=>(q.debug("Rough node insert CXC",W),W),":first-child"),T.select("path:nth-child(2)").attr("style",h.join(";")),T.select("path").attr("style",c.join(";").replace("fill","stroke"))}else T=d.insert("rect",":first-child"),T.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",m).attr("height",C);const{subGraphTitleTopMargin:w}=Xa(r);if(u.attr("transform",`translate(${t.x-f.width/2}, ${t.y-t.height/2+w})`),n){const M=u.select("span");M&&M.attr("style",n)}const B=T.node().getBBox();return t.offsetX=0,t.width=B.width,t.height=B.height,t.offsetY=f.height-t.padding/2,t.intersect=function(M){return lr(t,M)},{cluster:d,labelBBox:f}},"kanbanSection"),jb=p((e,t)=>{const r=ht(),{themeVariables:i,handDrawnSeed:s}=r,{nodeBorder:a}=i,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),n=o.insert("g",":first-child"),l=0*t.padding,h=t.width+l;t.diff=-t.padding;const c=t.height+l,d=t.x-h/2,g=t.y-c/2;t.width=h;let u;if(t.look==="handDrawn"){const m=Y.svg(o).rectangle(d,g,h,c,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:s});u=o.insert(()=>m,":first-child")}else{u=n.insert("rect",":first-child");let f="outer";t.look,f="divider",u.attr("class",f).attr("x",d).attr("y",g).attr("width",h).attr("height",c).attr("data-look",t.look)}const y=u.node().getBBox();return t.height=y.height,t.offsetX=0,t.offsetY=0,t.intersect=function(f){return lr(t,f)},{cluster:o,labelBBox:{}}},"divider"),Xb=Qc,Gb={rect:Qc,squareRect:Xb,roundedWithTitle:Yb,noteGroup:Hb,divider:jb,kanbanSection:Ub},Kc=new Map,Vb=p(async(e,t)=>{const r=t.shape||"rect",i=await Gb[r](e,t);return Kc.set(t.id,i),i},"insertCluster"),$w=p(()=>{Kc=new Map},"clear");function Jc(e,t){return e.intersect(t)}p(Jc,"intersectNode");var Zb=Jc;function td(e,t,r,i){var s=e.x,a=e.y,o=s-i.x,n=a-i.y,l=Math.sqrt(t*t*n*n+r*r*o*o),h=Math.abs(t*r*o/l);i.x<s&&(h=-h);var c=Math.abs(t*r*n/l);return i.y<a&&(c=-c),{x:s+h,y:a+c}}p(td,"intersectEllipse");var ed=td;function rd(e,t,r){return ed(e,t,t,r)}p(rd,"intersectCircle");var Qb=rd;function id(e,t,r,i){{const s=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,n=s*r.x+a*r.y+o,l=s*i.x+a*i.y+o,h=1e-6;if(n!==0&&l!==0&&ha(n,l))return;const c=i.y-r.y,d=r.x-i.x,g=i.x*r.y-r.x*i.y,u=c*e.x+d*e.y+g,y=c*t.x+d*t.y+g;if(Math.abs(u)<h&&Math.abs(y)<h&&ha(u,y))return;const f=s*d-c*a;if(f===0)return;const m=Math.abs(f/2);let C=a*g-d*o;const b=C<0?(C-m)/f:(C+m)/f;C=c*o-s*g;const k=C<0?(C-m)/f:(C+m)/f;return{x:b,y:k}}}p(id,"intersectLine");function ha(e,t){return e*t>0}p(ha,"sameSign");var Kb=id;function sd(e,t,r){let i=e.x,s=e.y,a=[],o=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(c){o=Math.min(o,c.x),n=Math.min(n,c.y)}):(o=Math.min(o,t.x),n=Math.min(n,t.y));let l=i-e.width/2-o,h=s-e.height/2-n;for(let c=0;c<t.length;c++){let d=t[c],g=t[c<t.length-1?c+1:0],u=Kb(e,r,{x:l+d.x,y:h+d.y},{x:l+g.x,y:h+g.y});u&&a.push(u)}return a.length?(a.length>1&&a.sort(function(c,d){let g=c.x-r.x,u=c.y-r.y,y=Math.sqrt(g*g+u*u),f=d.x-r.x,m=d.y-r.y,C=Math.sqrt(f*f+m*m);return y<C?-1:y===C?0:1}),a[0]):e}p(sd,"intersectPolygon");var Jb=sd,H={node:Zb,circle:Qb,ellipse:ed,polygon:Jb,rect:lr};function ad(e,t){const{labelStyles:r}=j(t);t.labelStyle=r;const i=Z(t);let s=i;i||(s="anchor");const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),o=1,{cssStyles:n}=t,l=Y.svg(a),h=U(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const c=l.circle(0,0,o*2,h),d=a.insert(()=>c,":first-child");return d.attr("class","anchor").attr("style",Bt(n)),X(t,d),t.intersect=function(g){return q.info("Circle intersect",t,o,g),H.circle(t,o,g)},a}p(ad,"anchor");function ca(e,t,r,i,s,a,o){const l=(e+r)/2,h=(t+i)/2,c=Math.atan2(i-t,r-e),d=(r-e)/2,g=(i-t)/2,u=d/s,y=g/a,f=Math.sqrt(u**2+y**2);if(f>1)throw new Error("The given radii are too small to create an arc between the points.");const m=Math.sqrt(1-f**2),C=l+m*a*Math.sin(c)*(o?-1:1),b=h-m*s*Math.cos(c)*(o?-1:1),k=Math.atan2((t-b)/a,(e-C)/s);let w=Math.atan2((i-b)/a,(r-C)/s)-k;o&&w<0&&(w+=2*Math.PI),!o&&w>0&&(w-=2*Math.PI);const B=[];for(let M=0;M<20;M++){const L=M/19,W=k+L*w,P=C+s*Math.cos(W),$=b+a*Math.sin(W);B.push({x:P,y:$})}return B}p(ca,"generateArcPoints");function od(e,t,r){const[i,s]=[t,r].sort((a,o)=>o-a);return s*(1-Math.sqrt(1-(e/i/2)**2))}p(od,"calculateArcSagitta");async function nd(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=p(W=>W+o,"calcTotalHeight"),l=p(W=>{const P=W/2;return[P/(2.5+W/50),P]},"calcEllipseRadius"),{shapeSvg:h,bbox:c}=await K(e,t,Z(t)),d=n(t!=null&&t.height?t==null?void 0:t.height:c.height),[g,u]=l(d),y=od(d,g,u),m=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2+y-y,C=d,{cssStyles:b}=t,k=[{x:m/2,y:-C/2},{x:-m/2,y:-C/2},...ca(-m/2,-C/2,-m/2,C/2,g,u,!1),{x:m/2,y:C/2},...ca(m/2,C/2,m/2,-C/2,g,u,!0)],T=Y.svg(h),w=U(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const B=at(k),M=T.path(B,w),L=h.insert(()=>M,":first-child");return L.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(${g/2}, 0)`),X(t,L),t.intersect=function(W){return H.polygon(t,k,W)},h}p(nd,"bowTieRect");function ke(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}p(ke,"insertPolygonShape");var ci=12;async function ld(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?28:s,o=t.look==="neo"?24:s,{shapeSvg:n,bbox:l}=await K(e,t,Z(t)),h=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?a*2:a+ci),c=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?o*2:o),d=0,g=h,u=-c,y=0,f=[{x:d+ci,y:u},{x:g,y:u},{x:g,y},{x:d,y},{x:d,y:u+ci},{x:d+ci,y:u}];let m;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=Y.svg(n),k=U(t,{}),T=at(f),w=b.path(T,k);m=n.insert(()=>w,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),C&&m.attr("style",C)}else m=ke(n,h,c,f);return i&&m.attr("style",i),X(t,m),t.intersect=function(b){return H.polygon(t,f,b)},n}p(ld,"card");function hd(e,t){const{nodeStyles:r}=j(t);t.label="";const i=e.insert("g").attr("class",Z(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],n=Y.svg(i),l=U(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=at(o),c=n.path(h,l),d=i.insert(()=>c,":first-child");return s&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",s),r&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(g){return H.polygon(t,o,g)},i}p(hd,"choice");async function oo(e,t,r){const{labelStyles:i,nodeStyles:s}=j(t);t.labelStyle=i;const{shapeSvg:a,bbox:o,halfPadding:n}=await K(e,t,Z(t)),l=16,h=(r==null?void 0:r.padding)??n,c=t.look==="neo"?o.width/2+l*2:o.width/2+h;let d;const{cssStyles:g}=t;if(t.look==="handDrawn"){const u=Y.svg(a),y=U(t,{}),f=u.circle(0,0,c*2,y);d=a.insert(()=>f,":first-child"),d.attr("class","basic label-container").attr("style",Bt(g))}else d=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",c).attr("cx",0).attr("cy",0);return X(t,d),t.calcIntersect=function(u,y){const f=u.width/2;return H.circle(u,f,y)},t.intersect=function(u){return q.info("Circle intersect",t,c,u),H.circle(t,c,u)},a}p(oo,"circle");function cd(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,s={x:i/2*t,y:i/2*r},a={x:-(i/2)*t,y:i/2*r},o={x:-(i/2)*t,y:-(i/2)*r},n={x:i/2*t,y:-(i/2)*r};return`M ${a.x},${a.y} L ${n.x},${n.y}
|
|
228
|
-
M ${s.x},${s.y} L ${o.x},${o.y}`}p(cd,"createLine");function dd(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r,t.label="";const s=e.insert("g").attr("class",Z(t)).attr("id",t.domId??t.id),a=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:o}=t,n=Y.svg(s),l=U(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=n.circle(0,0,a*2,l),c=cd(a),d=n.path(c,l),g=s.insert(()=>h,":first-child");return g.insert(()=>d),g.attr("class","outer-path"),o&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),X(t,g),t.intersect=function(u){return q.info("crossedCircle intersect",t,{radius:a,point:u}),H.circle(t,a,u)},s}p(dd,"crossedCircle");function ge(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,c=(a*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const g=n+d*c,u=e+r*Math.cos(g),y=t+r*Math.sin(g);o.push({x:-u,y:-y})}return o}p(ge,"generateCirclePoints");async function ud(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await K(e,t,Z(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=a.width+n,c=a.height+l,d=Math.max(5,c*.1),{cssStyles:g}=t,u=[...ge(h/2,-c/2,d,30,-90,0),{x:-h/2-d,y:d},...ge(h/2+d*2,-d,d,20,-180,-270),...ge(h/2+d*2,d,d,20,-90,-180),{x:-h/2-d,y:-c/2},...ge(h/2,c/2,d,20,0,90)],y=[{x:h/2,y:-c/2-d},{x:-h/2,y:-c/2-d},...ge(h/2,-c/2,d,20,-90,0),{x:-h/2-d,y:-d},...ge(h/2+h*.1,-d,d,20,-180,-270),...ge(h/2+h*.1,d,d,20,-90,-180),{x:-h/2-d,y:c/2},...ge(h/2,c/2,d,20,0,90),{x:-h/2,y:c/2+d},{x:h/2,y:c/2+d}],f=Y.svg(s),m=U(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const b=at(u).replace("Z",""),k=f.path(b,m),T=at(y),w=f.path(T,{...m}),B=s.insert("g",":first-child");return B.insert(()=>w,":first-child").attr("stroke-opacity",0),B.insert(()=>k,":first-child"),B.attr("class","text"),g&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(${d}, 0)`),o.attr("transform",`translate(${-h/2+d-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),X(t,B),t.intersect=function(M){return H.polygon(t,y,M)},s}p(ud,"curlyBraceLeft");function pe(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,c=(a*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const g=n+d*c,u=e+r*Math.cos(g),y=t+r*Math.sin(g);o.push({x:u,y})}return o}p(pe,"generateCirclePoints");async function gd(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await K(e,t,Z(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=a.width+(t.look==="neo"?n*2:n),c=a.height+(t.look==="neo"?l*2:l),d=Math.max(5,c*.1),{cssStyles:g}=t,u=[...pe(h/2,-c/2,d,20,-90,0),{x:h/2+d,y:-d},...pe(h/2+d*2,-d,d,20,-180,-270),...pe(h/2+d*2,d,d,20,-90,-180),{x:h/2+d,y:c/2},...pe(h/2,c/2,d,20,0,90)],y=[{x:-h/2,y:-c/2-d},{x:h/2,y:-c/2-d},...pe(h/2,-c/2,d,20,-90,0),{x:h/2+d,y:-d},...pe(h/2+d*2,-d,d,20,-180,-270),...pe(h/2+d*2,d,d,20,-90,-180),{x:h/2+d,y:c/2},...pe(h/2,c/2,d,20,0,90),{x:h/2,y:c/2+d},{x:-h/2,y:c/2+d}],f=Y.svg(s),m=U(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const b=at(u).replace("Z",""),k=f.path(b,m),T=at(y),w=f.path(T,{...m}),B=s.insert("g",":first-child");return B.insert(()=>w,":first-child").attr("stroke-opacity",0),B.insert(()=>k,":first-child"),B.attr("class","text"),g&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(${-d}, 0)`),o.attr("transform",`translate(${-h/2+(t.padding??0)/2-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),X(t,B),t.intersect=function(M){return H.polygon(t,y,M)},s}p(gd,"curlyBraceRight");function vt(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,c=(a*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const g=n+d*c,u=e+r*Math.cos(g),y=t+r*Math.sin(g);o.push({x:-u,y:-y})}return o}p(vt,"generateCirclePoints");async function pd(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await K(e,t,Z(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=a.width+(t.look==="neo"?n*2:n),c=a.height+(t.look==="neo"?l*2:l),d=Math.max(5,c*.1),{cssStyles:g}=t,u=[...vt(h/2,-c/2,d,30,-90,0),{x:-h/2-d,y:d},...vt(h/2+d*2,-d,d,20,-180,-270),...vt(h/2+d*2,d,d,20,-90,-180),{x:-h/2-d,y:-c/2},...vt(h/2,c/2,d,20,0,90)],y=[...vt(-h/2+d+d/2,-c/2,d,20,-90,-180),{x:h/2-d/2,y:d},...vt(-h/2-d/2,-d,d,20,0,90),...vt(-h/2-d/2,d,d,20,-90,0),{x:h/2-d/2,y:-d},...vt(-h/2+d+d/2,c/2,d,30,-180,-270)],f=[{x:h/2,y:-c/2-d},{x:-h/2,y:-c/2-d},...vt(h/2,-c/2,d,20,-90,0),{x:-h/2-d,y:-d},...vt(h/2+d*2,-d,d,20,-180,-270),...vt(h/2+d*2,d,d,20,-90,-180),{x:-h/2-d,y:c/2},...vt(h/2,c/2,d,20,0,90),{x:-h/2,y:c/2+d},{x:h/2-d-d/2,y:c/2+d},...vt(-h/2+d+d/2,-c/2,d,20,-90,-180),{x:h/2-d/2,y:d},...vt(-h/2-d/2,-d,d,20,0,90),...vt(-h/2-d/2,d,d,20,-90,0),{x:h/2-d/2,y:-d},...vt(-h/2+d+d/2,c/2,d,30,-180,-270)],m=Y.svg(s),C=U(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=at(u).replace("Z",""),T=m.path(k,C),B=at(y).replace("Z",""),M=m.path(B,C),L=at(f),W=m.path(L,{...C}),P=s.insert("g",":first-child");return P.insert(()=>W,":first-child").attr("stroke-opacity",0),P.insert(()=>T,":first-child"),P.insert(()=>M,":first-child"),P.attr("class","text"),g&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",i),P.attr("transform",`translate(${d-d/4}, 0)`),o.attr("transform",`translate(${-h/2+(t.padding??0)/2-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),X(t,P),t.intersect=function($){return H.polygon(t,f,$)},s}p(pd,"curlyBraces");async function fd(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=20,l=5,{shapeSvg:h,bbox:c}=await K(e,t,Z(t)),d=Math.max(n,(c.width+a*2)*1.25,(t==null?void 0:t.width)??0),g=Math.max(l,c.height+o*2,(t==null?void 0:t.height)??0),u=g/2,{cssStyles:y}=t,f=Y.svg(h),m=U(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=d,b=g,k=C-u,T=b/4,w=[{x:k,y:0},{x:T,y:0},{x:0,y:b/2},{x:T,y:b},{x:k,y:b},...Er(-k,-b/2,u,50,270,90)],B=at(w),M=f.path(B,m),L=h.insert(()=>M,":first-child");return L.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",y),i&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",i),L.attr("transform",`translate(${-d/2}, ${-g/2})`),X(t,L),t.intersect=function(W){return H.polygon(t,w,W)},h}p(fd,"curvedTrapezoid");var tk=p((e,t,r,i,s,a)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),ek=p((e,t,r,i,s,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),rk=p((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),tn=8,en=8;async function md(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?24:s,o=t.look==="neo"?24:s;if(t.width||t.height){const m=t.width??0;t.width=(t.width??0)-o,t.width<en&&(t.width=en);const b=m/2/(2.5+m/50);t.height=(t.height??0)-a-b*3,t.height<tn&&(t.height=tn)}const{shapeSvg:n,bbox:l,label:h}=await K(e,t,Z(t)),c=(t.width?t.width:l.width)+o,d=c/2,g=d/(2.5+c/50),u=(t.height?t.height:l.height)+a+g;let y;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=Y.svg(n),C=ek(0,0,c,u,d,g),b=rk(0,g,c,u,d,g),k=U(t,{}),T=m.path(C,k),w=m.path(b,U(t,{fill:"none"}));y=n.insert(()=>w,":first-child"),y=n.insert(()=>T,":first-child"),y.attr("class","basic label-container"),f&&y.attr("style",f)}else{const m=tk(0,0,c,u,d,g);y=n.insert("path",":first-child").attr("d",m).attr("class","basic label-container outer-path").attr("style",Bt(f)).attr("style",i)}return y.attr("label-offset-y",g),y.attr("transform",`translate(${-c/2}, ${-(u/2+g)})`),X(t,y),h.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+(t.padding??0)/1.5-(l.y-(l.top??0))})`),t.intersect=function(m){const C=H.rect(t,m),b=C.x-(t.x??0);if(d!=0&&(Math.abs(b)<(t.width??0)/2||Math.abs(b)==(t.width??0)/2&&Math.abs(C.y-(t.y??0))>(t.height??0)/2-g)){let k=g*g*(1-b*b/(d*d));k>0&&(k=Math.sqrt(k)),k=g-k,m.y-(t.y??0)>0&&(k=-k),C.y+=k}return C},n}p(md,"cylinder");async function hr(e,t,r){const{labelStyles:i,nodeStyles:s}=j(t);t.labelStyle=i;const{shapeSvg:a,bbox:o}=await K(e,t,Z(t)),n=Math.max(o.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),l=Math.max(o.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),h=-n/2,c=-l/2;let d,{rx:g,ry:u}=t;const{cssStyles:y}=t;if(r!=null&&r.rx&&r.ry&&(g=r.rx,u=r.ry),t.look==="handDrawn"){const f=Y.svg(a),m=U(t,{}),C=g||u?f.path(Me(h,c,n,l,g||0),m):f.rectangle(h,c,n,l,m);d=a.insert(()=>C,":first-child"),d.attr("class","basic label-container").attr("style",Bt(y))}else d=a.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",s).attr("rx",Bt(g)).attr("ry",Bt(u)).attr("x",h).attr("y",c).attr("width",n).attr("height",l);return X(t,d),t.calcIntersect=function(f,m){return H.rect(f,m)},t.intersect=function(f){return H.rect(t,f)},a}p(hr,"drawRect");async function yd(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:s,padding:a,width:o,height:n}=t,l={rx:0,ry:0,classes:r??"",labelPaddingX:i??(a??0)*2,labelPaddingY:s??a??0},h=await hr(e,t,l);if(t.look==="handDrawn"){const u=Y.svg(h),y=U(t,{}),f=h.select(".basic.label-container > path:nth-child(2)"),m=f.node();if(!m)return h;let C=null;if(m instanceof SVGGraphicsElement)C=m.getBBox();else return h;return h.insert(()=>u.line(C.x,C.y,C.x+C.width,C.y,y),".basic.label-container g.label"),h.insert(()=>u.line(C.x,C.y+C.height,C.x+C.width,C.y+C.height,y),".basic.label-container g.label"),f.remove(),h}const c=h.select(".basic.label-container"),d=(Number(c.attr("width"))||o)??0,g=(Number(c.attr("height"))||n)??0;return d>0&&g>0&&c.attr("stroke-dasharray",`${d} ${g}`),h}p(yd,"datastore");async function Cd(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?16:t.padding??0,{shapeSvg:o,bbox:n,label:l}=await K(e,t,Z(t)),h=n.width+s,c=n.height+a,d=c*.2,g=-h/2,u=-c/2-d/2,{cssStyles:y}=t,f=Y.svg(o),m=U(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=[{x:g,y:u+d},{x:-g,y:u+d},{x:-g,y:-u},{x:g,y:-u},{x:g,y:u},{x:-g,y:u},{x:-g,y:u+d}],b=f.polygon(C.map(T=>[T.x,T.y]),m),k=o.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),l.attr("transform",`translate(${g+(t.padding??0)/2-(n.x-(n.left??0))}, ${u+d+(t.padding??0)/2-(n.y-(n.top??0))})`),X(t,k),t.intersect=function(T){return H.rect(t,T)},o}p(Cd,"dividedRectangle");async function xd(e,t){var u,y;const{labelStyles:r,nodeStyles:i}=j(t),s=t.look==="neo"?12:5;t.labelStyle=r;const a=t.padding??0,o=t.look==="neo"?16:a,{shapeSvg:n,bbox:l}=await K(e,t,Z(t)),h=(t!=null&&t.width?(t==null?void 0:t.width)/2:l.width/2)+(o??0),c=h-s;let d;const{cssStyles:g}=t;if(t.look==="handDrawn"){const f=Y.svg(n),m=U(t,{roughness:.2,strokeWidth:2.5}),C=U(t,{roughness:.2,strokeWidth:1.5}),b=f.circle(0,0,h*2,m),k=f.circle(0,0,c*2,C);d=n.insert("g",":first-child"),d.attr("class",Bt(t.cssClasses)).attr("style",Bt(g)),(u=d.node())==null||u.appendChild(b),(y=d.node())==null||y.appendChild(k)}else{d=n.insert("g",":first-child");const f=d.insert("circle",":first-child"),m=d.insert("circle");d.attr("class","basic label-container").attr("style",i),f.attr("class","outer-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0),m.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return X(t,d),t.intersect=function(f){return q.info("DoubleCircle intersect",t,h,f),H.circle(t,h,f)},n}p(xd,"doublecircle");function bd(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=j(t);t.label="",t.labelStyle=i;const a=e.insert("g").attr("class",Z(t)).attr("id",t.domId??t.id),o=7,{cssStyles:n}=t,l=Y.svg(a),{nodeBorder:h}=r,c=U(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const d=l.circle(0,0,o*2,c),g=a.insert(()=>d,":first-child");return g.selectAll("path").attr("style",`fill: ${h} !important;`),n&&n.length>0&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",n),s&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",s),X(t,g),t.intersect=function(u){return q.info("filledCircle intersect",t,{radius:o,point:u}),H.circle(t,o,u)},a}p(bd,"filledCircle");var rn=10,sn=10;async function kd(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.height=(t==null?void 0:t.height)??0,t.height<rn&&(t.height=rn),t.width=((t==null?void 0:t.width)??0)-a-a/2,t.width<sn&&(t.width=sn));const{shapeSvg:o,bbox:n,label:l}=await K(e,t,Z(t)),h=(t!=null&&t.width?t==null?void 0:t.width:n.width)+(a??0),c=t!=null&&t.height?t==null?void 0:t.height:h+n.height,d=c,g=[{x:0,y:-c},{x:d,y:-c},{x:d/2,y:0}],{cssStyles:u}=t,y=Y.svg(o),f=U(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=at(g),C=y.path(m,f),b=o.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`).attr("class","outer-path");return u&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),t.width=h,t.height=c,X(t,b),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-c/2+(t.padding??0)/2+(n.y-(n.top??0))})`),t.intersect=function(k){return q.info("Triangle intersect",t,g,k),H.polygon(t,g,k)},o}p(kd,"flippedTriangle");function Sd(e,t,{dir:r,config:{state:i,themeVariables:s}}){const{nodeStyles:a}=j(t);t.label="";const o=e.insert("g").attr("class",Z(t)).attr("id",t.domId??t.id),{cssStyles:n}=t;let l=Math.max(70,(t==null?void 0:t.width)??0),h=Math.max(10,(t==null?void 0:t.height)??0);r==="LR"&&(l=Math.max(10,(t==null?void 0:t.width)??0),h=Math.max(70,(t==null?void 0:t.height)??0));const c=-1*l/2,d=-1*h/2,g=Y.svg(o),u=U(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const y=g.rectangle(c,d,l,h,u),f=o.insert(()=>y,":first-child");n&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",n),a&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",a),X(t,f);const m=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=m/2||0,t.height+=m/2||0),t.intersect=function(C){return H.rect(t,C)},o}p(Sd,"forkJoin");async function wd(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const s=15,a=10,o=t.look==="neo"?16:t.padding??0,n=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=((t==null?void 0:t.height)??0)-n*2,t.height<a&&(t.height=a),t.width=((t==null?void 0:t.width)??0)-o*2,t.width<s&&(t.width=s));const{shapeSvg:l,bbox:h}=await K(e,t,Z(t)),c=(t!=null&&t.width?t==null?void 0:t.width:Math.max(s,h.width))+o*2,d=(t!=null&&t.height?t==null?void 0:t.height:Math.max(a,h.height))+n*2,g=d/2,{cssStyles:u}=t,y=Y.svg(l),f=U(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=[{x:-c/2,y:-d/2},{x:c/2-g,y:-d/2},...Er(-c/2+g,0,g,50,90,270),{x:c/2-g,y:d/2},{x:-c/2,y:d/2}],C=at(m),b=y.path(C,f),k=l.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),X(t,k),t.intersect=function(T){return q.info("Pill intersect",t,{radius:g,point:T}),H.polygon(t,m,T)},l}p(wd,"halfRoundedRectangle");var ik=p((e,t,r,i,s)=>[`M${e+s},${t}`,`L${e+r-s},${t}`,`L${e+r},${t-i/2}`,`L${e+r-s},${t-i}`,`L${e+s},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function Td(e,t){const{labelStyles:r,nodeStyles:i}=j(t),s=t.look==="neo"?3.5:4;t.labelStyle=r;const a=t.padding??0,o=70,n=32,l=t.look==="neo"?o:a,h=t.look==="neo"?n:a;if(t.width||t.height){const k=(t.height??0)/s;t.width=((t==null?void 0:t.width)??0)-2*k-h,t.height=(t.height??0)-l}const{shapeSvg:c,bbox:d}=await K(e,t,Z(t)),g=(t!=null&&t.height?t==null?void 0:t.height:d.height)+l,u=g/s,y=(t!=null&&t.width?t==null?void 0:t.width:d.width)+2*u+h,f=[{x:u,y:0},{x:y-u,y:0},{x:y,y:-g/2},{x:y-u,y:-g},{x:u,y:-g},{x:0,y:-g/2}];let m;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=Y.svg(c),k=U(t,{}),T=ik(0,0,y,g,u),w=b.path(T,k);m=c.insert(()=>w,":first-child").attr("transform",`translate(${-y/2}, ${g/2})`),C&&m.attr("style",C)}else m=ke(c,y,g,f);return i&&m.attr("style",i),t.width=y,t.height=g,X(t,m),t.intersect=function(b){return H.polygon(t,f,b)},c}p(Td,"hexagon");async function Bd(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.label="",t.labelStyle=r;const{shapeSvg:s}=await K(e,t,Z(t)),a=Math.max(30,(t==null?void 0:t.width)??0),o=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:n}=t,l=Y.svg(s),h=U(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const c=[{x:0,y:0},{x:a,y:0},{x:0,y:o},{x:a,y:o}],d=at(c),g=l.path(d,h),u=s.insert(()=>g,":first-child");return u.attr("class","basic label-container outer-path"),n&&t.look!=="handDrawn"&&u.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&u.selectChildren("path").attr("style",i),u.attr("transform",`translate(${-a/2}, ${-o/2})`),X(t,u),t.intersect=function(y){return q.info("Pill intersect",t,{points:c}),H.polygon(t,c,y)},s}p(Bd,"hourglass");async function vd(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=j(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,label:d}=await K(e,t,"icon-shape default"),g=t.pos==="t",u=n,y=n,{nodeBorder:f}=r,{stylesMap:m}=nr(t),C=-y/2,b=-u/2,k=t.label?8:0,T=Y.svg(h),w=U(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const B=T.rectangle(C,b,y,u,w),M=Math.max(y,c.width),L=u+c.height+k,W=T.rectangle(-M/2,-L/2,M,L,{...w,fill:"transparent",stroke:"none"}),P=h.insert(()=>B,":first-child"),$=h.insert(()=>W);if(t.icon){const N=h.append("g");N.html(`<g>${await ei(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const z=N.node().getBBox(),D=z.width,A=z.height,F=z.x,E=z.y;N.attr("transform",`translate(${-D/2-F},${g?c.height/2+k/2-A/2-E:-c.height/2-k/2-A/2-E})`),N.attr("style",`color: ${m.get("stroke")??f};`)}return d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${g?-L/2:L/2-c.height})`),P.attr("transform",`translate(0,${g?c.height/2+k/2:-c.height/2-k/2})`),X(t,$),t.intersect=function(N){if(q.info("iconSquare intersect",t,N),!t.label)return H.rect(t,N);const z=t.x??0,D=t.y??0,A=t.height??0;let F=[];return g?F=[{x:z-c.width/2,y:D-A/2},{x:z+c.width/2,y:D-A/2},{x:z+c.width/2,y:D-A/2+c.height+k},{x:z+y/2,y:D-A/2+c.height+k},{x:z+y/2,y:D+A/2},{x:z-y/2,y:D+A/2},{x:z-y/2,y:D-A/2+c.height+k},{x:z-c.width/2,y:D-A/2+c.height+k}]:F=[{x:z-y/2,y:D-A/2},{x:z+y/2,y:D-A/2},{x:z+y/2,y:D-A/2+u},{x:z+c.width/2,y:D-A/2+u},{x:z+c.width/2/2,y:D+A/2},{x:z-c.width/2,y:D+A/2},{x:z-c.width/2,y:D-A/2+u},{x:z-y/2,y:D-A/2+u}],H.polygon(t,F,N)},h}p(vd,"icon");async function Ld(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=j(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,label:d}=await K(e,t,"icon-shape default"),g=20,u=t.label?8:0,y=t.pos==="t",{nodeBorder:f,mainBkg:m}=r,{stylesMap:C}=nr(t),b=Y.svg(h),k=U(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const T=C.get("fill");k.stroke=T??m;const w=h.append("g");t.icon&&w.html(`<g>${await ei(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const B=w.node().getBBox(),M=B.width,L=B.height,W=B.x,P=B.y,$=Math.max(M,L)*Math.SQRT2+g*2,N=b.circle(0,0,$,k),z=Math.max($,c.width),D=$+c.height+u,A=b.rectangle(-z/2,-D/2,z,D,{...k,fill:"transparent",stroke:"none"}),F=h.insert(()=>N,":first-child"),E=h.insert(()=>A);return w.attr("transform",`translate(${-M/2-W},${y?c.height/2+u/2-L/2-P:-c.height/2-u/2-L/2-P})`),w.attr("style",`color: ${C.get("stroke")??f};`),d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${y?-D/2:D/2-c.height})`),F.attr("transform",`translate(0,${y?c.height/2+u/2:-c.height/2-u/2})`),X(t,E),t.intersect=function(_){return q.info("iconSquare intersect",t,_),H.rect(t,_)},h}p(Ld,"iconCircle");async function Fd(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=j(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,halfPadding:d,label:g}=await K(e,t,"icon-shape default"),u=t.pos==="t",y=n+d*2,f=n+d*2,{nodeBorder:m,mainBkg:C}=r,{stylesMap:b}=nr(t),k=-f/2,T=-y/2,w=t.label?8:0,B=Y.svg(h),M=U(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");const L=b.get("fill");M.stroke=L??C;const W=B.path(Me(k,T,f,y,5),M),P=Math.max(f,c.width),$=y+c.height+w,N=B.rectangle(-P/2,-$/2,P,$,{...M,fill:"transparent",stroke:"none"}),z=h.insert(()=>W,":first-child").attr("class","icon-shape2"),D=h.insert(()=>N);if(t.icon){const A=h.append("g");A.html(`<g>${await ei(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const F=A.node().getBBox(),E=F.width,_=F.height,S=F.x,R=F.y;A.attr("transform",`translate(${-E/2-S},${u?c.height/2+w/2-_/2-R:-c.height/2-w/2-_/2-R})`),A.attr("style",`color: ${b.get("stroke")??m};`)}return g.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${u?-$/2:$/2-c.height})`),z.attr("transform",`translate(0,${u?c.height/2+w/2:-c.height/2-w/2})`),X(t,D),t.intersect=function(A){if(q.info("iconSquare intersect",t,A),!t.label)return H.rect(t,A);const F=t.x??0,E=t.y??0,_=t.height??0;let S=[];return u?S=[{x:F-c.width/2,y:E-_/2},{x:F+c.width/2,y:E-_/2},{x:F+c.width/2,y:E-_/2+c.height+w},{x:F+f/2,y:E-_/2+c.height+w},{x:F+f/2,y:E+_/2},{x:F-f/2,y:E+_/2},{x:F-f/2,y:E-_/2+c.height+w},{x:F-c.width/2,y:E-_/2+c.height+w}]:S=[{x:F-f/2,y:E-_/2},{x:F+f/2,y:E-_/2},{x:F+f/2,y:E-_/2+y},{x:F+c.width/2,y:E-_/2+y},{x:F+c.width/2/2,y:E+_/2},{x:F-c.width/2,y:E+_/2},{x:F-c.width/2,y:E-_/2+y},{x:F-f/2,y:E-_/2+y}],H.polygon(t,S,A)},h}p(Fd,"iconRounded");async function _d(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=j(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,halfPadding:d,label:g}=await K(e,t,"icon-shape default"),u=t.pos==="t",y=n+d*2,f=n+d*2,{nodeBorder:m,mainBkg:C}=r,{stylesMap:b}=nr(t),k=-f/2,T=-y/2,w=t.label?8:0,B=Y.svg(h),M=U(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");const L=b.get("fill");M.stroke=L??C;const W=B.path(Me(k,T,f,y,.1),M),P=Math.max(f,c.width),$=y+c.height+w,N=B.rectangle(-P/2,-$/2,P,$,{...M,fill:"transparent",stroke:"none"}),z=h.insert(()=>W,":first-child"),D=h.insert(()=>N);if(t.icon){const A=h.append("g");A.html(`<g>${await ei(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const F=A.node().getBBox(),E=F.width,_=F.height,S=F.x,R=F.y;A.attr("transform",`translate(${-E/2-S},${u?c.height/2+w/2-_/2-R:-c.height/2-w/2-_/2-R})`),A.attr("style",`color: ${b.get("stroke")??m};`)}return g.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${u?-$/2:$/2-c.height})`),z.attr("transform",`translate(0,${u?c.height/2+w/2:-c.height/2-w/2})`),X(t,D),t.intersect=function(A){if(q.info("iconSquare intersect",t,A),!t.label)return H.rect(t,A);const F=t.x??0,E=t.y??0,_=t.height??0;let S=[];return u?S=[{x:F-c.width/2,y:E-_/2},{x:F+c.width/2,y:E-_/2},{x:F+c.width/2,y:E-_/2+c.height+w},{x:F+f/2,y:E-_/2+c.height+w},{x:F+f/2,y:E+_/2},{x:F-f/2,y:E+_/2},{x:F-f/2,y:E-_/2+c.height+w},{x:F-c.width/2,y:E-_/2+c.height+w}]:S=[{x:F-f/2,y:E-_/2},{x:F+f/2,y:E-_/2},{x:F+f/2,y:E-_/2+y},{x:F+c.width/2,y:E-_/2+y},{x:F+c.width/2/2,y:E+_/2},{x:F-c.width/2,y:E+_/2},{x:F-c.width/2,y:E-_/2+y},{x:F-f/2,y:E-_/2+y}],H.polygon(t,S,A)},h}p(_d,"iconSquare");async function Ad(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const s=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=s/a;const{labelStyles:o}=j(t);t.labelStyle=o;const n=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const l=Math.max(t.label?n??0:0,(t==null?void 0:t.assetWidth)??s),h=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:l,c=t.constraint==="on"?h/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??a;t.width=Math.max(h,n??0);const{shapeSvg:d,bbox:g,label:u}=await K(e,t,"image-shape default"),y=t.pos==="t",f=-h/2,m=-c/2,C=t.label?8:0,b=Y.svg(d),k=U(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const T=b.rectangle(f,m,h,c,k),w=Math.max(h,g.width),B=c+g.height+C,M=b.rectangle(-w/2,-B/2,w,B,{...k,fill:"none",stroke:"none"}),L=d.insert(()=>T,":first-child"),W=d.insert(()=>M);if(t.img){const P=d.append("image");P.attr("href",t.img),P.attr("width",h),P.attr("height",c),P.attr("preserveAspectRatio","none"),P.attr("transform",`translate(${-h/2},${y?B/2-c:-B/2})`)}return u.attr("transform",`translate(${-g.width/2-(g.x-(g.left??0))},${y?-c/2-g.height/2-C/2:c/2-g.height/2+C/2})`),L.attr("transform",`translate(0,${y?g.height/2+C/2:-g.height/2-C/2})`),X(t,W),t.intersect=function(P){if(q.info("iconSquare intersect",t,P),!t.label)return H.rect(t,P);const $=t.x??0,N=t.y??0,z=t.height??0;let D=[];return y?D=[{x:$-g.width/2,y:N-z/2},{x:$+g.width/2,y:N-z/2},{x:$+g.width/2,y:N-z/2+g.height+C},{x:$+h/2,y:N-z/2+g.height+C},{x:$+h/2,y:N+z/2},{x:$-h/2,y:N+z/2},{x:$-h/2,y:N-z/2+g.height+C},{x:$-g.width/2,y:N-z/2+g.height+C}]:D=[{x:$-h/2,y:N-z/2},{x:$+h/2,y:N-z/2},{x:$+h/2,y:N-z/2+c},{x:$+g.width/2,y:N-z/2+c},{x:$+g.width/2/2,y:N+z/2},{x:$-g.width/2,y:N+z/2},{x:$-g.width/2,y:N-z/2+c},{x:$-h/2,y:N-z/2+c}],H.polygon(t,D,P)},d}p(Ad,"imageSquare");async function Md(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await K(e,t,Z(t)),h=Math.max(l.width+(o??0)*2,(t==null?void 0:t.width)??0),c=Math.max(l.height+(a??0)*2,(t==null?void 0:t.height)??0),d=[{x:0,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:-3*c/6,y:-c}];let g;const{cssStyles:u}=t;if(t.look==="handDrawn"){const y=Y.svg(n),f=U(t,{}),m=at(d),C=y.path(m,f);g=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),u&&g.attr("style",u)}else g=ke(n,h,c,d);return i&&g.attr("style",i),t.width=h,t.height=c,X(t,g),t.intersect=function(y){return H.polygon(t,d,y)},n}p(Md,"inv_trapezoid");async function Ed(e,t){const{shapeSvg:r,bbox:i,label:s}=await K(e,t,"label"),a=r.insert("rect",":first-child"),o=.1,n=.1;return a.attr("width",o).attr("height",n),r.attr("class","label edgeLabel"),s.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),X(t,a),t.intersect=function(l){return H.rect(t,l)},r}p(Ed,"labelRect");async function $d(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await K(e,t,Z(t)),h=((t==null?void 0:t.height)??l.height)+a,c=((t==null?void 0:t.width)??l.width)+o,d=[{x:0,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:-(3*h)/6,y:-h}];let g;const{cssStyles:u}=t;if(t.look==="handDrawn"){const y=Y.svg(n),f=U(t,{}),m=at(d),C=y.path(m,f);g=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),u&&g.attr("style",u)}else g=ke(n,c,h,d);return i&&g.attr("style",i),t.width=c,t.height=h,X(t,g),t.intersect=function(y){return H.polygon(t,d,y)},n}p($d,"lean_left");async function Od(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await K(e,t,Z(t)),h=((t==null?void 0:t.height)??l.height)+a,c=((t==null?void 0:t.width)??l.width)+o,d=[{x:-3*h/6,y:0},{x:c,y:0},{x:c+3*h/6,y:-h},{x:0,y:-h}];let g;const{cssStyles:u}=t;if(t.look==="handDrawn"){const y=Y.svg(n),f=U(t,{}),m=at(d),C=y.path(m,f);g=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),u&&g.attr("style",u)}else g=ke(n,c,h,d);return i&&g.attr("style",i),t.width=c,t.height=h,X(t,g),t.intersect=function(y){return H.polygon(t,d,y)},n}p(Od,"lean_right");function Id(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.label="",t.labelStyle=r;const s=e.insert("g").attr("class",Z(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,o=Math.max(35,(t==null?void 0:t.width)??0),n=Math.max(35,(t==null?void 0:t.height)??0),l=7,h=[{x:o,y:0},{x:0,y:n+l/2},{x:o-2*l,y:n+l/2},{x:0,y:2*n},{x:o,y:n-l/2},{x:2*l,y:n-l/2}],c=Y.svg(s),d=U(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=at(h),u=c.path(g,d),y=s.insert(()=>u,":first-child");return y.attr("class","outer-path"),a&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(-${o/2},${-n})`),X(t,y),t.intersect=function(f){return q.info("lightningBolt intersect",t,f),H.polygon(t,h,f)},s}p(Id,"lightningBolt");var sk=p((e,t,r,i,s,a,o)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),ak=p((e,t,r,i,s,a,o)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),ok=p((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),an=10,on=10;async function Dd(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?24:s;if(t.width||t.height){const C=t.width??0;t.width=(t.width??0)-a,t.width<on&&(t.width=on);const k=C/2/(2.5+C/50);t.height=(t.height??0)-o-k*3,t.height<an&&(t.height=an)}const{shapeSvg:n,bbox:l,label:h}=await K(e,t,Z(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,d=c/2,g=d/(2.5+c/50),u=(t!=null&&t.height?t==null?void 0:t.height:l.height)+g+o*2,y=u*.1;let f;const{cssStyles:m}=t;if(t.look==="handDrawn"){const C=Y.svg(n),b=ak(0,0,c,u,d,g,y),k=ok(0,g,c,u,d,g),T=U(t,{}),w=C.path(b,T),B=C.path(k,T);n.insert(()=>B,":first-child").attr("class","line"),f=n.insert(()=>w,":first-child"),f.attr("class","basic label-container"),m&&f.attr("style",m)}else{const C=sk(0,0,c,u,d,g,y);f=n.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",Bt(m)).attr("style",i)}return f.attr("label-offset-y",g),f.attr("transform",`translate(${-c/2}, ${-(u/2+g)})`),X(t,f),h.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+g-(l.y-(l.top??0))})`),t.intersect=function(C){const b=H.rect(t,C),k=b.x-(t.x??0);if(d!=0&&(Math.abs(k)<(t.width??0)/2||Math.abs(k)==(t.width??0)/2&&Math.abs(b.y-(t.y??0))>(t.height??0)/2-g)){let T=g*g*(1-k*k/(d*d));T>0&&(T=Math.sqrt(T)),T=g-T,C.y-(t.y??0)>0&&(T=-T),b.y+=T}return b},n}p(Dd,"linedCylinder");async function Pd(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;if(t.width||t.height){const T=t.width;t.width=(T??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-o*2,t.height<10&&(t.height=10)}const{shapeSvg:n,bbox:l,label:h}=await K(e,t,Z(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+(a??0)*2,d=(t!=null&&t.height?t==null?void 0:t.height:l.height)+(o??0)*2,g=t.look==="neo"?d/4:d/8,u=d+g,{cssStyles:y}=t,f=Y.svg(n),m=U(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=[{x:-c/2-c/2*.1,y:-u/2},{x:-c/2-c/2*.1,y:u/2},...Ae(-c/2-c/2*.1,u/2,c/2+c/2*.1,u/2,g,.8),{x:c/2+c/2*.1,y:-u/2},{x:-c/2-c/2*.1,y:-u/2},{x:-c/2,y:-u/2},{x:-c/2,y:u/2*1.1},{x:-c/2,y:-u/2}],b=f.polygon(C.map(T=>[T.x,T.y]),m),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-g/2})`),h.attr("transform",`translate(${-c/2+(t.padding??0)+c/2*.1/2-(l.x-(l.left??0))},${-d/2+(t.padding??0)-g/2-(l.y-(l.top??0))})`),X(t,k),t.intersect=function(T){return H.polygon(t,C,T)},n}p(Pd,"linedWaveEdgedRect");async function Rd(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-2*n,10),t.height=Math.max(((t==null?void 0:t.height)??0)-o*2-2*n,10));const{shapeSvg:l,bbox:h,label:c}=await K(e,t,Z(t)),d=(t!=null&&t.width?t==null?void 0:t.width:h.width)+a*2+2*n,g=(t!=null&&t.height?t==null?void 0:t.height:h.height)+o*2+2*n,u=d-2*n,y=g-2*n,f=-u/2,m=-y/2,{cssStyles:C}=t,b=Y.svg(l),k=U(t,{}),T=[{x:f-n,y:m+n},{x:f-n,y:m+y+n},{x:f+u-n,y:m+y+n},{x:f+u-n,y:m+y},{x:f+u,y:m+y},{x:f+u,y:m+y-n},{x:f+u+n,y:m+y-n},{x:f+u+n,y:m-n},{x:f+n,y:m-n},{x:f+n,y:m},{x:f,y:m},{x:f,y:m+n}],w=[{x:f,y:m+n},{x:f+u-n,y:m+n},{x:f+u-n,y:m+y},{x:f+u,y:m+y},{x:f+u,y:m},{x:f,y:m}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const B=at(T);let M=b.path(B,k);const L=at(w);let W=b.path(L,k);t.look!=="handDrawn"&&(M=la(M),W=la(W));const P=l.insert("g",":first-child");return P.insert(()=>M),P.insert(()=>W),P.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",i),c.attr("transform",`translate(${-(h.width/2)-n-(h.x-(h.left??0))}, ${-(h.height/2)+n-(h.y-(h.top??0))})`),X(t,P),t.intersect=function($){return H.polygon(t,T,$)},l}p(Rd,"multiRect");async function qd(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await K(e,t,Z(t)),n=t.padding??0,l=t.look==="neo"?16:n,h=t.look==="neo"?12:n;let c=!0;(t.width||t.height)&&(c=!1,t.width=((t==null?void 0:t.width)??0)-l*2,t.height=((t==null?void 0:t.height)??0)-h*3);const d=Math.max(a.width,(t==null?void 0:t.width)??0)+l*2,g=Math.max(a.height,(t==null?void 0:t.height)??0)+h*3,u=t.look==="neo"?g/4:g/8,y=g+(c?u/2:-u/2),f=-d/2,m=-y/2,C=10,{cssStyles:b}=t,k=Ae(f-C,m+y+C,f+d-C,m+y+C,u,.8),T=k==null?void 0:k[k.length-1],w=[{x:f-C,y:m+C},{x:f-C,y:m+y+C},...k,{x:f+d-C,y:T.y-C},{x:f+d,y:T.y-C},{x:f+d,y:T.y-2*C},{x:f+d+C,y:T.y-2*C},{x:f+d+C,y:m-C},{x:f+C,y:m-C},{x:f+C,y:m},{x:f,y:m},{x:f,y:m+C}],B=[{x:f,y:m+C},{x:f+d-C,y:m+C},{x:f+d-C,y:T.y-C},{x:f+d,y:T.y-C},{x:f+d,y:m},{x:f,y:m}],M=Y.svg(s),L=U(t,{});t.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const W=at(w),P=M.path(W,L),$=at(B),N=M.path($,L),z=s.insert(()=>P,":first-child");return z.insert(()=>N),z.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&z.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&z.selectAll("path").attr("style",i),z.attr("transform",`translate(0,${-u/2})`),o.attr("transform",`translate(${-(a.width/2)-C-(a.x-(a.left??0))}, ${-(a.height/2)+C-u/2-(a.y-(a.top??0))})`),X(t,z),t.intersect=function(D){return H.polygon(t,w,D)},s}p(qd,"multiWaveEdgedRectangle");async function Wd(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=j(t);t.labelStyle=i,t.useHtmlLabels||Pt(mt())||(t.centerLabel=!0);const{shapeSvg:o,bbox:n,label:l}=await K(e,t,Z(t)),h=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),d=-h/2,g=-c/2,{cssStyles:u}=t,y=Y.svg(o),f=U(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=y.rectangle(d,g,h,c,f),C=o.insert(()=>m,":first-child");return C.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),u&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",u),s&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",s),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),X(t,C),t.intersect=function(b){return H.rect(t,b)},o}p(Wd,"note");var nk=p((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function zd(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await K(e,t,Z(t)),o=a.width+(t.padding??0),n=a.height+(t.padding??0),l=o+n,h=.5,c=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let d;const{cssStyles:g}=t;if(t.look==="handDrawn"){const u=Y.svg(s),y=U(t,{}),f=nk(0,0,l),m=u.path(f,y);d=s.insert(()=>m,":first-child").attr("transform",`translate(${-l/2+h}, ${l/2})`),g&&d.attr("style",g)}else d=ke(s,l,l,c),d.attr("transform",`translate(${-l/2+h}, ${l/2})`);return i&&d.attr("style",i),X(t,d),t.calcIntersect=function(u,y){const f=u.width,m=[{x:f/2,y:0},{x:f,y:-f/2},{x:f/2,y:-f},{x:0,y:-f/2}],C=H.polygon(u,m,y);return{x:C.x-.5,y:C.y-.5}},t.intersect=function(u){return this.calcIntersect(t,u)},s}p(zd,"question");async function Nd(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?21:s??0,o=t.look==="neo"?12:s??0,{shapeSvg:n,bbox:l,label:h}=await K(e,t,Z(t)),c=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?a*2:a),d=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?o*2:o),g=-c/2,u=-d/2,y=u/2,f=[{x:g+y,y:u},{x:g,y:0},{x:g+y,y:-u},{x:-g,y:-u},{x:-g,y:u}],{cssStyles:m}=t,C=Y.svg(n),b=U(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=at(f),T=C.path(k,b),w=n.insert(()=>T,":first-child");return w.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(${-y/2},0)`),h.attr("transform",`translate(${-y/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),X(t,w),t.intersect=function(B){return H.polygon(t,f,B)},n}p(Nd,"rect_left_inv_arrow");async function Hd(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;let s;t.cssClasses?s="node "+t.cssClasses:s="node default";const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),o=a.insert("g"),n=a.insert("g").attr("class","label").attr("style",i),l=t.description,h=t.label,c=await Te(n,h,t.labelStyle,!0,!0);let d={width:0,height:0};if(Pt(ht())){const L=c.children[0],W=it(c);d=L.getBoundingClientRect(),W.attr("width",d.width),W.attr("height",d.height)}q.info("Text 2",l);const g=l||[],u=c.getBBox(),y=await Te(n,Array.isArray(g)?g.join("<br/>"):g,t.labelStyle,!0,!0),f=y.children[0],m=it(y);d=f.getBoundingClientRect(),m.attr("width",d.width),m.attr("height",d.height);const C=(t.padding||0)/2;it(y).attr("transform","translate( "+(d.width>u.width?0:(u.width-d.width)/2)+", "+(u.height+C+5)+")"),it(c).attr("transform","translate( "+(d.width<u.width?0:-(u.width-d.width)/2)+", 0)"),d=n.node().getBBox(),n.attr("transform","translate("+-d.width/2+", "+(-d.height/2-C+3)+")");const b=d.width+(t.padding||0),k=d.height+(t.padding||0),T=-d.width/2-C,w=-d.height/2-C;let B,M;if(t.look==="handDrawn"){const L=Y.svg(a),W=U(t,{}),P=L.path(Me(T,w,b,k,t.rx||0),W),$=L.line(-d.width/2-C,-d.height/2-C+u.height+C,d.width/2+C,-d.height/2-C+u.height+C,W);M=a.insert(()=>(q.debug("Rough node insert CXC",P),$),":first-child"),B=a.insert(()=>(q.debug("Rough node insert CXC",P),P),":first-child")}else B=o.insert("rect",":first-child"),M=o.insert("line"),B.attr("class","outer title-state").attr("style",i).attr("x",-d.width/2-C).attr("y",-d.height/2-C).attr("width",d.width+(t.padding||0)).attr("height",d.height+(t.padding||0)),M.attr("class","divider").attr("x1",-d.width/2-C).attr("x2",d.width/2+C).attr("y1",-d.height/2-C+u.height+C).attr("y2",-d.height/2-C+u.height+C);return X(t,B),t.intersect=function(L){return H.rect(t,L)},a}p(Hd,"rectWithTitle");async function Yd(e,t,{config:{themeVariables:r}}){const i=(r==null?void 0:r.radius)??5,s={rx:i,ry:i,classes:"",labelPaddingX:((t==null?void 0:t.padding)??0)*1,labelPaddingY:((t==null?void 0:t.padding)??0)*1};return hr(e,t,s)}p(Yd,"roundedRect");var Oe=8;async function Ud(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0,{shapeSvg:o,bbox:n,label:l}=await K(e,t,Z(t)),h=((t==null?void 0:t.width)??n.width)+s*2+(t.look==="neo"?Oe:Oe*2),c=((t==null?void 0:t.height)??n.height)+a*2,d=h-Oe,g=c,u=Oe-h/2,y=-c/2,{cssStyles:f}=t,m=Y.svg(o),C=U(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const b=[{x:u,y},{x:u+d,y},{x:u+d,y:y+g},{x:u-Oe,y:y+g},{x:u-Oe,y},{x:u,y},{x:u,y:y+g}],k=m.polygon(b.map(w=>[w.x,w.y]),C),T=o.insert(()=>k,":first-child");return T.attr("class","basic label-container outer-path").attr("style",Bt(f)),i&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),f&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),l.attr("transform",`translate(${Oe/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),X(t,T),t.intersect=function(w){return H.rect(t,w)},o}p(Ud,"shadedProcess");async function jd(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2,10),t.height=Math.max(((t==null?void 0:t.height)??0)/1.5-o*2,10));const{shapeSvg:n,bbox:l,label:h}=await K(e,t,Z(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,d=((t!=null&&t.height?t==null?void 0:t.height:l.height)+o*2)*1.5,g=c,u=d/1.5,y=-g/2,f=-u/2,{cssStyles:m}=t,C=Y.svg(n),b=U(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=[{x:y,y:f},{x:y,y:f+u},{x:y+g,y:f+u},{x:y+g,y:f-u/2}],T=at(k),w=C.path(T,b),B=n.insert(()=>w,":first-child");return B.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",i),B.attr("transform",`translate(0, ${u/4})`),h.attr("transform",`translate(${-g/2+(t.padding??0)-(l.x-(l.left??0))}, ${-u/4+(t.padding??0)-(l.y-(l.top??0))})`),X(t,B),t.intersect=function(M){return H.polygon(t,k,M)},n}p(jd,"slopedRect");async function Xd(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,s=t.look==="neo"?12:r,a={rx:0,ry:0,classes:"",labelPaddingX:t.labelPaddingX??i,labelPaddingY:s};return hr(e,t,a)}p(Xd,"squareRect");async function Gd(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?20:s,o=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await K(e,t,Z(t)),h=l.height+(t.look==="neo"?o*2:o),c=l.width+h/4+(t.look==="neo"?a*2:a),d=h/2,{cssStyles:g}=t,u=Y.svg(n),y=U(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const f=[{x:-c/2+d,y:-h/2},{x:c/2-d,y:-h/2},...Er(-c/2+d,0,d,50,90,270),{x:c/2-d,y:h/2},...Er(c/2-d,0,d,50,270,450)],m=at(f),C=u.path(m,y),b=n.insert(()=>C,":first-child");return b.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),X(t,b),t.intersect=function(k){return H.polygon(t,f,k)},n}p(Gd,"stadium");async function Vd(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5,classes:"flowchart-node"};return hr(e,t,r)}p(Vd,"state");function Zd(e,t,{config:{themeVariables:r}}){var b,k;const{labelStyles:i,nodeStyles:s}=j(t);t.labelStyle=i;const{cssStyles:a}=t,{lineColor:o,stateBorder:n,nodeBorder:l,nodeShadow:h}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const c=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),d=Y.svg(c),g=U(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const u=d.circle(0,0,t.width,{...g,stroke:o,strokeWidth:2}),y=n??l,f=(t.width??0)*5/14,m=d.circle(0,0,f,{...g,fill:y,stroke:y,strokeWidth:2,fillStyle:"solid"}),C=c.insert(()=>u,":first-child");if(C.insert(()=>m),t.look!=="handDrawn"&&C.attr("class","outer-path"),a&&C.selectAll("path").attr("style",a),s&&C.selectAll("path").attr("style",s),t.width<25&&h&&t.look!=="handDrawn"){const T=((k=(b=e.node())==null?void 0:b.ownerSVGElement)==null?void 0:k.id)??"",w=T?`${T}-drop-shadow-small`:"drop-shadow-small";C.attr("style",`filter:url(#${w})`)}return X(t,C),t.intersect=function(T){return H.circle(t,(t.width??0)/2,T)},c}p(Zd,"stateEnd");function Qd(e,t,{config:{themeVariables:r}}){var n,l;const{lineColor:i,nodeShadow:s}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let o;if(t.look==="handDrawn"){const c=Y.svg(a).circle(0,0,t.width,mx(i));o=a.insert(()=>c),o.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else o=a.insert("circle",":first-child"),o.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&s&&t.look!=="handDrawn"){const h=((l=(n=e.node())==null?void 0:n.ownerSVGElement)==null?void 0:l.id)??"",c=h?`${h}-drop-shadow-small`:"drop-shadow-small";o.attr("style",`filter:url(#${c})`)}return X(t,o),t.intersect=function(h){return H.circle(t,(t.width??7)/2,h)},a}p(Qd,"stateStart");var je=8;async function Kd(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const s=(t==null?void 0:t.padding)??8,a=t.look==="neo"?28:s,o=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await K(e,t,Z(t)),h=((t==null?void 0:t.width)??l.width)+2*je+a,c=((t==null?void 0:t.height)??l.height)+o,d=h-2*je,g=c,u=-h/2,y=-c/2,f=[{x:0,y:0},{x:d,y:0},{x:d,y:-g},{x:0,y:-g},{x:0,y:0},{x:-8,y:0},{x:d+8,y:0},{x:d+8,y:-g},{x:-8,y:-g},{x:-8,y:0}];if(t.look==="handDrawn"){const m=Y.svg(n),C=U(t,{}),b=m.rectangle(u,y,d+16,g,C),k=m.line(u+je,y,u+je,y+g,C),T=m.line(u+je+d,y,u+je+d,y+g,C);n.insert(()=>k,":first-child"),n.insert(()=>T,":first-child");const w=n.insert(()=>b,":first-child"),{cssStyles:B}=t;w.attr("class","basic label-container").attr("style",Bt(B)),X(t,w)}else{const m=ke(n,d,g,f);i&&m.attr("style",i),X(t,m)}return t.intersect=function(m){return H.polygon(t,f,m)},n}p(Kd,"subroutine");var ws=.2;async function Jd(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;(t.width||t.height)&&(t.height=Math.max(((t==null?void 0:t.height)??0)-o*2,10),t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-ws*(t.height+o*2),10));const{shapeSvg:n,bbox:l}=await K(e,t,Z(t)),h=(t!=null&&t.height?t==null?void 0:t.height:l.height)+o*2,c=ws*h,d=ws*h,u=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2+c-c,y=h,f=-u/2,m=-y/2,{cssStyles:C}=t,b=Y.svg(n),k=U(t,{}),T=[{x:f-c/2,y:m},{x:f+u+c/2,y:m},{x:f+u+c/2,y:m+y},{x:f-c/2,y:m+y}],w=[{x:f+u-c/2,y:m+y},{x:f+u+c/2,y:m+y},{x:f+u+c/2,y:m+y-d}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const B=at(T),M=b.path(B,k),L=at(w),W=b.path(L,{...k,fillStyle:"solid"}),P=n.insert(()=>W,":first-child");return P.insert(()=>M,":first-child"),P.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",i),X(t,P),t.intersect=function($){return H.polygon(t,T,$)},n}p(Jd,"taggedRect");async function tu(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await K(e,t,Z(t)),n=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=l/8,c=.2*n,d=.2*l,g=l+h,{cssStyles:u}=t,y=Y.svg(s),f=U(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=[{x:-n/2-n/2*.1,y:g/2},...Ae(-n/2-n/2*.1,g/2,n/2+n/2*.1,g/2,h,.8),{x:n/2+n/2*.1,y:-g/2},{x:-n/2-n/2*.1,y:-g/2}],C=-n/2+n/2*.1,b=-g/2-d*.4,k=[{x:C+n-c,y:(b+l)*1.3},{x:C+n,y:b+l-d},{x:C+n,y:(b+l)*.9},...Ae(C+n,(b+l)*1.25,C+n-c,(b+l)*1.3,-l*.02,.5)],T=at(m),w=y.path(T,f),B=at(k),M=y.path(B,{...f,fillStyle:"solid"}),L=s.insert(()=>M,":first-child");return L.insert(()=>w,":first-child"),L.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(0,${-h/2})`),o.attr("transform",`translate(${-n/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-h/2-(a.y-(a.top??0))})`),X(t,L),t.intersect=function(W){return H.polygon(t,m,W)},s}p(tu,"taggedWaveEdgedRectangle");async function eu(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await K(e,t,Z(t)),o=Math.max(a.width+(t.padding??0),(t==null?void 0:t.width)||0),n=Math.max(a.height+(t.padding??0),(t==null?void 0:t.height)||0),l=-o/2,h=-n/2,c=s.insert("rect",":first-child");return c.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",h).attr("width",o).attr("height",n),X(t,c),t.intersect=function(d){return H.rect(t,d)},s}p(eu,"text");var lk=p((e,t,r,i,s,a)=>`M${e},${t}
|
|
229
|
-
a${s},${a} 0,0,1 0,${-i}
|
|
230
|
-
l${r},0
|
|
231
|
-
a${s},${a} 0,0,1 0,${i}
|
|
232
|
-
M${r},${-i}
|
|
233
|
-
a${s},${a} 0,0,0 0,${i}
|
|
234
|
-
l${-r},0`,"createCylinderPathD"),hk=p((e,t,r,i,s,a)=>[`M${e},${t}`,`M${e+r},${t}`,`a${s},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${s},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),ck=p((e,t,r,i,s,a)=>[`M${e+r/2},${-i/2}`,`a${s},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),nn=5,ln=10;async function ru(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?12:s/2;if(t.width||t.height){const f=t.height??0;t.height=(t.height??0)-a,t.height<nn&&(t.height=nn);const C=f/2/(2.5+f/50);t.width=(t.width??0)-a-C*3,t.width<ln&&(t.width=ln)}const{shapeSvg:o,bbox:n,label:l}=await K(e,t,Z(t)),h=(t.height?t.height:n.height)+a,c=h/2,d=c/(2.5+h/50),g=(t.width?t.width:n.width)+d+a,{cssStyles:u}=t;let y;if(t.look==="handDrawn"){const f=Y.svg(o),m=hk(0,0,g,h,d,c),C=ck(0,0,g,h,d,c),b=f.path(m,U(t,{})),k=f.path(C,U(t,{fill:"none"}));y=o.insert(()=>k,":first-child"),y=o.insert(()=>b,":first-child"),y.attr("class","basic label-container"),u&&y.attr("style",u)}else{const f=lk(0,0,g,h,d,c);y=o.insert("path",":first-child").attr("d",f).attr("class","basic label-container").attr("style",Bt(u)).attr("style",i),y.attr("class","basic label-container outer-path"),u&&y.selectAll("path").attr("style",u),i&&y.selectAll("path").attr("style",i)}return y.attr("label-offset-x",d),y.attr("transform",`translate(${-g/2}, ${h/2} )`),l.attr("transform",`translate(${-(n.width/2)-d-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),X(t,y),t.intersect=function(f){const m=H.rect(t,f),C=m.y-(t.y??0);if(c!=0&&(Math.abs(C)<(t.height??0)/2||Math.abs(C)==(t.height??0)/2&&Math.abs(m.x-(t.x??0))>(t.width??0)/2-d)){let b=d*d*(1-C*C/(c*c));b!=0&&(b=Math.sqrt(Math.abs(b))),b=d-b,f.x-(t.x??0)>0&&(b=-b),m.x+=b}return m},o}p(ru,"tiltedCylinder");async function iu(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const s=t.padding??0,a=(t.look==="neo",s),o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await K(e,t,Z(t)),h=((t==null?void 0:t.height)??l.height)+a,c=((t==null?void 0:t.width)??l.width)+o,d=[{x:-3*h/6,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:0,y:-h}];let g;const{cssStyles:u}=t;if(t.look==="handDrawn"){const y=Y.svg(n),f=U(t,{}),m=at(d),C=y.path(m,f);g=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),u&&g.attr("style",u)}else g=ke(n,c,h,d);return i&&g.attr("style",i),t.width=c,t.height=h,X(t,g),t.intersect=function(y){return H.polygon(t,d,y)},n}p(iu,"trapezoid");async function su(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=15,l=5;(t.width||t.height)&&(t.height=(t.height??0)-o*2,t.height<l&&(t.height=l),t.width=(t.width??0)-a*2,t.width<n&&(t.width=n));const{shapeSvg:h,bbox:c}=await K(e,t,Z(t)),d=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2,g=(t!=null&&t.height?t==null?void 0:t.height:c.height)+o*2,{cssStyles:u}=t,y=Y.svg(h),f=U(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=[{x:-d/2*.8,y:-g/2},{x:d/2*.8,y:-g/2},{x:d/2,y:-g/2*.6},{x:d/2,y:g/2},{x:-d/2,y:g/2},{x:-d/2,y:-g/2*.6}],C=at(m),b=y.path(C,f),k=h.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),X(t,k),t.intersect=function(T){return H.polygon(t,m,T)},h}p(su,"trapezoidalPentagon");var hn=10,cn=10;async function au(e,t){var T;const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.width=(((t==null?void 0:t.width)??0)-a)/2,t.width<cn&&(t.width=cn),t.height=(t==null?void 0:t.height)??0,t.height<hn&&(t.height=hn));const{shapeSvg:o,bbox:n,label:l}=await K(e,t,Z(t)),h=xe((T=ht().flowchart)==null?void 0:T.htmlLabels),c=(t!=null&&t.width?t==null?void 0:t.width:n.width)+a,d=t!=null&&t.height?t==null?void 0:t.height:c+n.height,g=d,u=[{x:0,y:0},{x:g,y:0},{x:g/2,y:-d}],{cssStyles:y}=t,f=Y.svg(o),m=U(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=at(u),b=f.path(C,m),k=o.insert(()=>b,":first-child").attr("transform",`translate(${-d/2}, ${d/2})`).attr("class","outer-path");return y&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",y),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=c,t.height=d,X(t,k),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${d/2-(n.height+(t.padding??0)/(h?2:1)-(n.y-(n.top??0)))})`),t.intersect=function(w){return q.info("Triangle intersect",t,u,w),H.polygon(t,u,w)},o}p(au,"triangle");async function ou(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;let n=!0;(t.width||t.height)&&(n=!1,t.width=((t==null?void 0:t.width)??0)-a*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-o*2,t.height<10&&(t.height=10));const{shapeSvg:l,bbox:h,label:c}=await K(e,t,Z(t)),d=(t!=null&&t.width?t==null?void 0:t.width:h.width)+(a??0)*2,g=(t!=null&&t.height?t==null?void 0:t.height:h.height)+(o??0)*2,u=t.look==="neo"?g/4:g/8,y=g+(n?u:-u),{cssStyles:f}=t,C=14-d,b=C>0?C/2:0,k=Y.svg(l),T=U(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const w=[{x:-d/2-b,y:y/2},...Ae(-d/2-b,y/2,d/2+b,y/2,u,.8),{x:d/2+b,y:-y/2},{x:-d/2-b,y:-y/2}],B=at(w),M=k.path(B,T),L=l.insert(()=>M,":first-child");return L.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(0,${-u/2})`),c.attr("transform",`translate(${-d/2+(t.padding??0)-(h.x-(h.left??0))},${-g/2+(t.padding??0)-u-(h.y-(h.top??0))})`),X(t,L),t.intersect=function(W){return H.polygon(t,w,W)},l}p(ou,"waveEdgedRectangle");async function nu(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?20:s;if(t.width||t.height){t.width=(t==null?void 0:t.width)??0,t.width<20&&(t.width=20),t.height=(t==null?void 0:t.height)??0,t.height<10&&(t.height=10);const T=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-o-T*(20/9)),t.width=t.width-a*2}const{shapeSvg:n,bbox:l}=await K(e,t,Z(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,c=(t!=null&&t.height?t==null?void 0:t.height:l.height)+o,d=c/8,g=c+d*2,{cssStyles:u}=t,y=Y.svg(n),f=U(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=[{x:-h/2,y:g/2},...Ae(-h/2,g/2,h/2,g/2,d,1),{x:h/2,y:-g/2},...Ae(h/2,-g/2,-h/2,-g/2,d,-1)],C=at(m),b=y.path(C,f),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),X(t,k),t.intersect=function(T){return H.polygon(t,m,T)},n}p(nu,"waveRectangle");var yt=10;async function lu(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-s*2-yt,10),t.height=Math.max(((t==null?void 0:t.height)??0)-a*2-yt,10));const{shapeSvg:o,bbox:n,label:l}=await K(e,t,Z(t)),h=(t!=null&&t.width?t==null?void 0:t.width:n.width)+s*2+yt,c=(t!=null&&t.height?t==null?void 0:t.height:n.height)+a*2+yt,d=h-yt,g=c-yt,u=-d/2,y=-g/2,{cssStyles:f}=t,m=Y.svg(o),C=U(t,{}),b=[{x:u-yt,y:y-yt},{x:u-yt,y:y+g},{x:u+d,y:y+g},{x:u+d,y:y-yt}],k=`M${u-yt},${y-yt} L${u+d},${y-yt} L${u+d},${y+g} L${u-yt},${y+g} L${u-yt},${y-yt}
|
|
235
|
-
M${u-yt},${y} L${u+d},${y}
|
|
236
|
-
M${u},${y-yt} L${u},${y+g}`;t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const T=m.path(k,C),w=o.insert(()=>T,":first-child");return w.attr("transform",`translate(${yt/2}, ${yt/2})`),w.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(n.width/2)+yt/2-(n.x-(n.left??0))}, ${-(n.height/2)+yt/2-(n.y-(n.top??0))})`),X(t,w),t.intersect=function(B){return H.polygon(t,b,B)},o}p(lu,"windowPane");var dn=new Set(["redux-color","redux-dark-color"]),dk=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function no(e,t){var xt,$t,ee,re;const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:s}=mt(),{rowEven:a,rowOdd:o,nodeBorder:n,borderColorArray:l}=s;if(t.look==="handDrawn"){const{themeVariables:V}=mt(),{background:rt}=V,pt={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${rt}`]};await no(e,pt)}const h=mt();t.useHtmlLabels=h.htmlLabels;let c=((xt=h.er)==null?void 0:xt.diagramPadding)??10,d=(($t=h.er)==null?void 0:$t.entityPadding)??6;const{cssStyles:g}=t,{labelStyles:u,nodeStyles:y}=j(t);if(r.attributes.length===0&&t.label){const V={rx:0,ry:0,labelPaddingX:c,labelPaddingY:c*1.5,classes:""};Ce(t.label,h)+V.labelPaddingX*2<h.er.minEntityWidth&&(t.width=h.er.minEntityWidth);const rt=await hr(e,t,V);if(i!=null&&dn.has(i)){const pt=r.colorIndex??0;rt.attr("data-color-id",`color-${pt%l.length}`)}if(!xe(h.htmlLabels)){const pt=rt.select("text"),wt=(ee=pt.node())==null?void 0:ee.getBBox();pt.attr("transform",`translate(${-wt.width/2}, 0)`)}return rt}h.htmlLabels||(c*=1.25,d*=1.25);let f=Z(t);f||(f="node default");const m=e.insert("g").attr("class",f).attr("id",t.domId||t.id),C=await Ge(m,t.label??"",h,0,0,["name"],u);C.height+=d;let b=0;const k=[],T=[];let w=0,B=0,M=0,L=0,W=!0,P=!0;for(const V of r.attributes){const rt=await Ge(m,V.type,h,0,b,["attribute-type"],u);w=Math.max(w,rt.width+c);const pt=await Ge(m,V.name,h,0,b,["attribute-name"],u);B=Math.max(B,pt.width+c);const wt=await Ge(m,V.keys.join(),h,0,b,["attribute-keys"],u);M=Math.max(M,wt.width+c);const Ee=await Ge(m,V.comment,h,0,b,["attribute-comment"],u);L=Math.max(L,Ee.width+c);const Se=Math.max(rt.height,pt.height,wt.height,Ee.height)+d;T.push({yOffset:b,rowHeight:Se}),b+=Se}let $=4;M<=c&&(W=!1,M=0,$--),L<=c&&(P=!1,L=0,$--);const N=m.node().getBBox();if(C.width+c*2-(w+B+M+L)>0){const V=C.width+c*2-(w+B+M+L);w+=V/$,B+=V/$,M>0&&(M+=V/$),L>0&&(L+=V/$)}const z=w+B+M+L,D=Y.svg(m),A=U(t,{});t.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");let F=0;T.length>0&&(F=T.reduce((V,rt)=>V+((rt==null?void 0:rt.rowHeight)??0),0));const E=Math.max(N.width+c*2,(t==null?void 0:t.width)||0,z),_=Math.max((F??0)+C.height,(t==null?void 0:t.height)||0),S=-E/2,R=-_/2;if(m.selectAll("g:not(:first-child)").each((V,rt,pt)=>{const wt=it(pt[rt]),Ee=wt.attr("transform");let Se=0,go=0;if(Ee){const gs=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Ee);gs&&(Se=parseFloat(gs[1]),go=parseFloat(gs[2]),wt.attr("class").includes("attribute-name")?Se+=w:wt.attr("class").includes("attribute-keys")?Se+=w+B:wt.attr("class").includes("attribute-comment")&&(Se+=w+B+M))}wt.attr("transform",`translate(${S+c/2+Se}, ${go+R+C.height+d/2})`)}),m.select(".name").attr("transform","translate("+-C.width/2+", "+(R+d/2)+")"),i!=null&&dn.has(i)){const V=r.colorIndex??0;m.attr("data-color-id",`color-${V%l.length}`)}const et=D.rectangle(S,R,E,_,A),st=m.insert(()=>et,":first-child").attr("class","outer-path").attr("style",g.join(""));k.push(0);for(const[V,rt]of T.entries()){const wt=(V+1)%2===0&&rt.yOffset!==0,Ee=D.rectangle(S,C.height+R+(rt==null?void 0:rt.yOffset),E,rt==null?void 0:rt.rowHeight,{...A,fill:wt?a:o,stroke:n});m.insert(()=>Ee,"g.label").attr("style",g.join("")).attr("class",`row-rect-${wt?"even":"odd"}`)}const lt=1e-4;let nt=Ve(S,C.height+R,E+S,C.height+R,lt),dt=D.polygon(nt.map(V=>[V.x,V.y]),A);if(m.insert(()=>dt).attr("class","divider"),nt=Ve(w+S,C.height+R,w+S,_+R,lt),dt=D.polygon(nt.map(V=>[V.x,V.y]),A),m.insert(()=>dt).attr("class","divider"),W){const V=w+B+S;nt=Ve(V,C.height+R,V,_+R,lt),dt=D.polygon(nt.map(rt=>[rt.x,rt.y]),A),m.insert(()=>dt).attr("class","divider")}if(P){const V=w+B+M+S;nt=Ve(V,C.height+R,V,_+R,lt),dt=D.polygon(nt.map(rt=>[rt.x,rt.y]),A),m.insert(()=>dt).attr("class","divider")}for(const V of k){const rt=C.height+R+V;nt=Ve(S,rt,E+S,rt,lt),dt=D.polygon(nt.map(pt=>[pt.x,pt.y]),A),m.insert(()=>dt).attr("class","divider")}if(X(t,st),y&&t.look!=="handDrawn")if(i!=null&&dk.has(i))m.selectAll("path").attr("style",y);else{const V=y.split(";"),rt=(re=V==null?void 0:V.filter(pt=>pt.includes("stroke")))==null?void 0:re.map(pt=>`${pt}`).join("; ");m.selectAll("path").attr("style",rt??""),m.selectAll(".row-rect-even path").attr("style",y)}return t.intersect=function(V){return H.rect(t,V)},m}p(no,"erBox");async function Ge(e,t,r,i=0,s=0,a=[],o=""){const n=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${s})`).attr("style",o);t!==xo(t)&&(t=xo(t),t=t.replaceAll("<","<").replaceAll(">",">"));const l=n.node().appendChild(await be(n,t,{width:Ce(t,r)+100,style:o,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let c=l.children[0];for(c.textContent=c.textContent.replaceAll("<","<").replaceAll(">",">");c.childNodes[0];)c=c.childNodes[0],c.textContent=c.textContent.replaceAll("<","<").replaceAll(">",">")}let h=l.getBBox();if(xe(r.htmlLabels)){const c=l.children[0];c.style.textAlign="start";const d=it(l);h=c.getBoundingClientRect(),d.attr("width",h.width),d.attr("height",h.height)}return h}p(Ge,"addText");function Ve(e,t,r,i,s){return e===r?[{x:e-s/2,y:t},{x:e+s/2,y:t},{x:r+s/2,y:i},{x:r-s/2,y:i}]:[{x:e,y:t-s/2},{x:e,y:t+s/2},{x:r,y:i+s/2},{x:r,y:i-s/2}]}p(Ve,"lineToPolygon");async function hu(e,t,r,i,s=r.class.padding??12){const a=i?0:3,o=e.insert("g").attr("class",Z(t)).attr("id",t.domId||t.id);let n=null,l=null,h=null,c=null,d=0,g=0,u=0;if(n=o.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await br(n,{text:`«${b}»`},0),d=n.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await br(l,t,0,["font-weight: bolder"]);const y=l.node().getBBox();g=y.height,h=o.insert("g").attr("class","members-group text");let f=0;for(const b of t.members){const k=await br(h,b,f,[b.parseClassifier()]);f+=k+a}u=h.node().getBBox().height,u<=0&&(u=s/2),c=o.insert("g").attr("class","methods-group text");let m=0;for(const b of t.methods){const k=await br(c,b,m,[b.parseClassifier()]);m+=k+a}let C=o.node().getBBox();if(n!==null){const b=n.node().getBBox();n.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-y.width/2}, ${d})`),C=o.node().getBBox(),h.attr("transform",`translate(0, ${d+g+s*2})`),C=o.node().getBBox(),c.attr("transform",`translate(0, ${d+g+(u?u+s*4:s*2)})`),C=o.node().getBBox(),{shapeSvg:o,bbox:C}}p(hu,"textHelper");async function br(e,t,r,i=[]){const s=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=mt();let o="useHtmlLabels"in t?t.useHtmlLabels:xe(a.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!o&&n.startsWith("\\")&&(n=n.substring(1)),Lr(n)&&(o=!0);const l=await be(s,Ta(ze(n)),{width:Ce(n,a)+50,classes:"markdown-node-label",useHtmlLabels:o},a);let h,c=1;if(o){const d=l.children[0],g=it(l);c=d.innerHTML.split("<br>").length,d.innerHTML.includes("</math>")&&(c+=d.innerHTML.split("<mrow>").length-1);const u=d.getElementsByTagName("img");if(u){const y=n.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...u].map(f=>new Promise(m=>{function C(){var b;if(f.style.display="flex",f.style.flexDirection="column",y){const k=((b=a.fontSize)==null?void 0:b.toString())??window.getComputedStyle(document.body).fontSize,T=5,w=parseInt(k,10)*T+"px";f.style.minWidth=w,f.style.maxWidth=w}else f.style.width="100%";m(f)}p(C,"setupImage"),setTimeout(()=>{f.complete&&C()}),f.addEventListener("error",C),f.addEventListener("load",C)})))}h=d.getBoundingClientRect(),g.attr("width",h.width),g.attr("height",h.height)}else{i.includes("font-weight: bolder")&&it(l).selectAll("tspan").attr("font-weight",""),c=l.children.length;const d=l.children[0];(l.textContent===""||l.textContent.includes(">"))&&(d.textContent=n[0]+n.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),n[1]===" "&&(d.textContent=d.textContent[0]+" "+d.textContent.substring(1))),d.textContent==="undefined"&&(d.textContent=""),h=l.getBBox()}return s.attr("transform","translate(0,"+(-h.height/(2*c)+r)+")"),h.height}p(br,"addText");async function cu(e,t){var D,A;const r=ht(),{themeVariables:i}=r,{useGradient:s}=i,a=r.class.padding??12,o=a,n=t.useHtmlLabels??xe(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:h,bbox:c}=await hu(e,t,r,n,o),{labelStyles:d,nodeStyles:g}=j(t);t.labelStyle=d,t.cssStyles=l.styles||"";const u=((D=l.styles)==null?void 0:D.join(";"))||g||"";t.cssStyles||(t.cssStyles=u.replaceAll("!important","").split(";"));const y=l.members.length===0&&l.methods.length===0&&!((A=r.class)!=null&&A.hideEmptyMembersBox),f=Y.svg(h),m=U(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=Math.max(t.width??0,c.width);let b=Math.max(t.height??0,c.height);const k=(t.height??0)>c.height;l.members.length===0&&l.methods.length===0?b+=o:l.members.length>0&&l.methods.length===0&&(b+=o*2);const T=-C/2,w=-b/2;let B=y?a*2:l.members.length===0&&l.methods.length===0?-a:0;k&&(B=a*2);const M=f.rectangle(T-a,w-a-(y?a:l.members.length===0&&l.methods.length===0?-a/2:0),C+2*a,b+2*a+B,m),L=h.insert(()=>M,":first-child");L.attr("class","basic label-container outer-path");const W=L.node().getBBox(),P=h.select(".annotation-group").node().getBBox().height-(y?a/2:0)||0,$=h.select(".label-group").node().getBBox().height-(y?a/2:0)||0,N=h.select(".members-group").node().getBBox().height-(y?a/2:0)||0,z=(P+$+w+a-(w-a-(y?a:l.members.length===0&&l.methods.length===0?-a/2:0)))/2;if(h.selectAll(".text").each((F,E,_)=>{var nt,dt;const S=it(_[E]),R=S.attr("transform");let et=0;if(R){const $t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(R);$t&&(et=parseFloat($t[2]))}let st=et+w+a-(y?a:l.members.length===0&&l.methods.length===0?-a/2:0);if(S.attr("class").includes("methods-group")){const xt=Math.max(N,o/2);k?st=Math.max(z,P+$+xt+w+o*2+a)+o*2:st=P+$+xt+w+o*4+a}l.members.length===0&&l.methods.length===0&&((nt=r.class)!=null&&nt.hideEmptyMembersBox)&&(l.annotations.length>0?st=et-o:st=et),n||(st-=4);let lt=T;(S.attr("class").includes("label-group")||S.attr("class").includes("annotation-group"))&&(lt=-((dt=S.node())==null?void 0:dt.getBBox().width)/2||0,h.selectAll("text").each(function(xt,$t,ee){window.getComputedStyle(ee[$t]).textAnchor==="middle"&&(lt=0)})),S.attr("transform",`translate(${lt}, ${st})`)}),l.members.length>0||l.methods.length>0||y){const F=P+$+w+a,E=f.line(W.x,F,W.x+W.width,F+.001,m);h.insert(()=>E).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",u)}if(y||l.members.length>0||l.methods.length>0){const F=P+$+N+w+o*2+a,E=f.line(W.x,k?Math.max(z,F):F,W.x+W.width,(k?Math.max(z,F):F)+.001,m);h.insert(()=>E).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",u)}if(l.look!=="handDrawn"&&h.selectAll("path").attr("style",u),L.select(":nth-child(2)").attr("style",u),h.selectAll(".divider").select("path").attr("style",u),t.labelStyle?h.selectAll("span").attr("style",t.labelStyle):h.selectAll("span").attr("style",u),!n){const F=RegExp(/color\s*:\s*([^;]*)/),E=F.exec(u);if(E){const _=E[0].replace("color","fill");h.selectAll("tspan").attr("style",_)}else if(d){const _=F.exec(d);if(_){const S=_[0].replace("color","fill");h.selectAll("tspan").attr("style",S)}}}return X(t,L),t.intersect=function(F){return H.rect(t,F)},h}p(cu,"classBox");async function du(e,t){var W,P;const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const s=t,a=t,o=20,n=20,l="verifyMethod"in t,h=Z(t),{themeVariables:c}=ht(),{borderColorArray:d,requirementEdgeLabelBackground:g}=c,u=e.insert("g").attr("class",h).attr("id",t.domId??t.id);let y;l?y=await se(u,`<<${s.type}>>`,0,t.labelStyle):y=await se(u,"<<Element>>",0,t.labelStyle);let f=y;const m=await se(u,s.name,f,t.labelStyle+"; font-weight: bold;");if(f+=m+n,l){const $=await se(u,`${s.requirementId?`ID: ${s.requirementId}`:""}`,f,t.labelStyle);f+=$;const N=await se(u,`${s.text?`Text: ${s.text}`:""}`,f,t.labelStyle);f+=N;const z=await se(u,`${s.risk?`Risk: ${s.risk}`:""}`,f,t.labelStyle);f+=z,await se(u,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,f,t.labelStyle)}else{const $=await se(u,`${a.type?`Type: ${a.type}`:""}`,f,t.labelStyle);f+=$,await se(u,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,f,t.labelStyle)}const C=(((W=u.node())==null?void 0:W.getBBox().width)??200)+o,b=(((P=u.node())==null?void 0:P.getBBox().height)??200)+o,k=-C/2,T=-b/2,w=Y.svg(u),B=U(t,{});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const M=w.rectangle(k,T,C,b,B),L=u.insert(()=>M,":first-child");if(L.attr("class","basic label-container outer-path").attr("style",i),d!=null&&d.length){const $=t.colorIndex??0;u.attr("data-color-id",`color-${$%d.length}`)}if(u.selectAll(".label").each(($,N,z)=>{const D=it(z[N]),A=D.attr("transform");let F=0,E=0;if(A){const et=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(A);et&&(F=parseFloat(et[1]),E=parseFloat(et[2]))}const _=E-b/2;let S=k+o/2;(N===0||N===1)&&(S=F),D.attr("transform",`translate(${S}, ${_+o})`)}),f>y+m+n){const $=T+y+m+n;let N;if(t.look==="neo"){const A=[[k,$],[k+C,$],[k+C,$+.001],[k,$+.001]];N=w.polygon(A,B)}else N=w.line(k,$,k+C,$,B);u.insert(()=>N).attr("class","divider")}return X(t,L),t.intersect=function($){return H.rect(t,$)},i&&t.look!=="handDrawn"&&(g||d!=null&&d.length)&&u.selectAll("path").attr("style",i),u}p(du,"requirementBox");async function se(e,t,r,i=""){if(t==="")return 0;const s=e.insert("g").attr("class","label").attr("style",i),a=ht(),o=a.htmlLabels??!0,n=await be(s,Ta(ze(t)),{width:Ce(t,a)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},a);let l;if(o){const h=n.children[0],c=it(n);l=h.getBoundingClientRect(),c.attr("width",l.width),c.attr("height",l.height)}else{const h=n.children[0];for(const c of h.children)i&&c.setAttribute("style",i);l=n.getBBox(),l.height+=6}return s.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}p(se,"addText");var uk=p(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function uu(e,t,{config:r}){var N,z;const{labelStyles:i,nodeStyles:s}=j(t);t.labelStyle=i||"";const a=10,o=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:l,label:h}=await K(e,t,Z(t)),c=t.padding||10;let d="",g;"ticket"in t&&t.ticket&&((N=r==null?void 0:r.kanban)!=null&&N.ticketBaseUrl)&&(d=(z=r==null?void 0:r.kanban)==null?void 0:z.ticketBaseUrl.replace("#TICKET#",t.ticket),g=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",d).attr("target","_blank"));const u={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let y,f;g?{label:y,bbox:f}=await Ss(g,"ticket"in t&&t.ticket||"",u):{label:y,bbox:f}=await Ss(n,"ticket"in t&&t.ticket||"",u);const{label:m,bbox:C}=await Ss(n,"assigned"in t&&t.assigned||"",u);t.width=o;const b=10,k=(t==null?void 0:t.width)||0,T=Math.max(f.height,C.height)/2,w=Math.max(l.height+b*2,(t==null?void 0:t.height)||0)+T,B=-k/2,M=-w/2;h.attr("transform","translate("+(c-k/2)+", "+(-T-l.height/2)+")"),y.attr("transform","translate("+(c-k/2)+", "+(-T+l.height/2)+")"),m.attr("transform","translate("+(c+k/2-C.width-2*a)+", "+(-T+l.height/2)+")");let L;const{rx:W,ry:P}=t,{cssStyles:$}=t;if(t.look==="handDrawn"){const D=Y.svg(n),A=U(t,{}),F=W||P?D.path(Me(B,M,k,w,W||0),A):D.rectangle(B,M,k,w,A);L=n.insert(()=>F,":first-child"),L.attr("class","basic label-container").attr("style",$||null)}else{L=n.insert("rect",":first-child"),L.attr("class","basic label-container __APA__").attr("style",s).attr("rx",W??5).attr("ry",P??5).attr("x",B).attr("y",M).attr("width",k).attr("height",w);const D="priority"in t&&t.priority;if(D){const A=n.append("line"),F=B+2,E=M+Math.floor((W??0)/2),_=M+w-Math.floor((W??0)/2);A.attr("x1",F).attr("y1",E).attr("x2",F).attr("y2",_).attr("stroke-width","4").attr("stroke",uk(D))}}return X(t,L),t.height=w,t.intersect=function(D){return H.rect(t,D)},n}p(uu,"kanbanItem");async function gu(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await K(e,t,Z(t)),l=a.width+10*o,h=a.height+8*o,c=.15*l,{cssStyles:d}=t,g=a.width+20,u=a.height+20,y=Math.max(l,g),f=Math.max(h,u);n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let m;const C=`M0 0
|
|
237
|
-
a${c},${c} 1 0,0 ${y*.25},${-1*f*.1}
|
|
238
|
-
a${c},${c} 1 0,0 ${y*.25},0
|
|
239
|
-
a${c},${c} 1 0,0 ${y*.25},0
|
|
240
|
-
a${c},${c} 1 0,0 ${y*.25},${f*.1}
|
|
241
|
-
|
|
242
|
-
a${c},${c} 1 0,0 ${y*.15},${f*.33}
|
|
243
|
-
a${c*.8},${c*.8} 1 0,0 0,${f*.34}
|
|
244
|
-
a${c},${c} 1 0,0 ${-1*y*.15},${f*.33}
|
|
245
|
-
|
|
246
|
-
a${c},${c} 1 0,0 ${-1*y*.25},${f*.15}
|
|
247
|
-
a${c},${c} 1 0,0 ${-1*y*.25},0
|
|
248
|
-
a${c},${c} 1 0,0 ${-1*y*.25},0
|
|
249
|
-
a${c},${c} 1 0,0 ${-1*y*.25},${-1*f*.15}
|
|
250
|
-
|
|
251
|
-
a${c},${c} 1 0,0 ${-1*y*.1},${-1*f*.33}
|
|
252
|
-
a${c*.8},${c*.8} 1 0,0 0,${-1*f*.34}
|
|
253
|
-
a${c},${c} 1 0,0 ${y*.1},${-1*f*.33}
|
|
254
|
-
H0 V0 Z`;if(t.look==="handDrawn"){const b=Y.svg(s),k=U(t,{}),T=b.path(C,k);m=s.insert(()=>T,":first-child"),m.attr("class","basic label-container").attr("style",Bt(d))}else m=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",C);return m.attr("transform",`translate(${-y/2}, ${-f/2})`),X(t,m),t.calcIntersect=function(b,k){return H.rect(b,k)},t.intersect=function(b){return q.info("Bang intersect",t,b),H.rect(t,b)},s}p(gu,"bang");async function pu(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await K(e,t,Z(t)),l=a.width+2*o,h=a.height+2*o,c=.15*l,d=.25*l,g=.35*l,u=.2*l,{cssStyles:y}=t;let f;const m=`M0 0
|
|
255
|
-
a${c},${c} 0 0,1 ${l*.25},${-1*l*.1}
|
|
256
|
-
a${g},${g} 1 0,1 ${l*.4},${-1*l*.1}
|
|
257
|
-
a${d},${d} 1 0,1 ${l*.35},${l*.2}
|
|
258
|
-
|
|
259
|
-
a${c},${c} 1 0,1 ${l*.15},${h*.35}
|
|
260
|
-
a${u},${u} 1 0,1 ${-1*l*.15},${h*.65}
|
|
261
|
-
|
|
262
|
-
a${d},${c} 1 0,1 ${-1*l*.25},${l*.15}
|
|
263
|
-
a${g},${g} 1 0,1 ${-1*l*.5},0
|
|
264
|
-
a${c},${c} 1 0,1 ${-1*l*.25},${-1*l*.15}
|
|
265
|
-
|
|
266
|
-
a${c},${c} 1 0,1 ${-1*l*.1},${-1*h*.35}
|
|
267
|
-
a${u},${u} 1 0,1 ${l*.1},${-1*h*.65}
|
|
268
|
-
H0 V0 Z`;if(t.look==="handDrawn"){const C=Y.svg(s),b=U(t,{}),k=C.path(m,b);f=s.insert(()=>k,":first-child"),f.attr("class","basic label-container").attr("style",Bt(y))}else f=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",m);return n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),f.attr("transform",`translate(${-l/2}, ${-h/2})`),X(t,f),t.calcIntersect=function(C,b){return H.rect(C,b)},t.intersect=function(C){return q.info("Cloud intersect",t,C),H.rect(t,C)},s}p(pu,"cloud");async function fu(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await K(e,t,Z(t)),l=a.width+8*o,h=a.height+2*o,c=5,d=t.look==="neo"?`
|
|
269
|
-
M${-l/2} ${h/2-c}
|
|
270
|
-
v${-h+2*c}
|
|
271
|
-
q0,-${c} ${c},-${c}
|
|
272
|
-
h${l-2*c}
|
|
273
|
-
q${c},0 ${c},${c}
|
|
274
|
-
v${h-c}
|
|
275
|
-
H${-l/2}
|
|
276
|
-
Z
|
|
277
|
-
`:`
|
|
278
|
-
M${-l/2} ${h/2-c}
|
|
279
|
-
v${-h+2*c}
|
|
280
|
-
q0,-${c} ${c},-${c}
|
|
281
|
-
h${l-2*c}
|
|
282
|
-
q${c},0 ${c},${c}
|
|
283
|
-
v${h-2*c}
|
|
284
|
-
q0,${c} ${-c},${c}
|
|
285
|
-
h${-(l-2*c)}
|
|
286
|
-
q${-c},0 ${-c},${-c}
|
|
287
|
-
Z
|
|
288
|
-
`;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const g=s.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",d);return s.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",h/2).attr("x2",l/2).attr("y2",h/2),n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),s.append(()=>n.node()),X(t,g),t.calcIntersect=function(u,y){return H.rect(u,y)},t.intersect=function(u){return H.rect(t,u)},s}p(fu,"defaultMindmapNode");async function mu(e,t){const r={padding:t.padding??0};return oo(e,t,r)}p(mu,"mindmapCircle");var gk=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Xd},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Yd},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Gd},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Kd},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:md},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:yd},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:oo},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:gu},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:pu},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:zd},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Td},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Od},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:$d},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:iu},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:Md},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:xd},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:eu},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:ld},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Ud},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Qd},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Zd},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Sd},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Bd},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:ud},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:gd},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:pd},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Id},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:ou},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:wd},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:ru},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Dd},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:fd},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Cd},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:au},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:lu},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:bd},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:su},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:kd},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:jd},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:qd},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Rd},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:nd},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:dd},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:tu},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Jd},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:nu},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Nd},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Pd}],pk=p(()=>{const t=[...Object.entries({state:Vd,choice:hd,note:Wd,rectWithTitle:Hd,labelRect:Ed,iconSquare:_d,iconCircle:Ld,icon:vd,iconRounded:Fd,imageSquare:Ad,anchor:ad,kanbanItem:uu,mindmapCircle:mu,defaultMindmapNode:fu,classBox:cu,erBox:no,requirementBox:du}),...gk.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(s=>[s,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),yu=pk();function fk(e){return e in yu}p(fk,"isValidShape");var hs=new Map;async function Cu(e,t,r){let i,s;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const a=t.shape?yu[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;r.config.securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),s=await a(i,t,r)}else s=await a(e,t,r),i=s;return i.attr("data-look",Bt(t.look)),t.tooltip&&s.attr("title",t.tooltip),hs.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}p(Cu,"insertNode");var Ow=p((e,t)=>{hs.set(t.id,e)},"setNodeElem"),Iw=p(()=>{hs.clear()},"clear"),Dw=p(e=>{const t=hs.get(e.id);q.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode"),mk=p((e,t,r,i,s,a=!1,o)=>{t.arrowTypeStart&&un(e,"start",t.arrowTypeStart,r,i,s,a,o),t.arrowTypeEnd&&un(e,"end",t.arrowTypeEnd,r,i,s,a,o)},"addEdgeMarkers"),yk={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},Ck=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],un=p((e,t,r,i,s,a,o=!1,n)=>{var y;const l=yk[r],h=l&&Ck.includes(l.type);if(!l){q.warn(`Unknown arrow type: ${r}`);return}const c=l.type,u=`${s}_${a}-${c}${t==="start"?"Start":"End"}${o&&h?"-margin":""}`;if(n&&n.trim()!==""){const f=n.replace(/[^\dA-Za-z]/g,"_"),m=`${u}_${f}`;if(!document.getElementById(m)){const C=document.getElementById(u);if(C){const b=C.cloneNode(!0);b.id=m,b.querySelectorAll("path, circle, line").forEach(T=>{T.setAttribute("stroke",n),l.fill&&T.setAttribute("fill",n)}),(y=C.parentNode)==null||y.appendChild(b)}}e.attr(`marker-${t}`,`url(${i}#${m})`)}else e.attr(`marker-${t}`,`url(${i}#${u})`)},"addEdgeMarker"),xk=p(e=>{var t,r;return typeof e=="string"?e:(r=(t=ht())==null?void 0:t.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),Vi=new Map,Lt=new Map,Pw=p(()=>{Vi.clear(),Lt.clear()},"clear"),mr=p(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),bk=p(async(e,t)=>{const r=ht();let i=Pt(r);const{labelStyles:s}=j(t);t.labelStyle=s;const a=e.insert("g").attr("class","edgeLabel"),o=a.insert("g").attr("class","label").attr("data-id",t.id),n=t.labelType==="markdown",l=void 0,h=await be(e,t.label,{style:mr(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:n?l:void 0},r);o.node().appendChild(h),q.info("abc82",t,t.labelType);let c=h.getBBox(),d=c;if(i){const u=h.children[0],y=it(h);c=u.getBoundingClientRect(),d=c,y.attr("width",c.width),y.attr("height",c.height)}else{const u=it(h).select("text").node();u&&typeof u.getBBox=="function"&&(d=u.getBBox())}o.attr("transform",dr(d,i)),Vi.set(t.id,a),t.width=c.width,t.height=c.height;let g;if(t.startLabelLeft){const u=e.insert("g").attr("class","edgeTerminals"),y=u.insert("g").attr("class","inner"),f=await Te(y,t.startLabelLeft,mr(t.labelStyle)||"",!1,!1);g=f;let m=f.getBBox();if(i){const C=f.children[0],b=it(f);m=C.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}y.attr("transform",dr(m,i)),Lt.get(t.id)||Lt.set(t.id,{}),Lt.get(t.id).startLeft=u,kr(g,t.startLabelLeft)}if(t.startLabelRight){const u=e.insert("g").attr("class","edgeTerminals"),y=u.insert("g").attr("class","inner"),f=await Te(y,t.startLabelRight,mr(t.labelStyle)||"",!1,!1);g=f;let m=f.getBBox();if(i){const C=f.children[0],b=it(f);m=C.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}y.attr("transform",dr(m,i)),Lt.get(t.id)||Lt.set(t.id,{}),Lt.get(t.id).startRight=u,kr(g,t.startLabelRight)}if(t.endLabelLeft){const u=e.insert("g").attr("class","edgeTerminals"),y=u.insert("g").attr("class","inner"),f=await Te(u,t.endLabelLeft,mr(t.labelStyle)||"",!1,!1);g=f;let m=f.getBBox();if(i){const C=f.children[0],b=it(f);m=C.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}y.attr("transform",dr(m,i)),Lt.get(t.id)||Lt.set(t.id,{}),Lt.get(t.id).endLeft=u,kr(g,t.endLabelLeft)}if(t.endLabelRight){const u=e.insert("g").attr("class","edgeTerminals"),y=u.insert("g").attr("class","inner"),f=await Te(u,t.endLabelRight,mr(t.labelStyle)||"",!1,!1);g=f;let m=f.getBBox();if(i){const C=f.children[0],b=it(f);m=C.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}y.attr("transform",dr(m,i)),Lt.get(t.id)||Lt.set(t.id,{}),Lt.get(t.id).endRight=u,kr(g,t.endLabelRight)}return h},"insertEdgeLabel");function kr(e,t){Pt(ht())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}p(kr,"setTerminalWidth");var kk=p((e,t)=>{q.debug("Moving label abc88 ",e.id,e.label,Vi.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=ht(),{subGraphTitleTotalMargin:s}=Xa(i);if(e.label){const a=Vi.get(e.id);let o=e.x,n=e.y;if(r){const l=Vt.calcLabelPosition(r);q.debug("Moving label "+e.label+" from (",o,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(o=l.x,n=l.y)}a.attr("transform",`translate(${o}, ${n+s/2})`)}if(e.startLabelLeft){const a=Lt.get(e.id).startLeft;let o=e.x,n=e.y;if(r){const l=Vt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.startLabelRight){const a=Lt.get(e.id).startRight;let o=e.x,n=e.y;if(r){const l=Vt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelLeft){const a=Lt.get(e.id).endLeft;let o=e.x,n=e.y;if(r){const l=Vt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelRight){const a=Lt.get(e.id).endRight;let o=e.x,n=e.y;if(r){const l=Vt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}},"positionEdgeLabel"),Sk=p((e,t)=>{const r=e.x,i=e.y,s=Math.abs(t.x-r),a=Math.abs(t.y-i),o=e.width/2,n=e.height/2;return s>=o||a>=n},"outsideNode"),wk=p((e,t,r)=>{q.debug(`intersection calc abc89:
|
|
289
|
-
outsidePoint: ${JSON.stringify(t)}
|
|
290
|
-
insidePoint : ${JSON.stringify(r)}
|
|
291
|
-
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,s=e.y,a=Math.abs(i-r.x),o=e.width/2;let n=r.x<t.x?o-a:o+a;const l=e.height/2,h=Math.abs(t.y-r.y),c=Math.abs(t.x-r.x);if(Math.abs(s-t.y)*o>Math.abs(i-t.x)*l){let d=r.y<t.y?t.y-l-s:s-l-t.y;n=c*d/h;const g={x:r.x<t.x?r.x+n:r.x-c+n,y:r.y<t.y?r.y+h-d:r.y-h+d};return n===0&&(g.x=t.x,g.y=t.y),c===0&&(g.x=t.x),h===0&&(g.y=t.y),q.debug(`abc89 top/bottom calc, Q ${h}, q ${d}, R ${c}, r ${n}`,g),g}else{r.x<t.x?n=t.x-o-i:n=i-o-t.x;let d=h*n/c,g=r.x<t.x?r.x+c-n:r.x-c+n,u=r.y<t.y?r.y+d:r.y-d;return q.debug(`sides calc abc89, Q ${h}, q ${d}, R ${c}, r ${n}`,{_x:g,_y:u}),n===0&&(g=t.x,u=t.y),c===0&&(g=t.x),h===0&&(u=t.y),{x:g,y:u}}},"intersection"),gn=p((e,t)=>{q.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],s=!1;return e.forEach(a=>{if(q.info("abc88 checking point",a,t),!Sk(t,a)&&!s){const o=wk(t,i,a);q.debug("abc88 inside",a,i,o),q.debug("abc88 intersection",o,t);let n=!1;r.forEach(l=>{n=n||l.x===o.x&&l.y===o.y}),r.some(l=>l.x===o.x&&l.y===o.y)?q.warn("abc88 no intersect",o,r):r.push(o),s=!0}else q.warn("abc88 outside",a,i),i=a,s||r.push(a)}),q.debug("returning points",r),r},"cutPathAtIntersect");function xu(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const s=e[i-1],a=e[i],o=e[i+1];(s.x===a.x&&a.y===o.y&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-s.y)>5||s.y===a.y&&a.x===o.x&&Math.abs(a.x-s.x)>5&&Math.abs(a.y-o.y)>5)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}p(xu,"extractCornerPoints");var pn=p(function(e,t,r){const i=t.x-e.x,s=t.y-e.y,a=Math.sqrt(i*i+s*s),o=r/a;return{x:t.x-o*i,y:t.y-o*s}},"findAdjacentPoint"),Tk=p(function(e){const{cornerPointPositions:t}=xu(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const s=e[i-1],a=e[i+1],o=e[i],n=pn(s,o,5),l=pn(a,o,5),h=l.x-n.x,c=l.y-n.y;r.push(n);const d=Math.sqrt(2)*2;let g={x:o.x,y:o.y};if(Math.abs(a.x-s.x)>10&&Math.abs(a.y-s.y)>=10){q.debug("Corner point fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));const u=5;o.x===n.x?g={x:h<0?n.x-u+d:n.x+u-d,y:c<0?n.y-d:n.y+d}:g={x:h<0?n.x-d:n.x+d,y:c<0?n.y-u+d:n.y+u-d}}else q.debug("Corner point skipping fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));r.push(g,l)}else r.push(e[i]);return r},"fixCorners"),Bk=p((e,t,r)=>{const i=e-t-r,s=2,a=2,o=s+a,n=Math.floor(i/o),l=Array(n).fill(`${s} ${a}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),vk=p(function(e,t,r,i,s,a,o,n=!1){var E;if(!o)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l}=ht();let h=t.points,c=!1;const d=s;var g=a;const u=[];for(const _ in t.cssCompiledStyles)yc(_)||u.push(t.cssCompiledStyles[_]);q.debug("UIO intersect check",t.points,g.x,d.x),g.intersect&&d.intersect&&!n&&(h=h.slice(1,t.points.length-1),h.unshift(d.intersect(h[0])),q.debug("Last point UIO",t.start,"-->",t.end,h[h.length-1],g,g.intersect(h[h.length-1])),h.push(g.intersect(h[h.length-1])));const y=btoa(JSON.stringify(h));t.toCluster&&(q.info("to cluster abc88",r.get(t.toCluster)),h=gn(t.points,r.get(t.toCluster).node),c=!0),t.fromCluster&&(q.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(h,null,2)),h=gn(h.reverse(),r.get(t.fromCluster).node).reverse(),c=!0);let f=h.filter(_=>!Number.isNaN(_.y));const m=xk(t.curve);m!=="rounded"&&(f=Tk(f));let C=gi;switch(m){case"linear":C=gi;break;case"basis":C=vs;break;case"cardinal":C=kn;break;case"bumpX":C=ml;break;case"bumpY":C=yl;break;case"catmullRom":C=Sn;break;case"monotoneX":C=wn;break;case"monotoneY":C=Tn;break;case"natural":C=Bn;break;case"step":C=vn;break;case"stepAfter":C=Ln;break;case"stepBefore":C=Fn;break;case"rounded":C=gi;break;default:C=vs}const{x:b,y:k}=y0(t),T=qg().x(b).y(k).curve(C);let w;switch(t.thickness){case"normal":w="edge-thickness-normal";break;case"thick":w="edge-thickness-thick";break;case"invisible":w="edge-thickness-invisible";break;default:w="edge-thickness-normal"}switch(t.pattern){case"solid":w+=" edge-pattern-solid";break;case"dotted":w+=" edge-pattern-dotted";break;case"dashed":w+=" edge-pattern-dashed";break;default:w+=" edge-pattern-solid"}let B,M=m==="rounded"?bu(ku(f,t),5):T(f);const L=Array.isArray(t.style)?t.style:[t.style];let W=L.find(_=>_==null?void 0:_.startsWith("stroke:")),P="";t.animate&&(P="edge-animation-fast"),t.animation&&(P="edge-animation-"+t.animation);let $=!1;if(t.look==="handDrawn"){const _=Y.svg(e);Object.assign([],f);const S=_.path(M,{roughness:.3,seed:l});w+=" transition",B=it(S).select("path").attr("id",`${o}-${t.id}`).attr("class"," "+w+(t.classes?" "+t.classes:"")+(P?" "+P:"")).attr("style",L?L.reduce((et,st)=>et+";"+st,""):"");let R=B.attr("d");B.attr("d",R),e.node().appendChild(B.node())}else{const _=u.join(";"),S=L?L.reduce((dt,xt)=>dt+xt+";",""):"",R=(_?_+";"+S+";":S)+";"+(L?L.reduce((dt,xt)=>dt+";"+xt,""):"");B=e.append("path").attr("d",M).attr("id",`${o}-${t.id}`).attr("class"," "+w+(t.classes?" "+t.classes:"")+(P?" "+P:"")).attr("style",R),W=(E=R.match(/stroke:([^;]+)/))==null?void 0:E[1],$=t.animate===!0||!!t.animation||_.includes("animation");const et=B.node(),st=typeof et.getTotalLength=="function"?et.getTotalLength():0,lt=Fo[t.arrowTypeStart]||0,nt=Fo[t.arrowTypeEnd]||0;if(t.look==="neo"&&!$){const xt=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?Bk(st,lt,nt):`0 ${lt} ${st-lt-nt} ${nt}`}; stroke-dashoffset: 0;`;B.attr("style",xt+B.attr("style"))}}B.attr("data-edge",!0),B.attr("data-et","edge"),B.attr("data-id",t.id),B.attr("data-points",y),B.attr("data-look",Bt(t.look)),t.showPoints&&f.forEach(_=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",_.x).attr("cy",_.y)});let N="";(ht().flowchart.arrowMarkerAbsolute||ht().state.arrowMarkerAbsolute)&&(N=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,N=N.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),q.info("arrowTypeStart",t.arrowTypeStart),q.info("arrowTypeEnd",t.arrowTypeEnd);const z=!$&&(t==null?void 0:t.look)==="neo";mk(B,t,N,o,i,z,W);const D=Math.floor(h.length/2),A=h[D];Vt.isLabelCoordinateInPath(A,B.attr("d"))||(c=!0);let F={};return c&&(F.updatedPath=h),F.originalPath=t.points,F},"insertEdge");function bu(e,t){if(e.length<2)return"";let r="";const i=e.length,s=1e-5;for(let a=0;a<i;a++){const o=e[a],n=e[a-1],l=e[a+1];if(a===0)r+=`M${o.x},${o.y}`;else if(a===i-1)r+=`L${o.x},${o.y}`;else{const h=o.x-n.x,c=o.y-n.y,d=l.x-o.x,g=l.y-o.y,u=Math.hypot(h,c),y=Math.hypot(d,g);if(u<s||y<s){r+=`L${o.x},${o.y}`;continue}const f=h/u,m=c/u,C=d/y,b=g/y,k=f*C+m*b,T=Math.max(-1,Math.min(1,k)),w=Math.acos(T);if(w<s||Math.abs(Math.PI-w)<s){r+=`L${o.x},${o.y}`;continue}const B=Math.min(t/Math.sin(w/2),u/2,y/2),M=o.x-f*B,L=o.y-m*B,W=o.x+C*B,P=o.y+b*B;r+=`L${M},${L}`,r+=`Q${o.x},${o.y} ${W},${P}`}}return r}p(bu,"generateRoundedPath");function da(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}p(da,"calculateDeltaAndAngle");function ku(e,t){const r=e.map(s=>({...s}));if(e.length>=2&&At[t.arrowTypeStart]){const s=At[t.arrowTypeStart],a=e[0],o=e[1],{angle:n}=da(a,o),l=s*Math.cos(n),h=s*Math.sin(n);r[0].x=a.x+l,r[0].y=a.y+h}const i=e.length;if(i>=2&&At[t.arrowTypeEnd]){const s=At[t.arrowTypeEnd],a=e[i-1],o=e[i-2],{angle:n}=da(o,a),l=s*Math.cos(n),h=s*Math.sin(n);r[i-1].x=a.x-l,r[i-1].y=a.y-h}return r}p(ku,"applyMarkerOffsetsToPoints");var Lk=p((e,t,r,i)=>{t.forEach(s=>{Zk[s](e,r,i)})},"insertMarkers"),Fk=p((e,t,r)=>{q.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("marker").attr("id",r+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),_k=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),Ak=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),Mk=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),Ek=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),$k=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),Ok=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),Ik=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),Dk=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),Pk=p((e,t,r)=>{const i=mt(),{themeVariables:s}=i,{transitionColor:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${a}`)},"barbNeo"),Rk=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),qk=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),s.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),Wk=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),zk=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),s.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),Nk=p((e,t,r)=>{const i=mt(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${a}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${a}`)},"only_one_neo"),Hk=p((e,t,r)=>{const i=mt(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:o}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");n.append("circle").attr("fill",o??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${a}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",o??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),Yk=p((e,t,r)=>{const i=mt(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${a}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${a}`)},"one_or_more_neo"),Uk=p((e,t,r)=>{const i=mt(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:o}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");n.append("circle").attr("fill",o??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${a}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",o??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),jk=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
|
|
292
|
-
L20,10
|
|
293
|
-
M20,10
|
|
294
|
-
L0,20`)},"requirement_arrow"),Xk=p((e,t,r)=>{const i=mt(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${a}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
|
|
295
|
-
L20,10
|
|
296
|
-
M20,10
|
|
297
|
-
L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),Gk=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),Vk=p((e,t,r)=>{const i=mt(),{themeVariables:s}=i,{strokeWidth:a}=s,o=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");o.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),o.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),o.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),o.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),Zk={extension:Fk,composition:_k,aggregation:Ak,dependency:Mk,lollipop:Ek,point:$k,circle:Ok,cross:Ik,barb:Dk,barbNeo:Pk,only_one:Rk,zero_or_one:qk,one_or_more:Wk,zero_or_more:zk,only_one_neo:Nk,zero_or_one_neo:Hk,one_or_more_neo:Yk,zero_or_more_neo:Uk,requirement_arrow:jk,requirement_contains:Gk,requirement_arrow_neo:Xk,requirement_contains_neo:Vk},Qk=Lk,Kk={common:Zr,getConfig:mt,insertCluster:Vb,insertEdge:vk,insertEdgeLabel:bk,insertMarkers:Qk,insertNode:Cu,interpolateToCurve:za,labelHelper:K,log:q,positionEdgeLabel:kk},$r={},Su=p(e=>{for(const t of e)$r[t.name]=t},"registerLayoutLoaders"),Jk=p(()=>{Su([{name:"dagre",loader:p(async()=>await ot(()=>import("./dagre-BM42HDAG-ed748885.js"),["assets/dagre-BM42HDAG-ed748885.js","assets/graph-f3dfaf53.js","assets/layout-3a4eff80.js","assets/index-ffc5af4b.js","assets/index-d674a6a4.css","assets/step-171ad54a.js"]),"loader")},{name:"cose-bilkent",loader:p(async()=>await ot(()=>import("./cose-bilkent-S5V4N54A-45ec2e52.js"),["assets/cose-bilkent-S5V4N54A-45ec2e52.js","assets/cytoscape.esm-1491e259.js","assets/index-ffc5af4b.js","assets/index-d674a6a4.css","assets/step-171ad54a.js"]),"loader")}])},"registerDefaultLayoutLoaders");Jk();var Rw=p(async(e,t)=>{if(!(e.layoutAlgorithm in $r))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const c of e.nodes){const d=c.domId||c.id;c.domId=`${e.diagramId}-${d}`}const r=$r[e.layoutAlgorithm],i=await r.loader(),{theme:s,themeVariables:a}=e.config,{useGradient:o,gradientStart:n,gradientStop:l}=a,h=t.attr("id");if(t.append("defs").append("filter").attr("id",`${h}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s!=null&&s.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${h}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s!=null&&s.includes("dark")?"#FFFFFF":"#000000"}`),o){const c=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");c.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),c.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(e,t,Kk,{algorithm:r.algorithm})},"render"),qw=p((e="",{fallback:t="dagre"}={})=>{if(e in $r)return e;if(t in $r)return q.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),lo="comm",wu="rule",Tu="decl",t1="@media",e1="@import",r1="@supports",i1="@namespace",ua="@keyframes",Bu="@layer",s1="@scope",a1=Math.abs,vr=String.fromCharCode;function vu(e){return e.trim()}function ga(e,t,r){return e.replace(t,r)}function Ke(e,t){return e.charCodeAt(t)|0}function sr(e,t,r){return e.slice(t,r)}function ae(e){return e.length}function Lu(e){return e.length}function di(e,t){return t.push(e),e}var cs=1,ar=1,Fu=0,Ut=0,bt=0,cr="";function ho(e,t,r,i,s,a,o,n){return{value:e,root:t,parent:r,type:i,props:s,children:a,line:cs,column:ar,length:o,return:"",siblings:n}}function o1(){return bt}function n1(){return bt=Ut>0?Ke(cr,--Ut):0,ar--,bt===10&&(ar=1,cs--),bt}function Qt(){return bt=Ut<Fu?Ke(cr,Ut++):0,ar++,bt===10&&(ar=1,cs++),bt}function Be(){return Ke(cr,Ut)}function vi(){return Ut}function ds(e,t){return sr(cr,e,t)}function Or(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function l1(e){return cs=ar=1,Fu=ae(cr=e),Ut=0,[]}function h1(e){return cr="",e}function Ts(e){return vu(ds(Ut-1,pa(e===91?e+2:e===40?e+1:e)))}function c1(e){for(;(bt=Be())&&bt<33;)Qt();return Or(e)>2||Or(bt)>3?"":" "}function d1(e,t){for(;--t&&Qt()&&!(bt<48||bt>102||bt>57&&bt<65||bt>70&&bt<97););return ds(e,vi()+(t<6&&Be()==32&&Qt()==32))}function pa(e){for(;Qt();)switch(bt){case e:return Ut;case 34:case 39:e!==34&&e!==39&&pa(bt);break;case 40:e===41&&pa(e);break;case 92:Qt();break}return Ut}function u1(e,t){for(;Qt()&&e+bt!==47+10;)if(e+bt===42+42&&Be()===47)break;return"/*"+ds(t,Ut-1)+"*"+vr(e===47?e:Qt())}function g1(e){for(;!Or(Be());)Qt();return ds(e,Ut)}function p1(e){return h1(Li("",null,null,null,[""],e=l1(e),0,[0],e))}function Li(e,t,r,i,s,a,o,n,l){for(var h=0,c=0,d=o,g=0,u=0,y=0,f=1,m=1,C=1,b=0,k=0,T="",w=s,B=a,M=i,L=T;m;)switch(y=k,k=Qt()){case 40:y!=108&&Ke(L,d-1)==58?(b++,L+="("):L+=Ts(k);break;case 41:b--,L+=")";break;case 34:case 39:case 91:L+=Ts(k);break;case 9:case 10:case 13:case 32:if(b>0){L+=vr(k);break}L+=c1(y);break;case 92:L+=d1(vi()-1,7);continue;case 47:switch(Be()){case 42:case 47:di(f1(u1(Qt(),vi()),t,r,l),l),(Or(y||1)==5||Or(Be()||1)==5)&&ae(L)&&sr(L,-1,void 0)!==" "&&(L+=" ");break;default:L+="/"}break;case 123*f:n[h++]=ae(L)*C;case 125*f:case 59:case 0:if(b>0&&k){L+=vr(k);break}switch(k){case 0:case 125:m=0;case 59+c:C==-1&&(L=ga(L,/\f/g,"")),u>0&&(ae(L)-d||f===0)&&di(u>32?mn(L+";",i,r,d-1,l):mn(ga(L," ","")+";",i,r,d-2,l),l);break;case 59:L+=";";default:if(di(M=fn(L,t,r,h,c,s,n,T,w=[],B=[],d,a),a),k===123)if(c===0)Li(L,t,M,M,w,a,d,n,B);else{switch(g){case 99:if(Ke(L,3)===110)break;case 108:if(Ke(L,2)===97)break;default:c=0;case 100:case 109:case 115:}c?Li(e,M,M,i&&di(fn(e,M,M,0,0,s,n,T,s,w=[],d,B),B),s,B,d,n,i?w:B):Li(L,M,M,M,[""],B,0,n,B)}}h=c=u=0,f=C=1,T=L="",d=o;break;case 58:d=1+ae(L),u=y;default:if(f<1){if(k==123)--f;else if(k==125&&f++==0&&n1()==125)continue}switch(L+=vr(k),k*f){case 38:C=c>0?1:(L+="\f",-1);break;case 44:if(b>0)break;n[h++]=(ae(L)-1)*C,C=1;break;case 64:Be()===45&&(L+=Ts(Qt())),g=Be(),c=d=ae(T=L+=g1(vi())),k++;break;case 45:y===45&&ae(L)==2&&(f=0)}}return a}function fn(e,t,r,i,s,a,o,n,l,h,c,d){for(var g=s-1,u=s===0?a:[""],y=Lu(u),f=0,m=0,C=0;f<i;++f)for(var b=0,k=sr(e,g+1,g=a1(m=o[f])),T=e;b<y;++b)(T=vu(m>0?u[b]+" "+k:ga(k,/&\f/g,u[b])))&&(l[C++]=T);return ho(e,t,r,s===0?wu:n,l,h,c,d)}function f1(e,t,r,i){return ho(e,t,r,lo,vr(o1()),sr(e,2,-2),0,i)}function mn(e,t,r,i,s){return ho(e,t,r,Tu,sr(e,0,i),sr(e,i+1,-1),i,s)}function fa(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function m1(e,t,r,i){switch(e.type){case Bu:if(e.children.length)break;case e1:case i1:case Tu:return e.return=e.return||e.value;case lo:return"";case ua:return e.return=e.value+"{"+fa(e.children,i)+"}";case wu:if(!ae(e.value=e.props.join(",")))return""}return ae(r=fa(e.children,i))?e.return=e.value+"{"+r+"}":""}function y1(e){var t=Lu(e);return function(r,i,s,a){for(var o="",n=0;n<t;n++)o+=e[n](r,i,s,a)||"";return o}}var _u="c4",C1=p(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),x1=p(async()=>{const{diagram:e}=await ot(()=>import("./c4Diagram-AAUBKEIU-92b023ad.js"),["assets/c4Diagram-AAUBKEIU-92b023ad.js","assets/chunk-ND2GUHAM-1104c326.js","assets/index-ffc5af4b.js","assets/index-d674a6a4.css","assets/step-171ad54a.js"]);return{id:_u,diagram:e}},"loader"),b1={id:_u,detector:C1,loader:x1},k1=b1,Au="flowchart",S1=p((e,t)=>{var r,i;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),w1=p(async()=>{const{diagram:e}=await ot(()=>import("./flowDiagram-I6XJVG4X-c3a4269e.js"),["assets/flowDiagram-I6XJVG4X-c3a4269e.js","assets/chunk-FMBD7UC4-23d48b24.js","assets/chunk-ND2GUHAM-1104c326.js","assets/chunk-55IACEB6-0243aefd.js","assets/chunk-2J33WTMH-fb021fdc.js","assets/index-ffc5af4b.js","assets/index-d674a6a4.css","assets/channel-5ee4a8a7.js","assets/step-171ad54a.js"]);return{id:Au,diagram:e}},"loader"),T1={id:Au,detector:S1,loader:w1},B1=T1,Mu="flowchart-v2",v1=p((e,t)=>{var r,i,s;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&((s=t==null?void 0:t.flowchart)==null?void 0:s.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),L1=p(async()=>{const{diagram:e}=await ot(()=>import("./flowDiagram-I6XJVG4X-c3a4269e.js"),["assets/flowDiagram-I6XJVG4X-c3a4269e.js","assets/chunk-FMBD7UC4-23d48b24.js","assets/chunk-ND2GUHAM-1104c326.js","assets/chunk-55IACEB6-0243aefd.js","assets/chunk-2J33WTMH-fb021fdc.js","assets/index-ffc5af4b.js","assets/index-d674a6a4.css","assets/channel-5ee4a8a7.js","assets/step-171ad54a.js"]);return{id:Mu,diagram:e}},"loader"),F1={id:Mu,detector:v1,loader:L1},_1=F1,Eu="er",A1=p(e=>/^\s*erDiagram/.test(e),"detector"),M1=p(async()=>{const{diagram:e}=await ot(()=>import("./erDiagram-TEJ5UH35-281f5cc7.js"),["assets/erDiagram-TEJ5UH35-281f5cc7.js","assets/chunk-55IACEB6-0243aefd.js","assets/chunk-2J33WTMH-fb021fdc.js","assets/channel-5ee4a8a7.js","assets/index-ffc5af4b.js","assets/index-d674a6a4.css","assets/step-171ad54a.js"]);return{id:Eu,diagram:e}},"loader"),E1={id:Eu,detector:A1,loader:M1},$1=E1,$u="gitGraph",O1=p(e=>/^\s*gitGraph/.test(e),"detector"),I1=p(async()=>{const{diagram:e}=await ot(()=>import("./gitGraphDiagram-PVQCEYII-de184acb.js"),["assets/gitGraphDiagram-PVQCEYII-de184acb.js","assets/chunk-4BX2VUAB-3c93511d.js","assets/chunk-QZHKN3VN-0f554985.js","assets/mermaid-parser.core-52f9cd92.js","assets/index-ffc5af4b.js","assets/index-d674a6a4.css","assets/step-171ad54a.js"]);return{id:$u,diagram:e}},"loader"),D1={id:$u,detector:O1,loader:I1},P1=D1,Ou="gantt",R1=p(e=>/^\s*gantt/.test(e),"detector"),q1=p(async()=>{const{diagram:e}=await ot(()=>import("./ganttDiagram-6RSMTGT7-013b07ec.js"),["assets/ganttDiagram-6RSMTGT7-013b07ec.js","assets/time-043b3464.js","assets/step-171ad54a.js","assets/linear-fed00341.js","assets/init-a5b10ee5.js","assets/defaultLocale-a8476f12.js","assets/index-ffc5af4b.js","assets/index-d674a6a4.css"]);return{id:Ou,diagram:e}},"loader"),W1={id:Ou,detector:R1,loader:q1},z1=W1,Iu="info",N1=p(e=>/^\s*info/.test(e),"detector"),H1=p(async()=>{const{diagram:e}=await ot(()=>import("./infoDiagram-5YYISTIA-196101ee.js"),["assets/infoDiagram-5YYISTIA-196101ee.js","assets/mermaid-parser.core-52f9cd92.js","assets/index-ffc5af4b.js","assets/index-d674a6a4.css","assets/step-171ad54a.js"]);return{id:Iu,diagram:e}},"loader"),Y1={id:Iu,detector:N1,loader:H1},Du="pie",U1=p(e=>/^\s*pie/.test(e),"detector"),j1=p(async()=>{const{diagram:e}=await ot(()=>import("./pieDiagram-4H26LBE5-65b1bcbd.js"),["assets/pieDiagram-4H26LBE5-65b1bcbd.js","assets/chunk-4BX2VUAB-3c93511d.js","assets/mermaid-parser.core-52f9cd92.js","assets/index-ffc5af4b.js","assets/index-d674a6a4.css","assets/arc-4691b008.js","assets/step-171ad54a.js","assets/ordinal-db88ae6f.js","assets/init-a5b10ee5.js"]);return{id:Du,diagram:e}},"loader"),X1={id:Du,detector:U1,loader:j1},Pu="quadrantChart",G1=p(e=>/^\s*quadrantChart/.test(e),"detector"),V1=p(async()=>{const{diagram:e}=await ot(()=>import("./quadrantDiagram-W4KKPZXB-f64a7ed7.js"),["assets/quadrantDiagram-W4KKPZXB-f64a7ed7.js","assets/linear-fed00341.js","assets/step-171ad54a.js","assets/init-a5b10ee5.js","assets/defaultLocale-a8476f12.js","assets/index-ffc5af4b.js","assets/index-d674a6a4.css"]);return{id:Pu,diagram:e}},"loader"),Z1={id:Pu,detector:G1,loader:V1},Q1=Z1,Ru="xychart",K1=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),J1=p(async()=>{const{diagram:e}=await ot(()=>import("./xychartDiagram-2RQKCTM6-450f333c.js"),["assets/xychartDiagram-2RQKCTM6-450f333c.js","assets/init-a5b10ee5.js","assets/ordinal-db88ae6f.js","assets/range-6bc2a9a0.js","assets/linear-fed00341.js","assets/step-171ad54a.js","assets/defaultLocale-a8476f12.js","assets/index-ffc5af4b.js","assets/index-d674a6a4.css"]);return{id:Ru,diagram:e}},"loader"),t2={id:Ru,detector:K1,loader:J1},e2=t2,qu="requirement",r2=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),i2=p(async()=>{const{diagram:e}=await ot(()=>import("./requirementDiagram-4Y6WPE33-90ebf889.js"),["assets/requirementDiagram-4Y6WPE33-90ebf889.js","assets/chunk-55IACEB6-0243aefd.js","assets/chunk-2J33WTMH-fb021fdc.js","assets/index-ffc5af4b.js","assets/index-d674a6a4.css","assets/step-171ad54a.js"]);return{id:qu,diagram:e}},"loader"),s2={id:qu,detector:r2,loader:i2},a2=s2,Wu="sequence",o2=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),n2=p(async()=>{const{diagram:e}=await ot(()=>import("./sequenceDiagram-3UESZ5HK-aece3633.js"),["assets/sequenceDiagram-3UESZ5HK-aece3633.js","assets/chunk-ND2GUHAM-1104c326.js","assets/chunk-QZHKN3VN-0f554985.js","assets/index-ffc5af4b.js","assets/index-d674a6a4.css","assets/step-171ad54a.js"]);return{id:Wu,diagram:e}},"loader"),l2={id:Wu,detector:o2,loader:n2},h2=l2,zu="class",c2=p((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),d2=p(async()=>{const{diagram:e}=await ot(()=>import("./classDiagram-4FO5ZUOK-42ffecb6.js"),["assets/classDiagram-4FO5ZUOK-42ffecb6.js","assets/chunk-727SXJPM-8e0e0228.js","assets/chunk-FMBD7UC4-23d48b24.js","assets/chunk-ND2GUHAM-1104c326.js","assets/chunk-55IACEB6-0243aefd.js","assets/chunk-2J33WTMH-fb021fdc.js","assets/index-ffc5af4b.js","assets/index-d674a6a4.css","assets/step-171ad54a.js"]);return{id:zu,diagram:e}},"loader"),u2={id:zu,detector:c2,loader:d2},g2=u2,Nu="classDiagram",p2=p((e,t)=>{var r;return/^\s*classDiagram/.test(e)&&((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),f2=p(async()=>{const{diagram:e}=await ot(()=>import("./classDiagram-v2-Q7XG4LA2-42ffecb6.js"),["assets/classDiagram-v2-Q7XG4LA2-42ffecb6.js","assets/chunk-727SXJPM-8e0e0228.js","assets/chunk-FMBD7UC4-23d48b24.js","assets/chunk-ND2GUHAM-1104c326.js","assets/chunk-55IACEB6-0243aefd.js","assets/chunk-2J33WTMH-fb021fdc.js","assets/index-ffc5af4b.js","assets/index-d674a6a4.css","assets/step-171ad54a.js"]);return{id:Nu,diagram:e}},"loader"),m2={id:Nu,detector:p2,loader:f2},y2=m2,Hu="state",C2=p((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),x2=p(async()=>{const{diagram:e}=await ot(()=>import("./stateDiagram-AJRCARHV-9bd5b5f4.js"),["assets/stateDiagram-AJRCARHV-9bd5b5f4.js","assets/chunk-AQP2D5EJ-2ccc13c2.js","assets/chunk-55IACEB6-0243aefd.js","assets/chunk-2J33WTMH-fb021fdc.js","assets/graph-f3dfaf53.js","assets/layout-3a4eff80.js","assets/step-171ad54a.js","assets/index-ffc5af4b.js","assets/index-d674a6a4.css"]);return{id:Hu,diagram:e}},"loader"),b2={id:Hu,detector:C2,loader:x2},k2=b2,Yu="stateDiagram",S2=p((e,t)=>{var r;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),w2=p(async()=>{const{diagram:e}=await ot(()=>import("./stateDiagram-v2-BHNVJYJU-7c16c251.js"),["assets/stateDiagram-v2-BHNVJYJU-7c16c251.js","assets/chunk-AQP2D5EJ-2ccc13c2.js","assets/chunk-55IACEB6-0243aefd.js","assets/chunk-2J33WTMH-fb021fdc.js","assets/index-ffc5af4b.js","assets/index-d674a6a4.css","assets/step-171ad54a.js"]);return{id:Yu,diagram:e}},"loader"),T2={id:Yu,detector:S2,loader:w2},B2=T2,Uu="journey",v2=p(e=>/^\s*journey/.test(e),"detector"),L2=p(async()=>{const{diagram:e}=await ot(()=>import("./journeyDiagram-JHISSGLW-dce41bdf.js"),["assets/journeyDiagram-JHISSGLW-dce41bdf.js","assets/chunk-FMBD7UC4-23d48b24.js","assets/chunk-ND2GUHAM-1104c326.js","assets/arc-4691b008.js","assets/step-171ad54a.js","assets/index-ffc5af4b.js","assets/index-d674a6a4.css"]);return{id:Uu,diagram:e}},"loader"),F2={id:Uu,detector:v2,loader:L2},_2=F2,A2=p((e,t,r)=>{q.debug(`rendering svg for syntax error
|
|
298
|
-
`);const i=hC(t),s=i.append("g");i.attr("viewBox","0 0 2412 512"),Qn(i,100,512,!0),s.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),s.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),s.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),s.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),s.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),s.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),s.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),s.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),ju={draw:A2},M2=ju,E2={db:{},renderer:ju,parser:{parse:p(()=>{},"parse")}},$2=E2,Xu="flowchart-elk",O2=p((e,t={})=>{var r;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(t.layout="elk",!0):!1},"detector"),I2=p(async()=>{const{diagram:e}=await ot(()=>import("./flowDiagram-I6XJVG4X-c3a4269e.js"),["assets/flowDiagram-I6XJVG4X-c3a4269e.js","assets/chunk-FMBD7UC4-23d48b24.js","assets/chunk-ND2GUHAM-1104c326.js","assets/chunk-55IACEB6-0243aefd.js","assets/chunk-2J33WTMH-fb021fdc.js","assets/index-ffc5af4b.js","assets/index-d674a6a4.css","assets/channel-5ee4a8a7.js","assets/step-171ad54a.js"]);return{id:Xu,diagram:e}},"loader"),D2={id:Xu,detector:O2,loader:I2},P2=D2,Gu="timeline",R2=p(e=>/^\s*timeline/.test(e),"detector"),q2=p(async()=>{const{diagram:e}=await ot(()=>import("./timeline-definition-PNZ67QCA-b0c81243.js"),["assets/timeline-definition-PNZ67QCA-b0c81243.js","assets/arc-4691b008.js","assets/step-171ad54a.js","assets/index-ffc5af4b.js","assets/index-d674a6a4.css"]);return{id:Gu,diagram:e}},"loader"),W2={id:Gu,detector:R2,loader:q2},z2=W2,Vu="mindmap",N2=p(e=>/^\s*mindmap/.test(e),"detector"),H2=p(async()=>{const{diagram:e}=await ot(()=>import("./mindmap-definition-RKZ34NQL-66fe4544.js"),["assets/mindmap-definition-RKZ34NQL-66fe4544.js","assets/chunk-55IACEB6-0243aefd.js","assets/chunk-2J33WTMH-fb021fdc.js","assets/index-ffc5af4b.js","assets/index-d674a6a4.css","assets/step-171ad54a.js"]);return{id:Vu,diagram:e}},"loader"),Y2={id:Vu,detector:N2,loader:H2},U2=Y2,Zu="kanban",j2=p(e=>/^\s*kanban/.test(e),"detector"),X2=p(async()=>{const{diagram:e}=await ot(()=>import("./kanban-definition-UN3LZRKU-92401a86.js"),["assets/kanban-definition-UN3LZRKU-92401a86.js","assets/chunk-FMBD7UC4-23d48b24.js","assets/index-ffc5af4b.js","assets/index-d674a6a4.css","assets/step-171ad54a.js"]);return{id:Zu,diagram:e}},"loader"),G2={id:Zu,detector:j2,loader:X2},V2=G2,Qu="sankey",Z2=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),Q2=p(async()=>{const{diagram:e}=await ot(()=>import("./sankeyDiagram-5OEKKPKP-2d1a83b3.js"),["assets/sankeyDiagram-5OEKKPKP-2d1a83b3.js","assets/ordinal-db88ae6f.js","assets/init-a5b10ee5.js","assets/colors-98f238a0.js","assets/index-ffc5af4b.js","assets/index-d674a6a4.css","assets/step-171ad54a.js"]);return{id:Qu,diagram:e}},"loader"),K2={id:Qu,detector:Z2,loader:Q2},J2=K2,Ku="packet",tS=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),eS=p(async()=>{const{diagram:e}=await ot(()=>import("./diagram-LMA3HP47-39e66739.js"),["assets/diagram-LMA3HP47-39e66739.js","assets/chunk-4BX2VUAB-3c93511d.js","assets/mermaid-parser.core-52f9cd92.js","assets/index-ffc5af4b.js","assets/index-d674a6a4.css","assets/step-171ad54a.js"]);return{id:Ku,diagram:e}},"loader"),rS={id:Ku,detector:tS,loader:eS},Ju="radar",iS=p(e=>/^\s*radar-beta/.test(e),"detector"),sS=p(async()=>{const{diagram:e}=await ot(()=>import("./diagram-2AECGRRQ-ccc0ddec.js"),["assets/diagram-2AECGRRQ-ccc0ddec.js","assets/chunk-4BX2VUAB-3c93511d.js","assets/mermaid-parser.core-52f9cd92.js","assets/index-ffc5af4b.js","assets/index-d674a6a4.css","assets/step-171ad54a.js"]);return{id:Ju,diagram:e}},"loader"),aS={id:Ju,detector:iS,loader:sS},tg="block",oS=p(e=>/^\s*block(-beta)?/.test(e),"detector"),nS=p(async()=>{const{diagram:e}=await ot(()=>import("./blockDiagram-GPEHLZMM-313fb06c.js"),["assets/blockDiagram-GPEHLZMM-313fb06c.js","assets/chunk-FMBD7UC4-23d48b24.js","assets/graph-f3dfaf53.js","assets/step-171ad54a.js","assets/channel-5ee4a8a7.js","assets/index-ffc5af4b.js","assets/index-d674a6a4.css"]);return{id:tg,diagram:e}},"loader"),lS={id:tg,detector:oS,loader:nS},hS=lS,eg="treeView",cS=p(e=>/^\s*treeView-beta/.test(e),"detector"),dS=p(async()=>{const{diagram:e}=await ot(()=>import("./diagram-5GNKFQAL-342efdea.js"),["assets/diagram-5GNKFQAL-342efdea.js","assets/chunk-4BX2VUAB-3c93511d.js","assets/chunk-QZHKN3VN-0f554985.js","assets/mermaid-parser.core-52f9cd92.js","assets/index-ffc5af4b.js","assets/index-d674a6a4.css","assets/step-171ad54a.js"]);return{id:eg,diagram:e}},"loader"),uS={id:eg,detector:cS,loader:dS},gS=uS,rg="architecture",pS=p(e=>/^\s*architecture/.test(e),"detector"),fS=p(async()=>{const{diagram:e}=await ot(()=>import("./architectureDiagram-3BPJPVTR-1eef4d3c.js"),["assets/architectureDiagram-3BPJPVTR-1eef4d3c.js","assets/chunk-4BX2VUAB-3c93511d.js","assets/mermaid-parser.core-52f9cd92.js","assets/index-ffc5af4b.js","assets/index-d674a6a4.css","assets/cytoscape.esm-1491e259.js","assets/step-171ad54a.js"]);return{id:rg,diagram:e}},"loader"),mS={id:rg,detector:pS,loader:fS},yS=mS,ig="eventmodeling",CS=p(e=>/^\s*eventmodeling/.test(e),"detector"),xS=p(async()=>{const{diagram:e}=await ot(()=>import("./diagram-KO2AKTUF-81f42eeb.js"),["assets/diagram-KO2AKTUF-81f42eeb.js","assets/chunk-4BX2VUAB-3c93511d.js","assets/mermaid-parser.core-52f9cd92.js","assets/index-ffc5af4b.js","assets/index-d674a6a4.css","assets/step-171ad54a.js"]);return{id:ig,diagram:e}},"loader"),bS={id:ig,detector:CS,loader:xS},kS=bS,sg="ishikawa",SS=p(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),wS=p(async()=>{const{diagram:e}=await ot(()=>import("./ishikawaDiagram-YF4QCWOH-50b43d03.js"),["assets/ishikawaDiagram-YF4QCWOH-50b43d03.js","assets/index-ffc5af4b.js","assets/index-d674a6a4.css","assets/step-171ad54a.js"]);return{id:sg,diagram:e}},"loader"),TS={id:sg,detector:SS,loader:wS},ag="venn",BS=p(e=>/^\s*venn-beta/.test(e),"detector"),vS=p(async()=>{const{diagram:e}=await ot(()=>import("./vennDiagram-CIIHVFJN-8eaf0464.js"),["assets/vennDiagram-CIIHVFJN-8eaf0464.js","assets/index-ffc5af4b.js","assets/index-d674a6a4.css","assets/step-171ad54a.js"]);return{id:ag,diagram:e}},"loader"),LS={id:ag,detector:BS,loader:vS},FS=LS,og="treemap",_S=p(e=>/^\s*treemap/.test(e),"detector"),AS=p(async()=>{const{diagram:e}=await ot(()=>import("./diagram-OG6HWLK6-b3e61903.js"),["assets/diagram-OG6HWLK6-b3e61903.js","assets/chunk-2J33WTMH-fb021fdc.js","assets/chunk-4BX2VUAB-3c93511d.js","assets/mermaid-parser.core-52f9cd92.js","assets/index-ffc5af4b.js","assets/index-d674a6a4.css","assets/defaultLocale-a8476f12.js","assets/ordinal-db88ae6f.js","assets/init-a5b10ee5.js","assets/index-a1656aec.js","assets/step-171ad54a.js"]);return{id:og,diagram:e}},"loader"),MS={id:og,detector:_S,loader:AS},ng="wardley-beta",ES=p(e=>/^\s*wardley-beta/i.test(e),"detector"),$S=p(async()=>{const{diagram:e}=await ot(()=>import("./wardleyDiagram-YWT4CUSO-8d4d7626.js"),["assets/wardleyDiagram-YWT4CUSO-8d4d7626.js","assets/chunk-4BX2VUAB-3c93511d.js","assets/mermaid-parser.core-52f9cd92.js","assets/index-ffc5af4b.js","assets/index-d674a6a4.css","assets/step-171ad54a.js"]);return{id:ng,diagram:e}},"loader"),OS={id:ng,detector:ES,loader:$S},IS=OS,yn=!1,us=p(()=>{yn||(yn=!0,Ei("error",$2,e=>e.toLowerCase().trim()==="error"),Ei("---",{db:{clear:p(()=>{},"clear")},styles:{},renderer:{draw:p(()=>{},"draw")},parser:{parse:p(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:p(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Ls(P2,U2,yS),Ls(k1,V2,y2,g2,$1,z1,Y1,X1,a2,h2,_1,B1,z2,P1,B2,k2,_2,Q1,J2,rS,e2,hS,kS,gS,aS,TS,MS,FS,IS))},"addDiagrams"),DS=p(async()=>{q.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Re).map(async([r,{detector:i,loader:s}])=>{if(s)try{Es(r)}catch{try{const{diagram:a,id:o}=await s();Ei(o,a,i)}catch(a){throw q.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Re[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){q.error(`Failed to load ${t.length} external diagrams`);for(const r of t)q.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),PS="graphics-document document";function lg(e,t){e.attr("role",PS),t!==""&&e.attr("aria-roledescription",t)}p(lg,"setA11yDiagramInfo");function hg(e,t,r,i){if(e.insert!==void 0){if(r){const s=`chart-desc-${i}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(r)}if(t){const s=`chart-title-${i}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(t)}}}p(hg,"addSVGa11yTitleDescription");var or,ma=(or=class{constructor(t,r,i,s,a){this.type=t,this.text=r,this.db=i,this.parser=s,this.renderer=a}static async fromText(t,r={}){var h,c;const i=mt(),s=xa(t,i);t=fx(t)+`
|
|
299
|
-
`;try{Es(s)}catch{const d=Cp(s);if(!d)throw new Dn(`Diagram ${s} not found.`);const{id:g,diagram:u}=await d();Ei(g,u)}const{db:a,parser:o,renderer:n,init:l}=Es(s);return o.parser&&(o.parser.yy=a),(h=a.clear)==null||h.call(a),l==null||l(i),r.title&&((c=a.setDiagramTitle)==null||c.call(a,r.title)),await o.parse(t),new or(s,t,a,o,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},p(or,"Diagram"),or),Cn=[],RS=p(()=>{Cn.forEach(e=>{e()}),Cn=[]},"attachFunctions"),qS=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function cg(e){const t=e.match(In);if(!t)return{text:e,metadata:{}};let r=m0(t[1],{schema:f0})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(t[0].length),metadata:i}}p(cg,"extractFrontMatter");var WS=p(e=>e.replace(/\r\n?/g,`
|
|
300
|
-
`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),zS=p(e=>{const{text:t,metadata:r}=cg(e),{displayMode:i,title:s,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:s,config:a,text:t}},"processFrontmatter"),NS=p(e=>{const t=Vt.detectInit(e)??{},r=Vt.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):(r==null?void 0:r.type)==="wrap"&&(t.wrap=!0),{text:rx(e),directive:t}},"processDirectives");function co(e){const t=WS(e),r=zS(t),i=NS(r.text),s=ja(r.config,i.directive);return e=qS(i.text),{code:e,title:r.title,config:s}}p(co,"preprocessDiagram");function dg(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}p(dg,"toBase64");var HS=5e4,YS="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",US="sandbox",jS="loose",XS="http://www.w3.org/2000/svg",GS="http://www.w3.org/1999/xlink",VS="http://www.w3.org/1999/xhtml",ZS="100%",QS="100%",KS="border:0;margin:0;",JS="margin:0",tw="allow-top-navigation-by-user-activation allow-popups",ew='The "iframe" tag is not supported by your browser.',rw=["foreignobject"],iw=["dominant-baseline"];function uo(e){const t=co(e);return Ai(),Up(t.config??{}),t}p(uo,"processAndSetConfigs");async function ug(e,t){us();try{const{code:r,config:i}=uo(e);return{diagramType:(await pg(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}p(ug,"parse");var xn=p((e,t,r=[])=>{const i=zn(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),sw=p((e,t=new Map)=>{const r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){const n=Pt(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{Eo(l.styles)||n.forEach(h=>{r.insertRule(xn(l.id,h,l.styles),r.cssRules.length)}),Eo(l.textStyles)||r.insertRule(xn(l.id,"tspan",((l==null?void 0:l.textStyles)||[]).map(h=>h.replace("color","fill"))),r.cssRules.length)})}let i="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){const s=new CSSStyleSheet;s.replaceSync(e.themeCSS),i=Ms(s)+`
|
|
301
|
-
`}else i+=`${e.themeCSS}
|
|
302
|
-
`;return i+Ms(r)},"createCssStyles"),aw=p((e,t)=>fa(p1(`${e}{${t}}`),y1([p(function(i,s,a,o){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===ua)return;i.props=i.props.map(n=>n.startsWith(e)?n:`${e} ${n}`)}else i.type.startsWith("@")&&([...[t1,r1,Bu,s1,"@container","@starting-style"],ua].includes(i.type)||(q.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=lo))},"addNamespace"),m1])),"compileCSS"),ow=p((e,t,r,i)=>{const s=sw(e,r),a=df(t,s,{...e.themeVariables,theme:e.theme,look:e.look},i);return aw(i,a)},"createUserStyles"),nw=p((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=ze(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),lw=p((e="",t)=>{var s,a;const r=(a=(s=t==null?void 0:t.viewBox)==null?void 0:s.baseVal)!=null&&a.height?t.viewBox.baseVal.height+"px":QS,i=dg(`<body style="${JS}">${e}</body>`);return`<iframe style="width:${ZS};height:${r};${KS}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${tw}">
|
|
303
|
-
${ew}
|
|
304
|
-
</iframe>`},"putIntoIFrame"),bn=p((e,t,r,i,s)=>{const a=e.append("div");a.attr("id",r),i&&a.attr("style",i);const o=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",XS);return s&&o.attr("xmlns:xlink",s),o.append("g"),e},"appendDivSvgG");function ya(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}p(ya,"sandboxedIframe");var hw=p((e,t,r,i)=>{var s,a,o;(s=e.getElementById(t))==null||s.remove(),(a=e.getElementById(r))==null||a.remove(),(o=e.getElementById(i))==null||o.remove()},"removeExistingElements"),cw=p(async function(e,t,r){var N,z,D,A,F,E;us();const i=uo(t);t=i.code;const s=mt();q.debug(s),t.length>((s==null?void 0:s.maxTextSize)??HS)&&(t=YS);const a=`#${e}`,o="i"+e,n="#"+o,l="d"+e,h="#"+l,c=p(()=>{const S=it(g?n:h).node();S&&"remove"in S&&S.remove()},"removeTempElements");let d=it(document.body);const g=s.securityLevel===US,u=s.securityLevel===jS,y=s.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),g){const _=ya(it(r),o);d=it(_.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=it(r);bn(d,e,l,`font-family: ${y}`,GS)}else{if(hw(document,e,l,o),g){const _=ya(it(document.body),o);d=it(_.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=it("body");bn(d,e,l)}let f,m;try{f=await ma.fromText(t,{title:i.title})}catch(_){if(s.suppressErrorRendering)throw c(),_;f=await ma.fromText("error"),m=_}const C=d.select(h).node(),b=f.type,k=C.firstChild,T=k.firstChild,w=(z=(N=f.renderer).getClasses)==null?void 0:z.call(N,t,f),B=ow(s,b,w,a),M=document.createElement("style");M.innerHTML=B,k.insertBefore(M,T);try{await f.renderer.draw(t,e,"11.15.0",f)}catch(_){throw s.suppressErrorRendering?c():M2.draw(t,e,"11.15.0"),_}const L=d.select(`${h} svg`),W=(A=(D=f.db).getAccTitle)==null?void 0:A.call(D),P=(E=(F=f.db).getAccDescription)==null?void 0:E.call(F);fg(b,L,W,P),d.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",VS);let $=d.select(h).node().innerHTML;if(q.debug("config.arrowMarkerAbsolute",s.arrowMarkerAbsolute),$=nw($,g,xe(s.arrowMarkerAbsolute)),g){const _=d.select(h+" svg").node();$=lw($,_)}else u||($=Je.sanitize($,{ADD_TAGS:rw,ADD_ATTR:iw,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(RS(),m)throw m;return c(),{diagramType:b,svg:$,bindFunctions:f.db.bindFunctions}},"render");function gg(e={}){var i;const t=kt({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),Hp(t),t!=null&&t.theme&&t.theme in fe?t.themeVariables=fe[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=fe.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?Np(t):Nn();Ca(r.logLevel),us()}p(gg,"initialize");var pg=p((e,t={})=>{const{code:r}=co(e);return ma.fromText(r,t)},"getDiagramFromText");function fg(e,t,r,i){lg(t,e),hg(t,r,i,t.attr("id"))}p(fg,"addA11yInfo");var He=Object.freeze({render:cw,parse:ug,getDiagramFromText:pg,initialize:gg,getConfig:mt,setConfig:Hn,getSiteConfig:Nn,updateSiteConfig:Yp,reset:p(()=>{Ai()},"reset"),globalReset:p(()=>{Ai(tr)},"globalReset"),defaultConfig:tr});Ca(mt().logLevel);Ai(mt());var dw=p((e,t,r)=>{q.warn(e),Ua(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),mg=p(async function(e={querySelector:".mermaid"}){try{await uw(e)}catch(t){if(Ua(t)&&q.error(t.str),Nt.parseError&&Nt.parseError(t),!e.suppressErrors)throw q.error("Use the suppressErrors option to suppress these errors"),t}},"run"),uw=p(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=He.getConfig();q.debug(`${e?"":"No "}Callback function found`);let s;if(r)s=r;else if(t)s=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");q.debug(`Found ${s.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(q.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),He.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const a=new Vt.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const n=[];for(const l of Array.from(s)){if(q.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const h=`mermaid-${a.next()}`;o=l.innerHTML,o=Ac(Vt.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const c=Vt.detectInit(o);c&&q.debug("Detected early reinit: ",c);try{const{svg:d,bindFunctions:g}=await bg(h,o,l);l.innerHTML=d,e&&await e(h),g&&g(l)}catch(d){dw(d,n,Nt.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),yg=p(function(e){He.initialize(e)},"initialize"),gw=p(async function(e,t,r){q.warn("mermaid.init is deprecated. Please use run instead."),e&&yg(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await mg(i)},"init"),pw=p(async(e,{lazyLoad:t=!0}={})=>{us(),Ls(...e),t===!1&&await DS()},"registerExternalDiagrams"),Cg=p(function(){if(Nt.startOnLoad){const{startOnLoad:e}=He.getConfig();e&&Nt.run().catch(t=>q.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",Cg,!1);var fw=p(function(e){Nt.parseError=e},"setParseErrorHandler"),Zi=[],Bs=!1,xg=p(async()=>{if(!Bs){for(Bs=!0;Zi.length>0;){const e=Zi.shift();if(e)try{await e()}catch(t){q.error("Error executing queue",t)}}Bs=!1}},"executeQueue"),mw=p(async(e,t)=>new Promise((r,i)=>{const s=p(()=>new Promise((a,o)=>{He.parse(e,t).then(n=>{a(n),r(n)},n=>{var l;q.error("Error parsing",n),(l=Nt.parseError)==null||l.call(Nt,n),o(n),i(n)})}),"performCall");Zi.push(s),xg().catch(i)}),"parse"),bg=p((e,t,r)=>new Promise((i,s)=>{const a=p(()=>new Promise((o,n)=>{He.render(e,t,r).then(l=>{o(l),i(l)},l=>{var h;q.error("Error parsing",l),(h=Nt.parseError)==null||h.call(Nt,l),n(l),s(l)})}),"performCall");Zi.push(a),xg().catch(s)}),"render"),yw=p(()=>Object.keys(Re).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),Nt={startOnLoad:!0,mermaidAPI:He,parse:mw,render:bg,init:gw,run:mg,registerExternalDiagrams:pw,registerLayoutLoaders:Su,initialize:yg,parseError:void 0,contentLoaded:Cg,setParseErrorHandler:fw,detectType:xa,registerIconPacks:Sb,getRegisteredDiagramsMetadata:yw},Cw=Nt;/*! Check if previously processed *//*!
|
|
305
|
-
* Wait for document loaded before starting the execution
|
|
306
|
-
*/const Ww=Object.freeze(Object.defineProperty({__proto__:null,default:Cw},Symbol.toStringTag,{value:"Module"}));export{Dw as $,ve as A,Yg as B,Wn as C,ja as D,mt as E,nx as F,bf as G,hC as H,Tp as I,f0 as J,Lr as K,Tw as L,Jp as M,Zn as N,is as O,xo as P,ox as Q,Vr as R,Kn as S,lf as T,Jt as U,O as V,I as W,Vb as X,Cu as Y,K0 as Z,p as _,kt as a,tt as a0,oe as a1,Ya as a2,Y as a3,yc as a4,j as a5,Tb as a6,qa as a7,Pa as a8,Si as a9,Xa as aA,y0 as aB,ze as aC,mc as aD,On as aE,Qk as aF,Iw as aG,Pw as aH,$w as aI,X as aJ,Ow as aK,vk as aL,kk as aM,bk as aN,ww as aO,Wg as aP,zg as aQ,kb as aR,Sb as aS,ei as aT,Hg as aU,Ww as aV,D0 as aa,I0 as ab,O0 as ac,$0 as ad,B0 as ae,rc as af,F0 as ag,T0 as ah,M0 as ai,ic as aj,L0 as ak,q0 as al,R0 as am,P0 as an,z0 as ao,W0 as ap,v0 as aq,sc as ar,E0 as as,A0 as at,_0 as au,ac as av,Pt as aw,uc as ax,be as ay,dr as az,mf as b,ff as c,ht as d,Zr as e,pc as f,pf as g,Ce as h,Kt as i,it as j,Qn as k,q as l,C0 as m,yf as n,Cf as o,m0 as p,fk as q,Lw as r,gf as s,uf as t,Vt as u,vw as v,cx as w,Bw as x,qw as y,Rw as z};
|