ryugi-artifacts 1.68.0 → 1.68.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +3 -3
- package/dist/server.cjs +18 -4
- package/dist/viewer/{AgentStatusPill-BnKps9Zr.js → AgentStatusPill-CxFpJS9T.js} +1 -1
- package/dist/viewer/ArtboardLayout-9iOfvOR4.js +12 -0
- package/dist/viewer/{ArtifactList-CCxCNWid.js → ArtifactList-Binw79VZ.js} +1 -1
- package/dist/viewer/{AutoPublishPrompt-BrUfQWmW.js → AutoPublishPrompt-DkGEIW9t.js} +1 -1
- package/dist/viewer/{Avatar-ChKkUO4F.js → Avatar-BhOg2BXZ.js} +1 -1
- package/dist/viewer/{Avatar-CBcHKq6_.js → Avatar-VUQPY4DD.js} +1 -1
- package/dist/viewer/{BottomSheet-ZdnjIGxe.js → BottomSheet-AqG81d_M.js} +1 -1
- package/dist/viewer/{Canvas-CqxEk0B7.js → Canvas-4Utk2C18.js} +1 -1
- package/dist/viewer/{CompositeItem-Dc1pE-Dd.js → CompositeItem-ClMglprA.js} +1 -1
- package/dist/viewer/DocumentLayout-lys_dMmo.js +2 -0
- package/dist/viewer/{DocumentPage-DFTrEydU.js → DocumentPage-mDIgKhlQ.js} +2 -2
- package/dist/viewer/{DropdownMenu-MN8aSs-T.js → DropdownMenu-CZUIT5ss.js} +1 -1
- package/dist/viewer/{HtmlLayout-DhjuMVfU.js → HtmlLayout-89ZuJNxJ.js} +1 -1
- package/dist/viewer/{MenuSubmenuTrigger-6b5C_OEY.js → MenuSubmenuTrigger-B9c8QfBG.js} +1 -1
- package/dist/viewer/{MenuTrigger-C80SSxV1.js → MenuTrigger-yVEYn1Ao.js} +1 -1
- package/dist/viewer/{PhoneArtboardBar-Bzeyu7RL.js → PhoneArtboardBar-Bzffd2nB.js} +1 -1
- package/dist/viewer/{PhoneSheet-BqNn1A8k.js → PhoneSheet-CN4Ewszx.js} +1 -1
- package/dist/viewer/{Popover-Mq50eaGz.js → Popover-J_7ZaGFR.js} +1 -1
- package/dist/viewer/{PreviewLayout-CBXgXFHd.js → PreviewLayout-CA1vbD89.js} +2 -2
- package/dist/viewer/{Segmented-Dn3tMkJ1.js → Segmented-DhJdw1_a.js} +1 -1
- package/dist/viewer/{Select-B3iVUwhL.js → Select-Cqb37-IZ.js} +1 -1
- package/dist/viewer/{SelectScrollUpArrow-PZIGiE5i.js → SelectScrollUpArrow-DYO27Q2D.js} +1 -1
- package/dist/viewer/{SettingsDialog-Di1DIjuU.js → SettingsDialog-BpwMMImH.js} +1 -1
- package/dist/viewer/{SnapshotDocument-CZ9_zlbN.js → SnapshotDocument-DLK882r5.js} +1 -1
- package/dist/viewer/SplitShell-lfa8K-76.js +1 -0
- package/dist/viewer/{ThreadView-DhKDuMXE.js → ThreadView-CNiDFkdG.js} +1 -1
- package/dist/viewer/{TooltipPopup-DIfQd51a.js → TooltipPopup-DsKnBNAK.js} +1 -1
- package/dist/viewer/{VirtualizedEditor-D9Ivycdp-BS6qVQKi.js → VirtualizedEditor-D9Ivycdp-D8XCyuui.js} +1 -1
- package/dist/viewer/{VirtualizedRenderer-C_d95FXi-Cgx30lJW.js → VirtualizedRenderer-C_d95FXi-hark7DZu.js} +1 -1
- package/dist/viewer/{WarningsBadge-BhvEtIPf.js → WarningsBadge-DT8IiYtX.js} +1 -1
- package/dist/viewer/{WhiteboardLayout-BLUnPC_j.js → WhiteboardLayout-fX2Dx4Ro.js} +1 -1
- package/dist/viewer/{WritingCursor-D8-ImQmN.js → WritingCursor-DQcBMO0U.js} +1 -1
- package/dist/viewer/{abnfDiagram-VCTEODGH-CAaQSsKr.js → abnfDiagram-VCTEODGH-CTyAnl0Z.js} +1 -1
- package/dist/viewer/{agentLook-GSv6M_4b.js → agentLook-C2_12glW.js} +1 -1
- package/dist/viewer/{anchor-cpflnjH6.js → anchor-B2Eea6vf.js} +1 -1
- package/dist/viewer/{ar-SA-G6X2FPQ2-CRJustU_.js → ar-SA-G6X2FPQ2-Co8NUjyx.js} +1 -1
- package/dist/viewer/{architecture-7GRP2DOG-Df-BWMMn.js → architecture-7GRP2DOG-B0zVjmxn.js} +1 -1
- package/dist/viewer/{architectureDiagram-5GKGNRK7-slFJ5pNz.js → architectureDiagram-5GKGNRK7-CGcFQF9y.js} +1 -1
- package/dist/viewer/{az-AZ-76LH7QW2-BZXNMAjr.js → az-AZ-76LH7QW2-De3Qkr8D.js} +1 -1
- package/dist/viewer/{bg-BG-XCXSNQG7-D942OHJ1.js → bg-BG-XCXSNQG7-BzK_v3Xv.js} +1 -1
- package/dist/viewer/{blockDiagram-I7D4REHJ-D7tnOUmG.js → blockDiagram-I7D4REHJ-mTBluH4Q.js} +1 -1
- package/dist/viewer/{bn-BD-2XOGV67Q-CnUziB-N.js → bn-BD-2XOGV67Q-BDqCkFBJ.js} +1 -1
- package/dist/viewer/{c4Diagram-7LVT6UL2-A90PS1Zn.js → c4Diagram-7LVT6UL2-D-nVvYcu.js} +1 -1
- package/dist/viewer/{ca-ES-6MX7JW3Y-fV3kI3by.js → ca-ES-6MX7JW3Y-Di897XK8.js} +1 -1
- package/dist/viewer/{channel-Y8cPWVH2.js → channel-BnquVtpP.js} +5 -5
- package/dist/viewer/channel-OqtHMQX0.js +1 -0
- package/dist/viewer/{chunk-4HAMMTFA-Dtev5uNX.js → chunk-4HAMMTFA-QTbQqNtn.js} +1 -1
- package/dist/viewer/{chunk-75Z2AOVW-Br59Z0N6.js → chunk-75Z2AOVW-BbYnGlO9.js} +1 -1
- package/dist/viewer/{chunk-DU6HZSFF-DTVWCdhx.js → chunk-DU6HZSFF-D25kbUvc.js} +1 -1
- package/dist/viewer/{chunk-EIO257PC-BJo1mhGf.js → chunk-EIO257PC-BqMFp5wN.js} +1 -1
- package/dist/viewer/{chunk-F27PBJKO-CqXtkDh_.js → chunk-F27PBJKO-C7JmXEA_.js} +1 -1
- package/dist/viewer/{chunk-GMAD6QVW-C_mtYAsp.js → chunk-GMAD6QVW-C27INOB_.js} +1 -1
- package/dist/viewer/{chunk-GVQU2GXP-Dnn5H2Ee.js → chunk-GVQU2GXP-CEY5vytX.js} +1 -1
- package/dist/viewer/{chunk-IMKFNOWR-CBTdwY_-.js → chunk-IMKFNOWR-BQSAfnnl.js} +1 -1
- package/dist/viewer/{chunk-L3NEJ4N5-RIzLHntK.js → chunk-L3NEJ4N5-DlFoBxMY.js} +1 -1
- package/dist/viewer/{chunk-OSK3NFVY-CK41dOkH.js → chunk-OSK3NFVY-F3_Phybw.js} +1 -1
- package/dist/viewer/{chunk-P2QGCYS3-BL4CYLWw.js → chunk-P2QGCYS3-09egvNok.js} +1 -1
- package/dist/viewer/{chunk-POPQ4Y6H-CJsQjBoH.js → chunk-POPQ4Y6H-CV8YIoqC.js} +1 -1
- package/dist/viewer/{chunk-PWAF6VOD-DeuKxCvN.js → chunk-PWAF6VOD-Bz8UB2mc.js} +1 -1
- package/dist/viewer/{chunk-SHT3W25Y-1ctnl-w3.js → chunk-SHT3W25Y-DDp6zMvV.js} +1 -1
- package/dist/viewer/{chunk-SVP7TREG-0tebC1pj.js → chunk-SVP7TREG-C8P_HXcE.js} +1 -1
- package/dist/viewer/{chunk-TICWLB2K-BxhvtMAu.js → chunk-TICWLB2K-CqNIbLdD.js} +1 -1
- package/dist/viewer/classDiagram-ZZMXUADV-CVstJoyx.js +1 -0
- package/dist/viewer/classDiagram-v2-VYDZK3BY-CVstJoyx.js +1 -0
- package/dist/viewer/{cs-CZ-2BRQDIVT-DKXyGqNH.js → cs-CZ-2BRQDIVT-BqCK2YiO.js} +1 -1
- package/dist/viewer/{cynefin-OW5HDTMX-BUe484ye.js → cynefin-OW5HDTMX-Cj8F5cxd.js} +1 -1
- package/dist/viewer/{cynefinDiagram-5FMLGOSQ-CWdVGsBk.js → cynefinDiagram-5FMLGOSQ-ao8tcFtS.js} +1 -1
- package/dist/viewer/{da-DK-5WZEPLOC-b4IEozFV.js → da-DK-5WZEPLOC-D8GWiO3u.js} +1 -1
- package/dist/viewer/{dagre-GXQ25YYZ-DCuEklTp.js → dagre-GXQ25YYZ-DsGmxha_.js} +1 -1
- package/dist/viewer/{de-DE-XR44H4JA-C7sc34_X.js → de-DE-XR44H4JA-OJKx5xur.js} +1 -1
- package/dist/viewer/{diagram-S7CK7UJ4-CsxaHH4I.js → diagram-S7CK7UJ4-BPqNSGqm.js} +1 -1
- package/dist/viewer/{diagram-UQ7AKVKN-Ct8242ZE.js → diagram-UQ7AKVKN-Hyylpo16.js} +1 -1
- package/dist/viewer/{diagram-VSXAHHWV-C1nroriz.js → diagram-VSXAHHWV-CqqVLGLK.js} +1 -1
- package/dist/viewer/{diagram-VX7I27RA-DEWRSmDx.js → diagram-VX7I27RA-QDUSbpnl.js} +1 -1
- package/dist/viewer/{diagram-Z3DM3KII-B1SxmMm9.js → diagram-Z3DM3KII-BlSnfIUw.js} +1 -1
- package/dist/viewer/{dist-xKtvXW_M.js → dist-B0RTNhv0.js} +1 -1
- package/dist/viewer/{dist-Cse2aOfa.js → dist-B1Av84X-.js} +1 -1
- package/dist/viewer/{dist-CUWoav31.js → dist-B87a_nX-.js} +1 -1
- package/dist/viewer/{dist-kyCI0GjD.js → dist-BJa8XtNT.js} +1 -1
- package/dist/viewer/{dist-CXasQug3.js → dist-BX48icz_.js} +1 -1
- package/dist/viewer/{dist-lH8EGddX.js → dist-BbWMGndq.js} +1 -1
- package/dist/viewer/{dist-B6-aAGQA.js → dist-C6N0HZZ_.js} +1 -1
- package/dist/viewer/{dist-1xzhgjrK.js → dist-C81cCD06.js} +1 -1
- package/dist/viewer/{dist-DKkW9dU5.js → dist-C9d9kCQe.js} +1 -1
- package/dist/viewer/{dist-D2yfyCbT.js → dist-CFCYK1GH.js} +1 -1
- package/dist/viewer/{dist-fyPnRLSz.js → dist-CIMZ7MXi.js} +1 -1
- package/dist/viewer/{dist-VAycv_3i.js → dist-CIwFN_9o.js} +1 -1
- package/dist/viewer/{dist-CA2_d8WP.js → dist-CUOaFOZB.js} +1 -1
- package/dist/viewer/{dist-rHgXqZ3U.js → dist-CZqMgpXJ.js} +1 -1
- package/dist/viewer/{dist-C4zEBXjK.js → dist-CuFXRlWd.js} +1 -1
- package/dist/viewer/{dist-C8JtF2VW.js → dist-D-AftFRp.js} +1 -1
- package/dist/viewer/{dist-B4M9sgR9.js → dist-DHCEOOdB.js} +1 -1
- package/dist/viewer/{dist-DKLouXV5.js → dist-DNRvf1kb.js} +1 -1
- package/dist/viewer/{dist-B0ahrRmN.js → dist-F9yavwpT.js} +1 -1
- package/dist/viewer/{dist-B3kJb0_U.js → dist-RJrXrBtP.js} +1 -1
- package/dist/viewer/{dist-Cy8NldSx.js → dist-XKj_gvVl.js} +4 -4
- package/dist/viewer/{dist-B9Rn0Zrs.js → dist-e4BQGX6z.js} +1 -1
- package/dist/viewer/{dist-Ds6VFWTz.js → dist-hmTi_WJo.js} +1 -1
- package/dist/viewer/{dist-CBB6_G5_.js → dist-w5u3PgvM.js} +1 -1
- package/dist/viewer/{ebnfDiagram-PWID7BFC-BwAXcSMu.js → ebnfDiagram-PWID7BFC-Cv8jFIx3.js} +1 -1
- package/dist/viewer/{el-GR-BZB4AONW-DO8FKq0o.js → el-GR-BZB4AONW-Bgcc_mhT.js} +1 -1
- package/dist/viewer/{en-B4ZKOASM-BGb9Jd7F.js → en-B4ZKOASM-xfJgNr4J.js} +1 -1
- package/dist/viewer/{erDiagram-RLTQ6QDP-BU0oilOu.js → erDiagram-RLTQ6QDP-DlKwxifM.js} +1 -1
- package/dist/viewer/{es-ES-U4NZUMDT-C8my4jC1.js → es-ES-U4NZUMDT-DjVCDf-d.js} +1 -1
- package/dist/viewer/{eu-ES-A7QVB2H4-7y6iA3PQ.js → eu-ES-A7QVB2H4-B9DLpn4i.js} +1 -1
- package/dist/viewer/{eventmodeling-NTZA5JFV-soHgkZ82.js → eventmodeling-NTZA5JFV-DBsen_iq.js} +1 -1
- package/dist/viewer/{fa-IR-HGAKTJCU-oCdmxr1e.js → fa-IR-HGAKTJCU-mcJehgzb.js} +1 -1
- package/dist/viewer/{fi-FI-Z5N7JZ37-X3VK0x3c.js → fi-FI-Z5N7JZ37-DNSkiCdk.js} +1 -1
- package/dist/viewer/flowDiagram-HODETNUW-CzgiVLhq.js +1 -0
- package/dist/viewer/{fr-FR-RHASNOE6-zrXrM79-.js → fr-FR-RHASNOE6-Bpxco8-f.js} +1 -1
- package/dist/viewer/{ganttDiagram-EL5Y4UJY-bHjB1qlT.js → ganttDiagram-EL5Y4UJY-B9_jTP-f.js} +1 -1
- package/dist/viewer/{gitGraph-4MIJSDKK-CjGC-mW6.js → gitGraph-4MIJSDKK-DQ5l_Czp.js} +1 -1
- package/dist/viewer/{gitGraphDiagram-WWUBYQGX-DUqXPpCq.js → gitGraphDiagram-WWUBYQGX-CNheUmFp.js} +1 -1
- package/dist/viewer/{gl-ES-HMX3MZ6V-BUnj3HlN.js → gl-ES-HMX3MZ6V-BDlXQ8Mo.js} +1 -1
- package/dist/viewer/{he-IL-6SHJWFNN-281kRBUf.js → he-IL-6SHJWFNN-D_oWBOT_.js} +1 -1
- package/dist/viewer/{hi-IN-IWLTKZ5I-DIuMdRpK.js → hi-IN-IWLTKZ5I-B00j5Akq.js} +1 -1
- package/dist/viewer/{hu-HU-A5ZG7DT2-nmQyfjlR.js → hu-HU-A5ZG7DT2-Dir0Uxpm.js} +1 -1
- package/dist/viewer/{id-ID-SAP4L64H-BiViI6m_.js → id-ID-SAP4L64H-CIWlaa2K.js} +1 -1
- package/dist/viewer/{image-GAAHSSAO-yI0Lg6gi.js → image-GAAHSSAO-eNNIIQuo.js} +1 -1
- package/dist/viewer/index.html +5 -5
- package/dist/viewer/index.js +2 -2
- package/dist/viewer/{info-A6RAGUB7-B0l9mAY4.js → info-A6RAGUB7-Cg2ZMBgH.js} +1 -1
- package/dist/viewer/{infoDiagram-27XIBGKW-BTxMqmhS.js → infoDiagram-27XIBGKW-D4PQhgAE.js} +1 -1
- package/dist/viewer/{ishikawaDiagram-5VMMS53U-BunWcUgG.js → ishikawaDiagram-5VMMS53U-ST2q8zVR.js} +1 -1
- package/dist/viewer/{it-IT-JPQ66NNP-DpwQuK5q.js → it-IT-JPQ66NNP-pmEG31XC.js} +1 -1
- package/dist/viewer/{ja-JP-DBVTYXUO-Dg0jZ4Fr.js → ja-JP-DBVTYXUO-B4zqTUsM.js} +1 -1
- package/dist/viewer/{journeyDiagram-3NMN7TZE-CH0mNNME.js → journeyDiagram-3NMN7TZE-jw9cozQW.js} +1 -1
- package/dist/viewer/{kaa-6HZHGXH3-Byd9GDLK.js → kaa-6HZHGXH3-BbZXuqjx.js} +1 -1
- package/dist/viewer/{kab-KAB-ZGHBKWFO-a6r59Esz.js → kab-KAB-ZGHBKWFO-B6Dpy25G.js} +1 -1
- package/dist/viewer/{kanban-definition-UXKFOSKX-Dlxx1p8m.js → kanban-definition-UXKFOSKX-kKtBGERG.js} +1 -1
- package/dist/viewer/{kk-KZ-P5N5QNE5-zq8glNLW.js → kk-KZ-P5N5QNE5-BlT2i9fi.js} +1 -1
- package/dist/viewer/{km-KH-HSX4SM5Z-BTq35Fiu.js → km-KH-HSX4SM5Z-It93cDWb.js} +1 -1
- package/dist/viewer/{ko-KR-MTYHY66A-DlgDzRH_.js → ko-KR-MTYHY66A-BE5d6K1R.js} +1 -1
- package/dist/viewer/{ku-TR-6OUDTVRD-BVLk13SV.js → ku-TR-6OUDTVRD-CyJeB7Dj.js} +1 -1
- package/dist/viewer/{local-split-host-xSgjCeui.js → local-split-host-DwGe1ki5.js} +1 -1
- package/dist/viewer/{lt-LT-XHIRWOB4-6q0TFRDx.js → lt-LT-XHIRWOB4-B90xeOxU.js} +1 -1
- package/dist/viewer/{lv-LV-5QDEKY6T-DxyqknhI.js → lv-LV-5QDEKY6T-CItjDmqr.js} +1 -1
- package/dist/viewer/{mermaid-parser.core-Gvb8dIz1.js → mermaid-parser.core-0b8QyWBB.js} +3 -3
- package/dist/viewer/{mindmap-definition-YA3MSWOX-DCPYU-48.js → mindmap-definition-YA3MSWOX-aI29Qvpk.js} +1 -1
- package/dist/viewer/{mr-IN-CRQNXWMA-D2tHgrn-.js → mr-IN-CRQNXWMA-Tce1KbsQ.js} +1 -1
- package/dist/viewer/{my-MM-5M5IBNSE-BYWw8v9n.js → my-MM-5M5IBNSE-CpUB2CXI.js} +1 -1
- package/dist/viewer/{nb-NO-T6EIAALU-K3IdDtSM.js → nb-NO-T6EIAALU-DsRuGO1k.js} +1 -1
- package/dist/viewer/{nl-NL-IS3SIHDZ-O5S6GhQJ.js → nl-NL-IS3SIHDZ-BjF2156S.js} +1 -1
- package/dist/viewer/{nn-NO-6E72VCQL-CG7rDNE2.js → nn-NO-6E72VCQL-CGeF_3vr.js} +1 -1
- package/dist/viewer/{oc-FR-POXYY2M6-DVAwA1YG.js → oc-FR-POXYY2M6-DLnQnEGu.js} +1 -1
- package/dist/viewer/{pa-IN-N4M65BXN-BfskjU3c.js → pa-IN-N4M65BXN-BAx2ywdg.js} +1 -1
- package/dist/viewer/{packet-AYTQ26CC-V9JOIpxu.js → packet-AYTQ26CC-DK170Gd5.js} +1 -1
- package/dist/viewer/{parseTrigger-Bl4n5XXS.js → parseTrigger-YW1R9ofU.js} +1 -1
- package/dist/viewer/{pegDiagram-XKGWAZYB-CRwdoRdU.js → pegDiagram-XKGWAZYB-DHp6Wg_9.js} +1 -1
- package/dist/viewer/percentages-BXMCSKIN-DvCjqEYt.js +1 -0
- package/dist/viewer/{pie-WAS4IAKB-DD4VdSya.js → pie-WAS4IAKB-BSUWPbAv.js} +1 -1
- package/dist/viewer/{pieDiagram-E7YTZNPT-DtxXj_uG.js → pieDiagram-E7YTZNPT-wfRRTiyk.js} +1 -1
- package/dist/viewer/{pl-PL-T2D74RX3-aSM3OymY.js → pl-PL-T2D74RX3-BiWBdXLi.js} +1 -1
- package/dist/viewer/preview.html +4 -4
- package/dist/viewer/preview.js +1 -1
- package/dist/viewer/{prod-DT6gDrhK.js → prod-CLoF9GCs.js} +8 -8
- package/dist/viewer/{pt-BR-5N22H2LF-CoE1Brmo.js → pt-BR-5N22H2LF-CQSzKbCy.js} +1 -1
- package/dist/viewer/{pt-PT-UZXXM6DQ-N4cE4HWd.js → pt-PT-UZXXM6DQ-CIlCAlTv.js} +1 -1
- package/dist/viewer/{quadrantDiagram-AXDQQJYC-Bp9CaPDI.js → quadrantDiagram-AXDQQJYC-BtPMYaDQ.js} +1 -1
- package/dist/viewer/{radar-RG4KPBEZ-DjIgW5TK.js → radar-RG4KPBEZ-BcVxV4zy.js} +1 -1
- package/dist/viewer/{railroad-74A4TZTK-DJXF4Ntz.js → railroad-74A4TZTK-CTa8S3gO.js} +1 -1
- package/dist/viewer/{railroad-abnf-HS5TGJTU-D2uor4gn.js → railroad-abnf-HS5TGJTU-OAwQkYAd.js} +1 -1
- package/dist/viewer/{railroad-ebnf-LZEXJU2U-d-1EQm0I.js → railroad-ebnf-LZEXJU2U-C5cc5X65.js} +1 -1
- package/dist/viewer/{railroad-peg-WCYAUIDC-VVFlD8Wt.js → railroad-peg-WCYAUIDC-BDnKRxE1.js} +1 -1
- package/dist/viewer/{railroadDiagram-O6MQD6OU-DIYzZs3X.js → railroadDiagram-O6MQD6OU-jnRSJdUv.js} +1 -1
- package/dist/viewer/{ref-DeJSmII1.js → ref-cwone_vf.js} +1 -1
- package/dist/viewer/{requirementDiagram-BXWQKSXE-BFAS1s1U.js → requirementDiagram-BXWQKSXE-BNTKDL1i.js} +1 -1
- package/dist/viewer/{ro-RO-JPDTUUEW-CXL_OLY6.js → ro-RO-JPDTUUEW-QX3jx-nb.js} +1 -1
- package/dist/viewer/{route-B-3a8kXR.js → route-BWL5AGYx.js} +2 -2
- package/dist/viewer/{route-messages-D6nsn-yO.js → route-messages-DNqJY8RF.js} +1 -1
- package/dist/viewer/{ru-RU-B4JR7IUQ-DK0raNaa.js → ru-RU-B4JR7IUQ-C9FGD7Cs.js} +1 -1
- package/dist/viewer/{sankeyDiagram-P5KCCOFB-XkkNzFLA.js → sankeyDiagram-P5KCCOFB-Sqlj0O4h.js} +1 -1
- package/dist/viewer/{selection-A2L_U7cp.js → selection--wknfKoX.js} +1 -1
- package/dist/viewer/{sequenceDiagram-WJ2MYXX4-u1vCwsJu.js → sequenceDiagram-WJ2MYXX4-CPdR8yLJ.js} +1 -1
- package/dist/viewer/{si-LK-N5RQ5JYF-C2C_capt.js → si-LK-N5RQ5JYF-f_2YLEad.js} +1 -1
- package/dist/viewer/{sk-SK-C5VTKIMK-CAZ_jqda.js → sk-SK-C5VTKIMK-DkKosukU.js} +1 -1
- package/dist/viewer/{sl-SI-NN7IZMDC-w4mPw9Qr.js → sl-SI-NN7IZMDC-DMIQDLDl.js} +1 -1
- package/dist/viewer/{split-url-Ds_SbiRI.js → split-url-EQlIwqCq.js} +1 -1
- package/dist/viewer/{stateDiagram-D77RDMKH-CNdAB9GQ.js → stateDiagram-D77RDMKH-Dk8vgDDZ.js} +1 -1
- package/dist/viewer/stateDiagram-v2-MP3YSRHH-Ds741M59.js +1 -0
- package/dist/viewer/subset-shared.chunk-BwlAfs_X.js +1 -0
- package/dist/viewer/{subset-worker.chunk-DWr778aR.js → subset-worker.chunk-B_8bLook.js} +1 -1
- package/dist/viewer/{sv-SE-XGPEYMSR-Cvj4W126.js → sv-SE-XGPEYMSR-B7-5iBmq.js} +1 -1
- package/dist/viewer/{swimlanes-42K2YHIH-CRWoFAkx.js → swimlanes-42K2YHIH-C8ikgnYd.js} +1 -1
- package/dist/viewer/swimlanesDiagram-VR7AAH4N-CIbxLGch.js +8 -0
- package/dist/viewer/{ta-IN-2NMHFXQM-pCSxo0O4.js → ta-IN-2NMHFXQM-CCuxmYHa.js} +1 -1
- package/dist/viewer/{th-TH-HPSO5L25-DA2yXkLO.js → th-TH-HPSO5L25-555yyoqZ.js} +1 -1
- package/dist/viewer/{timeline-definition-24CTP7MA-C7cLrh2M.js → timeline-definition-24CTP7MA-C2dpylBO.js} +1 -1
- package/dist/viewer/{tr-TR-DEFEU3FU-DSUJUHLi.js → tr-TR-DEFEU3FU-BzupxUte.js} +1 -1
- package/dist/viewer/{treeView-Q6P3EWNA-CYMsee9z.js → treeView-Q6P3EWNA-Bo2ovp6d.js} +1 -1
- package/dist/viewer/{treemap-WGGIJYW6-BeYAJy3I.js → treemap-WGGIJYW6-B_JgUt2a.js} +1 -1
- package/dist/viewer/{uk-UA-QMV73CPH-CpavbdpO.js → uk-UA-QMV73CPH-DRep9RrQ.js} +1 -1
- package/dist/viewer/{useAriaLabelledBy-Ai3baFaJ.js → useAriaLabelledBy-qrGtdh85.js} +1 -1
- package/dist/viewer/{useOpenInteractionType-CFrlkl-M.js → useOpenInteractionType-B0XlD3Xc.js} +1 -1
- package/dist/viewer/{useTranslation-BCUMbI5g.js → useTranslation-D3df1rHG.js} +1 -1
- package/dist/viewer/{useTypeFavicon-B4j5zCC6.js → useTypeFavicon-COeOH_8h.js} +1 -1
- package/dist/viewer/{vennDiagram-4TSXK5OY-D-TvgzEs.js → vennDiagram-4TSXK5OY-BmwVNbSU.js} +1 -1
- package/dist/viewer/{vi-VN-M7AON7JQ-149ovaXw.js → vi-VN-M7AON7JQ-HxuRLuM7.js} +1 -1
- package/dist/viewer/{view-tN_gu_ot.js → view-Q3sf2djn.js} +1 -1
- package/dist/viewer/{viewport-CFJHn_Y6-gOi1FTqq.js → viewport-CFJHn_Y6-CbqGY5Lo.js} +1 -1
- package/dist/viewer/{wardley-WFR3VGLG-Bxei-rkR.js → wardley-WFR3VGLG-D6GPmsYf.js} +1 -1
- package/dist/viewer/{wardleyDiagram-VM6X3IG4-Behq92Qv.js → wardleyDiagram-VM6X3IG4-BL1YKfSh.js} +1 -1
- package/dist/viewer/{xychartDiagram-S5SC5T6Z-WvqgiYkm.js → xychartDiagram-S5SC5T6Z-9WjSzaRU.js} +1 -1
- package/dist/viewer/{zh-CN-LNUGB5OW-Bh3vP78p.js → zh-CN-LNUGB5OW-C_gHexkj.js} +1 -1
- package/dist/viewer/{zh-HK-E62DVLB3-DyLx4WST.js → zh-HK-E62DVLB3-Dhwq5Laa.js} +1 -1
- package/dist/viewer/{zh-TW-RAJ6MFWO-CzGpQq8F.js → zh-TW-RAJ6MFWO-CfId5kew.js} +1 -1
- package/dist/viewer-lib/{Canvas-D1GKtdWi.js → Canvas-BIOxiTKF.js} +3 -3
- package/dist/viewer-lib/{PhoneArtboardBar-Wif7mAXi.js → PhoneArtboardBar-BHqZKvJt.js} +2 -2
- package/dist/viewer-lib/{PreviewView-96hXi1zy.js → PreviewView-CpOviFy0.js} +2 -2
- package/dist/viewer-lib/{ReadOnlyWhiteboard-ByJSgs6y.js → ReadOnlyWhiteboard-BmJvK9cn.js} +3 -3
- package/dist/viewer-lib/{SnapshotDocument-boYf3Unu.js → SnapshotDocument-CoYU0Lh9.js} +32 -32
- package/dist/viewer-lib/{VirtualizedEditor-D9Ivycdp-C1r2x0pX.js → VirtualizedEditor-D9Ivycdp-BIjSlsIz.js} +2 -2
- package/dist/viewer-lib/{VirtualizedRenderer-C_d95FXi-lZgY7VI5.js → VirtualizedRenderer-C_d95FXi-Bnj6-pgS.js} +3 -3
- package/dist/viewer-lib/{WarningsBadge-B8dxGKka.js → WarningsBadge-1xR7QoZB.js} +1 -1
- package/dist/viewer-lib/{agentLook-0GsgKSL-.js → agentLook-xSyYY25N.js} +1 -1
- package/dist/viewer-lib/{ar-SA-G6X2FPQ2-D01gdPpr.js → ar-SA-G6X2FPQ2-CEJUrUcf.js} +1 -1
- package/dist/viewer-lib/{az-AZ-76LH7QW2-C7w5r7bD.js → az-AZ-76LH7QW2-D3FZr56u.js} +1 -1
- package/dist/viewer-lib/{bg-BG-XCXSNQG7-p2Qatdni.js → bg-BG-XCXSNQG7-DV2gd8SJ.js} +1 -1
- package/dist/viewer-lib/{bn-BD-2XOGV67Q-DtnIWXwT.js → bn-BD-2XOGV67Q-fNhYcJwe.js} +1 -1
- package/dist/viewer-lib/{ca-ES-6MX7JW3Y-BY9zZN7o.js → ca-ES-6MX7JW3Y-p45OBk_B.js} +1 -1
- package/dist/viewer-lib/{chunk-EIO257PC-Dn7JUPD8.js → chunk-EIO257PC-CXXH8Md3.js} +1 -1
- package/dist/viewer-lib/core.js +2 -2
- package/dist/viewer-lib/{cs-CZ-2BRQDIVT-BzjoZdth.js → cs-CZ-2BRQDIVT-CY75gnzI.js} +1 -1
- package/dist/viewer-lib/{da-DK-5WZEPLOC-TDV970j5.js → da-DK-5WZEPLOC-DmMaYPrm.js} +1 -1
- package/dist/viewer-lib/{de-DE-XR44H4JA-BjyTyKoM.js → de-DE-XR44H4JA-DYfV8p9-.js} +1 -1
- package/dist/viewer-lib/{dist-C60FpC9e.js → dist-4trVCfjq.js} +1 -1
- package/dist/viewer-lib/{dist-DK1Yi8I4.js → dist-B-j0RxZR.js} +4 -4
- package/dist/viewer-lib/{dist-D9IzrveE.js → dist-B6v4d2OE.js} +2 -2
- package/dist/viewer-lib/{dist-Cfk5Y4QC.js → dist-BBbxY7eN.js} +2 -2
- package/dist/viewer-lib/{dist-CgQmu9ki.js → dist-BLZACBxn.js} +3 -3
- package/dist/viewer-lib/{dist-bPGj_tUd.js → dist-BhD6uqFF.js} +4 -4
- package/dist/viewer-lib/{dist-D778PgeW.js → dist-Blffswa2.js} +2 -2
- package/dist/viewer-lib/{dist-xJDwc_X3.js → dist-C18P64_H.js} +3 -3
- package/dist/viewer-lib/{dist-C38vNQIH.js → dist-C3iKnxkm.js} +1 -1
- package/dist/viewer-lib/{dist-D36o7D7T.js → dist-C9wjN4qP.js} +2 -2
- package/dist/viewer-lib/{dist-CBjyw6zC.js → dist-CAQ5QqVX.js} +2 -2
- package/dist/viewer-lib/{dist-BTCqhvAf.js → dist-CGygFbGE.js} +4 -4
- package/dist/viewer-lib/{dist-CPnB9yKQ.js → dist-ChCdGydn.js} +3 -3
- package/dist/viewer-lib/{dist-DYd0_e2w.js → dist-ChJMfI_4.js} +2 -2
- package/dist/viewer-lib/{dist-DHEOl2TN.js → dist-CmgL1T8b.js} +2 -2
- package/dist/viewer-lib/{dist-FVtL0y1F.js → dist-CpKXDAbK.js} +3 -3
- package/dist/viewer-lib/{dist-vd2-brQn.js → dist-Cqnr_svH.js} +3 -3
- package/dist/viewer-lib/{dist-Cr_rgBD9.js → dist-DMtbeBEG.js} +3 -3
- package/dist/viewer-lib/{dist-BEz688xk.js → dist-DP5eJBUk.js} +3 -3
- package/dist/viewer-lib/{dist-qS7iA2eX.js → dist-DW_uBzP-.js} +3 -3
- package/dist/viewer-lib/{dist-CMWQEa97.js → dist-DWjD6K4x.js} +3 -3
- package/dist/viewer-lib/{dist-DULdzKdC.js → dist-DwE6N9nw.js} +3 -3
- package/dist/viewer-lib/{dist-BSFDUw8i.js → dist-FMKgeQVH.js} +2 -2
- package/dist/viewer-lib/document.js +6 -6
- package/dist/viewer-lib/{el-GR-BZB4AONW-Be_WFnxM.js → el-GR-BZB4AONW-C0-Rg3rY.js} +1 -1
- package/dist/viewer-lib/{en-B4ZKOASM-CqCyVRMQ.js → en-B4ZKOASM-CWwARfdU.js} +1 -1
- package/dist/viewer-lib/{es-ES-U4NZUMDT-BbunaFz5.js → es-ES-U4NZUMDT-Di1ZUIVa.js} +1 -1
- package/dist/viewer-lib/{eu-ES-A7QVB2H4-CiDfJl0F.js → eu-ES-A7QVB2H4-DfxpIbwQ.js} +1 -1
- package/dist/viewer-lib/{fa-IR-HGAKTJCU-CLdHVNrd.js → fa-IR-HGAKTJCU-BzJgn5bY.js} +1 -1
- package/dist/viewer-lib/{fi-FI-Z5N7JZ37-AInwUM2B.js → fi-FI-Z5N7JZ37-Dgh9WYA8.js} +1 -1
- package/dist/viewer-lib/{fr-FR-RHASNOE6-5qcE-nn9.js → fr-FR-RHASNOE6-FxbVo7Yh.js} +1 -1
- package/dist/viewer-lib/{gl-ES-HMX3MZ6V-C_hmLe5L.js → gl-ES-HMX3MZ6V-BwezJSl-.js} +1 -1
- package/dist/viewer-lib/{he-IL-6SHJWFNN-Bs4SMN5Y.js → he-IL-6SHJWFNN-CMKZRRs9.js} +1 -1
- package/dist/viewer-lib/{hi-IN-IWLTKZ5I-CHsG_prh.js → hi-IN-IWLTKZ5I-4-ZNp-DM.js} +1 -1
- package/dist/viewer-lib/{hu-HU-A5ZG7DT2-BpNCnfmz.js → hu-HU-A5ZG7DT2-Cao8cecF.js} +1 -1
- package/dist/viewer-lib/{i18n-Bl255uFG.js → i18n-QksLzzWi.js} +2 -0
- package/dist/viewer-lib/{id-ID-SAP4L64H-B18MP3TV.js → id-ID-SAP4L64H-CWnVrU2u.js} +1 -1
- package/dist/viewer-lib/{image-GAAHSSAO-DVKnh1wc.js → image-GAAHSSAO-5jYfRo5K.js} +1 -1
- package/dist/viewer-lib/index.js +462 -436
- package/dist/viewer-lib/{it-IT-JPQ66NNP-BH98nLgr.js → it-IT-JPQ66NNP-DiPCKoa_.js} +1 -1
- package/dist/viewer-lib/{ja-JP-DBVTYXUO-DA2fExJg.js → ja-JP-DBVTYXUO-CXbGOVTd.js} +1 -1
- package/dist/viewer-lib/{kaa-6HZHGXH3-C-82oNQ2.js → kaa-6HZHGXH3-BkMVWloD.js} +1 -1
- package/dist/viewer-lib/{kab-KAB-ZGHBKWFO-CsOeYyyg.js → kab-KAB-ZGHBKWFO-FA3Rofsx.js} +1 -1
- package/dist/viewer-lib/{kk-KZ-P5N5QNE5-C5vZz2mB.js → kk-KZ-P5N5QNE5-CsDnxzrG.js} +1 -1
- package/dist/viewer-lib/{km-KH-HSX4SM5Z-Ds8sNL7U.js → km-KH-HSX4SM5Z-BxCiwgzA.js} +1 -1
- package/dist/viewer-lib/{ko-KR-MTYHY66A-BgSaRncC.js → ko-KR-MTYHY66A-C-7uFPlL.js} +1 -1
- package/dist/viewer-lib/{ku-TR-6OUDTVRD-DahxJWf5.js → ku-TR-6OUDTVRD-BILRBU5_.js} +1 -1
- package/dist/viewer-lib/{lib-HJ5naU7F.js → lib-DwpunbxQ.js} +1 -1
- package/dist/viewer-lib/{lt-LT-XHIRWOB4-BvJ2fjcP.js → lt-LT-XHIRWOB4-B6TKZcXY.js} +1 -1
- package/dist/viewer-lib/{lv-LV-5QDEKY6T-CfcDbPw2.js → lv-LV-5QDEKY6T-C-K90vIy.js} +1 -1
- package/dist/viewer-lib/{mr-IN-CRQNXWMA-C8OfBL2I.js → mr-IN-CRQNXWMA-K0hO9NLW.js} +1 -1
- package/dist/viewer-lib/{my-MM-5M5IBNSE-BUCYgqBD.js → my-MM-5M5IBNSE-Da5X6e7B.js} +1 -1
- package/dist/viewer-lib/{nb-NO-T6EIAALU-BhVURg4a.js → nb-NO-T6EIAALU-D9WwGGq8.js} +1 -1
- package/dist/viewer-lib/{nl-NL-IS3SIHDZ-C5NGTrjU.js → nl-NL-IS3SIHDZ-BOYOn6bl.js} +1 -1
- package/dist/viewer-lib/{nn-NO-6E72VCQL-CIOwp8RU.js → nn-NO-6E72VCQL-Bwi6kGD3.js} +1 -1
- package/dist/viewer-lib/{oc-FR-POXYY2M6-Da6SyINm.js → oc-FR-POXYY2M6-h8Hb5RCQ.js} +1 -1
- package/dist/viewer-lib/{pa-IN-N4M65BXN-tDTX0nfg.js → pa-IN-N4M65BXN-DHJ5ZqCB.js} +1 -1
- package/dist/viewer-lib/percentages-BXMCSKIN-CN_vO7hH.js +1 -0
- package/dist/viewer-lib/{pl-PL-T2D74RX3-dj1Dwz0C.js → pl-PL-T2D74RX3-DSrRpGY_.js} +1 -1
- package/dist/viewer-lib/{plugin-_bGVeqI0-D3iBrFnz.js → plugin-_bGVeqI0-Ce9s-QXj.js} +1 -1
- package/dist/viewer-lib/{prod-B7QWq4m3.js → prod-IPTdmVn7.js} +59 -59
- package/dist/viewer-lib/{pt-BR-5N22H2LF-BL2Y-MuR.js → pt-BR-5N22H2LF-Cnku-mHw.js} +1 -1
- package/dist/viewer-lib/{pt-PT-UZXXM6DQ-BjYJ2Wd6.js → pt-PT-UZXXM6DQ-CI4Lw12R.js} +1 -1
- package/dist/viewer-lib/{ro-RO-JPDTUUEW-D-wh7Qsh.js → ro-RO-JPDTUUEW-Z0rMTCBA.js} +1 -1
- package/dist/viewer-lib/{route-messages-Cd_S7ERg.js → route-messages-BHovJ4nB.js} +2 -2
- package/dist/viewer-lib/{ru-RU-B4JR7IUQ-Vqbdm2HB.js → ru-RU-B4JR7IUQ-DH7fwhiu.js} +1 -1
- package/dist/viewer-lib/{si-LK-N5RQ5JYF-FWjQj7wM.js → si-LK-N5RQ5JYF-BFG1Q032.js} +1 -1
- package/dist/viewer-lib/{sk-SK-C5VTKIMK-CPdKjgc0.js → sk-SK-C5VTKIMK-nKDfxLLq.js} +1 -1
- package/dist/viewer-lib/{sl-SI-NN7IZMDC-Cfsizmp1.js → sl-SI-NN7IZMDC-zdGtFnJ4.js} +1 -1
- package/dist/viewer-lib/subset-shared.chunk-BI1a3Hz4.js +2 -0
- package/dist/viewer-lib/{subset-worker.chunk-ockc4DfZ.js → subset-worker.chunk-DHe1FqQ-.js} +2 -2
- package/dist/viewer-lib/{sv-SE-XGPEYMSR-CkNdCBoc.js → sv-SE-XGPEYMSR-MVhH_h3w.js} +1 -1
- package/dist/viewer-lib/{ta-IN-2NMHFXQM-Cqhx65Sb.js → ta-IN-2NMHFXQM-C_I2r20T.js} +1 -1
- package/dist/viewer-lib/{th-TH-HPSO5L25-Cz6Qzk1K.js → th-TH-HPSO5L25-DQ6MPZ1r.js} +1 -1
- package/dist/viewer-lib/{tr-TR-DEFEU3FU-CCCN9YIS.js → tr-TR-DEFEU3FU-BNz_PazH.js} +1 -1
- package/dist/viewer-lib/types/src/shared/backlinks.d.ts +1 -0
- package/dist/viewer-lib/{uk-UA-QMV73CPH-CP4wZTK4.js → uk-UA-QMV73CPH-Dn_Qrdeq.js} +1 -1
- package/dist/viewer-lib/{vi-VN-M7AON7JQ-DQsgQGd7.js → vi-VN-M7AON7JQ-C777_3GC.js} +1 -1
- package/dist/viewer-lib/{viewport-CFJHn_Y6-LGEa8Vm0.js → viewport-CFJHn_Y6-DCoJRNQ_.js} +1 -1
- package/dist/viewer-lib/{zh-CN-LNUGB5OW-Cp6CD9iP.js → zh-CN-LNUGB5OW-yPc5aNBV.js} +1 -1
- package/dist/viewer-lib/{zh-HK-E62DVLB3-B_z5KWS4.js → zh-HK-E62DVLB3-DL9Y2kPe.js} +1 -1
- package/dist/viewer-lib/{zh-TW-RAJ6MFWO-BgUsVK92.js → zh-TW-RAJ6MFWO-3VDE8SB2.js} +1 -1
- package/package.json +1 -1
- package/dist/viewer/ArtboardLayout-Cz1MWCu8.js +0 -12
- package/dist/viewer/DocumentLayout-B1bQT74s.js +0 -2
- package/dist/viewer/SplitShell-1kQWIUbB.js +0 -1
- package/dist/viewer/channel-DpF2FNj7.js +0 -1
- package/dist/viewer/classDiagram-ZZMXUADV-BCUwkMkD.js +0 -1
- package/dist/viewer/classDiagram-v2-VYDZK3BY-BCUwkMkD.js +0 -1
- package/dist/viewer/flowDiagram-HODETNUW-A3kbYb0D.js +0 -1
- package/dist/viewer/percentages-BXMCSKIN-BDV0ZRBe.js +0 -1
- package/dist/viewer/stateDiagram-v2-MP3YSRHH-LXrhvJQE.js +0 -1
- package/dist/viewer/subset-shared.chunk-DR4HOb1q.js +0 -1
- package/dist/viewer/swimlanesDiagram-VR7AAH4N-F15yPPv-.js +0 -8
- package/dist/viewer-lib/percentages-BXMCSKIN-Cvdo4-KV.js +0 -1
- package/dist/viewer-lib/subset-shared.chunk-C7qUh7WH.js +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{at as e,ot as t}from"./chunk-DU6HZSFF-D25kbUvc.js";var n=(n,r)=>t.lang.round(e.parse(n)[r]);export{n as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e,p as t,r as n,u as r}from"./chunk-75Z2AOVW-Br59Z0N6.js";import{n as i,t as a}from"./src-KUZZYZBk.js";import{n as o}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{A as s,B as c,M as l,T as u,b as d,f,g as p,x as m,z as h}from"./chunk-DU6HZSFF-DTVWCdhx.js";import{a as g,i as _,r as v,t as y}from"./chunk-P2QGCYS3-BL4CYLWw.js";import{t as b}from"./chunk-PWAF6VOD-DeuKxCvN.js";import{n as x,r as S}from"./chunk-GMAD6QVW-C_mtYAsp.js";import{t as C}from"./rough.esm-Dy-Kn_BL.js";var w=1,T=3;async function E(e){let n=e.getElementsByTagName(`img`);if(!n||n.length===0)return;let r=!D(e);await Promise.all([...n].map(e=>new Promise(n=>{function i(){if(e.style.display=`flex`,e.style.flexDirection=`column`,r){let n=m().fontSize?m().fontSize:window.getComputedStyle(document.body).fontSize,[r=f.fontSize]=t(n),i=r*5+`px`;e.style.minWidth=i,e.style.maxWidth=i}else e.style.width=`100%`;n(e)}o(i,`setupImage`),setTimeout(()=>{e.complete&&i()}),e.addEventListener(`error`,i),e.addEventListener(`load`,i)})))}o(E,`configureLabelImages`);function D(e){return e.nodeType===T?e.textContent?.trim()!==``:e.nodeType!==w||e.tagName.toLowerCase()===`img`?!1:[...e.childNodes].some(D)}o(D,`hasTextBesidesImages`);var O=3,k=32,A=o(async(t,n,i)=>{let o=m(),s=t.insert(`g`).attr(`class`,i??`node default`).attr(`id`,n.domId||n.id),c=s.insert(`g`).attr(`class`,`label`).attr(`style`,r(n.labelStyle)),l=[{text:typeof n.label==`string`?n.label:n.label?.[0]??``,cssClass:`c4-name`},{text:n.stereotype,cssClass:`c4-type`},...(n.description??[]).map(e=>({text:e,cssClass:`c4-descr`}))].filter(e=>e.text),u=n.width?Math.max(n.width-2*(n.padding??0),k):m().flowchart?.wrappingWidth??200,d=o.c4?.wrap??!0?u:1/0,f=await Promise.all(l.map(async t=>{let r=c.append(`g`).attr(`class`,t.cssClass),i=await x(r,h(e(t.text??``),o),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:d,style:n.labelStyle},o);return a(i).selectAll(`tspan.text-outer-tspan`).attr(`text-anchor`,`middle`),a(i).selectAll(`tspan.text-inner-tspan`).attr(`font-weight`,null).attr(`font-style`,null),{el:r,box:r.node().getBBox()}})),p=Math.max(...f.map(({box:e})=>e.width),0),g=0;for(let{el:e,box:t}of f)e.attr(`transform`,`translate(${p/2-t.x-t.width/2}, ${g-t.y})`),g+=t.height+O;let _=f.length>0?g-O:0;return c.insert(`rect`,`:first-child`),c.attr(`transform`,`translate(${-p/2}, ${-_/2})`),{shapeSvg:s,bbox:c.node().getBBox(),halfPadding:(n.padding??0)/2,label:c}},`c4LabelHelper`),j=o(async(t,n,i)=>{if(n.stereotype!==void 0)return A(t,n,i);let o,s=n.useHtmlLabels||p(m()?.htmlLabels);o=i||`node default`;let c=t.insert(`g`).attr(`class`,o).attr(`id`,n.domId||n.id),l=c.insert(`g`).attr(`class`,`label`).attr(`style`,r(n.labelStyle)),u;u=n.label===void 0?``:typeof n.label==`string`?n.label:n.label[0];let d=!!n.icon||!!n.img,f=n.labelType===`markdown`,g=await x(l,h(e(u),m()),{useHtmlLabels:s,width:n.width||n.wrappingWidth||m().flowchart?.wrappingWidth,classes:f?`markdown-node-label`:``,style:n.labelStyle,addSvgBackground:d,markdown:f},m()),_=(n?.padding??0)/2,v;if(s){let e=g.children[0],t=a(g);await E(e),v=await S.measure(()=>e.getBoundingClientRect()),t.attr(`width`,v.width),t.attr(`height`,v.height)}else v=await S.measure(()=>g.getBBox());return s?l.attr(`transform`,`translate(`+-v.width/2+`, `+-v.height/2+`)`):l.attr(`transform`,`translate(0, `+-v.height/2+`)`),n.centerLabel&&l.attr(`transform`,`translate(`+-v.width/2+`, `+-v.height/2+`)`),l.insert(`rect`,`:first-child`),{shapeSvg:c,bbox:v,halfPadding:_,label:l}},`labelHelper`),M=o(async(t,n,r)=>{let i=r.useHtmlLabels??u(m()),o=t.insert(`g`).attr(`class`,`label`).attr(`style`,r.labelStyle||``),s=await x(o,h(e(n),m()),{useHtmlLabels:i,width:r.width||m()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),c=r.padding/2,l;if(u(m())){let e=s.children[0],t=a(s);l=await S.measure(()=>e.getBoundingClientRect()),t.attr(`width`,l.width),t.attr(`height`,l.height)}else l=await S.measure(()=>s.getBBox());return i?o.attr(`transform`,`translate(`+-l.width/2+`, `+-l.height/2+`)`):o.attr(`transform`,`translate(0, `+-l.height/2+`)`),r.centerLabel&&o.attr(`transform`,`translate(`+-l.width/2+`, `+-l.height/2+`)`),o.insert(`rect`,`:first-child`),{shapeSvg:t,bbox:l,halfPadding:c,label:o}},`insertLabel`),N=o((e,t,n)=>{if(n){e.width=n.width,e.height=n.height;return}let r=t.node().getBBox();e.width=r.width,e.height=r.height},`updateNodeBounds`),P=o((e,t)=>(e.look===`handDrawn`?`rough-node`:`node`)+` `+e.cssClasses+` `+(t||``),`getNodeClasses`);function F(e){let t=e.map((e,t)=>`${t===0?`M`:`L`}${e.x},${e.y}`);return t.push(`Z`),t.join(` `)}o(F,`createPathFromPoints`);function I(e,t,n,r,i,a){let o=[],s=n-e,c=r-t,l=s/a,u=2*Math.PI/l,d=t+c/2;for(let t=0;t<=50;t++){let n=e+t/50*s,r=d+i*Math.sin(u*(n-e));o.push({x:n,y:r})}return o}o(I,`generateFullSineWavePoints`);function L(e,t,n,r,i,a){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}o(L,`generateCirclePoints`);function ee(e){let t=Array.from(e.childNodes).filter(e=>e.tagName===`path`),n=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),r=t.map(e=>e.getAttribute(`d`)).filter(e=>e!==null).join(` `);n.setAttribute(`d`,r);let i=t.find(e=>e.getAttribute(`fill`)!==`none`),a=t.find(e=>e.getAttribute(`stroke`)!==`none`),s=o((e,t)=>e?.getAttribute(t)??void 0,`getAttr`);if(i){let e={fill:s(i,`fill`),"fill-opacity":s(i,`fill-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&n.setAttribute(e,t)})}if(a){let e={stroke:s(a,`stroke`),"stroke-width":s(a,`stroke-width`)??`1`,"stroke-opacity":s(a,`stroke-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&n.setAttribute(e,t)})}let c=document.createElementNS(`http://www.w3.org/2000/svg`,`g`);return c.appendChild(n),c}o(ee,`mergePaths`);var R=o((e,t)=>{var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2,c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=a===0?0:s*i/a,l=s):(i<0&&(o=-o),c=o,l=i===0?0:o*a/i),{x:n+c,y:r+l}},`intersectRect`),z=o((e,t,n,r,i)=>[`M`,e+i,t,`H`,e+n-i,`A`,i,i,0,0,1,e+n,t+i,`V`,t+r-i,`A`,i,i,0,0,1,e+n-i,t+r,`H`,e+i,`A`,i,i,0,0,1,e,t+r-i,`V`,t+i,`A`,i,i,0,0,1,e+i,t,`Z`].join(` `),`createRoundedRectPathD`),te=o(async(e,t,n,r=!1,i=!1)=>{let a=t||``;typeof a==`object`&&(a=a[0]);let o=m(),s=u(o);return await x(e,a,{style:n,isTitle:r,useHtmlLabels:s,markdown:!1,isNode:i,width:1/0},o)},`createLabel`);function B(e,t){return e.intersect(t)}o(B,`intersectNode`);var ne=B;function V(e,t,n,r){var i=e.x,a=e.y,o=i-r.x,s=a-r.y,c=Math.sqrt(t*t*s*s+n*n*o*o),l=Math.abs(t*n*o/c);r.x<i&&(l=-l);var u=Math.abs(t*n*s/c);return r.y<a&&(u=-u),{x:i+l,y:a+u}}o(V,`intersectEllipse`);var H=V;function re(e,t,n){return H(e,t,t,n)}o(re,`intersectCircle`);var ie=re;function U(e,t,n,r){{let i=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,s=i*n.x+a*n.y+o,c=i*r.x+a*r.y+o,l=1e-6;if(s!==0&&c!==0&&W(s,c))return;let u=r.y-n.y,d=n.x-r.x,f=r.x*n.y-n.x*r.y,p=u*e.x+d*e.y+f,m=u*t.x+d*t.y+f;if(Math.abs(p)<l&&Math.abs(m)<l&&W(p,m))return;let h=i*d-u*a;if(h===0)return;let g=Math.abs(h/2),_=a*f-d*o,v=_<0?(_-g)/h:(_+g)/h;return _=u*o-i*f,{x:v,y:_<0?(_-g)/h:(_+g)/h}}}o(U,`intersectLine`);function W(e,t){return e*t>0}o(W,`sameSign`);var G=U;function ae(e,t,n){let r=e.x,i=e.y,a=[],o=1/0,s=1/0;typeof t.forEach==`function`?t.forEach(function(e){o=Math.min(o,e.x),s=Math.min(s,e.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));let c=r-e.width/2-o,l=i-e.height/2-s;for(let r=0;r<t.length;r++){let i=t[r],o=t[r<t.length-1?r+1:0],s=G(e,n,{x:c+i.x,y:l+i.y},{x:c+o.x,y:l+o.y});s&&a.push(s)}return a.length?(a.length>1&&a.sort(function(e,t){let r=e.x-n.x,i=e.y-n.y,a=Math.sqrt(r*r+i*i),o=t.x-n.x,s=t.y-n.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1}),a[0]):e}o(ae,`intersectPolygon`);var K={node:ne,circle:ie,ellipse:H,polygon:ae,rect:R};function oe(e,t){let{labelStyles:n}=_(t);t.labelStyle=n;let a=P(t),o=a;a||(o=`anchor`);let s=e.insert(`g`).attr(`class`,o).attr(`id`,t.domId||t.id),{cssStyles:c}=t,l=C.svg(s),u=g(t,{fill:`black`,stroke:`none`,fillStyle:`solid`});t.look!==`handDrawn`&&(u.roughness=0);let d=l.circle(0,0,2,u),f=s.insert(()=>d,`:first-child`);return f.attr(`class`,`anchor`).attr(`style`,r(c)),N(t,f),t.intersect=function(e){return i.info(`Circle intersect`,t,1,e),K.circle(t,1,e)},s}o(oe,`anchor`);function se(e,t,n,r,i,a,o){let s=(e+n)/2,c=(t+r)/2,l=Math.atan2(r-t,n-e),u=(n-e)/2,d=(r-t)/2,f=u/i,p=d/a,m=Math.sqrt(f**2+p**2);if(m>1)throw Error(`The given radii are too small to create an arc between the points.`);let h=Math.sqrt(1-m**2),g=s+h*a*Math.sin(l)*(o?-1:1),_=c-h*i*Math.cos(l)*(o?-1:1),v=Math.atan2((t-_)/a,(e-g)/i),y=Math.atan2((r-_)/a,(n-g)/i)-v;o&&y<0&&(y+=2*Math.PI),!o&&y>0&&(y-=2*Math.PI);let b=[];for(let e=0;e<20;e++){let t=v+e/19*y,n=g+i*Math.cos(t),r=_+a*Math.sin(t);b.push({x:n,y:r})}return b}o(se,`generateArcPoints`);function ce(e,t,n){let[r,i]=[t,n].sort((e,t)=>t-e);return i*(1-Math.sqrt(1-(e/r/2)**2))}o(ce,`calculateArcSagitta`);async function le(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,s=t.look===`neo`?12:i,c=o(e=>e+s,`calcTotalHeight`),l=o(e=>{let t=e/2;return[t/(2.5+e/50),t]},`calcEllipseRadius`),{shapeSvg:u,bbox:d}=await j(e,t,P(t)),f=c(t?.height?t?.height:d.height),[p,m]=l(f),h=ce(f,p,m),v=(t?.width?t?.width:d.width)+a*2+h-h,y=f,{cssStyles:b}=t,x=[{x:v/2,y:-y/2},{x:-v/2,y:-y/2},...se(-v/2,-y/2,-v/2,y/2,p,m,!1),{x:v/2,y:y/2},...se(v/2,y/2,v/2,-y/2,p,m,!0)],S=C.svg(u),w=g(t,{});t.look!==`handDrawn`&&(w.roughness=0,w.fillStyle=`solid`);let T=F(x),E=S.path(T,w),D=u.insert(()=>E,`:first-child`);return D.attr(`class`,`basic label-container outer-path`),b&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,b),r&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,r),D.attr(`transform`,`translate(${p/2}, 0)`),N(t,D),t.intersect=function(e){return K.polygon(t,x,e)},u}o(le,`bowTieRect`);async function ue(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=_(t);t.labelStyle=r;let{shapeSvg:a,bbox:s,label:c}=await j(e,t,P(t)),l=n?.nodeBorder??n?.lineColor??`currentColor`,u=t.padding??12,d=Math.max(s.width+u*2,t.width??0,80),f=Math.max(Math.min(d*.08,12),5),p=Math.max(s.height+u*2+f,t.height??0),m=-p/2+f,h=p/2,v=d*.72,y=[`M${-d/2},${m}`,`L${-v/2},${h}`,`A${v/2},${f} 0 0 0 ${v/2},${h}`,`L${d/2},${m}`,`A${d/2},${f} 0 0 0 ${-d/2},${m}`,`Z`].join(` `),{cssStyles:b}=t,x=a.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){let e=C.svg(a).path(y,g(t,{}));x.node()?.appendChild(e),b&&x.attr(`style`,b)}else x.append(`path`).attr(`d`,y).attr(`style`,i);x.append(`ellipse`).attr(`cx`,0).attr(`cy`,m).attr(`rx`,d/2).attr(`ry`,f).attr(`style`,`fill:none;stroke:${l};stroke-width:1px`),N(t,x);let S=m+(h-m)/2;c.attr(`transform`,`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${S-s.height/2-(s.y-(s.top??0))})`);let w=o((e,t,n)=>Array.from({length:13},(r,i)=>{let a=Math.PI-i*Math.PI/12;return{x:e*Math.cos(a),y:t+n*f*Math.sin(a)}}),`arc`),T=[...w(d/2,m,-1),...w(v/2,h,1).reverse()];return t.intersect=function(e){return K.polygon(t,T,e)},a}o(ue,`bucket`);var de=20,fe=8,pe=80,me=8;async function he(e,t){let{themeVariables:n}=m(),i=n.clusterBkg,a=n.clusterBorder,{nodeStyles:o}=_(t),{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=t.padding??8,d=c.height,f=Math.max(c.width+l*2,pe,t?.width??0),p=Math.max(d+fe+de+l*2,t?.height??0),h=-f/2,v=-p/2,y=-(fe+de)/2,b=s.select(`.label`);b&&(t.useHtmlLabels??u(m())?b.attr(`transform`,`translate(${-c.width/2}, ${-c.height/2+y})`):b.attr(`transform`,`translate(0, ${-c.height/2+y})`));let x;if(t.look===`handDrawn`){let e=C.svg(s),n=g(t,{fill:i,stroke:a,fillStyle:`solid`}),o=e.path(z(h,v,f,p,me),n);x=s.insert(()=>o,`:first-child`),x.attr(`class`,`basic label-container collapsed-group`).attr(`style`,r(t.cssStyles))}else x=s.insert(`rect`,`:first-child`),x.attr(`class`,`basic label-container collapsed-group`).attr(`style`,o).attr(`rx`,me).attr(`ry`,me).attr(`x`,h).attr(`y`,v).attr(`width`,f).attr(`height`,p).attr(`fill`,i).attr(`stroke`,a);let S=v+l+d+fe;s.append(`line`).attr(`class`,`collapsed-separator`).attr(`x1`,h+8).attr(`y1`,S).attr(`x2`,h+f-8).attr(`y2`,S).attr(`stroke`,a).attr(`stroke-dasharray`,`3, 3`);let w=S+de/2;for(let e=-1;e<=1;e++)s.append(`circle`).attr(`class`,`collapsed-indicator`).attr(`cx`,e*10).attr(`cy`,w).attr(`r`,2.5).attr(`fill`,a);return N(t,x),t.calcIntersect=function(e,t){return K.rect(e,t)},t.intersect=function(e){return K.rect(t,e)},s}o(he,`collapsedGroup`);function q(e,t,n,r){return e.insert(`polygon`,`:first-child`).attr(`points`,r.map(function(e){return e.x+`,`+e.y}).join(` `)).attr(`class`,`label-container`).attr(`transform`,`translate(`+-t/2+`,`+n/2+`)`)}o(q,`insertPolygonShape`);var ge=[`right`,`left`,`up`,`down`],_e=`point`,ve=o(e=>{let t=new Set;for(let n of e)switch(n){case`x`:t.add(`right`),t.add(`left`);break;case`y`:t.add(`up`),t.add(`down`);break;default:t.add(n)}return t},`expandAndDeduplicateDirections`),ye=o(e=>ge.filter(t=>e.has(t)).join(`|`)||_e,`getDirectionKey`),be={"right|left|up|down":o(({height:e,midpoint:t,padding:n,width:r})=>[{x:0,y:0},{x:t,y:0},{x:r/2,y:2*n},{x:r-t,y:0},{x:r,y:0},{x:r,y:-e/3},{x:r+2*n,y:-e/2},{x:r,y:-2*e/3},{x:r,y:-e},{x:r-t,y:-e},{x:r/2,y:-e-2*n},{x:t,y:-e},{x:0,y:-e},{x:0,y:-2*e/3},{x:-2*n,y:-e/2},{x:0,y:-e/3}],`right|left|up|down`),"right|left|up":o(({height:e,midpoint:t,width:n})=>[{x:t,y:0},{x:n-t,y:0},{x:n,y:-e/2},{x:n-t,y:-e},{x:t,y:-e},{x:0,y:-e/2}],`right|left|up`),"right|left|down":o(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:t,y:-e},{x:n-t,y:-e},{x:n,y:0}],`right|left|down`),"right|up|down":o(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:n,y:-t},{x:n,y:-e+t},{x:0,y:-e}],`right|up|down`),"left|up|down":o(({height:e,midpoint:t,width:n})=>[{x:n,y:0},{x:0,y:-t},{x:0,y:-e+t},{x:n,y:-e}],`left|up|down`),"right|left":o(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:0},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e},{x:0,y:-e/2}],`right|left`),"up|down":o(({height:e,midpoint:t,padding:n,width:r})=>[{x:r/2,y:0},{x:0,y:-n},{x:t,y:-n},{x:t,y:-e+n},{x:0,y:-e+n},{x:r/2,y:-e},{x:r,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n},{x:r,y:-n}],`up|down`),"right|up":o(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:n,y:-t},{x:0,y:-e}],`right|up`),"right|down":o(({height:e,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-e}],`right|down`),"left|up":o(({height:e,midpoint:t,width:n})=>[{x:n,y:0},{x:0,y:-t},{x:n,y:-e}],`left|up`),"left|down":o(({height:e,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-e}],`left|down`),right:o(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:-n},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e+n}],`right`),left:o(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:0},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e},{x:0,y:-e/2}],`left`),up:o(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:-n},{x:t,y:-e+n},{x:0,y:-e+n},{x:r/2,y:-e},{x:r,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n}],`up`),down:o(({height:e,midpoint:t,padding:n,width:r})=>[{x:r/2,y:0},{x:0,y:-n},{x:t,y:-n},{x:t,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n},{x:r,y:-n}],`down`),[_e]:()=>[{x:0,y:0}]},xe=o((e,t,n,r)=>{let i=ve(e),a=(n.padding??0)/2,o=t.height+4*a,s=o/2,c=r??t.width+2*s+2*a;return(be[ye(i)]??be[_e])({height:o,midpoint:s,padding:a,width:c})},`getArrowPoints`);async function Se(e,t){let n=t,{shapeSvg:r,bbox:i}=await j(e,n,P(n)),a=n.padding??0,o=i.height+2*a,s=o/2,c=i.width+2*s+a,l=n.width??0,u=n.positioned&&(n.widthInColumns??1)>1&&l>c?l:c,d=xe(n.directions??[],i,n,u),f=q(r,u,o,d);return f.attr(`style`,n.style??null),N(n,f),n.intersect=function(e){return K.polygon(n,d,e)},r}o(Se,`block_arrow`);async function Ce(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=_(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await j(e,t,P(t)),c=n?.nodeBorder??n?.lineColor??`currentColor`,l=t.padding??12,u=Math.max(o.width+l*2,t.width??0,90),d=Math.max(o.height+l*2+18,t.height??0),f=-d/2,{cssStyles:p}=t,m=a.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){let e=C.svg(a).path(z(-u/2,f,u,d,12),g(t,{}));m.node()?.appendChild(e),p&&m.attr(`style`,p)}else m.append(`rect`).attr(`x`,-u/2).attr(`y`,f).attr(`width`,u).attr(`height`,d).attr(`rx`,12).attr(`ry`,12).attr(`style`,i);m.append(`line`).attr(`x1`,-u/2).attr(`y1`,f+18).attr(`x2`,u/2).attr(`y2`,f+18).attr(`style`,`stroke:${c};stroke-width:1px`);for(let e=0;e<3;e++)m.append(`circle`).attr(`cx`,-u/2+12+e*9).attr(`cy`,f+9).attr(`r`,2.5).attr(`style`,`fill:${c};stroke:none`);m.append(`rect`).attr(`class`,`browser-address-bar`).attr(`x`,-u/2+44).attr(`y`,f+4).attr(`width`,Math.max(u-56,10)).attr(`height`,10).attr(`rx`,3).attr(`ry`,3).attr(`style`,`fill:none;stroke:${c};stroke-width:1px;opacity:0.6`),N(t,m);let h=f+18+(d-18)/2;return s.attr(`transform`,`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${h-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(e){return K.rect(t,e)},a}o(Ce,`browser`);var we=12;async function Te(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?28:i,o=t.look===`neo`?24:i,{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=(t?.width??c.width)+(t.look===`neo`?a*2:a+we),u=(t?.height??c.height)+(t.look===`neo`?o*2:o),d=l,f=-u,p=[{x:0+we,y:f},{x:d,y:f},{x:d,y:0},{x:0,y:0},{x:0,y:f+we},{x:0+we,y:f}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=C.svg(s),n=g(t,{}),r=F(p),i=e.path(r,n);m=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-l/2}, ${u/2})`),h&&m.attr(`style`,h)}else m=q(s,l,u,p);return r&&m.attr(`style`,r),N(t,m),t.intersect=function(e){return K.polygon(t,p,e)},s}o(Te,`card`);function Ee(e,t){let{nodeStyles:n}=_(t);t.label=``;let r=e.insert(`g`).attr(`class`,P(t)).attr(`id`,t.domId??t.id),{cssStyles:i}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],s=C.svg(r),c=g(t,{});t.look!==`handDrawn`&&(c.roughness=0,c.fillStyle=`solid`);let l=F(o),u=s.path(l,c),d=r.insert(()=>u,`:first-child`);return i&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,i),n&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,n),t.width=28,t.height=28,t.intersect=function(e){return K.polygon(t,o,e)},r}o(Ee,`choice`);async function De(e,t,n){let{labelStyles:a,nodeStyles:o}=_(t);t.labelStyle=a;let{shapeSvg:s,bbox:c,halfPadding:l}=await j(e,t,P(t)),u=n?.padding??l,d=t.look===`neo`?c.width/2+32:c.width/2+u,f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=C.svg(s),n=g(t,{}),i=e.circle(0,0,d*2,n);f=s.insert(()=>i,`:first-child`),f.attr(`class`,`basic label-container`).attr(`style`,r(p))}else f=s.insert(`circle`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,o).attr(`r`,d).attr(`cx`,0).attr(`cy`,0);return N(t,f),t.calcIntersect=function(e,t){let n=e.width/2;return K.circle(e,n,t)},t.intersect=function(e){return i.info(`Circle intersect`,t,d,e),K.circle(t,d,e)},s}o(De,`circle`);async function Oe(e,t){let n=t,{shapeSvg:r,bbox:i,halfPadding:a}=await j(e,n,[`node`,n.cssClasses,n.class].filter(Boolean).join(` `)),o=r.insert(`rect`,`:first-child`),s=n.padding??0,c=n.positioned?n.width??0:i.width+s,l=n.positioned?n.height??0:i.height+s,u=n.positioned?-c/2:-i.width/2-a,d=n.positioned?-l/2:-i.height/2-a;return o.attr(`class`,`basic cluster composite label-container`).attr(`style`,n.style??null).attr(`rx`,n.rx??null).attr(`ry`,n.ry??null).attr(`x`,u).attr(`y`,d).attr(`width`,c).attr(`height`,l),N(n,o),n.intersect=function(e){return K.rect(n,e)},r}o(Oe,`composite`);async function ke(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=_(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await j(e,t,P(t)),c=n?.nodeBorder??n?.lineColor??`currentColor`,l=t.padding??12,u=Math.max(o.width+l*2,t.width??0,90),d=Math.max(o.height+l*2+20,t.height??0),f=-d/2,{cssStyles:p}=t,m=a.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){let e=C.svg(a).path(z(-u/2,f,u,d,12),g(t,{}));m.node()?.appendChild(e),p&&m.attr(`style`,p)}else m.append(`rect`).attr(`x`,-u/2).attr(`y`,f).attr(`width`,u).attr(`height`,d).attr(`rx`,12).attr(`ry`,12).attr(`style`,i);m.append(`text`).attr(`x`,-u/2+12).attr(`y`,f+16).attr(`class`,`console-glyph`).attr(`style`,`font-family:monospace;font-weight:bold;font-size:14px;fill:${c}`).text(`>_`),N(t,m);let h=f+20+(d-20)/2;return s.attr(`transform`,`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${h-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(e){return K.rect(t,e)},a}o(ke,`consoleWindow`);function Ae(e){let t=Math.cos(Math.PI/4),n=Math.sin(Math.PI/4),r=e*2,i={x:r/2*t,y:r/2*n},a={x:-(r/2)*t,y:r/2*n},o={x:-(r/2)*t,y:-(r/2)*n},s={x:r/2*t,y:-(r/2)*n};return`M ${a.x},${a.y} L ${s.x},${s.y}
|
|
1
|
+
import{a as e,p as t,r as n,u as r}from"./chunk-75Z2AOVW-BbYnGlO9.js";import{n as i,t as a}from"./src-KUZZYZBk.js";import{n as o}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{A as s,B as c,M as l,T as u,b as d,f,g as p,x as m,z as h}from"./chunk-DU6HZSFF-D25kbUvc.js";import{a as g,i as _,r as v,t as y}from"./chunk-P2QGCYS3-09egvNok.js";import{t as b}from"./chunk-PWAF6VOD-Bz8UB2mc.js";import{n as x,r as S}from"./chunk-GMAD6QVW-C27INOB_.js";import{t as C}from"./rough.esm-Dy-Kn_BL.js";var w=1,T=3;async function E(e){let n=e.getElementsByTagName(`img`);if(!n||n.length===0)return;let r=!D(e);await Promise.all([...n].map(e=>new Promise(n=>{function i(){if(e.style.display=`flex`,e.style.flexDirection=`column`,r){let n=m().fontSize?m().fontSize:window.getComputedStyle(document.body).fontSize,[r=f.fontSize]=t(n),i=r*5+`px`;e.style.minWidth=i,e.style.maxWidth=i}else e.style.width=`100%`;n(e)}o(i,`setupImage`),setTimeout(()=>{e.complete&&i()}),e.addEventListener(`error`,i),e.addEventListener(`load`,i)})))}o(E,`configureLabelImages`);function D(e){return e.nodeType===T?e.textContent?.trim()!==``:e.nodeType!==w||e.tagName.toLowerCase()===`img`?!1:[...e.childNodes].some(D)}o(D,`hasTextBesidesImages`);var O=3,k=32,A=o(async(t,n,i)=>{let o=m(),s=t.insert(`g`).attr(`class`,i??`node default`).attr(`id`,n.domId||n.id),c=s.insert(`g`).attr(`class`,`label`).attr(`style`,r(n.labelStyle)),l=[{text:typeof n.label==`string`?n.label:n.label?.[0]??``,cssClass:`c4-name`},{text:n.stereotype,cssClass:`c4-type`},...(n.description??[]).map(e=>({text:e,cssClass:`c4-descr`}))].filter(e=>e.text),u=n.width?Math.max(n.width-2*(n.padding??0),k):m().flowchart?.wrappingWidth??200,d=o.c4?.wrap??!0?u:1/0,f=await Promise.all(l.map(async t=>{let r=c.append(`g`).attr(`class`,t.cssClass),i=await x(r,h(e(t.text??``),o),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:d,style:n.labelStyle},o);return a(i).selectAll(`tspan.text-outer-tspan`).attr(`text-anchor`,`middle`),a(i).selectAll(`tspan.text-inner-tspan`).attr(`font-weight`,null).attr(`font-style`,null),{el:r,box:r.node().getBBox()}})),p=Math.max(...f.map(({box:e})=>e.width),0),g=0;for(let{el:e,box:t}of f)e.attr(`transform`,`translate(${p/2-t.x-t.width/2}, ${g-t.y})`),g+=t.height+O;let _=f.length>0?g-O:0;return c.insert(`rect`,`:first-child`),c.attr(`transform`,`translate(${-p/2}, ${-_/2})`),{shapeSvg:s,bbox:c.node().getBBox(),halfPadding:(n.padding??0)/2,label:c}},`c4LabelHelper`),j=o(async(t,n,i)=>{if(n.stereotype!==void 0)return A(t,n,i);let o,s=n.useHtmlLabels||p(m()?.htmlLabels);o=i||`node default`;let c=t.insert(`g`).attr(`class`,o).attr(`id`,n.domId||n.id),l=c.insert(`g`).attr(`class`,`label`).attr(`style`,r(n.labelStyle)),u;u=n.label===void 0?``:typeof n.label==`string`?n.label:n.label[0];let d=!!n.icon||!!n.img,f=n.labelType===`markdown`,g=await x(l,h(e(u),m()),{useHtmlLabels:s,width:n.width||n.wrappingWidth||m().flowchart?.wrappingWidth,classes:f?`markdown-node-label`:``,style:n.labelStyle,addSvgBackground:d,markdown:f},m()),_=(n?.padding??0)/2,v;if(s){let e=g.children[0],t=a(g);await E(e),v=await S.measure(()=>e.getBoundingClientRect()),t.attr(`width`,v.width),t.attr(`height`,v.height)}else v=await S.measure(()=>g.getBBox());return s?l.attr(`transform`,`translate(`+-v.width/2+`, `+-v.height/2+`)`):l.attr(`transform`,`translate(0, `+-v.height/2+`)`),n.centerLabel&&l.attr(`transform`,`translate(`+-v.width/2+`, `+-v.height/2+`)`),l.insert(`rect`,`:first-child`),{shapeSvg:c,bbox:v,halfPadding:_,label:l}},`labelHelper`),M=o(async(t,n,r)=>{let i=r.useHtmlLabels??u(m()),o=t.insert(`g`).attr(`class`,`label`).attr(`style`,r.labelStyle||``),s=await x(o,h(e(n),m()),{useHtmlLabels:i,width:r.width||m()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),c=r.padding/2,l;if(u(m())){let e=s.children[0],t=a(s);l=await S.measure(()=>e.getBoundingClientRect()),t.attr(`width`,l.width),t.attr(`height`,l.height)}else l=await S.measure(()=>s.getBBox());return i?o.attr(`transform`,`translate(`+-l.width/2+`, `+-l.height/2+`)`):o.attr(`transform`,`translate(0, `+-l.height/2+`)`),r.centerLabel&&o.attr(`transform`,`translate(`+-l.width/2+`, `+-l.height/2+`)`),o.insert(`rect`,`:first-child`),{shapeSvg:t,bbox:l,halfPadding:c,label:o}},`insertLabel`),N=o((e,t,n)=>{if(n){e.width=n.width,e.height=n.height;return}let r=t.node().getBBox();e.width=r.width,e.height=r.height},`updateNodeBounds`),P=o((e,t)=>(e.look===`handDrawn`?`rough-node`:`node`)+` `+e.cssClasses+` `+(t||``),`getNodeClasses`);function F(e){let t=e.map((e,t)=>`${t===0?`M`:`L`}${e.x},${e.y}`);return t.push(`Z`),t.join(` `)}o(F,`createPathFromPoints`);function I(e,t,n,r,i,a){let o=[],s=n-e,c=r-t,l=s/a,u=2*Math.PI/l,d=t+c/2;for(let t=0;t<=50;t++){let n=e+t/50*s,r=d+i*Math.sin(u*(n-e));o.push({x:n,y:r})}return o}o(I,`generateFullSineWavePoints`);function L(e,t,n,r,i,a){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}o(L,`generateCirclePoints`);function ee(e){let t=Array.from(e.childNodes).filter(e=>e.tagName===`path`),n=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),r=t.map(e=>e.getAttribute(`d`)).filter(e=>e!==null).join(` `);n.setAttribute(`d`,r);let i=t.find(e=>e.getAttribute(`fill`)!==`none`),a=t.find(e=>e.getAttribute(`stroke`)!==`none`),s=o((e,t)=>e?.getAttribute(t)??void 0,`getAttr`);if(i){let e={fill:s(i,`fill`),"fill-opacity":s(i,`fill-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&n.setAttribute(e,t)})}if(a){let e={stroke:s(a,`stroke`),"stroke-width":s(a,`stroke-width`)??`1`,"stroke-opacity":s(a,`stroke-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&n.setAttribute(e,t)})}let c=document.createElementNS(`http://www.w3.org/2000/svg`,`g`);return c.appendChild(n),c}o(ee,`mergePaths`);var R=o((e,t)=>{var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2,c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=a===0?0:s*i/a,l=s):(i<0&&(o=-o),c=o,l=i===0?0:o*a/i),{x:n+c,y:r+l}},`intersectRect`),z=o((e,t,n,r,i)=>[`M`,e+i,t,`H`,e+n-i,`A`,i,i,0,0,1,e+n,t+i,`V`,t+r-i,`A`,i,i,0,0,1,e+n-i,t+r,`H`,e+i,`A`,i,i,0,0,1,e,t+r-i,`V`,t+i,`A`,i,i,0,0,1,e+i,t,`Z`].join(` `),`createRoundedRectPathD`),te=o(async(e,t,n,r=!1,i=!1)=>{let a=t||``;typeof a==`object`&&(a=a[0]);let o=m(),s=u(o);return await x(e,a,{style:n,isTitle:r,useHtmlLabels:s,markdown:!1,isNode:i,width:1/0},o)},`createLabel`);function B(e,t){return e.intersect(t)}o(B,`intersectNode`);var ne=B;function V(e,t,n,r){var i=e.x,a=e.y,o=i-r.x,s=a-r.y,c=Math.sqrt(t*t*s*s+n*n*o*o),l=Math.abs(t*n*o/c);r.x<i&&(l=-l);var u=Math.abs(t*n*s/c);return r.y<a&&(u=-u),{x:i+l,y:a+u}}o(V,`intersectEllipse`);var H=V;function re(e,t,n){return H(e,t,t,n)}o(re,`intersectCircle`);var ie=re;function U(e,t,n,r){{let i=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,s=i*n.x+a*n.y+o,c=i*r.x+a*r.y+o,l=1e-6;if(s!==0&&c!==0&&W(s,c))return;let u=r.y-n.y,d=n.x-r.x,f=r.x*n.y-n.x*r.y,p=u*e.x+d*e.y+f,m=u*t.x+d*t.y+f;if(Math.abs(p)<l&&Math.abs(m)<l&&W(p,m))return;let h=i*d-u*a;if(h===0)return;let g=Math.abs(h/2),_=a*f-d*o,v=_<0?(_-g)/h:(_+g)/h;return _=u*o-i*f,{x:v,y:_<0?(_-g)/h:(_+g)/h}}}o(U,`intersectLine`);function W(e,t){return e*t>0}o(W,`sameSign`);var G=U;function ae(e,t,n){let r=e.x,i=e.y,a=[],o=1/0,s=1/0;typeof t.forEach==`function`?t.forEach(function(e){o=Math.min(o,e.x),s=Math.min(s,e.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));let c=r-e.width/2-o,l=i-e.height/2-s;for(let r=0;r<t.length;r++){let i=t[r],o=t[r<t.length-1?r+1:0],s=G(e,n,{x:c+i.x,y:l+i.y},{x:c+o.x,y:l+o.y});s&&a.push(s)}return a.length?(a.length>1&&a.sort(function(e,t){let r=e.x-n.x,i=e.y-n.y,a=Math.sqrt(r*r+i*i),o=t.x-n.x,s=t.y-n.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1}),a[0]):e}o(ae,`intersectPolygon`);var K={node:ne,circle:ie,ellipse:H,polygon:ae,rect:R};function oe(e,t){let{labelStyles:n}=_(t);t.labelStyle=n;let a=P(t),o=a;a||(o=`anchor`);let s=e.insert(`g`).attr(`class`,o).attr(`id`,t.domId||t.id),{cssStyles:c}=t,l=C.svg(s),u=g(t,{fill:`black`,stroke:`none`,fillStyle:`solid`});t.look!==`handDrawn`&&(u.roughness=0);let d=l.circle(0,0,2,u),f=s.insert(()=>d,`:first-child`);return f.attr(`class`,`anchor`).attr(`style`,r(c)),N(t,f),t.intersect=function(e){return i.info(`Circle intersect`,t,1,e),K.circle(t,1,e)},s}o(oe,`anchor`);function se(e,t,n,r,i,a,o){let s=(e+n)/2,c=(t+r)/2,l=Math.atan2(r-t,n-e),u=(n-e)/2,d=(r-t)/2,f=u/i,p=d/a,m=Math.sqrt(f**2+p**2);if(m>1)throw Error(`The given radii are too small to create an arc between the points.`);let h=Math.sqrt(1-m**2),g=s+h*a*Math.sin(l)*(o?-1:1),_=c-h*i*Math.cos(l)*(o?-1:1),v=Math.atan2((t-_)/a,(e-g)/i),y=Math.atan2((r-_)/a,(n-g)/i)-v;o&&y<0&&(y+=2*Math.PI),!o&&y>0&&(y-=2*Math.PI);let b=[];for(let e=0;e<20;e++){let t=v+e/19*y,n=g+i*Math.cos(t),r=_+a*Math.sin(t);b.push({x:n,y:r})}return b}o(se,`generateArcPoints`);function ce(e,t,n){let[r,i]=[t,n].sort((e,t)=>t-e);return i*(1-Math.sqrt(1-(e/r/2)**2))}o(ce,`calculateArcSagitta`);async function le(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,s=t.look===`neo`?12:i,c=o(e=>e+s,`calcTotalHeight`),l=o(e=>{let t=e/2;return[t/(2.5+e/50),t]},`calcEllipseRadius`),{shapeSvg:u,bbox:d}=await j(e,t,P(t)),f=c(t?.height?t?.height:d.height),[p,m]=l(f),h=ce(f,p,m),v=(t?.width?t?.width:d.width)+a*2+h-h,y=f,{cssStyles:b}=t,x=[{x:v/2,y:-y/2},{x:-v/2,y:-y/2},...se(-v/2,-y/2,-v/2,y/2,p,m,!1),{x:v/2,y:y/2},...se(v/2,y/2,v/2,-y/2,p,m,!0)],S=C.svg(u),w=g(t,{});t.look!==`handDrawn`&&(w.roughness=0,w.fillStyle=`solid`);let T=F(x),E=S.path(T,w),D=u.insert(()=>E,`:first-child`);return D.attr(`class`,`basic label-container outer-path`),b&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,b),r&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,r),D.attr(`transform`,`translate(${p/2}, 0)`),N(t,D),t.intersect=function(e){return K.polygon(t,x,e)},u}o(le,`bowTieRect`);async function ue(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=_(t);t.labelStyle=r;let{shapeSvg:a,bbox:s,label:c}=await j(e,t,P(t)),l=n?.nodeBorder??n?.lineColor??`currentColor`,u=t.padding??12,d=Math.max(s.width+u*2,t.width??0,80),f=Math.max(Math.min(d*.08,12),5),p=Math.max(s.height+u*2+f,t.height??0),m=-p/2+f,h=p/2,v=d*.72,y=[`M${-d/2},${m}`,`L${-v/2},${h}`,`A${v/2},${f} 0 0 0 ${v/2},${h}`,`L${d/2},${m}`,`A${d/2},${f} 0 0 0 ${-d/2},${m}`,`Z`].join(` `),{cssStyles:b}=t,x=a.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){let e=C.svg(a).path(y,g(t,{}));x.node()?.appendChild(e),b&&x.attr(`style`,b)}else x.append(`path`).attr(`d`,y).attr(`style`,i);x.append(`ellipse`).attr(`cx`,0).attr(`cy`,m).attr(`rx`,d/2).attr(`ry`,f).attr(`style`,`fill:none;stroke:${l};stroke-width:1px`),N(t,x);let S=m+(h-m)/2;c.attr(`transform`,`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${S-s.height/2-(s.y-(s.top??0))})`);let w=o((e,t,n)=>Array.from({length:13},(r,i)=>{let a=Math.PI-i*Math.PI/12;return{x:e*Math.cos(a),y:t+n*f*Math.sin(a)}}),`arc`),T=[...w(d/2,m,-1),...w(v/2,h,1).reverse()];return t.intersect=function(e){return K.polygon(t,T,e)},a}o(ue,`bucket`);var de=20,fe=8,pe=80,me=8;async function he(e,t){let{themeVariables:n}=m(),i=n.clusterBkg,a=n.clusterBorder,{nodeStyles:o}=_(t),{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=t.padding??8,d=c.height,f=Math.max(c.width+l*2,pe,t?.width??0),p=Math.max(d+fe+de+l*2,t?.height??0),h=-f/2,v=-p/2,y=-(fe+de)/2,b=s.select(`.label`);b&&(t.useHtmlLabels??u(m())?b.attr(`transform`,`translate(${-c.width/2}, ${-c.height/2+y})`):b.attr(`transform`,`translate(0, ${-c.height/2+y})`));let x;if(t.look===`handDrawn`){let e=C.svg(s),n=g(t,{fill:i,stroke:a,fillStyle:`solid`}),o=e.path(z(h,v,f,p,me),n);x=s.insert(()=>o,`:first-child`),x.attr(`class`,`basic label-container collapsed-group`).attr(`style`,r(t.cssStyles))}else x=s.insert(`rect`,`:first-child`),x.attr(`class`,`basic label-container collapsed-group`).attr(`style`,o).attr(`rx`,me).attr(`ry`,me).attr(`x`,h).attr(`y`,v).attr(`width`,f).attr(`height`,p).attr(`fill`,i).attr(`stroke`,a);let S=v+l+d+fe;s.append(`line`).attr(`class`,`collapsed-separator`).attr(`x1`,h+8).attr(`y1`,S).attr(`x2`,h+f-8).attr(`y2`,S).attr(`stroke`,a).attr(`stroke-dasharray`,`3, 3`);let w=S+de/2;for(let e=-1;e<=1;e++)s.append(`circle`).attr(`class`,`collapsed-indicator`).attr(`cx`,e*10).attr(`cy`,w).attr(`r`,2.5).attr(`fill`,a);return N(t,x),t.calcIntersect=function(e,t){return K.rect(e,t)},t.intersect=function(e){return K.rect(t,e)},s}o(he,`collapsedGroup`);function q(e,t,n,r){return e.insert(`polygon`,`:first-child`).attr(`points`,r.map(function(e){return e.x+`,`+e.y}).join(` `)).attr(`class`,`label-container`).attr(`transform`,`translate(`+-t/2+`,`+n/2+`)`)}o(q,`insertPolygonShape`);var ge=[`right`,`left`,`up`,`down`],_e=`point`,ve=o(e=>{let t=new Set;for(let n of e)switch(n){case`x`:t.add(`right`),t.add(`left`);break;case`y`:t.add(`up`),t.add(`down`);break;default:t.add(n)}return t},`expandAndDeduplicateDirections`),ye=o(e=>ge.filter(t=>e.has(t)).join(`|`)||_e,`getDirectionKey`),be={"right|left|up|down":o(({height:e,midpoint:t,padding:n,width:r})=>[{x:0,y:0},{x:t,y:0},{x:r/2,y:2*n},{x:r-t,y:0},{x:r,y:0},{x:r,y:-e/3},{x:r+2*n,y:-e/2},{x:r,y:-2*e/3},{x:r,y:-e},{x:r-t,y:-e},{x:r/2,y:-e-2*n},{x:t,y:-e},{x:0,y:-e},{x:0,y:-2*e/3},{x:-2*n,y:-e/2},{x:0,y:-e/3}],`right|left|up|down`),"right|left|up":o(({height:e,midpoint:t,width:n})=>[{x:t,y:0},{x:n-t,y:0},{x:n,y:-e/2},{x:n-t,y:-e},{x:t,y:-e},{x:0,y:-e/2}],`right|left|up`),"right|left|down":o(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:t,y:-e},{x:n-t,y:-e},{x:n,y:0}],`right|left|down`),"right|up|down":o(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:n,y:-t},{x:n,y:-e+t},{x:0,y:-e}],`right|up|down`),"left|up|down":o(({height:e,midpoint:t,width:n})=>[{x:n,y:0},{x:0,y:-t},{x:0,y:-e+t},{x:n,y:-e}],`left|up|down`),"right|left":o(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:0},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e},{x:0,y:-e/2}],`right|left`),"up|down":o(({height:e,midpoint:t,padding:n,width:r})=>[{x:r/2,y:0},{x:0,y:-n},{x:t,y:-n},{x:t,y:-e+n},{x:0,y:-e+n},{x:r/2,y:-e},{x:r,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n},{x:r,y:-n}],`up|down`),"right|up":o(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:n,y:-t},{x:0,y:-e}],`right|up`),"right|down":o(({height:e,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-e}],`right|down`),"left|up":o(({height:e,midpoint:t,width:n})=>[{x:n,y:0},{x:0,y:-t},{x:n,y:-e}],`left|up`),"left|down":o(({height:e,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-e}],`left|down`),right:o(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:-n},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e+n}],`right`),left:o(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:0},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e},{x:0,y:-e/2}],`left`),up:o(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:-n},{x:t,y:-e+n},{x:0,y:-e+n},{x:r/2,y:-e},{x:r,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n}],`up`),down:o(({height:e,midpoint:t,padding:n,width:r})=>[{x:r/2,y:0},{x:0,y:-n},{x:t,y:-n},{x:t,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n},{x:r,y:-n}],`down`),[_e]:()=>[{x:0,y:0}]},xe=o((e,t,n,r)=>{let i=ve(e),a=(n.padding??0)/2,o=t.height+4*a,s=o/2,c=r??t.width+2*s+2*a;return(be[ye(i)]??be[_e])({height:o,midpoint:s,padding:a,width:c})},`getArrowPoints`);async function Se(e,t){let n=t,{shapeSvg:r,bbox:i}=await j(e,n,P(n)),a=n.padding??0,o=i.height+2*a,s=o/2,c=i.width+2*s+a,l=n.width??0,u=n.positioned&&(n.widthInColumns??1)>1&&l>c?l:c,d=xe(n.directions??[],i,n,u),f=q(r,u,o,d);return f.attr(`style`,n.style??null),N(n,f),n.intersect=function(e){return K.polygon(n,d,e)},r}o(Se,`block_arrow`);async function Ce(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=_(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await j(e,t,P(t)),c=n?.nodeBorder??n?.lineColor??`currentColor`,l=t.padding??12,u=Math.max(o.width+l*2,t.width??0,90),d=Math.max(o.height+l*2+18,t.height??0),f=-d/2,{cssStyles:p}=t,m=a.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){let e=C.svg(a).path(z(-u/2,f,u,d,12),g(t,{}));m.node()?.appendChild(e),p&&m.attr(`style`,p)}else m.append(`rect`).attr(`x`,-u/2).attr(`y`,f).attr(`width`,u).attr(`height`,d).attr(`rx`,12).attr(`ry`,12).attr(`style`,i);m.append(`line`).attr(`x1`,-u/2).attr(`y1`,f+18).attr(`x2`,u/2).attr(`y2`,f+18).attr(`style`,`stroke:${c};stroke-width:1px`);for(let e=0;e<3;e++)m.append(`circle`).attr(`cx`,-u/2+12+e*9).attr(`cy`,f+9).attr(`r`,2.5).attr(`style`,`fill:${c};stroke:none`);m.append(`rect`).attr(`class`,`browser-address-bar`).attr(`x`,-u/2+44).attr(`y`,f+4).attr(`width`,Math.max(u-56,10)).attr(`height`,10).attr(`rx`,3).attr(`ry`,3).attr(`style`,`fill:none;stroke:${c};stroke-width:1px;opacity:0.6`),N(t,m);let h=f+18+(d-18)/2;return s.attr(`transform`,`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${h-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(e){return K.rect(t,e)},a}o(Ce,`browser`);var we=12;async function Te(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?28:i,o=t.look===`neo`?24:i,{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=(t?.width??c.width)+(t.look===`neo`?a*2:a+we),u=(t?.height??c.height)+(t.look===`neo`?o*2:o),d=l,f=-u,p=[{x:0+we,y:f},{x:d,y:f},{x:d,y:0},{x:0,y:0},{x:0,y:f+we},{x:0+we,y:f}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=C.svg(s),n=g(t,{}),r=F(p),i=e.path(r,n);m=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-l/2}, ${u/2})`),h&&m.attr(`style`,h)}else m=q(s,l,u,p);return r&&m.attr(`style`,r),N(t,m),t.intersect=function(e){return K.polygon(t,p,e)},s}o(Te,`card`);function Ee(e,t){let{nodeStyles:n}=_(t);t.label=``;let r=e.insert(`g`).attr(`class`,P(t)).attr(`id`,t.domId??t.id),{cssStyles:i}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],s=C.svg(r),c=g(t,{});t.look!==`handDrawn`&&(c.roughness=0,c.fillStyle=`solid`);let l=F(o),u=s.path(l,c),d=r.insert(()=>u,`:first-child`);return i&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,i),n&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,n),t.width=28,t.height=28,t.intersect=function(e){return K.polygon(t,o,e)},r}o(Ee,`choice`);async function De(e,t,n){let{labelStyles:a,nodeStyles:o}=_(t);t.labelStyle=a;let{shapeSvg:s,bbox:c,halfPadding:l}=await j(e,t,P(t)),u=n?.padding??l,d=t.look===`neo`?c.width/2+32:c.width/2+u,f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=C.svg(s),n=g(t,{}),i=e.circle(0,0,d*2,n);f=s.insert(()=>i,`:first-child`),f.attr(`class`,`basic label-container`).attr(`style`,r(p))}else f=s.insert(`circle`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,o).attr(`r`,d).attr(`cx`,0).attr(`cy`,0);return N(t,f),t.calcIntersect=function(e,t){let n=e.width/2;return K.circle(e,n,t)},t.intersect=function(e){return i.info(`Circle intersect`,t,d,e),K.circle(t,d,e)},s}o(De,`circle`);async function Oe(e,t){let n=t,{shapeSvg:r,bbox:i,halfPadding:a}=await j(e,n,[`node`,n.cssClasses,n.class].filter(Boolean).join(` `)),o=r.insert(`rect`,`:first-child`),s=n.padding??0,c=n.positioned?n.width??0:i.width+s,l=n.positioned?n.height??0:i.height+s,u=n.positioned?-c/2:-i.width/2-a,d=n.positioned?-l/2:-i.height/2-a;return o.attr(`class`,`basic cluster composite label-container`).attr(`style`,n.style??null).attr(`rx`,n.rx??null).attr(`ry`,n.ry??null).attr(`x`,u).attr(`y`,d).attr(`width`,c).attr(`height`,l),N(n,o),n.intersect=function(e){return K.rect(n,e)},r}o(Oe,`composite`);async function ke(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=_(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await j(e,t,P(t)),c=n?.nodeBorder??n?.lineColor??`currentColor`,l=t.padding??12,u=Math.max(o.width+l*2,t.width??0,90),d=Math.max(o.height+l*2+20,t.height??0),f=-d/2,{cssStyles:p}=t,m=a.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){let e=C.svg(a).path(z(-u/2,f,u,d,12),g(t,{}));m.node()?.appendChild(e),p&&m.attr(`style`,p)}else m.append(`rect`).attr(`x`,-u/2).attr(`y`,f).attr(`width`,u).attr(`height`,d).attr(`rx`,12).attr(`ry`,12).attr(`style`,i);m.append(`text`).attr(`x`,-u/2+12).attr(`y`,f+16).attr(`class`,`console-glyph`).attr(`style`,`font-family:monospace;font-weight:bold;font-size:14px;fill:${c}`).text(`>_`),N(t,m);let h=f+20+(d-20)/2;return s.attr(`transform`,`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${h-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(e){return K.rect(t,e)},a}o(ke,`consoleWindow`);function Ae(e){let t=Math.cos(Math.PI/4),n=Math.sin(Math.PI/4),r=e*2,i={x:r/2*t,y:r/2*n},a={x:-(r/2)*t,y:r/2*n},o={x:-(r/2)*t,y:-(r/2)*n},s={x:r/2*t,y:-(r/2)*n};return`M ${a.x},${a.y} L ${s.x},${s.y}
|
|
2
2
|
M ${i.x},${i.y} L ${o.x},${o.y}`}o(Ae,`createLine`);function je(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n,t.label=``;let a=e.insert(`g`).attr(`class`,P(t)).attr(`id`,t.domId??t.id),o=Math.max(30,t?.width??0),{cssStyles:s}=t,c=C.svg(a),l=g(t,{});t.look!==`handDrawn`&&(l.roughness=0,l.fillStyle=`solid`);let u=c.circle(0,0,o*2,l),d=Ae(o),f=c.path(d,l),p=a.insert(()=>u,`:first-child`);return p.insert(()=>f),p.attr(`class`,`outer-path`),s&&t.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,s),r&&t.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,r),N(t,p),t.intersect=function(e){return i.info(`crossedCircle intersect`,t,{radius:o,point:e}),K.circle(t,o,e)},a}o(je,`crossedCircle`);function J(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}o(J,`generateCirclePoints`);async function Me(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await j(e,t,P(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+s,u=a.height+c,d=Math.max(5,u*.1),{cssStyles:f}=t,p=[...J(l/2,-u/2,d,30,-90,0),{x:-l/2-d,y:d},...J(l/2+d*2,-d,d,20,-180,-270),...J(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:-u/2},...J(l/2,u/2,d,20,0,90)],m=[{x:l/2,y:-u/2-d},{x:-l/2,y:-u/2-d},...J(l/2,-u/2,d,20,-90,0),{x:-l/2-d,y:-d},...J(l/2+l*.1,-d,d,20,-180,-270),...J(l/2+l*.1,d,d,20,-90,-180),{x:-l/2-d,y:u/2},...J(l/2,u/2,d,20,0,90),{x:-l/2,y:u/2+d},{x:l/2,y:u/2+d}],h=C.svg(i),v=g(t,{fill:`none`});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let y=F(p).replace(`Z`,``),b=h.path(y,v),x=F(m),S=h.path(x,{...v}),w=i.insert(`g`,`:first-child`);return w.insert(()=>S,`:first-child`).attr(`stroke-opacity`,0),w.insert(()=>b,`:first-child`),w.attr(`class`,`text`),f&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,r),w.attr(`transform`,`translate(${d}, 0)`),o.attr(`transform`,`translate(${-l/2+d-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),N(t,w),t.intersect=function(e){return K.polygon(t,m,e)},i}o(Me,`curlyBraceLeft`);function Y(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:a,y:l})}return o}o(Y,`generateCirclePoints`);async function Ne(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await j(e,t,P(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+(t.look===`neo`?s*2:s),u=a.height+(t.look===`neo`?c*2:c),d=Math.max(5,u*.1),{cssStyles:f}=t,p=[...Y(l/2,-u/2,d,20,-90,0),{x:l/2+d,y:-d},...Y(l/2+d*2,-d,d,20,-180,-270),...Y(l/2+d*2,d,d,20,-90,-180),{x:l/2+d,y:u/2},...Y(l/2,u/2,d,20,0,90)],m=[{x:-l/2,y:-u/2-d},{x:l/2,y:-u/2-d},...Y(l/2,-u/2,d,20,-90,0),{x:l/2+d,y:-d},...Y(l/2+d*2,-d,d,20,-180,-270),...Y(l/2+d*2,d,d,20,-90,-180),{x:l/2+d,y:u/2},...Y(l/2,u/2,d,20,0,90),{x:l/2,y:u/2+d},{x:-l/2,y:u/2+d}],h=C.svg(i),v=g(t,{fill:`none`});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let y=F(p).replace(`Z`,``),b=h.path(y,v),x=F(m),S=h.path(x,{...v}),w=i.insert(`g`,`:first-child`);return w.insert(()=>S,`:first-child`).attr(`stroke-opacity`,0),w.insert(()=>b,`:first-child`),w.attr(`class`,`text`),f&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,r),w.attr(`transform`,`translate(${-d}, 0)`),o.attr(`transform`,`translate(${-l/2+(t.padding??0)/2-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),N(t,w),t.intersect=function(e){return K.polygon(t,m,e)},i}o(Ne,`curlyBraceRight`);function X(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}o(X,`generateCirclePoints`);async function Pe(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await j(e,t,P(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+(t.look===`neo`?s*2:s),u=a.height+(t.look===`neo`?c*2:c),d=Math.max(5,u*.1),{cssStyles:f}=t,p=[...X(l/2,-u/2,d,30,-90,0),{x:-l/2-d,y:d},...X(l/2+d*2,-d,d,20,-180,-270),...X(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:-u/2},...X(l/2,u/2,d,20,0,90)],m=[...X(-l/2+d+d/2,-u/2,d,20,-90,-180),{x:l/2-d/2,y:d},...X(-l/2-d/2,-d,d,20,0,90),...X(-l/2-d/2,d,d,20,-90,0),{x:l/2-d/2,y:-d},...X(-l/2+d+d/2,u/2,d,30,-180,-270)],h=[{x:l/2,y:-u/2-d},{x:-l/2,y:-u/2-d},...X(l/2,-u/2,d,20,-90,0),{x:-l/2-d,y:-d},...X(l/2+d*2,-d,d,20,-180,-270),...X(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:u/2},...X(l/2,u/2,d,20,0,90),{x:-l/2,y:u/2+d},{x:l/2-d-d/2,y:u/2+d},...X(-l/2+d+d/2,-u/2,d,20,-90,-180),{x:l/2-d/2,y:d},...X(-l/2-d/2,-d,d,20,0,90),...X(-l/2-d/2,d,d,20,-90,0),{x:l/2-d/2,y:-d},...X(-l/2+d+d/2,u/2,d,30,-180,-270)],v=C.svg(i),y=g(t,{fill:`none`});t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let b=F(p).replace(`Z`,``),x=v.path(b,y),S=F(m).replace(`Z`,``),w=v.path(S,y),T=F(h),E=v.path(T,{...y}),D=i.insert(`g`,`:first-child`);return D.insert(()=>E,`:first-child`).attr(`stroke-opacity`,0),D.insert(()=>x,`:first-child`),D.insert(()=>w,`:first-child`),D.attr(`class`,`text`),f&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,r),D.attr(`transform`,`translate(${d-d/4}, 0)`),o.attr(`transform`,`translate(${-l/2+(t.padding??0)/2-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),N(t,D),t.intersect=function(e){return K.polygon(t,h,e)},i}o(Pe,`curlyBraces`);async function Fe(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=Math.max(20,(c.width+a*2)*1.25,t?.width??0),u=Math.max(5,c.height+o*2,t?.height??0),d=u/2,{cssStyles:f}=t,p=C.svg(s),m=g(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=l,v=u,y=h-d,b=v/4,x=[{x:y,y:0},{x:b,y:0},{x:0,y:v/2},{x:b,y:v},{x:y,y:v},...L(-y,-v/2,d,50,270,90)],S=F(x),w=p.path(S,m),T=s.insert(()=>w,`:first-child`);return T.attr(`class`,`basic label-container outer-path`),f&&t.look!==`handDrawn`&&T.selectChildren(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&T.selectChildren(`path`).attr(`style`,r),T.attr(`transform`,`translate(${-l/2}, ${-u/2})`),N(t,T),t.intersect=function(e){return K.polygon(t,x,e)},s}o(Fe,`curvedTrapezoid`);async function Ie(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await j(e,t,P(t)),s=t.padding??20,c=Math.max(a.width+s*2,t.width??0,100),l=Math.min(Math.max(c*.23,16),56),u=l*.27,d=Math.max(a.height+s*2,t.height?t.height-(2*l-u):0),f=Math.min(c*.177,d*.45),p=d+2*l-u,m=-p/2,h=m+2*l-u,v=i.insert(`g`,`:first-child`).attr(`class`,`basic label-container`),{cssStyles:y}=t;if(t.look===`handDrawn`){let e=C.svg(i),n=g(t,{}),r=e.path(z(-c/2,h,c,d,f),n),a=e.circle(0,m+l,l*2,n);v.insert(()=>a,`:first-child`),v.insert(()=>r,`:first-child`),y&&v.attr(`style`,y)}else v.append(`rect`).attr(`x`,-c/2).attr(`y`,h).attr(`width`,c).attr(`height`,d).attr(`rx`,f).attr(`ry`,f).attr(`style`,r),v.append(`circle`).attr(`cx`,0).attr(`cy`,m+l).attr(`r`,l).attr(`style`,r);N(t,v);let b=h+d/2;o.attr(`transform`,`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${b-a.height/2-(a.y-(a.top??0))})`);let x=m+l,S=Math.asin(Math.min(1,(h-x)/l))*180/Math.PI,w=[...L(0,-x,l,24,180+S,-S),...L(-(-c/2+f),-(h+f),f,12,90,0),...L(-(-c/2+f),-(p/2-f),f,12,360,270),...L(-(c/2-f),-(p/2-f),f,12,270,180),...L(-(c/2-f),-(h+f),f,12,180,90)];return t.intersect=function(e){return K.polygon(t,w,e)},i}o(Ie,`person`);var Le=o((e,t,n,r,i,a)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`].join(` `),`createCylinderPathD`),Re=o((e,t,n,r,i,a)=>[`M${e},${t+a}`,`M${e+n},${t+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`].join(` `),`createOuterCylinderPathD`),ze=o((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),Be=8,Ve=8;async function He(e,t){let{labelStyles:n,nodeStyles:i}=_(t);t.labelStyle=n;let a=t.padding??0,o=t.look===`neo`?24:a,s=t.look===`neo`?24:a,c=t.width??0;if(t.width&&(t.width-=s,t.width<Ve&&(t.width=Ve)),t.height){let e=c/2/(2.5+c/50);t.height=t.height-o-e*3,t.height<Be&&(t.height=Be)}let{shapeSvg:l,bbox:u,label:d}=await j(e,t,P(t)),f=Math.max(t.width??0,u.width)+s,p=f/2,m=p/(2.5+f/50),h=Math.max(t.height??0,u.height)+o+m,v,{cssStyles:y}=t;if(t.look===`handDrawn`){let e=C.svg(l),n=Re(0,0,f,h,p,m),r=ze(0,m,f,h,p,m),i=g(t,{}),a=e.path(n,i),o=e.path(r,g(t,{fill:`none`}));v=l.insert(()=>o,`:first-child`),v=l.insert(()=>a,`:first-child`),v.attr(`class`,`basic label-container`),y&&v.attr(`style`,y)}else{let e=Le(0,0,f,h,p,m);v=l.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,r(y)).attr(`style`,i)}return v.attr(`label-offset-y`,m),v.attr(`transform`,`translate(${-f/2}, ${-(h/2+m)})`),N(t,v),d.attr(`transform`,`translate(${-(u.width/2)-(u.x-(u.left??0))}, ${-(u.height/2)+(t.padding??0)/1.5-(u.y-(u.top??0))})`),t.intersect=function(e){let n=K.rect(t,e),r=n.x-(t.x??0);if(p!=0&&(Math.abs(r)<(t.width??0)/2||Math.abs(r)==(t.width??0)/2&&Math.abs(n.y-(t.y??0))>(t.height??0)/2-m)){let i=m*m*(1-r*r/(p*p));i>0&&(i=Math.sqrt(i)),i=m-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},l}o(He,`cylinder`);async function Ue(e,t,n){let{labelStyles:i,nodeStyles:a}=_(t);t.labelStyle=i;let{shapeSvg:o,bbox:s}=await j(e,t,P(t)),c=Math.max(s.width+n.labelPaddingX*2,t?.width||0),l=Math.max(s.height+n.labelPaddingY*2,t?.height||0),u=-c/2,d=-l/2,f,{rx:p,ry:m}=t,{cssStyles:h}=t;if(n?.rx&&n.ry&&(p=n.rx,m=n.ry),t.look===`handDrawn`){let e=C.svg(o),n=g(t,{}),i=p||m?e.path(z(u,d,c,l,p||0),n):e.rectangle(u,d,c,l,n);f=o.insert(()=>i,`:first-child`),f.attr(`class`,`basic label-container`).attr(`style`,r(h))}else f=o.insert(`rect`,`:first-child`),f.attr(`class`,`basic label-container`).attr(`style`,a).attr(`rx`,r(p)).attr(`ry`,r(m)).attr(`x`,u).attr(`y`,d).attr(`width`,c).attr(`height`,l);return N(t,f,t.look===`handDrawn`?void 0:{width:c,height:l}),t.calcIntersect=function(e,t){return K.rect(e,t)},t.intersect=function(e){return K.rect(t,e)},o}o(Ue,`drawRect`);async function We(e,t){let{cssClasses:n,labelPaddingX:r,labelPaddingY:i,padding:a,width:o,height:s}=t,c=await Ue(e,t,{rx:0,ry:0,classes:n??``,labelPaddingX:r??(a??0)*2,labelPaddingY:i??a??0});if(t.look===`handDrawn`){let e=C.svg(c),n=g(t,{}),r=c.select(`.basic.label-container > path:nth-child(2)`),i=r.node();if(!i)return c;let a=null;if(i instanceof SVGGraphicsElement)a=i.getBBox();else return c;return c.insert(()=>e.line(a.x,a.y,a.x+a.width,a.y,n),`.basic.label-container g.label`),c.insert(()=>e.line(a.x,a.y+a.height,a.x+a.width,a.y+a.height,n),`.basic.label-container g.label`),r.remove(),c}let l=c.select(`.basic.label-container`),u=(Number(l.attr(`width`))||o)??0,d=(Number(l.attr(`height`))||s)??0;return u>0&&d>0&&l.attr(`stroke-dasharray`,`${u} ${d}`),c}o(We,`datastore`);async function Ge(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?16:t.padding??0,{shapeSvg:o,bbox:s,label:c}=await j(e,t,P(t)),l=s.width+i,u=s.height+a,d=u*.2,f=-l/2,p=-u/2-d/2,{cssStyles:m}=t,h=C.svg(o),v=g(t,{});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let y=[{x:f,y:p+d},{x:-f,y:p+d},{x:-f,y:-p},{x:f,y:-p},{x:f,y:p},{x:-f,y:p},{x:-f,y:p+d}],b=h.polygon(y.map(e=>[e.x,e.y]),v),x=o.insert(()=>b,`:first-child`);return x.attr(`class`,`basic label-container outer-path`),m&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${f+(t.padding??0)/2-(s.x-(s.left??0))}, ${p+d+(t.padding??0)/2-(s.y-(s.top??0))})`),N(t,x),t.intersect=function(e){return K.rect(t,e)},o}o(Ge,`dividedRectangle`);async function Ke(e,t){let{labelStyles:n,nodeStyles:a}=_(t),o=t.look===`neo`?12:5;t.labelStyle=n;let s=t.padding??0,c=t.look===`neo`?16:s,{shapeSvg:l,bbox:u}=await j(e,t,P(t)),d=(t?.width?t?.width/2:u.width/2)+(c??0),f=d-o,p,{cssStyles:m}=t;if(t.look===`handDrawn`){let e=C.svg(l),n=g(t,{roughness:.2,strokeWidth:2.5}),i=g(t,{roughness:.2,strokeWidth:1.5}),a=e.circle(0,0,d*2,n),o=e.circle(0,0,f*2,i);p=l.insert(`g`,`:first-child`),p.attr(`class`,r(t.cssClasses)).attr(`style`,r(m)),p.node()?.appendChild(a),p.node()?.appendChild(o)}else{p=l.insert(`g`,`:first-child`);let e=p.insert(`circle`,`:first-child`),t=p.insert(`circle`);p.attr(`class`,`basic label-container`).attr(`style`,a),e.attr(`class`,`outer-circle`).attr(`style`,a).attr(`r`,d).attr(`cx`,0).attr(`cy`,0),t.attr(`class`,`inner-circle`).attr(`style`,a).attr(`r`,f).attr(`cx`,0).attr(`cy`,0)}return N(t,p),t.intersect=function(e){return i.info(`DoubleCircle intersect`,t,d,e),K.circle(t,d,e)},l}o(Ke,`doublecircle`);function qe(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:a}=_(t);t.label=``,t.labelStyle=r;let o=e.insert(`g`).attr(`class`,P(t)).attr(`id`,t.domId??t.id),{cssStyles:s}=t,c=C.svg(o),{nodeBorder:l}=n,u=g(t,{fillStyle:`solid`});t.look!==`handDrawn`&&(u.roughness=0);let d=c.circle(0,0,14,u),f=o.insert(()=>d,`:first-child`);return f.selectAll(`path`).attr(`style`,`fill: ${l} !important;`),s&&s.length>0&&t.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,s),a&&t.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,a),N(t,f),t.intersect=function(e){return i.info(`filledCircle intersect`,t,{radius:7,point:e}),K.circle(t,7,e)},o}o(qe,`filledCircle`);var Je=10,Ye=10;async function Xe(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let a=t.padding??0,o=t.look===`neo`?a*2:a;(t.width||t.height)&&(t.height=t?.height??0,t.height<Je&&(t.height=Je),t.width=(t?.width??0)-o-o/2,t.width<Ye&&(t.width=Ye));let{shapeSvg:s,bbox:c,label:l}=await j(e,t,P(t)),u=(t?.width?t?.width:c.width)+(o??0),d=t?.height?t?.height:u+c.height,f=d,p=[{x:0,y:-d},{x:f,y:-d},{x:f/2,y:0}],{cssStyles:m}=t,h=C.svg(s),v=g(t,{});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let y=F(p),b=h.path(y,v),x=s.insert(()=>b,`:first-child`).attr(`transform`,`translate(${-d/2}, ${d/2})`).attr(`class`,`outer-path`);return m&&t.look!==`handDrawn`&&x.selectChildren(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&x.selectChildren(`path`).attr(`style`,r),t.width=u,t.height=d,N(t,x),l.attr(`transform`,`translate(${-c.width/2-(c.x-(c.left??0))}, ${-d/2+(t.padding??0)/2+(c.y-(c.top??0))})`),t.intersect=function(e){return i.info(`Triangle intersect`,t,p,e),K.polygon(t,p,e)},s}o(Xe,`flippedTriangle`);async function Ze(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await j(e,t,P(t)),s=t.padding??12,c=Math.max(a.width+s*2,t.width??0,90),l=a.height+s*2,u=Math.max(Math.min(l*.16,14),8),d=Math.max(l+u,t.height??0),f=d-u,p=Math.max(c*.38,28),m=-d/2,h=[{x:-c/2,y:m},{x:-c/2+p,y:m},{x:-c/2+p,y:m+u},{x:c/2,y:m+u},{x:c/2,y:d/2},{x:-c/2,y:d/2}],v=[`M${h[0].x},${h[0].y}`,...h.slice(1).map(e=>`L${e.x},${e.y}`),`Z`].join(` `),{cssStyles:y}=t,b;if(t.look===`handDrawn`){let e=C.svg(i).path(v,g(t,{}));b=i.insert(()=>e,`:first-child`).attr(`class`,`basic label-container`),y&&b.attr(`style`,y)}else b=i.insert(`path`,`:first-child`).attr(`d`,v).attr(`class`,`basic label-container`).attr(`style`,r);t.look===`handDrawn`?N(t,b):N(t,b,{width:c,height:d});let x=m+u+f/2;return o.attr(`transform`,`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${x-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(e){return K.polygon(t,h,e)},i}o(Ze,`folder`);function Qe(e,t,{dir:n,config:{state:r,themeVariables:i}}){let{nodeStyles:a}=_(t);t.label=``;let o=e.insert(`g`).attr(`class`,P(t)).attr(`id`,t.domId??t.id),{cssStyles:s}=t,c=Math.max(70,t?.width??0),l=Math.max(10,t?.height??0);n===`LR`&&(c=Math.max(10,t?.width??0),l=Math.max(70,t?.height??0));let u=-1*c/2,d=-1*l/2,f=C.svg(o),p=g(t,{stroke:i.lineColor,fill:i.lineColor});t.look!==`handDrawn`&&(p.roughness=0,p.fillStyle=`solid`);let m=f.rectangle(u,d,c,l,p),h=o.insert(()=>m,`:first-child`);s&&t.look!==`handDrawn`&&h.selectAll(`path`).attr(`style`,s),a&&t.look!==`handDrawn`&&h.selectAll(`path`).attr(`style`,a),N(t,h);let v=r?.padding??0;return t.width&&t.height&&(t.width+=v/2||0,t.height+=v/2||0),t.intersect=function(e){return K.rect(t,e)},o}o(Qe,`forkJoin`);async function $e(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let a=t.look===`neo`?16:t.padding??0,o=t.look===`neo`?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-o*2,t.height<10&&(t.height=10),t.width=(t?.width??0)-a*2,t.width<15&&(t.width=15));let{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=(t?.width?t?.width:Math.max(15,c.width))+a*2,u=(t?.height?t?.height:Math.max(10,c.height))+o*2,d=u/2,{cssStyles:f}=t,p=C.svg(s),m=g(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=[{x:-l/2,y:-u/2},{x:l/2-d,y:-u/2},...L(-l/2+d,0,d,50,90,270),{x:l/2-d,y:u/2},{x:-l/2,y:u/2}],v=F(h),y=p.path(v,m),b=s.insert(()=>y,`:first-child`);return b.attr(`class`,`basic label-container outer-path`),f&&t.look!==`handDrawn`&&b.selectChildren(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&b.selectChildren(`path`).attr(`style`,r),N(t,b),t.intersect=function(e){return i.info(`Pill intersect`,t,{radius:d,point:e}),K.polygon(t,h,e)},s}o($e,`halfRoundedRectangle`);var et=o((e,t,n,r,i)=>[`M${e+i},${t}`,`L${e+n-i},${t}`,`L${e+n},${t-r/2}`,`L${e+n-i},${t-r}`,`L${e+i},${t-r}`,`L${e},${t-r/2}`,`Z`].join(` `),`createHexagonPathD`);async function tt(e,t){let{labelStyles:n,nodeStyles:r}=_(t),i=t.look===`neo`?3.5:4;t.labelStyle=n;let a=t.padding??0,o=t.look===`neo`?70:a,s=t.look===`neo`?32:a;if(t.width||t.height){let e=(t.height??0)/i;t.width=(t?.width??0)-2*e-s,t.height=(t.height??0)-o}let{shapeSvg:c,bbox:l}=await j(e,t,P(t)),u=(t?.height?t?.height:l.height)+o,d=u/i,f=(t?.width?t?.width:l.width)+2*d+s,p=[{x:d,y:0},{x:f-d,y:0},{x:f,y:-u/2},{x:f-d,y:-u},{x:d,y:-u},{x:0,y:-u/2}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=C.svg(c),n=g(t,{}),r=et(0,0,f,u,d),i=e.path(r,n);m=c.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-f/2}, ${u/2})`),h&&m.attr(`style`,h)}else m=q(c,f,u,p);return r&&m.attr(`style`,r),t.width=f,t.height=u,N(t,m),t.intersect=function(e){return K.polygon(t,p,e)},c}o(tt,`hexagon`);async function nt(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.label=``,t.labelStyle=n;let{shapeSvg:a}=await j(e,t,P(t)),o=Math.max(30,t?.width??0),s=Math.max(30,t?.height??0),{cssStyles:c}=t,l=C.svg(a),u=g(t,{});t.look!==`handDrawn`&&(u.roughness=0,u.fillStyle=`solid`);let d=[{x:0,y:0},{x:o,y:0},{x:0,y:s},{x:o,y:s}],f=F(d),p=l.path(f,u),m=a.insert(()=>p,`:first-child`);return m.attr(`class`,`basic label-container outer-path`),c&&t.look!==`handDrawn`&&m.selectChildren(`path`).attr(`style`,c),r&&t.look!==`handDrawn`&&m.selectChildren(`path`).attr(`style`,r),m.attr(`transform`,`translate(${-o/2}, ${-s/2})`),N(t,m),t.intersect=function(e){return i.info(`Pill intersect`,t,{points:d}),K.polygon(t,d,e)},a}o(nt,`hourglass`);async function rt(e,t,{config:{themeVariables:n,flowchart:r}}){let{labelStyles:a}=_(t);t.labelStyle=a;let o=t.assetHeight??48,s=t.assetWidth??48,c=Math.max(o,s),l=r?.wrappingWidth;t.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,label:f}=await j(e,t,`icon-shape default`),p=t.pos===`t`,m=c,h=c,{nodeBorder:v}=n,{stylesMap:x}=y(t),S=-h/2,w=-m/2,T=t.label?8:0,E=C.svg(u),D=g(t,{stroke:`none`,fill:`none`});t.look!==`handDrawn`&&(D.roughness=0,D.fillStyle=`solid`);let O=E.rectangle(S,w,h,m,D),k=Math.max(h,d.width),A=m+d.height+T,M=E.rectangle(-k/2,-A/2,k,A,{...D,fill:`transparent`,stroke:`none`}),P=u.insert(()=>O,`:first-child`),F=u.insert(()=>M);if(t.icon){let e=u.append(`g`);e.html(`<g>${await b(t.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let n=e.node().getBBox(),r=n.width,i=n.height,a=n.x,o=n.y;e.attr(`transform`,`translate(${-r/2-a},${p?d.height/2+T/2-i/2-o:-d.height/2-T/2-i/2-o})`),e.attr(`style`,`color: ${x.get(`stroke`)??v};`)}return f.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${p?-A/2:A/2-d.height})`),P.attr(`transform`,`translate(0,${p?d.height/2+T/2:-d.height/2-T/2})`),N(t,F),t.intersect=function(e){if(i.info(`iconSquare intersect`,t,e),!t.label)return K.rect(t,e);let n=t.x??0,r=t.y??0,a=t.height??0,o=[];return o=p?[{x:n-d.width/2,y:r-a/2},{x:n+d.width/2,y:r-a/2},{x:n+d.width/2,y:r-a/2+d.height+T},{x:n+h/2,y:r-a/2+d.height+T},{x:n+h/2,y:r+a/2},{x:n-h/2,y:r+a/2},{x:n-h/2,y:r-a/2+d.height+T},{x:n-d.width/2,y:r-a/2+d.height+T}]:[{x:n-h/2,y:r-a/2},{x:n+h/2,y:r-a/2},{x:n+h/2,y:r-a/2+m},{x:n+d.width/2,y:r-a/2+m},{x:n+d.width/2/2,y:r+a/2},{x:n-d.width/2,y:r+a/2},{x:n-d.width/2,y:r-a/2+m},{x:n-h/2,y:r-a/2+m}],K.polygon(t,o,e)},u}o(rt,`icon`);async function it(e,t,{config:{themeVariables:n,flowchart:r}}){let{labelStyles:a}=_(t);t.labelStyle=a;let o=t.assetHeight??48,s=t.assetWidth??48,c=Math.max(o,s),l=r?.wrappingWidth;t.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,label:f}=await j(e,t,`icon-shape default`),p=t.label?8:0,m=t.pos===`t`,{nodeBorder:h,mainBkg:v}=n,{stylesMap:x}=y(t),S=C.svg(u),w=g(t,{});t.look!==`handDrawn`&&(w.roughness=0,w.fillStyle=`solid`),w.stroke=x.get(`fill`)??v;let T=u.append(`g`);t.icon&&T.html(`<g>${await b(t.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let E=T.node().getBBox(),D=E.width,O=E.height,k=E.x,A=E.y,M=Math.max(D,O)*Math.SQRT2+40,P=S.circle(0,0,M,w),F=Math.max(M,d.width),I=M+d.height+p,L=S.rectangle(-F/2,-I/2,F,I,{...w,fill:`transparent`,stroke:`none`}),ee=u.insert(()=>P,`:first-child`),R=u.insert(()=>L);return T.attr(`transform`,`translate(${-D/2-k},${m?d.height/2+p/2-O/2-A:-d.height/2-p/2-O/2-A})`),T.attr(`style`,`color: ${x.get(`stroke`)??h};`),f.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-I/2:I/2-d.height})`),ee.attr(`transform`,`translate(0,${m?d.height/2+p/2:-d.height/2-p/2})`),N(t,R),t.intersect=function(e){return i.info(`iconSquare intersect`,t,e),K.rect(t,e)},u}o(it,`iconCircle`);async function at(e,t,{config:{themeVariables:n,flowchart:r}}){let{labelStyles:a}=_(t);t.labelStyle=a;let o=t.assetHeight??48,s=t.assetWidth??48,c=Math.max(o,s),l=r?.wrappingWidth;t.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,halfPadding:f,label:p}=await j(e,t,`icon-shape default`),m=t.pos===`t`,h=c+f*2,v=c+f*2,{nodeBorder:x,mainBkg:S}=n,{stylesMap:w}=y(t),T=-v/2,E=-h/2,D=t.label?8:0,O=C.svg(u),k=g(t,{});t.look!==`handDrawn`&&(k.roughness=0,k.fillStyle=`solid`),k.stroke=w.get(`fill`)??S;let A=O.path(z(T,E,v,h,5),k),M=Math.max(v,d.width),P=h+d.height+D,F=O.rectangle(-M/2,-P/2,M,P,{...k,fill:`transparent`,stroke:`none`}),I=u.insert(()=>A,`:first-child`).attr(`class`,`icon-shape2`),L=u.insert(()=>F);if(t.icon){let e=u.append(`g`);e.html(`<g>${await b(t.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let n=e.node().getBBox(),r=n.width,i=n.height,a=n.x,o=n.y;e.attr(`transform`,`translate(${-r/2-a},${m?d.height/2+D/2-i/2-o:-d.height/2-D/2-i/2-o})`),e.attr(`style`,`color: ${w.get(`stroke`)??x};`)}return p.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-P/2:P/2-d.height})`),I.attr(`transform`,`translate(0,${m?d.height/2+D/2:-d.height/2-D/2})`),N(t,L),t.intersect=function(e){if(i.info(`iconSquare intersect`,t,e),!t.label)return K.rect(t,e);let n=t.x??0,r=t.y??0,a=t.height??0,o=[];return o=m?[{x:n-d.width/2,y:r-a/2},{x:n+d.width/2,y:r-a/2},{x:n+d.width/2,y:r-a/2+d.height+D},{x:n+v/2,y:r-a/2+d.height+D},{x:n+v/2,y:r+a/2},{x:n-v/2,y:r+a/2},{x:n-v/2,y:r-a/2+d.height+D},{x:n-d.width/2,y:r-a/2+d.height+D}]:[{x:n-v/2,y:r-a/2},{x:n+v/2,y:r-a/2},{x:n+v/2,y:r-a/2+h},{x:n+d.width/2,y:r-a/2+h},{x:n+d.width/2/2,y:r+a/2},{x:n-d.width/2,y:r+a/2},{x:n-d.width/2,y:r-a/2+h},{x:n-v/2,y:r-a/2+h}],K.polygon(t,o,e)},u}o(at,`iconRounded`);async function ot(e,t,{config:{themeVariables:n,flowchart:r}}){let{labelStyles:a}=_(t);t.labelStyle=a;let o=t.assetHeight??48,s=t.assetWidth??48,c=Math.max(o,s),l=r?.wrappingWidth;t.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,halfPadding:f,label:p}=await j(e,t,`icon-shape default`),m=t.pos===`t`,h=c+f*2,v=c+f*2,{nodeBorder:x,mainBkg:S}=n,{stylesMap:w}=y(t),T=-v/2,E=-h/2,D=t.label?8:0,O=C.svg(u),k=g(t,{});t.look!==`handDrawn`&&(k.roughness=0,k.fillStyle=`solid`),k.stroke=w.get(`fill`)??S;let A=O.path(z(T,E,v,h,.1),k),M=Math.max(v,d.width),P=h+d.height+D,F=O.rectangle(-M/2,-P/2,M,P,{...k,fill:`transparent`,stroke:`none`}),I=u.insert(()=>A,`:first-child`),L=u.insert(()=>F);if(t.icon){let e=u.append(`g`);e.html(`<g>${await b(t.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let n=e.node().getBBox(),r=n.width,i=n.height,a=n.x,o=n.y;e.attr(`transform`,`translate(${-r/2-a},${m?d.height/2+D/2-i/2-o:-d.height/2-D/2-i/2-o})`),e.attr(`style`,`color: ${w.get(`stroke`)??x};`)}return p.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-P/2:P/2-d.height})`),I.attr(`transform`,`translate(0,${m?d.height/2+D/2:-d.height/2-D/2})`),N(t,L),t.intersect=function(e){if(i.info(`iconSquare intersect`,t,e),!t.label)return K.rect(t,e);let n=t.x??0,r=t.y??0,a=t.height??0,o=[];return o=m?[{x:n-d.width/2,y:r-a/2},{x:n+d.width/2,y:r-a/2},{x:n+d.width/2,y:r-a/2+d.height+D},{x:n+v/2,y:r-a/2+d.height+D},{x:n+v/2,y:r+a/2},{x:n-v/2,y:r+a/2},{x:n-v/2,y:r-a/2+d.height+D},{x:n-d.width/2,y:r-a/2+d.height+D}]:[{x:n-v/2,y:r-a/2},{x:n+v/2,y:r-a/2},{x:n+v/2,y:r-a/2+h},{x:n+d.width/2,y:r-a/2+h},{x:n+d.width/2/2,y:r+a/2},{x:n-d.width/2,y:r+a/2},{x:n-d.width/2,y:r-a/2+h},{x:n-v/2,y:r-a/2+h}],K.polygon(t,o,e)},u}o(ot,`iconSquare`);async function st(e,t,{config:{flowchart:n}}){let r=new Image;r.src=t?.img??``,await r.decode();let a=Number(r.naturalWidth.toString().replace(`px`,``)),o=Number(r.naturalHeight.toString().replace(`px`,``));t.imageAspectRatio=a/o;let{labelStyles:s}=_(t);t.labelStyle=s;let c=n?.wrappingWidth;t.defaultWidth=n?.wrappingWidth;let l=Math.max(t.label?c??0:0,t?.assetWidth??a),u=t.constraint===`on`&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:l,d=t.constraint===`on`?u/t.imageAspectRatio:t?.assetHeight??o;t.width=Math.max(u,c??0);let{shapeSvg:f,bbox:p,label:m}=await j(e,t,`image-shape default`),h=t.pos===`t`,v=-u/2,y=-d/2,b=t.label?8:0,x=C.svg(f),S=g(t,{});t.look!==`handDrawn`&&(S.roughness=0,S.fillStyle=`solid`);let w=x.rectangle(v,y,u,d,S),T=Math.max(u,p.width),E=d+p.height+b,D=x.rectangle(-T/2,-E/2,T,E,{...S,fill:`none`,stroke:`none`}),O=f.insert(()=>w,`:first-child`),k=f.insert(()=>D);if(t.img){let e=f.append(`image`);e.attr(`href`,t.img),e.attr(`width`,u),e.attr(`height`,d),e.attr(`preserveAspectRatio`,`none`),e.attr(`transform`,`translate(${-u/2},${h?E/2-d:-E/2})`)}return m.attr(`transform`,`translate(${-p.width/2-(p.x-(p.left??0))},${h?-d/2-p.height/2-b/2:d/2-p.height/2+b/2})`),O.attr(`transform`,`translate(0,${h?p.height/2+b/2:-p.height/2-b/2})`),N(t,k),t.intersect=function(e){if(i.info(`iconSquare intersect`,t,e),!t.label)return K.rect(t,e);let n=t.x??0,r=t.y??0,a=t.height??0,o=[];return o=h?[{x:n-p.width/2,y:r-a/2},{x:n+p.width/2,y:r-a/2},{x:n+p.width/2,y:r-a/2+p.height+b},{x:n+u/2,y:r-a/2+p.height+b},{x:n+u/2,y:r+a/2},{x:n-u/2,y:r+a/2},{x:n-u/2,y:r-a/2+p.height+b},{x:n-p.width/2,y:r-a/2+p.height+b}]:[{x:n-u/2,y:r-a/2},{x:n+u/2,y:r-a/2},{x:n+u/2,y:r-a/2+d},{x:n+p.width/2,y:r-a/2+d},{x:n+p.width/2/2,y:r+a/2},{x:n-p.width/2,y:r+a/2},{x:n-p.width/2,y:r-a/2+d},{x:n-u/2,y:r-a/2+d}],K.polygon(t,o,e)},f}o(st,`imageSquare`);async function ct(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=Math.max(c.height+a*2,t.height??0),u=Math.max(c.width+o*2,(t.width??0)-l),d=[{x:0,y:0},{x:u,y:0},{x:u+3*l/6,y:-l},{x:-3*l/6,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=C.svg(s),n=g(t,{}),r=F(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=q(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,N(t,f),t.intersect=function(e){return K.polygon(t,d,e)},s}o(ct,`inv_trapezoid`);async function lt(e,t){let{shapeSvg:n,bbox:r,label:i}=await j(e,t,`label`),a=n.insert(`rect`,`:first-child`);return a.attr(`width`,.1).attr(`height`,.1),n.attr(`class`,`label edgeLabel`),i.attr(`transform`,`translate(${-(r.width/2)-(r.x-(r.left??0))}, ${-(r.height/2)-(r.y-(r.top??0))})`),N(t,a),t.intersect=function(e){return K.rect(t,e)},n}o(lt,`labelRect`);async function ut(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=Math.max(c.height+a,t.height??0),u=Math.max(c.width+o,(t.width??0)-l),d=[{x:0,y:0},{x:u+3*l/6,y:0},{x:u,y:-l},{x:-(3*l)/6,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=C.svg(s),n=g(t,{}),r=F(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=q(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,N(t,f),t.intersect=function(e){return K.polygon(t,d,e)},s}o(ut,`lean_left`);async function dt(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=Math.max(c.height+a,t.height??0),u=Math.max(c.width+o,(t.width??0)-l),d=[{x:-3*l/6,y:0},{x:u,y:0},{x:u+3*l/6,y:-l},{x:0,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=C.svg(s),n=g(t,{}),r=F(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=q(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,N(t,f),t.intersect=function(e){return K.polygon(t,d,e)},s}o(dt,`lean_right`);function ft(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.label=``,t.labelStyle=n;let a=e.insert(`g`).attr(`class`,P(t)).attr(`id`,t.domId??t.id),{cssStyles:o}=t,s=Math.max(35,t?.width??0),c=Math.max(35,t?.height??0),l=[{x:s,y:0},{x:0,y:c+7/2},{x:s-14,y:c+7/2},{x:0,y:2*c},{x:s,y:c-7/2},{x:14,y:c-7/2}],u=C.svg(a),d=g(t,{});t.look!==`handDrawn`&&(d.roughness=0,d.fillStyle=`solid`);let f=F(l),p=u.path(f,d),m=a.insert(()=>p,`:first-child`);return m.attr(`class`,`outer-path`),o&&t.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,o),r&&t.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,r),m.attr(`transform`,`translate(-${s/2},${-c})`),N(t,m),t.intersect=function(e){return i.info(`lightningBolt intersect`,t,e),K.polygon(t,l,e)},a}o(ft,`lightningBolt`);var pt=o((e,t,n,r,i,a,o)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createCylinderPathD`),mt=o((e,t,n,r,i,a,o)=>[`M${e},${t+a}`,`M${e+n},${t+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createOuterCylinderPathD`),ht=o((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),gt=10,_t=10;async function vt(e,t){let{labelStyles:n,nodeStyles:i}=_(t);t.labelStyle=n;let a=t.padding??0,o=t.look===`neo`?16:a,s=t.look===`neo`?24:a;if(t.width||t.height){let e=t.width??0;t.width=(t.width??0)-o,t.width<_t&&(t.width=_t);let n=e/2/(2.5+e/50);t.height=(t.height??0)-s-n*3,t.height<gt&&(t.height=gt)}let{shapeSvg:c,bbox:l,label:u}=await j(e,t,P(t)),d=(t?.width?t?.width:l.width)+o*2,f=d/2,p=f/(2.5+d/50),m=(t?.height?t?.height:l.height)+p+s*2,h=m*.1,v,{cssStyles:y}=t;if(t.look===`handDrawn`){let e=C.svg(c),n=mt(0,0,d,m,f,p,h),r=ht(0,p,d,m,f,p),i=g(t,{}),a=e.path(n,i),o=e.path(r,i);c.insert(()=>o,`:first-child`).attr(`class`,`line`),v=c.insert(()=>a,`:first-child`),v.attr(`class`,`basic label-container`),y&&v.attr(`style`,y)}else{let e=pt(0,0,d,m,f,p,h);v=c.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,r(y)).attr(`style`,i)}return v.attr(`label-offset-y`,p),v.attr(`transform`,`translate(${-d/2}, ${-(m/2+p)})`),N(t,v),u.attr(`transform`,`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+p-(l.y-(l.top??0))})`),t.intersect=function(e){let n=K.rect(t,e),r=n.x-(t.x??0);if(f!=0&&(Math.abs(r)<(t.width??0)/2||Math.abs(r)==(t.width??0)/2&&Math.abs(n.y-(t.y??0))>(t.height??0)/2-p)){let i=p*p*(1-r*r/(f*f));i>0&&(i=Math.sqrt(i)),i=p-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},c}o(vt,`linedCylinder`);async function yt(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.width=(t.width??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-o*2,t.height<10&&(t.height=10));let{shapeSvg:s,bbox:c,label:l}=await j(e,t,P(t)),u=(t?.width?t?.width:c.width)+(a??0)*2,d=(t?.height?t?.height:c.height)+(o??0)*2,f=t.look===`neo`?d/4:d/8,p=d+f,{cssStyles:m}=t,h=C.svg(s),v=g(t,{});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let y=[{x:-u/2-u/2*.1,y:-p/2},{x:-u/2-u/2*.1,y:p/2},...I(-u/2-u/2*.1,p/2,u/2+u/2*.1,p/2,f,.8),{x:u/2+u/2*.1,y:-p/2},{x:-u/2-u/2*.1,y:-p/2},{x:-u/2,y:-p/2},{x:-u/2,y:p/2*1.1},{x:-u/2,y:-p/2}],b=h.polygon(y.map(e=>[e.x,e.y]),v),x=s.insert(()=>b,`:first-child`);return x.attr(`class`,`basic label-container outer-path`),m&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),x.attr(`transform`,`translate(0,${-f/2})`),l.attr(`transform`,`translate(${-u/2+(t.padding??0)+u/2*.1/2-(c.x-(c.left??0))},${-d/2+(t.padding??0)-f/2-(c.y-(c.top??0))})`),N(t,x),t.intersect=function(e){return K.polygon(t,y,e)},s}o(yt,`linedWaveEdgedRect`);async function bt(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,s=t.look===`neo`?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2-2*s,10),t.height=Math.max((t?.height??0)-o*2-2*s,10));let{shapeSvg:c,bbox:l,label:u}=await j(e,t,P(t)),d=(t?.width?t?.width:l.width)+a*2+2*s,f=(t?.height?t?.height:l.height)+o*2+2*s,p=d-2*s,m=f-2*s,h=-p/2,v=-m/2,{cssStyles:y}=t,b=C.svg(c),x=g(t,{}),S=[{x:h-s,y:v+s},{x:h-s,y:v+m+s},{x:h+p-s,y:v+m+s},{x:h+p-s,y:v+m},{x:h+p,y:v+m},{x:h+p,y:v+m-s},{x:h+p+s,y:v+m-s},{x:h+p+s,y:v-s},{x:h+s,y:v-s},{x:h+s,y:v},{x:h,y:v},{x:h,y:v+s}],w=[{x:h,y:v+s},{x:h+p-s,y:v+s},{x:h+p-s,y:v+m},{x:h+p,y:v+m},{x:h+p,y:v},{x:h,y:v}];t.look!==`handDrawn`&&(x.roughness=0,x.fillStyle=`solid`);let T=F(S),E=b.path(T,x),D=F(w),O=b.path(D,x);t.look!==`handDrawn`&&(E=ee(E),O=ee(O));let k=c.insert(`g`,`:first-child`);return k.insert(()=>E),k.insert(()=>O),k.attr(`class`,`basic label-container outer-path`),y&&t.look!==`handDrawn`&&k.selectAll(`path`).attr(`style`,y),r&&t.look!==`handDrawn`&&k.selectAll(`path`).attr(`style`,r),u.attr(`transform`,`translate(${-(l.width/2)-s-(l.x-(l.left??0))}, ${-(l.height/2)+s-(l.y-(l.top??0))})`),N(t,k),t.intersect=function(e){return K.polygon(t,S,e)},c}o(bt,`multiRect`);async function xt(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await j(e,t,P(t)),s=t.padding??0,c=t.look===`neo`?16:s,l=t.look===`neo`?12:s,u=!0;(t.width||t.height)&&(u=!1,t.width=(t?.width??0)-c*2,t.height=(t?.height??0)-l*3);let d=Math.max(a.width,t?.width??0)+c*2,f=Math.max(a.height,t?.height??0)+l*3,p=t.look===`neo`?f/4:f/8,m=f+(u?p/2:-p/2),h=-d/2,v=-m/2,{cssStyles:y}=t,b=I(h-10,v+m+10,h+d-10,v+m+10,p,.8),x=b?.[b.length-1],S=[{x:h-10,y:v+10},{x:h-10,y:v+m+10},...b,{x:h+d-10,y:x.y-10},{x:h+d,y:x.y-10},{x:h+d,y:x.y-20},{x:h+d+10,y:x.y-20},{x:h+d+10,y:v-10},{x:h+10,y:v-10},{x:h+10,y:v},{x:h,y:v},{x:h,y:v+10}],w=[{x:h,y:v+10},{x:h+d-10,y:v+10},{x:h+d-10,y:x.y-10},{x:h+d,y:x.y-10},{x:h+d,y:v},{x:h,y:v}],T=C.svg(i),E=g(t,{});t.look!==`handDrawn`&&(E.roughness=0,E.fillStyle=`solid`);let D=F(S),O=T.path(D,E),k=F(w),A=T.path(k,E),M=i.insert(()=>O,`:first-child`);return M.insert(()=>A),M.attr(`class`,`basic label-container outer-path`),y&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,y),r&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,r),M.attr(`transform`,`translate(0,${-p/2})`),o.attr(`transform`,`translate(${-(a.width/2)-10-(a.x-(a.left??0))}, ${-(a.height/2)+10-p/2-(a.y-(a.top??0))})`),N(t,M),t.intersect=function(e){return K.polygon(t,S,e)},i}o(xt,`multiWaveEdgedRectangle`);async function St(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=_(t);t.labelStyle=r,t.useHtmlLabels||u(d())||(t.centerLabel=!0);let{shapeSvg:a,bbox:o,label:s}=await j(e,t,P(t)),c=Math.max(o.width+(t.padding??0)*2,t?.width??0),l=Math.max(o.height+(t.padding??0)*2,t?.height??0),f=-c/2,p=-l/2,{cssStyles:m}=t,h=C.svg(a),v=g(t,{fill:n.noteBkgColor,stroke:n.noteBorderColor});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let y=h.rectangle(f,p,c,l,v),b=a.insert(()=>y,`:first-child`);return b.attr(`class`,`basic label-container outer-path`),s.attr(`class`,`label noteLabel`),m&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,m),i&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,i),s.attr(`transform`,`translate(${-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),N(t,b),t.intersect=function(e){return K.rect(t,e)},a}o(St,`note`);var Ct=o((e,t,n)=>[`M${e+n/2},${t}`,`L${e+n},${t-n/2}`,`L${e+n/2},${t-n}`,`L${e},${t-n/2}`,`Z`].join(` `),`createDecisionBoxPathD`);async function wt(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await j(e,t,P(t)),o=a.width+(t.padding??0)+(a.height+(t.padding??0)),s=.5,c=[{x:o/2,y:0},{x:o,y:-o/2},{x:o/2,y:-o},{x:0,y:-o/2}],l,{cssStyles:u}=t;if(t.look===`handDrawn`){let e=C.svg(i),n=g(t,{}),r=Ct(0,0,o),a=e.path(r,n);l=i.insert(()=>a,`:first-child`).attr(`transform`,`translate(${-o/2+s}, ${o/2})`),u&&l.attr(`style`,u)}else l=q(i,o,o,c),l.attr(`transform`,`translate(${-o/2+s}, ${o/2})`);return r&&l.attr(`style`,r),N(t,l),t.calcIntersect=function(e,t){let n=e.width,r=[{x:n/2,y:0},{x:n,y:-n/2},{x:n/2,y:-n},{x:0,y:-n/2}],i=K.polygon(e,r,t);return{x:i.x-.5,y:i.y-.5}},t.intersect=function(e){return this.calcIntersect(t,e)},i}o(wt,`question`);async function Tt(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?21:i??0,o=t.look===`neo`?12:i??0,{shapeSvg:s,bbox:c,label:l}=await j(e,t,P(t)),u=c.width+(t.look===`neo`?a*2:a),d=Math.max(c.height+(t.look===`neo`?o*2:o),t.height??0),f=d/4,p=-Math.max(u,(t.width??0)-f)/2,m=-d/2,h=m/2,v=[{x:p+h,y:m},{x:p,y:0},{x:p+h,y:-m},{x:-p,y:-m},{x:-p,y:m}],{cssStyles:y}=t,b=C.svg(s),x=g(t,{});t.look!==`handDrawn`&&(x.roughness=0,x.fillStyle=`solid`);let S=F(v),w=b.path(S,x),T=s.insert(()=>w,`:first-child`);return T.attr(`class`,`basic label-container outer-path`),y&&t.look!==`handDrawn`&&T.selectAll(`path`).attr(`style`,y),r&&t.look!==`handDrawn`&&T.selectAll(`path`).attr(`style`,r),T.attr(`transform`,`translate(${-h/2},0)`),l.attr(`transform`,`translate(${-h/2-c.width/2-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),N(t,T),t.intersect=function(e){return K.polygon(t,v,e)},s}o(Tt,`rect_left_inv_arrow`);async function Et(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let o;o=t.cssClasses?`node `+t.cssClasses:`node default`;let s=e.insert(`g`).attr(`class`,o).attr(`id`,t.domId||t.id),c=s.insert(`g`),l=s.insert(`g`).attr(`class`,`label`).attr(`style`,r),d=t.description,f=t.label,p=await te(l,f,t.labelStyle,!0,!0),h={width:0,height:0};if(u(m())){let e=p.children[0],t=a(p);h=e.getBoundingClientRect(),t.attr(`width`,h.width),t.attr(`height`,h.height)}i.info(`Text 2`,d);let v=d||[],y=p.getBBox(),b=await te(l,Array.isArray(v)?v.join(`<br/>`):v,t.labelStyle,!0,!0),x=b.children[0],S=a(b);h=x.getBoundingClientRect(),S.attr(`width`,h.width),S.attr(`height`,h.height);let w=(t.padding||0)/2;a(b).attr(`transform`,`translate( `+(h.width>y.width?0:(y.width-h.width)/2)+`, `+(y.height+w+5)+`)`),a(p).attr(`transform`,`translate( `+(h.width<y.width?0:-(y.width-h.width)/2)+`, 0)`),h=l.node().getBBox(),l.attr(`transform`,`translate(`+-h.width/2+`, `+(-h.height/2-w+3)+`)`);let T=h.width+(t.padding||0),E=h.height+(t.padding||0),D=-h.width/2-w,O=-h.height/2-w,k,A;if(t.look===`handDrawn`){let e=C.svg(s),n=g(t,{}),r=e.path(z(D,O,T,E,t.rx||0),n),a=e.line(-h.width/2-w,-h.height/2-w+y.height+w,h.width/2+w,-h.height/2-w+y.height+w,n);A=s.insert(()=>(i.debug(`Rough node insert CXC`,r),a),`:first-child`),k=s.insert(()=>(i.debug(`Rough node insert CXC`,r),r),`:first-child`)}else k=c.insert(`rect`,`:first-child`),A=c.insert(`line`),k.attr(`class`,`outer title-state`).attr(`style`,r).attr(`x`,-h.width/2-w).attr(`y`,-h.height/2-w).attr(`width`,h.width+(t.padding||0)).attr(`height`,h.height+(t.padding||0)),A.attr(`class`,`divider`).attr(`x1`,-h.width/2-w).attr(`x2`,h.width/2+w).attr(`y1`,-h.height/2-w+y.height+w).attr(`y2`,-h.height/2-w+y.height+w);return N(t,k),t.intersect=function(e){return K.rect(t,e)},s}o(Et,`rectWithTitle`);async function Dt(e,t,{config:{themeVariables:n}}){let r=n?.radius??5;return Ue(e,t,{rx:r,ry:r,classes:``,labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1})}o(Dt,`roundedRect`);var Z=8;async function Ot(e,t){let{labelStyles:n,nodeStyles:i}=_(t);t.labelStyle=n;let a=t.look===`neo`?16:t.padding??0,o=t.look===`neo`?12:t.padding??0,{shapeSvg:s,bbox:c,label:l}=await j(e,t,P(t)),u=(t?.width??c.width)+a*2+(t.look===`neo`?Z:Z*2),d=(t?.height??c.height)+o*2,f=u-Z,p=d,m=Z-u/2,h=-d/2,{cssStyles:v}=t,y=C.svg(s),b=g(t,{});t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let x=[{x:m,y:h},{x:m+f,y:h},{x:m+f,y:h+p},{x:m-Z,y:h+p},{x:m-Z,y:h},{x:m,y:h},{x:m,y:h+p}],S=y.polygon(x.map(e=>[e.x,e.y]),b),w=s.insert(()=>S,`:first-child`);return w.attr(`class`,`basic label-container outer-path`).attr(`style`,r(v)),i&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,i),v&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,i),l.attr(`transform`,`translate(${Z/2-c.width/2-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),N(t,w),t.intersect=function(e){return K.rect(t,e)},s}o(Ot,`shadedProcess`);async function kt(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2,10),t.height=Math.max((t?.height??0)/1.5-o*2,10));let{shapeSvg:s,bbox:c,label:l}=await j(e,t,P(t)),u=(t?.width?t?.width:c.width)+a*2,d=((t?.height?t?.height:c.height)+o*2)*1.5,f=u,p=d/1.5,m=-f/2,h=-p/2,{cssStyles:v}=t,y=C.svg(s),b=g(t,{});t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let x=[{x:m,y:h},{x:m,y:h+p},{x:m+f,y:h+p},{x:m+f,y:h-p/2}],S=F(x),w=y.path(S,b),T=s.insert(()=>w,`:first-child`);return T.attr(`class`,`basic label-container outer-path`),v&&t.look!==`handDrawn`&&T.selectChildren(`path`).attr(`style`,v),r&&t.look!==`handDrawn`&&T.selectChildren(`path`).attr(`style`,r),T.attr(`transform`,`translate(0, ${p/4})`),l.attr(`transform`,`translate(${-f/2+(t.padding??0)-(c.x-(c.left??0))}, ${-p/4+(t.padding??0)-(c.y-(c.top??0))})`),N(t,T),t.intersect=function(e){return K.polygon(t,x,e)},s}o(kt,`slopedRect`);async function At(e,t){let n=t.padding??0,r=t.look===`neo`?16:n*2,i=t.look===`neo`?12:n;return Ue(e,t,{rx:0,ry:0,classes:``,labelPaddingX:t.labelPaddingX??r,labelPaddingY:i})}o(At,`squareRect`);async function jt(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?20:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=c.height+(t.look===`neo`?o*2:o),u=c.width+l/4+(t.look===`neo`?a*2:a),d=l/2,{cssStyles:f}=t,p=C.svg(s),m=g(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=[{x:-u/2+d,y:-l/2},{x:u/2-d,y:-l/2},...L(-u/2+d,0,d,50,90,270),{x:u/2-d,y:l/2},...L(u/2-d,0,d,50,270,450)],v=F(h),y=p.path(v,m),b=s.insert(()=>y,`:first-child`);return b.attr(`class`,`basic label-container outer-path`),f&&t.look!==`handDrawn`&&b.selectChildren(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&b.selectChildren(`path`).attr(`style`,r),N(t,b),t.intersect=function(e){return K.polygon(t,h,e)},s}o(jt,`stadium`);async function Mt(e,t){return Ue(e,t,{rx:t.look===`neo`?3:5,ry:t.look===`neo`?3:5,classes:`flowchart-node`})}o(Mt,`state`);function Nt(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=_(t);t.labelStyle=r;let{cssStyles:a}=t,{lineColor:o,stateBorder:s,nodeBorder:c,nodeShadow:l}=n;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||=14,t.height||=14;let u=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId??t.id),d=C.svg(u),f=g(t,{});t.look!==`handDrawn`&&(f.roughness=0,f.fillStyle=`solid`);let p=d.circle(0,0,t.width,{...f,stroke:o,strokeWidth:2}),m=s??c,h=(t.width??0)*5/14,v=d.circle(0,0,h,{...f,fill:m,stroke:m,strokeWidth:2,fillStyle:`solid`}),y=u.insert(()=>p,`:first-child`);if(y.insert(()=>v),t.look!==`handDrawn`&&y.attr(`class`,`outer-path`),a&&y.selectAll(`path`).attr(`style`,a),i&&y.selectAll(`path`).attr(`style`,i),t.width<25&&l&&t.look!==`handDrawn`){let t=e.node()?.ownerSVGElement?.id??``,n=t?`${t}-drop-shadow-small`:`drop-shadow-small`;y.attr(`style`,`filter:url(#${n})`)}return N(t,y),t.intersect=function(e){return K.circle(t,(t.width??0)/2,e)},u}o(Nt,`stateEnd`);function Pt(e,t,{config:{themeVariables:n}}){let{lineColor:r,nodeShadow:i}=n;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||=14,t.height||=14;let a=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId||t.id),o;if(t.look===`handDrawn`){let e=C.svg(a).circle(0,0,t.width,v(r));o=a.insert(()=>e),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&&i&&t.look!==`handDrawn`){let t=e.node()?.ownerSVGElement?.id??``,n=t?`${t}-drop-shadow-small`:`drop-shadow-small`;o.attr(`style`,`filter:url(#${n})`)}return N(t,o),t.intersect=function(e){return K.circle(t,(t.width??7)/2,e)},a}o(Pt,`stateStart`);var Ft=8;async function It(e,t){let{labelStyles:n,nodeStyles:i}=_(t);t.labelStyle=n;let a=t?.padding??8,o=t.look===`neo`?28:a,s=t.look===`neo`?12:a,{shapeSvg:c,bbox:l}=await j(e,t,P(t)),u=Math.max(l.width+2*Ft+o,t.width??0),d=Math.max(l.height+s,t.height??0),f=u-2*Ft,p=d,m=-u/2,h=-d/2,v=[{x:0,y:0},{x:f,y:0},{x:f,y:-p},{x:0,y:-p},{x:0,y:0},{x:-8,y:0},{x:f+8,y:0},{x:f+8,y:-p},{x:-8,y:-p},{x:-8,y:0}];if(t.look===`handDrawn`){let e=C.svg(c),n=g(t,{}),i=e.rectangle(m,h,f+16,p,n),a=e.line(m+Ft,h,m+Ft,h+p,n),o=e.line(m+Ft+f,h,m+Ft+f,h+p,n);c.insert(()=>a,`:first-child`),c.insert(()=>o,`:first-child`);let s=c.insert(()=>i,`:first-child`),{cssStyles:l}=t;s.attr(`class`,`basic label-container`).attr(`style`,r(l)),N(t,s)}else{let e=q(c,f,p,v);i&&e.attr(`style`,i),N(t,e)}return t.intersect=function(e){return K.polygon(t,v,e)},c}o(It,`subroutine`);var Lt=.2;async function Rt(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-o*2,10),t.width=Math.max((t?.width??0)-a*2-Lt*(t.height+o*2),10));let{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=(t?.height?t?.height:c.height)+o*2,u=Lt*l,d=Lt*l,f=(t?.width?t?.width:c.width)+a*2+u-u,p=l,m=-f/2,h=-p/2,{cssStyles:v}=t,y=C.svg(s),b=g(t,{}),x=[{x:m-u/2,y:h},{x:m+f+u/2,y:h},{x:m+f+u/2,y:h+p},{x:m-u/2,y:h+p}],S=[{x:m+f-u/2,y:h+p},{x:m+f+u/2,y:h+p},{x:m+f+u/2,y:h+p-d}];t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let w=F(x),T=y.path(w,b),E=F(S),D=y.path(E,{...b,fillStyle:`solid`}),O=s.insert(()=>D,`:first-child`);return O.insert(()=>T,`:first-child`),O.attr(`class`,`basic label-container outer-path`),v&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,v),r&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,r),N(t,O),t.intersect=function(e){return K.polygon(t,x,e)},s}o(Rt,`taggedRect`);async function zt(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await j(e,t,P(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=c/8,u=.2*s,d=.2*c,f=c+l,{cssStyles:p}=t,m=C.svg(i),h=g(t,{});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let v=[{x:-s/2-s/2*.1,y:f/2},...I(-s/2-s/2*.1,f/2,s/2+s/2*.1,f/2,l,.8),{x:s/2+s/2*.1,y:-f/2},{x:-s/2-s/2*.1,y:-f/2}],y=-s/2+s/2*.1,b=-f/2-d*.4,x=[{x:y+s-u,y:(b+c)*1.3},{x:y+s,y:b+c-d},{x:y+s,y:(b+c)*.9},...I(y+s,(b+c)*1.25,y+s-u,(b+c)*1.3,-c*.02,.5)],S=F(v),w=m.path(S,h),T=F(x),E=m.path(T,{...h,fillStyle:`solid`}),D=i.insert(()=>E,`:first-child`);return D.insert(()=>w,`:first-child`),D.attr(`class`,`basic label-container outer-path`),p&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,r),D.attr(`transform`,`translate(0,${-l/2})`),o.attr(`transform`,`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-l/2-(a.y-(a.top??0))})`),N(t,D),t.intersect=function(e){return K.polygon(t,v,e)},i}o(zt,`taggedWaveEdgedRectangle`);async function Bt(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await j(e,t,P(t)),o=Math.max(a.width+(t.padding??0),t?.width||0),s=Math.max(a.height+(t.padding??0),t?.height||0),c=-o/2,l=-s/2,u=i.insert(`rect`,`:first-child`);return u.attr(`class`,`text`).attr(`style`,r).attr(`rx`,0).attr(`ry`,0).attr(`x`,c).attr(`y`,l).attr(`width`,o).attr(`height`,s),N(t,u),t.intersect=function(e){return K.rect(t,e)},i}o(Bt,`text`);var Vt=o((e,t,n,r,i,a)=>`M${e},${t}
|
|
3
3
|
a${i},${a} 0,0,1 0,${-r}
|
|
4
4
|
l${n},0
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Hr as e,Vr as t}from"./split-url-Ds_SbiRI.js";import{n,t as r}from"./src-KUZZYZBk.js";import{n as i}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{R as a,h as o,p as s,r as c,s as l}from"./chunk-DU6HZSFF-DTVWCdhx.js";import{s as u}from"./html-BYfTdFQ4.js";import{t as d}from"./dist-CN30VTUJ.js";function f(e){if(typeof e!=`object`||!e)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!==`[object Object]`){let t=e[Symbol.toStringTag];return t==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${t}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function ee(){}function te(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}var ne=`[object RegExp]`,p=`[object String]`,m=`[object Number]`,h=`[object Boolean]`,g=`[object Arguments]`,re=`[object Symbol]`,ie=`[object Date]`,_=`[object Map]`,v=`[object Set]`,y=`[object Array]`,b=`[object ArrayBuffer]`,ae=`[object Object]`,oe=`[object DataView]`,se=`[object Uint8Array]`,ce=`[object Uint8ClampedArray]`,le=`[object Uint16Array]`,ue=`[object Uint32Array]`,de=`[object Int8Array]`,fe=`[object Int16Array]`,pe=`[object Int32Array]`,me=`[object Float32Array]`,he=`[object Float64Array]`,ge=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})();function x(e){return ge.Buffer!==void 0&&ge.Buffer.isBuffer(e)}function _e(e){return Number.isSafeInteger(e)&&e>=0}function ve(e){return e!=null&&typeof e!=`function`&&_e(e.length)}function ye(e){return e===`__proto__`}function S(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function C(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function be(e,t){return w(e,void 0,e,new Map,t)}function w(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(S(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=w(e[a],a,n,r,i);return Object.hasOwn(e,`index`)&&(t.index=e.index),Object.hasOwn(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;r.set(e,t);for(let[a,o]of e)t.set(a,w(o,a,n,r,i));return t}if(e instanceof Set){let t=new Set;r.set(e,t);for(let a of e)t.add(w(a,void 0,n,r,i));return t}if(x(e))return e.subarray();if(C(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=w(e[a],a,n,r,i);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),T(t,e,n,r,i),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),T(t,e,n,r,i),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),T(t,e,n,r,i),t}if(e instanceof Error){let t=structuredClone(e);return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,T(t,e,n,r,i),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),T(t,e,n,r,i),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),T(t,e,n,r,i),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),T(t,e,n,r,i),t}if(typeof e==`object`&&xe(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),T(t,e,n,r,i),t}return e}function T(e,t,n=e,r,i){let a=[...Object.keys(t),...te(t)];for(let o=0;o<a.length;o++){let s=a[o],c=Object.getOwnPropertyDescriptor(e,s);(c==null||c.writable)&&(e[s]=w(t[s],s,n,r,i))}}function xe(t){switch(e(t)){case g:case y:case b:case oe:case h:case ie:case me:case he:case de:case fe:case pe:case _:case m:case ae:case ne:case v:case p:case re:case se:case ce:case le:case ue:return!0;default:return!1}}function Se(t,n){return be(t,(r,i,a,o)=>{let s=n?.(r,i,a,o);if(s!==void 0)return s;if(typeof t==`object`){if(e(t)===`[object Object]`&&typeof t.constructor!=`function`){let e={};return o.set(t,e),T(e,t,a,o),e}switch(Object.prototype.toString.call(t)){case m:case p:case h:{let e=new t.constructor(t?.valueOf());return T(e,t),e}case g:{let e={};return T(e,t),e.length=t.length,e[Symbol.iterator]=t[Symbol.iterator],e}default:return}}})}function Ce(e){return Se(e)}function E(t){return typeof t==`object`&&!!t&&e(t)===`[object Arguments]`}function we(e){return t(e)&&ve(e)}function D(e){return C(e)}function O(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(`Expected a function`);let n=function(...r){let i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);let o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(O.Cache||Map),n}O.Cache=Map;function Te(e){if(S(e))return e;if(Array.isArray(e)||C(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);let n=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new n(e);if(e instanceof RegExp){let t=new n(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new n(e.buffer.slice(0));if(e instanceof Error){let t;return t=e instanceof AggregateError?new n(e.errors,e.message,{cause:e.cause}):new n(e.message,{cause:e.cause}),t.stack=e.stack,Object.assign(t,e),t}return typeof File<`u`&&e instanceof File?new n([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e==`object`?Object.assign(Object.create(t),e):e}function Ee(e,...t){let n=t.slice(0,-1),r=t[t.length-1],i=e;for(let e=0;e<n.length;e++){let t=n[e];i=k(i,t,r,new Map)}return i}function k(e,n,r,i){if(S(e)&&(e=Object(e)),typeof n!=`object`||!n)return e;if(i.has(n))return Te(i.get(n));if(i.set(n,e),Array.isArray(n)){n=n.slice();for(let e=0;e<n.length;e++)e in n||(n[e]=void 0)}let a=[...Object.keys(n),...te(n)];for(let o=0;o<a.length;o++){let s=a[o];if(ye(s))continue;let c=n[s],l=e[s];if(E(c)&&(c={...c}),E(l)&&(l={...l}),x(c)&&(c=Ce(c)),Array.isArray(c)){if(Array.isArray(l)){let e=[],t=Reflect.ownKeys(l);for(let n=0;n<t.length;n++){let r=t[n];e[r]=l[r]}l=e}else if(we(l)){let e=[];for(let t=0;t<l.length;t++)e[t]=l[t];l=e}else l=[]}let u=r(l,c,s,e,n,i);u===void 0?Array.isArray(c)||t(l)&&t(c)&&(f(l)||f(c)||D(l)||D(c))?e[s]=k(l,c,r,i):l==null&&f(c)?e[s]=k({},c,r,i):l==null&&D(c)?e[s]=Ce(c):(l===void 0||c!==void 0)&&(e[s]=c):e[s]=u}return e}function De(e,...t){return Ee(e,...t,ee)}var A=class{constructor(e,t){this._context=e,this._x=t}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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}};function j(e){return new A(e,!0)}function Oe(e){return new A(e,!1)}function M(){}function N(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function P(e){this._context=e}P.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:N(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:N(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ke(e){return new P(e)}function Ae(e){this._context=e}Ae.prototype={areaStart:M,areaEnd:M,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:N(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function je(e){return new Ae(e)}function Me(e){this._context=e}Me.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:N(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ne(e){return new Me(e)}function Pe(e,t){this._basis=new P(e),this._beta=t}Pe.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],a=e[n]-r,o=t[n]-i,s=-1,c;++s<=n;)c=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+c*a),this._beta*t[s]+(1-this._beta)*(i+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var Fe=(function e(t){function n(e){return t===1?new P(e):new Pe(e,t)}return n.beta=function(t){return e(+t)},n})(.85);function F(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function I(e,t){this._context=e,this._k=(1-t)/6}I.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:F(this,this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:F(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Ie=(function e(t){function n(e){return new I(e,t)}return n.tension=function(t){return e(+t)},n})(0);function L(e,t){this._context=e,this._k=(1-t)/6}L.prototype={areaStart:M,areaEnd:M,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:F(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Le=(function e(t){function n(e){return new L(e,t)}return n.tension=function(t){return e(+t)},n})(0);function R(e,t){this._context=e,this._k=(1-t)/6}R.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:F(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Re=(function e(t){function n(e){return new R(e,t)}return n.tension=function(t){return e(+t)},n})(0);function z(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>1e-12){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*l+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function ze(e,t){this._context=e,this._alpha=t}ze.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:z(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var B=(function e(t){function n(e){return t?new ze(e,t):new I(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function Be(e,t){this._context=e,this._alpha=t}Be.prototype={areaStart:M,areaEnd:M,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:z(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Ve=(function e(t){function n(e){return t?new Be(e,t):new L(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function He(e,t){this._context=e,this._alpha=t}He.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:z(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Ue=(function e(t){function n(e){return t?new He(e,t):new R(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function We(e){this._context=e}We.prototype={areaStart:M,areaEnd:M,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Ge(e){return new We(e)}function Ke(e){return e<0?-1:1}function qe(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(Ke(a)+Ke(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Je(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function V(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function H(e){this._context=e}H.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:V(this,this._t0,Je(this,this._t0))}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,e!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,V(this,Je(this,n=qe(this,e,t)),n);break;default:V(this,this._t0,n=qe(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Ye(e){this._context=new Xe(e)}(Ye.prototype=Object.create(H.prototype)).point=function(e,t){H.prototype.point.call(this,t,e)};function Xe(e){this._context=e}Xe.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function Ze(e){return new H(e)}function Qe(e){return new Ye(e)}function $e(e){this._context=e}$e.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n){if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=et(e),i=et(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o])}(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function et(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function tt(e){return new $e(e)}function U(e,t){this._context=e,this._t=t}U.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};function nt(e){return new U(e,.5)}function rt(e){return new U(e,0)}function it(e){return new U(e,1)}var at=d(),ot={curveBasis:ke,curveBasisClosed:je,curveBasisOpen:Ne,curveBumpX:j,curveBumpY:Oe,curveBundle:Fe,curveCardinalClosed:Le,curveCardinalOpen:Re,curveCardinal:Ie,curveCatmullRomClosed:Ve,curveCatmullRomOpen:Ue,curveCatmullRom:B,curveLinear:u,curveLinearClosed:Ge,curveMonotoneX:Ze,curveMonotoneY:Qe,curveNatural:tt,curveStep:nt,curveStepAfter:it,curveStepBefore:rt},st=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,ct=i(function(e,t){let n=lt(e,/(?:init\b)|(?:initialize\b)/),r={};if(Array.isArray(n)){let e=n.map(e=>e.args);a(e),r=c(r,[...e])}else r=n.args;if(!r)return;let i=s(e,t),o=`config`;return r[o]!==void 0&&(i===`flowchart-v2`&&(i=`flowchart`),r[i]=r[o],delete r[o]),r},`detectInit`),lt=i(function(e,t=null){try{let r=RegExp(`[%]{2}(?![{]${st.source})(?=[}][%]{2}).*
|
|
1
|
+
import{Hr as e,Vr as t}from"./split-url-EQlIwqCq.js";import{n,t as r}from"./src-KUZZYZBk.js";import{n as i}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{R as a,h as o,p as s,r as c,s as l}from"./chunk-DU6HZSFF-D25kbUvc.js";import{s as u}from"./html-BYfTdFQ4.js";import{t as d}from"./dist-CN30VTUJ.js";function f(e){if(typeof e!=`object`||!e)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!==`[object Object]`){let t=e[Symbol.toStringTag];return t==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${t}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function ee(){}function te(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}var ne=`[object RegExp]`,p=`[object String]`,m=`[object Number]`,h=`[object Boolean]`,g=`[object Arguments]`,re=`[object Symbol]`,ie=`[object Date]`,_=`[object Map]`,v=`[object Set]`,y=`[object Array]`,b=`[object ArrayBuffer]`,ae=`[object Object]`,oe=`[object DataView]`,se=`[object Uint8Array]`,ce=`[object Uint8ClampedArray]`,le=`[object Uint16Array]`,ue=`[object Uint32Array]`,de=`[object Int8Array]`,fe=`[object Int16Array]`,pe=`[object Int32Array]`,me=`[object Float32Array]`,he=`[object Float64Array]`,ge=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})();function x(e){return ge.Buffer!==void 0&&ge.Buffer.isBuffer(e)}function _e(e){return Number.isSafeInteger(e)&&e>=0}function ve(e){return e!=null&&typeof e!=`function`&&_e(e.length)}function ye(e){return e===`__proto__`}function S(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function C(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function be(e,t){return w(e,void 0,e,new Map,t)}function w(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(S(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=w(e[a],a,n,r,i);return Object.hasOwn(e,`index`)&&(t.index=e.index),Object.hasOwn(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;r.set(e,t);for(let[a,o]of e)t.set(a,w(o,a,n,r,i));return t}if(e instanceof Set){let t=new Set;r.set(e,t);for(let a of e)t.add(w(a,void 0,n,r,i));return t}if(x(e))return e.subarray();if(C(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=w(e[a],a,n,r,i);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),T(t,e,n,r,i),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),T(t,e,n,r,i),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),T(t,e,n,r,i),t}if(e instanceof Error){let t=structuredClone(e);return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,T(t,e,n,r,i),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),T(t,e,n,r,i),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),T(t,e,n,r,i),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),T(t,e,n,r,i),t}if(typeof e==`object`&&xe(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),T(t,e,n,r,i),t}return e}function T(e,t,n=e,r,i){let a=[...Object.keys(t),...te(t)];for(let o=0;o<a.length;o++){let s=a[o],c=Object.getOwnPropertyDescriptor(e,s);(c==null||c.writable)&&(e[s]=w(t[s],s,n,r,i))}}function xe(t){switch(e(t)){case g:case y:case b:case oe:case h:case ie:case me:case he:case de:case fe:case pe:case _:case m:case ae:case ne:case v:case p:case re:case se:case ce:case le:case ue:return!0;default:return!1}}function Se(t,n){return be(t,(r,i,a,o)=>{let s=n?.(r,i,a,o);if(s!==void 0)return s;if(typeof t==`object`){if(e(t)===`[object Object]`&&typeof t.constructor!=`function`){let e={};return o.set(t,e),T(e,t,a,o),e}switch(Object.prototype.toString.call(t)){case m:case p:case h:{let e=new t.constructor(t?.valueOf());return T(e,t),e}case g:{let e={};return T(e,t),e.length=t.length,e[Symbol.iterator]=t[Symbol.iterator],e}default:return}}})}function Ce(e){return Se(e)}function E(t){return typeof t==`object`&&!!t&&e(t)===`[object Arguments]`}function we(e){return t(e)&&ve(e)}function D(e){return C(e)}function O(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(`Expected a function`);let n=function(...r){let i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);let o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(O.Cache||Map),n}O.Cache=Map;function Te(e){if(S(e))return e;if(Array.isArray(e)||C(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);let n=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new n(e);if(e instanceof RegExp){let t=new n(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new n(e.buffer.slice(0));if(e instanceof Error){let t;return t=e instanceof AggregateError?new n(e.errors,e.message,{cause:e.cause}):new n(e.message,{cause:e.cause}),t.stack=e.stack,Object.assign(t,e),t}return typeof File<`u`&&e instanceof File?new n([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e==`object`?Object.assign(Object.create(t),e):e}function Ee(e,...t){let n=t.slice(0,-1),r=t[t.length-1],i=e;for(let e=0;e<n.length;e++){let t=n[e];i=k(i,t,r,new Map)}return i}function k(e,n,r,i){if(S(e)&&(e=Object(e)),typeof n!=`object`||!n)return e;if(i.has(n))return Te(i.get(n));if(i.set(n,e),Array.isArray(n)){n=n.slice();for(let e=0;e<n.length;e++)e in n||(n[e]=void 0)}let a=[...Object.keys(n),...te(n)];for(let o=0;o<a.length;o++){let s=a[o];if(ye(s))continue;let c=n[s],l=e[s];if(E(c)&&(c={...c}),E(l)&&(l={...l}),x(c)&&(c=Ce(c)),Array.isArray(c)){if(Array.isArray(l)){let e=[],t=Reflect.ownKeys(l);for(let n=0;n<t.length;n++){let r=t[n];e[r]=l[r]}l=e}else if(we(l)){let e=[];for(let t=0;t<l.length;t++)e[t]=l[t];l=e}else l=[]}let u=r(l,c,s,e,n,i);u===void 0?Array.isArray(c)||t(l)&&t(c)&&(f(l)||f(c)||D(l)||D(c))?e[s]=k(l,c,r,i):l==null&&f(c)?e[s]=k({},c,r,i):l==null&&D(c)?e[s]=Ce(c):(l===void 0||c!==void 0)&&(e[s]=c):e[s]=u}return e}function De(e,...t){return Ee(e,...t,ee)}var A=class{constructor(e,t){this._context=e,this._x=t}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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}};function j(e){return new A(e,!0)}function Oe(e){return new A(e,!1)}function M(){}function N(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function P(e){this._context=e}P.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:N(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:N(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ke(e){return new P(e)}function Ae(e){this._context=e}Ae.prototype={areaStart:M,areaEnd:M,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:N(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function je(e){return new Ae(e)}function Me(e){this._context=e}Me.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:N(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ne(e){return new Me(e)}function Pe(e,t){this._basis=new P(e),this._beta=t}Pe.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],a=e[n]-r,o=t[n]-i,s=-1,c;++s<=n;)c=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+c*a),this._beta*t[s]+(1-this._beta)*(i+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var Fe=(function e(t){function n(e){return t===1?new P(e):new Pe(e,t)}return n.beta=function(t){return e(+t)},n})(.85);function F(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function I(e,t){this._context=e,this._k=(1-t)/6}I.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:F(this,this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:F(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Ie=(function e(t){function n(e){return new I(e,t)}return n.tension=function(t){return e(+t)},n})(0);function L(e,t){this._context=e,this._k=(1-t)/6}L.prototype={areaStart:M,areaEnd:M,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:F(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Le=(function e(t){function n(e){return new L(e,t)}return n.tension=function(t){return e(+t)},n})(0);function R(e,t){this._context=e,this._k=(1-t)/6}R.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:F(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Re=(function e(t){function n(e){return new R(e,t)}return n.tension=function(t){return e(+t)},n})(0);function z(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>1e-12){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*l+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function ze(e,t){this._context=e,this._alpha=t}ze.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:z(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var B=(function e(t){function n(e){return t?new ze(e,t):new I(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function Be(e,t){this._context=e,this._alpha=t}Be.prototype={areaStart:M,areaEnd:M,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:z(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Ve=(function e(t){function n(e){return t?new Be(e,t):new L(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function He(e,t){this._context=e,this._alpha=t}He.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:z(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Ue=(function e(t){function n(e){return t?new He(e,t):new R(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function We(e){this._context=e}We.prototype={areaStart:M,areaEnd:M,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Ge(e){return new We(e)}function Ke(e){return e<0?-1:1}function qe(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(Ke(a)+Ke(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Je(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function V(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function H(e){this._context=e}H.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:V(this,this._t0,Je(this,this._t0))}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,e!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,V(this,Je(this,n=qe(this,e,t)),n);break;default:V(this,this._t0,n=qe(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Ye(e){this._context=new Xe(e)}(Ye.prototype=Object.create(H.prototype)).point=function(e,t){H.prototype.point.call(this,t,e)};function Xe(e){this._context=e}Xe.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function Ze(e){return new H(e)}function Qe(e){return new Ye(e)}function $e(e){this._context=e}$e.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n){if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=et(e),i=et(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o])}(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function et(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function tt(e){return new $e(e)}function U(e,t){this._context=e,this._t=t}U.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};function nt(e){return new U(e,.5)}function rt(e){return new U(e,0)}function it(e){return new U(e,1)}var at=d(),ot={curveBasis:ke,curveBasisClosed:je,curveBasisOpen:Ne,curveBumpX:j,curveBumpY:Oe,curveBundle:Fe,curveCardinalClosed:Le,curveCardinalOpen:Re,curveCardinal:Ie,curveCatmullRomClosed:Ve,curveCatmullRomOpen:Ue,curveCatmullRom:B,curveLinear:u,curveLinearClosed:Ge,curveMonotoneX:Ze,curveMonotoneY:Qe,curveNatural:tt,curveStep:nt,curveStepAfter:it,curveStepBefore:rt},st=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,ct=i(function(e,t){let n=lt(e,/(?:init\b)|(?:initialize\b)/),r={};if(Array.isArray(n)){let e=n.map(e=>e.args);a(e),r=c(r,[...e])}else r=n.args;if(!r)return;let i=s(e,t),o=`config`;return r[o]!==void 0&&(i===`flowchart-v2`&&(i=`flowchart`),r[i]=r[o],delete r[o]),r},`detectInit`),lt=i(function(e,t=null){try{let r=RegExp(`[%]{2}(?![{]${st.source})(?=[}][%]{2}).*
|
|
2
2
|
`,`ig`);e=e.trim().replace(r,``).replace(/'/gm,`"`),n.debug(`Detecting diagram directive${t===null?``:` type:`+t} based on the text:${e}`);let i,a=[];for(;(i=o.exec(e))!==null;)if(i.index===o.lastIndex&&o.lastIndex++,i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t)){let e=i[1]?i[1]:i[2],t=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;a.push({type:e,args:t})}return a.length===0?{type:e,args:null}:a.length===1?a[0]:a}catch(r){return n.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},`detectDirective`),ut=i(function(e){return e.replace(o,``)},`removeDirectives`),dt=i(function(e,t){for(let[n,r]of t.entries())if(r.match(e))return n;return-1},`isSubstringInArray`);function W(e,t){return e?ot[`curve${e.charAt(0).toUpperCase()+e.slice(1)}`]??t:t}i(W,`interpolateToCurve`);function ft(e,t){let n=e.trim();if(n)return t.securityLevel===`loose`?n:(0,at.sanitizeUrl)(n)}i(ft,`formatUrl`);var pt=i((e,...t)=>{let r=e.split(`.`),i=r.length-1,a=r[i],o=window;for(let t=0;t<i;t++)if(o=o[r[t]],!o){n.error(`Function name: ${e} not found in window`);return}o[a](...t)},`runFunc`);function G(e,t){return!e||!t?0:Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)}i(G,`distance`);function mt(e){let t,n=0;return e.forEach(e=>{n+=G(e,t),t=e}),K(e,n/2)}i(mt,`traverseEdge`);function ht(e){return e.length===1?e[0]:mt(e)}i(ht,`calcLabelPosition`);var gt=i((e,t=2)=>{let n=10**t;return Math.round(e*n)/n},`roundNumber`),K=i((e,t)=>{let n,r=t;for(let t of e){if(n){let e=G(t,n);if(e===0)return n;if(e<r)r-=e;else{let i=r/e;if(i<=0)return n;if(i>=1)return{x:t.x,y:t.y};if(i>0&&i<1)return{x:gt((1-i)*n.x+i*t.x,5),y:gt((1-i)*n.y+i*t.y,5)}}}n=t}throw Error(`Could not find a suitable point for the given distance`)},`calculatePoint`),_t=i((e,t,r)=>{n.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());let i=K(t,25),a=e?10:5,o=Math.atan2(t[0].y-i.y,t[0].x-i.x),s={x:0,y:0};return s.x=Math.sin(o)*a+(t[0].x+i.x)/2,s.y=-Math.cos(o)*a+(t[0].y+i.y)/2,s},`calcCardinalityPosition`);function vt(e,t,r){let i=structuredClone(r);n.info(`our points`,i),t!==`start_left`&&t!==`start_right`&&i.reverse();let a=K(i,25+e),o=10+e*.5,s=Math.atan2(i[0].y-a.y,i[0].x-a.x),c={x:0,y:0};return t===`start_left`?(c.x=Math.sin(s+Math.PI)*o+(i[0].x+a.x)/2,c.y=-Math.cos(s+Math.PI)*o+(i[0].y+a.y)/2):t===`end_right`?(c.x=Math.sin(s-Math.PI)*o+(i[0].x+a.x)/2-5,c.y=-Math.cos(s-Math.PI)*o+(i[0].y+a.y)/2-5):t===`end_left`?(c.x=Math.sin(s)*o+(i[0].x+a.x)/2-5,c.y=-Math.cos(s)*o+(i[0].y+a.y)/2-5):(c.x=Math.sin(s)*o+(i[0].x+a.x)/2,c.y=-Math.cos(s)*o+(i[0].y+a.y)/2),c}i(vt,`calcTerminalLabelPosition`);function q(e){let t=``,n=``;for(let r of e)r!==void 0&&(r.startsWith(`color:`)||r.startsWith(`text-align:`)?n=n+r+`;`:t=t+r+`;`);return{style:t,labelStyle:n}}i(q,`getStylesFromArray`);var yt=0,bt=i(()=>(yt++,`id-`+Math.random().toString(36).substr(2,12)+`-`+yt),`generateId`);function xt(e){let t=``;for(let n=0;n<e;n++)t+=`0123456789abcdef`.charAt(Math.floor(Math.random()*16));return t}i(xt,`makeRandomHex`);var St=i(e=>xt(e.length),`random`),Ct=i(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`),wt=i(function(e,t){let n=t.text.replace(l.lineBreakRegex,` `),[,r]=Q(t.fontSize),i=e.append(`text`);i.attr(`x`,t.x),i.attr(`y`,t.y),i.style(`text-anchor`,t.anchor),i.style(`font-family`,t.fontFamily),i.style(`font-size`,r),i.style(`font-weight`,t.fontWeight),i.attr(`fill`,t.fill),t.class!==void 0&&i.attr(`class`,t.class);let a=i.append(`tspan`);return a.attr(`x`,t.x+t.textMargin*2),a.attr(`fill`,t.fill),a.text(n),i},`drawSimpleText`),Tt=O((e,t,n)=>{if(!e||(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:`Arial`,joinWith:`<br/>`},n),l.lineBreakRegex.test(e)))return e;let r=e.split(` `).filter(Boolean),i=[],a=``;return r.forEach((e,o)=>{let s=Y(`${e} `,n),c=Y(a,n);if(s>t){let{hyphenatedStrings:r,remainingWord:o}=Et(e,t,`-`,n);i.push(a,...r),a=o}else c+s>=t?(i.push(a),a=e):a=[a,e].filter(Boolean).join(` `);o+1===r.length&&i.push(a)}),i.filter(e=>e!==``).join(n.joinWith)},(e,t,n)=>`${e}${t}${n.fontSize}${n.fontWeight}${n.fontFamily}${n.joinWith}`),Et=O((e,t,n=`-`,r)=>{r=Object.assign({fontSize:12,fontWeight:400,fontFamily:`Arial`,margin:0},r);let i=[...e],a=[],o=``;return i.forEach((e,s)=>{let c=`${o}${e}`;if(Y(c,r)>=t){let e=s+1,t=i.length===e,r=`${c}${n}`;a.push(t?c:r),o=``}else o=c}),{hyphenatedStrings:a,remainingWord:o}},(e,t,n=`-`,r)=>`${e}${t}${n}${r.fontSize}${r.fontWeight}${r.fontFamily}`);function J(e,t){return X(e,t).height}i(J,`calculateTextHeight`);function Y(e,t){return X(e,t).width}i(Y,`calculateTextWidth`);var X=O((e,t)=>{let{fontSize:n=12,fontFamily:i=`Arial`,fontWeight:a=400}=t;if(!e)return{width:0,height:0};let[,o]=Q(n),s=[`sans-serif`,i],c=e.split(l.lineBreakRegex),u=[],d=r(`body`);if(!d.remove)return{width:0,height:0,lineHeight:0};let f=d.append(`svg`);for(let e of s){let t=0,n={width:0,height:0,lineHeight:0};for(let r of c){let i=Ct();i.text=r||``;let s=wt(f,i).style(`font-size`,o).style(`font-weight`,a).style(`font-family`,e),c=(s._groups||s)[0][0].getBBox();if(c.width===0&&c.height===0)throw Error(`svg element not in render tree`);n.width=Math.round(Math.max(n.width,c.width)),t=Math.round(c.height),n.height+=t,n.lineHeight=Math.round(Math.max(n.lineHeight,t))}u.push(n)}return f.remove(),u[isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Dt=class{constructor(e=!1,t){this.count=0,this.count=t?t.length:0,this.next=e?()=>this.count++:()=>Date.now()}static{i(this,`InitIDGenerator`)}},Z,Ot=i(function(e){return Z||=document.createElement(`div`),e=escape(e).replace(/%26/g,`&`).replace(/%23/g,`#`).replace(/%3B/g,`;`),Z.innerHTML=e,unescape(Z.textContent)},`entityDecode`);function kt(e){return`str`in e}i(kt,`isDetailedError`);var At=i((e,t,n,r)=>{if(!r)return;let i=e.node()?.getBBox();i&&e.append(`text`).text(r).attr(`text-anchor`,`middle`).attr(`x`,i.x+i.width/2).attr(`y`,-n).attr(`class`,t)},`insertTitle`),Q=i(e=>{if(typeof e==`number`)return[e,e+`px`];let t=parseInt(e??``,10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+`px`]:[t,e]},`parseFontSize`);function $(e,t){return De({},e,t)}i($,`cleanAndMerge`);var jt={assignWithDepth:c,wrapLabel:Tt,calculateTextHeight:J,calculateTextWidth:Y,calculateTextDimensions:X,cleanAndMerge:$,detectInit:ct,detectDirective:lt,isSubstringInArray:dt,interpolateToCurve:W,calcLabelPosition:ht,calcCardinalityPosition:_t,calcTerminalLabelPosition:vt,formatUrl:ft,getStylesFromArray:q,generateId:bt,random:St,runFunc:pt,entityDecode:Ot,insertTitle:At,isLabelCoordinateInPath:It,parseFontSize:Q,InitIDGenerator:Dt},Mt=i(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)}),t=t.replace(/#\w+;/g,function(e){let t=e.substring(1,e.length-1);return/^\+?\d+$/.test(t)?`fl°°`+t+`¶ß`:`fl°`+t+`¶ß`}),t},`encodeEntities`),Nt=i(function(e){return e.replace(/fl°°/g,`&#`).replace(/fl°/g,`&`).replace(/¶ß/g,`;`)},`decodeEntities`),Pt=i((e,t,{counter:n=0,prefix:r,suffix:i},a)=>a||`${r?`${r}_`:``}${e}_${t}_${n}${i?`_${i}`:``}`,`getEdgeId`);function Ft(e){return e??null}i(Ft,`handleUndefinedAttr`);function It(e,t){let n=Math.round(e.x),r=Math.round(e.y),i=t.replace(/(\d+\.\d+)/g,e=>Math.round(parseFloat(e)).toString());return i.includes(n.toString())||i.includes(r.toString())}i(It,`isLabelCoordinateInPath`);export{ue as $,E as A,me as B,Qe as C,j as D,ke as E,b as F,_ as G,fe as H,y as I,ne as J,m as K,h as L,ve as M,x as N,Oe as O,g as P,le as Q,oe as R,Ze as S,Ie as T,pe as U,he as V,de as W,p as X,v as Y,re as Z,Tt as _,Nt as a,nt as b,Pt as c,W as d,se as et,kt as f,jt as g,ut as h,$ as i,S as j,D as k,q as l,St as m,J as n,Mt as o,Q as p,ae as q,Y as r,bt as s,X as t,ce as tt,Ft as u,it as v,B as w,tt as x,rt as y,ie as z};
|